终端一体化运控平台
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.
 
 
 

51 line
1.3 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. using BPASmartClient.ViewModel;
  15. using Microsoft.Toolkit.Mvvm.Messaging;
  16. namespace BPASmartClient
  17. {
  18. /// <summary>
  19. /// OrderListDialogView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class OrderListDialogView : Window
  22. {
  23. public OrderListDialogView()
  24. {
  25. InitializeComponent();
  26. this.MoveBorder.MouseLeftButtonDown += (o, e) =>
  27. {
  28. this.DragMove();
  29. };
  30. WeakReferenceMessenger.Default.Register<string, string>(this, "Close", (o, e) =>
  31. {
  32. App.Current.Dispatcher.Invoke(new Action(() =>
  33. {
  34. this.DialogResult = Convert.ToBoolean(e);
  35. this.Close();
  36. }));
  37. });
  38. }
  39. int MoveCount = 0;
  40. private void Window_MouseMove(object sender, MouseEventArgs e)
  41. {
  42. MoveCount += 1;
  43. if (MoveCount >= 5) OrderListDialogViewModel.IsAutoClose = true;
  44. }
  45. }
  46. }