Exemplo n.º 1
0
 /// <summary>
 /// Reads and controls dog fields
 /// </summary>
 /// <param name="dog"></param>
 private bool ReadDogFields(MammalFolder.Dog dog)
 {
     string breed = tbxDogBreed.Text;
     if (breed != null)
     {
         dog.Breed = breed;
     }
     return CheckFields(dog.Breed, "breed", 0, "default");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Reads and controls cat fields
 /// </summary>
 /// <param name="cat"></param>
 private bool ReadCatFields(MammalFolder.Cat cat)
 {
     int length;
     if (int.TryParse(tbxCatFurLength.Text, out length))
     {
         cat.FurLength = length;
     }
     else
     {
         cat.FurLength = -1;
     }
     return CheckFields("default", "default", cat.FurLength, "furlength");
 }