d68d94ae29987d123c5c4e207ee65c713052348c..c7f6a15a17344e55f0c2349392501100ba2a206e
2021-09-27 wxr
Merge branch 'WJC' into wxr7
c7f6a1 对比 | 目录
2021-09-27 wei
组合调光
1eb432 对比 | 目录
2021-09-26 JLChen
2021-9-26-01
aed01b 对比 | 目录
2021-09-26 wei
主从网关属性,防挤下线账号删除
dd3fec 对比 | 目录
2021-09-24 wei
更新spk
4820da 对比 | 目录
2021-09-23 wei
合并嘉乐本地加密代码
a3b929 对比 | 目录
2021-09-23 wei
主页刷新优化
4f2dbd 对比 | 目录
2021-09-16 wei
更新可视对讲
cfaccc 对比 | 目录
2021-09-07 wei
安卓信息推送开关
ceeb0e 对比 | 目录
2021-09-07 wxr
Merge remote-tracking branch 'origin/jpush_tst' into wxr7
95a7e3 对比 | 目录
2021-09-07 wei
1.窗帘问题。2.智能空开。3.组合调光部分。
6b6a3f 对比 | 目录
2021-09-06 Tong
删除启动页Label
501713 对比 | 目录
2021-09-03 Tong
优化启动页
23848c 对比 | 目录
2021-09-03 wei
1
608855 对比 | 目录
2021-09-02 Tong
//2021-09-02 BaseActivity去掉MainLauncher启动、并且改为SingleTask
609bc2 对比 | 目录
2021-09-02 Tong
//2021-09-02 BaseActivity去掉MainLauncher启动、并且改为SingleTask
5fa119 对比 | 目录
2021-09-02 Tong
解决home键、荧石sdk冲突
e55207 对比 | 目录
2021-09-02 wei
8月版本备份
bbef77 对比 | 目录
2021-09-01 Tong
删除多余代码
f66855 对比 | 目录
2021-09-01 Tong
极光库整合完成
071085 对比 | 目录
2021-08-31 Tong
Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project...
57c036 对比 | 目录
2021-08-31 Tong
修改全局秘钥
d21ef6 对比 | 目录
2021-08-31 Tong
还原配置
0326a1 对比 | 目录
2021-08-31 Tong
配置秘钥
b50f4f 对比 | 目录
2021-08-31 Tong
更新推送库
e0a2d7 对比 | 目录
2021-08-31 Tong
更新推送库
157be5 对比 | 目录
2021-08-30 Tong
替换极光推送包
244ca4 对比 | 目录
8个文件已添加
74个文件已修改
102479 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/EZvizMonitor/ys.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.JPush.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Application.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Echarts/js/echarts-all.js 92180 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/Public/HookIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/agconnect-services.json 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/JPush/JPushFirmBroadcast.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/JPush/JPushReceiver.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/Resource.designer.cs 6817 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/values/styles.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/SplashActivity.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/Public/HookIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_APP_Project.sln 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/HDLCommon.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control_Udp.cs 683 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Packet.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/DB_ResidenceData.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Device/DeviceModule.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 273 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Light.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/Widget/ConfirmDialog.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs 192 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/RoomPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs 624 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/UserPage.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
on_plus.keystore 补丁 | 查看 | 原始文档 | blame | 历史
ys/Jars/app-release.aar 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,10 +1,17 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/Device/DeviceModule.cs">
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.220222E9-B9CA-4834-9318-2BC22465F050" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs">
    <Files>
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="856" Column="58" />
      <File FileName="HDL_ON/DAL/DriverLayer/Control_TcpServer.cs" Line="102" Column="56" />
      <File FileName="HDL_ON/Entity/Device/DeviceModule.cs" Line="49" Column="21" />
      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="20" Column="57" />
      <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="55" />
      <File FileName="HDL-ON_iOS/Info.plist" />
      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="759" Column="32" />
      <File FileName="HDL_ON/Common/HDLCommon.cs" Line="395" Column="23" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="758" Column="1" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="643" Column="1" />
      <File FileName="HDL_ON/UI/UI0-Public/TopViewDiv.cs" Line="166" Column="46" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="45" Column="53" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs" Line="32" Column="16" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -12,29 +19,29 @@
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="DAL" expanded="True">
                <Node name="DriverLayer" expanded="True" />
                <Node name="Mqtt" expanded="True" />
                <Node name="Server" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="DeviceModule.cs" selected="True" />
                </Node>
                <Node name="ResponseEntity" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="BindingResidence" expanded="True" />
                <Node name="UI0-Public" expanded="True" />
                <Node name="UI0-Public" expanded="True">
                  <Node name="Widget" expanded="True" />
                </Node>
                <Node name="UI2" expanded="True">
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True" />
                  </Node>
                  <Node name="4-PersonalCenter" expanded="True">
                    <Node name="PirDevice" expanded="True" />
                  <Node name="1-HomePage" expanded="True" />
                  <Node name="2-Classification" expanded="True" />
                  <Node name="4-PersonalCenter" expanded="True" />
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="Energy" expanded="True" />
                    <Node name="EnvironmentalScience" expanded="True" />
                    <Node name="Light" expanded="True">
                      <Node name="LightScene" expanded="True">
                        <Node name="AddLightScene.cs" selected="True" />
                      </Node>
                    </Node>
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_iOS" expanded="True" />
          </Node>
        </State>
      </Pad>
@@ -45,12 +52,30 @@
    <String>Shared.IOS.TBL/Shared.IOS.TBL.csproj</String>
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
    <String>../Linphone/HDLLinphoneSDK_IOS/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android AndroidDesignerPreferredDevice="Nexus 4" PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
    <BreakpointStore>
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
      <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="758" 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/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/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="481" 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="541" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="315" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="475" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="474" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" line="153" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="338" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs" line="244" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs" line="148" 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="865" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="2689" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="2685" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" line="524" column="1" />
    </BreakpointStore>
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
  <MultiItemStartupConfigurations />
</Properties>
DLL/EZvizMonitor/ys.dll
Binary files differ
DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll
Binary files differ
DLL/Shared.Droid.JPush.dll
Binary files differ
HDL-ON_Android/Application.cs
@@ -137,8 +137,6 @@
            BaseActivity.OnResumeAction += (activity) =>
            {
                checkSomeInfo();
            };
            BaseActivity.OnDestroyAction += (activity) =>
            {
@@ -146,7 +144,6 @@
                //BusSocket.Stop();
                //UserInfo.Current.unlockTime = DateTime.Now;
            };
            HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
@@ -168,8 +165,6 @@
                }
                MainPage.Log($"经纬度:::{lon}:{lat}");
            };
        }
        /// <summary>
@@ -178,10 +173,8 @@
        /// <param name="activity"></param>
        void GetJPushRegistrationID(BaseActivity activity)
        {
            try
            {
                //保存获取的极光服务器上的注册ID到本地文件
                var tokenID = JPushInterface.GetRegistrationID(activity);
                Console.WriteLine("RegistrationID:  " + tokenID);
@@ -226,9 +219,9 @@
        {
            //手机名称 Android.OS.Build.Manufacturer;
            //OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
//#if DEBUG
            //#if DEBUG
            //CN.Jpush.Android.Api.JPushInterface.SetDebugMode(true);
//#endif
            //#endif
            CN.Jpush.Android.Api.JPushInterface.Init(this);
        }
@@ -400,6 +393,17 @@
            base.Dispose(disposing);
        }
        /// <summary>
        /// 查询通知权限,并提示
        /// </summary>
        public  void QueryNotificationPermission()
        {
        }
    }
}
HDL-ON_Android/Assets/Echarts/js/echarts-all.js
Diff too large
HDL-ON_Android/Assets/Language.ini
@@ -496,6 +496,8 @@
508=Formaldehyde
509=Please enter security name.
510=Please select the deployment target.
511=Combined dimming
512=Message push is not enabled, please go to settings.
 
1000=Room Humidity
@@ -1613,7 +1615,8 @@
508=甲醛
509=请输入安防名称。
510=请选择布防目标。
511=组合调光
512=消息推送未开启,请前往设置。
 
1000=室内湿度
HDL-ON_Android/Assets/Phone/Public/HookIcon.png
HDL-ON_Android/Assets/agconnect-services.json
New file
@@ -0,0 +1,47 @@
{
    "agcgw_all":{
        "CN":"connect-drcn.hispace.hicloud.com",
        "CN_back":"connect-drcn.dbankcloud.cn",
        "DE":"connect-dre.hispace.hicloud.com",
        "DE_back":"connect-dre.dbankcloud.cn",
        "RU":"connect-drru.hispace.hicloud.com",
        "RU_back":"connect-drru.dbankcloud.cn",
        "SG":"connect-dra.hispace.hicloud.com",
        "SG_back":"connect-dra.dbankcloud.cn"
    },
    "client":{
        "cp_id":"2850086000428177029",
        "product_id":"736430079245970940",
        "client_id":"703480846752957504",
        "client_secret":"6E796F2ED36C43A87C4F7BB68680F29A15CBD7635F1D55ED004A17F2D2070D17",
        "project_id":"736430079245970940",
        "app_id":"104676079",
        "api_key":"CwEAAAAAzCMOmemAwFVmnLqO8YeBY1StA3YLbXD5k/jRfW8xIga0hN85Ka9PQ4R9hj7dn0WtjVkoW9rTgusFrJhAxUE4tMGV514=",
        "package_name":"com.hdl.onpro"
    },
    "oauth_client":{
        "client_id":"104676079",
        "client_type":1
    },
    "app_info":{
        "app_id":"104676079",
        "package_name":"com.hdl.onpro"
    },
    "configuration_version":"3.0",
    "appInfos":[
        {
            "package_name":"com.hdl.onpro",
            "client":{
                "app_id":"104676079"
            },
            "app_info":{
                "package_name":"com.hdl.onpro",
                "app_id":"104676079"
            },
            "oauth_client":{
                "client_type":1,
                "client_id":"104676079"
            }
        }
    ]
}
HDL-ON_Android/HDL-ON_Android.csproj
@@ -28,7 +28,7 @@
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>True</DebugSymbols>
    <DebugType>portable</DebugType>
    <Optimize>False</Optimize>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;__Android__</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
@@ -37,6 +37,16 @@
    <MandroidI18n>cjk</MandroidI18n>
    <AndroidDexTool>d8</AndroidDexTool>
    <AndroidEnableSGenConcurrent>false</AndroidEnableSGenConcurrent>
    <AndroidSigningKeyStore>/Users/kaede/Desktop/HDL_APP_Project/on_plus.keystore</AndroidSigningKeyStore>
    <AndroidSigningStorePass>85521566</AndroidSigningStorePass>
    <AndroidSigningKeyPass>85521566</AndroidSigningKeyPass>
    <AndroidSigningKeyAlias>on_plus</AndroidSigningKeyAlias>
    <AotAssemblies>false</AotAssemblies>
    <EnableLLVM>false</EnableLLVM>
    <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
    <BundleAssemblies>false</BundleAssemblies>
    <AndroidEnableMultiDex>false</AndroidEnableMultiDex>
    <AndroidUseAapt2>true</AndroidUseAapt2>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>True</DebugSymbols>
@@ -51,8 +61,16 @@
    <MandroidI18n>cjk</MandroidI18n>
    <AndroidEnableSGenConcurrent>false</AndroidEnableSGenConcurrent>
    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
    <AndroidKeyStore>True</AndroidKeyStore>
    <AndroidSigningKeyStore>/Users/kaede/Desktop/HDL_APP_Project/on_plus.keystore</AndroidSigningKeyStore>
    <AndroidSigningStorePass>85521566</AndroidSigningStorePass>
    <AndroidSigningKeyPass>85521566</AndroidSigningKeyPass>
    <AndroidSigningKeyAlias>on_plus</AndroidSigningKeyAlias>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Shared.Droid.JPush">
      <HintPath>..\DLL\Shared.Droid.JPush.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
@@ -163,10 +181,13 @@
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainActivity.cs" />
    <Compile Include="Other\JPush\JPushFirmBroadcast.cs" />
    <Compile Include="Other\JPush\JPushOpenClickActivity.cs" />
    <Compile Include="Resources\Resource.designer.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Application.cs" />
    <Compile Include="Scan.cs" />
    <Compile Include="SplashActivity.cs" />
    <Compile Include="ZXingCustomScanView.cs" />
    <Compile Include="ZXingOverlayView.cs" />
    <Compile Include="Other\JLCountrycode.cs" />
@@ -183,6 +204,7 @@
    <Compile Include="Other\HDLONUtils.cs" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\agconnect-services.json" />
    <None Include="Resources\AboutResources.txt" />
    <None Include="Properties\AndroidManifest.xml" />
    <None Include="Assets\AboutAssets.txt" />
@@ -383,28 +405,40 @@
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\launchImage.xml">
      <SubType></SubType>
      <Generator></Generator>
      <SubType>
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\mipmap-xhdpi\Loading.png">
      <SubType></SubType>
      <Generator></Generator>
      <SubType>
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\mipmap-hdpi\Loading.png">
      <SubType></SubType>
      <Generator></Generator>
      <SubType>
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\mipmap-mdpi\Loading.png">
      <SubType></SubType>
      <Generator></Generator>
      <SubType>
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\mipmap-xxhdpi\Loading.png">
      <SubType></SubType>
      <Generator></Generator>
      <SubType>
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\mipmap-xxxhdpi\Loading.png">
      <SubType></SubType>
      <Generator></Generator>
      <SubType>
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
  </ItemGroup>
  <ItemGroup>
@@ -462,6 +496,7 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
    <AndroidAsset Include="Assets\Phone\LogicIcon\security.png" />
    <AndroidAsset Include="Assets\Phone\Public\HookIcon.png" />
    <AndroidAsset Include="Assets\Phone\Collection\MesCenter\Property.png" />
    <AndroidAsset Include="Assets\Phone\Collection\MesCenter\PropertyOn.png" />
  </ItemGroup>
@@ -487,9 +522,6 @@
    </PackageReference>
    <PackageReference Include="RestSharp">
      <Version>106.11.7</Version>
    </PackageReference>
    <PackageReference Include="XamarinLibrary.Xamarin.Android.Manual.JPush">
      <Version>3.7.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Android.Support.Constraint.Layout">
      <Version>1.1.0</Version>
@@ -1360,12 +1392,7 @@
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorLock.png" />
  </ItemGroup>
  <ItemGroup>
    <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>
  <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" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
HDL-ON_Android/Other/JPush/JPushFirmBroadcast.cs
New file
@@ -0,0 +1,61 @@

using Android.Content;
using System;
using CN.Jpush.Android.Api;
namespace HDL_ON_Android
{
    [BroadcastReceiver(Enabled = true, Exported = false, Name = "com.hdl.onpro.JPushFirmBroadcast")]
    [Android.App.IntentFilter(new string[]
    {
        "com.hdl.onpro.jpush.firm.NOTIFICATION_OPENED"
    },
     Categories = new string[]
    {
        Intent.CategoryDefault
    })]
    class JPushFirmBroadcast : BroadcastReceiver
    {
        public override void OnReceive(Context context, Intent intent)
        {
            /* 用来接收厂商点击通知消息,需要打开MainActivity 需要自行调用
             cn.jpush.android.EXTRA,cn.jpush.android.MSG_ID,
             cn.jpush.android.TYPE_PLATFORM,
            cn.jpush.android.TITLE,
            cn.jpush.android.MESSAGE*/
            try
            {
                NotificationMessage notificationMessage = new NotificationMessage();
                String extra = intent.GetStringExtra(JPushInterface.ExtraExtra);
                String msgId = intent.GetStringExtra(JPushInterface.ExtraMsgId);
                String message = intent.GetStringExtra(JPushInterface.ExtraMessage);
                String title = intent.GetStringExtra(JPushInterface.ExtraTitle);
                //  String typePlatform = intent.GetStringExtra(JPushInterface.ExtraTypePlatform);
                notificationMessage.NotificationTitle = title;
                notificationMessage.NotificationContent = message;
                notificationMessage.NotificationExtras = extra;
                JPushReceiver.OpenNotification(context, notificationMessage);
            }
            catch
            {
            }
        }
    }
}
HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs
New file
@@ -0,0 +1,55 @@
using Android.App;
using Android.Content;
using Android.OS;
using Com.Hdl.ON.Jpush.Androidjpush;
using Android.Views;
namespace HDL_ON_Android
{
    [Activity(
            Exported = true, Enabled = true, Name = "com.hdl.onpro.JPushOpenClickActivity"
        , Theme = "@android:style/Theme.Translucent.NoTitleBar")]
    [IntentFilter(new string[] { "com.hdl.onpro.JPushOpenClickActivity", Intent.ActionView },
         Categories = new string[]
        {
      "com.hdl.onpro",Intent.CategoryDefault
        })
        ]
    public class JPushOpenClickActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            View v = new View(this);
            SetContentView(v);
            HandleOpenClick(Intent);
        }
        protected void HandleOpenClick(Intent intent)
        {
            Intent broadcastIntent = new Intent();
            broadcastIntent.SetAction("com.hdl.onpro.jpush.firm.NOTIFICATION_OPENED");
            ComponentName componentName = new ComponentName(PackageName, "com.hdl.onpro.JPushFirmBroadcast");
            if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
            {
                broadcastIntent.SetComponent(componentName);
            }
            FirmOpenClickHelper.Instance.HandleOpenClick(this, intent, broadcastIntent);
            Finish();
        }
        protected override void OnNewIntent(Intent intent)
        {
            base.OnNewIntent(intent);
            HandleOpenClick(intent);
        }
    }
}
HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -7,22 +7,24 @@
using HDL_ON;
using HDL_ON.DAL.Server;
using Shared;
using Android.OS;
namespace HDL_ON_Android
{
{
    [BroadcastReceiver(Enabled = true, Exported = false)]
    [Android.App.IntentFilter(new string[]
    {
        "cn.jpush.android.intent.RECEIVE_MESSAGE"
    },
    Categories=new string[]
    Categories = new string[]
    {
        "com.hdl.onpro"
    })]
    public class JPushReceiver : JPushMessageReceiver
    {
    {
        private static string TAG = "JPushReceiver";
        /// <summary>
        /// 用户点击打开了通知
@@ -66,20 +68,21 @@
            Utlis.WriteLine("PushMes title : " + pushMes.Title);
            Utlis.WriteLine("PushMes message : " + pushMes.Content);
            Utlis.WriteLine("PushMes extras : " + pushMes.Extras);
            Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
            Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
            Shared.Application.RunOnMainThread(() =>
            {
                HDLCommon.Current.AdjustPushMessage(pushMes);
            });
        }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pushMes"></param>
        /// <returns></returns>
        ExpandData GetJPushExpandData(JPushMessageInfo pushMes)
        static ExpandData GetJPushExpandData(JPushMessageInfo pushMes)
        {
            try
            {
@@ -149,8 +152,9 @@
        /// </summary>
        /// <param name="context"></param>
        /// <param name="notificationMessage"></param>
        private void OpenNotification(Context context, NotificationMessage notificationMessage)
        {
        public static void OpenNotification(Context context, NotificationMessage notificationMessage)
        {
            try
            {
                var pushMes = new JPushMessageInfo()
@@ -172,33 +176,32 @@
                Utlis.WriteLine("PushMes title : " + pushMes.Title);
                Utlis.WriteLine("PushMes message : " + pushMes.Content);
                Utlis.WriteLine("PushMes extras : " + pushMes.Extras);
                Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
                Shared.Application.RunOnMainThread(() =>
                {
                    Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                    i.SetFlags(ActivityFlags.NewTask);
                    context.StartActivity(i);
                    HDLCommon.Current.AdjustPushMessage(pushMes);
                });
                //Shared.Application.RunOnMainThread(() =>
                //{
                //    if (Shared.Application.Activity == null)
                //    {
                //        var tempIntent = new Intent(context, typeof(Shared.BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                //        tempIntent.SetFlags(ActivityFlags.BroughtToFront);
                //        context.StartActivity(tempIntent);
                //        HDLCommon.Current.AdjustPushMessage(pushMes);
                //    }
                //    else
                //    {
                //        (Shared.Application.Activity as BaseActivity).MoveToFront();
                //        HDLCommon.Current.AdjustPushMessage(pushMes);
                //    }
                //});
                Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
                Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                i.SetFlags(ActivityFlags.NewTask);
                context.StartActivity(i);
                //解析msg
                AdjustPushMessage(pushMes);
                //Shared.Application.RunOnMainThread(() =>
                //{
                //    if (Shared.Application.Activity == null)
                //    {
                //        var tempIntent = new Intent(context, typeof(Shared.BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                //        tempIntent.SetFlags(ActivityFlags.BroughtToFront);
                //        context.StartActivity(tempIntent);
                //        HDLCommon.Current.AdjustPushMessage(pushMes);
                //    }
                //    else
                //    {
                //        (Shared.Application.Activity as BaseActivity).MoveToFront();
                //        HDLCommon.Current.AdjustPushMessage(pushMes);
                //    }
                //});
            }
            catch
            {
@@ -209,6 +212,25 @@
            //    Utlis.WriteLine(ex.ToString());
            //}
        }
    }
        public static void AdjustPushMessage(JPushMessageInfo pushMes)
        {
            new System.Threading.Thread(new System.Threading.ThreadStart(() =>
            {
                while (MainPage.BasePageView == null)
                {
                    System.Threading.Thread.Sleep(300);
                }
                Shared.Application.RunOnMainThread(() =>
                {
                    HDLCommon.Current.AdjustPushMessage(pushMes);
                });
            })).Start();
        }
    }
}
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="202109021" android:versionName="1.2.202109021" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202109261" android:versionName="1.2.202109261" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
    <!-- 乐橙可视对讲需要的权限 -->
    <!--<uses-permission android:name="android.permission.INTERNET" />-->
@@ -87,6 +87,7 @@
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
        </provider>
        <!--极光推送-->
        <provider android:name="Shared.Droid.JPush.HmsContentProvider" android:authorities="${applicationId}.hmspushprovider" android:exported="false"></provider>
        <!-- Required SDK 核心功能-->
        <!-- 可配置 android:process 参数将 PushService 放在其他进程中 -->
        <service android:name="cn.jpush.android.service.PushService" android:enabled="true" android:exported="false">
@@ -169,6 +170,11 @@
        <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
        <!-- Required. AppKey copied from Portal -->
        <meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" />
        <meta-data android:name="XIAOMI_APPKEY" android:value="MI-5871892343860" />
        <meta-data android:name="XIAOMI_APPID" android:value="MI-2882303761518923860" />
        <meta-data android:name="OPPO_APPKEY" android:value="OP-e942dafe77cf4b9f868d5421d701655a" />
        <meta-data android:name="OPPO_APPID" android:value="OP-30619979" />
        <meta-data android:name="OPPO_APPSECRET" android:value="OP-11d511c42f654cafac99588322681003" />
        <!-- 极光推送结束 -->
    </application>
</manifest>
HDL-ON_Android/Resources/Resource.designer.cs
Diff too large
HDL-ON_Android/Resources/values/styles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<resources >
    <!-- 其中parent可以为 android:Theme 或 android:Theme.NoTitleBar; android:windowBackground可以为背景图 -->
    <style name="MyTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">
        <item name="android:windowBackground">@drawable/launchimage</item>
@@ -8,7 +8,18 @@
        <!-- 隐藏标题栏 -->
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowTranslucentStatus">true</item>
    </style>
    <style name="SplashTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">
        <item name="android:windowBackground">@drawable/launchimage</item>
        <!-- 隐藏状态栏 -->
        <item name="android:windowFullscreen">true</item>
        <!-- 隐藏标题栏 -->
        <item name="android:windowNoTitle">true</item>
    </style>
    <style name="MyDialogStyle">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowFrame">@null</item>
HDL-ON_Android/SplashActivity.cs
New file
@@ -0,0 +1,28 @@
using Android.App;
using Android.Content;
using Android.OS;
using Com.Hdl.ON.Jpush.Androidjpush;
using Shared;
namespace HDL_ON_Android
{
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity")]
    [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })]
    public class SplashActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            //打开baseActivity
            Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
            StartActivity(i);
            OverridePendingTransition(0, 0);
            Finish();
        }
    }
}
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -54,7 +54,7 @@
        <MtouchLink>SdkOnly</MtouchLink>
        <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
        <MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignProvision>On+Dev-20210616-1</CodesignProvision>
<CodesignProvision>On+Dev-20210913-1</CodesignProvision>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
@@ -129,9 +129,6 @@
      </PackageReference>
      <PackageReference Include="Xamarin.Essentials">
        <Version>1.7.0</Version>
      </PackageReference>
      <PackageReference Include="Xamarin.Swift">
        <Version>1.0.8</Version>
      </PackageReference>
    </ItemGroup>
    <ItemGroup>
@@ -1353,6 +1350,7 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
      <BundleResource Include="Resources\Phone\LogicIcon\security.png" />
      <BundleResource Include="Resources\Phone\Public\HookIcon.png" />
      <BundleResource Include="Resources\Phone\Collection\MesCenter\Property.png" />
      <BundleResource Include="Resources\Phone\Collection\MesCenter\PropertyOn.png" />
    </ItemGroup>
HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.2.202100921</string>
    <string>1.2.202109261</string>
    <key>CFBundleVersion</key>
    <string>1.2.09021</string>
    <string>1.2.09261</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -496,6 +496,8 @@
508=Formaldehyde
509=Please enter security name.
510=Please select the deployment target.
511=Combined dimming
512=Message push is not enabled, please go to settings.
 
1000=Room Humidity
@@ -1613,7 +1615,8 @@
508=甲醛
509=请输入安防名称。
510=请选择布防目标。
511=组合调光
512=消息推送未开启,请前往设置。
 
1000=室内湿度
HDL-ON_iOS/Resources/Phone/Public/HookIcon.png
HDL_APP_Project.sln
@@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
# Visual Studio Version 16
VisualStudioVersion = 16.0.31613.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "HDL_ON", "HDL_ON\HDL_ON.shproj", "{A5C296B4-CF9A-4205-ACF0-3A6FEA786F12}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HDL-ON_Android", "HDL-ON_Android\HDL-ON_Android.csproj", "{09712674-2A38-407B-B1E2-560B2C352F9A}"
@@ -10,50 +11,63 @@
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}"
EndProject
Global
    GlobalSection(SharedMSBuildProjectFiles) = preSolution
        HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4
        HDL_ON\HDL_ON.projitems*{a5c296b4-cf9a-4205-acf0-3a6fea786f12}*SharedItemsImports = 13
        HDL_ON\HDL_ON.projitems*{d998e133-f0dd-4760-be3c-461632f54da4}*SharedItemsImports = 4
    EndGlobalSection
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
        Debug|iPhoneSimulator = Debug|iPhoneSimulator
        Release|iPhoneSimulator = Release|iPhoneSimulator
        Debug|iPhone = Debug|iPhone
        Debug|iPhoneSimulator = Debug|iPhoneSimulator
        Release|Any CPU = Release|Any CPU
        Release|iPhone = Release|iPhone
        Release|iPhoneSimulator = Release|iPhoneSimulator
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|Any CPU.Build.0 = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhone.ActiveCfg = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhone.Build.0 = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhone.Deploy.0 = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|Any CPU.Build.0 = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhone.ActiveCfg = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhone.Build.0 = Release|Any CPU
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
        {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|Any CPU.ActiveCfg = Debug|iPhone
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhone.ActiveCfg = Debug|iPhone
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhone.Build.0 = Debug|iPhone
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhone.ActiveCfg = Release|iPhone
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhone.Build.0 = Release|iPhone
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
        {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|Any CPU.Build.0 = Debug|iPhone
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|Any CPU.Build.0 = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.ActiveCfg = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.Build.0 = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|Any CPU.Build.0 = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.ActiveCfg = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.Build.0 = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
        {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.Build.0 = Debug|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {42CB9D67-2370-4213-A935-8706935256AA}
    EndGlobalSection
EndGlobal
HDL_ON/Common/ApiUtlis.cs
@@ -56,7 +56,9 @@
            return result;
        }
        /// <summary>
        /// 下载数据完成标记
        /// </summary>
        public bool DownloadDataComplete = true;
        /// <summary>
        /// 下载数据
@@ -168,7 +170,7 @@
                            for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                            {
                                var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
                                if (localFunction.Spk_Prefix == FunctionCategory.Music || string.IsNullOrEmpty(localFunction.Spk_Prefix))
                                if (SPK.MusicSpkList().Contains(localFunction.spk))
                                {
                                    i++;
                                    continue;
HDL_ON/Common/HDLCommon.cs
@@ -390,20 +390,8 @@
            //测试账号,不挤下线
            switch (UserInfo.Current.AccountString)
            {
                case "13415629083":
                case "18316120654":
                case "15622703419":
                case "18824864143":
                case "464027401@qq.com":
                case "2791308028@qq.com":
                case "13697499568":
                case "18666455392":
                case "13375012446":
                case "13602944661":
                case "18778381374":
                case "18316672920":
                case "15626203746":
                case "551775569@qq.com":
                    return;
            }
HDL_ON/Common/R.cs
@@ -6,6 +6,15 @@
    {
        /// <summary>
        /// 安卓消息推送提示
        /// </summary>
        public const int Android_MessagePushTip = 512;
        //public const int SaveAs
        /// <summary>
        /// 组合调光
        /// </summary>
        public const int CombinedDimming = 511;
        /// <summary>
        /// 
        /// </summary>
        public const int PleaseSelectTheDeploymentTarget = 510;
HDL_ON/DAL/DriverLayer/Control.cs
@@ -407,9 +407,12 @@
            switch (function.spk)
            {
                case SPK.ElectricTuyaAirCleaner:
                case SPK.ElectricTuyaAirCleaner2:
                case SPK.ElectricTuyaFan:
                case SPK.ElectricTuyaFan2:
                case SPK.ElectricTuyaWaterValve:
                case SPK.ElectricTuyaWeepRobot:
                case SPK.ElectricTuyaWeepRobot2:
                    useRemote = true;
                    break;
            }
@@ -957,7 +960,6 @@
                        }
                        //更新界面状态
                        Function localObj = null;
                        switch (localFunction.spk)
                        {
                            case SPK.AirSwitch:
@@ -975,6 +977,7 @@
                                DimmerPage.UpdataStates(localFunction);
                                break;
                            case SPK.ElectricFan:
                            case SPK.HvacFan:
                                localFunction.lastState = Language.StringByID(StringId.Level) + " : " +
                                   localFunction.GetAttrState(FunctionAttributeKey.OpenLevel);
                                FanPage.UpdataState(localFunction);
@@ -1045,6 +1048,7 @@
                                    ACPage.UpdataStates(localFunction);
                                }
                                break;
                            case SPK.HvacFloorHeat:
                            case SPK.FloorHeatStandard:
                                localFunction.lastState = "";
                                switch (localFunction.GetAttrState(FunctionAttributeKey.Mode))
@@ -1082,7 +1086,7 @@
                                    HomePage.LoadEvent_RefreshEnvirIndoorHumi();
                                }
                                EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(localFunction);
                                //A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(localFunction);
                                break;
                            case SPK.SensorEnvironment:
                            case SPK.SensorEnvironment2:
@@ -1096,17 +1100,22 @@
                                    HomePage.LoadEvent_RefreshEnvirIndoorHumi();
                                }
                                EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(localFunction);
                                //A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(localFunction);
                                break;
                            case SPK.ElectricSocket:
                            case SPK.PanelSocket:
                                SocketPage.UpdataState(localFunction);
                                break;
                            case SPK.ElectricTV:
                                break;
                            case SPK.ElectricTuyaAirCleaner:
                            case SPK.ElectricTuyaAirCleaner2:
                            case SPK.ElectricTuyaFan:
                            case SPK.ElectricTuyaFan2:
                            case SPK.ElectricTuyaWeepRobot:
                            case SPK.ElectricTuyaWeepRobot2:
                            case SPK.ElectricTuyaWaterValve:
                            case SPK.ElectricTuyaWaterValve2:
                            case SPK.SensorPir:
                            case SPK.SensorDoorWindow:
                            case SPK.SensorSmoke:
@@ -1114,7 +1123,9 @@
                            case SPK.ClothesHanger:
                            case SPK.AcIr:
                            case SPK.SenesorMegahealth:
                            case SPK.SenesorMegahealth2:
                            case SPK.AirFreshStandard:
                            case SPK.HvacAirFresh:
                                //设备状态推送
                                //状态更新
                                Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -69,8 +69,8 @@
                SubnetID = subnetID,
                DeviceID = deviceID,
                AddData = gatewayBytes,
            }, 3, true);
            //}, sendCount, reSend);
            //}, 3, true);
            }, sendCount, reSend);
        }
        /// <summary>
@@ -192,7 +192,7 @@
                                            break;
                                    }
                                    ControlBytesSend(Command.SetCurtainModelStutas, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID,
                                        new byte[] { f.localFunction.bus.LoopId, curtainState });
                                        new byte[] { f.localFunction.bus.LoopId, curtainState },0);
                                    break;
                                }
                            }
@@ -297,7 +297,7 @@
                            break;
                        case SPK.LightRGB:
                            break;
                        case SPK.FloorHeatStandard:
                        case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
                            if (f.status.Find((obj)=>obj.key ==FunctionAttributeKey.Mode) == null)
                            {
                                foreach (var dic in f.status)
@@ -366,6 +366,7 @@
                            }
                            break;
                        case SPK.ElectricSocket:
                        case SPK.PanelSocket:
                            foreach (var attr in f.status)
                            {
                                if (attr.key == FunctionAttributeKey.OnOff)
@@ -424,7 +425,7 @@
        /// </summary>
        /// <param name="commandString"></param>
        /// <returns></returns>
        public void WriteBusData(Function function, Dictionary<string, string> commandDictionary,bool reSend = false)
        public void WriteBusData(Function function, Dictionary<string, string> commandDictionary, bool reSend = false)
        {
            try
            {
@@ -432,163 +433,199 @@
                var deviceId = function.bus.DeviceID;
                var loopId = function.bus.LoopId;
                switch (function.Spk_Prefix)
                switch (function.spk)
                {
                    case FunctionCategory.Light:
                        switch (function.spk)
                    case SPK.LightCCT:
                        #region cct light
                        byte b0 = 100;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                        {
                            case SPK.LightCCT:
                                byte b0 = 100;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                                {
                                    if (function.trait_on_off.curValue.ToString() == "off")
                                    {
                                        b0 = 0;
                                    }
                                    else
                                    {
                                        b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                                    }
                                }
                                else
                                {
                                    b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                                }
                                var bytes0 = new byte[] { function.bus.LoopId,
                            if (function.trait_on_off.curValue.ToString() == "off")
                            {
                                b0 = 0;
                            }
                            else
                            {
                                b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                            }
                        }
                        else
                        {
                            b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                        }
                        var bytes0 = new byte[] { function.bus.LoopId,
                                            b0,
                                            254, 0,Convert.ToByte(function.GetAttrState(FunctionAttributeKey.FadeTime)) ,2,
                                            (byte)(Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.CCT))/256),
                                            (byte)(Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.CCT))%256),
                                            0,
                                            0,0};
                                ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes0, 1);
                                break;
                            case SPK.LightRGB:
                                byte b = 100;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                                {
                                    if (function.trait_on_off.curValue.ToString() == "off")
                                    {
                                        b = 0;
                                    }
                                    else
                                    {
                                        b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                                    }
                                }
                                else
                                {
                                    b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                                }
                                var tempLight = new Light();
                                var bytes = new byte[] { function.bus.LoopId,
                        ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes0, 1);
                        #endregion
                        break;
                    case SPK.LightRGB:
                        #region rgb light
                        byte b = 100;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                        {
                            if (function.trait_on_off.curValue.ToString() == "off")
                            {
                                b = 0;
                            }
                            else
                            {
                                b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                            }
                        }
                        else
                        {
                            b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                        }
                        var tempLight = new Light();
                        var bytes = new byte[] { function.bus.LoopId,
                                            b,
                                            254, 0,Convert.ToByte(function.GetAttrState(FunctionAttributeKey.FadeTime)) ,3,
                                            (byte)tempLight.GetColor(0,function),
                                            (byte)tempLight.GetColor(1,function),
                                            (byte)tempLight.GetColor(2,function),
                                            0,0};
                                ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes, 1);
                                break;
                            case SPK.LightDimming:
                                byte b1 = 100;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                                {
                                    if (function.trait_on_off.curValue.ToString() == "off")
                                    {
                                        b1 = 0;
                                    }
                                    else
                                    {
                                        b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                                    }
                                }
                                else
                                {
                                    b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                                }
                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] {
                        ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes, 1);
                        #endregion
                        break;
                    case SPK.LightDimming:
                        #region dimming light
                        byte b1 = 100;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                        {
                            if (function.trait_on_off.curValue.ToString() == "off")
                            {
                                b1 = 0;
                            }
                            else
                            {
                                b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                            }
                        }
                        else
                        {
                            b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                        }
                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] {
                                            function.bus.LoopId,
                                            b1,
                                            0, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.FadeTime)) });
                                break;
                            case SPK.LightSwitch:
                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0, 0, 0 });
                                break;
                        }
                        #endregion
                        break;
                    case FunctionCategory.Curtain:
                        switch (function.spk)
                    case SPK.LightSwitch:
                        #region LightSwitch
                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0, 0, 0 });
                        #endregion
                        break;
                    case SPK.CurtainSwitch:
                        #region switch curtain
                        byte switchCurtain = 0;
                        if (function.trait_on_off.curValue.ToString() == "stop")
                        {
                            case SPK.CurtainSwitch:
                                byte b1 = 0;
                                if (function.trait_on_off.curValue.ToString() == "stop")
                                {
                                    b1 = 0;
                                }
                                else if (function.trait_on_off.curValue.ToString() == "on")
                                {
                                    b1 = 1;
                                }
                                else
                                {
                                    b1 = 2;
                                }
                                ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, b1 });
                                break;
                            case SPK.CurtainTrietex:
                            case SPK.CurtainRoller:
                                if (function.trait_on_off.curValue.ToString() == "stop")
                                {
                                    ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
                                }
                                else
                                {
                                    ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Percent)) });
                            switchCurtain = 0;
                        }
                        else if (function.trait_on_off.curValue.ToString() == "on")
                        {
                            switchCurtain = 1;
                        }
                        else
                        {
                            switchCurtain = 2;
                        }
                        ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, switchCurtain });
                        #endregion
                        break;
                    case SPK.CurtainTrietex:
                    case SPK.CurtainRoller:
                        if (function.trait_on_off.curValue.ToString() == "stop")
                        {
                            ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
                        }
                        else
                        {
                            ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Percent)) });
                                }
                                break;
                        }
                        break;
                    case FunctionCategory.AC:
                        switch (function.spk)
                    case SPK.AcStandard:
                        var ac = new AC();
                        foreach (var dic in commandDictionary)
                        {
                            case SPK.AcStandard:
                                var ac = new AC();
                                //ControlBytesSend(Command.SetACMode, subnetId, deviceId, new byte[] { function.bus.LoopId, 0, 32, 32, 32, 32, 32, 0, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0,
                                //    ac.GetModeIndex(function),
                                //    ac.GetFanIndex(function), Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), 0 });
                            switch (dic.Key)
                            {
                                case FunctionAttributeKey.OnOff:
                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 3, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
                                    break;
                                case "mode":
                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 6, ac.GetModeIndex(function), function.bus.LoopId });
                                    break;
                                case "fan":
                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 5, ac.GetFanIndex(function), function.bus.LoopId });
                                    break;
                                case FunctionAttributeKey.SetTemp:
                                    byte modeKey = 4;
                                    switch (ac.GetModeIndex(function))
                                    {
                                        case 3:
                                            modeKey = 8;
                                            break;
                                        case 0:
                                            modeKey = 4;
                                            break;
                                        case 1:
                                            modeKey = 7;
                                            break;
                                        case 4:
                                            modeKey = 19;
                                            break;
                                        case 2:
                                            modeKey = 2;
                                            break;
                                    }
                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] {
                                                modeKey, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), function.bus.LoopId });
                                    break;
                                default:
                                    MainPage.Log($"功能未支持 : {dic.Key}");
                                    break;
                            }
                        }
                        break;
                    case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
                        var fhTemp = new FloorHeating();
                        if (function.Fh_Mode_Temp.Count == 4)
                        {
                            if (function.GetAttribute(FunctionAttributeKey.Mode) == null)
                            {
                                foreach (var dic in commandDictionary)
                                {
                                    switch (dic.Key)
                                    {
                                        case FunctionAttributeKey.OnOff:
                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 3, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 20, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
                                            break;
                                        case "mode":
                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 6, ac.GetModeIndex(function), function.bus.LoopId });
                                            break;
                                        case "fan":
                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 5, ac.GetFanIndex(function), function.bus.LoopId });
                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 21, fhTemp.GetModeIndex(function), function.bus.LoopId });
                                            break;
                                        case FunctionAttributeKey.SetTemp:
                                            byte modeKey = 4;
                                            switch (ac.GetModeIndex(function))
                                            byte modeKey = 25;
                                            switch (fhTemp.GetModeIndex(function))
                                            {
                                                case 3:
                                                    modeKey = 8;
                                                    break;
                                                case 0:
                                                    modeKey = 4;
                                                    break;
                                                case 1:
                                                    modeKey = 7;
                                                    break;
                                                case 4:
                                                    modeKey = 19;
                                                    modeKey = 25;
                                                    break;
                                                case 2:
                                                    modeKey = 2;
                                                    modeKey = 26;
                                                    break;
                                                case 3:
                                                    modeKey = 27;
                                                    break;
                                                case 4:
                                                    modeKey = 28;
                                                    break;
                                            }
                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] {
@@ -599,180 +636,127 @@
                                            break;
                                    }
                                }
                                break;
                        }
                        break;
                    case FunctionCategory.FloorHeat:
                        var fhTemp = new FloorHeating();
                        switch (function.spk)
                        {
                            case SPK.FloorHeatStandard:
                                if (function.Fh_Mode_Temp.Count == 4)
                            }
                            else
                            {
                                var onoffString = function.trait_on_off.curValue.ToString();
                                byte b12 = 1;
                                if (onoffString == "off")
                                {
                                    if (function.GetAttribute(FunctionAttributeKey.Mode) == null)
                                    b12 = 0;
                                }
                                var wm = fhTemp.GetWorkModeIndex(function);
                                if (wm > 0)
                                {
                                    b12 += (byte)(16 + wm);
                                }
                                if (commandDictionary.ContainsKey("set_temp"))
                                {
                                    var dicTempString = "";
                                    commandDictionary.TryGetValue("set_temp", out dicTempString);
                                    var dicTemp = Convert.ToByte(dicTempString);
                                    var mode = function.GetAttrState(FunctionAttributeKey.Mode);
                                    switch (mode)
                                    {
                                        foreach (var dic in commandDictionary)
                                        {
                                            switch (dic.Key)
                                            {
                                                case FunctionAttributeKey.OnOff:
                                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 20, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
                                                    break;
                                                case "mode":
                                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 21, fhTemp.GetModeIndex(function), function.bus.LoopId });
                                                    break;
                                                case FunctionAttributeKey.SetTemp:
                                                    byte modeKey = 25;
                                                    switch (fhTemp.GetModeIndex(function))
                                                    {
                                                        case 1:
                                                            modeKey = 25;
                                                            break;
                                                        case 2:
                                                            modeKey = 26;
                                                            break;
                                                        case 3:
                                                            modeKey = 27;
                                                            break;
                                                        case 4:
                                                            modeKey = 28;
                                                            break;
                                                    }
                                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] {
                                                modeKey, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), function.bus.LoopId });
                                                    break;
                                                default:
                                                    MainPage.Log($"功能未支持 : {dic.Key}");
                                                    break;
                                            }
                                        }
                                        case "day":
                                            function.Fh_Mode_Temp["day"] = dicTemp;
                                            break;
                                        case "night":
                                            function.Fh_Mode_Temp["night"] = dicTemp;
                                            break;
                                        case "away":
                                            function.Fh_Mode_Temp["away"] = dicTemp;
                                            break;
                                        case "normal":
                                            function.Fh_Mode_Temp["normal"] = dicTemp;
                                            break;
                                    }
                                    else
                                    {
                                        var onoffString = function.trait_on_off.curValue.ToString();
                                        byte b1 = 1;
                                        if (onoffString == "off")
                                        {
                                            b1 = 0;
                                        }
                                        var wm = fhTemp.GetWorkModeIndex(function);
                                        if (wm > 0)
                                        {
                                            b1 += (byte)(16 + wm);
                                        }
                                        if (commandDictionary.ContainsKey("set_temp"))
                                        {
                                            var dicTempString = "";
                                            commandDictionary.TryGetValue("set_temp", out dicTempString);
                                            var dicTemp = Convert.ToByte(dicTempString);
                                            var mode = function.GetAttrState(FunctionAttributeKey.Mode);
                                            switch (mode)
                                            {
                                                case "day":
                                                    function.Fh_Mode_Temp["day"] = dicTemp;
                                                    break;
                                                case "night":
                                                    function.Fh_Mode_Temp["night"] = dicTemp;
                                                    break;
                                                case "away":
                                                    function.Fh_Mode_Temp["away"] = dicTemp;
                                                    break;
                                                case "normal":
                                                    function.Fh_Mode_Temp["normal"] = dicTemp;
                                                    break;
                                            }
                                        }
                                        var tt = fhTemp.GetTempUintIndex(function);
                                        ControlBytesSend(Command.SetFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId, b1,
                                }
                                var tt = fhTemp.GetTempUintIndex(function);
                                ControlBytesSend(Command.SetFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId, b12,
                                        (byte)tt,fhTemp.GetModeIndex(function), function.Fh_Mode_Temp["normal"], function.Fh_Mode_Temp["day"], function.Fh_Mode_Temp["night"], function.Fh_Mode_Temp["away"], 0, 0 });
                                    }
                                }
                                break;
                            }
                        }
                        break;
                    case FunctionCategory.Electric:
                        switch (function.spk)
                    case SPK.HvacFan:
                    case SPK.ElectricFan:
                        #region ElectricFan
                        if (function.trait_on_off.curValue.ToString() == "on")
                        {
                            case SPK.ElectricFan:
                                if (function.trait_on_off.curValue.ToString() == "on")
                                {
                                    ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.OpenLevel)) });
                                }
                                {
                                    ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
                                }
                                break;
                            case SPK.ElectricSocket:
                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0 });
                                break;
                            ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.OpenLevel)) });
                        }
                        break;
                    case FunctionCategory.AirFresh:
                        switch(function.spk)
                        {
                            case SPK.AirFreshJinmao:
                                //1   新风编号    1~200
                                //2   类型 第三方类型  0:金茂新风
                            ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
                        }
                        #endregion
                        break;
                    case SPK.ElectricSocket:
                    case SPK.PanelSocket:
                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0 });
                        break;
                    case SPK.AirFreshJinmao:case SPK.HvacAirFreshJinmao:
                        #region AirFresh
                        //1   新风编号    1~200
                        //2   类型 第三方类型  0:金茂新风
                                //3   开关  0 - 关机,1 - 开机
                                byte switchValue = 0;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff) == true
                                    && commandDictionary[FunctionAttributeKey.OnOff] == "on")
                                {
                                    switchValue = 1;
                                }
                        //3   开关  0 - 关机,1 - 开机
                        byte switchValue = 0;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff) == true
                            && commandDictionary[FunctionAttributeKey.OnOff] == "on")
                        {
                            switchValue = 1;
                        }
                                //4   运行模式    1 - 通风,2 - 加湿
                                byte airFreshMode = 1;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.Mode) == true
                                    && commandDictionary[FunctionAttributeKey.Mode] == "humidification")
                                {
                                    airFreshMode = 2;
                                }
                                //5   节能舒适选择  1 - 舒适,2 - 节能
                                byte airFreshEnergy = 1;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.Energy) == true
                                   && commandDictionary[FunctionAttributeKey.Energy] == "true")
                                {
                                    airFreshEnergy = 2;
                                }
                                //6   风速档位    0 - 自动,1 - 1档,2 - 2档,3 - 3档
                                byte airFreshFan = 0;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.FanSpeed) == true)
                                {
                                    switch (commandDictionary[FunctionAttributeKey.FanSpeed])
                                    {
                                        case "auto":
                                            airFreshFan = 0;
                                            break;
                                        case "level_1":
                                            airFreshFan = 1;
                                            break;
                                        case "level_2":
                                            airFreshFan = 2;
                                            break;
                                        case "level_3":
                                            airFreshFan = 3;
                                            break;
                                    }
                                }
                                //7   湿度设定 %
                                //8   室内温度值   ℃
                                byte indoorTemp_airFrsh = 0;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorTemp) == true)
                                {
                                    indoorTemp_airFrsh= Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorTemp]);
                                }
                                byte indoorHumidity_airFrsh = 0;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorHumidity) == true)
                                {
                                    indoorHumidity_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorHumidity]);
                                }
                                //9   室内湿度值   ℃
                                //10  过滤网剩余 %
                                //11  过滤网使用超时 1 超时 0 无
                                ControlBytesSend(Command.FreshAirControl_JinMao, subnetId, deviceId, new byte[] {
                        //4   运行模式    1 - 通风,2 - 加湿
                        byte airFreshMode = 1;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.Mode) == true
                            && commandDictionary[FunctionAttributeKey.Mode] == "humidification")
                        {
                            airFreshMode = 2;
                        }
                        //5   节能舒适选择  1 - 舒适,2 - 节能
                        byte airFreshEnergy = 1;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.Energy) == true
                           && commandDictionary[FunctionAttributeKey.Energy] == "true")
                        {
                            airFreshEnergy = 2;
                        }
                        //6   风速档位    0 - 自动,1 - 1档,2 - 2档,3 - 3档
                        byte airFreshFan = 0;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.FanSpeed) == true)
                        {
                            switch (commandDictionary[FunctionAttributeKey.FanSpeed])
                            {
                                case "auto":
                                    airFreshFan = 0;
                                    break;
                                case "level_1":
                                    airFreshFan = 1;
                                    break;
                                case "level_2":
                                    airFreshFan = 2;
                                    break;
                                case "level_3":
                                    airFreshFan = 3;
                                    break;
                            }
                        }
                        //7   湿度设定 %
                        //8   室内温度值   ℃
                        byte indoorTemp_airFrsh = 0;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorTemp) == true)
                        {
                            indoorTemp_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorTemp]);
                        }
                        byte indoorHumidity_airFrsh = 0;
                        if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorHumidity) == true)
                        {
                            indoorHumidity_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorHumidity]);
                        }
                        //9   室内湿度值   ℃
                        //10  过滤网剩余 %
                        //11  过滤网使用超时 1 超时 0 无
                        ControlBytesSend(Command.FreshAirControl_JinMao, subnetId, deviceId, new byte[] {
                                    function.bus.LoopId,0, switchValue ,
                                    airFreshMode,airFreshEnergy,
                                    airFreshFan,
@@ -783,8 +767,7 @@
                                    //function.GetAttrState(FunctionAttributeKey.FilterTimeout) =="true"?1:0,
                                    0,0
                                });
                                break;
                        }
                        #endregion
                        break;
                }
                #region 发送命令立即更新UI
@@ -811,89 +794,55 @@
                var deviceId = function.bus.DeviceID;
                var loopId = function.bus.LoopId;
                switch (function.Spk_Prefix)
                switch (function.spk)
                {
                    case FunctionCategory.Light:
                        switch (function.spk)
                        {
                            case SPK.LightSwitch:
                            case SPK.LightDimming:
                                ControlBytesSend(Command.ReadLightAllLoopBrightness, subnetId, deviceId, new byte[] { });
                                break;
                            case SPK.LightRGB:
                                ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId});
                                break;
                            case SPK.LightCCT:
                                ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                        }
                    case SPK.LightSwitch:
                    case SPK.LightDimming:
                        ControlBytesSend(Command.ReadLightAllLoopBrightness, subnetId, deviceId, new byte[] { });
                        break;
                    case FunctionCategory.Curtain:
                        switch (function.spk)
                        {
                            case SPK.CurtainSwitch:
                            case SPK.CurtainTrietex:
                            case SPK.CurtainRoller:
                                ControlBytesSend(Command.ReadCurtainStatus, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                        }
                    case SPK.LightRGB:
                        ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case FunctionCategory.AC:
                        switch (function.spk)
                        {
                            case SPK.AcStandard:
                                ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                        }
                    case SPK.LightCCT:
                        ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case FunctionCategory.FloorHeat:
                        switch (function.spk)
                        {
                            case SPK.FloorHeatStandard:
                                ControlBytesSend(Command.ReadFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                        }
                    case SPK.CurtainSwitch:
                    case SPK.CurtainTrietex:
                    case SPK.CurtainRoller:
                        ControlBytesSend(Command.ReadCurtainStatus, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case FunctionCategory.Electric:
                        switch (function.spk)
                        {
                            case SPK.ElectricFan:
                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                            case SPK.ElectricSocket:
                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                        }
                    case SPK.AcStandard:
                        ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case FunctionCategory.Sensor:
                        byte sensorType = 0;
                        switch (function.spk)
                        {
                            case SPK.SensorTemperature:
                                sensorType = 2;
                                break;
                            case SPK.SensorHumidity:
                                sensorType = 3;
                                break;
                            case SPK.SensorTVOC:
                                sensorType = 5;
                                break;
                            case SPK.SensorPm25:
                                sensorType = 6;
                                break;
                            case SPK.SensorCO2:
                                sensorType = 7;
                                break;
                        }
                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, sensorType, function.bus.LoopId });
                    case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
                        ControlBytesSend(Command.ReadFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case FunctionCategory.AirFresh:
                        switch(function.spk)
                        {
                            case SPK.AirFreshJinmao:
                                ControlBytesSend(Command.FreshAirRead_JinMao, subnetId, deviceId, new byte[] { function.bus.LoopId });
                                break;
                        }
                    case SPK.HvacFan:
                    case SPK.ElectricFan:
                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case SPK.ElectricSocket:
                    case SPK.PanelSocket:
                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                    case SPK.SensorTemperature:
                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 2, function.bus.LoopId });
                        break;
                    case SPK.SensorHumidity:
                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 3, function.bus.LoopId });
                        break;
                    case SPK.SensorTVOC:
                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 5, function.bus.LoopId });
                        break;
                    case SPK.SensorPm25:
                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 6, function.bus.LoopId });
                        break;
                    case SPK.SensorCO2:
                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 7, function.bus.LoopId });
                        break;
                    case SPK.AirFreshJinmao:
                    case SPK.HvacAirFreshJinmao:
                        ControlBytesSend(Command.FreshAirRead_JinMao, subnetId, deviceId, new byte[] { function.bus.LoopId });
                        break;
                }
            }
HDL_ON/DAL/DriverLayer/Packet.cs
@@ -133,11 +133,12 @@
                            {
                                if (updataObj.spk != SPK.LightRGB)
                                {
                                    updataObj.trait_on_off.curValue = receiveBytes[2] > 0 ? "on" : "off";
                                    updataObj.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[2] > 0 ? "on" : "off");
                                    if (updataObj.trait_on_off.curValue.ToString() == "on")
                                    {
                                        switch (updataObj.spk)
                                        {
                                            case SPK.HvacFan:
                                            case SPK.ElectricFan:
                                                updataObj.SetAttrState(FunctionAttributeKey.OpenLevel, receiveBytes[2].ToString());
                                                updataObj.lastState = Language.StringByID(StringId.Level) + " : " + receiveBytes[2];
@@ -160,6 +161,7 @@
                                        case SPK.LightDimming:
                                            DimmerPage.UpdataStates(updataObj);
                                            break;
                                        case SPK.HvacFan:
                                        case SPK.ElectricFan:
                                            FanPage.UpdataState(updataObj);
                                            break;
@@ -177,7 +179,7 @@
                            {
                                if (light.spk != SPK.LightRGB)
                                {
                                    light.trait_on_off.curValue = receiveBytes[light.bus.LoopId] == 0 ? "off" : "on";
                                    light.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[light.bus.LoopId] == 0 ? "off" : "on");
                                    if (light.trait_on_off.curValue.ToString() == "on")
                                    {
                                        light.SetAttrState(FunctionAttributeKey.Brightness, receiveBytes[i+1].ToString());
@@ -216,9 +218,11 @@
                                    switch (function.spk)
                                    {
                                        case SPK.ElectricFan:
                                        case SPK.HvacFan:
                                            FanPage.UpdataState(function);
                                            break;
                                        case SPK.ElectricSocket:
                                        case SPK.PanelSocket:
                                            SocketPage.UpdataState(function);
                                            break;
                                    }
@@ -234,7 +238,7 @@
                            {
                                if (lightTeme.spk == SPK.LightRGB)
                                {
                                    lightTeme.trait_on_off.curValue = receiveBytes[1] > 0 ? "on" : "off";
                                    lightTeme.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[1] > 0 ? "on" : "off");
                                    if (receiveBytes[1] > 0)
                                    {
                                        lightTeme.SetAttrState(FunctionAttributeKey.Brightness, receiveBytes[1].ToString());
@@ -249,7 +253,7 @@
                                    RGBPage.UpdataStates(lightTeme);
                                }else if(lightTeme.spk == SPK.LightCCT)
                                {
                                    lightTeme.trait_on_off.curValue = receiveBytes[1] > 0 ? "on" : "off";
                                    lightTeme.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[1] > 0 ? "on" : "off");
                                    if (receiveBytes[1] > 0)
                                    {
                                        lightTeme.SetAttrState(FunctionAttributeKey.Brightness, receiveBytes[1].ToString());
@@ -276,11 +280,11 @@
                                {
                                    if (receiveBytes[1] > 1)
                                    {
                                        curtain.trait_on_off.curValue = "on";
                                        curtain.SetAttrState(FunctionAttributeKey.OnOff, "on");
                                    }
                                    else
                                    {
                                        curtain.trait_on_off.curValue = "off";
                                        curtain.SetAttrState(FunctionAttributeKey.OnOff, "off");
                                    }
                                    curtain.SetAttrState(FunctionAttributeKey.Percent, receiveBytes[1].ToString());
                                    curtain.lastState = Language.StringByID(StringId.Open) + curtain.GetAttrState(FunctionAttributeKey.Percent) + "%";
@@ -292,14 +296,15 @@
                                    switch (receiveBytes[1])
                                    {
                                        case 0:
                                            curtain.trait_on_off.curValue = "stop";
                                            break;
                                            curtain.SetAttrState(FunctionAttributeKey.OnOff, "stop");
                                            return;
                                        case 1:
                                            curtain.trait_on_off.curValue = "on";
                                            curtain.SetAttrState(FunctionAttributeKey.OnOff, "on");
                                            //curtain.
                                            curtain.lastState = Language.StringByID(StringId.Open);
                                            break;
                                        case 2:
                                            curtain.trait_on_off.curValue = "off";
                                            curtain.SetAttrState(FunctionAttributeKey.OnOff, "off");
                                            curtain.lastState = Language.StringByID(StringId.Close);
                                            break;
                                    }
@@ -332,7 +337,7 @@
                            {
                                function.SetAttrState(FunctionAttributeKey.TempType, receiveBytes[1].ToString());
                                function.SetAttrState(FunctionAttributeKey.RoomTemp, receiveBytes[2].ToString());
                                function.trait_on_off.curValue = receiveBytes[8] == 1 ? "on" : "off";
                                function.SetAttrState(FunctionAttributeKey.OnOff,  receiveBytes[8] == 1 ? "on" : "off");
                                acFunction.SetMode(receiveBytes[9],function);
                                acFunction.SetFan(receiveBytes[10],function);
                                function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[11].ToString());
@@ -386,7 +391,7 @@
                            if (function.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0])
                            {
                                function.SetAttrState(FunctionAttributeKey.TempType, receiveBytes[2]);
                                function.trait_on_off.curValue = receiveBytes[1] % 2 == 0 ? "off" : "on";
                                function.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[1] % 2 == 0 ? "off" : "on");
                                new FloorHeating().SetModeIndex(receiveBytes[3],function);
                                if (function.Fh_Mode_Temp.ContainsKey("normal"))
@@ -539,7 +544,7 @@
                                            break;
                                    }
                                    EnvironmentalPage.LoadEvent_UpdataStatus(sensor);
                                A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(sensor);
                                //A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(sensor);
                                }
                            }
                        }
@@ -601,7 +606,7 @@
                                            break;
                                    }
                                    
                                A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(sensor);
                                //A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(sensor);
                                    EnvironmentalPage.LoadEvent_UpdataStatus(sensor);
                                }
                            }
@@ -630,7 +635,7 @@
                                switch (receiveBytes[0])
                                {
                                    case 3://
                                        function.trait_on_off.curValue = receiveBytes[1] == 1 ? "on" : "off";
                                        function.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[1] == 1 ? "on" : "off");
                                        break;
                                    case 4:
                                    case 7:
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -408,7 +408,7 @@
                                            for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                                            {
                                                var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
                                                if (localFunction.Spk_Prefix == FunctionCategory.Music || string.IsNullOrEmpty(localFunction.Spk_Prefix))
                                                if (SPK.MusicSpkList().Contains(localFunction.spk))
                                                {
                                                    i++;
                                                    continue;
@@ -755,21 +755,8 @@
            //测试账号,不挤下线
            switch (UserInfo.Current.userMobileInfo)
            {
                case "13415629083":
                case "18316120654":
                case "15622703419":
                case "18824864143":
                case "464027401@qq.com":
                case "2791308028@qq.com":
                case "13697499568":
                case "18666455392":
                case "13375012446":
                case "13602944661":
                case "18778381374":
                case "18316672920":
                case "15971583093":
                case "15626203746":
                case "551775569@qq.com":
                case "464027401@qq.com":
                    return;
            }
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </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>
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -747,15 +747,15 @@
            /// 截图成功
            /// </summary>
            /// <param name="image"></param>
            public override void OnScreenshotSuccessfulAction(UIImage image)
            {
            //public override void OnScreenshotSuccessfulAction(UIImage image)
            //{
                ////NSData imageData = UIImagePNGRepresentation(image); UIImage
                //NSData imageData = image.AsPNG();
                //byte[] dataBytes = new byte[imageData.Length];
                //System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length));
                ////image.g
                ////hdlLinphone.ScreenshotSuccessfulAction(dataBytes);
            }
            //}
            /// <summary>
            /// 开锁成功
HDL_ON/Entity/DB_ResidenceData.cs
@@ -121,6 +121,7 @@
                                    ShowFunction.Sensor,ShowFunction.VideoIntercom,
                                    ShowFunction.SecurityCenter
                                });
                        instance.SupportFacePass = false;
                        instance.SaveResidenceData();
                    }
                    catch (Exception ex)
@@ -446,5 +447,23 @@
        }
        #endregion
        /// <summary>
        /// 上一次提示的时间
        /// </summary>
        public DateTime LastTipTime = DateTime.MinValue;
        /// <summary>
        /// 是否需要提示
        /// </summary>
        public bool NeedTip
        {
            get
            {
                return (DateTime.Now - LastTipTime).TotalDays > 2;
            }
        }
    }
}
HDL_ON/Entity/Device/DeviceModule.cs
@@ -43,7 +43,7 @@
        /// <summary>
        /// 是否主网关
        /// </summary>
        public bool master;
        public string master;
        /// <summary>
        /// 是否开启了本地加密
        /// 2021-09-23 注意:为了兼容控制以前不加密网关要用这个新的字段,不能用local_encrypt,因为发现以前部分固件已经有这个标记并且回复true,但实际上通信还没加密的
HDL_ON/Entity/Function/Function.cs
@@ -146,7 +146,48 @@
        {
            get
            {
                return spk.Replace(".","");
                string iconPath = spk.Replace(".", "");
                switch (spk)
                {
                    case SPK.PanelSocket:
                        iconPath = "electricalsocket";
                        break;
                    case SPK.SenesorMegahealth2:
                        iconPath = "sensormegahealth";
                        break;
                    case SPK.SensorEnvironmentHailin:
                        iconPath = "sensorenvironment";
                        break;
                    case SPK.HvacAirFresh:
                        iconPath = "airFreshstandard";
                        break;
                    case SPK.HvacAirFreshJinmao:
                        iconPath = "airFreshjinmao";
                        break;
                    case SPK.HvacAC:
                        iconPath = "acstandard";
                        break;
                    case SPK.HvacFan:
                        iconPath = "electricalfan";
                        break;
                    case SPK.ElectricTuyaFan2:
                        iconPath = "electricaltyqborgovyzytytz";
                        break;
                    case SPK.ElectricTuyaAirCleaner2:
                        iconPath = "electricalQ1RsefNf91tIXyyQ";
                        break;
                    case SPK.ElectricTuyaWaterValve2:
                        iconPath = "electricalkoiGhMKwLf2ZP81g";
                        break;
                    case SPK.ElectricTuyaWeepRobot2:
                        iconPath = "electricalai6HtccKFIw3dxo3";
                        break;
                    case SPK.AvMusic:
                        iconPath = "musicstandard";
                        break;
                }
                return iconPath;
            }
        }
@@ -188,24 +229,87 @@
        /// </summary>
        public string spk = "";
        string spk_Prefix;
        private string _SpkCategory = string.Empty;
        /// <summary>
        /// spk前缀
        /// 大类
        /// 功能类别
        /// 如:空调类、灯光类、窗帘类
        /// spk  产品的品类
        /// </summary>
        public string Spk_Prefix
        public string SpkCategory
        {
            get
            {
                if (string.IsNullOrEmpty(spk_Prefix))
                if (string.IsNullOrEmpty(_SpkCategory))
                {
                    spk_Prefix = spk.Split(".")[0];
                    var arr = spk.Split(".");
                    if (arr.Length > 0)
                    {
                        _SpkCategory = arr[0];
                    }
                }
                return spk_Prefix;
                return _SpkCategory;
            }
        }
        private string _SpkClassification = string.Empty;
        /// <summary>
        /// spk 产品品类下的分类
        /// </summary>
        public string SpkClassification
        {
            get
            {
                if (string.IsNullOrEmpty(_SpkClassification))
                {
                    var arr = spk.Split(".");
                    if (arr.Length > 1)
                    {
                        _SpkClassification = arr[1];
                    }
                }
                return _SpkClassification;
            }
        }
        string _SpkManufacturer = string.Empty;
        /// <summary>
        /// spk 产品的厂商
        /// </summary>
        public string SpkManufacturer
        {
            get
            {
                if (string.IsNullOrEmpty(_SpkManufacturer))
                {
                    var arr = spk.Split(".");
                    if (arr.Length > 2)
                    {
                        _SpkManufacturer = arr[2];
                    }
                }
                return _SpkManufacturer;
            }
        }
        //string spk_Prefix;
        ///// <summary>
        ///// spk前缀
        ///// 大类
        ///// 功能类别
        ///// 如:空调类、灯光类、窗帘类
        ///// </summary>
        //public string Spk_Prefix
        //{
        //    get
        //    {
        //        if (string.IsNullOrEmpty(spk_Prefix))
        //        {
        //            spk_Prefix = spk.Split(".")[0];
        //        }
        //        return spk_Prefix;
        //    }
        //}
        /// <summary>
        /// A协议功能的特性
        /// 如:是AC功能:特性:on_off,mode,fan,temperature
@@ -695,7 +799,7 @@
    /// 功能属性
    /// 属性字段解析:attri :属性内容,value 属性的值,max 最大值 min 最小值
    /// </summary>
    [System.Serializable]
    [Serializable]
    public class FunctionAttributes
    {
        /// <summary>
@@ -1075,6 +1179,10 @@
        /// (红外空调)
        /// </summary>
        public const string AcIr= "ir.ac";
        /// <summary>
        /// 空调
        /// </summary>
        public const string HvacAC = "hvac.ac";
        /// <summary>
        /// 空调spk列表
@@ -1084,6 +1192,7 @@
        {
            var spkList = new List<string>();
            spkList.Add(AcStandard);
            spkList.Add(HvacAC);
            spkList.Add(AcIr);
            return spkList;
        }
@@ -1094,6 +1203,10 @@
        /// (地热)
        /// </summary>
        public const string FloorHeatStandard = "floorHeat.standard";
        /// <summary>
        /// 地暖
        /// </summary>
        public const string HvacFloorHeat = "hvac.floorHeat";
        /// <summary>
        /// 地热spk列表
@@ -1103,6 +1216,7 @@
        {
            var spkList = new List<string>();
            spkList.Add(FloorHeatStandard);
            spkList.Add(HvacFloorHeat);
            return spkList;
        }
        #endregion
@@ -1113,9 +1227,17 @@
        /// </summary>
        public const string AirFreshStandard = "airFresh.standard";
        /// <summary>
        /// 新风
        /// </summary>
        public const string HvacAirFresh = "hvac.airFresh";
        /// <summary>
        /// 新风 ——金茂定制
        /// </summary>
        public const string AirFreshJinmao = "airFresh.jinmao";
        /// <summary>
        /// 新风 ——金茂定制
        /// </summary>
        public const string HvacAirFreshJinmao = "hvac.airFresh.jinmao";
        /// <summary>
        /// 新风spk列表
@@ -1126,6 +1248,8 @@
            var spkList = new List<string>();
            spkList.Add(AirFreshStandard);
            spkList.Add(AirFreshJinmao);
            spkList.Add(HvacAirFresh);
            spkList.Add(HvacAirFreshJinmao);
            return spkList;
        }
        #endregion
@@ -1157,6 +1281,10 @@
        /// (音乐)
        /// </summary>
        public const string MusicStandard = "music.standard";
        /// <summary>
        /// 音乐
        /// </summary>
        public const string AvMusic = "av.music";
        /// <summary>
        /// 音乐spk列表
@@ -1166,11 +1294,13 @@
        {
            var spkList = new List<string>();
            spkList.Add(MusicStandard);
            spkList.Add(AvMusic);
            return spkList;
        }
        #endregion
        #region 传感器
        #region 安防传感器
        /// <summary>
        /// (亮度传感器)
@@ -1216,6 +1346,7 @@
        /// 毫米波传感器
        /// </summary>
        public const string SenesorMegahealth = "sensor.megahealth";
        public const string SenesorMegahealth2 = "sensor.megahealth.zg";
        /// <summary>
        /// 安防传感器spk列表
        /// </summary>
@@ -1232,8 +1363,9 @@
            //spkList.Add(SensorShanLan);
            //spkList.Add(SensorDuiShe);
            //spkList.Add(SensoruUtrasonic);
            //spkList.Add(SensorDryContact);
            spkList.Add(SensorDryContact);
            spkList.Add(SenesorMegahealth);
            spkList.Add(SenesorMegahealth2);
            return spkList;
        }
        #endregion
@@ -1274,6 +1406,7 @@
        /// 青萍环境传感器
        /// </summary>
        public const string SensorEnvironment3 = "sensor.environment3";
        public const string SensorEnvironmentHailin = "sensor.environment.hailin";
        /// <summary>
        /// 甲醛
        /// </summary>
@@ -1335,6 +1468,10 @@
        /// </summary>
        public const string ElectricSocket = "electrical.socket";
        /// <summary>
        /// 面板、插座、面板
        /// </summary>
        public const string PanelSocket = "panel.socket";
        /// <summary>
        /// 家电、电视
        /// </summary>
        public const string ElectricTV = "electrical.tv";
@@ -1350,6 +1487,7 @@
        /// 家电、风扇
        /// </summary>
        public const string ElectricFan = "electrical.fan";
        public const string HvacFan = "hvac.fan";
        /// <summary>
        /// 凉霸
        /// </summary>
@@ -1392,18 +1530,22 @@
        /// 家电、涂鸦空气净化器
        /// </summary>
        public const string ElectricTuyaAirCleaner = "electrical.Q1RsefNf91tIXyyQ";
        public const string ElectricTuyaAirCleaner2 = "hvac.air.tuya_epi345";
        /// <summary>
        /// 家电、涂鸦电风扇
        /// </summary>
        public const string ElectricTuyaFan = "electrical.tyqborgovyzytytz";
        public const string ElectricTuyaFan2 = "hvac.fan.tuya_ef101";
        /// <summary>
        /// 家电、涂鸦扫地机器人
        /// </summary>
        public const string ElectricTuyaWeepRobot = "electrical.ai6HtccKFIw3dxo3";
        public const string ElectricTuyaWeepRobot2 = "electrical.sweep.tuya";
        /// <summary>
        /// 家电、涂鸦水阀
        /// </summary>
        public const string ElectricTuyaWaterValve = "electrical.koiGhMKwLf2ZP81g";
        public const string ElectricTuyaWaterValve2 = "electrical.watervalve.tuya_aw713";
        #endregion
@@ -1415,19 +1557,25 @@
        {
            var spkList = new List<string>();
            spkList.Add(ElectricSocket);
            spkList.Add(PanelSocket);
            spkList.Add(ElectricTV);
            spkList.Add(TvIr);
            spkList.Add(TvXmIr);
            spkList.Add(ElectricFan);
            spkList.Add(HvacFan);
            spkList.Add(FanIr);
            spkList.Add(ClothesHanger);
            spkList.Add(IrLearn);
            spkList.Add(PjtIr);
            spkList.Add(StbIr);
            spkList.Add(ElectricTuyaAirCleaner);
            spkList.Add(ElectricTuyaAirCleaner2);
            spkList.Add(ElectricTuyaFan);
            spkList.Add(ElectricTuyaFan2);
            spkList.Add(ElectricTuyaWeepRobot);
            spkList.Add(ElectricTuyaWeepRobot2);
            spkList.Add(ElectricTuyaWaterValve);
            spkList.Add(ElectricTuyaWaterValve2);
            spkList.Add(AirSwitch);
            return spkList;
        }
@@ -1462,10 +1610,15 @@
        {
            var spkList = new List<string>();
            spkList.Add(ElectricTuyaAirCleaner);
            spkList.Add(ElectricTuyaAirCleaner2);
            spkList.Add(ElectricTuyaFan);
            spkList.Add(ElectricTuyaFan2);
            spkList.Add(ElectricTuyaWaterValve);
            spkList.Add(ElectricTuyaWaterValve2);
            spkList.Add(ElectricTuyaWeepRobot);
            spkList.Add(ElectricTuyaWeepRobot2);
            spkList.Add(SenesorMegahealth);
            spkList.Add(SenesorMegahealth2);
            return spkList;
        }
        /// <summary>
@@ -1483,6 +1636,10 @@
                    list.Add(ElectricTuyaFan);
                    list.Add(ElectricTuyaWaterValve);
                    list.Add(ElectricTuyaWeepRobot);
                    list.Add(ElectricTuyaAirCleaner2);
                    list.Add(ElectricTuyaFan2);
                    list.Add(ElectricTuyaWaterValve2);
                    list.Add(ElectricTuyaWeepRobot2);
                    break;
                case BrandType.All3tyBrand:
                    list.Add(SenesorMegahealth);//兆观
@@ -1520,56 +1677,56 @@
    }
    /// <summary>
    /// 功能类别
    /// </summary>
    public static class FunctionCategory
    {
        /// <summary>
        ///(灯)
        /// </summary>
        public const string Light = "light";
        /// <summary>
        /// (窗帘)
        /// </summary>
        public const string Curtain = "curtain";
        /// <summary>
        /// (空调)
        /// </summary>
        public const string AC = "ac";
        /// <summary>
        /// (地热)
        /// </summary>
        public const string FloorHeat = "floorHeat";
        /// <summary>
        /// (新风)
        /// </summary>
        public const string AirFresh = "airFresh";
        /// <summary>
        /// (音乐)
        /// </summary>
        public const string Music = "music";
        /// <summary>
        /// (传感器)
        /// </summary>
        public const string Sensor = "sensor";
        /// <summary>
        /// (干接点)
        /// </summary>
        public const string DryContact = "dryContact";
        /// <summary>
        /// 家电
        /// </summary>
        public const string Electric = "electrical";
        /// <summary>
        /// 红外设备
        /// </summary>
        public const string IR = "ir";
    ///// <summary>
    ///// 功能类别
    ///// </summary>
    //public static class FunctionCategory
    //{
    //    /// <summary>
    //    ///(灯)
    //    /// </summary>
    //    public const string Light = "light";
    //    /// <summary>
    //    /// (窗帘)
    //    /// </summary>
    //    public const string Curtain = "curtain";
    //    /// <summary>
    //    /// (空调)
    //    /// </summary>
    //    public const string AC = "ac";
    //    /// <summary>
    //    /// (地热)
    //    /// </summary>
    //    public const string FloorHeat = "floorHeat";
    //    /// <summary>
    //    /// (新风)
    //    /// </summary>
    //    public const string AirFresh = "airFresh";
    //    /// <summary>
    //    /// (音乐)
    //    /// </summary>
    //    public const string Music = "music";
    //    /// <summary>
    //    /// (传感器)
    //    /// </summary>
    //    public const string Sensor = "sensor";
    //    /// <summary>
    //    /// (干接点)
    //    /// </summary>
    //    public const string DryContact = "dryContact";
    //    /// <summary>
    //    /// 家电
    //    /// </summary>
    //    public const string Electric = "electrical";
    //    /// <summary>
    //    /// 红外设备
    //    /// </summary>
    //    public const string IR = "ir";
    }
    //}
public class VersionInfo
HDL_ON/Entity/Function/Light.cs
@@ -11,10 +11,13 @@
        /// 获取rgb颜色
        /// </summary>
        /// <returns></returns>
        public int GetRGBcolor(Function function )
        public int GetRGBcolor(Function function ,string rgbString ="")
        {
            var color = function.GetAttrState(FunctionAttributeKey.RGB).Split(",");
            if(!string.IsNullOrEmpty(rgbString))
            {
                color = rgbString.Split(",");
            }
            if(color.Length!= 3)
            {
                color = new string[] {"100", "100", "100" };
HDL_ON/Entity/FunctionList.cs
@@ -415,24 +415,7 @@
                    {
                        foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl))
                        {
                            switch (function.Spk_Prefix)
                            {
                                case FunctionCategory.Music:
                                case FunctionCategory.DryContact:
                                    continue;
                            }
                            DriverLayer.Control.Ins.SendReadCommand(function);
                            //switch (function.Spk_Prefix)
                            //{
                            //    case FunctionCategory.Light:
                            //    case FunctionCategory.Electric:
                            //    case FunctionCategory.Curtain:
                            //    case FunctionCategory.AC:
                            //    case FunctionCategory.FloorHeat:
                            //    case FunctionCategory.Sensor:
                            //        DriverLayer.Control.Ins.SendReadCommand(function);
                            //        break;
                            //}
                            Control.Ins.SendReadCommand(function);
                        }
                        if(DB_ResidenceData.Instance.GatewayType == 1)
                        {
HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
@@ -101,6 +101,17 @@
        /// 设备绑定方式 WIFI、QRSCAN、ZIG_BEE、ETHERNET
        /// </summary>
        public string bindType;
        /// <summary>
        /// icon文件名称
        /// </summary>
        public string IconName
        {
            get
            {
                return spk.Replace(".", "");
            }
        }
    }
}
HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.2.0901";
        public static string VersionString = "1.2.0926";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
@@ -106,20 +106,33 @@
            SPK.LightCCT,SPK.LightDimming,SPK.LightSwitch,SPK.LightRGB,
            SPK.CurtainRoller,SPK.CurtainSwitch,SPK.CurtainTrietex,
            SPK.AcIr,SPK.AcStandard,
            SPK.FloorHeatStandard,
            SPK.AirFreshStandard,
            SPK.FloorHeatStandard,SPK.HvacFloorHeat,
            SPK.AirFreshStandard,SPK.HvacAirFresh,
            SPK.AirSwitch,
        };
        static List<string> _RoomNotSupportFunctionList = null;
        /// <summary>
        /// 房间功能列表不加载的功能列表
        /// </summary>
        public static List<string> RoomNotSupportFunctionList = new List<string>
        public static List<string> RoomNotSupportFunctionList
        {
            SPK.EnergyStandard,
            SPK.MusicStandard,
            SPK.AirSwitch,
            SPK.ElectricEnergy,
        };
            get {
                if(_RoomNotSupportFunctionList == null)
                {
                    _RoomNotSupportFunctionList = new List<string>();
                    _RoomNotSupportFunctionList.Add(SPK.EnergyStandard);
                    _RoomNotSupportFunctionList.Add(SPK.MusicStandard);
                    _RoomNotSupportFunctionList.Add(SPK.AvMusic);
                    _RoomNotSupportFunctionList.Add(SPK.AirSwitch);
                    _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy);
                    _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList());
                    _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList());
                }
                return _RoomNotSupportFunctionList;
            }
        }
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -63,18 +63,21 @@
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.FloorHeatStandard:
                    case SPK.HvacFloorHeat:
                        var fhView = new FloorHeatingPage(function);
                        MainPage.BasePageView.AddChidren(fhView);
                        fhView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.ElectricFan:
                    case SPK.HvacFan:
                        var fanView = new FanPage(function);
                        MainPage.BasePageView.AddChidren(fanView);
                        fanView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.ElectricSocket:
                    case SPK.PanelSocket:
                        var sView = new SocketPage(function);
                        MainPage.BasePageView.AddChidren(sView);
                        sView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
@@ -101,22 +104,27 @@
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.ElectricTuyaAirCleaner:
                    case SPK.ElectricTuyaAirCleaner2:
                        var airCleaner = new TuyaAirCleanerPage();
                        airCleaner.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.ElectricTuyaFan:
                    case SPK.ElectricTuyaFan2:
                        var tuyaFan = new TuyaFanPage();
                        tuyaFan.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.ElectricTuyaWaterValve:
                    case SPK.ElectricTuyaWaterValve2:
                        var tyWaterValve = new TuyaWaterValvePage();
                        tyWaterValve.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.ElectricTuyaWeepRobot:
                    case SPK.ElectricTuyaWeepRobot2:
                        var weepRobot = new TuyaWeepRobotPage();
                        weepRobot.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.MusicStandard:
                    case SPK.AvMusic:
                        Music.A31MusicModel.Current = (function as Music.A31MusicModel);//当前播放器
                        var a31PlayMusicPage = new Music.A31PlayMusicPage();
                        MainPage.BasePageView.AddChidren(a31PlayMusicPage);
@@ -150,6 +158,7 @@
                        doorwindowPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.SenesorMegahealth:
                    case SPK.SenesorMegahealth2:
                        var smPage = new SenesorMegahealthPage();
                        smPage.ShowColltionButton = false;
                        smPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
@@ -177,10 +186,12 @@
                        irLearinPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.AirFreshJinmao:
                    case SPK.HvacAirFreshJinmao:
                        var airFresh1 = new AirFreshControlPage();
                        airFresh1.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.AirFreshStandard:
                    case SPK.HvacAirFresh:
                        var airFresh2 = new AirFreshRelayControlPage();
                        airFresh2.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -158,6 +158,34 @@
        }
        /// <summary>
        /// 灯光功能列表界面
        /// 带组合调光编辑
        /// </summary>
        /// <param name="backAction"></param>
        /// <param name="editAction"></param>
        public void LoadTopView_LightFunction( Action editAction)
        {
            LoadTopView();
            var btnSetting = new Button()
            {
                X = Application.GetRealWidth(337),
                Y = Application.GetRealHeight(29),
                Width = Application.GetMinRealAverage(28),
                Height = Application.GetMinRealAverage(28),
                UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png",
            };
            contentView.AddChidren(btnSetting);
            btnSetting.MouseUpEventHandler = (sender, e) =>
            {
                editAction();
            };
        }
        /// <summary>
        /// 向framelayout添加顶部区域,拥有配置图标按钮
        /// </summary>
        /// <param name="frame"></param>
HDL_ON/UI/UI0-Public/Widget/ConfirmDialog.cs
@@ -37,8 +37,8 @@
        /// <summary>
        /// 初始化Dialog
        /// </summary>
        /// <param name="titleStr"></param>
        /// <param name="msgStr"></param>
        /// <param name="titleStr">标题</param>
        /// <param name="msgStr">提示信息</param>
        /// <param name="okAction"></param>
        /// <param name="cancelAction"></param>
        /// <param name="cancelID"></param>
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -205,15 +205,14 @@
                {
                    //etAccount.Text = "tf@smarttech.com.ua";//国外账号,有住宅,登录无法显示
                    //etAccount.Text = "13375012446";//测试服务器
                    //etAccount.Text = "13450425803";
                    //etAccount.Text = "1033326940@qq.com";
                    //etAccount.Text = "18022428438";//wjc
                    //etAccount.Text = "13602944661";//kx
                    etAccount.Text = "13226233133";//豆豆
                    etAccount.Text = "18316672920";
                    //etAccount.Text = "18316672920";
                    //etAccount.Text = "18316120654";//tujie
                    //etAccount.Text = "15626203746";
                    //etAccount.Text = "13450425807";//黄竹溪 knx项目
                    etAccount.Text = "15626203746";
                    etAccount.Text = "13450425807";//黄竹溪 knx项目
                }
                else
                {
@@ -232,6 +231,7 @@
                    //etAccount.Text = "15217626103";//昆明金茂项目
                    //etAccount.Text = "18598273624";
                    etAccount.Text = "tf@smarttech.com.ua";
                    etAccount.Text = "18814122445";//董泽斌 天河办公室
                    //etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 
                }
                b = !b;
@@ -521,13 +521,13 @@
                IsBold = true,
                TextColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                Text = "Demo模式"
                Text = "游客体验"
            };
            bodyView.AddChidren(btnDomeLogin);
            if(Language.CurrentLanguage!= "Chinese")
            {
                btnDomeLogin.Text = "Experience model";
                btnDomeLogin.Text = "Tourist experience";
            }
            btnDomeLogin.MouseUpEventHandler = (sender, e) => {
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -135,6 +135,10 @@
                    this.EndHeaderRefreshing();
                    Common.ApiUtlis.Ins.DownloadData();
                    LoadContentView();
                    if(!CurShowTypeIsFunction)
                    {
                        contentView.PageIndex = 1;
                    }
                };
                #region topView
@@ -549,6 +553,16 @@
            FunctionList.List.Functions.Add(new Function()
            {
                spk = SPK.SensorDryContact,
                name = "干接点",
                attributes = new List<FunctionAttributes>()
                {
                    new FunctionAttributes(){ key = "status",curValue= "on",state = "on" },
                },
            });
            FunctionList.List.Functions.Add(new Function()
            {
                spk = SPK.AirSwitch,
                name = "智能空开",
                attributes = new List<FunctionAttributes>()
@@ -694,8 +708,13 @@
                            sceneFunctionView = new VerticalScrolViewLayout();
                            contentView.AddChidren(sceneFunctionView);
                            LoadSceneFunctionControlZone();
                            contentView.PageIndex = 0;
                            if (CurShowTypeIsFunction)
                            {
                                contentView.PageIndex = 0;
                            }else
                            {
                                contentView.PageIndex = 1;
                            }
                            LoadEvent_ChangeShowedFunctionType();
@@ -726,7 +745,15 @@
                sceneFunctionView = new VerticalScrolViewLayout();
                contentView.AddChidren(sceneFunctionView);
                LoadSceneFunctionControlZone();
                contentView.PageIndex = 0;
                if (CurShowTypeIsFunction)
                {
                    contentView.PageIndex = 0;
                }
                else
                {
                    contentView.PageIndex = 1;
                }
                LoadEvent_ChangeShowedFunctionType();
@@ -755,7 +782,7 @@
                foreach (var function in list)
                {
                    //音乐模块有主从关系,需要特殊处理
                    if (function.Spk_Prefix == FunctionCategory.Music)
                    if (SPK.MusicSpkList().Contains( function.spk))
                    {
                        //var music = function as Music.A31MusicModel;
                        var music = Music.A31MusicModel.A31MusicModelList.Find((obj) => obj.sid == function.sid);
@@ -1084,7 +1111,7 @@
                    LoadEvent_ControlTV(function, btnPower);
                }
                else if (function.spk == SPK.MusicStandard)
                else if (function.spk == SPK.MusicStandard || function.spk == SPK.AvMusic)
                {
                    btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicIcon.png";
                    btnIcon.SelectedImagePath = "FunctionIcon/Music/MusicOnIcon.png";
@@ -1181,7 +1208,7 @@
                //取消收藏事件
                Action cannelCollect = () => {
                    function.collect = false;
                    if (function.Spk_Prefix == FunctionCategory.Music)//处理音乐主从关系
                    if (SPK.MusicSpkList().Contains(function.spk))//处理音乐主从关系
                    {
                        if ((function as Music.A31MusicModel).ServerClientType == 1)
                        {
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -221,7 +221,7 @@
            btn.MouseUpEventHandler += (sender, e) =>
            {
                function.collect = false;
                if (function.Spk_Prefix == FunctionCategory.Music)//处理音乐主从关系
                if (SPK.MusicSpkList().Contains(function.spk))//处理音乐主从关系
                {
                    if ((function as Music.A31MusicModel).ServerClientType == 1)
                    {
@@ -266,7 +266,6 @@
                btnChangeScene.IsBold = false;
                CurShowTypeIsFunction = true;
                contentView.PageIndex = 0;
            };
            //var client = new BlufiClient();
@@ -298,7 +297,6 @@
                    btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize;
                    btnChangeScene.IsSelected = false;
                    btnChangeScene.IsBold = false;
                    CurShowTypeIsFunction = true;
                }
                else
                {
@@ -308,7 +306,6 @@
                    btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize;
                    btnChangeFunction.IsSelected = false;
                    btnChangeFunction.IsBold = false;
                    CurShowTypeIsFunction = false;
                }
            };
        }
@@ -332,7 +329,15 @@
                                if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex ||
                                function.spk == SPK.CurtainSwitch)//窗帘设备根据百分比判断开关状态
                                {
                                    state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
                                    if (function.GetAttribute(FunctionAttributeKey.Percent) != null)
                                    {
                                        state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
                                    }else
                                    {
                                        if (function.GetAttrState(FunctionAttributeKey.OnOff) == "stop")
                                            return;
                                        state = function.trait_on_off.curValue.ToString() == "on";
                                    }
                                }
                                else
                                {
@@ -346,7 +351,7 @@
                                        btn.IsSelected = state;
                                        if (btn.Tag != null && btn.Tag.ToString() == "state")
                                        {
                                            if (function.Spk_Prefix == FunctionCategory.Music)
                                            if (SPK.MusicSpkList().Contains(function.spk))
                                            {
                                                btn.Text = (function as Music.A31MusicModel).A31PlayStatus.Title;
                                            }
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -52,123 +52,123 @@
                                    if (fcView.GetChildren(j).Tag == null)
                                        continue;
                                    var cTag = fcView.GetChildren(j).Tag.ToString();
                                    switch (updataFunction.Spk_Prefix)
                                    if (SPK.LightSpkList().Contains(updataFunction.spk) ||
                                    SPK.AcSpkList().Contains(updataFunction.spk) ||
                                    SPK.FhSpkList().Contains(updataFunction.spk) ||
                                    SPK.ElectricalSpkList().Contains(updataFunction.spk) ||
                                    SPK.AirFreshSpkList().Contains(updataFunction.spk))
                                    {
                                        case FunctionCategory.Light:
                                        case FunctionCategory.AC:
                                        case FunctionCategory.FloorHeat:
                                        case FunctionCategory.Electric:
                                        case FunctionCategory.AirFresh:
                                            #region 按钮状态更新
                                            if (cTag == updataFunction.sid + "_Switch")
                                        #region 按钮状态更新
                                        if (cTag == updataFunction.sid + "_Switch")
                                        {
                                            try
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
                                                }
                                                catch (Exception ex)
                                                {
                                                    MainPage.Log($"{this.GetType()} error 0 : {ex.Message}");
                                                }
                                                (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
                                            }
                                            #endregion
                                            #region 调光状态进度更新
                                            else if (cTag == updataFunction.sid + "_DimmerBar")
                                            catch (Exception ex)
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as DiyImageSeekBar).Progress = Convert.ToInt32(updataFunction.GetAttrState(FunctionAttributeKey.Brightness));
                                                    if (updataFunction.trait_on_off.curValue.ToString() == "on")
                                                    {
                                                        (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
                                                    }
                                                    else
                                                    {
                                                        (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.PromptingColor2;
                                                    }
                                                }
                                                catch (Exception ex)
                                                {
                                                    MainPage.Log($"{this.GetType()} error 1 : {ex.Message}");
                                                }
                                                MainPage.Log($"{this.GetType()} error 0 : {ex.Message}");
                                            }
                                            #endregion
                                            #region 功能状态信息更新
                                            else if (cTag == updataFunction.spk + "_laststates_" + updataFunction.sid)
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
                                                    (fcView.GetChildren(j) as Button).Text = updataFunction.lastState;
                                                }
                                                catch (Exception ex)
                                                {
                                                    MainPage.Log($"{this.GetType()} error 2 : {ex.Message}");
                                                }
                                            }
                                            break;
                                        }
                                        #endregion
                                        case FunctionCategory.Curtain:
                                            #region 窗帘更新
                                            var onoffString = updataFunction.GetAttrState(FunctionAttributeKey.OnOff);
                                            if (onoffString == "stop")
                                        #region 调光状态进度更新
                                        else if (cTag == updataFunction.sid + "_DimmerBar")
                                        {
                                            try
                                            {
                                                return;
                                            }
                                            var percent = onoffString == "off" ? 0 : 100;
                                            if(updataFunction.GetAttributes().Contains(FunctionAttributeKey.Percent))
                                            {
                                                string percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent);
                                                int.TryParse(percentString, out percent);
                                            }
                                            if (percent == 0)
                                            {
                                                if (cTag == updataFunction.sid + "_off")
                                                (fcView.GetChildren(j) as DiyImageSeekBar).Progress = Convert.ToInt32(updataFunction.GetAttrState(FunctionAttributeKey.Brightness));
                                                if (updataFunction.trait_on_off.curValue.ToString() == "on")
                                                {
                                                    try
                                                    {
                                                        (fcView.GetChildren(j) as Button).IsSelected = true;
                                                    }
                                                    catch { }
                                                    (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
                                                }
                                                else
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = false;
                                                    (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.PromptingColor2;
                                                }
                                            }
                                            catch (Exception ex)
                                            {
                                                MainPage.Log($"{this.GetType()} error 1 : {ex.Message}");
                                            }
                                        }
                                        #endregion
                                        #region 功能状态信息更新
                                        else if (cTag == updataFunction.spk + "_laststates_" + updataFunction.sid)
                                        {
                                            try
                                            {
                                                (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
                                                (fcView.GetChildren(j) as Button).Text = updataFunction.lastState;
                                            }
                                            catch (Exception ex)
                                            {
                                                MainPage.Log($"{this.GetType()} error 2 : {ex.Message}");
                                            }
                                        }
                                        #endregion
                                    }
                                    else if (SPK.CurtainSpkList().Contains(updataFunction.spk))
                                    {
                                        #region 窗帘更新
                                        var onoffString = updataFunction.GetAttrState(FunctionAttributeKey.OnOff);
                                        if (onoffString == "stop")
                                        {
                                            return;
                                        }
                                        var percent = onoffString == "off" ? 0 : 100;
                                        if (updataFunction.GetAttributes().Contains(FunctionAttributeKey.Percent))
                                        {
                                            string percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent);
                                            int.TryParse(percentString, out percent);
                                        }
                                        if (percent == 0)
                                        {
                                            if (cTag == updataFunction.sid + "_off")
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = true;
                                                }
                                                catch { }
                                            }
                                            else
                                            {
                                                if (cTag == updataFunction.sid + "_on")
                                                {
                                                    try
                                                    {
                                                        (fcView.GetChildren(j) as Button).IsSelected = true;
                                                    }
                                                    catch { }
                                                }
                                                else
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = false;
                                                }
                                                (fcView.GetChildren(j) as Button).IsSelected = false;
                                            }
                                            #endregion
                                            break;
                                        case FunctionCategory.Music:
                                            #region 音乐更新
                                            var uMusic = updataFunction as Music.A31MusicModel;
                                            if (cTag == updataFunction.spk + "_State_" + updataFunction.sid)
                                        }
                                        else
                                        {
                                            if (cTag == updataFunction.sid + "_on")
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = uMusic.A31PlayStatus.status == "play";
                                                    (fcView.GetChildren(j) as Button).IsSelected = true;
                                                }
                                                catch (Exception ex)
                                                {
                                                    MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
                                                }
                                                catch { }
                                            }
                                            #endregion
                                            break;
                                            else
                                            {
                                                (fcView.GetChildren(j) as Button).IsSelected = false;
                                            }
                                        }
                                        #endregion
                                    }
                                    else if (SPK.MusicSpkList().Contains(updataFunction.spk))
                                    {
                                        #region 音乐更新
                                        var uMusic = updataFunction as Music.A31MusicModel;
                                        if (cTag == updataFunction.spk + "_State_" + updataFunction.sid)
                                        {
                                            try
                                            {
                                                (fcView.GetChildren(j) as Button).IsSelected = uMusic.A31PlayStatus.status == "play";
                                            }
                                            catch (Exception ex)
                                            {
                                                MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
                                            }
                                        }
                                        #endregion
                                    }
                                }
                            }
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -973,8 +973,8 @@
                        btnName.TextID = StringId.EnvironmentalData;
                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                        {
                            //var skipView = new EnvironmentalPage();// EnvironmentalSciencePage();
                            var skipView = new A_EnvironmentalDataCenter();// EnvironmentalSciencePage();
                            var skipView = new EnvironmentalPage();// EnvironmentalSciencePage();
                            //var skipView = new A_EnvironmentalDataCenter();// EnvironmentalSciencePage();
                            MainPage.BasePageView.AddChidren(skipView);
                            skipView.LoadPage();
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -23,39 +23,29 @@
                try
                {
                    ShowFunction vv = ShowFunction.Light;
                    switch (function.spk)
                    if (SPK.ElectricalSpkList().Contains(function.spk))
                    {
                        case SPK.FloorHeatStandard:
                            vv = ShowFunction.FloorHeating;
                            break;
                        case SPK.AcStandard:
                            vv = ShowFunction.AC;
                            break;
                        case SPK.CurtainRoller:
                        case SPK.CurtainShades:
                        case SPK.CurtainSwitch:
                        case SPK.CurtainTrietex:
                            vv = ShowFunction.Curtain;
                            break;
                        case SPK.LightCCT:
                        case SPK.LightDimming:
                        case SPK.LightRGB:
                        case SPK.LightSwitch:
                            vv = ShowFunction.Light;
                            break;
                        case SPK.ElectricSocket:
                        case SPK.ElectricTuyaAirCleaner:
                        case SPK.ElectricTuyaFan:
                        case SPK.ElectricTuyaWaterValve:
                        case SPK.ElectricTuyaWeepRobot:
                        case SPK.ClothesHanger:
                        case SPK.AirSwitch:
                            vv = ShowFunction.Electric;
                            break;
                        case SPK.AirFreshJinmao:
                        case SPK.AirFreshStandard:
                            vv = ShowFunction.FreshAir;
                            break;
                        vv = ShowFunction.Electric;
                    }
                    else if (SPK.FhSpkList().Contains(function.spk))
                    {
                        vv = ShowFunction.FloorHeating;
                    }
                    else if (SPK.AcSpkList().Contains(function.spk))
                    {
                        vv = ShowFunction.AC;
                    }
                    else if (SPK.CurtainSpkList().Contains(function.spk))
                    {
                        vv = ShowFunction.Curtain;
                    }
                    else if (SPK.LightSpkList().Contains(function.spk))
                    {
                        vv = ShowFunction.Light;
                    }
                    else if (SPK.AirFreshSpkList().Contains(function.spk))
                    {
                        vv = ShowFunction.FreshAir;
                    }
                    UpdataFunctionOnCount(vv, function.spk);
                    UpdataCloseAllButton(function);
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -63,40 +63,32 @@
            btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png";
            if (function.Spk_Prefix == FunctionCategory.Curtain//窗帘没有开关按钮
                || function.Spk_Prefix == FunctionCategory.Music//音乐没有开关按钮
                || function.Spk_Prefix == FunctionCategory.Sensor//传感器没有开关按钮
                )
            if (SPK.CurtainSpkList().Contains(function.spk))
            {//窗帘没有开关按钮
                CurtainFragment();
            }
            else if (SPK.MusicSpkList().Contains(function.spk))
            {//音乐没有开关按钮
                MusicFragment();
            }
            else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)) //传感器没有开关按钮)
            {
                switch (function.Spk_Prefix)
                var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
                if (powerLowTipAttr != null)
                {
                    case FunctionCategory.Curtain:
                        CurtainFragment();
                        break;
                    case FunctionCategory.Sensor:
                        var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
                        if (powerLowTipAttr != null)
                    if (powerLowTipAttr.state.ToLower() == "low")
                    {
                        Button btnTipPowerLow = new Button()
                        {
                            if (powerLowTipAttr.state.ToLower() == "low")
                            {
                                Button btnTipPowerLow = new Button()
                                {
                                    X = Application.GetRealWidth(307),
                                    Y = Application.GetRealHeight(25),
                                    Width = Application.GetRealWidth(24),
                                    Height = Application.GetRealWidth(24),
                                    UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                                    SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                                };
                                this.AddChidren(btnTipPowerLow);
                            }
                        }
                        break;
                    case FunctionCategory.Music:
                        MusicFragment();
                        break;
                            X = Application.GetRealWidth(307),
                            Y = Application.GetRealHeight(25),
                            Width = Application.GetRealWidth(24),
                            Height = Application.GetRealWidth(24),
                            UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                            SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                        };
                        this.AddChidren(btnTipPowerLow);
                    }
                }
            }
            else
@@ -148,24 +140,19 @@
                        LoadEvent_SwitchFunction(btnSwitch);
                    }
                    switch (function.Spk_Prefix)
                    if (SPK.AcSpkList().Contains(function.spk) ||
                        SPK.FhSpkList().Contains(function.spk))
                    {
                        case FunctionCategory.AC:
                            LoadLastStatesButton();
                            break;
                        case FunctionCategory.IR:
                            LoadLastStatesButton();
                            break;
                        case FunctionCategory.FloorHeat:
                            LoadLastStatesButton();
                            break;
                        case FunctionCategory.Light:
                            btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                            LoadLightControl();
                            break;
                        case FunctionCategory.Electric:
                            btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                            break;
                        LoadLastStatesButton();
                    }
                    else if (SPK.LightSpkList().Contains(function.spk))
                    {
                        btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                        LoadLightControl();
                    }
                    else if (SPK.ElectricalSpkList().Contains(function.spk))
                    {
                        btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                    }
                    #endregion
                }
@@ -227,7 +214,7 @@
            };
            //bodyDiv.AddChidren(btnCollectionIcon);
            //2020-12-16 如果是成员隐藏收藏功能
            if ( function.Spk_Prefix != FunctionCategory.Sensor)//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
            if ( !SPK.ArmSensorSpkList().Contains(function.spk) || !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
            {
                bodyDiv.AddChidren(btnCollectionIcon);
            }
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -119,7 +119,7 @@
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
                    if (function.Spk_Prefix == FunctionCategory.Light)
                    if (SPK.LightSpkList().Contains( function.spk))
                    {
                        function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                        Dictionary<string, string> d = new Dictionary<string, string>();
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -38,8 +38,21 @@
        public void LoadPage(int titleId)
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            if (titleId == StringId.Lights)
            {
                Action action = () =>
                {
                    var skipView = new AddLightScene(new List<Function>(), new Scene() { sceneType = SceneType.LightScene });
                    MainPage.BasePageView.AddChidren(skipView);
                    skipView.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView_LightFunction(action);
            }
            else
            {
                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            }
            /// <summary>
            /// 房间内容显示区域
            /// </summary>
@@ -128,7 +141,10 @@
            functionListView.RemoveAll();
            foreach (var function in showList)
            {
                if(function.spk == SPK.SensorDryContact)
                {
                    continue;
                }
                if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
                {
                    var functionDiv = new FunctionControlZone(function)
HDL_ON/UI/UI2/2-Classification/RoomPage.cs
@@ -77,7 +77,7 @@
            foreach (var function in room.GetRoomFunctions(false))
            {
                if (function.Spk_Prefix == FunctionCategory.Sensor || function.spk == SPK.ElectricEnergy)
                if (MainPage.RoomNotSupportFunctionList.Contains( function.spk))
                {
                    continue;
                }
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -13,6 +13,10 @@
            Tag = "Logic";
        }
        /// <summary>
        /// 当前选中的功能
        /// </summary>
        private Entity.Function function = null;
        /// <summary>
        /// 定义一个记录选中设备状态列表;
        /// </summary>
        private List<Dictionary<string, string>> dicSateteList = new List<Dictionary<string, string>>();
@@ -23,6 +27,7 @@
        public void Show(Entity.Function device, int index, bool edit)
        {
            this.function = device;
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            LogicView.TopView topView = new LogicView.TopView();
@@ -56,8 +61,10 @@
                case SPK.AcStandard:
                //地热
                case SPK.FloorHeatStandard:
                case SPK.HvacFloorHeat:
                //新风
                case SPK.AirFreshStandard:
                case SPK.HvacAirFresh:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -189,6 +196,7 @@
                    break;
                //毫米波传感器
                case SPK.SenesorMegahealth:
                case SPK.SenesorMegahealth2:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
                        view.btnText.TextID = StringId.mubiaozhuangtai;//目标状态
@@ -464,22 +472,47 @@
                switch (device.spk)
                {
                    //传感器
                    case SPK.SensorGas:
                    case SPK.SensorWater:
                    case SPK.SensorSmoke:
                    case SPK.SensorGas:
                    case SPK.SensorDryContact:
                    case SPK.SensorShanLan:
                    case SPK.SensorDuiShe:
                    case SPK.SensorPir:
                        {
                            keyVlaue = "status";
                            if (!Is_SpkAttribute(keyVlaue)) {
                                keyVlaue = "alarm_status";
                            }
                        };
                        break;
                    case SPK.SensorDoorWindow:
                    case SPK.SensorDryContact:
                        {
                            keyVlaue = "status";
                            if (!Is_SpkAttribute(keyVlaue))
                            {
                                keyVlaue = "contact_status";
                            }
                        }
                        break;
                    case SPK.SensorDuiShe:
                    case SPK.SensorShanLan:
                    case SPK.SensorPir:
                    case SPK.SensorUtrasonic:
                        {
                            keyVlaue = "status";
                            if (!Is_SpkAttribute(keyVlaue))
                            {
                                keyVlaue = "people_status";
                            }
                        }
                        break;
                    case SPK.SenesorMegahealth:
                    case SPK.SenesorMegahealth2:
                        {
                            keyVlaue = "action_state";
                            if (!Is_SpkAttribute(keyVlaue))
                            {
                                keyVlaue = "megahealth_state";
                            }
                        }
                        break;
@@ -515,7 +548,7 @@
                        break;
                    case StringId.wuren:
                        {
                            if (device.spk == SPK.SenesorMegahealth)
                            if (device.spk == SPK.SenesorMegahealth || device.spk == SPK.SenesorMegahealth2)
                            {
                                value = "uninhabited";
                            }
@@ -653,8 +686,10 @@
                       case SPK.SensorTVOC:
                       case SPK.SensorHcho:
                           {
                               ///公司传感器key的健值是“value”;
                               key = "value";
                               if (!Is_SpkAttribute(key))
                               {
                                   key = "value";
                               }
                           }
                           break;
                   }
@@ -804,6 +839,21 @@
            return false;
        }
        /// <summary>
        /// 识别使用功能是否存在属性
        /// </summary>
        /// <param name="key">设备属性,云雀上定义好的</param>
        /// <returns></returns>
        private bool Is_SpkAttribute(string key) {
            ///修改新属性
            ///识别使用功能是否存在属性
            var job = this.function.GetAttribute(key);
            if (job != null)
            {
                return true;
            }
            return false;
        }
       
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -148,10 +148,11 @@
                                //空调
                                case SPK.AcStandard:
                                //地热
                                case SPK.FloorHeatStandard:
                                case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
                                //新风
                                case SPK.AirFreshStandard:
                                    {//开关灯
                                case SPK.HvacAirFresh:
                                {//开关灯
                                        foreach (var dic in dicList)
                                        {
@@ -269,6 +270,7 @@
                                            switch (dic["key"])
                                            {
                                                case "status":
                                                case "people_status":
                                                    {
                                                        if (value == "true")
                                                        {
@@ -302,6 +304,7 @@
                                    }
                                    break;
                                case SPK.SenesorMegahealth:
                                case SPK.SenesorMegahealth2:
                                    {
                                        foreach (var dic in dicList)
                                        {
@@ -1073,7 +1076,7 @@
                                    }
                                    break;
                                case SPK.FloorHeatStandard:
                                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                                    {
                                        string on_off = GetKeyValue("on_off", dicList);
                                        string set_temp = GetKeyValue("set_temp", dicList);
@@ -1146,6 +1149,7 @@
                                    }
                                    break;
                                case SPK.AirFreshStandard:
                                case SPK.HvacAirFresh:
                                    {
                                        string on_off = GetKeyValue("on_off", dicList);
                                        string fan = GetKeyValue("fan", dicList);
@@ -1542,7 +1546,7 @@
                    }
                    break;
                case SPK.FloorHeatStandard:
                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                    {
                        foreach (var dic in dicList)
@@ -1626,6 +1630,7 @@
                    }
                    break;
                case SPK.AirFreshStandard:
                case SPK.HvacAirFresh:
                    {
                        foreach (var dic in dicList)
@@ -1650,8 +1655,8 @@
                                        }
                                    }
                                    break;
                                   case "fan":
                                case "fan":
                                    {
                                        if (button2 == null)
                                        {
@@ -1783,6 +1788,7 @@
                            switch (dic["key"])
                            {
                                case "status":
                                case "people_status":
                                    {
                                        if (value == "true")
                                        {
@@ -1815,6 +1821,7 @@
                    }
                    break;
                case SPK.SenesorMegahealth:
                case SPK.SenesorMegahealth2:
                    {
                        foreach (var dic in dicList)
                        {
@@ -1983,7 +1990,7 @@
                                    }
                                    break;
                                case SPK.AcStandard:
                                case SPK.FloorHeatStandard:
                                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                                    {
                                        foreach (var dic in dicList)
                                        {
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -339,12 +339,13 @@
                        strPath = "LogicIcon/airconditionerlogic.png";
                    }
                    break;
                case SPK.FloorHeatStandard:
                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                    {
                        strPath = "LogicIcon/heatlogic.png";
                    }
                    break;
                case SPK.AirFreshStandard:
                case SPK.HvacAirFresh:
                    {
                        strPath = "LogicIcon/heatlogic.png";
                    }
@@ -359,6 +360,7 @@
                case SPK.SensorDoorWindow:
                case SPK.SensorUtrasonic:
                case SPK.SenesorMegahealth:
                case SPK.SenesorMegahealth2:
                case SPK.SensorEnvironment:
                case SPK.SensorEnvironment2:
                case SPK.SensorEnvironment3:
@@ -410,12 +412,12 @@
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.AC));
            }
            var floorHeating = deviceList.Find((device) => device.spk == SPK.FloorHeatStandard);
            var floorHeating = deviceList.Find((device) => device.spk == SPK.FloorHeatStandard || device.spk == SPK.HvacFloorHeat);
            if (floorHeating != null)
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.FloorHeating));
            }
            var airFresh = deviceList.Find((device) => device.spk == SPK.AirFreshStandard);
            var airFresh = deviceList.Find((device) => device.spk == SPK.AirFreshStandard || device.spk == SPK.HvacAirFresh);
            if (airFresh != null)
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.AirFresh));
@@ -431,6 +433,7 @@
            || device.spk == SPK.SensorDoorWindow
            || device.spk == SPK.SensorUtrasonic
            || device.spk == SPK.SenesorMegahealth
            || device.spk == SPK.SenesorMegahealth2
            || device.spk == SPK.SensorEnvironment
             || device.spk == SPK.SensorEnvironment2
              || device.spk == SPK.SensorEnvironment3
@@ -476,11 +479,11 @@
            }
            else if (deviceType == Language.StringByID(StringId.FloorHeating))
            {
                functionTypeList.Add(SPK.FloorHeatStandard);
                functionTypeList.Add(SPK.FloorHeatStandard);functionTypeList.Add(SPK.HvacFloorHeat);
            }
            else if (deviceType == Language.StringByID(StringId.AirFresh))
            {
                functionTypeList.Add(SPK.AirFreshStandard);
                functionTypeList.Add(SPK.AirFreshStandard); functionTypeList.Add(SPK.HvacAirFresh);
            }
            else if (deviceType == Language.StringByID(StringId.Sensor))
            {
@@ -494,6 +497,7 @@
                functionTypeList.Add(SPK.SensorDoorWindow);
                functionTypeList.Add(SPK.SensorUtrasonic);
                functionTypeList.Add(SPK.SenesorMegahealth);
                functionTypeList.Add(SPK.SenesorMegahealth2);
                functionTypeList.Add(SPK.SensorEnvironment);
                functionTypeList.Add(SPK.SensorEnvironment2);
                functionTypeList.Add(SPK.SensorEnvironment3);
@@ -528,9 +532,9 @@
                        deviceTypeList.Add(SPK.CurtainSwitch);
                        deviceTypeList.Add(SPK.CurtainRoller);
                        deviceTypeList.Add(SPK.CurtainTrietex);
                        deviceTypeList.Add(SPK.AcStandard);
                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAirFresh);
                        deviceTypeList.Add(SPK.AirFreshStandard);
                        deviceTypeList.Add(SPK.FloorHeatStandard);
                        deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat);
                        deviceTypeList.Add(SPK.SensorSmoke);
                        deviceTypeList.Add(SPK.SensorWater);
                        deviceTypeList.Add(SPK.SensorGas);
@@ -541,6 +545,7 @@
                        deviceTypeList.Add(SPK.SensorDoorWindow);
                        deviceTypeList.Add(SPK.SensorUtrasonic);
                        deviceTypeList.Add(SPK.SenesorMegahealth);
                        deviceTypeList.Add(SPK.SenesorMegahealth2);
                        deviceTypeList.Add(SPK.SensorEnvironment);
                        deviceTypeList.Add(SPK.SensorEnvironment2);
                        deviceTypeList.Add(SPK.SensorEnvironment3);
@@ -563,8 +568,8 @@
                        deviceTypeList.Add(SPK.CurtainSwitch);
                        deviceTypeList.Add(SPK.CurtainRoller);
                        deviceTypeList.Add(SPK.CurtainTrietex);
                        deviceTypeList.Add(SPK.AcStandard);
                        deviceTypeList.Add(SPK.FloorHeatStandard);
                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAirFresh);
                        deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat);
                        deviceTypeList.Add(SPK.AirFreshStandard);
                    }
                    break;
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -233,7 +233,7 @@
                        #endregion
                    }
                    break;
                case SPK.FloorHeatStandard:
                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                    {
                        #region 界面
                        ///开关
@@ -313,6 +313,7 @@
                    }
                    break;
                case SPK.AirFreshStandard:
                case SPK.HvacAirFresh:
                    {
                        #region 界面
                        ///开关
@@ -437,7 +438,7 @@
                                break;
                            }
                        case SPK.AcStandard:
                        case SPK.FloorHeatStandard:
                        case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                            {
                                //做了一个特殊处理;
                                bool _bool = false;
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
@@ -18,6 +18,7 @@
        /// </summary>
        public Action<Function> AddDeviceEvent = null;
        public IntegratedBrandDevice device;
        #endregion
        #region ■ 初始化_____________________________
@@ -26,6 +27,7 @@
        /// </summary>
        public void ShowForm(IntegratedBrandDevice device)
        {
            this.device = device;
            if (Language.CurrentLanguage == "Chinese")
            {
                //设置头部信息
@@ -113,7 +115,7 @@
                        try
                        {
                            var pm = new HttpServerRequest();
                            var pack = pm.IndependentRegister3TyDevcie(SPK.SenesorMegahealth, snCode,Language.StringByID(StringId.SenesorMillimeterWave));
                            var pack = pm.IndependentRegister3TyDevcie(device.spk, snCode,Language.StringByID(StringId.SenesorMillimeterWave));
                            if (pack.Code == StateCode.SUCCESS)
                            {
                                //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString());
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -119,7 +119,7 @@
                    Width = Application.GetRealWidth(32),
                    Height = Application.GetRealWidth(32),
                    Radius = (uint)Application.GetRealWidth(4),
                    UnSelectedImagePath = $"FunctionIcon/Icon/{device.spk.Replace(".","")}.png",
                    UnSelectedImagePath =  $"FunctionIcon/Icon/{device.IconName}.png",
                };
                row.AddChidren(btnIcon);
                Button btnRight = new Button()
@@ -154,6 +154,7 @@
                            }; 
                            break;
                        case SPK.SenesorMegahealth:
                        case SPK.SenesorMegahealth2:
                            var form1 = new AddSenesorMegahealthDirection1Page();
                            form1.AddForm(device);
                            form1.AddDeviceEvent = (functionObj) => {
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -138,7 +138,7 @@
                    Width = Application.GetRealWidth(32),
                    Height = Application.GetRealWidth(32),
                    Radius = (uint)Application.GetRealWidth(4),
                    UnSelectedImagePath = $"FunctionIcon/Icon/{device.spk.Replace(".", "")}.png",
                    UnSelectedImagePath = $"FunctionIcon/Icon/{device.IconName}.png",
                };
                row.AddChidren(btnIcon);
                Button btnRight = new Button()
@@ -172,6 +172,7 @@
                            });
                            break;
                        case SPK.SenesorMegahealth:
                        case SPK.SenesorMegahealth2:
                            var smPage = new SenesorMegahealthManagerPage();
                            smPage.AddForm(device);
                            smPage.DelDeviceEvent = () =>
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -191,7 +191,7 @@
            {
                LoadPictureOptionView();
            };
            //抹掉数据
            btnEraseData = new Button()
            {
                Y = Application.GetRealHeight(481),
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -250,11 +250,11 @@
                };
                if(Language.CurrentLanguage =="Chinese")
                {
                    btnExit.Text = "退出体验模式";
                    btnExit.Text = "退出";
                }
                else
                {
                    btnExit.Text = "Exit dome";
                    btnExit.Text = "Exit";
                }
                btnExit.MouseUpEventHandler = (sender, e) =>
                {
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
@@ -45,7 +45,8 @@
            //banbenshengjiFL.frameLayout.Y = editNameFLayout.frameLayout.Bottom;
            //viewLayout.AddChidren(banbenshengjiFL.FLayoutView());
            var versions = Pir.currPir.versions.Find((c)=>c.module== "fw_version");
            var versions = Pir.currPir.versions.Find((c) => c.module == "FW");
            if (versions == null)
            {
                versions = new Entity.VersionInfo();
@@ -53,10 +54,15 @@
            ///版本号:v1.3.5
            FrameLayout50 banbenhaoFLayout = new FrameLayout50();
            banbenhaoFLayout.btnNextIcon.Visible = false;
            banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":"+ versions.version;
            banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":";// + versions.version;
            banbenhaoFLayout.btnEditText.Text = versions.version;
            banbenhaoFLayout.btnEditText.TextAlignment = TextAlignment.CenterRight;
            banbenhaoFLayout.btnEditText.X = Application.GetRealWidth(357 - 200 - 16);
            banbenhaoFLayout.btnEditText.Width = Application.GetRealWidth(200);
            banbenhaoFLayout.btnText.Width = Application.GetRealWidth(280);
            banbenhaoFLayout.frameLayout.Y = editNameFLayout.frameLayout.Bottom;// banbenshengjiFL.frameLayout.Bottom;
            viewLayout.AddChidren(banbenhaoFLayout.FLayoutView());
            //删除
            FrameLayout frameLayout = new FrameLayout
            {
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -935,12 +935,16 @@
            {
                btnTemp.Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString();
                btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "°C";
                btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
                btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing));
                btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed));
                btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
                btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing));
                btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed));
                btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode),false);
                btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing),false);
                btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed),false);
                arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)));
                if (device.trait_on_off.curValue.ToString() == "on")
                {
                    btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true;
                    arcBar.IsOffline = false;
                    btnSwitch.IsSelected = true;
                    arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
@@ -955,6 +959,7 @@
                }
                else
                {
                    btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false;
                    arcBar.IsOffline = true;
                    btnSwitch.IsSelected = false;
                    arcBar.IsClickable = false;
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
@@ -183,11 +183,13 @@
                    UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode))
                };
                FrameWhiteCentet1.AddChidren(btnMode);
                btnMode.MouseUpEventHandler = (sender, e) =>
                if (device.GetAttribute(FunctionAttributeKey.Mode).value.Count > 1)
                {
                    LoadDiv_ChangeModeView();
                };
                    btnMode.MouseUpEventHandler = (sender, e) =>
                    {
                        LoadDiv_ChangeModeView();
                    };
                }
            }
            btnSwitch = new Button()
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -43,7 +43,7 @@
            //读取状态
            new System.Threading.Thread(() =>
            {
                if (device.spk == SPK.SenesorMegahealth)
                if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2)
                {
                    DriverLayer.Control.Ins.SendReadCommand(device, true);
                }
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs
@@ -43,7 +43,7 @@
            //读取状态
            new System.Threading.Thread(() =>
            {
                if (device.spk == SPK.SenesorMegahealth)
                if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2)
                {
                    DriverLayer.Control.Ins.SendReadCommand(device, true);
                }
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
@@ -25,6 +25,12 @@
        /// 窗帘动态控件
        /// </summary>
        CurtainSeekBarOn curtainSeekBar;
        /// <summary>
        /// 进度值
        /// </summary>
        Button btnProgress;
        ///// <summary>
        ///// 窗帘进度减少按钮
        ///// </summary>
@@ -134,6 +140,17 @@
            //    controlView.AddChidren(btnCollection);
            //}
            btnProgress = new Button() {
                Y = Application.GetRealHeight(80),
                Height = Application.GetRealHeight(50),
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.PromptingColor1,
                Text = curtainTemp.GetPercent(function).ToString() + "%",
            };
            controlView.AddChidren(btnProgress);
            curtainSeekBar = new CurtainSeekBarOn()
            {
                Gravity = Gravity.CenterHorizontal,
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -53,6 +53,7 @@
            //运行方向 打开(加进度):关闭(减进度)
            bool runningDirection = progress > curtainSeekBar.Progress;
            int curBarProgress = curtainSeekBar.Progress;
            btnProgress.Text = progress + "%";
            new System.Threading.Thread(() =>
            {
                try
@@ -228,8 +229,9 @@
            //    DriverLayer.Control.Ins.SendWriteCommand(function, d);
            //};
            //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
            //{
            curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
            {
                btnProgress.Text = curtainSeekBar.Progress + "%";
            //    controlBar.Progress = curtainSeekBar.Progress;
            //    new System.Threading.Thread(() =>
            //    {
@@ -243,9 +245,10 @@
            //        }
            //    })
            //    { IsBackground = true }.Start();
            //};
            };
            curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
            btnProgress.Text = curtainSeekBar.Progress + "%";
                //controlBar.Progress = curtainSeekBar.Progress;
                new System.Threading.Thread(() =>
                {
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
@@ -26,18 +26,18 @@
        /// 窗帘动态控件
        /// </summary>
        CurtainRollSeekBarOn curtainSeekBar;
        /// <summary>
        /// 窗帘进度减少按钮
        /// </summary>
        Button btnMinusSignIcon;
        /// <summary>
        /// 窗帘进度增加按钮
        /// </summary>
        Button btnPlusSgnIcon;
        /// <summary>
        /// 窗帘滑动控制
        /// </summary>
        DiyImageSeekBar controlBar;
        ///// <summary>
        ///// 窗帘进度减少按钮
        ///// </summary>
        //Button btnMinusSignIcon;
        ///// <summary>
        ///// 窗帘进度增加按钮
        ///// </summary>
        //Button btnPlusSgnIcon;
        ///// <summary>
        ///// 窗帘滑动控制
        ///// </summary>
        //DiyImageSeekBar controlBar;
        /// <summary>
        /// 窗帘关闭按钮
        /// </summary>
@@ -50,6 +50,10 @@
        /// 窗帘打开按钮
        /// </summary>
        Button btnCurtainOpen;
        /// <summary>
        /// 进度值
        /// </summary>
        Button btnProgress;
        #endregion
        #region 区域变量
@@ -134,6 +138,17 @@
            //    controlView.AddChidren(btnCollection);
            //}
            btnProgress = new Button()
            {
                Y = Application.GetRealHeight(80),
                Height = Application.GetRealHeight(50),
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.PromptingColor1,
                Text = curtainTemp.GetPercent(function).ToString() + "%",
            };
            controlView.AddChidren(btnProgress);
            curtainSeekBar = new CurtainRollSeekBarOn()
            {
                Gravity = Gravity.CenterHorizontal,
@@ -146,54 +161,54 @@
            };
            controlView.AddChidren(curtainSeekBar);
            btnMinusSignIcon = new Button()
            {
                Y = Application.GetRealHeight(406),
                Width = Application.GetRealWidth(52),
                Height = Application.GetMinRealAverage(24),
                TextAlignment = TextAlignment.CenterRight,
                TextID = StringId.PullOpen,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextColor = CSS_Color.PromptingColor1,
                Visible = false,
                Enable = false,
            };
            controlView.AddChidren(btnMinusSignIcon);
            //btnMinusSignIcon = new Button()
            //{
            //    Y = Application.GetRealHeight(406),
            //    Width = Application.GetRealWidth(52),
            //    Height = Application.GetMinRealAverage(24),
            //    TextAlignment = TextAlignment.CenterRight,
            //    TextID = StringId.PullOpen,
            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            //    TextColor = CSS_Color.PromptingColor1,
            //    Visible = false,
            //    Enable = false,
            //};
            //controlView.AddChidren(btnMinusSignIcon);
            controlBar = new DiyImageSeekBar()
            {
                X = btnMinusSignIcon.Right,
                Y = Application.GetRealHeight(391),//414,设计数据
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(54),
                SeekBarViewHeight = Application.GetRealHeight(8),
                ThumbImagePath = "Public/ThumbImage.png",
                ThumbImageHeight = Application.GetRealHeight(54),
                ProgressBarColor = CSS_Color.MainColor,
                ProgressTextColor = CSS_Color.FirstLevelTitleColor,
                ProgressTextSize = 0x00000000,
                MaxValue = 100,
                SeekBarPadding = Application.GetRealWidth(20),
                Progress = curtainTemp.GetPercent(function),
                Visible = false,
                Enable = false,
            };
            controlView.AddChidren(controlBar);
            //controlBar = new DiyImageSeekBar()
            //{
            //    X = btnMinusSignIcon.Right,
            //    Y = Application.GetRealHeight(391),//414,设计数据
            //    Width = Application.GetRealWidth(220),
            //    Height = Application.GetRealHeight(54),
            //    SeekBarViewHeight = Application.GetRealHeight(8),
            //    ThumbImagePath = "Public/ThumbImage.png",
            //    ThumbImageHeight = Application.GetRealHeight(54),
            //    ProgressBarColor = CSS_Color.MainColor,
            //    ProgressTextColor = CSS_Color.FirstLevelTitleColor,
            //    ProgressTextSize = 0x00000000,
            //    MaxValue = 100,
            //    SeekBarPadding = Application.GetRealWidth(20),
            //    Progress = curtainTemp.GetPercent(function),
            //    Visible = false,
            //    Enable = false,
            //};
            //controlView.AddChidren(controlBar);
            btnPlusSgnIcon = new Button()
            {
                X = Application.GetRealWidth(286),
                Y = Application.GetRealHeight(406),
                Width = Application.GetRealWidth(62),
                Height = Application.GetRealWidth(24),
                TextID = StringId.Shut,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextColor = CSS_Color.PromptingColor1,
                Visible = false,
                Enable = false,
            };
            controlView.AddChidren(btnPlusSgnIcon);
            //btnPlusSgnIcon = new Button()
            //{
            //    X = Application.GetRealWidth(286),
            //    Y = Application.GetRealHeight(406),
            //    Width = Application.GetRealWidth(62),
            //    Height = Application.GetRealWidth(24),
            //    TextID = StringId.Shut,
            //    TextAlignment = TextAlignment.CenterLeft,
            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            //    TextColor = CSS_Color.PromptingColor1,
            //    Visible = false,
            //    Enable = false,
            //};
            //controlView.AddChidren(btnPlusSgnIcon);
            btnCurtainClose = new Button()
            {
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -50,6 +50,7 @@
            //运行方向 打开(加进度):关闭(减进度)
            bool runningDirection = progress > curtainSeekBar.Progress;
            int curBarProgress = curtainSeekBar.Progress;
            btnProgress.Text = progress + "%";
            new System.Threading.Thread(() =>
            {
                try
@@ -185,23 +186,23 @@
                CurtainAnimation(100);
            };
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            {
                controlBar.Progress -= 1;
                function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(function, d);
            };
            //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            //{
            //    controlBar.Progress -= 1;
            //    function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
            //    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //    d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
            //    DriverLayer.Control.Ins.SendWriteCommand(function, d);
            //};
            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            {
                controlBar.Progress += 1;
                function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(function, d);
            };
            //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            //{
            //    controlBar.Progress += 1;
            //    function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
            //    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //    d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
            //    DriverLayer.Control.Ins.SendWriteCommand(function, d);
            //};
            btnCurtainStop.MouseDownEventHandler = (sender, e) =>
@@ -242,7 +243,8 @@
            //};
            curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                controlBar.Progress = curtainSeekBar.Progress;
                //controlBar.Progress = curtainSeekBar.Progress;
                btnProgress.Text = curtainSeekBar.Progress + "%";
                new System.Threading.Thread(() =>
                {
                    function.SetAttrState(FunctionAttributeKey.Percent, e);
@@ -254,36 +256,37 @@
                { IsBackground = true }.Start();
            };
            //controlBar.OnProgressChangedEvent = (sender, e) =>
            curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
            {
                btnProgress.Text = curtainSeekBar.Progress + "%";
                //    new System.Threading.Thread(() =>
                //    {
                //        if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
                //        {
                //            function.percent = e;
                //            function.refreshTime = DateTime.Now;
                //            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                //            d.Add("percent", function.percent.ToString());
                //            Control.SendWriteCommand(function, d);
                //        }
                //    })
                //    { IsBackground = true }.Start();
            };
            //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
            //{
            //    curtainSeekBar.Progress = controlBar.Progress;
            //    btnProgress.Text = curtainSeekBar.Progress + "%";
            //    new System.Threading.Thread(() =>
            //    {
            //        if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
            //        {
            //            function.percent = e;
            //            function.refreshTime = DateTime.Now;
            //            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //            d.Add("percent", function.percent.ToString());
            //            Control.SendWriteCommand(function, d);
            //        }
            //        function.SetAttrState(FunctionAttributeKey.Percent, e);
            //        function.refreshTime = DateTime.Now;
            //        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //        d.Add("percent", e.ToString());
            //        DriverLayer.Control.Ins.SendWriteCommand(function, d);
            //    })
            //    { IsBackground = true }.Start();
            //};
            controlBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                curtainSeekBar.Progress = controlBar.Progress;
                new System.Threading.Thread(() =>
                {
                    function.SetAttrState(FunctionAttributeKey.Percent, e);
                    function.refreshTime = DateTime.Now;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("percent", e.ToString());
                    DriverLayer.Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
        }
    }
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
@@ -34,6 +34,13 @@
        /// 开关按钮
        /// </summary>
        Button btnSwitch;
        /// <summary>
        /// 运行状态-动态加载
        /// </summary>
        Button btnRunStatus;
        #endregion
        #region 区域变量
@@ -74,7 +81,6 @@
                btnFromFloor_Out = btnFromFloorOut;
            }
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), function);
            controlView = new FrameLayout()
            {
@@ -136,6 +142,62 @@
            };
            controlView.AddChidren(btnSwitchIcon);
            //运行状态
            if(function.GetAttribute("run_status")!= null)
            {
                btnRunStatus = new Button()
                {
                    Y = Application.GetRealHeight(300),
                    Height = Application.GetRealHeight(58),
                    TextAlignment = TextAlignment.Center,
                    TextSize = CSS_FontSize.TextFontSize,
                };
                controlView.AddChidren(btnRunStatus);
                UpdataRunStatus();
            }
            if (function.GetAttribute("power")!= null)
            {
                Button btnEnergyIcon = new Button()
                {
                    Y = Application.GetRealHeight(377),
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(32),
                    Height = Application.GetRealWidth(32),
                    UnSelectedImagePath = "FunctionIcon/Electrical/AirSwitch/EnergyIcon.png"
                };
                controlView.AddChidren(btnEnergyIcon);
                Button btnEnergyText = new Button()
                {
                    Y = Application.GetRealHeight(400),
                    Gravity = Gravity.CenterHorizontal,
                    Height = Application.GetRealWidth(47),
                    TextAlignment = TextAlignment.Center,
                    TextID = StringId.EnergyMonitoring,
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                };
                controlView.AddChidren(btnEnergyText);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                    var skipView = new EnergyMainPage();
                    MainPage.BasePageView.AddChidren(skipView);
                    skipView.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                btnEnergyIcon.MouseUpEventHandler = eventHandler;
                btnEnergyText.MouseUpEventHandler = eventHandler;
            }
            btnSwitch = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
@@ -148,7 +210,7 @@
            };
            controlView.AddChidren(btnSwitch);
            new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh);
            new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh,false);
            new System.Threading.Thread(() =>
            {
                DriverLayer.Control.Ins.SendReadCommand(function);
@@ -177,6 +239,10 @@
                    {
                        bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on";
                    }
                    if(updataTemp.GetAttribute("run_status")!=null)
                    {
                        bodyView.UpdataRunStatus();
                    }
                }
                catch (Exception ex)
                {
@@ -185,6 +251,138 @@
            });
        }
        /// <summary>
        /// 更新运行状态
        /// </summary>
        void UpdataRunStatus()
        {
            if (btnRunStatus == null)
                return;
            var runStatus = function.GetAttrState("run_status");
            if (Language.CurrentLanguage == "Chinese")
            {
                switch (runStatus)
                {
                    //* RUN:正常工作中
                    case "RUN":
                        btnRunStatus.Text = "工作中";
                        btnRunStatus.TextColor = CSS_Color.MainColor;
                        break;
                    //* HV:过压预警
                    case "HV":
                        btnRunStatus.Text = "过压预警";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* LV:欠压预警
                    case "LV":
                        btnRunStatus.Text = "欠压预警";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* HC:过流预警
                    case "HC":
                        btnRunStatus.Text = "过流预警";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* HT:过温预警
                    case "HT":
                        btnRunStatus.Text = "过温预警";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* LEAK:漏电预警
                    case "LEAK":
                        btnRunStatus.Text = "漏电预警";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* ERR_HV:过压报警
                    case "ERR_HV":
                        btnRunStatus.Text = "过压报警";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_LV:欠压报警
                    case "ERR_LV":
                        btnRunStatus.Text = "欠压报警";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_HC:过流报警
                    case "ERR_HC":
                        btnRunStatus.Text = "过流报警";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_HT:过温报警
                    case "ERR_HT":
                        btnRunStatus.Text = "过温报警";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_LEAK:漏电报警
                    case "ERR_LEAK":
                        btnRunStatus.Text = "漏电报警";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                }
            }
            else
            {
                switch (runStatus)
                {
                    //* RUN:正常工作中
                    case "RUN":
                        btnRunStatus.Text = "At work";
                        btnRunStatus.TextColor = CSS_Color.MainColor;
                        break;
                    //* HV:过压预警
                    case "HV":
                        btnRunStatus.Text = "Overvoltage warning";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* LV:欠压预警
                    case "LV":
                        btnRunStatus.Text = "Undervoltage warning";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* HC:过流预警
                    case "HC":
                        btnRunStatus.Text = "Overcurrent warning";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* HT:过温预警
                    case "HT":
                        btnRunStatus.Text = "Overtemperature warning";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* LEAK:漏电预警
                    case "LEAK":
                        btnRunStatus.Text = "Leakage warning";
                        btnRunStatus.TextColor = 0xFFFC9C04;
                        break;
                    //* ERR_HV:过压报警
                    case "ERR_HV":
                        btnRunStatus.Text = "Overvoltage alarm";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_LV:欠压报警
                    case "ERR_LV":
                        btnRunStatus.Text = "Undervoltage alarm";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_HC:过流报警
                    case "ERR_HC":
                        btnRunStatus.Text = "Overcurrent alarm";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_HT:过温报警
                    case "ERR_HT":
                        btnRunStatus.Text = "Overtemperature alarm";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                    //* ERR_LEAK:漏电报警
                    case "ERR_LEAK":
                        btnRunStatus.Text = "Leakage alarm";
                        btnRunStatus.TextColor = 0xFFFF8080;
                        break;
                }
            }
        }
        /// <summary>
        /// 加载事件列表
        /// </summary>
        void LoadEventList()
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -83,7 +83,10 @@
        public EnergyMainPage()
        {
            bodyView = this;
            energyList = FunctionList.List.GetEnergyList();
            energyList = FunctionList.List.GetEnergyList();
            var breaker = FunctionList.List.Functions.FindAll((obj) => obj.spk == SPK.AirSwitch);
            var energyBreker = breaker.FindAll((obj) => obj.GetAttribute("power") != null);
            energyList.AddRange(energyBreker);
        }
        /// <summary>
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
@@ -55,7 +55,7 @@
            grid = new EchartGrid
            {
                left = "5%",
                right = "5%",
                right = "8%",
                bottom = "5%",
                top = "5%",
                containLabel = true
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs
@@ -130,7 +130,7 @@
                    },
                    grid: {
                         top: '10%',
                        left: '10%',
                        left: '13%',
                        right: '10%',
                        bottom: '15%',
                    },
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -285,7 +285,9 @@
                            deviceId = sensor.deviceId,
                            roomIds = sensor.roomIds,
                            attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = seTemp.state, curValue = seTemp.curValue }
                            ,new FunctionAttributes { key = "spk"} }
                            , new FunctionAttributes {key = "spk",state = seTemp.key,curValue = seTemp.key }
                            //,new FunctionAttributes { key = "spk"}
                        }
                        };
                        switch (seTemp.key)
                        {
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -862,6 +862,10 @@
                        var sensorType = sr.spk.Split(".")[1];
                        var queryType = sr.GetAttrState("spk").ToString();
                        if(queryType == "0")
                        {
                            queryType = "value";
                        }
                        var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, queryType);
                        if (revertObj != null)
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -22,7 +22,8 @@
                    var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp)));
                    bodyView.btnTemp.Text = outinTemp.ToString();
                    bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp))) + "°C";
                    bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
                    bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
                    bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode),false);
                    bodyView.arcBar.Progress = outinTemp;
                    //if (updateTemp.trait_on_off.curValue.ToString() == "on")
                    //{
@@ -39,6 +40,7 @@
                    if (updateTemp.trait_on_off.curValue.ToString() == "on")
                    {
                        bodyView.btnMode.IsSelected = true;
                        bodyView.arcBar.IsOffline = false;
                        bodyView.btnSwitch.IsSelected = true;
                        bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
@@ -53,6 +55,7 @@
                    }
                    else
                    {
                        bodyView.btnMode.IsSelected = false;
                        bodyView.arcBar.IsOffline = true;
                        bodyView.btnSwitch.IsSelected = false;
                        bodyView.arcBar.IsClickable = false;
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
@@ -67,7 +67,11 @@
            {
                btnLocationInfoRight.MouseUpEventHandler = eventHandler;
            }
            btnLocationValues.MouseUpEventHandler = eventHandler;
            if (btnLocationValues != null)
            {
                btnLocationValues.MouseUpEventHandler = eventHandler;
            }
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
@@ -41,7 +41,7 @@
        /// <summary>
        /// 色温的滑动控件
        /// </summary>
        SeekBarControl barColorTemplatrue;
        CCTSeekBarControl barColorTemplatrue;
        /// <summary>
        /// 开关按钮
        /// </summary>
@@ -205,7 +205,7 @@
            btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png";
            controlView.AddChidren(btnColorTemplatrueBack);
            //滑动条控件
            barColorTemplatrue = new SeekBarControl();
            barColorTemplatrue = new CCTSeekBarControl();
            barColorTemplatrue.X = btnTempClolorMin.Right;
            barColorTemplatrue.Y = Application.GetRealHeight(340);
            barColorTemplatrue.MinValue = 27;
@@ -537,11 +537,12 @@
                btnReadIcon.IsSelected = true;
            }
        }
        /// <summary>
        /// 左右滑动的进度条控件
        /// </summary>
        private class SeekBarControl : DiyImageSeekBar
    }
    /// <summary>
    /// 左右滑动的进度条控件
    /// </summary>
    public class CCTSeekBarControl : DiyImageSeekBar
        {
            #region ■ 变量声明___________________________
@@ -649,7 +650,7 @@
            /// 左右滑动的进度条控件
            /// </summary>
            /// <param name="i_width">宽度,非真实值</param>
            public SeekBarControl(int i_width = 210)
            public CCTSeekBarControl(int i_width = 210)
            {
                this.Width = Application.GetRealWidth(i_width);
                this.Height = Application.GetRealHeight(54);
@@ -773,5 +774,4 @@
            #endregion
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -27,18 +27,19 @@
        static VerticalScrolViewLayout functionListView;
        #endregion
        List<Function> functionList;
        public AddLightScene()
        List<Function> sceneLishtList;
        Scene lightScene;
        public AddLightScene(List<Function> functions,Scene scene)
        {
            bodyView = this;
            functionList = new List<Function>();
            sceneLishtList = functions;
            lightScene = scene;
        }
        public void LoadPage(int titleId)
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView();
            /// <summary>
            /// 房间内容显示区域
@@ -81,10 +82,619 @@
            };
            bodyView.AddChidren(functionListView);
                functionList.AddRange(FunctionList.List.GetLightList());
            var lightList = FunctionList.List.GetLightList();
            foreach (var function in lightList)
            {
                var functionDiv = new LightRow(function)
                {
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(62),
                    Radius = (uint)Application.GetMinRealAverage(12),
                    BorderColor = 0x00FFFFFF,
                    BorderWidth = 1,
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    Tag = function.spk + function.sid
                };
                functionDiv.LoadDiv(sceneLishtList);
                functionListView.AddChidren(functionDiv);
                functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
            }
            #region 底部view
            var bottomView = new FrameLayout()
            {
                Y = Application.GetRealHeight(591),
                Height = Application.GetRealHeight(100),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            this.AddChidren(bottomView);
            var btnConfrim = new Button()
            {
                Y = Application.GetRealHeight(12),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                Radius = (uint)Application.GetRealHeight(22),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                BackgroundColor = CSS_Color.MainColor,
                TextID = StringId.Confirm,
            };
            bottomView.AddChidren(btnConfrim);
            btnConfrim.MouseUpEventHandler = (sender, e) => {
                var lightSceneDialog = new LightSceneEditDialog(sceneLishtList,lightScene);
                lightSceneDialog.ShowDialog();
            };
            #endregion
        }
    }
    public class LightRow : FrameLayout
    {
        #region 区域控件
        static FrameLayout bodyDiv;
        /// <summary>
        /// 功能/场景icon
        /// </summary>
        Button btnIcon;
        /// <summary>
        /// 功能名称/场景名称
        /// </summary>
        Button btnName;
        /// <summary>
        /// 楼层信息显示按钮
        /// </summary>
        Button btnFromFloor;
        /// <summary>
        /// 选中按钮
        /// </summary>
        Button btnSelect;
        #endregion
        #region 区域变量
        Function function;
        #endregion
        public LightRow(Function func)
        {
            bodyDiv = this;
            bodyDiv.Tag = func.sid;
            function = func;
        }
        /// <summary>
        /// 加载控制卡片区域
        /// </summary>
        public void LoadDiv(List<Function> functions)
        {
            btnIcon = new Button()
            {
                X = Application.GetRealWidth(10),
                Y = Application.GetRealHeight(15),
                Width = Application.GetRealWidth(32),
                Height = Application.GetRealWidth(32),
                UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"
            };
            bodyDiv.AddChidren(btnIcon);
            btnName = new Button()
            {
                X = Application.GetRealWidth(8 + 10 + 32),
                Y = Application.GetRealHeight(10),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(24),
                Text = function.name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
            };
            bodyDiv.AddChidren(btnName);
            btnFromFloor = new Button()
            {
                X = Application.GetRealWidth(8 + 10 + 32),
                Y = Application.GetRealHeight(10 + 24),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(18),
                Text = function.GetRoomListName(),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
            bodyDiv.AddChidren(btnFromFloor);
            btnSelect = new Button()
            {
                X = Application.GetRealWidth(303),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetRealWidth(32),
                Height = Application.GetRealWidth(32),
                UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
                SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
                IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null
            };
            bodyDiv.AddChidren(btnSelect);
            btnSelect.MouseUpEventHandler = (sender, e) => {
                btnSelect.IsSelected = !btnSelect.IsSelected;
                if(btnSelect.IsSelected)
                {
                    var addTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
                    if (addTemp == null)
                    {
                        functions.Add(function);
                    }
                }
                else
                {
                    var removeTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
                    if (removeTemp != null)
                    {
                        functions.Remove(removeTemp);
                    }
                }
            };
        }
    }
    /// <summary>
    /// 灯光场景编辑弹窗
    /// </summary>
    public class LightSceneEditDialog :Dialog
    {
        List<Function> lights;
        Scene editScene;
        public LightSceneEditDialog(List<Function> functions,Scene scene)
        {
            lights = functions;
            editScene = scene;
        }
        public void ShowDialog()
        {
            var hadDimming = lights.Find((obj) => obj.spk == SPK.LightDimming) != null;
            var hadCCT = lights.Find((obj) => obj.spk == SPK.LightCCT) != null;
            var hadRGB = lights.Find((obj) => obj.spk == SPK.LightRGB) != null;
            var bodyView = new FrameLayout();
            this.AddChidren(bodyView);
            bodyView.MouseUpEventHandler = (sender, e) => {
                this.Close();
            };
            var contentView = new FrameLayout() {
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Width = Application.GetRealWidth(343),
                Radius = (uint)Application.GetRealWidth(12),
            };
            bodyView.AddChidren(contentView);
            #region 标题区
            bool inEdit = false;//是否在编辑标题
            var titleView = new FrameLayout()
            {
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(52),
            };
            contentView.AddChidren(titleView);
            var btnTitle = new Button()
            {
                Height = Application.GetRealHeight(52),
                Gravity = Gravity.Center,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.MainColor,
                TextID = StringId.CombinedDimming,
                TextAlignment = TextAlignment.Center,
            };
            if (btnTitle.GetTextWidth() > Application.GetRealWidth(197))//247
            {
                btnTitle.Width = Application.GetRealWidth(197);
                btnTitle.IsMoreLines = true;
            }
            else
            {
                btnTitle.Width = btnTitle.GetTextWidth()+ Application.GetRealWidth(10);
                btnTitle.IsMoreLines = false;
            }
            titleView.AddChidren(btnTitle);
            var btnEditIcon = new Button()
            {
                Width = Application.GetRealWidth(24),
                Height = Application.GetRealWidth(24),
                X = Application.GetRealWidth(12) + btnTitle.Right,
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = "Public/Edit.png",
                SelectedImagePath = "Public/HookIcon.png"
            };
            titleView.AddChidren(btnEditIcon);
            EventHandler<MouseEventArgs> dd = (sender, e) =>
            {
                inEdit = !inEdit;
                btnEditIcon.IsSelected = inEdit;
                if (inEdit)
                {
                    btnTitle.Width = btnTitle.GetTextWidth();
                }
                else
                {
                    if (btnTitle.GetTextWidth() > Application.GetRealWidth(197))//247
                    {
                        btnTitle.Width = Application.GetRealWidth(197);
                    }
                    else
                    {
                        btnTitle.Width = btnTitle.GetTextWidth();
                    }
                    editScene.name = btnTitle.Text.Trim();
                }
            };
            btnTitle.MouseUpEventHandler = dd;
            btnEditIcon.MouseUpEventHandler = dd;
            titleView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor, Y = Application.GetRealHeight(51) });
            #endregion
            var dimmingLight = editScene.functions.Find((obj) => obj.localFunction.spk == SPK.LightDimming);
            var cctLight = editScene.functions.Find((obj) => obj.localFunction.spk == SPK.LightCCT);
            var rgbLight = editScene.functions.Find((obj) => obj.localFunction.spk == SPK.LightRGB);
            var brightnessValue = 0;
            var cctValue = 27;
            if (cctLight != null)
            {
                int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness).value, out brightnessValue);
                int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.CCT).value, out cctValue);
            }
            //属性设置区域
            var attrView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(52),
                Width = Application.GetRealWidth(343),
            };
            //属性设置区域高度
            int attrViewHight = Application.GetRealHeight(27 + 22);
            attrView.AddChidren(new Button() { Height = Application.GetRealHeight(27) });
            if (hadDimming)
            {
                attrViewHight += Application.GetRealHeight(54 + 11);
                var dimmingView = new FrameLayout();
                attrView.AddChidren(dimmingView);
                #region 亮度调节
                var btnBrightnessText = new Button()
                {
                    X = Application.GetRealWidth(35),
                    Y = Application.GetRealHeight(1),
                    Width = Application.GetRealWidth(224),
                    Height = Application.GetRealHeight(21),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    TextID = StringId.Brightness,
                    BackgroundColor = 0xFFFF0000
                };
                dimmingView.AddChidren(btnBrightnessText);
                var btnMinValuesText = new Button()
                {
                    X = Application.GetRealWidth(35),
                    Y = btnBrightnessText.Bottom,
                    Width = Application.GetRealWidth(30),
                    Height = Application.GetRealHeight(21),
                    Text = "0%",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                };
                dimmingView.AddChidren(btnMinValuesText);
                var dimmerBar = new DiyImageSeekBar()
                {
                    X = Application.GetRealWidth(35 + 22),
                    Y = Application.GetRealHeight(11),
                    Width = Application.GetRealWidth(210),
                    Height = Application.GetRealHeight(54),
                    SeekBarViewHeight = Application.GetRealHeight(8),
                    ThumbImagePath = "Public/ThumbImage.png",
                    ThumbImageHeight = Application.GetRealHeight(54),
                    ProgressTextColor = CSS_Color.FirstLevelTitleColor,
                    ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    ProgressBarColor = CSS_Color.AuxiliaryColor1,
                    MaxValue = 100,
                    Progress = brightnessValue,
                    SeekBarPadding = Application.GetRealWidth(20),
                };
                //dimmingView.AddChidren(dimmerBar);
                var btnMaxValuesText = new Button()
                {
                    X = dimmerBar.Right,
                    Y = btnBrightnessText.Bottom,
                    Width = Application.GetRealWidth(45),
                    Height = Application.GetRealHeight(21),
                    Text = "100%",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                };
                dimmingView.AddChidren(btnMaxValuesText);
                #endregion
            }
            attrView.Height = attrViewHight;
            contentView.AddChidren(attrView);
            contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight;
            contentView.Gravity = Gravity.Center;
            #region bottom View
            var bottomView = new FrameLayout()
            {
                Y = Application.GetRealHeight(52) + attrViewHight,
                Height = Application.GetRealHeight(44),
            };
            contentView.AddChidren(bottomView);
            var btnSave = new Button()
            {
                Width = Application.GetRealWidth(172),
                Height = Application.GetRealHeight(44),
                TextAlignment = TextAlignment.Center,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.TextualColor,
                TextID = StringId.Save,
            };
            bottomView.AddChidren(btnSave);
            var btnComplete = new Button()
            {
                X = Application.GetRealWidth(172),
                Width = Application.GetRealWidth(172),
                Height = Application.GetRealHeight(46),
                BackgroundColor = CSS_Color.MainColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.Complete
            };
            bottomView.AddChidren(btnComplete);
            //例:右下圆角 大小为50
            int mRectCornerID = HDLUtils.RectCornerBottomRight;
            btnComplete.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(12), mRectCornerID);
            bottomView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
            btnSave.MouseUpEventHandler = (sender, e) => {
                this.Close();
            };
            btnComplete.MouseUpEventHandler = (sender, e) => {
                this.Close();
            };
            #endregion
            this.Show();
            return;
            //只有调光器
            if (!hadDimming&&!hadCCT&&!hadRGB)
            {
                contentView.Height = Application.GetRealHeight(520);
                contentView.Width = Application.GetRealWidth(343);
                contentView.Gravity = Gravity.Center;
                contentView.Radius = (uint)Application.GetRealWidth(12);
                contentView.AddChidren(titleView);
            }
            else if (hadCCT && hadRGB)//
            {
                contentView.Height = Application.GetRealHeight(520);
                contentView.Width = Application.GetRealWidth(343);
                contentView.Gravity = Gravity.Center;
                contentView.Radius = (uint)Application.GetRealWidth(12);
                contentView.AddChidren(titleView);
                #region 亮度调节
                var btnBrightnessText = new Button()
                {
                    X = Application.GetRealWidth(35),
                    Y = Application.GetRealHeight(82),
                    Width = Application.GetRealWidth(224),
                    Height = Application.GetRealHeight(21),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    TextID = StringId.Brightness,
                };
                contentView.AddChidren(btnBrightnessText);
                var btnMinValuesText = new Button()
                {
                    X = Application.GetRealWidth(35),
                    Y = btnBrightnessText.Bottom,
                    Width = Application.GetRealWidth(30),
                    Height = Application.GetRealHeight(21),
                    Text = "0%",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                };
                contentView.AddChidren(btnMinValuesText);
                var dimmerBar = new DiyImageSeekBar()
                {
                    X = Application.GetRealWidth(35 + 22),
                    Y = Application.GetRealHeight(312),
                    Width = Application.GetRealWidth(210),
                    Height = Application.GetRealHeight(54),
                    SeekBarViewHeight = Application.GetRealHeight(8),
                    ThumbImagePath = "Public/ThumbImage.png",
                    ThumbImageHeight = Application.GetRealHeight(54),
                    ProgressTextColor = CSS_Color.FirstLevelTitleColor,
                    ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    ProgressBarColor = CSS_Color.AuxiliaryColor1 ,
                    MaxValue = 100,
                    Progress = brightnessValue,
                    SeekBarPadding = Application.GetRealWidth(20),
                };
                contentView.AddChidren(dimmerBar);
                var btnMaxValuesText = new Button()
                {
                    X = dimmerBar.Right,
                    Y = btnBrightnessText.Bottom,
                    Width = Application.GetRealWidth(45),
                    Height = Application.GetRealHeight(21),
                    Text = "100%",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                };
                contentView.AddChidren(btnMaxValuesText);
                #endregion
                #region 色温
                //色温
                var btnTempClolor = new Button();
                btnTempClolor.X = Application.GetRealWidth(35);
                btnTempClolor.Y = Application.GetRealHeight(159);
                btnTempClolor.Width = Application.GetRealWidth(224);
                btnTempClolor.Height = Application.GetRealHeight(21);
                btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
                btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor;
                btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
                btnTempClolor.TextID = StringId.ColorTemperature;
                contentView.AddChidren(btnTempClolor);
                //2700K
                var btnTempClolorMin = new Button();
                btnTempClolorMin.Y = btnTempClolor.Bottom + Application.GetRealHeight(9);
                btnTempClolorMin.Width = Application.GetRealWidth(54);
                btnTempClolorMin.Height = Application.GetRealHeight(21);
                btnTempClolorMin.Text = "2700K";
                btnTempClolorMin.TextAlignment = TextAlignment.CenterRight;
                btnTempClolorMin.TextColor = CSS_Color.PromptingColor1;
                btnTempClolorMin.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
                contentView.AddChidren(btnTempClolorMin);
                //滑动条的背景图片
                var btnColorTemplatrueBack = new Button();
                //需要减掉滑动条的左右间距
                btnColorTemplatrueBack.Width = Application.GetRealWidth(210 - 20 * 2);
                btnColorTemplatrueBack.Height = Application.GetRealHeight(8);
                btnColorTemplatrueBack.Gravity = Gravity.CenterHorizontal;
                btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png";
                contentView.AddChidren(btnColorTemplatrueBack);
                //滑动条控件
                var barColorTemplatrue = new CCTSeekBarControl();
                barColorTemplatrue.X = btnTempClolorMin.Right;
                barColorTemplatrue.Y = Application.GetRealHeight(340);
                barColorTemplatrue.MinValue = 27;
                barColorTemplatrue.MaxValue = 65;
                barColorTemplatrue.ProgressBarColor = 0x00000000;//全部透明
                barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000;
                barColorTemplatrue.SeekBarBackgroundColor = 0x00000000;
                contentView.AddChidren(barColorTemplatrue);
                barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2;
                //显示上方的Txt
                barColorTemplatrue.ShowCustomTextView(Application.GetRealWidth(50), CSS_FontSize.PromptFontSize_FirstLevel, CSS_Color.FirstLevelTitleColor);
                var cct = 27;
                int.TryParse(cctLight.status.Find((obj)=>obj.key == FunctionAttributeKey.CCT).value, out cct);
                barColorTemplatrue.Progress = cct;
                //设置初始值
                barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
                //变更背景图的Y轴坐标
                btnColorTemplatrueBack.Y = barColorTemplatrue.Y + (barColorTemplatrue.Height - btnColorTemplatrueBack.Height) / 2;
                //6500K
                var btnTempClolorMax = new Button();
                btnTempClolorMax.Y = btnTempClolorMin.Y;
                btnTempClolorMax.X = barColorTemplatrue.Right;
                btnTempClolorMax.Width = Application.GetRealWidth(54);
                btnTempClolorMax.Height = Application.GetRealHeight(21);
                btnTempClolorMax.Text = "6500K";
                btnTempClolorMax.TextAlignment = TextAlignment.CenterLeft;
                btnTempClolorMax.TextColor = CSS_Color.PromptingColor1;
                btnTempClolorMax.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
                contentView.AddChidren(btnTempClolorMax);
                #endregion
                #region RGB
                var btnCurColor = new Button()
                {
                    X = Application.GetRealWidth(24),
                    Y = Application.GetRealHeight(241),
                    Width = Application.GetMinRealAverage(24),
                    Height = Application.GetMinRealAverage(24),
                    Radius = (uint)Application.GetMinRealAverage(8),
                    BorderColor = CSS_Color.PromptingColor2,
                    BorderWidth = 1,
                    BackgroundColor = (uint)(0xFF000000 + new Light().GetRGBcolor(new Function(),rgbLight.status.Find((obj) => obj.key == FunctionAttributeKey.RGB).value))
                };
                contentView.AddChidren(btnCurColor);
                //色盘的桌布控件(限制那个白色滑动球使用)
                var framePickerBack = new FrameLayout();
                framePickerBack.Gravity = Gravity.CenterHorizontal;
                framePickerBack.Y = Application.GetRealHeight(249);
                framePickerBack.Width = Application.GetMinRealAverage(198);
                framePickerBack.Height = Application.GetMinRealAverage(198);
                contentView.AddChidren(framePickerBack);
                var colorPicker = new ColorPicker()
                {
                    ColorImagePath = "FunctionIcon/Light/ColorWheel.png",
                };
                framePickerBack.AddChidren(colorPicker);
                #endregion
            }
            else if (hadDimming && !hadCCT && !hadRGB)
            {
                contentView.Height = Application.GetRealHeight(211);
                contentView.Width = Application.GetRealWidth(343);
                contentView.Gravity = Gravity.Center;
                contentView.Radius = (uint)Application.GetRealWidth(12);
                contentView.AddChidren(titleView);
            }
        }
    }
}
HDL_ON/UI/UI2/UserPage.cs
@@ -132,6 +132,21 @@
#if __Android__
                //开启定位服务
                Shared.Application.StartGPSLocationService();
                if (DB_ResidenceData.Instance.NeedTip) {
                    DB_ResidenceData.Instance.LastTipTime = DateTime.Now;
                    if (CN.Jpush.Android.Api.JPushInterface.IsNotificationEnabled(Shared.Application.Activity) != 1)
                    {
                        Action action = () =>
                        {
                            CN.Jpush.Android.Api.JPushInterface.GoToAppNotificationSettings(Shared.Application.Activity);
                        };
                        Shared.Application.RunOnMainThread(() =>
                        {
                            new HDL_ON.UI.ConfirmDialog().ShowDialog(StringId.Tip, StringId.Android_MessagePushTip, action);
                        });
                    }
                }
#endif
            }
on_plus.keystore
Binary files differ
ys/Jars/app-release.aar
Binary files differ