private void Update_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to Update all clients?", "Send Software Update", MessageBoxButtons.YesNoCancel) == DialogResult.Yes) { NetControl.SendCommand("UPDATE", ""); } }
private void Main_Load(object sender, EventArgs e) { if (!ShowConfig) { this.WindowState = FormWindowState.Minimized; } //if (!Properties.Settings.Default.Master) //{ // NetControl.Start(); //} netID.Text = Properties.Settings.Default.NetworkID; gammaValueA.Text = Properties.Settings.Default.GammaA.ToString(); gammaValueB.Text = Properties.Settings.Default.GammaB.ToString(); WatchDog.Checked = Properties.Settings.Default.WatchDogTimer; SetMasterState(Properties.Settings.Default.Master); MasterCheckbox.Checked = Properties.Settings.Default.Master; if (!Properties.Settings.Default.Master) { NetControl.Start(); } string yourVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); this.Text += " " + yourVersion; }
private void shutdownAll_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to shutdown all clients?", "Shutdown all", MessageBoxButtons.YesNoCancel) == DialogResult.Yes) { NetControl.SendCommand("SHUTDOWN", ""); } }
private void RestartAll_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to restart all clients?", "Restart all", MessageBoxButtons.YesNoCancel) == DialogResult.Yes) { NetControl.SendCommand("RESTART", ""); } }
private void wakeAll_Click(object sender, EventArgs e) { string[] wakeList = Properties.Settings.Default.WolList.Split(new char[] { ',' }); foreach (string node in wakeList) { NetControl.WakeFunction(node); } }
void SetMasterState(bool newMasterState) { if (Properties.Settings.Default.Master != newMasterState) { if (Properties.Settings.Default.Master) { Properties.Settings.Default.Master = newMasterState; NetControl.Start(); } else { Properties.Settings.Default.Master = newMasterState; NetControl.Abort(); } } ShowMasterState(newMasterState); }
private void gammaB_Click(object sender, EventArgs e) { NetControl.SendCommand("GAMMA", Properties.Settings.Default.GammaB.ToString()); // SetGamma(Properties.Settings.Default.GammaB); }
private void Portrait270_Click(object sender, EventArgs e) { NetControl.SendCommand("ROTATE", "3"); }
private void UpsideDown180_Click(object sender, EventArgs e) { NetControl.SendCommand("ROTATE", "2"); }
private void Landscape0_Click(object sender, EventArgs e) { NetControl.SendCommand("ROTATE", "0"); }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { NetControl.Abort(); Properties.Settings.Default.Save(); }
private void runCommand_Click(object sender, EventArgs e) { NetControl.SendCommand("COMMAND", commandText.Text); }
private void killAll_Click(object sender, EventArgs e) { NetControl.SendCommand("KILL", ""); }
private void launchAll_Click(object sender, EventArgs e) { NetControl.SendCommand("LAUNCH", ""); }