From cae4d4b5b508a666fbd0dff3c2a981fdff841bc8 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 30 三月 2023 13:10:33 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' into wjc
---
SiriIntents/SiriIntents.csproj | 2
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs | 10
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs | 76
HDL-ON_Android/Assets/Language.ini | 84
HDL_ON/Common/ApiUtlis.cs | 26
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs | 9
HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs | 340 +++
HDL_ON/DAL/Mqtt/MqttClient.cs | 3
HDL_ON/HDL_ON.projitems | 12
HDL_ON/DAL/Server/IMessageCommon.cs | 1
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 2
HDL-ON_iOS/Info.plist | 10
HDL_ON/UI/UI2/4-PersonalCenter/Face/FaceManagementPage.cs | 10
HDL_ON/DAL/Server/NewApiRes.cs | 4
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 6
HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 169
HDL_ON/Common/OnAppConfig.cs | 4
DLL/LC/Android/LcVideoSdk.dll | 0
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs | 628 ++++++
DLL/Shared.Droid.JPush223.dll | 0
HDL_ON/UI/UI1-Login/LoginPage.cs | 22
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 393 ++-
SiriIntents/Server/HttpUtil.cs | 17
HDL_ON/Entity/Function/Scene.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs | 53
HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 5
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 317 +-
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs | 146 +
HDL_ON/Common/ImageUtlis.cs | 1
HDL_ON/UI/UI0-Public/TopViewDiv.cs | 6
HDL_ON/Entity/Function/Function.cs | 10
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 18
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 20
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs | 145 +
HDL_ON/DAL/Server/HttpUtil.cs | 20
DLL/Shared.Droid.JPush.dll | 0
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 84
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 17
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddCombineDimmingPage.cs | 264 ++
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs | 571 +++++
HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs | 11
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs | 112
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 1
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs | 99
HDL_ON/Entity/ResponseEntity/FreeviewMemberInfo.cs | 39
HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs | 3
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs | 4
HDL-ON_iOS/Resources/Language.ini | 57
HDL-ON_Android/Resources/values/styles.xml | 4
HDL_ON/UI/UI1-Login/RegisterPageBLL.cs | 3
HDL_ON/DAL/DriverLayer/Control.cs | 6
HDL_ON/UI/MainPage.cs | 3
SiriIntentsUI/SiriIntentsUI.csproj | 2
HDL-ON_Android/Application.cs | 11
HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs | 14
HDL-ON_iOS/Resources/Phone/PersonalCenter/CombinedDimmingIcon.png | 0
HDL_ON/Entity/FunctionList.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 1
/dev/null | 0
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs | 12
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs | 8
HDL_ON/DAL/Server/NewAPI.cs | 56
HDL-ON_Android/Assets/Phone/PersonalCenter/CombinedDimmingIcon.png | 0
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs | 1541 +++++++++++++++
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs | 244 ++
HDL_ON/Common/R.cs | 60
HDL_ON/DAL/Server/HttpServerRequest.cs | 130 +
69 files changed, 5,249 insertions(+), 685 deletions(-)
diff --git a/DLL/LC/Android/LCDeviceAddModule-2022-12-06.dll b/DLL/LC/Android/LCDeviceAddModule-2022-12-06.dll
deleted file mode 100644
index 2fd62e7..0000000
--- a/DLL/LC/Android/LCDeviceAddModule-2022-12-06.dll
+++ /dev/null
Binary files differ
diff --git a/DLL/LC/Android/LcVideoSdk-1.dll b/DLL/LC/Android/LcVideoSdk-1.dll
deleted file mode 100644
index be0179d..0000000
--- a/DLL/LC/Android/LcVideoSdk-1.dll
+++ /dev/null
Binary files differ
diff --git a/DLL/LC/Android/LcVideoSdk.dll b/DLL/LC/Android/LcVideoSdk.dll
index 9c65fd3..5418bb7 100644
--- a/DLL/LC/Android/LcVideoSdk.dll
+++ b/DLL/LC/Android/LcVideoSdk.dll
Binary files differ
diff --git a/DLL/Shared.Droid.JPush.dll b/DLL/Shared.Droid.JPush.dll
index e45eb53..8bf06ba 100644
--- a/DLL/Shared.Droid.JPush.dll
+++ b/DLL/Shared.Droid.JPush.dll
Binary files differ
diff --git a/DLL/Shared.Droid.JPush223.dll b/DLL/Shared.Droid.JPush223.dll
new file mode 100644
index 0000000..e45eb53
--- /dev/null
+++ b/DLL/Shared.Droid.JPush223.dll
Binary files differ
diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index 7e4223d..3805c35 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -5,6 +5,7 @@
using Android.App;
using Android.Content;
using Android.Net;
+using Android.Net.Wifi;
using Android.OS;
using Android.Runtime;
using Android.Widget;
@@ -24,6 +25,7 @@
[Android.App.Application(Theme = "@style/MyTheme")]
public class Application : Android.App.Application, Android.App.Application.IActivityLifecycleCallbacks
{
+ WifiManager.MulticastLock multicast;
static void reStartApp(Android.App.Application application)
{
@@ -43,6 +45,11 @@
}
base.OnCreate();
+
+ WifiManager manager = (WifiManager)this.GetSystemService(Context.WifiService);
+
+ multicast = manager.CreateMulticastLock("UDPwifi");
+
Language.CurrentLanguage = "Chinese";
Locale locale1 = Locale.Default;
@@ -97,9 +104,12 @@
{
Console.WriteLine("HHH OnActivityStarted锛歠oreground");
BusSocketStart();
+ multicast.Acquire();
+
//鍚庡彴鍥炲埌鍓嶅彴
new HDL_ON.UI.AppUnlockPage().LoadPage();
}
+
}
public void OnActivityStopped(Activity activity)
@@ -110,6 +120,7 @@
{
Console.WriteLine("HHH OnActivityStopped锛� background");
BusSocketStop();
+ multicast.Release();
//杩涘叆鍚庡彴
UserInfo.Current.unlockTime = DateTime.Now;
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 710afb0..6d53d64 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -20,7 +20,7 @@
19=The phone number is incorrect. Please re-enter.
20=The password and confirmation you typed do not match. Please re-enter your password.
21=The password format does not comply with the requirements, please enter again.
-22=The user has existed, yo24-hour defenseu can sign in directly.
+22=The user has existed, you can sign in directly.
23=Incorrect verification code, please re-enter.
24=Incorrect account number, please enter the correct email address.
25=Email address
@@ -434,7 +434,7 @@
448=Fixed deployment
449=*Undo defense does not affect
450=Disaster defense
-451=24-hour defense
+451=24h defense
452=Burglar alarm
453=Alarm mute
454=Deployment information
@@ -570,6 +570,23 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
+596=Group Name
+597=Please enter
+598=Select device
+599=Please input name
+600=Add combined dimming
+
+
2532=Visitor Invitation Record
@@ -1825,6 +1842,22 @@
583=钀ょ煶鎽勫儚澶�
584=甯冮槻鐘舵��
585=鑾峰彇绗笁鏂瑰钩鍙颁俊鎭け璐�
+586=鎺掑簭
+587=浜鸿劯绠$悊
+588=浜鸿劯淇℃伅閲囬泦鍗忚鎻愮ず
+589=涓嶅悓鎰�
+590=浣忓畢浜や粯
+591=*鎴愬憳鍚嶇О
+592=鎴愬憳璐﹀彿
+593=浜鸿劯鐓х墖
+594=璇疯緭鍏ユ垚鍛樺悕绉�
+595=鍒犻櫎浜鸿劯鏁版嵁
+596=缁勫悕绉�
+597=璇疯緭鍏�
+598=閫夋嫨缇ゆ帶璁惧
+599=璇疯緭鍏ョ粍鍚嶇О
+600=娣诲姞缁勫悎璋冨厜
+
2532=璁垮閭�璇疯褰�
@@ -3061,6 +3094,22 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
+596=Group Name
+597=Please enter
+598=Select device
+599=Please input name
+600=Add combined dimming
+
2532=Visitor Invitation Record
@@ -4280,7 +4329,21 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
-
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
+596=Group Name
+597=Please enter
+598=Select device
+599=Please input name
+600=Add combined dimming
2532=Visitor Invitation Record
@@ -5485,6 +5548,21 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
+596=Group Name
+597=Please enter
+598=Select device
+599=Please input name
+600=Add combined dimming
1000=袙谢邪卸薪芯褋褌 胁 褋褌邪褟褌邪
diff --git a/HDL-ON_Android/Assets/Phone/PersonalCenter/CombinedDimmingIcon.png b/HDL-ON_Android/Assets/Phone/PersonalCenter/CombinedDimmingIcon.png
new file mode 100644
index 0000000..3f836f1
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/PersonalCenter/CombinedDimmingIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 362f1aa..3b360ad 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:versionName="1.6.4" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202302201">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202303221">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
<!--鍙嬬洘-->
<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
diff --git a/HDL-ON_Android/Resources/values/styles.xml b/HDL-ON_Android/Resources/values/styles.xml
index e025194..23825bc 100644
--- a/HDL-ON_Android/Resources/values/styles.xml
+++ b/HDL-ON_Android/Resources/values/styles.xml
@@ -2,7 +2,7 @@
<resources >
<!-- 鍏朵腑parent鍙互涓� android:Theme 鎴� android:Theme.NoTitleBar; android:windowBackground鍙互涓鸿儗鏅浘 -->
<style name="MyTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">
- <item name="android:windowBackground">@drawable/launchimage</item>
+ <item name="android:windowBackground">@drawable/loading</item>
<!-- 闅愯棌鐘舵�佹爮 -->
<item name="android:windowFullscreen">false</item>
<!-- 闅愯棌鏍囬鏍� -->
@@ -11,7 +11,7 @@
</style>
<style name="SplashTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">
- <item name="android:windowBackground">@drawable/launchimage</item>
+ <item name="android:windowBackground">@drawable/loading</item>
<!-- 闅愯棌鐘舵�佹爮 -->
<item name="android:windowFullscreen">true</item>
<!-- 闅愯棌鏍囬鏍� -->
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index b8b4489..a76be6f 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -100,11 +100,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.6.402302222</string>
+ <string>1.6.602303293</string>
<key>CFBundleVersion</key>
- <string>1.6.402171</string>
- <key>NSLocationWhenInUseUsageDescription</key>
- <string>Use geographic location to provide services such as weather</string>
+ <string>1.6.603293</string>
<key>NSAppleMusicUsageDescription</key>
<string>App needs to access your music library to connect to an external player to play music.</string>
<key>NSLocationAlwaysUsageDescription</key>
@@ -140,6 +138,10 @@
<array>
<string>HDLRunSceneIntent</string>
</array>
+ <key>NSContactsUsageDescription</key>
+ <string>LC Video will be use</string>
+ <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
+ <string>LC Video will be use</string>
<key>Custom Property</key>
<string></string>
</dict>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 49881a2..e1a9b45 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -20,7 +20,7 @@
19=The phone number is incorrect. Please re-enter.
20=The password and confirmation you typed do not match. Please re-enter your password.
21=The password format does not comply with the requirements, please enter again.
-22=The user has existed, yo24-hour defenseu can sign in directly.
+22=The user has existed, you can sign in directly.
23=Incorrect verification code, please re-enter.
24=Incorrect account number, please enter the correct email address.
25=Email address
@@ -434,7 +434,7 @@
448=Fixed deployment
449=*Undo defense does not affect
450=Disaster defense
-451=24-hour defense
+451=24h defense
452=Burglar alarm
453=Alarm mute
454=Deployment information
@@ -570,6 +570,16 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
2532=Visitor Invitation Record
@@ -1133,7 +1143,6 @@
8509=Fluorite video door lock
8510=Call from the doorbell
8511=User Education
-
@@ -1824,6 +1833,17 @@
583=钀ょ煶鎽勫儚澶�
584=甯冮槻鐘舵��
585=鑾峰彇绗笁鏂瑰钩鍙颁俊鎭け璐�
+586=鎺掑簭
+587=浜鸿劯绠$悊
+588=浜鸿劯淇℃伅閲囬泦鍗忚鎻愮ず
+589=涓嶅悓鎰�
+590=浣忓畢浜や粯
+591=*鎴愬憳鍚嶇О
+592=鎴愬憳璐﹀彿
+593=浜鸿劯鐓х墖
+594=璇疯緭鍏ユ垚鍛樺悕绉�
+595=鍒犻櫎浜鸿劯鏁版嵁
+
2532=璁垮閭�璇疯褰�
@@ -3052,6 +3072,17 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
+
2532=Visitor Invitation Record
@@ -4271,6 +4302,16 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
@@ -5476,6 +5517,16 @@
583=EZVIZ
584=Deployment status
585=Failed to obtain third-party platform information
+586=Sort
+587=Face management
+588=Tip
+589=Disagree
+590=Residential delivery
+591=*Member name
+592=Member account
+593=Face photo
+594=Please enter member name
+595=Delete
1000=袙谢邪卸薪芯褋褌 胁 褋褌邪褟褌邪
diff --git a/HDL-ON_iOS/Resources/Phone/PersonalCenter/CombinedDimmingIcon.png b/HDL-ON_iOS/Resources/Phone/PersonalCenter/CombinedDimmingIcon.png
new file mode 100644
index 0000000..52310e3
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/PersonalCenter/CombinedDimmingIcon.png
Binary files differ
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 21dc2b4..1e28e4d 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -316,16 +316,18 @@
{
#if __IOS__
- var extUserResult = Ins.HttpRequest.GetExtUserId(DB_ResidenceData.Instance.CurrentRegion.id);
- if (extUserResult.Code == StateCode.SUCCESS)
+ List<VisitorTempPassword> dataList = new List<VisitorTempPassword>();
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id);
+ var requestJson = HttpUtil.GetSignRequestJson(dictionary);
+ ResponsePackNew pack = HttpUtil.RequestHttpsPost(NewAPI.Api_Post_GetExtMemberInfo, requestJson);
+ if(pack!= null)
{
- var data = JsonConvert.DeserializeObject<extUserInfo>(deviceResult.Data.ToString());
-
+ var data = Newtonsoft.Json.JsonConvert.DeserializeObject<FreeviewMemberInfo>(pack.Data.ToString());
//鐧诲綍鍏ㄨ閫�
- //Shared.IOS.HDLFVSDK.Video.Init("", data.extUserId, DB_ResidenceData.Instance.CurrentRegion.id, "78FF1E4D-FC0A-4E71-9B79-0448E4460BD7", "T0001", "120.77.53.170:9700", "120.77.53.170:21664");
+ Shared.IOS.HDLFVSDK.Video.Init("", data.extUserId, DB_ResidenceData.Instance.CurrentRegion.id, "78FF1E4D-FC0A-4E71-9B79-0448E4460BD7", "T0001", "120.77.53.170:9700", "120.77.53.170:21664");
+
}
-
-
#endif
}
@@ -343,12 +345,12 @@
complateDevice = true;
MainPage.Log($"============璁惧============瀹屾垚" + FunctionList.List.Functions.Count);
}
- })
- { IsBackground = true }.Start();
+ //})
+ //{ IsBackground = true }.Start();
- //===================鍦烘櫙==========================
- new System.Threading.Thread(() =>
- {
+ ////===================鍦烘櫙==========================
+ //new System.Threading.Thread(() =>
+ //{
try
{
complateScene = false;
diff --git a/HDL_ON/Common/ImageUtlis.cs b/HDL_ON/Common/ImageUtlis.cs
index 34c5bf5..87c0daf 100644
--- a/HDL_ON/Common/ImageUtlis.cs
+++ b/HDL_ON/Common/ImageUtlis.cs
@@ -281,7 +281,6 @@
if (imageView != null)
{
imageView.ImageBytes = imageBytes;
- //Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛");
}
});
}
diff --git a/HDL_ON/Common/OnAppConfig.cs b/HDL_ON/Common/OnAppConfig.cs
index 2bc3220..884c037 100644
--- a/HDL_ON/Common/OnAppConfig.cs
+++ b/HDL_ON/Common/OnAppConfig.cs
@@ -94,6 +94,10 @@
/// 绗竴娆″惎鍔╝pp
/// </summary>
public bool FirstRunApp = true;
+ /// <summary>
+ /// 鏄惁鍚屾剰浜鸿劯閲囬泦鍗忚
+ /// </summary>
+ public bool FaceManagementTip = false;
/// <summary>
/// 蹇界暐鏇存柊鐨勭増鏈彿
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 68e1690..0795813 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -6,6 +6,66 @@
{
/// <summary>
+ /// 娣诲姞缁勫悎璋冨厜
+ /// </summary>
+ public const int AddGroupControl = 600;
+ /// <summary>
+ /// 璇疯緭鍏ョ粍鍚嶇О
+ /// </summary>
+ public const int PlsEntryGroupName = 599;
+ /// <summary>
+ /// 閫夋嫨缇ゆ帶璁惧
+ /// </summary>
+ public const int SelectGroupControlFunction = 598;
+ /// <summary>
+ /// 璇疯緭鍏�
+ /// </summary>
+ public const int PlsEntry = 597;
+ /// <summary>
+ /// 缁勫悕绉�
+ /// </summary>
+ public const int GroupNmae = 596;
+ /// <summary>
+ /// 鍒犻櫎浜鸿劯鏁版嵁
+ /// </summary>
+ public const int DeleteMemberFace = 595;
+ /// <summary>
+ /// 璇疯緭鍏ユ垚鍛樺娉�
+ /// </summary>
+ public const int PlsEntrySubAccountRemark = 594;
+ /// <summary>
+ /// 浜鸿劯鐓х墖
+ /// </summary>
+ public const int MemberFace = 593;
+ /// <summary>
+ /// 鎴愬憳璐﹀彿
+ /// </summary>
+ public const int MemberAccount = 592;
+ /// <summary>
+ /// 鎴愬憳鍚嶇О
+ /// </summary>
+ public const int MemberName = 591;
+ /// <summary>
+ /// 浣忓畢浜や粯
+ /// </summary>
+ public const int ResidentialDelivery = 590;
+ /// <summary>
+ /// 涓嶅悓鎰�
+ /// </summary>
+ public const int Disagree = 589;
+ /// <summary>
+ /// 浜鸿劯淇℃伅閲囬泦鍗忚鎻愮ず
+ /// </summary>
+ public const int FaceProtocolPrompt = 588;
+ /// <summary>
+ /// 浜鸿劯绠$悊
+ /// </summary>
+ public const int FaceManagemant = 587;
+ /// <summary>
+ /// 鎺掑簭
+ /// </summary>
+ public const int Sort = 586;
+ /// <summary>
/// 鑾峰彇绗笁鏂瑰钩鍙颁俊鎭け璐�
/// </summary>
public const int Get3tyIotInfoFailed = 585;
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index bd951d5..bed293b 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1240,12 +1240,6 @@
{
localFunction.time_stamp = temp.time_stamp;
localFunction.SetAttrState(attr.key, attr.value);
- if (SPK.MusicSpkList().Contains(localFunction.spk))
- {
- Console.WriteLine("闊充箰鎾斁鍣ㄦ坊鍔犵紦瀛樻暟鎹�=======" + revString);
-
- }
-
}
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 383bda8..94ae641 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -446,8 +446,7 @@
}
#region 鏁版嵁鏇存柊鎺ㄩ�佷富棰�
//appHomeRefresh锛氫綇瀹呮暟鎹埛鏂伴�氱煡
- else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up"
- || topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up")
+ else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up")
{
MainPage.Log("浣忓畢鏁版嵁鍒锋柊閫氱煡");
new HttpServerRequest().GetHomePager();
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 621846c..449da8d 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -544,6 +544,13 @@
var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString());
if (homeList == null || homeList.Count == 0)
{
+ if (DB_ResidenceData.Instance.CurrentRegion.id != "")
+ {
+ Shared.Application.RunOnMainThread(() =>
+ {
+ MainPage.GoUserPage(false);
+ });
+ }
}
else
{
@@ -564,6 +571,10 @@
}
if (UserInfo.Current.regionList.Count == 0)
{
+ Shared.Application.RunOnMainThread(() =>
+ {
+ MainPage.GoUserPage(false);
+ });
return "null";
}
//-------濡傛灉璐﹀彿鏄娆$櫥褰�
@@ -726,7 +737,7 @@
{
var requestObj = new ChildDeleteObj()
{
- childAccountId = subaccount.childAccountId,
+ childId = subaccount.id,
homeId = subaccount.homeId
};
var requestJson = HttpUtil.GetSignRequestJson(requestObj);
@@ -741,12 +752,11 @@
/// <returns></returns>
public ResponsePackNew EditSubAccountNickName(string nickName, string childAccountId)
{
- var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj()
- {
- homeId = DB_ResidenceData.Instance.CurrentRegion.id,
- childAccountId = childAccountId,
- nickName = nickName,
- });
+ var d = new Dictionary<string, string>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("childId", childAccountId);
+ d.Add("nickName", nickName);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Update, requestJson);
}
@@ -761,7 +771,7 @@
var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj()
{
homeId = DB_ResidenceData.Instance.CurrentRegion.id,
- childAccountId = childAccountId,
+ childId = childAccountId,
isAllowCreateScene = isAllow,
});
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Update, requestJson);
@@ -977,10 +987,60 @@
public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName)
{
//娣诲姞瀛愯处鍙�
- var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id, account = subAccount, nickName = nickName };
+ var requestObj = new ChildAddObj()
+ {
+ homeId = DB_ResidenceData.Instance.CurrentRegion.id,
+ account = subAccount,
+ nickName = nickName
+ };
var requestJson = HttpUtil.GetSignRequestJson(requestObj);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson);
+ }
+ //v1.7鏇存柊鎺ュ彛
+ public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName,string faceUrl)
+ {
+ //娣诲姞瀛愯处鍙�
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("nickName", nickName);
+ if (!string.IsNullOrEmpty(subAccount))
+ {
+ d.Add("account", subAccount);
+ }
+ if (!string.IsNullOrEmpty(faceUrl))
+ {
+ d.Add("faceUrl", @"data:image/jpg;base64," + faceUrl);
+ }
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson);
+ }
+ /// <summary>
+ /// 鍒犻櫎鎴愬憳璐﹀彿浜鸿劯鏁版嵁
+ /// </summary>
+ /// <param name="subAccount"></param>
+ /// <param name="nickName"></param>
+ /// <param name="faceUrl"></param>
+ /// <returns></returns>
+ public ResponsePackNew DeleteMemberFace( string childId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("childId", childId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_RemoveFace, requestJson);
+ }
+ /// <summary>
+ /// 鏇存柊鎴愬憳璐﹀彿浜鸿劯鏁版嵁
+ /// </summary>
+ public ResponsePackNew UpdataMemberFace(string childId, string faceUrl)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("childId", childId);
+ d.Add("userFace", @"data:image/jpg;base64," + faceUrl);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_UpdateFace, requestJson);
}
/// <summary>
@@ -3088,7 +3148,7 @@
-#region 鍏変紡鍌ㄨ兘
+ #region 鍏変紡鍌ㄨ兘
/// <summary>
/// 鑾峰彇浣忓畢涓嬮�嗗彉鍣ㄥ垪琛�
/// </summary>
@@ -3113,7 +3173,55 @@
var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetInverter_StatisticsInfo, requestJson);
return pack;
}
-#endregion
+ #endregion
+
+
+ #region 缇ゆ帶锛岀粍鍚堣皟鍏�
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶绫诲瀷
+ /// </summary>
+ /// <param name="spk"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetGroupControlTypes(string spk)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("spk", spk);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlTypes, requestJson);
+ return pack;
+ }
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶鍒楄〃
+ /// </summary>
+ /// <param name="spk"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetGroupControlList()
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, requestJson);
+ return pack;
+ }
+
+
+ /// <summary>
+ /// 娣诲姞缇ゆ帶鍒楄〃
+ /// </summary>
+ /// <param name="spk"></param>
+ /// <returns></returns>
+ public ResponsePackNew AddGroupControl(List<GroupControl> groupControls)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
+ d.Add("infos", groupControls);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, requestJson);
+ return pack;
+ }
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 511a91e..aa884c3 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -6,6 +6,7 @@
using System.Text;
using HDL_ON.Entity;
using RestSharp;
+using Shared;
namespace HDL_ON.DAL.Server
{
@@ -18,7 +19,12 @@
/// 鍏叡鍩熷悕灏辫繎瑙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://test-gz.hdlcontrol.com";
+ const string APP_KEY = "HDL-HOME-APP-TEST";
+ const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+ //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
+ //const string APP_KEY = "CPEVRLRT";
+ //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";
/// <summary>
/// RegionMark
/// </summary>
@@ -167,6 +173,7 @@
RestRequest request = new RestRequest(method);
request.Timeout = mTimeout * 1000;
request.AddHeader("content-type", "application/json");
+ request.AddHeader("language", Language.CurrentLanguage == "Chinese" ? "cn" : "en");//澧炲姞璇█鏍囪瘑 wxr 2023-03-22 17:03:34
if (string.IsNullOrEmpty(replaceToken))
{
@@ -179,6 +186,7 @@
{
request.AddHeader("Authorization", replaceToken);
}
+
if (bodyParameterJson != null)
{
@@ -230,7 +238,7 @@
}
else
{
- HDL_ON.Utlis.WriteLine(response.Content);
+ HDL_ON.Utlis.WriteLine($"鎺ュ彛寮傚父:{requestFullUrl} \r\n"+response.ErrorMessage);
return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR };
}
@@ -521,14 +529,6 @@
#endregion
#region **********绛惧悕鏍¢獙**********
- /// <summary>
- ///
- /// </summary>
- const string APP_KEY = "HDL-HOME-APP-TEST";
- /// <summary>
- ///
- /// </summary>
- const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
/// <summary>
/// 鑾峰彇褰撳墠鏃堕棿鎴冲��
diff --git a/HDL_ON/DAL/Server/IMessageCommon.cs b/HDL_ON/DAL/Server/IMessageCommon.cs
index c6d29f4..61819a7 100644
--- a/HDL_ON/DAL/Server/IMessageCommon.cs
+++ b/HDL_ON/DAL/Server/IMessageCommon.cs
@@ -272,6 +272,7 @@
{
var tip = new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
Text = mes,
CloseTime = closeTime,
Direction = AMPopTipDirection.None
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index dbdee41..c987e9d 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -92,6 +92,10 @@
/// 鑾峰彇涓存椂瀵嗙爜
/// </summary>
public const string API_POST_GET_TEMP_PASSWORD_LIST = "/community-wisdom/app/visitor/freeview/page";
+ /// <summary>
+ /// 鑾峰彇绗笁鏂规敞鍐岀殑鐢ㄦ埛淇℃伅
+ /// </summary>
+ public const string Api_Post_GetExtMemberInfo = "/community-wisdom/app/visitor/freeview/getExtMemberInfo";
#endregion
/// <summary>
@@ -154,6 +158,14 @@
/// 鏇存柊杩滅▼鎺у埗
/// </summary>
public const string API_POST_Child_Update = "/home-wisdom/app/child/account/update";
+ /// <summary>
+ /// 鏇存柊鎴愬憳璐﹀彿浜鸿劯淇℃伅
+ /// </summary>
+ public const string API_POST_Child_UpdateFace = "/home-wisdom/app/child/account/updateFace";
+ /// <summary>
+ /// 鍒犻櫎鎴愬憳璐﹀彿浜鸿劯淇℃伅
+ /// </summary>
+ public const string API_POST_Child_RemoveFace = "/home-wisdom/app/child/account/removeFace";
/// <summary>
/// 瀛愯处鍙风鐞嗗憳鑾峰彇涓昏处鍙锋巿鏉僒oken
/// </summary>
@@ -903,6 +915,50 @@
public const string Api_Post_GetInverter_StatisticsInfo = "/home-wisdom/app/device/inverter/allInfo";
#endregion
+ #region 缇ゆ帶锛岀粍鍚堣皟鍏�
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶绫诲瀷
+ /// </summary>
+ public const string Api_Post_GetGroupControlTypes = "/home-wisdom/app/device/groupcontrol/types";
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶鍒楄〃
+ /// </summary>
+ public const string Api_Post_GetGroupControlListByHome = "/home-wisdom/app/device/groupcontrol/list";
+ /// <summary>
+ /// 鑾峰彇缇ゆ帶璇︽儏
+ /// </summary>
+ public const string Api_Post_GetGroupControlInfos = "/home-wisdom/app/device/groupcontrol/infos";
+ /// <summary>
+ /// 娣诲姞缇ゆ帶
+ /// </summary>
+ public const string Api_Post_AddGroupControl = "/home-wisdom/app/device/groupcontrol/add";
+ /// <summary>
+ /// 鏇存柊缇ゆ帶
+ /// </summary>
+ public const string Api_Post_UpdateGroupControl = "/home-wisdom/app/device/groupcontrol/update";
+ /// <summary>
+ /// 鍒犻櫎缇ゆ帶
+ /// </summary>
+ public const string Api_Post_DeleteGroupControl = "/home-wisdom/app/device/groupcontrol/deleted";
+ /// <summary>
+ /// 鏀惰棌缇ゆ帶
+ /// </summary>
+ public const string Api_Post_CollectGroupControl = "/home-wisdom/app/device/groupcontrol/collect";
+ /// <summary>
+ /// 鍙栨秷鏀惰棌缇ゆ帶
+ /// </summary>
+ public const string Api_Post_CancelCollectGroupControl = "/home-wisdom/app/device/groupcontrol/cancelCollect";
+ /// <summary>
+ /// 鎺у埗缇ゆ帶
+ /// </summary>
+ public const string Api_Post_ControlGroupControl = "/home-wisdom/app/device/groupcontrol/controlDown";
+ /// <summary>
+ /// 缇ゆ帶鐘舵�佸埛鏂�
+ /// </summary>
+ public const string Api_Post_ReadGroupControlStatus = "/home-wisdom/app/device/groupcontrol/statusRefresh";
+
+ #endregion
+
}
///// <summary>
diff --git a/HDL_ON/DAL/Server/NewApiRes.cs b/HDL_ON/DAL/Server/NewApiRes.cs
index 6bb1700..955e396 100644
--- a/HDL_ON/DAL/Server/NewApiRes.cs
+++ b/HDL_ON/DAL/Server/NewApiRes.cs
@@ -885,7 +885,7 @@
/// <summary>
/// 瀛愯处鍙稩D childAccountId
/// </summary>
- public string childAccountId;
+ public string childId;
/// <summary>
/// 浣忓畢
/// </summary>
@@ -908,7 +908,7 @@
/// <summary>
/// 瀛愯处鎴风被鍨� ORDINARY銆丏EBUG銆丄DMIN
/// </summary>
- public string childAccountType;
+ //public string childAccountType;
///// <summary>
///// 鏄惁鍏佽杩滅▼鎺у埗 0:鍏佽 1:涓嶅厑璁�
///// </summary>
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 4793b16..af35197 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -523,6 +523,14 @@
SetAttrState(sta.key, sta.value);
}
}
+ /// <summary>
+ /// 鍔熻兘鍒楄〃鎺掑簭
+ /// </summary>
+ public int FunctionOrderNumber = 9999;
+ /// <summary>
+ /// 鎴块棿鍒楄〃鎺掑簭
+ /// </summary>
+ public int RoomOrderNumber = 9999;
/// <summary>
@@ -743,7 +751,7 @@
foreach (var attr in attributes)
{
//绐楀笜鍚屾椂鍙戦�佸紑鍏宠窡鐧惧垎姣斾細鏈夐棶棰橈紝
- if(spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex)
+ if(spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex || spk == SPK.CurtainDream)
{
if (attr.key == FunctionAttributeKey.OnOff)
{
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index a6b5568..492def1 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -624,7 +624,7 @@
var perAngle = status.Find((obj) => obj.key == FunctionAttributeKey.Angle);
if (perAngle != null)
{
- sceneFunctionInfo += " " + perState.value + "掳";
+ sceneFunctionInfo += " " + perAngle.value + "掳";
}
return sceneFunctionInfo;
}
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index a50ecf8..2f075d3 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -105,7 +105,7 @@
/// <returns></returns>
public List<Function> GetAcstParentList()
{
- return Functions.FindAll((obj) => obj.spk == SPK.AcstParent);
+ return Functions.FindAll((obj) => obj.spk == SPK.AcstParent);//.OrderByDescending(o=>o.controlCounter).ToList()
}
/// <summary>
diff --git a/HDL_ON/Entity/ResponseEntity/FreeviewMemberInfo.cs b/HDL_ON/Entity/ResponseEntity/FreeviewMemberInfo.cs
new file mode 100644
index 0000000..610ad6c
--- /dev/null
+++ b/HDL_ON/Entity/ResponseEntity/FreeviewMemberInfo.cs
@@ -0,0 +1,39 @@
+锘縰sing System;
+namespace HDL_ON.Entity
+{
+
+
+ /// <summary>
+ /// 鍏ㄨ閫氫俊鎭被
+ /// </summary>
+ public class FreeviewMemberInfo
+ {
+ public FreeviewMemberInfo()
+ {
+ }
+ /// <summary>
+ /// 绗笁鏂规敞鍐岀殑userid
+ /// </summary>
+ public string extUserId = string.Empty;
+ /// <summary>
+ /// 绗笁鏂瑰钩鍙�
+ /// </summary>
+ public string extPlatform = string.Empty;
+ /// <summary>
+ /// 绗笁鏂瑰钩鍙癐P
+ /// </summary>
+ public string extServerIp = string.Empty;
+ /// <summary>
+ /// 绗笁鏂圭鎴风紪鐮�
+ /// </summary>
+ public string extTenantCode = string.Empty;
+ /// <summary>
+ /// 绗笁鏂箄uid
+ /// </summary>
+ public string extUUID = string.Empty;
+ /// <summary>
+ /// 闄勫姞鏁版嵁
+ /// </summary>
+ public string extra = string.Empty;
+ }
+}
diff --git a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
index 5266a87..387964a 100644
--- a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
+++ b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
@@ -89,7 +89,7 @@
/// <summary>
/// 浜や粯鐘舵��
/// </summary>
- public string deliverstatus;
+ public string deliverStatus;
/// <summary>
/// 浣忓畢绫诲瀷 Zigbee, Buspro, A
/// </summary>
@@ -126,6 +126,15 @@
/// 缃戝叧鏈湴閫氫俊鍔犲瘑Key锛屽悓涓�涓綇瀹� 瀵嗛挜鍒涘缓鍚庡氨涓嶅彉
/// </summary>
public string localSecret;
+
+ /// <summary>
+ /// 浜や粯閾炬帴
+ /// </summary>
+ public string deliverUrl;
+ /// <summary>
+ /// 鏄惁鏀寔缇ゆ帶
+ /// </summary>
+ public bool isSupportGroupControl = false;
}
}
diff --git a/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs b/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs
index 36ad814..36b2dd1 100644
--- a/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs
+++ b/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs
@@ -13,6 +13,16 @@
public ResidenceMemberInfo()
{
}
+ /// <summary>
+ /// 鏄惁铏氭嫙璐﹀彿
+ /// </summary>
+ public bool isVirtualAccount
+ {
+ get
+ {
+ return string.IsNullOrEmpty(childAccountId);
+ }
+ }
//public string Account = "";
//public string UserName = "";
@@ -101,6 +111,10 @@
/// </summary>
public string memberHeadIcon;
/// <summary>
+ /// 浜鸿劯鐓х墖
+ /// </summary>
+ public string userFaceUrl;
+ /// <summary>
/// 鐢ㄦ埛璐﹀彿
/// 浼樺厛鏄剧ず鎵嬫満鍙凤紝濡傛灉鎵嬫満鍙蜂负绌哄垯鏄剧ず閭鍦板潃
/// </summary>
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 250013a..5386afe 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -534,6 +534,16 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\CommonMethod.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockListPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\OrderFunctionPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Face\FaceManagementPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\DeliveryQrCodePage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\MemberManagement\MemberFaceManagementPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\CombinedDimmingListPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\GroupControl.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\AddCombineDimmingPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Entity\ResponseEntity\FreeviewMemberInfo.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\GroupChooseRoomPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\AddGroupControlPage.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
@@ -561,5 +571,7 @@
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\LightScene\" />
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\" />
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Acst\" />
+ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Face\" />
+ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index c5ddbfa..4aa662a 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.6.4";
+ public static string VersionString = "1.6.6";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
@@ -405,6 +405,7 @@
{
if (waitPage != null)
{
+ waitPage.Hide();
waitPage.RemoveFromParent();
waitPage = null;
}
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index 7c35a74..1bd77d6 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -546,86 +546,105 @@
/// <param name="title"></param>
/// <param name="msg"></param>
/// <param name="action"></param>
- public void TipMsg(string title, string msg, Action action = null)
+ public void TipMsg(string title, string msg, Action action = null,bool again = true)
{
-
- Dialog dialog = new Dialog()
+ try
{
- BackgroundColor = CSS_Color.DialogTransparentColor1,
- };
+ Dialog dialog = new Dialog()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
- FrameLayout contentView = new FrameLayout()
+ FrameLayout contentView = new FrameLayout()
+ {
+ Gravity = Gravity.Center,
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(140),
+ BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+ BorderColor = 0x00000000,
+ BorderWidth = 0,
+ Radius = (uint)Application.GetMinRealAverage(10),
+ };
+ dialog.AddChidren(contentView);
+
+ Button btnTitle = new Button()
+ {
+ Y = Application.GetRealHeight(16),
+ Height = Application.GetRealHeight(30),
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.Center,
+ IsBold = true,
+ Text = title
+ };
+ contentView.AddChidren(btnTitle);
+
+ Button btnMsg = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(35),
+ Y = btnTitle.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = msg,
+ IsMoreLines = true,
+ };
+ contentView.AddChidren(btnMsg);
+
+ Button btnLine = new Button()
+ {
+ Y = Application.GetRealHeight(96),
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS.CSS_Color.DividingLineColor,
+ };
+ contentView.AddChidren(btnLine);
+
+ Button btnConfirm = new Button()
+ {
+ Y = btnLine.Bottom,
+ Height = Application.GetRealHeight(43),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ SelectedTextColor = CSS_Color.MainBackgroundColor,
+ SelectedBackgroundColor = CSS_Color.MainColor,
+ TextID = StringId.Confirm,
+ };
+ contentView.AddChidren(btnConfirm);
+
+ dialog.Show();
+
+ btnConfirm.MouseDownEventHandler += (sender, e) =>
+ {
+ btnConfirm.IsSelected = true;
+ };
+ btnConfirm.MouseUpEventHandler += (sender, e) =>
+ {
+ btnConfirm.IsSelected = false;
+ action?.Invoke();
+ dialog.Close();
+ };
+ }catch(Exception ex)
{
- Gravity = Gravity.Center,
- Width = Application.GetRealWidth(270),
- Height = Application.GetRealHeight(140),
- BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
- BorderColor = 0x00000000,
- BorderWidth = 0,
- Radius = (uint)Application.GetMinRealAverage(10),
- };
- dialog.AddChidren(contentView);
-
- Button btnTitle = new Button()
+ MainPage.Log($"lc add fail:{ex.Message}");
+ if (again)
+ {
+ new System.Threading.Thread(() =>
+ {
+ System.Threading.Thread.Sleep(500);
+ Application.RunOnMainThread(() =>
+ {
+ TipMsg(title, msg, action, false);
+ });
+ }).Start() ;
+ }
+ }
+ finally
{
- Y = Application.GetRealHeight(16),
- Height = Application.GetRealHeight(30),
- TextColor = CSS_Color.MainColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextAlignment = TextAlignment.Center,
- IsBold = true,
- Text = title
- };
- contentView.AddChidren(btnTitle);
-
- Button btnMsg = new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Height = Application.GetRealHeight(35),
- Y = btnTitle.Bottom,
- Width = Application.GetRealHeight(200),
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.TextualColor,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = msg,
- IsMoreLines = true,
- };
- contentView.AddChidren(btnMsg);
-
- Button btnLine = new Button()
- {
- Y = Application.GetRealHeight(96),
- Height = Application.GetRealHeight(1),
- BackgroundColor = CSS.CSS_Color.DividingLineColor,
- };
- contentView.AddChidren(btnLine);
-
- Button btnConfirm = new Button()
- {
- Y = btnLine.Bottom,
- Height = Application.GetRealHeight(43),
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.TextualColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- SelectedTextColor = CSS_Color.MainBackgroundColor,
- SelectedBackgroundColor = CSS_Color.MainColor,
- TextID = StringId.Confirm,
- };
- contentView.AddChidren(btnConfirm);
-
- dialog.Show();
-
- btnConfirm.MouseDownEventHandler += (sender, e) =>
- {
- btnConfirm.IsSelected = true;
- };
- btnConfirm.MouseUpEventHandler += (sender, e) =>
- {
- btnConfirm.IsSelected = false;
- action?.Invoke();
- dialog.Close();
- };
-
+
+ }
}
diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index 7951076..8bcda0b 100644
--- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs
+++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -26,6 +26,7 @@
/// </summary>
Button btnBack;
+ public Button btnTilte;
/// <summary>
/// 鏍囬鍚嶇О
/// </summary>
@@ -79,7 +80,7 @@
/// </summary>
/// <param name="frame"></param>
/// <param name="tilte"></param>
- public void LoadTopView(uint color = CSS_Color.TopViewColor)
+ public void LoadTopView(uint color = CSS_Color.TopViewColor)//,Action<List<Function> action
{
contentView = new FrameLayout()
{
@@ -98,7 +99,7 @@
};
contentView.AddChidren(btnBackIcon);
- Button btnTilte = new Button()
+ btnTilte = new Button()
{
Gravity = Gravity.CenterHorizontal,
Y = Application.GetRealHeight(30),
@@ -110,6 +111,7 @@
Text = title
};
contentView.AddChidren(btnTilte);
+
btnBack = new Button()
diff --git a/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs b/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
index 79dced0..ecef487 100644
--- a/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
@@ -183,6 +183,7 @@
HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
CloseTime = 1,
Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
Direction = AMPopTipDirection.None,
@@ -206,6 +207,7 @@
HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
CloseTime = 1,
Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
Direction = AMPopTipDirection.None,
@@ -243,6 +245,7 @@
HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error);
new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
CloseTime = 1,
Direction = AMPopTipDirection.None,
Text = Language.StringByID(StringId.PasswordIsUnqualified)
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 6bf3817..71751c8 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -35,7 +35,7 @@
base.RemoveFromParent();
- ////2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
+ //2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
//Application.HideSoftInput();
}
@@ -218,10 +218,10 @@
//etAccount.Text = "tf@smarttech.com.ua";
//etAccount.Text = "455740454@qq.com";
//etAccount.Text = "18688565449";
- //etAccount.Text = "support7@hdlautomation.com";
+ etAccount.Text = "support7@hdlautomation.com";
//etAccount.Text = "18570064522";
//etAccount.Text = "18718417827";
- etAccount.Text = "18188019284";
+ //etAccount.Text = "18188019284";
//etAccount.Text = "13143792049";
//etAccount.Text = "13288623489";//缃楁檽涓�
//etAccount.Text = "18244942707";
@@ -232,14 +232,15 @@
//etAccount.Text = "13418062953";
etAccount.Text = "13138683659";
//etAccount.Text = "15217626103";
- etAccount.Text = "13377799637";
+ //etAccount.Text = "18100573477";
+ //etAccount.Text = "18321091245";
+ //etAccount.Text = "13751916353";
+ etAccount.Text = "a18903011008@163.com";
}
else
{
- //etAccount.Text = "15018447586";//闊充箰鏁伴噺鍒锋柊闂
//etAccount.Text = "464027401@qq.com";//
//etAccount.Text = "15217626103";//
- //etAccount.Text = "13682244600";//娉㈠摜
etAccount.Text = "13168123446";//鏄嗘槑閲戣寕椤圭洰锛屾柊椋庨棶棰�
//etAccount.Text = "2949126848@qq.com";//闄堢惓
etAccount.Text = "15014291819 ";
@@ -283,9 +284,12 @@
{
etPassword.Text = "wsad123321";
}
- else if (etAccount.Text == "13377799637")
+ else if (etAccount.Text == "18100573477")
{
- etPassword.Text = "lc392962649";
+ etPassword.Text = "huang12345";
+ }else if(etAccount.Text == "13751916353")
+ {
+ etPassword.Text = "hdl1985";
}
//etPassword.Text = "Hdl85521566";
btnLogin.IsSelected = true;
@@ -314,7 +318,7 @@
Height = Application.GetRealHeight(40),
TextID = StringId.LoginByEmail,
TextColor = CSS_Color.PromptingColor1,
- TextAlignment = TextAlignment.Center,
+ TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.TextFontSize,
};
bodyView.AddChidren(btnEmailLogin);
diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index 8766b65..e2fbe02 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -60,6 +60,7 @@
{
var tip = new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.PlsEntryPhoneNumber),
CloseTime = 1,
Direction = AMPopTipDirection.None
@@ -74,6 +75,7 @@
{
var tip = new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
CloseTime = 1,
Direction = AMPopTipDirection.None
@@ -390,6 +392,7 @@
{
var tip = new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
CloseTime = 1,
Direction = AMPopTipDirection.None
@@ -413,6 +416,7 @@
{
var tip = new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
CloseTime = 1,
Direction = AMPopTipDirection.None
@@ -496,6 +500,7 @@
{
var tip = new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
CloseTime = 1,
Direction = AMPopTipDirection.None
diff --git a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
index 4e2b8ce..de7d890 100644
--- a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
@@ -197,6 +197,7 @@
btnGetVerificationCode_Phone.IsSelected = false;
new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
CloseTime = 1,
Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
Direction = AMPopTipDirection.None,
@@ -225,6 +226,7 @@
btnGetVerificationCode_Mail.IsSelected = false;
new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
CloseTime = 1,
Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
Direction = AMPopTipDirection.None,
@@ -268,6 +270,7 @@
HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error);
new Tip()
{
+ MaxWidth = Application.GetRealWidth(300),
CloseTime = 1,
Direction = AMPopTipDirection.None,
Text = Language.StringByID(StringId.PlsRegisterPassword)
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 397a9fa..221c195 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -466,6 +466,19 @@
};
bodyDiv.AddChidren(btnOffline);
}
+ //鎺掑簭
+ //btnIcon.MouseLongEventHandler = (sender, e) => {
+ // OrderEvent();
+ //};
+ //btnName.MouseLongEventHandler = (sender, e) => {
+ // OrderEvent();
+ //};
+ //btnFromFloor.MouseLongEventHandler = (sender, e) => {
+ // OrderEvent();
+ //};
+ //bodyDiv.MouseLongEventHandler = (sender, e) => {
+ // OrderEvent();
+ //};
}
/// <summary>
@@ -628,6 +641,11 @@
}
/// <summary>
+ /// 鎺掑簭浜嬩欢
+ /// </summary>
+ public Action OrderEvent;
+
+ /// <summary>
/// 鍔犺浇闊充箰鍔熻兘鎺у埗鍗$墖
/// </summary>
void MusicFragment()
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
index 3e55089..74b7a31 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -39,7 +39,7 @@
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
- if (titleId == StringId.Lights)
+ if (titleId == StringId.Lights && !DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl)
{
Action action = () =>
{
@@ -267,6 +267,7 @@
Tag = function.spk + function.sid
};
functionDiv.LoadFunctionDiv();
+ functionDiv.OrderEvent = OrderEvent;
functionListView.AddChidren(functionDiv);
}
else if (function.spk == SPK.IpCam_Imou)
@@ -300,6 +301,7 @@
Tag = function.spk + function.sid
};
functionDiv.LoadFunctionDiv();
+ functionDiv.OrderEvent = OrderEvent;
functionListView.AddChidren(functionDiv);
}
functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(10) });
@@ -346,7 +348,21 @@
})
{ IsBackground = true }.Start();
}
-
+ /// <summary>
+ /// 鎺掑簭浜嬩欢
+ /// </summary>
+ void OrderEvent()
+ {
+ Action action = () =>
+ {
+ functionList = functionList.OrderBy(o => o.FunctionOrderNumber).ToList();
+ ShowFunctionRow(functionList);
+ };
+ var skipView = new OrderFunctionPage();
+ MainPage.BasePageView.AddChidren(skipView);
+ skipView.LoadPage(functionList, action);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
///// <summary>
///// 鍔犺浇鍔熻兘绫诲瀷鎺у埗鍗$墖
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 7c63f6c..58b303f 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -2345,6 +2345,7 @@
break;
case SPK.AcStandard:
case SPK.HvacAC:
+ case SPK.AcIr:
case SPK.FloorHeatStandard:
case SPK.HvacFloorHeat:
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 7b9e37d..c0e98f6 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -423,6 +423,7 @@
}
break;
case SPK.AcStandard:
+ case SPK.AcIr:
case SPK.HvacAC:
{
strPath = "LogicIcon/airconditionerlogic.png";
@@ -738,6 +739,7 @@
functionTypeList.Add(SPK.CurtainTrietex);
functionTypeList.Add(SPK.AcStandard);
functionTypeList.Add(SPK.HvacAC);
+ functionTypeList.Add(SPK.AcIr);
functionTypeList.Add(SPK.FloorHeatStandard);
functionTypeList.Add(SPK.HvacFloorHeat);
functionTypeList.Add(SPK.AirFreshStandard);
@@ -805,7 +807,7 @@
deviceTypeList.Add(SPK.CurtainSwitch);
deviceTypeList.Add(SPK.CurtainRoller);
deviceTypeList.Add(SPK.CurtainTrietex);
- deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC);
+ deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC);deviceTypeList.Add(SPK.AcIr);
deviceTypeList.Add(SPK.AirFreshStandard); deviceTypeList.Add(SPK.HvacAirFresh);
deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat);
deviceTypeList.Add(SPK.SensorSmoke);
@@ -853,7 +855,7 @@
deviceTypeList.Add(SPK.CurtainSwitch);
deviceTypeList.Add(SPK.CurtainRoller);
deviceTypeList.Add(SPK.CurtainTrietex);
- deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC);
+ deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC); deviceTypeList.Add(SPK.AcIr);
deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat);
deviceTypeList.Add(SPK.AirFreshStandard); deviceTypeList.Add(SPK.HvacAirFresh);
deviceTypeList.Add(SPK.AirSwitch);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 519be9f..69ab0ce 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -700,6 +700,7 @@
break;
}
case SPK.HvacAC:
+ case SPK.AcIr:
case SPK.AcStandard:
case SPK.FloorHeatStandard:
case SPK.HvacFloorHeat:
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index 6f695e2..cb55326 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -25,7 +25,13 @@
sceneFunction = fc.localFunction.ConvertSceneFunction();
foreach(var ll in sceneFunction.status)
{
- ll.value = fc.status.Find((obj) => obj.key == ll.key).value;
+ try
+ {
+ var temp = fc.status.Find((obj) => obj.key == ll.key);
+ if (temp != null)
+ ll.value = temp.value;
+ }
+ catch { }
}
//sceneFunction = fc;
refreshAction = action;
@@ -148,15 +154,6 @@
btnConfrim.MouseUpEventHandler = (sender, e) =>
{
var temp = scene.functions.Find((obj) => obj.sid == sceneFunction.sid);
- //if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness) != null)
- //{
- // try
- // {
- // //涓�绔彛涓嶆敮鎸佸紑鍏冲�间笌浜害鍊间竴璧峰鐞嗭紝闇�瑕佸皢寮�鍏冲�肩Щ闄ゆ帀
- // sceneFunction.status.Remove(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff));
- // }
- // catch { }
- //}
if (temp != null)
{
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
index 7101fbe..11bd0d2 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
@@ -107,6 +107,10 @@
bool isFrist = true;
foreach (var brand in brandList)
{
+ if(brand.productPlatform == "HaiLin")//瀛愭櫞闇�瑕侀殣钘忚繖涓叆鍙o紝鐢辫皟璇曡蒋浠朵笂浼犳暟鎹� 2023-03-09 17:20:33
+ {
+ continue;
+ }
var row = new RowLayout()
{
Height = Application.GetRealHeight(87),
@@ -165,13 +169,17 @@
//涓嬭浇绗笁鏂瑰搧鐗宨con
ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.brandIcon, btnIcon);
- btnName.MouseUpEventHandler = (sender, e) => {
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
var page = new DeviceListPage(brand);
MainPage.BasePageView.AddChidren(page);
page.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
+ btnName.MouseUpEventHandler = eventHandler;
+ btnIcon.MouseUpEventHandler = eventHandler;
+ btnRight.MouseUpEventHandler = eventHandler;
+ row.MouseUpEventHandler = eventHandler;
}
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddCombineDimmingPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddCombineDimmingPage.cs
new file mode 100644
index 0000000..b5611fd
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddCombineDimmingPage.cs
@@ -0,0 +1,264 @@
+锘�//using System;
+//using Shared;
+//using HDL_ON.Entity;
+//using HDL_ON.UI.CSS;
+
+//namespace HDL_ON.UI
+//{
+// public class AddCombineDimmingPage : FrameLayout
+// {
+// FrameLayout bodyView;
+
+
+// GroupControl groupControl;
+
+// public AddCombineDimmingPage()
+// {
+// bodyView = this;
+// groupControl = new GroupControl();
+// }
+
+// public void LoadPage()
+// {
+// new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView();
+
+// var contentView = new FrameLayout()
+// {
+// Y = Application.GetRealHeight(64),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// Height = Application.GetRealHeight(550),
+// };
+// bodyView.AddChidren(contentView);
+
+// #region 缁勫悕绉�
+// FrameLayout groupNameView;
+// groupNameView = new FrameLayout()
+// {
+// Height = Application.GetRealHeight(50),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// };
+// contentView.AddChidren(groupNameView);
+// Button btnGroupNameTitle = new Button()
+// {
+// X = Application.GetRealWidth(16),
+// Width = Application.GetRealWidth(78),
+// TextID = StringId.GroupNmae,
+// TextAlignment = TextAlignment.CenterLeft,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// };
+// groupNameView.AddChidren(btnGroupNameTitle);
+
+// var btnGroupName = new EditText()
+// {
+// X = Application.GetRealWidth(155),
+// Width = Application.GetRealWidth(200),
+// PlaceholderText =Language.StringByID( StringId.PlsEntry),
+// TextSize = CSS_FontSize.TextFontSize,
+// TextAlignment = TextAlignment.CenterRight,
+// TextColor = CSS_Color.TextualColor,
+// };
+// groupNameView.AddChidren(btnGroupName);
+
+// groupNameView.AddChidren(
+// new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(49),
+// Height = Application.GetRealHeight(1),
+// Width = Application.GetRealWidth(343),
+// BackgroundColor = CSS_Color.DividingLineColor,
+// });
+// #endregion
+// #region 浣嶇疆绠$悊
+// var locationMagtView = new FrameLayout()
+// {
+// 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);
+
+// var btnLocationValues = new Button()
+// {
+// X = Application.GetRealWidth(86),
+// Width = Application.GetRealWidth(237),
+// TextAlignment = TextAlignment.CenterRight,
+// TextColor = CSS_Color.PromptingColor1,
+// TextSize = CSS_FontSize.TextFontSize,
+// Text = groupControl.GetRoomListName(),
+// };
+// locationMagtView.AddChidren(btnLocationValues);
+
+// var 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);
+// EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+// {
+// //淇敼鍔熻兘鎵�灞炴埧闂翠箣鍚庣殑鍥炶皟浜嬩欢
+// Action chooseRoomBackAction = () => {
+// try
+// {
+// btnLocationValues.Text = groupControl.GetRoomListName();
+// }
+// catch { }
+// };
+// var view = new GroupChooseRoomPage(groupControl, chooseRoomBackAction);
+// MainPage.BasePageView.AddChidren(view);
+// view.LoadPage();
+// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+// };
+// if (btnLocationInfoRight != null)
+// {
+// btnLocationInfoRight.MouseUpEventHandler = eventHandler;
+// }
+// if (btnLocationValues != null)
+// {
+// btnLocationValues.MouseUpEventHandler = eventHandler;
+// }
+
+// locationMagtView.AddChidren(
+// new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// BackgroundColor = CSS_Color.DividingLineColor,
+// Width = Application.GetRealWidth(343),
+// Height = Application.GetRealHeight(1)
+// });
+// #endregion
+
+// #region 璁惧閫夋嫨
+// contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
+
+// var chooseFunctionTitleView = new FrameLayout()
+// {
+// Height = Application.GetRealHeight(44),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// };
+// contentView.AddChidren(chooseFunctionTitleView);
+// contentView.AddChidren(
+// new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(49),
+// Height = Application.GetRealHeight(1),
+// Width = Application.GetRealWidth(343),
+// BackgroundColor = CSS_Color.DividingLineColor,
+// });
+
+// var btnChooseFunctionTitle = new Button()
+// {
+// X = Application.GetRealWidth(16),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = CSS_Color.MainColor,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// IsBold = true,
+// TextID = StringId.SelectGroupControlFunction,
+// };
+// chooseFunctionTitleView.AddChidren(btnChooseFunctionTitle);
+
+// var deviceListView = new VerticalScrolViewLayout()
+// {
+// Height = Application.GetRealHeight(387),
+// };
+// contentView.AddChidren(deviceListView);
+
+// foreach(var function in FunctionList.List.GetLightList())
+// {
+// var functionRow = new FrameLayout()
+// {
+// Height = Application.GetRealHeight(65),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// };
+// deviceListView.AddChidren(functionRow);
+
+// var btnFunctionName = new Button()
+// {
+// X = Application.GetRealWidth(16),
+// Y = Application.GetRealHeight(10),
+// Width = Application.GetRealWidth(308),
+// Height = Application.GetRealHeight(24),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// Text = function.name,
+// };
+// functionRow.AddChidren(btnFunctionName);
+
+// var btnFunctionLocationInfo = new Button()
+// {
+// X = Application.GetRealWidth(16),
+// Y = btnFunctionName.Bottom,
+// Width = Application.GetRealWidth(308),
+// Height = Application.GetRealHeight(21),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+// TextColor = CSS_Color.PromptingColor1,
+// Text = function.GetRoomListName(),
+// };
+// functionRow.AddChidren(btnFunctionLocationInfo);
+
+
+
+
+// }
+
+
+// #endregion
+
+// #region 搴曢儴纭鎸夐挳
+
+
+
+// var bottomView = new FrameLayout()
+// {
+// Y = Application.GetRealHeight(591),
+// Height = Application.GetRealHeight(106),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// Radius = (uint)Application.GetRealWidth(16),
+// };
+// bodyView.AddChidren(bottomView);
+
+// var btnConfrim = new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(12),
+// Width = Application.GetRealWidth(220),
+// Height = Application.GetRealWidth(44),
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.MainBackgroundColor,
+// BackgroundColor = CSS_Color.MainColor,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// IsBold = true,
+// Radius = (uint)Application.GetRealWidth(22),
+// TextID = StringId.Complete
+// };
+// bottomView.AddChidren(btnConfrim);
+
+// btnConfrim.MouseUpEventHandler = (sender, e) =>
+// {
+
+// };
+
+// #endregion
+
+
+// }
+// }
+//}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
new file mode 100644
index 0000000..2d893bc
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
@@ -0,0 +1,1541 @@
+锘�
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using HDL_ON.DAL.Server;
+using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ public class AddGroupControlPage : FrameLayout
+ {
+ #region 鎺т欢鍒楄〃
+ /// <summary>
+ /// 褰撳墠绐椾綋
+ /// </summary>
+ FrameLayout bodyView;
+ /// <summary>
+ /// 妤煎眰閫夋嫨涓嬫媺鍥炬爣
+ /// </summary>
+ Button btnFloorDownIcon;
+ /// <summary>
+ /// 妤煎眰鏄剧ず
+ /// </summary>
+ Button btnFloor;
+ /// <summary>
+ /// 鍏ㄩ�夋寜閽�
+ /// </summary>
+ Button btnChooseAll;
+ /// <summary>
+ /// 鍔熻兘鍒楄〃闆嗗悎鏄剧ず鍖哄煙
+ /// </summary>
+ VerticalScrolViewLayout functionListView;
+ /// <summary>
+ /// 瀹屾垚鎸夐挳
+ /// </summary>
+ Button btnConfrim;
+
+ #endregion
+ /// <summary>
+ /// 鍔熻兘鍒楄〃
+ /// </summary>
+ List<Function> groupControlLightList;
+ /// <summary>
+ /// 鏈湴鐨勭伅鍏夊垪琛�
+ /// </summary>
+ List<Function> lightList;
+ /// <summary>
+ /// 鍥炶皟鍒锋柊
+ /// </summary>
+ Action backActon;
+
+
+ GroupControl groupControl;
+
+
+
+ public AddGroupControlPage(List<Function> functions, GroupControl groupControl, Action action)
+ {
+ bodyView = this;
+ groupControlLightList = functions;
+ backActon = action;
+ lightList = FunctionList.List.GetLightList();
+ this.groupControl = groupControl;
+ }
+
+ public void LoadPage()
+ {
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+ new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView();
+
+ var contentView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(550),
+ };
+ bodyView.AddChidren(contentView);
+
+ #region 缁勫悕绉�
+ FrameLayout groupNameView;
+ groupNameView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ contentView.AddChidren(groupNameView);
+ Button btnGroupNameTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(78),
+ TextID = StringId.GroupNmae,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ };
+ groupNameView.AddChidren(btnGroupNameTitle);
+
+ var etGroupName = new EditText()
+ {
+ X = Application.GetRealWidth(155),
+ Width = Application.GetRealWidth(200),
+ PlaceholderText = Language.StringByID(StringId.PlsEntry),
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterRight,
+ TextColor = CSS_Color.TextualColor,
+ };
+ groupNameView.AddChidren(etGroupName);
+
+ groupNameView.AddChidren(
+ new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(49),
+ Height = Application.GetRealHeight(1),
+ Width = Application.GetRealWidth(343),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ });
+ #endregion
+ #region 浣嶇疆绠$悊
+ var locationMagtView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(50),
+ Height = Application.GetRealHeight(50),
+ 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);
+
+ var btnLocationValues = new Button()
+ {
+ X = Application.GetRealWidth(86),
+ Width = Application.GetRealWidth(237),
+ TextAlignment = TextAlignment.CenterRight,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.TextFontSize,
+ Text = groupControl.GetRoomListName(),
+ };
+ locationMagtView.AddChidren(btnLocationValues);
+
+ var 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);
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ //淇敼鍔熻兘鎵�灞炴埧闂翠箣鍚庣殑鍥炶皟浜嬩欢
+ Action chooseRoomBackAction = () => {
+ try
+ {
+ btnLocationValues.Text = groupControl.GetRoomListName();
+ }
+ catch { }
+ };
+ var view = new GroupChooseRoomPage(groupControl, chooseRoomBackAction);
+ MainPage.BasePageView.AddChidren(view);
+ view.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ btnLocationInfoRight.MouseUpEventHandler = eventHandler;
+ btnLocationValues.MouseUpEventHandler = eventHandler;
+
+
+ //locationMagtView.AddChidren(
+ // new Button()
+ // {
+ // Y = Application.GetRealHeight(49),
+ // Gravity = Gravity.CenterHorizontal,
+ // BackgroundColor = CSS_Color.DividingLineColor,
+ // Width = Application.GetRealWidth(343),
+ // Height = Application.GetRealHeight(1)
+ // });
+ #endregion
+
+ //contentView.AddChidren(new Button()
+ //{
+ // Y = Application.GetRealHeight(164),
+ // BackgroundColor = CSS_Color.BackgroundColor,
+ //});
+
+ /// <summary>
+ /// 鎴块棿鍐呭鏄剧ず鍖哄煙
+ /// </summary>
+ var roomFloorChangeView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(172),
+ Height = Application.GetRealHeight(52),
+ BackgroundColor = CSS_Color.BackgroundColor,
+ };
+ bodyView.AddChidren(roomFloorChangeView);
+ #region 鎴块棿椤堕儴鍒囨崲鏄剧ず鍖哄煙
+ btnFloorDownIcon = new Button()
+ {
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealHeight(18),
+ UnSelectedImagePath = "Public/DownIcon.png",
+ };
+ roomFloorChangeView.AddChidren(btnFloorDownIcon);
+
+ btnFloor = new Button()
+ {
+ X = btnFloorDownIcon.Right,
+ Width = Application.GetRealWidth(200),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = DB_ResidenceData.Instance.CurFloor.roomName,
+ };
+ roomFloorChangeView.AddChidren(btnFloor);
+
+ btnChooseAll = new Button()
+ {
+ X = Application.GetRealWidth(245),
+ Width = Application.GetRealWidth(109),
+ TextAlignment = TextAlignment.CenterRight,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextID = StringId.SelectedAll,
+ };
+ if (groupControlLightList.Count > 0)
+ {
+ btnChooseAll.TextID = StringId.Cancel;
+ }
+ roomFloorChangeView.AddChidren(btnChooseAll);
+ btnChooseAll.MouseUpEventHandler = (sender, e) => {
+ if (groupControlLightList.Count > 0)
+ {
+ groupControlLightList.Clear();
+ btnChooseAll.TextID = StringId.SelectAll;
+ btnConfrim.IsSelected = false;
+ }
+ else
+ {
+ groupControlLightList.AddRange(lightList);
+ btnChooseAll.TextID = StringId.Cancel;
+ btnConfrim.IsSelected = true;
+ }
+ LoadLightRow(lightList);
+ };
+
+ #endregion
+
+ functionListView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(220),
+ Height = Application.GetRealHeight(640 - 12 - 52 - 100 -100),
+ };
+ bodyView.AddChidren(functionListView);
+
+
+ LoadLightRow(lightList);
+ functionListView.AddChidren(new Button()
+ {
+ Height = Application.GetRealHeight(10),
+ });
+
+ #region 搴曢儴view
+ var bottomView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(591),
+ Height = Application.GetRealHeight(100),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ };
+ this.AddChidren(bottomView);
+
+ btnConfrim = new Button()
+ {
+ Y = Application.GetRealHeight(12),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealHeight(44),
+ Radius = (uint)Application.GetRealHeight(22),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.MainBackgroundColor,
+ BackgroundColor = CSS_Color.BackgroundColor,
+ TextID = StringId.Confirm,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ SelectedTextColor = CSS_Color.MainBackgroundColor,
+ SelectedBackgroundColor = CSS_Color.MainColor,
+ };
+ bottomView.AddChidren(btnConfrim);
+ btnConfrim.MouseUpEventHandler = (sender, e) => {
+ if (btnConfrim.IsSelected)
+ {
+ //淇濆瓨缇ゆ帶鏁版嵁
+ var name = etGroupName.Text.Trim();
+ if (string.IsNullOrEmpty(name))
+ {
+ new PublicAssmebly().TipMsg(StringId.Tip, StringId.PlsEntryGroupName);
+ return;
+ }
+ groupControl.name = name;
+ groupControl.sids.Clear();
+ foreach (var light in groupControlLightList)
+ {
+ try
+ {
+ var gc = new GroupControlFunction();
+ gc.sid = light.sid;
+ gc.spk = light.spk;
+ groupControl.sids.Add(gc);
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"鏂板缇ゆ帶杞崲鏁版嵁寮傚父:{ex.Message}");
+ }
+ }
+ try
+ {
+ var http = new HttpServerRequest();
+ var pack = http.AddGroupControl(new List<GroupControl>() { groupControl });
+ if (pack != null)
+ {
+ if(pack.Code == StateCode.SUCCESS)
+ {
+ backActon?.Invoke();
+ this.RemoveFromParent();
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"鏂板缇ゆ帶寮傚父:{ex.Message}");
+ }
+ }
+ };
+
+ #endregion
+
+ //鍔犺浇鍔熻兘绛涢�夌粍浠�
+ LoadDialog_ChangeFloor();
+ }
+
+ /// <summary>
+ /// 鏄剧ず鐨勮澶囩殑鎬绘暟
+ /// </summary>
+ int showCount = 0;
+
+ /// <summary>
+ /// 鍔犺浇鍔熻兘row
+ /// </summary>
+ /// <param name="lightList"></param>
+ void LoadLightRow(List<Function> functions, bool isAppend = false)
+ {
+ var waitPage = new Loading();
+ bodyView.AddChidren(waitPage);
+ waitPage.Start("");
+
+ new Thread(() =>
+ {
+ try
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (!isAppend)
+ {
+ showCount = 0;
+ functionListView.RemoveAll();
+ }
+ int i = 0;
+ foreach (var function in functions)
+ {
+ i++;
+ if (i > 100)
+ {
+ break;
+ }
+ showCount++;
+ var functionDiv = new LightRow(function)
+ {
+ Gravity = Gravity.CenterHorizontal,
+ //Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(62),
+ BorderColor = 0x00FFFFFF,
+ BorderWidth = 1,
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Tag = function.spk + function.sid
+ };
+ functionDiv.AddChidren(new Button()
+ {
+ Y = Application.GetRealHeight(61),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealWidth(1),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ });
+
+ Action setAction = () =>
+ {
+ if (groupControlLightList.Count > 0)
+ {
+ btnConfrim.IsSelected = true;
+ }
+ else
+ {
+ btnConfrim.IsSelected = false;
+ }
+ };
+
+ functionDiv.LoadDiv(groupControlLightList, setAction);
+ functionListView.AddChidren(functionDiv);
+ }
+
+ if (functions.Count > showCount)
+ {
+ var btnAppend = new Button()
+ {
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ Text = "鍔犺浇鏇村",
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnAppend.Text = "Load more";
+ }
+ functionListView.AddChidren(btnAppend);
+ btnAppend.MouseUpEventHandler = (sender, e) =>
+ {
+ btnAppend.RemoveFromParent();
+ LoadLightRow(functions, true);
+ };
+ }
+ });
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log("ShowFunctionRowError : " + ex.Message);
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+
+ }
+
+
+ /// <summary>
+ /// 浣忓畢鍒楄〃鐐瑰嚮浜嬩欢
+ /// </summary>
+ void LoadDialog_ChangeFloor()
+ {
+ string nowSelectId = null;
+ btnFloor.MouseUpEventHandler += (sender, e) =>
+ {
+ //鏄剧ず涓嬫媺鍒楄〃
+ var form = new FloorRoomSelectPopupView();
+ form.ShowDeviceFunctionView(btnFloor, this.lightList, (selectId, listFunc) =>
+ {
+ btnChooseAll.MouseUpEventHandler = (sender2, e2) => {
+ if (groupControlLightList.Count > 0)
+ {
+ groupControlLightList.Clear();
+ btnChooseAll.TextID = StringId.SelectAll;
+ btnConfrim.IsSelected = false;
+ }
+ else
+ {
+ groupControlLightList.AddRange(listFunc);
+ btnChooseAll.TextID = StringId.Cancel;
+ btnConfrim.IsSelected = true;
+ }
+ LoadLightRow(listFunc);
+ };
+ nowSelectId = selectId;
+ //閲嶆柊鍔犺浇鐣岄潰
+ LoadLightRow(listFunc);
+ }, nowSelectId);
+ };
+ }
+
+ }
+
+
+ //public class LightRow : FrameLayout
+ //{
+ // #region 鍖哄煙鎺т欢
+ // static FrameLayout bodyDiv;
+ // /// <summary>
+ // /// 鍔熻兘/鍦烘櫙icon
+ // /// </summary>
+ // Button btnIcon;
+ // /// <summary>
+ // /// 鍔熻兘鍚嶇О/鍦烘櫙鍚嶇О
+ // /// </summary>
+ // Button btnName;
+ // /// <summary>
+ // /// 妤煎眰淇℃伅鏄剧ず鎸夐挳
+ // /// </summary>
+ // Button btnFromFloor;
+ // /// <summary>
+ // /// 閫変腑鎸夐挳
+ // /// </summary>
+ // Button btnSelect;
+ // #endregion
+
+ // #region 鍖哄煙鍙橀噺
+ // Function function;
+ // #endregion
+ // public LightRow(Function func)
+ // {
+ // bodyDiv = this;
+ // bodyDiv.Tag = func.sid;
+ // function = func;
+ // }
+
+
+ // /// <summary>
+ // /// 鍔犺浇鎺у埗鍗$墖鍖哄煙
+ // /// </summary>
+ // public void LoadDiv(List<Function> functions, Action action)
+ // {
+ // btnIcon = new Button()
+ // {
+ // X = Application.GetRealWidth(10),
+ // Y = Application.GetRealHeight(15),
+ // Width = Application.GetRealWidth(32),
+ // Height = Application.GetRealWidth(32),
+ // UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"
+ // };
+ // bodyDiv.AddChidren(btnIcon);
+
+ // btnName = new Button()
+ // {
+ // X = Application.GetRealWidth(8 + 10 + 32),
+ // Y = Application.GetRealHeight(10),
+ // Width = Application.GetRealWidth(200),
+ // Height = Application.GetRealHeight(24),
+ // Text = function.name,
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.FirstLevelTitleColor,
+ // TextSize = CSS_FontSize.TextFontSize,
+ // };
+ // bodyDiv.AddChidren(btnName);
+
+ // btnFromFloor = new Button()
+ // {
+ // X = Application.GetRealWidth(8 + 10 + 32),
+ // Y = Application.GetRealHeight(10 + 24),
+ // Width = Application.GetRealWidth(200),
+ // Height = Application.GetRealHeight(18),
+ // Text = function.GetRoomListName(),
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.PromptingColor1,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // };
+ // bodyDiv.AddChidren(btnFromFloor);
+
+ // btnSelect = new Button()
+ // {
+ // X = Application.GetRealWidth(303),
+ // Gravity = Gravity.CenterVertical,
+ // Width = Application.GetRealWidth(32),
+ // Height = Application.GetRealWidth(32),
+ // UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
+ // SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
+ // IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null
+ // };
+ // bodyDiv.AddChidren(btnSelect);
+
+ // btnSelect.MouseUpEventHandler = (sender, e) => {
+ // btnSelect.IsSelected = !btnSelect.IsSelected;
+ // if (btnSelect.IsSelected)
+ // {
+ // var addTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
+ // if (addTemp == null)
+ // {
+ // functions.Add(function);
+ // }
+ // }
+ // else
+ // {
+ // var removeTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
+ // if (removeTemp != null)
+ // {
+ // functions.Remove(removeTemp);
+ // }
+ // }
+ // ///鍒锋柊鐣岄潰
+ // if (functions.Count == 0 || functions.Count == 1)
+ // {
+ // action();
+ // }
+ // };
+
+ // }
+
+
+ //}
+
+ ///// <summary>
+ ///// 鐏厜鍦烘櫙缂栬緫寮圭獥
+ ///// </summary>
+ //public class LightSceneEditDialog : Dialog
+ //{
+
+
+ // Dictionary<string, string> d = new Dictionary<string, string>();
+ // List<Function> listSwitch = new List<Function>();
+ // List<Function> lightDimming = new List<Function>();
+ // List<Function> lightCCT = new List<Function>();
+ // List<Function> lightRGB = new List<Function>();
+
+ // /// <summary>
+ // /// 浼犲叆鐨勭伅鍏夊垪琛�
+ // /// 鍔犲叆鍦烘櫙鎺у埗鍔熻兘鍒楄〃
+ // /// </summary>
+ // List<Function> lights;
+ // /// <summary>
+ // /// 涓存椂鐏厜瀵硅薄
+ // /// 澶勭悊鐏厜鏂规硶
+ // /// </summary>
+ // Light tempLight = new Light();
+ // //鍙戦�佹暟鎹敹闆�
+ // Dictionary<string, string> commandDic = new Dictionary<string, string>();
+
+ // Scene scene;
+ // Action<Scene> backAction;
+ // public LightSceneEditDialog(List<Function> functions, Scene inParScene, Action<Scene> action)
+ // {
+ // lights = functions;
+ // scene = inParScene;
+ // backAction = action;
+ // }
+
+
+ // public void ShowDialog()
+ // {
+ // commandDic.Clear();
+ // commandDic.Add(FunctionAttributeKey.OnOff, "off");
+
+ // listSwitch = lights.FindAll((obj) => obj.spk == SPK.LightSwitch);
+ // lightDimming = lights.FindAll((obj) => obj.spk == SPK.LightDimming);
+ // lightCCT = lights.FindAll((obj) => obj.spk == SPK.LightCCT);
+ // lightRGB = lights.FindAll((obj) => obj.spk == SPK.LightRGB);
+
+
+
+ // var hadDimming = lightDimming.Count > 0;
+ // var hadCCT = lightCCT.Count > 0;
+ // var hadRGB = lightRGB.Count > 0;
+ // if (hadRGB)
+ // {
+ // commandDic.Add(FunctionAttributeKey.RGB, lightRGB[0].GetAttrState(FunctionAttributeKey.RGB));
+ // commandDic.Add(FunctionAttributeKey.Brightness, lightRGB[0].GetAttrState(FunctionAttributeKey.Brightness));
+ // }
+ // if (hadCCT)
+ // {
+ // commandDic.Add(FunctionAttributeKey.CCT, lightCCT[0].GetAttrState(FunctionAttributeKey.CCT));
+ // if (!commandDic.ContainsKey(FunctionAttributeKey.Brightness))
+ // {
+ // commandDic.Add(FunctionAttributeKey.Brightness, lightCCT[0].GetAttrState(FunctionAttributeKey.Brightness));
+ // }
+ // }
+ // if (hadDimming)
+ // {
+ // if (!commandDic.ContainsKey(FunctionAttributeKey.Brightness))
+ // {
+ // commandDic.Add(FunctionAttributeKey.Brightness, lightDimming[0].GetAttrState(FunctionAttributeKey.Brightness));
+ // }
+ // }
+
+ // var bodyView = new FrameLayout();
+ // this.AddChidren(bodyView);
+ // bodyView.MouseUpEventHandler = (sender, e) => {
+ // this.Close();
+ // };
+
+ // var contentView = new FrameLayout()
+ // {
+ // BackgroundColor = CSS_Color.MainBackgroundColor,
+ // Width = Application.GetRealWidth(343),
+ // Radius = (uint)Application.GetRealWidth(12),
+ // };
+ // bodyView.AddChidren(contentView);
+
+ // #region 鏍囬鍖�
+ // var titleView = new FrameLayout()
+ // {
+ // Width = Application.GetRealWidth(343),
+ // Height = Application.GetRealHeight(52),
+ // };
+ // contentView.AddChidren(titleView);
+
+ // var btnTitle = new Button()
+ // {
+ // Height = Application.GetRealHeight(52),
+ // Gravity = Gravity.Center,
+ // TextSize = CSS_FontSize.SubheadingFontSize,
+ // TextColor = CSS_Color.MainColor,
+ // TextID = StringId.CombinedDimming,
+ // TextAlignment = TextAlignment.Center,
+ // };
+ // if (btnTitle.GetTextWidth() > Application.GetRealWidth(197))//247
+ // {
+ // btnTitle.Width = Application.GetRealWidth(197);
+ // btnTitle.IsMoreLines = true;
+ // }
+ // else
+ // {
+ // btnTitle.Width = btnTitle.GetTextWidth() + Application.GetRealWidth(10);
+ // btnTitle.IsMoreLines = false;
+ // }
+ // titleView.AddChidren(btnTitle);
+
+ // var btnEditIcon = new Button()
+ // {
+ // Width = Application.GetRealWidth(24),
+ // Height = Application.GetRealWidth(24),
+ // X = Application.GetRealWidth(12) + btnTitle.Right,
+ // Gravity = Gravity.CenterVertical,
+ // UnSelectedImagePath = "Public/Edit.png",
+ // };
+ // if (string.IsNullOrEmpty(scene.userSceneId))
+ // {
+ // titleView.AddChidren(btnEditIcon);
+ // }
+ // else
+ // {
+ // btnTitle.Text = scene.name;
+ // btnTitle.Width = btnTitle.GetTextWidth() + Application.GetRealWidth(10);
+ // btnTitle.Gravity = Gravity.Center;
+ // }
+
+ // Action<string> callBack = (str) =>
+ // {
+ // //鍚嶇О涓嶈兘涓虹┖
+ // if (string.IsNullOrEmpty(str))
+ // {
+ // new Tip()
+ // {
+ // CloseTime = 1,
+ // Text = Language.StringByID(StringId.NameCannotBeEmpty),
+ // Direction = AMPopTipDirection.None,
+ // }.Show(bodyView);
+ // return;
+ // }
+ // btnTitle.Text = str;
+ // scene.name = str;
+
+
+ // if (btnTitle.GetTextWidth() > Application.GetRealWidth(197))//247
+ // {
+ // btnTitle.Width = Application.GetRealWidth(197);
+ // }
+ // else
+ // {
+ // btnTitle.Width = btnTitle.GetTextWidth();
+ // }
+
+ // };
+ // EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ // {
+ // List<string> sceneNameList = new List<string>();
+ // foreach (var tempScene in FunctionList.List.scenes)
+ // {
+ // sceneNameList.Add(tempScene.name);
+ // }
+ // new PublicAssmebly().LoadDialog_EditParater(StringId.SceneName, scene.name, callBack, StringId.SceneNameCannotBeEmpty, StringId.SceneNameAlreadyExists, sceneNameList);
+ // };
+ // btnTitle.MouseUpEventHandler = eventHandler;
+ // btnEditIcon.MouseUpEventHandler = eventHandler;
+
+ // titleView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor, Y = Application.GetRealHeight(51) });
+
+ // #endregion
+
+
+ // //var dimmingLight = lights.Find((obj) => obj.spk == SPK.LightDimming);
+ // //var cctLight = lights.Find((obj) => obj.spk == SPK.LightCCT);
+ // //var rgbLight = lights.Find((obj) => obj.spk == SPK.LightRGB);
+ // var dimmingLight = scene.functions.Find((obj) => obj.localFunction.spk == SPK.LightDimming);
+ // var cctLight = scene.functions.Find((obj) => obj.localFunction.spk == SPK.LightCCT);
+ // var rgbLight = scene.functions.Find((obj) => obj.localFunction.spk == SPK.LightRGB);
+
+ // var brightnessValue = 0;
+ // var cctValue = 27;
+ // //if(rgbLight!= null)
+ // //{
+ // // int.TryParse(rgbLight.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness).value, out brightnessValue);
+ // //}
+ // //if (cctLight != null)
+ // //{
+ // // int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness).value, out brightnessValue);
+ // // int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.CCT).value, out cctValue);
+ // //}
+ // //if(dimmingLight!=null)
+ // //{
+ // // int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.CCT).value, out brightnessValue);
+ // //}
+
+
+ // //灞炴�ц缃尯鍩�
+ // var attrView = new VerticalScrolViewLayout()
+ // {
+ // Y = Application.GetRealHeight(52),
+ // Width = Application.GetRealWidth(343),
+ // ScrollEnabled = false,
+ // };
+ // //灞炴�ц缃尯鍩熼珮搴�
+ // int attrViewHight = Application.GetRealHeight(18 + 22);
+
+
+ // //鍙湁缁х數鍣�
+ // if (!hadDimming && !hadCCT && !hadRGB)
+ // {
+ // attrViewHight += Application.GetRealHeight(50);
+ // attrView.Height = attrViewHight;
+ // contentView.AddChidren(attrView);
+ // attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) });
+
+ // var view = new FrameLayout()
+ // {
+ // Width = Application.GetRealWidth(343),
+ // Height = Application.GetRealHeight(50),
+ // };
+ // attrView.AddChidren(view);
+
+
+ // var btnClose = new Button()
+ // {
+ // X = Application.GetRealWidth(50),
+ // Gravity = Gravity.CenterVertical,
+ // Width = Application.GetRealWidth(98),
+ // Height = Application.GetRealHeight(40),
+ // TextColor = CSS_Color.TextualColor,
+ // SelectedBackgroundColor = CSS_Color.MainColor,
+ // SelectedTextColor = CSS_Color.MainBackgroundColor,
+ // BackgroundColor = CSS_Color.DividingLineColor,
+ // TextID = StringId.OFF,
+ // TextSize = CSS_FontSize.TextFontSize,
+ // Radius = (uint)Application.GetRealWidth(5),
+ // IsSelected = true,
+ // //BorderWidth = 1,
+ // //BorderColor = 0x00000000
+ // };
+ // view.AddChidren(btnClose);
+
+ // var btnOpen = new Button()
+ // {
+ // X = Application.GetRealWidth(100 + 98),
+ // Gravity = Gravity.CenterVertical,
+ // Width = Application.GetRealWidth(98),
+ // Height = Application.GetRealHeight(40),
+ // TextColor = CSS_Color.TextualColor,
+ // SelectedBackgroundColor = CSS_Color.MainColor,
+ // SelectedTextColor = CSS_Color.MainBackgroundColor,
+ // BackgroundColor = CSS_Color.DividingLineColor,
+ // TextID = StringId.On,
+ // TextSize = CSS_FontSize.TextFontSize,
+ // Radius = (uint)Application.GetRealWidth(5),
+ // };
+ // view.AddChidren(btnOpen);
+
+ // btnClose.MouseUpEventHandler = (sender, e) =>
+ // {
+ // btnClose.IsSelected = true;
+ // btnOpen.IsSelected = false;
+ // commandDic[FunctionAttributeKey.OnOff] = "off";
+ // d.Clear();
+ // d.Add(FunctionAttributeKey.OnOff, "off");
+ // foreach (var light in lights)
+ // {
+ // Control.Ins.SendWriteCommand(light, d);
+ // }
+ // };
+ // btnOpen.MouseUpEventHandler = (sender, e) =>
+ // {
+ // btnClose.IsSelected = false;
+ // btnOpen.IsSelected = true;
+ // commandDic[FunctionAttributeKey.OnOff] = "on";
+ // d.Clear();
+ // d.Add(FunctionAttributeKey.OnOff, "on");
+ // foreach (var light in lights)
+ // {
+ // Control.Ins.SendWriteCommand(light, d);
+ // }
+ // };
+
+ // }
+
+ // else
+ // {
+ // if (hadRGB)
+ // {
+ // attrViewHight += Application.GetRealHeight(248);
+ // hadDimming = true;
+ // }
+ // if (hadCCT)
+ // {
+ // attrViewHight += Application.GetRealHeight(54 + 11);
+ // hadDimming = true;
+ // }
+ // if (hadDimming)
+ // {
+ // attrViewHight += Application.GetRealHeight(54 + 11);
+ // }
+ // attrView.Height = attrViewHight;
+ // contentView.AddChidren(attrView);
+ // attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) });
+
+
+ // if (hadDimming)
+ // {
+ // LoadDimmingAttrView(attrView);
+ // }
+ // if (hadCCT)
+ // {
+ // LoadCctAttrView(attrView);
+ // }
+ // if (hadRGB)
+ // {
+ // LoadRgbAttrView(attrView);
+ // }
+ // }
+
+ // contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight;
+ // contentView.Gravity = Gravity.Center;
+
+
+
+
+ // #region bottom View
+ // var bottomView = new FrameLayout()
+ // {
+ // Y = Application.GetRealHeight(52) + attrViewHight,
+ // Height = Application.GetRealHeight(46),
+ // };
+ // contentView.AddChidren(bottomView);
+ // bottomView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
+
+ // if (string.IsNullOrEmpty(scene.userSceneId))
+ // {
+ // var btnCacel = new Button()
+ // {
+ // Width = Application.GetRealWidth(172),
+ // Height = Application.GetRealHeight(44),
+ // TextAlignment = TextAlignment.Center,
+ // TextSize = CSS_FontSize.SubheadingFontSize,
+ // TextColor = CSS_Color.TextualColor,
+ // TextID = StringId.Cancel,
+ // };
+ // bottomView.AddChidren(btnCacel);
+
+ // var btnSave = new Button()
+ // {
+ // X = Application.GetRealWidth(172),
+ // Width = Application.GetRealWidth(172),
+ // Height = Application.GetRealHeight(46),
+ // BackgroundColor = CSS_Color.MainColor,
+ // TextColor = CSS_Color.MainBackgroundColor,
+ // TextAlignment = TextAlignment.Center,
+ // TextSize = CSS_FontSize.SubheadingFontSize,
+ // TextID = StringId.Save
+ // };
+ // bottomView.AddChidren(btnSave);
+
+ // //渚嬶細鍙充笅鍦嗚 澶у皬涓�50
+ // int mRectCornerID = HDLUtils.RectCornerBottomRight;
+ // btnSave.SetCornerWithSameRadius((uint)Application.GetRealWidth(14), mRectCornerID);
+
+ // btnCacel.MouseUpEventHandler = (sender, e) =>
+ // {
+ // this.Close();
+
+ // //var waitPage = new Loading();
+ // //MainPage.BaseView.AddChidren(waitPage);
+ // //waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ // //new Thread(() =>
+ // //{
+ // // try
+ // // {
+ // // foreach (var light in lights)
+ // // {
+ // // Dictionary<string, string> sendDate = new Dictionary<string, string>();
+ // // //璧嬪�煎満鏅姛鑳芥暟鎹�
+ // // foreach (var attr in light.GetAttributes())
+ // // {
+ // // if (commandDic.ContainsKey(attr))
+ // // {
+ // // try
+ // // {
+ // // sendDate.Add(attr, commandDic[attr]);
+ // // }
+ // // catch { }
+ // // }
+
+ // // }
+ // // Control.Ins.SendWriteCommand(light, sendDate);
+ // // Thread.Sleep(50);
+ // // }
+ // // }
+ // // catch
+ // // { }
+ // // finally
+ // // {
+ // // Application.RunOnMainThread(() =>
+ // // {
+ // // waitPage.Hide();
+ // // new PublicAssmebly().TipMsgAutoClose("缁勫悎鎺у埗宸叉墽琛�", true);
+ // // if (waitPage != null)
+ // // {
+ // // //backAction(null);
+ // // waitPage.RemoveFromParent();
+ // // }
+ // // });
+ // // }
+ // //})
+ // //{ IsBackground = true }.Start();
+ // };
+
+ // btnSave.MouseUpEventHandler = (sender, e) =>
+ // {
+ // if (string.IsNullOrEmpty(scene.name))
+ // {
+ // new Tip()
+ // {
+ // CloseTime = 1,
+ // Text = Language.StringByID(StringId.NameCannotBeEmpty),
+ // Direction = AMPopTipDirection.None,
+ // }.Show(bodyView);
+ // return;
+ // }
+ // foreach (var tempRoom in FunctionList.List.scenes)
+ // {
+ // if (scene.name == tempRoom.name)
+ // {
+ // new PublicAssmebly().TipMsg(StringId.Tip, StringId.NameAlreadyExists);
+ // return;
+ // }
+ // }
+ // var waitPage = new Loading();
+ // MainPage.BaseView.AddChidren(waitPage);
+ // waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ // new Thread(() =>
+ // {
+ // try
+ // {
+ // var serverScene = new Scene();
+ // for (int i = 0; i < lights.Count; i++)
+ // {
+ // var light = lights[i];
+ // //璧嬪�煎満鏅姛鑳芥暟鎹�
+ // foreach (var attr in light.GetAttributes())
+ // {
+ // if (commandDic.ContainsKey(attr))
+ // {
+ // try
+ // {
+ // light.SetAttrState(attr, commandDic[attr]);
+ // }
+ // catch { }
+ // }
+ // }
+ // //杞崲鍦烘櫙鐨勫姛鑳藉璞�
+ // var sceneFunction = light.ConvertSceneFunction();
+ // //鏌ヨ鏈夋病鏈夊瓨鍦�
+ // var temp = scene.functions.Find((obj) => obj.sid == sceneFunction.sid);
+ // //璧嬪��
+ // if (temp != null)
+ // {
+ // temp = sceneFunction;
+ // }
+ // else
+ // {
+ // scene.functions.Add(sceneFunction);
+ // }
+ // }
+ // var result = FunctionList.List.AddScene(scene, out serverScene);
+ // Application.RunOnMainThread(() =>
+ // {
+ // if (result == StateCode.SUCCESS)
+ // {
+ // scene.userSceneId = serverScene.userSceneId;
+ // FunctionList.List.scenes.Add(scene);
+ // backAction?.Invoke(scene);
+ // this.Close();
+ // }
+ // else
+ // {
+ // if (result == "124005")
+ // IMessageCommon.Current.ShowErrorInfoAlter(Language.StringByID(StringId.GatewayOffline));
+ // else
+ // IMessageCommon.Current.ShowErrorInfoAlter(result);
+ // }
+ // });
+ // }
+ // catch { }
+ // finally
+ // {
+ // Application.RunOnMainThread(() =>
+ // {
+ // waitPage.Hide();
+ // waitPage.RemoveFromParent();
+ // });
+ // }
+ // })
+ // { IsBackground = true, Priority = ThreadPriority.AboveNormal }.Start();
+ // };
+ // }
+ // else
+ // {
+ // var btnCacel = new Button()
+ // {
+ // Height = Application.GetRealHeight(44),
+ // TextAlignment = TextAlignment.Center,
+ // TextSize = CSS_FontSize.SubheadingFontSize,
+ // TextColor = CSS_Color.TextualColor,
+ // TextID = StringId.Close,
+ // };
+ // bottomView.AddChidren(btnCacel);
+
+
+ // //渚嬶細鍙充笅鍦嗚 澶у皬涓�50
+ // //int mRectCornerID = HDLUtils.RectCornerBottomRight;
+ // //btnSave.SetCornerWithSameRadius((uint)Application.GetRealWidth(14), mRectCornerID);
+
+ // btnCacel.MouseUpEventHandler = (sender, e) =>
+ // {
+ // this.Close();
+ // };
+
+ // }
+
+
+
+
+
+ // #endregion
+
+
+ // this.Show();
+
+ // }
+
+ // /// <summary>
+ // /// 鍔犺浇璋冨厜灞炴�ц缃帶浠�
+ // /// </summary>
+ // /// <param name="attrView"></param>
+ // void LoadDimmingAttrView(VerticalScrolViewLayout attrView)
+ // {
+ // string briValue = "";
+ // commandDic.TryGetValue(FunctionAttributeKey.Brightness, out briValue);
+
+ // var dimmingView = new FrameLayout()
+ // {
+ // Height = Application.GetRealHeight(54 + 11)
+ // };
+ // attrView.AddChidren(dimmingView);
+
+ // #region 浜害璋冭妭
+ // var btnBrightnessText = new Button()
+ // {
+ // X = Application.GetRealWidth(35),
+ // Y = Application.GetRealHeight(1),
+ // Width = Application.GetRealWidth(224),
+ // Height = Application.GetRealHeight(25),
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.FirstLevelTitleColor,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // TextID = StringId.Brightness,
+ // };
+ // btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + commandDic[FunctionAttributeKey.Brightness] + "%";
+ // dimmingView.AddChidren(btnBrightnessText);
+
+
+ // var btnMinValuesText = new Button()
+ // {
+ // X = Application.GetRealWidth(35),
+ // Y = btnBrightnessText.Bottom,
+ // Width = Application.GetRealWidth(40),
+ // Height = Application.GetRealHeight(21),
+ // Text = "0%",
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.PromptingColor1,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // };
+ // dimmingView.AddChidren(btnMinValuesText);
+
+ // var dimmerBar = new DiyImageSeekBar()
+ // {
+ // X = Application.GetRealWidth(45 + 10),
+ // Y = Application.GetRealHeight(11),
+ // Width = Application.GetRealWidth(220),
+ // Height = Application.GetRealHeight(54),
+ // SeekBarViewHeight = Application.GetRealHeight(8),
+ // ThumbImagePath = "Public/ThumbImage.png",
+ // ThumbImageHeight = Application.GetRealHeight(54),
+ // ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+ // ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // ProgressBarColor = CSS_Color.AuxiliaryColor1,
+ // MaxValue = 100,
+ // Progress = Convert.ToInt32(commandDic[FunctionAttributeKey.Brightness]),
+ // SeekBarPadding = Application.GetRealWidth(20),
+ // IsProgressTextShow = false,
+ // ProgressChangeDelayTime = 0,
+ // };
+ // dimmingView.AddChidren(dimmerBar);
+ // dimmerBar.OnProgressChangedEvent = (sender, e) => {
+ // btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%";
+ // };
+ // dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
+ // commandDic[FunctionAttributeKey.Brightness] = dimmerBar.Progress.ToString();
+ // btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%";
+
+ // foreach (var light in lights)
+ // {
+ // if (light.spk == SPK.LightSwitch)
+ // {
+ // d.Clear();
+ // d.Add(FunctionAttributeKey.OnOff, e > 0 ? "on" : "off");
+ // Control.Ins.SendWriteCommand(light, d);
+ // }
+ // else
+ // {
+ // d.Clear();
+ // d.Add(FunctionAttributeKey.Brightness, e.ToString());
+ // Control.Ins.SendWriteCommand(light, d);
+ // }
+ // }
+ // };
+
+
+ // var btnMaxValuesText = new Button()
+ // {
+ // X = dimmerBar.Right,
+ // Y = btnBrightnessText.Bottom,
+ // Width = Application.GetRealWidth(55),
+ // Height = Application.GetRealHeight(21),
+ // Text = "100%",
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.PromptingColor1,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // };
+ // dimmingView.AddChidren(btnMaxValuesText);
+ // #endregion
+
+ // }
+
+ // /// <summary>
+ // /// 鍔犺浇cct灞炴�ц缃帶浠�
+ // /// </summary>
+ // /// <param name="attrView"></param>
+ // void LoadCctAttrView(VerticalScrolViewLayout attrView)
+ // {
+ // #region 鑹叉俯
+
+ // string valueStr = "2700";
+ // commandDic.TryGetValue(FunctionAttributeKey.CCT, out valueStr);
+ // int value = Convert.ToInt32(valueStr) / 100;
+
+ // var cctView = new FrameLayout()
+ // {
+ // Height = Application.GetRealHeight(54 + 11)
+ // };
+ // attrView.AddChidren(cctView);
+
+
+ // //鑹叉俯
+ // var btnTempClolor = new Button();
+ // btnTempClolor.X = Application.GetRealWidth(35);
+ // btnTempClolor.Y = Application.GetRealHeight(1);
+ // btnTempClolor.Width = Application.GetRealWidth(224);
+ // btnTempClolor.Height = Application.GetRealHeight(21);
+ // btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
+ // btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor;
+ // btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+ // btnTempClolor.TextID = StringId.ColorTemperature;
+ // cctView.AddChidren(btnTempClolor);
+
+ // //2700K
+ // var btnTempClolorMin = new Button()
+ // {
+ // X = Application.GetRealWidth(35),
+ // Y = btnTempClolor.Bottom,
+ // Width = Application.GetRealWidth(40),
+ // Height = Application.GetRealHeight(21),
+ // };
+ // btnTempClolorMin.Width = Application.GetRealWidth(54);
+ // btnTempClolorMin.Height = Application.GetRealHeight(21);
+ // btnTempClolorMin.Text = "2700K";
+ // btnTempClolorMin.TextAlignment = TextAlignment.CenterLeft;
+ // btnTempClolorMin.TextColor = CSS_Color.PromptingColor1;
+ // btnTempClolorMin.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+ // cctView.AddChidren(btnTempClolorMin);
+
+ // //婊戝姩鏉$殑鑳屾櫙鍥剧墖
+ // var btnColorTemplatrueBack = new Button()
+ // {
+ // X = Application.GetRealWidth(55 + 22 + 15),
+ // Y = Application.GetRealHeight(11),
+ // Width = Application.GetRealWidth(180),
+ // Height = Application.GetRealHeight(54),
+ // };
+ // btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png";
+ // btnColorTemplatrueBack.Height = Application.GetRealHeight(8);
+ // btnColorTemplatrueBack.Gravity = Gravity.CenterHorizontal;
+ // cctView.AddChidren(btnColorTemplatrueBack);
+ // //婊戝姩鏉℃帶浠�
+ // var barColorTemplatrue = new CCTSeekBarControl()
+ // {
+ // X = Application.GetRealWidth(55 + 22),
+ // Y = Application.GetRealHeight(11),
+ // Width = Application.GetRealWidth(220),
+ // Height = Application.GetRealHeight(54),
+ // };
+ // barColorTemplatrue.MinValue = 27;
+ // barColorTemplatrue.MaxValue = 65;
+ // barColorTemplatrue.ProgressBarColor = 0x00000000;//鍏ㄩ儴閫忔槑
+ // barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000;
+ // barColorTemplatrue.SeekBarBackgroundColor = 0x00000000;
+ // cctView.AddChidren(barColorTemplatrue);
+ // barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2;
+ // barColorTemplatrue.Progress = value;
+ // //璁剧疆鍒濆鍊�
+ // btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K");
+ // barColorTemplatrue.OnProgressChangedEvent = (sender, e) =>
+ // {
+ // btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K");
+ // };
+ // barColorTemplatrue.OnStopTrackingTouchEvent = (sender, e) =>
+ // {
+ // commandDic[FunctionAttributeKey.CCT] = (barColorTemplatrue.Progress * 100).ToString();
+
+ // d.Clear();
+ // d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
+ // foreach (var light in lightCCT)
+ // {
+ // if (light.spk == SPK.LightCCT)
+ // {
+ // Control.Ins.SendWriteCommand(light, d);
+ // }
+ // }
+ // };
+ // //鍙樻洿鑳屾櫙鍥剧殑Y杞村潗鏍�
+ // btnColorTemplatrueBack.Y = barColorTemplatrue.Y + (barColorTemplatrue.Height - btnColorTemplatrueBack.Height) / 2;
+
+ // //6500K
+ // var btnTempClolorMax = new Button();
+ // btnTempClolorMax.Y = btnTempClolorMin.Y;
+ // btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(30);
+ // btnTempClolorMax.Width = Application.GetRealWidth(54);
+ // btnTempClolorMax.Height = Application.GetRealHeight(21);
+ // btnTempClolorMax.Text = "6500K";
+ // btnTempClolorMax.TextAlignment = TextAlignment.CenterRight;
+ // btnTempClolorMax.TextColor = CSS_Color.PromptingColor1;
+ // btnTempClolorMax.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+ // cctView.AddChidren(btnTempClolorMax);
+
+ // #endregion
+
+
+ // }
+
+ // /// <summary>
+ // /// 鍔犺浇rgb灞炴�ц缃帶浠�
+ // /// </summary>
+ // /// <param name="attrView"></param>
+ // void LoadRgbAttrView(VerticalScrolViewLayout attrView)
+ // {
+
+ // #region RGB
+
+ // string value = "255,255,255";
+ // commandDic.TryGetValue(FunctionAttributeKey.RGB, out value);
+
+ // var rgbView = new FrameLayout()
+ // {
+ // Height = Application.GetRealHeight(248)
+ // };
+ // attrView.AddChidren(rgbView);
+
+
+ // var btnCurColor = new Button()
+ // {
+ // X = Application.GetRealWidth(24),
+ // Y = Application.GetRealHeight(10),
+ // Width = Application.GetMinRealAverage(24),
+ // Height = Application.GetMinRealAverage(24),
+ // Radius = (uint)Application.GetMinRealAverage(8),
+ // BorderColor = CSS_Color.PromptingColor2,
+ // BorderWidth = 1,
+ // BackgroundColor = (uint)(0xFF000000 + tempLight.GetRGBcolor(commandDic[FunctionAttributeKey.RGB]))
+ // };
+ // rgbView.AddChidren(btnCurColor);
+
+ // //鑹茬洏鐨勬甯冩帶浠�(闄愬埗閭d釜鐧借壊婊戝姩鐞冧娇鐢�)
+ // var framePickerBack = new FrameLayout();
+ // framePickerBack.Gravity = Gravity.CenterHorizontal;
+ // framePickerBack.Y = Application.GetRealHeight(20);
+ // framePickerBack.Width = Application.GetMinRealAverage(198);
+ // framePickerBack.Height = Application.GetMinRealAverage(198);
+ // rgbView.AddChidren(framePickerBack);
+
+ // var colorPicker = new ColorPicker()
+ // {
+ // ColorImagePath = "FunctionIcon/Light/ColorWheel.png",
+ // };
+ // framePickerBack.AddChidren(colorPicker);
+
+
+
+
+
+
+ // //鐧界偣鎺т欢
+ // var btnWhiteRound = new Button();
+ // btnWhiteRound.Width = Application.GetRealWidth(24);
+ // btnWhiteRound.Height = Application.GetRealWidth(24);
+ // btnWhiteRound.UnSelectedImagePath = "FunctionIcon/Light/ColorWheelTip.png";
+ // btnWhiteRound.Visible = false;
+ // framePickerBack.AddChidren(btnWhiteRound);
+
+
+ // //褰撳墠鐐瑰嚮鐨勩�愮偣銆戞槸鍚︽纭�
+ // bool pointIsRight = false;
+ // //鍦嗙殑鍗婂緞(鑰冭檻杈圭晫,闇�瑕佽缃畠鐨勫崐寰勬瘮杈冨皬涓�鐐�)
+ // int circleR = colorPicker.Width / 2 - Application.GetRealWidth(12);
+
+ // colorPicker.MouseUpEventHandler = (sender2, e) => {
+ // d.Clear();
+ // d.Add(FunctionAttributeKey.RGB, commandDic[FunctionAttributeKey.RGB]);
+ // foreach (var light in lightCCT)
+ // {
+ // if (light.spk == SPK.LightCCT)
+ // {
+ // Control.Ins.SendWriteCommand(light, d);
+ // }
+ // }
+ // };
+ // colorPicker.ColorChaged += (sender2, e2) => {
+ // string rgbString = (e2[0] + "," + e2[1] + "," + e2[2]).ToString();
+ // commandDic[FunctionAttributeKey.RGB] = rgbString;
+ // btnCurColor.BackgroundColor = (uint)(0xFF000000 + tempLight.GetRGBcolor(rgbString));
+ // foreach (var rgbTemp in lightRGB)
+ // {
+ // rgbTemp.SetAttrState(FunctionAttributeKey.RGB, rgbString);
+ // }
+ // };
+ // colorPicker.MouseDownEventHandler += (sender, e) =>
+ // {
+ // pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y);
+ // if (pointIsRight == false)
+ // {
+ // //鐐圭殑鍖哄煙涓嶆槸鍦嗙洏鍐�
+ // return;
+ // }
+ // //鏄剧ず鐧界偣
+ // btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2;
+ // btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2;
+ // if (btnWhiteRound.Visible == false)
+ // {
+ // btnWhiteRound.Visible = true;
+ // }
+ // };
+ // colorPicker.MouseUpEventHandler = (sender, e) => {
+ // foreach (var rgbTemp in lightRGB)
+ // {
+ // Dictionary<string, string> d = new Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.RGB, tempLight.GetRGBcolorString(rgbTemp));
+ // Control.Ins.SendWriteCommand(rgbTemp, d, false, 0);
+ // }
+ // };
+
+ // colorPicker.MouseMoveEventHandler += (sender, e) =>
+ // {
+ // //褰撻紶鏍囩偣涓嬩簨浠跺鐞�
+ // colorPicker.MouseDownEventHandler(sender, e);
+ // };
+
+
+ // #endregion
+
+ // }
+
+
+ // /// <summary>
+ // /// 妫�娴嬬偣鍑荤偣
+ // /// </summary>
+ // /// <param name="circleR">鍦嗙殑鍗婂緞</param>
+ // /// <param name="circleX">鍦嗗績X杞�</param>
+ // /// <param name="circleY">鍦嗗績Y杞�</param>
+ // /// <param name="pointX">鐐瑰嚮鐐圭殑X杞�</param>
+ // /// <param name="pointY">鐐瑰嚮鐐圭殑Y杞�</param>
+ // /// <returns></returns>
+ // private bool CheckPoint(int circleR, int circleX, int circleY, int pointX, int pointY)
+ // {
+ // int dwidth = circleX - pointX;
+ // if (dwidth < 0) { dwidth *= -1; }
+
+ // int dHeight = circleY - pointY;
+ // if (dHeight < 0) { dHeight *= -1; }
+
+ // //鏍规嵁涓夎鍑芥暟,姹備笁瑙掑舰鐨勬枩杈归暱
+ // int dlength = dwidth * dwidth + dHeight * dHeight;
+ // //鍗婂緞闀垮害(涓嶅紑鏂�,鎵�浠ユ槸鎸夊钩鏂圭畻)
+ // circleR *= circleR;
+ // if (dlength < circleR)
+ // {
+ // //濡傛灉缁勬垚鐨勪笁瑙掑舰骞舵病鏈夐暱杩囧崐寰�,鍒欎唬琛ㄨ繕鍦ㄥ渾鍐�(涓嶅厑璁哥偣杈圭晫)
+ // return true;
+ // }
+ // return false;
+ // }
+
+ //}
+
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs
new file mode 100644
index 0000000..770551c
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs
@@ -0,0 +1,146 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.DAL.Server;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ public class CombinedDimmingListPage : FrameLayout
+ {
+ FrameLayout bodyView;
+ VerticalScrolViewLayout contentView;
+
+ public CombinedDimmingListPage()
+ {
+ bodyView = this;
+ }
+
+ public void LoadPage()
+ {
+
+ new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView_AddIcon("CombinedDimming",
+ (s,c)=>{
+ try
+ {
+ var page = new AddGroupControlPage(new System.Collections.Generic.List<Function>(),new GroupControl(),
+ ()=> {
+
+ });
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
+ catch { }
+ });
+
+ contentView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(550),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ bodyView.AddChidren(contentView);
+
+
+ new System.Threading.Thread(() => {
+ var http = new HttpServerRequest();
+ var pack = http.GetGroupControlList();
+ if(pack != null)
+ {
+ if(pack.Code == StateCode.SUCCESS )
+ {
+ try
+ {
+ var groupControlList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString());
+ LoadGroupControlView(groupControlList);
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"璇诲彇缁勬帶鍒楄〃澶辫触:{ex.Message}");
+ }
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ }
+ }
+
+ }) { IsBackground = true }.Start();
+
+ #region
+ contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
+
+
+
+ #endregion
+
+ }
+
+
+ private void LoadGroupControlView(List<GroupControl> list)
+ {
+ if(list.Count == 0)
+ {
+
+ }
+ else
+ {
+ contentView.RemoveAll();
+
+ foreach (var function in list)
+ {
+ var functionRow = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(65),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ contentView.AddChidren(functionRow);
+
+ var btnFunctionName = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(24),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ Text = function.name,
+ };
+ functionRow.AddChidren(btnFunctionName);
+
+ var btnFunctionLocationInfo = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnFunctionName.Bottom,
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(21),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextColor = CSS_Color.PromptingColor1,
+ Text = function.GetRoomListName(),
+ };
+ functionRow.AddChidren(btnFunctionLocationInfo);
+
+
+
+ functionRow.AddChidren(
+ new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(1),
+ Width = Application.GetRealWidth(343),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ });
+
+ }
+
+ }
+ }
+
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs
new file mode 100644
index 0000000..e62de92
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs
@@ -0,0 +1,244 @@
+锘�
+using System;
+using HDL_ON.DAL.Server;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ /// <summary>
+ /// 鍔熻兘鍒嗛厤鎴块棿鐣岄潰
+ /// </summary>
+ public partial class GroupChooseRoomPage : FrameLayout
+ {
+ #region 鎺т欢鍒楄〃
+ FrameLayout bodyView;
+ /// <summary>
+ /// 鍐呭鍔犺浇鍖哄煙
+ /// </summary>
+ VerticalScrolViewLayout contentView;
+
+ Button btnAllRoomText;
+ Button btnChooseAll;
+
+ #endregion
+
+ #region 灞�閮ㄥ彉閲�
+
+ GroupControl function
+ ;
+ /// <summary>
+ /// 鍥炶皟浜嬩欢
+ /// </summary>
+ Action backAction;
+ #endregion
+
+ public GroupChooseRoomPage(GroupControl groupControl, Action action)
+ {
+ bodyView = this;
+ this.function = groupControl;
+ backAction = action;
+ }
+
+ public override void RemoveFromParent()
+ {
+ new System.Threading.Thread(() =>
+ {
+ Application.RunOnMainThread(() =>
+ {
+ backAction?.Invoke();
+ });
+ })
+ { IsBackground = true }.Start();
+ base.RemoveFromParent();
+ }
+
+ /// <summary>
+ /// 鍔犺浇椤甸潰
+ /// </summary>
+ public void LoadPage()
+ {
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+ new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView();
+
+
+
+ var contentView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(667 - 64),
+ };
+ bodyView.AddChidren(contentView);
+
+ var allRoomView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ contentView.AddChidren(allRoomView);
+
+ btnChooseAll = new Button()
+ {
+ X = Application.GetRealWidth(331),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(28),
+ Height = Application.GetMinRealAverage(28),
+ UnSelectedImagePath = "Public/ChooseIcon.png",
+ SelectedImagePath = "Public/ChooseOnIcon.png",
+ IsSelected = true
+ };
+ allRoomView.AddChidren(btnChooseAll);
+
+ btnAllRoomText = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ TextID = StringId.All,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ allRoomView.AddChidren(btnAllRoomText);
+
+
+ foreach (var room in SpatialInfo.CurrentSpatial.RoomList)
+ {
+ var roomView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Tag = "row"
+ };
+ contentView.AddChidren(roomView);
+
+ var btnLine = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetMinReal(1),
+ Width = Application.GetRealWidth(343),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ };
+ roomView.AddChidren(btnLine);
+
+ Button btnChoose = new Button()
+ {
+ X = Application.GetRealWidth(331),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(28),
+ Height = Application.GetMinRealAverage(28),
+ UnSelectedImagePath = "Public/ChooseIcon.png",
+ SelectedImagePath = "Public/ChooseOnIcon.png",
+ IsSelected = function.roomIds.Contains(room.roomId),
+ Tag = "ChooseIcon"
+ };
+ roomView.AddChidren(btnChoose);
+
+ Button btnRoomText = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ //Width = Application.GetRealWidth(280),
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = room.floorName + room.roomName,
+ };
+ roomView.AddChidren(btnRoomText);
+ btnRoomText.MouseUpEventHandler = (sender, e) => {
+ btnChoose.IsSelected = !btnChoose.IsSelected;
+ LoadEvent_RoomSelected(room, btnChoose.IsSelected);
+ };
+
+ if (!function.roomIds.Contains(room.roomId) && btnChooseAll.IsSelected)
+ {
+ btnChooseAll.IsSelected = false;
+ }
+
+ }
+
+ LoadEventLoad();
+ }
+ }
+ /// <summary>
+ /// 鍔熻兘鍒嗛厤鎴块棿BLL
+ /// </summary>
+ public partial class GroupChooseRoomPage
+ {
+ /// <summary>
+ /// 鍔犺浇浜嬩欢鍒楄〃
+ /// </summary>
+ void LoadEventLoad()
+ {
+ LoadMethod_AllElection();
+ }
+
+ /// <summary>
+ /// 鍏ㄩ�夋寜閽簨浠�
+ /// </summary>
+ void LoadMethod_AllElection()
+ {
+ btnAllRoomText.MouseUpEventHandler += (sender, e) =>
+ {
+ btnChooseAll.IsSelected = !btnChooseAll.IsSelected;
+
+ for (int i = 0; i < contentView.ChildrenCount; i++)
+ {
+ var view = contentView.GetChildren(i);
+ if (view.GetType() == typeof(FrameLayout))
+ {
+ if (view.Tag != null && view.Tag.ToString() == "row")
+ {
+ for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++)
+ {
+ var btn = (view as FrameLayout).GetChildren(j);
+ if (btn.GetType() == typeof(Button))
+ {
+ if (btn.Tag != null && btn.Tag.ToString() == "ChooseIcon")
+ {
+ (btn as Button).IsSelected = btnChooseAll.IsSelected;
+ }
+ }
+ }
+ }
+ }
+ }
+ function.roomIds.Clear();
+ if (btnChooseAll.IsSelected)
+ {
+ foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList)
+ {
+ if (btnChooseAll.IsSelected)
+ {
+ function.roomIds.Add(room.roomId);
+ }
+ }
+ }
+ };
+ }
+
+ /// <summary>
+ /// 鎴块棿閫変腑浜嬩欢
+ /// </summary>
+ void LoadEvent_RoomSelected(Entity.Room room, bool isAdd)
+ {
+ if (isAdd)
+ {
+ function.roomIds.Add(room.roomId);
+ }
+ else
+ {
+ function.roomIds.Remove(room.roomId);
+ }
+
+
+ if (function.roomIds.Count == SpatialInfo.CurrentSpatial.RoomList.Count)
+ {
+ btnChooseAll.IsSelected = true;
+ }
+ else
+ {
+ btnChooseAll.IsSelected = false;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
new file mode 100644
index 0000000..28dea93
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
@@ -0,0 +1,76 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared;
+
+namespace HDL_ON.Entity
+{
+ public class GroupControl
+ {
+ public GroupControl()
+ {
+ }
+ /// <summary>
+ /// 缇ゆ帶sid
+ /// </summary>
+ public string sid = string.Empty;
+ /// <summary>
+ /// 缇ゆ帶鍚嶇О
+ /// </summary>
+ public string name = string.Empty;
+ /// <summary>
+ /// 缇ゆ帶绫诲瀷
+ /// </summary>
+ public string type = string.Empty;
+ /// <summary>
+ /// 鎴块棿uid
+ /// </summary>
+ public List<String> uids = new List<string>();
+ public List<String> roomIds = new List<string>();
+ /// <summary>
+ /// 缇ゆ帶鍔熻兘sid閰嶇疆
+ /// </summary>
+ public List<GroupControlFunction> sids = new List<GroupControlFunction>();
+
+
+
+ /// <summary>
+ /// 鑾峰彇璁惧娣诲姞鍒版埧闂寸殑鎴块棿鍚嶇О
+ /// </summary>
+ /// <returns></returns>
+ public string GetRoomListName()
+ {
+ string roomNameList = "";
+ foreach (var roomId in roomIds)
+ {
+ var findRoom = SpatialInfo.CurrentSpatial.RoomList.Find(obj => obj.roomId == roomId);
+ if (findRoom == null)
+ {
+ continue;
+ }
+ if (roomNameList != "")
+ {
+ roomNameList += ",";
+ }
+ roomNameList += findRoom.floorName + "-" + findRoom.roomName;
+ }
+ if (roomNameList == "")
+ {
+ roomNameList = Language.StringByID(StringId.WholeZone);
+ }
+ return roomNameList;
+ }
+ }
+
+ public class GroupControlFunction
+ {
+ /// <summary>
+ /// 鍔熻兘sid
+ /// </summary>
+ public string sid = string.Empty;
+ /// <summary>
+ /// 鍔熻兘spk
+ /// </summary>
+ public string spk = string.Empty;
+ }
+}
+
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/Face/FaceManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/Face/FaceManagementPage.cs
new file mode 100644
index 0000000..bcd094e
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/Face/FaceManagementPage.cs
@@ -0,0 +1,10 @@
+锘縰sing System;
+namespace HDL_ON.UI
+{
+ public class FaceManagementPage
+ {
+ public FaceManagementPage()
+ {
+ }
+ }
+}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs
index 80b04df..bc53c1a 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs
@@ -1,4 +1,6 @@
锘縰sing System;
+using System.Threading;
+using HDL_ON.DAL.Server;
using HDL_ON.UI.CSS;
using Shared;
@@ -14,6 +16,11 @@
Button btnAddMember;
Button btnScan;
EditText etMemberAccount;
+ EditText etMemberName;
+ /// <summary>
+ /// 浜鸿劯鐓х墖鏁版嵁
+ /// </summary>
+ string base64string;
Action backAction;
@@ -29,71 +36,372 @@
bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
new TopViewDiv(bodyView, Language.StringByID(StringId.AddMember)).LoadTopView();
- var btnTitle = new Button()
+ if (Entity.DB_ResidenceData.Instance.SupportFacePass)
{
- Y = Application.GetRealHeight(70),
- X = Application.GetRealWidth(16),
- Height = Application.GetRealHeight(32),
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- TextAlignment = TextAlignment.CenterLeft,
- TextID = StringId.NewMemberAccount,
- };
- bodyView.AddChidren(btnTitle);
+ var btnMemberName = new Button()
+ {
+ Y = Application.GetRealHeight(70),
+ X = Application.GetRealWidth(16),
+ Height = Application.GetRealHeight(32),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = StringId.MemberName,
+ };
+ bodyView.AddChidren(btnMemberName);
- etMemberAccount = new EditText()
+ etMemberName = new EditText()
+ {
+ Y = btnMemberName.Bottom,
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(356),
+ Height = Application.GetRealHeight(40),
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
+ PlaceholderTextColor = CSS_Color.PromptingColor2
+ };
+ bodyView.AddChidren(etMemberName);
+
+ var btnLine = new Button()
+ {
+ Y = etMemberName.Bottom,
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ };
+ bodyView.AddChidren(btnLine);
+
+
+ var btnTitle = new Button()
+ {
+ Y = btnLine.Bottom + Application.GetRealHeight(20),
+ X = Application.GetRealWidth(16),
+ Height = Application.GetRealHeight(32),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = StringId.MemberAccount,
+ };
+ bodyView.AddChidren(btnTitle);
+
+ etMemberAccount = new EditText()
+ {
+ Y = btnTitle.Bottom,
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(356),
+ Height = Application.GetRealHeight(40),
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
+ PlaceholderTextColor = CSS_Color.PromptingColor2
+ };
+ bodyView.AddChidren(etMemberAccount);
+
+ var btnLine1 = new Button()
+ {
+ Y = etMemberAccount.Bottom,
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ };
+ bodyView.AddChidren(btnLine1);
+
+ #region 浜鸿劯绠$悊
+ var btnMemberFaceTitle = new Button()
+ {
+ Y = btnLine1.Bottom + Application.GetRealHeight(20),
+ X = Application.GetRealWidth(16),
+ Height = Application.GetRealHeight(32),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = StringId.MemberFace,
+ };
+ bodyView.AddChidren(btnMemberFaceTitle);
+
+ var btnAddFace = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = btnMemberFaceTitle.Bottom,
+ Width = Application.GetRealWidth(120),
+ Height = Application.GetRealWidth(120),
+ Radius = (uint)Application.GetRealWidth(22),
+ BorderWidth = 0,
+ UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png",
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ IsBold = true,
+ TextAlignment = TextAlignment.Center,
+ };
+ bodyView.AddChidren(btnAddFace);
+
+
+ EventHandler<MouseEventArgs> eFaceHandler = (sender, e) =>
+ {
+ Application.HideSoftInput();
+ if (OnAppConfig.Instance.FaceManagementTip)
+ {
+ OnAppConfig.Instance.FaceManagementTip = true;
+ OnAppConfig.Instance.SaveConfig();
+ LoadPictureOptionView(btnAddFace);
+ return;
+ }
+
+ Dialog dialog = new Dialog()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+
+ FrameLayout contentView = new FrameLayout()
+ {
+ Gravity = Gravity.Center,
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(192),
+ BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+ BorderColor = 0x00000000,
+ BorderWidth = 0,
+ Radius = (uint)Application.GetMinRealAverage(10),
+ };
+ dialog.AddChidren(contentView);
+
+ Button btnTitle2 = new Button()
+ {
+ Y = Application.GetRealHeight(16),
+ Height = Application.GetRealHeight(30),
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.Center,
+ IsBold = true,
+ TextID = StringId.FaceProtocolPrompt,
+ };
+ contentView.AddChidren(btnTitle2);
+
+ Button btnMsg = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(35),
+ Y = btnTitle2.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = " 涓轰繚鎶ゆ偍鐨勪釜浜洪殣绉佹潈鐩婏紝鐗瑰悜鎮ㄩ�氱煡骞剁敵璇锋槑纭悓鎰忔巿鏉冦�傝浣犱粩缁嗛槄璇�",
+ IsMoreLines = true,
+ };
+ if(Language.CurrentLanguage != "Chinese")
+ {
+ btnMsg.Text = " In order to protect your personal privacy rights, we hereby notify you and apply for explicit consent authorization. Please read it carefully";
+ }
+ contentView.AddChidren(btnMsg);
+
+ Button btnMsg1 = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(15),
+ Y = btnMsg.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = " 銆奜n Pro浜鸿劯淇℃伅閲囬泦鍗忚銆�",
+ IsMoreLines = true,
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnMsg1.Text = " 'On Pro Face Information Collection Protocol'";
+ }
+
+ contentView.AddChidren(btnMsg1);
+
+ Button btnMsg2 = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(35),
+ Y = btnMsg1.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = " 鑻ュ悓鎰忚鍗忚锛岃鐐瑰嚮銆愬悓鎰忋�戞寜閿紝琛ㄧず鎮ㄥ凡缁忕悊瑙e苟鍚屾剰浜鸿劯淇℃伅閲囬泦鍗忚銆�",
+ IsMoreLines = true,
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnMsg2.Text = " If you agree to this agreement, please click the [Agree] button to indicate that you have understood and agreed to the face information collection agreement.";
+ }
+ contentView.AddChidren(btnMsg2);
+
+ Button btnLine2 = new Button()
+ {
+ Y = Application.GetRealHeight(149),
+ Height = Application.GetRealHeight(1),
+ Width = Application.GetRealWidth(270 / 2),
+ BackgroundColor = CSS.CSS_Color.DividingLineColor,
+ };
+ contentView.AddChidren(btnLine2);
+
+ Button btnCancel = new Button()
+ {
+ Y = btnLine2.Bottom,
+ Width = Application.GetRealWidth(135),
+ Height = Application.GetRealHeight(43),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ //SelectedTextColor = CSS_Color.MainBackgroundColor,
+ //SelectedBackgroundColor = CSS_Color.MainColor,
+ TextID = StringId.Disagree,
+ };
+ contentView.AddChidren(btnCancel);
+
+ Button btnConfirm = new Button()
+ {
+ X = btnCancel.Right,
+ Y = btnLine2.Y,
+ Width = Application.GetRealWidth(135),
+ Height = Application.GetRealHeight(45),
+ TextAlignment = TextAlignment.Center,
+ //TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.MainBackgroundColor,
+ BackgroundColor = CSS_Color.MainColor,
+ TextID = StringId.Agree,
+ };
+ contentView.AddChidren(btnConfirm);
+ //渚嬶細鍙充笅鍦嗚 澶у皬涓�50
+ int mRectCornerID = HDLUtils.RectCornerBottomRight;
+ btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID);
+ dialog.Show();
+
+ btnCancel.MouseUpEventHandler += (sender2, e2) =>
+ {
+ dialog.Close();
+ };
+ btnMsg1.MouseUpEventHandler += (sender2, e2) =>
+ {
+ string url = "https://developer.hdlcontrol.com/浜鸿劯淇℃伅閲囬泦鍗忚.html";
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ url = "https://developer.hdlcontrol.com/Face information collection protocol.html";
+ }
+ new WebViewDialog().LoadPage("浜鸿劯淇℃伅閲囬泦鍗忚", url);
+
+ dialog.Close();
+ };
+ btnConfirm.MouseUpEventHandler = (sender2, e2) => {
+ dialog.Close();
+ OnAppConfig.Instance.FaceManagementTip = true;
+ OnAppConfig.Instance.SaveConfig();
+ LoadPictureOptionView(btnAddFace);
+ };
+
+ };
+ btnAddFace.MouseUpEventHandler = eFaceHandler;
+ #endregion
+
+
+ btnAddMember = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = btnAddFace.Bottom + Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ BackgroundColor = CSS_Color.MainColor,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ IsBold = true,
+ TextAlignment = TextAlignment.Center,
+ TextID = StringId.Confirm,
+ };
+ bodyView.AddChidren(btnAddMember);
+
+
+ btnScan = new Button()
+ {
+ Y = btnTitle.Bottom,
+ Width = Application.GetRealWidth(40),
+ Height = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(310),
+ UnSelectedImagePath = "Public/Scan.png"
+ };
+ bodyView.AddChidren(btnScan);
+
+ }
+ else
{
- Y = btnTitle.Bottom,
- X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(356),
- Height = Application.GetRealHeight(40),
- TextColor = CSS_Color.TextualColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextAlignment = TextAlignment.CenterLeft,
- PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
- PlaceholderTextColor = CSS_Color.PromptingColor2
- };
- bodyView.AddChidren(etMemberAccount);
+ var btnTitle2 = new Button()
+ {
+ Y = Application.GetRealHeight(70),
+ X = Application.GetRealWidth(16),
+ Height = Application.GetRealHeight(32),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = StringId.NewMemberAccount,
+ };
+ bodyView.AddChidren(btnTitle2);
- var btnLine = new Button()
- {
- Y = etMemberAccount.Bottom,
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(1),
- BackgroundColor = CSS_Color.DividingLineColor,
- };
- bodyView.AddChidren(btnLine);
+ etMemberAccount = new EditText()
+ {
+ Y = btnTitle2.Bottom,
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(356),
+ Height = Application.GetRealHeight(40),
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
+ PlaceholderTextColor = CSS_Color.PromptingColor2
+ };
+ bodyView.AddChidren(etMemberAccount);
- btnAddMember = new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(244),
- Width = Application.GetRealWidth(220),
- Height = Application.GetRealWidth(44),
- Radius = (uint)Application.GetRealWidth(22),
- BorderWidth = 0,
- BorderColor = 0x00000000,
- BackgroundColor = CSS_Color.MainColor,
- TextColor = CSS_Color.MainBackgroundColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- IsBold = true,
- TextAlignment = TextAlignment.Center,
- TextID = StringId.ConfirmInvitation,
- };
- bodyView.AddChidren(btnAddMember);
+ var btnLine = new Button()
+ {
+ Y = etMemberAccount.Bottom,
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ };
+ bodyView.AddChidren(btnLine);
- btnScan = new Button()
- {
- Y = btnAddMember.Bottom,
- Height = Application.GetRealHeight(44),
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.MainColor,
- TextSize = CSS_FontSize.TextFontSize,
- TextID = StringId.ScanQRCoden,
- };
- bodyView.AddChidren(btnScan);
+ btnAddMember = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(244),
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ BackgroundColor = CSS_Color.MainColor,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ IsBold = true,
+ TextAlignment = TextAlignment.Center,
+ TextID = StringId.Confirm,
+ };
+ bodyView.AddChidren(btnAddMember);
+ btnScan = new Button()
+ {
+ Y = btnAddMember.Bottom,
+ Height = Application.GetRealHeight(44),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextID = StringId.ScanQRCoden,
+ };
+ bodyView.AddChidren(btnScan);
+ }
LoadEventList();
}
@@ -137,5 +445,152 @@
}) { IsBackground = true }.Start();
}
+
+ const int imageHeight = 400;
+
+ /// <summary>
+ /// 鍔犺浇鍥炬爣閫夋嫨閫夐」
+ /// </summary>
+ void LoadPictureOptionView(Button btnAddFace)
+ {
+ var pView = new FrameLayout()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+ bodyView.AddChidren(pView);
+
+ var pictureOptionView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(445 + 50),
+ Height = Application.GetRealHeight(250),
+ AnimateSpeed = 0.3f,
+ Animate = Animate.DownToUp,
+ };
+ pView.AddChidren(pictureOptionView);
+
+ var 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);
+
+ var 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 });
+
+ var 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 });
+
+ var 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);
+
+
+
+ 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) =>
+ {
+ if (imagePath != null)
+ {
+ var imageBytes = getFaceImageBytes(imagePath);
+ btnAddFace.ImageBytes = imageBytes;
+ base64string = Convert.ToBase64String(imageBytes);
+ }
+
+ }, imageName, 6, 6, imageHeight);
+
+ 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) =>
+ {
+ if (imagePath != null)
+ {
+ var imageBytes = getFaceImageBytes(imagePath);
+ btnAddFace.ImageBytes = imageBytes;
+ base64string = Convert.ToBase64String(imageBytes);
+ }
+ }, imageName, 6, 6, imageHeight);
+
+ pictureOptionView.Parent.RemoveFromParent();
+ };
+
+ }
+
+ /// <summary>
+ /// 鑾峰彇鏈湴閫夊彇鐨勪汉鑴告暟鎹�
+ /// </summary>
+ /// <param name="selectImagePath"></param>
+ /// <returns></returns>
+ byte[] getFaceImageBytes(string selectImagePath)
+ {
+ var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath);
+ System.IO.File.Delete(selectImagePath);
+ return imageBytes;
+ }
+
}
}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs
index 3ed1e67..066bd64 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs
@@ -22,12 +22,14 @@
{
btnAddMember.MouseUpEventHandler = (sender, e) => {
var memberAccount = etMemberAccount.Text.Trim();
- if(string.IsNullOrEmpty(memberAccount))
+ var name = etMemberName.Text.Trim();
+ if(string.IsNullOrEmpty(name))
{
- TipDivMsg(Language.StringByID(StringId.PlsEntryAccount));
+ TipDivMsg(Language.StringByID(StringId.PlsEntrySubAccountRemark));
return;
}
- BindMember(memberAccount);
+
+ BindMember(memberAccount, name, base64string);
};
}
@@ -35,7 +37,7 @@
/// 缁戝畾璐﹀彿
/// </summary>
/// <param name="memberAccount"></param>
- void BindMember(string memberAccount)
+ void BindMember(string memberAccount,string nickName,string faceUrl)
{
var waitPage = new Loading();
bodyView.AddChidren(waitPage);
@@ -45,7 +47,7 @@
{
try
{
- var result = new HttpServerRequest().BindResidenceMemberAccount(memberAccount, memberAccount);
+ var result = new HttpServerRequest().BindResidenceMemberAccount(memberAccount, nickName,faceUrl);
if (result.Code == StateCode.SUCCESS)
{
Application.RunOnMainThread(() =>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs
new file mode 100644
index 0000000..c5a8ad0
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs
@@ -0,0 +1,628 @@
+锘縰sing System;
+using System.Threading;
+using HDL_ON.DAL.Server;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ /// <summary>
+ /// 澧炲姞瀛愯处鍙风晫闈�
+ /// </summary>
+ public partial class MemberFaceManagementPage : FrameLayout
+ {
+ FrameLayout bodyView;
+
+ /// <summary>
+ /// 浜鸿劯鐓х墖鏁版嵁
+ /// </summary>
+ string base64string;
+ ResidenceMemberInfo memberInfo;
+ public MemberFaceManagementPage(ResidenceMemberInfo memberInfo)
+ {
+ bodyView = this;
+ this.memberInfo = memberInfo;
+ }
+
+
+ public void LoadPage()
+ {
+ bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
+ new TopViewDiv(bodyView, memberInfo.nickName).LoadTopView();
+
+ #region 浜鸿劯绠$悊
+ var btnMemberFaceTitle = new Button()
+ {
+ Y = Application.GetRealHeight(80),
+ X = Application.GetRealWidth(16),
+ Height = Application.GetRealHeight(32),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = StringId.MemberFace,
+ };
+ bodyView.AddChidren(btnMemberFaceTitle);
+
+ var btnAddFace = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = btnMemberFaceTitle.Bottom,
+ Width = Application.GetRealWidth(230),
+ Height = Application.GetRealWidth(230),
+ Radius = (uint)Application.GetRealWidth(22),
+ BorderWidth = 0,
+ UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png",
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ IsBold = true,
+ TextAlignment = TextAlignment.Center,
+ };
+ bodyView.AddChidren(btnAddFace);
+
+
+ EventHandler<MouseEventArgs> eFaceHandler = (sender, e) =>
+ {
+ if (OnAppConfig.Instance.FaceManagementTip)
+ {
+ OnAppConfig.Instance.FaceManagementTip = true;
+ OnAppConfig.Instance.SaveConfig();
+ LoadPictureOptionView(btnAddFace);
+ return;
+ }
+
+ Dialog dialog = new Dialog()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+
+ FrameLayout contentView = new FrameLayout()
+ {
+ Gravity = Gravity.Center,
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(192),
+ BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+ BorderColor = 0x00000000,
+ BorderWidth = 0,
+ Radius = (uint)Application.GetMinRealAverage(10),
+ };
+ dialog.AddChidren(contentView);
+
+ Button btnTitle = new Button()
+ {
+ Y = Application.GetRealHeight(16),
+ Height = Application.GetRealHeight(30),
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.Center,
+ IsBold = true,
+ TextID = StringId.FaceProtocolPrompt,
+ };
+ contentView.AddChidren(btnTitle);
+
+ Button btnMsg = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(35),
+ Y = btnTitle.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = " 涓轰繚鎶ゆ偍鐨勪釜浜洪殣绉佹潈鐩婏紝鐗瑰悜鎮ㄩ�氱煡骞剁敵璇锋槑纭悓鎰忔巿鏉冦�傝浣犱粩缁嗛槄璇�",
+ IsMoreLines = true,
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnMsg.Text = " In order to protect your personal privacy rights, we hereby notify you and apply for explicit consent authorization. Please read it carefully";
+ }
+ contentView.AddChidren(btnMsg);
+
+ Button btnMsg1 = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(15),
+ Y = btnMsg.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = " 銆奜n Pro浜鸿劯淇℃伅閲囬泦鍗忚銆�",
+ IsMoreLines = true,
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnMsg1.Text = " 'On Pro Face Information Collection Protocol'";
+ }
+
+ contentView.AddChidren(btnMsg1);
+
+ Button btnMsg2 = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(35),
+ Y = btnMsg1.Bottom,
+ Width = Application.GetRealHeight(200),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = " 鑻ュ悓鎰忚鍗忚锛岃鐐瑰嚮銆愬悓鎰忋�戞寜閿紝琛ㄧず鎮ㄥ凡缁忕悊瑙e苟鍚屾剰浜鸿劯淇℃伅閲囬泦鍗忚銆�",
+ IsMoreLines = true,
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnMsg2.Text = " If you agree to this agreement, please click the [Agree] button to indicate that you have understood and agreed to the face information collection agreement.";
+ }
+ contentView.AddChidren(btnMsg2);
+
+ Button btnLine = new Button()
+ {
+ Y = Application.GetRealHeight(149),
+ Height = Application.GetRealHeight(1),
+ Width = Application.GetRealWidth(270 / 2),
+ BackgroundColor = CSS.CSS_Color.DividingLineColor,
+ };
+ contentView.AddChidren(btnLine);
+
+ Button btnCancel = new Button()
+ {
+ Y = btnLine.Bottom,
+ Width = Application.GetRealWidth(135),
+ Height = Application.GetRealHeight(43),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ //SelectedTextColor = CSS_Color.MainBackgroundColor,
+ //SelectedBackgroundColor = CSS_Color.MainColor,
+ TextID = StringId.Disagree,
+ };
+ contentView.AddChidren(btnCancel);
+
+ Button btnConfirm = new Button()
+ {
+ X = btnCancel.Right,
+ Y = btnLine.Y,
+ Width = Application.GetRealWidth(135),
+ Height = Application.GetRealHeight(45),
+ TextAlignment = TextAlignment.Center,
+ //TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.MainBackgroundColor,
+ BackgroundColor = CSS_Color.MainColor,
+ TextID = StringId.Agree,
+ };
+ contentView.AddChidren(btnConfirm);
+ //渚嬶細鍙充笅鍦嗚 澶у皬涓�50
+ int mRectCornerID = HDLUtils.RectCornerBottomRight;
+ btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID);
+ dialog.Show();
+
+ btnCancel.MouseUpEventHandler += (sender2, e2) =>
+ {
+ dialog.Close();
+ };
+ btnMsg1.MouseUpEventHandler += (sender2, e2) =>
+ {
+ string url = "https://developer.hdlcontrol.com/浜鸿劯淇℃伅閲囬泦鍗忚.html";
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ url = "https://developer.hdlcontrol.com/Face information collection protocol.html";
+ }
+ new WebViewDialog().LoadPage("浜鸿劯淇℃伅閲囬泦鍗忚", url);
+
+ dialog.Close();
+ };
+ btnConfirm.MouseUpEventHandler = (sender2, e2) =>
+ {
+ dialog.Close();
+ OnAppConfig.Instance.FaceManagementTip = true;
+ OnAppConfig.Instance.SaveConfig();
+ LoadPictureOptionView(btnAddFace);
+ };
+
+ };
+ btnAddFace.MouseUpEventHandler = eFaceHandler;
+ #endregion
+
+ var btnDeleteFaceDate = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = btnAddFace.Bottom + Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ BackgroundColor = 0xFFFF7272,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ IsBold = true,
+ TextAlignment = TextAlignment.Center,
+ TextID = StringId.DeleteMemberFace,
+ };
+ bodyView.AddChidren(btnDeleteFaceDate);
+
+ btnDeleteFaceDate.MouseUpEventHandler = (sender, e) => {
+ var waitPage = new Loading();
+ waitPage.Start("");
+ new Thread(() =>
+ {
+ try
+ {
+ var pack = new HttpServerRequest().DeleteMemberFace(memberInfo.id);
+ if (pack != null)
+ {
+ if(pack.Code == StateCode.SUCCESS)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ btnAddFace.ImageBytes = null;
+ btnAddFace.UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png";
+ btnDeleteFaceDate.Enable = btnDeleteFaceDate.Visible = false;
+ });
+ }
+ }
+ else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ TipDivMsg(Language.StringByID(StringId.delFail));
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+
+ };
+
+ if (!string.IsNullOrEmpty(memberInfo.userFaceUrl))
+ {
+ var waitPage = new Loading();
+ waitPage.Start("");
+ new Thread(() =>
+ {
+ try
+ {
+ var bytes = downloadImageBytes(memberInfo.userFaceUrl);
+ if (bytes != null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ btnAddFace.ImageBytes = bytes;
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ else
+ {
+ btnDeleteFaceDate.Enable = btnDeleteFaceDate.Visible = false;
+ }
+ }
+
+ void TipDivMsg(string msg)
+ {
+ var tipBodyView = new FrameLayout();
+ bodyView.AddChidren(tipBodyView);
+
+ var msgView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(167),
+ Width = Application.GetRealWidth(210),
+ Height = Application.GetRealHeight(62),
+ Radius = (uint)Application.GetRealWidth(8),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ BackgroundColor = 0xFF333333,
+ };
+ tipBodyView.AddChidren(msgView);
+
+ var btnMsg = new Button()
+ {
+ Gravity = Gravity.Center,
+ Width = Application.GetRealWidth(186),
+ Height = Application.GetRealHeight(42),
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.Center,
+ Text = msg,
+ IsMoreLines = true,
+ };
+ msgView.AddChidren(btnMsg);
+
+ new System.Threading.Thread(() => {
+ System.Threading.Thread.Sleep(1200);
+ Application.RunOnMainThread(() => {
+ tipBodyView.RemoveAll();
+ tipBodyView.RemoveFromParent();
+ });
+ })
+ { IsBackground = true }.Start();
+
+ }
+
+ const int imageHeight = 400;
+
+ /// <summary>
+ /// 鍔犺浇鍥炬爣閫夋嫨閫夐」
+ /// </summary>
+ void LoadPictureOptionView(Button btnAddFace)
+ {
+ var pView = new FrameLayout()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+ bodyView.AddChidren(pView);
+
+ var pictureOptionView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(445 + 50),
+ Height = Application.GetRealHeight(250),
+ AnimateSpeed = 0.3f,
+ Animate = Animate.DownToUp,
+ };
+ pView.AddChidren(pictureOptionView);
+
+ var 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);
+
+ var 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 });
+
+ var 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 });
+
+ var 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);
+
+
+
+ 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, 6, 6, imageHeight);
+
+ 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, 6, 6, imageHeight);
+
+ pictureOptionView.Parent.RemoveFromParent();
+ };
+
+ }
+
+ /// <summary>
+ /// 涓嬭浇浜戠浜鸿劯鍥剧墖
+ /// </summary>
+ /// <param name="imageUrl"></param>
+ /// <returns></returns>
+ byte[] downloadImageBytes(string imageUrl)
+ {
+ var imageBytes = ImageUtlis.Current.GetImageDownloadUrl(imageUrl);
+
+ return imageBytes;
+ }
+
+
+ /// <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.TakePicture((imagePath) =>
+ {
+ CropImageCallBack(imagePath, 1, imageName);
+ }, imageName, 6, 6, imageHeight);
+ }
+ else
+ {
+ CropImage.SelectPicture((imagePath) =>
+ {
+ CropImageCallBack(imagePath, 2, imageName);
+ }, imageName, 6, 6, imageHeight);
+ }
+ }
+ };
+
+ //if (isSuccess)
+ //{
+ //}
+
+ 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().UpdataMemberFace(memberInfo.id, base64string);
+ if (pack != null)
+ {
+ var data = Newtonsoft.Json.JsonConvert.DeserializeObject<System.Collections.Generic.Dictionary<string,string>>(pack.Data.ToString());
+ if(data!= null)
+ {
+ data.TryGetValue("userFace",out memberInfo.userFaceUrl);
+ }
+ Utlis.WriteLine("涓婁紶缁撴灉锛�" + pack.message);
+ if(pack.Code == StateCode.SUCCESS)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ this.RemoveFromParent();
+ });
+ }
+ uploadResultAction?.Invoke(pack.Code == StateCode.SUCCESS);
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log(ex.Message);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs
index 0eec00f..0186ae1 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs
@@ -3,6 +3,8 @@
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using System.Collections.Generic;
+using System.Threading;
+using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
@@ -27,6 +29,9 @@
public void LoadPage()
{
+#if DEBUG
+ Entity.DB_ResidenceData.Instance.SupportFacePass = true;
+#endif
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
//鍒涘缓璇诲彇鎴愬憳璐﹀彿绾跨▼
var thread = LoadThread_GetResidenceMemberAccount();
@@ -77,7 +82,6 @@
{
Gravity = Gravity.CenterHorizontal,
Width = Application.GetRealWidth(343),
- //Height = Application.GetRealWidth(230),
Height = Application.GetRealWidth(180),
BackgroundColor = CSS_Color.MainBackgroundColor,
Radius = (uint)Application.GetRealWidth(12),
@@ -86,6 +90,10 @@
ScrollEnabled = false,
VerticalScrollBarEnabled = false,//闅愯棌婊氬姩鏉�
};
+ if (Entity.DB_ResidenceData.Instance.SupportFacePass)
+ {
+ sView.Height = Application.GetRealWidth(180 + 50);
+ }
contentView.AddChidren(sView);
#region 澶村儚淇℃伅
var view1 = new FrameLayout()
@@ -115,7 +123,7 @@
TextID = StringId.Member
};
userTypeView.AddChidren(btnUserTypeName);
- if(Language.CurrentLanguage == "English")
+ if (Language.CurrentLanguage == "English")
{
userTypeView.X = Application.GetRealWidth(260);
}
@@ -145,7 +153,11 @@
Text = HDLCommon.Current.GetUserName(memberInfo.memberName)
};
view1.AddChidren(btnMemberName);
+ if (memberInfo.isVirtualAccount)
+ {
+ btnMemberName.Text = memberInfo.nickName;
+ }
var btnMemberEmail = new Button()
{
X = Application.GetRealWidth(88),
@@ -213,7 +225,7 @@
Width = Application.GetRealWidth(311),
BackgroundColor = CSS_Color.DividingLineColor,
});
- LoadView_EidtNickname(btnNickname, btnNicknameRight, memberInfo);
+ LoadView_EidtNickname(btnNickname, btnNicknameRight, memberInfo, memberInfo.isVirtualAccount ? btnMemberName : null);
#endregion
#region 浣跨敤鏉冮檺
@@ -244,17 +256,12 @@
};
view3.AddChidren(btnPermissionRight);
- //sView.AddChidren(new Button()
- //{
- // Gravity = Gravity.CenterHorizontal,
- // Height = Application.GetRealWidth(1),
- // Width = Application.GetRealWidth(311),
- // BackgroundColor = CSS_Color.DividingLineColor,
- //});
+
EventHandler<MouseEventArgs> eHandler = (sender, e) =>
{
- action = () => {
+ action = () =>
+ {
residenceMemberInfos.Remove(memberInfo);
LoadMemberRow();
};
@@ -263,45 +270,66 @@
mmp.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
- sView.MouseUpEventHandler = eHandler;
+ view3.MouseUpEventHandler = eHandler;
btnPermissionTitle.MouseUpEventHandler = eHandler;
btnPermissionRight.MouseUpEventHandler = eHandler;
#endregion
- //#region 鍒涘缓鍦烘櫙 2020-12-23 闅愯棌鍒涘缓鍦烘櫙鎸夐挳
- //var view4 = new FrameLayout()
- //{
- // Height = Application.GetRealWidth(50),
- //};
- //sView.AddChidren(view4);
- //var btnCreateSceneTitle = new Button()
- //{
- // X = Application.GetRealWidth(16),
- // Width = Application.GetRealWidth(200),
- // TextAlignment = TextAlignment.CenterLeft,
- // TextColor = CSS_Color.FirstLevelTitleColor,
- // TextSize = CSS_FontSize.TextFontSize,
- // TextID = StringId.CreateScene,
- //};
- //view4.AddChidren(btnCreateSceneTitle);
+ #region 浜鸿劯绠$悊
+ if (Entity.DB_ResidenceData.Instance.SupportFacePass)
+ {
+ sView.AddChidren(new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealWidth(1),
+ Width = Application.GetRealWidth(311),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ });
- //var btnCreateSceneRight = new Button()
- //{
- // X = Application.GetRealWidth(287),
- // Y = Application.GetRealHeight(4),
- // Width = Application.GetMinRealAverage(38),
- // Height = Application.GetMinRealAverage(38),
- // UnSelectedImagePath = "Public/Switch_2.png",
- // SelectedImagePath = "Public/SwitchOn_2.png",
- // IsSelected = memberInfo.isAllowCreateScene
- //};
- //view4.AddChidren(btnCreateSceneRight);
+ var view4 = new FrameLayout()
+ {
+ Height = Application.GetRealWidth(49),
+ };
+ sView.AddChidren(view4);
- //LoadView_ChangeCreateSceneState(btnCreateSceneRight, btnCreateSceneTitle, memberInfo);
- //#endregion
+ var btnFaceManagementTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(330),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextID = StringId.FaceManagemant,
+ };
+ view4.AddChidren(btnFaceManagementTitle);
+
+ var btnFaceManagementRight = new Button()
+ {
+ X = Application.GetRealWidth(311),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/Right.png",
+ };
+ view4.AddChidren(btnFaceManagementRight);
+
+
+ EventHandler<MouseEventArgs> eFaceHandler = (sender, e) =>
+ {
+ var page = new MemberFaceManagementPage(memberInfo);
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ view4.MouseUpEventHandler = eFaceHandler;
+ btnFaceManagementRight.MouseUpEventHandler = eFaceHandler;
+ btnFaceManagementTitle.MouseUpEventHandler = eFaceHandler;
+ }
+ #endregion
+
}
}
}
-}
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
index e659d9c..213d8af 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
@@ -161,7 +161,7 @@
/// <summary>
/// 淇敼鏄电О绐楀彛
/// </summary>
- void LoadView_EidtNickname(Button btn1, Button btn2, ResidenceMemberInfo mInfo)
+ void LoadView_EidtNickname(Button btn1, Button btn2, ResidenceMemberInfo mInfo,Button btnMemberName)
{
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
@@ -185,12 +185,16 @@
{
try
{
- var responsePack = new HttpServerRequest().EditSubAccountNickName(str, mInfo.childAccountId);
+ var responsePack = new HttpServerRequest().EditSubAccountNickName(str, mInfo.id);
if (responsePack.Code.ToUpper() == StateCode.SUCCESS)
{
Application.RunOnMainThread(() =>
{
btn1.Text = str;
+ if (btnMemberName != null)
+ {
+ btnMemberName.Text = str;
+ }
});
mInfo.nickName = str;
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs
index e7454e3..dcf64c7 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs
@@ -63,34 +63,51 @@
};
headPortraitView.AddChidren(btnMemberName);
string username = HDLCommon.Current.GetUserName(memberInfo.memberName);
- btnMemberName.Text = memberInfo.nickName + "(" + username + ")";
+ btnMemberName.Text = memberInfo.nickName;
- #region RoomList
- roomListView = new VerticalScrolViewLayout()
+ if (!memberInfo.isVirtualAccount)
{
- Y = Application.GetRealHeight(138),
- Height = Application.GetRealHeight(471),
- //BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- bodyView.AddChidren(roomListView);
- #endregion
-
+ btnMemberName.Text = memberInfo.nickName + "(" + username + ")";
+ #region RoomList
+ roomListView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(138),
+ Height = Application.GetRealHeight(471),
+ //BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ bodyView.AddChidren(roomListView);
+ #endregion
+ }
btnDelMember = new Button()
{
Y = Application.GetRealHeight(617),
- //Height = MainPage.Increase ? Application.GetRealHeight(70) : Application.GetRealHeight(50),
- Height = Application.GetRealHeight(50),
- TextAlignment = TextAlignment.Center,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextColor = CSS_Color.WarningColor,
+ //Height = Application.GetRealHeight(50),
+ //TextAlignment = TextAlignment.Center,
+ //TextSize = CSS_FontSize.SubheadingFontSize,
+ //TextColor = CSS_Color.WarningColor,
TextID = StringId.RemoveTheMember,
- BackgroundColor = CSS_Color.MainBackgroundColor,
+ //BackgroundColor = CSS_Color.MainBackgroundColor,
+
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ BackgroundColor = 0xFFFF7272,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ IsBold = true,
+ TextAlignment = TextAlignment.Center,
+
};
bodyView.AddChidren(btnDelMember);
LoadEventList();
-
- GetShareDataByAccount();
+ if (!memberInfo.isVirtualAccount)
+ {
+ GetShareDataByAccount();
+ }
}
/// <summary>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
index 3c86be0..4ca2bdf 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -2,6 +2,7 @@
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
using HDL_ON.DriverLayer;
+using System;
namespace HDL_ON.UI
{
@@ -290,22 +291,26 @@
{
contentView.RemoveAll();
+ var residenceFunctionCount = 0;
+
#region 浣忓畢淇℃伅鍖哄煙
- //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && DB_ResidenceData.Instance.GatewayType == 1)
- //{
- // residenceInfoView = new FrameLayout()
- // {
- // Gravity = Gravity.CenterHorizontal,
- // Width = Application.GetRealWidth(343),
- // Height = Application.GetRealHeight(213),
- // BackgroundColor = CSS_Color.MainBackgroundColor,
- // Radius = (uint)Application.GetRealHeight(12),
- // BorderColor = 0x00FFFFFF,
- // BorderWidth = 0,
- // };
- // contentView.AddChidren(residenceInfoView);
- //}
- //else
+ if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare
+ && DB_ResidenceData.Instance.GatewayType == 1
+ && DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl)
+ {
+ residenceInfoView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(213),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(12),
+ BorderColor = 0x00FFFFFF,
+ BorderWidth = 0,
+ };
+ contentView.AddChidren(residenceInfoView);
+ }
+ else
{
residenceInfoView = new FrameLayout()
{
@@ -388,6 +393,7 @@
if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
{
+ residenceFunctionCount++;
#region ---浣忓畢绠$悊鍖哄煙
residenceManageView = new FrameLayout()
{
@@ -420,6 +426,7 @@
residenceManageView.AddChidren(btnResidenceManageText);
#endregion
+ residenceFunctionCount++;
#region ---鎴愬憳鍖哄煙
residenceMemberView = new FrameLayout()
{
@@ -547,6 +554,7 @@
if (DB_ResidenceData.Instance.GatewayType == 1)
{
+ residenceFunctionCount++;
#region ---娣诲姞鍔熻兘鍖哄煙
residenceAddFunctionView = new FrameLayout()
{
@@ -577,6 +585,52 @@
};
residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
#endregion
+
+ if (DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl)
+ {
+ residenceFunctionCount++;
+ #region ---缁勫悎璋冨厜
+ var faceManagementView = new FrameLayout()
+ {
+ X = Application.GetRealWidth(28 - 24),
+ Y = residenceManageView.Bottom,
+ Width = Application.GetRealWidth(64 + 48),
+ Height = Application.GetRealWidth(64),
+ };
+ residenceInfoView.AddChidren(faceManagementView);
+
+ var btnFaceManagementIcon = new Button
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(5),
+ Width = Application.GetMinRealAverage(30),
+ Height = Application.GetMinRealAverage(30),
+ UnSelectedImagePath = "PersonalCenter/CombinedDimmingIcon.png",
+ };
+ faceManagementView.AddChidren(btnFaceManagementIcon);
+ var btnFaceManagementText = new Button()
+ {
+ Y = btnResidenceManageIcon.Bottom,
+ Height = Application.GetRealHeight(29),
+ TextID = StringId.CombinedDimming,
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel
+ };
+ faceManagementView.AddChidren(btnFaceManagementText);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ var page = new CombinedDimmingListPage();
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ faceManagementView.MouseUpEventHandler = eventHandler;
+ btnFaceManagementText.MouseUpEventHandler = eventHandler;
+ btnFaceManagementIcon.MouseUpEventHandler = eventHandler;
+ #endregion
+ }
}
}
else
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs
new file mode 100644
index 0000000..35af275
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs
@@ -0,0 +1,145 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ /// <summary>
+ /// 鎴戠殑浜岀淮鐮侀〉闈�
+ /// </summary>
+ public class DeliveryQrCodePage : FrameLayout
+ {
+ FrameLayout bodyView;
+
+ public DeliveryQrCodePage()
+ {
+ bodyView = this;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="isStartCheckResidenceThread">鏄惁寮�鍚綇瀹呯洃鍚嚎绋嬶紝娌℃湁浣忓畢鐨勬椂鍊欏埆浜烘壂鐮佹坊鍔犱綘涓烘垚鍛樼殑鏃跺�欒皟鐢�</param>
+ public void LoadPage()
+ {
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+ new TopViewDiv(bodyView, Language.StringByID(StringId.ResidentialDelivery)).LoadTopView();
+
+ int backViewHeight = Application.GetRealHeight(132) + Application.GetRealWidth(266);
+ FrameLayout backView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(144),
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealWidth(288),
+ Width = Application.GetRealWidth(288),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(8),
+ };
+ bodyView.AddChidren(backView);
+
+
+
+ var btnHomeName = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = backView.Bottom + Application.GetRealWidth(12),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ Text = Entity.DB_ResidenceData.Instance.CurrentRegion.homeName,
+ IsBold = true,
+ IsMoreLines = true,
+
+ };
+ bodyView.AddChidren(btnHomeName);
+
+
+
+ //浜岀淮鐮�
+ int codeWidth = Application.GetRealWidth(266);
+ ImageView codeImage = new ImageView()
+ {
+ Gravity = Gravity.Center,
+ Height = codeWidth,
+ Width = codeWidth,
+ ImageBytes = Scan.BytesFromText(Entity.DB_ResidenceData.Instance.CurrentRegion.deliverUrl,codeWidth, codeWidth),
+ };
+ backView.AddChidren(codeImage);
+
+ ////浜岀淮鐮佷腑蹇冨ご鍍�
+ //int imageWidth = Application.GetMinRealAverage(60);
+ //int imageX = codeImage.X + (codeWidth - imageWidth) / 2;
+ //int imageY = codeImage.Y + (codeWidth - imageWidth) / 2;
+ //ImageView headImage2 = new ImageView()
+ //{
+ // X = imageX,
+ // Y = imageY,
+ // Width = imageWidth,
+ // Height = imageWidth,
+ // ImagePath = UserInfo.Current.headImagePagePath,
+ // BorderColor = CSS_Color.MainBackgroundColor,
+ // BorderWidth = (uint)Application.GetRealWidth(2),
+ // Radius = (uint)Application.GetMinRealAverage(30),
+ //};
+ //backView.AddChidren(headImage2);
+
+
+
+ }
+
+ /// <summary>
+ /// 寮�鍚娴嬩綇瀹呮槸鍚﹀凡缁忔坊鍔犱簡鐨勭嚎绋�
+ /// </summary>
+ private void StartCheckResidenceThread()
+ {
+ //鑾峰彇浣忓畢鍒楄〃鐨勫弬鏁�
+ var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(new DAL.Server.GetHomeListObj() { homeType = HomeTypeEnum.ALL.ToString() });
+
+ new System.Threading.Thread(() =>
+ {
+ while (this.Parent != null)
+ {
+ System.Threading.Thread.Sleep(4000);
+ if (this.Parent == null)
+ {
+ break;
+ }
+ //璁块棶浜戠鑾峰彇鍒楄〃
+ var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson);
+ if (resultObj.Code == DAL.Server.StateCode.SUCCESS)
+ {
+ var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString());
+ if (homeList == null || homeList.Count == 0)
+ {
+ //濡傛灉杩樻病鏈変綇瀹呯殑璇�,缁х画涓嬩竴娆℃娴�
+ continue;
+ }
+ //璋冪敤On鍘熸潵鐨勬柟娉�,鍒锋柊浣忓畢鍒楄〃鍙婂叾缂撳瓨
+ var pm = new DAL.Server.HttpServerRequest();
+ pm.GetHomePager();
+ Application.RunOnMainThread(() =>
+ {
+ if (this.Parent == null)
+ {
+ return;
+ }
+
+ //璺宠浆椤甸潰----
+ MainPage.GoUserPage(true, false, () =>
+ {
+ //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈�
+ var form = new WellcomToHomeForm();
+ form.ShowForm();
+ });
+ });
+ break;
+ }
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ }
+}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
index 849be74..81224f4 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
@@ -202,9 +202,9 @@
};
residenceAddressRow.AddChidren(btnResidenceAddress);
#endregion
- #region 妤煎眰绠$悊
contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
+ #region 妤煎眰绠$悊
floorManagementRow = new FrameLayout()
{
Height = Application.GetRealHeight(50),
@@ -275,182 +275,233 @@
roomManagementRow.AddChidren(btnRoomManagementSkinIcon);
#endregion
- #region 绠$悊鍛樻潈闄愯縼绉�
- contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
- administratorPermissionMigrationRow = new FrameLayout()
+ if (DB_ResidenceData.Instance.CurrentRegion.deliverStatus == "PAID")
{
- Height = Application.GetRealHeight(65),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false)
- {
- //鏄富璐﹀彿鏈汉鎵嶈兘鏄剧ず杩欎釜鑿滃崟
- contentView.AddChidren(administratorPermissionMigrationRow);
- }
-
- btnAdministratorPermissionMigrationTitle = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(10),
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(24),
- TextID = StringId.AdministratorPermissionMigration,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextColor = CSS_Color.FirstLevelTitleColor,
- };
- administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationTitle);
-
- btnAdministratorPermissionMigrationExplan = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = btnAdministratorPermissionMigrationTitle.Bottom,
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(21),
- TextID = StringId.AdministratorPermissionMigrationExPlan,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextColor = CSS_Color.PromptingColor1,
- };
- administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationExplan);
-
-
- btnAdministratorPermissionMigrationSkinIcon = new Button()
- {
- X = Application.GetRealWidth(343),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
- UnSelectedImagePath = "Public/RightIcon.png",
- };
- administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationSkinIcon);
-
- administratorPermissionMigrationRow.AddChidren(
- new Button()
+ #region 绠$悊鍛樻潈闄愯縼绉�
+ contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
+ administratorPermissionMigrationRow = new FrameLayout()
{
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(64),
- Height = Application.GetRealHeight(1),
- Width = Application.GetRealWidth(343),
- BackgroundColor = CSS_Color.DividingLineColor,
- });
- #endregion
-
- #region 杩囨埛
- transferRow = new FrameLayout()
- {
- Y = administratorPermissionMigrationRow.Bottom,
- Height = Application.GetRealHeight(65),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- //鏈夌綉鍏虫墠鑳借繃鎴�
- if (DB_ResidenceData.Instance.HomeGateway != null && string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId) == false
- && DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false)
- {
- contentView.AddChidren(transferRow);
- }
-
- btnTransferTitle = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(10),
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(24),
- TextID = StringId.Transfer,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextColor = CSS_Color.FirstLevelTitleColor,
- };
- transferRow.AddChidren(btnTransferTitle);
-
- btnTrasferExplan = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = btnTransferTitle.Bottom,
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(21),
- TextID = StringId.TransferExPlan,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextColor = CSS_Color.PromptingColor1,
- };
- transferRow.AddChidren(btnTrasferExplan);
-
- btnTrasferSkinIcon = new Button()
- {
- X = Application.GetRealWidth(343),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
- UnSelectedImagePath = "Public/RightIcon.png",
- };
- transferRow.AddChidren(btnTrasferSkinIcon);
- #endregion
-
- #region 璋冭瘯鏉冮檺
-
- contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
- FrameLayout commissioningAuthorityRow;
- commissioningAuthorityRow = new FrameLayout()
- {
- Height = Application.GetRealHeight(65),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- contentView.AddChidren(commissioningAuthorityRow);
-
-
- var btnCommissioningAuthorityTitle = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(10),
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(24),
- TextID = StringId.CommissioningAuthority,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextColor = CSS_Color.FirstLevelTitleColor,
- };
- commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle);
-
- var btnCommissioningAuthorityExplan = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = btnCommissioningAuthorityTitle.Bottom,
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(21),
- TextID = StringId.CommissioningAuthorityExPlan,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextColor = CSS_Color.PromptingColor1,
- };
- commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan);
-
- btnCommissioningAuthoritySwitchIcon = new Button()
- {
- X = Application.GetRealWidth(314),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(48),
- Height = Application.GetMinRealAverage(36),
- UnSelectedImagePath = "Public/Switch.png",
- SelectedImagePath = "Public/SwitchOn.png",
- IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm
- };
- commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon);
-
- btnCommissioningAuthoritySwitchIcon.MouseUpEventHandler = (sender, e) =>
- {
- DB_ResidenceData.Instance.CurrentRegion.debugPerm = !DB_ResidenceData.Instance.CurrentRegion.debugPerm;
- btnCommissioningAuthoritySwitchIcon.IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm;
- new System.Threading.Thread(() =>
+ Height = Application.GetRealHeight(65),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false)
{
- new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm);
- })
- { IsBackground = true }.Start();
- };
+ //鏄富璐﹀彿鏈汉鎵嶈兘鏄剧ず杩欎釜鑿滃崟
+ contentView.AddChidren(administratorPermissionMigrationRow);
+ }
- #endregion
+ btnAdministratorPermissionMigrationTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(24),
+ TextID = StringId.AdministratorPermissionMigration,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ };
+ administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationTitle);
+
+ btnAdministratorPermissionMigrationExplan = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnAdministratorPermissionMigrationTitle.Bottom,
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(21),
+ TextID = StringId.AdministratorPermissionMigrationExPlan,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextColor = CSS_Color.PromptingColor1,
+ };
+ administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationExplan);
+ btnAdministratorPermissionMigrationSkinIcon = new Button()
+ {
+ X = Application.GetRealWidth(343),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/RightIcon.png",
+ };
+ administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationSkinIcon);
+
+ administratorPermissionMigrationRow.AddChidren(
+ new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(1),
+ Width = Application.GetRealWidth(343),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ });
+ #endregion
+
+ #region 杩囨埛
+ transferRow = new FrameLayout()
+ {
+ Y = administratorPermissionMigrationRow.Bottom,
+ Height = Application.GetRealHeight(65),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ //鏈夌綉鍏虫墠鑳借繃鎴�
+ if (DB_ResidenceData.Instance.HomeGateway != null && string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId) == false
+ && DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false)
+ {
+ contentView.AddChidren(transferRow);
+ }
+
+ btnTransferTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(24),
+ TextID = StringId.Transfer,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ };
+ transferRow.AddChidren(btnTransferTitle);
+
+ btnTrasferExplan = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnTransferTitle.Bottom,
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(21),
+ TextID = StringId.TransferExPlan,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextColor = CSS_Color.PromptingColor1,
+ };
+ transferRow.AddChidren(btnTrasferExplan);
+
+ btnTrasferSkinIcon = new Button()
+ {
+ X = Application.GetRealWidth(343),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/RightIcon.png",
+ };
+ transferRow.AddChidren(btnTrasferSkinIcon);
+ #endregion
+
+ #region 璋冭瘯鏉冮檺
+
+ contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
+ FrameLayout commissioningAuthorityRow;
+ commissioningAuthorityRow = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(65),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ contentView.AddChidren(commissioningAuthorityRow);
+
+
+ var btnCommissioningAuthorityTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(24),
+ TextID = StringId.CommissioningAuthority,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ };
+ commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle);
+
+ var btnCommissioningAuthorityExplan = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnCommissioningAuthorityTitle.Bottom,
+ Width = Application.GetRealWidth(308),
+ Height = Application.GetRealHeight(21),
+ TextID = StringId.CommissioningAuthorityExPlan,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextColor = CSS_Color.PromptingColor1,
+ };
+ commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan);
+
+ btnCommissioningAuthoritySwitchIcon = new Button()
+ {
+ X = Application.GetRealWidth(314),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(48),
+ Height = Application.GetMinRealAverage(36),
+ UnSelectedImagePath = "Public/Switch.png",
+ SelectedImagePath = "Public/SwitchOn.png",
+ IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm
+ };
+ commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon);
+
+ btnCommissioningAuthoritySwitchIcon.MouseUpEventHandler = (sender, e) =>
+ {
+ DB_ResidenceData.Instance.CurrentRegion.debugPerm = !DB_ResidenceData.Instance.CurrentRegion.debugPerm;
+ btnCommissioningAuthoritySwitchIcon.IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm;
+ new System.Threading.Thread(() =>
+ {
+ new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm);
+ })
+ { IsBackground = true }.Start();
+ };
+
+ #endregion
+
+
+
+ LoadEvent_SkipAdminMigrationConfirmPage();
+ LoadEvent_SkipTransferConfirmPage();
+ }
+ else
+ {
+ #region 浜や粯浜岀淮鐮�
+ contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
+ var deliveryQRcodeRow = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ contentView.AddChidren(deliveryQRcodeRow);
+
+ var btnDeliveryQRcodeTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(308),
+ TextID = StringId.ResidentialDelivery,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ };
+ deliveryQRcodeRow.AddChidren(btnDeliveryQRcodeTitle);
+
+
+ var btnDeliveryQRcodeRightIcon = new Button()
+ {
+ X = Application.GetRealWidth(343),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/RightIcon.png",
+ };
+ deliveryQRcodeRow.AddChidren(btnDeliveryQRcodeRightIcon);
+
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ var skipPage = new DeliveryQrCodePage();
+ MainPage.BasePageView.AddChidren(skipPage);
+ skipPage.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ deliveryQRcodeRow.MouseUpEventHandler = eventHandler;
+ btnDeliveryQRcodeTitle.MouseUpEventHandler = eventHandler;
+ btnDeliveryQRcodeRightIcon.MouseUpEventHandler = eventHandler;
+ #endregion
+ }
LoadEventList();
}
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
index f62265b..43aec8b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
@@ -14,8 +14,6 @@
LoadEvent_SkipRoomsPage();
LoadEvent_EditResidencName();
LoadEvent_EditResidencAddress();
- LoadEvent_SkipAdminMigrationConfirmPage();
- LoadEvent_SkipTransferConfirmPage();
}
/// <summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs
index 93f3500..ff748b3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs
@@ -138,6 +138,13 @@
{
tipMsg = "纭畾鍏抽棴?";
}
+ if (Language.CurrentLanguage != "Chinese")
+ {
+
+ tipMsg = "Are you sure to close?";
+ if (this.btnSwitch.IsSelected)
+ tipMsg = "Are you sure to open it?";
+ }
Action action = () => {
this.btnPictrue.CanClick = false;
@@ -155,7 +162,7 @@
});
});
};
- new PublicAssmebly().TipOptionMsg(StringId.EmptyString, tipMsg, action);
+ new PublicAssmebly().TipOptionMsg(StringId.Tip, tipMsg, action);
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
index a49c750..147501a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -495,6 +495,7 @@
List<uint> levelColorList = new List<uint>();
List<int> levelTextList = new List<int>();
List<string> levelText = new List<string>();
+ List<string> intervalList = new List<string>();
var configs = sensor.GetAttrKeyConfigs(sensor.SpkClassification);
@@ -514,7 +515,9 @@
{
levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
- foreach(var iii in levelTextList)
+ intervalList = sensorTemp.GetIntervalValue(sensor.spk);
+
+ foreach (var iii in levelTextList)
{
levelText.Add(Language.StringByID(iii));
}
@@ -611,55 +614,65 @@
IsBold = true,
TextID = StringId.ColorValue,
});
- for (int index = 0; index < levelText.Count; index++)
+ try
{
- infoView.AddChidren(new Button()
+ for (int index = 0; index < levelText.Count; index++)
{
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(303),
- Height = Application.GetRealWidth(1),
- BackgroundColor = CSS_Color.DividingLineColor,
- });
+ //if(sensorTemp.GetIntervalValue(sensor.spk).Count >= index)
+ //{
+ // return;
+ //}
+ infoView.AddChidren(new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(303),
+ Height = Application.GetRealWidth(1),
+ BackgroundColor = CSS_Color.DividingLineColor,
+ });
- FrameLayout subInfoView = new FrameLayout()
- {
- Height = Application.GetRealHeight(44),
- };
- infoView.AddChidren(subInfoView);
+ FrameLayout subInfoView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(44),
+ };
+ infoView.AddChidren(subInfoView);
- subInfoView.AddChidren(new Button()
- {
- X = Application.GetRealWidth(20),
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- Text = sensorTemp.GetIntervalValue(sensor.spk)[index]
- });
+ subInfoView.AddChidren(new Button()
+ {
+ X = Application.GetRealWidth(20),
+ Width = Application.GetRealWidth(100),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ IsBold = true,
+ Text = sensorTemp.GetIntervalValue(sensor.spk)[index]
+ });
- subInfoView.AddChidren(new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- Text = levelText[index]
- });
+ subInfoView.AddChidren(new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(100),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ IsBold = true,
+ Text = levelText[index]
+ });
- subInfoView.AddChidren(new Button()
- {
- X = Application.GetRealWidth(285),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(38),
- Height = Application.GetRealHeight(18),
- Radius = (uint)Application.GetRealWidth(4),
- BackgroundColor = levelColorList[index]
- });
+ subInfoView.AddChidren(new Button()
+ {
+ X = Application.GetRealWidth(285),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(38),
+ Height = Application.GetRealHeight(18),
+ Radius = (uint)Application.GetRealWidth(4),
+ BackgroundColor = levelColorList[index]
+ });
+ }
}
-
+ catch (Exception ex)
+ {
+ MainPage.Log($"鐜绛夌骇淇℃伅琛ㄥ姞杞藉紓甯�:{ex.Message}");
+ }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
index 7bed343..a10b239 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -69,7 +69,7 @@
{
Y = Application.GetRealHeight(64),
Height = Application.GetRealHeight(600),
- ScrollEnabled = false
+ ScrollEnabled = sensorList.Count > 6
};
bodyView.AddChidren(contentView);
@@ -657,165 +657,178 @@
bool initTitleButton = true;
int index = 1;
- foreach (var tempSensor in sensorList)
+ try
{
- if(index > 6)
+ new System.Threading.Thread(() =>
{
- break;
- }
- if (tempSensor.sid == function.sid)
- {
- continue;
- }
- if (tempSensor.spk != function.spk)
- {
- continue;
- }
- contentView.ScrollEnabled = true;
-
- if (initTitleButton)
- {
- Button btnOthreTitle = new Button()
+ foreach (var tempSensor in sensorList)
{
- X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealWidth(38),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.OtherArea,
- };
- contentView.AddChidren(btnOthreTitle);
- initTitleButton = false;
- }
+ if (index >= 6)
+ {
+ break;
+ }
+ if (tempSensor.sid == function.sid)
+ {
+ continue;
+ }
+ if (tempSensor.spk != function.spk)
+ {
+ continue;
+ }
- #region 鍏跺畠浼犳劅鍣ㄤ俊鎭爮
- FrameLayout otherInfoView = new FrameLayout()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealWidth(100),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- Radius = (uint)Application.GetRealWidth(12),
- BorderColor = 0x00000000,
- BorderWidth = 0,
- };
- contentView.AddChidren(otherInfoView);
-
- Button btnTipColor1 = new Button()
- {
- X = Application.GetRealWidth(8),
- Y = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(12),
- Height = Application.GetRealWidth(12),
- BackgroundColor = tipColorList[index++],
- Radius = (uint)Application.GetRealWidth(2),
- BorderWidth = 0,
- BorderColor = 0x00000000,
- };
- otherInfoView.AddChidren(btnTipColor1);
-
- Button btnSensorName = new Button()
- {
- X = Application.GetRealWidth(28),
- Y = Application.GetRealWidth(10),
- Width = Application.GetRealWidth(250),
- Height = Application.GetRealWidth(24),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- Text = function.name,
- IsBold = true,
- };
- otherInfoView.AddChidren(btnSensorName);
-
- Button btnFromFoorAndRoom1 = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = btnSeltSensorName.Bottom,
- Width = Application.GetRealWidth(270),
- Height = Application.GetRealHeight(21),
- TextColor = CSS_Color.PromptingColor1,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = tempSensor.GetRoomListName()
- };
- otherInfoView.AddChidren(btnFromFoorAndRoom1);
-
- var btnSetting1 = new Button()
- {
- X = Application.GetRealWidth(291),
- Y = Application.GetRealWidth(6),
- Width = Application.GetMinRealAverage(32),
- Height = Application.GetMinRealAverage(32),
- UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
- };
- otherInfoView.AddChidren(btnSetting1);
-
- btnSetting1.MouseUpEventHandler = (sender, e) =>
- {
- Action backAction = () =>
- {
- MainPage.Log("45678i");
Application.RunOnMainThread(() =>
{
- btnSeltSensorName.Text = tempSensor.name;
+ if (initTitleButton)
+ {
+ Button btnOthreTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealWidth(38),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.OtherArea,
+ };
+ contentView.AddChidren(btnOthreTitle);
+ initTitleButton = false;
+ }
+
+ #region 鍏跺畠浼犳劅鍣ㄤ俊鎭爮
+ FrameLayout otherInfoView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealWidth(100),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ BorderColor = 0x00000000,
+ BorderWidth = 0,
+ };
+ contentView.AddChidren(otherInfoView);
+
+ Button btnTipColor1 = new Button()
+ {
+ X = Application.GetRealWidth(8),
+ Y = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(12),
+ Height = Application.GetRealWidth(12),
+ BackgroundColor = tipColorList[index++],
+ Radius = (uint)Application.GetRealWidth(2),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ };
+ otherInfoView.AddChidren(btnTipColor1);
+
+ Button btnSensorName = new Button()
+ {
+ X = Application.GetRealWidth(28),
+ Y = Application.GetRealWidth(10),
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealWidth(24),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ Text = function.name,
+ IsBold = true,
+ };
+ otherInfoView.AddChidren(btnSensorName);
+
+ Button btnFromFoorAndRoom1 = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnSeltSensorName.Bottom,
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(21),
+ TextColor = CSS_Color.PromptingColor1,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = tempSensor.GetRoomListName()
+ };
+ otherInfoView.AddChidren(btnFromFoorAndRoom1);
+
+ var btnSetting1 = new Button()
+ {
+ X = Application.GetRealWidth(291),
+ Y = Application.GetRealWidth(6),
+ Width = Application.GetMinRealAverage(32),
+ Height = Application.GetMinRealAverage(32),
+ UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
+ };
+ otherInfoView.AddChidren(btnSetting1);
+
+ btnSetting1.MouseUpEventHandler = (sender, e) =>
+ {
+ Action backAction = () =>
+ {
+ MainPage.Log("45678i");
+ Application.RunOnMainThread(() =>
+ {
+ btnSeltSensorName.Text = tempSensor.name;
+ });
+ };
+ var infoView = new FunctionBaseInfoSetPage(tempSensor, backAction);
+ MainPage.BasePageView.AddChidren(infoView);
+ infoView.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+
+ Button btnSensorValue = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealWidth(47),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealWidth(43),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ IsBold = true,
+ TextSize = CSS_FontSize.HeadlineFontSize,
+ };
+ otherInfoView.AddChidren(btnSensorValue);
+
+ var btnShowData1 = new Button()
+ {
+ X = Application.GetRealWidth(291),
+ Y = Application.GetRealWidth(62),
+ Width = Application.GetMinRealAverage(32),
+ Height = Application.GetMinRealAverage(32),
+ UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
+ SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
+ };
+ otherInfoView.AddChidren(btnShowData1);
+ btnShowData1.MouseUpEventHandler = (sender, e) =>
+ {
+ btnShowData1.IsSelected = !btnShowData1.IsSelected;
+ if (btnShowData1.IsSelected)
+ {
+ if (!showFunctions.Contains(tempSensor))
+ {
+ showFunctions.Add(tempSensor);
+ }
+ }
+ else
+ {
+ if (showFunctions.Contains(tempSensor))
+ {
+ showFunctions.Remove(tempSensor);
+ }
+ }
+ LoadMothed_GetSensorHistoryData();
+ };
+ #endregion
+
+ contentView.AddChidren(new Button()
+ {
+ Height = Application.GetRealHeight(12),
+ });
});
- };
- var infoView = new FunctionBaseInfoSetPage(tempSensor, backAction);
- MainPage.BasePageView.AddChidren(infoView);
- infoView.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
-
- Button btnSensorValue = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = Application.GetRealWidth(47),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealWidth(43),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- IsBold = true,
- TextSize = CSS_FontSize.HeadlineFontSize,
- };
- otherInfoView.AddChidren(btnSensorValue);
-
- var btnShowData1 = new Button()
- {
- X = Application.GetRealWidth(291),
- Y = Application.GetRealWidth(62),
- Width = Application.GetMinRealAverage(32),
- Height = Application.GetMinRealAverage(32),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
- SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
- };
- otherInfoView.AddChidren(btnShowData1);
- btnShowData1.MouseUpEventHandler = (sender, e) => {
- btnShowData1.IsSelected = !btnShowData1.IsSelected;
- if (btnShowData1.IsSelected)
- {
- if (!showFunctions.Contains(tempSensor))
- {
- showFunctions.Add(tempSensor);
- }
+ System.Threading.Thread.Sleep(50);
}
- else
- {
- if (showFunctions.Contains(tempSensor))
- {
- showFunctions.Remove(tempSensor);
- }
- }
- LoadMothed_GetSensorHistoryData();
- };
- #endregion
-
- contentView.AddChidren(new Button()
- {
- Height = Application.GetRealHeight(12),
- });
-
+ }).Start();
+ }
+ catch(Exception ex)
+ {
+ MainPage.Log($"鍔犺浇浼犳劅鍣ㄥ紓甯竫x:{ex.Message}");
}
#endregion
new TopViewDiv(bodyView, Language.StringByID(sensorTemp.GetFunctionTypeNameId(function.spk))).LoadTopView();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index 05d3470..9375aa5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -83,7 +83,7 @@
public void LoadPage(bool locationSetting = true)
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
- new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(actionRefresh);
+ new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView();
var contentView = new VerticalScrolViewLayout()
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
index b108f57..0eb7ff8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -421,6 +421,10 @@
SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null
};
+ if (DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl)
+ {
+ btnSelect.X = Application.GetRealWidth(323);
+ }
bodyDiv.AddChidren(btnSelect);
btnSelect.MouseUpEventHandler = (sender, e) => {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs b/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs
new file mode 100644
index 0000000..625812c
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs
@@ -0,0 +1,340 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using HDL_ON.DAL.Server;
+using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ public class OrderFunctionPage : FrameLayout
+ {
+ #region 鎺т欢鍒楄〃
+ /// <summary>
+ /// 褰撳墠绐椾綋
+ /// </summary>
+ static FrameLayout bodyView;
+ /// <summary>
+ /// 鍔熻兘鍒楄〃闆嗗悎鏄剧ず鍖哄煙
+ /// </summary>
+ static VerticalScrolViewLayout functionListView;
+ /// <summary>
+ /// 瀹屾垚鎸夐挳
+ /// </summary>
+ Button btnConfrim;
+
+ #endregion
+ /// <summary>
+ /// 鍥炶皟鍒锋柊
+ /// </summary>
+ Action<Scene> backActon;
+
+ List<Function> orderList = new List<Function>();
+ List<int> orderNumber = new List<int>();
+
+ public OrderFunctionPage()
+ {
+ bodyView = this;
+ }
+
+ public void LoadPage(List<Function> functions,Action action)
+ {
+ List<int> orderNumberAlreay = new List<int>();
+ for (int i=0;i< functions.Count; i++)
+ {
+ if (functions[i].FunctionOrderNumber != 9999)
+ {
+ orderNumberAlreay.Add(functions[i].FunctionOrderNumber);
+ }
+ }
+ for (int i = 1; i < functions.Count + 1; i++)
+ {
+ if (!orderNumberAlreay.Contains(i))
+ {
+ orderNumber.Add(i);
+ }
+ }
+
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+ new TopViewDiv(bodyView, Language.StringByID(StringId.Sort)).LoadTopView();
+
+ functionListView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(84),
+ Height = Application.GetRealHeight(640 - 100),
+ };
+ bodyView.AddChidren(functionListView);
+
+ LoadRow(functions);
+
+ #region 搴曢儴view
+ var bottomView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(591),
+ Height = Application.GetRealHeight(100),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ };
+ this.AddChidren(bottomView);
+
+ btnConfrim = new Button()
+ {
+ Y = Application.GetRealHeight(12),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealHeight(44),
+ Radius = (uint)Application.GetRealHeight(22),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.MainBackgroundColor,
+ BackgroundColor = CSS_Color.BackgroundColor,
+ TextID = StringId.Confirm,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ SelectedTextColor = CSS_Color.MainBackgroundColor,
+ SelectedBackgroundColor = CSS_Color.MainColor,
+ IsSelected = true
+ };
+ bottomView.AddChidren(btnConfrim);
+ btnConfrim.MouseUpEventHandler = (sender, e) => {
+ foreach(var function in functions)
+ {
+ function.SaveFunctionFile();
+ }
+ action?.Invoke();
+ this.RemoveFromParent();
+ };
+
+ #endregion
+
+ }
+
+ /// <summary>
+ /// 鏄剧ず鐨勮澶囩殑鎬绘暟
+ /// </summary>
+ int showCount = 0;
+
+ /// <summary>
+ /// 鍔犺浇鍔熻兘row
+ /// </summary>
+ /// <param name="lightList"></param>
+ void LoadRow(List<Function> functions, bool isAppend = false)
+ {
+ var waitPage = new Loading();
+ bodyView.AddChidren(waitPage);
+ waitPage.Start("");
+
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (!isAppend)
+ {
+ showCount = 0;
+ functionListView.RemoveAll();
+ }
+ int i = 0;
+
+
+
+ foreach (var function in functions)
+ {
+ i++;
+ if (i > 100)
+ {
+ break;
+ }
+ showCount++;
+ var functionDiv = new OrderFunctionRow()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(62),
+ Radius = (uint)Application.GetMinRealAverage(12),
+ BorderColor = 0x00FFFFFF,
+ BorderWidth = 1,
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+
+ functionDiv.LoadDiv(function, orderNumber);
+
+
+ functionListView.AddChidren(functionDiv);
+
+ functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
+ }
+
+ if (functions.Count > showCount)
+ {
+ var btnAppend = new Button()
+ {
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ Text = "鍔犺浇鏇村",
+ };
+ if (Language.CurrentLanguage != "Chinese")
+ {
+ btnAppend.Text = "Load more";
+ }
+ functionListView.AddChidren(btnAppend);
+ btnAppend.MouseUpEventHandler = (sender, e) =>
+ {
+ btnAppend.RemoveFromParent();
+ LoadRow(functions, true);
+ };
+ }
+ });
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log("ShowFunctionRowError : " + ex.Message);
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+
+ }
+
+
+
+ }
+
+
+
+ public class OrderFunctionRow : FrameLayout
+ {
+ #region 鍖哄煙鎺т欢
+ static FrameLayout bodyDiv;
+ /// <summary>
+ /// 鍔熻兘/鍦烘櫙icon
+ /// </summary>
+ Button btnIcon;
+ /// <summary>
+ /// 鍔熻兘鍚嶇О/鍦烘櫙鍚嶇О
+ /// </summary>
+ Button btnName;
+ /// <summary>
+ /// 妤煎眰淇℃伅鏄剧ず鎸夐挳
+ /// </summary>
+ Button btnFromFloor;
+ /// <summary>
+ /// 閫変腑鎸夐挳
+ /// </summary>
+ Button btnSelect;
+ #endregion
+
+ public OrderFunctionRow()
+ {
+ bodyDiv = this;
+ }
+
+
+ /// <summary>
+ /// 鍔犺浇鎺у埗鍗$墖鍖哄煙
+ /// </summary>
+ public void LoadDiv(Function function, List<int> orderNumber)
+ {
+ btnIcon = new Button()
+ {
+ X = Application.GetRealWidth(10),
+ Y = Application.GetRealHeight(15),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
+ UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"
+ };
+ bodyDiv.AddChidren(btnIcon);
+
+ btnName = new Button()
+ {
+ X = Application.GetRealWidth(8 + 10 + 32),
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealHeight(24),
+ Text = function.name,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ };
+ bodyDiv.AddChidren(btnName);
+
+ btnFromFloor = new Button()
+ {
+ X = Application.GetRealWidth(8 + 10 + 32),
+ Y = Application.GetRealHeight(10 + 24),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealHeight(18),
+ Text = function.GetRoomListName(),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ bodyDiv.AddChidren(btnFromFloor);
+
+ btnSelect = new Button()
+ {
+ X = Application.GetRealWidth(303),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
+ Text = function.FunctionOrderNumber == 9999 ? "" : function.FunctionOrderNumber.ToString(),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.Center,
+ };
+ bodyDiv.AddChidren(btnSelect);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ lock (orderNumber)
+ {
+ if (function.FunctionOrderNumber == 9999)
+ {
+ function.FunctionOrderNumber = orderNumber[0];
+ orderNumber.RemoveAt(0);
+ btnSelect.Text = function.FunctionOrderNumber.ToString();
+ }
+ else
+ {
+
+ if (!orderNumber.Contains(function.FunctionOrderNumber))
+ {
+ for (var i = 0; i < orderNumber.Count; i++)
+ {
+ if (orderNumber[i] > function.FunctionOrderNumber)
+ {
+ orderNumber.Insert(i, function.FunctionOrderNumber);
+ function.FunctionOrderNumber = 9999;
+ break;
+ }
+ }
+ }
+ if (function.FunctionOrderNumber != 9999)
+ {
+ orderNumber.Add(function.FunctionOrderNumber);
+ function.FunctionOrderNumber = 9999;
+ }
+ btnSelect.Text = "";
+ }
+ }
+ };
+ btnName.MouseUpEventHandler = eventHandler;
+ btnSelect.MouseUpEventHandler = eventHandler;
+ bodyDiv.MouseUpEventHandler = eventHandler;
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index 7cc6482..8d4483c 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,13 @@
/// 鍥哄畾鍩熷悕,姝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";
+ const string APP_KEY = "HDL-HOME-APP-TEST";
+ const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+ //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
+ //const string APP_KEY = "CPEVRLRT";
+ //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";
/// <summary>
/// RegionMark
/// </summary>
@@ -248,14 +253,6 @@
#endregion
#region **********绛惧悕鏍¢獙**********
- /// <summary>
- ///
- /// </summary>
- const string APP_KEY = "HDL-HOME-APP-TEST";
- /// <summary>
- ///
- /// </summary>
- const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
/// <summary>
/// 鑾峰彇褰撳墠鏃堕棿鎴冲��
diff --git a/SiriIntents/SiriIntents.csproj b/SiriIntents/SiriIntents.csproj
index c2bf1ca..150b9bd 100644
--- a/SiriIntents/SiriIntents.csproj
+++ b/SiriIntents/SiriIntents.csproj
@@ -79,7 +79,7 @@
<MtouchArch>ARM64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchVerbosity></MtouchVerbosity>
- <CodesignProvision>OnProSiri230308-2-Dev</CodesignProvision>
+ <CodesignProvision>OnProSiri230329-1-Dev</CodesignProvision>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/SiriIntentsUI/SiriIntentsUI.csproj b/SiriIntentsUI/SiriIntentsUI.csproj
index a65fe33..8b52df8 100644
--- a/SiriIntentsUI/SiriIntentsUI.csproj
+++ b/SiriIntentsUI/SiriIntentsUI.csproj
@@ -83,7 +83,7 @@
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchVerbosity></MtouchVerbosity>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodesignProvision>OnProSiriUI230308-2-Dev</CodesignProvision>
+ <CodesignProvision>OnProSiriUI230329-1-Dev</CodesignProvision>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
--
Gitblit v1.8.0