Free cookie consent management tool by TermsFeed Policy Generator

Changeset 604


Ignore:
Timestamp:
09/26/08 16:33:42 (16 years ago)
Author:
gkronber
Message:

merged r600 - r602 into 3.1 branch

Location:
branches/3.1/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.cs

    r140 r604  
    3434namespace HeuristicLab.PluginInfrastructure.GUI {
    3535  public partial class ManagerForm : Form {
    36     private TreeNode installedPlugins;
    37     private TreeNode availablePlugins;
    38     private TreeNode disabledPlugins;
    3936    private List<PluginTag> allTags = new List<PluginTag>();
    4037    private Dictionary<PluginTag, PluginAction> actions = new Dictionary<PluginTag, PluginAction>();
     
    4441    private string backupDir = Application.StartupPath + "/" + HeuristicLab.PluginInfrastructure.GUI.Properties.Settings.Default.BackupDir;
    4542    private string tempDir = Application.StartupPath + "/" + HeuristicLab.PluginInfrastructure.GUI.Properties.Settings.Default.TempDir;
     43    private const string AVAILABLE_PLUGINS = "Available plugins";
     44    private const string DISABLED_PLUGINS = "Disabled plugins";
     45    private const string INSTALLED_PLUGINS = "Installed plugins";
    4646
    4747    public ManagerForm() {
     
    5151
    5252    private void InitializePlugins() {
    53       pluginTreeView.Nodes.Clear();
     53      listView.View = View.Details;
     54      listView.FullRowSelect = true;
     55      listView.Items.Clear();
    5456      allTags.Clear();
    5557      actions.Clear();
     
    6668      deleteMenuItem.Checked = false;
    6769
    68       installedPlugins = new TreeNode("Installed plugins");
    69       installedPlugins.ImageIndex = 1;
    70       installedPlugins.SelectedImageIndex = 1;
    71       availablePlugins = new TreeNode("Available plugins");
    72       availablePlugins.ImageIndex = 1;
    73       availablePlugins.SelectedImageIndex = 1;
    74       disabledPlugins = new TreeNode("Disabled plugins");
    75       disabledPlugins.ImageIndex = 1;
    76       disabledPlugins.SelectedImageIndex = 1;
    77 
    78       pluginTreeView.Nodes.Add(installedPlugins);
    79       pluginTreeView.Nodes.Add(availablePlugins);
    80       pluginTreeView.Nodes.Add(disabledPlugins);
    81 
    8270      foreach(PluginInfo pluginInfo in PluginManager.Manager.ActivePlugins) {
    8371        // create a new PluginAction tag for the plugin
    8472        PluginTag tag = new PluginTag(allTags, pluginInfo, PluginState.Installed);
    8573        allTags.Add(tag);
    86         // add to "installed plugins" node
    87         TreeNode installedPluginsNode = new TreeNode(pluginInfo.Name);
    88         installedPluginsNode.ContextMenuStrip = pluginContextMenuStrip;
    89         installedPluginsNode.Tag = tag;
    90         installedPluginsNode.ImageIndex = 0;
    91         installedPlugins.Nodes.Add(installedPluginsNode);
     74        // add to "installed plugins" item
     75        ListViewItem installedPluginsItem = new ListViewItem(pluginInfo.Name);
     76        installedPluginsItem.Tag = tag;
     77        installedPluginsItem.ImageIndex = 0;
     78        installedPluginsItem.Group = listView.Groups[INSTALLED_PLUGINS];
     79        installedPluginsItem.SubItems.Add(pluginInfo.Version.ToString());
     80        listView.Items.Add(installedPluginsItem);
    9281      }
    9382      foreach(PluginInfo pluginInfo in PluginManager.Manager.DisabledPlugins) {
    9483        PluginTag tag = new PluginTag(allTags, pluginInfo, PluginState.Disabled);
    9584        allTags.Add(tag);
    96         TreeNode disabledPluginsNode = new TreeNode(pluginInfo.Name);
    97         disabledPluginsNode.ContextMenuStrip = pluginContextMenuStrip;
    98         disabledPluginsNode.Tag = tag;
    99         disabledPluginsNode.ImageIndex = 0;
    100         disabledPlugins.Nodes.Add(disabledPluginsNode);
     85        ListViewItem disabledPluginsItem = new ListViewItem(pluginInfo.Name);
     86        disabledPluginsItem.Tag = tag;
     87        disabledPluginsItem.ImageIndex = 0;
     88        disabledPluginsItem.Group = listView.Groups[DISABLED_PLUGINS];
     89        disabledPluginsItem.SubItems.Add(pluginInfo.Version.ToString());
     90        listView.Items.Add(disabledPluginsItem);
    10191      }
    10292
     
    111101        PluginTag tag = new PluginTag(allTags, plugin, PluginState.Available);
    112102        allTags.Add(tag);
    113         TreeNode availableNode = new TreeNode(plugin.Name);
    114         availableNode.ContextMenuStrip = pluginContextMenuStrip;
    115         availableNode.Tag = tag;
    116         availableNode.ImageIndex = 0;
    117         availablePlugins.Nodes.Add(availableNode);
     103        ListViewItem availableItem = new ListViewItem(plugin.Name);
     104        availableItem.Tag = tag;
     105        availableItem.ImageIndex = 0;
     106        availableItem.Group = listView.Groups[AVAILABLE_PLUGINS];
     107        availableItem.SubItems.Add(plugin.Version.ToString());
     108        listView.Items.Add(availableItem);
    118109      });
    119110      upgrades.ForEach(delegate(PluginDescription upgrade) {
     
    135126        currentPlugin.PluginDescription = overridingPlugin;
    136127      });
    137       toolStripStatusLabel.Text = "Installed: " + installedPlugins.Nodes.Count + " Updates: " + upgrades.Count + " Available: " + availablePlugins.Nodes.Count;
     128      toolStripStatusLabel.Text = "Installed: " + listView.Groups[INSTALLED_PLUGINS].Items.Count +
     129        " Updates: " + upgrades.Count + " Available: " + listView.Groups[AVAILABLE_PLUGINS].Items.Count;
    138130      RebuildActionHulls();
    139       pluginTreeView.Sort();
     131
     132      listView.Sort();
    140133    }
    141134
     
    146139
    147140    private void publishButton_Click(object sender, EventArgs args) {
    148       PluginInfo plugin = ((PluginTag)pluginTreeView.SelectedNode.Tag).Plugin;
    149       publishPlugin(plugin);
    150     }
    151 
    152     private void publishPlugin(PluginInfo plugin) {
     141      if(listView.SelectedItems.Count == 0) return;
     142      List<PluginInfo> plugins = new List<PluginInfo>();
     143      foreach(ListViewItem item in listView.SelectedItems) {
     144        plugins.Add(((PluginTag)item.Tag).Plugin);
     145      }
     146      PublishPlugin(plugins);
     147    }
     148
     149    private void PublishPlugin(List<PluginInfo> plugins) {
     150      StringBuilder xmlEntries = new StringBuilder();
    153151      try {
    154         string packageFileName = plugin.Name + "-" + plugin.Version + ".zip";
    155         ZipFile zipFile = ZipFile.Create(packageFileName);
    156         zipFile.NameTransform = new PluginNameTransform();
    157         zipFile.BeginUpdate();
    158 
    159         infoTextBox.Text = "Publishing plugin:\nCreating " + packageFileName + "...\n";
    160         foreach(string filename in plugin.Files) {
    161           infoTextBox.Text += "Adding " + filename + "\n";
    162           zipFile.Add(filename);
    163         }
    164 
    165         zipFile.CommitUpdate();
    166         zipFile.Close();
    167         FileInfo fileInfo = new FileInfo(packageFileName);
    168         infoTextBox.Text += "\nCreated " + packageFileName + " (" + fileInfo.Length + " bytes)\n";
    169         infoTextBox.Text += "Upload this file to your plugin source and add the following entry to" +
     152        infoTextBox.Text = "Publishing plugin:\n";
     153        foreach(PluginInfo plugin in plugins) {
     154          string packageFileName = plugin.Name + "-" + plugin.Version + ".zip";
     155          ZipFile zipFile = ZipFile.Create(packageFileName);
     156          zipFile.NameTransform = new PluginNameTransform();
     157          zipFile.BeginUpdate();
     158
     159          infoTextBox.Text+="Creating " + packageFileName + "...\n";
     160          foreach(string filename in plugin.Files) {
     161            infoTextBox.Text += "Adding " + filename + "\n";
     162            zipFile.Add(filename);
     163          }
     164
     165          zipFile.CommitUpdate();
     166          zipFile.Close();
     167          FileInfo fileInfo = new FileInfo(packageFileName);
     168          infoTextBox.Text += "Created " + packageFileName + " (" + fileInfo.Length + " bytes)\n";
     169          xmlEntries.Append("  <Plugin Name=\"").Append(plugin.Name).Append("\" Version=\"").Append(plugin.Version)
     170            .Append("\" Build=\"").Append(plugin.BuildDate.ToUniversalTime().ToString(System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat))
     171            .Append("\">").AppendLine();
     172          foreach(PluginInfo dependency in plugin.Dependencies) {
     173            xmlEntries.Append("    <Dependency Name=\"").Append(dependency.Name).Append("\" />").AppendLine();
     174          }
     175          xmlEntries.Append("  </Plugin>").AppendLine();
     176        }
     177
     178        infoTextBox.Text += "Upload the zip files to your plugin source and add the following to" +
    170179" the file plugins.xml residing in the base directory of your plugin source.\n\n";
    171         infoTextBox.Text += "  <Plugin Name=\"" + plugin.Name + "\" Version=\""
    172           + plugin.Version + "\" Build=\"" + plugin.BuildDate.ToUniversalTime().ToString(System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat) + "\">\n";
    173         foreach(PluginInfo dependency in plugin.Dependencies) {
    174           infoTextBox.Text += "    <Dependency Name=\"" + dependency.Name + "\" />\n";
    175         }
    176         infoTextBox.Text += "  </Plugin>";
     180        infoTextBox.Text += xmlEntries.ToString();
    177181      } catch(Exception exception) {
    178182        infoTextBox.Text += "\nThere was an error!\n" + exception;
     
    337341
    338342      // update the GUI to represent new state of the selected plugin
    339       if(pluginTreeView.SelectedNode != null && pluginTreeView.SelectedNode.Tag is PluginTag) {
    340         UpdateActionButtons((PluginTag)pluginTreeView.SelectedNode.Tag);
    341         DisplayPluginInfo(((PluginTag)pluginTreeView.SelectedNode.Tag).GetPluginDetails());
    342       }
    343     }
    344 
    345 
     343      if(listView.SelectedItems.Count>0 && listView.SelectedItems[0].Tag is PluginTag) {
     344        UpdateActionButtons((PluginTag)listView.SelectedItems[0].Tag);
     345        DisplayPluginInfo(((PluginTag)listView.SelectedItems[0].Tag).GetPluginDetails());
     346      }
     347    }
    346348
    347349    private void MarkInstall(PluginTag actionTag) {
     
    421423      newAction.Hull = hull;
    422424      newAction.Hull.Add(actionTag);
    423 
    424 
    425425      actions[actionTag] = newAction;
    426426      UpdateTreeNodes(newAction.Hull);
     
    542542    private void UpdateTreeNodes(List<PluginTag> hull) {
    543543      hull.ForEach(delegate(PluginTag tag) {
    544         FindPluginNodes(tag).ForEach(delegate(TreeNode node) {
     544        FindPluginItems(tag).ForEach(delegate(ListViewItem item) {
    545545          ManagerAction action = GetAction(tag);
    546546          if(action != ManagerAction.None) {
    547             node.Text = tag.PluginName + " - Action: " + action;
     547            item.Text = tag.PluginName + " - Action: " + action;
    548548            if(action == ManagerAction.Remove) {
    549               node.ImageIndex = 3;
    550               node.SelectedImageIndex = 3;
     549              item.ImageIndex = 3;
    551550            } else if(action == ManagerAction.Install) {
    552               node.ImageIndex = 2;
    553               node.SelectedImageIndex = 2;
     551              item.ImageIndex = 2;
    554552            }
    555553          } else if(tag.State == PluginState.Upgradeable) {
    556             node.Text = tag.PluginName + " - Upgrade: " + tag.PluginVersion + " -> " + tag.UpgradePluginDescription.Version;
    557             node.ImageIndex = 2;
    558             node.SelectedImageIndex = 2;
     554            item.Text = tag.PluginName + " - Upgrade: " + tag.PluginVersion + " -> " + tag.UpgradePluginDescription.Version;
     555            item.ImageIndex = 2;
    559556          } else {
    560             node.Text = tag.PluginName;
    561             node.ImageIndex = 0;
    562             node.SelectedImageIndex = 0;
     557            item.Text = tag.PluginName;
     558            item.ImageIndex = 0;
    563559          }
    564560        });
     
    604600    }
    605601
    606     private List<TreeNode> FindPluginNodes(PluginTag pluginTag) {
    607       List<TreeNode> nodes = new List<TreeNode>();
    608       foreach(TreeNode rootNode in new TreeNode[] { installedPlugins, availablePlugins, disabledPlugins }) {
    609         foreach(TreeNode node in rootNode.Nodes) {
    610           if(pluginTag.Equals(node.Tag)) {
    611             nodes.Add(node);
    612           }
    613         }
    614       }
    615       return nodes;
     602    private List<ListViewItem> FindPluginItems(PluginTag pluginTag) {
     603      List<ListViewItem> items = new List<ListViewItem>();
     604      foreach(ListViewGroup group in listView.Groups) {
     605        foreach(ListViewItem item in group.Items) {
     606          if(pluginTag.Equals(item.Tag)) {
     607            items.Add(item);
     608          }
     609        }
     610      }
     611      return items;
    616612    }
    617613    private void DisplayPluginInfo(string pluginInformation) {
     
    889885
    890886    private void removeButton_Clicked(object sender, EventArgs e) {
    891       // get the tag of the selected treeNode
    892       PluginTag actionTag = (PluginTag)pluginTreeView.SelectedNode.Tag;
     887      // get the tag of the selected listViewItem
     888      PluginTag actionTag = (PluginTag)listView.SelectedItems[0].Tag;
    893889      List<PluginAction> rootActions = GetActionsInvolving(actionTag);
    894890      if(rootActions.Count > 0) {
     
    905901
    906902    private void installButton_Clicked(object sender, EventArgs e) {
    907       // get the tag of the selected treeNode
    908       PluginTag actionTag = (PluginTag)pluginTreeView.SelectedNode.Tag;
     903      // get the tag of the selected listViewItem
     904      PluginTag actionTag = (PluginTag)listView.SelectedItems[0].Tag;
    909905      List<PluginAction> rootActions = GetActionsInvolving(actionTag);
    910906
     
    936932
    937933      InitializePlugins();
    938     }
    939 
    940     private void pluginTreeView_BeforeSelect(object sender, TreeViewCancelEventArgs e) {
    941       if(e.Node.Tag != null) {
    942 
    943         UpdateActionButtons((PluginTag)e.Node.Tag);
    944         // display the plugin details in the lower pane
    945         DisplayPluginInfo(((PluginTag)e.Node.Tag).GetPluginDetails());
    946 
    947       } else {
    948         // when a node was selected that doesn't represent a plugin (root node) then install and remove are not possible
    949         publishButton.Enabled = false;
    950         installButton.Enabled = false;
    951         deleteButton.Enabled = false;
    952       }
    953     }
    954 
    955     private void pluginTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) {
    956       // dumb solution to automatically select the node on right clicks which opens the context menu because
    957       // per default the treeview doesn't select nodes on right click
    958       if(e.Button == MouseButtons.Right) {
    959         pluginTreeView.SelectedNode = e.Node;
    960       }
    961934    }
    962935
     
    1002975    }
    1003976
    1004     private void pluginTreeView_KeyPress(object sender, KeyPressEventArgs e) {
    1005       e.Handled = true;
    1006       if(e.KeyChar == 'i' && installButton.Enabled) {
     977    private void pluginTreeView_KeyDown(object sender, KeyEventArgs e) {
     978      if(e.KeyData == Keys.I && installButton.Enabled) {
     979        e.Handled = true;
     980        e.SuppressKeyPress = true;
    1007981        installButton_Clicked(sender, e);
    1008       } else if(e.KeyChar == 'd' && deleteButton.Enabled) {
     982      } else if((e.KeyData == Keys.D || e.KeyData == Keys.Delete) && deleteButton.Enabled) {
     983        e.Handled = true;
     984        e.SuppressKeyPress = true;
    1009985        removeButton_Clicked(sender, e);
     986      }
     987    }
     988
     989    private void listView_MouseDown(object sender, MouseEventArgs e) {
     990      // dumb solution to automatically select the node on right clicks which opens the context menu because
     991      // per default the treeview doesn't select nodes on right click
     992      if(e.Button == MouseButtons.Right) {
     993        listView.GetItemAt(e.X, e.Y).Selected = true;
     994      }
     995    }
     996
     997    private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) {
     998      if(e.Item.Tag != null && e.IsSelected) {
     999        UpdateActionButtons((PluginTag)e.Item.Tag);
     1000        // display the plugin details in the lower pane
     1001        DisplayPluginInfo(((PluginTag)e.Item.Tag).GetPluginDetails());
     1002      } else {
     1003        // when an item was 'unselected' or was selected but doesn't represent a plugin then install and remove are not possible
     1004        publishButton.Enabled = false;
     1005        installButton.Enabled = false;
     1006        deleteButton.Enabled = false;
    10101007      }
    10111008    }
  • branches/3.1/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.designer.cs

    r140 r604  
    4646    private void InitializeComponent() {
    4747      this.components = new System.ComponentModel.Container();
     48      System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Available plugins", System.Windows.Forms.HorizontalAlignment.Left);
     49      System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Disabled plugins", System.Windows.Forms.HorizontalAlignment.Left);
     50      System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup("Installed plugins", System.Windows.Forms.HorizontalAlignment.Left);
    4851      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ManagerForm));
    4952      this.menuStrip = new System.Windows.Forms.MenuStrip();
     
    6063      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    6164      this.splitContainer = new System.Windows.Forms.SplitContainer();
    62       this.pluginTreeView = new System.Windows.Forms.TreeView();
     65      this.listView = new System.Windows.Forms.ListView();
     66      this.nameHeader = new System.Windows.Forms.ColumnHeader();
     67      this.versionHeader = new System.Windows.Forms.ColumnHeader();
     68      this.infoTextBox = new System.Windows.Forms.RichTextBox();
    6369      this.pluginIcons = new System.Windows.Forms.ImageList(this.components);
    64       this.infoTextBox = new System.Windows.Forms.RichTextBox();
    6570      this.toolStrip = new System.Windows.Forms.ToolStrip();
    6671      this.updateButton = new System.Windows.Forms.ToolStripButton();
     
    115120      //
    116121      this.managePluginSourcesToolStripMenuItem.Name = "managePluginSourcesToolStripMenuItem";
    117       this.managePluginSourcesToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
     122      this.managePluginSourcesToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
    118123      this.managePluginSourcesToolStripMenuItem.Text = "Edit plugin sources...";
    119124      this.managePluginSourcesToolStripMenuItem.Click += new System.EventHandler(this.managePluginSourcesToolStripMenuItem_Click);
     
    122127      //
    123128      this.installPluginFromFileToolStripMenuItem.Name = "installPluginFromFileToolStripMenuItem";
    124       this.installPluginFromFileToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
     129      this.installPluginFromFileToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
    125130      this.installPluginFromFileToolStripMenuItem.Text = "Install plugin from file...";
    126131      this.installPluginFromFileToolStripMenuItem.Click += new System.EventHandler(this.installPluginFromFileToolStripMenuItem_Click);
     
    129134      //
    130135      this.toolStripSeparator2.Name = "toolStripSeparator2";
    131       this.toolStripSeparator2.Size = new System.Drawing.Size(192, 6);
     136      this.toolStripSeparator2.Size = new System.Drawing.Size(203, 6);
    132137      //
    133138      // installedPluginsToolStripMenuItem
    134139      //
    135140      this.installedPluginsToolStripMenuItem.Name = "installedPluginsToolStripMenuItem";
    136       this.installedPluginsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
     141      this.installedPluginsToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
    137142      this.installedPluginsToolStripMenuItem.Text = "Update";
    138143      this.installedPluginsToolStripMenuItem.Click += new System.EventHandler(this.updateButton_Click);
     
    141146      //
    142147      this.installNewPluginsToolStripMenuItem.Name = "installNewPluginsToolStripMenuItem";
    143       this.installNewPluginsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
     148      this.installNewPluginsToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
    144149      this.installNewPluginsToolStripMenuItem.Text = "Delete/Upgrade/Install...";
    145150      this.installNewPluginsToolStripMenuItem.Click += new System.EventHandler(this.upgradeButton_Click);
     
    148153      //
    149154      this.toolStripSeparator3.Name = "toolStripSeparator3";
    150       this.toolStripSeparator3.Size = new System.Drawing.Size(192, 6);
     155      this.toolStripSeparator3.Size = new System.Drawing.Size(203, 6);
    151156      //
    152157      // refreshPluginListToolStripMenuItem
    153158      //
    154159      this.refreshPluginListToolStripMenuItem.Name = "refreshPluginListToolStripMenuItem";
    155       this.refreshPluginListToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
     160      this.refreshPluginListToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
    156161      this.refreshPluginListToolStripMenuItem.Text = "Refresh plugin list";
    157162      this.refreshPluginListToolStripMenuItem.Click += new System.EventHandler(this.refreshPluginListToolStripMenuItem_Click);
     
    160165      //
    161166      this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
    162       this.exitToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
     167      this.exitToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
    163168      this.exitToolStripMenuItem.Text = "Close";
    164169      this.exitToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
     
    175180      //
    176181      this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
    177       this.aboutToolStripMenuItem.Size = new System.Drawing.Size(115, 22);
     182      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
    178183      this.aboutToolStripMenuItem.Text = "About...";
    179184      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
     
    190195      // splitContainer.Panel1
    191196      //
    192       this.splitContainer.Panel1.Controls.Add(this.pluginTreeView);
     197      this.splitContainer.Panel1.Controls.Add(this.listView);
    193198      //
    194199      // splitContainer.Panel2
     
    199204      this.splitContainer.TabIndex = 1;
    200205      //
    201       // pluginTreeView
    202       //
    203       this.pluginTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
    204       this.pluginTreeView.ImageIndex = 0;
    205       this.pluginTreeView.ImageList = this.pluginIcons;
    206       this.pluginTreeView.Location = new System.Drawing.Point(0, 0);
    207       this.pluginTreeView.Name = "pluginTreeView";
    208       this.pluginTreeView.SelectedImageIndex = 0;
    209       this.pluginTreeView.Size = new System.Drawing.Size(828, 220);
    210       this.pluginTreeView.TabIndex = 0;
    211       this.pluginTreeView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.pluginTreeView_KeyPress);
    212       this.pluginTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.pluginTreeView_NodeMouseClick);
    213       this.pluginTreeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.pluginTreeView_BeforeSelect);
     206      // listView
     207      //
     208      this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     209            this.nameHeader,
     210            this.versionHeader});
     211      this.listView.ContextMenuStrip = this.pluginContextMenuStrip;
     212      this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
     213      listViewGroup1.Header = "Available plugins";
     214      listViewGroup1.Name = "Available plugins";
     215      listViewGroup2.Header = "Disabled plugins";
     216      listViewGroup2.Name = "Disabled plugins";
     217      listViewGroup3.Header = "Installed plugins";
     218      listViewGroup3.Name = "Installed plugins";
     219      this.listView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
     220            listViewGroup1,
     221            listViewGroup2,
     222            listViewGroup3});
     223      this.listView.Location = new System.Drawing.Point(0, 0);
     224      this.listView.Name = "listView";
     225      this.listView.Size = new System.Drawing.Size(828, 220);
     226      this.listView.SmallImageList = this.pluginIcons;
     227      this.listView.TabIndex = 0;
     228      this.listView.UseCompatibleStateImageBehavior = false;
     229      this.listView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listView_MouseDown);
     230      this.listView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listView_ItemSelectionChanged);
     231      this.listView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pluginTreeView_KeyDown);
     232      //
     233      // nameHeader
     234      //
     235      this.nameHeader.Text = "Name";
     236      this.nameHeader.Width = 400;
     237      //
     238      // versionHeader
     239      //
     240      this.versionHeader.Text = "Version";
     241      //
     242      // infoTextBox
     243      //
     244      this.infoTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
     245      this.infoTextBox.Location = new System.Drawing.Point(0, 0);
     246      this.infoTextBox.Name = "infoTextBox";
     247      this.infoTextBox.Size = new System.Drawing.Size(828, 249);
     248      this.infoTextBox.TabIndex = 0;
     249      this.infoTextBox.Text = "";
    214250      //
    215251      // pluginIcons
     
    222258      this.pluginIcons.Images.SetKeyName(3, "delete.bmp");
    223259      this.pluginIcons.Images.SetKeyName(4, "genericInternet.bmp");
    224       //
    225       // infoTextBox
    226       //
    227       this.infoTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
    228       this.infoTextBox.Location = new System.Drawing.Point(0, 0);
    229       this.infoTextBox.Name = "infoTextBox";
    230       this.infoTextBox.Size = new System.Drawing.Size(828, 249);
    231       this.infoTextBox.TabIndex = 0;
    232       this.infoTextBox.Text = "";
    233260      //
    234261      // toolStrip
     
    317344            this.publishMenuItem});
    318345      this.pluginContextMenuStrip.Name = "pluginContextMenuStrip";
    319       this.pluginContextMenuStrip.Size = new System.Drawing.Size(108, 70);
     346      this.pluginContextMenuStrip.Size = new System.Drawing.Size(119, 70);
    320347      //
    321348      // installMenuItem
    322349      //
    323350      this.installMenuItem.Name = "installMenuItem";
    324       this.installMenuItem.Size = new System.Drawing.Size(107, 22);
     351      this.installMenuItem.Size = new System.Drawing.Size(118, 22);
    325352      this.installMenuItem.Text = "Install";
    326353      this.installMenuItem.Click += new System.EventHandler(this.installButton_Clicked);
     
    329356      //
    330357      this.deleteMenuItem.Name = "deleteMenuItem";
    331       this.deleteMenuItem.Size = new System.Drawing.Size(107, 22);
     358      this.deleteMenuItem.Size = new System.Drawing.Size(118, 22);
    332359      this.deleteMenuItem.Text = "Delete";
    333360      this.deleteMenuItem.Click += new System.EventHandler(this.removeButton_Clicked);
     
    336363      //
    337364      this.publishMenuItem.Name = "publishMenuItem";
    338       this.publishMenuItem.Size = new System.Drawing.Size(107, 22);
     365      this.publishMenuItem.Size = new System.Drawing.Size(118, 22);
    339366      this.publishMenuItem.Text = "Publish";
    340367      this.publishMenuItem.Click += new System.EventHandler(this.publishButton_Click);
     
    394421    private System.Windows.Forms.ToolStripMenuItem managePluginSourcesToolStripMenuItem;
    395422    private System.Windows.Forms.SplitContainer splitContainer;
    396     private System.Windows.Forms.TreeView pluginTreeView;
    397423    private System.Windows.Forms.RichTextBox infoTextBox;
    398424    private System.Windows.Forms.ToolStripMenuItem refreshPluginListToolStripMenuItem;
     
    416442    private System.Windows.Forms.StatusStrip statusStrip1;
    417443    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel;
     444    private System.Windows.Forms.ListView listView;
     445    private System.Windows.Forms.ColumnHeader nameHeader;
     446    private System.Windows.Forms.ColumnHeader versionHeader;
    418447  }
    419448}
  • branches/3.1/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.resx

    r140 r604  
    120120  <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    121121    <value>17, 17</value>
     122  </metadata>
     123  <metadata name="pluginContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     124    <value>212, 17</value>
    122125  </metadata>
    123126  <metadata name="pluginIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     
    287290</value>
    288291  </data>
    289   <metadata name="pluginContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    290     <value>212, 17</value>
    291   </metadata>
    292292  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    293293    <value>490, 17</value>
  • branches/3.1/sources/HeuristicLab/MainForm.cs

    r599 r604  
    5757
    5858    private void RefreshApplicationsList() {
    59       applicationsListView.Clear();
     59      applicationsListView.Items.Clear();
    6060
    6161      pluginManagerListViewItem = new ListViewItem("Plugin Manager", 0);
Note: See TracChangeset for help on using the changeset viewer.