public void SetDevice(ZZ_Device d) { devic = d; if (devic.IP.Length > 0) { yaziji = new YazijiController(devic.IP); } this.lb_deviceName.Text = devic.Name; }
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); } }