Changeset 14902
- Timestamp:
- 05/02/17 14:45:22 (8 years ago)
- Location:
- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs
r14511 r14902 42 42 public LineChartView() { 43 43 InitializeComponent(); 44 sizeGroupBox.Visible = false; 45 44 46 allInOneDataRows = new Dictionary<string, DataRow>(); 45 47 allInOneDataTable= new DataTable(); … … 99 101 Content.AllInOneMode = allInOneCheckBox.Checked; 100 102 103 sizeGroupBox.Visible = !allInOneCheckBox.Checked; 104 101 105 GenerateLayout(); 102 106 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs
r14459 r14902 46 46 private void InitializeComponent() { 47 47 this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 48 this.sizeGroupBox = new System.Windows.Forms.GroupBox(); 49 this.columnsNumericUpDown = new System.Windows.Forms.NumericUpDown(); 50 this.columnsLabel = new System.Windows.Forms.Label(); 51 this.scrollPanel = new System.Windows.Forms.Panel(); 48 52 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 49 53 this.splitContainer.Panel1.SuspendLayout(); 50 54 this.splitContainer.Panel2.SuspendLayout(); 51 55 this.splitContainer.SuspendLayout(); 56 this.sizeGroupBox.SuspendLayout(); 57 ((System.ComponentModel.ISupportInitialize)(this.columnsNumericUpDown)).BeginInit(); 58 this.scrollPanel.SuspendLayout(); 52 59 this.SuspendLayout(); 53 60 // … … 55 62 // 56 63 // 64 // splitContainer.Panel1 65 // 66 this.splitContainer.Panel1.Controls.Add(this.sizeGroupBox); 67 // 57 68 // splitContainer.Panel2 58 69 // 59 this.splitContainer.Panel2.Controls.Add(this. tableLayoutPanel);70 this.splitContainer.Panel2.Controls.Add(this.scrollPanel); 60 71 // 61 72 // tableLayoutPanel 62 73 // 63 this.tableLayoutPanel.AutoScroll = true; 74 this.tableLayoutPanel.AutoSize = true; 75 this.tableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 64 76 this.tableLayoutPanel.ColumnCount = 1; 65 77 this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 66 78 this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 67 this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;68 79 this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0); 69 80 this.tableLayoutPanel.Name = "tableLayoutPanel"; … … 71 82 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 72 83 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 73 this.tableLayoutPanel.Size = new System.Drawing.Size( 559, 403);84 this.tableLayoutPanel.Size = new System.Drawing.Size(0, 0); 74 85 this.tableLayoutPanel.TabIndex = 0; 75 86 this.tableLayoutPanel.Layout += new System.Windows.Forms.LayoutEventHandler(this.tableLayoutPanel_Layout); 87 // 88 // sizeGroupBox 89 // 90 this.sizeGroupBox.Controls.Add(this.columnsNumericUpDown); 91 this.sizeGroupBox.Controls.Add(this.columnsLabel); 92 this.sizeGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; 93 this.sizeGroupBox.Location = new System.Drawing.Point(0, 359); 94 this.sizeGroupBox.Name = "sizeGroupBox"; 95 this.sizeGroupBox.Size = new System.Drawing.Size(180, 44); 96 this.sizeGroupBox.TabIndex = 8; 97 this.sizeGroupBox.TabStop = false; 98 this.sizeGroupBox.Text = "Chart Size"; 99 // 100 // columnsNumericUpDown 101 // 102 this.columnsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 103 | System.Windows.Forms.AnchorStyles.Right))); 104 this.columnsNumericUpDown.Location = new System.Drawing.Point(88, 14); 105 this.columnsNumericUpDown.Minimum = new decimal(new int[] { 106 1, 107 0, 108 0, 109 0}); 110 this.columnsNumericUpDown.Name = "columnsNumericUpDown"; 111 this.columnsNumericUpDown.Size = new System.Drawing.Size(86, 20); 112 this.columnsNumericUpDown.TabIndex = 3; 113 this.columnsNumericUpDown.Value = new decimal(new int[] { 114 3, 115 0, 116 0, 117 0}); 118 this.columnsNumericUpDown.ValueChanged += new System.EventHandler(this.columnsNumericUpDown_ValueChanged); 119 // 120 // columnsLabel 121 // 122 this.columnsLabel.AutoSize = true; 123 this.columnsLabel.Location = new System.Drawing.Point(6, 16); 124 this.columnsLabel.Name = "columnsLabel"; 125 this.columnsLabel.Size = new System.Drawing.Size(76, 13); 126 this.columnsLabel.TabIndex = 1; 127 this.columnsLabel.Text = "Max. Columns:"; 128 // 129 // scrollPanel 130 // 131 this.scrollPanel.AutoScroll = true; 132 this.scrollPanel.Controls.Add(this.tableLayoutPanel); 133 this.scrollPanel.Dock = System.Windows.Forms.DockStyle.Fill; 134 this.scrollPanel.Location = new System.Drawing.Point(0, 0); 135 this.scrollPanel.Name = "scrollPanel"; 136 this.scrollPanel.Size = new System.Drawing.Size(470, 403); 137 this.scrollPanel.TabIndex = 1; 76 138 // 77 139 // PreprocessingChartView … … 84 146 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 85 147 this.splitContainer.ResumeLayout(false); 148 this.sizeGroupBox.ResumeLayout(false); 149 this.sizeGroupBox.PerformLayout(); 150 ((System.ComponentModel.ISupportInitialize)(this.columnsNumericUpDown)).EndInit(); 151 this.scrollPanel.ResumeLayout(false); 152 this.scrollPanel.PerformLayout(); 86 153 this.ResumeLayout(false); 87 154 … … 91 158 92 159 protected System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 160 private System.Windows.Forms.NumericUpDown columnsNumericUpDown; 161 private System.Windows.Forms.Label columnsLabel; 162 private System.Windows.Forms.Panel scrollPanel; 163 protected System.Windows.Forms.GroupBox sizeGroupBox; 93 164 } 94 165 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs
r14725 r14902 35 35 [View("Preprocessing Chart View")] 36 36 [Content(typeof(PreprocessingChartContent), false)] 37 public partial class PreprocessingChartView : PreprocessingCheckedVariablesView { 37 public partial class PreprocessingChartView : PreprocessingCheckedVariablesView { 38 38 protected Dictionary<string, DataTable> dataTables; 39 39 protected Dictionary<string, DataTableControl> dataTableControls; 40 41 private const int FIXED_CHART_SIZE = 300;42 private const int MAX_TABLE_AUTO_SIZE_ROWS = 3;43 40 44 41 protected static readonly Color[] Colors = { … … 159 156 return; 160 157 161 tableLayoutPanel.SuspendRepaint();158 scrollPanel.SuspendRepaint(); 162 159 163 160 ClearTableLayout(); … … 166 163 167 164 // Set columns and rows based on number of items 168 int columns = GetNrOfMultiChartColumns(nrCharts);169 int rows = GetNrOfMultiChartRows(nrCharts,columns);165 int columns = Math.Min(nrCharts, (int)columnsNumericUpDown.Value); 166 int rows = (int)Math.Ceiling((float)nrCharts / columns); 170 167 171 168 tableLayoutPanel.ColumnCount = columns; 172 169 tableLayoutPanel.RowCount = rows; 173 170 171 var width = (splitContainer.Panel2.Width - SystemInformation.VerticalScrollBarWidth) / columns; 172 var height = width * 0.75f; 173 174 174 using (var enumerator = GetVisibleDataTables().GetEnumerator()) { 175 for (int x = 0; x < columns; x++) { 176 var columnStyle = rows <= MAX_TABLE_AUTO_SIZE_ROWS 177 ? new ColumnStyle(SizeType.Percent, 100 / columns) 178 : new ColumnStyle(SizeType.Absolute, (tableLayoutPanel.Width - SystemInformation.VerticalScrollBarWidth) / columns); 179 tableLayoutPanel.ColumnStyles.Add(columnStyle); 180 181 for (int y = 0; y < rows; y++) { 182 // Add a row only when creating the first column 183 if (x == 0) { 184 var rowStyle = rows > MAX_TABLE_AUTO_SIZE_ROWS 185 ? new RowStyle(SizeType.Absolute, FIXED_CHART_SIZE) 186 : new RowStyle(SizeType.Percent, 100 / rows); 187 tableLayoutPanel.RowStyles.Add(rowStyle); 175 for (int row = 0; row < rows; row++) { 176 tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, height)); 177 for (int col = 0; col < columns; col++) { 178 if (row == 0) { // Add a column-style only when creating the first row 179 tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, width)); 188 180 } 189 181 190 182 if (enumerator.MoveNext()) 191 AddDataTableToTableLayout(enumerator.Current, x, y); 183 AddDataTableToTableLayout(enumerator.Current, row, col); 184 192 185 } 193 186 } 194 187 } 195 196 tableLayoutPanel.ResumeRepaint(true); 197 } 198 199 private int GetNrOfMultiChartColumns(int itemCount) { 200 int columns = 0; 201 if (itemCount <= 2) 202 columns = 1; 203 else if (itemCount <= 6) 204 columns = 2; 205 else 206 columns = 3; 207 return columns; 208 } 209 private int GetNrOfMultiChartRows(int itemCount, int columns) { 210 int rows = 0; 211 if (columns == 3) 212 rows = (itemCount + 2) / columns; 213 else if (columns == 2) 214 rows = (itemCount + 1) / columns; 215 else 216 rows = itemCount / columns; 217 return rows; 218 } 219 220 private void AddDataTableToTableLayout(DataTableControl dataTable, int x, int y) { 188 tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 0)); 189 190 scrollPanel.ResumeRepaint(true); 191 } 192 193 private void AddDataTableToTableLayout(DataTableControl dataTable, int row, int col) { 221 194 //dataView.Classification = Classification; 222 195 //dataView.IsDetailedChartViewEnabled = IsDetailedChartViewEnabled; … … 225 198 // dummy panel for empty field 226 199 Panel p = new Panel { Dock = DockStyle.Fill }; 227 tableLayoutPanel.Controls.Add(p, y, x);200 tableLayoutPanel.Controls.Add(p, col, row); 228 201 } else { 229 202 dataTable.Dock = DockStyle.Fill; 230 tableLayoutPanel.Controls.Add(dataTable, y, x);203 tableLayoutPanel.Controls.Add(dataTable, col, row); 231 204 } 232 205 } … … 239 212 tableLayoutPanel.ColumnStyles.Clear(); 240 213 tableLayoutPanel.RowStyles.Clear(); 241 242 tableLayoutPanel.Width = 0;243 tableLayoutPanel.Height = 0;244 245 tableLayoutPanel.AutoScroll = false;246 tableLayoutPanel.AutoScroll = true;247 214 } 248 215 //Remove horizontal scroll bar if visible … … 250 217 if (tableLayoutPanel.HorizontalScroll.Visible) { 251 218 // Add padding on the right in order to accomodate the vertical scrollbar 252 int vWidth = SystemInformation.VerticalScrollBarWidth; 253 tableLayoutPanel.Padding = new Padding(0, 0, vWidth, 0); 219 tableLayoutPanel.Padding = new Padding(0, 0, SystemInformation.VerticalScrollBarWidth, 0); 254 220 } else { 255 221 // Reset padding … … 258 224 } 259 225 #endregion 226 227 private void columnsNumericUpDown_ValueChanged(object sender, System.EventArgs e) { 228 GenerateLayout(); 229 } 260 230 } 261 231 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
r14725 r14902 53 53 this.bodyTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 54 54 this.sizeGroupBox = new System.Windows.Forms.GroupBox(); 55 this.heightNumericUpDown = new System.Windows.Forms.NumericUpDown(); 56 this.widthNumericUpDown = new System.Windows.Forms.NumericUpDown(); 55 57 this.heightLabel = new System.Windows.Forms.Label(); 56 58 this.widthLabel = new System.Windows.Forms.Label(); 57 this.heightTrackBar = new System.Windows.Forms.TrackBar();58 this.widthTrackBar = new System.Windows.Forms.TrackBar();59 59 this.regressionGroupBox = new System.Windows.Forms.GroupBox(); 60 60 this.regressionTypeComboBox = new System.Windows.Forms.ComboBox(); … … 73 73 this.bodyScrollPanel.SuspendLayout(); 74 74 this.sizeGroupBox.SuspendLayout(); 75 ((System.ComponentModel.ISupportInitialize)(this.height TrackBar)).BeginInit();76 ((System.ComponentModel.ISupportInitialize)(this.width TrackBar)).BeginInit();75 ((System.ComponentModel.ISupportInitialize)(this.heightNumericUpDown)).BeginInit(); 76 ((System.ComponentModel.ISupportInitialize)(this.widthNumericUpDown)).BeginInit(); 77 77 this.regressionGroupBox.SuspendLayout(); 78 78 ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit(); … … 194 194 // sizeGroupBox 195 195 // 196 this.sizeGroupBox.Controls.Add(this.heightNumericUpDown); 197 this.sizeGroupBox.Controls.Add(this.widthNumericUpDown); 196 198 this.sizeGroupBox.Controls.Add(this.heightLabel); 197 199 this.sizeGroupBox.Controls.Add(this.widthLabel); 198 this.sizeGroupBox.Controls.Add(this.heightTrackBar);199 this.sizeGroupBox.Controls.Add(this.widthTrackBar);200 200 this.sizeGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; 201 this.sizeGroupBox.Location = new System.Drawing.Point(0, 154);201 this.sizeGroupBox.Location = new System.Drawing.Point(0, 212); 202 202 this.sizeGroupBox.Name = "sizeGroupBox"; 203 this.sizeGroupBox.Size = new System.Drawing.Size(180, 130);203 this.sizeGroupBox.Size = new System.Drawing.Size(180, 72); 204 204 this.sizeGroupBox.TabIndex = 5; 205 205 this.sizeGroupBox.TabStop = false; 206 206 this.sizeGroupBox.Text = "Chart Size"; 207 207 // 208 // heightNumericUpDown 209 // 210 this.heightNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 211 | System.Windows.Forms.AnchorStyles.Right))); 212 this.heightNumericUpDown.Increment = new decimal(new int[] { 213 100, 214 0, 215 0, 216 0}); 217 this.heightNumericUpDown.Location = new System.Drawing.Point(50, 40); 218 this.heightNumericUpDown.Maximum = new decimal(new int[] { 219 100000, 220 0, 221 0, 222 0}); 223 this.heightNumericUpDown.Name = "heightNumericUpDown"; 224 this.heightNumericUpDown.Size = new System.Drawing.Size(124, 20); 225 this.heightNumericUpDown.TabIndex = 4; 226 this.heightNumericUpDown.Value = new decimal(new int[] { 227 300, 228 0, 229 0, 230 0}); 231 this.heightNumericUpDown.ValueChanged += new System.EventHandler(this.heightNumericUpDown_ValueChanged); 232 // 233 // widthNumericUpDown 234 // 235 this.widthNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 236 | System.Windows.Forms.AnchorStyles.Right))); 237 this.widthNumericUpDown.Increment = new decimal(new int[] { 238 100, 239 0, 240 0, 241 0}); 242 this.widthNumericUpDown.Location = new System.Drawing.Point(50, 14); 243 this.widthNumericUpDown.Maximum = new decimal(new int[] { 244 10000, 245 0, 246 0, 247 0}); 248 this.widthNumericUpDown.Name = "widthNumericUpDown"; 249 this.widthNumericUpDown.Size = new System.Drawing.Size(124, 20); 250 this.widthNumericUpDown.TabIndex = 3; 251 this.widthNumericUpDown.Value = new decimal(new int[] { 252 400, 253 0, 254 0, 255 0}); 256 this.widthNumericUpDown.ValueChanged += new System.EventHandler(this.widthNumericUpDown_ValueChanged); 257 // 208 258 // heightLabel 209 259 // 210 260 this.heightLabel.AutoSize = true; 211 this.heightLabel.Location = new System.Drawing.Point(6, 64);261 this.heightLabel.Location = new System.Drawing.Point(6, 42); 212 262 this.heightLabel.Name = "heightLabel"; 213 263 this.heightLabel.Size = new System.Drawing.Size(41, 13); … … 223 273 this.widthLabel.TabIndex = 1; 224 274 this.widthLabel.Text = "Width:"; 225 //226 // heightTrackBar227 //228 this.heightTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)229 | System.Windows.Forms.AnchorStyles.Right)));230 this.heightTrackBar.LargeChange = 50;231 this.heightTrackBar.Location = new System.Drawing.Point(6, 83);232 this.heightTrackBar.Maximum = 100;233 this.heightTrackBar.Name = "heightTrackBar";234 this.heightTrackBar.Size = new System.Drawing.Size(168, 45);235 this.heightTrackBar.SmallChange = 10;236 this.heightTrackBar.TabIndex = 0;237 this.heightTrackBar.TickFrequency = 10;238 this.heightTrackBar.Value = 20;239 this.heightTrackBar.ValueChanged += new System.EventHandler(this.heightTrackBar_ValueChanged);240 //241 // widthTrackBar242 //243 this.widthTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)244 | System.Windows.Forms.AnchorStyles.Right)));245 this.widthTrackBar.LargeChange = 50;246 this.widthTrackBar.Location = new System.Drawing.Point(6, 32);247 this.widthTrackBar.Maximum = 100;248 this.widthTrackBar.Name = "widthTrackBar";249 this.widthTrackBar.Size = new System.Drawing.Size(168, 45);250 this.widthTrackBar.SmallChange = 10;251 this.widthTrackBar.TabIndex = 0;252 this.widthTrackBar.TickFrequency = 10;253 this.widthTrackBar.Value = 20;254 this.widthTrackBar.ValueChanged += new System.EventHandler(this.widthTrackBar_ValueChanged);255 275 // 256 276 // regressionGroupBox … … 270 290 // regressionTypeComboBox 271 291 // 272 this.regressionTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 292 this.regressionTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 273 293 | System.Windows.Forms.AnchorStyles.Right))); 274 294 this.regressionTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; … … 282 302 // polynomialRegressionOrderNumericUpDown 283 303 // 284 this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 304 this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 285 305 | System.Windows.Forms.AnchorStyles.Right))); 286 306 this.polynomialRegressionOrderNumericUpDown.Location = new System.Drawing.Point(67, 45); … … 337 357 // groupingComboBox 338 358 // 339 this.groupingComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 359 this.groupingComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 340 360 | System.Windows.Forms.AnchorStyles.Right))); 341 361 this.groupingComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; … … 365 385 this.sizeGroupBox.ResumeLayout(false); 366 386 this.sizeGroupBox.PerformLayout(); 367 ((System.ComponentModel.ISupportInitialize)(this.height TrackBar)).EndInit();368 ((System.ComponentModel.ISupportInitialize)(this.width TrackBar)).EndInit();387 ((System.ComponentModel.ISupportInitialize)(this.heightNumericUpDown)).EndInit(); 388 ((System.ComponentModel.ISupportInitialize)(this.widthNumericUpDown)).EndInit(); 369 389 this.regressionGroupBox.ResumeLayout(false); 370 390 this.regressionGroupBox.PerformLayout(); … … 385 405 private System.Windows.Forms.Panel bodyScrollPanel; 386 406 private System.Windows.Forms.GroupBox sizeGroupBox; 387 private System.Windows.Forms.TrackBar widthTrackBar;388 private System.Windows.Forms.TrackBar heightTrackBar;389 407 private System.Windows.Forms.Label heightLabel; 390 408 private System.Windows.Forms.Label widthLabel; … … 396 414 private System.Windows.Forms.GroupBox groupingOptionsBox; 397 415 private System.Windows.Forms.ComboBox groupingComboBox; 416 private System.Windows.Forms.NumericUpDown widthNumericUpDown; 417 private System.Windows.Forms.NumericUpDown heightNumericUpDown; 398 418 } 399 419 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r14725 r14902 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Drawing; … … 444 465 445 466 #region Sizing of Charts 446 private int GetColumnWidth() { return (int)(bodyScrollPanel.Width * ((float)widthTrackBar.Value / 100)); } 447 private int GetRowHeight() { return (int)(bodyScrollPanel.Height * ((float)heightTrackBar.Value / 100)); } 448 private void widthTrackBar_ValueChanged(object sender, EventArgs e) { 467 468 private int GetColumnWidth() { return (int)widthNumericUpDown.Value; } 469 private int GetRowHeight() { return (int)heightNumericUpDown.Value; } 470 private void widthNumericUpDown_ValueChanged(object sender, EventArgs e) { 449 471 frameTableLayoutPanel.SuspendRepaint(); 450 472 for (int i = 0; i < columnHeaderTableLayoutPanel.ColumnCount; i++) { … … 454 476 frameTableLayoutPanel.ResumeRepaint(true); 455 477 } 456 private void height TrackBar_ValueChanged(object sender, EventArgs e) {478 private void heightNumericUpDown_ValueChanged(object sender, EventArgs e) { 457 479 frameTableLayoutPanel.SuspendRepaint(); 458 459 480 for (int i = 0; i < rowHeaderTableLayoutPanel.RowCount; i++) { 460 481 rowHeaderTableLayoutPanel.RowStyles[i].Height = GetRowHeight();
Note: See TracChangeset
for help on using the changeset viewer.