diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP.sln b/src/EyesAndEars.UWP/EyesAndEars.UWP.sln
new file mode 100644
index 0000000..8c0141f
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EyesAndEars.UWP", "EyesAndEars.UWP\EyesAndEars.UWP.csproj", "{0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|ARM.ActiveCfg = Debug|ARM
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|ARM.Build.0 = Debug|ARM
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|ARM.Deploy.0 = Debug|ARM
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|ARM64.Build.0 = Debug|ARM64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|x64.ActiveCfg = Debug|x64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|x64.Build.0 = Debug|x64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|x64.Deploy.0 = Debug|x64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|x86.ActiveCfg = Debug|x86
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|x86.Build.0 = Debug|x86
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Debug|x86.Deploy.0 = Debug|x86
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|ARM.ActiveCfg = Release|ARM
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|ARM.Build.0 = Release|ARM
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|ARM.Deploy.0 = Release|ARM
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|ARM64.ActiveCfg = Release|ARM64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|ARM64.Build.0 = Release|ARM64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|ARM64.Deploy.0 = Release|ARM64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|x64.ActiveCfg = Release|x64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|x64.Build.0 = Release|x64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|x64.Deploy.0 = Release|x64
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|x86.ActiveCfg = Release|x86
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|x86.Build.0 = Release|x86
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F3E6EBEC-0578-466F-9C2A-A9475D9811A7}
+ EndGlobalSection
+EndGlobal
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/App.xaml b/src/EyesAndEars.UWP/EyesAndEars.UWP/App.xaml
new file mode 100644
index 0000000..08db584
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/App.xaml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/App.xaml.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/App.xaml.cs
new file mode 100644
index 0000000..f4679cc
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/App.xaml.cs
@@ -0,0 +1,80 @@
+using System;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Navigation;
+
+namespace EyesAndEars.UWP {
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ sealed partial class App : Application {
+ ///
+ /// 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() {
+ 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) {
+ 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 (e.PrelaunchActivated == false) {
+ 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/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-100.png
new file mode 100644
index 0000000..f4751ce
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-125.png
new file mode 100644
index 0000000..9871756
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-150.png
new file mode 100644
index 0000000..a61100b
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-200.png
new file mode 100644
index 0000000..9056965
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-400.png
new file mode 100644
index 0000000..d49ebd9
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LargeTile.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LockScreenLogo.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..735f57a
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/LockScreenLogo.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-100.png
new file mode 100644
index 0000000..b1202e5
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-125.png
new file mode 100644
index 0000000..6205e4a
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-150.png
new file mode 100644
index 0000000..494680c
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-200.png
new file mode 100644
index 0000000..81e3ce7
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-400.png
new file mode 100644
index 0000000..0c15e1e
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SmallTile.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-100.png
new file mode 100644
index 0000000..6949f07
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-125.png
new file mode 100644
index 0000000..c7d101f
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-150.png
new file mode 100644
index 0000000..478f570
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..0bdf3a5
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-400.png
new file mode 100644
index 0000000..d7a9123
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/SplashScreen.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..261e500
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..2551e45
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..3799bfd
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..e2e5be2
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..b306494
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square150x150Logo.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..27bb770
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..bf3553e
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..06fc34d
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..e292516
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..5585076
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..57fa93c
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..9bd7c65
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..2e7cdb6
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..5b05208
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..46f72b7
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..39a6ade
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..c6ba0b6
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..435a0cf
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..539fd92
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-16.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..a5f4135
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-16.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-24.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..e95d831
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-24.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..2ddd6d7
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-256.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..25fc57c
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-256.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-32.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..9b79b54
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-32.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-48.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..665c7cc
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Square44x44Logo.targetsize-48.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.backup.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.backup.png
new file mode 100644
index 0000000..7385b56
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.backup.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-100.png
new file mode 100644
index 0000000..4973c29
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-125.png
new file mode 100644
index 0000000..a0c7fa3
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-150.png
new file mode 100644
index 0000000..4509f3f
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-200.png
new file mode 100644
index 0000000..5e8541a
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-400.png
new file mode 100644
index 0000000..3e4442c
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/StoreLogo.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-100.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..f955ac9
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-100.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-125.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..9ea29bd
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-125.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-150.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..d8d088c
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-150.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-200.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..6949f07
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-400.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..0bdf3a5
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/Assets/Wide310x150Logo.scale-400.png differ
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/EyesAndEars.UWP.csproj b/src/EyesAndEars.UWP/EyesAndEars.UWP/EyesAndEars.UWP.csproj
new file mode 100644
index 0000000..358c4ae
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/EyesAndEars.UWP.csproj
@@ -0,0 +1,245 @@
+
+
+
+
+ Debug
+ x86
+ {0AEFB351-EA4D-4ED1-998A-AB0B0792E06B}
+ AppContainerExe
+ Properties
+ EyesAndEars.UWP
+ EyesAndEars.UWP
+ en-GB
+ UAP
+ 10.0.18362.0
+ 10.0.18362.0
+ 14
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ True
+ False
+ EyesAndEars.UWP_TemporaryKey.pfx
+
+
+ SHA256
+ False
+ True
+ Always
+ x64
+ 0
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ bin\ARM64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+ true
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+ true
+
+
+ PackageReference
+
+
+
+ App.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ 2.9.8
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+ 6.2.9
+
+
+ 4.7.0
+
+
+ 4.3.0
+
+
+
+
+
+
+ 14.0
+
+
+
+
\ No newline at end of file
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/MainPage.xaml b/src/EyesAndEars.UWP/EyesAndEars.UWP/MainPage.xaml
new file mode 100644
index 0000000..757992b
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/MainPage.xaml
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/MainPage.xaml.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/MainPage.xaml.cs
new file mode 100644
index 0000000..2c49050
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/MainPage.xaml.cs
@@ -0,0 +1,80 @@
+using EyesAndEars.UWP.Services;
+using EyesAndEars.UWP.ViewModels;
+using System;
+using Windows.ApplicationModel;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+
+namespace EyesAndEars.UWP {
+
+ public sealed partial class MainPage : Page {
+
+ MainPageVM _vm = new MainPageVM();
+ DispatcherTimer _dispatcherTimer = new DispatcherTimer();
+
+ public MainPage() {
+ InitializeComponent();
+ IntialiseDataContext();
+ SetVersionNumber();
+ IntialiseRefreshTime();
+ }
+
+ void SetVersionNumber() {
+ var package = Package.Current;
+ var packageId = package.Id;
+ var version = packageId.Version;
+ VersionNumber.Text = $"Ver: {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
+ }
+
+ async void IntialiseDataContext() {
+ // Device 3 and 6 are not in use.
+ _vm.BaseURL = await DataServices.GetBaseURLAsync();
+ _vm.Device1 = DataServices.CreateFallBackDevice(1);
+ _vm.Device2 = DataServices.CreateFallBackDevice(2);
+ // _vm.Device3 = DataServices.CreateFallBackDevice(3);
+ _vm.Device4 = DataServices.CreateFallBackDevice(4);
+ _vm.Device5 = DataServices.CreateFallBackDevice(5);
+ // _vm.Device6 = DataServices.CreateFallBackDevice(6);
+ _vm.CurrentTime = DateTime.UtcNow.ToShortTimeString();
+ DataContext = _vm;
+ }
+
+ void IntialiseRefreshTime() {
+ // TimeSpan Intervals: Days, Hours, Minutes, Seconds, Milliseconds.
+ _dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
+ _dispatcherTimer.Tick += UpdateViewModel;
+ _dispatcherTimer.Start();
+ }
+
+ async void UpdateViewModel(object sender, object e) {
+ var url = _vm.BaseURL;
+ if (!string.IsNullOrEmpty(url)) {
+ // Devices 3 and 6 are not in use.
+ _vm.Device1 = await DataServices.UpdateDevice(url, 1);
+ _vm.Device2 = await DataServices.UpdateDevice(url, 2);
+ // _vm.Device3 = await DataServices.UpdateDevice(url, 3);
+ _vm.Device4 = await DataServices.UpdateDevice(url, 4);
+ _vm.Device5 = await DataServices.UpdateDevice(url, 5);
+ // _vm.Device6 = await DataServices.UpdateDevice(url, 6);
+ _vm.CurrentTime = DateTime.UtcNow.ToShortTimeString();
+ }
+ else {
+ IntialiseDataContext();
+ }
+ }
+
+ async void SaveURLButton_Click(object sender, RoutedEventArgs e) {
+ await DataServices.SaveBaseURLAsync(WebAddressBox.Text);
+ }
+
+ void PlayButton_Checked(object sender, RoutedEventArgs e) {
+ PlayButton.Content = "\uE768";
+ _dispatcherTimer.Stop();
+ }
+
+ void PlayButton_Unchecked(object sender, RoutedEventArgs e) {
+ PlayButton.Content = "\uE71A";
+ _dispatcherTimer.Start();
+ }
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/Device.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/Device.cs
new file mode 100644
index 0000000..e51532f
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/Device.cs
@@ -0,0 +1,25 @@
+using Windows.UI.Xaml.Media;
+
+namespace EyesAndEars.UWP.Models {
+ public class Device {
+
+ public int Id { get; set; }
+
+ public LightReading LatestReading { get; set; }
+
+ public DeviceStatus LatestStatus { get; set; }
+
+ public SolidColorBrush StatusColour { get; set; }
+
+ public Device() { }
+
+ public Device(int id, LightReading reading, DeviceStatus status,
+ SolidColorBrush colour) {
+
+ Id = id;
+ LatestReading = reading;
+ LatestStatus = status;
+ StatusColour = colour;
+ }
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/DeviceStatus.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/DeviceStatus.cs
new file mode 100644
index 0000000..1bb30db
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/DeviceStatus.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace EyesAndEars.UWP.Models {
+
+ public class DeviceStatus {
+ public int id { get; set; }
+ public string status { get; set; }
+ public DateTime time { get; set; }
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/LightReading.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/LightReading.cs
new file mode 100644
index 0000000..cf60b83
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Models/LightReading.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace EyesAndEars.UWP.Models {
+
+ public class LightReading {
+
+ public int id { get; set; }
+ public int reading { get; set; }
+ public DateTime time { get; set; }
+
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Package.appxmanifest b/src/EyesAndEars.UWP/EyesAndEars.UWP/Package.appxmanifest
new file mode 100644
index 0000000..fda27fb
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Package.appxmanifest
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+ EyesAndEars.UWP
+ Craig Oates
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Properties/AssemblyInfo.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..9646b70
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+using System.Reflection;
+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("EyesAndEars.UWP")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("EyesAndEars.UWP")]
+[assembly: AssemblyCopyright("Copyright © 2020")]
+[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/EyesAndEars.UWP/EyesAndEars.UWP/Properties/Default.rd.xml b/src/EyesAndEars.UWP/EyesAndEars.UWP/Properties/Default.rd.xml
new file mode 100644
index 0000000..d5fe98b
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Properties/Default.rd.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs
new file mode 100644
index 0000000..b93de54
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs
@@ -0,0 +1,175 @@
+using EyesAndEars.UWP.Models;
+using System;
+using System.Diagnostics;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Windows.Storage;
+using Windows.UI;
+using Windows.UI.Xaml.Media;
+
+namespace EyesAndEars.UWP.Services {
+ public static class DataServices {
+
+ public static async Task UpdateDevice(string url, int deviceId) {
+ try {
+ var id = MapFactoryDeviceToGalleyDevice(deviceId); // Has note.
+ var readingAPI = $"{url}/api/readings/latest/{id}";
+ var statusAPI = $"{url}/api/status/latest/{deviceId}";
+ var readingJSON = await WebServices.GetJSON(readingAPI);
+ var statusJSON = await WebServices.GetJSON(statusAPI);
+ var r = MapToLightReading(readingJSON);
+ var s = MapToDeviceStatus(statusJSON);
+ var c = UpdateStatusColour(s.status, r.reading);
+ return new Device(deviceId, r, s, c);
+ }
+ catch (Exception e) {
+ Debug.WriteLine(e.Message);
+ return CreateFallBackDevice(deviceId);
+ }
+ }
+
+ static SolidColorBrush UpdateStatusColour(string status, int reading) {
+ try {
+ if (status.Equals("on", StringComparison.OrdinalIgnoreCase)) {
+ /* Note: Reading values breakdown.
+ * =======================================
+ * 1. When testing the light meters, the base line for normal
+ * light is 48 or below. Anything above this is when one of
+ * the guys in the factory was welding. Becuase of this,
+ * I have set 0 to 48 as the 'default' status on the
+ * dashboard.
+ *
+ * 2. During testing we noticed the light meters would
+ * return 'negative light' values. There is a reason for
+ * this but that is out of the scope of this project. This
+ * project just needs to process the data. The negative
+ * light values are when the lights in the factory are off.
+ * The light meter is still running but there is no light
+ * to measure. So, everything is fine but it looks broken.
+ * The 'LightSkyBlue' colour is used to help relay this
+ * bit of information.
+ */
+ if (reading > 0 && reading < 48) // On but no weld detected.
+ return new SolidColorBrush(Colors.LightSeaGreen);
+ if (reading > 48) // On and weld detected.
+ return new SolidColorBrush(Colors.DarkSeaGreen);
+ else {
+ // On but factory lights are off.
+ return new SolidColorBrush(Colors.LightSkyBlue);
+ }
+ }
+ else return new SolidColorBrush(Colors.DarkRed); }
+ catch (Exception e) {
+ Debug.WriteLine(e.Message);
+ return new SolidColorBrush(Colors.DarkOrange);
+ }
+ }
+
+ /* Note: The Purpose of Mapping a Factory to a Gallery Device.
+ * ================================================================
+ * Every device in the project is paired up with another.
+ * Factory1 => Gallery1 | Device1 => Device4
+ * Factory2 => Gallery2 | Device2 => Device5
+ * Factory3 => Gallery3 | Device3 => Device6 (Note in use at this time)
+ * At the moment, when a device completes a status update, each one
+ * is ran throught the "UpdateDevice" function (above). This means
+ * the latest light reading for a light meter (factory) must be
+ * retrieved when a galley-based device's status is updated.
+ * From a strict point-of-view, the gallery device does not need it
+ * so I should/could seperate out this functionality into seperate
+ * functions. For now though, a light reading is still needed to be
+ * retrieved because of the way the functions are called.
+ * This function just maps/pairs the (factory) light reading to the
+ * appropriate gallery device. By doing this, the gallery device
+ * has extra information on its paired up light meter. One way I
+ * have used that information is to show a small piece of text in
+ * the gallery status box to quickly check the accuracy of the
+ * synchronisation between the factory and gallery devices.
+ */
+ static int MapFactoryDeviceToGalleyDevice(int deviceId) {
+ int id = 0;
+ if (deviceId > 3) {
+ switch (deviceId) {
+ case 4:
+ id = 1;
+ break;
+ case 5:
+ id = 2;
+ break;
+ case 6:
+ id = 3;
+ break;
+ default:
+ break;
+ }
+ }
+ else {
+ id = deviceId;
+ }
+ return id;
+ }
+
+ static LightReading MapToLightReading(string json) {
+ try {
+ var reading = JsonSerializer.Deserialize(json);
+ return reading;
+ }
+ catch (Exception e) {
+ Debug.WriteLine(e.Message);
+ return CreateDefaultLightReading();
+ }
+ }
+
+ static DeviceStatus MapToDeviceStatus(string json) {
+ try {
+ var status = JsonSerializer.Deserialize(json);
+ return status;
+ }
+ catch (Exception e) {
+ Debug.WriteLine(e.Message);
+ return CreateDefaultDeviceStatus();
+ }
+ }
+
+ public static Device CreateFallBackDevice(int deviceId) {
+ // "999" and "err" are acting as sentinals in this context.
+ var r = new LightReading { id = 0, reading = 999, time = DateTime.Now };
+ var s = new DeviceStatus { id = 0, status = "err", time = DateTime.Now };
+ var c = new SolidColorBrush(Colors.DarkOrange);
+ var d = new Device(deviceId, r, s, c);
+ return d;
+ }
+
+ static LightReading CreateDefaultLightReading() =>
+ new LightReading { id = 0, reading = 999, time = DateTime.Now };
+
+ static DeviceStatus CreateDefaultDeviceStatus() =>
+ new DeviceStatus { id = 0, status = "err", time = DateTime.Now };
+
+ public static async Task SaveBaseURLAsync(string contents) {
+ try {
+ var storageFolder = ApplicationData.Current.LocalFolder;
+ var baseURLFile = await storageFolder.CreateFileAsync("baseURL.txt",
+ CreationCollisionOption.ReplaceExisting);
+ await FileIO.WriteTextAsync(baseURLFile, contents);
+ }
+ catch (Exception e) {
+ Debug.WriteLine(e.Message);
+ }
+ }
+
+ public static async Task GetBaseURLAsync() {
+ try {
+ var storageFolder = ApplicationData.Current.LocalFolder;
+ var baseURLFile = await storageFolder.GetFileAsync("baseURL.txt");
+ var text = await FileIO.ReadTextAsync(baseURLFile);
+ return text;
+ }
+ catch (Exception e) {
+ Debug.WriteLine(e.Message);
+ return "";
+ }
+
+ }
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/WebServices.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/WebServices.cs
new file mode 100644
index 0000000..7550f04
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/WebServices.cs
@@ -0,0 +1,20 @@
+using System.Net.Http;
+using System.Net.Http.Headers;
+using System.Threading.Tasks;
+
+namespace EyesAndEars.UWP.Services {
+ public static class WebServices {
+
+ private static readonly HttpClient _client = new HttpClient();
+
+ public static async Task GetJSON(string url) {
+ _client.DefaultRequestHeaders.Accept.Clear();
+ var response = await _client.GetAsync(url);
+ _client.DefaultRequestHeaders.Accept.Add(
+ new MediaTypeWithQualityHeaderValue("application/json"));
+ var result = await _client.GetStringAsync(url);
+ return result;
+ }
+
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/ViewModels/MainPageVM.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/ViewModels/MainPageVM.cs
new file mode 100644
index 0000000..cc07749
--- /dev/null
+++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/ViewModels/MainPageVM.cs
@@ -0,0 +1,127 @@
+using EyesAndEars.UWP.Models;
+using System;
+using System.ComponentModel;
+
+namespace EyesAndEars.UWP.ViewModels {
+ public class MainPageVM : INotifyPropertyChanged {
+
+ /* Note: Why I did not use a collection of some sort and hard-coded the
+ * objects instead.
+ * ====================================================================
+ * Because the projects requirements are fixed in-place and this
+ * program does not have long-term requirements, I decided to not worry
+ * about long-term maintenance benefits. If something comes from this
+ * project afterwards, the duplicated nature of the code below will
+ * probably need refacorting but I will leave that to the person
+ * needing to make that call at that time.
+ */
+
+ public MainPageVM() { }
+
+ public MainPageVM(Device f1, Device f2, Device f3,
+ Device g1, Device g2, Device g3) {
+ Device1 = f1;
+ Device2 = f2;
+ Device3 = f3;
+ Device4 = g1;
+ Device5 = g2;
+ Device6 = g3;
+ CurrentTime = DateTime.Now.ToShortTimeString();
+ }
+
+ string _currentTime;
+
+ public string CurrentTime {
+ get { return _currentTime; }
+ set {
+ if (value != _currentTime) {
+ _currentTime = value;
+ NotifyPropertyChanged("CurrentTime");
+ }
+ }
+ }
+
+ string _baseURL;
+ public string BaseURL {
+ get { return _baseURL; }
+ set {
+ if (value != _baseURL) {
+ _baseURL = value;
+ NotifyPropertyChanged("BaseURL");
+ }
+ }
+ }
+
+ Device _device1;
+ public Device Device1 {
+ get { return _device1; }
+ set {
+ if (value != _device1) {
+ _device1 = value;
+ NotifyPropertyChanged("Device1");
+ }
+ }
+ }
+
+ Device _device2;
+ public Device Device2 {
+ get { return _device2; }
+ set {
+ if (value != _device2) {
+ _device2 = value;
+ NotifyPropertyChanged("Device2");
+ }
+ }
+ }
+
+ Device _device3;
+ public Device Device3 {
+ get { return _device3; }
+ set {
+ if (value != _device3) {
+ _device3 = value;
+ NotifyPropertyChanged("Device3");
+ }
+ }
+ }
+
+ Device _device4;
+ public Device Device4 {
+ get { return _device4; }
+ set {
+ if (value != _device4) {
+ _device4 = value;
+ NotifyPropertyChanged("Device4");
+ }
+ }
+ }
+
+ Device _device5;
+ public Device Device5 {
+ get { return _device5; }
+ set {
+ if (value != _device5) {
+ _device5 = value;
+ NotifyPropertyChanged("Device5");
+ }
+ }
+ }
+
+ Device _device6;
+ public Device Device6 {
+ get { return _device6; }
+ set {
+ if (value != _device6) {
+ _device6 = value;
+ NotifyPropertyChanged("Device6");
+ }
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected void NotifyPropertyChanged(string info) {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(info));
+ }
+ }
+}
diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/images/logo.png b/src/EyesAndEars.UWP/EyesAndEars.UWP/images/logo.png
new file mode 100644
index 0000000..9c1c4a3
Binary files /dev/null and b/src/EyesAndEars.UWP/EyesAndEars.UWP/images/logo.png differ