Added profile deserialization

This commit is contained in:
Robert committed 2019-11-19 17:31:17 +01:00
1 parent e18195c277
commit 296414001b
9 files changed
+132 -73

No files matched your search

@@ -72,10 +72,10 @@ namespace Artemis.UI.Screens.Module.ProfileEditor
Profiles.Clear();
Profiles.AddRange(profiles);
if (!profiles.Any())
{
var profile = new Profile(Module.PluginInfo, "Default");
}
// if (!profiles.Any())
// {
// var profile = new Profile(Module.PluginInfo, "Default");
// }
}
}
}
@@ -74,13 +74,14 @@ namespace Artemis.UI.Screens.SurfaceEditor
private void LoadSurfaceConfigurations()
{
// Get surface configs
var configs = _surfaceService.SurfaceConfigurations;
var configs = _surfaceService.SurfaceConfigurations.ToList();
// Get the active config, if empty, create a default config
var activeConfig = _surfaceService.ActiveSurface;
if (activeConfig == null)
{
activeConfig = CreateSurfaceConfiguration("Default");
configs.Add(activeConfig);
_surfaceService.SetActiveSurfaceConfiguration(activeConfig);
}