开始界面

    <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设计模式(五)的更多相关文章

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

    新建一个WPF项目,命名为WMS 然后分别新建文件夹,Data,Models,Views,ViewModels,Services,如下图所示 然后通过NuGet安装连个Nuget包,分别为SQLite ...

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

    接下来写ViewModels 创建运单的ViewModel类 public class CreateExpressWindowViewModel: NotificationObject { priva ...

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

    往Services文件里面添加接口以及实现接口 IUserService接口 List<User> GetAllUser(); GetUserService类 ConnectToDatab ...

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

    往Models文件添加一个类,ConnectObject         /// <summary>        /// 链接数据库字符串        /// </summary ...

  5. 使用MVVM设计模式构建WPF应用程序

    使用MVVM设计模式构建WPF应用程序 本文是翻译大牛Josh Smith的文章,WPF Apps With The Model-View-ViewModel Design Pattern,译者水平有 ...

  6. WPF系列教程——(二)使用Prism实现MVVM设计模式 - 简书

    原文:WPF系列教程--(二)使用Prism实现MVVM设计模式 - 简书 本文假设你已经知道MVVM设计模式是什么,所以直接进入正题,今天我们就用Prism来实现WPF的MVVM设计模式,百度上关于 ...

  7. 15套java架构师、集群、高可用、高可扩展、高性能、高并发、性能优化、Spring boot、Redis、ActiveMQ、Nginx、Mycat、Netty、Jvm大型分布式项目实战视频教程

    * { font-family: "Microsoft YaHei" !important } h1 { color: #FF0 } 15套java架构师.集群.高可用.高可扩展. ...

  8. 15套java互联网架构师、高并发、集群、负载均衡、高可用、数据库设计、缓存、性能优化、大型分布式 项目实战视频教程

    * { font-family: "Microsoft YaHei" !important } h1 { color: #FF0 } 15套java架构师.集群.高可用.高可扩 展 ...

  9. java架构师负载均衡、高并发、nginx优化、tomcat集群、异步性能优化、Dubbo分布式、Redis持久化、ActiveMQ中间件、Netty互联网、spring大型分布式项目实战视频教程百度网盘

    15套Java架构师详情 * { font-family: "Microsoft YaHei" !important } h1 { background-color: #006; ...

随机推荐

  1. 3D Computer Grapihcs Using OpenGL - 20 结合Buffer

    在上一节的案例中,我们使用了四个Buffer Object,立方体的VertexBuffer,立方体的索引Buffer,四面体的VertexBuffer,四面体的索引Buffer. 我们这节尝试把两个 ...

  2. Thymeleaf 2-基础语法

    三.基础语法 1.创建HTML 由上文也可以知道需要在html中添加: <html xmlns:th="http://www.thymeleaf.org"> 这样,下文 ...

  3. 【spring boot 学习笔记】日志相关

    1. 如何启用日志? maven依赖中添加:spring-boot-starter-logging <dependency> <groupId>org.springframew ...

  4. android和网络连接相关的类URL,URLConnection,HttpURLConnection,HttpClient

    这几个类都是用于和服务器端的连接,有些功能都能够实现,关系是: 一.URL URL标识着网络上的一个资源:该类包含一些URL自身的方法,如获取URL对应的主机名称,端口号,协议,查询字符串外,还有些方 ...

  5. CSS注

    1.css3内容上下左右居中 .box { display:-moz-box; -moz-box-pack:center; -moz-box-align:center; display:-webkit ...

  6. tomcat简单性能优化

    1.内存使用配置 2.最大连接数配置

  7. 实验报告(一)&第三周总结

    Java实验报告 实验一 Java开发环境与简单Java程序 一. 实验目的 (1)      熟悉JDK开发环境 (2)      熟练掌握结构化程序设计方法 二. 实验内容 1.      打印输 ...

  8. leetcode-mid-sorting and searching-162. Find Peak Element

    mycode  54.81% class Solution(object): def findPeakElement(self, nums): """ :type num ...

  9. Promise【其他模式】

    Promise @Slf4j public class Promise { /** * Promise Pattern[承诺]:承诺表示当前还未完成,但是会在将来完成的操作,用于实现异步计算. */ ...

  10. EMQ插件通过HTTP连接认证服务器实现认证

    需求 在EMQ中添加认证插件,将到来的MQTT连接的ClientID.UserName.Password通过HTTP协议发送到认证服务器,用返回的数据决定是否允许该连接: 在连接时和断开时向服务器发送 ...