Exemplo n.º 1
0
        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),
            };
        }
Exemplo n.º 2
0
        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
            };
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
            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);
            }
Exemplo n.º 7
0
            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);
            }
Exemplo n.º 8
0
            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);
            }
Exemplo n.º 9
0
            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
            };
        }
Exemplo n.º 11
0
        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
            };
        }
Exemplo n.º 12
0
        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;
        }
Exemplo n.º 13
0
        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;
        }
Exemplo n.º 14
0
        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;
        }
Exemplo n.º 16
0
        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;
        }
Exemplo n.º 17
0
        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;
        }
Exemplo n.º 18
0
 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);
 }
Exemplo n.º 19
0
        /*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);
        }
Exemplo n.º 20
0
        /*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);
        }
Exemplo n.º 21
0
 public ChartCommand() : base(MenuStrings.chartToolStripMenuItem_Text)
 {
     BindingUtils.OnPropertyChanged(SharedViewState.Instance, nameof(SharedViewState.Instance.CurrentView),
                                    () => IsEnabled = SharedViewState.Instance.CurrentView == ViewName.Charting);
 }