mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-03-25 02:38:48 +00:00
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using System.Reactive;
|
|
using Artemis.UI.Shared;
|
|
using ReactiveUI;
|
|
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using Artemis.Core;
|
|
using Artemis.Core.DeviceProviders;
|
|
using Artemis.Core.Services;
|
|
|
|
namespace Artemis.UI.Screens.StartupWizard.Steps;
|
|
|
|
public class SurfaceStepViewModel : WizardStepViewModel
|
|
{
|
|
private readonly IDeviceService _deviceService;
|
|
|
|
public SurfaceStepViewModel(IDeviceService deviceService)
|
|
{
|
|
_deviceService = deviceService;
|
|
SelectLayout = ReactiveCommand.Create<string>(ExecuteSelectLayout);
|
|
|
|
Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<SettingsStepViewModel>());
|
|
GoBack = ReactiveCommand.Create(() => Wizard.ChangeScreen<LayoutsStepViewModel>());
|
|
}
|
|
|
|
public ReactiveCommand<string, Unit> SelectLayout { get; set; }
|
|
|
|
private void ExecuteSelectLayout(string layout)
|
|
{
|
|
_deviceService.AutoArrangeDevices(layout == "left");
|
|
Wizard.ChangeScreen<SettingsStepViewModel>();
|
|
}
|
|
} |