/// <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"); }
/// <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"); }