黄学彪
2019-12-12 7e863a33397f317ffc3ffd9288496d0e4f16aa66
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -245,9 +245,37 @@
            //开关
            var btnSwitch = row.AddMostRightSwitchIcon();
            if (this.memberInfo.IsAllowRemoteCtrl == true)
            {
                btnSwitch.IsSelected = true;
            }
            btnSwitch.ButtonClickEvent += (sender, e) =>
            {
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                HdlThreadLogic.Current.RunThread(async () =>
                {
                    var pra = new
                    {
                        HouseDistributedMark = Common.Config.Instance.Home.Id,
                        DistributedMark = this.memberInfo.DistributedMark,
                        IsAllowRemoteCtrl = !btnSwitch.IsSelected,
                        IsOtherAccountCtrl = Common.Config.Instance.isAdministrator
                    };
                    //打开进度条
                    this.ShowProgressBar();
                    var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ChangeSubAccountIsAllowRemoteCtrl", true, pra);
                    //关闭进度条
                    this.CloseProgressBar();
                    if (result == false)
                    {
                        return;
                    }
                    Application.RunOnMainThread(() =>
                    {
                        btnSwitch.IsSelected = !btnSwitch.IsSelected;
                    });
                });
            };
            //底线
            row.AddBottomLine();