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

45 lines
1.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Text;
  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.Shapes;
  15. namespace BPASmartClient.CustomResource.Pages.View
  16. {
  17. /// <summary>
  18. /// MainView.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class MainView : Window
  21. {
  22. public MainView()
  23. {
  24. InitializeComponent();
  25. this.WindowState = WindowState.Maximized;
  26. this.ButMin.Click += (o, e) => { this.WindowState = WindowState.Minimized; };
  27. this.ButMax.Click += (o, e) => { this.WindowState = this.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; };
  28. this.ButClose.Click += (o, e) => { this.Close(); };
  29. this.MoveBorder.MouseLeftButtonDown += (o, e) =>
  30. {
  31. if (e.ClickCount > 1)
  32. {
  33. if (this.WindowState == WindowState.Maximized)
  34. this.WindowState = WindowState.Normal;
  35. else if (this.WindowState == WindowState.Normal)
  36. this.WindowState = WindowState.Maximized;
  37. }
  38. if (e.LeftButton == MouseButtonState.Pressed) this.DragMove();
  39. };
  40. }
  41. }
  42. }