private void Switch(int a, int b) { SpawnRangeListElement obj = Collection[a]; Collection[a] = Collection[b]; Collection[b] = obj; }
public void gridCollection_DoubleClick(object sender, RoutedEventArgs e) { //int index = lbxCollection.IndexFromPoint(e.X, e.Y); int index = CurrentElement; if (index > -1) { SpawnRangeListElement element = Collection[index]; OnEditItem?.Invoke(index, element.Value, editItem); } }
private void editItem(int index, object element) { index = Math.Min(Math.Max(0, index), Collection.Count); Collection[index] = new SpawnRangeListElement(StringConv, AddMin, AddMax, Collection[index].Start, Collection[index].End, Collection[index].Weight, element); }