Beispiel #1
0
        public EditChartMenus(Chart2D chart2d, ComplexChart complexChart, Chart3DControl chart3DControl
#if !__MonoCS__
                              , System.Windows.Forms.Integration.ElementHost chart3DElementHost
#endif
                              )
        {
            InitializeComponent();

            charts = new Dictionary <CalculationsMode, IChart>
            {
                { CalculationsMode.Real, chart2d },
                { CalculationsMode.Complex, complexChart },
                { CalculationsMode.Fxy, chart3DControl }
            };
#if !__MonoCS__
            elementHostChart3d = chart3DElementHost;
#endif

            chart2d?.setupComboBoxes(typeOfChartComboBox, seriesOfChartComboBox, colorsOfChartComboBox,
                                     positionLegendComboBox, aligmentLegendComboBox);
            complexChart?.setupComboBoxes(countourLinesToolStripComboBox, colorAssignmentToolStripComboBox);

            if (charts.All(c => c.Value != null))
            {
                EventAggregator.Instance.Subscribe <CalculationsModeChangedEvent>(mode => SetMode(mode.CalculationsMode));
            }
        }
Beispiel #2
0
        public ChartingView(ChartAreaValuesView chartAreaValuesView, Chart2D chart2D, ComplexChart complexChart, Chart3DControl chart3D) : this()
        {
            chartAreaValuesView.Dock = DockStyle.Right;
            ChartAreaValuesView      = chartAreaValuesView;
            Chart2D      = chart2D;
            ComplexChart = complexChart;
            Chart3D      = chart3D;
            Charts       = new Dictionary <CalculationsMode, IChart>()
            {
                { CalculationsMode.Real, Chart2D },
                { CalculationsMode.Complex, ComplexChart },
                { CalculationsMode.Fxy, chart3D }
            };
#if !__MonoCS__
            var el = new System.Windows.Forms.Integration.ElementHost {
                Child = chart3D, Dock = DockStyle.Fill
            };
            chart3D.ParentControl = el;
#endif

            panel2.Controls.AddRange(new[]
            {
                chart2D,
                complexChart,
#if !__MonoCS__
                el,
#endif
                (Control)chartAreaValuesView,
            });
        }