get plugin system working

This commit is contained in:
TheXamlGuy
2024-01-04 20:53:49 +00:00
parent da8af59391
commit d45076f2a9
24 changed files with 219 additions and 55 deletions
+10 -9
View File
@@ -1,20 +1,21 @@
namespace Hyperbar.Desktop;
using System.Collections;
using System.Collections.Generic;
namespace Hyperbar.Desktop;
public partial class CommandViewModel :
ObservableCollectionViewModel,
ITemplatedViewModel
{
public CommandViewModel(ITemplateFactory templateFactory)
public CommandViewModel(ITemplateFactory templateFactory,
IEnumerable<ICommandViewModel> commands)
{
TemplateFactory = templateFactory;
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
var d = Items;
foreach (var command in commands)
{
this.Add(command);
}
}
public ITemplateFactory TemplateFactory { get; }