Datamodel - Added basic infrastructure

This commit is contained in:
SpoinkyNL committed 2020-04-26 17:30:43 +02:00
1 parent dad7591af5
commit 349e0a2c41
23 files changed
+206 -43

No files matched your search

@@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Linq;
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.Colors;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.Core.Plugins.LayerBrush;
using SkiaSharp;
@@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Linq;
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.Colors;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.Core.Plugins.LayerBrush;
using Artemis.Core.Services.Interfaces;
@@ -1,15 +1,35 @@
using Artemis.Core.Attributes;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Abstract.DataModels;
using Artemis.Core.Plugins.Abstract.DataModels.Attributes;
using SkiaSharp;
namespace Artemis.Plugins.Modules.General
{
public class GeneralDataModel : ModuleDataModel
public class GeneralDataModel : DataModel
{
public GeneralDataModel(Module module) : base(module)
{
}
[DataModelProperty(DisplayName = "Unique boolean")]
public bool PropertyUniqueToThisDm { get; set; }
[DataModelProperty(Name = "A test string", Description = "This is a test string that's not of any use outside testing!")]
public string TestString { get; set; }
[DataModelProperty(Name = "A test boolean", Description = "This is a test boolean that's not of any use outside testing!")]
public bool TestBoolean { get; set; }
[DataModelProperty(Name = "Player info", Description = "[TEST] Contains information about the player")]
public PlayerInfo PlayerInfo { get; set; }
}
public class PlayerInfo
{
[DataModelProperty(Name = "A test string", Description = "This is a test string that's not of any use outside testing!")]
public string TestString { get; set; }
[DataModelProperty(Name = "A test boolean", Description = "This is a test boolean that's not of any use outside testing!")]
public bool TestBoolean { get; set; }
[DataModelProperty()]
public SKRect SkRect { get; set; }
}
}
@@ -17,10 +17,11 @@ namespace Artemis.Plugins.Modules.General
DisplayName = "General";
DisplayIcon = "AllInclusive";
ExpandsMainDataModel = true;
DataModel = new GeneralDataModel(this);
var testSetting = _settings.GetSetting("TestSetting", DateTime.Now);
}
public override void EnablePlugin()
{
}