- Timestamp:
- 11/28/12 01:59:10 (12 years ago)
- Location:
- branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
r8955 r8956 398 398 </ProjectReference> 399 399 </ItemGroup> 400 <ItemGroup>401 <EmbeddedResource Include="TimeLimitRunView.resx">402 <DependentUpon>TimeLimitRunView.cs</DependentUpon>403 </EmbeddedResource>404 </ItemGroup>405 400 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 406 401 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/TimeLimitRunView.Designer.cs
r8955 r8956 50 50 this.runsView = new HeuristicLab.Optimization.Views.RunCollectionView(); 51 51 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 52 this.snapshotButton = new System.Windows.Forms.Button(); 52 53 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 53 54 this.tabControl.SuspendLayout(); … … 109 110 this.timeLimitTextBox.Size = new System.Drawing.Size(338, 20); 110 111 this.timeLimitTextBox.TabIndex = 17; 111 this.timeLimitTextBox.Leave += new System.EventHandler(this.timeLimitTextBox_Leave);112 112 this.timeLimitTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeLimitTextBox_Validating); 113 113 // … … 127 127 this.snapShotsTextBox.Location = new System.Drawing.Point(69, 52); 128 128 this.snapShotsTextBox.Name = "snapShotsTextBox"; 129 this.snapShotsTextBox.Size = new System.Drawing.Size(14 8, 20);129 this.snapShotsTextBox.Size = new System.Drawing.Size(142, 20); 130 130 this.snapShotsTextBox.TabIndex = 17; 131 131 // … … 266 266 this.openFileDialog.Title = "Open Optimizer"; 267 267 // 268 // snapshotButton 269 // 270 this.snapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 271 this.snapshotButton.Location = new System.Drawing.Point(120, 440); 272 this.snapshotButton.Name = "snapshotButton"; 273 this.snapshotButton.Size = new System.Drawing.Size(24, 24); 274 this.snapshotButton.TabIndex = 20; 275 this.snapshotButton.Text = "Snapshot"; 276 this.snapshotButton.UseVisualStyleBackColor = true; 277 this.snapshotButton.Click += new System.EventHandler(this.snapshotButton_Click); 278 // 268 279 // TimeLimitRunView 269 280 // 270 this.AutoScale Dimensions = new System.Drawing.SizeF(6F, 13F);271 this. AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;281 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 282 this.Controls.Add(this.snapshotButton); 272 283 this.Controls.Add(this.tabControl); 273 284 this.Controls.Add(this.timeLimitTextBox); … … 283 294 this.Controls.SetChildIndex(this.timeLimitLabel, 0); 284 295 this.Controls.SetChildIndex(this.timeLimitTextBox, 0); 296 this.Controls.SetChildIndex(this.tabControl, 0); 285 297 this.Controls.SetChildIndex(this.nameLabel, 0); 286 298 this.Controls.SetChildIndex(this.nameTextBox, 0); … … 292 304 this.Controls.SetChildIndex(this.executionTimeTextBox, 0); 293 305 this.Controls.SetChildIndex(this.startButton, 0); 294 this.Controls.SetChildIndex(this. tabControl, 0);306 this.Controls.SetChildIndex(this.snapshotButton, 0); 295 307 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 296 308 this.tabControl.ResumeLayout(false); … … 320 332 private RunCollectionView runsView; 321 333 private System.Windows.Forms.OpenFileDialog openFileDialog; 334 private System.Windows.Forms.Button snapshotButton; 322 335 } 323 336 } -
branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/TimeLimitRunView.cs
r8955 r8956 25 25 using System.Windows.Forms; 26 26 using HeuristicLab.Common; 27 using HeuristicLab.Common.Resources; 27 28 using HeuristicLab.Core; 28 29 using HeuristicLab.Core.Views; … … 45 46 public TimeLimitRunView() { 46 47 InitializeComponent(); 48 snapshotButton.Text = String.Empty; 49 snapshotButton.Image = VSImageLibrary.Breakpoint; 47 50 } 48 51 … … 69 72 try { 70 73 if (Content == null) { 71 timeLimitTextBox.Tag = TimeSpan.FromSeconds(60); 72 timeLimitTextBox.Text = FormatTimeSpan((TimeSpan)timeLimitTextBox.Tag); 74 timeLimitTextBox.Text = FormatTimeSpan(TimeSpan.FromSeconds(60)); 73 75 snapShotsTextBox.Text = String.Empty; 74 76 storeAlgorithmInEachSnapshotCheckBox.Checked = false; … … 77 79 runsView.Content = null; 78 80 } else { 79 timeLimitTextBox.Tag = Content.MaximumExecutionTime;80 81 timeLimitTextBox.Text = FormatTimeSpan(Content.MaximumExecutionTime); 81 82 snapShotsTextBox.Text = String.Join(" ; ", Content.SnapshotTimes); … … 87 88 } finally { SuppressEvents = false; } 88 89 } 90 89 91 protected override void SetEnabledStateOfControls() { 90 92 base.SetEnabledStateOfControls(); … … 99 101 } 100 102 103 protected override void SetEnabledStateOfExecutableButtons() { 104 base.SetEnabledStateOfExecutableButtons(); 105 snapshotButton.Enabled = Content != null && (Content.ExecutionState == ExecutionState.Started || Content.ExecutionState == ExecutionState.Paused); 106 } 107 101 108 protected override void OnClosed(FormClosedEventArgs e) { 102 109 if ((Content != null) && (Content.ExecutionState == ExecutionState.Started)) { … … 151 158 152 159 #region Control events 153 private void timeLimitTextBox_Leave(object sender, EventArgs e) {154 if (SuppressEvents) return;155 SuppressEvents = true;156 try {157 timeLimitTextBox.Text = FormatTimeSpan((TimeSpan)timeLimitTextBox.Tag);158 } finally { SuppressEvents = false; }159 }160 161 160 private void timeLimitTextBox_Validating(object sender, CancelEventArgs e) { 162 161 if (SuppressEvents) return; … … 179 178 ts = GetTimeSpanFromFormat(value, text.Substring(length - 1, text.Length - (length - 1)).TrimStart()); 180 179 } else ts = TimeSpan.FromSeconds(value); 181 timeLimitTextBox.Tag= ts;180 Content.MaximumExecutionTime = ts; 182 181 e.Cancel = false; 183 182 errorProvider.SetError(timeLimitTextBox, String.Empty); … … 252 251 } 253 252 } 253 254 private void snapshotButton_Click(object sender, EventArgs e) { 255 Content.Snapshot(); 256 } 254 257 #endregion 255 258 #endregion
Note: See TracChangeset
for help on using the changeset viewer.