private async Task <AccountStatus> VerifyNewKeyShareStatus() { await _viewModel.UpdateNewKeyShareStatus.ExecuteAsync(null); AccountStatus sharedUserAccountStatus = _viewModel.NewKeyShareStatus; if (sharedUserAccountStatus == AccountStatus.Offline) { SetOfflineError(); return(sharedUserAccountStatus); } if (sharedUserAccountStatus != AccountStatus.NotFound) { return(sharedUserAccountStatus); } using (KeySharingInviteUserDialog inviteDialog = new KeySharingInviteUserDialog(this)) { if (inviteDialog.ShowDialog(this) != DialogResult.OK) { return(AccountStatus.Unknown); } } return(sharedUserAccountStatus); }
private bool ShowInviteUserDialog(AccountStatus accountStatus) { if (accountStatus == AccountStatus.Offline || accountStatus == AccountStatus.Unknown) { ShowOfflineOrLocalError(); return(false); } if (accountStatus != AccountStatus.NotFound) { return(true); } using (KeySharingInviteUserDialog inviteDialog = new KeySharingInviteUserDialog(this)) { if (inviteDialog.ShowDialog() != DialogResult.OK) { return(false); } } return(true); }