Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/09 20:27:43 (15 years ago)
Author:
gkronber
Message:

Implemented changes as requested by swagner. #799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerConsole.cs

    r2517 r2527  
    66using System.IO;
    77using System.ComponentModel;
     8using HeuristicLab.PluginInfrastructure.UpdateLocationReference;
    89
    910namespace HeuristicLab.PluginInfrastructure.Advanced {
    1011  public class InstallationManagerConsole {
    1112    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);
    1415      installManager.PreInstallPlugin += new EventHandler<PluginInfrastructureCancelEventArgs>(installManager_PreInstallPlugin);
    1516      installManager.PreRemovePlugin += new EventHandler<PluginInfrastructureCancelEventArgs>(installManager_PreRemovePlugin);
     
    2122
    2223    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;
    2432    }
    2533
    2634    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);
    2837    }
    2938
     
    4554
    4655    void installManager_PreInstallPlugin(object sender, PluginInfrastructureCancelEventArgs e) {
    47      
     56
    4857    }
    4958
    5059    void installManager_PluginInstalled(object sender, PluginInfrastructureEventArgs e) {
    51      
     60
    5261    }
    5362
Note: See TracChangeset for help on using the changeset viewer.