陈嘉乐
2021-01-11 1026814d931de92f0da5f15a58870565a94100e0
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -1,6 +1,8 @@
using System;
using System;
using Shared;
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class TargetDeviceFunList : FrameLayout
@@ -43,13 +45,13 @@
            this.AddChidren(saveView.FLayoutView());
            #endregion
            #region  编辑设备状态
            switch (device.functionType)
            switch (device.spk)
            {
                //开关灯光 light.Switch
                case FunctionType.Dimmer:
                case FunctionType.RGB:
                case FunctionType.RGBW:
                case FunctionType.ColorTemperature:
                case SPK.LightDimming:
                case SPK.LightRGB:
                case SPK.LightRGBW:
                case SPK.LightCCT:
                    {
                        #region 界面
                        ///开关
@@ -82,7 +84,7 @@
                        #endregion
                    }
                    break;
                case FunctionType.Relay:
                case SPK.LightSwitch:
                    {
                        #region 界面
                        ///开关
@@ -105,9 +107,9 @@
                    }
                    break;
                //窗帘
                case FunctionType.Curtain:
                case FunctionType.MotorCurtain:
                case FunctionType.RollingShutter:
                case SPK.CurtainSwitch:
                case SPK.CurtainTrietex:
                case SPK.CurtainRoller:
                    {
                        #region 界面
                        ///开关
@@ -129,7 +131,7 @@
                        #endregion
                    }
                    break;
                case FunctionType.AC:
                case SPK.AcStandard:
                    {
                        #region 界面
                        ///开关
@@ -173,7 +175,7 @@
                                temperatureView.btnState.Text = stateStr;
                                //设备属性值,云雀上定义好的;
                                string keyVlaue = "set_temp";
                                selectedState = device.functionType + "_" + keyVlaue;
                                selectedState = device.spk + "_" + keyVlaue;
                                string set_temp_value = stateStr.Replace("℃", "");
                                //数据封装
                                AddDictionary(keyVlaue, set_temp_value);
@@ -188,7 +190,7 @@
                            string currText = acModehView.btnState.Text;
                            //设备属性值,云雀上定义好的;
                            string keyVlaue = "mode";
                            selectedState = device.functionType + "_" + keyVlaue;
                            selectedState = device.spk + "_" + keyVlaue;
                            PublicInterface modeView = new PublicInterface();
                            var modeListStr = modeView.GetViewList(keyVlaue);
                            modeView.SingleSelectionShow(this, modeListStr, Language.StringByID(StringId.modeLogic), currText
@@ -209,7 +211,7 @@
                            string currText = acSpeedView.btnState.Text;
                            //设备属性值,云雀上定义好的;
                            string keyVlaue = "fan";
                            selectedState = device.functionType + "_" + keyVlaue;
                            selectedState = device.spk + "_" + keyVlaue;
                            PublicInterface speedView = new PublicInterface();
                            var speedListStr = speedView.GetViewList(keyVlaue);
                            speedView.SingleSelectionShow(this, speedListStr, Language.StringByID(StringId.speedLogic), currText
@@ -231,7 +233,7 @@
                        #endregion
                    }
                    break;
                case FunctionType.FloorHeating:
                case SPK.FloorHeatStandard:
                    {
                        #region 界面
                        ///开关
@@ -271,7 +273,7 @@
                                temperatureView.btnState.Text = stateStr;
                                //设备属性值,云雀上定义好的;
                                string keyVlaue = "set_temp";
                                selectedState = device.functionType + "_" + keyVlaue;
                                selectedState = device.spk + "_" + keyVlaue;
                                string set_temp_value = stateStr.Replace("℃", "");
                                //数据封装
                                AddDictionary(keyVlaue, set_temp_value);
@@ -288,7 +290,7 @@
                            string currText = floorHeatingModehView.btnState.Text;
                            //设备属性值,云雀上定义好的;
                            string keyVlaue = "mode";
                            selectedState = device.functionType + "_" + keyVlaue;
                            selectedState = device.spk + "_" + keyVlaue;
                            PublicInterface modeView = new PublicInterface();
                            var modeListStr = modeView.GetViewList("floorheatingmode");
                            modeView.SingleSelectionShow(this, modeListStr, Language.StringByID(StringId.modeLogic), currText
@@ -321,12 +323,12 @@
                    Output outputDevice = new Output();
                    outputDevice.target_type = "1";
                    outputDevice.sid = device.sid;
                    switch (device.functionType)
                    switch (device.spk)
                    {
                        case FunctionType.Dimmer:
                        case FunctionType.RGB:
                        case FunctionType.RGBW:
                        case FunctionType.ColorTemperature:
                        case SPK.LightDimming:
                        case SPK.LightRGB:
                        case SPK.LightRGBW:
                        case SPK.LightCCT:
                            {
                                //调光做了一个特殊处理;
                                if (dicSateteList.Count > 1)
@@ -352,8 +354,8 @@
                                }
                                break;
                            }
                        case FunctionType.AC:
                        case FunctionType.FloorHeating:
                        case SPK.AcStandard:
                        case SPK.FloorHeatStandard:
                            {
                                //(空调/地热)做了一个特殊处理;
@@ -453,7 +455,7 @@
                }
                //界面显示选中值
                button.TextID = id;
                selectedState = device.functionType + "_" + strValue;
                selectedState = device.spk + "_" + strValue;
                //设备属性值,云雀上定义好的;
                string keyVlaue = "on_off";
                //数据封装
@@ -476,22 +478,22 @@
            {
                //界面显示选中值
                button.Text = brightnesValue + "%";
                selectedState = device.functionType + brightnesValue.ToString();
                selectedState = device.spk + brightnesValue.ToString();
                //设备属性值,云雀上定义好的;
                string keyVlaue = "";
                switch (device.functionType)
                switch (device.spk)
                {
                    //开关灯光 light.Switch
                    case FunctionType.Dimmer:
                    case FunctionType.RGB:
                    case FunctionType.RGBW:
                    case FunctionType.ColorTemperature:
                    case SPK.LightDimming:
                    case SPK.LightRGB:
                    case SPK.LightRGBW:
                    case SPK.LightCCT:
                        {
                            keyVlaue = "brightness";
                        }
                        break;
                    case FunctionType.MotorCurtain:
                    case FunctionType.RollingShutter:
                    case SPK.CurtainRoller:
                    case SPK.CurtainTrietex:
                        {
                            keyVlaue = "percent";
                        }