public ProfileEventArgs(Profile UserProfile)
 {
     this.UserProfile = UserProfile;
 }
        public void UserProfileEvent(object sender, ProfileEventArgs e)
        {
            DialogHelper.Close();

            switch (e.RequestCode)
            {
                case ProfileProvider.RC_GET_PROFILE:
                    if (e.IsSuccess)
                    {
                        UserProfile = e.UserProfile;
                        MainViewModel.UserProfile = UserProfile;
                    }
                    break;
                default:
                    if (e.IsSuccess)
                    {
                        MainViewModel.UserProfile = UserProfile;
                        // Reset the secure field
                        ResetPasswordViewCommand.Execute(null);
                        // Notice the result
                        DialogHelper.Show("更新完成");
                    } else
                    {
                        DialogHelper.ShowError("更新失败,请稍后重试", e.ErrorMessage == null ? null :
                            e.ErrorMessage.ToArray());
                    }
                    break;
            }
        }