Пример #1
0
        private void BTN_ComCtrl_Click(object sender, EventArgs e)
        {
            if (port == null)
            {
                if (!CB_ElecModuleEnable.Checked)
                {
                    port = Comm.GetComm(CMB_ComList.SelectedItem.ToString(), 115200);
                }
                else
                {
                    string part = RB_PartA.Checked ? "A" : "B";
                    port = new JzhPower(Comm.GetComm(CMB_ComList.SelectedItem.ToString(), 38400), part);
                }
                port.Open();

                BTN_ComCtrl.Text = "Close";
            }
            else
            {
                if (port.IsOpen())
                {
                    port.Close();
                    BTN_ComCtrl.Text = "Open";
                }
                else
                {
                    port.Open();
                    BTN_ComCtrl.Text = "Close";
                }
            }
        }
Пример #2
0
 protected LongTermTest(Iport port, string mode, int times, bool logFileEnable)
 {
     mPort          = port;
     mMode          = mode;
     mTimes         = times;
     mLogFileEnable = logFileEnable;
 }
Пример #3
0
 public SetCurrentPartTest(Iport port, double initVal, int duration, int interval = 1000, bool logFile = false)
     : base("SetCurrentPartTest", port, duration, interval, logFile)
 {
     mInitVal = initVal;
 }
Пример #4
0
 public MultiCurrentTest(Iport port, double[] testPoints, int duration, int interval = 1000, bool logFile = false)
     : base("MultiCurrentTest", port, duration, interval, logFile)
 {
     mTestPoints = testPoints;
 }
Пример #5
0
 public JzhTest(string testname, Iport port, int duration, int interval = 1000, bool logFile = false)
     : base(port, "Minute", duration, logFile)
 {
     mTestName = testname;
     mJzh      = port as JzhPower;
 }
Пример #6
0
 public SendFile(Iport port, string file, int times, string mode, bool logFile = false)
     : base(port, mode, times, logFile)
 {
     mFile = file;
 }