From badecbeac307d9135f14c6e42874f456730c295d Mon Sep 17 00:00:00 2001 From: Yorick Rommers Date: Fri, 27 Nov 2015 12:35:52 +0100 Subject: [PATCH] Added APIHandler --- HueUWP/APIHandler.cs | 27 +++++++++++++ HueUWP/HueUWP.csproj | 13 ++++--- HueUWP/MainPage.xaml.cs | Bin 983 -> 1135 bytes HueUWP/project.json | 31 ++++++++------- HueUWP/project.lock.json | 82 ++++++++++++++++++++++++++++++++++++++- 5 files changed, 131 insertions(+), 22 deletions(-) create mode 100755 HueUWP/APIHandler.cs diff --git a/HueUWP/APIHandler.cs b/HueUWP/APIHandler.cs new file mode 100755 index 0000000..0b628e5 --- /dev/null +++ b/HueUWP/APIHandler.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.Storage; + +namespace HueUWP +{ + class APIHandler + { + public static ApplicationData APP_DATA = ApplicationData.Current; + public static ApplicationDataContainer LOCAL_SETTINGS = APP_DATA.LocalSettings; + + NetworkHandler nwh; + public APIHandler(NetworkHandler nwh) + { + this.nwh = nwh; + } + + public void Register() + { + string id = nwh.RegisterName("Hue", "Kenneth&Yorick").ToString(); + //write to file; + } + } +} diff --git a/HueUWP/HueUWP.csproj b/HueUWP/HueUWP.csproj index d7e0ef6..487059e 100644 --- a/HueUWP/HueUWP.csproj +++ b/HueUWP/HueUWP.csproj @@ -93,6 +93,7 @@ + App.xaml @@ -132,11 +133,11 @@ 14.0 - \ No newline at end of file diff --git a/HueUWP/MainPage.xaml.cs b/HueUWP/MainPage.xaml.cs index bbf5d228d835e31c0791b611ad3a8d422f2d55f5..5d3e6e315031b51b4fdca36a322b40e560e7d2bd 100644 GIT binary patch literal 1135 VcmZQz7zLvtFd71*AwZW9000DU00961 literal 983 zcmbVL+iuf95Pi4AKaBE#5(%xNQXXhp5Hu=@pdso-;dQf~I-{&-&F(rTpnMq*d=kIF zI88$v$wI=CCC{95X3ordfB*bd1>zj8*CAptNFGP(+*ykzlH;I0AfqR9z!;Lw*@Z|Z z44yp|k3S!9KM{XDNL^JNsX#U6h~Aag=vQPgs2OqQ>ac?!M7ylIa202|vDJ<|_I}8^ z9jh<8uq|m(a`euIf8lECsh~(JY^4r$)NN(PTvo9Syu^%Jl@q<9d^dlRrf{=BcyBc? zVXAWkl7j?!ORJ+q0WxQ*0%gS+=m?7#%ab(Cohrz97u;P`#ue#ZZHbrZTREoXI6FJ; zAH95a^xRlO*;)VFasPFaur4r^+8~T7yq!&x9|_2liigus6@~WeH~Y*x2JsNrP&TIG zLRuTmFh{6@IB_gS1Gt*OdEonzBp)5r6c@yx;lfKpwXb-ZK50@`b4vySYAd=@`$*b? zu{s2})Wq9moNRZpEpczQF}zbgkh;As-XMQDO(Zsg{F`#d+R}GCcSY$~7TN6$_KJo# z#CesgnU~GW_OQ!X!vtgP{Boo@v*^1$b%i;}9rF{JsoVLeb?Cf+&Iozg>HSZ=8w_GZ OlzS_i?bjyRB!2)6Dn;D@ diff --git a/HueUWP/project.json b/HueUWP/project.json index c594939..593d68f 100644 --- a/HueUWP/project.json +++ b/HueUWP/project.json @@ -1,16 +1,17 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } +{ + "dependencies": { + "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", + "Newtonsoft.Json": "7.0.1" + }, + "frameworks": { + "uap10.0": {} + }, + "runtimes": { + "win10-arm": {}, + "win10-arm-aot": {}, + "win10-x86": {}, + "win10-x86-aot": {}, + "win10-x64": {}, + "win10-x64-aot": {} + } } \ No newline at end of file diff --git a/HueUWP/project.lock.json b/HueUWP/project.lock.json index a7d5c41..a977d58 100755 --- a/HueUWP/project.lock.json +++ b/HueUWP/project.lock.json @@ -201,6 +201,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -1779,6 +1787,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -3390,6 +3406,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -5006,6 +5030,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -6617,6 +6649,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -8233,6 +8273,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -9844,6 +9892,14 @@ "lib/dotnet/Microsoft.Win32.Primitives.dll": {} } }, + "Newtonsoft.Json/7.0.1": { + "compile": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {} + } + }, "System.AppContext/4.0.0": { "dependencies": { "System.Collections": "[4.0.0, )", @@ -11868,6 +11924,29 @@ "ref/xamarinmac20/_._" ] }, + "Newtonsoft.Json/7.0.1": { + "sha512": "q3V4KLetMLnt1gpAVWgtXnHjKs0UG/RalBc29u2ZKxd5t5Ze4JBL5WiiYIklJyK/5CRiIiNwigVQUo0FgbsuWA==", + "type": "Package", + "files": [ + "[Content_Types].xml", + "_rels/.rels", + "lib/net20/Newtonsoft.Json.dll", + "lib/net20/Newtonsoft.Json.xml", + "lib/net35/Newtonsoft.Json.dll", + "lib/net35/Newtonsoft.Json.xml", + "lib/net40/Newtonsoft.Json.dll", + "lib/net40/Newtonsoft.Json.xml", + "lib/net45/Newtonsoft.Json.dll", + "lib/net45/Newtonsoft.Json.xml", + "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll", + "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml", + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll", + "lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.xml", + "Newtonsoft.Json.nuspec", + "package/services/metadata/core-properties/49e907fc018c4c7ab632e6d4ad4766f8.psmdcp", + "tools/install.ps1" + ] + }, "System.AppContext/4.0.0": { "sha512": "gUoYgAWDC3+xhKeU5KSLbYDhTdBYk9GssrMSCcWUADzOglW+s0AmwVhOUGt2tL5xUl7ZXoYTPdA88zCgKrlG0A==", "type": "Package", @@ -14566,7 +14645,8 @@ }, "projectFileDependencyGroups": { "": [ - "Microsoft.NETCore.UniversalWindowsPlatform >= 5.0.0" + "Microsoft.NETCore.UniversalWindowsPlatform >= 5.0.0", + "Newtonsoft.Json >= 7.0.1" ], "UAP,Version=v10.0": [] }