Пример #1
0
        public void RemoveTest()
        {
            var searcher    = new LatLonSearcher <Waypoint>(5, 10);
            var wptToRemove = new Waypoint("", -55.0, 100.0);

            for (int i = -90; i <= 90; i++)
            {
                for (int j = -180; j <= 180; j++)
                {
                    if (i == -55 && j == 100)
                    {
                        searcher.Add(wptToRemove);
                    }
                    else
                    {
                        searcher.Add(new Waypoint("", i, j));
                    }
                }
            }

            searcher.Remove(wptToRemove);

            var result = searcher.Find(-55.0, 100.0, 300.0);

            Assert.IsFalse(result.Contains(wptToRemove));
        }
Пример #2
0
        /// <summary>
        /// Removes the airport if icao is found. Otherwise does nothing.
        /// Returns the icao was removed.
        /// </summary>
        public bool Remove(string icao)
        {
            var ad = this[icao];

            if (ad == null)
            {
                return(false);
            }

            airportData.Remove(icao);
            airportFinder.Remove(ad);
            return(true);
        }
Пример #3
0
 public void RemoveAt(int index)
 {
     _finder.Remove(new WptSeachWrapper(index, _content[index].Lat, _content[index].Lon));
     _content.RemoveAt(index);
 }