Move MatterControl source code into a subdirectory

This commit is contained in:
Nettika 2026-01-28 21:30:58 -08:00
parent 2c6e34243a
commit 70af2d9ae8
Signed by: nettika
SSH key fingerprint: SHA256:f+PJrfIq49zrQ6dQrHj18b+PJKmAldeAMiGdj8IzXCA
2007 changed files with 13 additions and 8 deletions

View file

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
namespace MatterHackers.MatterControl
{
public class SelectedListItems<T> : List<T>
{
public event EventHandler OnAdd;
public event EventHandler OnRemove;
new public void Add(T item)
{
base.Add(item);
if (null != OnAdd)
{
OnAdd(this, null);
}
}
new public void Remove(T item)
{
base.Remove(item);
if (null != OnRemove)
{
OnRemove(this, null);
}
}
// Also fire OnRemove on Clear
new public void Clear()
{
base.Clear();
if (null != OnRemove)
{
OnRemove(this, null);
}
}
}
}