mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Started work on profiles
This commit is contained in:
1 parent
36f3ec3071
commit
bb56a45a7f
28 files changed
+575
-375
No files matched your search
@@ -11,9 +11,21 @@ namespace Artemis.Core.Models.Profile
|
||||
{
|
||||
public class Profile : IProfileElement
|
||||
{
|
||||
private Profile(PluginInfo pluginInfo)
|
||||
internal Profile(PluginInfo pluginInfo, ProfileEntity profileEntity, IPluginService pluginService)
|
||||
{
|
||||
PluginInfo = pluginInfo;
|
||||
Name = profileEntity.Name;
|
||||
|
||||
// Populate the profile starting at the root, the rest is populated recursively
|
||||
Children = new List<IProfileElement> {Folder.FromFolderEntity(this, profileEntity.RootFolder, pluginService)};
|
||||
}
|
||||
|
||||
internal Profile(PluginInfo pluginInfo, string name)
|
||||
{
|
||||
PluginInfo = pluginInfo;
|
||||
Name = name;
|
||||
|
||||
Children = new List<IProfileElement>();
|
||||
}
|
||||
|
||||
public PluginInfo PluginInfo { get; }
|
||||
@@ -46,18 +58,6 @@ namespace Artemis.Core.Models.Profile
|
||||
}
|
||||
}
|
||||
|
||||
public static Profile FromProfileEntity(PluginInfo pluginInfo, ProfileEntity profileEntity, IPluginService pluginService)
|
||||
{
|
||||
var profile = new Profile(pluginInfo) {Name = profileEntity.Name};
|
||||
lock (profile)
|
||||
{
|
||||
// Populate the profile starting at the root, the rest is populated recursively
|
||||
profile.Children.Add(Folder.FromFolderEntity(profile, profileEntity.RootFolder, pluginService));
|
||||
|
||||
return profile;
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate()
|
||||
{
|
||||
lock (this)
|
||||
|
||||
Reference in new issue
Block a user