R2: Generic Host + Modul-Vertrag + Shell-UI (PolytraderSharp-Konzept) - Core/Modularity: neuer IModule (Name, DbPrefix, RegisterServices(services,config), RegisterUi(host,sp), StartAsync/StopAsync, GetActivationBlocker) + ModuleView + IModuleUiHost + WindowMenu. Alte IModule/ModuleRegistry/WindowManager/ModuleFormBase entfernt. - Program.cs: Host.CreateDefaultBuilder + IConfiguration (appsettings.json/.Local.json); Core-Services registriert, Module via RegisterServices, Views via RegisterUi. - UI: ShellUiHost (Einzelinstanz-Fenster + Fenster-Menue), LauncherForm als Shell (Buttons je View), Core-Views Logs/Settings/Workers als eigene Fenster. - CongressTrading auf neuen Vertrag; Worker als IWorker registriert. - --smoke-ui Headless-Test (konstruiert jede View + Launcher). - appsettings.Local.json gitignored. - Tests angepasst -> 30/30 gruen; Build + Smoke-UI + App-Start verifiziert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> @
24 lines
721 B
C#
24 lines
721 B
C#
using IBKRTrader.Core.Settings;
|
|
|
|
namespace IBKRTrader.UI.Views;
|
|
|
|
/// <summary>Core-View: Einstellungen (PropertyGrid auf AppSettings) mit Speichern-Button.</summary>
|
|
public sealed class SettingsView : Form
|
|
{
|
|
public SettingsView(SettingsService settings)
|
|
{
|
|
Text = "Settings";
|
|
Width = 820;
|
|
Height = 720;
|
|
StartPosition = FormStartPosition.CenterScreen;
|
|
|
|
var grid = new PropertyGrid { Dock = DockStyle.Fill, SelectedObject = settings.Settings };
|
|
|
|
var save = new Button { Text = "Speichern", Dock = DockStyle.Bottom, Height = 36 };
|
|
save.Click += (_, _) => settings.Save();
|
|
|
|
Controls.Add(grid);
|
|
Controls.Add(save);
|
|
}
|
|
}
|