diff --git a/BaseGpsClient.cs b/BaseGpsClient.cs index 7d251ce..825ca02 100644 --- a/BaseGpsClient.cs +++ b/BaseGpsClient.cs @@ -1,5 +1,6 @@ -using System; +using GpsClient2.EventArguments; using GpsClient2.Model; +using System; namespace GpsClient2 { public abstract class BaseGpsClient { diff --git a/ComPortGpsClient.cs b/ComPortGpsClient.cs index c868731..b7792f4 100644 --- a/ComPortGpsClient.cs +++ b/ComPortGpsClient.cs @@ -1,14 +1,10 @@ -using GpsClient2.Model; -using GpsClient2.NmeaMessages; +using GpsClient2.EventArguments; using GpsClient2.Exceptions; +using GpsClient2.Model; +using GpsClient2.NmeaMessages; using System; -using System.Collections.Generic; -using System.Globalization; using System.IO.Ports; -using System.Linq; -using System.Text; using System.Threading; -using System.Threading.Tasks; namespace GpsClient2 { public class ComPortGpsClient : BaseGpsClient { diff --git a/CoordinateConverterUtilities.cs b/CoordinateConverterUtilities.cs index 0a934c4..9001009 100644 --- a/CoordinateConverterUtilities.cs +++ b/CoordinateConverterUtilities.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.InteropServices; namespace GpsClient2 { internal class CoordinateConverterUtilities { diff --git a/Enums.cs b/Enums.cs index e01d9b9..cf27ee7 100644 --- a/Enums.cs +++ b/Enums.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GpsClient2 { +namespace GpsClient2 { public enum CoordinateType { Latitude, Longitude diff --git a/GpsDataEventArgs.cs b/EventArguments/GpsDataEventArgs.cs similarity index 88% rename from GpsDataEventArgs.cs rename to EventArguments/GpsDataEventArgs.cs index 17c55da..151e784 100644 --- a/GpsDataEventArgs.cs +++ b/EventArguments/GpsDataEventArgs.cs @@ -1,13 +1,9 @@ -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.Model; using GpsClient2.NmeaMessages; +using System; +using System.Device.Location; -namespace GpsClient2 { +namespace GpsClient2.EventArguments { public class GpsDataEventArgs : EventArgs { public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89; @@ -15,6 +11,7 @@ namespace GpsClient2 { public double Longitude { get; set; } public double Speed { get; set; } + public double Course { get; set; } public GpsDataEventArgs(GpsLocation gpsLocation) { Latitude = gpsLocation.Latitude; @@ -26,6 +23,7 @@ namespace GpsClient2 { Latitude = gpsLocation.Latitude; Longitude = gpsLocation.Longitude; Speed = gpsLocation.Speed; + Course = gpsLocation.Course; } public GpsDataEventArgs(GeoCoordinate gpsLocation) { diff --git a/EventArguments/GpsStatusEventArgs.cs b/EventArguments/GpsStatusEventArgs.cs new file mode 100644 index 0000000..0f4b7a7 --- /dev/null +++ b/EventArguments/GpsStatusEventArgs.cs @@ -0,0 +1,15 @@ +using System; + +namespace GpsClient2.EventArguments { + public class GpsStatusEventArgs : EventArgs { + public GpsStatus Status { get; set; } + + public GpsStatusEventArgs() { + + } + + public GpsStatusEventArgs(GpsStatus status) { + Status = status; + } + } +} diff --git a/Exceptions/UnknownTypeException.cs b/Exceptions/UnknownTypeException.cs index 9d03135..5e75cab 100644 --- a/Exceptions/UnknownTypeException.cs +++ b/Exceptions/UnknownTypeException.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2.Exceptions { public class UnknownTypeException : Exception { diff --git a/GpsClient2.csproj b/GpsClient2.csproj index 314bae5..9731c9f 100644 --- a/GpsClient2.csproj +++ b/GpsClient2.csproj @@ -46,6 +46,7 @@ + @@ -58,7 +59,7 @@ - + diff --git a/Model/BaseGpsInfo.cs b/Model/BaseGpsInfo.cs index bd964d1..f22cc9f 100644 --- a/Model/BaseGpsInfo.cs +++ b/Model/BaseGpsInfo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GpsClient2.Model { +namespace GpsClient2.Model { public abstract class BaseGpsInfo { public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89; diff --git a/Model/ComPortInfo.cs b/Model/ComPortInfo.cs index 26737c6..5f950d0 100644 --- a/Model/ComPortInfo.cs +++ b/Model/ComPortInfo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GpsClient2.Model { +namespace GpsClient2.Model { public class ComPortInfo : BaseGpsInfo { public string ComPort { get; set; } = "ComPort1"; diff --git a/Model/GpsLocation.cs b/Model/GpsLocation.cs index 8d2f90f..22f9a2b 100644 --- a/Model/GpsLocation.cs +++ b/Model/GpsLocation.cs @@ -1,10 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; namespace GpsClient2.Model { [DataContract] diff --git a/Model/WindowsLocationApiInfo.cs b/Model/WindowsLocationApiInfo.cs index e7bc541..171e798 100644 --- a/Model/WindowsLocationApiInfo.cs +++ b/Model/WindowsLocationApiInfo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GpsClient2.Model { +namespace GpsClient2.Model { public class WindowsLocationApiInfo : BaseGpsInfo { public int Timeout { get; set; } = 1000; diff --git a/NmeaConstants.cs b/NmeaConstants.cs index b75b695..81ba861 100644 --- a/NmeaConstants.cs +++ b/NmeaConstants.cs @@ -2,9 +2,6 @@ using GpsClient2.NmeaMessages; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2 { public static class NmeaConstants { diff --git a/NmeaMessages/GpggaMessage.cs b/NmeaMessages/GpggaMessage.cs index 33662bc..4d45c11 100644 --- a/NmeaMessages/GpggaMessage.cs +++ b/NmeaMessages/GpggaMessage.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2.NmeaMessages { public class GpggaMessage : NmeaMessage { diff --git a/NmeaMessages/GpgsaMessage.cs b/NmeaMessages/GpgsaMessage.cs index a1f2a5c..b4ff831 100644 --- a/NmeaMessages/GpgsaMessage.cs +++ b/NmeaMessages/GpgsaMessage.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2.NmeaMessages { public class GpgsaMessage : NmeaMessage { diff --git a/NmeaMessages/GprmcMessage.cs b/NmeaMessages/GprmcMessage.cs index e5ac660..b92965d 100644 --- a/NmeaMessages/GprmcMessage.cs +++ b/NmeaMessages/GprmcMessage.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2.NmeaMessages { public class GprmcMessage : NmeaMessage { diff --git a/NmeaMessages/GpvtgMessage.cs b/NmeaMessages/GpvtgMessage.cs index a7bccd5..ade3d86 100644 --- a/NmeaMessages/GpvtgMessage.cs +++ b/NmeaMessages/GpvtgMessage.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2.NmeaMessages { public class GpvtgMessage : NmeaMessage { diff --git a/NmeaMessages/NmeaMessage.cs b/NmeaMessages/NmeaMessage.cs index 9c05623..543135f 100644 --- a/NmeaMessages/NmeaMessage.cs +++ b/NmeaMessages/NmeaMessage.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GpsClient2.NmeaMessages { +namespace GpsClient2.NmeaMessages { public abstract class NmeaMessage { public abstract void Parse(string[] messageParts); } diff --git a/NmeaParser.cs b/NmeaParser.cs index 1ed57d7..243ea3e 100644 --- a/NmeaParser.cs +++ b/NmeaParser.cs @@ -1,9 +1,5 @@ using GpsClient2.NmeaMessages; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2 { public class NmeaParser { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 8822502..157eb86 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/StringExtensions.cs b/StringExtensions.cs index 51b4dfe..d4c32eb 100644 --- a/StringExtensions.cs +++ b/StringExtensions.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; namespace GpsClient2 { public static class StringExtensions { diff --git a/WindowsLocationApiGpsClient.cs b/WindowsLocationApiGpsClient.cs index 2052659..1f91c71 100644 --- a/WindowsLocationApiGpsClient.cs +++ b/WindowsLocationApiGpsClient.cs @@ -1,10 +1,7 @@ -using GpsClient2.Model; +using GpsClient2.EventArguments; +using GpsClient2.Model; using System; -using System.Collections.Generic; using System.Device.Location; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace GpsClient2 { public class WindowsLocationApiGpsClient : BaseGpsClient {