Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/04/10 13:13:16 (14 years ago)
Author:
gkronber
Message:

Implemented rudimentary form to display a list of all plugins and details. #699 (Refactor ManagerForm)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManager.cs

    r2690 r2753  
    4141    internal event EventHandler<PluginInfrastructureEventArgs> PluginInstalled;
    4242
     43
     44    public IEnumerable<PluginDescription> Plugins {
     45      get { return pluginManager.Plugins; }
     46    }
     47
    4348    private string pluginDir;
    4449    private string updateLocationUrl;
     
    6671      builder.Append("Version: ").AppendLine(desc.Version.ToString());
    6772      builder.AppendLine("Description:").AppendLine(desc.Description);
    68       builder.Append("Build date: ").AppendLine(desc.BuildDate.ToString());
     73      builder.AppendLine("This plugin is " + desc.PluginState.ToString().ToLowerInvariant() + ".");
     74      builder.Append("Build date: ").AppendLine(desc.BuildDate.ToString()).AppendLine();
    6975      builder.AppendLine("Files: ");
    70       foreach (string fileName in from file in desc.Files select file.Name) {
    71         builder.AppendLine(fileName);
    72       }
    73       builder.AppendLine("Directly depends on:");
     76      foreach (var file in desc.Files) {
     77        builder.AppendLine(file.Type + " " + file.Name);
     78      }
     79      builder.AppendLine().AppendLine("Directly depends on:");
    7480      if (desc.Dependencies.Count() == 0) builder.AppendLine("None");
    7581      foreach (var dependency in desc.Dependencies) {
    76         builder.AppendLine(dependency.Name);
    77       }
    78       builder.AppendFormat("Plugins directly dependent on {0}:\n", desc.Name);
     82        builder.AppendLine(dependency.Name + " " + dependency.Version);
     83      }
     84      builder.AppendLine().AppendFormat("Plugins directly dependent on {0}:\n", desc.Name);
    7985      var dependents = from x in pluginManager.Plugins
    8086                       where x.Dependencies.Contains(desc)
    81                        select x.Name;
     87                       select x;
    8288      if (dependents.Count() == 0) builder.AppendLine("None");
    8389      foreach (var dependent in dependents) {
    84         builder.AppendLine(dependent);
    85       }
    86       builder.AppendLine("This plugin is " + desc.PluginState.ToString().ToLowerInvariant() + ".");
     90        builder.AppendLine(dependent.Name + " " + dependent.Version);
     91      }
     92      builder.AppendLine();
    8793      if (desc.PluginState == PluginState.Disabled) {
    8894        builder.AppendLine(DetermineProblem(desc));
     
    95101      // either any file is missing
    96102      StringBuilder builder = new StringBuilder();
     103      builder.AppendLine("Problem report:");
    97104      var missingFiles = from x in desc.Files
    98105                         where !File.Exists(x.Name)
Note: See TracChangeset for help on using the changeset viewer.