From d2666457d16f6171785596a8a9cb2fb9fb35f84b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 16 四月 2021 18:03:54 +0800
Subject: [PATCH] 2021-4-16-1

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs                |   35 ++
 HDL-ON_Android/Assets/Language.ini                                          |   10 
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs              |   43 ++
 HDL_ON/HDL_ON.projitems                                                     |    2 
 HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs                         |    8 
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs                     |    2 
 HDL-ON_iOS/Resources/Language.ini                                           |    9 
 HDL_ON/Common/OnAppConfig.cs                                                |    2 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                                        |   45 +-
 HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs                       |  132 ++++++++
 HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs                 |   24 -
 HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs                  |  151 +++++++++
 HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs                     |    9 
 HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs                         |   26 +
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs                            |    3 
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs |    1 
 HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs                            |   24 -
 HDL_ON/DAL/Server/HttpUtil.cs                                               |    2 
 HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs                            |   53 +++
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs                         |  107 +++++-
 HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs                             |   63 +++
 HDL_ON/Common/R.cs                                                          |    9 
 HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs                          |   18 +
 HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs                |    4 
 HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs                    |  144 +++++++++
 25 files changed, 813 insertions(+), 113 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 60afe34..b3a8581 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,15 +1,12 @@
 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.FE1D0763-7181-4B0C-AB18-E30AA773A6FA" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL-ON_Android/Assets/Language.ini">
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs">
     <Files>
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs" Line="464" Column="40" />
-      <File FileName="HDL_ON/Common/R.cs" Line="1" Column="1" />
-      <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="1" Column="1" />
-      <File FileName="HDL-ON_Android/Other/JPush/JPushService.cs" Line="1" Column="1" />
-      <File FileName="HDL-ON_Android/Other/JPush/JPushReceiver.cs" Line="84" Column="98" />
-      <File FileName="HDL_ON/Common/HDLCommon.cs" Line="254" Column="72" />
-      <File FileName="HDL_ON/DAL/Server/NewApiRes.cs" Line="1454" Column="33" />
-      <File FileName="HDL-ON_Android/Assets/Language.ini" Line="29" Column="10" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="337" Column="28" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs" Line="87" Column="21" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="142" Column="29" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs" Line="26" Column="22" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="17" Column="22" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
@@ -17,24 +14,30 @@
           <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="UI" expanded="True">
+                <Node name="UI0-Stan" expanded="True">
+                  <Node name="Controls" expanded="True">
+                    <Node name="BaseControl" expanded="True" />
+                  </Node>
+                </Node>
                 <Node name="UI2" expanded="True">
+                  <Node name="3-Intelligence" expanded="True">
+                    <Node name="Automation" expanded="True">
+                      <Node name="LogicView" expanded="True" />
+                      <Node name="AddLogic.cs" selected="True" />
+                    </Node>
+                  </Node>
                   <Node name="FuntionControlView" expanded="True">
-                    <Node name="Video" expanded="True" />
+                    <Node name="Music" expanded="True" />
+                    <Node name="Video" expanded="True">
+                      <Node name="View" expanded="True" />
+                    </Node>
                   </Node>
                 </Node>
               </Node>
             </Node>
             <Node name="HDL-ON_Android" expanded="True">
-              <Node name="Assets" expanded="True">
-                <Node name="Language.ini" selected="True" />
-              </Node>
-              <Node name="Other" expanded="True">
-                <Node name="JPush" expanded="True" />
-              </Node>
+              <Node name="Assets" expanded="True" />
             </Node>
             <Node name="HDL-ON_iOS" expanded="True">
               <Node name="Resources" expanded="True" />
@@ -50,7 +53,7 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
   <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 d2b9e87..30e12ac 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1561,6 +1561,16 @@
 7120=闃叉媶鍔熻兘
 7121=鍦ㄧ嚎
 7122=涓嶅湪绾�
+7123=绌烘皵璐ㄩ噺
+7124=浼�
+7125=鑹�
+7126=宸�
+7127=鍙戦�侀�氱煡
+7128=閫氱煡鍐呭
+7129=(100瀛楀唴)
+7130=璐﹀彿閫夋嫨
+7131=App鎺ㄩ��
+
 
 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 4cdd0dd..87fc290 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1557,6 +1557,15 @@
 7120=闃叉媶鍔熻兘
 7121=鍦ㄧ嚎
 7122=涓嶅湪绾�
+7123=绌烘皵璐ㄩ噺
+7124=浼�
+7125=鑹�
+7126=宸�
+7127=鍙戦�侀�氱煡
+7128=閫氱煡鍐呭
+7129=(100瀛楀唴)
+7130=璐﹀彿閫夋嫨
+7131=App鎺ㄩ��
 
 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL_ON/Common/OnAppConfig.cs b/HDL_ON/Common/OnAppConfig.cs
index 9322dfe..496bf7a 100644
--- a/HDL_ON/Common/OnAppConfig.cs
+++ b/HDL_ON/Common/OnAppConfig.cs
@@ -75,7 +75,7 @@
         /// <summary>
         ///  璐﹀彿娉ㄥ唽鏈嶅姟鍣ㄤ俊鎭�
         /// </summary>
-        public string RequestHttpsHost = "https://china.hdlcontrol.com";
+        public string RequestHttpsHost ="https://china.hdlcontrol.com";
         /// <summary>
         /// 
         /// </summary>
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 8595a72..ef306b4 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -1055,6 +1055,15 @@
         public const int fangchaigongneng = 7120;
         public const int zaixian = 7121;
         public const int buzaixian = 7122;
+        public const int kongqizhiliang = 7123;
+        public const int kongqiyou= 7124;
+        public const int kongqiliang = 7125;
+        public const int kongqicha = 7126;
+        public const int fasongtongzhi = 7127;
+        public const int tongzhineirong = 7128;
+        public const int xianzhichangdu = 7129;
+        public const int zhanghaoxuanze = 7130;
+        public const int apptuisong = 7131;
 
         #region LE鏂板
         /// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 7f7b499..e60ff0f 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -153,6 +153,8 @@
                 {
                     urlHead = OnAppConfig.Instance.RequestHttpsHost;
                 }
+                //"https://bahrain-gateway.hdlcontrol.com";
+                 urlHead="https://china-gateway.hdlcontrol.com";
                 string requestFullUrl = urlHead + apiPath;
 
 
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 560e165..621d464 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -395,6 +395,8 @@
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoSend.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoMainView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
index b951446..a319a5c 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -46,7 +46,7 @@
             shiwaiView.frameLayout.Y = functionView.frameLayout.Bottom;
             shiwaiView.btnText.TextID = StringId.shiwaibainhua;
             shiwaiView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
-            //viewLayout.AddChidren(shiwaiView.FLayoutView());
+            viewLayout.AddChidren(shiwaiView.FLayoutView());
             #endregion
 
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 3560fd2..757f209 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -111,26 +111,37 @@
             #region  鎵ц鎺ㄩ�� 鍙戦�侀�氱煡
             ///涓婁笅闂撮殧12鍍忕礌
             viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
-            /////鎵ц鎺ㄩ�乮ew
-            //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
-            //push.frameLayout.Height = Application.GetRealHeight(50);
-            //push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
-            //push.btnText.TextID = StringId.push;
-            //push.btnNextIcon.Width = Application.GetRealWidth(36);
-            //push.btnNextIcon.Height = Application.GetRealWidth(36);
-            //push.btnNextIcon.X = Application.GetRealWidth(305);
-            //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
-            //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
-            //viewLayout.AddChidren(push.FLayoutView());
-            /////鍙戦�侀�氱煡View        
-            //LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
-            //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
-            //notification.btnText.TextID = StringId.notification;
-            //viewLayout.AddChidren(notification.FLayoutView());
-            /////涓婁笅闂撮殧62鍍忕礌
-            //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
+            ///鎵ц鎺ㄩ�乮ew
+            LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
+            push.frameLayout.Height = Application.GetRealHeight(50);
+            push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            push.btnText.TextID = StringId.push;
+            push.btnNextIcon.Width = Application.GetRealWidth(36);
+            push.btnNextIcon.Height = Application.GetRealWidth(36);
+            push.btnNextIcon.X = Application.GetRealWidth(305);
+            push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
+            push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
+            push.btnClick.Width = Application.GetRealWidth(305);
+            viewLayout.AddChidren(push.FLayoutView());
+            ///鍙戦�侀�氱煡View        
+            LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
+            notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            notification.btnText.TextID = StringId.notification;
+            notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor;
+            viewLayout.AddChidren(notification.FLayoutView());
+           
+            if (Logic.currlogic.pushConfigs.Count > 0)
+            {
+                push.btnNextIcon.IsSelected = true;
+            }
+            else
+            {
+                push.btnNextIcon.IsSelected = false;
+            }
+            ///涓婁笅闂撮殧62鍍忕礌
+            viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
             #endregion
-
+           
             #region  淇濆瓨
             ///淇濆瓨View
             LogicView.SaveView saveView = new LogicView.SaveView();
@@ -175,6 +186,63 @@
             cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) =>
             {
                 DateMethod(cyclicTitle.btnText);
+            };
+            ///鏄惁瑕佹帹閫佺偣鍑讳簨浠�
+            //鍒濆鍖栧璞�
+            PushConfigs pushConfigs = new PushConfigs();
+            if (Logic.currlogic.pushConfigs.Count > 0)
+            {
+                pushConfigs = Logic.currlogic.pushConfigs[0];
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
+                {
+                    //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+                    pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo);
+                }
+                else
+                {
+                    //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+                    pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo);
+                }
+            }
+            push.btnNextIcon.MouseUpEventHandler += (sender, e) =>
+            {
+               push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
+                if (push.btnNextIcon.IsSelected)
+                {
+                    if (Logic.currlogic.pushConfigs.Count > 0)
+                    {
+                        //娓呯┖涔嬪墠鏃ч厤缃暟鎹�
+                        Logic.currlogic.pushConfigs.Clear();
+                    }
+                    //澧炲姞閰嶇疆鏁版嵁
+                    Logic.currlogic.pushConfigs.Add(pushConfigs);
+                }
+                else
+                {
+                    if (Logic.currlogic.pushConfigs.Count > 0)
+                    {
+                        //榛樿鍙栫涓�涓祴鍊�
+                        pushConfigs = Logic.currlogic.pushConfigs[0];
+                        //娓呯┖閰嶇疆鏁版嵁
+                        Logic.currlogic.pushConfigs.Clear();
+                    }
+                }
+            };
+            ///杈撳叆鎺ㄩ�佹枃鏈�
+            notification.btnClick.MouseUpEventHandler += (sender, e) =>
+            {
+                InputPushText inputPushText = new InputPushText();
+                MainPage.BasePageView.AddChidren(inputPushText);
+                inputPushText.Show(pushConfigs);
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                inputPushText.action += (pushConfigsIfon) =>
+                {
+                    //璧嬪��
+                    pushConfigs = pushConfigsIfon;
+                };
             };
             ///淇濆瓨鐐瑰嚮浜嬩欢
             saveView.btnClick.MouseUpEventHandler += (sender, e) =>
@@ -460,7 +528,6 @@
         {
             //瀹氫箟涓�涓眬閮╳eekList鍒楄〃鐢ㄦ潵璁板綍閫変腑鏁版嵁;
             List<string> weekStateList = new List<string>();
-
             PublicInterface weekView = new PublicInterface();
             if (Logic.currlogic.cycle.type == "week")
             {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
new file mode 100644
index 0000000..4176826
--- /dev/null
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
@@ -0,0 +1,132 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared;
+namespace HDL_ON.UI.UI2.Intelligence.Automation
+{
+    public class AirQuality : FrameLayout
+    {
+        public AirQuality()
+        {
+            Tag = "Logic";
+        }
+        public void Show()
+        {
+            #region  鐣岄潰甯冨眬
+            LogicView.TopView topView = new LogicView.TopView();
+            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
+            this.AddChidren(topView.FLayoutView());
+            topView.topNameBtn.TextID = StringId.selectionCondition;
+            topView.Location();
+            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
+            {
+                RemoveFromParent();
+            };
+
+            FrameLayout viewLayout = new FrameLayout
+            {
+                Y = Application.GetRealHeight(64 + 20),
+                Width = Application.GetRealWidth(LogicView.TextSize.view375),
+                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 20),
+                BackgroundColor = CSS.CSS_Color.viewMiddle,
+            };
+            this.AddChidren(viewLayout);
+            #endregion
+
+            var list = new List<string> {
+                Language.StringByID(StringId.kongqiyou),
+                Language.StringByID(StringId.kongqiliang),
+                Language.StringByID(StringId.kongqicha),
+            };
+            for (int i = 0; i < list.Count; i++)
+            {
+                LogicView.SelectTypeView view = new LogicView.SelectTypeView();
+                view.frameLayout.Y = Application.GetRealHeight(i * 50);
+                view.btnIcon.Visible = false;
+                view.btnNextIcon.Visible = false;
+                view.btnText.X = Application.GetRealWidth(16);
+                view.btnLine.X = Application.GetRealWidth(16);
+                view.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
+                view.btnText.Text = list[i];
+                view.btnClick.Tag = list[i];
+                viewLayout.AddChidren(view.FLayoutView());
+
+                view.btnClick.MouseUpEventHandler += (sen, e) =>
+                {
+                    string value = "";
+                    string text = view.btnClick.Tag.ToString();
+                    if (text == Language.StringByID(StringId.kongqiyou))
+                    {
+                        //浼�
+                        value = "excellent";
+                    }
+                    else if (text == Language.StringByID(StringId.kongqiliang))
+                    {
+                        //鑹�
+                        value = "good";
+                    }
+                    else if (text == Language.StringByID(StringId.kongqicha))
+                    {
+                        //宸�
+                        value = "poor";
+                    }
+                    AddDic(value);
+                };
+            }
+      
+        }
+        /// <summary>
+        /// 灏佽鏁版嵁
+        /// </summary>
+        /// <param name="value"></param>
+        private void AddDic(string value)
+        {
+            Input input = new Input();
+            input.sid = LogicMethod.NewSid();
+            input.condition_type = "9";
+            Dictionary<string, string> dic = new Dictionary<string, string>();
+            LogicMethod.dictionary(dic, "key", "air_quality");
+            LogicMethod.dictionary(dic, "comparator", "=");
+            LogicMethod.dictionary(dic, "data_type", "string");
+            LogicMethod.dictionary(dic, "value", value);
+            input.condition.Add(dic);
+            AddCondition(input);
+        }
+        /// <summary>
+        /// 娣诲姞鏉′欢
+        /// </summary>
+        /// <param name="input"></param>
+        private void AddCondition(Input input)
+        {
+            ///璁板綍绱㈠紩鍊�
+            int index = -1;
+            for (var i = 0; i < Logic.currlogic.input.Count; i++)
+            {
+                var condition_type = Logic.currlogic.input[i].condition_type;
+                if (condition_type == "9")
+                {
+                    ///鎵惧埌鏍囪绱㈠紩锛岄��鍑哄惊鐜綋
+                    index = i;
+                    break;
+                }
+            }
+            if (index != -1)
+            {
+                //绉婚櫎鏃ф暟鎹�
+                Logic.currlogic.input.RemoveAt(index);
+                //鏂版暟鎹彃鍏ユ棫鏁版嵁鐨勪綅缃�
+                Logic.currlogic.input.Insert(index, input);
+            }
+            else
+            {
+                Logic.currlogic.input.Add(input);
+            }
+
+            LogicMethod.RemoveAllView();
+            AddLogic addLogic = new AddLogic();
+            MainPage.BasePageView.AddChidren(addLogic);
+            addLogic.Show();
+            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+        }
+    }
+}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 214e0fc..0dede77 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -391,6 +391,40 @@
                             }
                         }
                         break;
+                    case "9":
+                        {
+                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
+                            foreach (var dic in dicList)
+                            {
+                                string strtext = "";
+                                string value = dic["value"];
+                                switch (value)
+                                {
+                                    case "excellent":
+                                        {
+                                            strtext = Language.StringByID(StringId.kongqiyou);
+
+                                        }
+                                        break;
+                                    case "good":
+                                        {
+
+                                            strtext = Language.StringByID(StringId.kongqiliang);
+
+                                        }
+                                        break;
+                                    case "poor":
+                                        {
+                                            strtext = Language.StringByID(StringId.kongqicha);
+                                        }
+                                        break;
+
+                                }
+                                inputView.btnText.TextID = StringId.kongqizhiliang;
+                                inputView.btnState.Text = strtext;
+                            }
+                        }
+                        break;
 
                 }
                 //鍐嶆缂栬緫鏉′欢鐘舵�佺偣鍑讳簨浠�
@@ -549,6 +583,15 @@
                                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                             }
                             break;
+                        case "9":
+                            {
+
+                                AirQuality airQuality = new AirQuality();
+                                MainPage.BasePageView.AddChidren(airQuality);
+                                airQuality.Show();
+                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                            }
+                            break;
                     }
                 };
                 ///鍒犻櫎鎺т欢
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
new file mode 100644
index 0000000..e183494
--- /dev/null
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
@@ -0,0 +1,144 @@
+锘縰sing System;
+using Shared;
+using System.Collections.Generic;
+
+
+namespace HDL_ON.UI.UI2.Intelligence.Automation
+{
+    public class InputPushText : FrameLayout
+    {
+        public InputPushText()
+        {
+            Tag = "Logic";
+        }
+        public  Action<PushConfigs> action;
+        public void Show(PushConfigs pushConfigs)
+        {
+
+            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
+            LogicView.TopView topView = new LogicView.TopView();
+            topView.topNameBtn.TextID = StringId.fasongtongzhi;
+            this.AddChidren(topView.FLayoutView());
+        
+            FrameLayout viewLayout = new FrameLayout
+            {
+                Y = Application.GetRealHeight(64),
+                Width = Application.GetRealWidth(LogicView.TextSize.view375),
+                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 76),
+                BackgroundColor = CSS.CSS_Color.viewMiddle,
+            };
+            this.AddChidren(viewLayout);
+            #region  閫氱煡鍐呭
+            LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView();
+            addInputTextView.btnIf.TextID = StringId.tongzhineirong;
+            viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12));
+            ///杈撳叆鎺ㄩ�佹枃鏈�
+            EditTextView textBox = new EditTextView//EditText
+            {
+                Y = Application.GetRealHeight(42),
+                X = Application.GetRealWidth(16),
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealHeight(152),
+                TextAlignment = TextAlignment.TopLeft,
+                Radius=(uint)Application.GetRealHeight(12),
+                Text= pushConfigs.pushContent,
+                TextSize = LogicView.TextSize.text14,
+                TextColor= CSS.CSS_Color.textColor,
+                PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100瀛椾互鍐�)",
+                PlaceholderTextColor = CSS.CSS_Color.textCancelColor,
+                BackgroundColor = CSS.CSS_Color.textWhiteColor,
+
+            };
+            viewLayout.AddChidren(textBox);
+            textBox.TextChangeEventHandler += (sender, e) =>
+            {
+                var leng = e.Length;
+                if (leng > 100)
+                {
+                    textBox.Text = e.Substring(0,100);
+#if __Android__
+                    textBox.SetSelectionEnd();
+#endif
+
+                }
+                pushConfigs.pushContent = textBox.Text.Trim();
+
+            };
+            #endregion
+            #region  App鎺ㄩ��
+            LogicView.LogicTypeTitleView appPush = new LogicView.LogicTypeTitleView();
+            appPush.frameLayout.Y = Application.GetRealHeight(206);
+            appPush.frameLayout.Radius = (uint)Application.GetRealHeight(12);
+            appPush.btnText.TextID = StringId.apptuisong;
+            appPush.btnText.X = Application.GetRealWidth(12);
+            viewLayout.AddChidren(appPush.FLayoutView());
+            appPush.btnClick.MouseUpEventHandler += (sender, e) =>
+            {
+                //瀹氫箟涓�涓眬閮ㄨ处鍙峰垪琛ㄧ敤鏉ヨ褰曢�変腑鏁版嵁;
+                List<string> accountList = new List<string>();
+                Loading loading = new Loading();
+                this.AddChidren(loading);
+                loading.Start();
+                new System.Threading.Thread(() =>
+                {
+                    try
+                    {
+                        var userList = Send.GetResidenceMemberAccount();
+                        for (int i = 0; i < userList.Count; i++)
+                        {
+                            var user = userList[i];
+                            accountList.Add(user.Account);
+                        }
+                    }
+                    catch { }
+                    finally
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            loading.Hide();
+                            if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
+                            {
+                                //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+                                accountList.Insert(0, UserInfo.Current.userMobileInfo);
+                            }
+                            else
+                            {
+                                //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+                                accountList.Insert(0, UserInfo.Current.userEmailInfo);
+                            }
+                            PublicInterface view = new PublicInterface();
+                            view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze
+                               , (list) =>
+                               {
+                                   pushConfigs.pushTarget = list;
+                               });
+                        });
+                    }
+                })
+                { IsBackground = true }.Start();
+            };
+
+            #endregion
+            #region  纭
+            LogicView.SaveView saveView = new LogicView.SaveView();
+            saveView.btnSave.TextID = StringId.queren;
+            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            this.AddChidren(saveView.FLayoutView());
+
+            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
+            {
+
+                action(pushConfigs);
+                RemoveFromParent();
+            };
+            saveView.btnClick.MouseUpEventHandler += (e, sen) =>
+            {
+                action(pushConfigs);
+                RemoveFromParent();
+            };
+            #endregion
+
+        }
+       
+    }
+}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
index 6d95d0e..d643f14 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -5,6 +5,7 @@
     /// <summary>
     /// 閫昏緫瀛樺偍鏁版嵁瀵硅薄
     /// </summary>
+    [Serializable]
     public class Logic
     {
 
@@ -48,12 +49,17 @@
         /// 閫昏緫杈撳嚭鐩爣鏁扮粍
         /// </summary>
         public List<Output> output = new List<Output>();
-       
+        /// <summary>
+        /// 鎺ㄩ�侀厤缃�
+        /// </summary>
+        public List<PushConfigs> pushConfigs = new List<PushConfigs>();
+
 
     }
     /// <summary>
     /// 鎵ц鍛ㄦ湡瀵硅薄
     /// </summary>
+    [Serializable]
     public class Cycle
     {
         /// <summary>
@@ -66,6 +72,7 @@
     /// <summary>
     /// 杈撳叆鏉′欢瀵硅薄
     /// </summary>
+    [Serializable]
     public class Input
     {
         /// <summary>
@@ -85,10 +92,15 @@
         /// </summary>
         public string condition_type = "";
         public List<Dictionary<string, string>> condition = new List<Dictionary<string, string>>();
+        /// <summary>
+        /// 鍦扮悊鍥存爮閰嶇疆
+        /// </summary>
+        public Fence geo_fence = new Fence();
     }
     /// <summary>
     /// 杈撳嚭鐩爣瀵硅薄
     /// </summary>
+    [Serializable]
     public class Output
     {
         /// <summary>
@@ -104,7 +116,44 @@
         public string target_type = "";
         public List<Dictionary<string, string>> status = new List<Dictionary<string, string>>();
     }
-
+    /// <summary>
+    /// 鍦扮悊鍥存爮閰嶇疆
+    /// </summary>
+    [Serializable]
+    public class Fence
+    {
+        /// <summary>
+        /// 缁忓害
+        /// </summary>
+        public string longitude = string.Empty;
+        /// <summary>
+        /// 绾害
+        /// </summary>
+        public string latitude = string.Empty;
+        /// <summary>
+        /// 鍗曚綅绫�
+        /// </summary>
+        public string radius = string.Empty;
+    }
+    /// <summary>
+    /// 鎺ㄩ�侀厤缃�
+    /// </summary>
+    [Serializable]
+    public class PushConfigs
+    {
+        /// <summary>
+        /// 鎺ㄩ�佹柟寮�(APP/SMS)
+        /// </summary>
+        public string pushMethod = "APP";
+        /// <summary>
+        /// 鎺ㄩ�佸唴瀹�
+        /// </summary>
+        public string pushContent = string.Empty;
+        /// <summary>
+        /// 鎺ㄩ�佺洰鏍�
+        /// </summary>
+        public List<string> pushTarget = new List<string> {};
+    }
 
 }
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
index 9360e67..90736a0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
@@ -35,7 +35,6 @@
             frameLayout.Height = Application.GetRealHeight(flHeight);
             btnIf.Y= Application.GetRealHeight(btnY);
             frameLayout.AddChidren(btnIf);
-
             return frameLayout;
         }
     }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
index 00a669b..c7d0a64 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
@@ -9,7 +9,7 @@
         /// <summary>
         /// 鏈�涓婇潰鍧梀iew
         /// </summary>
-        public FrameLayout frameLayout = new FrameLayout 
+        public FrameLayout frameLayout = new FrameLayout
         {
             BackgroundColor = CSS.CSS_Color.viewTop,
             Height = Application.GetRealHeight(64),
@@ -22,7 +22,7 @@
         {
             TextSize = TextSize.text18,
             TextColor = CSS.CSS_Color.textColor,
-            Width = Application.GetRealWidth(TextSize.view375-60-60),
+            Width = Application.GetRealWidth(TextSize.view375 - 60 - 60),
             Height = Application.GetRealHeight(25),
             Y = Application.GetRealHeight(30),
             X = Application.GetRealWidth(60)
@@ -62,7 +62,7 @@
         /// <summary>
         /// 璁剧疆鍥炬爣澧炲姞鐑敭澶у皬
         /// </summary>
-        public Button clickSetBtn = new Button 
+        public Button clickSetBtn = new Button
         {
             X = Application.GetRealWidth(337 - 37),
             Width = Application.GetRealWidth(28 + 37),
@@ -82,6 +82,35 @@
             return frameLayout;
         }
         #endregion
+
+        /// <summary>
+        /// 鏄剧ず浣嶇疆
+        /// </summary>
+        public void Location()
+        {
+            //鑾峰彇瀹藉害
+            int widthValue = topNameBtn.GetTextWidth();
+            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
+            Button locationBtn = new Button
+            {
+                Width = Application.GetRealWidth(18),
+                Height = Application.GetRealWidth(18),
+                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
+                Y = Application.GetRealHeight(34 + 1),
+                UnSelectedImagePath = "LogicIcon/location.png",
+            };
+            frameLayout.AddChidren(locationBtn);
+
+            Button textBtn = new Button
+            {
+                Height = Application.GetRealHeight(14),
+                Y = Application.GetRealHeight(57),
+                TextSize = LogicView.TextSize.text10,
+                TextColor = CSS.CSS_Color.textCancelColor,
+                Text = "骞夸笢骞垮窞甯傜暘绂哄尯鐭虫ゼ闀�",
+            };
+            frameLayout.AddChidren(textBtn);
+        }
     }
 }
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index fbfc392..9a56c61 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -123,7 +123,7 @@
         /// <summary>
         ///  鎸�+璺宠浆鍒伴�昏緫鐣岄潰鐨勬柟娉�
         /// </summary>
-        public static void SkipAddLogicPage()
+        public void SkipAddLogicPage()
         {
             Logic.currlogic = new Logic();
             var addLogic = new AddLogic();
@@ -244,7 +244,7 @@
             if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "")
             {
                 var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
-                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date);
+                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date);
                 for (int i = 0; i < dateList.Count; i++)
                 {
                     //娣诲姞閫昏緫ID
@@ -478,12 +478,12 @@
             }
         }
     }
-    class Date
+    class LogicData
     {
         /// <summary>
         /// 浜戠鍞竴id
         /// </summary>
-        public string userLogicId = "";
+        public string userLogicId = ""; 
         /// <summary>
         /// 缃戝叧id
         /// </summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
index 536cc06..18ec0c8 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -388,6 +388,157 @@
 
         }
 
+        /// <summary>
+        /// 瓒呭嚭5涓厓绱犺鐢ㄦ粦鍔ㄦ帶浠�
+        /// </summary>
+        /// <param name="frame">鏄剧ず鍦ㄥ摢涓晫闈㈢殑鐖舵帶浠�</param>
+        /// <param name="list">鏄剧ず鏁版嵁婧�</param>
+        /// <param name="stateList">涔嬪墠鐘舵�佹暟鎹簮</param>
+        /// <param name="titleText">鏍囬</param>
+        /// <param name="action">杩斿洖鍊肩储寮曞��</param>
+        public void FrameOrVvList(FrameLayout frame, List<string> list,List<string>stateList, int titleText, Action<List<string>> action)
+        {
+
+            int line = 0;
+            if (list.Count == 0 || list.Count > 5)
+            {
+                //瓒呭嚭5涓彧鑳介粯璁�5涓�;
+                line = 5;
+            }
+            else
+            {
+                line = list.Count;
+            }
+
+            FrameLayout frameLayout = new FrameLayout
+            {
+                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
+            };
+            frame.AddChidren(frameLayout);
+
+            LogicView.DateView view = new LogicView.DateView();
+            view.btnTitle.TextID = titleText;
+            view.FLayoutView(frameLayout, line);
+            view.btnCancel.MouseUpEventHandler += (sender, e) =>
+            {
+                //绉婚櫎fLayout鐣岄潰
+                frameLayout.RemoveFromParent();
+            };
+            //灏忎簬5浣跨敤
+            FrameLayout frameL = new FrameLayout
+            {
+                Y = Application.GetRealHeight(56),
+                Height = Application.GetRealHeight(50 * line),
+            };
+            //澶т簬5浣跨敤
+            VerticalRefreshLayout verticalRefresh = new VerticalRefreshLayout
+            {
+                Y = Application.GetRealHeight(56),
+                Height = Application.GetRealHeight(50 * 5),
+
+            };
+            verticalRefresh.BeginHeaderRefreshingAction += () =>
+            {
+                //鍏抽棴鍒锋柊View锛�
+                verticalRefresh.EndHeaderRefreshing();
+            };
+
+            if (list.Count == 0)
+            {
+                //Button btnTipNot = new Button
+                //{
+                //    X = Application.GetRealWidth(93),
+                //    Y = Application.GetRealHeight(80),
+                //    Width = Application.GetRealWidth(158),
+                //    Height = Application.GetRealWidth(158),
+                //    UnSelectedImagePath = "TipNot.png",
+
+                //};
+                //view.frameLayout.AddChidren(btnTipNot);
+
+                //Button btnTipNotText = new Button()
+                //{
+                //    Y = btnTipNot.Bottom + Application.GetRealHeight(16),
+                //    Height = Application.GetRealHeight(20),
+                //    TextID = StringId.secnenull,
+                //    TextColor = CSS.CSS_Color.textColor,
+                //    TextSize = LogicView.TextSize.text14,
+                //    TextAlignment = TextAlignment.Center,
+                //};
+                //view.frameLayout.AddChidren(btnTipNotText);
+            }
+            else if (list.Count > 0 && list.Count <= 5)
+            {
+                view.frameLayout.AddChidren(frameL);
+            }
+            else if (list.Count > 5)
+            {
+                view.frameLayout.AddChidren(verticalRefresh);
+
+            }
+            List<string> selecetdList = new List<string>();
+            for (int i = 0; i < list.Count; i++)
+            {
+                string strName = list[i];
+                LogicView.CheckView checkView = new LogicView.CheckView();
+                checkView.btnText.TextSize = LogicView.TextSize.text14;
+                if (list.Count <= 5)
+                {
+                    checkView.frameLayout.Y = Application.GetRealWidth(i * 50);
+                    frameL.AddChidren(checkView.FLayoutView());
+                    if (line - 1 == i)
+                    {
+                        checkView.btnLine.BackgroundColor = CSS.CSS_Color.view;
+                    }
+                }
+                else
+                {
+                    verticalRefresh.AddChidren(checkView.FLayoutView());
+                }
+                if (stateList.Contains(strName)) {
+                    checkView.btnClick.IsSelected = true;
+                    checkView.btnCheckIcon.IsSelected = true;
+                    selecetdList.Add(strName);
+                }
+                checkView.btnText.Text = strName;
+                checkView.btnClick.Tag = strName;//鏍囪
+                //鐐瑰嚮浜嬩欢
+                checkView.btnClick.MouseUpEventHandler += (sender1, e1) =>
+                {
+                    checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected;
+                    checkView.btnCheckIcon.IsSelected = checkView.btnClick.IsSelected;
+                    if (checkView.btnClick.IsSelected)
+                    {
+                        if (!selecetdList.Contains(checkView.btnClick.Tag.ToString()))
+                        {
+                            selecetdList.Add(checkView.btnClick.Tag.ToString());
+                        }
+
+                    }
+                    else
+                    {
+                        if (selecetdList.Contains(checkView.btnClick.Tag.ToString()))
+                        {
+                            selecetdList.Remove(checkView.btnClick.Tag.ToString());
+                        }
+                    }
+                };
+
+            }
+            view.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
+            {
+                if (selecetdList.Count == 0)
+                {
+                    return;
+                }
+                //鍒楄〃绱㈠紩鍊�
+                action(selecetdList);
+                //绉婚櫎fLayout鐣岄潰
+                frameLayout.RemoveFromParent();
+            };
+
+        }
+
 
         /// <summary>
         /// 鑾峰彇鐣岄潰鍒楄〃
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index afb33d1..838ba08 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -4,11 +4,33 @@
 using HDL_ON.DAL.Server;
 using Newtonsoft.Json.Linq;
 using System.Collections.Generic;
+using HDL_ON.Entity;
 
 namespace HDL_ON.UI.UI2.Intelligence.Automation
 {
     public  class Send
     {
+
+        /// <summary>
+        /// 璋冪敤鑾峰彇浣忓畢瀛愯处鍙峰垪琛�
+        /// </summary>
+        public static List<ResidenceMemberInfo> GetResidenceMemberAccount()
+        {
+
+            var responePack = new HttpServerRequest().GetResidenceMemberAccount();
+            if (responePack.Code == StateCode.SUCCESS)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString());
+            }
+            //澶辫触
+            else
+            {
+                //鎻愮ず
+                IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
+            }
+            return new List<ResidenceMemberInfo>();
+        }
+
         /// <summary>
         /// 鑾峰彇閫昏緫ID鍒楄〃
         /// </summary>
@@ -105,6 +127,25 @@
                     outputArray.Add(outputTypeJOb);
                 }
 
+                var pushConfigsArray = new JArray { };
+                if (logic.pushConfigs.Count > 0)
+                {   //聽鎺ㄩ�佹枃鏈�
+                    foreach (var pushConfig in logic.pushConfigs)
+                    {
+                       
+                        var pushConfigJob = new JObject { };
+                        pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
+                        pushConfigJob.Add("pushContent", pushConfig.pushContent);
+                        var accountArray = new JArray { };
+                        foreach (var account in pushConfig.pushTarget)
+                        {
+                            accountArray.Add(account);
+                        }
+                        pushConfigJob.Add("pushTarget", accountArray);
+                        pushConfigsArray.Add(pushConfigJob);
+                    }
+                }
+
                 var logicjArray = new JArray { };
                 var logicIfon = new JObject { };
                 logicIfon.Add("sid", logic.sid);
@@ -115,6 +156,7 @@
                 logicIfon.Add("cycle", cycleJObject);
                 logicIfon.Add("input", inputArray);
                 logicIfon.Add("output", outputArray);
+                logicIfon.Add("pushConfigs", pushConfigsArray);
                 logicjArray.Add(logicIfon);
                 var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                 responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add);
@@ -192,6 +234,25 @@
                     outputArray.Add(outputTypeJOb);
                 }
 
+                var pushConfigsArray = new JArray { };
+                if (logic.pushConfigs.Count > 0)
+                {   //聽鎺ㄩ�佹枃鏈�
+                    foreach (var pushConfig in logic.pushConfigs)
+                    {
+
+                        var pushConfigJob = new JObject { };
+                        pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
+                        pushConfigJob.Add("pushContent", pushConfig.pushContent);
+                        var accountArray = new JArray { };
+                        foreach (var account in pushConfig.pushTarget)
+                        {
+                            accountArray.Add(account);
+                        }
+                        pushConfigJob.Add("pushTarget", accountArray);
+                        pushConfigsArray.Add(pushConfigJob);
+                    }
+                }
+
                 var logicjArray = new JArray { };
                 var logicIfon = new JObject { };
                 logicIfon.Add("userLogicId", logic.userLogicId);
@@ -203,6 +264,8 @@
                 logicIfon.Add("cycle", cycleJObject);
                 logicIfon.Add("input", inputArray);
                 logicIfon.Add("output", outputArray);
+                logicIfon.Add("pushConfigs", pushConfigsArray);
+
                 logicjArray.Add(logicIfon);
                 var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                 responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
index 2d42405..7d58572 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
@@ -18,29 +18,7 @@
             topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
             this.AddChidren(topView.FLayoutView());
             topView.topNameBtn.Text = titelText;
-            //鑾峰彇瀹藉害
-            int widthValue = topView.topNameBtn.GetTextWidth();
-            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
-            Button locationBtn = new Button
-            {
-                Width = Application.GetRealWidth(18),
-                Height = Application.GetRealWidth(18),
-                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
-                Y = Application.GetRealHeight(34 + 1),
-                UnSelectedImagePath = "LogicIcon/location.png",
-
-            };
-            topView.frameLayout.AddChidren(locationBtn);
-
-            Button textBtn = new Button
-            {
-                Height = Application.GetRealHeight(14),
-                Y = Application.GetRealHeight(57),
-                TextSize = LogicView.TextSize.text10,
-                TextColor = CSS.CSS_Color.textCancelColor,
-                Text = "骞夸笢骞垮窞甯傜暘绂哄尯鐭虫ゼ闀�",
-            };
-            topView.frameLayout.AddChidren(textBtn);
+            topView.Location();
             topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
             {
                 RemoveFromParent();
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
index 53bba3f..e11c983 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
@@ -46,6 +46,15 @@
             weatherView.btnText.TextID = StringId.tianqibianhua;
             viewLayout.AddChidren(weatherView.FLayoutView());
 
+            //绌烘皵璐ㄩ噺
+            LogicView.SelectTypeView kongqiViewk = new LogicView.SelectTypeView(); 
+            kongqiViewk.frameLayout.Y = weatherView.frameLayout.Bottom;
+            kongqiViewk.btnIcon.Visible = false;
+            kongqiViewk.btnText.X = Application.GetRealWidth(16);
+            kongqiViewk.btnLine.X = Application.GetRealWidth(16);
+            kongqiViewk.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
+            kongqiViewk.btnText.TextID = StringId.kongqizhiliang;
+            viewLayout.AddChidren(kongqiViewk.FLayoutView());
             #endregion
 
             #region  鎵�鏈夌偣鍑讳簨浠�
@@ -64,7 +73,14 @@
                 weatherCondition.Show();
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
             };
-          
+            //绌烘皵璐ㄩ噺
+            kongqiViewk.btnClick.MouseUpEventHandler += (sen, e) => {
+                AirQuality airQuality = new AirQuality();
+                MainPage.BasePageView.AddChidren(airQuality);
+                airQuality.Show();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            };
+
             #endregion
         }
     }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
index c8a71b6..fbe50e2 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
@@ -16,29 +16,7 @@
             topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
             this.AddChidren(topView.FLayoutView());
             topView.topNameBtn.TextID = StringId.selectionCondition;
-            //鑾峰彇瀹藉害
-            int widthValue = topView.topNameBtn.GetTextWidth();
-            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
-            Button locationBtn = new Button
-            {
-                Width = Application.GetRealWidth(18),
-                Height = Application.GetRealWidth(18),
-                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
-                Y = Application.GetRealHeight(34 + 1),
-                UnSelectedImagePath = "LogicIcon/location.png",
-
-            };
-            topView.frameLayout.AddChidren(locationBtn);
-
-            Button textBtn = new Button
-            {
-                Height = Application.GetRealHeight(14),
-                Y = Application.GetRealHeight(57),
-                TextSize = LogicView.TextSize.text10,
-                TextColor = CSS.CSS_Color.textCancelColor,
-                Text = "骞夸笢骞垮窞甯傜暘绂哄尯鐭虫ゼ闀�",
-            };
-            topView.frameLayout.AddChidren(textBtn);
+            topView.Location();
             topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
             {
                 RemoveFromParent();
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 73b8da7..00152c0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -606,7 +606,8 @@
                 else
                 {
                     //璺宠浆鍒伴�昏緫鐣岄潰
-                    UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
+                    UI2.Intelligence.Automation.MainView logicMainView = new UI2.Intelligence.Automation.MainView();
+                    logicMainView.SkipAddLogicPage();
                 }
             };
         }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
index 88f2e84..3271e9e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -459,7 +459,8 @@
         {
             var utcTime = Convert.ToDateTime(str);
             var dateTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
-            var monday = dateTime.ToString("MM") + Language.StringByID(StringId.month) + dateTime.ToString("dd") + Language.StringByID(StringId.day);
+            // var monday = dateTime.ToString("MM") + Language.StringByID(StringId.month) + dateTime.ToString("dd") + Language.StringByID(StringId.day);
+            var monday = dateTime.ToString("MM") + "/" + dateTime.ToString("dd");
             var time = dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
             return monday + " " + time;
         }
@@ -498,16 +499,14 @@
         /// <returns></returns>
         private string getUnlockText(bool if_bool)
         {
-            string s = "";
             if (if_bool)
             {
-                s = Language.StringByID(StringId.yikaisuo);
+                return Language.StringByID(StringId.yikaisuo);
             }
             else
             {
-                s = Language.StringByID(StringId.weikaisuo);
+                return Language.StringByID(StringId.weikaisuo);
             }
-            return s;
         }
         /// <summary>
         /// 鑾峰彇uuid
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
index d4ed6a6..5a8a945 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
@@ -90,13 +90,29 @@
                     var str = HttpWebRequest(NewAPI.API_POST_FL_QRcode, jobject.ToString(), "POST");
                     if (!string.IsNullOrEmpty(str))
                     {
-                        var json = JObject.Parse(str);
-                        if (json != null)
+                        if (str.Contains("status"))
                         {
-                            var stateCode = json["status"].ToString();
-                            if (stateCode == "0")
+                            //var json = JObject.Parse(str);
+                            //if (json != null)
+                            //{
+                            //    var stateCode = json["status"].ToString();
+                            //    if (stateCode == "0")
+                            //    {
+                            //        if_bool = true;
+                            //    }
+                            //}
+                            if_bool = true;
+                        }
+                        else {
+                            var json = JObject.Parse(str);
+                            if (json != null)
                             {
-                                if_bool = true;
+                                var stateCode = json["desc"].ToString();
+                                Application.RunOnMainThread(() =>
+                                {
+                                    //閿欒鎻愮ず
+                                    new Intelligence.Automation.LogicView.TipPopView().FlashingBox(stateCode);
+                                });
                             }
                         }
                     }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
index 20c5da2..dd1c231 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
@@ -37,10 +37,10 @@
             Y = Application.GetRealHeight(10),
             Width = Application.GetRealWidth(120),
             Height = Application.GetRealHeight(20),
-            TextColor = CSS.CSS_Color.textColor,
+            TextColor = CSS.CSS_Color.textCancelColor,
             TextSize = TextSize.text14,
             TextAlignment=TextAlignment.CenterLeft,
-            Text = "15:01",
+            //Text = "15:01",
         };
         /// <summary>
         /// 鐘舵�佹枃鏈�

--
Gitblit v1.8.0