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