mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Fixed plugin binding and reworked some interfaces to abstract classes
This commit is contained in:
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()
|
||||
|
||||
Reference in new issue
Block a user