|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- using BPASmartClient.ViewModel;
- using Microsoft.Toolkit.Mvvm.Messaging;
-
- namespace BPASmartClient
- {
- /// <summary>
- /// OrderListDialogView.xaml 的交互逻辑
- /// </summary>
- public partial class OrderListDialogView : Window
- {
- public OrderListDialogView()
- {
- InitializeComponent();
- this.MoveBorder.MouseLeftButtonDown += (o, e) =>
- {
- this.DragMove();
- };
-
- WeakReferenceMessenger.Default.Register<string, string>(this, "Close", (o, e) =>
- {
- App.Current.Dispatcher.Invoke(new Action(() =>
- {
- this.DialogResult = Convert.ToBoolean(e);
- this.Close();
- }));
- });
- }
- int MoveCount = 0;
- private void Window_MouseMove(object sender, MouseEventArgs e)
- {
- MoveCount += 1;
- if (MoveCount >= 5) OrderListDialogViewModel.IsAutoClose = true;
- }
-
-
- }
- }
|