| | |
| | | btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
|
| | | if (System.IO.File.Exists(iconPath) == true)
|
| | | {
|
| | | btnUserIcon.ImagePath = iconPath;
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | //开关
|
| | | 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
|
| | | };
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ChangeSubAccountIsAllowRemoteCtrl", false, pra);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | this.memberInfo.IsAllowRemoteCtrl = !btnSwitch.IsSelected;
|
| | |
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected;
|
| | | });
|
| | | });
|
| | | |
| | | };
|
| | | //底线
|
| | | row.AddBottomLine();
|
| | |
| | | Shared.IO.FileUtils.WriteFileByBytes(iconPath, infoResult.HeadImage);
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | btnUserIcon.ImagePath = iconPath;
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
|
| | | });
|
| | | }
|
| | | });
|