wjc
2023-03-30 cae4d4b5b508a666fbd0dff3c2a981fdff841bc8
Merge branch 'Dev-Branch' into wjc
13个文件已添加
2个文件已删除
55个文件已修改
5934 ■■■■ 已修改文件
DLL/LC/Android/LCDeviceAddModule-2022-12-06.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/LC/Android/LcVideoSdk-1.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/LC/Android/LcVideoSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.JPush.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.JPush223.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Application.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PersonalCenter/CombinedDimmingIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/values/styles.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PersonalCenter/CombinedDimmingIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ImageUtlis.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/OnAppConfig.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/IMessageCommon.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewApiRes.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Scene.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/ResponseEntity/FreeviewMemberInfo.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmebly.cs 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPageBLL.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/RegisterPageBLL.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddCombineDimmingPage.cs 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs 1541 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs 244 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/Face/FaceManagementPage.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs 571 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs 628 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs 393 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs 317 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/Server/HttpUtil.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/SiriIntents.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntentsUI/SiriIntentsUI.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/LC/Android/LCDeviceAddModule-2022-12-06.dll
Binary files differ
DLL/LC/Android/LcVideoSdk-1.dll
Binary files differ
DLL/LC/Android/LcVideoSdk.dll
Binary files differ
DLL/Shared.Droid.JPush.dll
Binary files differ
DLL/Shared.Droid.JPush223.dll
Binary files differ
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:foreground");
                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;
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=Влажност в стаята
HDL-ON_Android/Assets/Phone/PersonalCenter/CombinedDimmingIcon.png
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>-->
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>
        <!-- 隐藏标题栏 -->
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>
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=Влажност в стаята
HDL-ON_iOS/Resources/Phone/PersonalCenter/CombinedDimmingIcon.png
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;
HDL_ON/Common/ImageUtlis.cs
@@ -281,7 +281,6 @@
                                    if (imageView != null)
                                    {
                                        imageView.ImageBytes = imageBytes;
                                        //Utlis.WriteLine("imageKey 加载云端下载图片成功");
                                    }
                                });
                            }
HDL_ON/Common/OnAppConfig.cs
@@ -94,6 +94,10 @@
        /// 第一次启动app
        /// </summary>
        public bool FirstRunApp = true;
        /// <summary>
        /// 是否同意人脸采集协议
        /// </summary>
        public bool FaceManagementTip = false;
        /// <summary>
        /// 忽略更新的版本号
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;
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);
                            }
                        }
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();
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
    }
}
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 @@
        /// 公共域名就近解析
        /// </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>
        /// 获取当前时间戳值
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
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>
        /// 子账号管理员获取主账号授权Token
        /// </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>
HDL_ON/DAL/Server/NewApiRes.cs
@@ -885,7 +885,7 @@
        /// <summary>
        /// 子账号ID childAccountId
        /// </summary>
        public string childAccountId;
        public string childId;
        /// <summary>
        /// 住宅
        /// </summary>
@@ -908,7 +908,7 @@
        /// <summary>
        /// 子账户类型 ORDINARY、DEBUG、ADMIN
        /// </summary>
        public string childAccountType;
        //public string childAccountType;
        ///// <summary>
        ///// 是否允许远程控制 0:允许 1:不允许
        ///// </summary>
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)
                    {
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;
        }
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>
HDL_ON/Entity/ResponseEntity/FreeviewMemberInfo.cs
New file
@@ -0,0 +1,39 @@
using 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>
        /// 第三方平台IP
        /// </summary>
        public string extServerIp = string.Empty;
        /// <summary>
        /// 第三方租户编码
        /// </summary>
        public string extTenantCode = string.Empty;
        /// <summary>
        /// 第三方uuid
        /// </summary>
        public string extUUID = string.Empty;
        /// <summary>
        /// 附加数据
        /// </summary>
        public string extra = string.Empty;
    }
}
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;
    }
}
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>
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>
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;
                        }
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();
            };
            }
        }
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()
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)
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);
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
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)
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()
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>
        ///// 加载功能类型控制卡片
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:
                                    {
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);
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:
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)
                {
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")//子晴需要隐藏这个入口,由调试软件上传数据 2023-03-09 17:20:33
                {
                    continue;
                }
                var row = new RowLayout()
                {
                    Height = Application.GetRealHeight(87),
@@ -165,13 +169,17 @@
                //下载第三方品牌icon
                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;
            }
        }
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddCombineDimmingPage.cs
New file
@@ -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
//        }
//    }
//}
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
New file
@@ -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);
    //        //色盘的桌布控件(限制那个白色滑动球使用)
    //        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;
    //    }
    //}
}
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs
New file
@@ -0,0 +1,146 @@
using 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,
                        });
                }
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs
New file
@@ -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;
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
New file
@@ -0,0 +1,76 @@
using 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;
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/Face/FaceManagementPage.cs
New file
@@ -0,0 +1,10 @@
using System;
namespace HDL_ON.UI
{
    public class FaceManagementPage
    {
        public FaceManagementPage()
        {
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs
@@ -1,4 +1,6 @@
using 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 = "    《On 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 = "    若同意该协议,请点击【同意】按键,表示您已经理解并同意人脸信息采集协议。",
                        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;
        }
    }
}
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(() =>
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs
New file
@@ -0,0 +1,628 @@
using 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 = "    《On 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 = "    若同意该协议,请点击【同意】按键,表示您已经理解并同意人脸信息采集协议。",
                    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);
            }
        }
    }
}
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
            }
        }
    }
}
}
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;
                            }
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>
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
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs
New file
@@ -0,0 +1,145 @@
using 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();
        }
    }
}
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();
        }
    }
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
@@ -14,8 +14,6 @@
            LoadEvent_SkipRoomsPage();
            LoadEvent_EditResidencName();
            LoadEvent_EditResidencAddress();
            LoadEvent_SkipAdminMigrationConfirmPage();
            LoadEvent_SkipTransferConfirmPage();
        }
        /// <summary>
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);
        }
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}");
            }
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($"加载传感器异常xx:{ex.Message}");
            }
            #endregion
            new TopViewDiv(bodyView, Language.StringByID(sensorTemp.GetFunctionTypeNameId(function.spk))).LoadTopView();
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()
            {
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) => {
HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs
New file
@@ -0,0 +1,340 @@
using 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;
        }
    }
}
SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,13 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </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>
        /// 获取当前时间戳值
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" />
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" />