From 2be70a32d2a8c517bd9868fb60913fcc843e66fe Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 13 五月 2020 11:21:32 +0800
Subject: [PATCH] 上传代码
---
ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs | 44 ++++++++++++++++++++++++++++++++------------
1 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index a19f778..0f13170 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -59,8 +59,7 @@
//body鍗犲畬鏁翠釜灞忓箷,闄や簡搴曢儴鑿滃崟
bodyFrameLayout.Y = 0;
- bodyFrameLayout.Height = ControlCommonResourse.TopMenuFrameHeight + ControlCommonResourse.TopFrameHeight
- + ControlCommonResourse.BodyFrameHeight - ControlCommonResourse.BottomFrameHeight;
+ bodyFrameLayout.Height = this.Height;
bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BlackBackGround;
//鍒濆鍖栦腑閮ㄦ帶浠�
@@ -132,18 +131,31 @@
{
//鐢ㄦ埛澶村儚
this.btnUserIcon = new ImageView();
- btnUserIcon.Height = Application.GetMinRealAverage(280);
- btnUserIcon.Width = Application.GetMinRealAverage(280);
- btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
+ btnUserIcon.Height = this.GetPictrueRealSize(280);
+ btnUserIcon.Width = this.GetPictrueRealSize(280);
+ btnUserIcon.Radius = (uint)this.GetPictrueRealSize(280) / 2;
btnUserIcon.X = Application.GetRealWidth(121);
- btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+ if (Common.Config.Instance.Home.IsVirtually == false)
+ {
+ btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+ }
+ else
+ {
+ btnUserIcon.ImagePath = "Account/Cat.png";
+ }
bodyFrameLayout.AddChidren(btnUserIcon);
btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
btnUserIcon.MouseUpEventHandler += (sender, e) =>
{
if (Common.Config.Instance.Home.IsVirtually == true)
{
- //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ユ彁绀�:纭畾閫�鍑哄綋鍓嶈处鍙凤紵
+ string msg = Language.StringByID(R.MyInternationalizationString.uLogoutAccountMsg);
+ this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+ {
+ //閫�鍑鸿处鍙�
+ UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
+ });
return;
}
var form = new UserInformationForm();
@@ -254,7 +266,7 @@
{
if (Common.Config.Instance.Home.IsVirtually == true)
{
- //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
return;
}
var form = new Member.MemberListForm();
@@ -272,13 +284,16 @@
frame.ButtonClickEvent += (sender, e) =>
{
HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
- if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false)
+ //鎷ユ湁缃戝叧,鎴栬�呮槸铏氭嫙浣忓畢,鍒欒繘鍏ヨ澶囧垪琛ㄧ晫闈�
+ if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false
+ || Common.Config.Instance.Home.IsVirtually == true)
{
var form = new Device.DeviceListMainForm();
form.AddForm();
}
else
{
+ //娌℃湁缃戝叧,鍒欒繘鍏ョ綉鍏冲垪琛ㄧ晫闈�
var form = new GatewayManage.GatewayListForm();
form.AddForm();
}
@@ -312,7 +327,7 @@
{
if (Common.Config.Instance.Home.IsVirtually == true)
{
- //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
return;
}
var form = new Safety.SafetyManagementMainForm();
@@ -405,7 +420,7 @@
{
if (Common.Config.Instance.Home.IsVirtually == true)
{
- //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
return;
}
var form = new HdlBackup.HdlBackupListForm();
@@ -455,7 +470,7 @@
{
if (Common.Config.Instance.Home.IsVirtually == true)
{
- //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
return;
}
var form = new Abount.AbountForm();
@@ -497,6 +512,11 @@
/// </summary>
public override int FormActionAgainEvent()
{
+ //铏氭嫙浣忓畢涓嶉渶瑕佸埛鏂�
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ return -1;
+ }
//鐢ㄦ埛澶村儚
if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
{
--
Gitblit v1.8.0