mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Startup wizard - Implemented auto-run and update settings
This commit is contained in:
1 parent
bfa1d60dec
commit
090d5b76e8
5 files changed
+176
-61
No files matched your search
@@ -122,7 +122,7 @@
|
||||
</Border>
|
||||
|
||||
<!-- Update settings -->
|
||||
<StackPanel IsVisible="{CompiledBinding IsUpdatingSupported}">
|
||||
<StackPanel IsVisible="{CompiledBinding IsUpdatingSupported}">
|
||||
<TextBlock Classes="h4" Margin="0 15">
|
||||
Updating
|
||||
</TextBlock>
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace Artemis.UI.Screens.Settings
|
||||
private readonly IWindowService _windowService;
|
||||
private readonly IUpdateService _updateService;
|
||||
private readonly IAutoRunProvider? _autoRunProvider;
|
||||
private bool _startupWizardOpen;
|
||||
|
||||
public GeneralTabViewModel(IKernel kernel,
|
||||
ISettingsService settingsService,
|
||||
@@ -156,7 +157,6 @@ namespace Artemis.UI.Screens.Settings
|
||||
Utilities.OpenFolder(Constants.LogsFolder);
|
||||
}
|
||||
|
||||
|
||||
private async Task ExecuteCheckForUpdate(CancellationToken cancellationToken)
|
||||
{
|
||||
await _updateService.ManualUpdate();
|
||||
@@ -164,7 +164,9 @@ namespace Artemis.UI.Screens.Settings
|
||||
|
||||
private async Task ExecuteShowSetupWizard()
|
||||
{
|
||||
_startupWizardOpen = true;
|
||||
await _windowService.ShowDialogAsync<StartupWizardViewModel, bool>();
|
||||
_startupWizardOpen = false;
|
||||
}
|
||||
|
||||
private void ExecuteShowDebugger()
|
||||
@@ -179,7 +181,7 @@ namespace Artemis.UI.Screens.Settings
|
||||
|
||||
private async Task ApplyAutoRun()
|
||||
{
|
||||
if (_autoRunProvider == null)
|
||||
if (_autoRunProvider == null || _startupWizardOpen)
|
||||
return;
|
||||
|
||||
try
|
||||
@@ -202,7 +204,7 @@ namespace Artemis.UI.Screens.Settings
|
||||
|
||||
private async void UIAutoRunDelayOnSettingChanged(object? sender, EventArgs e)
|
||||
{
|
||||
if (_autoRunProvider == null || !UIAutoRun.Value)
|
||||
if (_autoRunProvider == null || !UIAutoRun.Value || _startupWizardOpen)
|
||||
return;
|
||||
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user