Пример #1
0
        private void MoveDown()
        {
            if (SelectedResourcePack == null || SelectedResourcePack == ResourcePacks.Last())
            {
                return;
            }

            int index = ResourcePacks.IndexOf(SelectedResourcePack);
            var temp  = ResourcePacks[index];

            ResourcePacks.RemoveAt(index);
            ResourcePacks.Insert(index + 1, temp);
            SelectedResourcePack = ResourcePacks[index + 1];
        }
Пример #2
0
        private void RemoveSelected()
        {
            if (string.IsNullOrWhiteSpace(SelectedResourcePack))
            {
                return;
            }

            int index = ResourcePacks.IndexOf(SelectedResourcePack) - 1;

            ResourcePacks.Remove(SelectedResourcePack);
            if (index < 0)
            {
                return;
            }
            SelectedResourcePack = ResourcePacks[index];
        }