|
|
|
@ -3,7 +3,8 @@ using Blazor.Pages;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.JSInterop;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
|
|
|
|
|
using System.Collections.Specialized;
|
|
|
|
|
|
|
|
|
|
namespace Blazor.Components
|
|
|
|
|
{
|
|
|
|
|
partial class Inventory
|
|
|
|
@ -17,7 +18,8 @@ namespace Blazor.Components
|
|
|
|
|
|
|
|
|
|
public Inventory()
|
|
|
|
|
{
|
|
|
|
|
Actions = new ObservableCollection<InventoryAction>();
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|