mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Marked all service implementations as internal
Core - Enabled XML docs Modules - Added DI to module VMs
This commit is contained in:
1 parent
795b4d672b
commit
aa3c3d6b95
29 files changed
+134
-46
No files matched your search
@@ -136,7 +136,7 @@
|
||||
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
||||
<PackageReference Include="Serilog" Version="2.9.0" />
|
||||
<PackageReference Include="SkiaSharp.Views.WPF" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Ninject;
|
||||
using Ninject.Parameters;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Module
|
||||
@@ -9,13 +12,15 @@ namespace Artemis.UI.Screens.Module
|
||||
public class ModuleRootViewModel : Conductor<Screen>.Collection.OneActive
|
||||
{
|
||||
private readonly IProfileEditorVmFactory _profileEditorVmFactory;
|
||||
private readonly IKernel _kernel;
|
||||
|
||||
public ModuleRootViewModel(Core.Plugins.Abstract.Module module, IProfileEditorVmFactory profileEditorVmFactory)
|
||||
public ModuleRootViewModel(Core.Plugins.Abstract.Module module, IProfileEditorVmFactory profileEditorVmFactory, IKernel kernel)
|
||||
{
|
||||
DisplayName = module?.DisplayName;
|
||||
Module = module;
|
||||
|
||||
_profileEditorVmFactory = profileEditorVmFactory;
|
||||
_kernel = kernel;
|
||||
|
||||
Task.Run(AddTabsAsync);
|
||||
}
|
||||
@@ -34,8 +39,18 @@ namespace Artemis.UI.Screens.Module
|
||||
Items.Add(profileEditor);
|
||||
}
|
||||
|
||||
var moduleViewModels = Module.GetViewModels();
|
||||
Items.AddRange(moduleViewModels);
|
||||
var moduleTabs = Module.GetModuleTabs();
|
||||
if (moduleTabs != null)
|
||||
{
|
||||
foreach (var moduleTab in moduleTabs.Where(m => m != null))
|
||||
{
|
||||
var module = new ConstructorArgument("module", Module);
|
||||
var displayName = new ConstructorArgument("displayName", DisplayName);
|
||||
|
||||
var viewModel = (ModuleViewModel) _kernel.Get(moduleTab.Type, module, displayName);
|
||||
Items.Add(viewModel);
|
||||
}
|
||||
}
|
||||
|
||||
ActiveItem = Items.FirstOrDefault();
|
||||
}
|
||||
|
||||
@@ -233,6 +233,7 @@ namespace Artemis.UI.Screens.ProfileEditor
|
||||
LoadWorkspaceSettings();
|
||||
Module.IsProfileUpdatingDisabled = true;
|
||||
Module.ActiveProfileChanged += ModuleOnActiveProfileChanged;
|
||||
|
||||
Execute.PostToUIThread(LoadProfiles);
|
||||
base.OnInitialActivate();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user