- Timestamp:
- 01/03/12 02:10:15 (13 years ago)
- 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 345 345 346 346 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 { 348 350 T selectedItem = treeView.SelectedNode.Tag as T; 349 351 T parentItem = GetParentItem(selectedItem); … … 353 355 contextMenuStrip.Items.Add(new DelegateMenuItem<T>(action.Name, action.Image, new Action<T, T>(action.Execute), selectedItem, parentItem)); 354 356 } 357 e.Cancel = contextMenuStrip.Items.Count == 0; 355 358 } 356 359 } -
trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/TreeView/ItemTreeView.designer.cs
r6976 r7257 26 26 private void InitializeComponent() { 27 27 this.components = new System.ComponentModel.Container(); 28 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ItemTreeView<T>));29 28 this.splitContainer = new System.Windows.Forms.SplitContainer(); 30 29 this.showDetailsCheckBox = new System.Windows.Forms.CheckBox(); … … 33 32 this.treeView = new System.Windows.Forms.TreeView(); 34 33 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();37 34 this.imageList = new System.Windows.Forms.ImageList(this.components); 38 35 this.detailsGroupBox = new System.Windows.Forms.GroupBox(); … … 123 120 // contextMenuStrip 124 121 // 125 this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {126 this.asfasdfToolStripMenuItem,127 this.gfgffToolStripMenuItem});128 122 this.contextMenuStrip.Name = "contextMenuStrip"; 129 123 this.contextMenuStrip.Size = new System.Drawing.Size(153, 70); 130 124 this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening); 131 //132 // asfasdfToolStripMenuItem133 //134 this.asfasdfToolStripMenuItem.Name = "asfasdfToolStripMenuItem";135 this.asfasdfToolStripMenuItem.Size = new System.Drawing.Size(152, 22);136 this.asfasdfToolStripMenuItem.Text = "asfasdf";137 //138 // gfgffToolStripMenuItem139 //140 this.gfgffToolStripMenuItem.Name = "gfgffToolStripMenuItem";141 this.gfgffToolStripMenuItem.Size = new System.Drawing.Size(152, 22);142 this.gfgffToolStripMenuItem.Text = "gfgff";143 125 // 144 126 // imageList … … 197 179 private System.Windows.Forms.GroupBox detailsGroupBox; 198 180 private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 199 private System.Windows.Forms.ToolStripMenuItem asfasdfToolStripMenuItem;200 private System.Windows.Forms.ToolStripMenuItem gfgffToolStripMenuItem;201 181 protected System.Windows.Forms.CheckBox showDetailsCheckBox; 202 182 protected System.Windows.Forms.Button removeButton;
Note: See TracChangeset
for help on using the changeset viewer.