From 132dc0402e0c5e22a7d54cdddc1700a1842304bd Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 十二月 2022 15:42:23 +0800
Subject: [PATCH] Merge branch 'wjc' into dev--wxr

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

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 2a295ff..4d994e1 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;
                             //鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害
@@ -417,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;
                             }
@@ -914,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;
                             //鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害
@@ -923,11 +932,24 @@
                             //鍖哄埆涓嶅悓璁惧锛屾樉绀轰笉鍚岃澶囩姸鎬�
                             switch (device.spk)
                             {
-                               
+
+                                //鎻掑骇(鏈塙SB)
+                                case SPK.PanelSocket:
+                                    {
+                                        string on_off = GetKeyValue("on_off_master", dicList);
+                                        if (on_off == "on")
+                                        {
+                                            stateStr = Language.StringByID(StringId.onLogic);
+                                        }
+                                        else
+                                        {
+                                            stateStr = stateStr = Language.StringByID(StringId.offLogic);
+                                        }
+                                    }
+                                    break;
                                 case SPK.AirSwitch:
                                 case SPK.LightSwitch:
                                 //鎻掑骇
-                                case SPK.PanelSocket:
                                 case SPK.ElectricSocket:
                                 //鏈烘鎵�
                                 case SPK.MechanicalArm:
@@ -1441,8 +1463,23 @@
         {
             switch (device.spk)
             {
-                //鎻掑骇
+                //鎻掑骇(鏈塙SB)
                 case SPK.PanelSocket:
+                    {
+                        foreach (var dic in dicList)
+                        {
+                            string value = dic["value"];
+                            if (value == "on")
+                            {
+                                button1.Text = Language.StringByID(StringId.onLogic);
+                            }
+                            else
+                            {
+                                button1.Text = Language.StringByID(StringId.offLogic);
+                            }
+                        }
+                    }
+                    break;
                 case SPK.ElectricSocket:
                 //寮�鍏崇伅鍏�
                 case SPK.AirSwitch:
@@ -2106,6 +2143,7 @@
                         button2.Text = this.GetFaceItem(value, device.deviceId).userName;
                     }
                     break;
+              
             }
         }
         /// <summary>
@@ -2399,7 +2437,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