Exemple #1
0
 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", "");
     }
 }
Exemple #2
0
        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;
        }
Exemple #3
0
 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", "");
     }
 }
Exemple #4
0
 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", "");
     }
 }
Exemple #5
0
 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);
     }
 }
Exemple #6
0
        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);
        }
Exemple #7
0
 private void gammaB_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("GAMMA", Properties.Settings.Default.GammaB.ToString());
     // SetGamma(Properties.Settings.Default.GammaB);
 }
Exemple #8
0
 private void Portrait270_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("ROTATE", "3");
 }
Exemple #9
0
 private void UpsideDown180_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("ROTATE", "2");
 }
Exemple #10
0
 private void Landscape0_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("ROTATE", "0");
 }
Exemple #11
0
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     NetControl.Abort();
     Properties.Settings.Default.Save();
 }
Exemple #12
0
 private void runCommand_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("COMMAND", commandText.Text);
 }
Exemple #13
0
 private void killAll_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("KILL", "");
 }
Exemple #14
0
 private void launchAll_Click(object sender, EventArgs e)
 {
     NetControl.SendCommand("LAUNCH", "");
 }