HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs
@@ -5,7 +5,7 @@
using ZigBee.Device;
namespace Shared.Phone.UserCenter.DoorLock
{
    public class MemberFrozenPage : DoorLockCommonLayout, ZigBee.Common.IStatus
    public class MemberFrozenPage : DoorLockCommonLayout
    {
        /// <summary>
        /// 构造函数
@@ -18,12 +18,24 @@
            BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor;
        }
        #region ◆ 变量申明__________________________
        #region  变量申明
        /// <summary>
        /// 当前门锁
        /// </summary>
        ZigBee.Device.DoorLock doorLock;
        /// <summary>
        /// 当前成员对象v
        /// </summary>
        Shared.Phone.UserCenter.MemberInfoRes curAccountObj;
        /// <summary>
        /// 刷新View
        /// </summary>
        VerticalRefreshLayout bodyView;
        #endregion
        /// <summary>
        /// 初始化数据信息
        /// </summary>
        void ReadDoorLockUserInfo()
        {
            System.Threading.Tasks.Task.Run(async () =>
@@ -64,8 +76,8 @@
            });
        }
        /// <summary>
        /// UI显示
        /// <summary>
        /// UI显示
        /// </summary>
        public void Show()
        {
@@ -100,7 +112,9 @@
                ReadDoorLockUserInfo();
            };
        }
        /// <summary>
        /// 中部布局
        /// </summary>
        public async void MidRefresh()
        {
            bodyView.RemoveAll();
@@ -135,8 +149,8 @@
                var btnRight = new Button()
                {
                    Height = Application.GetRealHeight(60),
                    Width = Application.GetRealWidth(60),
                    Height = Application.GetMinRealAverage(60),
                    Width = Application.GetMinRealAverage(60),
                    X = Application.GetRealWidth(72),
                    Y = Application.GetRealHeight(32),
                    UnSelectedImagePath = "DoorLock/RightIcon.png",
@@ -162,8 +176,8 @@
                    btnText.Text = Language.StringByID(R.MyInternationalizationString.FrozenUser);
                    btnRight.X = Application.GetRealWidth(50);
                    btnRight.Y = Application.GetRealHeight(32);
                    btnRight.Height = Application.GetRealHeight(63);
                    btnRight.Width = Application.GetRealWidth(104);
                    btnRight.Height = Application.GetMinRealAverage(63);
                    btnRight.Width = Application.GetMinRealAverage(104);
                    btnRight.UnSelectedImagePath = "DoorLock/Switch.png";
                    btnRight.SelectedImagePath = "DoorLock/SwitchOn.png";
                    var result = doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark];
@@ -183,8 +197,8 @@
                        btnText.Text = Language.StringByID(R.MyInternationalizationString.TempUnlockPermission);
                        btnRight.X = Application.GetRealWidth(50);
                        btnRight.Y = Application.GetRealHeight(32);
                        btnRight.Height = Application.GetRealHeight(63);
                        btnRight.Width = Application.GetRealWidth(104);
                        btnRight.Height = Application.GetMinRealAverage(63);
                        btnRight.Width = Application.GetMinRealAverage(104);
                        btnRight.UnSelectedImagePath = "DoorLock/Switch.png";
                        btnRight.SelectedImagePath = "DoorLock/SwitchOn.png";
                        line2.Visible = false;
@@ -219,25 +233,25 @@
                        unLockMethod.Show();
                    }
                    else if (currentIndex == 1)
                    {
                    {
                        if (!btnRight.IsSelected)
                        {
                            FreezeUser(true);
                            FreezeUser(true);
                        }
                        else
                        {
                            FreezeUser(false);
                            FreezeUser(false);
                        }
                    }
                    else if (currentIndex == 2)
                    {
                    {
                        if (!btnRight.IsSelected)
                        {
                            HasRemoteUnlockAccessMethod(true);
                            HasRemoteUnlockAccessMethod(true);
                        }
                        else
                        {
                            HasRemoteUnlockAccessMethod(false);
                            HasRemoteUnlockAccessMethod(false);
                        }
                    }
                };
@@ -261,7 +275,10 @@
            }
        }
        //冻结账户
        /// <summary>
        /// 冻结账户
        /// </summary>
        /// <param name="isFreeze"></param>
        void FreezeUser(bool isFreeze)
        {
            var dialog = new Dialog { };
@@ -280,30 +297,30 @@
            alert.Show();
            //使用确认型弹框时,的回调函数
            alert.ConfirmClickEvent += () =>
            {
                System.Threading.Tasks.Task.Run(async () =>
                {
                    int successConunt = 0;
                    int operateConunt = -1;
                    Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                    try
                    {
                        var doorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                        var curAccountDoorLockUserList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetAccountDoorLockUserList(doorLock, curAccountObj.SubAccountDistributedMark);
                        if (curAccountDoorLockUserList.Count != 0)
                        {
                            //修改云端存储信息
                            operateConunt = curAccountDoorLockUserList.Count;
            {
                System.Threading.Tasks.Task.Run(async () =>
                {
                    int successConunt = 0;
                    int operateConunt = -1;
                    Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                    try
                    {
                        var doorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                        var curAccountDoorLockUserList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetAccountDoorLockUserList(doorLock, curAccountObj.SubAccountDistributedMark);
                        if (curAccountDoorLockUserList.Count != 0)
                        {
                            //修改云端存储信息
                            operateConunt = curAccountDoorLockUserList.Count;
                            var tempGroupId = new List<List<int>>();
                            var tempUserIdList = new List<int> { };
                            foreach (var curDoorLockUser in curAccountDoorLockUserList)
                            {
                                // 账户中没有门锁用户
                                if (curDoorLockUser.DoorLockLocalUserId == null || curDoorLockUser.DoorLockLocalUserId == "")
                                {
                                }
                                else
                                {
                            foreach (var curDoorLockUser in curAccountDoorLockUserList)
                            {
                                // 账户中没有门锁用户
                                if (string.IsNullOrEmpty(curDoorLockUser.DoorLockLocalUserId))
                                {
                                }
                                else
                                {
                                    if (tempUserIdList.Count == 9)
                                    {
                                        tempGroupId.Add(tempUserIdList);
@@ -314,27 +331,27 @@
                            }
                            tempGroupId.Add(tempUserIdList);
                            //批量冻结门锁中的账户
                            ZigBee.Device.DoorLock.AccessType accessType;
                            if (isFreeze)
                            {
                                accessType = ZigBee.Device.DoorLock.AccessType.DisEnableMoreUsers;
                            }
                            else
                            {
                                accessType = ZigBee.Device.DoorLock.AccessType.EnableMoreUsers;
                            }
                            //冻结/解冻用户
                            ZigBee.Device.DoorLock.AccessType accessType;
                            if (isFreeze)
                            {
                                accessType = ZigBee.Device.DoorLock.AccessType.DisEnableMoreUsers;
                            }
                            else
                            {
                                accessType = ZigBee.Device.DoorLock.AccessType.EnableMoreUsers;
                            }
                            //冻结/解冻用户
                            int count1 = tempGroupId.Count;
                            if (tempGroupId.Count==1)
                            if (tempGroupId.Count == 1)
                            {
                                foreach (var a in tempGroupId)
                                {
                                    if(a.Count ==0)
                                    if (a.Count == 0)
                                    {
                                        count1 = 0;
                                        break;
                                    }
                                }
                                }
                            }
                            int count2 = 0;
@@ -346,19 +363,19 @@
                                {
                                    break;
                                }
                                var passData = doorLock.FreezeAccountData(tempUserIdList1, accessType);
                                var resultData = await doorLock.DefaultControlAsync(passData);
                                if (resultData != null && resultData.defaultControlResponseData != null)
                                {
                                    if (resultData.defaultControlResponseData.status == 32)
                                var passData = doorLock.FreezeAccountData(tempUserIdList1, accessType);
                                var resultData = await doorLock.DefaultControlAsync(passData);
                                if (resultData != null && resultData.defaultControlResponseData != null)
                                {
                                    if (resultData.defaultControlResponseData.status == 32)
                                    {
                                        count2++;
                                    }
                                    else if (resultData.defaultControlResponseData.status == 33)
                                    {
                                        count2++;
                                    }
                                    System.Threading.Thread.Sleep(1000);
                                    }
                                    System.Threading.Thread.Sleep(1000);
                                }
                                else
                                {
@@ -370,95 +387,53 @@
                                }
                                tempCount++;
                            }
                            // 批量冻结门锁中的账户后,准备冻结云端账户
                            if (count2 == count1)
                            {
                                foreach (var curDoorLockUser in curAccountDoorLockUserList)
                                {
                                    if (isFreeze)
                                    {
                                        var refreshDoorLockData = new ZigBee.Device.DoorLock.RefreshDoorLockData();
                                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                                        {
                                            refreshDoorLockData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                            refreshDoorLockData.IsOtherAccountCtrl = true;
                                        }
                                        if (doorLock.DeviceAddr != null)
                                        {
                                            refreshDoorLockData.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                                        }
                                        refreshDoorLockData.OpenLockMode = curDoorLockUser.OpenLockMode;
                                        refreshDoorLockData.DoorLockLocalUserId = curDoorLockUser.DoorLockLocalUserId;
                                        refreshDoorLockData.PrimaryId = curDoorLockUser.Id;
                                        refreshDoorLockData.IsFreezeUser = true;
                                        refreshDoorLockData.IsTempUnlockAuthority = doorLock.HasRemoteUnlockAccess[curAccountObj.SubAccountDistributedMark];
                                        //冻结云端
                                        var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/UpdateDoorLock", refreshDoorLockData);
                                        if (result != null)
                                        {
                                            if (result.StateCode == "Success")
                                            {
                                                successConunt++;
                                            }
                                            else
                                            {
                                                Application.RunOnMainThread(() =>
                                                {
                                                    if (isFreeze)
                                                    {
                                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                    }
                                                    else
                                                    {
                                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                    }
                                                    return;
                                                });
                                            }
                                        }
                                        else
                                    {
                                        var refreshDoorLockData = new ZigBee.Device.DoorLock.RefreshDoorLockData();
                                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                                        {
                                            Application.RunOnMainThread(() =>
                                            {
                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                            });
                                            refreshDoorLockData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                            refreshDoorLockData.IsOtherAccountCtrl = true;
                                        }
                                    }
                                    else
                                    {
                                        var refreshDoorLockData = new ZigBee.Device.DoorLock.RefreshDoorLockData();
                                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                                        {
                                            refreshDoorLockData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                            refreshDoorLockData.IsOtherAccountCtrl = true;
                                        }
                                        if (doorLock.DeviceAddr != null)
                                        {
                                            refreshDoorLockData.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                                        }
                                        refreshDoorLockData.OpenLockMode = curDoorLockUser.OpenLockMode;
                                        refreshDoorLockData.DoorLockLocalUserId = curDoorLockUser.DoorLockLocalUserId;
                                        refreshDoorLockData.PrimaryId = curDoorLockUser.Id;
                                        refreshDoorLockData.IsFreezeUser = false;
                                        if (doorLock.DeviceAddr != null)
                                        {
                                            refreshDoorLockData.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                                        }
                                        refreshDoorLockData.OpenLockMode = curDoorLockUser.OpenLockMode;
                                        refreshDoorLockData.DoorLockLocalUserId = curDoorLockUser.DoorLockLocalUserId;
                                        refreshDoorLockData.PrimaryId = curDoorLockUser.Id;
                                        refreshDoorLockData.IsFreezeUser = true;
                                        refreshDoorLockData.IsTempUnlockAuthority = doorLock.HasRemoteUnlockAccess[curAccountObj.SubAccountDistributedMark];
                                        //解冻云端
                                        var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/UpdateDoorLock", refreshDoorLockData);
                                        if (result != null)
                                        {
                                            if (result.StateCode == "Success")
                                            {
                                                successConunt++;
                                            }
                                            else
                                            {
                                                Application.RunOnMainThread(() =>
                                                {
                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                });
                                            }
                                        //冻结云端
                                        var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/UpdateDoorLock", refreshDoorLockData);
                                        if (result != null)
                                        {
                                            if (result.StateCode == "Success")
                                            {
                                                successConunt++;
                                            }
                                            else
                                            {
                                                Application.RunOnMainThread(() =>
                                                {
                                                    if (isFreeze)
                                                    {
                                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                    }
                                                    else
                                                    {
                                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                    }
                                                    return;
                                                });
                                            }
                                        }
                                        else
                                        {
@@ -466,70 +441,112 @@
                                            {
                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                            });
                                        }
                                    }
                                        }
                                    }
                                    else
                                    {
                                        var refreshDoorLockData = new ZigBee.Device.DoorLock.RefreshDoorLockData();
                                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                                        {
                                            refreshDoorLockData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                            refreshDoorLockData.IsOtherAccountCtrl = true;
                                        }
                                        if (doorLock.DeviceAddr != null)
                                        {
                                            refreshDoorLockData.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                                        }
                                        refreshDoorLockData.OpenLockMode = curDoorLockUser.OpenLockMode;
                                        refreshDoorLockData.DoorLockLocalUserId = curDoorLockUser.DoorLockLocalUserId;
                                        refreshDoorLockData.PrimaryId = curDoorLockUser.Id;
                                        refreshDoorLockData.IsFreezeUser = false;
                                        refreshDoorLockData.IsTempUnlockAuthority = doorLock.HasRemoteUnlockAccess[curAccountObj.SubAccountDistributedMark];
                                        //解冻云端
                                        var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/UpdateDoorLock", refreshDoorLockData);
                                        if (result != null)
                                        {
                                            if (result.StateCode == "Success")
                                            {
                                                successConunt++;
                                            }
                                            else
                                            {
                                                Application.RunOnMainThread(() =>
                                                {
                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                });
                                            }
                                        }
                                        else
                                        {
                                            Application.RunOnMainThread(() =>
                                            {
                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                            });
                                        }
                                    }
                                }
                            }
                            else
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    if (isFreeze)
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed) + ".", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                    }
                                    else
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed) + ".", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                    }
                                });
                            }
                        }
                        else
                        {
                            //添加云端存储信息
                            //冻结/解冻云端
                            var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData();
                            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                            {
                                addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                addLockInfo.IsOtherAccountCtrl = true;
                            }
                            addLockInfo.CloudAccountId = curAccountObj.SubAccountDistributedMark;
                            if (doorLock.DeviceAddr != null)
                            {
                                addLockInfo.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                            }
                            addLockInfo.EntryTime = System.DateTime.Now;
                            if (isFreeze)
                            {
                                addLockInfo.IsFreezeUser = true;
                            }
                            else
                            {
                                addLockInfo.IsFreezeUser = false;
                            }
                            else
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    if (isFreeze)
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed) + ".", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                    }
                                    else
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed) + ".", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                    }
                                });
                            }
                        }
                        else
                        {
                            //添加云端存储信息
                            //冻结/解冻云端
                            var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData();
                            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                            {
                                addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                addLockInfo.IsOtherAccountCtrl = true;
                            }
                            addLockInfo.CloudAccountId = curAccountObj.SubAccountDistributedMark;
                            if (doorLock.DeviceAddr != null)
                            {
                                addLockInfo.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
                            }
                            addLockInfo.EntryTime = System.DateTime.Now;
                            if (isFreeze)
                            {
                                addLockInfo.IsFreezeUser = true;
                            }
                            else
                            {
                                addLockInfo.IsFreezeUser = false;
                            }
                            addLockInfo.IsTempUnlockAuthority = doorLock.HasRemoteUnlockAccess[curAccountObj.SubAccountDistributedMark];
                            var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo);
                            var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo);
                            if (result != null)
                            {
                                if (result.StateCode == "Success")
                                {
                                    operateConunt = 0;
                                }
                                else
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        if (isFreeze)
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                        }
                                        else
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                        }
                                        return;
                                if (result.StateCode == "Success")
                                {
                                    operateConunt = 0;
                                }
                                else
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        if (isFreeze)
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                        }
                                        else
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                        }
                                        return;
                                    });
                                }
                            }
@@ -539,39 +556,46 @@
                                {
                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                });
                            }
                        }
                    }
                    catch { }
                    finally
                    {
                        if (operateConunt == successConunt)
                        {
                            if (isFreeze)
                            {
                                doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] = true;
                            }
                            else
                            {
                                doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] = false;
                            }
                            doorLock.ReSave();
                        }
                        Application.RunOnMainThread(() =>
                        {
                            MidRefresh();
                            CommonPage.Loading.Hide();
                        });
                    }
                });
            };
                                });
                            }
                        }
                    }
                    catch { }
                    finally
                    {
                        if (operateConunt == successConunt)
                        {
                            if (isFreeze)
                            {
                                doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] = true;
                            }
                            else
                            {
                                doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] = false;
                            }
                            doorLock.ReSave();
                        }
                        Application.RunOnMainThread(() =>
                        {
                            MidRefresh();
                            CommonPage.Loading.Hide();
                        });
                    }
                });
            };
        }
        //是否给子账户拥有远程开锁的条件
        /// <summary>
        /// 是否给子账户拥有远程开锁的条件
        /// </summary>
        /// <param name="hasAccess"></param>
        void HasRemoteUnlockAccessMethod(bool hasAccess)
        {
            string msg = Language.StringByID(R.MyInternationalizationString.SureGiveAccessToSubaccount);
            if (!hasAccess)
            {
                msg = Language.StringByID(R.MyInternationalizationString.SureCancelAccessToSubaccount);
            }
            var alert = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.DoorlockConfirm));
            alert.Show();
            //使用确认型弹框时,的回调函数
@@ -761,41 +785,7 @@
                        });
                    }
                });
            };
            };
        }
        #region ◆ 接口实现__________________________
        /// <summary>
        /// 处理变化事件 --将弃用 改用DeviceInfoChange()
        /// </summary>
        /// <returns>The changed.</returns>
        /// <param name="common">Common.</param>
        public void Changed(CommonDevice common)
        {
        }
        /// <summary>
        /// 处理变化事件
        /// </summary>
        /// <param name="common"></param>
        /// <param name="typeTag"></param>
        public void DeviceInfoChange(CommonDevice common, string typeTag)
        {
        }
        /// <summary>
        /// Changeds the IL ogic status.
        /// </summary>
        /// <param name="logic">Logic.</param>
        public void ChangedILogicStatus(ZigBee.Device.Logic logic)
        {
        }
        /// <summary>
        /// Changeds the IS cene status.
        /// </summary>
        /// <param name="scene">Scene.</param>
        public void ChangedISceneStatus(Scene scene)
        {
        }
        #endregion
    }
}