From caf9d97d5c445fa459b777c5569625bbfd0ff5fc Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 07 五月 2020 09:29:53 +0800
Subject: [PATCH] 2020-05-07-1
---
ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
old mode 100644
new mode 100755
index 62a7bb9..ee92d35
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -42,6 +42,7 @@
#endregion
#region 鈻� 鍒濆鍖朹____________________________
+
/// <summary>
/// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓),
/// 娉ㄦ剰锛氬洜涓哄闈㈢殑妗嗘灦闂锛屽湪澶栭潰涓嶈兘浣跨敤搴曞眰鐨勬柟娉�
@@ -131,15 +132,33 @@
{
//鐢ㄦ埛澶村儚
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();
form.AddForm();
};
@@ -246,6 +265,11 @@
var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
frame.ButtonClickEvent += (sender, e) =>
{
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ return;
+ }
var form = new Member.MemberListForm();
form.AddForm();
};
@@ -261,13 +285,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();
}
@@ -299,6 +326,11 @@
var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
frame.ButtonClickEvent += (sender, e) =>
{
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ return;
+ }
var form = new Safety.SafetyManagementMainForm();
form.AddForm();
};
@@ -387,6 +419,11 @@
btnBackView.X -= ControlCommonResourse.XXLeft / 2;
rowback.ButtonClickEvent += (sender, e) =>
{
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ return;
+ }
var form = new HdlBackup.HdlBackupListForm();
form.AddForm();
};
@@ -432,6 +469,11 @@
btnAbountView.X -= ControlCommonResourse.XXLeft / 2;
rowAbount.ButtonClickEvent += (sender, e) =>
{
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ return;
+ }
var form = new Abount.AbountForm();
form.AddForm();
};
@@ -471,6 +513,11 @@
/// </summary>
public override int FormActionAgainEvent()
{
+ //铏氭嫙浣忓畢涓嶉渶瑕佸埛鏂�
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ return -1;
+ }
//鐢ㄦ埛澶村儚
if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
{
--
Gitblit v1.8.0