| | |
| | | /// <summary>
|
| | | /// 设备信息界面的设备图标控件(兼容网关)
|
| | | /// </summary>
|
| | | public class DeviceInfoIconControl : FrameLayoutControl
|
| | | public class DeviceInfoIconControl : FrameLayoutStatuControl
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | |
| | | public DeviceInfoIconControl()
|
| | | {
|
| | | //第一层底色
|
| | | this.Height = Application.GetMinRealAverage(207);
|
| | | this.Width = Application.GetMinRealAverage(207);
|
| | | this.Height = this.GetPictrueRealSize(207);
|
| | | this.Width = this.GetPictrueRealSize(207);
|
| | | this.BackgroundColor = UserCenterColor.Current.White;
|
| | | this.Radius = (uint)Application.GetMinRealAverage(207) / 2;
|
| | | this.Radius = (uint)this.GetPictrueRealSize(207) / 2;
|
| | | this.UseClickStatu = false;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | this.deviceMac = i_device.DeviceAddr;
|
| | | //防止出现误差
|
| | | int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
|
| | | int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
|
| | | //第二层底色
|
| | | var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false);
|
| | | btnIcon2.BackgroundColor = 0xfffef1ed;
|
| | |
| | | //对应单纯只有200回路的设备
|
| | | listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac));
|
| | | }
|
| | | btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false);
|
| | | btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false);
|
| | | btnIcon.Gravity = Gravity.Center;
|
| | | Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice);
|
| | | this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
|
| | |
| | | this.deviceMac = deviceMacAddr;
|
| | | this.deviceEpoint = epoint;
|
| | | //防止出现误差
|
| | | int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
|
| | | int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
|
| | | //第二层底色
|
| | | var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false);
|
| | | btnIcon2.BackgroundColor = 0xfffef1ed;
|
| | |
| | | this.AddChidren(btnIcon2, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | //设备图标
|
| | | btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false);
|
| | | 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));
|
| | | this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
|
| | |
| | | {
|
| | | this.zbGateway = i_gateway;
|
| | | //防止出现误差
|
| | | int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
|
| | | int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
|
| | | //第二层底色
|
| | | var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false);
|
| | | btnIcon2.BackgroundColor = 0xfffef1ed;
|
| | |
| | | this.AddChidren(btnIcon2, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | //设备图标
|
| | | btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false);
|
| | | btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false);
|
| | | btnIcon.Gravity = Gravity.Center;
|
| | | HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, i_gateway);
|
| | | this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
|