12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Input;
- using Aitex.UI.Charting.Command;
- using System.Windows;
- namespace Aitex.UI.Charting.ViewModel
- {
- public class DataSeriesViewModel : ChartingBaseViewModel
- {
- public ICommand ShowAllSeriesCommand { get; set; }
- public ICommand HidAllSeriesCommand { get; set; }
- public ICommand DeleteAllSeriesCommand { get; set; }
- public ICommand LoadPresetSettingCommand { get; set; }
- public ICommand ExportAllSeriesCommand { get; set; }
- public CommonViewModel CommonViewModel { get; set; }
- public DataSeriesViewModel()
- {
- CommonViewModel = CommonViewModel.Instance;
- ShowAllSeriesCommand = new ChartingCommand((o) => true, (o) =>
- {
- CommonViewModel.ShowAllSeries();
- });
- HidAllSeriesCommand = new ChartingCommand((o) => true, (o) =>
- {
- CommonViewModel.HidAllSeries();
- });
- DeleteAllSeriesCommand = new ChartingCommand((o) => true, (o) =>
- {
- if (MessageBox.Show(DataAnalysisControl.Properties.Resource.DataSeriesViewModel_DataSeriesViewModel_deleteAllSeries, DataAnalysisControl.Properties.Resource.DataSeriesViewModel_DataSeriesViewModel_DeleteDta, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
- {
- CommonViewModel.RemoveDataSeries(string.Empty);
- }
- });
- LoadPresetSettingCommand = new ChartingCommand((o) => true, (o) =>
- {
- CommonViewModel.LoadPresetSetting();
- });
-
- ExportAllSeriesCommand = new ChartingCommand((o) => true, (o) =>
- {
- CommonViewModel.ExportAllSeries();
- });
- }
- }
- }
|