1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Input;
- using Aitex.UI.Charting.ViewModel;
- using System.Windows;
- using Aitex.UI.Charting.Model;
- using Abt.Controls.SciChart;
- using System.Windows.Media;
- using DataAnalysisControl.Core;
- namespace Aitex.UI.Charting.Command
- {
- public class RemoveGrowthCurveCommand : ICommand
- {
- public bool CanExecute(object parameter)
- {
- return true;
- }
- #pragma warning disable 0067
- public event EventHandler CanExecuteChanged;
- #pragma warning restore 0067
- private void AsyncShowWarningMessageBox(string message, string title)
- {
- Application.Current.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(message, title, MessageBoxButton.OK, MessageBoxImage.Warning)));
- }
- public void Execute(object parameter)
- {
- string reason = string.Empty;
- try
- {
- var commonViewModel = (CommonViewModel)parameter;
- if (commonViewModel.RenderableSeries.Contains(commonViewModel.GrowthRateRenderableSeries))
- commonViewModel.RenderableSeries.Remove(commonViewModel.GrowthRateRenderableSeries);
- }
- catch (Exception ex)
- {
- CONTEXT.WriteLog(ex);
- }
- }
- }
- }
|