From bd46c57c77c276014db3192a4e2cc96e23c93202 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 21 二月 2020 13:08:47 +0800
Subject: [PATCH] 先上传个版本吧
---
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs | 47 ++++++++++++++++++++++++++++++++++++++---------
1 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
index 0b8607f..382f98c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -121,7 +121,7 @@
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
{
@@ -139,7 +139,7 @@
btnAuthority.TextSize = 12;
btnAuthority.Y = btnUserIcon.Bottom + Application.GetRealHeight(23);
btnAuthority.Gravity = Gravity.CenterHorizontal;
- btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor;
+ btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor1;
btnAuthority.TextID = R.MyInternationalizationString.uMember;
if (memberInfo.AccountType == 1)
{
@@ -159,7 +159,7 @@
private void InitInfoList()
{
//鏍囬:鎴愬憳鏉冮檺
- var btnMenberTile = new DetailTitleControl(800, 60, true);
+ var btnMenberTile = new NormalViewControl(800, 60, true);
btnMenberTile.X = ControlCommonResourse.XXLeft;
btnMenberTile.Y = Application.GetRealHeight(418);
btnMenberTile.TextColor = UserCenterColor.Current.TextColor2;
@@ -191,9 +191,9 @@
this.AddShardContentRow(rowShard);
//涓�鏃︾Щ闄よ瀹跺涵鎴愬憳锛屼粬/濂瑰皢鏃犳硶浣跨敤璇ョ綉鍏充笅鎵�缁戝畾鐨勮澶�
- var btnNote1 = new NormalViewControl(613, 98, true);
- btnNote1.X = Application.GetRealWidth(246);
- btnNote1.Y = Application.GetRealHeight(1328);
+ var btnNote1 = new NormalViewControl(613, 100, true);
+ btnNote1.X = Application.GetRealWidth(248);
+ btnNote1.Y = Application.GetRealHeight(1327);
btnNote1.TextSize = 12;
btnNote1.TextID = R.MyInternationalizationString.RemoveMenberAndDonotUserBindGatewayDevice;
btnNote1.IsMoreLines = true;
@@ -203,7 +203,7 @@
var btnIcon = new IconViewControl(58);
btnIcon.X = Application.GetRealWidth(167);
- btnIcon.Y = Application.GetRealHeight(1328);
+ btnIcon.Y = btnNote1.Y;
btnIcon.UnSelectedImagePath = "Item/Tips.png";
bodyFrameLayout.AddChidren(btnIcon);
@@ -245,9 +245,38 @@
//寮�鍏�
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();
@@ -405,7 +434,7 @@
Shared.IO.FileUtils.WriteFileByBytes(iconPath, infoResult.HeadImage);
HdlThreadLogic.Current.RunMain(() =>
{
- btnUserIcon.ImagePath = iconPath;
+ btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
});
}
});
--
Gitblit v1.8.0