Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/12/09 18:41:44 (15 years ago)
Author:
gkronber
Message:

Worked on plugin infrastructure events and the display in the SplashScreen. #799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab/SplashScreen.cs

    r2481 r2489  
    4747      infoLabel.Text = initialText;
    4848      this.manager = manager;
    49       manager.Action += new PluginManagerActionEventHandler(Manager_Action);
     49      manager.Action += managerActionEventHandler;
    5050      Assembly assembly = this.GetType().Assembly;
    5151      object[] attributes = assembly.GetCustomAttributes(false);
     
    8888    }
    8989
    90     public void Manager_Action(object sender, PluginManagerActionEventArgs e) {
    91       string info;
    92       if (e.Action == PluginManagerAction.Initializing) info = "Initializing ...";
    93       else if (e.Action == PluginManagerAction.PluginLoaded) info = "Loaded plugin " + e.Id + " ...";
    94       else if (e.Action == PluginManagerAction.Initialized) {
    95         info = "Initialization Completed";
    96         fadeTimer = new System.Timers.Timer();
    97         fadeTimer.SynchronizingObject = this;
    98         fadeTimer.Elapsed += new System.Timers.ElapsedEventHandler(fadeTimer_Elapsed);
    99         fadeTimer.Interval = initialInterval;
    100         fadeTimer.AutoReset = true;
    101         fadeTimer.Start();
    102       } else {
    103         if (e.Id != null) info = e.Action.ToString() + "   (" + e.Id + ")";
    104         else info = e.Action.ToString();
    105       }
     90    public void managerActionEventHandler(object sender, PluginInfrastructureEventArgs e) {
     91      string info = e.Action + ": " + e.EntityName;
     92      //if (e.Action == PluginManagerAction.Initializing) info = "Initializing ...";
     93      //else if (e.Action == PluginManagerAction.PluginLoaded) info = "Loaded plugin " + e.Id + " ...";
     94      //else if (e.Action == PluginManagerAction.Initialized) {
     95      //  info = "Initialization Completed";
     96      //  fadeTimer = new System.Timers.Timer();
     97      //  fadeTimer.SynchronizingObject = this;
     98      //  fadeTimer.Elapsed += new System.Timers.ElapsedEventHandler(fadeTimer_Elapsed);
     99      //  fadeTimer.Interval = initialInterval;
     100      //  fadeTimer.AutoReset = true;
     101      //  fadeTimer.Start();
     102      //} else {
     103      //  if (e.Id != null) info = e.Action.ToString() + "   (" + e.Id + ")";
     104      //  else info = e.Action.ToString();
     105      //}
    106106      SetInfoText(info);
    107107      Application.DoEvents();
     
    143143          closing = true;
    144144          if (fadeTimer != null) fadeTimer.Stop();
    145           manager.Action -= new PluginManagerActionEventHandler(this.Manager_Action); // remove event before calling close
     145          manager.Action -= managerActionEventHandler; // remove event before calling close
    146146          Application.DoEvents(); // work up all existing events
    147147          Close(); // close
Note: See TracChangeset for help on using the changeset viewer.