Changeset 604
- Timestamp:
- 09/26/08 16:33:42 (16 years ago)
- Location:
- branches/3.1/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.cs
r140 r604 34 34 namespace HeuristicLab.PluginInfrastructure.GUI { 35 35 public partial class ManagerForm : Form { 36 private TreeNode installedPlugins;37 private TreeNode availablePlugins;38 private TreeNode disabledPlugins;39 36 private List<PluginTag> allTags = new List<PluginTag>(); 40 37 private Dictionary<PluginTag, PluginAction> actions = new Dictionary<PluginTag, PluginAction>(); … … 44 41 private string backupDir = Application.StartupPath + "/" + HeuristicLab.PluginInfrastructure.GUI.Properties.Settings.Default.BackupDir; 45 42 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"; 46 46 47 47 public ManagerForm() { … … 51 51 52 52 private void InitializePlugins() { 53 pluginTreeView.Nodes.Clear(); 53 listView.View = View.Details; 54 listView.FullRowSelect = true; 55 listView.Items.Clear(); 54 56 allTags.Clear(); 55 57 actions.Clear(); … … 66 68 deleteMenuItem.Checked = false; 67 69 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 82 70 foreach(PluginInfo pluginInfo in PluginManager.Manager.ActivePlugins) { 83 71 // create a new PluginAction tag for the plugin 84 72 PluginTag tag = new PluginTag(allTags, pluginInfo, PluginState.Installed); 85 73 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); 92 81 } 93 82 foreach(PluginInfo pluginInfo in PluginManager.Manager.DisabledPlugins) { 94 83 PluginTag tag = new PluginTag(allTags, pluginInfo, PluginState.Disabled); 95 84 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); 101 91 } 102 92 … … 111 101 PluginTag tag = new PluginTag(allTags, plugin, PluginState.Available); 112 102 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); 118 109 }); 119 110 upgrades.ForEach(delegate(PluginDescription upgrade) { … … 135 126 currentPlugin.PluginDescription = overridingPlugin; 136 127 }); 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; 138 130 RebuildActionHulls(); 139 pluginTreeView.Sort(); 131 132 listView.Sort(); 140 133 } 141 134 … … 146 139 147 140 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(); 153 151 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" + 170 179 " 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(); 177 181 } catch(Exception exception) { 178 182 infoTextBox.Text += "\nThere was an error!\n" + exception; … … 337 341 338 342 // 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 } 346 348 347 349 private void MarkInstall(PluginTag actionTag) { … … 421 423 newAction.Hull = hull; 422 424 newAction.Hull.Add(actionTag); 423 424 425 425 actions[actionTag] = newAction; 426 426 UpdateTreeNodes(newAction.Hull); … … 542 542 private void UpdateTreeNodes(List<PluginTag> hull) { 543 543 hull.ForEach(delegate(PluginTag tag) { 544 FindPlugin Nodes(tag).ForEach(delegate(TreeNode node) {544 FindPluginItems(tag).ForEach(delegate(ListViewItem item) { 545 545 ManagerAction action = GetAction(tag); 546 546 if(action != ManagerAction.None) { 547 node.Text = tag.PluginName + " - Action: " + action;547 item.Text = tag.PluginName + " - Action: " + action; 548 548 if(action == ManagerAction.Remove) { 549 node.ImageIndex = 3; 550 node.SelectedImageIndex = 3; 549 item.ImageIndex = 3; 551 550 } else if(action == ManagerAction.Install) { 552 node.ImageIndex = 2; 553 node.SelectedImageIndex = 2; 551 item.ImageIndex = 2; 554 552 } 555 553 } 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; 559 556 } else { 560 node.Text = tag.PluginName; 561 node.ImageIndex = 0; 562 node.SelectedImageIndex = 0; 557 item.Text = tag.PluginName; 558 item.ImageIndex = 0; 563 559 } 564 560 }); … … 604 600 } 605 601 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; 616 612 } 617 613 private void DisplayPluginInfo(string pluginInformation) { … … 889 885 890 886 private void removeButton_Clicked(object sender, EventArgs e) { 891 // get the tag of the selected treeNode892 PluginTag actionTag = (PluginTag) pluginTreeView.SelectedNode.Tag;887 // get the tag of the selected listViewItem 888 PluginTag actionTag = (PluginTag)listView.SelectedItems[0].Tag; 893 889 List<PluginAction> rootActions = GetActionsInvolving(actionTag); 894 890 if(rootActions.Count > 0) { … … 905 901 906 902 private void installButton_Clicked(object sender, EventArgs e) { 907 // get the tag of the selected treeNode908 PluginTag actionTag = (PluginTag) pluginTreeView.SelectedNode.Tag;903 // get the tag of the selected listViewItem 904 PluginTag actionTag = (PluginTag)listView.SelectedItems[0].Tag; 909 905 List<PluginAction> rootActions = GetActionsInvolving(actionTag); 910 906 … … 936 932 937 933 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 pane945 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 possible949 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 because957 // per default the treeview doesn't select nodes on right click958 if(e.Button == MouseButtons.Right) {959 pluginTreeView.SelectedNode = e.Node;960 }961 934 } 962 935 … … 1002 975 } 1003 976 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; 1007 981 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; 1009 985 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; 1010 1007 } 1011 1008 } -
branches/3.1/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.designer.cs
r140 r604 46 46 private void InitializeComponent() { 47 47 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); 48 51 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ManagerForm)); 49 52 this.menuStrip = new System.Windows.Forms.MenuStrip(); … … 60 63 this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 61 64 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(); 63 69 this.pluginIcons = new System.Windows.Forms.ImageList(this.components); 64 this.infoTextBox = new System.Windows.Forms.RichTextBox();65 70 this.toolStrip = new System.Windows.Forms.ToolStrip(); 66 71 this.updateButton = new System.Windows.Forms.ToolStripButton(); … … 115 120 // 116 121 this.managePluginSourcesToolStripMenuItem.Name = "managePluginSourcesToolStripMenuItem"; 117 this.managePluginSourcesToolStripMenuItem.Size = new System.Drawing.Size( 195, 22);122 this.managePluginSourcesToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 118 123 this.managePluginSourcesToolStripMenuItem.Text = "Edit plugin sources..."; 119 124 this.managePluginSourcesToolStripMenuItem.Click += new System.EventHandler(this.managePluginSourcesToolStripMenuItem_Click); … … 122 127 // 123 128 this.installPluginFromFileToolStripMenuItem.Name = "installPluginFromFileToolStripMenuItem"; 124 this.installPluginFromFileToolStripMenuItem.Size = new System.Drawing.Size( 195, 22);129 this.installPluginFromFileToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 125 130 this.installPluginFromFileToolStripMenuItem.Text = "Install plugin from file..."; 126 131 this.installPluginFromFileToolStripMenuItem.Click += new System.EventHandler(this.installPluginFromFileToolStripMenuItem_Click); … … 129 134 // 130 135 this.toolStripSeparator2.Name = "toolStripSeparator2"; 131 this.toolStripSeparator2.Size = new System.Drawing.Size( 192, 6);136 this.toolStripSeparator2.Size = new System.Drawing.Size(203, 6); 132 137 // 133 138 // installedPluginsToolStripMenuItem 134 139 // 135 140 this.installedPluginsToolStripMenuItem.Name = "installedPluginsToolStripMenuItem"; 136 this.installedPluginsToolStripMenuItem.Size = new System.Drawing.Size( 195, 22);141 this.installedPluginsToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 137 142 this.installedPluginsToolStripMenuItem.Text = "Update"; 138 143 this.installedPluginsToolStripMenuItem.Click += new System.EventHandler(this.updateButton_Click); … … 141 146 // 142 147 this.installNewPluginsToolStripMenuItem.Name = "installNewPluginsToolStripMenuItem"; 143 this.installNewPluginsToolStripMenuItem.Size = new System.Drawing.Size( 195, 22);148 this.installNewPluginsToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 144 149 this.installNewPluginsToolStripMenuItem.Text = "Delete/Upgrade/Install..."; 145 150 this.installNewPluginsToolStripMenuItem.Click += new System.EventHandler(this.upgradeButton_Click); … … 148 153 // 149 154 this.toolStripSeparator3.Name = "toolStripSeparator3"; 150 this.toolStripSeparator3.Size = new System.Drawing.Size( 192, 6);155 this.toolStripSeparator3.Size = new System.Drawing.Size(203, 6); 151 156 // 152 157 // refreshPluginListToolStripMenuItem 153 158 // 154 159 this.refreshPluginListToolStripMenuItem.Name = "refreshPluginListToolStripMenuItem"; 155 this.refreshPluginListToolStripMenuItem.Size = new System.Drawing.Size( 195, 22);160 this.refreshPluginListToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 156 161 this.refreshPluginListToolStripMenuItem.Text = "Refresh plugin list"; 157 162 this.refreshPluginListToolStripMenuItem.Click += new System.EventHandler(this.refreshPluginListToolStripMenuItem_Click); … … 160 165 // 161 166 this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; 162 this.exitToolStripMenuItem.Size = new System.Drawing.Size( 195, 22);167 this.exitToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 163 168 this.exitToolStripMenuItem.Text = "Close"; 164 169 this.exitToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); … … 175 180 // 176 181 this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; 177 this.aboutToolStripMenuItem.Size = new System.Drawing.Size(1 15, 22);182 this.aboutToolStripMenuItem.Size = new System.Drawing.Size(126, 22); 178 183 this.aboutToolStripMenuItem.Text = "About..."; 179 184 this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); … … 190 195 // splitContainer.Panel1 191 196 // 192 this.splitContainer.Panel1.Controls.Add(this. pluginTreeView);197 this.splitContainer.Panel1.Controls.Add(this.listView); 193 198 // 194 199 // splitContainer.Panel2 … … 199 204 this.splitContainer.TabIndex = 1; 200 205 // 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 = ""; 214 250 // 215 251 // pluginIcons … … 222 258 this.pluginIcons.Images.SetKeyName(3, "delete.bmp"); 223 259 this.pluginIcons.Images.SetKeyName(4, "genericInternet.bmp"); 224 //225 // infoTextBox226 //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 = "";233 260 // 234 261 // toolStrip … … 317 344 this.publishMenuItem}); 318 345 this.pluginContextMenuStrip.Name = "pluginContextMenuStrip"; 319 this.pluginContextMenuStrip.Size = new System.Drawing.Size(1 08, 70);346 this.pluginContextMenuStrip.Size = new System.Drawing.Size(119, 70); 320 347 // 321 348 // installMenuItem 322 349 // 323 350 this.installMenuItem.Name = "installMenuItem"; 324 this.installMenuItem.Size = new System.Drawing.Size(1 07, 22);351 this.installMenuItem.Size = new System.Drawing.Size(118, 22); 325 352 this.installMenuItem.Text = "Install"; 326 353 this.installMenuItem.Click += new System.EventHandler(this.installButton_Clicked); … … 329 356 // 330 357 this.deleteMenuItem.Name = "deleteMenuItem"; 331 this.deleteMenuItem.Size = new System.Drawing.Size(1 07, 22);358 this.deleteMenuItem.Size = new System.Drawing.Size(118, 22); 332 359 this.deleteMenuItem.Text = "Delete"; 333 360 this.deleteMenuItem.Click += new System.EventHandler(this.removeButton_Clicked); … … 336 363 // 337 364 this.publishMenuItem.Name = "publishMenuItem"; 338 this.publishMenuItem.Size = new System.Drawing.Size(1 07, 22);365 this.publishMenuItem.Size = new System.Drawing.Size(118, 22); 339 366 this.publishMenuItem.Text = "Publish"; 340 367 this.publishMenuItem.Click += new System.EventHandler(this.publishButton_Click); … … 394 421 private System.Windows.Forms.ToolStripMenuItem managePluginSourcesToolStripMenuItem; 395 422 private System.Windows.Forms.SplitContainer splitContainer; 396 private System.Windows.Forms.TreeView pluginTreeView;397 423 private System.Windows.Forms.RichTextBox infoTextBox; 398 424 private System.Windows.Forms.ToolStripMenuItem refreshPluginListToolStripMenuItem; … … 416 442 private System.Windows.Forms.StatusStrip statusStrip1; 417 443 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; 418 447 } 419 448 } -
branches/3.1/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.resx
r140 r604 120 120 <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 121 <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> 122 125 </metadata> 123 126 <metadata name="pluginIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> … … 287 290 </value> 288 291 </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>292 292 <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 293 293 <value>490, 17</value> -
branches/3.1/sources/HeuristicLab/MainForm.cs
r599 r604 57 57 58 58 private void RefreshApplicationsList() { 59 applicationsListView. Clear();59 applicationsListView.Items.Clear(); 60 60 61 61 pluginManagerListViewItem = new ListViewItem("Plugin Manager", 0);
Note: See TracChangeset
for help on using the changeset viewer.