From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 13:21:21 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 50 insertions(+), 10 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index 7b8bdcd..e933b09 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -142,6 +142,7 @@
             }
             else
             {
+
                 var onePortAutomation = new OnePortAutomation();
                 MainPage.BasePageView.AddChidren(onePortAutomation);
                 onePortAutomation.Show();
@@ -278,7 +279,6 @@
                     var jay = jArray[a];
                     //鏁版嵁杩斿簭鍒楀寲涓篖ogic瀵硅薄
                     var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
-                    Console.WriteLine("鑾峰彇閫昏緫==="+str);
                     var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str);
                     if (logic != null)
                     {
@@ -316,6 +316,8 @@
                                 }
                                 newlogic.output.Add(logic.output[i]);
                             }
+                            newlogic.noticeConfig = logic.noticeConfig;
+                            newlogic.pushConfigs = logic.pushConfigs;
                             //娣诲姞閫昏緫
                             Logic.LogicList.Add(newlogic);
                         }
@@ -355,9 +357,12 @@
             //1-10(琛ㄧず鏉′欢鍥炬爣)鑷繁灞�閮ㄥ畾涔変负浜嗘樉绀洪�変腑鏉′欢绫诲瀷鍥炬爣
             //1-鏃堕棿鍥炬爣
             //2-鍔熻兘鍥炬爣
+            //3-浜戠鍥炬爣
+            //4-鍦烘櫙鍥炬爣
             for (int i = 0; i < logic.input.Count; i++)
             {
-
+                if (logic.input[i] == null)
+                    continue;
                 var int1 = int.Parse(logic.input[i].condition_type);
                 int iconInt = 0;
                 switch (int1)
@@ -372,6 +377,20 @@
                     case 3:
                         {
                             iconInt = 2;
+
+                        }
+                        break;
+                    case 4:
+                    case 6:
+                    case 9:
+                        {
+                            iconInt = 3;
+
+                        }
+                        break;
+                    case 10:
+                        {
+                            iconInt = 4;
 
                         }
                         break;
@@ -390,6 +409,7 @@
             //12-20(琛ㄧず鐩爣鍥炬爣)鑷繁灞�閮ㄥ畾涔変负浜嗘樉绀洪�変腑鐩爣绫诲瀷鍥炬爣
             //12-鍔熻兘鍥炬爣
             //13-鍦烘櫙鍥炬爣
+            //14-瀹夐槻鍥炬爣
             //14-寤舵椂鍥炬爣
             for (int i = 0; i < logic.output.Count; i++)
             {
@@ -412,6 +432,12 @@
                     case 3:
                         {
                             iconInt = 14;
+
+                        }
+                        break;
+                    case 4:
+                        {
+                            iconInt = 15;
 
                         }
                         break;
@@ -466,6 +492,18 @@
                             strIcon = "LogicIcon/selectTheFun.png";
                         }
                         break;
+                    case 3:
+                        {
+
+                            strIcon = "LogicIcon/shiwaitianqi.png";
+                        }
+                        break;
+                    case 4:
+                        {
+
+                            strIcon = "LogicIcon/selectTheScene.png";
+                        }
+                        break;
                     case 11:
                         {
                             //鍒嗗壊鏉′欢鍜岀洰鏍囩殑鍥炬爣
@@ -485,7 +523,14 @@
                         break;
                     case 14:
                         {
+
+                            strIcon = "LogicIcon/security.png";
+                        }
+                        break;
+                    case 15:
+                        {
                             //strIcon = "LogicIcon/timeicon.png";
+
                         }
                         break;
 
@@ -494,9 +539,9 @@
             }
         }
         /// <summary>
-        /// 鍒ゆ柇缃戝叧绫诲瀷
+        /// 鍒ゆ柇缃戝叧绫诲瀷(0:bus缃戝叧锛�1:A鍗忚缃戝叧)
         /// </summary>
-        /// <returns></returns>
+        /// <returns>true=A鍗忚缃戝叧;false=bus缃戝叧</returns>
         public static bool IsGatewayType
         {
             get
@@ -504,13 +549,8 @@
                 if (Entity.DB_ResidenceData.Instance.GatewayType == 1)
                 {
                     return true;
-
                 }
-                else
-                {
-                    return false;
-
-                }
+                return false;
             }
         }
     }

--
Gitblit v1.8.0