Wire up notification system for ContentChanged -> UI listeners

This commit is contained in:
John Lewin 2017-09-29 17:25:50 -07:00
parent 2b1fcff98b
commit 123f21dcab
5 changed files with 52 additions and 1 deletions

View file

@ -59,6 +59,8 @@ namespace MatterHackers.MatterControl.Library
public interface ILibraryWritableContainer : ILibraryContainer
{
event EventHandler<ItemChangedEventArgs> ItemContentChanged;
void Add(IEnumerable<ILibraryItem> items);
void Remove(IEnumerable<ILibraryItem> items);
void Rename(ILibraryItem item, string revisedName);
@ -75,4 +77,14 @@ namespace MatterHackers.MatterControl.Library
RenameItems,
RemoveItems
}
public class ItemChangedEventArgs : EventArgs
{
public ILibraryItem LibraryItem { get; }
public ItemChangedEventArgs(ILibraryItem libraryItem)
{
this.LibraryItem = libraryItem;
}
}
}