private void RunCommand(int commandIndex) { objectsCommand oc = RemoteCommands.FirstOrDefault(p => p.id == commandIndex); if (oc != null) { RunCommand(oc.command); } }
private void ShowRemoteCommands() { var ma = new RemoteCommands { Owner = this }; ma.ShowDialog(this); ma.Dispose(); LoadCommands(); }
public void RunCommand(int commandIndex) { objectsCommand oc = RemoteCommands.FirstOrDefault(p => p.id == commandIndex); if (oc != null) { if (!string.IsNullOrEmpty(oc.command)) { RunCommand(oc.command); } if (!string.IsNullOrEmpty(oc.emitshortcut)) { var converter = new KeysConverter(); var keys = converter.ConvertFromString(oc.emitshortcut); if (keys != null) { var shortcutKeys = (Keys)keys; MainForm_KeyDown(this, new KeyEventArgs(shortcutKeys)); } } } }
private void ShowRemoteCommands() { var ma = new RemoteCommands { Owner = this }; ma.ShowDialog(this); ma.Dispose(); LoadCommands(); }