mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using System.Reactive.Disposables;
|
|
using Artemis.UI.Screens.StartupWizard.Steps;
|
|
using Artemis.UI.Shared;
|
|
using Avalonia;
|
|
using Avalonia.Markup.Xaml;
|
|
using FluentAvalonia.UI.Navigation;
|
|
using ReactiveUI;
|
|
|
|
namespace Artemis.UI.Screens.StartupWizard;
|
|
|
|
public partial class StartupWizardView : ReactiveAppWindow<StartupWizardViewModel>
|
|
{
|
|
public StartupWizardView()
|
|
{
|
|
InitializeComponent();
|
|
#if DEBUG
|
|
this.AttachDevTools();
|
|
#endif
|
|
|
|
this.WhenActivated(d => ViewModel.WhenAnyValue(vm => vm.CurrentStep).Subscribe(ApplyCurrentStep).DisposeWith(d));
|
|
}
|
|
|
|
|
|
private void ApplyCurrentStep(int step)
|
|
{
|
|
if (step == 1)
|
|
Frame.NavigateToType(typeof(WelcomeStep), null, new FrameNavigationOptions());
|
|
else if (step == 2)
|
|
Frame.NavigateToType(typeof(DevicesStep), null, new FrameNavigationOptions());
|
|
else if (step == 3)
|
|
Frame.NavigateToType(typeof(LayoutStep), null, new FrameNavigationOptions());
|
|
else if (step == 4)
|
|
Frame.NavigateToType(typeof(SettingsStep), null, new FrameNavigationOptions());
|
|
else if (step == 5)
|
|
Frame.NavigateToType(typeof(FinishStep), null, new FrameNavigationOptions());
|
|
}
|
|
} |