private static void load_creds() { try { creds = CredsFile.readConfig(); } catch (Exception) { creds = new Credentials(); } if (String.IsNullOrEmpty(creds.apikey) || String.IsNullOrEmpty(creds.username)) { CredsWindow cw = new CredsWindow(); cw.Show(); MainWindow.ErrorMessage("Credentials are required.", "Credentials Required"); } }
private void menuItemCredentials_Click(object sender, RoutedEventArgs e) { var cw = new CredsWindow(); cw.Show(); }