Ejemplo n.º 1
0
        private void Switch(int a, int b)
        {
            SpawnListElement obj = Collection[a];

            Collection[a] = Collection[b];
            Collection[b] = obj;
        }
Ejemplo n.º 2
0
        public void gridCollection_DoubleClick(object sender, RoutedEventArgs e)
        {
            //int index = lbxCollection.IndexFromPoint(e.X, e.Y);
            int index = CurrentElement;

            if (index > -1)
            {
                SpawnListElement element = Collection[index];
                OnEditItem?.Invoke(index, element.Value, editItem);
            }
        }
Ejemplo n.º 3
0
 private void editItem(int index, object element)
 {
     index             = Math.Min(Math.Max(0, index), Collection.Count);
     Collection[index] = new SpawnListElement(StringConv, Collection[index].Weight, Collection[index].Chance, element);
 }