简单的物流项目实战,WPF的MVVM设计模式(五)

开始界面
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Grid.Row=""
Content="注册"
Height=""
Width=""
Name="SignUpButton"
Click="SignUpButton_Click"
/>
<Button Grid.Row=""
Content="登录"
Height=""
Width=""
Name="SignInButton"
Click="SignInButton_Click"/>
<!--<Button Grid.Row=""
Content="下单"
Height=""
Width=""
Name="DownButton"
Click="DownButton_Click"/>
<Button Grid.Row=""
Content="查看"
Height=""
Width=""
Name="ReadButton"
Click="ReadButton_Click"/>-->
</Grid>
注册界面

<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Ellipse Height="" Width="">
<Ellipse.Fill>
<ImageBrush ImageSource="F:\5\WMS\WMS\wallhaven-ym7237.png"/>
</Ellipse.Fill>
</Ellipse>
<StackPanel Grid.Row="">
<TextBox Name="UserAccount"
Text="{Binding UserAccount}"
Width=""
Height=""
Margin="0 10 0 10"/>
<TextBox Name="Password"
Text="{Binding Password}"
Width=""
Height=""
Margin="0 10 0 10"/>
<Button Name="SignUpButton" Command="{Binding InsertCommand}"
Width=""
Height=""
Content="注册"/>
</StackPanel>
</Grid>
登录界面

<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Ellipse Height="" Width="">
<Ellipse.Fill>
<ImageBrush ImageSource="F:\5\WMS\WMS\wallhaven-ym7237.png"/>
</Ellipse.Fill>
</Ellipse>
<StackPanel Grid.Row="">
<TextBox Name="UserAccount"
Text="{Binding Username}"
Width=""
Height=""
Margin="0 10 0 10"/>
<TextBox Name="Password"
Text="{Binding Userpassword}"
Width=""
Height=""
Margin="0 10 0 10"/>
<Button Name="SignUpButton" Command="{Binding GetCommand}"
Width=""
Height=""
Content="登录"/>
</StackPanel>
</Grid>
下单界面

<Grid>
<StackPanel HorizontalAlignment="Center"
Width="">
<TextBlock Text="省份"/>
<TextBox Name="TextBoxProvince"
Text="{Binding Province}"
Margin="0 10 0 10"
Height=""/>
<TextBlock Text="城市"/>
<TextBox Name="TextBoxCity"
Text="{Binding City}"
Margin="0 10 0 10"
Height=""/>
<TextBlock Text="区"/>
<TextBox Name="TextBoxArea"
Text="{Binding Area}"
Margin="0 10 0 10"
Height=""/>
<TextBlock Text="街道"/>
<TextBox Name="TextBoxStreet"
Text="{Binding Street}"
Margin="0 10 0 10"
Height=""/>
<TextBlock Text="用户名"/>
<TextBox Name="TextBoxUserName"
Text="{Binding Username}"
Margin="0 10 0 10"
Height=""/>
<TextBlock Text="手机号"/>
<TextBox Name="TextBoxPhoneNumber"
Text="{Binding Phonenumber}"
Margin="0 10 0 10"
Height=""/>
<TextBlock Text="创建时间"/>
<TextBox Name="TextBoxCteateTime"
Text="{Binding Createtime}"
Margin="0 10 0 10"
Height=""/>
<Button Content="保存"
Height=""
Command="{Binding CreateExpressCommand}"/>
</StackPanel>
</Grid>
查看下单信息

<Grid>
<StackPanel>
<TextBlock Width="" Height="" Text="{Binding Province}"/>
<TextBlock Width="" Height="" Text="{Binding City}"/>
<TextBlock Width="" Height="" Text="{Binding Area}"/>
<TextBlock Width="" Height="" Text="{Binding Street}"/>
<TextBlock Width="" Height="" Text="{Binding Username}"/>
<TextBlock Width="" Height="" Text="{Binding Phonenumber}"/>
<TextBlock Width="" Height="" Text="{Binding Createtime}"/>
<Button Content="读取" Command="{Binding GetExpressCommand}"
Width=""/>
</StackPanel>
</Grid>
实际上到这里就已经完了,但是每个页面的后台都有代码,还没有完,嘻嘻嘻





如下效果图

每个页面的后面都没有什么代码就一句代码作为Views和Models连接起来,达到了代码上的解耦,由于博主后面部分没有太多的讲解,时间真的太紧了,这两篇博客也是脱了好久,我猜这么菜的技术,应该没有人看吧,哈哈哈。不过没有什么所谓吧,如果觉得有用的话点个推荐吧,谢谢!
简单的物流项目实战,WPF的MVVM设计模式(五)的更多相关文章
- 简单的物流项目实战,WPF的MVVM设计模式(一)
新建一个WPF项目,命名为WMS 然后分别新建文件夹,Data,Models,Views,ViewModels,Services,如下图所示 然后通过NuGet安装连个Nuget包,分别为SQLite ...
- 简单的物流项目实战,WPF的MVVM设计模式(四)
接下来写ViewModels 创建运单的ViewModel类 public class CreateExpressWindowViewModel: NotificationObject { priva ...
- 简单的物流项目实战,WPF的MVVM设计模式(三)
往Services文件里面添加接口以及实现接口 IUserService接口 List<User> GetAllUser(); GetUserService类 ConnectToDatab ...
- 简单的物流项目实战,WPF的MVVM设计模式(二)
往Models文件添加一个类,ConnectObject /// <summary> /// 链接数据库字符串 /// </summary ...
- 使用MVVM设计模式构建WPF应用程序
使用MVVM设计模式构建WPF应用程序 本文是翻译大牛Josh Smith的文章,WPF Apps With The Model-View-ViewModel Design Pattern,译者水平有 ...
- WPF系列教程——(二)使用Prism实现MVVM设计模式 - 简书
原文:WPF系列教程--(二)使用Prism实现MVVM设计模式 - 简书 本文假设你已经知道MVVM设计模式是什么,所以直接进入正题,今天我们就用Prism来实现WPF的MVVM设计模式,百度上关于 ...
- 15套java架构师、集群、高可用、高可扩展、高性能、高并发、性能优化、Spring boot、Redis、ActiveMQ、Nginx、Mycat、Netty、Jvm大型分布式项目实战视频教程
* { font-family: "Microsoft YaHei" !important } h1 { color: #FF0 } 15套java架构师.集群.高可用.高可扩展. ...
- 15套java互联网架构师、高并发、集群、负载均衡、高可用、数据库设计、缓存、性能优化、大型分布式 项目实战视频教程
* { font-family: "Microsoft YaHei" !important } h1 { color: #FF0 } 15套java架构师.集群.高可用.高可扩 展 ...
- java架构师负载均衡、高并发、nginx优化、tomcat集群、异步性能优化、Dubbo分布式、Redis持久化、ActiveMQ中间件、Netty互联网、spring大型分布式项目实战视频教程百度网盘
15套Java架构师详情 * { font-family: "Microsoft YaHei" !important } h1 { background-color: #006; ...
随机推荐
- TTTTTTTTTTTTTT POJ 3678 与或异或 2-SAT+强连通 模板题
Katu Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9129 Accepted: 3391 Descripti ...
- Android使用SDKManager下载SDK速度慢 容易丢包和异常的解决办法
第一步, SDK Manager启动之后,会先解析一些google的xml文件,会在Log里面打印出一些日志信息. 解析完之后,把日志全部拷贝到一个记事本里(这一步是因为日志窗口不支持查找),在里面查 ...
- BZOJ 4417 Luogu P3990 [SHOI2013]超级跳马 (DP、矩阵乘法)
题目链接: (bzoj) https://www.lydsy.com/JudgeOnline/problem.php?id=4417 (luogu)https://www.luogu.org/prob ...
- BZOJ 2281 Luogu P2490 [SDOI2011]黑白棋 (博弈论、DP计数)
怎么SDOI2011和SDOI2019的两道题这么像啊..(虽然并不完全一样) 题目链接: (bzoj) https://www.lydsy.com/JudgeOnline/problem.php?i ...
- Spring Boot教程(二十二)使用Swagger2构建强大的RESTful API文档(1)
由于Spring Boot能够快速开发.便捷部署等特性,相信有很大一部分Spring Boot的用户会用来构建RESTful API.而我们构建RESTful API的目的通常都是由于多终端的原因,这 ...
- Java数据结构之排序---选择排序
简单选择排序的介绍: 从给定的序列中,按照指定的规则选出某一个元素,再根据规定交换位置后达到有序的目的. 简单选择排序的基本思想: 假定我们的数组为int [] arr = new int[n],第一 ...
- vue 路由懒加载 resolve vue-router配置
使用方法 component:resolve => require(['@/pages/About'],resolve) //"@"相当于".." 懒加载 ...
- (知识)width、naturalWidth、clientWidth、offsetWidth区别整理
今天在做图片裁剪功能的时候,参考了下网友的资料,发现大家对图片宽度的获取方式不尽相同,于是详细整理下各个属性的区别(详细请参考MDN). 1,HTMLImageElement.width是一个unsi ...
- springboot 基于@Scheduled注解 实现定时任务
前言 使用SpringBoot创建定时任务非常简单,目前主要有以下三种创建方式: 一.基于注解(@Scheduled) 二.基于接口(SchedulingConfigurer) 前者相信大家都很熟悉, ...
- python面向对象之封装,多态与继承
一.继承,包括单继承和多继承 对于面向对象的继承来说,其实就是将多个类共有的方法提取到父类中,子类 仅需继承父类而不必一一实现每个方法. 实例: #coding=utf-8 class Person( ...