示例#1
0
        private void AddPackage()
        {
            if (string.IsNullOrWhiteSpace(SelectedAvailableResourcePack) ||
                ResourcePacks.Contains(SelectedAvailableResourcePack))
            {
                return;
            }

            ResourcePacks.Add(SelectedAvailableResourcePack);
            SelectedResourcePack = ResourcePacks.Last();
        }
示例#2
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];
        }