From 8108700f67ddbe1724ee0b1000d9e55a844f6f28 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 30 十一月 2021 15:32:42 +0800
Subject: [PATCH] 提测版本

---
 SiriIntentsUI/MainInterface.storyboard                      |    2 
 SiriIntents/HDLRunSceneIntentHandlder.cs                    |   29 ++
 HDL_ON/Common/HDLCommon.cs                                  |    3 
 HDL_ON/DAL/Server/HttpUtil.cs                               |    4 
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs            |   38 ++-
 SiriIntentsUI/IntentViewController.cs                       |   46 ----
 HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs |  484 +++++--------------------------------------
 .vs/HDL_APP_Project/xs/UserPrefs.xml                        |   49 +++
 SiriIntents/Server/HttpUtil.cs                              |    4 
 9 files changed, 163 insertions(+), 496 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 78e92ec..47602a9 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -3,26 +3,62 @@
     <MonoDevelop.MacDev.AppleDevelopmentTeam />
   </MonoDevelop.Ide.ItemProperties.SiriIntentUI>
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="SiriIntentsUI/IntentViewController.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs">
     <Files>
-      <File FileName="HDL-ON_iOS/Other/SkipControl.cs" Line="68" Column="45" />
       <File FileName="HDL-ON_iOS/Info.plist" />
-      <File FileName="SiriIntentsUI/IntentViewController.cs" Line="1" Column="1" />
+      <File FileName="SiriIntents/HDLRunSceneIntentHandlder.cs" Line="116" Column="96" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs" Line="1" Column="1" />
+      <File FileName="SiriKit/Data/SceneDateManager.cs" Line="41" Column="1" />
+      <File FileName="SiriIntentsUI/IntentViewController.cs" Line="33" Column="48" />
+      <File FileName="SiriIntents/Server/HttpUtil.cs" Line="27" Column="23" />
+      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="20" Column="87" />
+      <File FileName="HDL-ON_Android/LeChengVideo/Form/ReverseCallFragment.cs" Line="293" Column="19" />
+      <File FileName="SiriIntentsUI/IntentViewController.designer.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneAddPage.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs" Line="209" Column="2" />
+      <File FileName="HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs" Line="140" Column="10" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="892" Column="78" />
+      <File FileName="HDL_ON/UI/UI2/UserPageBLL.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/UI/MainPage.cs" Line="38" Column="43" />
+      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1391" Column="38" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
+            <Node name="HDL_ON" expanded="True">
+              <Node name="DAL" expanded="True">
+                <Node name="DriverLayer" expanded="True" />
+                <Node name="Server" expanded="True">
+                  <Node name="HttpServerRequest.cs" selected="True" />
+                </Node>
+              </Node>
+              <Node name="UI" expanded="True">
+                <Node name="UI2" expanded="True">
+                  <Node name="3-Intelligence" expanded="True">
+                    <Node name="Scene" expanded="True" />
+                  </Node>
+                  <Node name="FuntionControlView" expanded="True" />
+                </Node>
+              </Node>
+            </Node>
+            <Node name="HDL-ON_Android" expanded="True">
+              <Node name="LeChengVideo" expanded="True">
+                <Node name="Form" expanded="True" />
+              </Node>
+            </Node>
             <Node name="HDL-ON_iOS" expanded="True">
               <Node name="Other" expanded="True" />
             </Node>
-            <Node name="SiriIntents" expanded="True" />
+            <Node name="SiriIntents" expanded="True">
+              <Node name="Server" expanded="True" />
+            </Node>
             <Node name="SiriIntentsUI" expanded="True">
-              <Node name="IntentViewController.cs" selected="True" />
+              <Node name="IntentViewController.cs" expanded="True" />
             </Node>
             <Node name="SiriKit" expanded="True">
-              <Node name="References" expanded="True" />
               <Node name="Base.lproj" expanded="True" />
+              <Node name="Data" expanded="True" />
             </Node>
           </Node>
         </State>
@@ -51,6 +87,7 @@
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="28" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="14" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs" line="366" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="1359" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 0d45ee0..f1763ee 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -429,6 +429,9 @@
 #if __IOS__
                     //5.娓呯┖Siri鍏变韩鏁版嵁淇℃伅
                     new Other.SkipControl().SetData(false, "", "", "","");
+                    var sDM = new SiriKit.SceneDateManager();
+                    Console.WriteLine($"IsLogin:{sDM.IsLgoin};accessToken:{sDM.AccessToken};refreshToken:{sDM.RefreshToken};RegionUrl:{sDM.RegionUrl};HomeId:{sDM.HomeId}");
+
 #endif
                 }
                 catch (Exception ex)
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 6c692b6..315e9a2 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
         /// <summary>
         /// RegionMark
         /// </summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 10d2b81..e0a6bf2 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -16,6 +16,9 @@
         PageLayout contentPageView;
         Button btnAutomationTitle;
 
+        Button btnAddIconBg;
+
+
         #region 瀹夐槻鍖哄煙
         FrameLayout securityView;
         Button btnSecurityTitle;
@@ -131,6 +134,7 @@
                     };
                     topView.AddChidren(btnSceneTilte);
                     btnAutomationTitle = new Button();
+                    btnAutomationTitle = new Button();
 
                 }
             }
@@ -215,9 +219,10 @@
                         TextID = StringId.Automation,
                     };
                     topView.AddChidren(btnAutomationTitle);
+                    btnAutomationTitle = new Button();
                 }
             }
-            var btnAddIconBg = new Button()
+            btnAddIconBg = new Button()
             {
                 X = Application.GetRealWidth(337),
                 Y = Application.GetRealHeight(29),
@@ -597,6 +602,7 @@
             {
                 if (contentPageView.PageIndex == 2)
                 {
+                    btnAddIconBg.Visible = false;
                     btnSecurityTitle.IsSelected = true;
                     btnSecurityTitle.TextSize = CSS_FontSize.HeadlineFontSize;
                     btnSecurityTitle.IsBold = true;
@@ -609,6 +615,7 @@
                 }
                 else if (contentPageView.PageIndex == 0)
                 {
+                    btnAddIconBg.Visible = true;
                     btnSecurityTitle.IsSelected = false;
                     btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize;
                     btnSecurityTitle.IsBold = false;
@@ -621,6 +628,7 @@
                 }
                 else
                 {
+                    btnAddIconBg.Visible = true;
                     btnSecurityTitle.IsSelected = false;
                     btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize;
                     btnSecurityTitle.IsBold = false;
@@ -661,19 +669,23 @@
                 btnSceneTilte.TextSize = CSS_FontSize.TextFontSize;
                 contentPageView.PageIndex = 1;
             };
-            btnSecurityTitle.MouseUpEventHandler = (sender, e) => {
-                if(btnSecurityTitle.IsSelected )
+            if (btnSecurityTitle != null)
+            {
+                btnSecurityTitle.MouseUpEventHandler = (sender, e) =>
                 {
-                    return;
-                }
-                btnSecurityTitle.IsSelected = true;
-                btnSecurityTitle.TextSize = CSS_FontSize.HeadlineFontSize;
-                btnAutomationTitle.IsSelected = false;
-                btnAutomationTitle.TextSize = CSS_FontSize.TextFontSize;
-                btnSceneTilte.IsSelected = false;
-                btnSceneTilte.TextSize = CSS_FontSize.TextFontSize;
-                contentPageView.PageIndex = 2;
-            };
+                    if (btnSecurityTitle.IsSelected)
+                    {
+                        return;
+                    }
+                    btnSecurityTitle.IsSelected = true;
+                    btnSecurityTitle.TextSize = CSS_FontSize.HeadlineFontSize;
+                    btnAutomationTitle.IsSelected = false;
+                    btnAutomationTitle.TextSize = CSS_FontSize.TextFontSize;
+                    btnSceneTilte.IsSelected = false;
+                    btnSceneTilte.TextSize = CSS_FontSize.TextFontSize;
+                    contentPageView.PageIndex = 2;
+                };
+            }
         }
         #endregion
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
index 583048b..4ff5844 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
@@ -7,29 +7,28 @@
 
 namespace HDL_ON.UI
 {
-  public class AddOutputPage : FrameLayout
-  {
-    FrameLayout bodyView;
+    public class AddOutputPage : FrameLayout
+    {
+        FrameLayout bodyView;
 
-    FrameLayout showdFunctionTypeRow;
+        FrameLayout showdFunctionTypeRow;
 
-    /// <summary>
-    /// 妤煎眰閫夋嫨涓嬫媺鍥炬爣
-    /// </summary>
-    Button btnFloorDownIcon;
-    /// <summary>
-    /// 妤煎眰鏄剧ず
-    /// </summary>
-    Button btnFloor;
+        /// <summary>
+        /// 妤煎眰閫夋嫨涓嬫媺鍥炬爣
+        /// </summary>
+        Button btnFloorDownIcon;
+        /// <summary>
+        /// 妤煎眰鏄剧ず
+        /// </summary>
+        Button btnFloor;
 
-    /// <summary>
-    /// 绛涢�夋枃鏈樉绀�
-    /// </summary>
-    Button btnScreenText;
+        /// <summary>
+        /// 绛涢�夋枃鏈樉绀�
+        /// </summary>
+        Button btnScreenText;
 
-    VerticalScrolViewLayout functionListView;
+        VerticalScrolViewLayout functionListView;
 
-<<<<<<< HEAD
         Action<SecurityAlarm> refreshAction;
         /// <summary>
         /// 鏈湴鍔熻兘杞崲鐨勮緭鍑哄垪琛紙鐏厜銆佸満鏅級
@@ -38,89 +37,19 @@
 
         SecurityAlarm alarm;
 
-        public AddOutputPage(SecurityAlarm inOutput ,Action<SecurityAlarm> action)
+        public AddOutputPage(SecurityAlarm inOutput, Action<SecurityAlarm> action)
         {
             bodyView = this;
             refreshAction = action;
             alarm = inOutput;
         }
-=======
-    SecurityAlarm securityAlarm;
-    Action<SecurityAlarm> refreshAction;
-    List<SecurityOutput> outputList = new List<SecurityOutput>();
-
-    List<Function> allocatedList = new List<Function>();
-
-    public AddOutputPage(SecurityAlarm function, Action<SecurityAlarm> action)
-    {
-      bodyView = this;
-      securityAlarm = function;
-      refreshAction = action;
-    }
->>>>>>> WJC
 
 
-    /// <summary>
-    /// 鍔犺浇鐣岄潰
-    /// </summary>
-    public void LoadPage()
-    {
-      bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-      new TopViewDiv(bodyView, Language.StringByID(StringId.AddFunction)).LoadTopView();
-
-      #region 鏄剧ず鐨勫姛鑳界被鍨嬪垏鎹㈠尯鍩�
-      showdFunctionTypeRow = new FrameLayout()
-      {
-        Y = Application.GetRealHeight(64),
-        Height = Application.GetRealHeight(62),
-        BackgroundColor = CSS_Color.MainBackgroundColor,
-      };
-      bodyView.AddChidren(showdFunctionTypeRow);
-
-
-      btnFloorDownIcon = new Button()
-      {
-        Width = Application.GetMinRealAverage(16),
-        Height = Application.GetMinRealAverage(16),
-        X = Application.GetRealWidth(16),
-        Y = Application.GetRealHeight(18),
-        UnSelectedImagePath = "Public/DownIcon.png",
-      };
-      showdFunctionTypeRow.AddChidren(btnFloorDownIcon);
-
-      btnFloor = new Button()
-      {
-        X = btnFloorDownIcon.Right,
-        Y = Application.GetRealHeight(18),
-        Width = Application.GetRealWidth(200),
-        Height = Application.GetMinRealAverage(16),
-        TextColor = CSS_Color.FirstLevelTitleColor,
-        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-        TextAlignment = TextAlignment.CenterLeft,
-        Text = DB_ResidenceData.Instance.CurFloor.roomName,
-      };
-      showdFunctionTypeRow.AddChidren(btnFloor);
-
-      #endregion
-
-      functionListView = new VerticalScrolViewLayout()
-      {
-        Y = showdFunctionTypeRow.Bottom,
-        Height = Application.GetRealHeight(530 - 100),
-        BackgroundColor = CSS_Color.BackgroundColor,
-      };
-      bodyView.AddChidren(functionListView);
-
-
-
-
-
-
-      foreach (var function in FunctionList.List.Functions)
-      {
-        if (!MainPage.SceneSupportFunctionList.Contains(function.spk))
+        /// <summary>
+        /// 鍔犺浇鐣岄潰
+        /// </summary>
+        public void LoadPage()
         {
-<<<<<<< HEAD
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
             new TopViewDiv(bodyView, Language.StringByID(StringId.AddFunction)).LoadTopView();
 
@@ -163,7 +92,7 @@
             functionListView = new VerticalScrolViewLayout()
             {
                 Y = showdFunctionTypeRow.Bottom,
-                Height = Application.GetRealHeight(530 -100),
+                Height = Application.GetRealHeight(530 - 100),
                 BackgroundColor = CSS_Color.BackgroundColor,
             };
             bodyView.AddChidren(functionListView);
@@ -201,74 +130,13 @@
                 this.RemoveFromParent();
                 refreshAction?.Invoke(alarm);
             };
-=======
-          continue;
-        }
-        if (function == null)
-        {
-          continue;
-        }
-        function.roomIds.Remove(null);
-        allocatedList.Add(function);
-      }
-
-      LoadFunctionListRow(null);
-
-
-
-
-
-
-
-      var bottomView = new FrameLayout()
-      {
-        Y = Application.GetRealHeight(591),
-        Height = Application.GetRealHeight(100),
-        BackgroundColor = CSS_Color.MainBackgroundColor,
-        Radius = (uint)Application.GetRealWidth(22),
-      };
-      this.AddChidren(bottomView);
-
-      var btnConfrim = new Button()
-      {
-        X = Application.GetRealWidth(78),
-        Y = Application.GetRealHeight(12),
-        Width = Application.GetRealWidth(220),
-        Height = Application.GetRealWidth(44),
-        Radius = (uint)Application.GetRealWidth(22),
-        BackgroundColor = CSS_Color.MainColor,
-        TextID = StringId.Confirm,
-        TextSize = CSS_FontSize.SubheadingFontSize,
-        TextColor = CSS_Color.MainBackgroundColor,
-        TextAlignment = TextAlignment.Center,
-      };
-      bottomView.AddChidren(btnConfrim);
-      btnConfrim.MouseUpEventHandler = (sender, e) =>
-      {
-        securityAlarm.output = new List<SecurityOutput>();
-        foreach (var output in outputList)
-        {
-          if (output.addCondition)
-          {
-            securityAlarm.output.Add(output);
-          }
-        }
-        this.RemoveFromParent();
-        refreshAction?.Invoke(securityAlarm);
-      };
-
-
-
-
->>>>>>> WJC
 
         }
 
-<<<<<<< HEAD
         /// <summary>
         /// 閰嶇疆鏁版嵁
         /// </summary>
-        void SetData(string roomId="")
+        void SetData(string roomId = "")
         {
             allocatedList.Clear();
             foreach (var function in FunctionList.List.GetLightList())
@@ -296,9 +164,6 @@
                     RoomName = function.GetRoomListName(),
                 });
             }
-=======
-    }
->>>>>>> WJC
 
 
             foreach (var scene in FunctionList.List.scenes)
@@ -327,72 +192,10 @@
                 });
             }
 
-    // <summary>
-    /// 鏄剧ず鍔熻兘Row
-    /// </summary>
-    void LoadFunctionListRow(List<Function> functions)
-    {
-      functionListView.RemoveAll();
-      if (functions == null)
-      {
-        functions = allocatedList;
-      }
-      foreach (var function in functions)
-      {
-        var output = securityAlarm.output.Find((obj) => obj.sid == function.sid);
-        if (output == null)
-        {
-          output = new SecurityOutput();
-          output.sid = function.sid;
         }
-        else
-        {
-          output.addCondition = true;
-        }
-        outputList.Add(output);
 
-        FrameLayout functionRow = new FrameLayout()
-        {
-          Height = Application.GetRealHeight(65),
-          BackgroundColor = CSS_Color.MainBackgroundColor,
-        };
-        functionListView.AddChidren(functionRow);
 
-        var btnFunctionName = new Button()
-        {
-          X = Application.GetRealWidth(16),
-          Width = Application.GetRealWidth(200),
-          Height = Application.GetRealHeight(44),
-          Text = function.name,
-          TextAlignment = TextAlignment.CenterLeft,
-          TextColor = CSS_Color.FirstLevelTitleColor,
-          TextSize = CSS_FontSize.TextFontSize,
-        };
-        functionRow.AddChidren(btnFunctionName);
 
-        var btnFunctionFloorName = new Button()
-        {
-          X = Application.GetRealWidth(16),
-          Y = Application.GetRealHeight(24),
-          Width = Application.GetRealWidth(200),
-          Height = Application.GetRealHeight(41),
-          Text = function.GetRoomListName(),
-          TextAlignment = TextAlignment.CenterLeft,
-          TextColor = CSS_Color.PromptingColor1,
-          TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
-        };
-        functionRow.AddChidren(btnFunctionFloorName);
-
-        Button btnState = new Button()
-        {
-          Width = Application.GetRealWidth(317),
-          TextAlignment = TextAlignment.CenterRight,
-          TextSize = CSS_FontSize.TextFontSize,
-          TextColor = CSS_Color.PromptingColor1,
-        };
-        functionRow.AddChidren(btnState);
-
-<<<<<<< HEAD
         // <summary>
         /// 鏄剧ず鍔熻兘Row
         /// </summary>
@@ -404,11 +207,14 @@
                 var output = alarm.output.Find((obj) => obj.sid == function.sid);
                 if (output == null)
                 {
-                    output = new SecurityOutput() { status = new List<SecurityOutputStatus> { new SecurityOutputStatus {
+                    output = new SecurityOutput()
+                    {
+                        status = new List<SecurityOutputStatus> { new SecurityOutputStatus {
                          key = FunctionAttributeKey.OnOff,
                          value = "on"
-                    } } };
-                  
+                    } }
+                    };
+
                     output.sid = function.sid;
                 }
                 //else
@@ -456,7 +262,7 @@
                     TextColor = CSS_Color.PromptingColor1,
                 };
                 functionRow.AddChidren(btnState);
-              
+
 
                 Button btnChooseIcon = new Button()
                 {
@@ -496,7 +302,7 @@
 
                 var localOutput = alarm.output.Find((obj) => obj.sid == output.sid);
 
-                if (localOutput!=null)
+                if (localOutput != null)
                 {
                     btnChooseIcon.IsSelected = true;
                     btnState.Text = output.StateText();
@@ -510,63 +316,30 @@
                     Height = Application.GetRealWidth(1),
                     BackgroundColor = CSS_Color.DividingLineColor,
                 });
-=======
 
-        Button btnChooseIcon = new Button()
-        {
-          X = Application.GetRealWidth(333),
-          Gravity = Gravity.CenterVertical,
-          Width = Application.GetMinRealAverage(32),
-          Height = Application.GetMinRealAverage(32),
-          UnSelectedImagePath = "Public/ChooseIcon.png",
-          SelectedImagePath = "Public/ChooseOnIcon.png",
-        };
-        functionRow.AddChidren(btnChooseIcon);
 
-        btnChooseIcon.MouseUpEventHandler = (sender, e) =>
-        {
-          btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected;
-          if (btnChooseIcon.IsSelected)
-          {
-            output.addCondition = true;
-            if (output.status.Count == 0)
-            {
-              ShowStateDialog(output, btnState, btnChooseIcon);
             }
-          }
-          else
-          {
-            output.addCondition = false;
-          }
-        };
-        btnState.MouseUpEventHandler = (sender, e) =>
-        {
-          ShowStateDialog(output, btnState, btnChooseIcon);
-        };
->>>>>>> WJC
-
-
-        if (output.addCondition)
-        {
-          btnChooseIcon.IsSelected = true;
-          btnState.Text = output.StateText();
         }
 
 
-<<<<<<< HEAD
         private void ShowStateDialog(SecurityOutput output, Button btnState, Button btnChoose = null)
-=======
-        functionListView.AddChidren(new Button()
->>>>>>> WJC
         {
-          Gravity = Gravity.CenterHorizontal,
-          Width = Application.GetRealWidth(343),
-          Height = Application.GetRealWidth(1),
-          BackgroundColor = CSS_Color.DividingLineColor,
-        });
+            Dialog dialog = new Dialog();
 
+            FrameLayout contentView = new FrameLayout();
+            dialog.AddChidren(contentView);
+            contentView.MouseUpEventHandler = (sender, e) =>
+            {
+                dialog.Close();
+                if (output.status.Count == 0)
+                {
+                    if (btnChoose != null)
+                    {
+                        btnChoose.IsSelected = false;
+                    }
+                }
+            };
 
-<<<<<<< HEAD
             VerticalScrolViewLayout optinView = new VerticalScrolViewLayout()
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -606,92 +379,30 @@
             optinView.AddChidren(btnClose);
             if (output.status.Count > 0)
             {
-                btnOpen.IsSelected =  output.status[0].value.ToLower() == "on";
+                btnOpen.IsSelected = output.status[0].value.ToLower() == "on";
                 btnClose.IsSelected = !btnOpen.IsSelected;
             }
-=======
-      }
-    }
-
->>>>>>> WJC
 
 
-    private void ShowStateDialog(SecurityOutput output, Button btnState, Button btnChoose = null)
-    {
-      Dialog dialog = new Dialog();
+            Button btnCancel = new Button()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = optinView.Bottom + Application.GetRealHeight(8),
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealHeight(44),
+                Radius = (uint)Application.GetRealHeight(13),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+                TextID = StringId.Cancel,
+                TextColor = CSS_Color.WarningColor,
+                IsBold = true,
+            };
+            contentView.AddChidren(btnCancel);
 
-      FrameLayout contentView = new FrameLayout();
-      dialog.AddChidren(contentView);
-      contentView.MouseUpEventHandler = (sender, e) =>
-      {
-        dialog.Close();
-        if (output.status.Count == 0)
-        {
-          if (btnChoose != null)
-          {
-            btnChoose.IsSelected = false;
-          }
-        }
-      };
+            dialog.Show();
 
-      VerticalScrolViewLayout optinView = new VerticalScrolViewLayout()
-      {
-        Gravity = Gravity.CenterHorizontal,
-        Y = Application.GetRealHeight(515),
-        Width = Application.GetRealWidth(343),
-        Height = Application.GetRealHeight(88),
-        Radius = (uint)Application.GetRealHeight(13),
-        BackgroundColor = CSS_Color.MainBackgroundColor,
-      };
-      contentView.AddChidren(optinView);
-
-      Button btnOpen = new Button()
-      {
-        Height = Application.GetRealHeight(44),
-        TextAlignment = TextAlignment.Center,
-        TextColor = CSS_Color.MainColor,
-        TextSize = CSS_FontSize.SubheadingFontSize,
-        TextID = StringId.On
-      };
-      optinView.AddChidren(btnOpen);
-
-      optinView.AddChidren(new Button()
-      {
-        Height = 1,
-        BackgroundColor = CSS_Color.DividingLineColor
-      });
-
-      Button btnClose = new Button()
-      {
-        Height = Application.GetRealHeight(44),
-        TextAlignment = TextAlignment.Center,
-        TextColor = CSS_Color.PromptingColor1,
-        TextID = StringId.OFF,
-        TextSize = CSS_FontSize.SubheadingFontSize,
-      };
-      optinView.AddChidren(btnClose);
-
-
-      Button btnCancel = new Button()
-      {
-        Gravity = Gravity.CenterHorizontal,
-        Y = optinView.Bottom + Application.GetRealHeight(8),
-        Width = Application.GetRealWidth(343),
-        Height = Application.GetRealHeight(44),
-        Radius = (uint)Application.GetRealHeight(13),
-        BackgroundColor = CSS_Color.MainBackgroundColor,
-        TextID = StringId.Cancel,
-        TextColor = CSS_Color.WarningColor,
-        IsBold = true,
-      };
-      contentView.AddChidren(btnCancel);
-
-      dialog.Show();
-
-      btnOpen.MouseUpEventHandler = (sender, e) =>
-      {
-        btnState.Text = btnOpen.Text;
-        output.status = new List<SecurityOutputStatus>()
+            btnOpen.MouseUpEventHandler = (sender, e) => {
+                btnState.Text = btnOpen.Text;
+                output.status = new List<SecurityOutputStatus>()
                 {
                     new SecurityOutputStatus()
                     {
@@ -699,7 +410,6 @@
                         value = "on",
                     }
                 };
-<<<<<<< HEAD
                 var localInput = alarm.output.Find((obj) =>
                    obj.sid == output.sid
                 );
@@ -715,27 +425,11 @@
                 btnState.Text = btnClose.Text;
                 output.status = new List<SecurityOutputStatus>()
                 {
-=======
-        output.addCondition = true;
-        if (btnChoose != null)
-        {
-          btnChoose.IsSelected = true;
-        }
-        dialog.Close();
-      };
-
-      btnClose.MouseUpEventHandler = (sender, e) =>
-      {
-        btnState.Text = btnClose.Text;
-        output.status = new List<SecurityOutputStatus>()
-          {
->>>>>>> WJC
                     new SecurityOutputStatus()
                     {
                         key = FunctionAttributeKey.OnOff,
                         value = "off",
                     }
-<<<<<<< HEAD
                 };
                 var localInput = alarm.output.Find((obj) =>
                  obj.sid == output.sid
@@ -760,33 +454,11 @@
 
             };
 
-=======
-          };
-        output.addCondition = true;
-        if (btnChoose != null)
-        {
-          btnChoose.IsSelected = true;
->>>>>>> WJC
-        }
-        dialog.Close();
-      };
-
-      btnCancel.MouseUpEventHandler = (sender, e) =>
-      {
-        dialog.Close();
-        if (output.status.Count == 0)
-        {
-          if (btnChoose != null)
-          {
-            btnChoose.IsSelected = false;
-          }
         }
 
-      };
 
-    }
 
-<<<<<<< HEAD
+
         /// <summary>
         /// 浣忓畢鍒楄〃鐐瑰嚮浜嬩欢
         /// </summary>
@@ -808,33 +480,7 @@
                 }, nowSelectId);
             };
         }
-=======
-
->>>>>>> WJC
 
 
-    /// <summary>
-    /// 浣忓畢鍒楄〃鐐瑰嚮浜嬩欢
-    /// </summary>
-    void LoadDialog_ChangeFloor()
-    {
-      string nowSelectId = null;
-      btnFloor.MouseUpEventHandler += (sender, e) =>
-      {
-        var listAllFun = new List<Function>();
-        listAllFun.AddRange(allocatedList);
-
-              //鏄剧ず涓嬫媺鐣岄潰
-              var form = new FloorRoomSelectPopupView();
-        form.ShowDeviceFunctionView(btnFloor, listAllFun, (selectId, listFun) =>
-              {
-            nowSelectId = selectId;
-                  //閲嶆柊鍒锋柊璁惧鍒楄〃
-                  this.LoadFunctionListRow(listFun);
-          }, nowSelectId);
-      };
     }
-
-
-  }
 }
diff --git a/SiriIntents/HDLRunSceneIntentHandlder.cs b/SiriIntents/HDLRunSceneIntentHandlder.cs
index b053f56..6d260c2 100644
--- a/SiriIntents/HDLRunSceneIntentHandlder.cs
+++ b/SiriIntents/HDLRunSceneIntentHandlder.cs
@@ -29,14 +29,14 @@
                 }
                 else
                 {
-                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
                     if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                     {
                         rsp.SuccessMessage = "璐﹀彿鏈櫥褰�";
                     }
                     else
                     {
-                        rsp.SuccessMessage = "Not logged in to the app";
+                        rsp.SuccessMessage = "Not logged in to the app.";
                     }
                     completion(rsp);
                 }
@@ -55,6 +55,21 @@
             {
                 if (Server.HttpServerRequest.Ins.DataManager.IsLgoin)
                 {
+                    if(Server.HttpServerRequest.Ins.DataManager.HomeId!= intent.HomeId)
+                    {
+                        var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
+                        if (NSLocale.PreferredLanguages[0].Contains("zh-"))
+                        {
+                            rsp.SuccessMessage = "浣忓畢涓嶅尮閰�";
+                        }
+                        else
+                        {
+                            rsp.SuccessMessage = "Residential mismatch.";
+                        }
+                        completion(rsp);
+                        return;
+                    }
+
                     var result = "-1";
                     if (intent.ControlType == "1")
                     {
@@ -78,34 +93,34 @@
                         }
                         else
                         {
-                            rsp.SuccessMessage = "Successful execution";
+                            rsp.SuccessMessage = "Successful execution ";
                         }
                         completion(rsp);
                     }
                     else
                     {
-                        var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+                        var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
                         if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                         {
                             rsp.SuccessMessage = "鎵ц澶辫触";
                         }
                         else
                         {
-                            rsp.SuccessMessage = "Execution failed";
+                            rsp.SuccessMessage = "Execution failed.";
                         }
                         completion(rsp);
                     }
                 }
                 else
                 {
-                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
                     if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                     {
                         rsp.SuccessMessage = "璐﹀彿鏈櫥褰�";
                     }
                     else
                     {
-                        rsp.SuccessMessage = "Not logged in to the app";
+                        rsp.SuccessMessage = "Not logged in to the app.";
                     }
                     completion(rsp);
                 }
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index 56a78a0..f61de04 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
         /// <summary>
         /// RegionMark
         /// </summary>
diff --git a/SiriIntentsUI/IntentViewController.cs b/SiriIntentsUI/IntentViewController.cs
index 18864b6..42435b9 100644
--- a/SiriIntentsUI/IntentViewController.cs
+++ b/SiriIntentsUI/IntentViewController.cs
@@ -16,20 +16,6 @@
         {
         }
 
-        //public override void ViewDidLoad()
-        //{
-        //    base.ViewDidLoad();
-
-        //    // Do any required interface  here.
-        //}
-
-        //public override void DidReceiveMemoryWarning()
-        //{
-        //    // Releases the view if it doesn't have a superview.
-        //    base.DidReceiveMemoryWarning();
-
-        //    // Release any cached data, images, etc that aren't in use.
-        //}
         [Export("configureWithInteraction:context:completion:")]
         public void Configure(INInteraction interaction, INUIHostedViewContext context, Action<CGSize> completion)
         {
@@ -66,38 +52,6 @@
             if (completion != null)
                 completion(true, parameters, size);
 
-
-            //var intent = interaction.Intent as OrderSoupIntent;
-            //if (intent is null)
-            //{
-            //    completion(false, new NSSet<INParameter>(), CGSize.Empty);
-            //}
-
-            //var order = Order.FromOrderSoupIntent(intent);
-
-            //foreach (var view in View.Subviews)
-            //{
-            //    view.RemoveFromSuperview();
-            //}
-
-            //// Different UIs can be displayed depending if the intent is in the 
-            //// confirmation phase or the handle phase.
-            //var desiredSize = CGSize.Empty;
-
-            //if (interaction.IntentHandlingStatus == INIntentHandlingStatus.Ready)
-            //{
-            //    desiredSize = DisplayInvoice(order, intent);
-            //}
-            //else if (interaction.IntentHandlingStatus == INIntentHandlingStatus.Success)
-            //{
-            //    var response = interaction.IntentResponse as OrderSoupIntentResponse;
-            //    if (!(response is null))
-            //    {
-            //        desiredSize = DisplayOrderConfirmation(order, intent, response);
-            //    }
-            //}
-
-            //completion(true, parameters, desiredSize);
         }
 
 
diff --git a/SiriIntentsUI/MainInterface.storyboard b/SiriIntentsUI/MainInterface.storyboard
index 5fc4be2..efb6c1a 100644
--- a/SiriIntentsUI/MainInterface.storyboard
+++ b/SiriIntentsUI/MainInterface.storyboard
@@ -37,7 +37,7 @@
                     <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
                     <size key="freeformSize" width="320" height="81"/>
                     <connections>
-                        <outlet property="lblMsg" destination="IGu-QP-NsY" id="gfv-7M-crM"/>
+                        <outlet property="lblMsg" destination="IGu-QP-NsY" id="z7F-f9-P44"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/>

--
Gitblit v1.8.0