简单的物流项目实战,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; ...
随机推荐
- [POJ]P3126 Prime Path[BFS]
[POJ]P3126 Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35230 Accepted: ...
- React 初试
小Demo, 后面会进行拓展的 import React from 'react'; import ReactDOM from 'react-dom'; class Welcome extends R ...
- Web Api试图加载格式不正确的程序,解决方法
Web Api试图加载格式不正确的程序,错误如下: 问题原因: 出现上述问题的原因是,所加载的程序集中有32位的,也有64位的,IIS 7 程序池 在Windows下.Net FrameWork是64 ...
- ppt制作的相关技巧
一.好的ppt需要达到的目标是: 用情感打动你,用逻辑说服你 二.好主题,写在封面上 主标题带来冲击力,副标题提供描述性细节 如何打造好标题: (1)用数字给标题添彩 (2)想畅销书学标题 (3)向流 ...
- ffmpeg转码指南
Windows下面的安装: 浏览器打开https://ffmpeg.zeranoe.com/builds/ 选择好版本,位数如果不确定的话就下载32bit的,然后选择static,然后下载 下载完成后 ...
- web开发中会话跟踪的方法有哪些
会话跟踪就是浏览器和服务器通信 1.cookie 2.session 3.隐藏input 4.url重写 5.ip地址
- 用Vue来实现音乐播放器(二十一):歌手详情数据抓取
第一步:在api文件夹下的singer.js中抛出getSingerDetail方法 第二步:在singer-detail.vue组件中引入api文件夹下的singer.js和config.js 第三 ...
- Jmeter之简单控制器
在很多情况下,我们 需要将多个请求放置在一起,但是没有逻辑上的操作,这个时候就可以使用简单控制器了. 如 :
- 前端使用Git 切换分支 查看线上远程,本地切换
想要使用Git切换线上分支时先 得先查看线上分支 git branch -a //查看线上分支 git branch //查看本地分支 这是线上的分支图(当前是master) 知道有那些分支就可以进行 ...
- 【ABAP系列】SAP S/4 HANA的SMARTFORMS如何切换到非word编辑器
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP S/4 HANA的SMA ...