File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs |
| | |
| | | using System.Text; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | namespace Shared.Phone |
| | | { |
| | | /// <summary> |
| | | /// 设备信息界面的设备图标控件(兼容网关) |
| | |
| | | this.AddChidren(btnIcon2, ChidrenBindMode.BindEvent); |
| | | |
| | | //设备图标 |
| | | var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); |
| | | var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac); |
| | | if (listDevice.Count == 0) |
| | | { |
| | | //对应单纯只有200回路的设备 |
| | | listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac)); |
| | | listDevice.Add(HdlDeviceCommonLogic.Current.GetOTADevice(deviceMac)); |
| | | } |
| | | btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false); |
| | | btnIcon.Gravity = Gravity.Center; |
| | | Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | HdlDeviceCommonLogic.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | this.AddChidren(btnIcon, ChidrenBindMode.BindEvent); |
| | | } |
| | | |
| | |
| | | //设备图标 |
| | | btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false); |
| | | btnIcon.Gravity = Gravity.Center; |
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, Common.LocalDevice.Current.GetDevice(deviceMacAddr, epoint)); |
| | | HdlDeviceCommonLogic.Current.SetDeviceIconToControl(btnIcon, HdlDeviceCommonLogic.Current.GetDevice(deviceMacAddr, epoint)); |
| | | this.AddChidren(btnIcon, ChidrenBindMode.BindEvent); |
| | | } |
| | | |
| | |
| | | if (this.deviceEpoint != -1) |
| | | { |
| | | //刷新图标 |
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, Common.LocalDevice.Current.GetDevice(this.deviceMac, this.deviceEpoint)); |
| | | HdlDeviceCommonLogic.Current.SetDeviceIconToControl(btnIcon, HdlDeviceCommonLogic.Current.GetDevice(this.deviceMac, this.deviceEpoint)); |
| | | } |
| | | else if (this.deviceMac != null) |
| | | { |
| | | //刷新图标 |
| | | var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); |
| | | var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac); |
| | | if (listDevice.Count == 0) |
| | | { |
| | | //对应单纯只有200回路的设备 |
| | | listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac)); |
| | | listDevice.Add(HdlDeviceCommonLogic.Current.GetOTADevice(deviceMac)); |
| | | } |
| | | Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | HdlDeviceCommonLogic.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | } |
| | | else |
| | | { |