终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

49 linhas
1.7 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 string TitleName { get { return _mTitleName; } set { _mTitleName = value; this.tbTitle.Text = value; } }
  23. private string _mTitleName;
  24. public MainView()
  25. {
  26. InitializeComponent();
  27. this.WindowState = WindowState.Maximized;
  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(); Application.Current.Shutdown(); };
  31. this.MoveBorder.MouseLeftButtonDown += (o, e) =>
  32. {
  33. if (e.ClickCount > 1)
  34. {
  35. if (this.WindowState == WindowState.Maximized)
  36. this.WindowState = WindowState.Normal;
  37. else if (this.WindowState == WindowState.Normal)
  38. this.WindowState = WindowState.Maximized;
  39. }
  40. if (e.LeftButton == MouseButtonState.Pressed) this.DragMove();
  41. };
  42. }
  43. }
  44. }