Added initial Uno Platform frontend project.

This commit is contained in:
Dennis Brentjes 2023-04-28 17:56:23 +02:00
parent 1296f363af
commit b2aba31264
96 changed files with 3530 additions and 0 deletions

3
FrontendPlatformUno/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
**/bin
**/obj
.vs

View File

@ -0,0 +1,38 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.SDK",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
"Microsoft.NetCore.Component.Web",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.IISExpress",
"Component.Microsoft.Web.LibraryManager",
"Microsoft.VisualStudio.ComponentGroup.Web",
"Microsoft.VisualStudio.Component.Web",
"Microsoft.VisualStudio.ComponentGroup.Web.Client",
"Microsoft.VisualStudio.Workload.NetWeb",
"Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites",
"Microsoft.VisualStudio.Workload.Azure",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.Component.NetFX.Native",
"Microsoft.VisualStudio.Component.Graphics",
"Component.OpenJDK",
"Microsoft.VisualStudio.Component.MonoDebugger",
"Microsoft.VisualStudio.Component.Merq",
"Component.Xamarin.RemotedSimulator",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine",
"Component.Xamarin",
"Component.Android.SDK32",
"Microsoft.VisualStudio.Workload.NetCrossPlat",
"Microsoft.VisualStudio.Workload.NetCoreTools",
"Microsoft.VisualStudio.ComponentGroup.Maui.All"
]
}

View File

@ -0,0 +1,59 @@
<Project ToolsVersion="15.0">
<PropertyGroup>
<LangVersion>11</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DebugType>portable</DebugType>
<DebugSymbols>True</DebugSymbols>
<SynthesizeLinkMetadata>true</SynthesizeLinkMetadata>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);Uno0001;CS1998;CA1416;NU1507</NoWarn>
<DefaultLanguage>en</DefaultLanguage>
<IsAndroid>false</IsAndroid>
<IsIOS>false</IsIOS>
<IsMac>false</IsMac>
<IsMacCatalyst>false</IsMacCatalyst>
<IsWinAppSdk>false</IsWinAppSdk>
</PropertyGroup>
<Choose>
<When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PropertyGroup>
<IsAndroid>true</IsAndroid>
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PropertyGroup>
<IsIOS>true</IsIOS>
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)'==''">iossimulator-x64</RuntimeIdentifier>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">
<PropertyGroup>
<IsMac>true</IsMac>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)'==''">osx-x64</RuntimeIdentifier>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<PropertyGroup>
<IsMacCatalyst>true</IsMacCatalyst>
<SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)'==''">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>
</When>
<When Condition="$(TargetFramework.Contains('windows10'))">
<PropertyGroup>
<IsWinAppSdk>true</IsWinAppSdk>
<SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
</PropertyGroup>
</When>
</Choose>
</Project>

View File

@ -0,0 +1,2 @@
<Project ToolsVersion="15.0">
</Project>

View File

@ -0,0 +1,17 @@
<local:App x:Class="FrontendPlatformUno.AppHead"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wasm="http://platform.uno/wasm"
xmlns:local="using:FrontendPlatformUno"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="wasm">
<local:App.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///FrontendPlatformUno/AppResources.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</local:App.Resources>
</local:App>

View File

@ -0,0 +1,14 @@
namespace FrontendPlatformUno
{
public sealed partial class AppHead : App
{
/// <summary>
/// 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().
/// </summary>
public AppHead()
{
this.InitializeComponent();
}
}
}

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="450"
height="450"
viewBox="0 0 50.369617 49.826836"
version="1.1"
id="svg151"
sodipodi:docname="appconfig.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview153"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.250876"
inkscape:cx="218.64677"
inkscape:cy="175.87674"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g149" />
<defs
id="defs105">
<path
id="aj28a0fd1a"
d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" />
<path
id="fdje57jgic"
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" />
<path
id="6bg72xwlze"
d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" />
<path
id="eaqjnja8wg"
d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" />
</defs>
<g
fill="none"
fill-rule="evenodd"
id="g149"
transform="translate(-2.9304427e-4,-1.6465461e-4)">
<g
id="g147">
<g
id="g145">
<path
fill="#7a67f8"
d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261"
id="path107" />
<path
fill="#f85977"
d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z"
id="path109" />
<path
fill="#159bff"
d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88"
id="path111" />
<path
fill="#67e5ad"
d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312"
id="path113" />
<g
transform="translate(21.154,18.577)"
id="g120">
<mask
id="8jptpqrneb"
fill="#ffffff">
<use
xlink:href="#aj28a0fd1a"
id="use115" />
</mask>
<path
d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z"
mask="url(#8jptpqrneb)"
id="path118" />
</g>
<g
transform="translate(27.404,20.981)"
id="g127">
<mask
id="b2iljpfwbd"
fill="#ffffff">
<use
xlink:href="#fdje57jgic"
id="use122" />
</mask>
<path
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z"
mask="url(#b2iljpfwbd)"
id="path125" />
</g>
<g
transform="translate(18.99,24.587)"
id="g134">
<mask
id="gj70tyfpnf"
fill="#ffffff">
<use
xlink:href="#6bg72xwlze"
id="use129" />
</mask>
<path
d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z"
mask="url(#gj70tyfpnf)"
id="path132" />
</g>
<g
transform="translate(25.24,26.99)"
id="g141">
<mask
id="z7vhvduckh"
fill="#ffffff">
<use
xlink:href="#eaqjnja8wg"
id="use136" />
</mask>
<path
d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z"
mask="url(#z7vhvduckh)"
id="path139" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="456"
height="456"
viewBox="0 0 456 456"
version="1.1"
id="svg453"
sodipodi:docname="iconapp.old.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs457" />
<sodipodi:namedview
id="namedview455"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.8574561"
inkscape:cx="228.26919"
inkscape:cy="228.26919"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg453" />
<rect
x="0"
y="0"
width="456"
height="456"
fill="#FFFFFF"
id="rect451" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="450"
height="450"
viewBox="0 0 50.369617 49.826836"
version="1.1"
id="svg151"
sodipodi:docname="appconfig.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview153"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.250876"
inkscape:cx="218.64677"
inkscape:cy="175.87674"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g149" />
<defs
id="defs105">
<path
id="aj28a0fd1a"
d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" />
<path
id="fdje57jgic"
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" />
<path
id="6bg72xwlze"
d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" />
<path
id="eaqjnja8wg"
d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" />
</defs>
<g
fill="none"
fill-rule="evenodd"
id="g149"
transform="translate(-2.9304427e-4,-1.6465461e-4)">
<g
id="g147">
<g
id="g145">
<path
fill="#7a67f8"
d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261"
id="path107" />
<path
fill="#f85977"
d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z"
id="path109" />
<path
fill="#159bff"
d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88"
id="path111" />
<path
fill="#67e5ad"
d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312"
id="path113" />
<g
transform="translate(21.154,18.577)"
id="g120">
<mask
id="8jptpqrneb"
fill="#ffffff">
<use
xlink:href="#aj28a0fd1a"
id="use115" />
</mask>
<path
d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z"
mask="url(#8jptpqrneb)"
id="path118" />
</g>
<g
transform="translate(27.404,20.981)"
id="g127">
<mask
id="b2iljpfwbd"
fill="#ffffff">
<use
xlink:href="#fdje57jgic"
id="use122" />
</mask>
<path
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z"
mask="url(#b2iljpfwbd)"
id="path125" />
</g>
<g
transform="translate(18.99,24.587)"
id="g134">
<mask
id="gj70tyfpnf"
fill="#ffffff">
<use
xlink:href="#6bg72xwlze"
id="use129" />
</mask>
<path
d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z"
mask="url(#gj70tyfpnf)"
id="path132" />
</g>
<g
transform="translate(25.24,26.99)"
id="g141">
<mask
id="z7vhvduckh"
fill="#ffffff">
<use
xlink:href="#eaqjnja8wg"
id="use136" />
</mask>
<path
d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z"
mask="url(#z7vhvduckh)"
id="path139" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,25 @@
<Project>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)AppHead.xaml" />
<ApplicationDefinition Include="$(MSBuildThisFileDirectory)AppHead.xaml"
SubType="Designer"
XamlRuntime="WinUI"
Generator="MSBuild:Compile"
Link="AppHead.xaml" />
<Compile Include="$(MSBuildThisFileDirectory)AppHead.xaml.cs"
XamlRuntime="WinUI"
DependentUpon="AppHead.xaml"
Link="AppHead.xaml.cs" />
<UnoIcon Include="$(MSBuildThisFileDirectory)Icons\iconapp.svg"
ForegroundFile="$(MSBuildThisFileDirectory)Icons\appconfig.svg"
ForegroundScale="0.65"
Color="#00000000" />
<UnoSplashScreen
Include="$(MSBuildThisFileDirectory)Splash\splash_screen.svg"
BaseSize="128,128"
Color="#086AD1" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Suppress Compiler warnings for elements without XML Docs -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,22 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization;
namespace FrontendPlatformUno.DataContracts.Serialization
{
/*
* When using the JsonSerializerContext you must add the JsonSerializableAttribute
* for each type that you may need to serialize / deserialize including both the
* concrete type and any interface that the concrete type implements.
* For more information on the JsonSerializerContext see:
* https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation?WT.mc_id=DT-MVP-5002924
*/
[JsonSerializable(typeof(WeatherForecast))]
[JsonSerializable(typeof(WeatherForecast[]))]
[JsonSerializable(typeof(IEnumerable<WeatherForecast>))]
[JsonSerializable(typeof(IImmutableList<WeatherForecast>))]
[JsonSerializable(typeof(ImmutableList<WeatherForecast>))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
public partial class WeatherForecastContext : JsonSerializerContext
{
}
}

View File

@ -0,0 +1,16 @@
namespace FrontendPlatformUno.DataContracts
{
/// <summary>
/// A Weather Forecast for a specific date
/// </summary>
/// <param name="Date">Gets the Date of the Forecast.</param>
/// <param name="TemperatureC">Gets the Forecast Temperature in Celsius.</param>
/// <param name="Summary">Get a description of how the weather will feel.</param>
public record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
/// <summary>
/// Gets the Forecast Temperature in Fahrenheit
/// </summary>
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:supportsRtl="true"></application>
</manifest>

View File

@ -0,0 +1,22 @@
To add cross-platform image assets for your Uno Platform app, use the Assets folder
in the shared project instead. Assets in this folder are Android-only assets.
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

View File

@ -0,0 +1,43 @@
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Com.Nostra13.Universalimageloader.Core;
using Microsoft.UI.Xaml.Media;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FrontendPlatformUno.Droid
{
[global::Android.App.ApplicationAttribute(
Label = "@string/ApplicationName",
Icon = "@mipmap/iconapp",
LargeHeap = true,
HardwareAccelerated = true,
Theme = "@style/AppTheme"
)]
public class Application : Microsoft.UI.Xaml.NativeApplication
{
public Application(IntPtr javaReference, JniHandleOwnership transfer)
: base(() => new AppHead(), javaReference, transfer)
{
ConfigureUniversalImageLoader();
}
private static void ConfigureUniversalImageLoader()
{
// Create global configuration and initialize ImageLoader with this config
ImageLoaderConfiguration config = new ImageLoaderConfiguration
.Builder(Context)
.Build();
ImageLoader.Instance.Init(config);
ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync;
}
}
}

View File

@ -0,0 +1,17 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using Android.Widget;
namespace FrontendPlatformUno.Droid
{
[Activity(
MainLauncher = true,
ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges,
WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden
)]
public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity
{
}
}

View File

@ -0,0 +1,47 @@
To add cross-platform image assets for your Uno Platform app, use the Assets folder
in the shared project instead. Resources in this folder are Android-only.
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable/
icon.png
layout/
main.axml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:
public class R {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Hello">Hello World, Click Me!</string>
<string name="ApplicationName">FrontendPlatformUno</string>
</resources>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- This removes the ActionBar -->
<item name="windowActionBar">false</item>
<item name="android:windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowNoTitle">true</item>
<!-- This property is used for the splash screen -->
<item name="android:windowSplashScreenBackground">#FFFFFF</item>
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_screen</item>
<!--<item name="android:windowSplashScreenBehavior">1</item>-->
</style>
<style name="Theme.AppCompat.Translucent">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
</style>
</resources>

View File

@ -0,0 +1,2 @@
# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/
MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=32m,soft-heap-limit=256m

View File

@ -0,0 +1,84 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-ios;net7.0-android;net7.0-maccatalyst</TargetFrameworks>
<SingleProject>true</SingleProject>
<OutputType>Exe</OutputType>
<!-- Display name -->
<ApplicationTitle>FrontendPlatformUno</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>FrontendPlatformUno</ApplicationId>
<ApplicationIdGuid>36537AB1-6EE7-4E43-9642-A94BA47355DA</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<AndroidManifest>Android\AndroidManifest.xml</AndroidManifest>
<!-- Debugger workaround https://github.com/dotnet/maui-samples/blob/8aa6b8780b12e97b157514c3bdc54bb4a13001cd/HelloMacCatalyst/HelloMacCatalyst.csproj#L7 -->
<!-- <MtouchExtraArgs Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">$(MtouchExtraArgs) -setenv:MONO_THREADS_SUSPEND=preemptive</MtouchExtraArgs> -->
<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug' and $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'maccatalyst'">True</UseInterpreter>
<IsUnoHead>true</IsUnoHead>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Resizetizer" Version="1.0.2" />
<PackageReference Include="Uno.WinUI" Version="4.8.24" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="Uno.Extensions.Configuration" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Material.WinUI" Version="2.5.3" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.5.5" />
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.5.5" />
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="2.3.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Uno.Extensions.Logging.OSLog" Version="1.4.0" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.8.24" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="4.8.24" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>
<Choose>
<When Condition="$(IsAndroid)">
<ItemGroup>
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.8.0" />
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.36" />
</ItemGroup>
<ItemGroup>
<AndroidEnvironment Include="Android/environment.conf" />
</ItemGroup>
</When>
<When Condition="$(IsIOS)">
<PropertyGroup>
<MtouchExtraArgs>$(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
<!-- See https://github.com/unoplatform/uno/issues/9430 for more details. -->
<MtouchExtraArgs>$(MtouchExtraArgs) --registrar:static</MtouchExtraArgs>
<!-- https://github.com/xamarin/xamarin-macios/issues/14812 -->
<MtouchExtraArgs>$(MtouchExtraArgs) --marshal-objectivec-exceptions:disable</MtouchExtraArgs>
</PropertyGroup>
</When>
<When Condition="$(IsMacCatalyst)">
<PropertyGroup>
<!-- Configure the GC -->
<MtouchExtraArgs>$(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
<!-- Required for unknown crash as of .NET 6 Mobile Preview 13 -->
<MtouchExtraArgs>$(MtouchExtraArgs) --registrar:static</MtouchExtraArgs>
<!-- https://github.com/xamarin/xamarin-macios/issues/14812 -->
<MtouchExtraArgs>$(MtouchExtraArgs) --marshal-objectivec-exceptions:disable</MtouchExtraArgs>
<!-- Full globalization is required for Uno -->
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<ProjectReference Include="..\FrontendPlatformUno\FrontendPlatformUno.csproj" />
<ProjectReference Include="..\FrontendPlatformUno.DataContracts\FrontendPlatformUno.DataContracts.csproj" />
</ItemGroup>
<Import Project="..\FrontendPlatformUno.Base\base.props" />
</Project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
<ActiveDebugFramework>net7.0-ios</ActiveDebugFramework>
</PropertyGroup>
<ItemGroup>
<None Update="C:\Users\dbren\source\repos\FrontendPlatformUno\FrontendPlatformUno.Base\AppHead.xaml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Media.xcassets/iconapp.appiconset</string>
<!--
Adjust this to your application's encryption usage.
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
-->
</dict>
</plist>

View File

@ -0,0 +1,15 @@
using UIKit;
namespace FrontendPlatformUno.MacCatalyst
{
public class EntryPoint
{
// This is the main entry point of the application.
public static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppHead));
}
}
}

View File

@ -0,0 +1,58 @@
{
"images": [
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"size": "640x960",
"idiom": "iphone"
},
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"subtype": "retina4",
"scale": "2x",
"size": "640x1136",
"idiom": "iphone"
},
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "1x",
"size": "768x1024",
"idiom": "ipad"
},
{
"orientation": "landscape",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "1x",
"size": "1024x768",
"idiom": "ipad"
},
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"size": "1536x2048",
"idiom": "ipad"
},
{
"orientation": "landscape",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"size": "2048x1536",
"idiom": "ipad"
}
],
"properties": {},
"info": {
"version": 1,
"author": ""
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UILaunchImageMinimumOSVersion</key>
<string>9.0</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{320, 568}</string>
<key>XSAppIconAssets</key>
<string>Media.xcassets/iconapp.appiconset</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<!--
Adjust this to your application's encryption usage.
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
-->
</dict>
</plist>

View File

@ -0,0 +1,15 @@
using UIKit;
namespace FrontendPlatformUno.iOS
{
public class EntryPoint
{
// This is the main entry point of the application.
public static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppHead));
}
}
}

View File

@ -0,0 +1,58 @@
{
"images": [
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"size": "640x960",
"idiom": "iphone"
},
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"subtype": "retina4",
"scale": "2x",
"size": "640x1136",
"idiom": "iphone"
},
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "1x",
"size": "768x1024",
"idiom": "ipad"
},
{
"orientation": "landscape",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "1x",
"size": "1024x768",
"idiom": "ipad"
},
{
"orientation": "portrait",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"size": "1536x2048",
"idiom": "ipad"
},
{
"orientation": "landscape",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"size": "2048x1536",
"idiom": "ipad"
}
],
"properties": {},
"info": {
"version": 1,
"author": ""
}
}

View File

@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Uno.Resizetizer" Version="1.0.2" />
<PackageReference Include="Uno.WinUI.Skia.Gtk" Version="4.8.24" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="Uno.Extensions.Configuration" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Material.WinUI" Version="2.5.3" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.5.5" />
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.5.5" />
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="2.3.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.3" />
<PackageReference Include="SkiaSharp.Skottie" Version="2.88.3" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="4.8.24" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.8.24" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FrontendPlatformUno\FrontendPlatformUno.csproj" />
<ProjectReference Include="..\FrontendPlatformUno.DataContracts\FrontendPlatformUno.DataContracts.csproj" />
</ItemGroup>
<Import Project="..\FrontendPlatformUno.Base\base.props" />
</Project>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>FrontendPlatformUno.Skia.Gtk</ActiveDebugProfile>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Update="Package.appxmanifest">
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="C:\Users\dbren\source\repos\FrontendPlatformUno\FrontendPlatformUno.Base\AppHead.xaml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="AD86FCB5-C937-4374-872D-E0A1DF919E74"
Publisher="O=FrontendPlatformUno"
Version="1.0.0.0" />
<Properties>
<DisplayName>FrontendPlatformUno</DisplayName>
<PublisherDisplayName>FrontendPlatformUno</PublisherDisplayName>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="FrontendPlatformUno"
Description="FrontendPlatformUno">
<uap:SplashScreen BackgroundColor="#086AD1"/>
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

View File

@ -0,0 +1,22 @@
using GLib;
using System;
using Uno.UI.Runtime.Skia;
namespace FrontendPlatformUno.Skia.Gtk
{
public class Program
{
public static void Main(string[] args)
{
ExceptionManager.UnhandledException += delegate (UnhandledExceptionArgs expArgs)
{
Console.WriteLine("GLIB UNHANDLED EXCEPTION" + expArgs.ExceptionObject.ToString());
expArgs.ExitApplication = true;
};
var host = new GtkHost(() => new AppHead(), args);
host.Run();
}
}
}

View File

@ -0,0 +1,11 @@
{
"profiles": {
"FrontendPlatformUno.Skia.Gtk": {
"commandName": "Project"
},
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
}
}

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="FrontendPlatformUno.Gtk"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@ -0,0 +1,19 @@
namespace FrontendPlatformUno.Tests
{
public class AppInfoTests
{
[SetUp]
public void Setup()
{
}
[Test]
public void AppInfoCreation()
{
var appInfo = new AppConfig { Title = "Test" };
appInfo.Should().NotBeNull();
appInfo.Title.Should().Be("Test");
}
}
}

View File

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FrontendPlatformUno\FrontendPlatformUno.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
global using FluentAssertions;
global using FrontendPlatformUno.Business.Models;
global using NUnit.Framework;

View File

@ -0,0 +1,12 @@
namespace FrontendPlatformUno.UITests
{
public class Constants
{
public readonly static string WebAssemblyDefaultUri = "http://localhost:5000/";
public readonly static string iOSAppName = "FrontendPlatformUno";
public readonly static string AndroidAppName = "FrontendPlatformUno";
public readonly static string iOSDeviceNameOrId = "iPad Pro (12.9-inch) (3rd generation)";
public readonly static Platform CurrentPlatform = Platform.Browser;
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="Uno.UITest.Helpers" Version="1.1.0-dev.32" />
<PackageReference Include="Xamarin.UITest" Version="4.1.2" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,22 @@
namespace FrontendPlatformUno.UITests
{
public class Given_MainPage : TestBase
{
[Test]
public void When_SmokeTest()
{
// NOTICE
// To run UITests, Run the WASM target without debugger. Note
// the port that is being used and update the Constants.cs file
// in the UITests project with the correct port number.
// Query for the SecondPageButton and then tap it
Query xamlButton = q => q.All().Marked("SecondPageButton");
App.WaitForElement(xamlButton);
App.Tap(xamlButton);
// Take a screenshot and add it to the test results
TakeScreenshot("After tapped");
}
}
}

View File

@ -0,0 +1,7 @@

global using NUnit.Framework;
global using Uno.UITest;
global using Uno.UITest.Helpers.Queries;
global using Uno.UITests.Helpers;
global using Query = System.Func<Uno.UITest.IAppQuery, Uno.UITest.IAppQuery>;

View File

@ -0,0 +1,82 @@

namespace FrontendPlatformUno.UITests
{
public class TestBase
{
private IApp? _app;
static TestBase()
{
AppInitializer.TestEnvironment.AndroidAppName = Constants.AndroidAppName;
AppInitializer.TestEnvironment.WebAssemblyDefaultUri = Constants.WebAssemblyDefaultUri;
AppInitializer.TestEnvironment.iOSAppName = Constants.iOSAppName;
AppInitializer.TestEnvironment.AndroidAppName = Constants.AndroidAppName;
AppInitializer.TestEnvironment.iOSDeviceNameOrId = Constants.iOSDeviceNameOrId;
AppInitializer.TestEnvironment.CurrentPlatform = Constants.CurrentPlatform;
#if DEBUG
AppInitializer.TestEnvironment.WebAssemblyHeadless = false;
#endif
// Start the app only once, so the tests runs don't restart it
// and gain some time for the tests.
AppInitializer.ColdStartApp();
}
protected IApp App
{
get => _app!;
private set
{
_app = value;
Uno.UITest.Helpers.Queries.Helpers.App = value;
}
}
[SetUp]
public void SetUpTest()
{
App = AppInitializer.AttachToApp();
}
[TearDown]
public void TearDownTest()
{
TakeScreenshot("teardown");
}
public FileInfo TakeScreenshot(string stepName)
{
var title = $"{TestContext.CurrentContext.Test.Name}_{stepName}"
.Replace(" ", "_")
.Replace(".", "_");
var fileInfo = App.Screenshot(title);
var fileNameWithoutExt = Path.GetFileNameWithoutExtension(fileInfo.Name);
if (fileNameWithoutExt != title)
{
var destFileName = Path
.Combine(Path.GetDirectoryName(fileInfo.FullName), title + Path.GetExtension(fileInfo.Name));
if (File.Exists(destFileName))
{
File.Delete(destFileName);
}
File.Move(fileInfo.FullName, destFileName);
TestContext.AddTestAttachment(destFileName, stepName);
fileInfo = new FileInfo(destFileName);
}
else
{
TestContext.AddTestAttachment(fileInfo.FullName, stepName);
}
return fileInfo;
}
}
}

View File

@ -0,0 +1,87 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<NoWarn>$(NoWarn);NU1504;NU1505;NU1701</NoWarn>
<!-- Disabled due to issue with Central Package Management with implicit using -->
<ImplicitUsings>disable</ImplicitUsings>
<WasmPWAManifestFile>manifest.webmanifest</WasmPWAManifestFile>
<AppDesignerFolder>Properties</AppDesignerFolder>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<!--
IL Linking is disabled in Debug configuration.
When building in Release, see https://platform.uno/docs/articles/features/using-il-linker-WebAssembly.html
-->
<WasmShellILLinkerEnabled>false</WasmShellILLinkerEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<!-- XAML Resource trimming https://aka.platform.uno/xaml-trimming -->
<!--<UnoXamlResourcesTrimming>true</UnoXamlResourcesTrimming>-->
<!-- Improve performance with AOT builds https://aka.platform.uno/wasm-aot -->
<!-- <WasmShellMonoRuntimeExecutionMode>InterpreterAndAOT</WasmShellMonoRuntimeExecutionMode> -->
<!-- Temporarily uncomment to generate an AOT profile https://aka.platform.uno/wasm-aot-profile -->
<!-- <WasmShellGenerateAOTProfile>true</WasmShellGenerateAOTProfile> -->
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug' or '$(IsUiAutomationMappingEnabled)'=='True'">
<IsUiAutomationMappingEnabled>True</IsUiAutomationMappingEnabled>
<DefineConstants>$(DefineConstants);USE_UITESTS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Content Include="manifest.webmanifest" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="WasmCSS\Fonts.css" />
<EmbeddedResource Include="WasmScripts\AppManifest.js" />
</ItemGroup>
<ItemGroup>
<LinkerDescriptor Include="LinkerConfig.xml" />
</ItemGroup>
<ItemGroup>
<!--
This item group is required by the project template because of the
new SDK-Style project, otherwise some files are not added automatically.
You can safely remove this ItemGroup completely.
-->
<None Include="Program.cs" />
<None Include="LinkerConfig.xml" />
<None Include="wwwroot\web.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Uno.Resizetizer" Version="1.0.2" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="7.0.19" />
<PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="7.0.19" />
<PackageReference Include="Uno.WinUI.WebAssembly" Version="4.8.24" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="4.8.24" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.8.24" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="Uno.Extensions.Configuration" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.0" />
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Material.WinUI" Version="2.5.3" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.5.5" />
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.5.5" />
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="2.3.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FrontendPlatformUno\FrontendPlatformUno.csproj" />
<ProjectReference Include="..\FrontendPlatformUno.DataContracts\FrontendPlatformUno.DataContracts.csproj" />
</ItemGroup>
<Import Project="..\FrontendPlatformUno.Base\base.props" />
</Project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<None Update="C:\Users\dbren\source\repos\FrontendPlatformUno\FrontendPlatformUno.Base\AppHead.xaml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,11 @@
<linker>
<assembly fullname="FrontendPlatformUno" />
<assembly fullname="FrontendPlatformUno.Wasm" />
<!--
Uncomment this section when using JSON.NET
<assembly fullname="System.Core">
<type fullname="System.Linq.Expressions*" />
</assembly>
-->
</linker>

View File

@ -0,0 +1,14 @@
namespace FrontendPlatformUno.Wasm
{
public class Program
{
private static App? _app;
public static int Main(string[] args)
{
Microsoft.UI.Xaml.Application.Start(_ => _app = new AppHead());
return 0;
}
}
}

View File

@ -0,0 +1,30 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:8080",
"sslPort": 0
}
},
"profiles": {
"FrontendPlatformUno.Wasm": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,28 @@
/**
When adding fonts here, make sure to add them using a base64 data uri, otherwise
fonts loading are delayed, and text may get displayed incorrectly.
*/
/* https://github.com/unoplatform/uno/issues/3954 */
@font-face {
font-family: 'Segoe UI';
src: local('system-ui'), local('Segoe UI'), local('-apple-system'), local('BlinkMacSystemFont'), local('Inter'), local('Cantarell'), local('Ubuntu'), local('Roboto'), local('Open Sans'), local('Noto Sans'), local('Helvetica Neue'), local('sans-serif');
}
@font-face {
font-family: 'Roboto';
src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf) format('truetype');
font-weight: 300;
}
@font-face {
font-family: 'Roboto';
src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf) format('truetype');
font-weight: 400;
}
@font-face {
font-family: 'Roboto';
src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf) format('truetype');
font-weight: 500;
}

View File

@ -0,0 +1,3 @@
var UnoAppManifest = {
displayName: "FrontendPlatformUno"
}

View File

@ -0,0 +1,10 @@
{
"background_color": "#ffffff",
"description": "FrontendPlatformUno",
"display": "standalone",
"name": "FrontendPlatformUno",
"short_name": "FrontendPlatformUno",
"start_url": "/index.html",
"theme_color": "#ffffff",
"scope": "/"
}

View File

@ -0,0 +1,30 @@
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": [
"*.{css,js}",
"*.{png}",
"*.{c,h,wasm,clr,pdb,dat,txt}"
]
},
"routes": [
{
"route": "/package_*",
"headers": {
"cache-control": "public, immutable, max-age=31536000"
}
},
{
"route": "/*.ttf",
"headers": {
"cache-control": "public, immutable, max-age=31536000"
}
},
{
"route": "/*",
"headers": {
"cache-control": "must-revalidate, max-age=3600"
}
}
]
}

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
<system.webServer>
<!-- Disable compression as we're doing it through pre-compressed files -->
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
<staticContent>
<remove fileExtension=".dll" />
<remove fileExtension=".wasm" />
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
<mimeMap fileExtension=".clr" mimeType="application/octet-stream" />
<mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
<mimeMap fileExtension=".dat" mimeType="application/octet-stream" />
<!-- Required for PWAs -->
<mimeMap fileExtension=".json" mimeType="application/octet-stream" />
</staticContent>
<rewrite>
<rules>
<rule name="Lookup for pre-compressed brotli file" stopProcessing="true">
<match url="(.*)$"/>
<conditions>
<!-- Match brotli requests -->
<add input="{HTTP_ACCEPT_ENCODING}" pattern="br" />
<!-- Match all but pre-compressed files -->
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_br/)(.*)$" />
<!-- Check if the pre-compressed file exists on the disk -->
<add input="{DOCUMENT_ROOT}/_compressed_br/{C:0}" matchType="IsFile" negate="false" />
</conditions>
<action type="Rewrite" url="/_compressed_br{C:0}" />
</rule>
<rule name="Lookup for pre-compressed gzip file" stopProcessing="true">
<match url="(.*)$"/>
<conditions>
<!-- Match gzip requests -->
<add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" />
<!-- Match all but pre-compressed files -->
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_gz/)(.*)$" />
<!-- Check if the pre-compressed file exists on the disk -->
<add input="{DOCUMENT_ROOT}/_compressed_gz/{C:0}" matchType="IsFile" negate="false" />
</conditions>
<action type="Rewrite" url="/_compressed_gz{C:0}" />
</rule>
</rules>
<outboundRules>
<rule name="Adjust content encoding for gzip pre-compressed files" enabled="true" stopProcessing="true">
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
<conditions>
<add input="{REQUEST_URI}" pattern="/_compressed_gz/.*$" />
</conditions>
<action type="Rewrite" value="gzip"/>
</rule>
<rule name="Adjust content encoding for brotli pre-compressed files" enabled="true" stopProcessing="true">
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
<conditions>
<add input="{REQUEST_URI}" pattern="/_compressed_br/.*$" />
</conditions>
<action type="Rewrite" value="br"/>
</rule>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>

View File

@ -0,0 +1,71 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<RootNamespace>UnoWinUIQuickStart</RootNamespace>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
</PropertyGroup>
<PropertyGroup>
<!-- Bundles the WinAppSDK binaries (Uncomment for unpackaged builds) -->
<!-- <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> -->
<!-- This bundles the .NET Core libraries (Uncomment for packaged builds) -->
<SelfContained>true</SelfContained>
</PropertyGroup>
<ItemGroup>
<Content Include="Images\**" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Uno.Resizetizer" Version="1.0.2" />
<PackageReference Include="Uno.WinUI" Version="4.8.24" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="Uno.Extensions.Configuration" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Material.WinUI" Version="2.5.3" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.5.5" />
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.5.5" />
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="2.3.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.8.24" />
</ItemGroup>
<ItemGroup>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<!-- <FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" /> -->
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FrontendPlatformUno\FrontendPlatformUno.csproj" />
<ProjectReference Include="..\FrontendPlatformUno.DataContracts\FrontendPlatformUno.DataContracts.csproj" />
</ItemGroup>
<Import Project="..\FrontendPlatformUno.Base\base.props" />
</Project>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>FrontendPlatformUno.Windows (Package)</ActiveDebugProfile>
</PropertyGroup>
<ItemGroup>
<None Update="C:\Users\dbren\source\repos\FrontendPlatformUno\FrontendPlatformUno.Base\AppHead.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Package.appxmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="AD86FCB5-C937-4374-872D-E0A1DF919E74"
Publisher="O=FrontendPlatformUno"
Version="1.0.0.0" />
<Properties>
<DisplayName>FrontendPlatformUno</DisplayName>
<PublisherDisplayName>FrontendPlatformUno</PublisherDisplayName>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="FrontendPlatformUno"
Description="FrontendPlatformUno">
<uap:SplashScreen BackgroundColor="#086AD1"/>
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>arm64</Platform>
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>

View File

@ -0,0 +1,14 @@
{
"profiles": {
"FrontendPlatformUno.Windows (Package)": {
"commandName": "MsixPackage"
},
"FrontendPlatformUno.Windows (Unpackaged)": {
"commandName": "Project"
},
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Placeholder" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="FrontendPlatformUno.Windows.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

View File

@ -0,0 +1,197 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33530.505
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrontendPlatformUno", "FrontendPlatformUno\FrontendPlatformUno.csproj", "{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrontendPlatformUno.DataContracts", "FrontendPlatformUno.DataContracts\FrontendPlatformUno.DataContracts.csproj", "{8446AD3A-4C7C-4629-8984-52F43F8B9178}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{89579FA1-0AE2-41A0-A80E-AD3AD832BBA5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontendPlatformUno.Tests", "FrontendPlatformUno.Tests\FrontendPlatformUno.Tests.csproj", "{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontendPlatformUno.UITests", "FrontendPlatformUno.UITests\FrontendPlatformUno.UITests.csproj", "{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platforms", "Platforms", "{988663B1-F899-4E04-B90E-378BCA7E0381}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontendPlatformUno.Mobile", "FrontendPlatformUno.Mobile\FrontendPlatformUno.Mobile.csproj", "{322F2A22-7942-4296-8B22-3D179427567F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontendPlatformUno.Windows", "FrontendPlatformUno.Windows\FrontendPlatformUno.Windows.csproj", "{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontendPlatformUno.Wasm", "FrontendPlatformUno.Wasm\FrontendPlatformUno.Wasm.csproj", "{1625FA66-39ED-4D92-922D-4691875EB3AB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontendPlatformUno.Skia.Gtk", "FrontendPlatformUno.Skia.Gtk\FrontendPlatformUno.Skia.Gtk.csproj", "{CE25F000-2537-4B18-8843-2E2525D5B0EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|arm64 = Debug|arm64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|arm64 = Release|arm64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|arm64.ActiveCfg = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|arm64.Build.0 = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|x64.ActiveCfg = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|x64.Build.0 = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|x86.ActiveCfg = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Debug|x86.Build.0 = Debug|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|Any CPU.Build.0 = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|arm64.ActiveCfg = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|arm64.Build.0 = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|x64.ActiveCfg = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|x64.Build.0 = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|x86.ActiveCfg = Release|Any CPU
{A18C4E9D-BA82-489A-BCE0-5803DB2404F6}.Release|x86.Build.0 = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|arm64.ActiveCfg = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|arm64.Build.0 = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|x64.ActiveCfg = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|x64.Build.0 = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|x86.ActiveCfg = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Debug|x86.Build.0 = Debug|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|Any CPU.Build.0 = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|arm64.ActiveCfg = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|arm64.Build.0 = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|x64.ActiveCfg = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|x64.Build.0 = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|x86.ActiveCfg = Release|Any CPU
{8446AD3A-4C7C-4629-8984-52F43F8B9178}.Release|x86.Build.0 = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|arm64.ActiveCfg = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|arm64.Build.0 = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|x64.ActiveCfg = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|x64.Build.0 = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|x86.ActiveCfg = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Debug|x86.Build.0 = Debug|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|Any CPU.Build.0 = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|arm64.ActiveCfg = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|arm64.Build.0 = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|x64.ActiveCfg = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|x64.Build.0 = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|x86.ActiveCfg = Release|Any CPU
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D}.Release|x86.Build.0 = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|arm64.ActiveCfg = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|arm64.Build.0 = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|x64.ActiveCfg = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|x64.Build.0 = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|x86.ActiveCfg = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Debug|x86.Build.0 = Debug|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|Any CPU.Build.0 = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|arm64.ActiveCfg = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|arm64.Build.0 = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|x64.ActiveCfg = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|x64.Build.0 = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|x86.ActiveCfg = Release|Any CPU
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4}.Release|x86.Build.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|arm64.ActiveCfg = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|arm64.Build.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|arm64.Deploy.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|x64.ActiveCfg = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|x64.Build.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|x64.Deploy.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|x86.ActiveCfg = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|x86.Build.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Debug|x86.Deploy.0 = Debug|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|Any CPU.Build.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|Any CPU.Deploy.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|arm64.ActiveCfg = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|arm64.Build.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|arm64.Deploy.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|x64.ActiveCfg = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|x64.Build.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|x64.Deploy.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|x86.ActiveCfg = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|x86.Build.0 = Release|Any CPU
{322F2A22-7942-4296-8B22-3D179427567F}.Release|x86.Deploy.0 = Release|Any CPU
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|Any CPU.ActiveCfg = Debug|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|Any CPU.Build.0 = Debug|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|Any CPU.Deploy.0 = Debug|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|arm64.ActiveCfg = Debug|arm64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|arm64.Build.0 = Debug|arm64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|arm64.Deploy.0 = Debug|arm64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|x64.ActiveCfg = Debug|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|x64.Build.0 = Debug|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|x64.Deploy.0 = Debug|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|x86.ActiveCfg = Debug|x86
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|x86.Build.0 = Debug|x86
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Debug|x86.Deploy.0 = Debug|x86
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|Any CPU.ActiveCfg = Release|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|Any CPU.Build.0 = Release|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|Any CPU.Deploy.0 = Release|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|arm64.ActiveCfg = Release|arm64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|arm64.Build.0 = Release|arm64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|arm64.Deploy.0 = Release|arm64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|x64.ActiveCfg = Release|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|x64.Build.0 = Release|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|x64.Deploy.0 = Release|x64
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|x86.ActiveCfg = Release|x86
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|x86.Build.0 = Release|x86
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12}.Release|x86.Deploy.0 = Release|x86
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|arm64.ActiveCfg = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|arm64.Build.0 = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|x64.ActiveCfg = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|x64.Build.0 = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|x86.ActiveCfg = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Debug|x86.Build.0 = Debug|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|Any CPU.Build.0 = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|arm64.ActiveCfg = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|arm64.Build.0 = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|x64.ActiveCfg = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|x64.Build.0 = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|x86.ActiveCfg = Release|Any CPU
{1625FA66-39ED-4D92-922D-4691875EB3AB}.Release|x86.Build.0 = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|arm64.ActiveCfg = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|arm64.Build.0 = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|x64.ActiveCfg = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|x64.Build.0 = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|x86.ActiveCfg = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Debug|x86.Build.0 = Debug|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|Any CPU.Build.0 = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|arm64.ActiveCfg = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|arm64.Build.0 = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|x64.ActiveCfg = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|x64.Build.0 = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|x86.ActiveCfg = Release|Any CPU
{CE25F000-2537-4B18-8843-2E2525D5B0EB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{975E02A5-C0FA-4C3B-AC28-6DA3A5B36D8D} = {89579FA1-0AE2-41A0-A80E-AD3AD832BBA5}
{1871B43C-0418-4238-A33F-CB6EE5A4A5B4} = {89579FA1-0AE2-41A0-A80E-AD3AD832BBA5}
{322F2A22-7942-4296-8B22-3D179427567F} = {988663B1-F899-4E04-B90E-378BCA7E0381}
{EC1830E3-BE5E-4635-96EE-6FB0CBA07F12} = {988663B1-F899-4E04-B90E-378BCA7E0381}
{1625FA66-39ED-4D92-922D-4691875EB3AB} = {988663B1-F899-4E04-B90E-378BCA7E0381}
{CE25F000-2537-4B18-8843-2E2525D5B0EB} = {988663B1-F899-4E04-B90E-378BCA7E0381}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {449A5316-85EA-4314-949C-30DB95B686F0}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,88 @@
using FrontendPlatformUno.Views;
using FrontendPlatformUno.ViewModels;
namespace FrontendPlatformUno
{
public class App : Application
{
private static Window? _window;
public static IHost? Host { get; private set; }
protected async override void OnLaunched(LaunchActivatedEventArgs args)
{
var builder = this.CreateBuilder(args)
// Add navigation support for toolkit controls such as TabBar and NavigationView
.UseToolkitNavigation()
.Configure(host => host
#if DEBUG
// Switch to Development environment when running in DEBUG
.UseEnvironment(Environments.Development)
#endif
.UseLogging(configure: (context, logBuilder) =>
{
// Configure log levels for different categories of logging
logBuilder.SetMinimumLevel(
context.HostingEnvironment.IsDevelopment() ?
LogLevel.Information :
LogLevel.Warning);
}, enableUnoLogging: true)
.UseConfiguration(configure: configBuilder =>
configBuilder
.EmbeddedSource<App>()
.Section<AppConfig>()
)
// Enable localization (see appsettings.json for supported languages)
.UseLocalization()
// Register Json serializers (ISerializer and ISerializer)
.UseSerialization((context, services) => services
.AddContentSerializer(context)
.AddJsonTypeInfo(WeatherForecastContext.Default.IImmutableListWeatherForecast))
.UseHttp((context, services) => services
// Register HttpClient
#if DEBUG
// DelegatingHandler will be automatically injected into Refit Client
.AddTransient<DelegatingHandler, DebugHttpHandler>()
#endif
.AddSingleton<IWeatherCache, WeatherCache>()
.AddRefitClient<IApiClient>(context))
.ConfigureServices((context, services) =>
{
// TODO: Register your services
//services.AddSingleton<IMyService, MyService>();
//services.AddSingleton<NavBarViewModel>();
})
.UseNavigation(RegisterRoutes)
);
_window = builder.Window;
UnhandledException += (sender, e) =>
{
Console.WriteLine(e.ToString());
};
Host = await builder.NavigateAsync<Shell>();
}
private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
{
views.Register(
new ViewMap(ViewModel: typeof(ShellViewModel)),
//new ViewMap<MainPage, MainViewModel>(),
//new DataViewMap<SecondPage, SecondViewModel, Entity>(),
new ViewMap<GamenightsPage, GamenightsViewModel>(),
new ViewMap<LoginPage, LoginViewModel>()
);
routes.Register(
new RouteMap("", View: views.FindByViewModel<ShellViewModel>(),
Nested: new RouteMap[]
{
new RouteMap("Gamenights", View: views.FindByViewModel<GamenightsViewModel>()),
new RouteMap("Login", View: views.FindByViewModel<LoginViewModel>()),
}
)
);
}
}
}

View File

@ -0,0 +1,14 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<!-- Load WinUI resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<MaterialToolkitTheme xmlns="using:Uno.Toolkit.UI.Material"
ColorOverrideSource="ms-appx:///FrontendPlatformUno/Styles/ColorPaletteOverride.xaml"
FontOverrideSource="ms-appx:///FrontendPlatformUno/Styles/MaterialFontsOverride.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Add resources here -->
</ResourceDictionary>

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 7H3.83L9.42 1.41L8 0L0 8L8 16L9.41 14.59L3.83 9H16V7Z" fill="#1C1B1F"/>
</svg>

After

Width:  |  Height:  |  Size: 188 B

View File

@ -0,0 +1,34 @@
See documentation about assets here : https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md
# Here is a cheat sheet:
1. Add the image file to the `Assets` directory of a shared project.
2. Set the build action to `Content`.
3. (Recommended) Provide an asset for various scales/dpi
## Examples
```
\Assets\Images\logo.scale-100.png
\Assets\Images\logo.scale-200.png
\Assets\Images\logo.scale-400.png
\Assets\Images\scale-100\logo.png
\Assets\Images\scale-200\logo.png
\Assets\Images\scale-400\logo.png
```
## Table of scales
| Scale | UWP | iOS | Android |
|-------|:-----------:|:--------:|:-------:|
| `100` | scale-100 | @1x | mdpi |
| `125` | scale-125 | N/A | N/A |
| `150` | scale-150 | N/A | hdpi |
| `200` | scale-200 | @2x | xhdpi |
| `300` | scale-300 | @3x | xxhdpi |
| `400` | scale-400 | N/A | xxxhdpi |

View File

@ -0,0 +1,8 @@
namespace FrontendPlatformUno.Business.Models
{
public record AppConfig
{
public string? Title { get; init; }
}
}

View File

@ -0,0 +1,5 @@
namespace FrontendPlatformUno.Business.Models
{
public record Entity(string Name);
}

View File

@ -0,0 +1,92 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) or '$(EnableWindowsTargeting)' == 'true'">$(TargetFrameworks);net7.0-windows10.0.19041</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net7.0;net7.0-ios;net7.0-android;net7.0-maccatalyst</TargetFrameworks>
<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Dsp.Tasks" Version="1.0.1" />
<PackageReference Include="Uno.WinUI" Version="4.8.24" />
<PackageReference Include="Uno.Resizetizer" Version="1.0.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="Uno.Extensions.Configuration" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Http.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Logging.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Http" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Serialization.Refit" Version="2.3.6" />
<PackageReference Include="Uno.Material.WinUI" Version="2.5.3" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="2.5.5" />
<PackageReference Include="Uno.Toolkit.WinUI" Version="2.5.5" />
<PackageReference Include="Uno.Extensions.Authentication.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Localization.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.3.6" />
<PackageReference Include="Uno.Extensions.Navigation.WinUI" Version="2.3.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
</ItemGroup>
<Choose>
<When Condition="$(IsWinAppSdk)">
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
</ItemGroup>
<ItemGroup>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<!-- <FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" /> -->
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Content Include="Assets\**" />
<Page Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml" />
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<PRIResource Include="**\*.resw" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<ProjectReference Include="..\FrontendPlatformUno.DataContracts\FrontendPlatformUno.DataContracts.csproj" />
</ItemGroup>
<ItemGroup>
<UnoDspImportColors Include="Styles\*.zip" Generator="Xaml" />
<UnoImage Include="Assets\**\*.svg" />
<EmbeddedResource Include="appsettings.json" />
<EmbeddedResource Include="appsettings.*.json" DependentUpon="appsettings.json" />
<UpToDateCheckInput Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml" />
</ItemGroup>
<ItemGroup>
<None Remove="Styles\ColorPaletteOverride.zip" />
<None Remove="Views\GamenightsPage.xaml" />
<None Remove="Views\LoginPage.xaml" />
</ItemGroup>
<ItemGroup>
<UnoDspImportColors Remove="Styles\ColorPaletteOverride.zip" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Views\GamenightsPage.xaml" />
<UpToDateCheckInput Remove="Views\LoginPage.xaml" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<Page Update="Views\GamenightsPage.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\LoginPage.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>

View File

@ -0,0 +1,33 @@
global using FrontendPlatformUno.Business.Models;
global using FrontendPlatformUno.DataContracts;
global using FrontendPlatformUno.DataContracts.Serialization;
global using FrontendPlatformUno.Infrastructure;
global using FrontendPlatformUno.Services.Caching;
global using FrontendPlatformUno.Services.Endpoints;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
global using Microsoft.Extensions.Localization;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Microsoft.UI.Xaml;
global using Microsoft.UI.Xaml.Controls;
global using Microsoft.UI.Xaml.Media;
global using Microsoft.UI.Xaml.Navigation;
global using Refit;
global using System;
global using System.Collections.Generic;
global using System.Collections.Immutable;
global using System.Linq;
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;
global using Uno.Extensions;
global using Uno.Extensions.Configuration;
global using Uno.Extensions.Hosting;
global using Uno.Extensions.Http;
global using Uno.Extensions.Localization;
global using Uno.Extensions.Logging;
global using Uno.Extensions.Navigation;
global using Windows.ApplicationModel;
global using Application = Microsoft.UI.Xaml.Application;
global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;

View File

@ -0,0 +1,41 @@
namespace FrontendPlatformUno.Infrastructure
{
internal class DebugHttpHandler : DelegatingHandler
{
private readonly ILogger _logger;
public DebugHttpHandler(ILogger<DebugHttpHandler> logger, HttpMessageHandler? innerHandler = null)
: base(innerHandler ?? new HttpClientHandler())
{
_logger = logger;
}
protected async override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request,
CancellationToken cancellationToken)
{
var response = await base.SendAsync(request, cancellationToken);
#if DEBUG
if(!response.IsSuccessStatusCode)
{
_logger.LogDebugMessage("Unsuccessful API Call");
if(request.RequestUri is not null)
_logger.LogDebugMessage($"{request.RequestUri} ({request.Method})");
foreach((var key, var values) in request.Headers.ToDictionary(x => x.Key, x => string.Join(", ", x.Value)))
{
_logger.LogDebugMessage($"{key}: {values}");
}
var content = request.Content is not null ? await request.Content.ReadAsStringAsync() : null;
if(!string.IsNullOrEmpty(content))
{
_logger.LogDebugMessage(content);
}
// Uncomment to automatically break when an API call fails while debugging
// System.Diagnostics.Debugger.Break();
}
#endif
return response;
}
}
}

View File

@ -0,0 +1,10 @@
using FrontendPlatformUno.DataContracts;
using System.Collections.Immutable;
namespace FrontendPlatformUno.Services.Caching
{
public interface IWeatherCache
{
ValueTask<IImmutableList<WeatherForecast>> GetForecast(CancellationToken token);
}
}

View File

@ -0,0 +1,80 @@
using Uno.Extensions.Serialization;
using Windows.Networking.Connectivity;
using Windows.Storage;
namespace FrontendPlatformUno.Services.Caching
{
public sealed class WeatherCache : IWeatherCache
{
private readonly IApiClient _api;
private readonly ISerializer _serializer;
private readonly ILogger _logger;
public WeatherCache(IApiClient api, ISerializer serializer, ILogger<WeatherCache> logger)
{
_api = api;
_serializer = serializer;
_logger = logger;
}
private bool IsConnected => NetworkInformation.GetInternetConnectionProfile().GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess;
public async ValueTask<IImmutableList<WeatherForecast>> GetForecast(CancellationToken token)
{
var weatherText = await GetCachedWeather();
if (!string.IsNullOrWhiteSpace(weatherText))
{
return _serializer.FromString<ImmutableArray<WeatherForecast>>(weatherText);
}
if (!IsConnected)
{
_logger.LogWarning("App is offline and cannot connect to the API.");
throw new Exception("No internet connection");
}
var response = await _api.GetWeather(token);
if (response.IsSuccessStatusCode && response.Content is not null)
{
var weather = response.Content;
await Save(weather, token);
return weather;
}
else if (response.Error is not null)
{
_logger.LogError(response.Error, "An error occurred while retrieving the latest Forecast.");
throw response.Error;
}
else
{
return ImmutableArray<WeatherForecast>.Empty;
}
}
private async ValueTask<StorageFile> GetFile(CreationCollisionOption option) =>
await ApplicationData.Current.TemporaryFolder.CreateFileAsync("weather.json", option);
private async ValueTask<string?> GetCachedWeather()
{
var file = await GetFile(CreationCollisionOption.OpenIfExists);
var properties = await file.GetBasicPropertiesAsync();
// Reuse latest cache file if offline
// or if the file is less than 5 minutes old
if (IsConnected || DateTimeOffset.Now.AddMinutes(-5) > properties.DateModified)
{
return null;
}
return await File.ReadAllTextAsync(file.Path);
}
private async ValueTask Save(IImmutableList<WeatherForecast> weather, CancellationToken token)
{
var weatherText = _serializer.ToString(weather);
var file = await GetFile(CreationCollisionOption.ReplaceExisting);
await File.WriteAllTextAsync(file.Path, weatherText);
}
}
}

View File

@ -0,0 +1,12 @@
using FrontendPlatformUno.DataContracts;
using System.Collections.Immutable;
namespace FrontendPlatformUno.Services.Endpoints
{
[Headers("Content-Type: application/json")]
public interface IApiClient
{
[Get("/api/weatherforecast")]
Task<ApiResponse<IImmutableList<WeatherForecast>>> GetWeather(CancellationToken cancellationToken = default);
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>Gamenight</value>
</data>
</root>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>Gamenight</value>
</data>
</root>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>Gamenight</value>
</data>
</root>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>Gamenight</value>
</data>
</root>

View File

@ -0,0 +1,65 @@
<!-- This file is generated by a tool from the file ColorPaletteOverride.zip - - YOU SHOULD NOT EDIT IT manually.-->
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<Color x:Key="PrimaryColor">#5946D2</Color>
<Color x:Key="OnPrimaryColor">#FFFFFF</Color>
<Color x:Key="PrimaryContainerColor">#E5DEFF</Color>
<Color x:Key="OnPrimaryContainerColor">#170065</Color>
<Color x:Key="SecondaryColor">#6B4EA2</Color>
<Color x:Key="OnSecondaryColor">#FFFFFF</Color>
<Color x:Key="SecondaryContainerColor">#EBDDFF</Color>
<Color x:Key="OnSecondaryContainerColor">#1F182B</Color>
<Color x:Key="TertiaryColor">#0061A4</Color>
<Color x:Key="OnTertiaryColor">#FFFFFF</Color>
<Color x:Key="TertiaryContainerColor">#CFE4FF</Color>
<Color x:Key="OnTertiaryContainerColor">#001D36</Color>
<Color x:Key="ErrorColor">#B3261E</Color>
<Color x:Key="ErrorContainerColor">#F9DEDC</Color>
<Color x:Key="OnErrorColor">#FFFFFF</Color>
<Color x:Key="OnErrorContainerColor">#410E0B</Color>
<Color x:Key="BackgroundColor">#FCFBFF</Color>
<Color x:Key="OnBackgroundColor">#1C1B1F</Color>
<Color x:Key="SurfaceColor">#FFFFFF</Color>
<Color x:Key="OnSurfaceColor">#1C1B1F</Color>
<Color x:Key="SurfaceVariantColor">#F3EFF5</Color>
<Color x:Key="OnSurfaceVariantColor">#8B8494</Color>
<Color x:Key="OutlineColor">#79747E</Color>
<Color x:Key="OnSurfaceInverseColor">#F4EFF4</Color>
<Color x:Key="SurfaceInverseColor">#313033</Color>
<Color x:Key="PrimaryInverseColor">#C8BFFF</Color>
<Color x:Key="SurfaceTintColor">#5946D2</Color>
<Color x:Key="OutlineVariantColor">#C9C5D0</Color>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<Color x:Key="PrimaryColor">#C7BFFF</Color>
<Color x:Key="OnPrimaryColor">#2A009F</Color>
<Color x:Key="PrimaryContainerColor">#4129BA</Color>
<Color x:Key="OnPrimaryContainerColor">#E4DFFF</Color>
<Color x:Key="SecondaryColor">#CDC2DC</Color>
<Color x:Key="OnSecondaryColor">#332D41</Color>
<Color x:Key="SecondaryContainerColor">#433C52</Color>
<Color x:Key="OnSecondaryContainerColor">#EBDDFF</Color>
<Color x:Key="TertiaryColor">#9FCAFF</Color>
<Color x:Key="OnTertiaryColor">#003258</Color>
<Color x:Key="TertiaryContainerColor">#00497E</Color>
<Color x:Key="OnTertiaryContainerColor">#D1E4FF</Color>
<Color x:Key="ErrorColor">#FFB4AB</Color>
<Color x:Key="ErrorContainerColor">#93000A</Color>
<Color x:Key="OnErrorColor">#690005</Color>
<Color x:Key="OnErrorContainerColor">#FFDAD6</Color>
<Color x:Key="BackgroundColor">#1C1B1F</Color>
<Color x:Key="OnBackgroundColor">#E5E1E6</Color>
<Color x:Key="SurfaceColor">#302D38</Color>
<Color x:Key="OnSurfaceColor">#E6E1E5</Color>
<Color x:Key="SurfaceVariantColor">#47464F</Color>
<Color x:Key="OnSurfaceVariantColor">#C9C5D0</Color>
<Color x:Key="OutlineColor">#928F99</Color>
<Color x:Key="OnSurfaceInverseColor">#1C1B1F</Color>
<Color x:Key="SurfaceInverseColor">#E6E1E5</Color>
<Color x:Key="PrimaryInverseColor">#2A009F</Color>
<Color x:Key="SurfaceTintColor">#544794</Color>
<Color x:Key="OutlineVariantColor">#57545D</Color>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@ -0,0 +1,8 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="MaterialLightFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialMediumFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialRegularFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf#Roboto</FontFamily>
</ResourceDictionary>

View File

@ -0,0 +1,31 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Xml.Linq;
namespace FrontendPlatformUno.ViewModels
{
public class GamenightsViewModel : ObservableObject
{
private INavigator Navigator { get; }
public string? Title { get; }
public ICommand GoToLogin { get; }
public GamenightsViewModel(INavigator navigator, IStringLocalizer stringLocalizer)
{
Navigator = navigator;
Title = $"{stringLocalizer["ApplicationName"]}";
GoToLogin = new AsyncRelayCommand(GoToLoginView);
}
private async Task GoToLoginView()
{
await Navigator.NavigateViewModelAsync<LoginViewModel>(this);
}
}
}

View File

@ -0,0 +1,31 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using FrontendPlatformUno.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace FrontendPlatformUno.ViewModels
{
public class LoginViewModel : ObservableObject
{
private INavigator Navigator { get; }
public string? Title { get; }
public ICommand GoToLogin { get; }
public LoginViewModel(INavigator navigator, IStringLocalizer stringLocalizer)
{
Navigator = navigator;
Title = $"{stringLocalizer["ApplicationName"]} - Login";
GoToLogin = new AsyncRelayCommand(GoToLoginView);
}
private async Task GoToLoginView()
{
await Navigator.NavigateViewModelAsync<LoginViewModel>(this);
}
}
}

View File

@ -0,0 +1,19 @@
namespace FrontendPlatformUno.ViewModels
{
public class ShellViewModel
{
private INavigator Navigator { get; }
public ShellViewModel(INavigator navigator)
{
Navigator = navigator;
_ = Start();
}
public async Task Start()
{
await Navigator.NavigateViewModelAsync<GamenightsViewModel>(this);
}
}
}

View File

@ -0,0 +1,34 @@
<Page
x:Class="FrontendPlatformUno.Views.GamenightsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FrontendPlatformUno.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:utu="using:Uno.Toolkit.UI"
xmlns:not_skia="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<utu:NavigationBar Content="{Binding Title}">
<utu:NavigationBar.MainCommand>
<AppBarButton>
<AppBarButton.Icon>
<BitmapIcon UriSource="ms-appx:///FrontendPlatformUno/Assets/Icons/back.png" />
</AppBarButton.Icon>
</AppBarButton>
</utu:NavigationBar.MainCommand>
<utu:NavigationBar.PrimaryCommands>
<AppBarButton Label="Login" Tag="Login" Icon="OtherUser" not_skia:AutomationProperties.AutomationId="LoginPageButton" Command="{Binding GoToLogin}"/>
</utu:NavigationBar.PrimaryCommands>
</utu:NavigationBar>
</Grid>
</Grid>
</Page>

View File

@ -0,0 +1,30 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
namespace FrontendPlatformUno.Views
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class GamenightsPage : Page
{
public GamenightsPage()
{
this.InitializeComponent();
}
}
}

View File

@ -0,0 +1,34 @@
<Page
x:Class="FrontendPlatformUno.Views.LoginPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FrontendPlatformUno.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:utu="using:Uno.Toolkit.UI"
xmlns:not_skia="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<utu:NavigationBar Content="{Binding Title}">
<utu:NavigationBar.MainCommand>
<AppBarButton>
<AppBarButton.Icon>
<BitmapIcon UriSource="ms-appx:///FrontendPlatformUno/Assets/Icons/back.png" />
</AppBarButton.Icon>
</AppBarButton>
</utu:NavigationBar.MainCommand>
<utu:NavigationBar.PrimaryCommands>
<AppBarButton Label="Login" Tag="Login" Icon="OtherUser" not_skia:AutomationProperties.AutomationId="LoginPageButton" Command="{Binding GoToLogin}"/>
</utu:NavigationBar.PrimaryCommands>
</utu:NavigationBar>
</Grid>
</Grid>
</Page>

View File

@ -0,0 +1,31 @@
using FrontendPlatformUno.ViewModels;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
namespace FrontendPlatformUno.Views
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class LoginPage : Page
{
public LoginPage()
{
this.InitializeComponent();
}
}
}

View File

@ -0,0 +1,35 @@
<UserControl x:Class="FrontendPlatformUno.Views.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FrontendPlatformUno.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:utu="using:Uno.Toolkit.UI"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<utu:ExtendedSplashScreen x:Name="Splash"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch">
<utu:ExtendedSplashScreen.LoadingContentTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition />
</Grid.RowDefinitions>
<ProgressRing IsActive="True"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Height="100"
Width="100" />
</Grid>
</DataTemplate>
</utu:ExtendedSplashScreen.LoadingContentTemplate>
</utu:ExtendedSplashScreen>
</UserControl>

View File

@ -0,0 +1,14 @@
using Uno.Toolkit.UI;
namespace FrontendPlatformUno.Views
{
public sealed partial class Shell : UserControl, IContentControlProvider
{
public Shell()
{
this.InitializeComponent();
}
public ContentControl ContentControl => Splash;
}
}

View File

@ -0,0 +1,9 @@
{
"AppConfig": {
"Title": "FrontendPlatformUno - Dev"
},
"ApiClient": {
"Url": "https://localhost:5001",
"UseNativeHandler": true
}
}

View File

@ -0,0 +1,16 @@
{
"AppConfig": {
"Title": "FrontendPlatformUno"
},
"ApiClient": {
"UseNativeHandler": true
},
"LocalizationConfiguration": {
"Cultures": [
"es",
"fr",
"pt-BR",
"en"
]
}
}