Exemple #1
0
        private void SwapEquipment(int indexA, int indexB)
        {
            Equipment tmpGear = equipment[indexA];

            equipment[indexA] = equipment[indexB];
            equipment[indexB] = tmpGear;

            if (indexA < equipmentImages.Count &&
                indexB < equipmentImages.Count)
            {
                EquipmentImage tmpGearImage = equipmentImages[indexA];
                equipmentImages[indexA] = equipmentImages[indexB];
                equipmentImages[indexB] = tmpGearImage;
            }

            ReloadGearList();
        }
Exemple #2
0
        private void LoadGearImages()
        {
            for (int i = 0; i < equipment.Count; i++)
            {
                string serverLocation = Program.main.ClientLocation + equipment[i].source;

                if (!File.Exists(serverLocation))
                {
                    continue;
                }

                if (i >= equipmentImages.Count)
                {
                    equipmentImages.Add(new EquipmentImage(serverLocation));
                }
                else if (equipmentImages[i].source != equipment[i].source)
                {
                    equipmentImages[i] = new EquipmentImage(serverLocation);
                }
            }
        }