Changeset 7844
- Timestamp:
- 05/18/12 11:50:59 (13 years ago)
- Location:
- branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentUploadView.Designer.cs
r7839 r7844 36 36 this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); 37 37 this.setColumnToThisValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 38 this.clearButton = new System.Windows.Forms.Button(); 38 39 ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); 39 40 this.contextMenu.SuspendLayout(); … … 71 72 this.ProblemTypeColumn, 72 73 this.OKBProblemColumn}); 74 this.dataGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; 73 75 this.dataGridView.Location = new System.Drawing.Point(3, 3); 74 76 this.dataGridView.Name = "dataGridView"; … … 137 139 this.setColumnToThisValueToolStripMenuItem.Click += new System.EventHandler(this.setColumnToThisValueToolStripMenuItem_Click); 138 140 // 141 // clearButton 142 // 143 this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 144 this.clearButton.Location = new System.Drawing.Point(387, 199); 145 this.clearButton.Name = "clearButton"; 146 this.clearButton.Size = new System.Drawing.Size(75, 23); 147 this.clearButton.TabIndex = 3; 148 this.clearButton.Text = "Clear Runs"; 149 this.clearButton.UseVisualStyleBackColor = true; 150 this.clearButton.Click += new System.EventHandler(this.clearButton_Click); 151 // 139 152 // OKBExperimentUploadView 140 153 // … … 142 155 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 143 156 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 157 this.Controls.Add(this.clearButton); 144 158 this.Controls.Add(this.dataGridView); 145 159 this.Controls.Add(this.btnUpload); … … 165 179 private System.Windows.Forms.ContextMenuStrip contextMenu; 166 180 private System.Windows.Forms.ToolStripMenuItem setColumnToThisValueToolStripMenuItem; 181 private System.Windows.Forms.Button clearButton; 167 182 } 168 183 } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r7839 r7844 69 69 } else { 70 70 AddRuns(Content); 71 DisplayRuns();72 71 } 73 72 } … … 76 75 if (item is Experiment) { 77 76 runs.AddRange((item as Experiment).Runs); 77 DisplayRuns((item as Experiment).Runs); 78 78 } else if (item is RunCollection) { 79 79 runs.AddRange((item as RunCollection)); 80 DisplayRuns((item as RunCollection)); 80 81 } else if (item is IOptimizer) { 81 82 runs.AddRange((item as IOptimizer).Runs); 83 DisplayRuns((item as IOptimizer).Runs); 82 84 } else if (item is IRun) { 83 85 runs.Add(item as IRun); 86 RunCollection tmp = new RunCollection(); 87 tmp.Add(item as IRun); 88 DisplayRuns(tmp); 84 89 } 85 90 } … … 101 106 } 102 107 103 private void DisplayRuns( ) {108 private void DisplayRuns(RunCollection runs) { 104 109 if (RunCreationClient.Instance.Algorithms == null || RunCreationClient.Instance.Algorithms.Count() == 0) { 105 110 RunCreationClient.Instance.RefreshAsync(DisplayError); 106 111 } else { 107 CreateUI( );108 } 109 } 110 111 private void CreateUI( ) {112 CreateUI(runs); 113 } 114 } 115 116 private void CreateUI(RunCollection runs) { 112 117 if (problems.Count == 0) 113 118 problems.AddRange(RunCreationClient.Instance.Problems); … … 128 133 cmbProblem.DisplayMember = "Name"; 129 134 130 dataGridView.Rows.Clear();131 135 foreach (IRun run in runs) { 132 136 int idx = dataGridView.Rows.Add(run.Name); … … 184 188 } else { 185 189 FinishProgressView(); 186 187 CreateUI();188 190 SetEnabledStateOfControls(); 189 191 } … … 241 243 progressView = null; 242 244 SetEnabledStateOfControls(); 245 ClearRuns(); 243 246 } 244 247 } … … 291 294 if (e.Effect.HasFlag(DragDropEffects.Copy)) optimizer = (IItem)optimizer.Clone(); 292 295 AddRuns(optimizer); 293 DisplayRuns(); 294 } 296 } 297 } 298 299 private void clearButton_Click(object sender, EventArgs e) { 300 ClearRuns(); 295 301 } 296 302 }
Note: See TracChangeset
for help on using the changeset viewer.