Skip to content

Commit 83975c9

Browse files
committed
commandline WIP(#9)
1 parent 3761551 commit 83975c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/WEventViewer/App.axaml.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ public override void OnFrameworkInitializationCompleted()
2121
collection.AddSingleton<EventLogRepository>();
2222
collection.AddSingleton<IViewModelFactory, ViewModelFactoryServiceProvider>(provider => new ViewModelFactoryServiceProvider(provider));
2323
collection.AddSingleton<MainWindowViewModel>();
24-
collection.AddSingleton<OpenLogWindowViewModel>();
24+
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime classic)
25+
{
26+
collection.AddSingleton<OpenLogWindowViewModel>(provider => new OpenLogWindowViewModel() { });
27+
}
2528
collection.AddSingleton<MainWindow>(provider =>
2629
{
2730
return new MainWindow(provider.GetRequiredService<IViewModelFactory>())

0 commit comments

Comments
 (0)