- Timestamp:
- 11/12/09 18:41:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring/HeuristicLab/SplashScreen.cs
r2481 r2489 47 47 infoLabel.Text = initialText; 48 48 this.manager = manager; 49 manager.Action += new PluginManagerActionEventHandler(Manager_Action);49 manager.Action += managerActionEventHandler; 50 50 Assembly assembly = this.GetType().Assembly; 51 51 object[] attributes = assembly.GetCustomAttributes(false); … … 88 88 } 89 89 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 //} 106 106 SetInfoText(info); 107 107 Application.DoEvents(); … … 143 143 closing = true; 144 144 if (fadeTimer != null) fadeTimer.Stop(); 145 manager.Action -= new PluginManagerActionEventHandler(this.Manager_Action); // remove event before calling close145 manager.Action -= managerActionEventHandler; // remove event before calling close 146 146 Application.DoEvents(); // work up all existing events 147 147 Close(); // close
Note: See TracChangeset
for help on using the changeset viewer.