1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Added a tray menu option to open the debugger window

This commit is contained in:
Diogo Trindade 2020-09-23 15:52:22 +01:00
parent 74689b5daf
commit 983911d148
2 changed files with 14 additions and 1 deletions

View File

@ -46,6 +46,11 @@
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Header="Debugger" Command="{s:Action TrayOpenDebugger}">
<MenuItem.Icon>
<materialDesign:PackIcon Kind="Matrix" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Exit" Command="{s:Action TrayExit}">
<MenuItem.Icon>
<materialDesign:PackIcon Kind="Close" />

View File

@ -2,6 +2,7 @@
using Artemis.Core.Services;
using Artemis.UI.Events;
using Artemis.UI.Screens.Splash;
using Artemis.UI.Services.Interfaces;
using Artemis.UI.Shared;
using Artemis.UI.Shared.Services;
using Ninject;
@ -14,15 +15,17 @@ namespace Artemis.UI.Screens
private readonly IEventAggregator _eventAggregator;
private readonly IKernel _kernel;
private readonly IWindowManager _windowManager;
private readonly IDebugService _debugService;
private bool _canShowRootViewModel;
private bool _setGradientPickerService;
private SplashViewModel _splashViewModel;
public TrayViewModel(IKernel kernel, IWindowManager windowManager, IEventAggregator eventAggregator, ICoreService coreService, ISettingsService settingsService)
public TrayViewModel(IKernel kernel, IWindowManager windowManager, IEventAggregator eventAggregator, ICoreService coreService, IDebugService debugService,ISettingsService settingsService)
{
_kernel = kernel;
_windowManager = windowManager;
_eventAggregator = eventAggregator;
_debugService = debugService;
CanShowRootViewModel = true;
var autoRunning = Bootstrapper.StartupArguments.Contains("--autorun");
@ -75,6 +78,11 @@ namespace Artemis.UI.Screens
ApplicationUtilities.Shutdown(2, false);
}
public void TrayOpenDebugger()
{
_debugService.ShowDebugger();
}
private void ShowSplashScreen()
{
Execute.OnUIThread(() =>