当前位置: 首页 > news >正文

在vs上用c 做登录网站推广seo是什么意思

在vs上用c 做登录网站,推广seo是什么意思,国外做油画的网站,导航网站 wordpress此处下载源码 当form初始化显示#xff0c;Register按钮应该启动和没有输入错误应该显示。如果用户点击注册按钮在特定的输入无效数据#xff0c;form将显示输入错误和禁用的注册按钮。实现逻辑在标准的IDataErrorInfo接口。请查阅IDataErrorInfo接口#xff08;System.Com…此处下载源码 当form初始化显示Register按钮应该启动和没有输入错误应该显示。如果用户点击注册按钮在特定的输入无效数据form将显示输入错误和禁用的注册按钮。实现逻辑在标准的IDataErrorInfo接口。请查阅IDataErrorInfo接口System.ComponentModelMSDN文章 查阅IDataErrorInfo接口实现在RegistrationViewModel类 [POCOViewModel] public class RegistrationViewModel : IDataErrorInfo {...string IDataErrorInfo.Error {get {IDataErrorInfo me (IDataErrorInfo)this;string error me[BindableBase.GetPropertyName(() FirstName)] me[BindableBase.GetPropertyName(() LastName)] me[BindableBase.GetPropertyName(() Email)] me[BindableBase.GetPropertyName(() Password)] me[BindableBase.GetPropertyName(() ConfirmPassword)] me[BindableBase.GetPropertyName(() Birthday)];if (!string.IsNullOrEmpty(error))return Please check inputted data.;return null;}}string IDataErrorInfo.this[string columnName] {get {string firstNameProp BindableBase.GetPropertyName(() FirstName);string lastNameProp BindableBase.GetPropertyName(() LastName);string emailProp BindableBase.GetPropertyName(() Email);string passwordProp BindableBase.GetPropertyName(() Password);string confirmPasswordProp BindableBase.GetPropertyName(() ConfirmPassword);string birthdayProp BindableBase.GetPropertyName(() Birthday);string genderProp BindableBase.GetPropertyName(() Gender);if (columnName firstNameProp) {if (FirstName null || string.IsNullOrEmpty(FirstName))return string.Format(You cannot leave the {0} field empty., firstNameProp);} else if (columnName lastNameProp) {if (LastName null || string.IsNullOrEmpty(LastName))return string.Format(You cannot leave the {0} field empty., lastNameProp);} else if (columnName emailProp) {if (Email null || string.IsNullOrEmpty(Email))return string.Format(You cannot leave the {0} field empty., emailProp);} else if (columnName passwordProp) {if (Password null || string.IsNullOrEmpty(Password))return string.Format(You cannot leave the {0} field empty., passwordProp);} else if (columnName confirmPasswordProp) {if (!string.IsNullOrEmpty(Password) Password ! ConfirmPassword)return These passwords do not match. Please try again.;} else if (columnName birthdayProp) {if (Birthday null || string.IsNullOrEmpty(Birthday.ToString()))return string.Format(You cannot leave the {0} field empty., birthdayProp);} else if (columnName genderProp) {if (Gender -1)return string.Format(You cannot leave the {0} field empty., genderProp);}return null;}} } 启动IDataErrorInfo验证在XAML设置Binding.ValidatesOnDataErrors参数为true。设置绑定参数对于每一个form内的编辑器包括ConfirmPassword编辑器 dxlc:LayoutControl ... ...dxe:TextEdit NullTextFIRST ValidateOnEnterKeyPressedTrue ValidateOnTextInputFalsedxe:TextEdit.EditValueBinding PathFirstName ValidatesOnDataErrorsTrueUpdateSourceTriggerPropertyChanged ModeTwoWay//dxe:TextEdit.EditValue/dxe:TextEdit...dxe:PasswordBoxEdit EditValue{Binding ConfirmPassword, ValidatesOnDataErrorsTrue} ValidateOnEnterKeyPressedTrue ValidateOnTextInputTrue/... /dxlc:LayoutControl 如果现在运行sample将验证error当应用程序开始。 此问题是相关于输入验证IDataErrorInfo接口实现。修复此问题重要验证错误没有返回在ViewModel如果一个用户没有点击注册按钮。 [POCOViewModel] public class RegistrationViewModel : IDataErrorInfo {...public void AddEmployee() {string error EnableValidationAndGetError();if(error ! null) return;EmployeesModelHelper.AddNewEmployee(FirstName, LastName, Email, Password, Birthday.Value);}bool allowValidation false;string EnableValidationAndGetError() {allowValidation true;string error ((IDataErrorInfo)this).Error;if(!string.IsNullOrEmpty(error)) {this.RaisePropertiesChanged();return error;}return null;}string IDataErrorInfo.Error {get {if(!allowValidation) return null;...}}string IDataErrorInfo.this[string columnName] {get {if(!allowValidation) return null;...}} } RegistrationViewModel没有返回一个错误直到用户点击注册按钮。输入数据有一个错误如果用户点击Register不需要点击记录执行ViewModel验证逻辑在EnableValidationAndGetError方法。注意EnableValidationAndGetError调用RaisePropertiesChanged。此方法通常调用指南潜在数据更改在这种情况一个直线需要初始化验证进程。 验证几乎完成。剩余问题是Password字段。当用户修改Password字段ConfirmPassword字段没有反应。你可以调用RaisePropertyChanged方法对于ConfirmPassword字段当Password字段更改。 [POCOViewModel] public class RegistrationViewModel : IDataErrorInfo {...public virtual string Password { get; set; }public virtual string ConfirmPassword { get; set; }...protected void OnPasswordChanged() {this.RaisePropertyChanged(x x.ConfirmPassword);}... } 必须显示一个消息指示当注册成功和失败。DevExpress.Xpf.Mvvm库提供一个服务机制在Mvvm支持这些任务。 使用服务首先需要定义一个服务显示消息框。DXMessageBoxService已经定义在MainView等级。取回服务从RegistrationViewModel,使用GetServiceT扩展方法。 [POCOViewModel] public class RegistrationViewModel : IDataErrorInfo {...public void AddEmployee() {string error EnableValidationAndGetError();if(error ! null) {OnValidationFailed(error);return;}EmployeesModelHelper.AddNewEmployee(FirstName, LastName, Email, Password, Birthday.Value);OnValidationSucceeded();}void OnValidationSucceeded() {this.GetServiceIMessageBoxService().Show(Registration succeeded, Registration Form, MessageBoxButton.OK);}void OnValidationFailed(string error) {this.GetServiceIMessageBoxService().Show(Registration failed. error, Registration Form, MessageBoxButton.OK);}... } 代码之上声明两个方法-OnValidationSucceeded和OnValidationFailed-调用验证成功和失败分别。这些方法获得IMessageBoxService服务定义在视图。服务接口提供Show方法显示方法框。 结果显示如下。 用户离开编辑框空白区域或者无效输入数据这些相应消息将显示。 输入数据正确用户通知注册成功完成。 此时注册form是对于所有意图和目的完成。
http://www.zqtcl.cn/news/919645/

相关文章:

  • 网站建设工程师待遇wordpress 工具插件
  • 网站怎样做反向链接中国新闻社邮箱
  • 专业的外贸网站建设wordpress后台编辑
  • 德清建设银行网站2016wordpress淘宝客程序
  • 网站建设包括两个方面专业网站设计企业
  • dnf可以去哪个网站做代练导购网站 模板
  • 苏州网站开发培训深圳福田区口岸社区
  • 信息网站开发网络公司jsp实战网站开发视频
  • 做 理财网站深圳网站快速优化公司
  • 公司网站建设方案江门建设建筑网站
  • 网站是生成静态好还是动态好怎么找到域名做的那个网站
  • 婚纱网站页面设计上海商地网站建设公司
  • 模板手机网站建设多少钱百度搜索词排名
  • 怎么学做网站住房和城乡建设部网站一级建造师
  • 政务公开网惠州seo推广公司
  • 建设英文商城网站网站开发工具选择
  • 沈阳市浑南区城乡建设局网站淄博哪里有网站建设平台
  • 做不锈钢管网站口碑好的定制网站建设提供商
  • 做网站推广销售wordpress 随机页面
  • 陈坤做直播在哪个网站如何在建设银行网站预约纪念币
  • 如何做网站么新网站一天做多少外链
  • 用家用路由器ip做网站营销策略方案
  • 学历教育网站建设网页前端是什么
  • 相同网站名网站县区分站点建设
  • 医疗器械网站建设方案南京网站制作系统
  • 小网站托管费用企查宝企业查询
  • 专门做特卖的网站是什么外国炫酷网站网址
  • 学习网站的建设wordpress批量拿shell
  • 中企动力做的网站推软件
  • 北京财优化沧州seo公司