diff --git a/HSMonitor/Utils/Bootstrapper.cs b/HSMonitor/Utils/Bootstrapper.cs index ab3b64b..cfbb125 100644 --- a/HSMonitor/Utils/Bootstrapper.cs +++ b/HSMonitor/Utils/Bootstrapper.cs @@ -13,7 +13,14 @@ namespace HSMonitor.Utils; public class Bootstrapper : Bootstrapper { private T GetInstance() => (T) base.GetInstance(typeof(T)); - + + protected override void OnStart() + { + Stylet.Logging.LogManager.LoggerFactory = _ => new FileLogger(); + Stylet.Logging.LogManager.Enabled = false; + base.OnStart(); + } + protected override void ConfigureIoC(IStyletIoCBuilder builder) { base.ConfigureIoC(builder); @@ -32,22 +39,21 @@ protected override void ConfigureIoC(IStyletIoCBuilder builder) builder.Bind().ToSelf().InSingletonScope(); builder.Bind().ToAllImplementations().InSingletonScope(); } - - protected override void Launch() + + protected override void Configure() { - GetInstance().HardwareInformationUpdate(this, EventArgs.Empty); - _ = GetInstance().GetViewForDialogScreen(GetInstance()); GetInstance().Load(); - base.Launch(); + base.Configure(); } - protected override void OnStart() + protected override void Launch() { - Stylet.Logging.LogManager.LoggerFactory = _ => new FileLogger(); - Stylet.Logging.LogManager.Enabled = false; - base.OnStart(); + GetInstance().HardwareInformationUpdate(this, EventArgs.Empty); + _ = GetInstance().GetViewForDialogScreen(GetInstance()); + + base.Launch(); } - + protected override void OnExit(ExitEventArgs e) { GetInstance().Dispose();