예제 #1
0
 internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut, bool checkOnInit)
 {
     FuncItem funcItem = new FuncItem();
     funcItem._cmdID = index;
     funcItem._itemName = commandName;
     if (functionPointer != null)
         funcItem._pFunc = new NppFuncItemDelegate(functionPointer);
     if (shortcut._key != 0)
         funcItem._pShKey = shortcut;
     funcItem._init2Check = checkOnInit;
     _funcItems.Add(funcItem);
 }
예제 #2
0
 internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut)
 {
     SetCommand(index, commandName, functionPointer, shortcut, false);
 }
예제 #3
0
 static void SetCommand(int index, string name, Action<AlignFunctions> action, ShortcutKey shortcut = new ShortcutKey())
 {
     PluginBase.SetCommand(index, name, () => action.Invoke(new AlignFunctions { Document = new Document(), Handle = PluginBase.nppData._nppHandle }), shortcut);
 }