Ejemplo n.º 1
0
        internal static void SetCommand(int index, string commandName, Action functionPointer, ShortcutKey shortcut, bool checkOnInit)
        {
            FuncItem funcItem = new FuncItem();

            funcItem._cmdID    = index;
            funcItem._itemName = commandName;
            if (functionPointer != null)
            {
                funcItem._pFunc = new Action(functionPointer);
            }
            if (shortcut._key != 0)
            {
                funcItem._pShKey = shortcut;
            }
            funcItem._init2Check = checkOnInit;
            FuncItems.Add(funcItem);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// SetFuncs2
        /// </summary>
        /// <param name="funcID"></param>
        private void SetFuncs2(int funcID)
        {
            List <EntitySysModule> data = null;

            if (FuncItems.ContainsKey(funcID.ToString()))
            {
                data = FuncItems[funcID.ToString()];
            }
            else
            {
                using (ProxyLogin proxy = new ProxyLogin())
                {
                    data = proxy.Service.GetAccount(GlobalLogin.objLogin.EmpNo, funcID, 1);
                    FuncItems.Add(funcID.ToString(), data);
                }
            }
        }
Ejemplo n.º 3
0
        private void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer,
                                ShortcutKey shortcut = new ShortcutKey(), bool checkOnInit = false)
        {
            FuncItem funcItem = new FuncItem();

            funcItem._cmdID    = index;
            funcItem._itemName = commandName;
            if (functionPointer != null)
            {
                funcItem._pFunc = functionPointer;
            }
            if (shortcut._key != 0)
            {
                funcItem._pShKey = shortcut;
            }
            funcItem._init2Check = checkOnInit;
            _funcItems.Add(funcItem);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// GetFormFuncButton
        /// </summary>
        /// <param name="className"></param>
        /// <returns></returns>
        internal List <EntitySysModule> GetFuncButton(string className)
        {
            List <EntitySysModule> data = null;

            if (FuncItems.ContainsKey(className))
            {
                data = FuncItems[className];
            }
            else
            {
                using (ProxyLogin proxy = new ProxyLogin())
                {
                    data = proxy.Service.GetFormFuncButton(GlobalLogin.objLogin.EmpNo, className);
                    FuncItems.Add(className, data);
                }
            }
            return(data);
        }
        public static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut, bool checkOnInit)
        {
            FuncItem funcItem = new FuncItem
            {
                _cmdID    = index,
                _itemName = commandName
            };

            if (functionPointer != null)
            {
                funcItem._pFunc = new NppFuncItemDelegate(functionPointer);
            }
            if (shortcut._key != 0)
            {
                funcItem._pShKey = shortcut;
            }
            funcItem._init2Check = checkOnInit;
            _funcItems.Add(funcItem);
        }