using System; using GpsClient2.Model; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Device.Location; using GpsClient2.NmeaMessages; namespace GpsClient2 { public class GpsDataEventArgs : EventArgs { public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89; public double Latitude { get; set; } public double Longitude { get; set; } public double Speed { get; set; } public GpsDataEventArgs(GpsLocation gpsLocation) { Latitude = gpsLocation.Latitude; Longitude = gpsLocation.Longitude; Speed = gpsLocation.Speed; } public GpsDataEventArgs(GprmcMessage gpsLocation) { Latitude = gpsLocation.Latitude; Longitude = gpsLocation.Longitude; Speed = gpsLocation.Speed; } public GpsDataEventArgs(GeoCoordinate gpsLocation) { Latitude = gpsLocation.Latitude; Longitude = gpsLocation.Longitude; Speed = gpsLocation.Speed; } public GpsDataEventArgs(double latitude, double longitude, double speed = 0.0d) { Latitude = latitude; Longitude = longitude; Speed = speed; } public override string ToString() { return $"Latitude: {Latitude} - Longitude: {Longitude} - Speed: {Speed}"; } } }