Fixed plugin binding and reworked some interfaces to abstract classes

This commit is contained in:
SpoinkyNL committed 2019-04-11 09:20:54 +02:00
1 parent 90cd27b0c6
commit 155073f14d
17 files changed
+88 -82

No files matched your search

@@ -13,23 +13,20 @@ namespace Artemis.Plugins.Modules.General
{
public class GeneralModule : IModule
{
private readonly IRgbService _rgbService;
private readonly RGBSurface _surface;
private Dictionary<Led, Color> _colors;
public GeneralModule()
{
}
public GeneralModule(IRgbService rgbService)
{
_rgbService = rgbService;
_surface = _rgbService.Surface;
var rgbService1 = rgbService;
_surface = rgbService1.Surface;
_colors = new Dictionary<Led, Color>();
_rgbService.FinishedLoadedDevices += (sender, args) => PopulateColors();
rgbService1.FinishedLoadedDevices += (sender, args) => PopulateColors();
}
public string DisplayName => "General";
// True since the main data model is all this module shows
public bool ExpandsMainDataModel => true;
@@ -58,7 +55,7 @@ namespace Artemis.Plugins.Modules.General
public IScreen GetMainViewModel()
{
return new GeneralViewModel();
return new GeneralViewModel(this);
}
public void Dispose()