wxr
2022-12-01 132dc0402e0c5e22a7d54cdddc1700a1842304bd
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -187,7 +187,7 @@
            var list2 = this.GetVideoDeviceList();
            list.AddRange(list1);
            list.AddRange(list2);
            GetTestDevice(ref list, false);
            GetTestDevice(ref list, true);
            return list;
        }
        /// <summary>
@@ -343,17 +343,39 @@
            return roomName.TrimEnd(',');
        }
        #region   动一改四
        /// <summary>
        /// 获取设备类型图标
        /// </summary>
        /// <param name="device">设备</param>
        /// <returns></returns>
        public string GetDeviceIconPath(Function device)
        {
            if (SPK.MusicStandard == device.spk
                || SPK.AvMusic == device.spk)
            {
                return "MusicIcon/localMusic.png";
            }
            //LogicIcon/heatlogic.png"
            return $"FunctionIcon/Icon/{device.IconName}.png";
        }
        /// <summary>
        /// 获取设备类型图标(已弃用 2022年11月25日14:07:30)
        /// </summary>
        /// <param name="functionType">设备类型</param>
        /// <returns></returns>
        public string GetIconPath(string functionType)
        public string GetIconPath(string spk)
        {
            string strPath = "";
            switch (functionType)
            switch (spk)
            {
                case SPK.IpCam_Imou:
                    {
                        strPath = $"FunctionIcon/Icon/{SPK.IpCam_Imou.Replace(".", "")}.png";
                    }
                    break;
                case SPK.MechanicalArm:
                    {
                        strPath = "LogicIcon/lightloguc.png";
@@ -451,10 +473,10 @@
                        strPath = "MusicIcon/localMusic.png";
                    }
                    break;
            }
            return strPath;
        }
        #region   动一改三
        /// <summary>
        /// 设备类型的列表(灯光类,窗帘类。。。)
        /// </summary>
@@ -570,6 +592,13 @@
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.jixieshou));
            }
            ///摄像头类
            var camera = deviceList.Find((device) =>
            device.spk == SPK.IpCam_Imou);
            if (camera != null)
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.shexiangtou));
            }
            return deviceStrTypeList;
        }
@@ -669,10 +698,16 @@
            else if (deviceType == Language.StringByID(StringId.VideoIntercom))
            {
                functionTypeList.Add(SPK.doorgate);
            }  ///机械手类
            }
            ///机械手类
            else  if (deviceType == Language.StringByID(StringId.jixieshou))
            {
                functionTypeList.Add(SPK.MechanicalArm);
            }
            ///摄像头类
            else if (deviceType == Language.StringByID(StringId.shexiangtou))
            {
                functionTypeList.Add(SPK.IpCam_Imou);
            }
            else
            {
@@ -727,6 +762,7 @@
                functionTypeList.Add(SPK.AvMusic);
                functionTypeList.Add(SPK.doorgate);
                functionTypeList.Add(SPK.MechanicalArm);
                functionTypeList.Add(SPK.IpCam_Imou);
            }
@@ -784,6 +820,7 @@
                        deviceTypeList.Add(SPK.SensorHelp);
                        deviceTypeList.Add(SPK.DoorLock);
                        deviceTypeList.Add(SPK.doorgate);
                        deviceTypeList.Add(SPK.IpCam_Imou);
                    }
                    break;
@@ -851,7 +888,7 @@
            return list;
        }
        /// <summary>
        /// 网关ID(获取嘉乐网关ID)
        /// 网关ID(获取网关ID)
        /// </summary>
        public string GatewayId
        {
@@ -1126,7 +1163,7 @@
                 // new Entity.Function { sid = "1234567891", name = "温度传感器", spk = Entity.SPK.SensorTemperature },
                 //  new Entity.Function { sid = "1234567892", name = "湿度传感器", spk = Entity.SPK.SensorHumidity },
                    new Entity.Function { sid = "12345678933456", name = "调光灯", spk = Entity.SPK.LightDimming },
                      new Entity.Function { sid = "1234567895444", name = "cct", spk = Entity.SPK.LightCCT },
                      new Entity.Function { sid = "1234567895444", name = "面板", spk = Entity.SPK.PanelSocket },
                      //new Entity.Function { sid = "1234567896", name = "毫米波传感器", spk = Entity.SPK.SenesorMegahealth },
                      //  new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 },
                      // new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow },