mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Plugins - Implemented features
Core - Removed Stylet dependency for #500
This commit is contained in:
1 parent
b56966c585
commit
e812929215
139 files changed
+1635
-1106
No files matched your search
@@ -10,7 +10,7 @@ namespace Artemis.Storage.Entities.Module
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid PluginGuid { get; set; }
|
||||
public string ModuleId { get; set; }
|
||||
public int PriorityCategory { get; set; }
|
||||
public int Priority { get; set; }
|
||||
}
|
||||
|
||||
@@ -8,16 +8,21 @@ namespace Artemis.Storage.Entities.Plugins
|
||||
/// </summary>
|
||||
public class PluginEntity
|
||||
{
|
||||
public PluginEntity()
|
||||
{
|
||||
Features = new List<PluginFeatureEntity>();
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
public List<PluginImplementationEntity> Implementations { get; set; }
|
||||
public List<PluginFeatureEntity> Features { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration of a plugin implementation, each implementation has one configuration
|
||||
/// Represents the configuration of a plugin feature, each feature has one configuration
|
||||
/// </summary>
|
||||
public class PluginImplementationEntity
|
||||
public class PluginFeatureEntity
|
||||
{
|
||||
public string Type { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
public class DataModelPathEntity
|
||||
{
|
||||
public string Path { get; set; }
|
||||
public Guid? DataModelGuid { get; set; }
|
||||
public string DataModelId { get; set; }
|
||||
|
||||
public PathWrapperType WrapperType { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
public class LayerEffectEntity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid PluginGuid { get; set; }
|
||||
public string ProviderId { get; set; }
|
||||
public string EffectType { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid PluginGuid { get; set; }
|
||||
public string ModuleId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Storage.Entities.Profile.DataBindings;
|
||||
|
||||
namespace Artemis.Storage.Entities.Profile
|
||||
@@ -12,7 +11,7 @@ namespace Artemis.Storage.Entities.Profile
|
||||
DataBindingEntities = new List<DataBindingEntity>();
|
||||
}
|
||||
|
||||
public Guid PluginGuid { get; set; }
|
||||
public string FeatureId { get; set; }
|
||||
public string Path { get; set; }
|
||||
|
||||
public string Value { get; set; }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Storage.Entities.Module;
|
||||
|
||||
namespace Artemis.Storage.Repositories.Interfaces
|
||||
@@ -7,7 +6,7 @@ namespace Artemis.Storage.Repositories.Interfaces
|
||||
public interface IModuleRepository : IRepository
|
||||
{
|
||||
void Add(ModuleSettingsEntity moduleSettingsEntity);
|
||||
ModuleSettingsEntity GetByPluginGuid(Guid guid);
|
||||
ModuleSettingsEntity GetByModuleId(string moduleId);
|
||||
List<ModuleSettingsEntity> GetAll();
|
||||
List<ModuleSettingsEntity> GetByCategory(int category);
|
||||
void Save(ModuleSettingsEntity moduleSettingsEntity);
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Artemis.Storage.Repositories.Interfaces
|
||||
void Remove(ProfileEntity profileEntity);
|
||||
List<ProfileEntity> GetAll();
|
||||
ProfileEntity Get(Guid id);
|
||||
List<ProfileEntity> GetByPluginGuid(Guid pluginGuid);
|
||||
List<ProfileEntity> GetByModuleId(string moduleId);
|
||||
void Save(ProfileEntity profileEntity);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Artemis.Storage.Repositories
|
||||
internal ModuleRepository(LiteRepository repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_repository.Database.GetCollection<ModuleSettingsEntity>().EnsureIndex(s => s.PluginGuid, true);
|
||||
_repository.Database.GetCollection<ModuleSettingsEntity>().EnsureIndex(s => s.ModuleId, true);
|
||||
}
|
||||
|
||||
public void Add(ModuleSettingsEntity moduleSettingsEntity)
|
||||
@@ -21,9 +21,9 @@ namespace Artemis.Storage.Repositories
|
||||
_repository.Insert(moduleSettingsEntity);
|
||||
}
|
||||
|
||||
public ModuleSettingsEntity GetByPluginGuid(Guid guid)
|
||||
public ModuleSettingsEntity GetByModuleId(string moduleId)
|
||||
{
|
||||
return _repository.FirstOrDefault<ModuleSettingsEntity>(s => s.PluginGuid == guid);
|
||||
return _repository.FirstOrDefault<ModuleSettingsEntity>(s => s.ModuleId == moduleId);
|
||||
}
|
||||
|
||||
public List<ModuleSettingsEntity> GetAll()
|
||||
|
||||
@@ -36,12 +36,12 @@ namespace Artemis.Storage.Repositories
|
||||
return _repository.FirstOrDefault<ProfileEntity>(p => p.Id == id);
|
||||
}
|
||||
|
||||
public List<ProfileEntity> GetByPluginGuid(Guid pluginGuid)
|
||||
public List<ProfileEntity> GetByModuleId(string moduleId)
|
||||
{
|
||||
return _repository.Query<ProfileEntity>()
|
||||
.Include(p => p.Folders)
|
||||
.Include(p => p.Layers)
|
||||
.Where(s => s.PluginGuid == pluginGuid)
|
||||
.Where(s => s.ModuleId == moduleId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user