示例#1
0
 /// <param name="item">Current item.</param>
 public MenuEventArgs(FarItem item)
 {
     _Item = item;
 }
示例#2
0
        static void AddItem(FarItem item, ModuleToolOptions from)
        {
            if (from == ModuleToolOptions.None)
                from = ModuleToolOptions.F11Menus;

            if (0 < (from & ModuleToolOptions.Dialog))
            {
                if (_toSeparate && !_menuDialogSeparated)
                {
                    _menuDialogSeparated = true;
                    _menuDialog.Items.Add(NewItem("Actions", null));
                }
                _menuDialog.Items.Add(item);
            }

            if (0 < (from & ModuleToolOptions.Editor))
            {
                if (_toSeparate && !_menuEditorSeparated)
                {
                    _menuEditorSeparated = true;
                    _menuEditor.Items.Add(NewItem("Actions", null));
                }
                _menuEditor.Items.Add(item);
            }

            if (0 < (from & ModuleToolOptions.Panels))
            {
                if (_toSeparate && !_menuPanelsSeparated)
                {
                    _menuPanelsSeparated = true;
                    _menuPanels.Items.Add(NewItem("Actions", null));
                }
                _menuPanels.Items.Add(item);
            }

            if (0 < (from & ModuleToolOptions.Viewer))
            {
                if (_toSeparate && !_menuViewerSeparated)
                {
                    _menuViewerSeparated = true;
                    _menuViewer.Items.Add(NewItem("Actions", null));
                }
                _menuViewer.Items.Add(item);
            }
        }
示例#3
0
文件: Menu.cs 项目: pezipink/FarNet
 /// <param name="item">Current item.</param>
 public MenuEventArgs(FarItem item)
 {
     _Item = item;
 }