From 7167334c0e89dd84827d59e726123d14776e3a09 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 16 六月 2020 11:14:13 +0800 Subject: [PATCH] 2020-06-16-1 --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 150 +++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 135 insertions(+), 15 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs index f7ff723..7cac284 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs @@ -19,7 +19,34 @@ /// <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> /// 涓汉淇℃伅閫夐」鍖哄煙 @@ -137,18 +164,26 @@ 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)); headPortraitView = new FrameLayout() { @@ -158,15 +193,15 @@ }; bodyView.AddChidren(headPortraitView); - btnHeadPortraitView = new Button() + userHeadImageView = new ImageView() { Gravity = Gravity.Center, Width = Application.GetMinRealAverage(84), Height = Application.GetMinRealAverage(84), Radius = (uint)Application.GetMinRealAverage(42), - UnSelectedImagePath = "LoginIcon/2.png" + ImagePath = MainPage.LoginUser.headImagePagePath, }; - headPortraitView.AddChidren(btnHeadPortraitView); + headPortraitView.AddChidren(userHeadImageView); #region 涓汉淇℃伅閫夐」鍖哄煙 /// <summary> @@ -212,7 +247,7 @@ TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, - Text = string.IsNullOrEmpty(MainPage.LoginUser.UserName) ? "涓嶆効鎰忛�忛湶濮撳悕鐨勭敤鎴�" : MainPage.LoginUser.UserName + Text = string.IsNullOrEmpty(MainPage.LoginUser.userName) ? "涓嶆効鎰忛�忛湶濮撳悕鐨勭敤鎴�" : MainPage.LoginUser.userName }; userNameView.AddChidren(btnUserName); /// <summary> @@ -258,8 +293,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 +344,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 = string.IsNullOrEmpty(MainPage.LoginUser.userEmailInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.userEmailInfo }; userEmailInfoView.AddChidren(btnUserEmailInfo); /// <summary> @@ -358,7 +393,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 = string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.userMobileInfo }; userPhoneInfoView.AddChidren(btnUserPhoneInfo); /// <summary> @@ -443,8 +478,6 @@ #endregion #endregion - - #region 瑙i攣璁剧疆鍖哄煙 /// <summary> /// 瑙i攣璁剧疆鍖哄煙 @@ -474,7 +507,7 @@ TextAlignment = TextAlignment.TopLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.InterpretationSettingsTip + TextID = StringId.AppUnlockSettingsTip }; interpretationSettingsView.AddChidren(btnInterpretationSettingsTip); @@ -501,9 +534,96 @@ }; 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() + { + pictureOptionView = new FrameLayout() + { + BackgroundColor = CSS_Color.DialogTransparentColor1, + }; + bodyView.AddChidren(pictureOptionView); + + optionView = new VerticalScrolViewLayout() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(495), + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(100), + BackgroundColor = CSS_Color.MainBackgroundColor, + Radius = (uint)Application.GetRealWidth(12), + Animate = Animate.DownToUp, + }; + pictureOptionView.AddChidren(optionView); + + //btnDefaultGallery = new Button() + //{ + // Height = Application.GetRealHeight(50), + // TextAlignment = TextAlignment.Center, + // TextColor = CSS_Color.TextualColor, + // SelectedTextColor = CSS_Color.MainColor, + // TextSize = CSS_FontSize.SubheadingFontSize, + // TextID = StringId.DefaultGallery, + //}; + //optionView.AddChidren(btnDefaultGallery); + //optionView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); + + 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(6), + TextID = StringId.Cancel, + TextColor = CSS_Color.WarningColor, + Animate = Animate.DownToUp + }; + pictureOptionView.AddChidren(btnCancel); + + + LoadEvent_PictureOptionViewEventList(); + } + } } -- Gitblit v1.8.0