private ShellContextMenuHelper(IWin32Window owner, string[] fileNames, ContextMenuOptions options, EventHandler<ExecuteVerbEventArgs> onExecuteVerb)
 {
     this.ItemContainer = new Container();
     this.OnExecuteVerb = null;
     this.Owner = owner;
     ParseFileNames(fileNames, out this.ParentName, out this.FileNames);
     this.Options = ((((options & ContextMenuOptions.Explore) > 0) ? (CMF.CMF_NORMAL | CMF.CMF_EXPLORE) : CMF.CMF_NORMAL) | (((options & ContextMenuOptions.CanRename) > 0) ? CMF.CMF_CANRENAME : CMF.CMF_NORMAL)) | (((options & ContextMenuOptions.VerbsOnly) > 0) ? (CMF.CMF_NORMAL | CMF.CMF_VERBSONLY) : CMF.CMF_NORMAL);
     this.OnExecuteVerb = onExecuteVerb;
 }
 private ShellContextMenuHelper(IWin32Window owner, IContextMenu contextMenu, ContextMenuOptions options, EventHandler<ExecuteVerbEventArgs> onExecuteVerb)
 {
     this.ItemContainer = new Container();
     this.OnExecuteVerb = null;
     this.Owner = owner;
     this.ContextMenu = contextMenu;
     this.Options = ((((options & ContextMenuOptions.Explore) > 0) ? (CMF.CMF_NORMAL | CMF.CMF_EXPLORE) : CMF.CMF_NORMAL) | (((options & ContextMenuOptions.CanRename) > 0) ? CMF.CMF_CANRENAME : CMF.CMF_NORMAL)) | (((options & ContextMenuOptions.VerbsOnly) > 0) ? (CMF.CMF_NORMAL | CMF.CMF_VERBSONLY) : CMF.CMF_NORMAL);
     this.OnExecuteVerb = onExecuteVerb;
 }
 public PreviewContextMenuEventArgs(IVirtualItem item, ContextMenuStrip contextMenu, ContextMenuOptions options) : base(item)
 {
     this.ContextMenu = contextMenu;
     this.Options = options;
 }
 public static ContextMenuStrip CreateContextMenu(IWin32Window owner, string[] fileNames, ContextMenuOptions options, EventHandler<ExecuteVerbEventArgs> onExecuteVerb)
 {
     ShellContextMenuHelper helper = new ShellContextMenuHelper(owner, fileNames, options, onExecuteVerb);
     ContextMenuStrip component = new ContextMenuStrip {
         Tag = helper
     };
     component.Items.Add(string.Empty);
     component.Closed += new ToolStripDropDownClosedEventHandler(helper.ContextMenuStrip_Closed);
     component.Opening += new CancelEventHandler(helper.ContextMenuStrip_Opening);
     component.ItemClicked += new ToolStripItemClickedEventHandler(helper.ToolStrip_ItemClick);
     component.Disposed += new EventHandler(helper.ContextMenuStrip_Disposed);
     helper.ItemContainer.Add(component);
     return component;
 }
        private string Write149_ContextMenuOptions(ContextMenuOptions v)
        {
            switch (v)
            {
                case ContextMenuOptions.Explore:
                    return "Explore";

                case ContextMenuOptions.CanRename:
                    return "CanRename";

                case ContextMenuOptions.VerbsOnly:
                    return "VerbsOnly";
            }
            return XmlSerializationWriter.FromEnum((long) v, new string[] { "Explore", "CanRename", "VerbsOnly" }, new long[] { 1L, 2L, 4L }, "Nomad.FileSystem.Virtual.ContextMenuOptions");
        }