Example #1
0
        private void Create_Workspace(DataTable excel_temp_data, string file)
        {
            Tab_Workspace tab_content = new Tab_Workspace(excel_temp_data, file);  // Доделать { } конструктор

            this.File_Tab_Control.Items.Add(new TabItem
            {
                Header = new TextBlock {
                    Text = excel_temp_data.TableName
                },
                TabIndex = file_counter,
                Content  = tab_content
            });
            this.File_Tab_Control.SelectedIndex = file_counter;
            file_counter = file_counter + 1;
        }
Example #2
0
        protected internal void Build_MainMatrixControls
        (
            DataTable excel_table_data,
            string[] x_axis,
            string[] y_axis,
            string[] plot_title,
            List <ScatterSeries> list_matrix_series,
            List <ScatterSeries> list_work_series,
            Tab_Workspace layout_form
        )
        {
            Tab_Workspace form = layout_form;

            int plot_index = 0;                            // Индексация графиков

            int _columns = excel_table_data.Columns.Count; // Количество столбцов в таблице Excel

            int n = _columns * (_columns - 1);             // Количество графиков

            var _height = (form.Matrix2D_Scroll.Height / _columns) - 4;
            var _width  = (form.Matrix2D_Scroll.Width / _columns) - 4;

            // Инициализация рабочей области
            form.Matrix2D_WorkPanel.Children.Add(matrix2D_work_plot = new OxyPlot.Wpf.PlotView());
            matrix2D_work_plot.Height = form.Matrix2D_WorkPanel.Height;
            matrix2D_work_plot.Width  = form.Matrix2D_WorkPanel.Width;

            for (int i = 0; i < n; i++)
            {
                form.Matrix2D_MatrixPanel.Children.Add(matrix2D_matrix_plot = new OxyPlot.Wpf.PlotView());
                matrix2D_matrix_plot.Height  = _height;
                matrix2D_matrix_plot.Width   = _width;
                matrix2D_matrix_plot.Padding = new Thickness(0.5, 0.5, 0.5, 0.5);
                matrix2D_matrix_plot.Margin  = new Thickness(0.5, 0.5, 0.5, 0.5);

                Create_Model(plot_index, x_axis, y_axis, plot_title, list_matrix_series, list_work_series);

                plot_index = plot_index + 1;
            }
        }