From 1f5fdd892e8efc9f1babe1ace9d810803edef396 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 11:29:45 +0800
Subject: [PATCH] 2021-08-27 11:29:39
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs | 249 ++++++
HDL-ON_iOS/Resources/Phone/PersonalCenter/ResidenceInAlarmIcon.png | 0
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs | 8
HDL-ON_Android/Assets/Language.ini | 6
HDL-ON_iOS/HDL-ON_iOS.csproj | 15
HDL_ON/Common/ApiUtlis.cs | 51 +
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs | 152 ++-
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoBg.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | 8
HDL_ON/DAL/Mqtt/MqttClient.cs | 34
HDL_ON/HDL_ON.projitems | 6
HDL_ON/Entity/Function/Sensor.cs | 34
HDL-ON_Android/Assets/Phone/PersonalCenter/ResidenceInAlarmIcon.png | 0
HDL-ON_Android/HDL-ON_Android.csproj | 15
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 43
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 101 +-
HDL-ON_iOS/Info.plist | 4
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 46
HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 6
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorhcho.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 76 +
HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png | 0
HDL_ON/Entity/Function/AirSwitch.cs | 10
HDL_ON/UI/UI1-Login/LoginPage.cs | 13
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs | 448 ++++++++++
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/electricalbreaker.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 42
HDL_ON/Entity/DB_ResidenceData.cs | 4
HDL-ON_Android/Assets/Phone/Collection/DefenseAlarmIcon.png | 0
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs | 52
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorhcho.png | 0
HDL_ON/UI/UI0-Public/TopViewDiv.cs | 4
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs | 9
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoIcon.png | 0
HDL_ON/Entity/Function/Function.cs | 10
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/electricalbreaker.png | 0
HDL_ON/DAL/Server/HttpUtil.cs | 7
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 67
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs | 6
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs | 7
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs | 7
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 4
HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FailIcon.png | 0
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 6
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 32
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png | 0
HDL_ON/Entity/Function/SecurityAlarm.cs | 35
HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/TrueIcon.png | 0
HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/TrueIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs | 7
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs | 197 ++++
HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FailIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs | 9
HDL-ON_iOS/Resources/Language.ini | 2
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png | 0
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs | 14
.vs/HDL_APP_Project/xs/UserPrefs.xml | 46
HDL_ON/DAL/DriverLayer/Control.cs | 39
HDL_ON/UI/MainPage.cs | 11
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/CustomerObj.cs | 97 ++
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs | 8
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png | 0
HDL-ON_iOS/Resources/Phone/Collection/DefenseAlarmIcon.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png | 0
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs | 148 ++
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs | 6
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoBg.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs | 97 ++
HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png | 0
HDL_ON/DAL/Server/NewAPI.cs | 19
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png | 0
HDL_ON/Common/R.cs | 16
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png | 0
HDL_ON/DAL/Server/HttpServerRequest.cs | 47 +
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs | 7
HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png | 0
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs | 6
85 files changed, 1,975 insertions(+), 422 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 30143c6..b855c68 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,13 +1,6 @@
-锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
- <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs">
- <Files>
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" Line="88" Column="66" />
- <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
- <File FileName="HDL_ON/Common/ApiUtlis.cs" />
- <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" />
- </Files>
+锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
+ <MonoDevelop.Ide.Workbench>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
@@ -15,30 +8,31 @@
<Node name="HDL_ON" expanded="True">
<Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
- <Node name="DriverLayer" expanded="True" />
<Node name="Mqtt" expanded="True" />
<Node name="Server" expanded="True" />
- <Node name="ThirdPartySdk" expanded="True" />
</Node>
<Node name="Entity" expanded="True">
<Node name="Function" expanded="True" />
</Node>
<Node name="UI" expanded="True">
<Node name="UI2" expanded="True">
- <Node name="1-HomePage" expanded="True" />
- <Node name="3-Intelligence" expanded="True" />
+ <Node name="4-PersonalCenter" expanded="True">
+ <Node name="FaceManagement" expanded="True" />
+ </Node>
<Node name="FuntionControlView" expanded="True">
- <Node name="ArmCenter" expanded="True">
- <Node name="ArmCenterPage.cs" selected="True" />
- </Node>
+ <Node name="1ContorlPage" expanded="True" />
</Node>
</Node>
</Node>
</Node>
- <Node name="HDL-ON_iOS" expanded="True">
- <Node name="Resources" expanded="True" />
- </Node>
+ <Node name="HDL-ON_Android" selected="True" />
+ <Node name="HDL-ON_iOS" expanded="True" />
</Node>
+ </State>
+ </Pad>
+ <Pad Id="MonoDevelop.Debugger.WatchPad">
+ <State>
+ <Value>cus.customerFaceUrl</Value>
</State>
</Pad>
</Pads>
@@ -49,7 +43,7 @@
<String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
<String>Shared.IOS/Shared.IOS.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
<MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
@@ -57,11 +51,13 @@
<Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="431" column="1" />
<Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" line="747" column="1" />
<Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" line="106" column="1" />
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" line="348" column="1" />
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" line="54" column="1" />
<Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" line="168" column="1" />
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Common/ApiUtlis.cs" relfile="HDL_ON/Common/ApiUtlis.cs" line="391" column="1" />
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" line="91" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs" line="71" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" line="468" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="224" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="466" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="523" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" line="279" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 061811e..adaa84c 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -487,6 +487,7 @@
499=Add defense function
500=Add alarm target
501=Security alarm: {0} is triggered.
+502=Clear the security alarm?
1000=Room Humidity
@@ -992,9 +993,9 @@
7144=excellence
7145=Security
7146=Add security
-
7147=Arm
7148=Disarm
+
9000=Please sign in with new cell phone number.
@@ -1590,6 +1591,7 @@
499=娣诲姞甯冮槻鍔熻兘
500=娣诲姞鍛婅鐩爣
501=瀹夐槻鎶ヨ锛歿0}琚Е鍙戙��
+502=鏄惁瑙i櫎瀹夐槻璀︽姤锛�
1000=瀹ゅ唴婀垮害
1001=绔ラ攣
@@ -2077,9 +2079,9 @@
7144=浼樼
7145=瀹夐槻
7146=娣诲姞瀹夐槻
-
7147=甯冮槻
7148=鎾ら槻
+
9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL-ON_Android/Assets/Phone/Collection/DefenseAlarmIcon.png b/HDL-ON_Android/Assets/Phone/Collection/DefenseAlarmIcon.png
new file mode 100644
index 0000000..c3e0948
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Collection/DefenseAlarmIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png
new file mode 100644
index 0000000..248a434
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png
index 0555432..f40f82e 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png
new file mode 100644
index 0000000..1abcc1e
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png
new file mode 100644
index 0000000..61a12ec
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png
new file mode 100644
index 0000000..a2ad64d
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoBg.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoBg.png
new file mode 100644
index 0000000..77e184b
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoBg.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoIcon.png
new file mode 100644
index 0000000..df9281d
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HchoIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png
new file mode 100644
index 0000000..784f410
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png
new file mode 100644
index 0000000..300521d
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/electricalbreaker.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/electricalbreaker.png
new file mode 100644
index 0000000..3abfd8b
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/electricalbreaker.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorhcho.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorhcho.png
new file mode 100644
index 0000000..108f4e4
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorhcho.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FailIcon.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FailIcon.png
new file mode 100644
index 0000000..b169eb0
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/FailIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/TrueIcon.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/TrueIcon.png
new file mode 100644
index 0000000..9606411
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/FacePassage/TrueIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/ResidenceInAlarmIcon.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/ResidenceInAlarmIcon.png
new file mode 100644
index 0000000..ea9f614
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/ResidenceInAlarmIcon.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 6a3c810..25482e3 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -443,6 +443,20 @@
<AndroidAsset Include="Assets\Phone\Collection\DefenseStatusIcon.png" />
<AndroidAsset Include="Assets\Phone\Collection\DisarmStatusIcon.png" />
<AndroidAsset Include="Assets\Phone\PersonalCenter\ResidenceDefenseIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Collection\DefenseAlarmIcon.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\InAlarmBigIcon.png" />
+ <AndroidAsset Include="Assets\Phone\PersonalCenter\ResidenceInAlarmIcon.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalbreaker.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgIcon.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgOnIcon.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\EnergyIcon.png" />
+ <AndroidAsset Include="Assets\Phone\PersonalCenter\FacePassage\FailIcon.png" />
+ <AndroidAsset Include="Assets\Phone\PersonalCenter\FacePassage\TrueIcon.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorhcho.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\HchoBg.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\HchoIcon.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" />
@@ -1343,6 +1357,7 @@
<Folder Include="Assets\Phone\FunctionIcon\IrFan\" />
<Folder Include="Assets\Phone\PersonalCenter\FacePassage\" />
<Folder Include="Assets\Phone\FunctionIcon\Light\LightScene\" />
+ <Folder Include="Assets\Phone\FunctionIcon\Electrical\AirSwitch\" />
</ItemGroup>
<Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 4ed5671..a7e7038 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108211" android:versionName="1.2.202108211" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108271" android:versionName="1.2.202108271" package="com.hdl.onpro">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
<!--<uses-permission android:name="android.permission.INTERNET" />-->
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 8be2178..5d44789 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -459,6 +459,7 @@
<Folder Include="Assets.xcassets\device_bg.imageset\" />
<Folder Include="Resources\Phone\FunctionIcon\Light\LightScene\" />
<Folder Include="Resources\Phone\PersonalCenter\FacePassage\" />
+ <Folder Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1331,6 +1332,20 @@
<BundleResource Include="Resources\Phone\Collection\DefenseStatusIcon.png" />
<BundleResource Include="Resources\Phone\Collection\DisarmStatusIcon.png" />
<BundleResource Include="Resources\Phone\PersonalCenter\ResidenceDefenseIcon.png" />
+ <BundleResource Include="Resources\Phone\Collection\DefenseAlarmIcon.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\ArmCenter\InAlarmBigIcon.png" />
+ <BundleResource Include="Resources\Phone\PersonalCenter\ResidenceInAlarmIcon.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgIcon.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\AirSwitchBgOnIcon.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\EnergyIcon.png" />
+ <BundleResource Include="Resources\Phone\PersonalCenter\FacePassage\FailIcon.png" />
+ <BundleResource Include="Resources\Phone\PersonalCenter\FacePassage\TrueIcon.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\HchoBg.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\HchoIcon.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorhcho.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalbreaker.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 43ba8de..7876a64 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.2.202108211</string>
+ <string>1.2.202108271</string>
<key>CFBundleVersion</key>
- <string>1.2.08211</string>
+ <string>1.2.08271</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Use geographic location to provide services such as weather</string>
<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 79c733d..adaa84c 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -487,6 +487,7 @@
499=Add defense function
500=Add alarm target
501=Security alarm: {0} is triggered.
+502=Clear the security alarm?
1000=Room Humidity
@@ -1590,6 +1591,7 @@
499=娣诲姞甯冮槻鍔熻兘
500=娣诲姞鍛婅鐩爣
501=瀹夐槻鎶ヨ锛歿0}琚Е鍙戙��
+502=鏄惁瑙i櫎瀹夐槻璀︽姤锛�
1000=瀹ゅ唴婀垮害
1001=绔ラ攣
diff --git a/HDL-ON_iOS/Resources/Phone/Collection/DefenseAlarmIcon.png b/HDL-ON_iOS/Resources/Phone/Collection/DefenseAlarmIcon.png
new file mode 100644
index 0000000..c3e0948
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/Collection/DefenseAlarmIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png
new file mode 100644
index 0000000..248a434
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/InAlarmBigIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png
index 0555432..f40f82e 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmCenter/NoDefenseBigIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png
new file mode 100644
index 0000000..1abcc1e
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png
new file mode 100644
index 0000000..61a12ec
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png
new file mode 100644
index 0000000..a2ad64d
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/AirSwitch/EnergyIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoBg.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoBg.png
new file mode 100644
index 0000000..77e184b
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoBg.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoIcon.png
new file mode 100644
index 0000000..df9281d
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HchoIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png
new file mode 100644
index 0000000..784f410
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_blue.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png
new file mode 100644
index 0000000..300521d
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/electricalbreaker_white.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/electricalbreaker.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/electricalbreaker.png
new file mode 100644
index 0000000..3abfd8b
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/electricalbreaker.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorhcho.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorhcho.png
new file mode 100644
index 0000000..108f4e4
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorhcho.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FailIcon.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FailIcon.png
new file mode 100644
index 0000000..b169eb0
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/FailIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/TrueIcon.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/TrueIcon.png
new file mode 100644
index 0000000..9606411
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/FacePassage/TrueIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/ResidenceInAlarmIcon.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/ResidenceInAlarmIcon.png
new file mode 100644
index 0000000..ea9f614
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/ResidenceInAlarmIcon.png
Binary files differ
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 2c4449a..09695b6 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -204,7 +204,7 @@
{
endTime = DateTime.Now.AddSeconds(100);
MainPage.Log($"璇诲彇鍦烘櫙鏁版嵁鎴愬姛");
- var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString());
+ var sceneList = JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString());
if (sceneList == null)
{
sceneList = new List<Scene>();
@@ -275,12 +275,18 @@
{
UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
}
+ else if(video.interphoneType == InterphoneType.HDL.ToString())
+ {
+ DB_ResidenceData.Instance.SupportFacePass = true;
+ DB_ResidenceData.Instance.SaveResidenceData();
+ }
}
}
//======================瀹夐槻====================
GetSecurityList();
+ //======================SIP璐﹀彿====================
}
catch (Exception ex)
@@ -294,8 +300,11 @@
MainPage.Log($"缁撴潫璇诲彇浜戠鏁版嵁绾跨▼");
endTime = DateTime.MinValue;
DownloadDataComplete = true;
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
//涓嶈�冭檻缃戝叧鎯呭喌锛岀洿鎺ヨ闃�
DAL.Mqtt.MqttClient.InitState();
@@ -327,8 +336,11 @@
DownloadDataComplete = true;
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
//鍒濆鍖栨暟鎹�
//SpatialInfo.CurrentSpatial.Clear();
@@ -388,17 +400,38 @@
}
var infoListPack = Ins.httpRequest.GetSecurityInfo(sidList, new List<string>());
var infoList = JsonConvert.DeserializeObject<List<SecurityAlarm>>(infoListPack.Data.ToString());
- foreach (var function in infoList)
+ if (infoList != null)
{
- function.SaveFile();
- FunctionList.List.IniFunctionList(function.savePath, true);
+ var filePathList = FileUtlis.Files.ReadFiles().FindAll((obj) => obj.StartsWith("SecurityData_"));
+ if (filePathList != null)
+ {
+ foreach (var file in filePathList)
+ {
+ FileUtlis.Files.DeleteFile(file);
+ }
+ }
+ foreach (var function in infoList)
+ {
+ function.SaveFile();
+ FunctionList.List.IniFunctionList(function.savePath, true);
+ }
}
- }
+ }
else
{
MainPage.Log($"璇诲彇瀹夐槻鍒楄〃澶辫触:Code:{pack.Code}; Msg:{pack.message}");
}
}
+
+ /// <summary>
+ /// 鑾峰彇SIP璐﹀彿淇℃伅
+ /// </summary>
+ public void GetSipInfo()
+ {
+ var pack = Ins.HttpRequest.GetSecurityList();
+ }
+
+
}
}
\ No newline at end of file
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index e22b852..ac11d22 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -6,6 +6,22 @@
{
/// <summary>
+ /// 涓�绾у缓绛戞爣鍑�
+ /// </summary>
+ public const int Class_I_BuildingStandard = 505;
+ /// <summary>
+ /// 浜岀骇寤虹瓚鏍囧噯
+ /// </summary>
+ public const int SecondaryBuildingStandard = 506;
+ /// <summary>
+ /// 瓒呮爣
+ /// </summary>
+ public const int ExceedingTheStandard = 503;
+ /// <summary>
+ /// 鏄惁瑙i櫎瀹夐槻璀︽姤锛�
+ /// </summary>
+ public const int ClearTheSecurityAlarmTip = 502;
+ /// <summary>
/// 瀹夐槻鎶ヨ
/// </summary>
public const int SecurityAlarmTipString = 501;
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index e3d0166..ff0b043 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -467,6 +467,7 @@
var actionObjs = new List<ApiAlinkControlActionObj>();
actionObjs.Add(apiControlData);
var pack = httpServer.ControlDevice(actionObjs);
+ MainPage.Log($"杩滅▼鎺у埗鍙嶉:{pack.message}");
}
}
@@ -633,6 +634,7 @@
gatewayId = DB_ResidenceData.Instance.HomeGateway.gatewayId,
sid = securityAlarm.sid, status = state, userSecurityId = securityAlarm.userSecurityId
} });
+ MainPage.Log($"瀹夐槻鎺у埗缁撴灉:{result.Code}");
}
else
{
@@ -784,21 +786,31 @@
|| receiveObj.Topic == CommunicationTopic.ct.ReadSecurityStatus + "_reply"
|| receiveObj.Topic == CommunicationTopic.ct.SecurityStatusUp)
{
- var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(receiveObj.BodyDataString);
- if (temp != null)
+ try
{
- Control_Udp.ReceiveRepeatManager(temp.id, null);
- foreach (var updataSecurity in temp.objects)
- {
- var updataLocalSecurity = FunctionList.List.securities.Find((obj) => obj.sid == updataSecurity.sid);
- if (updataLocalSecurity != null)
+ MainPage.Log($"灞�鍩熺綉瀹夐槻淇℃伅: {receiveObj.Topic} : 鍐呭: {res[1]}");
+ var tt = "";
+ lock (tt) {
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(receiveObj.BodyDataString);
+ if (temp != null)
{
- updataLocalSecurity.status = updataSecurity.status;
- updataLocalSecurity.alarm = updataSecurity.alarm;
+ Control_Udp.ReceiveRepeatManager(temp.id, null);
+ foreach (var updataSecurity in temp.objects)
+ {
+ var updataLocalSecurity = FunctionList.List.securities.Find((obj) => obj.sid == updataSecurity.sid);
+ if (updataLocalSecurity != null)
+ {
+ updataLocalSecurity.status = updataSecurity.status;
+ updataLocalSecurity.alarm = updataSecurity.alarm;
+ ArmCenterPage.LoadEvent_RefreshSecurityStatus(updataLocalSecurity);
+ }
+ }
+ HomePage.LoadEvent_RefreshSecurityStatus();
}
}
- HomePage.LoadEvent_RefreshSecurityStatus();
- ArmCenterPage.LoadEvent_RefreshSecurityStatus();
+ }
+ catch (Exception ex){
+ MainPage.Log($"瀹夐槻灞�鍩熺綉寮傚父锛歿ex.Message}");
}
}
else
@@ -855,7 +867,7 @@
return;
}
}
- MainPage.Log($"A鍗忚鏇存柊鐘舵��:{revString}");
+ //MainPage.Log($"A鍗忚鏇存柊鐘舵��:{revString}");
foreach (var attr in updateTemp.status)
{
localFunction.time_stamp = temp.time_stamp;
@@ -866,6 +878,9 @@
Function localObj = null;
switch (localFunction.spk)
{
+ case SPK.AirSwitch:
+ AirSwitchPage.UpdataState(localFunction);
+ break;
case SPK.ElectricEnergy:
EnergyMainPage.UpdataStatus(localFunction);
break;
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 559725c..8757db9 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -448,25 +448,31 @@
{
if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey))
{
- var securityBytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey);
- var securityString = Encoding.UTF8.GetString(securityBytes);
- var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(securityString);
- MainPage.Log($"瀹夐槻鐘舵�佸彉鍖栵細{securityString}");
-
- if (temp != null)
+ try
{
- Control_Udp.ReceiveRepeatManager(temp.id, null);
- foreach (var updataSecurity in temp.objects)
+ var securityBytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey);
+ var securityString = Encoding.UTF8.GetString(securityBytes);
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(securityString);
+ MainPage.Log($"瀹夐槻鐘舵�佸彉鍖栵細{securityString}");
+
+ if (temp != null)
{
- var updataLocalSecurity = FunctionList.List.securities.Find((obj) => obj.sid == updataSecurity.sid);
- if (updataLocalSecurity != null)
+ Control_Udp.ReceiveRepeatManager(temp.id, null);
+ foreach (var updataSecurity in temp.objects)
{
- updataLocalSecurity.status = updataSecurity.status;
- updataLocalSecurity.alarm = updataSecurity.alarm;
+ var updataLocalSecurity = FunctionList.List.securities.Find((obj) => obj.sid == updataSecurity.sid);
+ if (updataLocalSecurity != null)
+ {
+ updataLocalSecurity.status = updataSecurity.status;
+ updataLocalSecurity.alarm = updataSecurity.alarm;
+ ArmCenterPage.LoadEvent_RefreshSecurityStatus(updataLocalSecurity);
+ }
}
+ HomePage.LoadEvent_RefreshSecurityStatus();
}
- HomePage.LoadEvent_RefreshSecurityStatus();
- ArmCenterPage.LoadEvent_RefreshSecurityStatus();
+ }catch(Exception ex)
+ {
+ MainPage.Log($"瀹夐槻杩滅▼淇℃伅寮傚父:{ex.Message}");
}
}
}
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index ceee580..e292c2a 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2375,6 +2375,7 @@
d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
d.Add("securitys", securityStates);
var requestJson = HttpUtil.GetSignRequestJson(d);
+ MainPage.Log($"api瀹夐槻鎺у埗锛歿requestJson}");
var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_StatusSet, requestJson);
return pack;
}
@@ -2633,5 +2634,51 @@
}
#endregion
+
+ /// <summary>
+ /// 浜鸿劯褰曞叆
+ /// </summary>
+ /// <param name="imageBytes"></param>
+ /// <returns></returns>
+ public ResponsePackNew FaceSetting(string imageBytes)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("userFace", @"data:image/jpg;base64,"+imageBytes);
+
+ //MainPage.Log(imageBytes);
+
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_InputUserFace, requestJson);
+ }
+
+
+ /// <summary>
+ /// 淇敼浣忔埛浜鸿劯鍏抽棴鐘舵��
+ /// 1锛氬紑鍚姸鎬� 2锛氬叧闂姸鎬�
+ /// 3:娓呴櫎浜鸿劯鏁版嵁
+ /// </summary>
+ public ResponsePackNew EditFaceFunction(int status)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("faceClose", status);
+
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SwitchFaceFunction, requestJson);
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇浣忔埛璇︽儏
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew GetCustomerInfo()
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id);
+
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetCustomerInfo, requestJson);
+ }
}
}
\ No newline at end of file
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 0dec30c..67c665d 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -16,10 +16,9 @@
/// <summary>
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
- ///
/// </summary>
- //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+ public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
/// <summary>
/// RegionMark
/// </summary>
@@ -651,7 +650,7 @@
/// <summary>
/// 鍝嶅簲閿欒淇℃伅
/// </summary>
- public string message;
+ public string message = "";
/// <summary>
/// 杩欎釜鏄姹傞敊璇椂鐨勬墿灞曟暟鎹�,浠ュ悗鎵�鏈夌殑闄勫甫鎵╁睍鏁版嵁閮戒細鏀惧湪杩欓噷闈㈠姩鎬佺淮鎶�
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 21fadf4..239a09f 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -661,6 +661,20 @@
/// 鑾峰彇閫氳瘽璁板綍
/// </summary>
public const string API_POST_FL_GetCallList = "/home-wisdom/platform/imou/listCallRecords";
+
+ public const string Api_Post_GetSipInfo = "";
+ /// <summary>
+ /// 浜鸿劯褰曞叆
+ /// </summary>
+ public const string Api_Post_InputUserFace = "/community-wisdom/app/doorDevice/inputUserFace";
+ /// <summary>
+ /// 寮�鍏充汉鑴稿姛鑳�
+ /// </summary>
+ public const string Api_Post_SwitchFaceFunction = "/community-wisdom/app/doorDevice/updateCustomerFaceClose";
+ /// <summary>
+ /// 鑾峰彇浣忔埛璇︽儏
+ /// </summary>
+ public const string Api_Post_GetCustomerInfo = "/basis-footstone/app/customer/detail";
#endregion
@@ -688,6 +702,11 @@
public const string API_POST_DoorHistory = "/home-wisdom/app/device/door/logs";
#endregion
+
+ #region 鈻� -- SIP鐩稿叧鎺ュ彛_______________________________
+ #endregion
+
+
}
///// <summary>
diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index 9a25874..5af4be8 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -784,6 +784,10 @@
/// 钀ょ煶鐚溂鍛煎彨
/// </summary>
EZVIZ,
+ /// <summary>
+ ///
+ /// </summary>
+ HDL,
}
diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index 0f6ca28..712bbb5 100644
--- a/HDL_ON/Entity/DB_ResidenceData.cs
+++ b/HDL_ON/Entity/DB_ResidenceData.cs
@@ -155,6 +155,10 @@
HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear();
DAL.Mqtt.MqttClient.DisConnectRemote("閫�鍑虹櫥褰曪紝鎴栬�呭垏鎹綇瀹�");
}
+ /// <summary>
+ /// 鏄惁鏀寔浜鸿劯閫氳
+ /// </summary>
+ public bool SupportFacePass = false;
/// <summary>
/// 缃戝叧璇︾粏淇℃伅
diff --git a/HDL_ON/Entity/Function/AirSwitch.cs b/HDL_ON/Entity/Function/AirSwitch.cs
new file mode 100644
index 0000000..2276f82
--- /dev/null
+++ b/HDL_ON/Entity/Function/AirSwitch.cs
@@ -0,0 +1,10 @@
+锘縰sing System;
+namespace HDL_ON.Entity
+{
+ public class AirSwitch
+ {
+ public AirSwitch()
+ {
+ }
+ }
+}
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 9205440..1d2e85d 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1274,6 +1274,10 @@
/// 闈掕悕鐜浼犳劅鍣�
/// </summary>
public const string SensorEnvironment3 = "sensor.environment3";
+ /// <summary>
+ /// 鐢查啗
+ /// </summary>
+ public const string SensorHcho = "sensor.hcho";
/// <summary>
/// 鐜浼犳劅鍣╯pk鍒楄〃
@@ -1290,6 +1294,7 @@
spkList.Add(SensorEnvironment);
spkList.Add(SensorEnvironment2);
spkList.Add(SensorEnvironment3);
+ spkList.Add(SensorHcho);
return spkList;
}
@@ -1362,6 +1367,10 @@
/// 绾㈠椋庢墖
/// </summary>
public const string FanIr = "ir.fan";
+ /// <summary>
+ /// 鏅鸿兘绌哄紑
+ /// </summary>
+ public const string AirSwitch = "electrical.breaker";
#region 娑傞甫
/// <summary>
@@ -1404,6 +1413,7 @@
spkList.Add(ElectricTuyaFan);
spkList.Add(ElectricTuyaWeepRobot);
spkList.Add(ElectricTuyaWaterValve);
+ spkList.Add(AirSwitch);
return spkList;
}
diff --git a/HDL_ON/Entity/Function/SecurityAlarm.cs b/HDL_ON/Entity/Function/SecurityAlarm.cs
index 1ebe9f8..902b12c 100644
--- a/HDL_ON/Entity/Function/SecurityAlarm.cs
+++ b/HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -7,17 +7,17 @@
namespace HDL_ON.Entity
{
- public class SecurityCenter
+ public class SecurityCenter111111
{
- static SecurityCenter _securityCenter;
+ static SecurityCenter111111 _securityCenter;
- public static SecurityCenter Ins
+ public static SecurityCenter111111 Ins
{
get
{
if (_securityCenter == null)
{
- _securityCenter = new SecurityCenter();
+ _securityCenter = new SecurityCenter111111();
}
return _securityCenter;
}
@@ -30,14 +30,11 @@
{
get
{
- foreach (var temp in FunctionList.List.securities)
+ lock (FunctionList.List.securities)
{
- if (temp.status == "enable")
- {
- return true;
- }
+ var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable");
+ return temp == null ? false : true;
}
- return false;
}
}
@@ -48,14 +45,11 @@
{
get
{
- foreach (var temp in FunctionList.List.securities)
+ lock (FunctionList.List.securities)
{
- if (temp.alarm)
- {
- return true;
- }
+ var temp = FunctionList.List.securities.Find((obj) => obj.alarm == true);
+ return temp == null ? false : true;
}
- return false;
}
}
@@ -69,13 +63,10 @@
{
if (_inDefenseMode == null)
{
- foreach (var temp in FunctionList.List.securities)
+ lock (FunctionList.List.securities)
{
- if (temp.status == "enable")
- {
- _inDefenseMode = temp;
- return _inDefenseMode;
- }
+ var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable");
+ return temp;
}
}
return _inDefenseMode;
diff --git a/HDL_ON/Entity/Function/Sensor.cs b/HDL_ON/Entity/Function/Sensor.cs
index 585a617..94290cc 100644
--- a/HDL_ON/Entity/Function/Sensor.cs
+++ b/HDL_ON/Entity/Function/Sensor.cs
@@ -91,6 +91,12 @@
_intervalValue.Add("71 ~ 40");
_intervalValue.Add("0 ~ 39");
break;
+ case SPK.SensorHcho:
+ _intervalValue.Add("~ 0.08");
+ _intervalValue.Add("0.08 ~ 0.1");
+ _intervalValue.Add("0.1 ~ ");
+ break;
+
}
return _intervalValue;
}
@@ -136,6 +142,16 @@
_levelColorList.Add(0xFFADE764);
_levelColorList.Add(0xFFFF3D3D);
break;
+ case SPK.SensorHcho:
+ _levelColorList.Add(0xFF2172FF);
+ _levelColorList.Add(0xFFADE764);
+ _levelColorList.Add(0xFFFF3D3D);
+ break;
+ default:
+ _levelColorList.Add(0x00000000);
+ _levelColorList.Add(0x00000000);
+ _levelColorList.Add(0x00000000);
+ break;
}
return _levelColorList;
@@ -180,6 +196,16 @@
_levelTextList.Add(StringId.SensorReferenceHumidityTipLevel1);
_levelTextList.Add(StringId.SensorReferenceHumidityTipLevel2);
_levelTextList.Add(StringId.SensorReferenceHumidityTipLevel3);
+ break;
+ case SPK.SensorHcho:
+ _levelTextList.Add(StringId.Class_I_BuildingStandard);
+ _levelTextList.Add(StringId.SecondaryBuildingStandard);
+ _levelTextList.Add(StringId.ExceedingTheStandard);
+ break;
+ default:
+ _levelTextList.Add(99999999);
+ _levelTextList.Add(99999999);
+ _levelTextList.Add(99999999);
break;
}
return _levelTextList;
@@ -248,6 +274,14 @@
else if (values < 40)
level = 3;
break;
+ case SPK.SensorHcho:
+ if (values <= 0.08)
+ level = 1;
+ else if (values <= 0.1)
+ level = 2;
+ else
+ level = 3;
+ break;
}
return level;
}
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 163b1fa..4cec7f4 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -476,6 +476,12 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\AddInputPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\AddOutputPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\AddOutputSettingPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\FaceSettingPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Security.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\AirSwitchPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\AirSwitch.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\FaceSettingResultPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\CustomerObj.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 2061e25..2acb28e 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.2.0821";
+ public static string VersionString = "1.2.0827";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
@@ -116,6 +116,8 @@
{
SPK.EnergyStandard,
SPK.MusicStandard,
+ SPK.AirSwitch,
+ SPK.ElectricEnergy,
};
@@ -328,8 +330,11 @@
///绛夊緟鑾峰彇浣忓畢淇℃伅
Application.RunOnMainThread( () =>
{
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
//璺宠浆椤甸潰----
UserBasePage = new UserPage();
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index ffff590..33dacc8 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -513,7 +513,11 @@
if (showedTime.AddSeconds(30) > DateTime.Now)
{
thread.Abort();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
}
};
thread.Start();
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index c0df69b..b91669f 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -20,6 +20,12 @@
//璺宠浆鍒板姛鑳戒俊鎭缃〉闈�
switch (function.spk)
{
+ case SPK.AirSwitch:
+ var airSwitchPage = new AirSwitchPage(function);
+ MainPage.BasePageView.AddChidren(airSwitchPage);
+ airSwitchPage.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ break;
case SPK.LightSwitch:
var relayView = new RelayPage(function);
MainPage.BasePageView.AddChidren(relayView);
diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index d7f18f7..1de2e9b 100644
--- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs
+++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -162,7 +162,7 @@
/// </summary>
/// <param name="frame"></param>
/// <param name="tilte"></param>
- public void LoadTopView_FunctionTop(Function function, Action action)
+ public void LoadTopView_FunctionTop(Function function, Action action,bool locationSet = true)
{
backAction = action;
@@ -186,7 +186,7 @@
{
var infoView = new FunctionBaseInfoSetPage(function, action);
MainPage.BasePageView.AddChidren(infoView);
- infoView.LoadPage();
+ infoView.LoadPage(locationSet);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
}
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index e16d57b..def2395 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -209,11 +209,10 @@
//etAccount.Text = "1033326940@qq.com";
//etAccount.Text = "18022428438";//wjc
//etAccount.Text = "13602944661";//kx
- //etAccount.Text = "13226233133";//璞嗚眴
- //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// ""//cf;;
+ etAccount.Text = "13226233133";//璞嗚眴
+ etAccount.Text = "18316672920";
//etAccount.Text = "18316120654";//tujie
- // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
- etAccount.Text = "15626203746";
+ //etAccount.Text = "15626203746";
//etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
}
else
@@ -232,12 +231,14 @@
//etAccount.Text = "15971583093";//楂樿儨
//etAccount.Text = "15217626103";//鏄嗘槑閲戣寕椤圭洰
//etAccount.Text = "18598273624";
+ etAccount.Text = "fslcjm5@163.com";
+ etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
}
b = !b;
etPassword.Text = "123456";
- if(etAccount.Text == "15626203746")
+ if(etAccount.Text == "fslcjm5@163.com")
{
- etPassword.Text = "123456";
+ etPassword.Text = "a123456";
}
//etPassword.Text = "Hdl85521566";
btnLogin.IsSelected = true;
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 9b24d88..51e02a0 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -537,27 +537,39 @@
#if DEBUG
+
+
//FunctionList.List.Functions.Add(new Function()
//{
- // spk = SPK.AirFreshStandard,
- // name = "娴嬭瘯鏂伴",
+ // spk = SPK.AirSwitch,
+ // name = "鏅鸿兘绌哄紑",
// attributes = new List<FunctionAttributes>()
// {
// new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
- // new FunctionAttributes(){ key = "fan",curValue= "on",state = "on" ,value = new List<string>(){ "high","low" } },
// },
//});
FunctionList.List.Functions.Add(new Function()
{
- spk = SPK.SensorGas,
- name = "鐕冩皵浼犳劅鍣�",
+ spk = SPK.AirFreshStandard,
+ name = "娴嬭瘯鏂伴",
attributes = new List<FunctionAttributes>()
{
- new FunctionAttributes(){ key = "enable",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
- new FunctionAttributes(){ key = "status",curValue= "normal",state = "normal" ,value = new List<string>(){ "alarm", "normal" } },
+ new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
+ new FunctionAttributes(){ key = "fan",curValue= "low",state = "low" ,value = new List<string>(){ "high", "medium", "low" } },
},
});
+
+ //FunctionList.List.Functions.Add(new Function()
+ //{
+ // spk = SPK.SensorGas,
+ // name = "鐕冩皵浼犳劅鍣�",
+ // attributes = new List<FunctionAttributes>()
+ // {
+ // new FunctionAttributes(){ key = "enable",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
+ // new FunctionAttributes(){ key = "status",curValue= "normal",state = "normal" ,value = new List<string>(){ "alarm", "normal" } },
+ // },
+ //});
//FunctionList.List.Functions.Add(new Function() { spk = SPK.PjtIr, name = "娴嬭瘯鎶曞奖浠�",
// attributes = new List<FunctionAttributes>() {
@@ -683,7 +695,11 @@
GetUnreadPushMessages();
RegisterGetPushMessageAction();
- waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
catch (Exception ex) {
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 4a678e3..52ba900 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -30,21 +30,38 @@
/// </summary>
public static void LoadEvent_RefreshSecurityStatus()
{
- Application.RunOnMainThread(() =>
+ try
{
- if (bodyView != null)
+ Application.RunOnMainThread(() =>
{
- //foreach(var temp in FunctionList.List.securities)
- //{
- // if(temp.status == "enable")
- // {
- // bodyView.btnSecurityStatus.IsSelected = true;
- // return;
- // }
- //}
- bodyView.btnSecurityStatus.IsSelected = SecurityCenter.Ins.InDefense;
- }
- });
+ if (bodyView != null)
+ {
+ lock (FunctionList.List.securities)
+ {
+ foreach (var temp in FunctionList.List.securities)
+ {
+ if (temp.status == "enable")
+ {
+ if (temp.alarm)
+ {
+ bodyView.btnSecurityStatus.SelectedImagePath = "Collection/DefenseAlarmIcon.png";
+ }
+ else
+ {
+ bodyView.btnSecurityStatus.SelectedImagePath = "Collection/DefenseStatusIcon.png";
+ }
+ bodyView.btnSecurityStatus.IsSelected = true;
+ return;
+ }
+ }
+ }
+ }
+ });
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"瀹夐槻涓婚〉鏇存柊寮傚父锛歿ex.Message}");
+ }
}
/// <summary>
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
index 7012fba..bf04c98 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -442,8 +442,11 @@
{
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -488,8 +491,11 @@
{
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 663d170..91a1d58 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -373,7 +373,7 @@
btnZone = new Button()
{
X = Application.GetRealWidth(12),
- Y = btnName.Bottom,
+ Y = Application.GetRealWidth(68+24),
Height = Application.GetRealWidth(18),
Width = Application.GetRealWidth(113),
TextColor = CSS_Color.MainBackgroundColor,
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
index 0d1da43..d60cf22 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
@@ -177,7 +177,14 @@
}
finally
{
- Application.RunOnMainThread(() => { waitPage.Hide(); });
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
}
})
{ IsBackground = true }.Start();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
index 69f180e..f56f371 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
@@ -159,7 +159,13 @@
}
finally
{
- Application.RunOnMainThread(() => { waitPage.Hide(); });
+ Application.RunOnMainThread(() => {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
}
})
{ IsBackground = true }.Start();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
index 8f56b86..b49af1a 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -70,7 +70,14 @@
}
finally
{
- Application.RunOnMainThread(() => { waitPage.Hide(); });
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
}
})
{ IsBackground = true }.Start();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index b73791d..470121b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -91,7 +91,13 @@
}
finally
{
- Application.RunOnMainThread(() => { waitPage.Hide(); });
+ Application.RunOnMainThread(() => {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
}
})
{ IsBackground = true }.Start();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/CustomerObj.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/CustomerObj.cs
new file mode 100644
index 0000000..fc7d818
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/CustomerObj.cs
@@ -0,0 +1,97 @@
+锘縰sing System;
+namespace HDL_ON.Entity
+{
+ public class CustomerObj
+ {
+ public CustomerObj()
+ {
+ }
+
+ /// <summary>
+ /// 浣忔埛id
+ /// </summary>
+ public string customerId;
+ /// <summary>
+ /// 浣忔埛鍚嶇О
+ /// </summary>
+ public string customerName;
+ /// <summary>
+ /// 浣忔埛绫诲瀷
+ /// </summary>
+ public int customerType;
+ /// <summary>
+ /// 浣忔埛绫诲瀷涓枃
+ /// </summary>
+ public string customerTypeText;
+ /// <summary>
+ /// 鑻戞湡鍖虹紪鍙�
+ /// </summary>
+ public string groupCode;
+ /// <summary>
+ /// 妤煎耿缂栧彿
+ /// </summary>
+ public string buildingCode;
+ /// <summary>
+ /// 鍗曞厓缂栧彿
+ /// </summary>
+ public string unitCode;
+ /// <summary>
+ /// 妤煎眰鍙�
+ /// </summary>
+ public string floorNum;
+ /// <summary>
+ /// 鎴垮眿缂栧彿
+ /// </summary>
+ public string houseCode;
+ /// <summary>
+ /// 鎴垮眿鍚嶇О
+ /// </summary>
+ public string houseName;
+ /// <summary>
+ /// 浣忔埛鎵嬫満鍙�
+ /// </summary>
+ public string customerPhone;
+ /// <summary>
+ /// 浣忔埛鍒嗘満鍙�
+ /// </summary>
+ public string customerPhoneProfix;
+ /// <summary>
+ /// 浣忔埛鎬у埆
+ /// </summary>
+ public string customerSex;
+ /// <summary>
+ /// 浣忔埛鎬у埆涓枃
+ /// </summary>
+ public string customerSexText;
+ /// <summary>
+ /// 浣忔埛璇佷欢鍙�
+ /// </summary>
+ public string certificateNo;
+ /// <summary>
+ /// 浣忔埛浜鸿劯url
+ /// </summary>
+ public string customerFaceUrl;
+ /// <summary>
+ /// 浣忔埛鍦板潃
+ /// </summary>
+ public string address;
+ /// <summary>
+ /// 浜鸿劯鐘舵��
+ /// 1锛氬綍鍏ョ姸鎬�
+ /// 2锛氫笅鍙戞垚鍔�
+ /// 3锛氫笅鍙戝け璐�
+ /// </summary>
+ public int faceStatus = 0;
+ /// <summary>
+ /// 浜鸿劯鐘舵��
+ /// 1锛氬紑鍚姸鎬�
+ /// 2锛氬叧闂姸鎬�
+ /// 3锛氭竻闄や汉鑴告暟鎹�
+ /// </summary>
+ public int faceClose = 0;
+
+
+
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
index 3285aae..352277a 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -1,4 +1,7 @@
锘縰sing System;
+using System.Threading;
+using HDL_ON.DAL.Server;
+using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
@@ -7,10 +10,44 @@
public class FacePassagePage : FrameLayout
{
FrameLayout bodyView;
+
+ FrameLayout contentView;
+ Button btnCommunityAccessControlIcon;
+
+ Button btnSetFaceId;
+
+ Button btnEraseData;
+
+ #region 鍥炬爣閫夋嫨閮ㄥ垎鍥炬爣
/// <summary>
- /// 闈㈠id
+ /// 鑳屾櫙鍥鹃�夐」鍖哄煙
/// </summary>
- string faceid = "";
+ FrameLayout pictureOptionView;
+ /// <summary>
+ /// 鑳屾櫙鍥鹃�夐」閫夋嫨鍖哄煙
+ /// </summary>
+ VerticalScrolViewLayout optionView;
+ /// <summary>
+ /// 鎷嶇収鎸夐挳
+ /// </summary>
+ Button btnTakePicture;
+ /// <summary>
+ /// 鐩稿唽鎸夐挳
+ /// </summary>
+ Button btnAlbum;
+ /// <summary>
+ /// 鍙栨秷鎸夐挳
+ /// </summary>
+ Button btnCancel;
+ #endregion
+
+
+
+
+ /// <summary>
+ /// 浣忔埛璇︽儏
+ /// </summary>
+ CustomerObj customerObj = new CustomerObj();
public FacePassagePage()
{
@@ -23,7 +60,7 @@
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
- var contentView = new FrameLayout()
+ contentView = new FrameLayout()
{
Y = Application.GetRealHeight(64),
Height = Application.GetRealHeight(667-64),
@@ -82,7 +119,7 @@
communityRow.AddChidren(btnCommunityTitle);
- var btnCommunityAccessControlIcon = new Button()
+ btnCommunityAccessControlIcon = new Button()
{
X = Application.GetRealWidth(314),
Gravity = Gravity.CenterVertical,
@@ -93,7 +130,20 @@
};
communityRow.AddChidren(btnCommunityAccessControlIcon);
+ btnCommunityAccessControlIcon.MouseUpEventHandler = (sender, e) => {
+ if(customerObj.faceClose == 3)//娌℃湁浜鸿劯鏁版嵁涓嶈兘寮�鍚汉鑴搁�氳鍔熻兘
+ {
+ return;
+ }
+ btnCommunityAccessControlIcon.IsSelected = !btnCommunityAccessControlIcon.IsSelected;
+ int switchStatus = btnCommunityAccessControlIcon.IsSelected == true ? 1 :2;
+ //澶辫触鍥炶皟
+ Action action = () => {
+ btnCommunityAccessControlIcon.IsSelected = !btnCommunityAccessControlIcon.IsSelected;
+ };
+ editFaceInfo(switchStatus,action);
+ };
#endregion
@@ -110,7 +160,7 @@
contentView.AddChidren(btnTip);
- var btnSetFaceId = new Button()
+ btnSetFaceId = new Button()
{
Y = Application.GetRealHeight(539),
Gravity = Gravity.CenterHorizontal,
@@ -125,32 +175,378 @@
IsBold = true,
};
contentView.AddChidren(btnSetFaceId);
+ btnSetFaceId.MouseUpEventHandler = (sender, e) => {
+ LoadPictureOptionView();
+ };
- if (string.IsNullOrEmpty(faceid))
+ btnEraseData = new Button()
{
- }
- else
- {
- btnSetFaceId.TextID = StringId.ResetFace;
-
- var btnEraseData = new Button()
- {
- Y = Application.GetRealHeight(481),
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(220),
- Height = Application.GetRealWidth(44),
- Radius = (uint)Application.GetRealWidth(22),
- BackgroundColor = CSS_Color.WarningColor,
- TextID = StringId.EraseData,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextColor = CSS_Color.MainBackgroundColor,
- TextAlignment = TextAlignment.Center,
- IsBold = true,
+ Y = Application.GetRealHeight(481),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BackgroundColor = CSS_Color.WarningColor,
+ TextID = StringId.EraseData,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextAlignment = TextAlignment.Center,
+ IsBold = true,
+ };
+ btnEraseData.MouseUpEventHandler = (sender,e) => {
+ Action action = () => {
+ initButtonStatus();
};
- contentView.AddChidren(btnEraseData);
- }
+ editFaceInfo(3,action);
+ };
+ ReadFaceInfo();
+ }
+
+ /// <summary>
+ /// 鑾峰彇浜鸿劯淇℃伅
+ /// </summary>
+ void ReadFaceInfo()
+ {
+ var waitPage = new Loading();
+ waitPage.Start();
+ new Thread(() =>
+ {
+ try
+ {
+ var hsr = new HttpServerRequest();
+ var pack = hsr.GetCustomerInfo();
+ if (pack != null)
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ var cus = Newtonsoft.Json.JsonConvert.DeserializeObject<CustomerObj>(pack.Data.ToString());
+ if (cus != null)
+ {
+ customerObj = cus;
+ Application.RunOnMainThread(() =>
+ {
+ initButtonStatus();
+ });
+ }
+
+ }
+ }
+ }catch(Exception ex)
+ {
+ MainPage.Log($"璇诲彇浜鸿劯淇℃伅寮傚父:{ex.Message}");
+ }
+ finally
+ {
+ Application.RunOnMainThread(() => {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ /// <summary>
+ /// 娓呴櫎浜鸿劯鏁版嵁
+ /// </summary>
+ void editFaceInfo(int status,Action action)
+ {
+ var waitPage = new Loading();
+ waitPage.Start();
+ new Thread(() =>
+ {
+ try
+ {
+ var hsr = new HttpServerRequest();
+ var pack = hsr.EditFaceFunction(status);
+ if (pack != null)
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ customerObj.faceClose = status;
+ }
+ else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ });
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"娓呴櫎浜鸿劯淇℃伅寮傚父:{ex.Message}");
+ }
+ finally
+ {
+ Application.RunOnMainThread(() => {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ action?.Invoke();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栧簳閮ㄦ寜閽�
+ /// </summary>
+ void initButtonStatus()
+ {
+ if (customerObj.faceClose == 1 || customerObj.faceClose == 2)//浜鸿劯鏁版嵁宸茬粡瀛樺湪1:浜鸿劯閫氳寮�鍚紱2锛氬叧闂�
+ {
+ if (customerObj.faceStatus == 2)//浜鸿劯鏁版嵁涓嬪彂闂ㄥ彛鏈烘垚鍔�
+ {
+ btnCommunityAccessControlIcon.IsSelected = customerObj.faceClose == 1;//浜鸿劯閫氳鍔熻兘鏄惁寮�鍚�
+ contentView.AddChidren(btnEraseData);
+ btnSetFaceId.TextID = StringId.ResetFace;
+ return;
+ }
+ }
+ btnCommunityAccessControlIcon.IsSelected = false;
+ btnEraseData.RemoveFromParent();
+ btnSetFaceId.TextID = StringId.SetFace;
+ }
+
+
+
+
+ /// <summary>
+ /// 鍔犺浇鍥炬爣閫夋嫨閫夐」
+ /// </summary>
+ void LoadPictureOptionView()
+ {
+ var pView = new FrameLayout()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+ bodyView.AddChidren(pView);
+
+ pictureOptionView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(445+50),
+ Height = Application.GetRealHeight(250),
+ AnimateSpeed = 0.3f,
+ Animate = Animate.DownToUp,
+ };
+ pView.AddChidren(pictureOptionView);
+
+ optionView = new VerticalScrolViewLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(100),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ };
+ pictureOptionView.AddChidren(optionView);
+
+ btnTakePicture = new Button()
+ {
+ Height = Application.GetRealHeight(50),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.TakePicture,
+ };
+ optionView.AddChidren(btnTakePicture);
+
+ optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+ btnAlbum = new Button()
+ {
+ Height = Application.GetRealHeight(50),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.Album,
+ };
+ optionView.AddChidren(btnAlbum);
+
+ optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+ btnCancel = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(8) + optionView.Bottom,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ TextID = StringId.Cancel,
+ TextColor = CSS_Color.WarningColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ };
+ pictureOptionView.AddChidren(btnCancel);
+
+
+ LoadEvent_PictureOptionViewEventList(pView);
+ }
+
+ /// <summary>
+ /// 鍔犺浇鑳屾櫙鍥鹃�夋嫨鍖哄煙浜嬩欢鍒楄〃
+ /// </summary>
+ void LoadEvent_PictureOptionViewEventList(FrameLayout pView)
+ {
+ pictureOptionView.MouseUpEventHandler = (sender, e) =>
+ {
+ pictureOptionView.Parent.RemoveFromParent();
+ };
+ pView.MouseUpEventHandler = (sender, e) =>
+ {
+ pictureOptionView.Parent.RemoveFromParent();
+ };
+
+ btnCancel.MouseUpEventHandler = (sender, e) =>
+ {
+ pictureOptionView.Parent.RemoveFromParent();
+ };
+ btnTakePicture.MouseDownEventHandler = (sender, e) => {
+ btnTakePicture.IsSelected = true;
+ };
+ btnTakePicture.MouseUpEventHandler = (sender, e) =>
+ {
+ btnTakePicture.IsSelected = false;
+ var imageName = Guid.NewGuid().ToString();
+ CropImage.TakePicture((imagePath) =>
+ {
+ CropImageCallBack(imagePath,1,imageName);
+ }, imageName, 4, 6, 1000);
+
+ pictureOptionView.Parent.RemoveFromParent();
+ };
+ btnAlbum.MouseDownEventHandler = (sender, e) => {
+ btnAlbum.IsSelected = true;
+ };
+
+ btnAlbum.MouseUpEventHandler = (sender, e) =>
+ {
+ btnAlbum.IsSelected = false;
+ //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀
+ var imageName = Guid.NewGuid().ToString();
+ //var imageName = scene.sid;
+ CropImage.SelectPicture((imagePath) =>
+ {
+ CropImageCallBack(imagePath,2,imageName);
+ }, imageName, 4, 6,1000);
+
+ pictureOptionView.Parent.RemoveFromParent();
+ };
}
+
+
+
+
+ /// <summary>
+ /// 瑁佸壀瀹岀収鐗囧洖璋冿紝缁熶竴澶勭悊
+ /// </summary>
+ /// <param name="imagePath">瑁佸壀鍚庣殑鐪熷疄璺緞</param>
+ /// <param name="imageSource">鐓х墖鏉ユ簮锛�1锛氭媿鐓э紱2锛氬浘搴�</param>
+ void CropImageCallBack(string selectImagePath,int imageSource,string imageName)
+ {
+ if (string.IsNullOrEmpty(selectImagePath) == true)
+ {
+ return;
+ }
+ //涓婁紶鎴愬姛鍒板洖璋�
+ Action<bool> uploadSuccessAction = (isSuccess) =>
+ {
+ Action action = () => {
+ if (!isSuccess)
+ {
+ if (imageSource == 1)
+ {
+ CropImage.SelectPicture((imagePath) =>
+ {
+ CropImageCallBack(imagePath, 2, imageName);
+ }, imageName, 4, 6);
+ }
+ else
+ {
+ CropImage.TakePicture((imagePath) =>
+ {
+ CropImageCallBack(imagePath, 1,imageName);
+ }, imageName, 4, 6);
+ }
+ }else
+ {
+ ReadFaceInfo();
+ }
+ };
+ Application.RunOnMainThread(() =>
+ {
+ var page = new FaceSettingResultPage(action);
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage(isSuccess);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ });
+ };
+ //涓婁紶鍥剧墖鍒颁簯绔�
+ UploadImage(selectImagePath, uploadSuccessAction);
+ }
+
+ /// <summary>
+ /// 涓婁紶鍥剧墖鏂规硶
+ /// </summary>
+ /// <param name="selectImagePath">瑁佸壀鍚庣殑鍥剧墖璺緞</param>
+ /// <param name="imageView"></param>
+ /// <param name="uploadResultAction"></param>
+ void UploadImage(string selectImagePath, Action<bool> uploadResultAction)
+ {
+ try
+ {
+ //1.璇诲彇瑁佸壀鍚庣殑鍥剧墖锛岀劧鍚庡垹闄�
+ var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath);
+ System.IO.File.Delete(selectImagePath);
+
+ var waitPage = new Loading();
+ bodyView.AddChidren(waitPage);
+ waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ //寮�濮嬩笂浼�
+ new Thread(() =>
+ {
+ try
+ {
+ string base64string = Convert.ToBase64String(imageBytes);
+ var pack = new HttpServerRequest().FaceSetting(base64string);
+ if (pack != null)
+ {
+ uploadResultAction?.Invoke(pack.Code == StateCode.SUCCESS);
+ }
+
+ }
+ catch (Exception ex)
+ {
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ catch { }
+ }
+
+
}
+
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs
new file mode 100644
index 0000000..9987878
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs
@@ -0,0 +1,197 @@
+锘�//using System;
+//using HDL_ON.UI.CSS;
+//using Shared;
+//namespace HDL_ON.UI
+//{
+// public class FaceSettingPage : FrameLayout
+// {
+// FrameLayout bodyView;
+
+// #region 鍥炬爣閫夋嫨閮ㄥ垎鍥炬爣
+// /// <summary>
+// /// 鑳屾櫙鍥鹃�夐」鍖哄煙
+// /// </summary>
+// FrameLayout pictureOptionView;
+// /// <summary>
+// /// 鑳屾櫙鍥鹃�夐」閫夋嫨鍖哄煙
+// /// </summary>
+// VerticalScrolViewLayout optionView;
+// /// <summary>
+// /// 鎷嶇収鎸夐挳
+// /// </summary>
+// Button btnTakePicture;
+// /// <summary>
+// /// 鐩稿唽鎸夐挳
+// /// </summary>
+// Button btnAlbum;
+// /// <summary>
+// /// 鍙栨秷鎸夐挳
+// /// </summary>
+// Button btnCancel;
+// #endregion
+
+// public FaceSettingPage()
+// {
+// bodyView = this;
+// }
+
+// public void LoadPage()
+// {
+// new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView();
+// bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+
+// var contentView = new FrameLayout()
+// {
+// Y = Application.GetRealHeight(64),
+// Height = Application.GetRealHeight(667 - 64),
+// BackgroundColor = 0xFFFFFFFF,
+// };
+// bodyView.AddChidren(contentView);
+
+
+// var imageName = Guid.NewGuid().ToString();
+// CropImage.TakePicture((imagePath) =>
+// {
+
+// }, imageName, 4, 3);
+
+
+// }
+
+
+
+
+// /// <summary>
+// /// 鍔犺浇鍥炬爣閫夋嫨閫夐」
+// /// </summary>
+// void LoadPictureOptionView()
+// {
+// var pView = new FrameLayout()
+// {
+// BackgroundColor = CSS_Color.DialogTransparentColor1,
+// };
+// bodyView.AddChidren(pView);
+
+// pictureOptionView = new FrameLayout()
+// {
+// Y = Application.GetRealHeight(445),
+// Height = Application.GetRealHeight(250),
+// AnimateSpeed = 0.3f,
+// Animate = Animate.DownToUp,
+// };
+// pView.AddChidren(pictureOptionView);
+
+// optionView = new VerticalScrolViewLayout()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Width = Application.GetRealWidth(343),
+// Height = Application.GetRealHeight(150),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// Radius = (uint)Application.GetRealWidth(12),
+// };
+// pictureOptionView.AddChidren(optionView);
+
+// btnTakePicture = new Button()
+// {
+// Height = Application.GetRealHeight(50),
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.TextualColor,
+// SelectedTextColor = CSS_Color.MainColor,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// TextID = StringId.TakePicture,
+// };
+// optionView.AddChidren(btnTakePicture);
+
+// optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+// btnAlbum = new Button()
+// {
+// Height = Application.GetRealHeight(50),
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.TextualColor,
+// SelectedTextColor = CSS_Color.MainColor,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// TextID = StringId.Album,
+// };
+// optionView.AddChidren(btnAlbum);
+
+// optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+// btnCancel = new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(8) + optionView.Bottom,
+// Width = Application.GetRealWidth(343),
+// Height = Application.GetRealHeight(50),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// Radius = (uint)Application.GetRealWidth(12),
+// TextID = StringId.Cancel,
+// TextColor = CSS_Color.WarningColor,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// };
+// pictureOptionView.AddChidren(btnCancel);
+
+
+// LoadEvent_PictureOptionViewEventList(pView);
+// }
+
+// /// <summary>
+// /// 鍔犺浇鑳屾櫙鍥鹃�夋嫨鍖哄煙浜嬩欢鍒楄〃
+// /// </summary>
+// void LoadEvent_PictureOptionViewEventList(FrameLayout pView)
+// {
+// pictureOptionView.MouseUpEventHandler = (sender, e) =>
+// {
+// pictureOptionView.Parent.RemoveFromParent();
+// };
+// pView.MouseUpEventHandler = (sender, e) =>
+// {
+// pictureOptionView.Parent.RemoveFromParent();
+// };
+
+// btnCancel.MouseUpEventHandler = (sender, e) =>
+// {
+// pictureOptionView.Parent.RemoveFromParent();
+// };
+// btnTakePicture.MouseDownEventHandler = (sender, e) => {
+// btnTakePicture.IsSelected = true;
+// };
+// btnTakePicture.MouseUpEventHandler = (sender, e) =>
+// {
+// btnTakePicture.IsSelected = false;
+// var imageName = Guid.NewGuid().ToString();
+// //var imageName = scene.sid;
+// CropImage.TakePicture((imagePath) =>
+// {
+// CropImageCallBack(imagePath);
+
+// }, imageName, 4, 3);
+
+// //if (pageTitleId == StringId.EditScene)
+// //{
+// // scene.SaveFunctionData();
+// //}
+// pictureOptionView.Parent.RemoveFromParent();
+// };
+// btnAlbum.MouseDownEventHandler = (sender, e) => {
+// btnAlbum.IsSelected = true;
+// };
+
+// btnAlbum.MouseUpEventHandler = (sender, e) =>
+// {
+// btnAlbum.IsSelected = false;
+// //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀
+// var imageName = Guid.NewGuid().ToString();
+// //var imageName = scene.sid;
+// CropImage.SelectPicture((imagePath) =>
+// {
+// //CropImageCallBack(imagePath);
+// }, imageName, 4, 3);
+
+// pictureOptionView.Parent.RemoveFromParent();
+// };
+
+// }
+
+// }
+//}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs
new file mode 100644
index 0000000..dad698e
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs
@@ -0,0 +1,97 @@
+锘縰sing System;
+using HDL_ON.UI.CSS;
+using Shared;
+namespace HDL_ON.UI
+{
+ public class FaceSettingResultPage : FrameLayout
+ {
+ FrameLayout bodyView;
+
+ Action backAction;
+ public FaceSettingResultPage(Action action)
+ {
+ bodyView = this;
+ backAction = action;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="isSuccess">鏄惁鎴愬姛</param>
+ public void LoadPage(bool isSuccess)
+ {
+ new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView();
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+
+
+ var contentView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(667 - 64),
+ };
+ bodyView.AddChidren(contentView);
+
+
+
+ var btnResultIcon = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(99),
+ Width = Application.GetRealWidth(100),
+ Height = Application.GetRealWidth(100),
+ UnSelectedImagePath = "PersonalCenter/FacePassage/FailIcon.png",
+ SelectedImagePath = "PersonalCenter/FacePassage/TrueIcon.png",
+ IsSelected = isSuccess,
+ };
+ contentView.AddChidren(btnResultIcon);
+
+ Button btnResultText = new Button()
+ {
+ Y = Application.GetRealHeight(240),
+ Height = Application.GetRealHeight(40),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ };
+ contentView.AddChidren(btnResultText);
+
+
+
+
+
+
+
+
+
+
+ var btnSetFaceId = new Button()
+ {
+ Y = Application.GetRealHeight(539),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BackgroundColor = CSS_Color.MainColor,
+ TextID = isSuccess ? StringId.Complete :StringId.Retry,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextAlignment = TextAlignment.Center,
+ IsBold = true,
+ };
+ contentView.AddChidren(btnSetFaceId);
+
+ btnSetFaceId.MouseUpEventHandler = (sender, e) => {
+ if (isSuccess)
+ {
+ this.RemoveFromParent();
+ }
+ else
+ {
+ backAction?.Invoke();
+ this.RemoveFromParent();
+ }
+ };
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
index 2c0a039..8ad95c4 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -84,7 +84,6 @@
/// 鍖哄煙鎴愬憳灏忓尯鍩熸枃鏈�
/// </summary>
Button btnResidenceMemberText;
- #region F3闃舵
/// <summary>
/// 鍖哄煙瀹夋斁灏忓尯鍩�
/// </summary>
@@ -121,9 +120,7 @@
/// 鍖哄煙娣诲姞鍔熻兘灏忓尯鍩熸枃鏈�
/// </summary>
Button btnResidenceAddFunctionText;
- #endregion
- #region F3闃舵
///// <summary>
///// 杞欢璁剧疆鍖哄煙
///// </summary>
@@ -155,7 +152,6 @@
/// </summary>
Button btnSmartSpeakerText;
- #endregion
public PersonalCenterPage()
{
@@ -478,7 +474,6 @@
residenceArmView.AddChidren(btnResidenceArmText);
#endregion
}
- #region F3闃舵
#region ---鏁版嵁澶囦唤鍖哄煙
//residenceDataBackupView = new FrameLayout()
@@ -541,37 +536,39 @@
//residenceAuxiliaryFunctionView.AddChidren(btnResidenceAuxiliaryFunctionText);
#endregion
- #region ---娣诲姞鍔熻兘鍖哄煙
- residenceAddFunctionView = new FrameLayout()
+ if (DB_ResidenceData.Instance.GatewayType == 1)
{
- //X = residenceMemberView.Right,
- X = Application.GetRealWidth(28 - 24),
- Y = residenceManageView.Bottom,
- Width = Application.GetRealWidth(64 + 48),
- Height = Application.GetRealWidth(64),
- };
- residenceInfoView.AddChidren(residenceAddFunctionView);
- btnResidenceAddFunctionIcon = new Button
- {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(5),
- Width = Application.GetMinRealAverage(30),
- Height = Application.GetMinRealAverage(30),
- UnSelectedImagePath = "PersonalCenter/AddFunctionIcon.png",
- };
- residenceAddFunctionView.AddChidren(btnResidenceAddFunctionIcon);
- btnResidenceAddFunctionText = new Button()
- {
- Y = btnResidenceManageIcon.Bottom,
- Height = Application.GetRealHeight(29),
- TextID = StringId.AddFunction,
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel
- };
- residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
- #endregion
- #endregion
+ #region ---娣诲姞鍔熻兘鍖哄煙
+ residenceAddFunctionView = new FrameLayout()
+ {
+ //X = residenceMemberView.Right,
+ X = Application.GetRealWidth(28 - 24),
+ Y = residenceManageView.Bottom,
+ Width = Application.GetRealWidth(64 + 48),
+ Height = Application.GetRealWidth(64),
+ };
+ residenceInfoView.AddChidren(residenceAddFunctionView);
+ btnResidenceAddFunctionIcon = new Button
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(5),
+ Width = Application.GetMinRealAverage(30),
+ Height = Application.GetMinRealAverage(30),
+ UnSelectedImagePath = "PersonalCenter/AddFunctionIcon.png",
+ };
+ residenceAddFunctionView.AddChidren(btnResidenceAddFunctionIcon);
+ btnResidenceAddFunctionText = new Button()
+ {
+ Y = btnResidenceManageIcon.Bottom,
+ Height = Application.GetRealHeight(29),
+ TextID = StringId.AddFunction,
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel
+ };
+ residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
+ #endregion
+ }
}
else
{
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
index dad9f45..8bd3b10 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -40,12 +40,23 @@
if (btnResidenceArmIcon != null)
{
btnResidenceArmIcon.IsSelected = false;
- foreach (var temp in FunctionList.List.securities)
+ lock (FunctionList.List.securities)
{
- if (temp.status == "enable")
+ foreach (var temp in FunctionList.List.securities)
{
- btnResidenceArmIcon.IsSelected = true;
- break;
+ if (temp.status == "enable")
+ {
+ if (temp.alarm)
+ {
+ btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceInAlarmIcon.png";
+ }
+ else
+ {
+ btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png";
+ }
+ btnResidenceArmIcon.IsSelected = true;
+ break;
+ }
}
}
btnResidenceArmIcon.MouseUpEventHandler = (sender, e) =>
@@ -308,15 +319,22 @@
#region 娣诲姞璁惧
void LoadEvent_SkipbtnAddFunctionPage()
{
- EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ if (DB_ResidenceData.Instance.GatewayType == 1)
{
- var page = new BrandListPage();
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
- btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler;
- btnResidenceAddFunctionText.MouseUpEventHandler = eventHandler;
+ try
+ {
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ var page = new BrandListPage();
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler;
+ btnResidenceAddFunctionText.MouseUpEventHandler = eventHandler;
+ }
+ catch { }
+ }
}
#endregion
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index 8c65a3e..e7f2bb5 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -259,11 +259,17 @@
/// </summary>
optionListView = new VerticalScrolViewLayout()
{
- Height = Application.GetRealHeight(51 * (6+1)),
+ Height = Application.GetRealHeight(51 * 6),
BackgroundColor = CSS_Color.MainBackgroundColor,
ScrollEnabled = false,
};
bodyScrolView.AddChidren(optionListView);
+
+ if(Entity.DB_ResidenceData.Instance.SupportFacePass)
+ {
+ optionListView.Height = Application.GetRealHeight(51 * (6 + 1));
+ }
+
#region 涓汉閫夐」-鍚嶅瓧鍖哄煙
/// <summary>
/// 涓汉閫夐」-鍚嶅瓧鍖哄煙
@@ -563,46 +569,46 @@
optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
#endregion
-
- #region 涓汉閫夐」-浜鸿劯閫氳绠$悊
- faceManagementView = new FrameLayout()
+ if (Entity.DB_ResidenceData.Instance.SupportFacePass)
{
- Height = Application.GetRealHeight(50),
- };
- optionListView.AddChidren(faceManagementView);
+ #region 涓汉閫夐」-浜鸿劯閫氳绠$悊
+ faceManagementView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ optionListView.AddChidren(faceManagementView);
- var btnFaceManagementRight = new Button()
- {
- X = Application.GetRealWidth(339),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
- UnSelectedImagePath = "Public/Right.png",
- };
- faceManagementView.AddChidren(btnFaceManagementRight);
+ var btnFaceManagementRight = new Button()
+ {
+ X = Application.GetRealWidth(339),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/Right.png",
+ };
+ faceManagementView.AddChidren(btnFaceManagementRight);
- btnFaceManagementText = new Button()
- {
- X = Application.GetRealWidth(16),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.FacePassageSetting,
- };
- faceManagementView.AddChidren(btnFaceManagementText);
+ btnFaceManagementText = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.FacePassageSetting,
+ };
+ faceManagementView.AddChidren(btnFaceManagementText);
- btnFaceManagementText.MouseUpEventHandler = (sender, e) =>
- {
- var page = new FacePassagePage();
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
- };
+ btnFaceManagementText.MouseUpEventHandler = (sender, e) =>
+ {
+ var page = new FacePassagePage();
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
- #endregion
+ #endregion
-
+ }
#endregion
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
index 601ccd4..5e20a72 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
@@ -486,7 +486,11 @@
{
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs
index 48f2341..312e8f1 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs
@@ -110,8 +110,11 @@
finally
{
Application.RunOnMainThread(() => {
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
int count = SpatialInfo.CurrentSpatial.FloorList.Count > 10 ? 10 : SpatialInfo.CurrentSpatial.FloorList.Count;
floorsListView.Height = Application.GetRealHeight(50 * count);
contentView.Height = Application.GetRealHeight(50 * (count + 1));
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
index 6da1bf5..15ceafd 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
@@ -151,8 +151,11 @@
finally
{
Application.RunOnMainThread(() => {
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
index 3ab1bf7..558cb68 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
@@ -59,8 +59,11 @@
finally
{
Application.RunOnMainThread(() => {
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
index 25a6f44..6ac07bb 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
@@ -63,8 +63,11 @@
{
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
- waitPage.RemoveFromParent();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
index b2d0460..e6f08bd 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -66,19 +66,21 @@
fanSpeedList = device.GetAttribute(FunctionAttributeKey.FanSpeed).value;
btnFan.MouseUpEventHandler += (sender, e) =>
{
- if( !btnSwitch.IsSelected){return;}
- var curFanSpeedIndex = fanSpeedList.IndexOf(device.GetAttrState(FunctionAttributeKey.FanSpeed));
- var sendFanSpeedIndex = curFanSpeedIndex == fanSpeedList.Count - 1 ? 0 : 1+curFanSpeedIndex;
+ ShowFanSelectView();
+ //return;
+ //if ( !btnSwitch.IsSelected){return;}
+ //var curFanSpeedIndex = fanSpeedList.IndexOf(device.GetAttrState(FunctionAttributeKey.FanSpeed));
+ //var sendFanSpeedIndex = curFanSpeedIndex == fanSpeedList.Count - 1 ? 0 : 1+curFanSpeedIndex;
- device.SetAttrState(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
- new System.Threading.Thread(() =>
- {
- Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
- Control.Ins.SendWriteCommand(device, d);
- })
- { IsBackground = true }.Start();
- RefreshFanSpeed();
+ //device.SetAttrState(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
+ //new System.Threading.Thread(() =>
+ //{
+ // Dictionary<string, string> d = new Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
+ // Control.Ins.SendWriteCommand(device, d);
+ //})
+ //{ IsBackground = true }.Start();
+ //RefreshFanSpeed();
};
//椋庨�熸枃鏈�
this.btnFanView = new NormalViewControl(this.FrameWhiteCentet1.Width / 3, Application.GetRealHeight(18), false);
@@ -140,40 +142,107 @@
};
frameBack.Show();
+ var fanAttr = device.GetAttribute(FunctionAttributeKey.FanSpeed);
+ if(fanAttr == null)
+ {
+ return;
+ }
+ var valueCount = fanAttr.value.Count;
+
//鑿滃崟鎺т欢(椋庨��)
- var menuContr = new DialogTitleMenuControl(3, Language.StringByID(StringId.FanSpeed));
- menuContr.X = Application.GetRealWidth(209);
+ var menuContr = new DialogTitleMenuControl(valueCount, Language.StringByID(StringId.FanSpeed));
+ //menuContr.X = Application.GetRealWidth(209);
+ menuContr.Gravity = Gravity.CenterHorizontal;
menuContr.Y = Application.GetRealHeight(231);
menuContr.Width = Application.GetRealWidth(160);
- menuContr.Height = Application.GetRealHeight(199);
+ if (valueCount > 2)
+ {
+ menuContr.Height = Application.GetRealHeight(199);
+ }
+ else
+ {
+ menuContr.Height = Application.GetRealHeight(154);
+ }
dialogBody.AddChidren(menuContr);
- //1妗�
- var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low" ? "FunctionIcon/AirFresh/Fan1Select.png" : "FunctionIcon/AirFresh/Fan1.png";
- menuContr.AddRowMenu(Language.StringByID(StringId.FanOneGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low", () =>
+ foreach(var fanAttrValue in fanAttr.value)
{
- frameBack.Close();
- //鍙戦�佹。浣嶅懡浠�
- this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "low");
- });
+ bool isSelecte = false;
+ var iconPath = "FunctionIcon/AirFresh/Fan1.png";
+ string text = Language.StringByID(StringId.FanOneGear);
+ if (fanAttrValue == "low" || fanAttrValue == "level_1")
+ {
+ text = Language.StringByID(StringId.LowWindSpeed);
+ if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low"|| this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "level_1")
+ {
+ iconPath = "FunctionIcon/AirFresh/Fan1Select.png";
+ isSelecte = true;
+ }
+ }
+ else if (fanAttrValue == "medium" || fanAttrValue == "level_2")
+ {
+ text = Language.StringByID(StringId.MiddleWindSpeed);
+ iconPath = "FunctionIcon/AirFresh/Fan2.png";
+ if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" || this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "level_2")
+ {
+ iconPath = "FunctionIcon/AirFresh/Fan2Select.png";
+ isSelecte = true;
+ }
+ }
+ else if (fanAttrValue == "high" || fanAttrValue == "level_3")
+ {
+ text = Language.StringByID(StringId.HighWindSpeed);
+ iconPath = "FunctionIcon/AirFresh/Fan3.png";
+ if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" || this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "level_3")
+ {
+ iconPath = "FunctionIcon/AirFresh/Fan3Select.png";
+ isSelecte = true;
+ }
+ }
- //2妗�
- iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" ? "FunctionIcon/AirFresh/Fan2Select.png" : "FunctionIcon/AirFresh/Fan2.png";
- menuContr.AddRowMenu(Language.StringByID(StringId.FanTwoGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium", () =>
- {
- frameBack.Close();
- //鍙戦�佹。浣嶅懡浠�
- this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "medium");
- });
+ menuContr.AddRowMenu(text, iconPath, isSelecte, () =>
+ {
+ frameBack.Close();
+ //鍙戦�佹。浣嶅懡浠�
+ this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, fanAttrValue);
+ });
+ }
- //3妗�
- iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" ? "FunctionIcon/AirFresh/Fan3Select.png" : "FunctionIcon/AirFresh/Fan3.png";
- menuContr.AddRowMenu(Language.StringByID(StringId.FanThreeGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high", () =>
- {
- frameBack.Close();
- //鍙戦�佹。浣嶅懡浠�
- this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "high");
- });
+ //if (fanAttr.value.Contains("low"))
+ //{
+ // //1妗�
+ // var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low" ? "FunctionIcon/AirFresh/Fan1Select.png" : "FunctionIcon/AirFresh/Fan1.png";
+ // menuContr.AddRowMenu(Language.StringByID(StringId.FanOneGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low", () =>
+ // {
+ // frameBack.Close();
+ // //鍙戦�佹。浣嶅懡浠�
+ // this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "low");
+ // });
+ //}
+
+ //if (fanAttr.value.Contains("medium"))
+ //{
+ // //2妗�
+ // var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" ? "FunctionIcon/AirFresh/Fan2Select.png" : "FunctionIcon/AirFresh/Fan2.png";
+ // menuContr.AddRowMenu(Language.StringByID(StringId.FanTwoGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium", () =>
+ // {
+ // frameBack.Close();
+ // //鍙戦�佹。浣嶅懡浠�
+ // this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "medium");
+ // });
+ //}
+
+ //if (fanAttr.value.Contains("high"))
+ //{
+ // //3妗�
+ // var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" ? "FunctionIcon/AirFresh/Fan3Select.png" : "FunctionIcon/AirFresh/Fan3.png";
+ // menuContr.AddRowMenu(Language.StringByID(StringId.FanThreeGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high", () =>
+ // {
+ // frameBack.Close();
+ // //鍙戦�佹。浣嶅懡浠�
+ // this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "high");
+ // });
+ //}
}
#endregion
@@ -300,5 +369,8 @@
#endregion
+
+
+
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
index 8d15c4e..eac2055 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
@@ -249,7 +249,11 @@
finally
{
Application.RunOnMainThread(() => {
- waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
index 6f1d164..f9f005e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
@@ -1,4 +1,5 @@
锘縰sing System;
+using System.Collections.Generic;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
@@ -34,6 +35,15 @@
/// 鎾ら槻鍖哄煙
/// </summary>
FrameLayout disarmView;
+
+ /// <summary>
+ /// 甯冮槻鎺ュ彛
+ /// </summary>
+ SecurityAlarm InDefenseMode = null;
+ /// <summary>
+ /// 鑷畾涔夊竷闃叉帶浠跺垪琛�
+ /// </summary>
+ List<ArmDiyView> armDiyViewList = new List<ArmDiyView>();
public ArmCenterPage()
{
@@ -84,16 +94,20 @@
{
Width = Application.GetRealWidth(198),
Height = Application.GetRealWidth(198),
+ UnSelectedImagePath = "FunctionIcon/ArmCenter/InAlarmBigIcon.png",
};
btnInalarmIcon.MouseUpEventHandler = (sender, e) => {
- if(SecurityCenter.Ins.InDefenseMode!= null)
+ if(InDefenseMode!= null)
{
- SecurityCenter.Ins.InDefenseMode.alarm = false;
- Control.Ins.ControlSecurity(SecurityCenter.Ins.InDefenseMode, "enable");
+ Action action = () =>
+ {
+ InDefenseMode.alarm = false;
+ Control.Ins.ControlSecurity(InDefenseMode, "enable");
+ };
+ new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteSceneTip, action);
+
}
};
- InitAlarmStatus(SecurityCenter.Ins.InAlarm);
-
btnDefenseName = new Button()
{
@@ -141,17 +155,17 @@
// break;
// }
//}
- if(SecurityCenter.Ins.InDefenseMode!= null)
+ if(InDefenseMode!= null)
{
- Control.Ins.ControlSecurity(SecurityCenter.Ins.InDefenseMode, "disable");
+ Control.Ins.ControlSecurity(InDefenseMode, "disable");
}
};
- #endregion
+ #endregion
- #region 鑷畾涔夊竷闃�
- //鑷畾涔夊竷闃叉爣棰�
- Button btnCustomDeploymentTitle = new Button()
+ #region 鑷畾涔夊竷闃�
+ //鑷畾涔夊竷闃叉爣棰�
+ Button btnCustomDeploymentTitle = new Button()
{
X = Application.GetRealWidth(24),
Height = Application.GetRealWidth(54),
@@ -243,24 +257,31 @@
#endregion
-
-
- ///鍒锋柊鐣岄潰
- LoadEvent_RefreshSecurityStatus();
+ iniCustomDeploymentView();
}
+ /// <summary>
+ /// 鍒濆鍖栨姤璀︾姸鎬�
+ /// </summary>
+ /// <param name="inAlarm"></param>
public void InitAlarmStatus(bool inAlarm)
{
try
{
if (inAlarm)
{
- alarmIconBgView.AddChidren(btnInalarmIcon);
+ if (btnInalarmIcon.Parent == null)
+ {
+ alarmIconBgView.AddChidren(btnInalarmIcon);
+ }
}
else
{
- btnInalarmIcon.RemoveFromParent();
+ if (btnInalarmIcon.Parent != null)
+ {
+ btnInalarmIcon.RemoveFromParent();
+ }
}
}
catch { }
@@ -272,11 +293,11 @@
private void iniCustomDeploymentView()
{
customDeploymentView.RemoveAll();
-
+ armDiyViewList.Clear();
foreach (var mode in FunctionList.List.securities)
{
var armDiyView = new ArmDiyView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png",
- mode.name);
+ mode.name,mode.sid);
customDeploymentView.AddChidren(armDiyView);
EventHandler<MouseEventArgs> event2 = (sender, e) =>
{
@@ -286,13 +307,18 @@
if (mode.status == "enable")
{
armDiyView.LightingView(true);
+ InDefenseMode = mode;
+
+ ///鍒锋柊鐣岄潰
+ LoadEvent_RefreshSecurityStatus(InDefenseMode);
}
+ armDiyViewList.Add(armDiyView);
}
if (FunctionList.List.securities.Count < 4)
{
var view = new ArmDiyView("FunctionIcon/ArmCenter/AddDefenseIcon.png", "FunctionIcon/ArmCenter/AddDefenseIcon.png",
- Language.StringByID(StringId.Custom));
+ Language.StringByID(StringId.Custom),"customSid");
customDeploymentView.AddChidren(view);
EventHandler<MouseEventArgs> event1 = (sender, e) =>
{
@@ -381,13 +407,12 @@
}
btnOpen.MouseUpEventHandler = (sender, e) => {
- if (alarm.status == "disable")
+ string controlStatus = alarm.status == "disable" ? "enable" : "disable";
+ new System.Threading.Thread(() =>
{
- Control.Ins.ControlSecurity(alarm, "enable");
- }else
- {
- Control.Ins.ControlSecurity(alarm, "disable");
- }
+ Control.Ins.ControlSecurity(alarm, controlStatus);
+ })
+ { IsBackground = true }.Start();
dialog.Close();
};
@@ -411,28 +436,68 @@
}
- public static void LoadEvent_RefreshSecurityStatus()
+ public static void LoadEvent_RefreshSecurityStatus(SecurityAlarm updataTemp)
{
Application.RunOnMainThread(() =>
{
- if (bodyView != null)
+ try
{
- bodyView.iniCustomDeploymentView();
- bodyView.disarmView.Height = 0;
- bodyView.btnArmTipIcon.IsSelected = false;
- bodyView.btnDefenseName.Text = "";
- foreach (var temp in FunctionList.List.securities)
+ if (bodyView != null)
{
- if (temp.status == "enable")
+ //甯冮槻
+ if (updataTemp.status == "enable")
{
- bodyView.disarmView.Height = Application.GetRealHeight(68);
- bodyView.btnArmTipIcon.IsSelected = true;
- bodyView.btnDefenseName.Text = temp.name;
-
- bodyView.InitAlarmStatus(temp.alarm);
- break;
+ bodyView.InDefenseMode = updataTemp;
+ foreach (var tempView in bodyView.armDiyViewList)
+ {
+ tempView.LightingView(false);
+ if (tempView.sid == updataTemp.sid)
+ {
+ tempView.LightingView(updataTemp.status == "enable");
+ }
+ }
}
+ else
+ {
+ //鎾ら槻
+ if(bodyView.InDefenseMode.sid == updataTemp.sid)
+ {
+ foreach (var tempView in bodyView.armDiyViewList)
+ {
+ tempView.LightingView(false);
+ }
+ }
+ }
+
+
+ //foreach(var tempView in bodyView.armDiyViewList)
+ //{
+ // tempView.LightingView(false);
+ // if(tempView.sid == updataTemp.sid)
+ // {
+ // tempView.LightingView(updataTemp.status == "enable");
+ // }
+ //}
+
+ //娌℃湁甯冮槻鐨勬儏鍐�
+ if (bodyView.InDefenseMode ==null|| bodyView.InDefenseMode.status == "disable")
+ {
+ bodyView.disarmView.Height = 0;
+ bodyView.btnArmTipIcon.IsSelected = false;
+ bodyView.btnDefenseName.Text = "";
+ }
+ else
+ {
+ bodyView.disarmView.Height = Application.GetRealHeight(68);
+ bodyView.btnArmTipIcon.IsSelected = true;
+ bodyView.btnDefenseName.Text = bodyView.InDefenseMode.name;
+ }
+ bodyView.InitAlarmStatus(bodyView.InDefenseMode.alarm);
}
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"瀹夐槻鐣岄潰鏇存柊寮傚父锛歿ex.Message}");
}
});
}
@@ -446,14 +511,16 @@
{
Button btnIcon;
Button btnText;
+ public string sid;
/// <summary>
/// 鑷畾涔夊竷闃茬晫闈�
/// </summary>
/// <param name="UnSelectedIconPath">鍥剧墖璺緞</param>
/// <param name="SelectedIconPath">鍥剧墖璺緞</param>
/// <param name="Text">鏄剧ず鏂囨湰</param>
- public ArmDiyView(string UnSelectedIconPath, string SelectedIconPath, string Text)
+ public ArmDiyView(string UnSelectedIconPath, string SelectedIconPath, string Text,string inSid)
{
+ sid = inSid;
this.Width = Application.GetRealWidth(82);
this.Height = Application.GetRealWidth(80);
@@ -497,6 +564,9 @@
}
+ /// <summary>
+ /// 鍥哄畾甯冮槻鎺т欢
+ /// </summary>
public class FixedArmView : FrameLayout
{
/// <summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
index 4cf7387..df3ec88 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
@@ -235,7 +235,11 @@
finally
{
Application.RunOnMainThread(() => {
- waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
index 0087ce3..f571b61 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
@@ -85,18 +85,26 @@
Control.Ins.SendWriteCommand(function, d);
};
+
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
{
btnCurtainStop.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainOpen.IsSelected = false;
};
btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
{
btnCurtainOpen.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
};
btnCurtainClose.MouseDownEventHandler = (sender, e) =>
{
btnCurtainClose.IsSelected = true;
+ btnCurtainOpen.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
};
+
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
new System.Threading.Thread(() => {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index c94975f..95a00e3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -19,14 +19,14 @@
return;
if (updateTemp.spk == bodyView.function.spk && updateTemp.sid == bodyView.function.sid)
{
- var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
- if (percentString != null)
- {
- int percent = 0;
- int.TryParse(percentString, out percent);
- bodyView.btnCurtainOpen.IsSelected = percent > 0;
- bodyView.btnCurtainClose.IsSelected = percent == 0;
- }
+ //var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
+ //if (percentString != null)
+ //{
+ // int percent = 0;
+ // int.TryParse(percentString, out percent);
+ // bodyView.btnCurtainOpen.IsSelected = percent > 0;
+ // bodyView.btnCurtainClose.IsSelected = percent == 0;
+ //}
try
{
if (!bodyView.onCurtainAnimation)
@@ -136,13 +136,15 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- //new System.Threading.Thread(() => {
- // System.Threading.Thread.Sleep(2000);
- // Application.RunOnMainThread(() => {
- // btnCurtainClose.IsSelected = false;
- // });
- //})
- //{ IsBackground = true }.Start();
+ new System.Threading.Thread(() =>
+ {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() =>
+ {
+ btnCurtainClose.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
function.trait_on_off.curValue = "off";
function.SetAttrState(FunctionAttributeKey.Percent, 0);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -171,13 +173,15 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- //new System.Threading.Thread(() => {
- // System.Threading.Thread.Sleep(2000);
- // Application.RunOnMainThread(() => {
- // btnCurtainOpen.IsSelected = false;
- // });
- //})
- //{ IsBackground = true }.Start();
+ new System.Threading.Thread(() =>
+ {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() =>
+ {
+ btnCurtainOpen.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
function.trait_on_off.curValue = "on";
function.SetAttrState(FunctionAttributeKey.Percent, 100);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -190,16 +194,20 @@
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
{
btnCurtainStop.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainOpen.IsSelected = false;
};
btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
{
btnCurtainOpen.IsSelected = true;
btnCurtainClose.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
};
btnCurtainClose.MouseDownEventHandler = (sender, e) =>
{
btnCurtainClose.IsSelected = true;
btnCurtainOpen.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
};
//btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
index 511c748..3405938 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -19,11 +19,11 @@
return;
if (updateTemp.spk == bodyView.function.spk && updateTemp.sid == bodyView.function.sid)
{
- var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
- int percent = 0;
- int.TryParse(percentString, out percent);
- bodyView.btnCurtainOpen.IsSelected = percent > 0;
- bodyView.btnCurtainClose.IsSelected = percent == 0;
+ //var percentString = updateTemp.GetAttrState(FunctionAttributeKey.Percent);
+ //int percent = 0;
+ //int.TryParse(percentString, out percent);
+ //bodyView.btnCurtainOpen.IsSelected = percent > 0;
+ //bodyView.btnCurtainClose.IsSelected = percent == 0;
try
{
if (!bodyView.onCurtainAnimation)
@@ -133,13 +133,15 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- //new System.Threading.Thread(() => {
- // System.Threading.Thread.Sleep(2000);
- // Application.RunOnMainThread(() => {
- // btnCurtainClose.IsSelected = false;
- // });
- //})
- //{ IsBackground = true }.Start();
+ new System.Threading.Thread(() =>
+ {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() =>
+ {
+ btnCurtainClose.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
function.trait_on_off.curValue = "off";
function.SetAttrState(FunctionAttributeKey.Percent, 0);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -166,13 +168,15 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- //new System.Threading.Thread(() => {
- // System.Threading.Thread.Sleep(2000);
- // Application.RunOnMainThread(() => {
- // btnCurtainOpen.IsSelected = false;
- // });
- //})
- //{ IsBackground = true }.Start();
+ new System.Threading.Thread(() =>
+ {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() =>
+ {
+ btnCurtainOpen.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
function.trait_on_off.curValue = "on";
function.SetAttrState(FunctionAttributeKey.Percent, 100);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
@@ -203,16 +207,20 @@
btnCurtainStop.MouseDownEventHandler = (sender, e) =>
{
btnCurtainStop.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainOpen.IsSelected = false;
};
btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
{
btnCurtainOpen.IsSelected = true;
btnCurtainClose.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
};
btnCurtainClose.MouseDownEventHandler = (sender, e) =>
{
btnCurtainClose.IsSelected = true;
btnCurtainOpen.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
};
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
new file mode 100644
index 0000000..d693db6
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
@@ -0,0 +1,249 @@
+锘縰sing System;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ public class AirSwitchPage : FrameLayout
+ {
+
+ #region 鎺т欢闆嗗悎
+ static AirSwitchPage bodyView;
+ /// <summary>
+ /// 鎺у埗鐣岄潰鍔犺浇鍖哄煙
+ /// </summary>
+ FrameLayout controlView;
+ /// <summary>
+ /// 鍔熻兘澶囨敞
+ /// </summary>
+ Button btnFunctionName;
+ /// <summary>
+ /// 鍔熻兘鎵�灞炴ゼ灞傘�佹埧闂�
+ /// </summary>
+ Button btnFromFoorAndRoom;
+ /// <summary>
+ /// 鏀惰棌鎸夐挳
+ /// </summary>
+ Button btnCollection;
+ /// <summary>
+ /// 缁х數鍣ㄧ姸鎬佸浘鏍�
+ /// </summary>
+ Button btnSwitchIcon;
+ /// <summary>
+ /// 寮�鍏虫寜閽�
+ /// </summary>
+ Button btnSwitch;
+ #endregion
+
+ #region 鍖哄煙鍙橀噺
+ Function function;
+ Button btnCollection_Out;
+ Button btnFunctionName_Out;
+ Button btnFromFloor_Out;
+ /// <summary>
+ /// 鍒锋柊鏄剧ず淇℃伅
+ /// </summary>
+ Action actionRefresh;
+ #endregion
+
+ public AirSwitchPage(Function func)
+ {
+ bodyView = this;
+ function = func;
+
+ }
+ /// <summary>
+ /// 鍔犺浇鐣岄潰
+ /// </summary>
+ /// <param name="btnCollectionIcon">鏀惰棌鎸夐挳</param>
+ /// <param name="btnFunctionName">鍔熻兘鍚嶇О淇℃伅鎸夐挳</param>
+ /// <param name="btnFromFloor">鍔熻兘妤煎眰淇℃伅鎸夐挳</param>
+ public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut)
+ {
+ if (btnCollectionIcon == null)
+ {
+ btnCollection_Out = new Button();
+ btnFunctionName_Out = new Button();
+ btnFromFloor_Out = new Button();
+ }
+ else
+ {
+ btnCollection_Out = btnCollectionIcon;
+ btnFunctionName_Out = btnFunctionNameOut;
+ btnFromFloor_Out = btnFromFloorOut;
+ }
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+ //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), function);
+
+ controlView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(88),
+ Width = Application.GetRealWidth(327),
+ Height = Application.GetRealHeight(526),
+ BackgroundImagePath = "Public/Fragmentbg.png",
+ };
+ bodyView.AddChidren(controlView);
+
+ btnFunctionName = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealHeight(14),
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(37),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
+ Text = function.name,
+ };
+ controlView.AddChidren(btnFunctionName);
+
+ btnFromFoorAndRoom = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnFunctionName.Bottom,
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(21),
+ TextColor = CSS_Color.PromptingColor1,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = function.GetRoomListName()
+ };
+ controlView.AddChidren(btnFromFoorAndRoom);
+
+ btnCollection = new Button()
+ {
+ X = Application.GetRealWidth(273),
+ Y = Application.GetRealHeight(14),
+ Width = Application.GetMinRealAverage(40),
+ Height = Application.GetMinRealAverage(40),
+ SelectedImagePath = "Collection/CollectionIcon.png",
+ UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
+ IsSelected = function.collect
+ };
+ controlView.AddChidren(btnCollection);
+
+ btnSwitchIcon = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(102),
+ Width = Application.GetRealWidth(148),
+ Height = Application.GetRealWidth(198),
+ UnSelectedImagePath = "FunctionIcon/Electrical/AirSwitch/AirSwitchBgIcon.png",
+ SelectedImagePath = "FunctionIcon/Electrical/AirSwitch/AirSwitchBgOnIcon.png",
+ IsSelected = function.trait_on_off.curValue.ToString() == "on"
+ };
+ controlView.AddChidren(btnSwitchIcon);
+
+ btnSwitch = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(466),// + btnSwitchIcon.Bottom,
+ Width = Application.GetMinRealAverage(32),
+ Height = Application.GetMinRealAverage(32),
+ UnSelectedImagePath = "Public/PowerClose.png",
+ SelectedImagePath = "Public/PowerOpen.png",
+ IsSelected = function.trait_on_off.curValue.ToString() == "on"
+ };
+ controlView.AddChidren(btnSwitch);
+
+ new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh,false);
+ new System.Threading.Thread(() =>
+ {
+ DriverLayer.Control.Ins.SendReadCommand(function);
+ })
+ { IsBackground = true }.Start();
+
+
+ LoadEventList();
+ }
+
+
+
+
+ /// <summary>
+ /// 鏇存柊鐘舵��
+ /// </summary>
+ public static void UpdataState(Function updataTemp)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ try
+ {
+ if (bodyView == null)
+ return;
+ if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid)
+ {
+ bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on";
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"AirSwitch error {ex.Message}");
+ }
+ });
+ }
+ /// <summary>
+ /// 鍔犺浇浜嬩欢鍒楄〃
+ /// </summary>
+ void LoadEventList()
+ {
+ LoadSwitchEvent();
+ LoadCollectionEvent();
+
+ //鍥為��鍒锋柊淇℃伅浜嬩欢
+ actionRefresh = () => {
+ btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
+ btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
+ //function.SaveFunctionData(true);
+ };
+ }
+
+ /// <summary>
+ /// 鏀惰棌鍔熻兘鎸夐挳浜嬩欢
+ /// </summary>
+ void LoadCollectionEvent()
+ {
+ btnCollection.MouseUpEventHandler += (sender, e) => {
+ btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
+ function.CollectFunction();
+ };
+ }
+
+ /// <summary>
+ /// 鍔犺浇寮�鍏充簨浠�
+ /// </summary>
+ void LoadSwitchEvent()
+ {
+ btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
+ {
+ btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected;
+ new System.Threading.Thread(() =>
+ {
+ function.trait_on_off.curValue = btnSwitchIcon.IsSelected ? "on" : "off";
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add("on_off", function.trait_on_off.curValue.ToString());
+ DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ })
+ { IsBackground = true }.Start();
+ };
+ btnSwitch.MouseUpEventHandler = (sender, e) =>
+ {
+ btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitch.IsSelected;
+ new System.Threading.Thread(() =>
+ {
+ function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add("on_off", function.trait_on_off.curValue.ToString());
+ DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ })
+ { IsBackground = true }.Start();
+
+ };
+
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index 68f8232..704093f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -47,7 +47,7 @@
/// <summary>
/// 鍔犺浇鐣岄潰
/// </summary>
- public void LoadPage()
+ public void LoadPage(bool locationSetting = true)
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(actionRefresh);
@@ -111,58 +111,59 @@
});
#endregion
-
- #region 浣嶇疆绠$悊
- var locationMagtView = new FrameLayout()
+ if (locationSetting)
{
- Height = Application.GetRealHeight(55),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- contentView.AddChidren(locationMagtView);
-
- var btnLocationMagtTitle = new Button()
- {
- X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(160),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.LocationManagement,
- };
- locationMagtView.AddChidren(btnLocationMagtTitle);
-
- btnLocationValues = new Button()
- {
- X = Application.GetRealWidth(86),
- Width = Application.GetRealWidth(237),
- TextAlignment = TextAlignment.CenterRight,
- TextColor = CSS_Color.PromptingColor1,
- TextSize = CSS_FontSize.TextFontSize,
- Text = function.GetRoomListName(),
- };
- locationMagtView.AddChidren(btnLocationValues);
-
- btnLocationInfoRight = new Button()
- {
- X = Application.GetRealWidth(339),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
- UnSelectedImagePath = "Public/RightIcon.png",
- };
- locationMagtView.AddChidren(btnLocationInfoRight);
-
- locationMagtView.AddChidren(
- new Button()
+ #region 浣嶇疆绠$悊
+ var locationMagtView = new FrameLayout()
{
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(54),
- BackgroundColor = CSS_Color.DividingLineColor,
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(1)
- });
- #endregion
+ Height = Application.GetRealHeight(55),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ contentView.AddChidren(locationMagtView);
+ var btnLocationMagtTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(160),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.LocationManagement,
+ };
+ locationMagtView.AddChidren(btnLocationMagtTitle);
+
+ btnLocationValues = new Button()
+ {
+ X = Application.GetRealWidth(86),
+ Width = Application.GetRealWidth(237),
+ TextAlignment = TextAlignment.CenterRight,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.TextFontSize,
+ Text = function.GetRoomListName(),
+ };
+ locationMagtView.AddChidren(btnLocationValues);
+
+ btnLocationInfoRight = new Button()
+ {
+ X = Application.GetRealWidth(339),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/RightIcon.png",
+ };
+ locationMagtView.AddChidren(btnLocationInfoRight);
+
+ locationMagtView.AddChidren(
+ new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(54),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(1)
+ });
+ #endregion
+ }
#region 鍏变韩
//var sharedView = new FrameLayout()
//{
--
Gitblit v1.8.0