public void LogOut()
 {
     _user.ResetUserModel();                   //clears information
     _apiHelper.LogOffUser();                  //clears out the header
     ActivateItem(IoC.Get <LoginViewModel>()); // login view models is per request. IOC is in version control , calibrurn micro biring in . which allows the contrainer to get instances.
     NotifyOfPropertyChange(() => IsLoggedIn);
 }
 public void LogOut()
 {
     _user.ResetUserModel();
     _aPIHelper.LogOffUser();
     ActivateItem(IoC.Get <LoginViewModel>());
     NotifyOfPropertyChange(() => IsLoggedIn);
 }
 public void LogOut()
 {
     _user.ResetUserModel();
     _apiHelper.LogOffUser();
     ActivateItem(IoC.Get <LoginViewModel>());
     NotifyOfPropertyChange(() => IsAccountVisible);
 }
 public async Task LogOut()
 {
     _user.ResetUserModel();
     _apiHelper.LogOffUser();
     NotifyOfPropertyChange(() => IsLoggedIn);
     await ActivateItemAsync(IoC.Get <LoginViewModel>(), new CancellationToken());
 }
 public void LogOut()
 {
     loggedOnUser.ResetUserModel();
     aPIHelper.LogOffUser();
     NotifyOfPropertyChange(() => IsLoggedIn);
     ActivateItem(SimpleContainer.GetInstance <LoginViewModel>());
 }
        /// <summary>
        /// Logs user out
        /// </summary>
        public void LogOut()
        {
            _user.ResetUserModel();                   //reset user model
            _apiHelper.LogOffUser();
            ActivateItem(IoC.Get <LoginViewModel>()); //Display the login page

            NotifyOfPropertyChange(() => IsLoggedIn);
        }
Exemple #7
0
        public void LogOut()
        {
            // Reset login credentials
            UserHelper.ResetUserModel(_loggedInUserModel);
            _apiHelper.LogOffUser(); // We need to clear the request header from all the authorization info after user logs out
            // Starts LoginView, and since its not a singleton we get a fresh instance
            ActivateItem(IoC.Get <LoginViewModel>());

            NotifyOfPropertyChange(() => IsAccountVisible);
        }
Exemple #8
0
        private void LogOut()
        {
            _loggedUser.LogOffUser();
            _apiHelper.LogOffUser();
            SecureStorage.RemoveAll();
            MessagingService.Current.SendMessage(EventMessages.LogOffEvent);

            OnPropertyChanged(nameof(Logged));

            NotLoggedMenu();
            SelectedItem = MenuItems.Where(x => x.Id == MenuItemType.Login).FirstOrDefault();
        }
        public async Task HandleAsync(LogInOutEvent message, CancellationToken cancellationToken)
        {
            if (message.IsLogin)
            {
                await ActivateItemAsync(IoC.Get <HomeViewModel>(), cancellationToken);
            }
            else
            {
                await CloseAllModules();

                _user.ResetUserModel();
                _apiHelper.LogOffUser();
                await ActivateItemAsync(IoC.Get <LoginViewModel>(), cancellationToken);
            }
        }