From e44926acb6ab99ea0d5baf758773a0f383e441a9 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 25 十一月 2022 14:23:54 +0800
Subject: [PATCH] 2022年11月25日14:23:44

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

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index ae6c83a..fdb5883 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -140,7 +140,7 @@
                             //鐢╯id鎵惧埌璁惧锛�
                             var device = LogicMethod.Current.GetDevice(inputCondition.sid);
                             //鐢ㄨ澶囩殑functionType绫诲瀷鎵惧埌瀵瑰簲鍥炬爣锛�
-                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetIconPath(device.spk);
+                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetDeviceIconPath(device);
                             //鏄剧ず璁惧鍚嶇О
                             inputView.btnText.Text = device.name;
                             //鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害
@@ -281,6 +281,7 @@
                                     }
                                     break;
                                 case SPK.SenesorMegahealth:
+                                case SPK.SensorMmvPose:
                                     {
                                         string key = this.GetKey(dicList);
                                         string value = this.GetValue(dicList);
@@ -416,6 +417,15 @@
                                             var FaceItem = this.GetFaceItem(userId, device.deviceId);
                                             inputView.btnState.Text = FaceItem.userName;
                                         }
+                                    }
+                                    break;
+                                case SPK.IpCam_Imou:
+                                    {
+                                        if (inputCondition.identifier == "door_caipcam_region_alram_eventll_cloud_event")
+                                        {
+                                            inputView.btnState.Text = Language.StringByID(StringId.quyuruqingaojing);
+                                        }
+                                        
                                     }
                                     break;
                             }
@@ -913,7 +923,7 @@
                             //鐢╯id鎵惧埌璁惧锛�
                             var device = LogicMethod.Current.GetDevice(outputTarget.sid);
                             //鐢ㄨ澶囩殑functionType绫诲瀷鎵惧埌瀵瑰簲鍥炬爣锛�
-                            targetView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetIconPath(device.spk);
+                            targetView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetDeviceIconPath(device);
                             //鏄剧ず璁惧鍚嶇О
                             targetView.btnText.Text = device.name;
                             //鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害
@@ -969,6 +979,14 @@
                                         else if (brightness != "")
                                         {
                                             stateStr = brightness + "%";
+                                        }
+                                        if (device.spk == SPK.LightCCT)
+                                        {
+                                            //鑹叉俯杩欎釜灞炴�ф墠鏈夋晥
+                                            if (stateStr != Language.StringByID(StringId.offLogic) && GetKeyValue("cct", dicList) != "")
+                                            {
+                                                stateStr += "," +GetKeyValue("cct", dicList) + "k";
+                                            }
                                         }
 
                                     }
@@ -1487,6 +1505,16 @@
                                         button2.Text = value + "%";
                                     }
                                     break;
+                                case "cct":
+                                    {
+                                        if (button3 == null)
+                                        {
+                                            //鎬曡皟璇曡蒋浠朵贡涓婁笢瑗垮鑷存姏寮傚父
+                                            break;
+                                        }
+                                        button3.Text = value + "k";
+                                    }
+                                    break;
                             }
 
                         }
@@ -2002,6 +2030,7 @@
                     }
                     break;
                 case SPK.SenesorMegahealth:
+                case SPK.SensorMmvPose:
                     {
                         foreach (var dic in dicList)
                         {
@@ -2086,6 +2115,7 @@
                         button2.Text = this.GetFaceItem(value, device.deviceId).userName;
                     }
                     break;
+              
             }
         }
         /// <summary>
@@ -2379,7 +2409,9 @@
         /// <returns></returns>
         private string GetTimeText(string strTimeValue)
         {
-            var timeValue = int.Parse(strTimeValue);
+            //鍥犱负璋冭瘯杞欢涓婁紶涓虹┖杩�;
+            string intTimeValue = string.IsNullOrEmpty(strTimeValue) ? "0" : strTimeValue;
+            var timeValue = int.Parse(intTimeValue);
             string state = "";
             var minutes = timeValue / 60;
             var seconds = timeValue % 60;

--
Gitblit v1.8.0