waitUpgradeWindow.xaml.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  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 MV485.Dlg
  16. {
  17. /// <summary>
  18. /// waitUpgradeWindow.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class WaitUpgradeWindow : Window, INotifyPropertyChanged
  21. {
  22. public event PropertyChangedEventHandler PropertyChanged;
  23. protected void OnPropertyChanged(string propertyName)
  24. {
  25. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  26. }
  27. public event Action StopUpgrade;
  28. private string _titleInfo;
  29. public string TitleInfo
  30. {
  31. get => _titleInfo;
  32. set
  33. {
  34. if (_titleInfo != value)
  35. {
  36. _titleInfo = value;
  37. OnPropertyChanged(nameof(TitleInfo));
  38. }
  39. }
  40. }
  41. public WaitUpgradeWindow(string titleInfo)
  42. {
  43. InitializeComponent();
  44. TitleInfo = titleInfo;
  45. this.DataContext = this;
  46. }
  47. private void BtnStop_Click(object sender, RoutedEventArgs e)
  48. {
  49. StopUpgrade?.Invoke();
  50. }
  51. //------------------------------------------------------------
  52. }
  53. }