/// <summary>
        /// Start the quiz.
        /// </summary>
        /// <param name="szDefaultAirportList">The list of airports to use</param>
        protected void BeginQuiz(IEnumerable <airport> rgAirports)
        {
            mvQuiz.SetActiveView(vwQuestions);

            // Strip any navaids from the list; not an issue for user airports, but an issue for US airports
            m_AirportQuiz.Init(AirportList.RemoveNavaids(rgAirports));
            NextQuestion();
        }
Пример #2
0
        /// <summary>
        /// Pass in an array of airports and get back the latitude/longitude bounding box of all of the airports
        /// </summary>
        /// <returns>A LatLongBox.</returns>
        public LatLongBox LatLongBox(bool fAirportsOnly = false)
        {
            airport[] rgap = fAirportsOnly ? AirportList.RemoveNavaids(m_rgAirports) : m_rgAirports.ToArray();
            if (rgap.Length == 0)
            {
                return(new LatLongBox(new LatLong(0.0, 0.0)));
            }

            LatLongBox llb = new LatLongBox(((airport)rgap[0]).LatLong);

            foreach (airport ap in rgap)
            {
                llb.ExpandToInclude(ap.LatLong);
            }

            return(llb);
        }