From 8e858cb477a4040d1f0a328c51db12b77313bed7 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 21 四月 2021 16:10:18 +0800
Subject: [PATCH] 2021-4-21-1

---
 HDL-ON_iOS/Resources/Language.ini                                 |    2 
 HDL-ON_Android/Assets/Language.ini                                |    3 
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs |   27 ++++++--
 HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs                   |    2 
 HDL_ON/Common/R.cs                                                |    2 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                              |   31 ++-------
 HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs          |   16 ++++
 HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs               |   62 ++++++++++----------
 8 files changed, 79 insertions(+), 66 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 81e9dd9..c3090ba 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,31 +1,13 @@
-锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs">
-    <Files>
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="494" Column="10" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs" Line="5" Column="1" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="62" Column="6" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="71" Column="10" />
-      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="575" Column="30" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs" Line="480" Column="37" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" Line="128" Column="43" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs" Line="505" Column="54" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs" Line="268" Column="54" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs" Line="57" Column="33" />
-      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs" Line="183" Column="1" />
-    </Files>
+锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.FE1D0763-7181-4B0C-AB18-E30AA773A6FA" />
+  <MonoDevelop.Ide.Workbench>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
             <Node name="HDL_ON" expanded="True">
               <Node name="Common" expanded="True" />
-              <Node name="DAL" expanded="True">
-                <Node name="Server" expanded="True" />
-              </Node>
-              <Node name="Entity" expanded="True">
-                <Node name="ResponseEntity" expanded="True" />
-              </Node>
+              <Node name="Entity" expanded="True" />
               <Node name="UI" expanded="True">
                 <Node name="UI0-Stan" expanded="True" />
                 <Node name="UI2" expanded="True">
@@ -43,6 +25,9 @@
             <Node name="HDL-ON_Android" expanded="True">
               <Node name="Assets" expanded="True" />
             </Node>
+            <Node name="HDL-ON_iOS" expanded="True">
+              <Node name="Resources" expanded="True" />
+            </Node>
           </Node>
         </State>
       </Pad>
@@ -54,7 +39,7 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
   <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore />
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 30e12ac..7cdb1eb 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1570,7 +1570,8 @@
 7129=(100瀛楀唴)
 7130=璐﹀彿閫夋嫨
 7131=App鎺ㄩ��
-
+7132=鑷姩鍖�
+7133=宸叉墽琛�
 
 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 87fc290..32fd9da 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1566,6 +1566,8 @@
 7129=(100瀛楀唴)
 7130=璐﹀彿閫夋嫨
 7131=App鎺ㄩ��
+7132=鑷姩鍖�
+7133=宸叉墽琛�
 
 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index ef306b4..2163dd8 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -1064,6 +1064,8 @@
         public const int xianzhichangdu = 7129;
         public const int zhanghaoxuanze = 7130;
         public const int apptuisong = 7131;
+        public const int zidontghua = 7132;
+        public const int yizhixing = 7133;
 
         #region LE鏂板
         /// <summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index cd334f8..47f2d15 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -135,13 +135,14 @@
                         }
                     }
                     break;
-                case SPK.SensorDoorWindow: {
+                case SPK.SensorDoorWindow:
+                    {
                         LogicView.FunTypeView view = new LogicView.FunTypeView();
                         view.btnText.TextID = StringId.kaiqiandbihe;
                         fLayout.AddChidren(view.FLayoutView());
                         view.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
-                            DeviceView(device, view.btnState, StringId.kaiqi , StringId.bihe);
+                            DeviceView(device, view.btnState, StringId.kaiqi, StringId.bihe);
                         };
                         if (edit)
                         {
@@ -151,7 +152,7 @@
                     break;
                 case SPK.SensoruUtrasonic:
                     {
-                        
+
                         LogicView.FunTypeView view = new LogicView.FunTypeView();
                         view.btnText.TextID = StringId.yourenandwuren;
                         fLayout.AddChidren(view.FLayoutView());
@@ -214,10 +215,22 @@
                     return;
                 }
                 LogicMethod.RemoveAllView();
-                AddLogic addLogic = new AddLogic();
-                MainPage.BasePageView.AddChidren(addLogic);
-                addLogic.Show();
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+                if (MainView.IsGatewayType)
+                { //A缃戝叧
+                    var addLogic = new AddLogic();
+                    MainPage.BasePageView.AddChidren(addLogic);
+                    addLogic.Show();
+                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                }
+                else
+                {
+                    //涓�绔彛缃戝叧
+                    var onePortAutomation = new OnePortAutomation();
+                    MainPage.BasePageView.AddChidren(onePortAutomation);
+                    onePortAutomation.Show();
+                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                }
             };
 
             #endregion
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
index 0d29d55..b05e5c7 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
@@ -155,8 +155,20 @@
             saveView.btnClick.MouseUpEventHandler += (e, sen) =>
             {
                 Logic.currlogic.noticeConfig.noticeContent = textBox.Text.Trim();
-                Logic.currlogic.pushConfigs.Clear();//娓呯┖鏃ф暟鎹垪琛�
-                Logic.currlogic.pushConfigs.Add(new PushConfigs { pushTarget = selectedAccountList });
+                if (selectedAccountList.Count > 0)
+                {
+                    Logic.currlogic.pushConfigs.Clear();//娓呯┖鏃ф暟鎹垪琛�
+                    Logic.currlogic.pushConfigs.Add(new PushConfigs { pushTarget = selectedAccountList });
+                }
+                //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+                if (Logic.currlogic.pushConfigs.Count == 0)
+                {
+                    //鍒濆鍖栧璞�
+                    PushConfigs pushConfigs = new PushConfigs();
+                    //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙�
+                    pushConfigs.pushTarget.Add(UserInfo.Current.ID);
+                    Logic.currlogic.pushConfigs.Add(pushConfigs);
+                }
                 this.RemoveFromParent();
             };
             #endregion
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index 7b8bdcd..3e24635 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -287,37 +287,38 @@
                         if (if_logic == null)
                         {
 
-                            Logic newlogic = new Logic();
-                            newlogic.name = logic.name;
-                            newlogic.userLogicId = logic.userLogicId;
-                            newlogic.sid = logic.sid;
-                            newlogic.relation = logic.relation;
-                            newlogic.enable = logic.enable;
-                            newlogic.cycle = logic.cycle;
-                            for (int i = 0; i < logic.input.Count; i++)
-                            {
-                                if (logic.input[i] == null || string.IsNullOrEmpty(logic.input[i].condition_type))
-                                {
-                                    //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵;
-                                    //闃叉鏈夌┖瀵硅薄锛�
-                                    //姝e父鎯呭喌涓嬩笉浼氬嚭鐜扮殑鐜拌薄锛�
-                                    continue;
-                                }
-                                newlogic.input.Add(logic.input[i]);
-                            }
-                            for (int i = 0; i < logic.output.Count; i++)
-                            {
-                                if (logic.output[i] == null || string.IsNullOrEmpty(logic.output[i].target_type))
-                                {
-                                    //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵;
-                                    //闃叉鏈夌┖瀵硅薄锛�
-                                    //姝e父鎯呭喌涓嬩笉浼氳鐜拌薄锛�
-                                    continue;
-                                }
-                                newlogic.output.Add(logic.output[i]);
-                            }
+                            //Logic newlogic = new Logic();
+                            //newlogic.name = logic.name;
+                            //newlogic.userLogicId = logic.userLogicId;
+                            //newlogic.sid = logic.sid;
+                            //newlogic.relation = logic.relation;
+                            //newlogic.enable = logic.enable;
+                            //newlogic.cycle = logic.cycle;
+                            //for (int i = 0; i < logic.input.Count; i++)
+                            //{
+                            //    if (logic.input[i] == null || string.IsNullOrEmpty(logic.input[i].condition_type))
+                            //    {
+                            //        //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵;
+                            //        //闃叉鏈夌┖瀵硅薄锛�
+                            //        //姝e父鎯呭喌涓嬩笉浼氬嚭鐜扮殑鐜拌薄锛�
+                            //        continue;
+                            //    }
+                            //    newlogic.input.Add(logic.input[i]);
+                            //}
+                            //for (int i = 0; i < logic.output.Count; i++)
+                            //{
+                            //    if (logic.output[i] == null || string.IsNullOrEmpty(logic.output[i].target_type))
+                            //    {
+                            //        //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵;
+                            //        //闃叉鏈夌┖瀵硅薄锛�
+                            //        //姝e父鎯呭喌涓嬩笉浼氳鐜拌薄锛�
+                            //        continue;
+                            //    }
+                            //    newlogic.output.Add(logic.output[i]);
+                            //}
+                        
                             //娣诲姞閫昏緫
-                            Logic.LogicList.Add(newlogic);
+                            Logic.LogicList.Add(logic);
                         }
                     }
 
@@ -504,7 +505,6 @@
                 if (Entity.DB_ResidenceData.Instance.GatewayType == 1)
                 {
                     return true;
-
                 }
                 else
                 {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index acaa6af..65ad0e0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -287,8 +287,6 @@
             {
                 var dd = e.Message;
             }
-
-
             return responsePackNew;
         } 
         /// <summary>

--
Gitblit v1.8.0