From 489d3bd60ad7dc2fecb398b09cf4c52df16f0fc2 Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期三, 26 七月 2023 15:55:30 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs |   46 +++++++++++++++++++++++++++-------------------
 1 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 86821a9..1d787cb 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -460,7 +460,7 @@
                                     break;
                                 case SPK.IpCam_Imou:
                                     {
-                                        if (inputCondition.identifier == "door_caipcam_region_alram_eventll_cloud_event")
+                                        if (inputCondition.identifier == "ipcam_region_alram_event")
                                         {
                                             inputView.btnState.Text = Language.StringByID(StringId.quyuruqingaojing);
                                         }
@@ -468,9 +468,15 @@
                                     }
                                     break;
                                 case SPK.Ev_Ipcam:
+                                    if (inputCondition.identifier == "motiondetect_event")
+                                    {
+                                        inputView.btnState.Text = Language.StringByID(StringId.shi);
+                                    }
+                                    break;
+                                case SPK.Peephole:
                                     if (inputCondition.identifier == "pir_event")
                                     {
-                                        inputView.btnState.Text = Language.StringByID(StringId.On);
+                                        inputView.btnState.Text = Language.StringByID(StringId.shi);
                                     }
                                     break;
                                 case SPK.SensorPirHold:
@@ -1112,7 +1118,8 @@
                                         string on_off = GetKeyValue("on_off", dicList);
                                         string brightness = GetKeyValue("brightness", dicList);
                                         string cct = GetKeyValue(FunctionAttributeKey.CCT, dicList);
-                                        string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList);
+                                        //鑷姩鍖栫粍鎺� 鐐僵鍔熻兘
+                                        //string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList);
                                         string rgb = GetKeyValue("rgb", dicList);
 
 
@@ -1138,19 +1145,18 @@
                                             stateStr += "," + Language.StringByID(StringId.ColorTemperature) + cct + "k";
                                         }
 
-                                        if (!string.IsNullOrEmpty(colorful))
-                                        {
-                                            stateStr += "," + Language.StringByID(StringId.ColorfulFunction);
-                                            if (colorful == "on")
-                                            {
-                                                stateStr += Language.StringByID(StringId.onLogic);
-                                            }
-                                            else if (colorful == "off")
-                                            {
-                                                stateStr += Language.StringByID(StringId.offLogic);
-                                            }
-
-                                        }
+                                        //if (!string.IsNullOrEmpty(colorful))
+                                        //{
+                                        //    stateStr += "," + Language.StringByID(StringId.ColorfulFunction);
+                                        //    if (colorful == "on")
+                                        //    {
+                                        //        stateStr += Language.StringByID(StringId.onLogic);
+                                        //    }
+                                        //    else if (colorful == "off")
+                                        //    {
+                                        //        stateStr += Language.StringByID(StringId.offLogic);
+                                        //    }
+                                        //}
 
                                         if (!string.IsNullOrEmpty(rgb) && rgb.Length > 6)
                                         {
@@ -2182,7 +2188,7 @@
                         }
                     }
                     break;
-              
+
                 case SPK.SensorGas:
                 case SPK.SensorSmoke:
                     {
@@ -2409,6 +2415,8 @@
                         button1.Tag = tag;
                     }
                     break;
+               
+
                 case SPK.MusicStandard:
                 case SPK.AvMusic:
                     {
@@ -2506,9 +2514,9 @@
         public string GetTemperatureUnit(Entity.Function device)
         {
             string unit = string.Empty;
-            if (device.GetAttribute("temperature_type") != null && device.GetAttribute("temperature_type").value.Count > 0)
+            if (device.GetAttribute("temperature_type") != null)
             {
-                unit = device.GetAttribute("temperature_type").value[0];
+                unit = device.GetAttribute("temperature_type").unit;
             }
             if (string.IsNullOrEmpty(unit))
             {

--
Gitblit v1.8.0