Changeset 4542 for branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3
- Timestamp:
- 09/30/10 14:35:21 (14 years ago)
- Location:
- branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.Designer.cs
r4536 r4542 73 73 this.openAlgorithmButton = new System.Windows.Forms.Button(); 74 74 this.newAlgorithmButton = new System.Windows.Forms.Button(); 75 this. workerTabPage = new System.Windows.Forms.TabPage();75 this.foldsTabPage = new System.Windows.Forms.TabPage(); 76 76 this.algorithmResultsCollectionView = new HeuristicLab.Algorithms.DataAnalysis.Views.AlgorithmResultsCollectionView(); 77 77 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); … … 84 84 this.algorithmProblemTabPage.SuspendLayout(); 85 85 this.algorithmParametersTabPage.SuspendLayout(); 86 this. workerTabPage.SuspendLayout();86 this.foldsTabPage.SuspendLayout(); 87 87 this.SuspendLayout(); 88 88 // … … 284 284 | System.Windows.Forms.AnchorStyles.Right))); 285 285 this.tabControl.Controls.Add(this.algorithmTabPage); 286 this.tabControl.Controls.Add(this. workerTabPage);286 this.tabControl.Controls.Add(this.foldsTabPage); 287 287 this.tabControl.Location = new System.Drawing.Point(0, 157); 288 288 this.tabControl.Name = "tabControl"; … … 431 431 this.newAlgorithmButton.Click += new System.EventHandler(this.newAlgorithmButton_Click); 432 432 // 433 // workerTabPage434 // 435 this. workerTabPage.Controls.Add(this.algorithmResultsCollectionView);436 this. workerTabPage.Location = new System.Drawing.Point(4, 22);437 this. workerTabPage.Name = "workerTabPage";438 this. workerTabPage.Padding = new System.Windows.Forms.Padding(3);439 this. workerTabPage.Size = new System.Drawing.Size(649, 325);440 this. workerTabPage.TabIndex = 1;441 this. workerTabPage.Text = "Worker";442 this. workerTabPage.UseVisualStyleBackColor = true;433 // foldsTabPage 434 // 435 this.foldsTabPage.Controls.Add(this.algorithmResultsCollectionView); 436 this.foldsTabPage.Location = new System.Drawing.Point(4, 22); 437 this.foldsTabPage.Name = "foldsTabPage"; 438 this.foldsTabPage.Padding = new System.Windows.Forms.Padding(3); 439 this.foldsTabPage.Size = new System.Drawing.Size(649, 325); 440 this.foldsTabPage.TabIndex = 1; 441 this.foldsTabPage.Text = "Folds"; 442 this.foldsTabPage.UseVisualStyleBackColor = true; 443 443 // 444 444 // algorithmResultsCollectionView … … 508 508 this.algorithmProblemTabPage.ResumeLayout(false); 509 509 this.algorithmParametersTabPage.ResumeLayout(false); 510 this. workerTabPage.ResumeLayout(false);510 this.foldsTabPage.ResumeLayout(false); 511 511 this.ResumeLayout(false); 512 512 this.PerformLayout(); … … 533 533 private System.Windows.Forms.TabControl tabControl; 534 534 private System.Windows.Forms.TabPage algorithmTabPage; 535 private System.Windows.Forms.TabPage workerTabPage;535 private System.Windows.Forms.TabPage foldsTabPage; 536 536 private System.Windows.Forms.Button openAlgorithmButton; 537 537 private System.Windows.Forms.Button newAlgorithmButton; -
branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs
r4536 r4542 31 31 32 32 namespace HeuristicLab.Algorithms.DataAnalysis.Views { 33 [View("Cross Validation View")] 33 34 [Content(typeof(CrossValidation), true)] 34 public partial class CrossValidationView : NamedItemView {35 public sealed partial class CrossValidationView : NamedItemView { 35 36 private TypeSelectorDialog algorithmTypeSelectorDialog; 36 37 private TypeSelectorDialog problemTypeSelectorDialog; … … 38 39 public CrossValidationView() { 39 40 InitializeComponent(); 41 workersNumericUpDown.Maximum = Environment.ProcessorCount * 2; 40 42 } 41 43 … … 57 59 algorithmResultsCollectionView.Content = null; 58 60 } else { 61 Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started; 59 62 workersNumericUpDown.Value = Content.NumberOfWorkers.Value; 60 63 foldsNumericUpDown.Value = Content.Folds.Value; … … 78 81 Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged); 79 82 Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged); 80 Content.Prepared += new EventHandler(Content_Prepared);81 Content.Started += new EventHandler(Content_Started);82 Content.Paused += new EventHandler(Content_Paused);83 Content.Stopped += new EventHandler(Content_Stopped);84 83 } 85 84 … … 93 92 Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred); 94 93 Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged); 95 Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged); 96 Content.Prepared -= new EventHandler(Content_Prepared); 97 Content.Started -= new EventHandler(Content_Started); 98 Content.Paused -= new EventHandler(Content_Paused); 99 Content.Stopped -= new EventHandler(Content_Stopped); 94 Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged); 100 95 } 101 96 … … 111 106 samplesEndStringConvertibleValueView.Enabled = Content.Problem != null; 112 107 } 108 SetEnabledStateOfExecutableButtons(); 109 } 110 } 111 private void SetEnabledStateOfExecutableButtons() { 112 if (Content == null) { 113 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 114 foldsNumericUpDown.Enabled = workersNumericUpDown.Enabled = false; 115 samplesStartStringConvertibleValueView.Enabled = samplesEndStringConvertibleValueView.Enabled = false; 116 } else { 117 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 118 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 119 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 120 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 121 foldsNumericUpDown.Enabled = Content.ExecutionState == ExecutionState.Prepared; 122 samplesStartStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared; 123 samplesEndStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared; 124 workersNumericUpDown.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 113 125 } 114 126 } … … 145 157 if (InvokeRequired) 146 158 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e); 147 else148 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;149 }150 private void Content_Prepared(object sender, EventArgs e) {151 if (InvokeRequired)152 Invoke(new EventHandler(Content_Prepared), sender, e);153 159 else { 154 ReadOnly = Locked = false;160 Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started; 155 161 SetEnabledStateOfExecutableButtons(); 156 162 } 157 163 } 158 private void Content_Started(object sender, EventArgs e) { 159 if (InvokeRequired) 160 Invoke(new EventHandler(Content_Started), sender, e); 161 else { 162 ReadOnly = Locked = true; 163 SetEnabledStateOfExecutableButtons(); 164 } 165 } 166 private void Content_Paused(object sender, EventArgs e) { 167 if (InvokeRequired) 168 Invoke(new EventHandler(Content_Paused), sender, e); 169 else { 170 ReadOnly = Locked = false; 171 SetEnabledStateOfExecutableButtons(); 172 } 173 } 174 private void Content_Stopped(object sender, EventArgs e) { 175 if (InvokeRequired) 176 Invoke(new EventHandler(Content_Stopped), sender, e); 177 else { 178 ReadOnly = Locked = false; 179 SetEnabledStateOfExecutableButtons(); 180 } 181 } 164 182 165 private void Content_ExecutionTimeChanged(object sender, EventArgs e) { 183 166 if (InvokeRequired) … … 296 279 if (error != null) throw error; 297 280 IDataAnalysisProblem problem = content as IDataAnalysisProblem; 298 if (problem == null )281 if (problem == null && (Content.Algorithm.ProblemType.IsAssignableFrom(content.GetType()))) 299 282 Invoke(new Action(() => 300 283 MessageBox.Show(this, "The selected file does not contain a DataAnalysisProblem problem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error))); … … 336 319 } 337 320 338 pr otected virtualvoid algorithmProblemTabPage_DragEnterOver(object sender, DragEventArgs e) {321 private void algorithmProblemTabPage_DragEnterOver(object sender, DragEventArgs e) { 339 322 e.Effect = DragDropEffects.None; 340 323 Type type = e.Data.GetData("Type") as Type; 341 if ((type != null) && (typeof(IDataAnalysisProblem).IsAssignableFrom(type))) { 324 if ((type != null) && (typeof(IDataAnalysisProblem).IsAssignableFrom(type)) && 325 (Content.Algorithm.ProblemType.IsAssignableFrom(type))) { 342 326 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 343 327 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key … … 347 331 } 348 332 } 349 pr otected virtualvoid algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) {333 private void algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) { 350 334 if (e.Effect != DragDropEffects.None) { 351 335 IDataAnalysisProblem problem = e.Data.GetData("Value") as IDataAnalysisProblem; … … 355 339 } 356 340 #endregion 357 358 #region Helpers359 private void SetEnabledStateOfExecutableButtons() {360 if (Content == null) {361 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;362 } else {363 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);364 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;365 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);366 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;367 }368 }369 #endregion370 341 } 371 342 } -
branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.resx
r4536 r4542 121 121 <value>107, 17</value> 122 122 </metadata> 123 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">124 <value>107, 17</value>125 </metadata>126 123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 124 <value>17, 17</value> -
branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs.frame
r4472 r4542 26 26 /// Plugin class for HeuristicLab.Algorithms.DataAnalysis.Views plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Algorithms.DataAnalysis.Views", "3.3. 0.$WCREV$")]28 [Plugin("HeuristicLab.Algorithms.DataAnalysis.Views", "3.3.1.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Algorithms.DataAnalysis.Views-3.3.dll", PluginFileType.Assembly)] 30 30 public class HeuristicLabAlgorithmsDataAnalysisViewsPlugin : PluginBase { -
branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/Properties/AssemblyInfo.frame
r4472 r4542 52 52 // You can specify all the values or you can default the Revision and Build Numbers 53 53 // by using the '*' as shown below: 54 [assembly: AssemblyVersion("3.3. 0.0")]55 [assembly: AssemblyFileVersion("3.3. 0.$WCREV$")]54 [assembly: AssemblyVersion("3.3.1.0")] 55 [assembly: AssemblyFileVersion("3.3.1.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.