mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-18 09:35:48 +00:00
Release 17 updates
This commit is contained in:
parent
38dededb14
commit
4a54288072
11 changed files with 306 additions and 19 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue