You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 rivejä
1.0 KiB

  1. using HKLog;
  2. using System.Text.RegularExpressions;
  3. using System.Windows;
  4. using UHFHelper;
  5. using XExten.Advance.LinqFramework;
  6. namespace HKCardIN.Views
  7. {
  8. /// <summary>
  9. /// CardView.xaml 的交互逻辑
  10. /// </summary>
  11. public partial class CardView : System.Windows.Window
  12. {
  13. public CardView()
  14. {
  15. InitializeComponent();
  16. }
  17. private void QueryClick(object sender, RoutedEventArgs e)
  18. {
  19. if (this.Phone.Text.IsNullOrEmpty()) HandyControl.Controls.Growl.InfoGlobal("手机号不能为空!");
  20. if (!Regex.IsMatch(this.Phone.Text, "\\d{11}")) HandyControl.Controls.Growl.InfoGlobal("请输入正确的手机号!");
  21. //查询接口
  22. Create.IsEnabled = true;
  23. }
  24. private void CreateClick(object sender, RoutedEventArgs e)
  25. {
  26. var res = UHFCardHelper.GetInstance().WriteCard("1569245210230263808");
  27. HKLogImport.WriteInfo(res.ResMes);
  28. DialogResult = true;
  29. Close();
  30. }
  31. }
  32. }