From c323d8463572941d256a3a2de8361f8b4b597b5e Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Fri, 29 May 2015 15:07:58 -0700 Subject: [PATCH] Added support for Windows 10 and the new NmeaParser for 'SerialDevice' --- .../Resources/Resource.Designer.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/NmeaParser.UWP/NmeaParser.UWP.csproj | 83 ++++++++ src/NmeaParser.UWP/SerialPortDevice.cs | 88 +++++++++ src/NmeaParser.UWP/packages.config | 4 + src/NmeaParser.sln | 184 +++++++++++++++++- src/SampleApp.UWP/App.xaml | 8 + src/SampleApp.UWP/App.xaml.cs | 114 +++++++++++ src/SampleApp.UWP/ApplicationInsights.config | 23 +++ src/SampleApp.UWP/Assets/Logo.scale-100.png | Bin 0 -> 801 bytes .../Assets/SmallLogo.scale-100.png | Bin 0 -> 329 bytes .../Assets/SplashScreen.scale-100.png | Bin 0 -> 2146 bytes .../Assets/StoreLogo.scale-100.png | Bin 0 -> 429 bytes .../Assets/WideLogo.scale-100.png | Bin 0 -> 2150 bytes src/SampleApp.UWP/MainPage.xaml | 16 ++ src/SampleApp.UWP/MainPage.xaml.cs | 104 ++++++++++ src/SampleApp.UWP/Package.appxmanifest | 58 ++++++ src/SampleApp.UWP/Properties/AssemblyInfo.cs | 29 +++ src/SampleApp.UWP/Properties/Default.rd.xml | 31 +++ src/SampleApp.UWP/SampleApp.UWP.csproj | 179 +++++++++++++++++ .../SampleApp.UWP_TemporaryKey.pfx | Bin 0 -> 2444 bytes src/SampleApp.UWP/packages.config | 8 + 22 files changed, 927 insertions(+), 6 deletions(-) create mode 100644 src/NmeaParser.UWP/NmeaParser.UWP.csproj create mode 100644 src/NmeaParser.UWP/SerialPortDevice.cs create mode 100644 src/NmeaParser.UWP/packages.config create mode 100644 src/SampleApp.UWP/App.xaml create mode 100644 src/SampleApp.UWP/App.xaml.cs create mode 100644 src/SampleApp.UWP/ApplicationInsights.config create mode 100644 src/SampleApp.UWP/Assets/Logo.scale-100.png create mode 100644 src/SampleApp.UWP/Assets/SmallLogo.scale-100.png create mode 100644 src/SampleApp.UWP/Assets/SplashScreen.scale-100.png create mode 100644 src/SampleApp.UWP/Assets/StoreLogo.scale-100.png create mode 100644 src/SampleApp.UWP/Assets/WideLogo.scale-100.png create mode 100644 src/SampleApp.UWP/MainPage.xaml create mode 100644 src/SampleApp.UWP/MainPage.xaml.cs create mode 100644 src/SampleApp.UWP/Package.appxmanifest create mode 100644 src/SampleApp.UWP/Properties/AssemblyInfo.cs create mode 100644 src/SampleApp.UWP/Properties/Default.rd.xml create mode 100644 src/SampleApp.UWP/SampleApp.UWP.csproj create mode 100644 src/SampleApp.UWP/SampleApp.UWP_TemporaryKey.pfx create mode 100644 src/SampleApp.UWP/packages.config diff --git a/src/NmeaParser.Android/Resources/Resource.Designer.cs b/src/NmeaParser.Android/Resources/Resource.Designer.cs index 06d1768..b7cd7eb 100644 --- a/src/NmeaParser.Android/Resources/Resource.Designer.cs +++ b/src/NmeaParser.Android/Resources/Resource.Designer.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.0 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/NmeaParser.Shared/Properties/AssemblyInfo.cs b/src/NmeaParser.Shared/Properties/AssemblyInfo.cs index 5fb8181..431438e 100644 --- a/src/NmeaParser.Shared/Properties/AssemblyInfo.cs +++ b/src/NmeaParser.Shared/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Morten Nielsen")] [assembly: AssemblyProduct("NmeaParser")] -[assembly: AssemblyCopyright("Copyright © Morten Nielsen 2014")] +[assembly: AssemblyCopyright("Copyright © Morten Nielsen 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NmeaParser.UWP/NmeaParser.UWP.csproj b/src/NmeaParser.UWP/NmeaParser.UWP.csproj new file mode 100644 index 0000000..4e1f8ff --- /dev/null +++ b/src/NmeaParser.UWP/NmeaParser.UWP.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB} + Library + Properties + NmeaParser + NmeaParser.UWP + en-US + UAP + 10.0.10069.0 + 10.0.10069.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + AnyCPU + true + full + false + ..\bin\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + prompt + 4 + ..\bin\Debug\NmeaParser.UWP.xml + + + AnyCPU + pdbonly + true + ..\bin\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + prompt + 4 + ..\bin\Release\NmeaParser.UWP.xml + + + + GlobalSuppressions.cs + + + BluetoothDevice.cs + + + + + + ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll + True + + + ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll + True + + + + + + + + CustomDictionary.xml + + + + + + + 14.0 + + + + + \ No newline at end of file diff --git a/src/NmeaParser.UWP/SerialPortDevice.cs b/src/NmeaParser.UWP/SerialPortDevice.cs new file mode 100644 index 0000000..a604a30 --- /dev/null +++ b/src/NmeaParser.UWP/SerialPortDevice.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) 2014 Morten Nielsen +// +// Licensed under the Microsoft Public License (Ms-PL) (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://opensource.org/licenses/Ms-PL.html +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Threading.Tasks; +using Windows.Devices.SerialCommunication; + +namespace NmeaParser +{ + /// + /// A Serial Port NMEA device + /// + public class SerialPortDevice : NmeaDevice + { + private SerialDevice m_port; + + /// + /// Initializes a new instance of the class. + /// + /// The serial port. + /// port + public SerialPortDevice(SerialDevice device) + { + if (device == null) + throw new ArgumentNullException("device"); + m_port = device; + } + + /// + /// Gets the active serial port. + /// + public SerialDevice SerialDevice + { + get + { + return m_port; + } + } + + /// + /// Creates the stream the NmeaDevice is working on top off. + /// + /// + protected override Task OpenStreamAsync() + { + return Task.FromResult(m_port.InputStream.AsStreamForRead()); + } + + /// + /// Closes the stream the NmeaDevice is working on top off. + /// + /// The stream. + /// + protected override Task CloseStreamAsync(System.IO.Stream stream) + { + return Task.FromResult(true); + } + + /// + /// Writes data to the serial port (useful for RTCM/dGPS scenarios) + /// + /// The byte array that contains the data to write to the port. + /// The zero-based byte offset in the buffer parameter at which to begin copying + /// bytes to the port. + /// The number of bytes to write. + public void Write(byte[] buffer, int offset, int count) + { + m_port.OutputStream.AsStreamForWrite().Write(buffer, offset, count); + } + } +} diff --git a/src/NmeaParser.UWP/packages.config b/src/NmeaParser.UWP/packages.config new file mode 100644 index 0000000..f1b625f --- /dev/null +++ b/src/NmeaParser.UWP/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/NmeaParser.sln b/src/NmeaParser.sln index 65863cb..baf380f 100644 --- a/src/NmeaParser.sln +++ b/src/NmeaParser.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.22310.1 +VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NmeaParser.WinStore", "NmeaParser.WinStore\NmeaParser.WinStore.csproj", "{62A55887-10F5-40D2-9352-96246D1B11D3}" EndProject @@ -19,7 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CF767486 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.WinDesktop", "SampleApp.WinDesktop\SampleApp.WinDesktop.csproj", "{5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Store-Universal", "Store-Universal", "{71F04187-BE90-47DE-A7BD-4D6CED50D446}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Store-Phone-81", "Store-Phone-81", "{71F04187-BE90-47DE-A7BD-4D6CED50D446}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SampleApp.Store.Shared", "SampleApp.Store\SampleApp.Store.Shared\SampleApp.Store.Shared.shproj", "{95E812E6-17C2-494F-A446-FDE42D75331C}" EndProject @@ -43,65 +43,238 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NmeaParser.Android", "NmeaP EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NmeaParser.iOS", "NmeaParser.iOS\NmeaParser.iOS.csproj", "{507CFE3E-16C1-43EC-BC21-50F901EE223B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NmeaParser.UWP", "NmeaParser.UWP\NmeaParser.UWP.csproj", "{418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UWP", "UWP", "{01FEC943-B537-4BCF-945A-6C914B06E448}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.UWP", "SampleApp.UWP\SampleApp.UWP.csproj", "{7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution NmeaParser.Shared\NmeaParser.Shared.projitems*{df711ab9-f14e-4f1f-b8f2-b6ddc4691554}*SharedItemsImports = 4 SampleApp.Store\SampleApp.Store.Shared\SampleApp.Store.Shared.projitems*{9ee3ea1d-f28c-4cf2-b540-db0415050d5f}*SharedItemsImports = 4 + NmeaParser.Shared\NmeaParser.Shared.projitems*{418353b9-6bf4-4fd2-a9b2-f8ad59f7d0fb}*SharedItemsImports = 4 NmeaParser.Shared\NmeaParser.Shared.projitems*{62a55887-10f5-40d2-9352-96246d1b11d3}*SharedItemsImports = 4 NmeaParser.Shared\NmeaParser.Shared.projitems*{e15edbd9-0356-422b-8c29-18833787356e}*SharedItemsImports = 13 SampleApp.Store\SampleApp.Store.Shared\SampleApp.Store.Shared.projitems*{c4b3935b-7ed4-40cc-b1d2-bc2b854e319d}*SharedItemsImports = 4 - NmeaParser.Shared\NmeaParser.Shared.projitems*{0daa6e10-bc77-4b06-8356-baee9085d985}*SharedItemsImports = 4 NmeaParser.Shared\NmeaParser.Shared.projitems*{ea42a713-bc6e-4914-b54b-47c0891b7421}*SharedItemsImports = 4 - NmeaParser.Shared\NmeaParser.Shared.projitems*{507cfe3e-16c1-43ec-bc21-50f901ee223b}*SharedItemsImports = 4 SampleApp.Store\SampleApp.Store.Shared\SampleApp.Store.Shared.projitems*{95e812e6-17c2-494f-a446-fde42d75331c}*SharedItemsImports = 13 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|ARM.Build.0 = Debug|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|x64.ActiveCfg = Debug|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|x64.Build.0 = Debug|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Debug|x86.Build.0 = Debug|Any CPU {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|Any CPU.ActiveCfg = Release|Any CPU {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|Any CPU.Build.0 = Release|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|ARM.ActiveCfg = Release|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|ARM.Build.0 = Release|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|x64.ActiveCfg = Release|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|x64.Build.0 = Release|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|x86.ActiveCfg = Release|Any CPU + {62A55887-10F5-40D2-9352-96246D1B11D3}.Release|x86.Build.0 = Release|Any CPU {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|ARM.Build.0 = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|ARM.Deploy.0 = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|x64.ActiveCfg = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|x64.Build.0 = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|x64.Deploy.0 = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|x86.ActiveCfg = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|x86.Build.0 = Debug|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Debug|x86.Deploy.0 = Debug|Any CPU {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|Any CPU.Build.0 = Release|Any CPU {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|Any CPU.Deploy.0 = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|ARM.ActiveCfg = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|ARM.Build.0 = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|ARM.Deploy.0 = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|x64.ActiveCfg = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|x64.Build.0 = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|x64.Deploy.0 = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|x86.ActiveCfg = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|x86.Build.0 = Release|Any CPU + {5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C}.Release|x86.Deploy.0 = Release|Any CPU {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|ARM.ActiveCfg = Debug|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|ARM.Build.0 = Debug|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|x64.Build.0 = Debug|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Debug|x86.Build.0 = Debug|Any CPU {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|Any CPU.ActiveCfg = Release|Any CPU {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|Any CPU.Build.0 = Release|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|ARM.ActiveCfg = Release|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|ARM.Build.0 = Release|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|x64.ActiveCfg = Release|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|x64.Build.0 = Release|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|x86.ActiveCfg = Release|Any CPU + {EA42A713-BC6E-4914-B54B-47C0891B7421}.Release|x86.Build.0 = Release|Any CPU {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|ARM.ActiveCfg = Debug|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|ARM.Build.0 = Debug|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|x64.ActiveCfg = Debug|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|x64.Build.0 = Debug|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|x86.ActiveCfg = Debug|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Debug|x86.Build.0 = Debug|Any CPU {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|Any CPU.ActiveCfg = Release|Any CPU {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|Any CPU.Build.0 = Release|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|ARM.ActiveCfg = Release|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|ARM.Build.0 = Release|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|x64.ActiveCfg = Release|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|x64.Build.0 = Release|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|x86.ActiveCfg = Release|Any CPU + {DF711AB9-F14E-4F1F-B8F2-B6DDC4691554}.Release|x86.Build.0 = Release|Any CPU {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|ARM.Build.0 = Debug|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|x64.ActiveCfg = Debug|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|x64.Build.0 = Debug|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|x86.ActiveCfg = Debug|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Debug|x86.Build.0 = Debug|Any CPU {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|Any CPU.ActiveCfg = Release|Any CPU {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|Any CPU.Build.0 = Release|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|ARM.ActiveCfg = Release|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|ARM.Build.0 = Release|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|x64.ActiveCfg = Release|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|x64.Build.0 = Release|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|x86.ActiveCfg = Release|Any CPU + {5DB6C7C7-A19C-4BE3-AFE6-26E3061DA01F}.Release|x86.Build.0 = Release|Any CPU {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|ARM.Build.0 = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|ARM.Deploy.0 = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|x64.ActiveCfg = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|x64.Build.0 = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|x64.Deploy.0 = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|x86.ActiveCfg = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|x86.Build.0 = Debug|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Debug|x86.Deploy.0 = Debug|Any CPU {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|Any CPU.Build.0 = Release|Any CPU {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|Any CPU.Deploy.0 = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|ARM.ActiveCfg = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|ARM.Build.0 = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|ARM.Deploy.0 = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|x64.ActiveCfg = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|x64.Build.0 = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|x64.Deploy.0 = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|x86.ActiveCfg = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|x86.Build.0 = Release|Any CPU + {C4B3935B-7ED4-40CC-B1D2-BC2B854E319D}.Release|x86.Deploy.0 = Release|Any CPU {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|ARM.Build.0 = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|ARM.Deploy.0 = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|x64.ActiveCfg = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|x64.Build.0 = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|x64.Deploy.0 = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|x86.ActiveCfg = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|x86.Build.0 = Debug|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Debug|x86.Deploy.0 = Debug|Any CPU {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|Any CPU.Build.0 = Release|Any CPU {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|Any CPU.Deploy.0 = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|ARM.ActiveCfg = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|ARM.Build.0 = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|ARM.Deploy.0 = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|x64.ActiveCfg = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|x64.Build.0 = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|x64.Deploy.0 = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|x86.ActiveCfg = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|x86.Build.0 = Release|Any CPU + {9EE3EA1D-F28C-4CF2-B540-DB0415050D5F}.Release|x86.Deploy.0 = Release|Any CPU {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|ARM.Build.0 = Debug|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|x64.ActiveCfg = Debug|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|x64.Build.0 = Debug|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|x86.ActiveCfg = Debug|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Debug|x86.Build.0 = Debug|Any CPU {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|Any CPU.ActiveCfg = Release|Any CPU {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|Any CPU.Build.0 = Release|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|ARM.ActiveCfg = Release|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|ARM.Build.0 = Release|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|x64.ActiveCfg = Release|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|x64.Build.0 = Release|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|x86.ActiveCfg = Release|Any CPU + {0DAA6E10-BC77-4B06-8356-BAEE9085D985}.Release|x86.Build.0 = Release|Any CPU {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|ARM.ActiveCfg = Debug|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|ARM.Build.0 = Debug|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|x64.ActiveCfg = Debug|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|x64.Build.0 = Debug|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|x86.ActiveCfg = Debug|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Debug|x86.Build.0 = Debug|Any CPU {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|Any CPU.ActiveCfg = Release|Any CPU {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|Any CPU.Build.0 = Release|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|ARM.ActiveCfg = Release|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|ARM.Build.0 = Release|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|x64.ActiveCfg = Release|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|x64.Build.0 = Release|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|x86.ActiveCfg = Release|Any CPU + {507CFE3E-16C1-43EC-BC21-50F901EE223B}.Release|x86.Build.0 = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|ARM.ActiveCfg = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|ARM.Build.0 = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|x64.ActiveCfg = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|x64.Build.0 = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|x86.ActiveCfg = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Debug|x86.Build.0 = Debug|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|Any CPU.Build.0 = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|ARM.ActiveCfg = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|ARM.Build.0 = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|x64.ActiveCfg = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|x64.Build.0 = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|x86.ActiveCfg = Release|Any CPU + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB}.Release|x86.Build.0 = Release|Any CPU + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|Any CPU.ActiveCfg = Debug|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|ARM.ActiveCfg = Debug|ARM + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|ARM.Build.0 = Debug|ARM + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|ARM.Deploy.0 = Debug|ARM + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|x64.ActiveCfg = Debug|x64 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|x64.Build.0 = Debug|x64 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|x64.Deploy.0 = Debug|x64 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|x86.ActiveCfg = Debug|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|x86.Build.0 = Debug|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Debug|x86.Deploy.0 = Debug|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|Any CPU.ActiveCfg = Release|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|ARM.ActiveCfg = Release|ARM + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|ARM.Build.0 = Release|ARM + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|ARM.Deploy.0 = Release|ARM + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|x64.ActiveCfg = Release|x64 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|x64.Build.0 = Release|x64 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|x64.Deploy.0 = Release|x64 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|x86.ActiveCfg = Release|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|x86.Build.0 = Release|x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -121,5 +294,8 @@ Global {28B8E327-C504-4E08-B2CE-09D1CBB8B904} = {CF767486-305D-40EE-8845-58EF76C16D85} {0DAA6E10-BC77-4B06-8356-BAEE9085D985} = {1701F3BA-A09C-4706-A612-24FD9340FC18} {507CFE3E-16C1-43EC-BC21-50F901EE223B} = {1701F3BA-A09C-4706-A612-24FD9340FC18} + {418353B9-6BF4-4FD2-A9B2-F8AD59F7D0FB} = {1701F3BA-A09C-4706-A612-24FD9340FC18} + {01FEC943-B537-4BCF-945A-6C914B06E448} = {A4B9D59A-C8C6-4199-A7F3-F3AF0C748281} + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0} = {01FEC943-B537-4BCF-945A-6C914B06E448} EndGlobalSection EndGlobal diff --git a/src/SampleApp.UWP/App.xaml b/src/SampleApp.UWP/App.xaml new file mode 100644 index 0000000..98ef55c --- /dev/null +++ b/src/SampleApp.UWP/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/src/SampleApp.UWP/App.xaml.cs b/src/SampleApp.UWP/App.xaml.cs new file mode 100644 index 0000000..f9752aa --- /dev/null +++ b/src/SampleApp.UWP/App.xaml.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409 + +namespace SampleApp.UWP +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// Allows tracking page views, exceptions and other telemetry through the Microsoft Application Insights service. + /// + public static Microsoft.ApplicationInsights.TelemetryClient TelemetryClient; + + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + TelemetryClient = new Microsoft.ApplicationInsights.TelemetryClient(); + + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs e) + { + +#if DEBUG + if (System.Diagnostics.Debugger.IsAttached) + { + this.DebugSettings.EnableFrameRateCounter = true; + } +#endif + + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + rootFrame.NavigationFailed += OnNavigationFailed; + + if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(typeof(MainPage), e.Arguments); + } + // Ensure the current window is active + Window.Current.Activate(); + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} diff --git a/src/SampleApp.UWP/ApplicationInsights.config b/src/SampleApp.UWP/ApplicationInsights.config new file mode 100644 index 0000000..8a6452a --- /dev/null +++ b/src/SampleApp.UWP/ApplicationInsights.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SampleApp.UWP/Assets/Logo.scale-100.png b/src/SampleApp.UWP/Assets/Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..e26771cb33a49bbef824aa333737181b0a5b09a3 GIT binary patch literal 801 zcmeAS@N?(olHy`uVBq!ia0vp^(?FPm4M^HB7Cr(}k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+m=1foIEGZ*dUJQLud<^=L*gE#63Ho!PGzwUb%GPK6&5iF zt!p@aGNX}6(PVh|N)M-?0RNcTbjaWgEU8noxUax-n>&3Ay)#!y&O11y2sKEF zt72@XC1)RvT6Xw=y_`Ce)`nGULLL^lI$kwi^E+dQT7YeXY4GvlRR%kj1x$VZi%Bdd zz}2Giy=-_$h+v#(S+};)DuE4EM?_^qB_eDeo@&q%StD1F>L|*0ZC2sb-}llSMTM?O z6{b3iid~yk@VE7q7Wb+P8?H5IYp?pSVcLE~18m#ygK20HL@6W5woI~Fjlw$fX1U{xQA5a+t0 zH$WNIb=fNpWHo}M9#;K6eszDZKty_|-?j4iocj5#zotrWc;@;w`H@=mjsvS2wXX0_ zY}l$4@^sE?UcC)ji*L=Z&}P!xaL&2((OQlj2dv~pV-ifAS;ZsH1{`D!GY%yys5WH)f>ZLo5m%6XjuXdbKMR7MEHSyb{m!_{Afji&MT$_sz7 z>1{~MlIFe28FRN(GC_~;#Jp4ADipP+9hh|P#-&`vO-Upt3jE0@YLh(^55uYWl9g)Z RA3>Rb!PC{xWt~$(69A&hN*MqE literal 0 HcmV?d00001 diff --git a/src/SampleApp.UWP/Assets/SmallLogo.scale-100.png b/src/SampleApp.UWP/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..1eb0d9d528c42f132872e8af4dc563081b0b9aff GIT binary patch literal 329 zcmV-P0k-~$P)q$gGRCwC#*X;?zAP@%N+|i#I!$mrh zlQ>KU$Rdu>|JH&931_?y6Djl{gb>4nCV5pzDJ?S!mq|4ZejKj%i@j$H{#ML~2Y{DF z$=}bKPaz+UGt{v(4CTQQXym}&iW8{s!ew~XIE7NLjQpy#I2S$rous$~?f%DHT#B*+ zq=#!zc5=0FEqWFpB%UE(L807on!pidHPLgYO}XEgorrg;PB=8ipgQ5u5`&g_MQaRd zaU7Ao8XQMuuN21-s0PPTs1%38x_Yl3Fs-|Y4!C-;M-8g@n*v@1|s#GQ665=9@Rxy?u0YW0&WN+~=RXpPbVXXL4m7Aq=E6I0%{06TwRn=U9d8>exk> zD-Z%M3DNQ`bTLSEF=%NFyoHcAkD*CiXqljo*0E?o$GiDC4q}}|%*0WghLlK#npw?hecrM}Mw?`E(z5C8< z8&*b^!{>5?4aT89vdrgBgSc-x6JZD3F^l#*G(@OO*^1D%Eu7?HAy<3kTLqW9N{^#6vso zVQwY48q7)m{~xQ64RV7{E7Y=&T~?^05Ky`5oNQ8bLgFCPq9co^R09BVRS1OAmH;hU zC#q(N!gNqm!zU#%sv{r5mm-Uv8b-~a1F-;p^>)pnXfKge4s9?;;MFIr*fixPG}NBA z6_G5BEmeO6XXh(emkciB{7tA;iwC2^s^VzyU_h0@ae84ACMY`cIDEju=<`q|2QAEv zW_)W|i|9aknqdmS=#w73eW_csQ$8IhT^vY1^1;X3&J0{%*tcQq!gJpr3w?TJc~@5= zKV5sM{$3k>b#S$@CTkhIF*{v*u(F&$&Yq1naHxt8Mz2N%7aQ3(^VNRZahk1||7?Bl z*idzO_u)FhRj4cPzDO>YA>>lxAGaciEiX8Xzp1SVPv91};$OG3cC&8!v3{Jq^kH@8 UTIccK;hzT5*3#}uZuEx!0OwrBv;Y7A literal 0 HcmV?d00001 diff --git a/src/SampleApp.UWP/Assets/StoreLogo.scale-100.png b/src/SampleApp.UWP/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..dcb672712c6823a0c91548ded70a8acb85536b4d GIT binary patch literal 429 zcmV;e0aE^nP)NtYJa1l)bQ5qwGXpZbs7%2oRMd4y35$s&66(fxhNg8W02!vSn zdlrL2h^Fx+3=$z;kK{0D#MyeJ8WRWZcLSf(PcQ_mLOhrmC}O-tX^0c>5`YvCUZVsc zG-6#78ubjJ5nA;OX&^K(q=i6ZNE3m?kTwE^AqxZoLskfB3|S&1F=UO9!cY$g2@Lgu z;9{sJ1P9|X2L`r1#Gs8R{E^$PRrMaC86q|WH9DeO%R%*7>(GowHbE~DxOiwwJbcIgaDK!=RpoyA}!~_cv4F%n4aAwO+ z<<#nk^YnpXXf*jKLOOX^Ia9YKn23^?xhAc3MphhNB6Ubjv=^00}p}34364gH@GVz0gApdRt zTen6TcLzg|y=qUyuEfH$2~F8akEqq(W-Nak;9u&1&iKs19$Y!vKmL_^ZF$O}{p11y z{Z>?mB)rV|`XDt4v+nb|qYov>a3)mh;AhswSXu$y=q94WYv$$N9mA&tFw~9F396jLl{rxrK#Ip-)Eym7k>fm9? zRq~{1Nl@VN&8lZ7RQWjF8QrB;+SuzM!9j}YXUTe!-hCQZp;NzLl)1UxRSR#bp!GYo z>OP};g|4NT%zA?t3}~Ajzd7BOR~ypJoU0mUSeOr0;_!`lLhRt||hG zTQr-~ARsDwOYT%UX5+m7cSfwa?RBuh^%2BBwvh$TW3i#Pd?<}ZZq2Ba4L19 zxpWg)QPSkNiQ}sd0j-5rJBcuPop5UaAmDItD8`r-AbQ7*6_+lnZU6(4H9BA8ogJ)$p1v7-pGbe&MxH)42uvr`n1Mu-eOXrX)Hw@S- zub?kMFPc(~89$OMogcU{{5!B~f_{7L`o*j$S~8K_w6{8}6OB&Aq(@uB2Nqw%!XZ^Ip`&Aie}$;N5cC(kZcWBW~o8v{OCT*Mq@ zShJI8x^hT8gBo1vxR?n%R>(mR_02_d!GA4`6wK!5nmrB6*o$e~ay5BD9cT7oDP~RD zG*{`5nlu~7jwv9(qHhzT`_%d0))05iwJP*=+(ricN%?lArbf zW&=J@t2qX@YN;bZrb3hXNG(+p*I51{#*>s+3okM&Nyz~I zV}z4A0JI+l(UWc)txWnlz+{G*UhkD`pe4-NSu#U{wSc`jPWA*d>CkNgc@jKRGZw{T zYY-b^twjUKEW^f1G8RS2ZIGM8wRI`E3#fatE)}==ZJ6mPQ)ZqA5u^7g;>x;vxi&G! z`!dZvXaTWyV>higq@MzJXi10+%WS|1D8sXZC^F*;ygu~E?L<&84u{}((#>+XfcLea zj#?ojMP#mG9t$_`=f1OtuP!obr$bZI-VTquTA4$;7dlKW<8LCkW4lBZ*O)rmZTLe+ zo1-Y!)tvS|?0Eraxv;N`^P8yEM=|=cBx*h_{R{T>%jb)Qz;iugTGnHldHwc&=MZ2; xJ}0F|Sf88oi>EL3`G1{Z|MDC?5Z*eEbmw_S^{I|Wg1-UKp2(Pprrqh^{0*n}B{Tp4 literal 0 HcmV?d00001 diff --git a/src/SampleApp.UWP/MainPage.xaml b/src/SampleApp.UWP/MainPage.xaml new file mode 100644 index 0000000..809f569 --- /dev/null +++ b/src/SampleApp.UWP/MainPage.xaml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/src/SampleApp.UWP/MainPage.xaml.cs b/src/SampleApp.UWP/MainPage.xaml.cs new file mode 100644 index 0000000..27a5ae6 --- /dev/null +++ b/src/SampleApp.UWP/MainPage.xaml.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Devices.Bluetooth.Rfcomm; +using Windows.Devices.Enumeration; +using Windows.Devices.SerialCommunication; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 + +namespace SampleApp.UWP +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainPage : Page + { + private Queue messages = new Queue(101); + + public MainPage() + { + this.InitializeComponent(); + //Load a simulated GPS device that plays back an NMEA log file + LoadLocalGpsSimulationData(); + //Use this to connect to a bluetooth device instead: + //LoadBluetoothGPS(); + //Use this to connect to a serial port device instead: + //LoadSerialDeviceGPS(); + } + + private async void LoadSerialDeviceGPS() + { + var selector = SerialDevice.GetDeviceSelector("COM3"); + var devices = await DeviceInformation.FindAllAsync(selector); + if(devices.Any()) + { + var deviceInfo = devices.First(); + var serialDevice = await SerialDevice.FromIdAsync(deviceInfo.Id); + //Set up serial device according to device specifications: + serialDevice.BaudRate = 4800; + serialDevice.DataBits = 8; + serialDevice.Parity = SerialParity.None; + var device = new NmeaParser.SerialPortDevice(serialDevice); + device.MessageReceived += device_MessageReceived; + await device.OpenAsync(); + } + } + + private async void LoadBluetoothGPS() + { + //Ensure the bluetooth capability is enabled by opening package.appxmanifest in a text editor, + // and add the following to the section: + // + // + // + // + // + + //Get list of devices + string serialDeviceType = RfcommDeviceService.GetDeviceSelector(RfcommServiceId.SerialPort); + var devices = await DeviceInformation.FindAllAsync(serialDeviceType); + + string GpsDeviceName = "HOLUX GPSlim236"; //Change name to your device or build UI for user to select from list of 'devices' + //Select device by name + var bluetoothDevice = devices.Where(t => t.Name == GpsDeviceName).FirstOrDefault(); + //Get service + RfcommDeviceService rfcommService = await RfcommDeviceService.FromIdAsync(bluetoothDevice.Id); + if (rfcommService != null) + { + var device = new NmeaParser.BluetoothDevice(rfcommService); + device.MessageReceived += device_MessageReceived; + await device.OpenAsync(); + } + } + + public async void LoadLocalGpsSimulationData() + { + var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///NmeaSampleData.txt")); + var device = new NmeaParser.NmeaFileDevice(file); + device.MessageReceived += device_MessageReceived; + var _ = device.OpenAsync(); + } + + private void device_MessageReceived(object sender, NmeaParser.NmeaMessageReceivedEventArgs args) + { + var _ = Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => + { + messages.Enqueue(args.Message.MessageType + ": " + args.Message.ToString()); + if (messages.Count > 100) messages.Dequeue(); //Keep message queue at 100 + output.Text = string.Join("\n", messages.ToArray()); + }); + } + } +} \ No newline at end of file diff --git a/src/SampleApp.UWP/Package.appxmanifest b/src/SampleApp.UWP/Package.appxmanifest new file mode 100644 index 0000000..1bdcf5a --- /dev/null +++ b/src/SampleApp.UWP/Package.appxmanifest @@ -0,0 +1,58 @@ + + + + + + + + + + SampleApp.UWP + mn + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SampleApp.UWP/Properties/AssemblyInfo.cs b/src/SampleApp.UWP/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..008aa54 --- /dev/null +++ b/src/SampleApp.UWP/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SampleApp.UWP")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SampleApp.UWP")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/src/SampleApp.UWP/Properties/Default.rd.xml b/src/SampleApp.UWP/Properties/Default.rd.xml new file mode 100644 index 0000000..80a960c --- /dev/null +++ b/src/SampleApp.UWP/Properties/Default.rd.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SampleApp.UWP/SampleApp.UWP.csproj b/src/SampleApp.UWP/SampleApp.UWP.csproj new file mode 100644 index 0000000..40a01a1 --- /dev/null +++ b/src/SampleApp.UWP/SampleApp.UWP.csproj @@ -0,0 +1,179 @@ + + + + + Debug + x86 + {7B252F1E-2E9D-4362-9C14-3376AAB8B5A0} + AppContainerExe + Properties + SampleApp.UWP + SampleApp.UWP + en-US + UAP + 10.0.10069.0 + 10.0.10069.0 + 14 + true + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + SampleApp.UWP_TemporaryKey.pfx + + + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + + App.xaml + + + MainPage.xaml + + + + + + Designer + + + + + + + + NmeaSampleData.txt + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + ..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll + True + + + ..\packages\Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177\lib\win81\Microsoft.ApplicationInsights.Extensibility.Windows.dll + True + + + ..\packages\Microsoft.ApplicationInsights.PersistenceChannel.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll + True + + + ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll + True + + + ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll + True + + + + + {418353b9-6bf4-4fd2-a9b2-f8ad59f7d0fb} + NmeaParser.UWP + + + + 14.0 + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/src/SampleApp.UWP/SampleApp.UWP_TemporaryKey.pfx b/src/SampleApp.UWP/SampleApp.UWP_TemporaryKey.pfx new file mode 100644 index 0000000000000000000000000000000000000000..bebac8662579f7c8b4647227eb49537e1fade308 GIT binary patch literal 2444 zcmZuzc|2788b9aEq8YM|tYOF=of$JUk&40~@ivsKS!z_&8!7QxP9bGUj6`CjDAh>O z8&kBAwXww5vSg{q%PY!uyGNgUyWRV_e>~^+e810jKF{y>d(MFo!Z`@UzzAVGo}d?J z6ZdsBC<5jo1UeQWP*BQ5NG<^{Q2vtjOnPrPbylF~1qE?Hjh)RYols8ujhWVW*zcoQfVLlzXN@nmu~C zb>ap6p#fbAZp^Tq8$bVTnZ5XACX8)4U^z_GIPO8lx@w0TRu7g9~p3e7*EOx8BxYQaY(e zNSlip?46%VZ&s1?s>G!0b9qQ(l60c9FW2pm{3b?ccGR7oEt9}Bt}D0Q+0;gl8|613P1tDmM@o}l-Gz9tOhPD17O8e_xL8urypu|2nLID|3Y^XUvcIcT zE+`7T?BKdj#2<2M%Xia#zvW)bF3Ai2)5EML$(I{OG@75hiTt=-Vfa~l5$z`KE7>GN z?2vwewvOEubK|Q!!{RKn7H#FRPYLPP5yjI?Z@rkvN8)tCK|tv|Eel%CFj{D#5wBz} zd=BAw@h!&NT=+cR{@cBYbAwkxN>fr;q~PlwLrj`n)n(2jgW&MHkGy+kdn|iD@!0lLrw64VtG2ij= z7XdM~))oAcLrp&3*?WX0vi)aj()n5!*EQFfhA`TVlt4i@E~4dgVvIXaI*;e0tnHE3 zV6eQY*youJD`aU*HI&xrs>-|^$O#XgU(0!Y_W5PW_g>s87t&U>Yk2jxdwaQ^miN|u zk$F|7y;l8c<%V(f>vJYit#vb3wPfn+`(Cog?B}|aq6B}O>6u~)6ec1^)N5tquHA0# z*oEJA!?{PT_)NI0pHE$+Oiv1r=zHBiCu7F1q8)27Za5LiSJZYKoB9BM>8p(8e#=ugU-h zk3_coQ=Jy&K;A0HxZdv1Cvl76H)CuQ(fikfm`m4)H_l7#z! z703B6*Fu3~&dtF6Y~z8Ms*l#>ViT?I8255nby|7y@82>~%VKky?ZpeWn-&GQU@c77 zcR))e76S661(u>p3MW% z7WoIq-zsP49?ZKG>EKtA8ux0V;_RfiKt=M+23B~#uGb*oAD{>;M(q<8)~Tk+WV!4P z*Pl&Q4IfO-_rp8}6TI7?cSin&oRP1baKZoW=c5uzT)uo#$(+D--;O(jcr!=wp|U&-^`vX+61X< z1TmSWNyMqG&5=kxTSl6x77-4*1uIq8%`c0_CQ>FvH1A|p?03=N)f6#v?zW$%RTlQi zZ=nfBCg``*U$zH4Zac5QxlcLooz&c27`imOXvb^hvMg#-oxANz`zG0IZYg0ZgK)rB zC&bV_F8@!lYZmrvC^1d2%+GO2kfq?USP%dJc+Y=G62(@<2A~2oz!w!NV1lmu0Rwb3 zK`{l@Xn-GZ05C!|20%xd6{|7egR=WkA0q%pbp{&c0~~-o@C1E4hy@W7DUjl*;sERf z0#MU&;3yD`$^jq*Py=?O&lM&JIEW%kR1X7=q1;gvA4iiO1K2;J)BwjHexWGx1N?#G zFoMzl`Q|Gh28=Qm!N{XD2^Gm-r#~hSfj+_egP3WTXY;QzWKp!%-~K^%ZVKnVb?PlON<1ny6|WPU2m%XPSMC*x40Zn_3J-d*le zJaxVxwBIshPfH-s>$p(CA-MOlBi>c3Iu9$kye9Bt$mC&7!jyq8a(c$~18B{*|KF+F|4^Uc|4 zJtzLT^=7-BQ_rn2u?TGy>|y52Bylleg8<{_sbsUqJa)wuR{ z<$SS$(aJa47wxq2Z+Xo?(UC*n>?9a@I-Q^~J#%)4@8F1#^;beC_&M|b9i30^=4vcf zrLrY|YKQ8vcsH&2CNis3-OJsz_B4xUU|O}jr#1GJtm?PxeiyP1IyL`RYgVsqNGzAQ z*JQ_~WOfxyX-YXk(F%!LvvXI+qDTY#1WB`vGPAlwolU!ap0?DB(hnSF$DM6G9bdzS z-}J^LE>155>R=|^jy{<0NN|z3;y{u8|JU3UR)t0IIDK&pq=+S%-3 + + + + + + + \ No newline at end of file