mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Profiles - Added toggle to enable/disable folders, layers and effects
Profiles - Fixed folders not saving they children properly UI - Show version and frame time in window title
This commit is contained in:
1 parent
7921a4f932
commit
0903865c7d
27 files changed
+315
-97
No files matched your search
@@ -19,6 +19,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
|
||||
public int Order { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
[BsonRef("ProfileEntity")]
|
||||
public ProfileEntity Profile { get; set; }
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
public Guid PluginGuid { get; set; }
|
||||
public string EffectType { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public bool HasBeenRenamed { get; set; }
|
||||
public int Order { get; set; }
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
|
||||
public int Order { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public List<LedEntity> Leds { get; set; }
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
using Artemis.Storage.Migrations.Interfaces;
|
||||
using LiteDB;
|
||||
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
public class ProfileEntitiesEnabledMigration : IStorageMigration
|
||||
{
|
||||
public int UserVersion => 2;
|
||||
|
||||
public void Apply(LiteRepository repository)
|
||||
{
|
||||
var profiles = repository.Query<ProfileEntity>().ToList();
|
||||
foreach (var profileEntity in profiles)
|
||||
{
|
||||
foreach (var profileEntityFolder in profileEntity.Folders)
|
||||
{
|
||||
profileEntityFolder.Enabled = true;
|
||||
foreach (var layerEffectEntity in profileEntityFolder.LayerEffects)
|
||||
layerEffectEntity.Enabled = true;
|
||||
}
|
||||
|
||||
foreach (var profileEntityLayer in profileEntity.Layers)
|
||||
{
|
||||
profileEntityLayer.Enabled = true;
|
||||
foreach (var layerEffectEntity in profileEntityLayer.LayerEffects)
|
||||
layerEffectEntity.Enabled = true;
|
||||
}
|
||||
|
||||
repository.Upsert(profileEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user