Simplify DB to six tables and load credentials via Always Encrypted SonicCredential.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-29 08:23:55 +02:00
co-authored by Cursor
parent 4d19873776
commit dcfcb5289d
15 changed files with 1356 additions and 461 deletions
@@ -5,6 +5,7 @@ namespace ZA.CoreService.ESBCertificateManager.Setup;
public sealed class SetupWizardForm : Form
{
private readonly SetupCoordinator _coordinator;
private readonly bool _isSettingsMode;
private readonly Color _backgroundColor =
Color.FromArgb(10, 18, 34);
@@ -49,9 +50,11 @@ public sealed class SetupWizardForm : Form
private bool _running;
public SetupWizardForm(
SetupCoordinator coordinator)
SetupCoordinator coordinator,
bool isSettingsMode = false)
{
_coordinator = coordinator;
_isSettingsMode = isSettingsMode;
BuildInterface();
@@ -61,7 +64,7 @@ public sealed class SetupWizardForm : Form
private void BuildInterface()
{
Text = "ESB Certificate Manager einrichten";
Text = "Einstellungen";
StartPosition = FormStartPosition.CenterScreen;
Size = new Size(950, 690);
MinimumSize = new Size(900, 650);
@@ -73,7 +76,7 @@ public sealed class SetupWizardForm : Form
Label title = new()
{
Text = "Ersteinrichtung",
Text = "Einstellungen",
AutoSize = true,
Location = new Point(38, 25),
ForeColor = _textColor,
@@ -85,8 +88,9 @@ public sealed class SetupWizardForm : Form
Label subtitle = new()
{
Text =
"Runtime, Datenbank, Zertifikat und Systemauswahl prüfen.",
Text = _isSettingsMode
? "Runtime, Zertifikat, System und Benutzerprofil anpassen."
: "Runtime, Datenbank, Zertifikat und Systemauswahl prüfen.",
AutoSize = true,
Location = new Point(42, 70),
ForeColor = _mutedTextColor
@@ -244,7 +248,7 @@ public sealed class SetupWizardForm : Form
await InitializeAsync();
Button cancelButton = CreateButton(
"Abbrechen");
_isSettingsMode ? "Schließen" : "Abbrechen");
cancelButton.Location =
new Point(675, 580);
@@ -252,14 +256,30 @@ public sealed class SetupWizardForm : Form
cancelButton.Size =
new Size(110, 42);
cancelButton.Click += (_, _) =>
cancelButton.Click += async (_, _) =>
{
DialogResult = DialogResult.Cancel;
if (_isSettingsMode)
{
// Nach gespeicherter Auswahl die Hauptansicht aktualisieren.
SetupCheckResult check =
await _coordinator.CheckAsync();
DialogResult = check.IsReady
? DialogResult.OK
: DialogResult.Cancel;
}
else
{
DialogResult = DialogResult.Cancel;
}
Close();
};
_btnFinish = CreateButton(
"Setup abschließen");
_isSettingsMode
? "Übernehmen"
: "Fertig");
_btnFinish.Location =
new Point(795, 580);
@@ -338,7 +358,7 @@ public sealed class SetupWizardForm : Form
MessageBox.Show(
this,
ex.Message,
"Setup fehlgeschlagen",
"Einstellungen fehlgeschlagen",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
@@ -590,7 +610,7 @@ public sealed class SetupWizardForm : Form
MessageBox.Show(
this,
"System und Benutzerprofil wurden ausgewählt.",
"Setup",
"Einstellungen",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
@@ -707,7 +727,7 @@ public sealed class SetupWizardForm : Form
MessageBox.Show(
this,
message,
"Setup",
"Einstellungen",
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
}