wxr
2023-07-12 7bea8bc6d399e9097e3565c2eed48ee6145d6b2f
萤石猫眼,门锁,摄像头功能对接

1.增加了门锁用户管理,门锁开锁管理,童锁功能,二次确认开锁功能,布防功能,反锁设置;指纹密码,数字密码,nfc卡密码,人脸密码等管理
修改了门锁,猫眼接听界面(安卓),修改了门锁全屏显示,
增加了萤石摄像头sd格式化功能,隐私遮蔽功能
2.增加了服务器识别:测试服务器增加了(test server)提示
3.自动化增加了跑马灯功能(序列)
4.增加了RGB炫彩功能
6个文件已添加
17个文件已修改
14027 ■■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/peephole.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/securityipcamez.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/Resource.designer.cs 11677 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/peephole.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/securityipcamez.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandFunctionListPage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 374 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs 694 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs 434 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -634,6 +634,28 @@
647=Face key
648=Delete user
649=Activity detection
650=Do you want to delete this user?
651=Successfully deleted
652=Unlock settings
653=Face unlock settings
654=Press the button to unlock twice
655=To unlock indoors, press the unlock button twice to prevent children or pets from accidentally touching the lock
656=Child lock mode
657=After opening, the door cannot be unlocked through buttons, only the emergency knob can be used to unlock
658=Anti lock mode
659=After opening, ordinary users cannot unlock, while the main user can still unlock. After opening the door with the indoor button, the anti lock mode will automatically close
660=Deployment mode
661=It is recommended to change the mode when leaving home for a long time. It can also be activated by pressing the blue button that lights up on the door lock keyboard after closing the door
662=Audio settings
663=Battery management
664=Face unlocking
665=After opening, the device can perform facial recognition and unlock
666=Trigger mode
667=Face entry help
668=Manual triggering
669=Automatic triggering
@@ -1929,8 +1951,8 @@
636=色值号为6位(由纯数字/数字+字母组合)
637=删除组控
638=用户管理
639=当前门未关
640=当前门已关
639=当前门已关
640=当前门未关
641=自动炫彩
642=跑马灯
643=开锁方式
@@ -1940,7 +1962,26 @@
647=人脸钥匙
648=删除用户
649=活动检测
650=是否删除该用户?
651=删除成功
652=开锁设置
653=人脸开锁设置
654=按键两次开锁
655=室内开锁,需按两次开锁键,以防儿童、宠物误触开锁
656=童锁模式
657=开启后,室内不能通过按键开锁,仅可使用应急旋钮开锁
658=反锁模式
659=开启后,普通用户不可开锁,主用户仍可开锁,室内按键开门后反锁模式将自动关闭
660=布防模式
661=长期离家建议开启改模式,也可通过关门后按压门锁键盘亮起的蓝色按键开启
662=音频设置
663=电池管理
664=人脸开锁
665=开启后,设备可以进行人脸识别开锁
666=触发方式
667=人脸录入帮助
668=手动触发
669=自动触发
2532=访客邀请记录
@@ -3246,7 +3287,26 @@
647=Face key
648=Delete user
649=Activity detection
650=Do you want to delete this user?
651=Successfully deleted
652=Unlock settings
653=Face unlock settings
654=Press the button to unlock twice
655=To unlock indoors, press the unlock button twice to prevent children or pets from accidentally touching the lock
656=Child lock mode
657=After opening, the door cannot be unlocked through buttons, only the emergency knob can be used to unlock
658=Anti lock mode
659=After opening, ordinary users cannot unlock, while the main user can still unlock. After opening the door with the indoor button, the anti lock mode will automatically close
660=Deployment mode
661=It is recommended to change the mode when leaving home for a long time. It can also be activated by pressing the blue button that lights up on the door lock keyboard after closing the door
662=Audio settings
663=Battery management
664=Face unlocking
665=After opening, the device can perform facial recognition and unlock
666=Trigger mode
667=Face entry help
668=Manual triggering
669=Automatic triggering
@@ -4547,6 +4607,27 @@
647=Face key
648=Delete user
649=Activity detection
650=Do you want to delete this user?
651=Successfully deleted
652=Unlock settings
653=Face unlock settings
654=Press the button to unlock twice
655=To unlock indoors, press the unlock button twice to prevent children or pets from accidentally touching the lock
656=Child lock mode
657=After opening, the door cannot be unlocked through buttons, only the emergency knob can be used to unlock
658=Anti lock mode
659=After opening, ordinary users cannot unlock, while the main user can still unlock. After opening the door with the indoor button, the anti lock mode will automatically close
660=Deployment mode
661=It is recommended to change the mode when leaving home for a long time. It can also be activated by pressing the blue button that lights up on the door lock keyboard after closing the door
662=Audio settings
663=Battery management
664=Face unlocking
665=After opening, the device can perform facial recognition and unlock
666=Trigger mode
667=Face entry help
668=Manual triggering
669=Automatic triggering
@@ -5836,7 +5917,26 @@
647=Face key
648=Delete user
649=Activity detection
650=Do you want to delete this user?
651=Successfully deleted
652=Unlock settings
653=Face unlock settings
654=Press the button to unlock twice
655=To unlock indoors, press the unlock button twice to prevent children or pets from accidentally touching the lock
656=Child lock mode
657=After opening, the door cannot be unlocked through buttons, only the emergency knob can be used to unlock
658=Anti lock mode
659=After opening, ordinary users cannot unlock, while the main user can still unlock. After opening the door with the indoor button, the anti lock mode will automatically close
660=Deployment mode
661=It is recommended to change the mode when leaving home for a long time. It can also be activated by pressing the blue button that lights up on the door lock keyboard after closing the door
662=Audio settings
663=Battery management
664=Face unlocking
665=After opening, the device can perform facial recognition and unlock
666=Trigger mode
667=Face entry help
668=Manual triggering
669=Automatic triggering
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/peephole.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/securityipcamez.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -442,6 +442,8 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UserRightsManagement\NfcOnIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceOnIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\peephole.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\securityipcamez.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
HDL-ON_Android/Resources/Resource.designer.cs
Diff too large
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1602,6 +1602,8 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\NfcOnIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceOnIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\peephole.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\securityipcamez.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Resources/Language.ini
@@ -626,6 +626,14 @@
639=Closed
640=Open
641=Automatic Coloring
642=LED Banner
643=Unlock method
644=Clear
645=Digital password
646=Card/NFC key
647=Face key
648=Delete user
649=Activity detection
@@ -1921,9 +1929,19 @@
636=色值号为6位(由纯数字/数字+字母组合)
637=删除组控
638=用户管理
639=当前门未关
640=当前门已关
639=当前门已关
640=当前门未关
641=自动炫彩
642=跑马灯
643=开锁方式
644=清空
645=数字密码
646=卡/NFC钥匙
647=人脸钥匙
648=删除用户
649=活动检测
2532=访客邀请记录
2533=访客管理
@@ -3220,6 +3238,16 @@
639=Closed
640=Open
641=Automatic Coloring
642=LED Banner
643=Unlock method
644=Clear
645=Digital password
646=Card/NFC key
647=Face key
648=Delete user
649=Activity detection
2532=Visitor Invitation Record
@@ -4511,6 +4539,15 @@
639=Closed
640=Open
641=Automatic Coloring
642=LED Banner
643=Unlock method
644=Clear
645=Digital password
646=Card/NFC key
647=Face key
648=Delete user
649=Activity detection
@@ -5791,6 +5828,16 @@
639=Closed
640=Open
641=Automatic Coloring
642=LED Banner
643=Unlock method
644=Clear
645=Digital password
646=Card/NFC key
647=Face key
648=Delete user
649=Activity detection
2532=Visitor Invitation Record
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/peephole.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/securityipcamez.png
HDL_ON/Common/R.cs
@@ -6,6 +6,86 @@
    {
        /// <summary>
        /// 自动触发
        /// </summary>
        public const int AutomaticTriggering = 669;
        /// <summary>
        /// 手动触发
        /// </summary>
        public const int ManualTriggering = 668;
        /// <summary>
        /// 人脸录入帮助
        /// </summary>
        public const int FaceEntryHelp = 667;
        /// <summary>
        /// 触发方式
        /// </summary>
        public const int TriggerMode = 666;
        /// <summary>
        /// 人脸开始解析
        /// </summary>
        public const int FaceUnlockTip = 665;
        /// <summary>
        /// 人脸开锁
        /// </summary>
        public const int FaceUnlock = 664;
        /// <summary>
        /// 电池管理
        /// </summary>
        public const int BatteryManagement = 663;
        /// <summary>
        /// 音频设置
        /// </summary>
        public const int AudioSetup = 662;
        /// <summary>
        /// 门锁布防模式提示
        /// </summary>
        public const int DoorlockDefenceModeTip = 661;
        /// <summary>
        /// 布防模式
        /// </summary>
        public const int DefenceMode = 660;
        /// <summary>
        /// 反锁模式提示
        /// </summary>
        public const int AntiLockModeTip = 659;
        /// <summary>
        /// 反锁模式
        /// </summary>
        public const int AntiLockMode = 658;
        /// <summary>
        /// 童锁模式提示
        /// </summary>
        public const int ChildLockModeTip = 657;
        /// <summary>
        /// 童锁模式
        /// </summary>
        public const int ChildLockMode = 656;
        /// <summary>
        /// 按键二次开锁提示
        /// </summary>
        public const int PressTheButtonToUnlockTwiceTip = 655;
        /// <summary>
        /// 按键二次开锁
        /// </summary>
        public const int PressTheButtonToUnlockTwice = 654;
        /// <summary>
        /// 人脸开锁设置
        /// </summary>
        public const int FaceUnlockSetting = 653;
        /// <summary>
        /// 开锁设置
        /// </summary>
        public const int UnlockSetting = 652;
        /// <summary>
        /// 删除成功
        /// </summary>
        public const int DeleteSuccess = 651;
        /// <summary>
        /// 是否删除该用户
        /// </summary>
        public const int DeleteDoorlockUserTip = 650;
        /// <summary>
        /// 活动检测
        /// </summary>
        public const int ActivityDetection = 649;
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -3133,10 +3133,6 @@
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorlockUserList, requestJson);
        }
        /// <summary>
        /// 修改门锁用户备注
        /// </summary>
@@ -3152,6 +3148,209 @@
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_setDoorUserRemark, requestJson);
        }
        /// <summary>
        /// 删除门锁用户数字密码
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="lockUserIndex"></param>
        /// <returns></returns>
        public ResponsePackNew DeleteDoorlockUserNumberPassword(string deviceId, string lockUserIndex)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("lockUserIndex", lockUserIndex);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_NumberPassword, requestJson);
        }
        /// <summary>
        /// 删除门锁用户卡密码
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="lockUserIndex"></param>
        /// <returns></returns>
        public ResponsePackNew DeleteDoorlockUserCardPassword(string deviceId, string lockUserIndex)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("lockUserIndex", lockUserIndex);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteCardPassword, requestJson);
        }
        /// <summary>
        /// 删除门锁用户指纹密码
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="lockUserIndex"></param>
        /// <returns></returns>
        public ResponsePackNew DeleteDoorlockUserFingerPassword(string deviceId, string lockUserIndex)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("lockUserIndex", lockUserIndex);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFingerPassword, requestJson);
        }
        /// <summary>
        /// 删除门锁用户人脸密码
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="lockUserIndex"></param>
        /// <returns></returns>
        public ResponsePackNew DeleteDoorlockUserFacePassword(string deviceId, string lockUserIndex)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("lockUserIndex", lockUserIndex);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFacePassword, requestJson);
        }
        /// <summary>
        /// 删除门锁用户
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="lockUserIndex"></param>
        /// <returns></returns>
        public ResponsePackNew DeleteDoorlockUser(string deviceId, string lockUserIndex)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("lockUserIndex", lockUserIndex);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteUser, requestJson);
        }
        /// <summary>
        /// 查询按键两次开门
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        public ResponsePackNew GetDoubleClickOpenDoorSwitch(string deviceId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoubleClickOpenDoorSwitch, requestJson);
        }
        /// <summary>
        /// 设置按键两次开门
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="enabled">按键两次开门开关 0-关闭,1次按键开门 1-开启,2次按键开门</param>
        /// <returns></returns>
        public ResponsePackNew SetDoubleClickOpenDoorSwitch(string deviceId,int enabled)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("enabled", enabled);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoubleClickOpenDoorSwitch, requestJson);
        }
        /// <summary>
        /// 查询童锁开关
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        public ResponsePackNew GetChildLockSwitch(string deviceId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetChildLockSwitch, requestJson);
        }
        /// <summary>
        /// 设置童锁开关
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="enabled">童锁开关 0-关闭 1-开启</param>
        /// <returns></returns>
        public ResponsePackNew SetChildLockSwitch(string deviceId, int enabled)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("enabled", enabled);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetChildLockSwitch, requestJson);
        }
        /// <summary>
        /// 查询反锁配置
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        public ResponsePackNew GetAntiLockCfg(string deviceId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetAntiLockCfg, requestJson);
        }
        /// <summary>
        /// 设置反锁配置
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="enabled"></param>
        /// <returns></returns>
        public ResponsePackNew SetAntiLockCfg(string deviceId, bool enabled)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("enabled", enabled);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetAntiLockCfg, requestJson);
        }
        /// <summary>
        /// 查询布撤防状态
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        public ResponsePackNew GetDefenceStatus(string deviceId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDefenceStatus, requestJson);
        }
        /// <summary>
        /// 设置布撤防状态
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="armStatus">布防状态 disarmed-撤防 armed-已布防</param>
        /// <param name="defenceMode">布防模式 global-全局 atHome-在家 outDoor-外出 sleep-睡眠</param>
        /// <returns></returns>
        public ResponsePackNew SetDefenceStatus(string deviceId, bool defance)//,string defenceMode)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            if(defance)
                d.Add("armStatus", "armed");
            else
                d.Add("armStatus", "disarmed");
            d.Add("defenceMode", "global");
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDefenceStatus, requestJson);
        }
        #endregion
HDL_ON/DAL/Server/NewAPI.cs
@@ -431,7 +431,7 @@
        public const string Api_Post_GetLcSubToken = "/home-wisdom/imou/openapi/getSubToken";
        /// <summary>
        /// 刷新设备状
        /// 刷新设备状态
        /// </summary>
        public const string Api_Post_RefreshDeviceStatus = "/home-wisdom/app/device/status/refresh";
        /// <summary>
@@ -905,7 +905,60 @@
        /// 更改门锁用户备注名
        /// </summary>
        public const string Api_Post_setDoorUserRemark = "/home-wisdom/platform/yingshi/lock/user/list";
        /// <summary>
        /// 删除用户数字密码
        /// </summary>
        public const string Api_Post_DeleteDoorlockUser_NumberPassword = "/home-wisdom/platform/yingshi/lock/deletePassword";
        /// <summary>
        /// 删除用户感应卡密码
        /// </summary>
        public const string Api_Post_DeleteDoorlockUser_DeleteCardPassword = "/home-wisdom/platform/yingshi/lock/deleteCardPassword";
        /// <summary>
        /// 删除用户指纹密码
        /// </summary>
        public const string Api_Post_DeleteDoorlockUser_DeleteFingerPassword = "/home-wisdom/platform/yingshi/lock/deleteFingerPassword";
        /// <summary>
        /// 删除用户人脸密码
        /// </summary>
        public const string Api_Post_DeleteDoorlockUser_DeleteFacePassword = "/home-wisdom/platform/yingshi/lock/deleteFacePassword";
        /// <summary>
        /// 删除门锁用户
        /// </summary>
        public const string Api_Post_DeleteDoorlockUser_DeleteUser = "/home-wisdom/platform/yingshi/lock/deleteDoorUser";
        /// <summary>
        /// 查询按键两次开门
        /// </summary>
        public const string Api_Post_GetDoubleClickOpenDoorSwitch = "/home-wisdom/platform/yingshi/lock/getDoubleClickOpenDoorSwitch";
        /// <summary>
        /// 设置按键两次开门
        /// </summary>
        public const string Api_Post_SetDoubleClickOpenDoorSwitch = "/home-wisdom/platform/yingshi/lock/setDoubleClickOpenDoorSwitch";
        /// <summary>
        /// 查询童锁开关
        /// </summary>
        public const string Api_Post_GetChildLockSwitch = "/home-wisdom/platform/yingshi/lock/getChildLockSwitch";
        /// <summary>
        /// 设置童锁开关
        /// </summary>
        public const string Api_Post_SetChildLockSwitch = "/home-wisdom/platform/yingshi/lock/setChildLockSwitch";
        /// <summary>
        /// 查询反锁配置
        /// </summary>
        public const string Api_Post_GetAntiLockCfg = "/home-wisdom/platform/yingshi/lock/getAntiLockCfg";
        /// <summary>
        /// 设置反锁配置
        /// </summary>
        public const string Api_Post_SetAntiLockCfg = "/home-wisdom/platform/yingshi/lock/setAntiLockCfg";
        /// <summary>
        /// 查询布撤防状态
        /// </summary>
        public const string Api_Post_GetDefenceStatus = "/home-wisdom/platform/yingshi/lock/getDefenceStatus";
        /// <summary>
        /// 设置布撤防状态
        /// </summary>
        public const string Api_Post_SetDefenceStatus = "/home-wisdom/platform/yingshi/lock/setDefenceStatus";
        #endregion
HDL_ON/HDL_ON.projitems
@@ -559,6 +559,8 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicSeriesSettingPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockUserManagerPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockUserListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\UnlockSettingPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\UnlockSettingFacePage.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -95,6 +95,10 @@
                Text = Language.StringByID(StringId.VersionNumber) + " " + MainPage.VersionString,
            };
            bodyView.AddChidren(btnOnVersion);
            if(HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com")
            {
                btnOnVersion.Text += "(Test Server)";
            }
            var lineView = new FrameLayout()
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandFunctionListPage.cs
@@ -317,13 +317,14 @@
                Button btnClick = new Button();
                view.AddChidren(btnClick);
                btnClick.MouseUpEventHandler = (sender, e) => {
                    btnCheckIcon.IsSelected = function.collect = !function.collect;
                    if (optionList.Contains(function.deviceId))
                    {
                        btnCheckIcon.IsSelected = function.collect = false;
                        optionList.Remove(function.deviceId);
                    }
                    else
                    {
                        btnCheckIcon.IsSelected = function.collect = true;
                        optionList.Add(function.deviceId);
                    }
                    optionView.Visible = true;
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -4,6 +4,7 @@
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
using Newtonsoft.Json.Linq;
using Shared;
@@ -29,18 +30,6 @@
        /// 位置信息跳转编辑按钮
        /// </summary>
        Button btnLocationInfoRight;
        /// <summary>
        /// 删除设备
        /// </summary>
        Button delTextBtn;
        /// <summary>
        /// 下一级图标
        /// </summary>
        Button delRightBtn;
        /// <summary>
        /// 删除设备行FrameLayout
        /// </summary>
        FrameLayout delView;
        #endregion
@@ -237,127 +226,264 @@
            #endregion
            #region 删除设备行  序列号 型号
            //删除设备行
            delView = new FrameLayout()
            {
                Height = Application.GetRealHeight(55),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            if (this.function.spk == SPK.VideoDoorLock)
            {
                contentView.AddChidren(delView);
            }
            var lineBtn = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = CSS_Color.DividingLineColor,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1)
            };
            delView.AddChidren(lineBtn);
             delTextBtn = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.DeleteDevice,
            };
            delView.AddChidren(delTextBtn);
                contentView.AddChidren(new Button()
                {
                    Height = Application.GetRealWidth(8),
                });
            delRightBtn= new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/RightIcon.png",
            };
            delView.AddChidren(delRightBtn);
                #region 开锁设置
                var unlockSettingView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(unlockSettingView);
            //序列号
            var serialView = new FrameLayout()
            {
                Height = Application.GetRealHeight(55),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            if (this.function.spk == SPK.VideoDoorLock)
            {
                //unlockSettingView.AddChidren(new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    BackgroundColor = CSS_Color.DividingLineColor,
                //    Width = Application.GetRealWidth(343),
                //    Height = Application.GetRealHeight(1)
                //});
                var unlockRightBtn = new Button()
                {
                    X = Application.GetRealWidth(339),
                    Gravity = Gravity.CenterVertical,
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/RightIcon.png",
                };
                unlockSettingView.AddChidren(unlockRightBtn);
                var btnUnlockText = new Button()
                {
                    X = Application.GetRealWidth(16),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.UnlockSetting,
                };
                unlockSettingView.AddChidren(btnUnlockText);
                EventHandler<MouseEventArgs> unlockSettingEvent = (sender, e) =>
                {
                    var page = new UnlockSettingPage(function);
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                btnUnlockText.MouseUpEventHandler = unlockSettingEvent;
                #endregion
                #region 音频设置
                var audioSetupView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(audioSetupView);
                audioSetupView.AddChidren(new Button
                {
                    Gravity = Gravity.CenterHorizontal,
                    BackgroundColor = CSS_Color.DividingLineColor,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1)
                });
                var btnAudioSetupRight = new Button()
                {
                    X = Application.GetRealWidth(339),
                    Gravity = Gravity.CenterVertical,
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/RightIcon.png",
                };
                audioSetupView.AddChidren(btnAudioSetupRight);
                var btnAudioSetupText = new Button()
                {
                    X = Application.GetRealWidth(16),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.AudioSetup,
                };
                audioSetupView.AddChidren(btnAudioSetupText);
                #endregion
                #region 电池管理
                var batteryManagementView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(batteryManagementView);
                batteryManagementView.AddChidren(new Button
                {
                    Gravity = Gravity.CenterHorizontal,
                    BackgroundColor = CSS_Color.DividingLineColor,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1)
                });
                var btnBatteryManagementRight = new Button()
                {
                    X = Application.GetRealWidth(339),
                    Gravity = Gravity.CenterVertical,
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/RightIcon.png",
                };
                batteryManagementView.AddChidren(btnBatteryManagementRight);
                var btnBatteryManagementText = new Button()
                {
                    X = Application.GetRealWidth(16),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.BatteryManagement,
                };
                batteryManagementView.AddChidren(btnBatteryManagementText);
                #endregion
                #region 序列号
                var serialView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(serialView);
            }
            var serialLineBtn = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = CSS_Color.DividingLineColor,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1)
            };
            serialView.AddChidren(serialLineBtn);
           var serialTextBtn = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
               TextID = StringId.xuliehao,
           };
            serialView.AddChidren(serialTextBtn);
            var serialValuesBtn = new Button()
            {
                X = Application.GetRealWidth(86),
                Width = Application.GetRealWidth(237),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = this.function.sid,
            };
            serialView.AddChidren(serialValuesBtn);
                var serialLineBtn = new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    BackgroundColor = CSS_Color.DividingLineColor,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1)
                };
                serialView.AddChidren(serialLineBtn);
                var serialTextBtn = new Button()
                {
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(160),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.xuliehao,
                };
                serialView.AddChidren(serialTextBtn);
                var serialValuesBtn = new Button()
                {
                    X = Application.GetRealWidth(86),
                    Width = Application.GetRealWidth(237),
                    TextAlignment = TextAlignment.CenterRight,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.TextFontSize,
                    Text = this.function.sid,
                };
                serialView.AddChidren(serialValuesBtn);
                #endregion
            //型号
            var modelView = new FrameLayout()
            {
                Height = Application.GetRealHeight(55),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            if (this.function.spk == SPK.VideoDoorLock)
            {
                #region 型号
                var modelView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(modelView);
                var modelLineBtn = new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    BackgroundColor = CSS_Color.DividingLineColor,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1)
                };
                modelView.AddChidren(modelLineBtn);
                var modelTextBtn = new Button()
                {
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(160),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.xinghao,
                };
                modelView.AddChidren(modelTextBtn);
                var modelValuesBtn = new Button()
                {
                    X = Application.GetRealWidth(86),
                    Width = Application.GetRealWidth(237),
                    TextAlignment = TextAlignment.CenterRight,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.TextFontSize,
                    Text = this.function.omodel,
                };
                modelView.AddChidren(modelValuesBtn);
                #endregion
                #region 删除设备行
                contentView.AddChidren(new Button() {
                    Height = Application.GetRealHeight(48),
                });
                var delTextBtn = new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(220),
                    Height = Application.GetRealWidth(44),
                    TextAlignment = TextAlignment.Center,
                    TextColor = CSS_Color.WarningColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.DeleteDevice,
                    Radius = (uint)Application.GetRealWidth(22),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(delTextBtn);
                EventHandler<MouseEventArgs> ClickEvent = (sener, e) =>
                {
                    new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () =>
                    {
                        UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.DelDevice(this.function, (isBool) =>
                        {
                            Application.RunOnMainThread(() =>
                            {
                                if (!isBool)
                                {
                                    new Tip()
                                    {
                                        CloseTime = 1,
                                        Text = Language.StringByID(StringId.delFail),
                                        Direction = AMPopTipDirection.None,
                                    }.Show(bodyView);
                                    return;
                                }
                                //删除本地文件
                                UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function);
                                this.RemoveFromParent();
                                this.actionDel?.Invoke();
                            });
                        });
                    });
                };
                delTextBtn.MouseUpEventHandler = ClickEvent;
                #endregion
            }
            var modelLineBtn = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = CSS_Color.DividingLineColor,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1)
            };
            modelView.AddChidren(modelLineBtn);
            var modelTextBtn = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
               TextID=StringId.xinghao,
            };
            modelView.AddChidren(modelTextBtn);
            var modelValuesBtn = new Button()
            {
                X = Application.GetRealWidth(86),
                Width = Application.GetRealWidth(237),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = this.function.omodel,
            };
            modelView.AddChidren(modelValuesBtn);
            #endregion
#if stage2
            #region 添加到桌面
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
@@ -12,7 +12,6 @@
        {
            LoadEvent_ChangeFunctionName ();
            SkipChooseRoomPage();
            DelDeviceEvent();
        }
@@ -79,44 +78,7 @@
            }
                
        }
        /// <summary>
        /// 解绑设备的事件
        /// </summary>
        void DelDeviceEvent()
        {
            EventHandler<MouseEventArgs> ClickEvent = (sener, e) =>
            {
                new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () =>
                {
                    UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.DelDevice(this.function, (isBool) =>
                    {
                        Application.RunOnMainThread(() =>
                        {
                            if (!isBool)
                            {
                                new Tip()
                                {
                                    CloseTime = 1,
                                    Text = Language.StringByID(StringId.delFail),
                                    Direction = AMPopTipDirection.None,
                                }.Show(bodyView);
                                return;
                            }
                            //删除本地文件
                            UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function);
                            this.RemoveFromParent();
                            this.actionDel?.Invoke();
                        });
                    });
                });
            };
            this.delView.MouseUpEventHandler += ClickEvent;
            this.delTextBtn.MouseUpEventHandler += ClickEvent;
            this.delRightBtn.MouseUpEventHandler += ClickEvent;
        }
    }
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -167,7 +167,7 @@
            EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(deviceSerial, deviceId, spk);
#else
            HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk);
            HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk,"");
#endif
@@ -291,6 +291,7 @@
#if __IOS__
#else
                HDLEzvizSdk.Instance.SetHomeId(home.id);
#endif
        }
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs
New file
@@ -0,0 +1,176 @@
using System;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock
{
    public class UnlockSettingFacePage : FrameLayout
    {
        FrameLayout bodyView;
        bool faceUnlockSwitch;
        public UnlockSettingFacePage()
        {
            bodyView = this;
        }
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.FaceUnlockSetting)).LoadTopView();
            var contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(600),
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
            #region 人脸开锁
            var faceUnlockView = new FrameLayout()
            {
                Height = Application.GetRealHeight(74),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(faceUnlockView);
            var btnFaceUnlockText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(7),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.FaceUnlock,
            };
            faceUnlockView.AddChidren(btnFaceUnlockText);
            var btnFaceUnlockTipText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnFaceUnlockText.Bottom,
                Width = Application.GetRealWidth(339),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                TextID = StringId.FaceUnlockTip
            };
            faceUnlockView.AddChidren(btnFaceUnlockTipText);
            var btnFaceUnlockSwitchIcon = new Button()
            {
                X = Application.GetRealWidth(322),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(36),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch_2.png",
                SelectedImagePath = "Public/SwitchOn_2.png",
                IsSelected = faceUnlockSwitch,
            };
            faceUnlockView.AddChidren(btnFaceUnlockSwitchIcon);
            #endregion
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealHeight(8),
                BackgroundColor = CSS_Color.BackgroundColor,
            });
            #region 触发方式 TriggerMode
            var triggerModeView = new FrameLayout()
            {
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(triggerModeView);
            var btnTriggerModeRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            triggerModeView.AddChidren(btnTriggerModeRight);
            var btnTriggerModeStateText = new Button()
            {
                Width = Application.GetRealWidth(223),
                TextAlignment = TextAlignment.CenterRight,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.PromptingColor1,
                TextID = StringId.ManualTriggering,
            };
            triggerModeView.AddChidren(btnTriggerModeStateText);
            var btnTriggerModeText = new Button()
            {
                X = Application.GetRealWidth(16),
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.TriggerMode,
            };
            triggerModeView.AddChidren(btnTriggerModeText);
            btnTriggerModeText.MouseUpEventHandler = (sender, e) =>
            {
            };
            #endregion
            contentView.AddChidren(new Button()
            {
                Height = 1,
                BackgroundColor = CSS_Color.PromptingColor1,
                Gravity = Gravity.CenterHorizontal,
            });
            #region 人脸录入帮助
            var faceEntryHelpView = new FrameLayout()
            {
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(faceEntryHelpView);
            var btnFaceEntryHelpRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            faceEntryHelpView.AddChidren(btnFaceEntryHelpRight);
            var btnFaceEntryHelpText = new Button()
            {
                X = Application.GetRealWidth(16),
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.FaceEntryHelp,
            };
            faceEntryHelpView.AddChidren(btnFaceEntryHelpText);
            btnFaceEntryHelpText.MouseUpEventHandler = (sender, e) => {
            };
            #endregion
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs
New file
@@ -0,0 +1,694 @@
using System;
using HDL_ON.Common;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock
{
    public class UnlockSettingPage : FrameLayout
    {
        FrameLayout bodyView;
        /// <summary>
        /// 二次开锁开关
        /// </summary>
        Button btnSecondaryUnlockingUnlockkSwtichIcon;
        /// <summary>
        /// 童锁开关
        /// </summary>
        Button btnChildLockSwitchIcon;
        /// <summary>
        /// 反锁开关
        /// </summary>
        Button btnAntiLockSwitchIcon;
        /// <summary>
        /// 布防开关
        /// </summary>
        Button btnDefenceStatusSwitchIcon;
        /// <summary>
        /// 按键两次开门
        /// </summary>
        bool ezvizDoubleClickOpenDoorSwitchVO = false;
        /// <summary>
        /// 童锁状态
        /// </summary>
        bool ezvizChildLockSwitchVO = false;
        /// <summary>
        /// 反锁状态
        /// </summary>
        bool ezvizAntiLock = false;
        /// <summary>
        /// 布防状态
        /// </summary>
        bool ezvizDefenceStatus = false;
        Function device;
        public UnlockSettingPage(Function function)
        {
            bodyView = this;
            device = function;
        }
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.UnlockSetting)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            var contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(600),
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
            #region 人脸开锁设置
            var faceUnlockSettingView = new FrameLayout()
            {
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(faceUnlockSettingView);
            var btnFaceSettingRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            faceUnlockSettingView.AddChidren(btnFaceSettingRight);
            var btnFaceText = new Button()
            {
                X = Application.GetRealWidth(16),
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.FaceUnlockSetting,
            };
            faceUnlockSettingView.AddChidren(btnFaceText);
            btnFaceText.MouseUpEventHandler = (sender, e) => {
                var page = new UnlockSettingFacePage();
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #endregion
            contentView.AddChidren(new Button() {
                Height = Application.GetRealHeight(8),
                BackgroundColor = CSS_Color.BackgroundColor,
            });
            #region 按键两次开锁
            var secondaryUnlockingView = new FrameLayout()
            {
                Height = Application.GetRealHeight(74),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(secondaryUnlockingView);
            var btnSecondaryUnlockingText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(7),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.PressTheButtonToUnlockTwice
            };
            secondaryUnlockingView.AddChidren(btnSecondaryUnlockingText);
            var btnSecondaryUnlockingTipText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnSecondaryUnlockingText.Bottom,
                Width = Application.GetRealWidth(339),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                TextID = StringId.PressTheButtonToUnlockTwiceTip
            };
            secondaryUnlockingView.AddChidren(btnSecondaryUnlockingTipText);
            btnSecondaryUnlockingUnlockkSwtichIcon = new Button()
            {
                X = Application.GetRealWidth(322),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(36),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch_2.png",
                SelectedImagePath = "Public/SwitchOn_2.png",
                IsSelected = ezvizDoubleClickOpenDoorSwitchVO,
            };
            secondaryUnlockingView.AddChidren(btnSecondaryUnlockingUnlockkSwtichIcon);
            #endregion
            #region 童锁模式
            var childLockView = new FrameLayout()
            {
                Height = Application.GetRealHeight(74),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(childLockView);
            childLockView.AddChidren(new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = 1,
                BackgroundColor = CSS_Color.DividingLineColor,
            });
            var btnEzvizChildLockText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(7),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.ChildLockMode
            };
            childLockView.AddChidren(btnEzvizChildLockText);
            var btnChildLockTipText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnEzvizChildLockText.Bottom,
                Width = Application.GetRealWidth(339),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                TextID = StringId.ChildLockModeTip,
            };
            childLockView.AddChidren(btnChildLockTipText);
            btnChildLockSwitchIcon = new Button()
            {
                X = Application.GetRealWidth(322),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(36),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch_2.png",
                SelectedImagePath = "Public/SwitchOn_2.png",
                IsSelected = ezvizChildLockSwitchVO,
            };
            childLockView.AddChidren(btnChildLockSwitchIcon);
            #endregion
            #region 反锁模式
            var antiLockView = new FrameLayout()
            {
                Height = Application.GetRealHeight(94),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(antiLockView);
            antiLockView.AddChidren(new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = 1,
                BackgroundColor = CSS_Color.DividingLineColor,
            });
            var btnAntiLockText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(7),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.AntiLockMode
            };
            antiLockView.AddChidren(btnAntiLockText);
            var btnAntilockTipText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnAntiLockText.Bottom,
                Width = Application.GetRealWidth(339),
                Height = Application.GetRealHeight(37 + 15),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                TextID = StringId.AntiLockModeTip,
            };
            antiLockView.AddChidren(btnAntilockTipText);
            btnAntiLockSwitchIcon = new Button()
            {
                X = Application.GetRealWidth(322),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(36),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch_2.png",
                SelectedImagePath = "Public/SwitchOn_2.png",
                IsSelected = ezvizAntiLock,
            };
            antiLockView.AddChidren(btnAntiLockSwitchIcon);
            #endregion
            #region 布防模式
            var defenceView = new FrameLayout()
            {
                Height = Application.GetRealHeight(94),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(defenceView);
            defenceView.AddChidren(new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = 1,
                BackgroundColor = CSS_Color.DividingLineColor,
            });
            var btnDefenceText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(7),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.DefenceMode
            };
            defenceView.AddChidren(btnDefenceText);
            var btnDefenceTipText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnDefenceText.Bottom,
                Width = Application.GetRealWidth(339),
                Height = Application.GetRealHeight(37 + 15),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                TextID = StringId.DoorlockDefenceModeTip,
            };
            defenceView.AddChidren(btnDefenceTipText);
            btnDefenceStatusSwitchIcon = new Button()
            {
                X = Application.GetRealWidth(322),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(36),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch_2.png",
                SelectedImagePath = "Public/SwitchOn_2.png",
                IsSelected = ezvizAntiLock,
            };
            defenceView.AddChidren(btnDefenceStatusSwitchIcon);
            #endregion
            var waitPage = new Loading();
            bodyView.AddChidren(waitPage);
            waitPage.Start("");
            new System.Threading.Thread(() => {
                try
                {
                    var pack = ApiUtlis.Ins.HttpRequest.GetDoubleClickOpenDoorSwitch(device.deviceId);
                    if (pack != null && pack.Code == StateCode.SUCCESS)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            //更新界面
                            var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<StateObj>(pack.Data.ToString());
                            btnSecondaryUnlockingUnlockkSwtichIcon.IsSelected = obj.enabled.ToString() == "0" ? false : true;
                        });
                    }
                    else
                    {
                        //失败提示
                        Application.RunOnMainThread(() =>
                        {
                            //失败提示
                            var tip = new Tip()
                            {
                                MaxWidth = Application.GetRealWidth(300),
                                Text = pack.message,
                                CloseTime = 3,
                                Direction = AMPopTipDirection.None
                            };
                            tip.Show(MainPage.BaseView);
                        });
                    }
                    #region 查询童锁开关状态
                    pack = ApiUtlis.Ins.HttpRequest.GetChildLockSwitch(device.deviceId);
                    if (pack != null && pack.Code == StateCode.SUCCESS)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            //更新界面
                            var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<StateObj>(pack.Data.ToString());
                            btnChildLockSwitchIcon.IsSelected = obj.enabled.ToString() == "0" ? false : true;
                        });
                    }
                    else
                    {
                        //失败提示
                        Application.RunOnMainThread(() =>
                        {
                            //失败提示
                            var tip = new Tip()
                            {
                                MaxWidth = Application.GetRealWidth(300),
                                Text = pack.message,
                                CloseTime = 3,
                                Direction = AMPopTipDirection.None
                            };
                            tip.Show(MainPage.BaseView);
                        });
                    }
                    #endregion
                    #region 查询反锁开关状态
                    pack = ApiUtlis.Ins.HttpRequest.GetAntiLockCfg(device.deviceId);
                    if (pack != null && pack.Code == StateCode.SUCCESS)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            try
                            {
                                //更新界面
                                var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<StateObj>(pack.Data.ToString());
                                btnAntiLockSwitchIcon.IsSelected = (bool)obj.enabled;
                            }catch(Exception ex)
                            {
                                MainPage.Log($"update btnAntiLockSwitchIcon.IsSelected error :{ex.Message}");
                            }
                        });
                    }
                    else
                    {
                        //失败提示
                        Application.RunOnMainThread(() =>
                        {
                            //失败提示
                            var tip = new Tip()
                            {
                                MaxWidth = Application.GetRealWidth(300),
                                Text = pack.message,
                                CloseTime = 3,
                                Direction = AMPopTipDirection.None
                            };
                            tip.Show(MainPage.BaseView);
                        });
                    }
                    #endregion
                    #region 查询布防状态
                    pack = ApiUtlis.Ins.HttpRequest.GetDefenceStatus(device.deviceId);
                    if (pack != null && pack.Code == StateCode.SUCCESS)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            //更新界面
                            var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorlockDefenceState>(pack.Data.ToString());
                            btnDefenceStatusSwitchIcon.IsSelected = obj.armStatus == "disarmed" ? false : true;
                        });
                    }
                    else
                    {
                        //失败提示
                        Application.RunOnMainThread(() =>
                        {
                            //失败提示
                            var tip = new Tip()
                            {
                                MaxWidth = Application.GetRealWidth(300),
                                Text = pack.message,
                                CloseTime = 3,
                                Direction = AMPopTipDirection.None
                            };
                            tip.Show(MainPage.BaseView);
                        });
                    }
                    #endregion
                }
                catch (Exception ex)
                {
                    MainPage.Log($"UnlockSettingPage error : {ex.Message}");
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        waitPage.Hide();
                    });
                }
            }) { IsBackground = true }.Start();
            #region 配置事件
            btnSecondaryUnlockingUnlockkSwtichIcon.MouseUpEventHandler = (sender, e) => {
                waitPage.Start("");
                int changeState = 0;
                if (!btnSecondaryUnlockingUnlockkSwtichIcon.IsSelected)
                {
                    btnSecondaryUnlockingUnlockkSwtichIcon.IsSelected = true;
                    changeState = 1;
                }
                new System.Threading.Thread(() => {
                    try
                    {
                        var pack = ApiUtlis.Ins.HttpRequest.SetDoubleClickOpenDoorSwitch(device.deviceId,changeState);
                        if (pack != null && pack.Code == StateCode.SUCCESS)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                //更新界面
                                btnSecondaryUnlockingUnlockkSwtichIcon.IsSelected = changeState == 1;
                            });
                        }
                        else
                        {
                            //失败提示
                            Application.RunOnMainThread(() =>
                            {
                                //失败提示
                                var tip = new Tip()
                                {
                                    MaxWidth = Application.GetRealWidth(300),
                                    Text = pack.message,
                                    CloseTime = 3,
                                    Direction = AMPopTipDirection.None
                                };
                                tip.Show(MainPage.BaseView);
                            });
                        }
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"SetDoubleClickOpenDoorSwitch error : {ex.Message}");
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                        });
                    }
                }) { IsBackground = true }.Start();
            };
            btnChildLockSwitchIcon.MouseUpEventHandler = (sender, e) => {
                waitPage.Start("");
                int changeState = 0;
                if (!btnChildLockSwitchIcon.IsSelected)
                {
                    btnChildLockSwitchIcon.IsSelected = true;
                    changeState = 1;
                }
                new System.Threading.Thread(() => {
                    try
                    {
                        var pack = ApiUtlis.Ins.HttpRequest.SetChildLockSwitch(device.deviceId, changeState);
                        if (pack != null && pack.Code == StateCode.SUCCESS)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                //更新界面
                                btnChildLockSwitchIcon.IsSelected = changeState == 1;
                            });
                        }
                        else
                        {
                            //失败提示
                            Application.RunOnMainThread(() =>
                            {
                                //失败提示
                                var tip = new Tip()
                                {
                                    MaxWidth = Application.GetRealWidth(300),
                                    Text = pack.message,
                                    CloseTime = 3,
                                    Direction = AMPopTipDirection.None
                                };
                                tip.Show(MainPage.BaseView);
                            });
                        }
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"SetChildLockSwitch error : {ex.Message}");
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                        });
                    }
                })
                { IsBackground = true }.Start();
            };
            btnAntiLockSwitchIcon.MouseUpEventHandler = (sender, e) => {
                waitPage.Start("");
                bool changeState = false;
                if (!btnAntiLockSwitchIcon.IsSelected)
                {
                    btnAntiLockSwitchIcon.IsSelected = true;
                    changeState = true;
                }
                new System.Threading.Thread(() => {
                    try
                    {
                        var pack = ApiUtlis.Ins.HttpRequest.SetAntiLockCfg(device.deviceId, changeState);
                        if (pack != null && pack.Code == StateCode.SUCCESS)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                //更新界面
                                btnAntiLockSwitchIcon.IsSelected = changeState;
                            });
                        }
                        else
                        {
                            //失败提示
                            Application.RunOnMainThread(() =>
                            {
                                //失败提示
                                var tip = new Tip()
                                {
                                    MaxWidth = Application.GetRealWidth(300),
                                    Text = pack.message,
                                    CloseTime = 3,
                                    Direction = AMPopTipDirection.None
                                };
                                tip.Show(MainPage.BaseView);
                            });
                        }
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"SetAntiLockCfg error : {ex.Message}");
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                        });
                    }
                })
                { IsBackground = true }.Start();
            };
            btnDefenceStatusSwitchIcon.MouseUpEventHandler = (sender, e) => {
                waitPage.Start("");
                bool changeState = false;
                if (!btnDefenceStatusSwitchIcon.IsSelected)
                {
                    btnDefenceStatusSwitchIcon.IsSelected = true;
                    changeState = true;
                }
                new System.Threading.Thread(() => {
                    try
                    {
                        var pack = ApiUtlis.Ins.HttpRequest.SetDefenceStatus(device.deviceId, changeState);
                        if (pack != null && pack.Code == StateCode.SUCCESS)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                //更新界面
                                btnDefenceStatusSwitchIcon.IsSelected = changeState;
                            });
                        }
                        else
                        {
                            //失败提示
                            Application.RunOnMainThread(() =>
                            {
                                //失败提示
                                var tip = new Tip()
                                {
                                    MaxWidth = Application.GetRealWidth(300),
                                    Text = pack.message,
                                    CloseTime = 3,
                                    Direction = AMPopTipDirection.None
                                };
                                tip.Show(MainPage.BaseView);
                            });
                        }
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"SetDefenceStatus error : {ex.Message}");
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                        });
                    }
                })
                { IsBackground = true }.Start();
            };
            #endregion
        }
    }
    /// <summary>
    /// 门锁配置
    /// </summary>
    public class StateObj
    {
        public object enabled;
    }
    public class DoorlockDefenceState
    {
        /// <summary>
        /// 布防状态 disarmed-撤防 armed-已布防
        /// </summary>
        public string armStatus;
        /// <summary>
        /// 布防模式 global-全局 atHome-在家 outDoor-外出 sleep-睡眠
        /// </summary>
        public string defenceMode;
    }
}
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -239,7 +239,8 @@
            this.CalculatedPosition();//重新计算宽度
            var btnDoorlockStatus = new Button()
            Button btnDoorlockStatus;
            btnDoorlockStatus = new Button()
            {
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(62),
@@ -251,7 +252,7 @@
                TextSize = 16,
            };
            whiteFl.AddChidren(btnDoorlockStatus);
            int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(133);
            //实时视频
            rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs
@@ -11,13 +11,17 @@
    public class VideoDoorlockUserListPage : FrameLayout
    {
        FrameLayout bodyView;
        VerticalScrolViewLayout contentView;
        Function device;
        List<VideoDoorlockUser> userList;
        public VideoDoorlockUserListPage(Function function)
        {
            bodyView = this;
            device = function;
            userList = new List<VideoDoorlockUser>();
        }
        public void LoadPage()
@@ -26,7 +30,7 @@
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            var contentView = new VerticalScrolViewLayout()
            contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667 - 70),
@@ -45,52 +49,11 @@
                    {
                        if (pack.Code == StateCode.SUCCESS)
                        {
                            var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<VideoDoorlockUser>>(pack.Data.ToString());
                            if (list != null)
                            userList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<VideoDoorlockUser>>(pack.Data.ToString());
                            if (userList != null)
                            {
                                Application.RunOnMainThread(() => {
                                    foreach (var user in list)
                                    {
                                        contentView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
                                        var row = new FrameLayout()
                                        {
                                            Gravity = Gravity.CenterHorizontal,
                                            Height = Application.GetRealHeight(50),
                                            Radius = (uint)Application.GetRealWidth(12),
                                            BackgroundColor = CSS_Color.MainBackgroundColor,
                                            Width = Application.GetRealWidth(343),
                                        };
                                        contentView.AddChidren(row);
                                        var btnRight = new Button()
                                        {
                                            X = Application.GetRealWidth(307),
                                            Gravity = Gravity.CenterVertical,
                                            Width = Application.GetMinRealAverage(16),
                                            Height = Application.GetMinRealAverage(16),
                                            UnSelectedImagePath = "Public/Right.png",
                                        };
                                        row.AddChidren(btnRight);
                                        var btnName = new Button()
                                        {
                                            X = Application.GetRealWidth(12),
                                            TextAlignment = TextAlignment.CenterLeft,
                                            TextColor = CSS_Color.FirstLevelTitleColor,
                                            TextSize = CSS_FontSize.TextFontSize,
                                            Text = user.lockUserName
                                        };
                                        row.AddChidren(btnName);
                                        btnName.MouseUpEventHandler = (sender, e) => {
                                            var page = new VideoDoorlockUserManagerPage(device, user);
                                            MainPage.BasePageView.AddChidren(page);
                                            page.LoadPage();
                                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                                        };
                                    }
                                    initView();
                                });
                            }
                        }
@@ -120,6 +83,61 @@
        }
        void initView()
        {
            contentView.RemoveAll();
            foreach (var user in userList)
            {
                contentView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
                var row = new FrameLayout()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Height = Application.GetRealHeight(50),
                    Radius = (uint)Application.GetRealWidth(12),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    Width = Application.GetRealWidth(343),
                };
                contentView.AddChidren(row);
                var btnRight = new Button()
                {
                    X = Application.GetRealWidth(307),
                    Gravity = Gravity.CenterVertical,
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/Right.png",
                };
                row.AddChidren(btnRight);
                var btnName = new Button()
                {
                    X = Application.GetRealWidth(12),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.TextFontSize,
                    Text = user.lockUserName
                };
                row.AddChidren(btnName);
                btnName.MouseUpEventHandler = (sender, e) => {
                    var page = new VideoDoorlockUserManagerPage(device, user);
                    page.delCallBackAction = () => {
                        userList.Remove(user);
                        initView();
                    };
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
            }
        }
    }
    public class VideoDoorlockUser
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using HDL_ON.Common;
using HDL_ON.DAL.Server;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
@@ -21,6 +22,9 @@
        Function device;
        VideoDoorlockUser doorlockUser;
        public Action delCallBackAction;
        Loading waitPage;
        public VideoDoorlockUserManagerPage(Function function,VideoDoorlockUser user)
        {
@@ -28,6 +32,9 @@
            device = function;
            doorlockUser = user;
            BackgroundColor = CSS_Color.BackgroundColor;
            waitPage = new Loading();
            bodyView.AddChidren(waitPage);
            waitPage.Hide();
        }
        public void LoadPage()
@@ -91,25 +98,30 @@
        void initOptionView(bool isEdit)
        {
            if(userPermissionsView!= null)
            int childrenViewHeight = Application.GetRealWidth(116);
            int permissionsViewHeight = Application.GetRealHeight(291 + 92);
            if (userPermissionsView!= null)
            {
                userPermissionsView.RemoveAll();
                if (isEdit)
                {
                    permissionsViewHeight = Application.GetRealHeight(391 + 50);
                    childrenViewHeight = Application.GetRealWidth(156);
                }
                userPermissionsView.Height = permissionsViewHeight;
            }
            int childrenViewHeight = Application.GetRealHeight( 108);
            int permissionsViewHeight = Application.GetRealHeight( 291+92);
            if (isEdit)
            else
            {
                permissionsViewHeight = Application.GetRealHeight(391 + 92);
                childrenViewHeight = Application.GetRealHeight(136);
                userPermissionsView = new FrameLayout()
                {
                    Height = permissionsViewHeight,
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                contentView.AddChidren(userPermissionsView);
            }
            #region 门锁用户开锁方式管理
            userPermissionsView = new FrameLayout()
            {
                Height = permissionsViewHeight,
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(userPermissionsView);
            var userPermissionsTitleView = new FrameLayout()
            {
@@ -135,11 +147,19 @@
                TextAlignment = TextAlignment.CenterRight,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.MainColor,
                TextID = StringId.Edit,
                TextID = !isEdit? StringId.Edit: StringId.Complete,
            };
            userPermissionsTitleView.AddChidren(btnEditUserPermissions);
            btnEditUserPermissions.MouseUpEventHandler = (sender, e) => {
                initOptionView(isEdit ? false : true);
                if(!isEdit)
                {
                    initOptionView(true);
                }
                else
                {
                    initOptionView(false);
                }
            };
@@ -147,7 +167,7 @@
            var unlockOptionView = new FrameLayout()
            {
                Y = userPermissionsTitleView.Bottom,
                Height = Application.GetRealHeight(231),
                Height =2 * childrenViewHeight +Application.GetRealHeight(20),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            userPermissionsView.AddChidren(unlockOptionView);
@@ -157,7 +177,7 @@
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(64 + 32),
                Height = Application.GetRealHeight(64 + 24 + 20)
                Height = childrenViewHeight
            };
            unlockOptionView.AddChidren(fingerprintView);
@@ -193,24 +213,70 @@
                {
                    btnFingerprintText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.Fingerprints);
                }
            }
            if (isEdit)
            {
                var btnClearFingerprints = new Button()
                if (isEdit)
                {
                    Y = btnFingerprintText.Bottom,
                    Width = Application.GetRealWidth(60),
                    Height = Application.GetRealHeight(28),
                    BorderWidth = 1,
                    BorderColor = CSS_Color.MainColor,
                    Radius = (uint)Application.GetRealWidth(4),
                    TextID = StringId.Clear,
                };
                fingerprintView.AddChidren(btnClearFingerprints);
                btnClearFingerprints.MouseUpEventHandler = (sender, e) => {
                };
                    var btnClearFingerprints = new Button()
                    {
                        X = Application.GetRealWidth(18),
                        Y = btnFingerprintText.Bottom,
                        Width = Application.GetRealWidth(60),
                        Height = Application.GetRealHeight(28),
                        BorderWidth = 1,
                        BorderColor = CSS_Color.MainColor,
                        Radius = (uint)Application.GetRealWidth(4),
                        TextID = StringId.Clear,
                        TextColor = CSS_Color.MainColor,
                    };
                    fingerprintView.AddChidren(btnClearFingerprints);
                    btnClearFingerprints.MouseUpEventHandler = (sender, e) =>
                    {
                        waitPage.Start(Language.StringByID(StringId.PleaseWait));
                        new System.Threading.Thread(() =>
                        {
                            try
                            {
                                var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserFingerPassword(device.deviceId, doorlockUser.lockUserIndex);
                                if (pack != null && pack.Code == StateCode.SUCCESS)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        //更新界面
                                        initOptionView(true);
                                    });
                                }
                                else
                                {
                                    //失败提示
                                    Application.RunOnMainThread(() =>
                                    {
                                        //失败提示
                                        var tip = new Tip()
                                        {
                                            MaxWidth = Application.GetRealWidth(300),
                                            Text = pack.message,
                                            CloseTime = 3,
                                            Direction = AMPopTipDirection.None
                                        };
                                        tip.Show(MainPage.BaseView);
                                    });
                                }
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log($"delete finger error : {ex.Message}");
                            }
                            finally
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    waitPage.Hide();
                                });
                            }
                        })
                        { IsBackground = true }.Start();
                    };
                }
            }
            #endregion
@@ -220,7 +286,7 @@
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(64 + 32),
                Height = Application.GetRealHeight(64 + 24 + 20)
                Height = childrenViewHeight
            };
            unlockOptionView.AddChidren(digitalPasswordView);
@@ -256,21 +322,71 @@
                {
                    btnDigitalPasswordText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.DigitalPassword);
                }
            }
            if (isEdit)
            {
                var btnClearDigitalPassword = new Button()
                if (isEdit)
                {
                    Y = btnDigitalPasswordText.Bottom,
                    Width = Application.GetRealWidth(60),
                    Height = Application.GetRealHeight(28),
                    BorderWidth = 1,
                    BorderColor = CSS_Color.MainColor,
                    Radius = (uint)Application.GetRealWidth(4),
                    TextID = StringId.Clear,
                };
                digitalPasswordView.AddChidren(btnClearDigitalPassword);
                    var btnClearDigitalPassword = new Button()
                    {
                        X = Application.GetRealWidth(18),
                        Y = btnDigitalPasswordText.Bottom,
                        Width = Application.GetRealWidth(60),
                        Height = Application.GetRealHeight(28),
                        BorderWidth = 1,
                        BorderColor = CSS_Color.MainColor,
                        Radius = (uint)Application.GetRealWidth(4),
                        TextID = StringId.Clear,
                        TextColor = CSS_Color.MainColor,
                    };
                    digitalPasswordView.AddChidren(btnClearDigitalPassword);
                    btnClearDigitalPassword.MouseUpEventHandler = (sender, e) =>
                    {
                        waitPage.Start(Language.StringByID(StringId.PleaseWait));
                        new System.Threading.Thread(() =>
                        {
                            try
                            {
                                var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserNumberPassword(device.deviceId, doorlockUser.lockUserIndex);
                                if (pack != null && pack.Code == StateCode.SUCCESS)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        //更新界面
                                        initOptionView(true);
                                    });
                                }
                                else
                                {
                                    //失败提示
                                    Application.RunOnMainThread(() =>
                                    {
                                        //失败提示
                                        var tip = new Tip()
                                        {
                                            MaxWidth = Application.GetRealWidth(300),
                                            Text = pack.message,
                                            CloseTime = 3,
                                            Direction = AMPopTipDirection.None
                                        };
                                        tip.Show(MainPage.BaseView);
                                    });
                                }
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log($"delete number password error : {ex.Message}");
                            }
                            finally
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    waitPage.Hide();
                                });
                            }
                        })
                        { IsBackground = true }.Start();
                    };
                }
            }
            #endregion
@@ -279,7 +395,7 @@
            {
                X = Application.GetRealWidth(263),
                Width = Application.GetRealWidth(64 + 32),
                Height = Application.GetRealHeight(64 + 24 + 20)
                Height = childrenViewHeight
            };
            unlockOptionView.AddChidren(nfcView);
@@ -315,21 +431,68 @@
                {
                    btnNfcText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.NfcKey);
                }
            }
            if (isEdit)
            {
                var btnClearNfc = new Button()
                if (isEdit)
                {
                    Y = btnNfcText.Bottom,
                    Width = Application.GetRealWidth(60),
                    Height = Application.GetRealHeight(28),
                    BorderWidth = 1,
                    BorderColor = CSS_Color.MainColor,
                    Radius = (uint)Application.GetRealWidth(4),
                    TextID = StringId.Clear,
                };
                nfcView.AddChidren(btnClearNfc);
                    var btnClearNfc = new Button()
                    {
                        X = Application.GetRealWidth(18),
                        Y = btnNfcText.Bottom,
                        Width = Application.GetRealWidth(60),
                        Height = Application.GetRealHeight(28),
                        BorderWidth = 1,
                        BorderColor = CSS_Color.MainColor,
                        Radius = (uint)Application.GetRealWidth(4),
                        TextID = StringId.Clear,
                        TextColor = CSS_Color.MainColor,
                    };
                    nfcView.AddChidren(btnClearNfc);
                    btnClearNfc.MouseUpEventHandler = (sender, e) => {
                        waitPage.Start(Language.StringByID(StringId.PleaseWait));
                        new System.Threading.Thread(() =>
                        {
                            try
                            {
                                var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserCardPassword(device.deviceId, doorlockUser.lockUserIndex);
                                if (pack != null && pack.Code == StateCode.SUCCESS)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        //更新界面
                                        initOptionView(true);
                                    });
                                }
                                else
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        //失败提示
                                        var tip = new Tip()
                                        {
                                            MaxWidth = Application.GetRealWidth(300),
                                            Text = pack.message,
                                            CloseTime = 3,
                                            Direction = AMPopTipDirection.None
                                        };
                                        tip.Show(MainPage.BaseView);
                                    });
                                }
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log($"delete face error : {ex.Message}");
                            }
                            finally
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    waitPage.Hide();
                                });
                            }
                        })
                        { IsBackground = true }.Start();
                    };
                }
            }
            #endregion
@@ -337,9 +500,9 @@
            var faceView = new FrameLayout()
            {
                X = Application.GetRealWidth(16),
                Y = fingerprintView.Bottom+ Application.GetRealHeight(20),
                Y = fingerprintView.Bottom,
                Width = Application.GetRealWidth(64 + 32),
                Height = Application.GetRealHeight(64 + 24 + 20)
                Height = childrenViewHeight
            };
            unlockOptionView.AddChidren(faceView);
@@ -375,21 +538,69 @@
                {
                    btnFaceText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.FaceKey);
                }
            }
            if (isEdit)
            {
                var btnClearFace = new Button()
                if (isEdit)
                {
                    Y = btnFaceText.Bottom,
                    Width = Application.GetRealWidth(60),
                    Height = Application.GetRealHeight(28),
                    BorderWidth = 1,
                    BorderColor = CSS_Color.MainColor,
                    Radius = (uint)Application.GetRealWidth(4),
                    TextID = StringId.Clear,
                };
                faceView.AddChidren(btnClearFace);
                    var btnClearFace = new Button()
                    {
                        X = Application.GetRealWidth(18),
                        Y = btnFaceText.Bottom,
                        Width = Application.GetRealWidth(60),
                        Height = Application.GetRealHeight(28),
                        BorderWidth = 1,
                        BorderColor = CSS_Color.MainColor,
                        Radius = (uint)Application.GetRealWidth(4),
                        TextID = StringId.Clear,
                        TextColor = CSS_Color.MainColor,
                    };
                    faceView.AddChidren(btnClearFace);
                    btnClearFace.MouseUpEventHandler = (sender, e) => {
                        waitPage.Start(Language.StringByID(StringId.PleaseWait));
                        new System.Threading.Thread(() =>
                        {
                            try
                            {
                                var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserFacePassword(device.deviceId, doorlockUser.lockUserIndex);
                                if (pack != null && pack.Code == StateCode.SUCCESS)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        //更新界面
                                        initOptionView(true);
                                    });
                                }
                                else
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        //失败提示
                                        var tip = new Tip()
                                        {
                                            MaxWidth = Application.GetRealWidth(300),
                                            Text = pack.message,
                                            CloseTime = 3,
                                            Direction = AMPopTipDirection.None
                                        };
                                        tip.Show(MainPage.BaseView);
                                    });
                                }
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log($"delete face error : {ex.Message}");
                            }
                            finally
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    waitPage.Hide();
                                });
                            }
                        })
                        { IsBackground = true }.Start();
                    };
                }
            }
            #endregion
@@ -399,24 +610,79 @@
            var delUserView = new FrameLayout()
            {
                Y = permissionsViewHeight - Application.GetRealHeight(92),
                Height = Application.GetRealHeight(92),
                Y = unlockOptionView.Bottom,
                Height = Application.GetRealHeight(110),
                BackgroundColor = CSS_Color.BackgroundColor,
            };
            userPermissionsView.AddChidren(delUserView);
            Button btnDelUser = new Button()
            {
                Y = Application.GetRealHeight(48),
                Y = Application.GetRealHeight(40),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                Height = Application.GetRealWidth(44),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                TextColor = CSS_Color.WarningColor,
                Radius = (uint)Application.GetRealWidth(22),
                TextID = StringId.DeleteUser,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            delUserView.AddChidren(btnDelUser);
            btnDelUser.MouseUpEventHandler = (sender, e) =>
            {
                new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteDoorlockUserTip, () =>
                {
                    waitPage.Start(Language.StringByID(StringId.PleaseWait));
                    new System.Threading.Thread(() =>
                    {
                        try
                        {
                            var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUser(device.deviceId, doorlockUser.lockUserIndex);
                            if (pack != null && pack.Code == StateCode.SUCCESS)
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    //更新界面
                                    new PublicAssmebly().TipMsg(StringId.Tip, StringId.DeleteSuccess, () => {
                                        this.RemoveFromParent();
                                        delCallBackAction?.Invoke();
                                    });
                                });
                            }
                            else
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    //失败提示
                                    var tip = new Tip()
                                    {
                                        MaxWidth = Application.GetRealWidth(300),
                                        Text = pack.message,
                                        CloseTime = 3,
                                        Direction = AMPopTipDirection.None
                                    };
                                    tip.Show(MainPage.BaseView);
                                });
                            }
                        }
                        catch (Exception ex)
                        {
                            MainPage.Log($"delete face error : {ex.Message}");
                        }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                waitPage.Hide();
                            });
                        }
                    })
                    { IsBackground = true }.Start();
                });
            };
        }
@@ -446,8 +712,6 @@
                    {
                        return;
                    }
                    var waitPage = new Loading();
                    bodyView.AddChidren(waitPage);
                    waitPage.Start(Language.StringByID(StringId.PleaseWait));
                    new System.Threading.Thread(() =>
                    {
@@ -456,8 +720,6 @@
                            var resultObj = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId,str);
                            if (resultObj.Code == StateCode.SUCCESS)
                            {
                                UserInfo.Current.userName = str;
                                UserInfo.Current.SaveUserInfo();
                                Application.RunOnMainThread(() =>
                                {
                                    btnUserName.Text = str;
@@ -477,11 +739,7 @@
                        {
                            Application.RunOnMainThread(() =>
                            {
                                if (waitPage != null)
                                {
                                    waitPage.RemoveFromParent();
                                    waitPage = null;
                                }
                                waitPage.Hide();
                            });
                        }
                    })