mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
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:
1 parent
4152c290d2
commit
ceeaa4bf6d
164 files changed
+5019
-4220
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
using System.Linq;
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Sidebar.Dialogs.ProfileEdit
|
||||
{
|
||||
public class ModuleActivationRequirementsViewModel : Conductor<ModuleActivationRequirementViewModel>.Collection.AllActive
|
||||
{
|
||||
private readonly ISidebarVmFactory _sidebarVmFactory;
|
||||
private Module _module;
|
||||
private string _activationType;
|
||||
|
||||
public ModuleActivationRequirementsViewModel(ISidebarVmFactory sidebarVmFactory)
|
||||
{
|
||||
_sidebarVmFactory = sidebarVmFactory;
|
||||
}
|
||||
|
||||
public Module Module
|
||||
{
|
||||
get => _module;
|
||||
set => SetAndNotify(ref _module, value);
|
||||
}
|
||||
|
||||
public string ActivationType
|
||||
{
|
||||
get => _activationType;
|
||||
set => SetAndNotify(ref _activationType, value);
|
||||
}
|
||||
|
||||
public void SetModule(Module module)
|
||||
{
|
||||
Module = module;
|
||||
ActivationType = Module != null && Module.ActivationRequirementMode == ActivationRequirementType.All
|
||||
? "all requirements are met"
|
||||
: "any requirement is met";
|
||||
|
||||
Items.Clear();
|
||||
if (Module != null)
|
||||
Items.AddRange(Module.ActivationRequirements.Select(_sidebarVmFactory.ModuleActivationRequirementViewModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user