Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/03/12 02:10:15 (13 years ago)
Author:
swagner
Message:

Removed unnecessary resource files (*.resx) and removed unnecessary context menu items in ItemTreeView (#1725)

Location:
trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/TreeView
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/TreeView/ItemTreeView.cs

    r7056 r7257  
    345345
    346346    protected virtual void contextMenuStrip_Opening(object sender, CancelEventArgs e) {
    347       if (treeView.SelectedNode != null) {
     347      if (treeView.SelectedNode == null) {
     348        e.Cancel = true;
     349      } else {
    348350        T selectedItem = treeView.SelectedNode.Tag as T;
    349351        T parentItem = GetParentItem(selectedItem);
     
    353355          contextMenuStrip.Items.Add(new DelegateMenuItem<T>(action.Name, action.Image, new Action<T, T>(action.Execute), selectedItem, parentItem));
    354356        }
     357        e.Cancel = contextMenuStrip.Items.Count == 0;
    355358      }
    356359    }
  • trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/TreeView/ItemTreeView.designer.cs

    r6976 r7257  
    2626    private void InitializeComponent() {
    2727      this.components = new System.ComponentModel.Container();
    28       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ItemTreeView<T>));
    2928      this.splitContainer = new System.Windows.Forms.SplitContainer();
    3029      this.showDetailsCheckBox = new System.Windows.Forms.CheckBox();
     
    3332      this.treeView = new System.Windows.Forms.TreeView();
    3433      this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
    35       this.asfasdfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    36       this.gfgffToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    3734      this.imageList = new System.Windows.Forms.ImageList(this.components);
    3835      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
     
    123120      // contextMenuStrip
    124121      //
    125       this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    126             this.asfasdfToolStripMenuItem,
    127             this.gfgffToolStripMenuItem});
    128122      this.contextMenuStrip.Name = "contextMenuStrip";
    129123      this.contextMenuStrip.Size = new System.Drawing.Size(153, 70);
    130124      this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening);
    131       //
    132       // asfasdfToolStripMenuItem
    133       //
    134       this.asfasdfToolStripMenuItem.Name = "asfasdfToolStripMenuItem";
    135       this.asfasdfToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
    136       this.asfasdfToolStripMenuItem.Text = "asfasdf";
    137       //
    138       // gfgffToolStripMenuItem
    139       //
    140       this.gfgffToolStripMenuItem.Name = "gfgffToolStripMenuItem";
    141       this.gfgffToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
    142       this.gfgffToolStripMenuItem.Text = "gfgff";
    143125      //
    144126      // imageList
     
    197179    private System.Windows.Forms.GroupBox detailsGroupBox;
    198180    private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
    199     private System.Windows.Forms.ToolStripMenuItem asfasdfToolStripMenuItem;
    200     private System.Windows.Forms.ToolStripMenuItem gfgffToolStripMenuItem;
    201181    protected System.Windows.Forms.CheckBox showDetailsCheckBox;
    202182    protected System.Windows.Forms.Button removeButton;
Note: See TracChangeset for help on using the changeset viewer.