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); }
internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut) { SetCommand(index, commandName, functionPointer, shortcut, false); }
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); }