File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs |
| | |
| | | using System.Text; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | namespace Shared.Phone |
| | | { |
| | | /// <summary> |
| | | /// 做成一个显示设备回路+房间的RowLayout |
| | |
| | | /// </summary> |
| | | public CommonDevice device |
| | | { |
| | | get { return Common.LocalDevice.Current.GetDevice(mainKey); } |
| | | get { return HdlDeviceCommonLogic.Current.GetDevice(mainKey); } |
| | | } |
| | | /// <summary> |
| | | /// 在线状态 |
| | |
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(【列表控件的rowSpace/2】即可,不懂默认为0即可)</param> |
| | | public DeviceRoomControl(CommonDevice i_device, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) |
| | | { |
| | | this.mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(i_device); |
| | | this.mainKey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(i_device); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(真实值,有些界面需要这种特殊操作)</param> |
| | | public DeviceRoomControl(string deviceMac, int deviceEpoint, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) |
| | | { |
| | | this.mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(deviceMac, deviceEpoint); |
| | | this.mainKey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(deviceMac, deviceEpoint); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var tempDevice = device; |
| | | //图标 |
| | | btnIcon = frameTable.AddLeftIcon(); |
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, tempDevice); |
| | | HdlDeviceCommonLogic.Current.SetDeviceIconToControl(btnIcon, tempDevice); |
| | | |
| | | //设备 |
| | | btnDevie = frameTable.AddLeftCaption("", 600, 60); |
| | |
| | | frameTable.AddChidren(btnDevie, ChidrenBindMode.BindEvent); |
| | | if (tempDevice != null) |
| | | { |
| | | btnDevie.Text = Common.LocalDevice.Current.GetDeviceEpointName(tempDevice); |
| | | btnDevie.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(tempDevice); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | return; |
| | | } |
| | | btnDevie.Text = Common.LocalDevice.Current.GetDeviceEpointName(tempDevice); |
| | | btnDevie.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(tempDevice); |
| | | btnRoom.Text = HdlRoomLogic.Current.GetRoomNameByDevice(tempDevice); |
| | | |
| | | string unSelectPath = string.Empty; |
| | | string selectPath = string.Empty; |
| | | Common.LocalDevice.Current.GetDeviceIcon(tempDevice, ref unSelectPath, ref selectPath); |
| | | HdlDeviceCommonLogic.Current.GetDeviceIcon(tempDevice, ref unSelectPath, ref selectPath); |
| | | |
| | | btnIcon.UnSelectedImagePath = unSelectPath; |
| | | } |