Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/20/09 14:20:58 (15 years ago)
Author:
abeham
Message:

changed SplashScreen after discussion with Gabriel (#183)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab/SplashScreen.cs

    r2439 r2442  
    102102      }
    103103      SetInfoText(info);
     104      Application.DoEvents();
    104105    }
    105106
     
    114115
    115116    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) {
    119120          Opacity = 0.9;
    120121          fadeTimer.Interval = FADE_INTERVAL;
    121122          fadeTimer.Start();
    122         } else if(this.Opacity > 0) {
     123        } else if (this.Opacity > 0) {
    123124          Opacity -= 0.1;
    124125          fadeTimer.Start();
     
    131132
    132133    private void closeButton_Click(object sender, EventArgs e) {
    133       lock(bigLock) {
    134         if(fadeTimer != null) fadeTimer.Stop();
    135         CloseSplashScreen();
    136       }
     134      CloseSplashScreen();
    137135    }
    138136
    139137    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        }
    145146      }
    146147    }
Note: See TracChangeset for help on using the changeset viewer.