| | |
| | | var etCurPassword = new EditText () { |
| | | Width = Application.GetRealWidth (400), |
| | | X = Application.GetRealWidth (100), |
| | | PlaceholderText = Language.StringByID (R.MyInternationalizationString.PleaseEnterOldPassword), |
| | | PlaceholderTextColor = SkinStyle.Current.PlaceholderTextColor, |
| | | PlaceholderText = Language.StringByID (R.MyInternationalizationString.PleaseEnterOldPassword), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | SecureTextEntry = true, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | |
| | | var etNewPassword = new EditText () { |
| | | Width = Application.GetRealWidth (400), |
| | | X = Application.GetRealWidth (100), |
| | | PlaceholderText = Language.StringByID (R.MyInternationalizationString.PleaseSetNewPasword), |
| | | PlaceholderTextColor = SkinStyle.Current.PlaceholderTextColor, |
| | | PlaceholderText = Language.StringByID (R.MyInternationalizationString.PleaseSetNewPasword), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | | SecureTextEntry = true |
| | |
| | | Width = Application.GetRealWidth (400), |
| | | Height = Application.GetRealHeight (90), |
| | | X = Application.GetRealWidth (100), |
| | | PlaceholderText = Language.StringByID (R.MyInternationalizationString.PleaseConfirmNewPassword), |
| | | PlaceholderTextColor = SkinStyle.Current.PlaceholderTextColor, |
| | | PlaceholderText = Language.StringByID (R.MyInternationalizationString.PleaseConfirmNewPassword), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | | SecureTextEntry = true |
| | |
| | | try { |
| | | var requestObj = new UpdatePasswordObj () { OldPassword = oldPassword, NewPassword = newPassword }; |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); |
| | | var revertObj = MainPage.RequestHttps (API.UpdatePassword, requestJson, true); |
| | | var revertObj = MainPage.RequestHttps (API.UpdatePassword, requestJson); |
| | | if (revertObj.StateCode.ToUpper() == "SUCCESS") { |
| | | MainPage.LoginUser.Password = newPassword; |
| | | MainPage.LoginUser.SaveUserInfo (); |