diff --git a/ZA.CoreService.ESBCertificateManager/Form1.cs b/ZA.CoreService.ESBCertificateManager/Form1.cs index 25f6c8f..c976328 100644 --- a/ZA.CoreService.ESBCertificateManager/Form1.cs +++ b/ZA.CoreService.ESBCertificateManager/Form1.cs @@ -155,7 +155,7 @@ namespace ZA.CoreService.ESBCertificateManager { MessageBox.Show( this, - "Während einer laufenden Aktion können die Einstellungen nicht geöffnet werden.", + "Aktion läuft.", "Einstellungen", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -285,7 +285,7 @@ namespace ZA.CoreService.ESBCertificateManager MessageBox.Show( this, ex.Message, - "SQL-Zugriff fehlgeschlagen", + "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error); } @@ -300,7 +300,7 @@ namespace ZA.CoreService.ESBCertificateManager MessageBox.Show( this, ex.Message, - "Konfiguration ungültig", + "Konfiguration", MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -315,7 +315,7 @@ namespace ZA.CoreService.ESBCertificateManager MessageBox.Show( this, ex.Message, - "Initialisierung fehlgeschlagen", + "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error); } @@ -561,12 +561,12 @@ namespace ZA.CoreService.ESBCertificateManager progressPanel.Controls.Add(progressTitle); // ----------------------------- - // 3. Footer unten: Einstellungen + Version + // 3. Footer unten: Einstellungen // ----------------------------- Panel footerPanel = new Panel { Dock = DockStyle.Bottom, - Height = 118, + Height = 68, Padding = new Padding(18, 8, 12, 8) }; @@ -600,28 +600,8 @@ namespace ZA.CoreService.ESBCertificateManager btnSettings.Click += async (_, _) => await OpenSettingsAsync(); - Label versionLabel = new Label - { - Text = "INTERNAL TOOL", - ForeColor = MutedTextColor, - Font = new Font("Segoe UI", 7.5f, FontStyle.Bold), - AutoSize = true, - Location = new Point(18, 62) - }; - - Label versionNumber = new Label - { - Text = "Version 0.1.0", - ForeColor = BlueColor, - Font = new Font("Segoe UI", 8), - AutoSize = true, - Location = new Point(18, 82) - }; - footerPanel.Controls.Add(footerSeparator); footerPanel.Controls.Add(btnSettings); - footerPanel.Controls.Add(versionLabel); - footerPanel.Controls.Add(versionNumber); // Dock-Reihenfolge: Bottom, Top, Top sidebar.Controls.Add(footerPanel); @@ -809,27 +789,8 @@ namespace ZA.CoreService.ESBCertificateManager Location = new Point(3, 43) }; - Label environmentBadge = new Label - { - Text = " UMGEBUNG ", - ForeColor = GoldColor, - BackColor = Color.FromArgb(65, 53, 17), - Font = new Font("Segoe UI", 8, FontStyle.Bold), - AutoSize = true, - Padding = new Padding(7, 6, 7, 6), - Anchor = AnchorStyles.Top | AnchorStyles.Right - }; - - environmentBadge.Location = new Point(900, 9); - - header.Resize += (_, _) => - { - environmentBadge.Left = header.Width - environmentBadge.Width; - }; - header.Controls.Add(title); header.Controls.Add(subtitle); - header.Controls.Add(environmentBadge); return header; } @@ -946,9 +907,8 @@ namespace ZA.CoreService.ESBCertificateManager { MessageBox.Show( this, - "Bitte wähle eine Zertifikatsdatei in einem der folgenden Formate aus:\n" + - ".cer, .crt, .pem, .pfx oder .p12", - "Nicht unterstütztes Dateiformat", + "Ungültiges Dateiformat.", + "Dateiformat", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; @@ -1012,8 +972,8 @@ namespace ZA.CoreService.ESBCertificateManager catch (CryptographicException) { MessageBox.Show( - "Das angegebene Passwort ist falsch oder die Datei ist beschädigt.", - "Fehler beim Lesen des Zertifikats", + "Falsches Kennwort oder Datei beschädigt.", + "Zertifikat", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; @@ -1023,8 +983,8 @@ namespace ZA.CoreService.ESBCertificateManager { MessageBox.Show( this, - $"Das Zertifikat konnte nicht gelesen werden.\n\n{ex.Message}", - "Fehler beim Lesen des Zertifikats", + "Zertifikat konnte nicht gelesen werden.", + "Zertifikat", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; @@ -1893,7 +1853,7 @@ namespace ZA.CoreService.ESBCertificateManager SetStatus($"Vorabprüfung ok – {selected.Count} Ziel(e) bereit.", isError: false); MessageBox.Show( this, - $"Alle Voraussetzungen sind erfüllt.\nAusgewählte Ziele: {selected.Count}", + "Prüfung OK.", "Vorabprüfung", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -1927,13 +1887,9 @@ namespace ZA.CoreService.ESBCertificateManager return; } - string targetNames = string.Join(", ", selected.Select(t => - string.IsNullOrWhiteSpace(t.ContainerName) ? t.Name : t.ContainerName)); - DialogResult confirm = MessageBox.Show( this, - $"Container wirklich neu starten?\n\n" + - $"Ziele: {targetNames}\n\n", + "Neu starten?", "ESB neu starten", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); @@ -2053,23 +2009,9 @@ namespace ZA.CoreService.ESBCertificateManager return; } - string targetSummary = string.Join( - Environment.NewLine, - selectedTargets.Select(target => - $"• {target.Name}" - + Environment.NewLine - + $" Datei → {target.FullTargetPath}" - + Environment.NewLine - + $" danach Neustart: {target.ContainerName}")); - DialogResult confirm = MessageBox.Show( this, - "Zertifikat wirklich austauschen?\n\n" - + "Ablauf je Ziel:\n" - + "1) Datei kopieren (Backup der alten Datei)\n" - + "2) Sonic-Container neu starten (MfApi)\n\n" - + $"Quelle: {Path.GetFileName(txtCertificatePath.Text)}\n\n" - + targetSummary, + "Zertifikat austauschen?", "Austauschen + Neustart", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); @@ -2370,7 +2312,7 @@ namespace ZA.CoreService.ESBCertificateManager lblSonicStatus = new Label { ForeColor = MutedTextColor, - Font = new Font("Segoe UI", 8.5f), + Font = new Font("Segoe UI", 9f, FontStyle.Bold), AutoSize = true, MaximumSize = new Size(720, 0), Location = new Point(392, 108) @@ -2378,8 +2320,8 @@ namespace ZA.CoreService.ESBCertificateManager cmbSonicConnection.SelectedIndexChanged += (_, _) => RefreshSonicStatusLine(); - lblSonicStatus.Text = "Sonic-Verbindungen werden aus SQL geladen ..."; - lblSonicStatus.ForeColor = MutedTextColor; + lblSonicStatus.Text = "nicht verbunden"; + lblSonicStatus.ForeColor = RedColor; card.Controls.Add(sonicLabel); card.Controls.Add(cmbSonicConnection); @@ -2390,10 +2332,7 @@ namespace ZA.CoreService.ESBCertificateManager { if (_databaseSonicConnections.Count == 0) { - lblSonicStatus.Text = - "Keine aktive Sonic-Verbindung in SQL konfiguriert."; - - lblSonicStatus.ForeColor = GoldColor; + SetSonicConnectionStatus(connected: false); return; } @@ -2409,40 +2348,35 @@ namespace ZA.CoreService.ESBCertificateManager if (connection is null) { - lblSonicStatus.Text = - "Die ausgewählte SQL-Verbindung wurde nicht gefunden."; - - lblSonicStatus.ForeColor = RedColor; + SetSonicConnectionStatus(connected: false); return; } try { - string connectionUrl = connection.BuildConnectionUrl(); + _ = connection.BuildConnectionUrl(); bool hasCredential = - _credentialsByConnectionId.TryGetValue( - connection.Id, - out SonicCredentialProfile? credential); + _credentialsByConnectionId.ContainsKey(connection.Id); - string credentialInfo = hasCredential - ? $"Profil '{credential!.CredentialName}'" - : "sichere Zugangsdaten noch nicht konfiguriert"; - - lblSonicStatus.Text = - $"{connection.Name}: {connectionUrl}, {credentialInfo}"; - - lblSonicStatus.ForeColor = hasCredential - ? GreenColor - : GoldColor; + SetSonicConnectionStatus(connected: hasCredential); } - catch (InvalidOperationException ex) + catch (InvalidOperationException) { - lblSonicStatus.Text = ex.Message; - lblSonicStatus.ForeColor = RedColor; + SetSonicConnectionStatus(connected: false); } } + private void SetSonicConnectionStatus(bool connected) + { + lblSonicStatus.Text = connected + ? "verbunden" + : "nicht verbunden"; + lblSonicStatus.ForeColor = connected + ? GreenColor + : RedColor; + } + private void Form1_Load(object sender, EventArgs e) { diff --git a/ZA.CoreService.ESBCertificateManager/Program.cs b/ZA.CoreService.ESBCertificateManager/Program.cs index 60fa9f3..dfef8e0 100644 --- a/ZA.CoreService.ESBCertificateManager/Program.cs +++ b/ZA.CoreService.ESBCertificateManager/Program.cs @@ -58,8 +58,8 @@ internal static class Program if (!finalCheck.IsReady) { MessageBox.Show( - "Die Einrichtung ist noch nicht vollständig.", - "Einstellungen unvollständig", + "Einrichtung unvollständig.", + "Einstellungen", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -73,8 +73,8 @@ internal static class Program catch (Exception exception) { MessageBox.Show( - exception.ToString(), - "Anwendung konnte nicht gestartet werden", + "Start fehlgeschlagen.", + "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error); } diff --git a/ZA.CoreService.ESBCertificateManager/Services/CopyableErrorDialog.cs b/ZA.CoreService.ESBCertificateManager/Services/CopyableErrorDialog.cs index 6227fd3..f2372e5 100644 --- a/ZA.CoreService.ESBCertificateManager/Services/CopyableErrorDialog.cs +++ b/ZA.CoreService.ESBCertificateManager/Services/CopyableErrorDialog.cs @@ -33,9 +33,7 @@ public static class CopyableErrorDialog Label hint = new() { - Text = - "Fehlertext ist in der Zwischenablage — " - + "einfach hier einfügen (Strg+V).", + Text = "In Zwischenablage kopiert.", Location = new Point(16, 12), AutoSize = false, Size = new Size(608, 28), diff --git a/ZA.CoreService.ESBCertificateManager/Setup/AddContainerForm.cs b/ZA.CoreService.ESBCertificateManager/Setup/AddContainerForm.cs index e32c353..4420049 100644 --- a/ZA.CoreService.ESBCertificateManager/Setup/AddContainerForm.cs +++ b/ZA.CoreService.ESBCertificateManager/Setup/AddContainerForm.cs @@ -182,7 +182,7 @@ public sealed class AddContainerForm : Form { MessageBox.Show( this, - "Bitte eine Company wählen.", + "Bitte Company wählen.", "Container", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -193,7 +193,7 @@ public sealed class AddContainerForm : Form { MessageBox.Show( this, - "Bitte ein Sonic-System wählen.", + "Bitte System wählen.", "Container", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -204,7 +204,7 @@ public sealed class AddContainerForm : Form { MessageBox.Show( this, - "Bitte einen gültigen Timeout eingeben.", + "Ungültiger Timeout.", "Container", MessageBoxButtons.OK, MessageBoxIcon.Warning); diff --git a/ZA.CoreService.ESBCertificateManager/Setup/AddCredentialProfileForm.cs b/ZA.CoreService.ESBCertificateManager/Setup/AddCredentialProfileForm.cs index c97ec31..4b3190b 100644 --- a/ZA.CoreService.ESBCertificateManager/Setup/AddCredentialProfileForm.cs +++ b/ZA.CoreService.ESBCertificateManager/Setup/AddCredentialProfileForm.cs @@ -86,9 +86,7 @@ public sealed class AddCredentialProfileForm : Form Label details = new() { Text = - $"Umgebung: {_system.EnvironmentCode}" - + Environment.NewLine - + $"Domain: {_system.DomainName}" + $"Domain: {_system.DomainName}" + Environment.NewLine + $"Adresse: {_system.ConnectionUrl}" + Environment.NewLine @@ -99,7 +97,7 @@ public sealed class AddCredentialProfileForm : Form new Point(30, 62), Size = - new Size(495, 90), + new Size(495, 80), ForeColor = Color.FromArgb(169, 184, 200) @@ -300,8 +298,7 @@ public sealed class AddCredentialProfileForm : Form if (string.IsNullOrWhiteSpace(profileName)) { - ShowWarning( - "Bitte einen Profilnamen eingeben."); + ShowWarning("Profilname fehlt."); _txtProfileName.Focus(); return; @@ -309,8 +306,7 @@ public sealed class AddCredentialProfileForm : Form if (profileName.Length > 150) { - ShowWarning( - "Der Profilname darf maximal 150 Zeichen enthalten."); + ShowWarning("Profilname zu lang."); _txtProfileName.Focus(); return; @@ -318,8 +314,7 @@ public sealed class AddCredentialProfileForm : Form if (string.IsNullOrWhiteSpace(userName)) { - ShowWarning( - "Bitte einen Sonic-Benutzernamen eingeben."); + ShowWarning("Benutzername fehlt."); _txtUserName.Focus(); return; @@ -327,8 +322,7 @@ public sealed class AddCredentialProfileForm : Form if (userName.Length > 256) { - ShowWarning( - "Der Benutzername darf maximal 256 Zeichen enthalten."); + ShowWarning("Benutzername zu lang."); _txtUserName.Focus(); return; @@ -336,8 +330,7 @@ public sealed class AddCredentialProfileForm : Form if (string.IsNullOrEmpty(password)) { - ShowWarning( - "Bitte ein Kennwort eingeben."); + ShowWarning("Kennwort fehlt."); _txtPassword.Focus(); return; @@ -345,8 +338,7 @@ public sealed class AddCredentialProfileForm : Form if (password.Length > 512) { - ShowWarning( - "Das Kennwort darf maximal 512 Zeichen enthalten."); + ShowWarning("Kennwort zu lang."); _txtPassword.Focus(); return; @@ -357,8 +349,7 @@ public sealed class AddCredentialProfileForm : Form passwordRepeat, StringComparison.Ordinal)) { - ShowWarning( - "Die eingegebenen Kennwörter stimmen nicht überein."); + ShowWarning("Kennwörter stimmen nicht überein."); _txtPasswordRepeat.Clear(); _txtPasswordRepeat.Focus(); @@ -400,10 +391,7 @@ public sealed class AddCredentialProfileForm : Form { MessageBox.Show( this, - "Das Benutzerprofil konnte nicht angelegt werden." - + Environment.NewLine - + Environment.NewLine - + exception.Message, + "Profil konnte nicht angelegt werden.", "Benutzerprofil", MessageBoxButtons.OK, MessageBoxIcon.Error); diff --git a/ZA.CoreService.ESBCertificateManager/Setup/AddSonicSystemForm.cs b/ZA.CoreService.ESBCertificateManager/Setup/AddSonicSystemForm.cs index 9b64e65..4bc85f0 100644 --- a/ZA.CoreService.ESBCertificateManager/Setup/AddSonicSystemForm.cs +++ b/ZA.CoreService.ESBCertificateManager/Setup/AddSonicSystemForm.cs @@ -51,9 +51,7 @@ public sealed class AddSonicSystemForm : Form Label subtitle = new() { - Text = - $"Umgebung {_coordinator.Settings.EnvironmentCode} · " + - "Management-Verbindung für Container-Neustarts", + Text = "Management-Verbindung für Container-Neustarts", Location = new Point(30, 58), AutoSize = true, ForeColor = SettingsUi.Muted @@ -130,7 +128,7 @@ public sealed class AddSonicSystemForm : Form { MessageBox.Show( this, - "Bitte einen gültigen Port eingeben.", + "Ungültiger Port.", "Sonic-System", MessageBoxButtons.OK, MessageBoxIcon.Warning); diff --git a/ZA.CoreService.ESBCertificateManager/Setup/AddTargetPathForm.cs b/ZA.CoreService.ESBCertificateManager/Setup/AddTargetPathForm.cs index ab1e48f..4ada822 100644 --- a/ZA.CoreService.ESBCertificateManager/Setup/AddTargetPathForm.cs +++ b/ZA.CoreService.ESBCertificateManager/Setup/AddTargetPathForm.cs @@ -284,7 +284,7 @@ public sealed class AddTargetPathForm : Form { MessageBox.Show( this, - "Bitte ein Neustart-Ziel (Sonic-Container) wählen.", + "Bitte Ziel wählen.", "Zertifikat-Pfad", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -313,8 +313,7 @@ public sealed class AddTargetPathForm : Form { MessageBox.Show( this, - _lastProbe?.Message - ?? "Pfad konnte nicht geprüft werden.", + "Prüfung fehlgeschlagen.", "Zertifikat-Pfad", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -325,8 +324,7 @@ public sealed class AddTargetPathForm : Form { DialogResult confirm = MessageBox.Show( this, - "Am Ziel liegt noch keine Zertifikatsdatei.\n\n" - + "Pfad trotzdem speichern?", + "Datei fehlt. Trotzdem speichern?", "Datei fehlt", MessageBoxButtons.YesNo, MessageBoxIcon.Question); diff --git a/ZA.CoreService.ESBCertificateManager/Setup/SetupWizardForm.cs b/ZA.CoreService.ESBCertificateManager/Setup/SetupWizardForm.cs index 897efdc..068b2ac 100644 --- a/ZA.CoreService.ESBCertificateManager/Setup/SetupWizardForm.cs +++ b/ZA.CoreService.ESBCertificateManager/Setup/SetupWizardForm.cs @@ -23,7 +23,6 @@ public sealed class SetupWizardForm : Form private Label _lblCertificate = null!; private Label _lblDatabase = null!; private Label _lblSelection = null!; - private Label _lblEnvironmentBadge = null!; private ListView _lvSystems = null!; private ListView _lvContainers = null!; @@ -105,20 +104,8 @@ public sealed class SetupWizardForm : Form Font = new Font("Segoe UI Semibold", 20f, FontStyle.Bold) }; - _lblEnvironmentBadge = new Label - { - Text = _coordinator.Settings.EnvironmentCode, - Location = new Point(22, 95), - AutoSize = true, - Padding = new Padding(10, 4, 10, 4), - BackColor = Color.FromArgb(40, 208, 171, 57), - ForeColor = SettingsUi.Gold, - Font = new Font("Segoe UI Semibold", 9f, FontStyle.Bold) - }; - _sidebar.Controls.Add(brand); _sidebar.Controls.Add(brandSub); - _sidebar.Controls.Add(_lblEnvironmentBadge); string[] navItems = [ @@ -129,7 +116,7 @@ public sealed class SetupWizardForm : Form "Profile" ]; - int y = 150; + int y = 120; foreach (string item in navItems) { @@ -692,7 +679,7 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst einen Zertifikat-Pfad in der Liste wählen.", + "Bitte auswählen.", "Pfad prüfen", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -715,7 +702,7 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - result.Message + "\n\n" + target.FullTargetPath, + result.Success ? "Pfad OK." : "Prüfung fehlgeschlagen.", "Pfad prüfen", MessageBoxButtons.OK, icon); @@ -799,7 +786,7 @@ public sealed class SetupWizardForm : Form return; } - await AfterSystemSavedAsync(createdId, created: true); + await AfterSystemSavedAsync(createdId); } private async Task EditSelectedSystemAsync() @@ -809,7 +796,7 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst ein Sonic-System in der Liste wählen.", + "Bitte auswählen.", "System bearbeiten", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -824,7 +811,7 @@ public sealed class SetupWizardForm : Form return; } - await AfterSystemSavedAsync(savedId, created: false); + await AfterSystemSavedAsync(savedId); } private async Task DeleteSelectedSystemAsync() @@ -834,7 +821,7 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst ein Sonic-System in der Liste wählen.", + "Bitte auswählen.", "System löschen", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -843,11 +830,7 @@ public sealed class SetupWizardForm : Form DialogResult confirm = MessageBox.Show( this, - "Sonic-System wirklich aus der Konfiguration entfernen?\n\n" - + $"{system.ConnectionName}\n" - + $"{system.ConnectionUrl}\n\n" - + "Zugehörige Container und Pfade verschwinden aus den Listen. " - + "Der Eintrag wird in SQL nur deaktiviert (IsActive=0).", + "System entfernen?", "System löschen", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); @@ -870,7 +853,7 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - $"System Id {system.SonicConnectionId} wurde deaktiviert.", + "Entfernt.", "System gelöscht", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -881,7 +864,7 @@ public sealed class SetupWizardForm : Form } } - private async Task AfterSystemSavedAsync(int systemId, bool created) + private async Task AfterSystemSavedAsync(int systemId) { await LoadSystemsListAsync(); await LoadSystemsAsync(); @@ -895,9 +878,7 @@ public sealed class SetupWizardForm : Form if (!visible) { - ShowError( - $"{(created ? "Anlage" : "Update")}-Prüfung fehlgeschlagen: " - + $"System-Id {systemId} ist nach dem Speichern nicht in der Liste."); + ShowError("Speichern fehlgeschlagen."); return; } @@ -909,10 +890,8 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - created - ? $"System wurde gespeichert und geprüft (Id {systemId})." - : $"System wurde aktualisiert und geprüft (Id {systemId}).", - "Prüfung OK", + "Gespeichert.", + "OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -935,7 +914,7 @@ public sealed class SetupWizardForm : Form return; } - await AfterContainerSavedAsync(createdId, created: true); + await AfterContainerSavedAsync(createdId); } private async Task EditSelectedContainerAsync() @@ -945,7 +924,7 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst einen Container in der Liste wählen.", + "Bitte auswählen.", "Container bearbeiten", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -963,7 +942,7 @@ public sealed class SetupWizardForm : Form return; } - await AfterContainerSavedAsync(savedId, created: false); + await AfterContainerSavedAsync(savedId); } private async Task DeleteSelectedContainerAsync() @@ -973,25 +952,16 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst einen Container in der Liste wählen.", + "Bitte auswählen.", "Container löschen", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } - string display = - string.IsNullOrWhiteSpace(container.ContainerDisplayName) - ? container.ContainerName - : container.ContainerDisplayName; - DialogResult confirm = MessageBox.Show( this, - "Container wirklich aus der Konfiguration entfernen?\n\n" - + $"{container.CompanyCode} / {display}\n" - + $"System: {container.ConnectionName}\n\n" - + "Zugehörige Zertifikat-Pfade verschwinden aus der Liste. " - + "Der Eintrag wird in SQL nur deaktiviert (IsActive=0).", + "Container entfernen?", "Container löschen", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); @@ -1012,7 +982,7 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - $"Container Id {container.SonicContainerId} wurde deaktiviert.", + "Entfernt.", "Container gelöscht", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -1023,7 +993,7 @@ public sealed class SetupWizardForm : Form } } - private async Task AfterContainerSavedAsync(int containerId, bool created) + private async Task AfterContainerSavedAsync(int containerId) { await LoadContainersListAsync(); await LoadSystemsListAsync(); @@ -1037,9 +1007,7 @@ public sealed class SetupWizardForm : Form if (!visible) { - ShowError( - $"{(created ? "Anlage" : "Update")}-Prüfung fehlgeschlagen: " - + $"Container-Id {containerId} ist nach dem Speichern nicht in der Liste."); + ShowError("Speichern fehlgeschlagen."); return; } @@ -1051,10 +1019,8 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - created - ? $"Container wurde gespeichert und geprüft (Id {containerId})." - : $"Container wurde aktualisiert und geprüft (Id {containerId}).", - "Prüfung OK", + "Gespeichert.", + "OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -1077,7 +1043,7 @@ public sealed class SetupWizardForm : Form return; } - await AfterPathSavedAsync(createdId, created: true); + await AfterPathSavedAsync(createdId); } private async Task EditSelectedPathAsync() @@ -1087,7 +1053,7 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst einen Zertifikat-Pfad in der Liste wählen.", + "Bitte auswählen.", "Pfad bearbeiten", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -1105,10 +1071,10 @@ public sealed class SetupWizardForm : Form return; } - await AfterPathSavedAsync(savedId, created: false); + await AfterPathSavedAsync(savedId); } - private async Task AfterPathSavedAsync(int pathId, bool created) + private async Task AfterPathSavedAsync(int pathId) { await LoadPathsListAsync(); await RefreshAllAsync(); @@ -1121,9 +1087,7 @@ public sealed class SetupWizardForm : Form if (!visible) { - ShowError( - $"{(created ? "Anlage" : "Update")}-Prüfung fehlgeschlagen: " - + $"Pfad-Id {pathId} ist nach dem Speichern nicht in der Liste."); + ShowError("Speichern fehlgeschlagen."); return; } @@ -1135,10 +1099,8 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - created - ? $"Zertifikat-Pfad wurde gespeichert und geprüft (Id {pathId})." - : $"Zertifikat-Pfad wurde aktualisiert und geprüft (Id {pathId}).", - "Prüfung OK", + "Gespeichert.", + "OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -1150,7 +1112,7 @@ public sealed class SetupWizardForm : Form { MessageBox.Show( this, - "Bitte zuerst einen Zertifikat-Pfad in der Liste wählen.", + "Bitte auswählen.", "Pfad löschen", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -1159,10 +1121,7 @@ public sealed class SetupWizardForm : Form DialogResult confirm = MessageBox.Show( this, - "Zertifikat-Pfad wirklich aus der Konfiguration entfernen?\n\n" - + $"{target.FullTargetPath}\n\n" - + "Die Datei auf dem Server bleibt unverändert. " - + "Der Eintrag wird in SQL nur deaktiviert (IsActive=0).", + "Pfad entfernen?", "Pfad löschen", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); @@ -1182,7 +1141,7 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - $"Pfad Id {target.CertificateTargetId} wurde deaktiviert.", + "Entfernt.", "Pfad gelöscht", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -1255,7 +1214,7 @@ public sealed class SetupWizardForm : Form { if (_cmbSystem.SelectedItem is not SonicSystemOption system) { - ShowWarning("Bitte zuerst ein Sonic-System auswählen."); + ShowWarning("Bitte auswählen."); return; } @@ -1281,9 +1240,9 @@ public sealed class SetupWizardForm : Form } } - MessageBox.Show( + MessageBox.Show( this, - "Profil geladen. Jetzt „Auswahl übernehmen“ klicken.", + "Profil geladen.", "Benutzerprofil", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -1352,13 +1311,13 @@ public sealed class SetupWizardForm : Form { if (_cmbSystem.SelectedItem is not SonicSystemOption system) { - ShowWarning("Bitte ein Sonic-System auswählen."); + ShowWarning("Bitte System wählen."); return; } if (_cmbCredential.SelectedItem is not SonicCredentialProfile profile) { - ShowWarning("Bitte ein Benutzerprofil auswählen."); + ShowWarning("Bitte Profil wählen."); return; } @@ -1366,7 +1325,7 @@ public sealed class SetupWizardForm : Form MessageBox.Show( this, - "Auswahl gespeichert.", + "Gespeichert.", "Einstellungen", MessageBoxButtons.OK, MessageBoxIcon.Information);