wei
2021-08-27 1f5fdd892e8efc9f1babe1ace9d810803edef396
2021-08-27 11:29:39

人脸
新风
33个文件已添加
52个文件已修改
2021 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/Collection/DefenseAlarmIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoBg.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/electricalbreaker.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorhcho.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FailIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/TrueIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PersonalCenter/ResidenceInAlarmIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/Collection/DefenseAlarmIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoBg.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/electricalbreaker.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorhcho.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FailIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/TrueIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PersonalCenter/ResidenceInAlarmIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/DB_ResidenceData.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/AirSwitch.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/SecurityAlarm.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Sensor.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmebly.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/CustomerObj.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs 424 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs 138 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs 130 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,13 +1,6 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" Line="88" Column="66" />
      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
      <File FileName="HDL_ON/Common/ApiUtlis.cs" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" />
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" />
    </Files>
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
  <MonoDevelop.Ide.Workbench>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
@@ -15,30 +8,31 @@
            <Node name="HDL_ON" expanded="True">
              <Node name="Common" expanded="True" />
              <Node name="DAL" expanded="True">
                <Node name="DriverLayer" expanded="True" />
                <Node name="Mqtt" expanded="True" />
                <Node name="Server" expanded="True" />
                <Node name="ThirdPartySdk" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True">
                <Node name="Function" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="UI2" expanded="True">
                  <Node name="1-HomePage" expanded="True" />
                  <Node name="3-Intelligence" expanded="True" />
                  <Node name="4-PersonalCenter" expanded="True">
                    <Node name="FaceManagement" expanded="True" />
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="ArmCenter" expanded="True">
                      <Node name="ArmCenterPage.cs" selected="True" />
                    <Node name="1ContorlPage" expanded="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
            <Node name="HDL-ON_Android" selected="True" />
            <Node name="HDL-ON_iOS" expanded="True" />
            </Node>
            <Node name="HDL-ON_iOS" expanded="True">
              <Node name="Resources" expanded="True" />
            </Node>
          </Node>
        </State>
      </Pad>
      <Pad Id="MonoDevelop.Debugger.WatchPad">
        <State>
          <Value>cus.customerFaceUrl</Value>
        </State>
      </Pad>
    </Pads>
@@ -49,7 +43,7 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore>
@@ -57,11 +51,13 @@
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="431" 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" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" line="168" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Common/ApiUtlis.cs" relfile="HDL_ON/Common/ApiUtlis.cs" line="391" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" line="91" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs" line="71" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" line="468" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="224" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="466" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="523" 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="279" column="1" />
    </BreakpointStore>
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
  <MultiItemStartupConfigurations />
HDL-ON_Android/Assets/Language.ini
@@ -487,6 +487,7 @@
499=Add defense function
500=Add alarm target
501=Security alarm: {0} is triggered.
502=Clear the security alarm?
 
1000=Room Humidity
@@ -992,9 +993,9 @@
7144=excellence
7145=Security
7146=Add security
7147=Arm
7148=Disarm
    
9000=Please sign in with new cell phone number.
@@ -1590,6 +1591,7 @@
499=添加布防功能
500=添加告警目标
501=安防报警:{0}被触发。
502=是否解除安防警报?
 
1000=室内湿度
1001=童锁
@@ -2077,10 +2079,10 @@
7144=优秀
7145=安防
7146=添加安防
7147=布防
7148=撤防
 
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录APP
9002=登录手机修改完成
HDL-ON_Android/Assets/Phone/Collection/DefenseAlarmIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png

HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoBg.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/electricalbreaker.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorhcho.png
HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FailIcon.png
HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/TrueIcon.png
HDL-ON_Android/Assets/Phone/PersonalCenter/ResidenceInAlarmIcon.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -443,6 +443,20 @@
    <AndroidAsset Include="Assets\Phone\Collection\DefenseStatusIcon.png" />
    <AndroidAsset Include="Assets\Phone\Collection\DisarmStatusIcon.png" />
    <AndroidAsset Include="Assets\Phone\PersonalCenter\ResidenceDefenseIcon.png" />
    <AndroidAsset Include="Assets\Phone\Collection\DefenseAlarmIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\InAlarmBigIcon.png" />
    <AndroidAsset Include="Assets\Phone\PersonalCenter\ResidenceInAlarmIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalbreaker.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgOnIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\EnergyIcon.png" />
    <AndroidAsset Include="Assets\Phone\PersonalCenter\FacePassage\FailIcon.png" />
    <AndroidAsset Include="Assets\Phone\PersonalCenter\FacePassage\TrueIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorhcho.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\HchoBg.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\HchoIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" />
@@ -1343,6 +1357,7 @@
    <Folder Include="Assets\Phone\FunctionIcon\IrFan\" />
    <Folder Include="Assets\Phone\PersonalCenter\FacePassage\" />
    <Folder Include="Assets\Phone\FunctionIcon\Light\LightScene\" />
    <Folder Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\" />
  </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" />
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108211" android:versionName="1.2.202108211" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108271" android:versionName="1.2.202108271" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
    <!-- 乐橙可视对讲需要的权限 -->
    <!--<uses-permission android:name="android.permission.INTERNET" />-->
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -459,6 +459,7 @@
        <Folder Include="Assets.xcassets\device_bg.imageset\" />
        <Folder Include="Resources\Phone\FunctionIcon\Light\LightScene\" />
        <Folder Include="Resources\Phone\PersonalCenter\FacePassage\" />
        <Folder Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\" />
    </ItemGroup>
    <ItemGroup>
        <InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1331,6 +1332,20 @@
      <BundleResource Include="Resources\Phone\Collection\DefenseStatusIcon.png" />
      <BundleResource Include="Resources\Phone\Collection\DisarmStatusIcon.png" />
      <BundleResource Include="Resources\Phone\PersonalCenter\ResidenceDefenseIcon.png" />
      <BundleResource Include="Resources\Phone\Collection\DefenseAlarmIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\ArmCenter\InAlarmBigIcon.png" />
      <BundleResource Include="Resources\Phone\PersonalCenter\ResidenceInAlarmIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgOnIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\EnergyIcon.png" />
      <BundleResource Include="Resources\Phone\PersonalCenter\FacePassage\FailIcon.png" />
      <BundleResource Include="Resources\Phone\PersonalCenter\FacePassage\TrueIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\HchoBg.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\HchoIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorhcho.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalbreaker.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.2.202108211</string>
    <string>1.2.202108271</string>
    <key>CFBundleVersion</key>
    <string>1.2.08211</string>
    <string>1.2.08271</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -487,6 +487,7 @@
499=Add defense function
500=Add alarm target
501=Security alarm: {0} is triggered.
502=Clear the security alarm?
 
1000=Room Humidity
@@ -1590,6 +1591,7 @@
499=添加布防功能
500=添加告警目标
501=安防报警:{0}被触发。
502=是否解除安防警报?
 
1000=室内湿度
1001=童锁
HDL-ON_iOS/Resources/Phone/Collection/DefenseAlarmIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png

HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoBg.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/electricalbreaker.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorhcho.png
HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FailIcon.png
HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/TrueIcon.png
HDL-ON_iOS/Resources/Phone/PersonalCenter/ResidenceInAlarmIcon.png
HDL_ON/Common/ApiUtlis.cs
@@ -204,7 +204,7 @@
                    {
                        endTime = DateTime.Now.AddSeconds(100);
                        MainPage.Log($"读取场景数据成功");
                        var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString());
                        var sceneList = JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString());
                        if (sceneList == null)
                        {
                            sceneList = new List<Scene>();
@@ -275,12 +275,18 @@
                            {
                                UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
                            }
                            else if(video.interphoneType == InterphoneType.HDL.ToString())
                            {
                                DB_ResidenceData.Instance.SupportFacePass = true;
                                DB_ResidenceData.Instance.SaveResidenceData();
                            }
                        }
                    }
                    //======================安防====================
                    GetSecurityList();
                    //======================SIP账号====================
                }
                catch (Exception ex)
@@ -294,8 +300,11 @@
                        MainPage.Log($"结束读取云端数据线程");
                        endTime = DateTime.MinValue;
                        DownloadDataComplete = true;
                        waitPage.Hide();
                        if (waitPage != null)
                        {
                        waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                    //不考虑网关情况,直接订阅
                    DAL.Mqtt.MqttClient.InitState();
@@ -327,8 +336,11 @@
                    DownloadDataComplete = true;
                    Application.RunOnMainThread(() =>
                    {
                        waitPage.Hide();
                        if (waitPage != null)
                        {
                        waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                    //初始化数据
                    //SpatialInfo.CurrentSpatial.Clear();
@@ -388,10 +400,21 @@
                }
                var infoListPack = Ins.httpRequest.GetSecurityInfo(sidList, new List<string>());
                var infoList = JsonConvert.DeserializeObject<List<SecurityAlarm>>(infoListPack.Data.ToString());
                if (infoList != null)
                {
                    var filePathList = FileUtlis.Files.ReadFiles().FindAll((obj) => obj.StartsWith("SecurityData_"));
                    if (filePathList != null)
                    {
                        foreach (var file in filePathList)
                        {
                            FileUtlis.Files.DeleteFile(file);
                        }
                    }
                foreach (var function in infoList)
                {
                    function.SaveFile();
                    FunctionList.List.IniFunctionList(function.savePath, true);
                    }
                }
            }
            else
@@ -400,5 +423,15 @@
            }
        }
        /// <summary>
        /// 获取SIP账号信息
        /// </summary>
        public void GetSipInfo()
        {
            var pack = Ins.HttpRequest.GetSecurityList();
        }
    }
}
HDL_ON/Common/R.cs
@@ -6,6 +6,22 @@
    {
        /// <summary>
        /// 一级建筑标准
        /// </summary>
        public const int Class_I_BuildingStandard = 505;
        /// <summary>
        /// 二级建筑标准
        /// </summary>
        public const int SecondaryBuildingStandard = 506;
        /// <summary>
        /// 超标
        /// </summary>
        public const int ExceedingTheStandard = 503;
        /// <summary>
        /// 是否解除安防警报?
        /// </summary>
        public const int ClearTheSecurityAlarmTip = 502;
        /// <summary>
        /// 安防报警
        /// </summary>
        public const int SecurityAlarmTipString = 501;
HDL_ON/DAL/DriverLayer/Control.cs
@@ -467,6 +467,7 @@
                    var actionObjs = new List<ApiAlinkControlActionObj>();
                    actionObjs.Add(apiControlData);
                    var pack = httpServer.ControlDevice(actionObjs);
                    MainPage.Log($"远程控制反馈:{pack.message}");
                }
            }
@@ -633,6 +634,7 @@
                 gatewayId = DB_ResidenceData.Instance.HomeGateway.gatewayId,
                  sid = securityAlarm.sid, status = state, userSecurityId = securityAlarm.userSecurityId
                } });
                MainPage.Log($"安防控制结果:{result.Code}");
            }
            else
            {
@@ -784,6 +786,11 @@
                    || receiveObj.Topic == CommunicationTopic.ct.ReadSecurityStatus + "_reply"
                    || receiveObj.Topic == CommunicationTopic.ct.SecurityStatusUp)
                {
                    try
                    {
                        MainPage.Log($"局域网安防信息: {receiveObj.Topic}  : 内容: {res[1]}");
                        var tt = "";
                        lock (tt) {
                    var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(receiveObj.BodyDataString);
                    if (temp != null)
                    {
@@ -795,10 +802,15 @@
                            {
                                updataLocalSecurity.status = updataSecurity.status;
                                updataLocalSecurity.alarm = updataSecurity.alarm;
                                        ArmCenterPage.LoadEvent_RefreshSecurityStatus(updataLocalSecurity);
                            }
                        }
                        HomePage.LoadEvent_RefreshSecurityStatus();
                        ArmCenterPage.LoadEvent_RefreshSecurityStatus();
                            }
                        }
                    }
                    catch (Exception ex){
                        MainPage.Log($"安防局域网异常:{ex.Message}");
                    }
                }
                else
@@ -855,7 +867,7 @@
                                return;
                            }
                        }
                        MainPage.Log($"A协议更新状态:{revString}");
                        //MainPage.Log($"A协议更新状态:{revString}");
                        foreach (var attr in updateTemp.status)
                        {
                            localFunction.time_stamp = temp.time_stamp;
@@ -866,6 +878,9 @@
                        Function localObj = null;
                        switch (localFunction.spk)
                        {
                            case SPK.AirSwitch:
                                AirSwitchPage.UpdataState(localFunction);
                                break;
                            case SPK.ElectricEnergy:
                                EnergyMainPage.UpdataStatus(localFunction);
                                break;
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -448,6 +448,8 @@
                                {
                                    if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey))
                                    {
                                        try
                                        {
                                        var securityBytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey);
                                        var securityString = Encoding.UTF8.GetString(securityBytes);
                                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(securityString);
@@ -463,10 +465,14 @@
                                                {
                                                    updataLocalSecurity.status = updataSecurity.status;
                                                    updataLocalSecurity.alarm = updataSecurity.alarm;
                                                        ArmCenterPage.LoadEvent_RefreshSecurityStatus(updataLocalSecurity);
                                                }
                                            }
                                            HomePage.LoadEvent_RefreshSecurityStatus();
                                            ArmCenterPage.LoadEvent_RefreshSecurityStatus();
                                            }
                                        }catch(Exception ex)
                                        {
                                            MainPage.Log($"安防远程信息异常:{ex.Message}");
                                        }
                                    }
                                }
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2375,6 +2375,7 @@
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("securitys", securityStates);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            MainPage.Log($"api安防控制:{requestJson}");
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_StatusSet, requestJson);
            return pack;
        }
@@ -2633,5 +2634,51 @@
        }
        #endregion
        /// <summary>
        /// 人脸录入
        /// </summary>
        /// <param name="imageBytes"></param>
        /// <returns></returns>
        public ResponsePackNew FaceSetting(string imageBytes)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("userFace", @"data:image/jpg;base64,"+imageBytes);
            //MainPage.Log(imageBytes);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_InputUserFace, requestJson);
        }
        /// <summary>
        /// 修改住户人脸关闭状态
        /// 1:开启状态 2:关闭状态
        /// 3:清除人脸数据
        /// </summary>
        public ResponsePackNew EditFaceFunction(int status)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("faceClose", status);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SwitchFaceFunction, requestJson);
        }
        /// <summary>
        /// 获取住户详情
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew GetCustomerInfo()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetCustomerInfo, requestJson);
        }
    }
}
HDL_ON/DAL/Server/HttpUtil.cs
@@ -16,10 +16,9 @@
        /// <summary>
        /// 固定域名,正式环境
        /// 公共域名就近解析
        ///
        /// </summary>
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
@@ -651,7 +650,7 @@
        /// <summary>
        /// 响应错误信息
        /// </summary>
        public string message;
        public string message = "";
        /// <summary>
        /// 这个是请求错误时的扩展数据,以后所有的附带扩展数据都会放在这里面动态维护
HDL_ON/DAL/Server/NewAPI.cs
@@ -661,6 +661,20 @@
        /// 获取通话记录
        /// </summary>
        public const string API_POST_FL_GetCallList = "/home-wisdom/platform/imou/listCallRecords";
        public const string Api_Post_GetSipInfo = "";
        /// <summary>
        /// 人脸录入
        /// </summary>
        public const string Api_Post_InputUserFace = "/community-wisdom/app/doorDevice/inputUserFace";
        /// <summary>
        /// 开关人脸功能
        /// </summary>
        public const string Api_Post_SwitchFaceFunction = "/community-wisdom/app/doorDevice/updateCustomerFaceClose";
        /// <summary>
        /// 获取住户详情
        /// </summary>
        public const string Api_Post_GetCustomerInfo = "/basis-footstone/app/customer/detail";
        #endregion
@@ -688,6 +702,11 @@
        public const string API_POST_DoorHistory = "/home-wisdom/app/device/door/logs";
        #endregion
        #region  ■  -- SIP相关接口_______________________________
        #endregion
    }
    ///// <summary>
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -784,6 +784,10 @@
        /// 萤石猫眼呼叫
        /// </summary>
        EZVIZ,
        /// <summary>
        ///
        /// </summary>
        HDL,
    }
HDL_ON/Entity/DB_ResidenceData.cs
@@ -155,6 +155,10 @@
            HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear();
            DAL.Mqtt.MqttClient.DisConnectRemote("退出登录,或者切换住宅");
        }
        /// <summary>
        /// 是否支持人脸通行
        /// </summary>
        public bool SupportFacePass = false;
        /// <summary>
        /// 网关详细信息
HDL_ON/Entity/Function/AirSwitch.cs
New file
@@ -0,0 +1,10 @@
using System;
namespace HDL_ON.Entity
{
    public class AirSwitch
    {
        public AirSwitch()
        {
        }
    }
}
HDL_ON/Entity/Function/Function.cs
@@ -1274,6 +1274,10 @@
        /// 青萍环境传感器
        /// </summary>
        public const string SensorEnvironment3 = "sensor.environment3";
        /// <summary>
        /// 甲醛
        /// </summary>
        public const string SensorHcho = "sensor.hcho";
        /// <summary>
        /// 环境传感器spk列表
@@ -1290,6 +1294,7 @@
            spkList.Add(SensorEnvironment);
            spkList.Add(SensorEnvironment2);
            spkList.Add(SensorEnvironment3);
            spkList.Add(SensorHcho);
            return spkList;
        }
@@ -1362,6 +1367,10 @@
        /// 红外风扇
        /// </summary>
        public const string FanIr = "ir.fan";
        /// <summary>
        /// 智能空开
        /// </summary>
        public const string AirSwitch = "electrical.breaker";
        #region 涂鸦
        /// <summary>
@@ -1404,6 +1413,7 @@
            spkList.Add(ElectricTuyaFan);
            spkList.Add(ElectricTuyaWeepRobot);
            spkList.Add(ElectricTuyaWaterValve);
            spkList.Add(AirSwitch);
            return spkList;
        }
HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -7,17 +7,17 @@
namespace HDL_ON.Entity
{
    public class SecurityCenter
    public class SecurityCenter111111
    {
        static SecurityCenter _securityCenter;
        static SecurityCenter111111 _securityCenter;
        public static SecurityCenter Ins
        public static SecurityCenter111111 Ins
        {
            get
            {
                if (_securityCenter == null)
                {
                    _securityCenter = new SecurityCenter();
                    _securityCenter = new SecurityCenter111111();
                }
                return _securityCenter;
            }
@@ -30,14 +30,11 @@
        {
            get
            {
                foreach (var temp in FunctionList.List.securities)
                lock (FunctionList.List.securities)
                {
                    if (temp.status == "enable")
                    {
                        return true;
                    var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable");
                    return temp == null ? false : true;
                    }
                }
                return false;
            }
        }
@@ -48,14 +45,11 @@
        {
            get
            {
                foreach (var temp in FunctionList.List.securities)
                lock (FunctionList.List.securities)
                {
                    if (temp.alarm)
                    {
                        return true;
                    var temp = FunctionList.List.securities.Find((obj) => obj.alarm == true);
                    return temp == null ? false : true;
                    }
                }
                return false;
            }
        }
@@ -69,13 +63,10 @@
            {
                if (_inDefenseMode == null)
                {
                    foreach (var temp in FunctionList.List.securities)
                    lock (FunctionList.List.securities)
                    {
                        if (temp.status == "enable")
                        {
                            _inDefenseMode = temp;
                            return _inDefenseMode;
                        }
                        var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable");
                        return temp;
                    }
                }
                return _inDefenseMode;
HDL_ON/Entity/Function/Sensor.cs
@@ -91,6 +91,12 @@
                    _intervalValue.Add("71 ~ 40");
                    _intervalValue.Add("0 ~ 39");
                    break;
                case SPK.SensorHcho:
                    _intervalValue.Add("~ 0.08");
                    _intervalValue.Add("0.08 ~ 0.1");
                    _intervalValue.Add("0.1 ~ ");
                    break;
            }
            return _intervalValue;
        }
@@ -136,6 +142,16 @@
                    _levelColorList.Add(0xFFADE764);
                    _levelColorList.Add(0xFFFF3D3D);
                    break;
                case SPK.SensorHcho:
                    _levelColorList.Add(0xFF2172FF);
                    _levelColorList.Add(0xFFADE764);
                    _levelColorList.Add(0xFFFF3D3D);
                    break;
                default:
                    _levelColorList.Add(0x00000000);
                    _levelColorList.Add(0x00000000);
                    _levelColorList.Add(0x00000000);
                    break;
            }
            return _levelColorList;
@@ -180,6 +196,16 @@
                    _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel1);
                    _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel2);
                    _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel3);
                    break;
                case SPK.SensorHcho:
                    _levelTextList.Add(StringId.Class_I_BuildingStandard);
                    _levelTextList.Add(StringId.SecondaryBuildingStandard);
                    _levelTextList.Add(StringId.ExceedingTheStandard);
                    break;
                default:
                    _levelTextList.Add(99999999);
                    _levelTextList.Add(99999999);
                    _levelTextList.Add(99999999);
                    break;
            }
            return _levelTextList;
@@ -248,6 +274,14 @@
                    else if (values < 40)
                        level = 3;
                    break;
                case SPK.SensorHcho:
                    if (values <= 0.08)
                        level = 1;
                    else if (values <= 0.1)
                        level = 2;
                    else
                        level = 3;
                    break;
            }
            return level;
        }
HDL_ON/HDL_ON.projitems
@@ -476,6 +476,12 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\AddInputPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\AddOutputPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\AddOutputSettingPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\FaceSettingPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Security.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\AirSwitchPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\AirSwitch.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\FaceSettingResultPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\CustomerObj.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.2.0821";
        public static string VersionString = "1.2.0827";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
@@ -116,6 +116,8 @@
        {
            SPK.EnergyStandard,
            SPK.MusicStandard,
            SPK.AirSwitch,
            SPK.ElectricEnergy,
        };
@@ -328,8 +330,11 @@
                    ///等待获取住宅信息
                    Application.RunOnMainThread( () =>
                    {
                        waitPage.Hide();
                        if (waitPage != null)
                        {
                        waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                        //跳转页面----
                        UserBasePage = new UserPage();
HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -513,7 +513,11 @@
                if (showedTime.AddSeconds(30) > DateTime.Now)
                {
                    thread.Abort();
                    if (waitPage != null)
                    {
                    waitPage.RemoveFromParent();
                        waitPage = null;
                    }
                }
            };
            thread.Start();
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -20,6 +20,12 @@
                //跳转到功能信息设置页面
                switch (function.spk)
                {
                    case SPK.AirSwitch:
                        var airSwitchPage = new AirSwitchPage(function);
                        MainPage.BasePageView.AddChidren(airSwitchPage);
                        airSwitchPage.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.LightSwitch:
                        var relayView = new RelayPage(function);
                        MainPage.BasePageView.AddChidren(relayView);
HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -162,7 +162,7 @@
        /// </summary>
        /// <param name="frame"></param>
        /// <param name="tilte"></param>
        public void LoadTopView_FunctionTop(Function function, Action action)
        public void LoadTopView_FunctionTop(Function function, Action action,bool locationSet = true)
        {
            backAction = action;
@@ -186,7 +186,7 @@
            {
                var infoView = new FunctionBaseInfoSetPage(function, action);
                MainPage.BasePageView.AddChidren(infoView);
                infoView.LoadPage();
                infoView.LoadPage(locationSet);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -209,11 +209,10 @@
                    //etAccount.Text = "1033326940@qq.com";
                    //etAccount.Text = "18022428438";//wjc
                    //etAccount.Text = "13602944661";//kx
                    //etAccount.Text = "13226233133";//豆豆
                    //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// ""//cf;;
                    etAccount.Text = "13226233133";//豆豆
                    etAccount.Text = "18316672920";
                    //etAccount.Text = "18316120654";//tujie
                    // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                    etAccount.Text = "15626203746";
                    //etAccount.Text = "15626203746";
                    //etAccount.Text = "13450425807";//黄竹溪 knx项目
                }
                else
@@ -232,12 +231,14 @@
                    //etAccount.Text = "15971583093";//高胜
                    //etAccount.Text = "15217626103";//昆明金茂项目
                    //etAccount.Text = "18598273624";
                    etAccount.Text = "fslcjm5@163.com";
                    etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                }
                b = !b;
                etPassword.Text = "123456";
                if(etAccount.Text == "15626203746")
                if(etAccount.Text == "fslcjm5@163.com")
                {
                    etPassword.Text = "123456";
                    etPassword.Text = "a123456";
                }
                //etPassword.Text = "Hdl85521566";
                btnLogin.IsSelected = true;
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -537,27 +537,39 @@
#if DEBUG
            //FunctionList.List.Functions.Add(new Function()
            //{
            //    spk = SPK.AirFreshStandard,
            //    name = "测试新风",
            //    spk = SPK.AirSwitch,
            //    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 = "燃气传感器",
                spk = SPK.AirFreshStandard,
                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" } },
                    new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
                    new FunctionAttributes(){ key = "fan",curValue= "low",state = "low" ,value = new List<string>(){ "high", "medium", "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>() {
@@ -683,7 +695,11 @@
                            GetUnreadPushMessages();
                            RegisterGetPushMessageAction();
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                                waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                    catch (Exception ex) {
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -30,22 +30,39 @@
        /// </summary>
        public static void LoadEvent_RefreshSecurityStatus()
        {
            try
            {
            Application.RunOnMainThread(() =>
            {
                if (bodyView != null)
                {
                    //foreach(var temp in FunctionList.List.securities)
                    //{
                    //    if(temp.status == "enable")
                    //    {
                    //        bodyView.btnSecurityStatus.IsSelected = true;
                    //        return;
                    //    }
                    //}
                    bodyView.btnSecurityStatus.IsSelected = SecurityCenter.Ins.InDefense;
                        lock (FunctionList.List.securities)
                        {
                            foreach (var temp in FunctionList.List.securities)
                            {
                                if (temp.status == "enable")
                                {
                                    if (temp.alarm)
                                    {
                                        bodyView.btnSecurityStatus.SelectedImagePath = "Collection/DefenseAlarmIcon.png";
                                    }
                                    else
                                    {
                                        bodyView.btnSecurityStatus.SelectedImagePath = "Collection/DefenseStatusIcon.png";
                                    }
                                    bodyView.btnSecurityStatus.IsSelected = true;
                                    return;
                                }
                            }
                        }
                }
            });
        }
            catch (Exception ex)
            {
                MainPage.Log($"安防主页更新异常:{ex.Message}");
            }
        }
        /// <summary>
        /// 更新室内传感器数据-湿度
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -442,8 +442,11 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                            waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
@@ -488,8 +491,11 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                            waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -373,7 +373,7 @@
                btnZone = new Button()
                {
                    X = Application.GetRealWidth(12),
                    Y = btnName.Bottom,
                    Y = Application.GetRealWidth(68+24),
                    Height = Application.GetRealWidth(18),
                    Width = Application.GetRealWidth(113),
                    TextColor = CSS_Color.MainBackgroundColor,
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
@@ -177,7 +177,14 @@
                        }
                        finally
                        {
                            Application.RunOnMainThread(() => { waitPage.Hide(); });
                            Application.RunOnMainThread(() =>
                            {
                                if (waitPage != null)
                                {
                                    waitPage.RemoveFromParent();
                                    waitPage = null;
                                }
                            });
                        }
                    })
                    { IsBackground = true }.Start();
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
@@ -159,7 +159,13 @@
                        }
                        finally
                        {
                            Application.RunOnMainThread(() => { waitPage.Hide(); });
                            Application.RunOnMainThread(() => {
                                if (waitPage != null)
                                {
                                    waitPage.RemoveFromParent();
                                    waitPage = null;
                                }
                            });
                        }
                    })
                    { IsBackground = true }.Start();
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -70,7 +70,14 @@
                }
                finally
                {
                    Application.RunOnMainThread(() => { waitPage.Hide(); });
                    Application.RunOnMainThread(() =>
                    {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -91,7 +91,13 @@
                }
                finally
                {
                    Application.RunOnMainThread(() => { waitPage.Hide(); });
                    Application.RunOnMainThread(() => {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/CustomerObj.cs
New file
@@ -0,0 +1,97 @@
using System;
namespace HDL_ON.Entity
{
    public class CustomerObj
    {
        public CustomerObj()
        {
        }
        /// <summary>
        /// 住户id
        /// </summary>
        public string customerId;
        /// <summary>
        /// 住户名称
        /// </summary>
        public string customerName;
        /// <summary>
        /// 住户类型
        /// </summary>
        public int customerType;
        /// <summary>
        /// 住户类型中文
        /// </summary>
        public string customerTypeText;
        /// <summary>
        /// 苑期区编号
        /// </summary>
        public string groupCode;
        /// <summary>
        /// 楼幢编号
        /// </summary>
        public string buildingCode;
        /// <summary>
        /// 单元编号
        /// </summary>
        public string unitCode;
        /// <summary>
        /// 楼层号
        /// </summary>
        public string floorNum;
        /// <summary>
        /// 房屋编号
        /// </summary>
        public string houseCode;
        /// <summary>
        /// 房屋名称
        /// </summary>
        public string houseName;
        /// <summary>
        /// 住户手机号
        /// </summary>
        public string customerPhone;
        /// <summary>
        /// 住户分机号
        /// </summary>
        public string customerPhoneProfix;
        /// <summary>
        /// 住户性别
        /// </summary>
        public string customerSex;
        /// <summary>
        /// 住户性别中文
        /// </summary>
        public string customerSexText;
        /// <summary>
        /// 住户证件号
        /// </summary>
        public string certificateNo;
        /// <summary>
        /// 住户人脸url
        /// </summary>
        public string customerFaceUrl;
        /// <summary>
        /// 住户地址
        /// </summary>
        public string address;
        /// <summary>
        /// 人脸状态
        /// 1:录入状态
        /// 2:下发成功
        /// 3:下发失败
        /// </summary>
        public int faceStatus = 0;
        /// <summary>
        /// 人脸状态
        /// 1:开启状态
        /// 2:关闭状态
        /// 3:清除人脸数据
        /// </summary>
        public int faceClose = 0;
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -1,4 +1,7 @@
using System;
using System.Threading;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
@@ -7,10 +10,44 @@
    public class FacePassagePage : FrameLayout
    {
        FrameLayout bodyView;
        FrameLayout contentView;
        Button btnCommunityAccessControlIcon;
        Button btnSetFaceId;
        Button btnEraseData;
        #region 图标选择部分图标
        /// <summary>
        /// 面容id
        /// 背景图选项区域
        /// </summary>
        string faceid = "";
        FrameLayout pictureOptionView;
        /// <summary>
        /// 背景图选项选择区域
        /// </summary>
        VerticalScrolViewLayout optionView;
        /// <summary>
        /// 拍照按钮
        /// </summary>
        Button btnTakePicture;
        /// <summary>
        /// 相册按钮
        /// </summary>
        Button btnAlbum;
        /// <summary>
        /// 取消按钮
        /// </summary>
        Button btnCancel;
        #endregion
        /// <summary>
        /// 住户详情
        /// </summary>
        CustomerObj customerObj = new CustomerObj();
        public FacePassagePage()
        {
@@ -23,7 +60,7 @@
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            var contentView = new FrameLayout()
            contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667-64),
@@ -82,7 +119,7 @@
            communityRow.AddChidren(btnCommunityTitle);
            var btnCommunityAccessControlIcon = new Button()
            btnCommunityAccessControlIcon = new Button()
            {
                X = Application.GetRealWidth(314),
                Gravity = Gravity.CenterVertical,
@@ -93,7 +130,20 @@
            };
            communityRow.AddChidren(btnCommunityAccessControlIcon);
            btnCommunityAccessControlIcon.MouseUpEventHandler = (sender, e) => {
                if(customerObj.faceClose == 3)//没有人脸数据不能开启人脸通行功能
                {
                    return;
                }
                btnCommunityAccessControlIcon.IsSelected = !btnCommunityAccessControlIcon.IsSelected;
                int switchStatus = btnCommunityAccessControlIcon.IsSelected == true ? 1 :2;
                //失败回调
                Action action = () => {
                    btnCommunityAccessControlIcon.IsSelected = !btnCommunityAccessControlIcon.IsSelected;
                };
                editFaceInfo(switchStatus,action);
            };
            #endregion
@@ -110,7 +160,7 @@
            contentView.AddChidren(btnTip);
            var btnSetFaceId = new Button()
            btnSetFaceId = new Button()
            {
                Y = Application.GetRealHeight(539),
                Gravity = Gravity.CenterHorizontal,
@@ -125,15 +175,11 @@
                IsBold = true,
            };
            contentView.AddChidren(btnSetFaceId);
            btnSetFaceId.MouseUpEventHandler = (sender, e) => {
                LoadPictureOptionView();
            };
            if (string.IsNullOrEmpty(faceid))
            {
            }
            else
            {
                btnSetFaceId.TextID = StringId.ResetFace;
                var btnEraseData = new Button()
            btnEraseData = new Button()
                {
                    Y = Application.GetRealHeight(481),
                    Gravity = Gravity.CenterHorizontal,
@@ -147,10 +193,360 @@
                    TextAlignment = TextAlignment.Center,
                    IsBold = true,
                };
            btnEraseData.MouseUpEventHandler = (sender,e) => {
                Action action = () => {
                    initButtonStatus();
                };
                editFaceInfo(3,action);
            };
            ReadFaceInfo();
        }
        /// <summary>
        /// 获取人脸信息
        /// </summary>
        void ReadFaceInfo()
        {
            var waitPage = new Loading();
            waitPage.Start();
            new Thread(() =>
            {
                try
                {
                    var hsr = new HttpServerRequest();
                    var pack = hsr.GetCustomerInfo();
                    if (pack != null)
                    {
                        if (pack.Code == StateCode.SUCCESS)
                        {
                            var cus = Newtonsoft.Json.JsonConvert.DeserializeObject<CustomerObj>(pack.Data.ToString());
                            if (cus != null)
                            {
                                customerObj = cus;
                                Application.RunOnMainThread(() =>
                                {
                                    initButtonStatus();
                                });
                            }
                        }
                    }
                }catch(Exception ex)
                {
                    MainPage.Log($"读取人脸信息异常:{ex.Message}");
                }
                finally
                {
                    Application.RunOnMainThread(() => {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 清除人脸数据
        /// </summary>
        void editFaceInfo(int status,Action action)
        {
            var waitPage = new Loading();
            waitPage.Start();
            new Thread(() =>
            {
                try
                {
                    var hsr = new HttpServerRequest();
                    var pack = hsr.EditFaceFunction(status);
                    if (pack != null)
                    {
                        if (pack.Code == StateCode.SUCCESS)
                        {
                            customerObj.faceClose = status;
                        }
                        else
                        {
                            Application.RunOnMainThread(() =>
                            {
                                IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
                            });
                        }
                    }
                }
                catch (Exception ex)
                {
                    MainPage.Log($"清除人脸信息异常:{ex.Message}");
                }
                finally
                {
                    Application.RunOnMainThread(() => {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                        action?.Invoke();
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 初始化底部按钮
        /// </summary>
        void initButtonStatus()
        {
            if (customerObj.faceClose == 1 || customerObj.faceClose == 2)//人脸数据已经存在1:人脸通行开启;2:关闭
            {
                if (customerObj.faceStatus == 2)//人脸数据下发门口机成功
                {
                    btnCommunityAccessControlIcon.IsSelected = customerObj.faceClose == 1;//人脸通行功能是否开启
                contentView.AddChidren(btnEraseData);
                    btnSetFaceId.TextID = StringId.ResetFace;
                    return;
                }
            }
                btnCommunityAccessControlIcon.IsSelected = false;
                btnEraseData.RemoveFromParent();
                btnSetFaceId.TextID = StringId.SetFace;
        }
        /// <summary>
        /// 加载图标选择选项
        /// </summary>
        void LoadPictureOptionView()
        {
            var pView = new FrameLayout()
            {
                BackgroundColor = CSS_Color.DialogTransparentColor1,
            };
            bodyView.AddChidren(pView);
            pictureOptionView = new FrameLayout()
            {
                Y = Application.GetRealHeight(445+50),
                Height = Application.GetRealHeight(250),
                AnimateSpeed = 0.3f,
                Animate = Animate.DownToUp,
            };
            pView.AddChidren(pictureOptionView);
            optionView = new VerticalScrolViewLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(100),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            pictureOptionView.AddChidren(optionView);
            btnTakePicture = new Button()
            {
                Height = Application.GetRealHeight(50),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.TakePicture,
            };
            optionView.AddChidren(btnTakePicture);
            optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
            btnAlbum = new Button()
            {
                Height = Application.GetRealHeight(50),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.Album,
            };
            optionView.AddChidren(btnAlbum);
            optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
            btnCancel = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(8) + optionView.Bottom,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
                TextID = StringId.Cancel,
                TextColor = CSS_Color.WarningColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            pictureOptionView.AddChidren(btnCancel);
            LoadEvent_PictureOptionViewEventList(pView);
        }
        /// <summary>
        /// 加载背景图选择区域事件列表
        /// </summary>
        void LoadEvent_PictureOptionViewEventList(FrameLayout pView)
        {
            pictureOptionView.MouseUpEventHandler = (sender, e) =>
            {
                pictureOptionView.Parent.RemoveFromParent();
            };
            pView.MouseUpEventHandler = (sender, e) =>
            {
                pictureOptionView.Parent.RemoveFromParent();
            };
            btnCancel.MouseUpEventHandler = (sender, e) =>
            {
                pictureOptionView.Parent.RemoveFromParent();
            };
            btnTakePicture.MouseDownEventHandler = (sender, e) => {
                btnTakePicture.IsSelected = true;
            };
            btnTakePicture.MouseUpEventHandler = (sender, e) =>
            {
                btnTakePicture.IsSelected = false;
                var imageName = Guid.NewGuid().ToString();
                CropImage.TakePicture((imagePath) =>
                {
                    CropImageCallBack(imagePath,1,imageName);
                }, imageName, 4, 6, 1000);
                pictureOptionView.Parent.RemoveFromParent();
            };
            btnAlbum.MouseDownEventHandler = (sender, e) => {
                btnAlbum.IsSelected = true;
            };
            btnAlbum.MouseUpEventHandler = (sender, e) =>
            {
                btnAlbum.IsSelected = false;
                //从相册选择图片裁剪
                var imageName = Guid.NewGuid().ToString();
                //var imageName = scene.sid;
                CropImage.SelectPicture((imagePath) =>
                {
                    CropImageCallBack(imagePath,2,imageName);
                }, imageName, 4, 6,1000);
                pictureOptionView.Parent.RemoveFromParent();
            };
        }
        /// <summary>
        /// 裁剪完照片回调,统一处理
        /// </summary>
        /// <param name="imagePath">裁剪后的真实路径</param>
        /// <param name="imageSource">照片来源;1:拍照;2:图库</param>
        void CropImageCallBack(string selectImagePath,int imageSource,string imageName)
        {
            if (string.IsNullOrEmpty(selectImagePath) == true)
            {
                return;
            }
            //上传成功到回调
            Action<bool> uploadSuccessAction = (isSuccess) =>
            {
                Action action = () => {
                    if (!isSuccess)
                    {
                        if (imageSource == 1)
                        {
                            CropImage.SelectPicture((imagePath) =>
                            {
                                CropImageCallBack(imagePath, 2, imageName);
                            }, imageName, 4, 6);
                        }
                        else
                        {
                            CropImage.TakePicture((imagePath) =>
                            {
                                CropImageCallBack(imagePath, 1,imageName);
                            }, imageName, 4, 6);
                        }
                    }else
                    {
                        ReadFaceInfo();
                    }
                };
                Application.RunOnMainThread(() =>
                {
                    var page = new FaceSettingResultPage(action);
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage(isSuccess);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                });
            };
            //上传图片到云端
            UploadImage(selectImagePath, uploadSuccessAction);
        }
        /// <summary>
        /// 上传图片方法
        /// </summary>
        /// <param name="selectImagePath">裁剪后的图片路径</param>
        /// <param name="imageView"></param>
        /// <param name="uploadResultAction"></param>
        void UploadImage(string selectImagePath, Action<bool> uploadResultAction)
        {
            try
            {
                //1.读取裁剪后的图片,然后删除
                var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath);
                System.IO.File.Delete(selectImagePath);
                var waitPage = new Loading();
                bodyView.AddChidren(waitPage);
                waitPage.Start(Language.StringByID(StringId.PleaseWait));
                //开始上传
                new Thread(() =>
                {
                    try
                    {
                        string base64string = Convert.ToBase64String(imageBytes);
                        var pack = new HttpServerRequest().FaceSetting(base64string);
                        if (pack != null)
                        {
                            uploadResultAction?.Invoke(pack.Code == StateCode.SUCCESS);
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            if (waitPage != null)
                            {
                                waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
                { IsBackground = true }.Start();
            }
            catch { }
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs
New file
@@ -0,0 +1,197 @@
//using System;
//using HDL_ON.UI.CSS;
//using Shared;
//namespace HDL_ON.UI
//{
//    public class FaceSettingPage : FrameLayout
//    {
//        FrameLayout bodyView;
//        #region 图标选择部分图标
//        /// <summary>
//        /// 背景图选项区域
//        /// </summary>
//        FrameLayout pictureOptionView;
//        /// <summary>
//        /// 背景图选项选择区域
//        /// </summary>
//        VerticalScrolViewLayout optionView;
//        /// <summary>
//        /// 拍照按钮
//        /// </summary>
//        Button btnTakePicture;
//        /// <summary>
//        /// 相册按钮
//        /// </summary>
//        Button btnAlbum;
//        /// <summary>
//        /// 取消按钮
//        /// </summary>
//        Button btnCancel;
//        #endregion
//        public FaceSettingPage()
//        {
//            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),
//                BackgroundColor = 0xFFFFFFFF,
//            };
//            bodyView.AddChidren(contentView);
//            var imageName = Guid.NewGuid().ToString();
//            CropImage.TakePicture((imagePath) =>
//            {
//            }, imageName, 4, 3);
//        }
//        /// <summary>
//        /// 加载图标选择选项
//        /// </summary>
//        void LoadPictureOptionView()
//        {
//            var pView = new FrameLayout()
//            {
//                BackgroundColor = CSS_Color.DialogTransparentColor1,
//            };
//            bodyView.AddChidren(pView);
//            pictureOptionView = new FrameLayout()
//            {
//                Y = Application.GetRealHeight(445),
//                Height = Application.GetRealHeight(250),
//                AnimateSpeed = 0.3f,
//                Animate = Animate.DownToUp,
//            };
//            pView.AddChidren(pictureOptionView);
//            optionView = new VerticalScrolViewLayout()
//            {
//                Gravity = Gravity.CenterHorizontal,
//                Width = Application.GetRealWidth(343),
//                Height = Application.GetRealHeight(150),
//                BackgroundColor = CSS_Color.MainBackgroundColor,
//                Radius = (uint)Application.GetRealWidth(12),
//            };
//            pictureOptionView.AddChidren(optionView);
//            btnTakePicture = new Button()
//            {
//                Height = Application.GetRealHeight(50),
//                TextAlignment = TextAlignment.Center,
//                TextColor = CSS_Color.TextualColor,
//                SelectedTextColor = CSS_Color.MainColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//                TextID = StringId.TakePicture,
//            };
//            optionView.AddChidren(btnTakePicture);
//            optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
//            btnAlbum = new Button()
//            {
//                Height = Application.GetRealHeight(50),
//                TextAlignment = TextAlignment.Center,
//                TextColor = CSS_Color.TextualColor,
//                SelectedTextColor = CSS_Color.MainColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//                TextID = StringId.Album,
//            };
//            optionView.AddChidren(btnAlbum);
//            optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
//            btnCancel = new Button()
//            {
//                Gravity = Gravity.CenterHorizontal,
//                Y = Application.GetRealHeight(8) + optionView.Bottom,
//                Width = Application.GetRealWidth(343),
//                Height = Application.GetRealHeight(50),
//                BackgroundColor = CSS_Color.MainBackgroundColor,
//                Radius = (uint)Application.GetRealWidth(12),
//                TextID = StringId.Cancel,
//                TextColor = CSS_Color.WarningColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//            };
//            pictureOptionView.AddChidren(btnCancel);
//            LoadEvent_PictureOptionViewEventList(pView);
//        }
//        /// <summary>
//        /// 加载背景图选择区域事件列表
//        /// </summary>
//        void LoadEvent_PictureOptionViewEventList(FrameLayout pView)
//        {
//            pictureOptionView.MouseUpEventHandler = (sender, e) =>
//            {
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            pView.MouseUpEventHandler = (sender, e) =>
//            {
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            btnCancel.MouseUpEventHandler = (sender, e) =>
//            {
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            btnTakePicture.MouseDownEventHandler = (sender, e) => {
//                btnTakePicture.IsSelected = true;
//            };
//            btnTakePicture.MouseUpEventHandler = (sender, e) =>
//            {
//                btnTakePicture.IsSelected = false;
//                var imageName = Guid.NewGuid().ToString();
//                //var imageName = scene.sid;
//                CropImage.TakePicture((imagePath) =>
//                {
//                    CropImageCallBack(imagePath);
//                }, imageName, 4, 3);
//                //if (pageTitleId == StringId.EditScene)
//                //{
//                //    scene.SaveFunctionData();
//                //}
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            btnAlbum.MouseDownEventHandler = (sender, e) => {
//                btnAlbum.IsSelected = true;
//            };
//            btnAlbum.MouseUpEventHandler = (sender, e) =>
//            {
//                btnAlbum.IsSelected = false;
//                //从相册选择图片裁剪
//                var imageName = Guid.NewGuid().ToString();
//                //var imageName = scene.sid;
//                CropImage.SelectPicture((imagePath) =>
//                {
//                    //CropImageCallBack(imagePath);
//                }, imageName, 4, 3);
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//        }
//    }
//}
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs
New file
@@ -0,0 +1,97 @@
using System;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public class FaceSettingResultPage : FrameLayout
    {
        FrameLayout bodyView;
        Action backAction;
        public FaceSettingResultPage(Action action)
        {
            bodyView = this;
            backAction = action;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="isSuccess">是否成功</param>
        public void LoadPage(bool isSuccess)
        {
            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 btnResultIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(99),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(100),
                UnSelectedImagePath = "PersonalCenter/FacePassage/FailIcon.png",
                SelectedImagePath = "PersonalCenter/FacePassage/TrueIcon.png",
                IsSelected = isSuccess,
            };
            contentView.AddChidren(btnResultIcon);
            Button btnResultText = new Button()
            {
                Y = Application.GetRealHeight(240),
                Height = Application.GetRealHeight(40),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            contentView.AddChidren(btnResultText);
            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 = isSuccess ? StringId.Complete :StringId.Retry,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            contentView.AddChidren(btnSetFaceId);
            btnSetFaceId.MouseUpEventHandler = (sender, e) => {
                if (isSuccess)
                {
                    this.RemoveFromParent();
                }
                else
                {
                    backAction?.Invoke();
                    this.RemoveFromParent();
                }
            };
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -84,7 +84,6 @@
        /// 区域成员小区域文本
        /// </summary>
        Button btnResidenceMemberText;
        #region F3阶段
        /// <summary>
        /// 区域安放小区域
        /// </summary>
@@ -121,9 +120,7 @@
        /// 区域添加功能小区域文本
        /// </summary>
        Button btnResidenceAddFunctionText;
        #endregion
        #region F3阶段
        ///// <summary>
        ///// 软件设置区域
        ///// </summary>
@@ -155,7 +152,6 @@
        /// </summary>
        Button btnSmartSpeakerText;
        #endregion
        public PersonalCenterPage()
        {
@@ -478,7 +474,6 @@
                    residenceArmView.AddChidren(btnResidenceArmText);
                    #endregion
                }
                #region F3阶段
                #region ---数据备份区域
                //residenceDataBackupView = new FrameLayout()
@@ -541,6 +536,8 @@
                //residenceAuxiliaryFunctionView.AddChidren(btnResidenceAuxiliaryFunctionText);
                #endregion
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                #region ---添加功能区域
                residenceAddFunctionView = new FrameLayout()
                {
@@ -571,7 +568,7 @@
                };
                residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
                #endregion
                #endregion
                }
            }
            else
            {
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -40,12 +40,23 @@
            if (btnResidenceArmIcon != null)
            {
                btnResidenceArmIcon.IsSelected = false;
                lock (FunctionList.List.securities)
                {
                foreach (var temp in FunctionList.List.securities)
                {
                    if (temp.status == "enable")
                    {
                            if (temp.alarm)
                            {
                                btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceInAlarmIcon.png";
                            }
                            else
                            {
                                btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png";
                            }
                        btnResidenceArmIcon.IsSelected = true;
                        break;
                        }
                    }
                }
                btnResidenceArmIcon.MouseUpEventHandler = (sender, e) =>
@@ -308,6 +319,10 @@
        #region 添加设备
        void LoadEvent_SkipbtnAddFunctionPage()
        {
            if (DB_ResidenceData.Instance.GatewayType == 1)
            {
                try
                {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var page = new BrandListPage();
@@ -318,6 +333,9 @@
            btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler;
            btnResidenceAddFunctionText.MouseUpEventHandler = eventHandler;
        }
                catch { }
            }
        }
        #endregion
        #region 关于On、获取支持
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -259,11 +259,17 @@
            /// </summary>
            optionListView = new VerticalScrolViewLayout()
            {
                Height = Application.GetRealHeight(51 * (6+1)),
                Height = Application.GetRealHeight(51 * 6),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                ScrollEnabled = false,
            };
            bodyScrolView.AddChidren(optionListView);
            if(Entity.DB_ResidenceData.Instance.SupportFacePass)
            {
                optionListView.Height = Application.GetRealHeight(51 * (6 + 1));
            }
            #region 个人选项-名字区域
            /// <summary>
            /// 个人选项-名字区域
@@ -563,7 +569,8 @@
            optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
            #endregion
            if (Entity.DB_ResidenceData.Instance.SupportFacePass)
            {
            #region 个人选项-人脸通行管理
            faceManagementView = new FrameLayout()
            {
@@ -597,12 +604,11 @@
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #endregion
            }
            #endregion
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
@@ -486,7 +486,11 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                                waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs
@@ -110,8 +110,11 @@
                finally
                {
                    Application.RunOnMainThread(() => {
                        waitPage.Hide();
                        if (waitPage != null)
                        {
                        waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                        int count = SpatialInfo.CurrentSpatial.FloorList.Count > 10 ? 10 : SpatialInfo.CurrentSpatial.FloorList.Count;
                        floorsListView.Height = Application.GetRealHeight(50 * count);
                        contentView.Height = Application.GetRealHeight(50 * (count + 1));
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
@@ -151,8 +151,11 @@
                    finally
                    {
                        Application.RunOnMainThread(() => {
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                            waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
@@ -59,8 +59,11 @@
                            finally
                            {
                                Application.RunOnMainThread(() => {
                                    waitPage.Hide();
                                    if (waitPage != null)
                                    {
                                    waitPage.RemoveFromParent();
                                        waitPage = null;
                                    }
                                });
                            }
                        })
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
@@ -63,8 +63,11 @@
                        {
                            Application.RunOnMainThread(() =>
                            {
                                waitPage.Hide();
                                if (waitPage != null)
                                {
                                waitPage.RemoveFromParent();
                                    waitPage = null;
                                }
                            });
                        }
                    })
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -66,19 +66,21 @@
            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;
                ShowFanSelectView();
                //return;
                //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();
                //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);
@@ -140,40 +142,107 @@
            };
            frameBack.Show();
            var fanAttr = device.GetAttribute(FunctionAttributeKey.FanSpeed);
            if(fanAttr == null)
            {
                return;
            }
            var valueCount = fanAttr.value.Count;
            //菜单控件(风速)
            var menuContr = new DialogTitleMenuControl(3, Language.StringByID(StringId.FanSpeed));
            menuContr.X = Application.GetRealWidth(209);
            var menuContr = new DialogTitleMenuControl(valueCount, Language.StringByID(StringId.FanSpeed));
            //menuContr.X = Application.GetRealWidth(209);
            menuContr.Gravity = Gravity.CenterHorizontal;
            menuContr.Y = Application.GetRealHeight(231);
            menuContr.Width = Application.GetRealWidth(160);
            if (valueCount > 2)
            {
            menuContr.Height = Application.GetRealHeight(199);
            }
            else
            {
                menuContr.Height = Application.GetRealHeight(154);
            }
            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", () =>
            foreach(var fanAttrValue in fanAttr.value)
            {
                frameBack.Close();
                //发送档位命令
                this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "low");
            });
                bool isSelecte = false;
                var iconPath = "FunctionIcon/AirFresh/Fan1.png";
                string text = Language.StringByID(StringId.FanOneGear);
                if (fanAttrValue == "low" || fanAttrValue == "level_1")
                {
                    text = Language.StringByID(StringId.LowWindSpeed);
                    if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low"|| this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "level_1")
                    {
                        iconPath = "FunctionIcon/AirFresh/Fan1Select.png";
                        isSelecte = true;
                    }
                }
                else if (fanAttrValue == "medium" || fanAttrValue == "level_2")
                {
                    text = Language.StringByID(StringId.MiddleWindSpeed);
                    iconPath = "FunctionIcon/AirFresh/Fan2.png";
                    if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" || this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "level_2")
                    {
                        iconPath = "FunctionIcon/AirFresh/Fan2Select.png";
                        isSelecte = true;
                    }
                }
                else if (fanAttrValue == "high" || fanAttrValue == "level_3")
                {
                    text = Language.StringByID(StringId.HighWindSpeed);
                    iconPath = "FunctionIcon/AirFresh/Fan3.png";
                    if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" || this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "level_3")
                    {
                        iconPath = "FunctionIcon/AirFresh/Fan3Select.png";
                        isSelecte = true;
                    }
                }
            //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", () =>
                menuContr.AddRowMenu(text, iconPath, isSelecte, () =>
            {
                frameBack.Close();
                //发送档位命令
                this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "medium");
                    this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, fanAttrValue);
            });
            }
            //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");
            });
            //if (fanAttr.value.Contains("low"))
            //{
            //    //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");
            //    });
            //}
            //if (fanAttr.value.Contains("medium"))
            //{
            //    //2档
            //    var 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");
            //    });
            //}
            //if (fanAttr.value.Contains("high"))
            //{
            //    //3档
            //    var 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
@@ -300,5 +369,8 @@
        #endregion
    }
}
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
@@ -249,7 +249,11 @@
                    finally
                    {
                        Application.RunOnMainThread(() => {
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                                waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
@@ -34,6 +35,15 @@
        /// 撤防区域
        /// </summary>
        FrameLayout disarmView;
        /// <summary>
        /// 布防接口
        /// </summary>
        SecurityAlarm InDefenseMode = null;
        /// <summary>
        /// 自定义布防控件列表
        /// </summary>
        List<ArmDiyView> armDiyViewList = new List<ArmDiyView>();
        public ArmCenterPage()
        {
@@ -84,16 +94,20 @@
            {
                Width = Application.GetRealWidth(198),
                Height = Application.GetRealWidth(198),
                UnSelectedImagePath = "FunctionIcon/ArmCenter/InAlarmBigIcon.png",
            };
            btnInalarmIcon.MouseUpEventHandler = (sender, e) => {
                if(SecurityCenter.Ins.InDefenseMode!= null)
                if(InDefenseMode!= null)
                {
                    SecurityCenter.Ins.InDefenseMode.alarm = false;
                    Control.Ins.ControlSecurity(SecurityCenter.Ins.InDefenseMode, "enable");
                    Action action = () =>
                    {
                        InDefenseMode.alarm = false;
                        Control.Ins.ControlSecurity(InDefenseMode, "enable");
                    };
                    new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteSceneTip, action);
                }
            };
            InitAlarmStatus(SecurityCenter.Ins.InAlarm);
            btnDefenseName = new Button()
            {
@@ -141,9 +155,9 @@
                //        break;
                //    }
                //}
                if(SecurityCenter.Ins.InDefenseMode!= null)
                if(InDefenseMode!= null)
                {
                    Control.Ins.ControlSecurity(SecurityCenter.Ins.InDefenseMode, "disable");
                    Control.Ins.ControlSecurity(InDefenseMode, "disable");
                }
            };
@@ -243,24 +257,31 @@
            #endregion
            ///刷新界面
            LoadEvent_RefreshSecurityStatus();
            iniCustomDeploymentView();
        }
        /// <summary>
        /// 初始化报警状态
        /// </summary>
        /// <param name="inAlarm"></param>
        public void InitAlarmStatus(bool inAlarm)
        {
            try
            {
                if (inAlarm)
                {
                    if (btnInalarmIcon.Parent == null)
                    {
                    alarmIconBgView.AddChidren(btnInalarmIcon);
                    }
                }
                else
                {
                    if (btnInalarmIcon.Parent != null)
                    {
                    btnInalarmIcon.RemoveFromParent();
                    }
                }
            }
            catch { }
@@ -272,11 +293,11 @@
        private void iniCustomDeploymentView()
        {
            customDeploymentView.RemoveAll();
            armDiyViewList.Clear();
            foreach (var mode in FunctionList.List.securities)
            {
                var armDiyView = new ArmDiyView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png",
                mode.name);
                mode.name,mode.sid);
                customDeploymentView.AddChidren(armDiyView);
                EventHandler<MouseEventArgs> event2 = (sender, e) =>
                {
@@ -286,13 +307,18 @@
                if (mode.status == "enable")
                {
                    armDiyView.LightingView(true);
                    InDefenseMode = mode;
                    ///刷新界面
                    LoadEvent_RefreshSecurityStatus(InDefenseMode);
                }
                armDiyViewList.Add(armDiyView);
            }
            if (FunctionList.List.securities.Count < 4)
            {
                var view = new ArmDiyView("FunctionIcon/ArmCenter/AddDefenseIcon.png", "FunctionIcon/ArmCenter/AddDefenseIcon.png",
                  Language.StringByID(StringId.Custom));
                  Language.StringByID(StringId.Custom),"customSid");
                customDeploymentView.AddChidren(view);
                EventHandler<MouseEventArgs> event1 = (sender, e) =>
                {
@@ -381,13 +407,12 @@
            }
            btnOpen.MouseUpEventHandler = (sender, e) => {
                if (alarm.status == "disable")
                string controlStatus = alarm.status == "disable" ? "enable" : "disable";
                new System.Threading.Thread(() =>
                {
                    Control.Ins.ControlSecurity(alarm, "enable");
                }else
                {
                    Control.Ins.ControlSecurity(alarm, "disable");
                }
                    Control.Ins.ControlSecurity(alarm, controlStatus);
                })
                { IsBackground = true }.Start();
                dialog.Close();  
            };
@@ -411,28 +436,68 @@
        }
        public static void LoadEvent_RefreshSecurityStatus()
        public static void LoadEvent_RefreshSecurityStatus(SecurityAlarm updataTemp)
        {
            Application.RunOnMainThread(() =>
            {
                try
                {
                if (bodyView != null)
                {
                    bodyView.iniCustomDeploymentView();
                        //布防
                        if (updataTemp.status == "enable")
                        {
                            bodyView.InDefenseMode = updataTemp;
                            foreach (var tempView in bodyView.armDiyViewList)
                            {
                                tempView.LightingView(false);
                                if (tempView.sid == updataTemp.sid)
                                {
                                    tempView.LightingView(updataTemp.status == "enable");
                                }
                            }
                        }
                        else
                        {
                            //撤防
                            if(bodyView.InDefenseMode.sid == updataTemp.sid)
                            {
                                foreach (var tempView in bodyView.armDiyViewList)
                                {
                                    tempView.LightingView(false);
                                }
                            }
                        }
                        //foreach(var tempView in bodyView.armDiyViewList)
                        //{
                        //    tempView.LightingView(false);
                        //    if(tempView.sid == updataTemp.sid)
                        //    {
                        //        tempView.LightingView(updataTemp.status == "enable");
                        //    }
                        //}
                        //没有布防的情况
                        if (bodyView.InDefenseMode ==null|| bodyView.InDefenseMode.status == "disable")
                        {
                    bodyView.disarmView.Height = 0;
                    bodyView.btnArmTipIcon.IsSelected = false;
                    bodyView.btnDefenseName.Text = "";
                    foreach (var temp in FunctionList.List.securities)
                    {
                        if (temp.status == "enable")
                        }
                        else
                        {
                            bodyView.disarmView.Height = Application.GetRealHeight(68);
                            bodyView.btnArmTipIcon.IsSelected = true;
                            bodyView.btnDefenseName.Text = temp.name;
                            bodyView.InitAlarmStatus(temp.alarm);
                            break;
                            bodyView.btnDefenseName.Text = bodyView.InDefenseMode.name;
                        }
                        bodyView.InitAlarmStatus(bodyView.InDefenseMode.alarm);
                        }
                    }
                catch (Exception ex)
                {
                    MainPage.Log($"安防界面更新异常:{ex.Message}");
                }
            });
        }
@@ -446,14 +511,16 @@
    {
        Button btnIcon;
        Button btnText;
        public string sid;
        /// <summary>
        /// 自定义布防界面
        /// </summary>
        /// <param name="UnSelectedIconPath">图片路径</param>
        /// <param name="SelectedIconPath">图片路径</param>
        /// <param name="Text">显示文本</param>
        public ArmDiyView(string UnSelectedIconPath, string SelectedIconPath, string Text)
        public ArmDiyView(string UnSelectedIconPath, string SelectedIconPath, string Text,string inSid)
        {
            sid = inSid;
            this.Width = Application.GetRealWidth(82);
            this.Height = Application.GetRealWidth(80);
@@ -497,6 +564,9 @@
    }
    /// <summary>
    /// 固定布防控件
    /// </summary>
    public class FixedArmView : FrameLayout
    {
        /// <summary>
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
@@ -235,7 +235,11 @@
                    finally
                    {
                        Application.RunOnMainThread(() => {
                            waitPage.Hide();
                            if (waitPage != null)
                            {
                                waitPage.RemoveFromParent();
                                waitPage = null;
                            }
                        });
                    }
                })
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
@@ -85,18 +85,26 @@
                Control.Ins.SendWriteCommand(function, d);
            };
            btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
            };
            btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
            };
            btnCurtainClose.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainOpen.IsSelected = false;
                btnCurtainStop.IsSelected = false;
            };
            btnCurtainStop.MouseUpEventHandler = (sender, e) =>
            {
                new System.Threading.Thread(() => {
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -19,14 +19,14 @@
                    return;
                if (updateTemp.spk == bodyView.function.spk && updateTemp.sid == bodyView.function.sid)
                {
                    var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
                    if (percentString != null)
                    {
                        int percent = 0;
                        int.TryParse(percentString, out percent);
                        bodyView.btnCurtainOpen.IsSelected = percent > 0;
                        bodyView.btnCurtainClose.IsSelected = percent == 0;
                    }
                    //var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
                    //if (percentString != null)
                    //{
                    //    int percent = 0;
                    //    int.TryParse(percentString, out percent);
                    //    bodyView.btnCurtainOpen.IsSelected = percent > 0;
                    //    bodyView.btnCurtainClose.IsSelected = percent == 0;
                    //}
                    try
                    {
                        if (!bodyView.onCurtainAnimation)
@@ -136,13 +136,15 @@
        {
            btnCurtainClose.MouseUpEventHandler = (sender, e) =>
            {
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainClose.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() =>
                    {
                        btnCurtainClose.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                function.trait_on_off.curValue = "off";
                function.SetAttrState(FunctionAttributeKey.Percent, 0);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -171,13 +173,15 @@
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainOpen.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() =>
                    {
                        btnCurtainOpen.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                function.trait_on_off.curValue = "on";
                function.SetAttrState(FunctionAttributeKey.Percent, 100);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -190,16 +194,20 @@
            btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
            };
            btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
            };
            btnCurtainClose.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainOpen.IsSelected = false;
                btnCurtainStop.IsSelected = false;
            };
            //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -19,11 +19,11 @@
                    return;
                if (updateTemp.spk == bodyView.function.spk && updateTemp.sid == bodyView.function.sid)
                {
                    var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
                    int percent = 0;
                    int.TryParse(percentString, out percent);
                    bodyView.btnCurtainOpen.IsSelected = percent > 0;
                    bodyView.btnCurtainClose.IsSelected = percent == 0;
                    //var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
                    //int percent = 0;
                    //int.TryParse(percentString, out percent);
                    //bodyView.btnCurtainOpen.IsSelected = percent > 0;
                    //bodyView.btnCurtainClose.IsSelected = percent == 0;
                    try
                    {
                        if (!bodyView.onCurtainAnimation)
@@ -133,13 +133,15 @@
        {
            btnCurtainClose.MouseUpEventHandler = (sender, e) =>
            {
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainClose.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() =>
                    {
                        btnCurtainClose.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                function.trait_on_off.curValue = "off";
                function.SetAttrState(FunctionAttributeKey.Percent, 0);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -166,13 +168,15 @@
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainOpen.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() =>
                    {
                        btnCurtainOpen.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                function.trait_on_off.curValue = "on";
                function.SetAttrState(FunctionAttributeKey.Percent, 100);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -203,16 +207,20 @@
            btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
            };
            btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
            };
            btnCurtainClose.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainOpen.IsSelected = false;
                btnCurtainStop.IsSelected = false;
            };
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
New file
@@ -0,0 +1,249 @@
using System;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public class AirSwitchPage : FrameLayout
    {
        #region 控件集合
        static AirSwitchPage bodyView;
        /// <summary>
        /// 控制界面加载区域
        /// </summary>
        FrameLayout controlView;
        /// <summary>
        /// 功能备注
        /// </summary>
        Button btnFunctionName;
        /// <summary>
        /// 功能所属楼层、房间
        /// </summary>
        Button btnFromFoorAndRoom;
        /// <summary>
        /// 收藏按钮
        /// </summary>
        Button btnCollection;
        /// <summary>
        /// 继电器状态图标
        /// </summary>
        Button btnSwitchIcon;
        /// <summary>
        /// 开关按钮
        /// </summary>
        Button btnSwitch;
        #endregion
        #region 区域变量
        Function function;
        Button btnCollection_Out;
        Button btnFunctionName_Out;
        Button btnFromFloor_Out;
        /// <summary>
        /// 刷新显示信息
        /// </summary>
        Action actionRefresh;
        #endregion
        public AirSwitchPage(Function func)
        {
            bodyView = this;
            function = func;
        }
        /// <summary>
        /// 加载界面
        /// </summary>
        /// <param name="btnCollectionIcon">收藏按钮</param>
        /// <param name="btnFunctionName">功能名称信息按钮</param>
        /// <param name="btnFromFloor">功能楼层信息按钮</param>
        public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut)
        {
            if (btnCollectionIcon == null)
            {
                btnCollection_Out = new Button();
                btnFunctionName_Out = new Button();
                btnFromFloor_Out = new Button();
            }
            else
            {
                btnCollection_Out = btnCollectionIcon;
                btnFunctionName_Out = btnFunctionNameOut;
                btnFromFloor_Out = btnFromFloorOut;
            }
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), function);
            controlView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(88),
                Width = Application.GetRealWidth(327),
                Height = Application.GetRealHeight(526),
                BackgroundImagePath = "Public/Fragmentbg.png",
            };
            bodyView.AddChidren(controlView);
            btnFunctionName = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(14),
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(37),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = function.name,
            };
            controlView.AddChidren(btnFunctionName);
            btnFromFoorAndRoom = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnFunctionName.Bottom,
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(21),
                TextColor = CSS_Color.PromptingColor1,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = function.GetRoomListName()
            };
            controlView.AddChidren(btnFromFoorAndRoom);
            btnCollection = new Button()
            {
                X = Application.GetRealWidth(273),
                Y = Application.GetRealHeight(14),
                Width = Application.GetMinRealAverage(40),
                Height = Application.GetMinRealAverage(40),
                SelectedImagePath = "Collection/CollectionIcon.png",
                UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
                IsSelected = function.collect
            };
            controlView.AddChidren(btnCollection);
            btnSwitchIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(102),
                Width = Application.GetRealWidth(148),
                Height = Application.GetRealWidth(198),
                UnSelectedImagePath = "FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png",
                SelectedImagePath = "FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png",
                IsSelected = function.trait_on_off.curValue.ToString() == "on"
            };
            controlView.AddChidren(btnSwitchIcon);
            btnSwitch = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(466),// + btnSwitchIcon.Bottom,
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "Public/PowerClose.png",
                SelectedImagePath = "Public/PowerOpen.png",
                IsSelected = function.trait_on_off.curValue.ToString() == "on"
            };
            controlView.AddChidren(btnSwitch);
            new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh,false);
            new System.Threading.Thread(() =>
            {
                DriverLayer.Control.Ins.SendReadCommand(function);
            })
            { IsBackground = true }.Start();
            LoadEventList();
        }
        /// <summary>
        /// 更新状态
        /// </summary>
        public static void UpdataState(Function updataTemp)
        {
            Application.RunOnMainThread(() =>
            {
                try
                {
                    if (bodyView == null)
                        return;
                    if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid)
                    {
                        bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on";
                    }
                }
                catch (Exception ex)
                {
                    MainPage.Log($"AirSwitch error {ex.Message}");
                }
            });
        }
        /// <summary>
        /// 加载事件列表
        /// </summary>
        void LoadEventList()
        {
            LoadSwitchEvent();
            LoadCollectionEvent();
            //回退刷新信息事件
            actionRefresh = () => {
                btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
                //function.SaveFunctionData(true);
            };
        }
        /// <summary>
        /// 收藏功能按钮事件
        /// </summary>
        void LoadCollectionEvent()
        {
            btnCollection.MouseUpEventHandler += (sender, e) => {
                btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                function.CollectFunction();
            };
        }
        /// <summary>
        /// 加载开关事件
        /// </summary>
        void LoadSwitchEvent()
        {
            btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
            {
                btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitchIcon.IsSelected ? "on" : "off";
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    DriverLayer.Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
            btnSwitch.MouseUpEventHandler = (sender, e) =>
            {
                btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    DriverLayer.Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -47,7 +47,7 @@
        /// <summary>
        /// 加载界面
        /// </summary>
        public void LoadPage()
        public void LoadPage(bool locationSetting = true)
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(actionRefresh);
@@ -111,7 +111,8 @@
                });
            #endregion
            if (locationSetting)
            {
            #region 位置管理
            var locationMagtView = new FrameLayout()
            {
@@ -162,7 +163,7 @@
                    Height = Application.GetRealHeight(1)
                });
            #endregion
            }
            #region 共享
            //var sharedView = new FrameLayout()
            //{