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); } }
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); } }