public SCBController() { otcBtn.ARelBtn = otcBtn.BRelBtn = otcBtn.XRelBtn = otcBtn.XYZRelBtn = otcBtn.YRelBtn = otcBtn.ZRelBtn = false; wsdBtn.ZRelBtn = tblBtn.FloatRelBtn = false; UnregisterPCUService(); Thread.Sleep(500); RegisterPCUService(); pcu = getPCUObject(); pcu.Connect(); bus.Connect(); otcxyz = new OTCXYZControllerCLS(bus); wsd = new WSDControllerCLS(bus); tbl = new TBLControllerCLS(bus); col = new CollimatorCLS(bus); }
private void button1_Click(object sender, EventArgs e) { otcxyz = new OTCXYZControllerCLS(bus); wsd = new WSDControllerCLS(bus); tbl = new TBLControllerCLS(bus); col = new CollimatorCLS(bus); bus.StartBus(); otcxyz.PowerUp(); wsd.PowerUp(); tbl.PowerUp(); col.PowerUp(); this.textBox1.Text = otcxyz.X_POS.ToString(); this.textBox2.Text = otcxyz.Y_POS.ToString(); this.textBox3.Text = otcxyz.Z_POS.ToString(); otcxyz.PositionUpdateEvent += new PositonUpdateDelegate(RefreshData); this.button2.Enabled = true; this.button1.Enabled = false; this.button3.Enabled = true; this.button4.Enabled = true; this.button5.Enabled = true; this.button6.Enabled = true; this.button7.Enabled = true; this.button8.Enabled = true; this.button9.Enabled = true; this.button10.Enabled = true; this.button11.Enabled = true; this.button12.Enabled = true; this.button13.Enabled = true; this.button14.Enabled = true; this.button19.Enabled = true; this.button20.Enabled = true; this.checkBox1.Enabled = true; this.checkBox2.Enabled = true; this.checkBox3.Enabled = true; this.checkBox4.Enabled = true; this.checkBox5.Enabled = true; this.checkBox6.Enabled = true; }
public SCBWrapper() { otcBtn.ARelBtn = otcBtn.BRelBtn = otcBtn.XRelBtn = otcBtn.XYZRelBtn = otcBtn.YRelBtn = otcBtn.ZRelBtn = false; wsdBtn.ZRelBtn = tblBtn.FloatRelBtn = false; UnregisterPCUService(); Thread.Sleep(500); RegisterPCUService(); pcu = getPCUObject(); pcu.Connect(); bus.Connect(); otcxyz = new OTCXYZControllerCLS(bus); wsd = new WSDControllerCLS(bus); tbl = new TBLControllerCLS(bus); col = new CollimatorCLS(bus); }