예제 #1
0
파일: UC_Device.cs 프로젝트: TGHGH/MES-CAR
 public void SetDevice(ZZ_Device d)
 {
     devic = d;
     if (devic.IP.Length > 0)
     {
         yaziji = new YazijiController(devic.IP);
     }
     this.lb_deviceName.Text = devic.Name;
 }
예제 #2
0
 void uc1_OnOpenOrCloseDevice(ZZ_Device device, bool isopen)
 {
     if (isopen)
     {
         byte[] data = HexToByte(device.OnCode);
         this.comp.Write(data, 0, data.Length);
     }
     else
     {
         byte[] data = HexToByte(device.OffCode);
         this.comp.Write(data, 0, data.Length);
     }
 }