| | |
| | | using System; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI2 |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class PersonalDataPage : FrameLayout |
| | | public partial class PersonalDataPage : FrameLayout |
| | | { |
| | | #region 控件列表 |
| | | /// <summary> |
| | |
| | | /// 头像区域 |
| | | /// </summary> |
| | | FrameLayout headPortraitView; |
| | | /// <summary> |
| | | /// 头像按钮 |
| | | /// </summary> |
| | | Button btnHeadPortraitView; |
| | | #region 个人信息选项区域 |
| | | /// <summary> |
| | | /// 个人信息选项区域 |
| | | /// </summary> |
| | | VerticalScrolViewLayout optionListView; |
| | | #region 个人选项-名字区域 |
| | | /// <summary> |
| | | /// 个人选项-名字区域 |
| | | /// </summary> |
| | | FrameLayout userNameView; |
| | | /// <summary> |
| | | /// 用户名称标题 |
| | | /// </summary> |
| | | Button btnUserName; |
| | | /// <summary> |
| | | /// 用户名称 |
| | | /// </summary> |
| | | EditText etUserName; |
| | | /// <summary> |
| | | /// 修改用户名称按钮 |
| | | /// </summary> |
| | | Button btnEditUserNameIcon; |
| | | #endregion |
| | | #region 个人选项-二维码区域 |
| | | /// <summary> |
| | | /// 个人选项-二维码区域 |
| | | /// </summary> |
| | | FrameLayout _QRcodeView; |
| | | /// <summary> |
| | | /// 用户二维码标题 |
| | | /// </summary> |
| | | Button btnQRcode; |
| | | /// <summary> |
| | | /// 二维码图标 |
| | | /// </summary> |
| | | Button btnQRcodeIcon; |
| | | /// <summary> |
| | | /// 二维码前进图标 |
| | | /// </summary> |
| | | Button btnQRcodeRight; |
| | | #endregion |
| | | #region 个人选项-邮箱信息区域 |
| | | /// <summary> |
| | | /// 个人选项-邮箱信息区域 |
| | | /// </summary> |
| | | FrameLayout userEmailInfoView; |
| | | /// <summary> |
| | | /// 用户邮箱信息标题 |
| | | /// </summary> |
| | | Button btnUserEmailTilte; |
| | | /// <summary> |
| | | /// 用户邮箱信息 |
| | | /// </summary> |
| | | Button btnUserEmailInfo; |
| | | /// <summary> |
| | | /// 用户邮箱信息前进图标 |
| | | /// </summary> |
| | | Button btnUserEmailRight; |
| | | #endregion |
| | | #region 个人选项-手机信息区域 |
| | | /// <summary> |
| | | /// 个人选项-手机信息区域 |
| | | /// </summary> |
| | | FrameLayout userPhoneInfoView; |
| | | /// <summary> |
| | | /// 用户手机信息 |
| | | /// </summary> |
| | | Button btnUserPhoneTitle; |
| | | /// <summary> |
| | | /// 用户手机信息 |
| | | /// </summary> |
| | | Button btnUserPhoneInfo; |
| | | /// <summary> |
| | | /// 用户手机信息前进图标 |
| | | /// </summary> |
| | | Button btnUserPhoneRight; |
| | | #endregion |
| | | #region 个人选项-第三方授权区域 |
| | | /// <summary> |
| | | /// 个人选项-第三方授权区域 |
| | | /// </summary> |
| | | FrameLayout thirdPartyAuthorizationView; |
| | | /// <summary> |
| | | /// 第三方授权文本提示信息按钮 |
| | | /// </summary> |
| | | Button btnThirdPartyAuthorizationTitle; |
| | | Button btnThirdPartyAuthorizationRight; |
| | | #region 个人选项-修改登录密码区域 |
| | | /// <summary> |
| | | /// 个人选项-修改登录密码区域 |
| | | /// </summary> |
| | | FrameLayout resetPasswordView; |
| | | /// <summary> |
| | | /// 修改登录密码提示文本 |
| | | /// </summary> |
| | | Button btnResetPasswordText; |
| | | Button btnResetPasswordRight; |
| | | #endregion |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 解锁设置区域 |
| | | /// <summary> |
| | | /// 解锁设置区域 |
| | | /// </summary> |
| | | FrameLayout interpretationSettingsView; |
| | | Button btnInterpretationSettingsTitle; |
| | | Button btnInterpretationSettingsTip; |
| | | Button btnInterpretationSettingsRight; |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 退出登录按钮 |
| | | /// </summary> |
| | | Button btnLogout; |
| | | |
| | | #endregion |
| | | |
| | | public PersonalDataPage() |
| | |
| | | |
| | | public void LoadView() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(InternationalizationString.PersonalCenter)); |
| | | |
| | | headPortraitView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(124) |
| | | Height = Application.GetRealHeight(124), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(headPortraitView); |
| | | |
| | | btnHeadPortraitView = new Button(){ |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetMinRealAverage(84), |
| | | Height = Application.GetMinRealAverage(84), |
| | | Radius = (uint)Application.GetMinRealAverage(42), |
| | | UnSelectedImagePath = "LoginIcon/2.png" |
| | | }; |
| | | headPortraitView.AddChidren(btnHeadPortraitView); |
| | | |
| | | #region 个人信息选项区域 |
| | | /// <summary> |
| | | /// 个人信息选项区域 |
| | | /// </summary> |
| | | optionListView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = headPortraitView.Bottom+ Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(45*6), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | ScrollEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(optionListView); |
| | | #region 个人选项-名字区域 |
| | | /// <summary> |
| | | /// 个人选项-名字区域 |
| | | /// </summary> |
| | | userNameView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | optionListView.AddChidren(userNameView); |
| | | /// <summary> |
| | | /// 用户名称标题 |
| | | /// </summary> |
| | | btnUserName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.Name, |
| | | }; |
| | | userNameView.AddChidren(btnUserName); |
| | | /// <summary> |
| | | /// 用户名称 |
| | | /// </summary> |
| | | etUserName = new EditText() |
| | | { |
| | | X = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(230), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = string.IsNullOrEmpty(MainPage.LoginUser.UserName) ? "不愿意透露姓名的用户" : MainPage.LoginUser.UserName |
| | | }; |
| | | userNameView.AddChidren(etUserName); |
| | | /// <summary> |
| | | /// 修改用户名称按钮 |
| | | /// </summary> |
| | | btnEditUserNameIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(333), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/EditIcon.png", |
| | | }; |
| | | userNameView.AddChidren(btnEditUserNameIcon); |
| | | optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16),Height = Application.GetRealHeight(1) ,Width = Application.GetRealWidth(343),BackgroundColor = CSS_Color.DividingLineColor}); |
| | | #endregion |
| | | #region 个人选项-二维码区域 |
| | | /// <summary> |
| | | /// 个人选项-二维码区域 |
| | | /// </summary> |
| | | _QRcodeView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | optionListView.AddChidren(_QRcodeView); |
| | | /// <summary> |
| | | /// 用户二维码标题 |
| | | /// </summary> |
| | | btnQRcode = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.MyQRcode, |
| | | }; |
| | | _QRcodeView.AddChidren(btnQRcode); |
| | | /// <summary> |
| | | /// 二维码图标 |
| | | /// </summary> |
| | | btnQRcodeIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(305), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/QRcodeIcon.png", |
| | | }; |
| | | _QRcodeView.AddChidren(btnQRcodeIcon); |
| | | optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16),Height = Application.GetRealHeight(1) ,Width = Application.GetRealWidth(343),BackgroundColor = CSS_Color.DividingLineColor}); |
| | | /// <summary> |
| | | /// 二维码前进图标 |
| | | /// </summary> |
| | | btnQRcodeRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/Right.png", |
| | | }; |
| | | _QRcodeView.AddChidren(btnQRcodeRight); |
| | | #endregion |
| | | #region 个人选项-邮箱信息区域 |
| | | /// <summary> |
| | | /// 个人选项-邮箱信息区域 |
| | | /// </summary> |
| | | userEmailInfoView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | optionListView.AddChidren(userEmailInfoView); |
| | | /// <summary> |
| | | /// 用户邮箱信息 |
| | | /// </summary> |
| | | btnUserEmailTilte = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.BoundEmailInfo, |
| | | }; |
| | | userEmailInfoView.AddChidren(btnUserEmailTilte); |
| | | /// <summary> |
| | | /// 用户邮箱信息 |
| | | /// </summary> |
| | | btnUserEmailInfo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(230), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = string.IsNullOrEmpty(MainPage.LoginUser.UserEmailInfo )?Language.StringByID(InternationalizationString.Unbound):MainPage.LoginUser.UserEmailInfo |
| | | }; |
| | | userEmailInfoView.AddChidren(btnUserEmailInfo); |
| | | /// <summary> |
| | | /// 用户邮箱信息前进图标 |
| | | /// </summary> |
| | | btnUserEmailRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/Right.png", |
| | | }; |
| | | userEmailInfoView.AddChidren(btnUserEmailRight); |
| | | optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16),Height = Application.GetRealHeight(1) ,Width = Application.GetRealWidth(343),BackgroundColor = CSS_Color.DividingLineColor}); |
| | | #endregion |
| | | #region 个人选项-手机信息区域 |
| | | /// <summary> |
| | | /// 个人选项-手机信息区域 |
| | | /// </summary> |
| | | userPhoneInfoView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | optionListView.AddChidren(userPhoneInfoView); |
| | | /// <summary> |
| | | /// 用户手机信息 |
| | | /// </summary> |
| | | btnUserPhoneTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.BoundMobileInfo, |
| | | }; |
| | | userPhoneInfoView.AddChidren(btnUserPhoneTitle); |
| | | /// <summary> |
| | | /// 用户手机信息 |
| | | /// </summary> |
| | | btnUserPhoneInfo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(230), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = string.IsNullOrEmpty(MainPage.LoginUser.UserMobileInfo) ? Language.StringByID(InternationalizationString.Unbound) : MainPage.LoginUser.UserMobileInfo |
| | | }; |
| | | userPhoneInfoView.AddChidren(btnUserPhoneInfo); |
| | | /// <summary> |
| | | /// 用户手机信息前进图标 |
| | | /// </summary> |
| | | btnUserPhoneRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/Right.png", |
| | | }; |
| | | userPhoneInfoView.AddChidren(btnUserPhoneRight); |
| | | optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16),Height = Application.GetRealHeight(1) ,Width = Application.GetRealWidth(343),BackgroundColor = CSS_Color.DividingLineColor}); |
| | | #endregion |
| | | #region 个人选项-第三方授权区域 |
| | | /// <summary> |
| | | /// 个人选项-第三方授权区域 |
| | | /// </summary> |
| | | thirdPartyAuthorizationView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | optionListView.AddChidren(thirdPartyAuthorizationView); |
| | | /// <summary> |
| | | /// 第三方授权文本提示信息按钮 |
| | | /// </summary> |
| | | btnThirdPartyAuthorizationTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.ThirdPartyAuthorization, |
| | | }; |
| | | thirdPartyAuthorizationView.AddChidren(btnThirdPartyAuthorizationTitle); |
| | | btnThirdPartyAuthorizationRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/Right.png", |
| | | }; |
| | | thirdPartyAuthorizationView.AddChidren(btnThirdPartyAuthorizationRight); |
| | | optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16),Height = Application.GetRealHeight(1) ,Width = Application.GetRealWidth(343),BackgroundColor = CSS_Color.DividingLineColor}); |
| | | #endregion |
| | | #region 个人选项-修改登录密码区域 |
| | | /// <summary> |
| | | /// 个人选项-修改登录密码区域 |
| | | /// </summary> |
| | | resetPasswordView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | optionListView.AddChidren(resetPasswordView); |
| | | /// <summary> |
| | | /// 修改登录密码提示文本 |
| | | /// </summary> |
| | | btnResetPasswordText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.ChangeLoginPassword, |
| | | }; |
| | | resetPasswordView.AddChidren(btnResetPasswordText); |
| | | btnResetPasswordRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/Right.png", |
| | | }; |
| | | resetPasswordView.AddChidren(btnResetPasswordRight); |
| | | optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16),Height = Application.GetRealHeight(1) ,Width = Application.GetRealWidth(343),BackgroundColor = CSS_Color.DividingLineColor}); |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region 解锁设置区域 |
| | | /// <summary> |
| | | /// 解锁设置区域 |
| | | /// </summary> |
| | | interpretationSettingsView = new FrameLayout() |
| | | { |
| | | Y = optionListView.Bottom + Application.GetRealHeight(8), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Height = Application.GetRealHeight(65), |
| | | }; |
| | | bodyView.AddChidren(interpretationSettingsView); |
| | | btnInterpretationSettingsTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Height = Application.GetRealHeight(32), |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = InternationalizationString.InterpretationSettings, |
| | | }; |
| | | interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle); |
| | | btnInterpretationSettingsTip = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnInterpretationSettingsTitle.Bottom + Application.GetRealHeight(4), |
| | | Height = Application.GetRealHeight(32), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextID = InternationalizationString.InterpretationSettingsTip |
| | | }; |
| | | interpretationSettingsView.AddChidren(btnInterpretationSettingsTip); |
| | | |
| | | btnInterpretationSettingsRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "PersonalCenter/PersonalData/Right.png", |
| | | }; |
| | | interpretationSettingsView.AddChidren(btnInterpretationSettingsRight); |
| | | #endregion |
| | | |
| | | btnLogout = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(623), |
| | | Height = Application.GetRealHeight(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.AuxiliaryColor2, |
| | | TextID = InternationalizationString.Logout, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(btnLogout); |
| | | |
| | | LoadEventList(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |