Changeset 18


Ignore:
Timestamp:
02/20/08 15:16:22 (13 years ago)
Author:
gkronber
Message:

made install and delete actions available via keys 'i' and 'd' (ticket #21)

Location:
trunk/sources/HeuristicLab.PluginInfrastructure.GUI
Files:
3 edited

Legend:

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

    r15 r18  
    6161      installMenuItem.Enabled = false;
    6262      installMenuItem.Checked = false;
    63       removeButton.Enabled = false;
    64       removeButton.Checked = false;
    65       removeMenuItem.Enabled = false;
    66       removeMenuItem.Checked = false;
     63      deleteButton.Enabled = false;
     64      deleteButton.Checked = false;
     65      deleteMenuItem.Enabled = false;
     66      deleteMenuItem.Checked = false;
    6767
    6868      installedPlugins = new TreeNode("Installed plugins");
     
    567567      publishButton.Enabled = (tag.State & PluginState.Installed) == PluginState.Installed;
    568568      installButton.Enabled = (tag.State & PluginState.Available) == PluginState.Available;
    569       removeButton.Enabled = (tag.State & (PluginState.Installed | PluginState.Upgradeable)) != 0;
     569      deleteButton.Enabled = (tag.State & (PluginState.Installed | PluginState.Upgradeable)) != 0;
    570570
    571571      installButton.Checked = GetAction(tag) == ManagerAction.Install;
    572       removeButton.Checked = GetAction(tag) == ManagerAction.Remove;
     572      deleteButton.Checked = GetAction(tag) == ManagerAction.Remove;
    573573
    574574      publishMenuItem.Enabled = publishButton.Enabled;
    575575      installMenuItem.Enabled = installButton.Enabled;
    576       removeMenuItem.Enabled = removeButton.Enabled;
     576      deleteMenuItem.Enabled = deleteButton.Enabled;
    577577      installMenuItem.Checked = installButton.Checked;
    578       removeMenuItem.Checked = removeButton.Checked;
     578      deleteMenuItem.Checked = deleteButton.Checked;
    579579
    580580    }
     
    957957        publishButton.Enabled = false;
    958958        installButton.Enabled = false;
    959         removeButton.Enabled = false;
     959        deleteButton.Enabled = false;
    960960      }
    961961    }
     
    10101010    }
    10111011
     1012    private void pluginTreeView_KeyPress(object sender, KeyPressEventArgs e) {
     1013      e.Handled = true;
     1014      if(e.KeyChar == 'i' && installButton.Enabled) {
     1015        installButton_Clicked(sender, e);
     1016      } else if(e.KeyChar == 'd' && deleteButton.Enabled) {
     1017        removeButton_Clicked(sender, e);
     1018      }
     1019    }
    10121020  }
    10131021}
  • trunk/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.designer.cs

    r15 r18  
    6868      this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
    6969      this.installButton = new System.Windows.Forms.ToolStripButton();
    70       this.removeButton = new System.Windows.Forms.ToolStripButton();
     70      this.deleteButton = new System.Windows.Forms.ToolStripButton();
    7171      this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
    7272      this.publishButton = new System.Windows.Forms.ToolStripButton();
    7373      this.pluginContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
    7474      this.installMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    75       this.removeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     75      this.deleteMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    7676      this.publishMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    7777      this.menuStrip.SuspendLayout();
     
    138138      //
    139139      this.installNewPluginsToolStripMenuItem.Name = "installNewPluginsToolStripMenuItem";
    140       this.installNewPluginsToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
    141       this.installNewPluginsToolStripMenuItem.Text = "Remove/Upgrade/Install...";
     140      this.installNewPluginsToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
     141      this.installNewPluginsToolStripMenuItem.Text = "Delete/Upgrade/Install...";
    142142      this.installNewPluginsToolStripMenuItem.Click += new System.EventHandler(this.upgradeButton_Click);
    143143      //
     
    206206      this.pluginTreeView.Size = new System.Drawing.Size(828, 220);
    207207      this.pluginTreeView.TabIndex = 0;
     208      this.pluginTreeView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.pluginTreeView_KeyPress);
    208209      this.pluginTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.pluginTreeView_NodeMouseClick);
    209210      this.pluginTreeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.pluginTreeView_BeforeSelect);
     
    235236            this.toolStripSeparator,
    236237            this.installButton,
    237             this.removeButton,
     238            this.deleteButton,
    238239            this.toolStripSeparator1,
    239240            this.publishButton});
     
    251252      this.updateButton.Name = "updateButton";
    252253      this.updateButton.Size = new System.Drawing.Size(46, 22);
    253       this.updateButton.Text = "U&pdate";
     254      this.updateButton.Text = "Update";
    254255      this.updateButton.Click += new System.EventHandler(this.updateButton_Click);
    255256      //
     
    260261      this.upgradeButton.ImageTransparentColor = System.Drawing.Color.Magenta;
    261262      this.upgradeButton.Name = "upgradeButton";
    262       this.upgradeButton.Size = new System.Drawing.Size(140, 22);
    263       this.upgradeButton.Text = "Remove/&Upgrade/Install...";
     263      this.upgradeButton.Size = new System.Drawing.Size(132, 22);
     264      this.upgradeButton.Text = "Delete/Upgrade/Install...";
    264265      this.upgradeButton.Click += new System.EventHandler(this.upgradeButton_Click);
    265266      //
     
    280281      this.installButton.Click += new System.EventHandler(this.installButton_Clicked);
    281282      //
    282       // removeButton
    283       //
    284       this.removeButton.CheckOnClick = true;
    285       this.removeButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
    286       this.removeButton.Image = ((System.Drawing.Image)(resources.GetObject("removeButton.Image")));
    287       this.removeButton.ImageTransparentColor = System.Drawing.Color.Magenta;
    288       this.removeButton.Name = "removeButton";
    289       this.removeButton.Size = new System.Drawing.Size(50, 22);
    290       this.removeButton.Text = "&Remove";
    291       this.removeButton.Click += new System.EventHandler(this.removeButton_Clicked);
     283      // deleteButton
     284      //
     285      this.deleteButton.CheckOnClick = true;
     286      this.deleteButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     287      this.deleteButton.Image = ((System.Drawing.Image)(resources.GetObject("deleteButton.Image")));
     288      this.deleteButton.ImageTransparentColor = System.Drawing.Color.Magenta;
     289      this.deleteButton.Name = "deleteButton";
     290      this.deleteButton.Size = new System.Drawing.Size(42, 22);
     291      this.deleteButton.Text = "&Delete";
     292      this.deleteButton.Click += new System.EventHandler(this.removeButton_Clicked);
    292293      //
    293294      // toolStripSeparator1
     
    310311      this.pluginContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    311312            this.installMenuItem,
    312             this.removeMenuItem,
     313            this.deleteMenuItem,
    313314            this.publishMenuItem});
    314315      this.pluginContextMenuStrip.Name = "pluginContextMenuStrip";
    315       this.pluginContextMenuStrip.Size = new System.Drawing.Size(125, 70);
     316      this.pluginContextMenuStrip.Size = new System.Drawing.Size(119, 70);
    316317      //
    317318      // installMenuItem
    318319      //
    319320      this.installMenuItem.Name = "installMenuItem";
    320       this.installMenuItem.Size = new System.Drawing.Size(124, 22);
     321      this.installMenuItem.Size = new System.Drawing.Size(152, 22);
    321322      this.installMenuItem.Text = "Install";
    322323      this.installMenuItem.Click += new System.EventHandler(this.installButton_Clicked);
    323324      //
    324       // removeMenuItem
    325       //
    326       this.removeMenuItem.Name = "removeMenuItem";
    327       this.removeMenuItem.Size = new System.Drawing.Size(124, 22);
    328       this.removeMenuItem.Text = "Remove";
    329       this.removeMenuItem.Click += new System.EventHandler(this.removeButton_Clicked);
     325      // deleteMenuItem
     326      //
     327      this.deleteMenuItem.Name = "deleteMenuItem";
     328      this.deleteMenuItem.Size = new System.Drawing.Size(118, 22);
     329      this.deleteMenuItem.Text = "Delete";
     330      this.deleteMenuItem.Click += new System.EventHandler(this.removeButton_Clicked);
    330331      //
    331332      // publishMenuItem
    332333      //
    333334      this.publishMenuItem.Name = "publishMenuItem";
    334       this.publishMenuItem.Size = new System.Drawing.Size(124, 22);
     335      this.publishMenuItem.Size = new System.Drawing.Size(152, 22);
    335336      this.publishMenuItem.Text = "Publish";
    336337      this.publishMenuItem.Click += new System.EventHandler(this.publishButton_Click);
     
    379380    private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
    380381    private System.Windows.Forms.ToolStripButton installButton;
    381     private System.Windows.Forms.ToolStripButton removeButton;
     382    private System.Windows.Forms.ToolStripButton deleteButton;
    382383    private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
    383384    private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
     
    385386    private System.Windows.Forms.ContextMenuStrip pluginContextMenuStrip;
    386387    private System.Windows.Forms.ToolStripMenuItem installMenuItem;
    387     private System.Windows.Forms.ToolStripMenuItem removeMenuItem;
     388    private System.Windows.Forms.ToolStripMenuItem deleteMenuItem;
    388389    private System.Windows.Forms.ToolStripMenuItem publishMenuItem;
    389390    private System.Windows.Forms.ToolStripMenuItem installPluginFromFileToolStripMenuItem;
  • trunk/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.resx

    r2 r18  
    257257</value>
    258258  </data>
    259   <data name="removeButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     259  <data name="deleteButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    260260    <value>
    261261        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
Note: See TracChangeset for help on using the changeset viewer.