Release 17 updates

This commit is contained in:
Brett Hewitson 2020-07-15 17:29:43 +10:00
parent 38dededb14
commit 4a54288072
11 changed files with 306 additions and 19 deletions

View file

@ -96,6 +96,17 @@ namespace ServerManagerTool.Plugin.Discord
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));
}
public void Move(int oldIndex, int newIndex)
{
var item = _listObject.ElementAt(oldIndex);
if (item != null)
{
_listObject.Remove(item);
_listObject.Insert(newIndex, item);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, item, newIndex, oldIndex));
}
}
public bool Remove(T item)
{
int index = _listObject.IndexOf(item);