Changeset 2439 for trunk/sources/HeuristicLab
- Timestamp:
- 10/19/09 15:11:36 (15 years ago)
- Location:
- trunk/sources/HeuristicLab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab/SplashScreen.Designer.cs
r595 r2439 214 214 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 215 215 this.TopMost = true; 216 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SplashScreen_FormClosing);217 216 this.panel.ResumeLayout(false); 218 217 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); -
trunk/sources/HeuristicLab/SplashScreen.cs
r596 r2439 102 102 } 103 103 SetInfoText(info); 104 Application.DoEvents();105 104 } 106 105 … … 126 125 } else { 127 126 Opacity = 0; 128 Close ();127 CloseSplashScreen(); 129 128 } 130 129 } 131 130 } 132 131 133 private void SplashScreen_FormClosing(object sender, FormClosingEventArgs e) { 134 PluginManager.Manager.Action -= new PluginManagerActionEventHandler(this.Manager_Action); 132 private void closeButton_Click(object sender, EventArgs e) { 133 lock(bigLock) { 134 if(fadeTimer != null) fadeTimer.Stop(); 135 CloseSplashScreen(); 136 } 135 137 } 136 138 137 private void closeButton_Click(object sender, EventArgs e) {138 lock(bigLock) {139 private void CloseSplashScreen() { 140 if (!closing) { // just close once 139 141 closing = true; 140 if(fadeTimer != null) fadeTimer.Stop(); 141 Close(); 142 PluginManager.Manager.Action -= new PluginManagerActionEventHandler(this.Manager_Action); // remove event before calling close 143 Application.DoEvents(); // work up all existing events 144 Close(); // close 142 145 } 143 146 }
Note: See TracChangeset
for help on using the changeset viewer.