예제 #1
0
        /// <summary>
        /// Compares GeoLocation instances for equality
        /// </summary>
        /// <param name="toCompare">To compare.</param>
        /// <returns>True if equal; otherwise false</returns>
        public bool Equals(GeoLocation toCompare)
        {
            // Avoid null reference exceptions
            if (toCompare == null)
            {
                return false;
            }

            // Check comparison types for equality before object comparison
            if (GetType() != toCompare.GetType())
            {
                return false;
            }

            GeoLocation location = (GeoLocation)toCompare;

            // Check for equality of latitude
            if (!this.Latitude.Equals(location.Latitude))
            {
                return false;
            }

            // Check for equality of longitude
            return this.Longitude.Equals(toCompare.Longitude);
        }
예제 #2
0
 public CellIdCollectorEventArgs(GeoLocation geoLocation)
 {
     GeoLocation = geoLocation;
 }
예제 #3
0
        private void CellIdCollector_CellIdFound(object sender, TrainStationAdvisor.ClassLibrary.EventArgs.CellIdCollectorEventArgs e)
        {
            Logger.Log("Cell and Location Found");

            m_GeoLocation = e.GeoLocation;
            BeginInvoke(m_UpdateDataHandler);
            //Invoke(m_UpdateDataHandler);
        }