Files
Artemis/src/Artemis.UI/Screens/StartupWizard/Steps/LayoutStepViewModel.cs
T
Robert ca453f2052 Core - Kill zombies after 2 seconds 🔫
Core - Fix an access violation on surface changes (when loading device providers/moving devices)
2021-08-23 20:41:07 +02:00

47 lines
1.2 KiB
C#

using Artemis.Core.Services;
using Stylet;
namespace Artemis.UI.Screens.StartupWizard.Steps
{
public class LayoutStepViewModel : Screen
{
private readonly IRgbService _rgbService;
public LayoutStepViewModel(IRgbService rgbService)
{
_rgbService = rgbService;
}
public void ApplyLeftHandedPreset()
{
_rgbService.AutoArrangeDevices();
StartupWizardViewModel startupWizardViewModel = (StartupWizardViewModel) Parent;
startupWizardViewModel.Continue();
}
public void ApplyRightHandedPreset()
{
_rgbService.AutoArrangeDevices();
StartupWizardViewModel startupWizardViewModel = (StartupWizardViewModel) Parent;
startupWizardViewModel.Continue();
}
#region Overrides of Screen
/// <inheritdoc />
protected override void OnActivate()
{
_rgbService.SetRenderPaused(true);
base.OnActivate();
}
/// <inheritdoc />
protected override void OnDeactivate()
{
_rgbService.SetRenderPaused(false);
base.OnDeactivate();
}
#endregion
}
}