Exemple #1
0
 private void TimerCycle_Tick(object sender, EventArgs e)
 {
     if (userSerial.IsOpen && this.Enabled)
     {
         if (userSerial.sendCommand(cycleFuntion))
         {
             setTestConloseText(cycleFuntion, TestStatus.Start);
         }
     }
     else
     {
         timerCycle.Stop();
     }
 }
Exemple #2
0
 private void FormHome_ResetClick(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "Want to reset device?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         userSerial.sendWakeup();
         Thread.Sleep(50);
         userSerial.sendCommand((byte)FuntionCode.DeviceReset);
         DeviceConnectStatus = DeviceConnectEnum.Diconnect;
     }
 }
        private void btnsaveFlash_Click(object sender, EventArgs e)
        {
            userSerial.sendCommand((byte)FuntionCode.FlashSaved);
            formProcess = new FormProcess("Save setting to flash!");
            DialogResult res = formProcess.ShowDialog();

            if (res == DialogResult.No)
            {
                configItemSerialID.setMessage("Save setting Timeout!", ConfigMessageIconEnum.Error);
            }
        }