added course to GpsDataEventArgs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using GpsClient2.EventArguments;
|
||||||
using GpsClient2.Model;
|
using GpsClient2.Model;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
public abstract class BaseGpsClient {
|
public abstract class BaseGpsClient {
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
using GpsClient2.Model;
|
using GpsClient2.EventArguments;
|
||||||
using GpsClient2.NmeaMessages;
|
|
||||||
using GpsClient2.Exceptions;
|
using GpsClient2.Exceptions;
|
||||||
|
using GpsClient2.Model;
|
||||||
|
using GpsClient2.NmeaMessages;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
public class ComPortGpsClient : BaseGpsClient {
|
public class ComPortGpsClient : BaseGpsClient {
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
internal class CoordinateConverterUtilities {
|
internal class CoordinateConverterUtilities {
|
||||||
|
|||||||
8
Enums.cs
8
Enums.cs
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace GpsClient2 {
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
|
||||||
public enum CoordinateType {
|
public enum CoordinateType {
|
||||||
Latitude,
|
Latitude,
|
||||||
Longitude
|
Longitude
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
using System;
|
using GpsClient2.Model;
|
||||||
using GpsClient2.Model;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Device.Location;
|
|
||||||
using GpsClient2.NmeaMessages;
|
using GpsClient2.NmeaMessages;
|
||||||
|
using System;
|
||||||
|
using System.Device.Location;
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2.EventArguments {
|
||||||
public class GpsDataEventArgs : EventArgs {
|
public class GpsDataEventArgs : EventArgs {
|
||||||
public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89;
|
public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89;
|
||||||
|
|
||||||
@@ -15,6 +11,7 @@ namespace GpsClient2 {
|
|||||||
public double Longitude { get; set; }
|
public double Longitude { get; set; }
|
||||||
|
|
||||||
public double Speed { get; set; }
|
public double Speed { get; set; }
|
||||||
|
public double Course { get; set; }
|
||||||
|
|
||||||
public GpsDataEventArgs(GpsLocation gpsLocation) {
|
public GpsDataEventArgs(GpsLocation gpsLocation) {
|
||||||
Latitude = gpsLocation.Latitude;
|
Latitude = gpsLocation.Latitude;
|
||||||
@@ -26,6 +23,7 @@ namespace GpsClient2 {
|
|||||||
Latitude = gpsLocation.Latitude;
|
Latitude = gpsLocation.Latitude;
|
||||||
Longitude = gpsLocation.Longitude;
|
Longitude = gpsLocation.Longitude;
|
||||||
Speed = gpsLocation.Speed;
|
Speed = gpsLocation.Speed;
|
||||||
|
Course = gpsLocation.Course;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GpsDataEventArgs(GeoCoordinate gpsLocation) {
|
public GpsDataEventArgs(GeoCoordinate gpsLocation) {
|
||||||
15
EventArguments/GpsStatusEventArgs.cs
Normal file
15
EventArguments/GpsStatusEventArgs.cs
Normal file
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.Exceptions {
|
namespace GpsClient2.Exceptions {
|
||||||
public class UnknownTypeException : Exception {
|
public class UnknownTypeException : Exception {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
<Compile Include="BaseGpsClient.cs" />
|
<Compile Include="BaseGpsClient.cs" />
|
||||||
<Compile Include="CoordinateConverterUtilities.cs" />
|
<Compile Include="CoordinateConverterUtilities.cs" />
|
||||||
<Compile Include="Enums.cs" />
|
<Compile Include="Enums.cs" />
|
||||||
|
<Compile Include="EventArguments\GpsStatusEventArgs.cs" />
|
||||||
<Compile Include="Exceptions\UnknownTypeException.cs" />
|
<Compile Include="Exceptions\UnknownTypeException.cs" />
|
||||||
<Compile Include="Model\BaseGpsInfo.cs" />
|
<Compile Include="Model\BaseGpsInfo.cs" />
|
||||||
<Compile Include="Model\ComPortInfo.cs" />
|
<Compile Include="Model\ComPortInfo.cs" />
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
<Compile Include="NmeaParser.cs" />
|
<Compile Include="NmeaParser.cs" />
|
||||||
<Compile Include="StringExtensions.cs" />
|
<Compile Include="StringExtensions.cs" />
|
||||||
<Compile Include="ComPortGpsClient.cs" />
|
<Compile Include="ComPortGpsClient.cs" />
|
||||||
<Compile Include="GpsDataEventArgs.cs" />
|
<Compile Include="EventArguments\GpsDataEventArgs.cs" />
|
||||||
<Compile Include="Model\GpsLocation.cs" />
|
<Compile Include="Model\GpsLocation.cs" />
|
||||||
<Compile Include="NmeaMessages\GprmcMessage.cs" />
|
<Compile Include="NmeaMessages\GprmcMessage.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace GpsClient2.Model {
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.Model {
|
|
||||||
public abstract class BaseGpsInfo {
|
public abstract class BaseGpsInfo {
|
||||||
public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89;
|
public GpsCoordinateSystem CoordinateSystem { get; set; } = GpsCoordinateSystem.GeoEtrs89;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace GpsClient2.Model {
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.Model {
|
|
||||||
public class ComPortInfo : BaseGpsInfo {
|
public class ComPortInfo : BaseGpsInfo {
|
||||||
public string ComPort { get; set; } = "ComPort1";
|
public string ComPort { get; set; } = "ComPort1";
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
namespace GpsClient2.Model {
|
namespace GpsClient2.Model {
|
||||||
[DataContract]
|
[DataContract]
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace GpsClient2.Model {
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.Model {
|
|
||||||
public class WindowsLocationApiInfo : BaseGpsInfo {
|
public class WindowsLocationApiInfo : BaseGpsInfo {
|
||||||
public int Timeout { get; set; } = 1000;
|
public int Timeout { get; set; } = 1000;
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
using GpsClient2.NmeaMessages;
|
using GpsClient2.NmeaMessages;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
public static class NmeaConstants {
|
public static class NmeaConstants {
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.NmeaMessages {
|
namespace GpsClient2.NmeaMessages {
|
||||||
public class GpggaMessage : NmeaMessage {
|
public class GpggaMessage : NmeaMessage {
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.NmeaMessages {
|
namespace GpsClient2.NmeaMessages {
|
||||||
public class GpgsaMessage : NmeaMessage {
|
public class GpgsaMessage : NmeaMessage {
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.NmeaMessages {
|
namespace GpsClient2.NmeaMessages {
|
||||||
public class GprmcMessage : NmeaMessage {
|
public class GprmcMessage : NmeaMessage {
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.NmeaMessages {
|
namespace GpsClient2.NmeaMessages {
|
||||||
public class GpvtgMessage : NmeaMessage {
|
public class GpvtgMessage : NmeaMessage {
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace GpsClient2.NmeaMessages {
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2.NmeaMessages {
|
|
||||||
public abstract class NmeaMessage {
|
public abstract class NmeaMessage {
|
||||||
public abstract void Parse(string[] messageParts);
|
public abstract void Parse(string[] messageParts);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
using GpsClient2.NmeaMessages;
|
using GpsClient2.NmeaMessages;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
public class NmeaParser {
|
public class NmeaParser {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
public static class StringExtensions {
|
public static class StringExtensions {
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
using GpsClient2.Model;
|
using GpsClient2.EventArguments;
|
||||||
|
using GpsClient2.Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Device.Location;
|
using System.Device.Location;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GpsClient2 {
|
namespace GpsClient2 {
|
||||||
public class WindowsLocationApiGpsClient : BaseGpsClient {
|
public class WindowsLocationApiGpsClient : BaseGpsClient {
|
||||||
|
|||||||
Reference in New Issue
Block a user