Extends the MenuItem class with a Shell32.FolderItemVerb.
Inheritance: System.Windows.Forms.MenuItem
Beispiel #1
0
        public override void QueryContextMenuItems(TreeViewFolderBrowserHelper helper, TreeNodePath node)
        {
            if (!EnableContextMenu)
            {
                return;
            }
            //
            FolderItem fi = node.Tag as FolderItem;

            if (fi == null)
            {
                return;
            }
            //
            foreach (FolderItemVerb verb in fi.Verbs())
            {
                if (verb.Name.Length == 0)
                {
                    continue;
                }
                //
                MenuItemShellVerb item = new MenuItemShellVerb(verb);
                helper.TreeView.ContextMenu.MenuItems.Add(item);
            }
        }
 public override void QueryContextMenuItems(TreeViewFolderBrowserHelper helper, TreeNodePath node)
 {
     if (!EnableContextMenu) return;
       //
       FolderItem fi = node.Tag as FolderItem;
       if (fi == null) return;
       //
       foreach (FolderItemVerb verb in fi.Verbs())
       {
     if (verb.Name.Length == 0) continue;
     //
     MenuItemShellVerb item = new MenuItemShellVerb(verb);
     helper.TreeView.ContextMenu.MenuItems.Add(item);
       }
 }