Exemplo n.º 1
0
        private async Task LoginActionAsync()
        {
            if (await LogInUserAsync())
            {
                //Display Edit UserInfos
                await EditUserProfileViewModel.ShowAsync(UserData.Instance.UserInfo.UserId, false, this);

                CloseViewModel();
            }
        }
Exemplo n.º 2
0
 private async Task EditUserProfileActionAsync()
 {
     try
     {
         await EditUserProfileViewModel.ShowAsync(UserData.Instance.UserInfo.UserId, true, this);
     }
     catch (Exception except)
     {
         ILogger.Instance.Error("Unable to edit user profile", except);
     }
 }
Exemplo n.º 3
0
        public static async Task <bool> ShowAsync(string userId, bool allowCancelViewModel, BaseViewModel parent = null)
        {
            var viewModel = new EditUserProfileViewModel();

            viewModel._userId = userId;
            viewModel._allowCancelViewModel = allowCancelViewModel;
            if (!await viewModel.PreLoadDataAsync())
            {
                var userDialog = Resolver.Resolve <IUserDialogs>();
                await userDialog.AlertAsync(Translation.Get(TRS.CONNECTION_FAILED), Translation.Get(TRS.ERROR), Translation.Get(TRS.OK));

                return(false);
            }
            return(await ShowModalViewModelAsync(viewModel, parent, false));
        }