Extract starting the simulator into StartSimulation

The click handler is left with asking the user things and showing the result.
This commit is contained in:
maj00r
2026-09-04 21:14:52 +02:00
parent 3c502f630d
commit 964884bd56
3 changed files with 227 additions and 100 deletions

View File

@@ -57,6 +57,7 @@ public sealed class AppServices
SettingsStore = new SettingsStore(files, clock, log, settingsPaths, new SettingsSerializer(), Executables);
SettingsPaths = settingsPaths;
MissingVehicleLog = new MissingVehicleLog(SettingsStore.Settings, MissingAssets, Library, log);
StartSimulation = new StartSimulation(State, SettingsStore, files, Processes, Random, log);
}
/// <summary>
@@ -128,6 +129,9 @@ public sealed class AppServices
public MissingVehicleLog MissingVehicleLog { get; }
/// <summary>Starts the simulator on the current selection.</summary>
public StartSimulation StartSimulation { get; }
/// <summary>
/// Exposed as the concrete service rather than <see cref="ILocalizedStrings"/>
/// because the XAML binds to it as a change-notifying source; code should take