diff --git a/ScadaTool/MainWindow.xaml b/ScadaTool/MainWindow.xaml index 31ee1af..3b18858 100644 --- a/ScadaTool/MainWindow.xaml +++ b/ScadaTool/MainWindow.xaml @@ -28,6 +28,7 @@ + diff --git a/ScadaTool/ViewModel/MainViewModel.cs b/ScadaTool/ViewModel/MainViewModel.cs index a97274c..f87f4ac 100644 --- a/ScadaTool/ViewModel/MainViewModel.cs +++ b/ScadaTool/ViewModel/MainViewModel.cs @@ -16,6 +16,7 @@ namespace ScadaTool.ViewModel public MainViewModel() { + #region 图标闪烁 bool tmp = false; var timer = new System.Timers.Timer(1000); timer.Elapsed += new System.Timers.ElapsedEventHandler((obj, args) => @@ -24,6 +25,7 @@ namespace ScadaTool.ViewModel tmp = tmp == true ? false : true; }); timer.Start(); + #endregion #region Command ExitApplicationCommand = new RelayCommand((_) => @@ -49,6 +51,17 @@ namespace ScadaTool.ViewModel }); }); + HidenApplicationCommand = new RelayCommand((_) => + { + return true; + }, (_) => + { + ViewModelHelper.Instance().UpdateUI(() => + { + Application.Current.MainWindow.Hide(); + }); + }); + // 服务 StartServiceCommand = new RelayCommand((_) => {