终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

57 wiersze
2.0 KiB

  1. using BPASmartClient.Helper;
  2. using BPASmartClient.MorkM.ViewModel;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Shapes;
  16. namespace BPASmartClient.MorkM.View
  17. {
  18. /// <summary>
  19. /// SimOrderConfitView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class SimOrderConfitView : Window
  22. {
  23. public SimOrderConfitView()
  24. {
  25. InitializeComponent();
  26. this.DataContext = new SimOrderConfitViewModel();
  27. this.MoveBorder.MouseLeftButtonDown += (o, e) => { this.DragMove(); };
  28. this.ButMin.Click += (o, e) => { this.WindowState = WindowState.Minimized; };
  29. this.ButMax.Click += (o, e) => { this.WindowState = this.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; };
  30. this.ButClose.Click += (o, e) => { this.Close(); ActionManage.GetInstance.CancelRegister("SendSimData"); };
  31. this.MaxWidth = SystemParameters.WorkArea.Width;
  32. this.MaxHeight = SystemParameters.WorkArea.Height;
  33. ActionManage.GetInstance.Register(new Action(() =>
  34. {
  35. this.Close();
  36. ActionManage.GetInstance.CancelRegister("SimOrderConfitViewModelExit");
  37. ActionManage.GetInstance.CancelRegister("SendSimData");
  38. }), "SimOrderConfitViewModelExit");
  39. }
  40. private void Grid_KeyDown(object sender, KeyEventArgs e)
  41. {
  42. var uie = e.OriginalSource as TextBox;
  43. if (uie != null)
  44. {
  45. if (e.Key == Key.Enter)
  46. {
  47. uie.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
  48. e.Handled = true;
  49. }
  50. }
  51. }
  52. }
  53. }