ReconnectionWindow.xaml.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using InABox.WPF;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  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 PRSDesktop.Forms;
  16. /// <summary>
  17. /// Interaction logic for ReconnectionWindow.xaml
  18. /// </summary>
  19. public partial class ReconnectionWindow : Window
  20. {
  21. public bool Cancelled { get; set; } = false;
  22. public Action? OnCancelled { get; set; }
  23. public ReconnectionWindow()
  24. {
  25. InitializeComponent();
  26. Splash.Source = Progress.DisplayImage;
  27. }
  28. private void CloseButton_Click(object sender, RoutedEventArgs e)
  29. {
  30. Cancelled = true;
  31. OnCancelled?.Invoke();
  32. }
  33. private void Window_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
  34. {
  35. if(e.ChangedButton == System.Windows.Input.MouseButton.Left)
  36. {
  37. DragMove();
  38. }
  39. }
  40. }