public VisaDeviceSetupForm(Address addr) { InitializeComponent(); if(addr!=null) { this.localaddr = addr; this.textBox1.Text = this.localaddr.SA; this.textBox2.Text = this.localaddr.SG; this.textBox3.Text = this.localaddr.SG2; this.textBox4.Text = this.localaddr.RFBOX; this.textBox5.Text = this.localaddr.RFBOX2; this.textBox6.Text = this.localaddr.IS1; this.textBox7.Text = this.localaddr.IS2; this.textBox9.Text = this.localaddr.DC5767A; for(int i=0; i!= Constant.VISADEVICE_LIST.Length; i++) this.comboBox_capture1.Items.Add(Constant.VISADEVICE_LIST[i]); if (this.localaddr.capture1 != string.Empty) this.comboBox_capture1.SelectedText = this.localaddr.capture1; else this.comboBox_capture1.SelectedIndex = 0; for (int i = 0; i != Constant.VISADEVICE_LIST.Length; i++) this.comboBox_capture2.Items.Add(Constant.VISADEVICE_LIST[i]); if (this.localaddr.capture2!=string.Empty) this.comboBox_capture2.SelectedText = this.localaddr.capture2; } }
public SerialPortSetupForm(Address addr) { InitializeComponent(); if (addr != null) { this.localaddr = addr; } }
public OtherDeviceForm(Address addr) { InitializeComponent(); if (addr != null) { this.textBox_Server_Port.Text = addr.Server_Port; this.textBox_du_ip.Text = addr.DU_IP; } }
public SetupForm(Address addr) { InitializeComponent(); if (addr != null) { this.localaddr = addr; this.textBox1.Text = this.localaddr.SA; this.textBox2.Text = this.localaddr.SG; this.textBox3.Text = this.localaddr.SG2; this.textBox4.Text = this.localaddr.RFBOX; this.textBox5.Text = this.localaddr.RFBOX2; this.textBox6.Text = this.localaddr.IS1; this.textBox7.Text = this.localaddr.IS2; this.textBox_du_ip.Text = this.localaddr.DU_IP; this.textBox9.Text = this.localaddr.DC5767A; this.textBox_Server_Port.Text = this.localaddr.Server_Port; } }
////init instrument private void initInstrumentStatusbyVisa32(Address addr, Address oldaddr, bool init = false) { if(addr.SA!=string.Empty) { this.tag_sa.Visible = true; if(addr.SA != oldaddr.SA || init) this.CheckSessionbyVisa32(addr.SA, this.tag_sa, ref this.sesnSA, ref this.viSA); } else { this.tag_sa.Visible = false; } if (addr.SG != string.Empty) { this.tag_sg1.Visible = true; if (addr.SG != oldaddr.SG || init) this.CheckSessionbyVisa32(addr.SG, this.tag_sg1, ref this.sesnSG, ref this.viSG); } else { this.tag_sg1.Visible = false; } if (addr.SG2 != string.Empty) { this.tag_sg2.Visible = true; if (addr.SG2 != oldaddr.SG2 || init) this.CheckSessionbyVisa32(addr.SG2, this.tag_sg2, ref this.sesnSG2, ref this.viSG2); } else { this.tag_sg2.Visible = false; } if (addr.RFBOX != string.Empty) { this.tag_rfbox1.Visible = true; if (addr.RFBOX != oldaddr.RFBOX || init) this.CheckSessionbyVisa32(addr.RFBOX, this.tag_rfbox1, ref this.sesnRFBOX, ref this.viRFBOX); } else { this.tag_rfbox1.Visible = false; } if (addr.RFBOX2 != string.Empty) { this.tag_rfbox2.Visible = true; if (addr.RFBOX2 != oldaddr.RFBOX2 || init) this.CheckSessionbyVisa32(addr.RFBOX2, this.tag_rfbox2, ref this.sesnRFBOX2, ref this.viRFBOX2); } else { this.tag_rfbox2.Visible = false; } if (addr.IS1 != string.Empty) { this.tag_is1.Visible = true; if (addr.IS1 != oldaddr.IS1 || init) this.CheckSessionbyVisa32(addr.IS1, this.tag_is1, ref this.sesnIS, ref this.viIS); } else { this.tag_is1.Visible = false; } if (addr.IS2 != string.Empty) { this.tag_is2.Visible = true; if (addr.IS2 != oldaddr.IS2 || init) this.CheckSessionbyVisa32(addr.IS2, this.tag_is2, ref this.sesnIS2, ref this.viIS2); } else { this.tag_is2.Visible = false; } if (addr.DC5767A != string.Empty) { this.tag_DC5767A.Visible = true; if (addr.DC5767A != oldaddr.DC5767A || init) this.CheckSessionbyVisa32(addr.DC5767A, this.tag_DC5767A, ref this.sesnDC5767A, ref this.viDC5767A); } else { this.tag_DC5767A.Visible = false; } //this.CheckSession(addr.RUMASTER, oldaddr.RUMASTER, this.tag_rumaster, this.rumaster_session, init); }
//init instrument private void initInstrumentStatus(Address addr,Address oldaddr,bool init=false) { if (addr.SA != string.Empty) { this.tag_sa.Visible = true; if (addr.SA != oldaddr.SA || init) this.CheckSession(addr.SA, this.tag_sa, this.sa_rm, ref this.sa_sesn); } else { this.tag_sa.Visible = false; } if (addr.SG != string.Empty) { this.tag_sg1.Visible = true; if (addr.SG != oldaddr.SG || init) this.CheckSession(addr.SG, this.tag_sg1, this.sg_rm, ref this.sg_sesn); } else { this.tag_sg1.Visible = false; } if (addr.SG2 != string.Empty) { this.tag_sg2.Visible = true; if (addr.SG2 != oldaddr.SG2 || init) this.CheckSession(addr.SG2, this.tag_sg2, this.sg2_rm, ref this.sg2_sesn); } else { this.tag_sg2.Visible = false; } if (addr.RFBOX != string.Empty) { this.tag_rfbox1.Visible = true; if (addr.RFBOX != oldaddr.RFBOX || init) this.CheckSession(addr.RFBOX, this.tag_rfbox1, this.rfbox_rm, ref this.rfbox_sesn); } else { this.tag_rfbox1.Visible = false; } if (addr.RFBOX2 != string.Empty) { this.tag_rfbox2.Visible = true; if (addr.RFBOX2 != oldaddr.RFBOX2 || init) this.CheckSession(addr.RFBOX2, this.tag_rfbox2, this.rfbox2_rm, ref this.rfbox2_sesn); } else { this.tag_rfbox2.Visible = false; } if (addr.IS1 != string.Empty) { this.tag_is1.Visible = true; if (addr.IS1 != oldaddr.IS1 || init) this.CheckSession(addr.IS1, this.tag_is1, this.is_rm, ref this.is_sesn); } else { this.tag_is1.Visible = false; } if (addr.IS2 != string.Empty) { this.tag_is2.Visible = true; if (addr.IS2 != oldaddr.IS2 || init) this.CheckSession(addr.IS2, this.tag_is2, this.is2_rm, ref this.is2_sesn); } else { this.tag_is2.Visible = false; } if (addr.DC5767A != string.Empty) { this.tag_DC5767A.Visible = true; if (addr.DC5767A != oldaddr.DC5767A || init) this.CheckSession(addr.DC5767A, this.tag_DC5767A, this.dc5767a_rm, ref this.dc5767a_sesn); } else { this.tag_DC5767A.Visible = false; } }