public void Start(object args) { if (true) { postDataWithWebClient(); } if (null != args) { try { customInfo = (MTMCustInfo)args; if (String.Equals("no", customInfo.isfirst)) { textBlock.Text = "修改信息"; textBlock4.Visibility = Visibility.Hidden; canvas14.Margin = new Thickness(729, 746.5, 853, 247.5); } } catch (Exception) { } EventAggregator eventAggragator = ServiceLocator.Current.GetInstance <EventAggregator>(); eventAggragator.GetEvent <WebSocketEvent>().Subscribe(OnWebSocketEvent); } }
private void OnWebSocketEvent(object data) { Console.WriteLine("data ======== OK "); if (null != data) { customInfo = data as MTMCustInfo; xinxi2_png.Text = "姓名: " + customInfo.name; textBlock6.Text = "性别: " + customInfo.gender; nationalityText.Text = "生日:" + customInfo.birthday; if ("phone" == customInfo.pattern) { xinxi4_png.Text = "联系方式(手机):" + customInfo.phone; } else { xinxi4_png.Text = "联系方式(座机):" + customInfo.phonezone + customInfo.phonenumber + customInfo.extension; } xinxi5_png.Text = "身份证 :" + customInfo.ssn; xinxi6_png.Text = "邮件 :" + customInfo.email; textBlock3.Text = "会员卡号 :" + customInfo.cardno; textBlock4.Text = "开卡时间 :" + customInfo.carddate; textBlock2.Text = "地址 :" + customInfo.province + customInfo.city + customInfo.district + customInfo.detailaddress; } }
private void OnWebSocketEvent(object data) { Console.WriteLine("data ======== OK "); if (null != data) { customInfo = data as MTMCustInfo; if (String.Equals("close", customInfo.operatetype)) { (Parent as NavigationManager).GoToPage(typeof(Dashboard)); } //input_textblock_userinfo_name.Text = "姓名: " + customInfo.name; //input_textblock_userinfo_genderr.Text = "性别: " + customInfo.gender; //input_textblock_userinfo_birthday.Text = "生日:" + customInfo.birthday; //if ("phone" == customInfo.pattern) // input_textblock_userinfo_contact.Text = "联系方式(手机):" + customInfo.phone; //else // input_textblock_userinfo_contact.Text = "联系方式(座机):" + customInfo.phonezone + customInfo.phonenumber + customInfo.extension; //input_textblock_userinfo_ssn.Text = "身份证 :" + customInfo.ssn; //input_textblock_userinfo_email.Text = "邮件 :" + customInfo.email; //input_textblock_vipinfo_id.Text = "会员卡号 :" + customInfo.cardno; //input_textblock_userinfo_time.Text = "开卡时间 :" + customInfo.carddate; //input_textblock_userinfo_address.Text = "地址 :" + customInfo.province + customInfo.city + customInfo.district + customInfo.detailaddress; xinxi2_png.Text = "姓名: " + customInfo.name + " 性别:" + customInfo.gender; //input_textblock_userinfo_genderr.Text = "性别: " + customInfo.gender; xinxi3_png.Text = "生日:" + customInfo.birthday; if ("phone" == customInfo.pattern) { xinxi4_png.Text = "联系方式(手机):" + customInfo.phone; } else { xinxi4_png.Text = "联系方式(座机):" + customInfo.phonezone + customInfo.phonenumber + customInfo.extension; } xinxi5_png.Text = "身份证 :" + customInfo.ssn; xinxi6_png.Text = "邮件 :" + customInfo.email; textBlock3.Text = "会员卡号 :" + customInfo.cardno; textBlock4.Text = "开卡时间 :" + customInfo.carddate; textBlock2.Text = "地址 :" + customInfo.province + customInfo.city + customInfo.district + customInfo.detailaddress; } }
public void Start(object args) { if (null != args) { try { customInfo = (MTMCustInfo)args; } catch (Exception) { } EventAggregator eventAggragator = ServiceLocator.Current.GetInstance <EventAggregator>(); eventAggragator.GetEvent <WebSocketEvent>().Subscribe(OnWebSocketEvent); } }