- Timestamp:
- 05/03/17 16:17:12 (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/PreprocessingCheckedVariablesView.Designer.cs
r14514 r14917 90 90 // uncheckAllButton 91 91 // 92 this.uncheckAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.None; 92 93 this.uncheckAllButton.Location = new System.Drawing.Point(66, 19); 93 94 this.uncheckAllButton.Name = "uncheckAllButton"; 94 95 this.uncheckAllButton.Size = new System.Drawing.Size(24, 24); 95 96 this.uncheckAllButton.TabIndex = 7; 96 this.uncheckAllButton.Text = "N"; 97 this.toolTip.SetToolTip(this.uncheckAllButton, "Uncheck all variables"); 97 this.toolTip.SetToolTip(this.uncheckAllButton, "None"); 98 98 this.uncheckAllButton.UseVisualStyleBackColor = true; 99 99 this.uncheckAllButton.Click += new System.EventHandler(this.uncheckAllButton_Click); … … 101 101 // checkAllButton 102 102 // 103 this.checkAllButton.Location = new System.Drawing.Point(36, 19); 103 this.checkAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.All; 104 this.checkAllButton.Location = new System.Drawing.Point(6, 19); 104 105 this.checkAllButton.Name = "checkAllButton"; 105 106 this.checkAllButton.Size = new System.Drawing.Size(24, 24); 106 107 this.checkAllButton.TabIndex = 7; 107 this.checkAllButton.Text = "A"; 108 this.toolTip.SetToolTip(this.checkAllButton, "Check all variables"); 108 this.toolTip.SetToolTip(this.checkAllButton, "All"); 109 109 this.checkAllButton.UseVisualStyleBackColor = true; 110 110 this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); … … 112 112 // checkInputsTargetButton 113 113 // 114 this.checkInputsTargetButton.Location = new System.Drawing.Point(6, 19); 114 this.checkInputsTargetButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.Inputs; 115 this.checkInputsTargetButton.Location = new System.Drawing.Point(36, 19); 115 116 this.checkInputsTargetButton.Name = "checkInputsTargetButton"; 116 117 this.checkInputsTargetButton.Size = new System.Drawing.Size(24, 24); 117 118 this.checkInputsTargetButton.TabIndex = 7; 118 this.checkInputsTargetButton.Text = "I"; 119 this.toolTip.SetToolTip(this.checkInputsTargetButton, "Check only inputs and target variable"); 119 this.toolTip.SetToolTip(this.checkInputsTargetButton, "Inputs & Target"); 120 120 this.checkInputsTargetButton.UseVisualStyleBackColor = true; 121 121 this.checkInputsTargetButton.Click += new System.EventHandler(this.checkInputsTargetButton_Click); -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.cs
r14511 r14917 25 25 using System.Windows.Forms; 26 26 using HeuristicLab.Collections; 27 using HeuristicLab.Common.Resources;28 27 using HeuristicLab.Core.Views; 29 28 using HeuristicLab.Data; … … 44 43 protected PreprocessingCheckedVariablesView() { 45 44 InitializeComponent(); 46 checkInputsTargetButton.Text = string.Empty;47 checkInputsTargetButton.Image = VSImageLibrary.Namespace;48 checkAllButton.Text = string.Empty;49 checkAllButton.Image = VSImageLibrary.Expand;50 uncheckAllButton.Text = string.Empty;51 uncheckAllButton.Image = VSImageLibrary.Collapse;52 45 } 53 46 -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
r14902 r14917 57 57 this.heightLabel = new System.Windows.Forms.Label(); 58 58 this.widthLabel = new System.Windows.Forms.Label(); 59 this.lockAspectCheckBox = new System.Windows.Forms.CheckBox(); 59 60 this.regressionGroupBox = new System.Windows.Forms.GroupBox(); 60 61 this.regressionTypeComboBox = new System.Windows.Forms.ComboBox(); … … 198 199 this.sizeGroupBox.Controls.Add(this.heightLabel); 199 200 this.sizeGroupBox.Controls.Add(this.widthLabel); 201 this.sizeGroupBox.Controls.Add(this.lockAspectCheckBox); 200 202 this.sizeGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; 201 this.sizeGroupBox.Location = new System.Drawing.Point(0, 212);203 this.sizeGroupBox.Location = new System.Drawing.Point(0, 179); 202 204 this.sizeGroupBox.Name = "sizeGroupBox"; 203 this.sizeGroupBox.Size = new System.Drawing.Size(180, 72);205 this.sizeGroupBox.Size = new System.Drawing.Size(180, 95); 204 206 this.sizeGroupBox.TabIndex = 5; 205 207 this.sizeGroupBox.TabStop = false; … … 211 213 | System.Windows.Forms.AnchorStyles.Right))); 212 214 this.heightNumericUpDown.Increment = new decimal(new int[] { 213 100,215 50, 214 216 0, 215 217 0, … … 225 227 this.heightNumericUpDown.TabIndex = 4; 226 228 this.heightNumericUpDown.Value = new decimal(new int[] { 227 300,229 225, 228 230 0, 229 231 0, … … 236 238 | System.Windows.Forms.AnchorStyles.Right))); 237 239 this.widthNumericUpDown.Increment = new decimal(new int[] { 238 100,240 50, 239 241 0, 240 242 0, … … 250 252 this.widthNumericUpDown.TabIndex = 3; 251 253 this.widthNumericUpDown.Value = new decimal(new int[] { 252 400,254 300, 253 255 0, 254 256 0, … … 274 276 this.widthLabel.Text = "Width:"; 275 277 // 278 // lockAspectCheckBox 279 // 280 this.lockAspectCheckBox.AutoSize = true; 281 this.lockAspectCheckBox.Checked = true; 282 this.lockAspectCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 283 this.lockAspectCheckBox.Location = new System.Drawing.Point(50, 66); 284 this.lockAspectCheckBox.Name = "lockAspectCheckBox"; 285 this.lockAspectCheckBox.Size = new System.Drawing.Size(114, 17); 286 this.lockAspectCheckBox.TabIndex = 6; 287 this.lockAspectCheckBox.Text = "Lock Aspect Ratio"; 288 this.lockAspectCheckBox.UseVisualStyleBackColor = true; 289 // 276 290 // regressionGroupBox 277 291 // … … 281 295 this.regressionGroupBox.Controls.Add(this.label4); 282 296 this.regressionGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; 283 this.regressionGroupBox.Location = new System.Drawing.Point(0, 32 8);297 this.regressionGroupBox.Location = new System.Drawing.Point(0, 324); 284 298 this.regressionGroupBox.Name = "regressionGroupBox"; 285 this.regressionGroupBox.Size = new System.Drawing.Size(180, 7 5);299 this.regressionGroupBox.Size = new System.Drawing.Size(180, 79); 286 300 this.regressionGroupBox.TabIndex = 3; 287 301 this.regressionGroupBox.TabStop = false; … … 348 362 this.groupingOptionsBox.Controls.Add(this.groupingComboBox); 349 363 this.groupingOptionsBox.Dock = System.Windows.Forms.DockStyle.Bottom; 350 this.groupingOptionsBox.Location = new System.Drawing.Point(0, 2 84);364 this.groupingOptionsBox.Location = new System.Drawing.Point(0, 274); 351 365 this.groupingOptionsBox.Name = "groupingOptionsBox"; 352 this.groupingOptionsBox.Size = new System.Drawing.Size(180, 44);366 this.groupingOptionsBox.Size = new System.Drawing.Size(180, 50); 353 367 this.groupingOptionsBox.TabIndex = 8; 354 368 this.groupingOptionsBox.TabStop = false; … … 416 430 private System.Windows.Forms.NumericUpDown widthNumericUpDown; 417 431 private System.Windows.Forms.NumericUpDown heightNumericUpDown; 432 private System.Windows.Forms.CheckBox lockAspectCheckBox; 418 433 } 419 434 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r14902 r14917 43 43 public ScatterPlotMultiView() { 44 44 InitializeComponent(); 45 46 oldWidth = (int)widthNumericUpDown.Value; 47 oldHeight = (int)heightNumericUpDown.Value; 45 48 46 49 regressionTypeComboBox.DataSource = Enum.GetValues(typeof(RegressionType)); … … 465 468 466 469 #region Sizing of Charts 470 private int oldWidth; 471 private int oldHeight; 472 private float AspectRatio { 473 get { 474 if (oldWidth == 0 || oldHeight == 0) return 1; 475 return (float)oldWidth / oldHeight; 476 } 477 } 478 private bool lockChange = false; 467 479 468 480 private int GetColumnWidth() { return (int)widthNumericUpDown.Value; } 469 481 private int GetRowHeight() { return (int)heightNumericUpDown.Value; } 482 470 483 private void widthNumericUpDown_ValueChanged(object sender, EventArgs e) { 471 484 frameTableLayoutPanel.SuspendRepaint(); 485 if (lockAspectCheckBox.Checked && !lockChange) { 486 lockChange = true; 487 heightNumericUpDown.Value = (int)((double)widthNumericUpDown.Value / AspectRatio); 488 lockChange = false; 489 } 472 490 for (int i = 0; i < columnHeaderTableLayoutPanel.ColumnCount; i++) { 473 491 columnHeaderTableLayoutPanel.ColumnStyles[i].Width = GetColumnWidth(); 474 492 bodyTableLayoutPanel.ColumnStyles[i].Width = GetColumnWidth(); 475 493 } 494 oldWidth = GetColumnWidth(); 495 oldHeight = GetRowHeight(); 476 496 frameTableLayoutPanel.ResumeRepaint(true); 477 497 } 478 498 private void heightNumericUpDown_ValueChanged(object sender, EventArgs e) { 479 499 frameTableLayoutPanel.SuspendRepaint(); 500 if (lockAspectCheckBox.Checked && !lockChange) { 501 lockChange = true; 502 widthNumericUpDown.Value = (int)((double)heightNumericUpDown.Value * AspectRatio); 503 lockChange = false; 504 } 480 505 for (int i = 0; i < rowHeaderTableLayoutPanel.RowCount; i++) { 481 506 rowHeaderTableLayoutPanel.RowStyles[i].Height = GetRowHeight(); 482 507 bodyTableLayoutPanel.RowStyles[i].Height = GetRowHeight(); 483 508 } 509 oldWidth = GetColumnWidth(); 510 oldHeight = GetRowHeight(); 484 511 frameTableLayoutPanel.ResumeRepaint(true); 485 512 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
r14725 r14917 183 183 private void UpdateRegressionLine() { 184 184 if (Content == null) return; 185 scatterPlotControl.Content.Rows.Clear();186 185 187 186 var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue; 188 187 int order = (int)polynomialRegressionOrderNumericUpDown.Value; 189 188 190 var rows = scatterPlotControl.Content.Rows.ToList(); 191 foreach (var row in rows) { 189 foreach (var row in scatterPlotControl.Content.Rows) { 192 190 row.VisualProperties.IsRegressionVisibleInLegend = false; 193 191 row.VisualProperties.RegressionType = regressionType; 194 192 row.VisualProperties.PolynomialRegressionOrder = order; 195 193 } 196 scatterPlotControl.Content.Rows.AddRange(rows);197 194 } 198 195 #endregion
Note: See TracChangeset
for help on using the changeset viewer.