ErrorWindow.xaml.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. namespace GDNXFD.Alert.Config.Views
  2. {
  3. using System.Windows;
  4. using System.Windows.Input;
  5. /// <summary>
  6. /// Interaction logic for ErrorWindow.xaml
  7. /// </summary>
  8. public partial class ErrorWindow : Window
  9. {
  10. /// <summary>
  11. /// Error window
  12. /// </summary>
  13. public ErrorWindow()
  14. {
  15. InitializeComponent();
  16. }
  17. private void MainWindow_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  18. {
  19. if (e.ClickCount == 2)
  20. {
  21. if (this.WindowState == System.Windows.WindowState.Maximized)
  22. this.WindowState = System.Windows.WindowState.Normal;
  23. else
  24. this.WindowState = System.Windows.WindowState.Maximized;
  25. }
  26. this.DragMove();
  27. }
  28. private void MinimizeButton(object sender, RoutedEventArgs e)
  29. {
  30. this.WindowState = WindowState.Minimized;
  31. }
  32. private void MaximizeButton(object sender, RoutedEventArgs e)
  33. {
  34. if (WindowState == WindowState.Normal)
  35. {
  36. this.WindowState = System.Windows.WindowState.Maximized;
  37. }
  38. else
  39. {
  40. this.WindowState = System.Windows.WindowState.Normal;
  41. }
  42. }
  43. private void CloseButton(object sender, RoutedEventArgs e)
  44. {
  45. this.Close();
  46. }
  47. }
  48. }