示例#1
0
    override protected void Execute(int line, string lineText)
    {
        if (line >= filteredItems.Count)
        {
            return;
        }
        Item      item   = filteredItems[line];
        KeyAction action = item.action;

        if (textBox == null || textBox.Controller == null)
        {
            return;
        }
        DispatchNeedClose();
        Controller controller = textBox.Controller;

        if (action.doOnModeChange != null)
        {
            action.doOnModeChange(controller, true);
        }
        action.doOnDown(controller);
        if (action.doOnModeChange != null)
        {
            action.doOnModeChange(controller, false);
        }
    }
示例#2
0
        public void OnClick(object sender, EventArgs e)
        {
            Controller controller = mainForm.FocusedController;

            if (action.doOnModeChange != null)
            {
                action.doOnModeChange(controller, true);
            }
            action.doOnDown(controller);
            if (action.doOnModeChange != null)
            {
                action.doOnModeChange(controller, false);
            }
        }