黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/Common/Controls/DeviceControls/DeviceObjectControl.cs
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter
namespace Shared.Phone
{
    /// <summary>
    /// 做成一个显示设备类型+设备MAC备注的RowLayout
@@ -76,18 +76,18 @@
        /// </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);
@@ -99,7 +99,7 @@
            frameTable.AddBottomLine();
            //设置在线状态的特效
            this.IsOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]);
            this.IsOnline = HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(listDevice[0]);
        }
        #endregion
@@ -134,16 +134,16 @@
            }
            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]);
        }