public static void InitInstrConnect(RichTextBox richTextBox_消息提醒) { InstrBase[] InstrBases = new InstrBase[6] { _SignalGenratorBase, _PowerMeterBase, _WaveFormGeneratorBase, _SpectrumAnalyzerBase, _PowerSupply_PPT, _PowerSupply_PSW }; if (richTextBox_消息提醒 != null) { if (richTextBox_消息提醒.InvokeRequired) { richTextBox_消息提醒.Invoke(new EventHandler(delegate { richTextBox_消息提醒.AppendText("控制模块状态反馈:" + _ControlModule.CheckListen().ToString()); })); } else { richTextBox_消息提醒.AppendText("控制模块状态反馈:" + _ControlModule.CheckListen().ToString()); } } Common多线程连接仪表 _ConnectInstr = new Common多线程连接仪表(InstrBases, richTextBox_消息提醒); _ConnectInstr.Start(); }
/// <summary> /// </summary> /// <param name="instr"></param> public void AddInstruction(InstrBase instr) { if (instr == null) { throw new InternalErrorException("<null> instruction"); } if (instructions == null) { this.instructions = new ArrayList(); } instructions.Add(instr); }
/// <summary> /// </summary> /// <param name="instr"></param> public void AddInstruction (InstrBase instr) { if (instr == null) { throw new InternalErrorException ("<null> instruction"); } if (instructions == null) { this.instructions = new ArrayList (); } instructions.Add (instr); }