From 9508510f0b27da3278fa1161eb2ba3dd1e3e2030 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 26 七月 2023 13:14:00 +0800
Subject: [PATCH] 2023年07月26日13:12:21

---
 HDL_ON/DAL/Server/HttpUtil.cs                                     |    4 +-
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs            |    2 
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs    |   14 +++++-
 HDL-ON_Android/Resources/Resource.designer.cs                     |    2 
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs |   38 +++++++++++++++++--
 HDL_ON/Common/R.cs                                                |    3 +
 6 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs
index 0bf2792..24b9b9e 100644
--- a/HDL-ON_Android/Resources/Resource.designer.cs
+++ b/HDL-ON_Android/Resources/Resource.designer.cs
@@ -14,7 +14,7 @@
 {
 	
 	
-	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.8.165")]
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
 	public partial class Resource
 	{
 		
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 452b955..aaf50ae 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3486,7 +3486,8 @@
         /// RGB鑹茬洏
         /// </summary>
         public const int rgbsepan = 7172;
-        
+       
+
 
 
         /// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 4766d4f..fcb9604 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
         const string APP_KEY = "HDL-HOME-APP-TEST";
         const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
         //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index affe59a..a0ddf37 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -699,7 +699,7 @@
                 case SPK.Peephole:
                     LogicView.FunTypeView viewPeephole = new LogicView.FunTypeView();
                     viewPeephole.btnText.TextID = StringId.ActivityDetection;
-                    viewPeephole.btnText.Name = Language.StringByID(StringId.shipinmensuo);
+                    //viewPeephole.btnText.Name = Language.StringByID(StringId.shipinmensuo);
                     fLayout.AddChidren(viewPeephole.FLayoutView());
                     viewPeephole.btnClick.MouseUpEventHandler += (sender, e) =>
                     {
@@ -715,7 +715,7 @@
                 case SPK.Ev_Ipcam:
                     LogicView.FunTypeView viewEzIpcam = new LogicView.FunTypeView();
                     viewEzIpcam.btnText.TextID = StringId.ActivityDetection;
-                    viewEzIpcam.btnText.Name = Language.StringByID(StringId.shipinmensuo);
+                    //viewEzIpcam.btnText.Name = Language.StringByID(StringId.shipinmensuo);
                     fLayout.AddChidren(viewEzIpcam.FLayoutView());
                     viewEzIpcam.btnClick.MouseUpEventHandler += (sender, e) =>
                     {
@@ -784,12 +784,14 @@
                     //鐚溂-浜轰綋鎰熷簲鍛婅
                     inputDevice.condition_type = "9";
                     inputDevice.identifier = this.identifier;
+                    inputDevice.condition = new List<Dictionary<string, string>>();
                 }
                 else if(device.spk == SPK.Ev_Ipcam)
                 {
                     //钀ょ煶鎽勫儚澶�-绉诲姩鐩戞祴鍛婅
                     inputDevice.condition_type = "9";
                     inputDevice.identifier = this.identifier;
+                    inputDevice.condition = new List<Dictionary<string, string>>();
                 }
                 else if (device.spk == SPK.VideoDoorLock)
                 {
@@ -1357,7 +1359,32 @@
                 //鏈夋暟鎹噸鏂拌祴鍊�
                 dicSateteList.AddRange(dicList);
             }
-            InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4,"");
+            //浜嬩欢涓撶敤
+            switch (device.spk)
+            {
+                case SPK.IpCam_Imou:
+                    {
+                        if (inputs.identifier == "ipcam_region_alram_event")
+                        {
+                            button1.Text = Language.StringByID(StringId.shi);
+                        }
+
+                    }
+                    break;
+                case SPK.Peephole:
+                    if (inputs.identifier == "pir_event")
+                    {
+                        button1.Text = Language.StringByID(StringId.shi );
+                    }
+                    break;
+                case SPK.Ev_Ipcam:
+                    if (inputs.identifier == "motiondetect_event")
+                    {
+                        button1.Text = Language.StringByID(StringId.shi);
+                    }
+                    break;
+            }
+            InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4, "");
         }
         /// <summary>
         /// 娣诲姞閫変腑鏁版嵁
@@ -1492,7 +1519,10 @@
         /// <returns></returns>
         public bool IsContainsAll(List<Dictionary<string, string>> dictionaryA, List<Dictionary<string, string>> dictionaryB)
         {
-
+            if (dictionaryA.Count == 0 || dictionaryB.Count == 0) {
+                //钀ょ煶鐚溂锛屾憚鍍忓ご锛屽ぇ鍗庢憚鍍忓ご鍙湁浜嬩欢锛屾病鏈夎緭鍏ユ潯浠�
+                return true;
+            }
             for (int i = 0; i < dictionaryA.Count; i++)
             {
                 var dic = dictionaryA[i];
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 32662f8..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:
@@ -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:
                     {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 7472d73..5d331cd 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -1223,7 +1223,7 @@
                       // new Entity.Function { sid = "1234567899", name = "闂ㄧ浼犳劅鍣�", spk = Entity.SPK.SensorDoorWindow },
                       //  new Entity.Function { sid = "12345678991234", name = "HDL鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
                       //    new Entity.Function { sid = "123456789912345", name = "娴锋浖鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
-                              new Entity.Function { sid = "123456789912345668", name = "AC", spk = Entity.SPK.AcIr },
+                              new Entity.Function { sid = "12345678991234566844", name = "澶у崕鎽勫儚澶�", spk = Entity.SPK.IpCam_Imou },
                                  new Entity.Function { sid = "12345678991234567", name = "RGB", spk = Entity.SPK.LightRGB },
                                   new Entity.Function { sid = "123456789912345678", name = "RGBW", spk = Entity.SPK.LightRGBW },
             };

--
Gitblit v1.8.0