Changeset 2527 for branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerConsole.cs
- Timestamp:
- 11/23/09 20:27:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerConsole.cs
r2517 r2527 6 6 using System.IO; 7 7 using System.ComponentModel; 8 using HeuristicLab.PluginInfrastructure.UpdateLocationReference; 8 9 9 10 namespace HeuristicLab.PluginInfrastructure.Advanced { 10 11 public class InstallationManagerConsole { 11 12 private InstallationManager installManager; 12 public InstallationManagerConsole( ) {13 this.installManager = new InstallationManager( Path.GetFullPath(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.PluginDir));13 public InstallationManagerConsole(string pluginDir) { 14 this.installManager = new InstallationManager(pluginDir); 14 15 installManager.PreInstallPlugin += new EventHandler<PluginInfrastructureCancelEventArgs>(installManager_PreInstallPlugin); 15 16 installManager.PreRemovePlugin += new EventHandler<PluginInfrastructureCancelEventArgs>(installManager_PreRemovePlugin); … … 21 22 22 23 void installManager_PreUpdatePlugin(object sender, PluginInfrastructureCancelEventArgs e) { 23 throw new NotImplementedException(); 24 Console.WriteLine("Following plugins are updated:"); 25 var infos = (IEnumerable<PluginInformation>)e.Entity; 26 foreach (var info in infos) { 27 Console.WriteLine(info.Name + " " + info.Version + " " + info.BuildDate); 28 } 29 if (GetUserConfirmation()) e.Cancel = false; 30 else e.Cancel = true; 31 return; 24 32 } 25 33 26 34 void installManager_PluginUpdated(object sender, PluginInfrastructureEventArgs e) { 27 throw new NotImplementedException(); 35 foreach (var info in (IEnumerable<PluginInformation>)e.Entity) 36 Console.WriteLine("Updated: {0}", info.Name); 28 37 } 29 38 … … 45 54 46 55 void installManager_PreInstallPlugin(object sender, PluginInfrastructureCancelEventArgs e) { 47 56 48 57 } 49 58 50 59 void installManager_PluginInstalled(object sender, PluginInfrastructureEventArgs e) { 51 60 52 61 } 53 62
Note: See TracChangeset
for help on using the changeset viewer.