private void PrepareGenusDescriptors() { fireGenusDescriptor = new GenusDescriptor() { Genus = Genus.Fire, PictureBox = fireGenusPictureBox, ActiveImage = Properties.Resources.genus_fire, InactiveImage = Properties.Resources.genus_fire_gray }; waterGenusDescriptor = new GenusDescriptor() { Genus = Genus.Water, PictureBox = waterGenusPictureBox, ActiveImage = Properties.Resources.genus_water, InactiveImage = Properties.Resources.genus_water_gray }; windGenusDescriptor = new GenusDescriptor() { Genus = Genus.Wind, PictureBox = windGenusPictureBox, ActiveImage = Properties.Resources.genus_wind, InactiveImage = Properties.Resources.genus_wind_gray }; activeGenusDescriptor = fireGenusDescriptor; }
private void SetActiveGenus(Genus genus) { activeGenusDescriptor.PictureBox.BackColor = Color.Yellow; activeGenusDescriptor.PictureBox.Image = activeGenusDescriptor.InactiveImage; switch (genus) { case Genus.Fire: activeGenusDescriptor = fireGenusDescriptor; break; case Genus.Water: activeGenusDescriptor = waterGenusDescriptor; break; case Genus.Wind: activeGenusDescriptor = windGenusDescriptor; break; } activeGenusDescriptor.PictureBox.BackColor = Color.White; activeGenusDescriptor.PictureBox.Image = activeGenusDescriptor.ActiveImage; }