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"; } } }
protected LongTermTest(Iport port, string mode, int times, bool logFileEnable) { mPort = port; mMode = mode; mTimes = times; mLogFileEnable = logFileEnable; }
public SetCurrentPartTest(Iport port, double initVal, int duration, int interval = 1000, bool logFile = false) : base("SetCurrentPartTest", port, duration, interval, logFile) { mInitVal = initVal; }
public MultiCurrentTest(Iport port, double[] testPoints, int duration, int interval = 1000, bool logFile = false) : base("MultiCurrentTest", port, duration, interval, logFile) { mTestPoints = testPoints; }
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; }
public SendFile(Iport port, string file, int times, string mode, bool logFile = false) : base(port, mode, times, logFile) { mFile = file; }