From a2927467ebfa938a420f392deb6882b35570fd33 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 01 十二月 2020 16:48:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/CJL-NEW'
---
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 205 insertions(+), 22 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index f7ff723..ffb66f9 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -13,13 +13,42 @@
/// </summary>
FrameLayout bodyView;
/// <summary>
+ /// 褰撳墠
+ /// </summary>
+ VerticalScrolViewLayout bodyScrolView;
+
+ /// <summary>
/// 澶村儚鍖哄煙
/// </summary>
FrameLayout headPortraitView;
/// <summary>
/// 澶村儚鎸夐挳
/// </summary>
- Button btnHeadPortraitView;
+ ImageView userHeadImageView;
+
+ #region 鍥炬爣閫夋嫨閮ㄥ垎鍥炬爣
+ /// <summary>
+ /// 鑳屾櫙鍥鹃�夐」鍖哄煙
+ /// </summary>
+ FrameLayout pictureOptionView;
+ /// <summary>
+ /// 鑳屾櫙鍥鹃�夐」閫夋嫨鍖哄煙
+ /// </summary>
+ VerticalScrolViewLayout optionView;
+ /// <summary>
+ /// 鎷嶇収鎸夐挳
+ /// </summary>
+ Button btnTakePicture;
+ /// <summary>
+ /// 鐩稿唽鎸夐挳
+ /// </summary>
+ Button btnAlbum;
+ /// <summary>
+ /// 鍙栨秷鎸夐挳
+ /// </summary>
+ Button btnCancel;
+ #endregion
+
#region 涓汉淇℃伅閫夐」鍖哄煙
/// <summary>
/// 涓汉淇℃伅閫夐」鍖哄煙
@@ -119,6 +148,7 @@
Button btnResetPasswordRight;
#endregion
#endregion
+
#endregion
#region 瑙i攣璁剧疆鍖哄煙
@@ -137,49 +167,77 @@
Button btnLogout;
#endregion
+ /// <summary>
+ /// 鏇存柊澶村儚鐨勫洖璋冨嚱鏁�
+ /// </summary>
+ Action updataHeadImage;
+ /// <summary>
+ /// 鏇存柊鐢ㄦ埛鍚嶇О鐨勫洖璋冨嚱鏁�
+ /// </summary>
+ Action updataUserName;
- public PersonalDataPage()
+ public PersonalDataPage(Action upHeadImage, Action upUserName)
{
+ updataHeadImage = upHeadImage;
+ updataUserName = upUserName;
bodyView = this;
}
public void LoadView()
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-
new TopViewDiv(bodyView, Language.StringByID(StringId.PersonalCenter)).LoadTopView();
- //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.PersonalCenter));
+
+ bodyScrolView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ VerticalScrollBarEnabled = false,
+ Height = Application.GetRealHeight(551),
+ };
+ bodyView.AddChidren(bodyScrolView);
+
+ if (MainPage.Increase)
+ {
+ bodyScrolView.Height = Application.GetRealHeight(541);
+ }
headPortraitView = new FrameLayout()
{
- Y = Application.GetRealHeight(64),
+ //Y = Application.GetRealHeight(64),
Height = Application.GetRealHeight(124),
BackgroundColor = CSS_Color.MainBackgroundColor,
};
- bodyView.AddChidren(headPortraitView);
- btnHeadPortraitView = new Button()
+ bodyScrolView.AddChidren(headPortraitView);
+
+ userHeadImageView = new ImageView()
{
Gravity = Gravity.Center,
Width = Application.GetMinRealAverage(84),
Height = Application.GetMinRealAverage(84),
Radius = (uint)Application.GetMinRealAverage(42),
- UnSelectedImagePath = "LoginIcon/2.png"
+ ImagePath = UserInfo.Current.headImagePagePath,
};
- headPortraitView.AddChidren(btnHeadPortraitView);
+ headPortraitView.AddChidren(userHeadImageView);
#region 涓汉淇℃伅閫夐」鍖哄煙
+ var topPaddingView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(8)
+ };
+ bodyScrolView.AddChidren(topPaddingView);
+
/// <summary>
/// 涓汉淇℃伅閫夐」鍖哄煙
/// </summary>
optionListView = new VerticalScrolViewLayout()
{
- Y = headPortraitView.Bottom + Application.GetRealHeight(8),
+ //Y = headPortraitView.Bottom + Application.GetRealHeight(8),
Height = Application.GetRealHeight(51 * 6),
BackgroundColor = CSS_Color.MainBackgroundColor,
ScrollEnabled = false,
};
- bodyView.AddChidren(optionListView);
+ bodyScrolView.AddChidren(optionListView);
#region 涓汉閫夐」-鍚嶅瓧鍖哄煙
/// <summary>
/// 涓汉閫夐」-鍚嶅瓧鍖哄煙
@@ -212,7 +270,7 @@
TextAlignment = TextAlignment.CenterRight,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.TextFontSize,
- Text = string.IsNullOrEmpty(MainPage.LoginUser.UserName) ? "涓嶆効鎰忛�忛湶濮撳悕鐨勭敤鎴�" : MainPage.LoginUser.UserName
+ Text = string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName
};
userNameView.AddChidren(btnUserName);
/// <summary>
@@ -258,8 +316,8 @@
{
X = Application.GetRealWidth(305),
Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
+ Width = Application.GetRealWidth(24),
+ Height = Application.GetRealWidth(24),
UnSelectedImagePath = "PersonalCenter/PersonalData/QRcodeIcon.png",
};
_QRcodeView.AddChidren(btnQRcodeIcon);
@@ -309,7 +367,7 @@
TextAlignment = TextAlignment.CenterRight,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.TextFontSize,
- Text = string.IsNullOrEmpty(MainPage.LoginUser.UserEmailInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.UserEmailInfo
+ Text = GetBindAccountText(UserInfo.Current.userEmailInfo)
};
userEmailInfoView.AddChidren(btnUserEmailInfo);
/// <summary>
@@ -358,7 +416,7 @@
TextAlignment = TextAlignment.CenterRight,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.TextFontSize,
- Text = string.IsNullOrEmpty(MainPage.LoginUser.UserMobileInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.UserMobileInfo
+ Text = GetBindAccountText(UserInfo.Current.userMobileInfo)
};
userPhoneInfoView.AddChidren(btnUserPhoneInfo);
/// <summary>
@@ -443,19 +501,22 @@
#endregion
#endregion
-
-
#region 瑙i攣璁剧疆鍖哄煙
+ var topPaddingView2 = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(8)
+ };
+ bodyScrolView.AddChidren(topPaddingView2);
/// <summary>
/// 瑙i攣璁剧疆鍖哄煙
/// </summary>
interpretationSettingsView = new FrameLayout()
{
- Y = optionListView.Bottom + Application.GetRealHeight(8),
+ //Y = optionListView.Bottom + Application.GetRealHeight(8),
BackgroundColor = CSS_Color.MainBackgroundColor,
- Height = Application.GetRealHeight(65),
+ Height = Application.GetRealHeight(66),
};
- bodyView.AddChidren(interpretationSettingsView);
+ bodyScrolView.AddChidren(interpretationSettingsView);
btnInterpretationSettingsTitle = new Button()
{
X = Application.GetRealWidth(16),
@@ -466,6 +527,7 @@
TextID = StringId.InterpretationSettings,
};
interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle);
+
btnInterpretationSettingsTip = new Button()
{
X = Application.GetRealWidth(16),
@@ -474,7 +536,7 @@
TextAlignment = TextAlignment.TopLeft,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.TextFontSize,
- TextID = StringId.InterpretationSettingsTip
+ TextID = StringId.AppUnlockSettingsTip
};
interpretationSettingsView.AddChidren(btnInterpretationSettingsTip);
@@ -487,6 +549,26 @@
UnSelectedImagePath = "Public/Right.png",
};
interpretationSettingsView.AddChidren(btnInterpretationSettingsRight);
+ interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height));
+ #endregion
+
+ #region 鏈嶅姟鍣ㄤ俊鎭�
+ ListCellView myServerInfoCellView = new ListCellView()
+ {
+ };
+ bodyScrolView.AddChidren(myServerInfoCellView);
+ //璺宠浆鏈嶅姟鍣ㄤ俊鎭�
+ Action selectAction = () =>
+ {
+ var myServerInfoPage = new MyServerInfoPage();
+ MainPage.BasePageView.AddChidren(myServerInfoPage);
+ myServerInfoPage.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ myServerInfoCellView.GoAction = selectAction;
+ myServerInfoCellView.BtnTilte.Text = Language.StringByID(StringId.ServerInformation);
+ myServerInfoCellView.LineView.RemoveFromParent();
+
#endregion
btnLogout = new Button()
@@ -501,9 +583,110 @@
};
bodyView.AddChidren(btnLogout);
+ if (MainPage.Increase)
+ {
+ btnLogout.Y = Application.GetRealHeight(613);
+ btnLogout.Height = Application.GetRealHeight(50);
+ bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor });
+ }
+
LoadEventList();
+
}
+ /// <summary>
+ /// 鍔犺浇鍥炬爣閫夋嫨閫夐」
+ /// </summary>
+ void LoadPictureOptionView()
+ {
+ var pictureBaseView = new FrameLayout()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+ bodyView.AddChidren(pictureBaseView);
+
+ pictureOptionView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(495),
+ AnimateSpeed = 0.3f,
+ Animate = Animate.DownToUp,
+ Height = Application.GetRealHeight(200),
+ };
+ pictureBaseView.AddChidren(pictureOptionView);
+
+
+ optionView = new VerticalScrolViewLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(100),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ ScrollEnabled = false,
+ };
+ pictureOptionView.AddChidren(optionView);
+
+ btnTakePicture = new Button()
+ {
+ Height = Application.GetRealHeight(50),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.TakePicture,
+ };
+ optionView.AddChidren(btnTakePicture);
+
+ optionView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+ btnAlbum = new Button()
+ {
+ Height = Application.GetRealHeight(50),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.TextualColor,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.Album,
+ };
+ optionView.AddChidren(btnAlbum);
+
+ optionView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+ btnCancel = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(8) + optionView.Bottom,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ TextID = StringId.Cancel,
+ TextColor = CSS_Color.WarningColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ };
+ pictureOptionView.AddChidren(btnCancel);
+
+ LoadEvent_PictureOptionViewEventList(pictureBaseView);
+ }
+
+ /// <summary>
+ /// 鑾峰彇缁戝畾璐﹀彿鏄剧ず鏂囨湰锛岀┖鐨勬椂鍊欐樉绀轰负鏈粦瀹�
+ /// </summary>
+ /// <param name="account"></param>
+ string GetBindAccountText(string account)
+ {
+ return string.IsNullOrEmpty(account) ? Language.StringByID(StringId.Unbound) : account;
+ }
+
+ /// <summary>
+ /// 鍒ゆ柇鏄惁涓烘湭缁戝畾
+ /// </summary>
+ /// <param name="account"></param>
+ /// <returns></returns>
+ bool CheckIfUnbound(string account)
+ {
+ return string.IsNullOrEmpty(account) || account == Language.StringByID(StringId.Unbound);
+ }
}
}
--
Gitblit v1.8.0