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

56 line
1.3 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.Navigation;
  15. using System.Windows.Shapes;
  16. namespace BPASmart.RecipeManagement
  17. {
  18. /// <summary>
  19. /// Interaction logic for MainWindow.xaml
  20. /// </summary>
  21. public partial class MainWindow : Window
  22. {
  23. public MainWindow()
  24. {
  25. InitializeComponent();
  26. this.br.MouseLeftButtonDown += (o, e) =>
  27. {
  28. if (e.ClickCount > 1)
  29. {
  30. if (this.WindowState == WindowState.Maximized)
  31. this.WindowState = WindowState.Normal;
  32. else if (this.WindowState == WindowState.Normal)
  33. this.WindowState = WindowState.Maximized;
  34. }
  35. };
  36. }
  37. private void Button_Click(object sender, RoutedEventArgs e)
  38. {
  39. this.Close();
  40. }
  41. private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  42. {
  43. this.DragMove();
  44. }
  45. }
  46. }