This commit is contained in:
TheXamlGuy
2024-01-06 14:34:25 +00:00
parent 53537aa4c7
commit e1c7846e45
73 changed files with 251 additions and 198 deletions
+1 -3
View File
@@ -2,6 +2,4 @@
public interface IPrimaryCommand
{
}
}
@@ -1,6 +1,6 @@
namespace Hyperbar.Windows.Primary;
public class KeyAcceleratorCommand :
public class KeyAcceleratorCommand :
IPrimaryCommand
{
public string? Icon { get; set; }
@@ -8,5 +8,4 @@ public class KeyAcceleratorCommand :
public string? Key { get; set; }
public string[]? Modifiers { get; set; }
}
}
@@ -1,3 +1,4 @@
using Hyperbar.Extensions;
using Microsoft.Extensions.DependencyInjection;
namespace Hyperbar.Windows.Primary;
@@ -7,5 +8,4 @@ public class PrimaryWidgetBuilder :
{
public void Create(IServiceCollection services) => services.AddConfiguration<PrimaryWidgetConfiguration>()
.AddWidgetTemplate<PrimaryWidgetViewModel>();
}
}
@@ -1,8 +1,6 @@
namespace Hyperbar.Windows.Primary;
public class PrimaryWidgetConfiguration :
public class PrimaryWidgetConfiguration :
List<IPrimaryCommand>
{
}
}
@@ -3,17 +3,16 @@
public class PrimaryWidgetViewModel :
WidgetViewModelBase
{
public PrimaryWidgetViewModel(ITemplateFactory templateFactory,
public PrimaryWidgetViewModel(ITemplateFactory templateFactory,
IServiceFactory serviceFactory) : base(templateFactory, serviceFactory)
{
;
Add<WidgetButtonViewModel>("test 1", new Action(() => {
Add<WidgetButtonViewModel>("test 1", new Action(() =>
{
}));
Add<WidgetButtonViewModel>("test 2", new Action(() => { }));
Add<WidgetButtonViewModel>("test 4", new Action(() => { }));
Add<WidgetButtonViewModel>("test 5", new Action(() => { }));
}
}
}