Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17


Ignore:
Timestamp:
02/20/08 14:56:45 (16 years ago)
Author:
gkronber
Message:

hide the starter only when the plugin-manager is running.
don't close the starter when an application is running.

Location:
trunk/sources/HeuristicLab
Files:
2 edited

Legend:

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

    r16 r17  
    9292          splashScreen.Owner = this;
    9393          splashScreen.Show();
    94           this.Visible = false;
    9594          PluginManager.Manager.Action += new PluginManagerActionEventHandler(splashScreen.Manager_Action);
    96           PluginManager.Manager.Run(app);
    97           this.Visible = true;
     95          Thread t = new Thread(delegate() {
     96            PluginManager.Manager.Run(app);
     97          });
     98          t.SetApartmentState(ApartmentState.STA);
     99          t.Start();
    98100        }
    99101      }
  • trunk/sources/HeuristicLab/SplashScreen.cs

    r2 r17  
    118118
    119119    private void fadeTimer_Tick(object sender, EventArgs e) {
    120       if(Opacity > 0.9) {
    121         Opacity = 0.9;
    122       } else if(this.Opacity > 0) {
    123         Opacity -= 0.1;
     120      if(InvokeRequired) {
     121        Invoke((MethodInvoker)delegate() {
     122          if(Opacity > 0.9) {
     123            Opacity = 0.9;
     124          } else if(this.Opacity > 0) {
     125            Opacity -= 0.1;
     126          } else {
     127            Opacity = 0;
     128            fadeTimer.Stop();
     129            Close();
     130          }
     131        });
    124132      } else {
    125         Opacity = 0;
    126         fadeTimer.Stop();
    127         Close();
     133        if(Opacity > 0.9) {
     134          Opacity = 0.9;
     135        } else if(this.Opacity > 0) {
     136          Opacity -= 0.1;
     137        } else {
     138          Opacity = 0;
     139          fadeTimer.Stop();
     140          Close();
     141        }
    128142      }
    129143    }
Note: See TracChangeset for help on using the changeset viewer.