From 41995c4cd30ca1c5a814ea0af6f70d3b86368137 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 20 八月 2021 09:07:07 +0800
Subject: [PATCH] 2021-08-20 09:06:44

---
 HDL-ON_Android/Properties/AndroidManifest.xml                                                |    4 
 HDL-ON_Android/Assets/Language.ini                                                           |   13 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png                          |    0 
 HDL-ON_iOS/HDL-ON_iOS.csproj                                                                 |   13 
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs                            |    1 
 HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs                                  |  163 +++-
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs                                 |    2 
 HDL_ON/DAL/Mqtt/MqttClient.cs                                                                |    2 
 HDL_ON/HDL_ON.projitems                                                                      |    7 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png                     |    0 
 HDL-ON_Android/HDL-ON_Android.csproj                                                         |   13 
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs                                                      |    4 
 HDL-ON_iOS/Info.plist                                                                        |    4 
 HDL_ON/Entity/Enumerative/MyEnum.cs                                                          |   10 
 HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FaceIcon.png                          |    0 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckIcon.png                       |    0 
 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs                                           |   58 +
 HDL_ON/UI/UI1-Login/LoginPage.cs                                                             |   16 
 HDL_ON/Entity/Function/Scene.cs                                                              |    3 
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs  |    4 
 HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs                             |  156 ++++
 HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs                                         |    3 
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs |  129 +++
 HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FaceIcon.png                           |    0 
 HDL_ON/DAL/DriverLayer/Control_Udp.cs                                                        |    7 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png               |    0 
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs      |   57 +
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs                                  |  177 +++++
 HDL_ON/Entity/Function/Function.cs                                                           |   26 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment3.png                          |    0 
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs                          |    2 
 HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs                       |  271 +++++++-
 HDL-ON_Android/Assets/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png                         |    0 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment2.png                          |    0 
 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs                                                    |    9 
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs                                                         |   24 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png                          |    0 
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs                   |    7 
 HDL_ON/Entity/Function/SecurityAlarm.cs                                                      |  147 ++++
 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png                    |    0 
 HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png            |    0 
 HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs                                                  |    4 
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs                                  |    9 
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/ArmSensorHistroyPaging.cs                         |    2 
 HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs                           |   90 ++
 HDL-ON_iOS/Resources/Language.ini                                                            |   31 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                                                         |   85 +
 HDL_ON/DAL/DriverLayer/Control.cs                                                            |   15 
 HDL_ON/UI/MainPage.cs                                                                        |   13 
 HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png           |    0 
 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment3.png                         |    0 
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs            |    2 
 HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png            |    0 
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs                    |  304 +++++++++
 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckIcon.png                      |    0 
 HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png                         |    0 
 HDL_ON/DAL/Server/NewAPI.cs                                                                  |    9 
 HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/RightIcon.png                             |    0 
 HDL_ON/Common/R.cs                                                                           |   53 +
 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png              |    0 
 HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png           |    0 
 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment2.png                         |    0 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/RightIcon.png                              |    0 
 63 files changed, 1,785 insertions(+), 164 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 3faa41f..70db16e 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,30 +1,72 @@
 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/MainPage.cs">
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.220222E9-B9CA-4834-9318-2BC22465F050" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs">
     <Files>
-      <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="2050" Column="6" />
-      <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="33" Column="23" />
-      <File FileName="HDL_ON/Entity/Enumerative/Command.cs" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" />
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPageBLL.cs" />
-      <File FileName="HDL_ON/UI/UI1-Login/RegisterPage.cs" />
-      <File FileName="HDL_ON/UI/UI1-Login/RegisterPageBLL.cs" />
-      <File FileName="HDL_ON/Common/Utlis.cs" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshControlPage.cs" />
-      <File FileName="HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs" Line="492" Column="50" />
-      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="302" Column="78" />
-      <File FileName="HDL_ON/Common/R.cs" Line="1618" Column="39" />
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="1236" Column="74" />
-      <File FileName="HDL-ON_Android/Assets/Language.ini" Line="2138" Column="1" />
-      <File FileName="HDL-ON_iOS/Info.plist" />
-      <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="55" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs" Line="66" Column="23" />
+      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" Line="217" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" Line="114" Column="55" />
+      <File FileName="HDL_ON/Common/R.cs" Line="10" Column="47" />
+      <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="479" Column="30" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
-            <Node name="HDL-ON_iOS" expanded="True" />
+            <Node name="HDL_ON" expanded="True">
+              <Node name="Common" expanded="True" />
+              <Node name="DAL" expanded="True">
+                <Node name="DriverLayer" expanded="True" />
+                <Node name="Server" expanded="True" />
+              </Node>
+              <Node name="Entity" expanded="True">
+                <Node name="Function" expanded="True" />
+              </Node>
+              <Node name="UI" expanded="True">
+                <Node name="UI1-Login" expanded="True" />
+                <Node name="UI2" expanded="True">
+                  <Node name="1-HomePage" expanded="True" />
+                  <Node name="2-Classification" expanded="True" />
+                  <Node name="3-Intelligence" expanded="True" />
+                  <Node name="4-PersonalCenter" expanded="True">
+                    <Node name="AddFunction" expanded="True" />
+                    <Node name="FaceManagement" expanded="True">
+                      <Node name="FacePassagePage.cs" selected="True" />
+                    </Node>
+                    <Node name="PirDevice" expanded="True" />
+                    <Node name="RoomListManage" expanded="True" />
+                  </Node>
+                  <Node name="FuntionControlView" expanded="True">
+                    <Node name="ArmCenter" expanded="True" />
+                    <Node name="Light" expanded="True" />
+                  </Node>
+                </Node>
+              </Node>
+            </Node>
+            <Node name="HDL-ON_Android" expanded="True">
+              <Node name="Assets" expanded="True">
+                <Node name="Phone" expanded="True">
+                  <Node name="FunctionIcon" expanded="True">
+                    <Node name="Light" expanded="True" />
+                  </Node>
+                  <Node name="PersonalCenter" expanded="True">
+                    <Node name="FacePassage" expanded="True" />
+                  </Node>
+                </Node>
+              </Node>
+            </Node>
+            <Node name="HDL-ON_iOS" expanded="True">
+              <Node name="Resources" expanded="True">
+                <Node name="Phone" expanded="True">
+                  <Node name="FunctionIcon" expanded="True">
+                    <Node name="Light" expanded="True">
+                      <Node name="LightScene" expanded="True" />
+                    </Node>
+                  </Node>
+                  <Node name="PersonalCenter" expanded="True" />
+                  <Node name="Public" expanded="True" />
+                </Node>
+              </Node>
+            </Node>
           </Node>
         </State>
       </Pad>
@@ -44,6 +86,9 @@
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Common/ApiUtlis.cs" relfile="HDL_ON/Common/ApiUtlis.cs" line="390" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="422" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" line="747" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" line="106" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" line="348" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" line="54" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 4cb8f50..895b1a4 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -467,7 +467,12 @@
 479=Speed
 480=Environmental sensor
 481=Can start using environmental sensor
-
+482=Gas sensor
+483=Please enter the MAC code of the device
+484=Open
+485=Check/Modify
+486=Defense function / Alarm status
+487=Alarm target after triggering
 
  
 1000=Room Humidity
@@ -1544,6 +1549,12 @@
 479=椋庨��
 480=鐜浼犳劅鍣�
 481=鍙互寮�濮嬩娇鐢ㄧ幆澧冧紶鎰熷櫒浜�
+482=鐕冩皵浼犳劅鍣�
+483=璇疯緭鍏ヨ澶囩殑MAC鐮�
+484=寮�鍚�
+485=鏌ョ湅/淇敼
+486=甯冮槻鍔熻兘/鎶ヨ鐘舵��
+487=瑙﹀彂鍚庡憡璀︾洰鏍�
  
  
 1000=瀹ゅ唴婀垮害
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png
new file mode 100644
index 0000000..ae4999c
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png
new file mode 100644
index 0000000..0dc022e
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/RightIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/RightIcon.png
new file mode 100644
index 0000000..6bd7f63
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/RightIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment2.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment2.png
new file mode 100644
index 0000000..a863138
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment2.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment3.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment3.png
new file mode 100644
index 0000000..fca9f74
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment3.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckIcon.png
new file mode 100644
index 0000000..8eb452d
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png
new file mode 100644
index 0000000..9f7c349
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png
new file mode 100644
index 0000000..5189605
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png
new file mode 100644
index 0000000..fff2f4a
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png
new file mode 100644
index 0000000..ce22eee
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FaceIcon.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FaceIcon.png
new file mode 100644
index 0000000..632eccf
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FaceIcon.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 0758431..aa13318 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -429,6 +429,17 @@
     <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irfan.png" />
     <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\EnvironmentalSensorbg.png" />
     <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorenvironment.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\AirFreshBgIcon.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorenvironment2.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorenvironment3.png" />
+    <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\EnvirSensorQingpingCGS1bg.png" />
+    <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\EnvirSensorQingpingLitebg.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\AddTargetIcon.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\RightIcon.png" />
+    <AndroidAsset Include="Assets\Phone\PersonalCenter\FacePassage\FaceIcon.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\CheckIcon.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\CheckOnIcon.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\SetLightSceneIcon.png" />
   </ItemGroup>
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" />
@@ -1327,6 +1338,8 @@
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Assets\Phone\FunctionIcon\IrFan\" />
+    <Folder Include="Assets\Phone\PersonalCenter\FacePassage\" />
+    <Folder Include="Assets\Phone\FunctionIcon\Light\LightScene\" />
   </ItemGroup>
   <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
   <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index f7e81f7..659e1ff 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,6 +1,6 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107211" android:versionName="1.2.202107211" package="com.hdl.onpro">
-	<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108171" android:versionName="1.2.202108171" package="com.hdl.onpro">
+	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
 	<!--<uses-permission android:name="android.permission.INTERNET" />-->
 	<!--缃戠粶璁块棶-->
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 771b4c0..6f1d223 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -457,6 +457,8 @@
         <Folder Include="Resources\Phone\FunctionIcon\Energy\" />
         <Folder Include="Resources\Phone\FunctionIcon\IrFan\" />
         <Folder Include="Assets.xcassets\device_bg.imageset\" />
+        <Folder Include="Resources\Phone\FunctionIcon\Light\LightScene\" />
+        <Folder Include="Resources\Phone\PersonalCenter\FacePassage\" />
     </ItemGroup>
     <ItemGroup>
         <InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1315,6 +1317,17 @@
       <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irfan_white.png" />
       <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorenvironment.png" />
       <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\EnvironmentalSensorbg.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\AirFreshBgIcon.png" />
+      <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\EnvirSensorQingpingCGS1bg.png" />
+      <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\EnvirSensorQingpingLitebg.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorenvironment2.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorenvironment3.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\CheckIcon.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\CheckOnIcon.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\SetLightSceneIcon.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\ArmCenter\AddTargetIcon.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\ArmCenter\RightIcon.png" />
+      <BundleResource Include="Resources\Phone\PersonalCenter\FacePassage\FaceIcon.png" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 230005a..4edb95c 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
 	<key>UIStatusBarStyle</key>
 	<string>UIStatusBarStyleLightContent</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.2.202108041</string>
+	<string>1.2.202108171</string>
 	<key>CFBundleVersion</key>
-	<string>1.2.08041</string>
+	<string>1.2.08171</string>
 	<key>NSLocationWhenInUseUsageDescription</key>
 	<string>Use geographic location to provide services such as weather</string>
 	<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 4cb8f50..01ffbc4 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -400,7 +400,7 @@
 414=Controller on
 415=Someone
 416=Log
-417=Water Leakage
+417=Water leakage
 418=In Alarm
 419=Normal
 420=Hot dry
@@ -467,6 +467,20 @@
 479=Speed
 480=Environmental sensor
 481=Can start using environmental sensor
+482=Gas sensor
+483=Please enter the MAC code of the device
+484=Open
+485=Check/Modify
+486=Defense function / Alarm status
+487=Alarm target after triggering
+488=Face passage
+489=Apply face ID to:
+490=Community access control
+491=About face ID and privacy
+492=Erase data
+493=Reset face ID
+494=Set face ID
+495=Face passage settings
 
 
  
@@ -1544,7 +1558,20 @@
 479=椋庨��
 480=鐜浼犳劅鍣�
 481=鍙互寮�濮嬩娇鐢ㄧ幆澧冧紶鎰熷櫒浜�
- 
+482=鐕冩皵浼犳劅鍣�
+483=璇疯緭鍏ヨ澶囩殑MAC鐮�
+484=寮�鍚�
+485=鏌ョ湅/淇敼
+486=甯冮槻鍔熻兘/鎶ヨ鐘舵��
+487=瑙﹀彂鍚庡憡璀︾洰鏍�
+488=浜鸿劯閫氳
+489=灏嗛潰瀹笽D搴旂敤浜�:
+490=绀惧尯闂ㄧ閫氳
+491=鍏充簬闈㈠ID涓庨殣绉�
+492=鎶规帀鏁版嵁
+493=閲嶇疆闈㈠
+494=璁剧疆闈㈠
+495=浜鸿劯閫氳璁剧疆
  
 1000=瀹ゅ唴婀垮害
 1001=绔ラ攣
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png
new file mode 100644
index 0000000..ae4999c
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/AirFresh/AirFreshBgIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png
new file mode 100644
index 0000000..0dc022e
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/AddTargetIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/RightIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/RightIcon.png
new file mode 100644
index 0000000..6bd7f63
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/RightIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment2.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment2.png
new file mode 100644
index 0000000..a863138
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment2.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment3.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment3.png
new file mode 100644
index 0000000..fca9f74
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment3.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckIcon.png
new file mode 100644
index 0000000..8eb452d
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png
new file mode 100644
index 0000000..9f7c349
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/CheckOnIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png
new file mode 100644
index 0000000..5189605
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/SetLightSceneIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png
new file mode 100644
index 0000000..fff2f4a
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png
new file mode 100644
index 0000000..ce22eee
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FaceIcon.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FaceIcon.png
new file mode 100644
index 0000000..632eccf
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FaceIcon.png
Binary files differ
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 24c3126..0f89421 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -4,6 +4,59 @@
 {
     public static class StringId
     {
+        public const int FacePassageSetting = 495;
+        /// <summary>
+        /// 璁剧疆闈㈠
+        /// </summary>
+        public const int SetFace = 494;
+        /// <summary>
+        /// 閲嶇疆闈㈠
+        /// </summary>
+        public const int ResetFace = 493;
+        /// <summary>
+        /// 鎶归櫎鏁版嵁
+        /// </summary>
+        public const int EraseData = 492;
+        /// <summary>
+        /// 鍏充簬闈㈠ID涓庨殣绉�
+        /// </summary>
+        public const int AboutFaceIdAndPrivacy = 491;
+        /// <summary>
+        /// 绀惧尯闂ㄧ閫氳
+        /// </summary>
+        public const int CommunityAccessControl = 490;
+        /// <summary>
+        /// 灏嗛潰瀹笽D搴旂敤浜庯細
+        /// </summary>
+        public const int ApplyFaceIdTo = 489;
+        /// <summary>
+        /// 浜鸿劯閫氳
+        /// </summary>
+        public const int FacePassage = 488;
+        /// <summary>
+        /// 瑙﹀彂鍚庡憡璀︾洰鏍�
+        /// </summary>
+        public const int AlarmTargetAfterTriggering = 487;
+        /// <summary>
+        /// 甯冮槻鍔熻兘/鎶ヨ鐘舵��
+        /// </summary>
+        public const int DefenseFunctionArmState = 486;
+        /// <summary>
+        /// 鏌ョ湅/淇敼
+        /// </summary>
+        public const int CheckModify = 485;
+        /// <summary>
+        /// 寮�鍚�
+        /// </summary>
+        public const int OpenArm = 484;
+        /// <summary>
+        /// 璇疯緭鍏ifi-mac鐮�
+        /// </summary>
+        public const int PlsEntryMacCode = 483;
+        /// <summary>
+        /// 鐕冩皵浼犳劅鍣�
+        /// </summary>
+        public const int SensorGas = 482;
         /// <summary>
         /// 鍙互寮�濮嬩娇鐢ㄧ幆澧冧紶鎰熷櫒浜�
         /// </summary>
diff --git a/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs b/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
index ecd149d..91acb3a 100644
--- a/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
+++ b/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
@@ -59,6 +59,10 @@
         /// </summary>
         public const string SearchLoaclGatewayReply = "/user/all/custom/gateway/search_reply";
         /// <summary>
+        /// 缃戝叧骞挎挱鏁版嵁
+        /// </summary>
+        public const string GatewayBroadcast = "/user/all/custom/gateway/broadcast";
+        /// <summary>
         /// 璋冭瘯杞欢涓婁紶oid鍒楄〃
         /// </summary>
         public const string AddDeviceOids = "/user/onpro/custom/device/add";
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 7cbe4d6..99c5b0e 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -26,7 +26,6 @@
     public class Control
     {
        
-
         static Control _control;
         public static Control Ins
         {
@@ -323,6 +322,15 @@
                 }
             }
         }
+        /// <summary>
+        /// 瀹夐槻鎺у埗
+        /// </summary>
+        public void ControlArm()
+        {
+            DAL.Server.HttpServerRequest httpServer = new DAL.Server.HttpServerRequest();
+            //var pack = httpServer.GetSecurityAlarmLogList
+        }
+
 
         /// <summary>
         /// 鍙戦�佸懡浠�
@@ -705,8 +713,9 @@
                 //}
                 receiveObj.BodyDataString = res[1];
 
-                if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply)
+                if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply || receiveObj.Topic == CommunicationTopic.GatewayBroadcast)
                 {
+                   
                     var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]);
                     if (bodyJObj == null)
                     {
@@ -922,6 +931,8 @@
                                 EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                 break;
                             case SPK.SensorEnvironment:
+                            case SPK.SensorEnvironment2:
+                            case SPK.SensorEnvironment3:
                                 if (localFunction.GetAttributes().Contains(FunctionAttributeKey.Temperature))
                                 {
                                     HomePage.LoadEvent_RefreshEnvirIndoorTemp();
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index 160eee7..37ee1e3 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -50,7 +50,7 @@
         /// <summary>
         /// 鍙戦�佹暟鎹紝涓嶉渶瑕佺瓑寰呭洖澶�
         /// </summary>
-        public void ControlBytesSend(Command command, byte subnetID, byte deviceID, byte[] gatewayBytes, int sendCount = 3)
+        public void ControlBytesSend(Command command, byte subnetID, byte deviceID, byte[] gatewayBytes, int sendCount = 3,bool reSend = false)
         {
 #if DEBUG
             string ddd = "";
@@ -69,7 +69,8 @@
                 SubnetID = subnetID,
                 DeviceID = deviceID,
                 AddData = gatewayBytes,
-            }, sendCount, false);
+            }, 3, true);
+            //}, sendCount, reSend);
         }
 
         /// <summary>
@@ -423,7 +424,7 @@
         /// </summary>
         /// <param name="commandString"></param>
         /// <returns></returns>
-        public void WriteBusData(Function function, Dictionary<string, string> commandDictionary)
+        public void WriteBusData(Function function, Dictionary<string, string> commandDictionary,bool reSend = false)
         {
             try
             {
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index b7de875..ab7a620 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -641,8 +641,6 @@
                                         .WithCleanSession()
                                         .WithProtocolVersion(MQTTnet.Formatter.MqttProtocolVersion.V311)
                                         .WithCommunicationTimeout(new TimeSpan(0, 0, 10))
-                                        //.WithCommunicationTimeout (new TimeSpan (0, 0, 5))
-                                        //.WithCommunicationTimeout (new TimeSpan (0, 1, 0))
                                         .Build();
 
                     await DisConnectRemoteMqttClient("StartRemoteMqtt");
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 40200dd..b78df5d 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -630,11 +630,6 @@
         /// </summary>
         public const string API_POST_FL_HangUp = "/home-wisdom/app/fl/vi/hang-up";
         /// <summary>
-        /// 鑾峰彇閫氳瘽璁板綍
-        /// </summary>
-        //public const string API_POST_FL_GetCallList = "/home-wisdom/app/fl/vi/list";
-        public const string API_POST_FL_GetCallList = "/home-wisdom/platform/imou/listCallRecords";
-        /// <summary>
         /// 鍒犻櫎閫氳瘽璁板綍
         /// </summary>
         public const string API_POST_FL_DeleteCallInfo = "/home-wisdom/app/fl/vi/delete";
@@ -662,6 +657,10 @@
         /// 鏇存敼閫氳瘽鐘舵��
         /// </summary>
         public const string API_POST_VideoDevice_UpdateCallStatus = "/home-wisdom/platform/imou/updateCallStatus";
+        /// <summary>
+        /// 鑾峰彇閫氳瘽璁板綍
+        /// </summary>
+        public const string API_POST_FL_GetCallList = "/home-wisdom/platform/imou/listCallRecords";
         #endregion
 
 
diff --git a/HDL_ON/Entity/Enumerative/MyEnum.cs b/HDL_ON/Entity/Enumerative/MyEnum.cs
index d365658..1282a71 100644
--- a/HDL_ON/Entity/Enumerative/MyEnum.cs
+++ b/HDL_ON/Entity/Enumerative/MyEnum.cs
@@ -45,11 +45,15 @@
         /// <summary>
         /// 鏅�氬満鏅�
         /// </summary>
-        OrdinaryScenes = 1,
+        OrdinaryScenes = 0,
         /// <summary>
-        /// 鐢靛奖changing
+        /// 鐢靛奖鍦烘櫙
         /// </summary>
-        MovieScene = 2,
+        MovieScene = 1,
+        /// <summary>
+        /// 鐏厜鍦烘櫙
+        /// </summary>
+        LightScene = 2,
     }
     /// <summary>
     /// 鍔熻兘绫诲瀷
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index b9e3102..3202c35 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1228,7 +1228,7 @@
             spkList.Add(SensorDoorWindow);
             spkList.Add(SensorSmoke);
             spkList.Add(SensorWater);
-            //spkList.Add(SensorGas);
+            spkList.Add(SensorGas);
             //spkList.Add(SensorShanLan);
             //spkList.Add(SensorDuiShe);
             //spkList.Add(SensoruUtrasonic);
@@ -1266,6 +1266,14 @@
         /// 璇pk鍔熻兘鏄幆澧冧紶鎰熷櫒鍔熻兘鐨勯泦鎴�
         /// </summary>
         public const string SensorEnvironment = "sensor.environment";
+        /// <summary>
+        /// 闈掕悕鐜浼犳劅鍣�
+        /// </summary>
+        public const string SensorEnvironment2 = "sensor.environment2";
+        /// <summary>
+        /// 闈掕悕鐜浼犳劅鍣�
+        /// </summary>
+        public const string SensorEnvironment3 = "sensor.environment3";
 
         /// <summary>
         /// 鐜浼犳劅鍣╯pk鍒楄〃
@@ -1280,8 +1288,24 @@
             spkList.Add(SensorTVOC);
             spkList.Add(SensorHumidity);
             spkList.Add(SensorEnvironment);
+            spkList.Add(SensorEnvironment2);
+            spkList.Add(SensorEnvironment3);
             return spkList;
         }
+
+        /// <summary>
+        /// 鐜浼犳劅鍣ㄨ澶囧垪琛�
+        /// </summary>
+        /// <returns></returns>
+        public static List<string> EvironmentSensorList()
+        {
+            var spkList = new List<string>();
+            spkList.Add(SensorEnvironment);
+            spkList.Add(SensorEnvironment2);
+            spkList.Add(SensorEnvironment3);
+            return spkList;
+        }
+
         #endregion
         #endregion
 
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 29a3503..9399392 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -77,6 +77,9 @@
         public string group = "1";
         /// <summary>
         /// 鍦烘櫙绫诲瀷
+        /// 0:鏅��
+        /// 1:鐢靛奖
+        /// 2:璋冨厜
         /// </summary>
         public SceneType sceneType = SceneType.OrdinaryScenes;
         /// <summary>
diff --git a/HDL_ON/Entity/Function/SecurityAlarm.cs b/HDL_ON/Entity/Function/SecurityAlarm.cs
index eeab50e..e342c89 100644
--- a/HDL_ON/Entity/Function/SecurityAlarm.cs
+++ b/HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -1,6 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
 using HDL_ON.Common;
+using Shared;
 
 namespace HDL_ON.Entity
 {
@@ -130,7 +131,7 @@
     /// <summary>
     /// 瀹夐槻杈撳叆
     /// </summary>
-public class SecurityInput
+    public class SecurityInput
     {
         /// <summary>
         /// 杈撳叆鏉′欢锛堝姛鑳斤級鐨剆id
@@ -145,6 +146,88 @@
         /// 瀹夐槻杈撳叆鏉′欢
         /// </summary>
         public List<SecurityInputCondition> condition = new List<SecurityInputCondition>();
+
+        [Newtonsoft.Json.JsonIgnore]
+        Function _function = null;
+        /// <summary>
+        /// 瀵瑰簲鐨勫姛鑳藉璞�
+        /// </summary>
+        /// <returns></returns>
+        public Function GetFunction()
+        {
+            if (_function == null)
+            {
+                _function = FunctionList.List.Functions.Find((obj) => obj.sid == sid);
+            }
+            return _function;
+        }
+
+        /// <summary>
+        /// 鐘舵�佹枃鏈�
+        /// </summary>
+        /// <returns></returns>
+        public string StateText ()
+        {
+            string text = "";
+            switch(GetFunction().spk)
+            {
+                case SPK.SensorGas:
+                case SPK.SensorSmoke:
+                    foreach (var con in condition)
+                    {
+                        if (con.value == "true")
+                        {
+                            text += Language.StringByID(StringId.InAlarm) + " ";
+                        }
+                        else if (con.value == "false")
+                        {
+                            text += Language.StringByID(StringId.Normal) + " ";
+                        }
+                    }
+                    break;
+                case SPK.SensorPir:
+                    foreach (var con in condition)
+                    {
+                        if (con.value == "true")
+                        {
+                            text += Language.StringByID(StringId.youren) + " ";
+                        }
+                        else if (con.value == "false")
+                        {
+                            text += Language.StringByID(StringId.wuren) + " ";
+                        }
+                    }
+                    break;
+                case SPK.SensorWater:
+                    foreach (var con in condition)
+                    {
+                        if (con.value == "true")
+                        {
+                            text += Language.StringByID(StringId.WaterLeakage) + " ";
+                        }
+                        else if (con.value == "false")
+                        {
+                            text += Language.StringByID(StringId.Normal) + " ";
+                        }
+                    }
+                    break;
+                case SPK.SensorDoorWindow:
+                    foreach (var con in condition)
+                    {
+                        if (con.value == "true")
+                        {
+                            text += Language.StringByID(StringId.Open) + " ";
+                        }
+                        else if (con.value == "false")
+                        {
+                            text += Language.StringByID(StringId.Close) + " ";
+                        }
+                    }
+                    break;
+            }
+
+            return text;
+        }
         
     }
     /// <summary>
@@ -179,9 +262,11 @@
     {
         /// <summary>
         /// 鎺у埗鐩爣绫诲瀷
-        /// 璁惧锛�0锛屽満鏅�1锛岃嚜鍔ㄥ寲2
+        /// 0:璁惧
+        /// 1:鍦烘櫙
+        /// 2:鑷姩鍖�
         /// </summary>
-        public string target_type;
+        public string target_type ="0";
         /// <summary>
         /// 杈撳嚭鐩爣鐨剆id
         /// </summary>
@@ -190,6 +275,62 @@
         /// 瀹夐槻杈撳嚭鐘舵��
         /// </summary>
         public List<SecurityOutputStatus> status = new List<SecurityOutputStatus>();
+
+        [Newtonsoft.Json.JsonIgnore]
+        Function _function = null;
+        /// <summary>
+        /// 瀵瑰簲鐨勫姛鑳藉璞�
+        /// </summary>
+        /// <returns></returns>
+        public Function GetFunction()
+        {
+            if (_function == null)
+            {
+                _function = FunctionList.List.Functions.Find((obj) => obj.sid == sid);
+            }
+            return _function;
+        }
+
+
+        /// <summary>
+        /// 鐘舵�佹枃鏈�
+        /// </summary>
+        /// <returns></returns>
+        public string StateText()
+        {
+            string text = "";
+            if (target_type == "0")
+            {
+                switch (GetFunction().spk)
+                {
+                    case SPK.LightDimming:
+                    case SPK.LightCCT:
+                    case SPK.LightRGB:
+                    case SPK.LightSwitch:
+                        foreach (var state in status)
+                        {
+                            if (state.key == FunctionAttributeKey.Brightness)
+                            {
+                                if (state.value == "0")
+                                {
+                                    text = Language.StringByID(StringId.Close);
+                                }
+                                else
+                                {
+                                    text = Language.StringByID(StringId.Open);
+                                }
+                            }
+                        }
+                        break;
+                }
+            }else if(target_type == "1")
+            {
+
+            }
+
+            return text;
+        }
+
     }
     /// <summary>
     /// 瀹夐槻杈撳嚭鐘舵��
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 884e206..403a3a5 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -467,6 +467,11 @@
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\Buttons.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\SensorEnvironmentManagerPage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\AddSensorEnvironmentPage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AirFreshRelayControlPage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\SensorGasPage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\AddQingpingSensorEnvirTipPage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\LightScene\AddLightScene.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\FacePassagePage.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
@@ -491,5 +496,7 @@
     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorMegahealth\" />
     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\MiniRemoteControl\" />
     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\" />
+    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\LightScene\" />
+    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\" />
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index bbe83c6..291c974 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "1.2.0721";
+        public static string VersionString = "1.2.0817";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
@@ -401,7 +401,16 @@
                     {
                         if (view != null)
                         {
-                            if(view.Tag.ToString() != "unlockpage")
+                            if(view.Tag!=null )
+                            {
+                                if (view.Tag.ToString() != "unlockpage")
+                                {
+                                    view.RemoveFromParent();
+                                }else
+                                {
+                                    result = 2;
+                                }
+                            }else
                             {
                                 view.RemoveFromParent();
                             }
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 0f50349..c0df69b 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -148,6 +148,11 @@
                         smPage.ShowColltionButton = false;
                         smPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
+                    case SPK.SensorGas:
+                        var gasPage = new SensorGasPage();
+                        gasPage.ShowColltionButton = false;
+                        gasPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
+                        break;
                     case SPK.ClothesHanger:
                         var clothesHangerpage = new ClothesHangerPage();
                         clothesHangerpage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
@@ -169,6 +174,10 @@
                         var airFresh1 = new AirFreshControlPage();
                         airFresh1.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
+                    case SPK.AirFreshStandard:
+                        var airFresh2 = new AirFreshRelayControlPage();
+                        airFresh2.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
+                        break;
                 }
             };
             return eventHandler;
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 6c5d2dc..d3350be 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -210,7 +210,7 @@
                     //etAccount.Text = "18022428438";//wjc
                     //etAccount.Text = "13602944661";//kx
                     //etAccount.Text = "13226233133";//璞嗚眴
-                    //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// "13415629083"//cf;;
+                    //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// ""//cf;;
                     //etAccount.Text = "18316120654";//tujie
                     // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 
                     etAccount.Text = "15626203746";
@@ -222,22 +222,24 @@
                     //etAccount.Text = "464027401@qq.com";//
                     //etAccount.Text = "15217626103";//
                     //etAccount.Text = "13682244600";//娉㈠摜
-                    //etAccount.Text = "13168123446";//鏄嗘槑閲戣寕椤圭洰锛屾柊椋庨棶棰�
+                    etAccount.Text = "13168123446";//鏄嗘槑閲戣寕椤圭洰锛屾柊椋庨棶棰�
                     //etAccount.Text = "2949126848@qq.com";//闄堢惓
-                    //etAccount.Text = "13168123446";
+                    //etAccount.Text = "13415629083";
                     //etAccount.Text = "13676202754";//宸存灄鏈嶅姟鍣�
                     //etAccount.Text = "13602944661";//kx
-                    etAccount.Text = "551775569@qq.com";//wcf
+                    //etAccount.Text = "551775569@qq.com";//wcf
                     //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
                     //etAccount.Text = "15971583093";//楂樿儨
-                    //etAccount.Text = "15217626103";//鏄嗘槑閲戣寕椤圭洰
+                    etAccount.Text = "15217626103";//鏄嗘槑閲戣寕椤圭洰
+                    //etAccount.Text = "18598273624";
                 }
                 b = !b;
                 etPassword.Text = "123456";
                 if(etAccount.Text == "15626203746")
                 {
-                    etPassword.Text = "12345678";
+                    etPassword.Text = "123456";
                 }
+                //etPassword.Text = "Hdl85521566";
                 btnLogin.IsSelected = true;
             };
 #endif
@@ -1136,7 +1138,7 @@
             frameRow.AddChidren(agreeView);
             if(Language.CurrentLanguage == "Chinese")
             {
-                agreeView.X = Application.GetRealWidth(82);
+                agreeView.X = Application.GetRealWidth(52);
             }
             //鍚屾剰鍥炬爣鎸夐挳
             var agreeBtn = new Button()
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 189c239..5a4f32e 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -194,7 +194,7 @@
                 #region 鐜鏁版嵁
                 var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature);
                 var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity);
-                var enviList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment);
+                var enviList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => SPK.EvironmentSensorList().Contains(obj.spk));
                 foreach (var enviTemp in enviList)
                 {
                     var humiAttr = enviTemp.attributes.Find((obj) => obj.key == "humidity");
@@ -501,6 +501,28 @@
 
 
 #if DEBUG
+            //FunctionList.List.Functions.Add(new Function()
+            //{
+            //    spk = SPK.AirFreshStandard,
+            //    name = "娴嬭瘯鏂伴",
+            //    attributes = new List<FunctionAttributes>()
+            //    {
+            //        new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
+            //        new FunctionAttributes(){ key = "fan",curValue= "on",state = "on" ,value = new List<string>(){ "high","low" } },
+            //    },
+            //});
+
+            //FunctionList.List.Functions.Add(new Function() {
+            //    spk = SPK.SensorGas,
+            //    name = "鐕冩皵浼犳劅鍣�",
+            //    attributes = new List<FunctionAttributes> ()
+            //    {
+            //        new FunctionAttributes(){ key = "enable",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
+            //        new FunctionAttributes(){ key = "status",curValue= "normal",state = "normal" ,value = new List<string>(){ "alarm", "normal" } },
+                    
+            //    },
+            //});
+
             //FunctionList.List.Functions.Add(new Function() { spk = SPK.PjtIr, name = "娴嬭瘯鎶曞奖浠�",
             //                            attributes = new List<FunctionAttributes>() {
             //                                new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 51aeb25..8cb90b4 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -32,7 +32,7 @@
                 if (bodyView != null)
                 {
                     var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity);
-                    var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment);
+                    var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => SPK.EvironmentSensorList().Contains(obj.spk ));
                     foreach (var enviTemp in enviSensorList)
                     {
                         var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "humidity");
@@ -79,7 +79,7 @@
                 if (bodyView != null)
                 {
                     var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature);
-                    var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment);
+                    var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => SPK.EvironmentSensorList().Contains(obj.spk));
                     foreach (var enviTemp in enviSensorList)
                     {
                         var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "temperature");
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index d6af876..7018eb5 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -104,7 +104,6 @@
                         {
                             GetEditState(device, index, view.btnState, null, null, null);
                         }
-
                     }
                     break;
                 //骞叉帴鐐�
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs
new file mode 100644
index 0000000..9d62c19
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs
@@ -0,0 +1,129 @@
+锘縰sing System;
+using HDL_ON.DAL.Server;
+using HDL_ON.Entity;
+using HDL_ON.Stan;
+using Shared;
+
+namespace HDL_ON.UI
+{
+    public class AddQingpingSensorEnvirTipPage : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 娣诲姞璁惧瀹屾垚涔嬪悗鐨勫洖璋冧簨浠�
+        /// </summary>
+        public Action<Function> AddDeviceEvent = null;
+
+        IntegratedBrandDevice integratedDevice = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm(IntegratedBrandDevice device)
+        {
+            integratedDevice = device;
+            if (Language.CurrentLanguage == "Chinese")
+            {
+                //璁剧疆澶撮儴淇℃伅
+                base.SetTitleText(Language.StringByID(StringId.Add) + device.productName);
+            }
+            else
+            {
+                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.productName);
+            }
+            //杩欎釜鐣岄潰鐨勮儗鏅渶瑕佺櫧鑹�
+            bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //鍥剧墖
+            var btnPic = new PicViewControl(132, 132);
+            btnPic.Y = Application.GetRealHeight(69);
+            btnPic.Gravity = Gravity.CenterHorizontal;
+            if(integratedDevice.spk == SPK.SensorEnvironment3)
+            {
+                btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png";
+            }else if (integratedDevice.spk == SPK.SensorEnvironment2)
+            {
+                btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png";
+            }
+            bodyFrameLayout.AddChidren(btnPic);
+
+            //璇疯緭鍏ヨ澶囨満涓婄殑sn鐮�
+            var textView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(309 - 64),
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(319),
+                Height = Application.GetRealHeight(144),
+            };
+            bodyFrameLayout.AddChidren(textView);
+
+            Button btnTipTitle = new Button()
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS.CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS.CSS_FontSize.TextFontSize,
+                Text = "璇蜂笅杞解�滈潚钀�+鈥滱PP涓鸿澶囬厤缃綉缁�",
+                IsBold = true,
+                IsMoreLines = true,
+                Height = Application.GetRealHeight(30),
+            };
+            textView.AddChidren(btnTipTitle);
+            if(Language.CurrentLanguage != "Chinese")
+            {
+                btnTipTitle.Text = "Please download the 'Qingping +' app to configure the network for the device";
+            }
+            Button btnTipMsg = new Button()
+            {
+                Y = btnTipTitle.Bottom,
+                TextAlignment = TextAlignment.TopCenter,
+                TextColor = CSS.CSS_Color.PromptingColor1,
+                TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel,
+                Text = @"缃戠粶閰嶇疆瀹屾垚鍚庯紝鐐瑰嚮璇ヨ澶囨煡鐪嬫暟鎹〉闈紝{0}鐐瑰嚮鍙充笂瑙掕缃姛鑳絳0}鎵惧埌鈥淲IFI - MAC鈥濆苟澶嶅埗鏀筂AC鐮�",
+                IsMoreLines = true,
+                Height = Application.GetRealHeight(80),
+            };
+            textView.AddChidren(btnTipMsg);
+            if (Language.CurrentLanguage != "Chinese")
+            {
+                btnTipMsg.Text = @"After the network configuration is completed, click the device to view the data page,{0}Click the setting function in the upper right corner{0}Find 鈥榳ifi-mac' and copy the modified MAC code";
+            }
+            btnTipMsg.Text = btnTipMsg.Text.Replace("{0}", "\r\n");
+            //涓嬩竴姝�
+            var btnNext = this.AddBottomClickButton(Language.StringByID(StringId.Next));
+            btnNext.ButtonClickEvent += (sender, e) =>
+            {
+                var form2 = new AddSensorEnvironmentPage();
+                form2.AddForm(integratedDevice);
+                form2.AddDeviceEvent = AddDeviceEvent;
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 鍏抽棴鐣岄潰___________________________
+
+        /// <summary>
+        /// 鍏抽棴鐣岄潰
+        /// </summary>
+        public override void CloseFormBefore()
+        {
+            this.AddDeviceEvent = null;
+            base.CloseFormBefore();
+        }
+
+        #endregion
+    }
+}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
index 2baa570..0d1da43 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
@@ -7,7 +7,7 @@
 namespace HDL_ON.UI
 {
     /// <summary>
-    /// 娣诲姞姣背娉㈡楠�1鐣岄潰
+    /// 娣诲姞鐜浼犳劅鍣ㄦ楠�1鐣岄潰
     /// </summary>
     public class AddSensorEnvironmentPage : EditorCommonForm
     {
@@ -18,6 +18,8 @@
         /// </summary>
         public Action<Function> AddDeviceEvent = null;
 
+        IntegratedBrandDevice integratedDevice = null;
+
         #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
@@ -26,6 +28,7 @@
         /// </summary>
         public void ShowForm(IntegratedBrandDevice device)
         {
+            integratedDevice = device;
             if (Language.CurrentLanguage == "Chinese")
             {
                 //璁剧疆澶撮儴淇℃伅
@@ -51,7 +54,18 @@
             var btnPic = new PicViewControl(132, 132);
             btnPic.Y = Application.GetRealHeight(69);
             btnPic.Gravity = Gravity.CenterHorizontal;
-            btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvironmentalSensorbg.png";
+            if (integratedDevice.spk == SPK.SensorEnvironment3)
+            {
+                btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvirSensorQingpingLitebg.png";
+            }
+            else if (integratedDevice.spk == SPK.SensorEnvironment2)
+            {
+                btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvirSensorQingpingCGS1bg.png";
+            }
+            else
+            {
+                btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvironmentalSensorbg.png";
+            }
             bodyFrameLayout.AddChidren(btnPic);
 
             //璇疯緭鍏ヨ澶囨満涓婄殑sn鐮�
@@ -75,26 +89,29 @@
             };
             textView.AddChidren(editText);
 
-            Button btnScan = new Button()
+            if (integratedDevice.spk == SPK.SensorEnvironment2 || integratedDevice.spk == SPK.SensorEnvironment3)
             {
-                Width = Application.GetRealWidth(32),
-                Height = Application.GetRealWidth(32),
-                Gravity = Gravity.CenterVertical,
-                X = Application.GetRealWidth(275),
-                UnSelectedImagePath = "Public/Scan.png"
-            };
-            textView.AddChidren(btnScan);
-            btnScan.MouseUpEventHandler = (sender, e) =>
+                editText.PlaceholderText = Language.StringByID(StringId.PlsEntryMacCode);
+            }
+            if (integratedDevice.spk == SPK.SensorEnvironment)
             {
-                Scan.OpenScan((scanString) =>
+                Button btnScan = new Button()
                 {
-                    editText.Text = scanString;
-                });
-            };
-
-
-
-
+                    Width = Application.GetRealWidth(32),
+                    Height = Application.GetRealWidth(32),
+                    Gravity = Gravity.CenterVertical,
+                    X = Application.GetRealWidth(275),
+                    UnSelectedImagePath = "Public/Scan.png"
+                };
+                textView.AddChidren(btnScan);
+                btnScan.MouseUpEventHandler = (sender, e) =>
+                {
+                    Scan.OpenScan((scanString) =>
+                    {
+                        editText.Text = scanString;
+                    });
+                };
+            }
             //涓嬩竴姝�
             var btnNext = this.AddBottomClickButton(Language.StringByID(StringId.Next));
             btnNext.ButtonClickEvent += (sender, e) =>
@@ -113,7 +130,7 @@
                         try
                         {
                             var pm = new HttpServerRequest();
-                            var pack = pm.IndependentRegister3TyDevcie(SPK.SensorEnvironment, snCode, Language.StringByID(StringId.SensorEnvironment));
+                            var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode, Language.StringByID(StringId.SensorEnvironment));
                             if (pack.Code == StateCode.SUCCESS)
                             {
                                 //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString());
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs
index 961d9c9..b952725 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs
@@ -65,11 +65,11 @@
 
             if (Language.CurrentLanguage == "Chinese")
             {
-                btnTip.Text = "璇ヨ澶囧凡娣诲姞鍒板畨闃蹭紶鎰熷櫒绫诲埆锛屽彲鍒板搴斿姛鑳芥澘鍧楁煡鐪�";
+                btnTip.Text = "璇ヨ澶囧凡娣诲姞鍒颁紶鎰熷櫒绫诲埆锛屽彲鍒板搴斿姛鑳芥澘鍧楁煡鐪�";
             }
             else
             {
-                btnTip.Text = "The device has been added to the security sensor category, which can be viewed in the corresponding function block.";
+                btnTip.Text = "The device has been added to the sensor category, which can be viewed in the corresponding function block.";
             }
 
             var btnDel = new Button()
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
index 0b70665..8f56b86 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -162,6 +162,15 @@
                                 this.RemoveFromParent();
                             };
                             break;
+                        case SPK.SensorEnvironment2:
+                        case SPK.SensorEnvironment3:
+                            var form3 = new AddQingpingSensorEnvirTipPage();
+                            form3.AddForm(device);
+                            form3.AddDeviceEvent = (functionObj) => {
+                                refreshView.BeginHeaderRefreshing();
+                                this.RemoveFromParent();
+                            };
+                            break;
                     }
                 };
             }
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index c0f02a1..b73791d 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -174,6 +174,8 @@
                             };
                             break;
                         case SPK.SensorEnvironment:
+                        case SPK.SensorEnvironment2:
+                        case SPK.SensorEnvironment3:
                             var smPage1 = new SensorEnvironmentManagerPage();
                             smPage1.AddForm(device);
                             smPage1.DelDeviceEvent = () =>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
new file mode 100644
index 0000000..3285aae
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -0,0 +1,156 @@
+锘縰sing System;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+    public class FacePassagePage : FrameLayout
+    {
+        FrameLayout bodyView;
+        /// <summary>
+        /// 闈㈠id
+        /// </summary>
+        string faceid = "";
+
+        public FacePassagePage()
+        {
+            bodyView = this;
+        }
+
+        public void LoadPage()
+        {
+            new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView();
+            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+
+
+            var contentView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(667-64),
+            };
+            bodyView.AddChidren(contentView);
+
+            var topView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(189),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            contentView.AddChidren(topView);
+
+            var btnFaceIcon = new Button()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = Application.GetRealHeight(20),
+                Width = Application.GetRealWidth(102),
+                Height = Application.GetRealWidth(102),
+                UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png",
+            };
+            topView.AddChidren(btnFaceIcon);
+
+            var btnText1 = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealWidth(54),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextID = StringId.ApplyFaceIdTo,
+                IsBold = true,
+            };
+            topView.AddChidren(btnText1);
+
+            topView.AddChidren(new Button() { Height = 1,BackgroundColor = CSS_Color.DividingLineColor,Y = Application.GetRealHeight(188) ,X = Application.GetRealWidth(16),Width = Application.GetRealWidth(359)});
+
+            #region 绀惧尯闂ㄧ閫氳
+            var communityRow = new FrameLayout()
+            {
+                Y = topView.Bottom,
+                Height = Application.GetRealHeight(50),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            contentView.AddChidren(communityRow);
+
+            var btnCommunityTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Width = Application.GetRealWidth(300),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextID = StringId.CommunityAccessControl,
+            };
+            communityRow.AddChidren(btnCommunityTitle);
+
+
+            var btnCommunityAccessControlIcon = new Button()
+            {
+                X = Application.GetRealWidth(314),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(48),
+                Height = Application.GetMinRealAverage(36),
+                UnSelectedImagePath = "Public/Switch.png",
+                SelectedImagePath = "Public/SwitchOn.png",
+            };
+            communityRow.AddChidren(btnCommunityAccessControlIcon);
+
+
+
+            #endregion
+
+
+            var btnTip = new Button()
+            {
+                Y = Application.GetRealHeight(270),
+                Height = Application.GetRealHeight(48),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.MainColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextID = StringId.AboutFaceIdAndPrivacy
+            };
+            contentView.AddChidren(btnTip);
+
+
+            var btnSetFaceId = new Button()
+            {
+                Y = Application.GetRealHeight(539),
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(220),
+                Height = Application.GetRealWidth(44),
+                Radius = (uint)Application.GetRealWidth(22),
+                BackgroundColor = CSS_Color.MainColor,
+                TextID = StringId.SetFace,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextColor = CSS_Color.MainBackgroundColor,
+                TextAlignment = TextAlignment.Center,
+                IsBold = true,
+            };
+            contentView.AddChidren(btnSetFaceId);
+
+            if (string.IsNullOrEmpty(faceid))
+            {
+            }
+            else
+            {
+                btnSetFaceId.TextID = StringId.ResetFace;
+
+                var btnEraseData = new Button()
+                {
+                    Y = Application.GetRealHeight(481),
+                    Gravity = Gravity.CenterHorizontal,
+                    Width = Application.GetRealWidth(220),
+                    Height = Application.GetRealWidth(44),
+                    Radius = (uint)Application.GetRealWidth(22),
+                    BackgroundColor = CSS_Color.WarningColor,
+                    TextID = StringId.EraseData,
+                    TextSize = CSS_FontSize.SubheadingFontSize,
+                    TextColor = CSS_Color.MainBackgroundColor,
+                    TextAlignment = TextAlignment.Center,
+                    IsBold = true,
+                };
+                contentView.AddChidren(btnEraseData);
+            }
+
+
+        }
+    }
+}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index 36b8206..8c65a3e 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -1,4 +1,4 @@
-锘縰sing System;
+锘�    using System;
 using HDL_ON.UI;
 using HDL_ON.UI.CSS;
 using Shared;
@@ -161,6 +161,19 @@
         Button btnAddResidenceScan;
         #endregion
 
+
+        #region 涓汉閫夐」-浜鸿劯閫氳绠$悊
+        /// <summary>
+        /// 涓汉閫夐」-浜鸿劯閫氳绠$悊琛�
+        /// </summary>
+        FrameLayout faceManagementView;
+        /// <summary>
+        /// 浜鸿劯閫氳绠$悊鏂囨湰
+        /// </summary>
+        Button btnFaceManagementText;
+        #endregion
+
+
         #endregion
 
         #endregion
@@ -246,7 +259,7 @@
             /// </summary>
             optionListView = new VerticalScrolViewLayout()
             {
-                Height = Application.GetRealHeight(51 * 6),
+                Height = Application.GetRealHeight(51 * (6+1)),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
                 ScrollEnabled = false,
             };
@@ -547,9 +560,50 @@
                 });
             };
 
+            optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
             #endregion
 
 
+            #region 涓汉閫夐」-浜鸿劯閫氳绠$悊
+            faceManagementView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(50),
+            };
+            optionListView.AddChidren(faceManagementView);
+
+            var btnFaceManagementRight = new Button()
+            {
+                X = Application.GetRealWidth(339),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(16),
+                Height = Application.GetMinRealAverage(16),
+                UnSelectedImagePath = "Public/Right.png",
+            };
+            faceManagementView.AddChidren(btnFaceManagementRight);
+
+            btnFaceManagementText = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextID = StringId.FacePassageSetting,
+            };
+            faceManagementView.AddChidren(btnFaceManagementText);
+
+            btnFaceManagementText.MouseUpEventHandler = (sender, e) =>
+            {
+                var page = new FacePassagePage();
+                MainPage.BasePageView.AddChidren(page);
+                page.LoadPage();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                
+            };
+
+            #endregion
+
+
+
             #endregion
 
             #region 瑙i攣璁剧疆鍖哄煙
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
index 4c40acb..5bd2aea 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
@@ -105,7 +105,7 @@
                         //纭杩囨埛{0}鐨勭鐞嗗憳璐﹀彿缁欒处鍙穥1}
                         string msg = Language.StringByID(StringId.TransferreConfirmMsg2).Replace("{0}", Entity.DB_ResidenceData.Instance.CurrentRegion.homeName);
                         msg = msg.Replace("{1}", btnName.Text);
-                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.TransferreConfirmMsg2), () =>
+                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, msg, () =>
                         {
                             var form = new TransferingResidenceForm();
                             form.AddForm(this.accountInfo);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
new file mode 100644
index 0000000..b2d0460
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -0,0 +1,304 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
+using HDL_ON.Stan;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+    public class AirFreshRelayControlPage : DeviceFunctionCardCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+        /// <summary>
+        /// 椋庨�熷浘鏍囨帶浠�
+        /// </summary>
+        private IconViewControl btnFan = null;
+        /// <summary>
+        /// 椋庨�熸枃鏈帶浠�
+        /// </summary>
+        private NormalViewControl btnFanView = null;
+        /// <summary>
+        /// 寮�鍏冲浘鏍�
+        /// </summary>
+        private IconViewControl btnSwitch = null;
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鍒濆鍖栫櫧鑹插尯鍩熺殑鍐呭
+        /// </summary>
+        public override void InitFrameWhiteContent()
+        {
+            base.SetTitleText(Language.StringByID(StringId.AirFresh));
+
+            //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
+            this.RefreshNowDeviceStatuMemory(this.device);
+            //鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
+            this.InitFrameWhiteContent1();
+
+            Control.Ins.SendReadCommand(device);
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
+        /// </summary>
+        private void InitFrameWhiteContent1()
+        {
+            //涓�涓儗鏅浘鐗�
+            var framePic = new FrameLayout();
+            framePic.Y = Application.GetRealHeight(87);
+            framePic.Width = this.GetPictrueRealSize(247);
+            framePic.Height = this.GetPictrueRealSize(247);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.BackgroundImagePath = "FunctionIcon/AirFresh/AirFreshBgIcon.png";
+            this.FrameWhiteCentet1.AddChidren(framePic);
+
+            //椋庨�熷浘鏍�
+            this.btnFan = new IconViewControl(28);
+            btnFan.Gravity = Gravity.CenterHorizontal;
+            btnFan.Y = Application.GetRealHeight(367);
+            this.FrameWhiteCentet1.AddChidren(btnFan);
+            List<string> fanSpeedList = new List<string>();
+            fanSpeedList = device.GetAttribute(FunctionAttributeKey.FanSpeed).value;
+            btnFan.MouseUpEventHandler += (sender, e) =>
+            {
+                if( !btnSwitch.IsSelected){return;}
+                var curFanSpeedIndex = fanSpeedList.IndexOf(device.GetAttrState(FunctionAttributeKey.FanSpeed));
+                var sendFanSpeedIndex = curFanSpeedIndex == fanSpeedList.Count - 1 ? 0 : 1+curFanSpeedIndex;
+
+                device.SetAttrState(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
+                new System.Threading.Thread(() =>
+                {
+                    Dictionary<string, string> d = new Dictionary<string, string>();
+                    d.Add(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
+                    Control.Ins.SendWriteCommand(device, d);
+                })
+                { IsBackground = true }.Start();
+                RefreshFanSpeed();
+            };
+            //椋庨�熸枃鏈�
+            this.btnFanView = new NormalViewControl(this.FrameWhiteCentet1.Width / 3, Application.GetRealHeight(18), false);
+            btnFanView.Gravity = Gravity.CenterHorizontal;
+            btnFanView.Y = btnFan.Bottom + Application.GetRealHeight(6);
+            btnFanView.TextAlignment = TextAlignment.Center;
+            btnFanView.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+            btnFanView.TextColor = CSS_Color.TextualColor;
+            this.FrameWhiteCentet1.AddChidren(btnFanView);
+
+            //寮�鍏冲浘鏍�
+            this.btnSwitch = new IconViewControl(32);
+            btnSwitch.Gravity = Gravity.CenterHorizontal;
+            btnSwitch.Y = Application.GetRealHeight(468);
+            btnSwitch.UnSelectedImagePath = "Public/PowerClose.png";
+            btnSwitch.SelectedImagePath = "Public/PowerOpen.png";
+            FrameWhiteCentet1.AddChidren(btnSwitch);
+            btnSwitch.MouseUpEventHandler = (sender, e) =>
+            {
+                btnSwitch.IsSelected = !btnSwitch.IsSelected;
+                device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
+                new System.Threading.Thread(() =>
+                {
+                    Dictionary<string, string> d = new Dictionary<string, string>();
+                    d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString());
+                    Control.Ins.SendWriteCommand(device, d);
+                })
+                { IsBackground = true }.Start();
+            };
+
+            //鍒锋柊鐣岄潰鐘舵��
+            this.RefreshFormStatu();
+
+            if (fanSpeedList.Count > 0)
+            {
+                this.btnFan.UnSelectedImagePath = "FunctionIcon/AirFresh/Fan1.png";
+                this.btnFan.SelectedImagePath = "FunctionIcon/AirFresh/Fan1Select.png";
+                this.btnFanView.Text = Language.StringByID(StringId.LowWindSpeed);
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鏄剧ず椋庨�熼�夋嫨鐣岄潰___________________
+
+        /// <summary>
+        /// 鏄剧ず椋庨�熼�夋嫨鐣岄潰
+        /// </summary>
+        private void ShowFanSelectView()
+        {
+            //鏁翠釜鐏拌壊鐣岄潰
+            var frameBack = new Dialog();
+
+            var dialogBody = new NormalFrameLayout();
+            frameBack.AddChidren(dialogBody);
+            dialogBody.ButtonClickEvent = (sender, e) =>
+            {
+                frameBack.Close();
+            };
+            frameBack.Show();
+
+            //鑿滃崟鎺т欢(椋庨��)
+            var menuContr = new DialogTitleMenuControl(3, Language.StringByID(StringId.FanSpeed));
+            menuContr.X = Application.GetRealWidth(209);
+            menuContr.Y = Application.GetRealHeight(231);
+            menuContr.Width = Application.GetRealWidth(160);
+            menuContr.Height = Application.GetRealHeight(199);
+            dialogBody.AddChidren(menuContr);
+
+            //1妗�
+            var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low" ? "FunctionIcon/AirFresh/Fan1Select.png" : "FunctionIcon/AirFresh/Fan1.png";
+            menuContr.AddRowMenu(Language.StringByID(StringId.FanOneGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low", () =>
+            {
+                frameBack.Close();
+                //鍙戦�佹。浣嶅懡浠�
+                this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "low");
+            });
+
+            //2妗�
+            iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" ? "FunctionIcon/AirFresh/Fan2Select.png" : "FunctionIcon/AirFresh/Fan2.png";
+            menuContr.AddRowMenu(Language.StringByID(StringId.FanTwoGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium", () =>
+            {
+                frameBack.Close();
+                //鍙戦�佹。浣嶅懡浠�
+                this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "medium");
+            });
+
+            //3妗�
+            iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" ? "FunctionIcon/AirFresh/Fan3Select.png" : "FunctionIcon/AirFresh/Fan3.png";
+            menuContr.AddRowMenu(Language.StringByID(StringId.FanThreeGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high", () =>
+            {
+                frameBack.Close();
+                //鍙戦�佹。浣嶅懡浠�
+                this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "high");
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 璁惧鐘舵�佸弽棣坃______________________
+
+        /// <summary>
+        /// 璁惧鐘舵�佸弽棣�
+        /// </summary>
+        /// <param name="i_LocalDevice"></param>
+        public override void DeviceStatuPush(Function i_LocalDevice)
+        {
+            //涓嶆槸鍚屼竴涓笢瑗�
+            if (this.device.sid != i_LocalDevice.sid) { return; }
+
+            //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
+            this.RefreshNowDeviceStatuMemory(i_LocalDevice);
+            //鍒锋柊鐣岄潰鐘舵��
+            this.RefreshFormStatu();
+        }
+
+        #endregion
+
+        #region 鈻� 鍒锋柊鐣岄潰鐘舵�乢______________________
+
+        /// <summary>
+        /// 鍒锋柊鐣岄潰鐘舵��
+        /// </summary>
+        private void RefreshFormStatu()
+        {
+            //寮�鍏�
+            this.btnSwitch.IsSelected = this.device.GetAttrState(FunctionAttributeKey.OnOff) == "on";
+
+            this.RefreshFanSpeed();
+        }
+
+        /// <summary>
+        /// 鍒锋柊椋庨�熺姸鎬�
+        /// </summary>
+        private void RefreshFanSpeed()
+        {
+            //椋庨��
+            if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low")
+            {
+                this.btnFan.UnSelectedImagePath = "FunctionIcon/AirFresh/Fan1.png";
+                this.btnFan.SelectedImagePath = "FunctionIcon/AirFresh/Fan1Select.png";
+                this.btnFanView.Text = Language.StringByID(StringId.LowWindSpeed);
+            }
+            else if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium")
+            {
+                this.btnFan.UnSelectedImagePath = "FunctionIcon/AirFresh/Fan2.png";
+                this.btnFan.SelectedImagePath = "FunctionIcon/AirFresh/Fan2Select.png";
+                this.btnFanView.Text = Language.StringByID(StringId.MiddleWindSpeed);
+            }
+            else if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high")
+            {
+                this.btnFan.UnSelectedImagePath = "FunctionIcon/AirFresh/Fan3.png";
+                this.btnFan.SelectedImagePath = "FunctionIcon/AirFresh/Fan3Select.png";
+                this.btnFanView.Text = Language.StringByID(StringId.HighWindSpeed);
+            }
+            this.btnFan.CanClick = this.btnFan.IsSelected = this.device.GetAttrState(FunctionAttributeKey.OnOff) == "on";
+        }
+
+        #endregion
+
+        #region 鈻� 鍙戦�佸悇绉嶅懡浠______________________
+
+        /// <summary>
+        /// 鍙戦�佸叾浠栧懡浠�
+        /// </summary>
+        /// <param name="btnIcon">鎸夐挳</param>
+        /// <param name="comadKey">鍛戒护涓婚敭</param>
+        /// <param name="comadValue">鍛戒护</param>
+        private void SendOtherComand(IconViewControl btnIcon, string comadKey, string comadValue)
+        {
+            btnIcon.CanClick = false;
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //鑾峰彇鍙戦�佸懡浠ょ殑鏍锋澘(bus鍗忚鏄渶瑕佷竴娆℃�ф妸鍏ㄩ儴鍛戒护涓�璧峰彂閫佺殑)
+                var dic = this.GetSendComandSample();
+                dic[comadKey] = comadValue;
+                Control.Ins.SendWriteCommand(this.device, dic);
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    btnIcon.CanClick = true;
+                });
+            });
+        }
+
+        /// <summary>
+        /// 鑾峰彇鍙戦�佸懡浠ょ殑鏍锋澘(bus鍗忚鏄渶瑕佷竴娆℃�ф妸鍏ㄩ儴鍛戒护涓�璧峰彂閫佺殑)
+        /// </summary>
+        /// <returns></returns>
+        private Dictionary<string, string> GetSendComandSample()
+        {
+            var dic = new Dictionary<string, string>();
+            //寮�鍏�
+            dic[FunctionAttributeKey.OnOff] = this.device.GetAttrState(FunctionAttributeKey.OnOff);
+            //椋庨��
+            dic[FunctionAttributeKey.FanSpeed] = this.device.GetAttrState(FunctionAttributeKey.FanSpeed);
+
+            return dic;
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
+        /// </summary>
+        private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
+        {
+            for (int i = 0; i < i_LocalDevice.attributes.Count; i++)
+            {
+                var data = i_LocalDevice.attributes[i];
+                //寮�鍏�
+                if (data.key == FunctionAttributeKey.OnOff) { this.device.SetAttrState(FunctionAttributeKey.OnOff, data.state); }
+                //椋庨��
+                else if (data.key == FunctionAttributeKey.FanSpeed) { this.device.SetAttrState(FunctionAttributeKey.FanSpeed, data.state); }
+            }
+        }
+
+        #endregion
+
+    }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
index cefa915..6ab343a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
@@ -21,7 +21,7 @@
 
             };
 
-            new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView_ArmCenter(skipAction);
+            new TopViewDiv(bodyView, Language.StringByID(StringId.SecurityCenter)).LoadTopView_ArmCenter(skipAction);
 
             VerticalScrolViewLayout contentView = new VerticalScrolViewLayout()
             {
@@ -79,11 +79,15 @@
             //{
             //    Width = Application.GetRealWidth(23),
             //});
-
-            var adv = new ArmDiyView();
-            var view = adv.DiyArmView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png",
+            var view = new ArmDiyView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png",
                 Language.StringByID(StringId.HouseDefense));
             customDeploymentView.AddChidren(view);
+            EventHandler<MouseEventArgs> event1 = (sender, e) =>
+            {
+               ShowArmDialog(new SecurityAlarm());
+            };
+            view.SetClickEvent(event1);
+            
 
             if(FunctionList.List.securities.Count>3)
             {
@@ -148,7 +152,7 @@
 
 
             //鐏惧鎶ヨ
-            var disasterAlarmView = adv.FixedArmView("FunctionIcon/ArmCenter/DisasterAlarmIcon.png", Language.StringByID(StringId.DisasterDefense), Language.StringByID(StringId.Defense24Hour));
+            var disasterAlarmView = new FixedArmView("FunctionIcon/ArmCenter/DisasterAlarmIcon.png", Language.StringByID(StringId.DisasterDefense), Language.StringByID(StringId.Defense24Hour));
             fixedDeploymentTypeView.AddChidren(disasterAlarmView);
 
             fixedDeploymentTypeView.AddChidren(new Button()
@@ -157,34 +161,115 @@
             });
 
             //闃茬洍鎶ヨ
-            var burglarAlarmView = adv.FixedArmView("FunctionIcon/ArmCenter/BurglarAlarmIcon.png", Language.StringByID(StringId.BurglarAlarm), Language.StringByID(StringId.AlarmMute));
+            var burglarAlarmView = new FixedArmView("FunctionIcon/ArmCenter/BurglarAlarmIcon.png", Language.StringByID(StringId.BurglarAlarm), Language.StringByID(StringId.AlarmMute));
             fixedDeploymentTypeView.AddChidren(burglarAlarmView);
 
         }
+
+
+
+        private void ShowArmDialog(SecurityAlarm alarm)
+        {
+            Dialog dialog = new Dialog();
+
+            FrameLayout contentView = new FrameLayout();
+            dialog.AddChidren(contentView);
+            contentView.MouseUpEventHandler = (sender, e) =>
+            {
+                dialog.Close();
+            };
+
+           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.OpenArm
+            };
+            optinView.AddChidren(btnOpen);
+
+            optinView.AddChidren(new Button() {
+                Height = 1,
+                BackgroundColor = CSS_Color.DividingLineColor
+            });
+
+            Button btnCheckModify = new Button()
+            {
+                Height = Application.GetRealHeight(44),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.PromptingColor1,
+                TextID = StringId.CheckModify,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+            };
+            optinView.AddChidren(btnCheckModify);
+
+
+            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();
+
+
+            btnCheckModify.MouseUpEventHandler = (sender, e) => {
+                dialog.Close();
+                var armSetPage = new ArmDeploymentSettingPage(alarm);
+                MainPage.BasePageView.AddChidren(armSetPage);
+                armSetPage.LoadPage();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            };
+
+            btnCancel.MouseUpEventHandler = (sender, e) =>
+            {
+                dialog.Close();
+            };
+
+        }
+
+
     }
 
 
     /// <summary>
     /// 瀹夐槻鑷畾涔夋帶浠�
     /// </summary>
-    public class ArmDiyView
+    public class ArmDiyView : FrameLayout
     {
-
+        Button btnIcon;
+        Button btnText;
         /// <summary>
-        /// 
+        /// 鑷畾涔夊竷闃茬晫闈�
         /// </summary>
         /// <param name="UnSelectedIconPath">鍥剧墖璺緞</param>
         /// <param name="SelectedIconPath">鍥剧墖璺緞</param>
         /// <param name="Text">鏄剧ず鏂囨湰</param>
-        public FrameLayout DiyArmView(string UnSelectedIconPath, string SelectedIconPath, string Text)
+        public ArmDiyView(string UnSelectedIconPath, string SelectedIconPath, string Text)
         {
-            var view = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(82),
-                Height = Application.GetRealWidth(80),
-            };
+            this.Width = Application.GetRealWidth(82);
+            this.Height = Application.GetRealWidth(80);
 
-            Button btnIcon = new Button()
+            btnIcon = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
                 Width = Application.GetRealWidth(40),
@@ -192,9 +277,9 @@
                 UnSelectedImagePath = UnSelectedIconPath,
                 SelectedImagePath = SelectedIconPath,
             };
-            view.AddChidren(btnIcon);
+            this.AddChidren(btnIcon);
 
-            Button btnText = new Button()
+            btnText = new Button()
             {
                 Y = Application.GetRealWidth(40),
                 Height = Application.GetRealWidth(41),
@@ -203,28 +288,34 @@
                 TextColor = CSS_Color.TextualColor,
                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
             };
-            view.AddChidren(btnText);
-
-
-            return view;
+            this.AddChidren(btnText);
         }
 
+        public void SetClickEvent(EventHandler<MouseEventArgs> eventHandler)
+        {
+            this.MouseUpEventHandler = eventHandler;
+            btnIcon.MouseUpEventHandler = eventHandler;
+            btnText.MouseUpEventHandler = eventHandler;
+        }
+
+
+    }
+
+    public class FixedArmView : FrameLayout
+    {
         /// <summary>
-        /// 
+        /// 鍥哄畾甯冮槻鎺т欢
         /// </summary>
         /// <param name="iconPath"></param>
         /// <param name="title"></param>
         /// <param name="titleTip"></param>
-        public FrameLayout FixedArmView(string iconPath,string title,string titleTip)
+        public FixedArmView(string iconPath, string title, string titleTip)
         {
-            var view = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(144),
-                Height = Application.GetRealHeight(66),
-                Radius = (uint)Application.GetRealWidth(6),
-                BorderColor = CSS_Color.MainColor,
-                BorderWidth = 1,
-            };
+            this.Width = Application.GetRealWidth(144);
+            this.Height = Application.GetRealHeight(66);
+            this.Radius = (uint)Application.GetRealWidth(6);
+            this.BorderColor = CSS_Color.MainColor;
+            this.BorderWidth = 1;
 
             var btnIcon = new Button()
             {
@@ -234,7 +325,7 @@
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = iconPath,// "FunctionIcon/ArmCenter/DisasterAlarmIcon.png",
             };
-            view.AddChidren(btnIcon);
+            this.AddChidren(btnIcon);
 
             var btnTitle = new Button()
             {
@@ -247,7 +338,7 @@
                 Text = title,
                 IsBold = true,
             };
-            view.AddChidren(btnTitle);
+            this.AddChidren(btnTitle);
 
             var btnTitleTip = new Button()
             {
@@ -260,9 +351,9 @@
                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                 Text = titleTip,
             };
-            view.AddChidren(btnTitleTip);
+            this.AddChidren(btnTitleTip);
 
-            return view;
         }
     }
+
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
index b3fbc04..cb86ac7 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
@@ -25,6 +25,7 @@
 
             VerticalScrolViewLayout contentView = new VerticalScrolViewLayout()
             {
+                Y = Application.GetRealHeight(64),
                 Height = Application.GetRealHeight(667 - 64),
             };
             bodyView.AddChidren(contentView);
@@ -44,6 +45,7 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 TextSize = CSS_FontSize.SubheadingFontSize,
                 TextID = StringId.DeploymentInformation,
+                IsBold = true,
             };
             deploymentTitleRow.AddChidren(btnDeploymentTitle);
 
@@ -67,6 +69,7 @@
                 TextID = StringId.Name,
             };
             deploymentNameRow.AddChidren(btnDeploymentNameTitle);
+            btnDeploymentNameTitle.Text += ":";
 
             var btnDeploymentName = new Button()
             {
@@ -84,53 +87,53 @@
             #endregion
 
             #region 瑙﹀彂寤舵椂
-            var delayedRow = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(50),
-                BackgroundColor = CSS_Color.MainBackgroundColor,
-            };
-            contentView.AddChidren(delayedRow);
+            //var delayedRow = new FrameLayout()
+            //{
+            //    Height = Application.GetRealHeight(50),
+            //    BackgroundColor = CSS_Color.MainBackgroundColor,
+            //};
+            //contentView.AddChidren(delayedRow);
 
-            var btnDelayedTitle = new Button()
-            {
-                X = Application.GetRealWidth(16),
-                Width = Application.GetRealWidth(72),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextSize = CSS_FontSize.TextFontSize,
-                TextID = StringId.Name,
-            };
-            delayedRow.AddChidren(btnDelayedTitle);
+            //var btnDelayedTitle = new Button()
+            //{
+            //    X = Application.GetRealWidth(16),
+            //    Width = Application.GetRealWidth(72),
+            //    TextAlignment = TextAlignment.CenterLeft,
+            //    TextColor = CSS_Color.FirstLevelTitleColor,
+            //    TextSize = CSS_FontSize.TextFontSize,
+            //    TextID = StringId.Name,
+            //};
+            //delayedRow.AddChidren(btnDelayedTitle);
 
-            var btnDelayedText = new Button()
-            {
-                X = Application.GetRealWidth(88),
-                Width = Application.GetRealWidth(230),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = CSS_Color.TextualColor,
-                TextSize = CSS_FontSize.TextFontSize,
-                Text = securityAlarm.name
-            };
-            delayedRow.AddChidren(btnDelayedText);
+            //var btnDelayedText = new Button()
+            //{
+            //    X = Application.GetRealWidth(88),
+            //    Width = Application.GetRealWidth(230),
+            //    TextAlignment = TextAlignment.CenterLeft,
+            //    TextColor = CSS_Color.TextualColor,
+            //    TextSize = CSS_FontSize.TextFontSize,
+            //    Text = securityAlarm.name
+            //};
+            //delayedRow.AddChidren(btnDelayedText);
 
-            var btnDelayedRight = new Button()
-            {
-                X = Application.GetRealWidth(343),
-                Gravity = Gravity.CenterVertical,
-                Width = Application.GetMinRealAverage(16),
-                Height = Application.GetMinRealAverage(16),
-                UnSelectedImagePath = "Public/RightIcon.png",
-            };
-            delayedRow.AddChidren(btnDelayedRight);
+            //var btnDelayedRight = new Button()
+            //{
+            //    X = Application.GetRealWidth(343),
+            //    Gravity = Gravity.CenterVertical,
+            //    Width = Application.GetMinRealAverage(16),
+            //    Height = Application.GetMinRealAverage(16),
+            //    UnSelectedImagePath = "Public/RightIcon.png",
+            //};
+            //delayedRow.AddChidren(btnDelayedRight);
 
-            //delayedRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
-            LoadEvent_EditSecurityAlarmName(btnDelayedTitle);
+            ////delayedRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
+            //LoadEvent_EditSecurityAlarmName(btnDelayedTitle);
             #endregion
 
             #endregion
             contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor });
 
-            #region 甯冮槻鍔熻兘
+            #region 甯冮槻鍔熻兘\鎶ヨ鐘舵��
             var deploymentFunctionRow = new FrameLayout()
             {
                 Height = Application.GetRealHeight(44),
@@ -144,14 +147,81 @@
                 TextColor = CSS_Color.MainColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextSize = CSS_FontSize.SubheadingFontSize,
-                TextID = StringId.DeploymentInformation,
+                TextID = StringId.DefenseFunctionArmState,
+                IsBold = true,
             };
             deploymentFunctionRow.AddChidren(btnFunctionTitle);
 
+            var btnAddTarget = new Button()
+            {
+                X = Application.GetRealWidth(337),
+                Y = Application.GetRealHeight(6),
+                Width = Application.GetRealWidth(32),
+                Height = Application.GetRealWidth(32),
+                UnSelectedImagePath = "FunctionIcon/ArmCenter/AddTargetIcon.png",
+            };
+            deploymentFunctionRow.AddChidren(btnAddTarget);
+
             deploymentFunctionRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
 
+            var inputTargetView = new VerticalScrolViewLayout()
+            {
+                ScrollEnabled = false,
+            };
+            contentView.AddChidren(inputTargetView);
+            foreach (var target in securityAlarm.input)
+            {
+                inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName()));
+            }
+            inputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.input.Count);
 
             #endregion
+            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor });
+
+
+            #region 鍛婅鐩爣
+            var outputRow = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(44),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            contentView.AddChidren(outputRow);
+
+            var btnOutputRowTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                TextColor = CSS_Color.MainColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextID = StringId.AlarmTargetAfterTriggering,
+                IsBold = true,
+            };
+            outputRow.AddChidren(btnOutputRowTitle);
+
+            var btnAddOutTarget = new Button()
+            {
+                X = Application.GetRealWidth(337),
+                Y = Application.GetRealHeight(6),
+                Width = Application.GetRealWidth(32),
+                Height = Application.GetRealWidth(32),
+                UnSelectedImagePath = "FunctionIcon/ArmCenter/AddTargetIcon.png",
+            };
+            outputRow.AddChidren(btnAddOutTarget);
+            outputRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
+
+
+            var outputTargetView = new VerticalScrolViewLayout()
+            {
+                ScrollEnabled = false,
+            };
+            contentView.AddChidren(outputTargetView);
+            foreach(var outTarget in securityAlarm.output)
+            {
+                inputTargetView.AddChidren(new OutputRow(outTarget.GetFunction().name, outTarget.GetFunction().GetRoomListName(),""));
+            }
+            outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
+            #endregion
+
         }
 
         /// <summary>
@@ -210,4 +280,127 @@
 
 
     }
+
+    /// <summary>
+    /// 杈撳叆鏉′欢琛屾帶浠�
+    /// </summary>
+    public class InputRow : RowLayout
+    {
+        Button btnTitle;
+
+        Button btnSubTitle;
+
+        public InputRow(string title,string subtitle)
+        {
+            this.LineColor = 0x00000000;
+            this.Height = Application.GetRealHeight(65);
+            this.BackgroundColor = CSS_Color.MainBackgroundColor;
+
+            btnTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Height = Application.GetRealHeight(44),
+                Width = Application.GetRealWidth(320),
+                Text = title,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+            };
+            this.AddChidren(btnTitle);
+
+            btnSubTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(24),
+                Height = Application.GetRealHeight(44),
+                Width = Application.GetRealWidth(320),
+                Text = subtitle,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.PromptingColor1,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            };
+            this.AddChidren(btnSubTitle);
+
+        }
+
+        public void SetClickEvent(EventHandler<MouseEventArgs> eventHandler)
+        {
+            this.MouseUpEventHandler = eventHandler;
+            btnTitle.MouseUpEventHandler = eventHandler;
+            btnSubTitle.MouseUpEventHandler = eventHandler;
+        }
+    }
+
+    /// <summary>
+    /// 杈撳嚭鏉′欢鎺т欢
+    /// </summary>
+    public class OutputRow : RowLayout
+    {
+        Button btnTitle;
+
+        Button btnSubTitle;
+
+        Button btnState;
+
+        Button btnRightIcon;
+
+        public OutputRow(string title, string subtitle,string state)
+        {
+            this.LineColor = 0x00000000;
+            this.Height = Application.GetRealHeight(65);
+            this.BackgroundColor = CSS_Color.MainBackgroundColor;
+
+            btnTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Height = Application.GetRealHeight(44),
+                Width = Application.GetRealWidth(320),
+                Text = title,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+            };
+            this.AddChidren(btnTitle);
+
+            btnSubTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(24),
+                Height = Application.GetRealHeight(44),
+                Width = Application.GetRealWidth(320),
+                Text = subtitle,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.PromptingColor1,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            };
+            this.AddChidren(btnSubTitle);
+
+            btnState = new Button()
+            {
+                Width = Application.GetRealWidth(323),
+                TextAlignment = TextAlignment.CenterRight,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextColor = CSS_Color.PromptingColor1,
+                Text = state
+            };
+            this.AddChidren(btnState);
+
+            btnRightIcon = new Button()
+            {
+                X = Application.GetRealWidth(339),
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(16),
+                Height = Application.GetRealWidth(16),
+                UnSelectedImagePath = "FunctionIcon/ArmCenter/RightIcon.png",
+            };
+            this.AddChidren(btnRightIcon);
+        }
+
+        public void SetClickEvent(EventHandler<MouseEventArgs> eventHandler)
+        {
+            btnState.MouseUpEventHandler = eventHandler;
+            btnTitle.MouseUpEventHandler = eventHandler;
+            btnSubTitle.MouseUpEventHandler = eventHandler;
+        }
+    }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/ArmSensorHistroyPaging.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/ArmSensorHistroyPaging.cs
index bd249f2..5ca7239 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/ArmSensorHistroyPaging.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/ArmSensorHistroyPaging.cs
@@ -48,6 +48,8 @@
                     var pack = pm.GetArmSensorHistory(device.deviceId, "20", "1");
                     var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<Cloud_ArmSensorHistory>(pack.Data.ToString());
                     List<string> years = new List<string>();
+                    if (revData == null)
+                        return;
                     Application.RunOnMainThread(() =>
                     {
                         var startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
index 7e35058..74924ef 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -2,8 +2,6 @@
 using HDL_ON.Stan;
 using HDL_ON.UI.CSS;
 using HDL_ON.Entity;
-using System.Collections.Generic;
-using System;
 
 namespace HDL_ON.UI
 {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs
new file mode 100644
index 0000000..ac4b459
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs
@@ -0,0 +1,177 @@
+锘縰sing Shared;
+using HDL_ON.Stan;
+using HDL_ON.UI.CSS;
+using HDL_ON.Entity;
+
+namespace HDL_ON.UI
+{
+    public class SensorGasPage : DeviceFunctionCardCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍥炬爣
+        /// </summary>
+        private IconViewControl btnIcon = null;
+        /// <summary>
+        /// 鏂囨湰鎺т欢
+        /// </summary>
+        private NormalViewControl btnSuctionView = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鍒濆鍖栫櫧鑹插尯鍩熺殑鍐呭
+        /// </summary>
+        public override void InitFrameWhiteContent()
+        {
+            base.SetTitleText(Language.StringByID(StringId.SensorGas));
+
+            //娣诲姞绗簩绱㈠紩椤�
+            this.AddSecondPage();
+            //鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
+            this.InitFrameWhiteContent1();
+            //鍒濆鍖栫浜屼釜绱㈠紩椤电殑鍐呭
+            this.InitFrameWhiteContent2();
+
+            //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
+            this.RefreshNowDeviceStatuMemory(this.device);
+            //鍒锋柊鐣岄潰鐘舵��
+            this.RefreshFormStatu();
+            //璇诲彇鐘舵��
+            new System.Threading.Thread(() =>
+            {
+                if (device.spk == SPK.SenesorMegahealth)
+                {
+                    DriverLayer.Control.Ins.SendReadCommand(device, true);
+                }
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
+        /// </summary>
+        private void InitFrameWhiteContent1()
+        {
+            btnIcon = new IconViewControl(198)
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = Application.GetRealWidth(146),
+                UnSelectedImagePath = "FunctionIcon/ArmSensor/UnderProtectionBgIcon.png",
+            };
+            FrameWhiteCentet1.AddChidren(btnIcon);
+
+            btnSuctionView = new NormalViewControl(300, 84, true)
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = btnIcon.Bottom,
+                TextAlignment = TextAlignment.Center,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextColor = CSS_Color.TextualColor,
+                SelectedTextColor = CSS_Color.MainColor,
+            };
+            FrameWhiteCentet1.AddChidren(btnSuctionView);
+            RefreshFormStatu();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栫浜屼釜绱㈠紩椤电殑鍐呭
+        /// </summary>
+        private void InitFrameWhiteContent2()
+        {
+            var paging = new ArmSensorHistroyPaging(device);
+            paging.InitFrame(FrameWhiteCentet2);
+        }
+
+        #endregion
+
+        #region 鈻� 璁惧鐘舵�佸弽棣坃______________________
+
+        /// <summary>
+        /// 璁惧鐘舵�佸弽棣�
+        /// </summary>
+        /// <param name="i_LocalDevice"></param>
+        public override void DeviceStatuPush(Function i_LocalDevice)
+        {
+            //涓嶆槸鍚屼竴涓笢瑗�
+            if (this.device.sid != i_LocalDevice.sid) { return; }
+
+            //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
+            this.RefreshNowDeviceStatuMemory(i_LocalDevice);
+            //鍒锋柊鐣岄潰鐘舵��
+            this.RefreshFormStatu();
+        }
+
+        #endregion
+
+        #region 鈻� 鍙戦�佸悇绉嶅懡浠______________________
+
+        #endregion
+
+        #region 鈻� 鍒锋柊鐣岄潰鐘舵�乢______________________
+
+        /// <summary>
+        /// 鍒锋柊鐣岄潰鐘舵��
+        /// </summary>
+        private void RefreshFormStatu()
+        {
+            Application.RunOnMainThread(() => {
+                foreach(var temp in device.attributes) { 
+                    if (temp != null)
+                    {
+                        if (temp.state == "alarm")   
+                        {
+                            btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeStateBgIconOn.png";
+                            btnSuctionView.TextID = StringId.InAlarm;
+                            btnSuctionView.IsSelected = true;
+                        }
+                        else if (temp.state == "normal")
+                        {
+                            btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/UnderProtectionBgIcon.png";
+                            btnSuctionView.TextID = StringId.SensorNormalState;
+                            btnSuctionView.IsSelected = false;
+                        }
+                    }
+                }
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
+        /// </summary>
+        private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
+        {
+            //foreach (var data in i_LocalDevice.status)
+            //{
+            //    if (data.key == FunctionAttributeKey.Status)
+            //    {
+            //        Application.RunOnMainThread(() =>
+            //        {
+            //            if (data.value.ToLower() == "open")
+            //            {
+            //                this.btnIcon.IsSelected = true;
+            //                this.btnSuctionView.IsSelected = true;
+            //                this.btnSuctionView.TextID = StringId.Open;
+            //            }
+            //            else
+            //            {
+            //                this.btnIcon.IsSelected = false;
+            //                this.btnSuctionView.IsSelected = false;
+            //                this.btnSuctionView.TextID = StringId.Close;
+            //            }
+            //        });
+            //    }
+            //}
+        }
+
+        #endregion
+    }
+
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
index e10d48d..7801755 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -274,7 +274,7 @@
             int index = 0;
             foreach (var sensor in FunctionList.List.GetEnvirSensorsList())
             {
-                if(sensor.spk == SPK.SensorEnvironment)
+                if(SPK.EvironmentSensorList().Contains(sensor.spk))
                 {
                     foreach (var seTemp in sensor.attributes)
                     {
@@ -308,6 +308,9 @@
                             case "tvoc":
                                 newTemp.spk = SPK.SensorTVOC;
                                 newTemp.SetAttrState("spk", "tvoc");
+                                break;
+                            default:
+                                continue;
                                 break;
                         }
 
@@ -762,7 +765,7 @@
                 {
                     if (bodyView != null)
                     {
-                        if (updateTemp.spk == SPK.SensorEnvironment)
+                        if (SPK.EvironmentSensorList().Contains(updateTemp.spk ))
                         {
                             foreach (var seTemp in updateTemp.attributes)
                             {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
new file mode 100644
index 0000000..e5aba0b
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -0,0 +1,90 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+    public class AddLightScene : FrameLayout
+    {
+        #region 鎺т欢鍒楄〃
+        /// <summary>
+        /// 褰撳墠绐椾綋
+        /// </summary>
+        static FrameLayout bodyView;
+        /// <summary>
+        /// 妤煎眰閫夋嫨涓嬫媺鍥炬爣
+        /// </summary>
+        Button btnFloorDownIcon;
+        /// <summary>
+        /// 妤煎眰鏄剧ず
+        /// </summary>
+        Button btnFloor;
+        /// <summary>
+        /// 鍔熻兘鍒楄〃闆嗗悎鏄剧ず鍖哄煙
+        /// </summary>
+        static VerticalScrolViewLayout functionListView;
+        #endregion
+
+        List<Function> functionList;
+
+        public AddLightScene()
+        {
+            bodyView = this;
+            functionList = new List<Function>();
+        }
+
+        public void LoadPage(int titleId)
+        {
+            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
+
+            /// <summary>
+            /// 鎴块棿鍐呭鏄剧ず鍖哄煙
+            /// </summary>
+            var roomFloorChangeView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(52),
+            };
+            bodyView.AddChidren(roomFloorChangeView);
+            #region 鎴块棿椤堕儴鍒囨崲鏄剧ず鍖哄煙
+            btnFloorDownIcon = new Button()
+            {
+                Width = Application.GetMinRealAverage(16),
+                Height = Application.GetMinRealAverage(16),
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(18),
+                UnSelectedImagePath = "Public/DownIcon.png",
+            };
+            roomFloorChangeView.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,
+            };
+            roomFloorChangeView.AddChidren(btnFloor);
+            #endregion
+
+            functionListView = new VerticalScrolViewLayout()
+            {
+                Y = Application.GetRealHeight(64 + 52),
+                Height = Application.GetRealHeight(603 - 12 - 52),
+            };
+            bodyView.AddChidren(functionListView);
+
+                functionList.AddRange(FunctionList.List.GetLightList());
+
+
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
index b0c2522..37d1cfa 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -49,6 +49,7 @@
                             bodyView.btnWhiteRound.Visible = false;
                         }
                         bodyView.btnCurColor.BackgroundColor = (uint)(0xFF000000 + bodyView.lightTemp.GetRGBcolor(updateTemp));
+                        bodyView.lastColor = bodyView.lightTemp.GetRGBbytes(updateTemp);
                         if (bodyView.lightTemp.GetRGBcolor(updateTemp) == 16777215 && bodyView.btnCurColor.BorderColor != 0x00000000)
                         {
                             bodyView.btnCurColor.BorderColor = CSS.CSS_Color.PromptingColor2;
@@ -158,7 +159,7 @@
 
                     for (int i = 0; i < 3; i++)
                     {
-                        if (lightTemp.GetRGBbytes(function)[i] != lastColor[i])
+                        if (lightTemp.GetRGBbytes(function)[i].ToString() != lastColor[i].ToString())
                         {
                             function.SetAttrState(FunctionAttributeKey.RGB, lastColor);
                             lightTemp.SetRGBcolor(lastColor, function);

--
Gitblit v1.8.0