UI - Added setup wizard

This commit is contained in:
SpoinkyNL committed 2020-12-11 22:48:40 +01:00
1 parent aacf3d749b
commit c6181ea823
16 files changed
+668 -6

No files matched your search

@@ -80,6 +80,29 @@
</Grid>
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Setup wizard</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
Opens the setup wizard usually shown when Artemis first starts.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowSetupWizard}" Width="150">
SHOW WIZARD
</Button>
</StackPanel>
</Grid>
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
@@ -148,7 +171,7 @@
</StackPanel>
</Grid>
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
@@ -7,9 +7,11 @@ using System.Threading.Tasks;
using Artemis.Core;
using Artemis.Core.LayerBrushes;
using Artemis.Core.Services;
using Artemis.UI.Screens.SetupWizard;
using Artemis.UI.Services.Interfaces;
using Artemis.UI.Shared;
using Artemis.UI.Shared.Services;
using Ninject;
using Serilog.Events;
using Stylet;
@@ -18,6 +20,8 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
public class GeneralSettingsTabViewModel : Screen
{
private readonly IDebugService _debugService;
private readonly IKernel _kernel;
private readonly IWindowManager _windowManager;
private readonly IDialogService _dialogService;
private readonly ISettingsService _settingsService;
private List<Tuple<string, double>> _renderScales;
@@ -25,10 +29,18 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
private List<Tuple<string, int>> _targetFrameRates;
private readonly PluginSetting<LayerBrushReference> _defaultLayerBrushDescriptor;
public GeneralSettingsTabViewModel(IDialogService dialogService, IDebugService debugService, ISettingsService settingsService, IPluginManagementService pluginManagementService)
public GeneralSettingsTabViewModel(
IKernel kernel,
IWindowManager windowManager,
IDialogService dialogService,
IDebugService debugService,
ISettingsService settingsService,
IPluginManagementService pluginManagementService)
{
DisplayName = "GENERAL";
_kernel = kernel;
_windowManager = windowManager;
_dialogService = dialogService;
_debugService = debugService;
_settingsService = settingsService;
@@ -199,6 +211,11 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
}
}
public void ShowSetupWizard()
{
_windowManager.ShowDialog(_kernel.Get<SetupWizardViewModel>());
}
public void ShowDataFolder()
{
try