private async void EditAccount_Click(object sender, RoutedEventArgs e) { if (LoginBox.Text.Length > 0) { if (await CheckAccountExistsAsync()) { var account = await authCore.GetAccountByLoginAsync(LoginBox.Text); AddEditAccount newAddAccountWindow = new AddEditAccount(account); newAddAccountWindow.ShowDialog(); } else { MessageBox.Show("Account doesn't exist"); } } else { MessageBox.Show("Login empty"); } }
private void AddAccountButton_Click(object sender, RoutedEventArgs e) { AddEditAccount newAddAccountWindow = new AddEditAccount(null); newAddAccountWindow.ShowDialog(); }