LoadPresetSettingCommand.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Input;
  6. using Aitex.UI.Charting.ViewModel;
  7. using System.Windows;
  8. using Aitex.UI.Charting.Model;
  9. using Abt.Controls.SciChart;
  10. using System.Xml;
  11. using System.Windows.Controls;
  12. using Aitex.UI.Charting.View;
  13. namespace Aitex.UI.Charting.Command
  14. {
  15. public class LoadPresetSettingCommand : ICommand
  16. {
  17. public LoadPresetSettingCommand()
  18. {
  19. }
  20. public bool CanExecute(object parameter)
  21. {
  22. return true;
  23. }
  24. #pragma warning disable 0067
  25. public event EventHandler CanExecuteChanged;
  26. #pragma warning restore 0067
  27. private void AsyncShowWarningMessageBox(string message, string title)
  28. {
  29. Application.Current.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(message, title, MessageBoxButton.OK, MessageBoxImage.Warning)));
  30. }
  31. public void Execute(object parameter)
  32. {
  33. LoadPresetDataDialog dlg = new LoadPresetDataDialog() { Owner = Application.Current.MainWindow };
  34. dlg.Show();
  35. }
  36. }
  37. }