From 4888eedde6a60f55897f7e52fa976f79eafebd0d Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Tue, 1 Dec 2015 15:58:29 +0100 Subject: [PATCH] Changed port/ip set moment --- HueUWP/App.xaml.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/HueUWP/App.xaml.cs b/HueUWP/App.xaml.cs index 3dd861e..9bdc9e7 100644 --- a/HueUWP/App.xaml.cs +++ b/HueUWP/App.xaml.cs @@ -7,6 +7,7 @@ using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; +using Windows.Storage; using Windows.UI.Core; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; @@ -23,6 +24,7 @@ namespace HueUWP /// sealed partial class App : Application { + public static ApplicationDataContainer LOCAL_SETTINGS = ApplicationData.Current.LocalSettings; Frame rootFrame; /// @@ -79,6 +81,13 @@ namespace HueUWP // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } + + if(LOCAL_SETTINGS.Values["ip"] == null) + LOCAL_SETTINGS.Values["ip"] = "localhost"; + if (LOCAL_SETTINGS.Values["port"] == null) + LOCAL_SETTINGS.Values["port"] = "8000"; + + // Ensure the current window is active Window.Current.Activate(); }