PasswordUpdataRegion.xaml.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. using Prism.Ioc;
  17. using Prism.Regions;
  18. namespace PDF_Master.Views.Dialog.ServiceDialog
  19. {
  20. /// <summary>
  21. /// RegisterOKRegion.xaml 的交互逻辑
  22. /// </summary>
  23. public partial class PasswordUpdataRegion : UserControl
  24. {
  25. public PasswordUpdataRegion()
  26. {
  27. InitializeComponent();
  28. Loaded += Focus_Loaded;
  29. }
  30. private void Focus_Loaded(object sender, RoutedEventArgs e)
  31. {
  32. Text_RePassword2.Focus();
  33. }
  34. private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
  35. {
  36. e.Handled = new Regex("[^0-9a-zA-Z]+").IsMatch(e.Text);
  37. }
  38. }
  39. }