黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/Common/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
@@ -3,7 +3,7 @@
using System.Text;
using ZigBee.Device;
namespace Shared.Phone.UserCenter
namespace Shared.Phone
{
    /// <summary>
    /// 设备功能类型的自定义行控件
@@ -127,7 +127,7 @@
                HdlThreadLogic.Current.RunThread(() =>
                {
                    //设置功能类型到网关
                    var result = Common.LocalDevice.Current.SendDeviceFunctionTypeToGateway(this.device, (DeviceFunctionType)nowSelectNo);
                    var result = HdlDeviceCommonLogic.Current.SendDeviceFunctionTypeToGateway(this.device, (DeviceFunctionType)nowSelectNo);
                    
                    HdlThreadLogic.Current.RunMain(() =>
                    {
@@ -194,28 +194,28 @@
                || this.device.Type == DeviceType.DimmableLight)
            {
                //灯光类固定为 灯光
                var infoContent = Common.LocalDevice.Current.GetDeviceModelIdNameInfo("A418");
                var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("A418");
                strType = infoContent != null ? infoContent.A官方名字 : string.Empty;
                nowSelectNo = 2;
            }
            else if (this.device.Type == DeviceType.WindowCoveringDevice)
            {
                //窗帘固定为 遮阳
                var infoContent = Common.LocalDevice.Current.GetDeviceModelIdNameInfo("A400");
                var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("A400");
                strType = infoContent != null ? infoContent.A官方名字 : string.Empty;
                nowSelectNo = -1;
            }
            else if (this.device.Type == DeviceType.Thermostat)
            {
                //空调固定为 空调
                var infoContent = Common.LocalDevice.Current.GetDeviceModelIdNameInfo("A406");
                var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("A406");
                strType = infoContent != null ? infoContent.A官方名字 : string.Empty;
                nowSelectNo = -1;
            }
            else if (this.device.Type == DeviceType.DoorLock)
            {
                //门锁固定为 门锁
                var infoContent = Common.LocalDevice.Current.GetDeviceModelIdNameInfo("A405");
                var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("A405");
                strType = infoContent != null ? infoContent.A官方名字 : string.Empty;
                nowSelectNo = -1;
            }
@@ -229,18 +229,6 @@
            {
                //PM2.5传感器固定为 空气质量
                strType = Language.StringByID(R.MyInternationalizationString.AirQuality);
                nowSelectNo = -1;
            }
            else if (this.device.Type == DeviceType.Airer)
            {
                //晾衣架
                strType = Language.StringByID(R.MyInternationalizationString.AirerFun);
                nowSelectNo = -1;
            }
            else if (this.device.Type == DeviceType.PMSensor)
            {
                //空气质量传感器 环境
                strType = Language.StringByID(R.MyInternationalizationString.Envoronment);
                nowSelectNo = -1;
            }
@@ -268,7 +256,6 @@
                || this.device.Type == DeviceType.Thermostat//空调
                || this.device.Type == DeviceType.FreshAir//新风
                || this.device.Type == DeviceType.PMSensor //PM2.5
                || this.device.Type == DeviceType.Airer//晾衣架
                || this.device.Type == DeviceType.ColorTemperatureLight //色温灯
                || this.device.Type == DeviceType.WindowCoveringDevice)//窗帘
            {
@@ -360,7 +347,7 @@
            HdlThreadLogic.Current.RunThread(() =>
            {
                //读取设备功能类型
                var info = Common.LocalDevice.Current.ReadDeviceEpointDeviceInfo(this.device);
                var info = HdlDeviceCommonLogic.Current.ReadDeviceEpointDeviceInfo(this.device);
                if (info != null && ((int)this.device.DfunctionType) != info.FunctionType)
                {
                    this.device.DfunctionType = (DeviceFunctionType)info.FunctionType;