public override void Execute() { var argsStruct = new TerminateArgs() { KillApps = true }; var argsDict = Tools.ParseKeyValList(args); string valStr; if (Tools.TryGetValueIgnoreKeyCase(argsDict, "killApps", out valStr)) { if (valStr == "1") { argsStruct.KillApps = true; } } if (Tools.TryGetValueIgnoreKeyCase(argsDict, "machineId", out valStr)) { argsStruct.MachineId = valStr; } ctrl.Terminate(_requestorId, argsStruct); WriteResponse("ACK"); }
private void terminateAndKillAppsToolStripMenuItem_Click(object sender, EventArgs e) { if (MessageBox.Show("Terminate Dirigent on all computers?\n\nThis will also kill all apps!", "Dirigent", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { var args = new TerminateArgs() { KillApps = true }; _ctrl.Send(new Net.TerminateMessage(_ctrl.Name, args)); } }
private void terminateAndLeaveAppsRunningToolStripMenuItem_Click(object sender, EventArgs e) { if (MessageBox.Show("Terminate Dirigent on all computers?\n\nThis will leave the already started apps running and you will need to kill them yourselves!)", "Dirigent", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { var args = new TerminateArgs() { KillApps = false }; _ctrl.Send(new Net.TerminateMessage(_ctrl.Name, args)); } }
public TerminateMessage(string requestorId, TerminateArgs args) { this.Sender = requestorId; this.Args = args; }