mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +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
@@ -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