Changeset 2442 for trunk/sources/HeuristicLab
- Timestamp:
- 10/20/09 14:20:58 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab/SplashScreen.cs
r2439 r2442 102 102 } 103 103 SetInfoText(info); 104 Application.DoEvents(); 104 105 } 105 106 … … 114 115 115 116 private void UpdateOpacity() { 116 lock (bigLock) {117 if (closing) return;118 if (Opacity > 0.9) {117 lock (bigLock) { 118 if (closing) return; 119 if (Opacity > 0.9) { 119 120 Opacity = 0.9; 120 121 fadeTimer.Interval = FADE_INTERVAL; 121 122 fadeTimer.Start(); 122 } else if (this.Opacity > 0) {123 } else if (this.Opacity > 0) { 123 124 Opacity -= 0.1; 124 125 fadeTimer.Start(); … … 131 132 132 133 private void closeButton_Click(object sender, EventArgs e) { 133 lock(bigLock) { 134 if(fadeTimer != null) fadeTimer.Stop(); 135 CloseSplashScreen(); 136 } 134 CloseSplashScreen(); 137 135 } 138 136 139 137 private void CloseSplashScreen() { 140 if (!closing) { // just close once 141 closing = true; 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 138 lock (bigLock) { 139 if (!closing) { // just close once 140 closing = true; 141 if (fadeTimer != null) fadeTimer.Stop(); 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 145 } 145 146 } 146 147 }
Note: See TracChangeset
for help on using the changeset viewer.