File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs |
| | |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | namespace Shared.Phone |
| | | { |
| | | /// <summary> |
| | | /// 做成一个显示设备类型+设备MAC备注的RowLayout |
| | |
| | | /// </summary> |
| | | public void InitControl() |
| | | { |
| | | var listDevice = Common.LocalDevice.Current.GetDevicesByMac(this.deviceMac); |
| | | var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(this.deviceMac); |
| | | if (listDevice.Count == 0) |
| | | { |
| | | //针对单纯只有一个200端点的设备 |
| | | listDevice.Add(Common.LocalDevice.Current.GetOTADevice(this.deviceMac)); |
| | | listDevice.Add(HdlDeviceCommonLogic.Current.GetOTADevice(this.deviceMac)); |
| | | } |
| | | //图标 |
| | | btnIcon = frameTable.AddLeftIcon(81); |
| | | Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | HdlDeviceCommonLogic.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | |
| | | //设备 |
| | | string deviceName = Common.LocalDevice.Current.GetDeviceMacName(listDevice[0]); |
| | | string deviceName = HdlDeviceCommonLogic.Current.GetDeviceMacName(listDevice[0]); |
| | | btnDeviceName = frameTable.AddTopView(deviceName, 800); |
| | | frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent); |
| | | |
| | |
| | | frameTable.AddBottomLine(); |
| | | |
| | | //设置在线状态的特效 |
| | | this.IsOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]); |
| | | this.IsOnline = HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(listDevice[0]); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | } |
| | | hadRefresh = true; |
| | | |
| | | var listDevice = Common.LocalDevice.Current.GetDevicesByMac(this.deviceMac); |
| | | var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(this.deviceMac); |
| | | if (listDevice.Count == 0) |
| | | { |
| | | //针对单纯只有一个200端点的设备 |
| | | listDevice.Add(Common.LocalDevice.Current.GetOTADevice(this.deviceMac)); |
| | | listDevice.Add(HdlDeviceCommonLogic.Current.GetOTADevice(this.deviceMac)); |
| | | } |
| | | //图标 |
| | | Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | HdlDeviceCommonLogic.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); |
| | | //设备 |
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceMacName(listDevice[0]); |
| | | btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceMacName(listDevice[0]); |
| | | //设备房间 |
| | | btnDeviceRoom.Text = HdlRoomLogic.Current.GeteRealDeviceRoomName(listDevice[0]); |
| | | } |