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