/// <summary> /// Reads and control eagle fields /// </summary> /// <param name="eagle"></param> private bool ReadEagleFields(BirdFolder.Eagle eagle) { int speed; if (int.TryParse(tbxEagleSpeed.Text, out speed)) { eagle.Speed = speed; } else { eagle.Speed = -1; } return CheckFields("default", "default", eagle.Speed, "speed"); }
/// <summary> /// Reads and control duck fields /// </summary> /// <param name="duck"></param> private bool ReadDuckFields(BirdFolder.Duck duck) { double sound; if (double.TryParse(tBxDuckSound.Text, out sound)) { duck.SoundDecibel = sound; } return CheckFields("default", "default", (int)duck.SoundDecibel, "sound"); }