Changeset 3460 for trunk/sources
- Timestamp:
- 04/21/10 14:00:01 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.Designer.cs
r3239 r3460 90 90 this.Name = "AntTrailView"; 91 91 this.Size = new System.Drawing.Size(392, 310); 92 this.EnabledChanged += new System.EventHandler(this.AntTrailView_EnabledChanged);93 92 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 94 93 this.ResumeLayout(false); -
trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs
r3454 r3460 63 63 GenerateImage(); 64 64 } 65 SetEnabledStateOfControls(); 66 } 67 68 protected override void OnReadOnlyChanged() { 69 base.OnReadOnlyChanged(); 70 SetEnabledStateOfControls(); 71 } 72 73 private void SetEnabledStateOfControls() { 74 pictureBox.Enabled = Content != null; 75 playButton.Enabled = Content != null && !ReadOnly; 65 } 66 67 protected override void OnLockedChanged() { 68 this.playButton.Enabled = !Locked; 69 base.OnLockedChanged(); 76 70 } 77 71 78 72 private void GenerateImage() { 79 playButton.Enabled = this.Enabled && !ReadOnly;80 73 animationTimer.Stop(); 81 74 if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) { … … 228 221 } else { 229 222 animationTimer.Stop(); 230 playButton.Enabled = t his.Enabled && !ReadOnly;223 playButton.Enabled = true; 231 224 } 232 225 } 233 226 } 234 227 #endregion 235 236 private void AntTrailView_EnabledChanged(object sender, EventArgs e) {237 if (this.Enabled) playButton.Enabled = !ReadOnly;238 else playButton.Enabled = false;239 }240 228 } 241 229 }
Note: See TracChangeset
for help on using the changeset viewer.