Changeset 9087
- Timestamp:
- 12/21/12 11:00:42 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.cs
r9061 r9087 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing; 24 25 using System.Linq; 25 26 using System.Windows.Forms; … … 261 262 Content.Modify(); 262 263 } 264 265 private void colorButton_Click(object sender, EventArgs e) { 266 string resultName = (string)dataTableComboBox.SelectedItem; 267 string rowName = (string)dataRowComboBox.SelectedItem; 268 var runs = Content.Where(x => x.Results.ContainsKey(resultName)); 269 Dictionary<int, double> values = new Dictionary<int, double>(); 270 271 if (stringConvertibleMatrixView.DataGridView.CurrentCell != null) { 272 int curIndex = stringConvertibleMatrixView.DataGridView.CurrentCell.ColumnIndex; 273 274 for (int i = 0; i < stringConvertibleMatrixView.Content.Rows; i++) { 275 values[i] = double.Parse(stringConvertibleMatrixView.Content.GetValue(i, curIndex)); 276 } 277 278 var orderedValues = values.OrderBy(x => x.Value); 279 280 for (int i = 0; i < orderedValues.Count(); i++) { 281 var row = stringConvertibleMatrixView.DataGridView.Rows[orderedValues.ElementAt(i).Key]; 282 283 int r = (int)Math.Round((double)i / (double)orderedValues.Count() * 255.0); 284 int g = (int)Math.Round(((double)orderedValues.Count() - (double)i) / (double)orderedValues.Count() * 255.0); 285 286 Color color = Color.FromArgb(r, g, 0); 287 row.DefaultCellStyle.ForeColor = color; 288 } 289 } 290 } 263 291 } 264 292 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.designer.cs
r8569 r9087 52 52 this.addLineToChart = new System.Windows.Forms.Button(); 53 53 this.addValuesButton = new System.Windows.Forms.Button(); 54 this.colorButton = new System.Windows.Forms.Button(); 54 55 this.SuspendLayout(); 55 56 // 56 57 // stringConvertibleMatrixView 57 58 // 58 this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 59 | System.Windows.Forms.AnchorStyles.Left) 59 this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 60 | System.Windows.Forms.AnchorStyles.Left) 60 61 | System.Windows.Forms.AnchorStyles.Right))); 61 62 this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View"; … … 71 72 // dataRowComboBox 72 73 // 73 this.dataRowComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 74 this.dataRowComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 74 75 | System.Windows.Forms.AnchorStyles.Right))); 75 76 this.dataRowComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; … … 101 102 // dataTableComboBox 102 103 // 103 this.dataTableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 104 this.dataTableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 104 105 | System.Windows.Forms.AnchorStyles.Right))); 105 106 this.dataTableComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; … … 133 134 this.addValuesButton.Click += new System.EventHandler(this.addValuesButton_Click); 134 135 // 136 // colorButton 137 // 138 this.colorButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 139 this.colorButton.Location = new System.Drawing.Point(200, 359); 140 this.colorButton.Name = "colorButton"; 141 this.colorButton.Size = new System.Drawing.Size(75, 23); 142 this.colorButton.TabIndex = 11; 143 this.colorButton.Text = "Color Rows"; 144 this.colorButton.UseVisualStyleBackColor = true; 145 this.colorButton.Click += new System.EventHandler(this.colorButton_Click); 146 // 135 147 // RunCollectionStatisticalTabularView 136 148 // 149 this.Controls.Add(this.colorButton); 137 150 this.Controls.Add(this.addValuesButton); 138 151 this.Controls.Add(this.addLineToChart); … … 157 170 private System.Windows.Forms.Button addLineToChart; 158 171 private System.Windows.Forms.Button addValuesButton; 172 private System.Windows.Forms.Button colorButton; 159 173 } 160 174 }
Note: See TracChangeset
for help on using the changeset viewer.