public TransformCommand(ISharedViewState sharedViewState, IChart2D chart2d, IComplexChart complexChart, IChart3D chart3d) : base(MenuStrings.transformToolStripMenuItem_Text) { _sharedViewState = sharedViewState; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CurrentView), () => IsEnabled = _sharedViewState.CurrentView == ViewName.Charting); ChildrenCommands = new List <IToolbarCommand> { new TransformOptionCommand(MenuStrings.FFT_Text, MenuStrings.FFT_ToolTip_Text, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.IFFT_Text, MenuStrings.IFFT_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.DST_Text, MenuStrings.DST_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.IDST_Text, MenuStrings.IDST_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.DCT_Text, MenuStrings.DCT_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.IDCT_Text, MenuStrings.IDCT_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.FHT_Text, MenuStrings.FHT_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.IFHT_Text, MenuStrings.IFHT_ToolTipText, chart2d, complexChart, chart3d, sharedViewState), new TransformOptionCommand(MenuStrings.DHT_Text, MenuStrings.DHT_ToolTipText, chart2d, complexChart, chart3d, sharedViewState) // new TransformOptionCommand(MenuStrings.,MenuStrings.IFHT_ToolTipText,charts), }; }
public ChartCommand(ISharedViewState sharedViewState, ExportCommand exportCommand, TypeOfChartCommand typeOfChartCommand, ColorsCommand colorsCommand, LegendPositionsCommand legendPositionsCommand, ContourLinesCommand contourLinesCommand, ColorAssigmentCommand colorAssigmentCommand, RescaleCommand rescaleCommand, EditChartCommand editChartCommand, EditChartPropertiesCommand editChartPropertiesCommand, PrintChartCommand printChartCommand, PrintPreviewChartCommand printPreviewChartCommand) : base(MenuStrings.chartToolStripMenuItem_Text) { _sharedViewState = sharedViewState; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CurrentView), () => IsEnabled = _sharedViewState.CurrentView == ViewName.Charting); ChildrenCommands = new List <IToolbarCommand> { exportCommand, null, //rozne typeOfChartCommand, colorsCommand, legendPositionsCommand, contourLinesCommand, colorAssigmentCommand, rescaleCommand, null, editChartCommand, editChartPropertiesCommand, null, printChartCommand, printPreviewChartCommand }; }
public FitAxesCommand(ReadOnlyDictionary <CalculationsMode, IChart> charts) : base(charts) { Text = MenuStrings.fitAxes_Text; ToolTip = MenuStrings.fitAxes_Text; CheckOnClick = true; Checked = !chart3d.EqualAxes; BindingUtils.OnPropertyChanged(chart3d, nameof(chart3d.EqualAxes), () => Checked = !chart3d.EqualAxes); }
public FitAxesCommand(IChart3D chart3D) { _chart3D = chart3D; Text = MenuStrings.fitAxes_Text; ToolTip = MenuStrings.fitAxes_Text; CheckOnClick = true; Checked = !chart3D.EqualAxes; BindingUtils.OnPropertyChanged(chart3D, nameof(chart3D.EqualAxes), () => Checked = !chart3D.EqualAxes); }
public ContourLinesOption(ReadOnlyDictionary <CalculationsMode, IChart> charts, CountourLinesMode contourLinesMode) : base(contourLinesMode, charts) { this.contourLinesMode = contourLinesMode; IsOption = true; Checked = complexChart.CountourMode == contourLinesMode; BindingUtils.OnPropertyChanged(complexChart, nameof(complexChart.CountourMode), () => Checked = complexChart.CountourMode == contourLinesMode); }
public ColorAssigmentOption(ReadOnlyDictionary <CalculationsMode, IChart> charts, AssignmentOfColorMethod assignmentOfColorMethod) : base(assignmentOfColorMethod, charts) { this.assignmentOfColorMethod = assignmentOfColorMethod; IsOption = true; Checked = complexChart.ColorAssignmentMethod == assignmentOfColorMethod; BindingUtils.OnPropertyChanged(complexChart, nameof(complexChart.ColorAssignmentMethod), () => Checked = complexChart.ColorAssignmentMethod == assignmentOfColorMethod); }
public ContourLinesOption(IComplexChart complexChart, CountourLinesMode contourLinesMode) : base(contourLinesMode) { _complexChart = complexChart; this.contourLinesMode = contourLinesMode; IsOption = true; Checked = complexChart.CountourMode == contourLinesMode; BindingUtils.OnPropertyChanged(complexChart, nameof(complexChart.CountourMode), () => Checked = complexChart.CountourMode == contourLinesMode); }
public ColorAssigmentOption(IComplexChart complexChart, AssignmentOfColorMethod assignmentOfColorMethod) : base(assignmentOfColorMethod) { _complexChart = complexChart; this.assignmentOfColorMethod = assignmentOfColorMethod; IsOption = true; Checked = complexChart.ColorAssignmentMethod == assignmentOfColorMethod; BindingUtils.OnPropertyChanged(complexChart, nameof(complexChart.ColorAssignmentMethod), () => Checked = complexChart.ColorAssignmentMethod == assignmentOfColorMethod); }
public LanguageOption(CultureInfo language) { Text = language.NativeName; ToolTip = language.EnglishName; this.language = language; CheckOnClick = true; IsOption = true; Checked = Equals(CultureInfo.CurrentCulture, language); BindingUtils.OnPropertyChanged(Settings.Default, nameof(Settings.Default.Language), () => Checked = Equals(Settings.Default.Language, this.language)); }
public LegendPositionsCommand(ISharedViewState sharedViewState, LegendPlacementCommand legendPlacementCommand, LegendAligmentCommand legendAligmentCommand) : base(MenuStrings.legendPositions_Text) { _sharedViewState = sharedViewState; Visible = _sharedViewState.CalculationsMode == CalculationsMode.Real; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CalculationsMode), () => Visible = _sharedViewState.CalculationsMode == CalculationsMode.Real); ChildrenCommands = new List <IToolbarCommand> { legendPlacementCommand, legendAligmentCommand }; }
public RescaleCommand(ISharedViewState sharedViewState, FitAxesCommand fitAxesCommand, EqualAxesCommand equalAxesCommand) : base(MenuStrings.rescale_Text) { _sharedViewState = sharedViewState; Visible = _sharedViewState.CalculationsMode == CalculationsMode.Fxy; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CalculationsMode), () => Visible = _sharedViewState.CalculationsMode == CalculationsMode.Fxy); ChildrenCommands = new List <IToolbarCommand> { fitAxesCommand, equalAxesCommand }; }
public ColorsCommand(ReadOnlyDictionary <CalculationsMode, IChart> charts) : base(MenuStrings.color_Text) { Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Real; BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CalculationsMode), () => Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Real); var list = new List <IToolbarCommand>(); foreach (var chartType in Enum.GetValues(typeof(ChartColorPalette)) .Cast <ChartColorPalette>()) { list.Add(new ColorOption(charts, chartType)); } ChildrenCommands = list; }
public ColorsCommand(IChart2D chart2d, ISharedViewState sharedViewState) : base(MenuStrings.color_Text) { _sharedViewState = sharedViewState; Visible = _sharedViewState.CalculationsMode == CalculationsMode.Real; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CalculationsMode), () => Visible = _sharedViewState.CalculationsMode == CalculationsMode.Real); var list = new List <IToolbarCommand>(); foreach (var chartType in Enum.GetValues(typeof(ChartColorPalette)) .Cast <ChartColorPalette>()) { list.Add(new ColorOption(chart2d, chartType)); } ChildrenCommands = list; }
public ContourLinesCommand(ReadOnlyDictionary <CalculationsMode, IChart> charts) : base(MenuStrings.contourLinesMode_Text) { Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Complex; BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CalculationsMode), () => Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Complex); var list = new List <IToolbarCommand>(); foreach (var val in Enum.GetValues(typeof(CountourLinesMode)) .Cast <CountourLinesMode>()) { list.Add(new ContourLinesOption(charts, val)); } ChildrenCommands = list; }
public ColorAssigmentCommand(ReadOnlyDictionary <CalculationsMode, IChart> charts) : base(MenuStrings.colorAssignmentToolStripMenuItem_Text) { Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Complex; BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CalculationsMode), () => Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Complex); var list = new List <IToolbarCommand>(); foreach (var colorAssigment in Enum.GetValues(typeof(AssignmentOfColorMethod)) .Cast <AssignmentOfColorMethod>()) { list.Add(new ColorAssigmentOption(charts, colorAssigment)); } ChildrenCommands = list; }
public ContourLinesCommand(IComplexChart complexChart, ISharedViewState sharedViewState) : base(MenuStrings.contourLinesMode_Text) { _sharedViewState = sharedViewState; Visible = _sharedViewState.CalculationsMode == CalculationsMode.Complex; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CalculationsMode), () => Visible = _sharedViewState.CalculationsMode == CalculationsMode.Complex); var list = new List <IToolbarCommand>(); foreach (var val in Enum.GetValues(typeof(CountourLinesMode)) .Cast <CountourLinesMode>()) { list.Add(new ContourLinesOption(complexChart, val)); } ChildrenCommands = list; }
public ColorAssigmentCommand(IComplexChart complexChart, ISharedViewState sharedViewState) : base(MenuStrings.colorAssignmentToolStripMenuItem_Text) { _sharedViewState = sharedViewState; Visible = _sharedViewState.CalculationsMode == CalculationsMode.Complex; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CalculationsMode), () => Visible = _sharedViewState.CalculationsMode == CalculationsMode.Complex); var list = new List <IToolbarCommand>(); foreach (var colorAssigment in Enum.GetValues(typeof(AssignmentOfColorMethod)) .Cast <AssignmentOfColorMethod>()) { list.Add(new ColorAssigmentOption(complexChart, colorAssigment)); } ChildrenCommands = list; }
public RescaleCommand() : base(MenuStrings.rescale_Text) { Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Fxy; BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CalculationsMode), () => Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Fxy); }
/*private class SeriesOption : ChartOption * { * * public override void Execute() * { * throw new System.NotImplementedException(); * } * * public SeriesOption(IChart2D chart2d, IComplexChart complexChart, IChart3D chart3d) : base(charts) * { * this.IsOption = true; * } * }*/ public SeriesCommand(ISharedViewState sharedViewState) : base(MenuStrings.series_Text) { _sharedViewState = sharedViewState; BindingUtils.OnPropertyChanged(_sharedViewState, nameof(_sharedViewState.CalculationsMode), () => Visible = _sharedViewState.CalculationsMode == CalculationsMode.Real); }
/*private class SeriesOption : ChartOption * { * * public override void Execute() * { * throw new System.NotImplementedException(); * } * * public SeriesOption(ReadOnlyDictionary<CalculationsMode, IChart> charts) : base(charts) * { * this.IsOption = true; * } * }*/ public SeriesCommand() : base(MenuStrings.series_Text) { BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CalculationsMode), () => Visible = SharedViewState.Instance.CalculationsMode == CalculationsMode.Real); }
public ChartCommand() : base(MenuStrings.chartToolStripMenuItem_Text) { BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CurrentView), () => IsEnabled = SharedViewState.Instance.CurrentView == ViewName.Charting); }