Пример #1
0
 /// <summary>
 /// Fired when the user is updated
 /// </summary>
 private async void UserMan_OnUserUpdated(object sender, UserUpdatedArgs args)
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         UpdateAccount();
     });
 }
Пример #2
0
 /// <summary>
 ///     Fired when the current user is updated.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void OnUserUpdated(object sender, UserUpdatedArgs args)
 {
     // If a user is added or removed update the subreddit to reflect the new user.
     if (args.Action != UserCallbackAction.Updated)
     {
         Update(true);
     }
 }
Пример #3
0
        public void UpdateSuccess(object sender, UserUpdatedArgs e)
        {
            string identityId = _signInManager.UserManager.GetUserId(User);

            UserInformationDto = _userInformation.GetUserProfileInformationAsync(identityId).Result;
            EthnicityOptions   = _ethnicityInformation.GetEthnicities().Select(x => new SelectListItem
            {
                Text  = x.Name,
                Value = x.Id + ""
            }).ToList().Result;

            TempData[MessageKey] = "Update success!";
        }
Пример #4
0
        private void OnUserUpdated(object sender, UserUpdatedArgs e)
        {
            switch (e.Action)
            {
            // If the user is now signed in update.
            case UserCallbackAction.Added:
                Update();
                break;

            case UserCallbackAction.Removed:
                // If the user is logged out clear out the message ui.
                UpdateMessageCounts(new List <Message>(), true);
                break;

            case UserCallbackAction.Updated:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Пример #5
0
 protected virtual void OnUserUpdated(UserUpdatedArgs e) => UserUpdated?.Invoke(this, e);