Beispiel #1
0
        /// <summary>
        /// When Species is selected, display groupbox for species specific info.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lstSpecies_SelectedIndexChanged(object sender, EventArgs e)
        {
            gbxSpecies.Text     = lstSpecies.Text;                        // name groupbox with selected species
            lblSpeciesInfo.Text = AnimalMaker.LabelText(lstSpecies.Text); //label for species specific info

            //if Animal Category "all" is selected, species selection generates groupbox name and
            //label for animal category specific info.
            if (lstAnimalCategory.Text == "all")
            {
                gbxAnimalCategory.Text = AnimalMaker.GroupBoxName(lstSpecies.Text);
                lblAnimalCatInfo.Text  = AnimalMaker.AnimalCategoryInfoWhenAnimalSelected(lstSpecies.Text);
            }
            gbxSpecies.Visible = true; //make groupbox visible
        }