Profiles - Reworked profile system

Sidebar - Redesigned sidebar with customizable categories
Profiles - Added the ability to configure custom profile icons
Profiles - Added the ability to activate multiple profiles for modules at once
Profiles - Added the ability to create profiles for no modules
Profiles - Added the ability to suspend a profile or an entire category
Profiles - Added profile activation conditions
Profiles - Added file-based importing/exporting
Profile editor - Condensed UI, removed tabs 
Profile editor - Disable condition operators until a left-side is picked
This commit is contained in:
Robert Beekman authored and GitHub committed 2021-06-03 22:34:43 +02:00
1 parent 4152c290d2
commit ceeaa4bf6d
164 files changed
+5019 -4220

No files matched your search

@@ -19,8 +19,8 @@ namespace Artemis.UI.Shared.Input
/// </summary>
public class DataModelDynamicViewModel : PropertyChangedBase, IDisposable
{
private readonly List<Module> _modules;
private readonly IDataModelUIService _dataModelUIService;
private readonly Module _module;
private readonly Timer _updateTimer;
private SolidColorBrush _buttonBrush = new(Color.FromRgb(171, 71, 188));
private DataModelPath? _dataModelPath;
@@ -31,9 +31,9 @@ namespace Artemis.UI.Shared.Input
private bool _isEnabled = true;
private string _placeholder = "Select a property";
internal DataModelDynamicViewModel(Module module, ISettingsService settingsService, IDataModelUIService dataModelUIService)
internal DataModelDynamicViewModel(List<Module> modules, ISettingsService settingsService, IDataModelUIService dataModelUIService)
{
_module = module;
_modules = modules;
_dataModelUIService = dataModelUIService;
_updateTimer = new Timer(500);
@@ -107,6 +107,11 @@ namespace Artemis.UI.Shared.Input
/// </summary>
public BindableCollection<DataModelPropertiesViewModel> ExtraDataModelViewModels { get; }
/// <summary>
/// Gets a boolean indicating whether there are any modules providing data models
/// </summary>
public bool HasNoModules => (DataModelViewModel == null || !DataModelViewModel.Children.Any()) && !HasExtraDataModels;
/// <summary>
/// Gets a boolean indicating whether there are any extra data models
/// </summary>
@@ -233,7 +238,7 @@ namespace Artemis.UI.Shared.Input
private void Initialize()
{
// Get the data models
DataModelViewModel = _dataModelUIService.GetPluginDataModelVisualization(_module, true);
DataModelViewModel = _dataModelUIService.GetPluginDataModelVisualization(_modules, true);
if (DataModelViewModel != null)
DataModelViewModel.UpdateRequested += DataModelOnUpdateRequested;
ExtraDataModelViewModels.CollectionChanged += ExtraDataModelViewModelsOnCollectionChanged;