Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8925


Ignore:
Timestamp:
11/20/12 12:13:24 (12 years ago)
Author:
bburlacu
Message:

#1890: Reverted erroneous commit for RunCollectionDataTableView.cs and RunCollectionDataTableView.Designer.cs.

Location:
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionDataTableView.Designer.cs

    r8924 r8925  
    4949      this.label2 = new System.Windows.Forms.Label();
    5050      this.dataRowComboBox = new System.Windows.Forms.ComboBox();
    51       this.label3 = new System.Windows.Forms.Label();
    52       this.groupByComboBox = new System.Windows.Forms.ComboBox();
    5351      this.SuspendLayout();
    5452      //
    5553      // dataTableComboBox
    5654      //
    57       this.dataTableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     55      this.dataTableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    5856            | System.Windows.Forms.AnchorStyles.Right)));
    5957      this.dataTableComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     
    7674      // viewHost
    7775      //
    78       this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    79             | System.Windows.Forms.AnchorStyles.Left) 
     76      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     77            | System.Windows.Forms.AnchorStyles.Left)
    8078            | System.Windows.Forms.AnchorStyles.Right)));
    8179      this.viewHost.Caption = "View";
     
    10199      // dataRowComboBox
    102100      //
    103       this.dataRowComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     101      this.dataRowComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    104102            | System.Windows.Forms.AnchorStyles.Right)));
    105103      this.dataRowComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     
    111109      this.dataRowComboBox.SelectedIndexChanged += new System.EventHandler(this.dataRowComboBox_SelectedIndexChanged);
    112110      //
    113       // label3
    114       //
    115       this.label3.AutoSize = true;
    116       this.label3.Location = new System.Drawing.Point(3, 61);
    117       this.label3.Name = "label3";
    118       this.label3.Size = new System.Drawing.Size(53, 13);
    119       this.label3.TabIndex = 5;
    120       this.label3.Text = "Grouping:";
    121       //
    122       // groupByComboBox
    123       //
    124       this.groupByComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    125             | System.Windows.Forms.AnchorStyles.Right)));
    126       this.groupByComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    127       this.groupByComboBox.FormattingEnabled = true;
    128       this.groupByComboBox.Items.AddRange(new object[] {
    129             "None",
    130             "Same runs",
    131             "All"});
    132       this.groupByComboBox.Location = new System.Drawing.Point(69, 58);
    133       this.groupByComboBox.Name = "groupByComboBox";
    134       this.groupByComboBox.Size = new System.Drawing.Size(455, 21);
    135       this.groupByComboBox.TabIndex = 6;
    136       this.groupByComboBox.SelectedIndexChanged += new System.EventHandler(this.groupByComboBox_SelectedIndexChanged);
    137       //
    138111      // RunCollectionDataTableView
    139112      //
     113      this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
    140114      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    141       this.Controls.Add(this.groupByComboBox);
    142       this.Controls.Add(this.label3);
    143115      this.Controls.Add(this.dataRowComboBox);
    144116      this.Controls.Add(this.label2);
     
    160132    private System.Windows.Forms.Label label2;
    161133    private System.Windows.Forms.ComboBox dataRowComboBox;
    162     private System.Windows.Forms.Label label3;
    163     private System.Windows.Forms.ComboBox groupByComboBox;
    164134  }
    165135}
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionDataTableView.cs

    r8924 r8925  
    220220      dataRowComboBox.Items.Add(AllDataRows);
    221221      if (dataRowComboBox.Items.Count > 0) dataRowComboBox.SelectedItem = dataRowComboBox.Items[0];
    222       groupByComboBox.SelectedItem = groupByComboBox.Items[0];
    223222    }
    224223
     
    227226    }
    228227    private void dataRowComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    229       //      RebuildCombinedDataTable();
    230       groupByComboBox_SelectedIndexChanged(sender, e);
    231     }
    232     private void groupByComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    233       var resultName = (string)dataTableComboBox.SelectedItem;
    234       var groupByCriteriaName = (string)groupByComboBox.SelectedItem;
    235       switch (groupByCriteriaName) {
    236         case ("None"): {
    237             combinedDataTable.Rows.Clear();
    238             RebuildCombinedDataTable();
    239             break;
    240           }
    241         case ("Same runs"): {
    242             var rowName = (string)dataRowComboBox.SelectedItem;
    243             var runGroups = Content.GroupBy(r => r.Algorithm);
    244             combinedDataTable.Rows.Clear();
    245             foreach (var g in runGroups) {
    246               var dataTable = g.Select(r => r.Results[resultName] as DataTable);
    247               var rows = dataTable.SelectMany(d => d.Rows.Where(row => row.Name == rowName)).ToList();
    248               var avgRow = new DataRow { VisualProperties = { StartIndexZero = true }, Name = resultName + "." + rowName };
    249               var min = rows.Min(r => r.Values.Count);
    250               for (int i = 0; i != min; ++i) {
    251                 avgRow.Values.Add(rows.Average(r => r.Values[i]));
    252               }
    253               combinedDataTable.Rows.Add(avgRow);
    254             }
    255             break;
    256           }
    257         case ("All"): {
    258             var rowName = (string)dataRowComboBox.SelectedItem;
    259             RebuildCombinedDataTable();
    260             var rows = combinedDataTable.Rows;
    261             var avgRow = new DataRow { VisualProperties = { StartIndexZero = true }, Name = resultName + "." + rowName };
    262             var min = rows.Min(r => r.Values.Count);
    263             for (int i = 0; i != min; ++i) {
    264               avgRow.Values.Add(rows.Average(r => r.Values[i]));
    265             }
    266             combinedDataTable.Rows.Clear();
    267             combinedDataTable.Rows.Add(avgRow);
    268             break;
    269           }
    270       }
     228      RebuildCombinedDataTable();
    271229    }
    272230  }
Note: See TracChangeset for help on using the changeset viewer.