Plugins - Add JSON property to disable auto-enabling features

Setup wizard - Play intro animation at the end (and no where else)
This commit is contained in:
SpoinkyNL committed 2020-12-12 10:57:09 +01:00
1 parent c6181ea823
commit 8e8258506b
8 files changed
+879 -83

No files matched your search

@@ -1,4 +1,5 @@
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using Artemis.Core.DeviceProviders;
using Artemis.Core.Services;
using Artemis.UI.Ninject.Factories;
@@ -24,7 +25,13 @@ namespace Artemis.UI.Screens.SetupWizard.Steps
protected override void OnActivate()
{
Items.Clear();
Items.AddRange(_pluginManagementService.GetFeaturesOfType<DeviceProvider>().Select(d => _settingsVmFactory.CreatePluginFeatureViewModel(d)));
// _pluginManagementService.GetFeaturesOfType<>() will only give us enabled features so lets get all of them this way
IEnumerable<DeviceProvider> features = _pluginManagementService.GetAllPlugins()
.SelectMany(p => p.Features.Where(f => f is DeviceProvider))
.Cast<DeviceProvider>()
.OrderBy(d => d.GetType().Name);
Items.AddRange(features.Select(d => _settingsVmFactory.CreatePluginFeatureViewModel(d)));
base.OnActivate();
}
@@ -1,10 +1,18 @@
using System.Windows.Navigation;
using Artemis.Core.Services;
using Stylet;
namespace Artemis.UI.Screens.SetupWizard.Steps
{
public class FinishStepViewModel : Screen
{
private readonly ICoreService _coreService;
public FinishStepViewModel(ICoreService coreService)
{
_coreService = coreService;
}
public void OpenHyperlink(object sender, RequestNavigateEventArgs e)
{
Core.Utilities.OpenUrl(e.Uri.AbsoluteUri);
@@ -14,5 +22,11 @@ namespace Artemis.UI.Screens.SetupWizard.Steps
{
((SetupWizardViewModel) Parent).SkipOrFinishWizard();
}
protected override void OnActivate()
{
_coreService.PlayIntroAnimation();
base.OnActivate();
}
}
}