mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 17:53:32 +00:00
Merge pull request #471 from diogotr7/feature/tray-debugger
Added a tray menu option to open the debugger window
This commit is contained in:
commit
ad3581a93a
@ -46,6 +46,11 @@
|
|||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Separator />
|
<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 Header="Exit" Command="{s:Action TrayExit}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<materialDesign:PackIcon Kind="Close" />
|
<materialDesign:PackIcon Kind="Close" />
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Events;
|
using Artemis.UI.Events;
|
||||||
using Artemis.UI.Screens.Splash;
|
using Artemis.UI.Screens.Splash;
|
||||||
|
using Artemis.UI.Services.Interfaces;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services;
|
using Artemis.UI.Shared.Services;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
@ -14,15 +15,17 @@ namespace Artemis.UI.Screens
|
|||||||
private readonly IEventAggregator _eventAggregator;
|
private readonly IEventAggregator _eventAggregator;
|
||||||
private readonly IKernel _kernel;
|
private readonly IKernel _kernel;
|
||||||
private readonly IWindowManager _windowManager;
|
private readonly IWindowManager _windowManager;
|
||||||
|
private readonly IDebugService _debugService;
|
||||||
private bool _canShowRootViewModel;
|
private bool _canShowRootViewModel;
|
||||||
private bool _setGradientPickerService;
|
private bool _setGradientPickerService;
|
||||||
private SplashViewModel _splashViewModel;
|
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;
|
_kernel = kernel;
|
||||||
_windowManager = windowManager;
|
_windowManager = windowManager;
|
||||||
_eventAggregator = eventAggregator;
|
_eventAggregator = eventAggregator;
|
||||||
|
_debugService = debugService;
|
||||||
CanShowRootViewModel = true;
|
CanShowRootViewModel = true;
|
||||||
|
|
||||||
var autoRunning = Bootstrapper.StartupArguments.Contains("--autorun");
|
var autoRunning = Bootstrapper.StartupArguments.Contains("--autorun");
|
||||||
@ -75,6 +78,11 @@ namespace Artemis.UI.Screens
|
|||||||
ApplicationUtilities.Shutdown(2, false);
|
ApplicationUtilities.Shutdown(2, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TrayOpenDebugger()
|
||||||
|
{
|
||||||
|
_debugService.ShowDebugger();
|
||||||
|
}
|
||||||
|
|
||||||
private void ShowSplashScreen()
|
private void ShowSplashScreen()
|
||||||
{
|
{
|
||||||
Execute.OnUIThread(() =>
|
Execute.OnUIThread(() =>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user