|
|
|
@ -3,6 +3,7 @@ using Blazor.Pages;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.JSInterop;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.Collections.Specialized;
|
|
|
|
|
|
|
|
|
|
namespace Blazor.Components
|
|
|
|
|
{
|
|
|
|
@ -18,6 +19,7 @@ namespace Blazor.Components
|
|
|
|
|
public Inventory()
|
|
|
|
|
{
|
|
|
|
|
Actions = new ObservableCollection<InventoryAction>();
|
|
|
|
|
Actions.CollectionChanged += OnActionsCollectionChanged;
|
|
|
|
|
}
|
|
|
|
|
public void update()
|
|
|
|
|
{
|
|
|
|
@ -25,6 +27,9 @@ namespace Blazor.Components
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|