diff --git a/.gitignore b/.gitignore index 3a2238d..3ecbdd2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.user *.userosscache *.sln.docstates +*.appx # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs @@ -21,6 +22,7 @@ bld/ [Bb]in/ [Oo]bj/ +AppPackages/ # Visual Studio 2015 cache/options directory .vs/ diff --git a/Color/Class1.cs b/Color/Class1.cs new file mode 100644 index 0000000..197b612 --- /dev/null +++ b/Color/Class1.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Color +{ + public class Class1 + { + } +} diff --git a/Color/Color.csproj b/Color/Color.csproj new file mode 100644 index 0000000..d768852 --- /dev/null +++ b/Color/Color.csproj @@ -0,0 +1,52 @@ + + + + + 10.0 + Debug + AnyCPU + {63281117-2ff4-46be-8114-659488c3bffd} + Library + Properties + Color + Color + en-US + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Profile111 + v4.5 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + diff --git a/Color/Properties/AssemblyInfo.cs b/Color/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a6ba0a8 --- /dev/null +++ b/Color/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +using System.Resources; +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("Color")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Color")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] + +// 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")] diff --git a/Core/Core.csproj b/Core/Core.csproj new file mode 100644 index 0000000..498d5dc --- /dev/null +++ b/Core/Core.csproj @@ -0,0 +1,132 @@ + + + + + Debug + AnyCPU + {30264440-54B2-4524-BF85-80A0F5540BEC} + Library + Properties + Core + Core + en-US + UAP + 10.0.10586.0 + 10.0.10240.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + prompt + 4 + + + x86 + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + + + x86 + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + + + ARM + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + + + ARM + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + + + x64 + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + + + x64 + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + + + + + + + + + + + + + + + + + + + 14.0 + + + + \ No newline at end of file diff --git a/Core/DataModel/DataModel.cs b/Core/DataModel/DataModel.cs new file mode 100644 index 0000000..90abf58 --- /dev/null +++ b/Core/DataModel/DataModel.cs @@ -0,0 +1,17 @@ +namespace Core.DataModel +{ + public class Icon + { + public string Graph { get; set; } + } + public class Item + { + public string Font { get; set; } + public string Graph { get; set; } + } + public class URI + { + public string Intro { get; set; } + public string Content { get; set; } + } +} diff --git a/Core/DataModel/HistoryModel.cs b/Core/DataModel/HistoryModel.cs new file mode 100644 index 0000000..e411c42 --- /dev/null +++ b/Core/DataModel/HistoryModel.cs @@ -0,0 +1,12 @@ +namespace Core.DataModel +{ + public class UriHistory + { + public string Content { get; set; } + } + public class IconHistory + { + public string Font { get; set; } + public string Char { get; set; } + } +} diff --git a/Core/DataModel/InstalledFont.cs b/Core/DataModel/InstalledFont.cs new file mode 100644 index 0000000..d210356 --- /dev/null +++ b/Core/DataModel/InstalledFont.cs @@ -0,0 +1,96 @@ +using SharpDX.DirectWrite; +using System.Collections.Generic; +using System.Globalization; + +namespace Core.DataModel +{ + public class InstalledFont + { + public string Name { get; set; } + + public int FamilyIndex { get; set; } + + public int Index { get; set; } + + public static List GetFonts() + { + var fontList = new List(); + + var factory = new Factory(); + var fontCollection = factory.GetSystemFontCollection(false); + var familyCount = fontCollection.FontFamilyCount; + + for (int i = 0; i < familyCount; i++) + { + var fontFamily = fontCollection.GetFontFamily(i); + var familyNames = fontFamily.FamilyNames; + int index; + + if (!familyNames.FindLocaleName(CultureInfo.CurrentCulture.Name, out index)) + { + if (!familyNames.FindLocaleName("en-us", out index)) + { + index = 0; + } + } + + string name = familyNames.GetString(index); + if(name == "Segoe UI Symbol" || name == "Segoe UI Emoji" || name == "Segoe MDL2 Assets" ) + { + fontList.Add(new InstalledFont() + { + Name = name, + FamilyIndex = i, + Index = index + }); + } + } + + return fontList; + } + + public List GetCharacters() + { + var factory = new Factory(); + var fontCollection = factory.GetSystemFontCollection(false); + var fontFamily = fontCollection.GetFontFamily(FamilyIndex); + int ini = 0; + + var font = fontFamily.GetFont(Index); + var characters = new List(); + var count = 65535; + if(Name == "Segoe UI Symbol" ) + { + ini = 161; + } + else if (Name == "Segoe UI Emoji") + { + ini = 8252; + } + else if(Name == "Segoe MDL2 Assets") + { + ini = 54375; + } + for (var i = ini; i < count; i++) + { + if (font.HasCharacter(i)) + { + characters.Add(new Character() + { + Char = char.ConvertFromUtf32(i), + UnicodeIndex = i, + Font = Name + }); + } + } + + return characters; + } + } + public class Character + { + public string Font { get; set; } + public string Char { get; set; } + public int UnicodeIndex { get; set; } + } +} diff --git a/Core/DataModel/Update.cs b/Core/DataModel/Update.cs new file mode 100644 index 0000000..d7cbcc0 --- /dev/null +++ b/Core/DataModel/Update.cs @@ -0,0 +1,19 @@ +namespace Core.DataModel +{ + + public class Update + { + public class detail + { + public string en { get; set; } + public string zh_hant { get; set; } + public string zh_hans { get; set; } + } + + public class RootObject + { + public string version { get; set; } + public detail detail { get; set; } + } + } +} \ No newline at end of file diff --git a/Developer Hub For UWP/Presentation/insideten.cs b/Core/DataModel/insideten.cs similarity index 66% rename from Developer Hub For UWP/Presentation/insideten.cs rename to Core/DataModel/insideten.cs index afba33d..bef55cc 100644 --- a/Developer Hub For UWP/Presentation/insideten.cs +++ b/Core/DataModel/insideten.cs @@ -1,7 +1,7 @@ -namespace Developer_Hub_For_UWP.Presentation +namespace Core.DataModel { - class insideten + public class insideten { public static string add_format(string address) { @@ -10,7 +10,7 @@ public static string add_format(string address) else if (address.StartsWith("blogs")) address = "https://" + address; return address; } - public class Pcwrp + public class pcwrp { public string build { get; set; } public string version { get; set; } @@ -18,7 +18,7 @@ public class Pcwrp public string release_date { get; set; } } - public class Pcwif + public class pcwif { public string build { get; set; } public string version { get; set; } @@ -26,7 +26,7 @@ public class Pcwif public string release_date { get; set; } } - public class Pcwis + public class pcwis { public string build { get; set; } public string version { get; set; } @@ -34,7 +34,7 @@ public class Pcwis public string release_date { get; set; } } - public class Mowrp + public class mowrp { public string build { get; set; } public string version { get; set; } @@ -42,7 +42,7 @@ public class Mowrp public string release_date { get; set; } } - public class Mowif + public class mowif { public string build { get; set; } public string version { get; set; } @@ -50,7 +50,7 @@ public class Mowif public string release_date { get; set; } } - public class Mowis + public class mowis { public string build { get; set; } public string version { get; set; } @@ -61,18 +61,28 @@ public class Mowis public class Internal { public string build { get; set; } - public string source { get; set; } + public string version { get; set; } + public string more { get; set; } + public string release_date { get; set; } + } + public class internalservice + { + public string build { get; set; } + public string version { get; set; } + public string more { get; set; } + public string release_date { get; set; } } public class RootObject { - public Pcwrp pcwrp { get; set; } - public Pcwif pcwif { get; set; } - public Pcwis pcwis { get; set; } - public Mowrp mowrp { get; set; } - public Mowif mowif { get; set; } - public Mowis mowis { get; set; } + public pcwrp pcwrp { get; set; } + public pcwif pcwif { get; set; } + public pcwis pcwis { get; set; } + public mowrp mowrp { get; set; } + public mowif mowif { get; set; } + public mowis mowis { get; set; } public Internal @internal { get; set; } + public internalservice internalservice { get; set; } } } } diff --git a/Core/Generator.cs b/Core/Generator.cs new file mode 100644 index 0000000..8b21e82 --- /dev/null +++ b/Core/Generator.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.Graphics.Imaging; +using Windows.Storage; + +namespace Core +{ + public class Generator + { + /// + /// Resize the file to a certain level + /// + /// Final Name Of the Files Generated + /// Height Of Image + /// Width Of Image + /// The File That Needs To Be Resized + /// Location of the final file + public async static Task Resizer(String name, uint hsize, uint wsize, StorageFile file, StorageFolder folder) + { + StorageFile newFile = await folder.CreateFileAsync(name); + using (var sourceStream = await file.OpenAsync(FileAccessMode.Read)) + { + BitmapDecoder decoder = await BitmapDecoder.CreateAsync(sourceStream); + BitmapTransform transform = new BitmapTransform() { ScaledHeight = hsize, ScaledWidth = wsize }; + PixelDataProvider pixelData = await decoder.GetPixelDataAsync( + BitmapPixelFormat.Rgba8, + BitmapAlphaMode.Straight, + transform, + ExifOrientationMode.RespectExifOrientation, + ColorManagementMode.DoNotColorManage); + + using (var destinationStream = await newFile.OpenAsync(FileAccessMode.ReadWrite)) + { + BitmapEncoder encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, destinationStream); + encoder.SetPixelData(BitmapPixelFormat.Rgba8, BitmapAlphaMode.Premultiplied, wsize, hsize, 100, 100, pixelData.DetachPixelData()); + await encoder.FlushAsync(); + } + } + } + } +} diff --git a/Core/Properties/AssemblyInfo.cs b/Core/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3888fbe --- /dev/null +++ b/Core/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("Core")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Core")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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/Core/Properties/Core.rd.xml b/Core/Properties/Core.rd.xml new file mode 100644 index 0000000..2135d3a --- /dev/null +++ b/Core/Properties/Core.rd.xml @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/Core/network.cs b/Core/network.cs new file mode 100644 index 0000000..08f2893 --- /dev/null +++ b/Core/network.cs @@ -0,0 +1,194 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Windows.Storage; +using Windows.UI; +using Windows.UI.Xaml.Media; +using Windows.Web.Http; + +namespace Core.Network +{ + public enum Response + { + DownloadToLocalFolder = 1, + DownloadToRemoteFolder = 2, + DownloadToTemporaryFolder = 3, + } + public struct StatusCode + { + public string code { get; set; } + public string status { get; set; } + } + public struct Status + { + public Brush color { get; set; } + public string status { get; set; } + public string code { get; set; } + public string details { get; set; } + + } + + /// + /// URL Praser + /// + public class UrlPhraser + { + private static StorageFolder storageFolder; + + /// + /// Reach URL and get response + /// + /// URL + /// + public async static Task ReachURL(string url) + { + HttpClient httpClient = new HttpClient(); + HttpResponseMessage response = await httpClient.GetAsync(new Uri(url)); + return response; + } + + /// + /// Get File And Download it. + /// + /// URL + /// Ways to deal with the file + public async static Task ReachFile(string url, Response way) + { + HttpResponseMessage response = await ReachURL(url); + + string filename = url.Split("/".ToCharArray()).Last(); + switch (way) + { + case Response.DownloadToLocalFolder: + storageFolder = ApplicationData.Current.LocalFolder; + break; + case Response.DownloadToRemoteFolder: + storageFolder = ApplicationData.Current.RoamingFolder; + break; + case Response.DownloadToTemporaryFolder: + storageFolder = ApplicationData.Current.TemporaryFolder; + break; + } + + StorageFile storageFile = await storageFolder.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); + var streamout = await storageFile.OpenAsync(FileAccessMode.ReadWrite); + using (var outputStream = streamout.GetOutputStreamAt(0)) + { + using (var dataWriter = new Windows.Storage.Streams.DataWriter(outputStream)) + { + var DataString = await response.Content.ReadAsStringAsync(); + dataWriter.WriteString(DataString); + await dataWriter.StoreAsync(); + await outputStream.FlushAsync(); + } + } + streamout.Dispose(); + + } + + /// + /// Get Header + /// + /// URL + public async static Task ReachHeader(string url) + { + HttpClient httpClient = new HttpClient(); + HttpResponseMessage httpResponse = new HttpResponseMessage(); + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri(url)); + httpResponse = await httpClient.SendRequestAsync(request); + return httpResponse; + } + + /// + /// Reach Status Code + /// + /// URL + /// + public async static Task ReachStatusCode(string url) + { + StatusCode code = new StatusCode(); + HttpResponseMessage httpResponse = await ReachHeader(url); + string[] text = httpResponse.ToString().Split(Convert.ToChar(",")); + code.code = (text[0].Split(Convert.ToChar(":")))[1].Substring(1); + code.status = (text[1].Split(Convert.ToChar(":")))[1].Replace(Convert.ToChar("'"), Convert.ToChar(" ")).Trim(); + return code; + } + } + + /// + /// Get the status of the network. + /// + public class NetworkStatus: UrlPhraser + { + /// + /// Get the detail status of a url + /// + /// URL + /// Status + public async Task GetStatus(string url) + { + Status status = new Status(); + StatusCode code = await ReachStatusCode(url); + status.details = code.status; + status.code = code.code; + if (code.code.StartsWith("1")) + { + status.status = "On Process"; + status.color = GetStatusColor("b"); + } + else if (code.code.StartsWith("2")) + { + status.status = "Operational"; + status.color = GetStatusColor("g"); + } + else if (code.code.StartsWith("3")) + { + status.status = "Redirection Needed"; + status.color = GetStatusColor("y"); + } + else if (code.code.StartsWith("4")) + { + status.status = "Client Error"; + status.color = GetStatusColor("r"); + } + else if (code.code.StartsWith("5")) + { + status.status = "Server Error"; + status.color = GetStatusColor("r"); + } + else + { + status.status = "Unknown"; + status.color = GetStatusColor("b"); + } + return status; + } + + /// + /// Set the proper color of network status + /// + /// Color indicator:r as red,g as green, b as blue, y as yellow + /// + private Brush GetStatusColor(string color) + { + Color c; + switch (color) + { + case "r": + c = Colors.Red; + break; + case "g": + c = Colors.LightGreen; + break; + case "y": + c = Colors.Yellow; + break; + case "b": + c = Colors.Blue; + break; + } + Brush brush = new SolidColorBrush(c); + return brush; + } + } +} diff --git a/Core/project.json b/Core/project.json new file mode 100644 index 0000000..d96e0b0 --- /dev/null +++ b/Core/project.json @@ -0,0 +1,20 @@ +{ + "dependencies": { + "Intense": "0.5.0", + "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0", + "SharpDX": "3.0.2", + "SharpDX.Direct2D1": "3.0.2", + "SharpDX.DXGI": "3.0.2" + }, + "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/Developer Hub For UWP.sln b/Developer Hub For UWP.sln index 929e70e..4bdd8c5 100644 --- a/Developer Hub For UWP.sln +++ b/Developer Hub For UWP.sln @@ -1,9 +1,22 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Developer Hub For UWP", "Developer Hub For UWP\Developer Hub For UWP.csproj", "{10BF85EF-285F-4E43-B346-3948D5BBC954}" + ProjectSection(ProjectDependencies) = postProject + {63281117-2FF4-46BE-8114-659488C3BFFD} = {63281117-2FF4-46BE-8114-659488C3BFFD} + {30264440-54B2-4524-BF85-80A0F5540BEC} = {30264440-54B2-4524-BF85-80A0F5540BEC} + {C9DF65CD-EA82-4148-B819-79789CF533A3} = {C9DF65CD-EA82-4148-B819-79789CF533A3} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{98FCF348-E982-4F11-AD4E-AA340D0F1BF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Color", "Color\Color.csproj", "{63281117-2FF4-46BE-8114-659488C3BFFD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Json2Csharp", "Json to CSharp Generator\Json2Csharp.csproj", "{C9DF65CD-EA82-4148-B819-79789CF533A3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{30264440-54B2-4524-BF85-80A0F5540BEC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -41,8 +54,60 @@ Global {10BF85EF-285F-4E43-B346-3948D5BBC954}.Release|x86.ActiveCfg = Release|x86 {10BF85EF-285F-4E43-B346-3948D5BBC954}.Release|x86.Build.0 = Release|x86 {10BF85EF-285F-4E43-B346-3948D5BBC954}.Release|x86.Deploy.0 = Release|x86 + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|ARM.ActiveCfg = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|ARM.Build.0 = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|x64.ActiveCfg = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|x64.Build.0 = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|x86.ActiveCfg = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Debug|x86.Build.0 = Debug|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|Any CPU.Build.0 = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|ARM.ActiveCfg = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|ARM.Build.0 = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|x64.ActiveCfg = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|x64.Build.0 = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|x86.ActiveCfg = Release|Any CPU + {63281117-2FF4-46BE-8114-659488C3BFFD}.Release|x86.Build.0 = Release|Any CPU + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|ARM.ActiveCfg = Debug|ARM + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|ARM.Build.0 = Debug|ARM + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|x64.ActiveCfg = Debug|x64 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|x64.Build.0 = Debug|x64 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|x86.ActiveCfg = Debug|x86 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Debug|x86.Build.0 = Debug|x86 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|Any CPU.Build.0 = Release|Any CPU + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|ARM.ActiveCfg = Release|ARM + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|ARM.Build.0 = Release|ARM + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|x64.ActiveCfg = Release|x64 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|x64.Build.0 = Release|x64 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|x86.ActiveCfg = Release|x86 + {C9DF65CD-EA82-4148-B819-79789CF533A3}.Release|x86.Build.0 = Release|x86 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|ARM.ActiveCfg = Debug|ARM + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|ARM.Build.0 = Debug|ARM + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|x64.ActiveCfg = Debug|x64 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|x64.Build.0 = Debug|x64 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|x86.ActiveCfg = Debug|x86 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Debug|x86.Build.0 = Debug|x86 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|Any CPU.Build.0 = Release|Any CPU + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|ARM.ActiveCfg = Release|ARM + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|ARM.Build.0 = Release|ARM + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|x64.ActiveCfg = Release|x64 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|x64.Build.0 = Release|x64 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|x86.ActiveCfg = Release|x86 + {30264440-54B2-4524-BF85-80A0F5540BEC}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {63281117-2FF4-46BE-8114-659488C3BFFD} = {98FCF348-E982-4F11-AD4E-AA340D0F1BF2} + {C9DF65CD-EA82-4148-B819-79789CF533A3} = {98FCF348-E982-4F11-AD4E-AA340D0F1BF2} + EndGlobalSection EndGlobal diff --git a/Developer Hub For UWP/App.xaml.cs b/Developer Hub For UWP/App.xaml.cs index 1857cd7..a721af0 100644 --- a/Developer Hub For UWP/App.xaml.cs +++ b/Developer Hub For UWP/App.xaml.cs @@ -3,8 +3,10 @@ using Windows.ApplicationModel.Activation; using Windows.Foundation.Metadata; using Windows.Phone.UI.Input; +using Windows.Storage; using Windows.UI.Core; using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; namespace Developer_Hub_For_UWP @@ -24,10 +26,31 @@ public App() this.Suspending += OnSuspending; } - + protected override void OnActivated(IActivatedEventArgs args) { - base.OnActivated(args); + // TODO: Initialize root frame just like in OnLaunched + + // Handle toast activation + if (args.Kind == ActivationKind.ToastNotification) + { + var toastArgs = args as ToastNotificationActivatedEventArgs; + ApplicationDataContainer _localSettings = ApplicationData.Current.LocalSettings; + // Get arguments corresponding to this activation; + // When tapping the body of the toast caused this activation, the app receives the value of “launch” property of ; + // When the activation is caused by using tapping on an action inside the toast, the app receives the value of “arguments” property of ; + var arguments = toastArgs.Argument; + string[] arg = arguments.Split(Convert.ToChar("=")); + switch(arg[1]) + { + case "disableNoti": + _localSettings.Containers["Settings"].Values["IsUpdatePopupDisabled"] = true; + break; + } + // Navigate accordingly + } + + // TODO: Handle other types of activation } /// /// Invoked when the application is launched normally by the end user. Other entry points @@ -44,9 +67,10 @@ protected override void OnLaunched(LaunchActivatedEventArgs e) //this.DebugSettings.EnableFrameRateCounter = true; } #endif - var shell = Window.Current.Content as Shell; - + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (shell == null) @@ -57,11 +81,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e) // hook-up shell root frame navigation events shell.RootFrame.NavigationFailed += OnNavigationFailed; shell.RootFrame.Navigated += OnNavigated; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } + // set the Shell as content Window.Current.Content = shell; diff --git a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x64.appxsym b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x64.appxsym index 1215185..5842a27 100644 Binary files a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x64.appxsym and b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x64.appxsym differ diff --git a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86.appxsym b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86.appxsym index 986cdec..48263a4 100644 Binary files a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86.appxsym and b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86.appxsym differ diff --git a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86_x64.appxbundle b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86_x64.appxbundle index 6e39770..6e62484 100644 Binary files a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86_x64.appxbundle and b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_Test/Developer Hub For UWP_2.0.0.0_x86_x64.appxbundle differ diff --git a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_x86_x64_bundle.appxupload b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_x86_x64_bundle.appxupload index dcccef0..87c3bb8 100644 Binary files a/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_x86_x64_bundle.appxupload and b/Developer Hub For UWP/AppPackages/Developer Hub For UWP_2.0.0.0_x86_x64_bundle.appxupload differ diff --git a/Developer Hub For UWP/Assets/Data/api.json b/Developer Hub For UWP/Assets/Data/api.json new file mode 100644 index 0000000..b7ec799 --- /dev/null +++ b/Developer Hub For UWP/Assets/Data/api.json @@ -0,0 +1,50 @@ +{ + "pcwrp": { + "build": "10586.338", + "version": "Threshold 2", + "more": "http://mspoweruser.com/microsoft-releases-windows-10-build-10586-338-pcs-release-preview-ring/", + "release_date": "2nd June, 2016" + }, + "pcwif": { + "build": "14376", + "version": "Redstone 1", + "more": "https://blogs.windows.com/windowsexperience/2016/06/28/announcing-windows-10-insider-preview-build-14376-for-pc-and-mobile/", + "release_date": "28th June, 2016" + }, + "pcwis": { + "build": "14372", + "version": "Redstone 1", + "more": "https://blogs.windows.com/windowsexperience/2016/06/23/announcing-windows-10-insider-preview-build-14372-for-pc-and-mobile/", + "release_date": "28th June, 2016" + }, + "mowrp": { + "build": "10586.338", + "version": "Threshold 2", + "more": "http://mspoweruser.com/windows-10-mobile-build-10586-338-now-available-release-preview-ring/", + "release_date": "2nd June, 2016" + }, + "mowif": { + "build": "14376", + "version": "Redstone 1", + "more": "https://blogs.windows.com/windowsexperience/2016/06/28/announcing-windows-10-insider-preview-build-14376-for-pc-and-mobile/", + "release_date": "28th June, 2016" + }, + "mowis": { + "build": "14372", + "version": "Redstone 1", + "more": "https://blogs.windows.com/windowsexperience/2016/06/23/announcing-windows-10-insider-preview-build-14372-for-pc-and-mobile/", + "release_date": "28th June, 2016" + }, + "internal":{ + "build": "14378", + "version": "Redstone 1", + "more": "", + "release_date": "25th June, 2016" + }, + "internalservice":{ + "build": "10586.456", + "version": "Threshold 2", + "more": "", + "release_date": "21st June, 2016" + } +} diff --git a/Developer Hub For UWP/Assets/new-ver.png b/Developer Hub For UWP/Assets/new-ver.png new file mode 100644 index 0000000..4c06469 Binary files /dev/null and b/Developer Hub For UWP/Assets/new-ver.png differ diff --git a/Developer Hub For UWP/Developer Hub For UWP.csproj b/Developer Hub For UWP/Developer Hub For UWP.csproj index 1cd9b79..361dd26 100644 --- a/Developer Hub For UWP/Developer Hub For UWP.csproj +++ b/Developer Hub For UWP/Developer Hub For UWP.csproj @@ -20,7 +20,7 @@ Developer Hub For UWP_StoreKey.pfx D8C3E2F12520697A7E2D8D7AB8CA28809A664A2C False - Auto + Always x86|x64 @@ -56,6 +56,8 @@ false prompt true + false + true bin\x64\Release\ @@ -96,6 +98,7 @@ + @@ -138,6 +141,9 @@ PreserveNewest + + Always + Always @@ -169,10 +175,7 @@ Page5.xaml - - - - + Shell.xaml @@ -189,7 +192,6 @@ SettingsPage.xaml - @@ -259,11 +261,24 @@ Visual C++ 2015 Runtime for Universal Windows Platform Apps - - Microsoft Mobile Extension SDK for Universal App Platform + + Windows Mobile Extensions for the UWP - + + + {63281117-2ff4-46be-8114-659488c3bffd} + Color + + + {30264440-54b2-4524-bf85-80a0f5540bec} + Core + + + {c9df65cd-ea82-4148-b819-79789cf533a3} + Json2Csharp + + 14.0 diff --git a/Developer Hub For UWP/Package.appxmanifest b/Developer Hub For UWP/Package.appxmanifest index 777f807..9240554 100644 --- a/Developer Hub For UWP/Package.appxmanifest +++ b/Developer Hub For UWP/Package.appxmanifest @@ -1,6 +1,6 @@  - + ms-resource:AppName diff --git a/Developer Hub For UWP/Pages/AboutPage.xaml b/Developer Hub For UWP/Pages/AboutPage.xaml index 0af4d62..9435719 100644 --- a/Developer Hub For UWP/Pages/AboutPage.xaml +++ b/Developer Hub For UWP/Pages/AboutPage.xaml @@ -11,7 +11,7 @@ - + @@ -19,16 +19,14 @@ + + + - - -