diff --git a/FrontendPlatformUno/.gitignore b/FrontendPlatformUno/.gitignore new file mode 100644 index 0000000..4e43810 --- /dev/null +++ b/FrontendPlatformUno/.gitignore @@ -0,0 +1,3 @@ +**/bin +**/obj +.vs diff --git a/FrontendPlatformUno/.vsconfig b/FrontendPlatformUno/.vsconfig new file mode 100644 index 0000000..1c9c228 --- /dev/null +++ b/FrontendPlatformUno/.vsconfig @@ -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" + ] +} diff --git a/FrontendPlatformUno/Directory.Build.props b/FrontendPlatformUno/Directory.Build.props new file mode 100644 index 0000000..76f7aa4 --- /dev/null +++ b/FrontendPlatformUno/Directory.Build.props @@ -0,0 +1,59 @@ + + + 11 + enable + enable + + portable + True + true + + True + $(NoWarn);Uno0001;CS1998;CA1416;NU1507 + + en + + false + false + false + false + false + + + + + + true + 21.0 + + + + + true + 14.2 + iossimulator-x64 + + + + + true + 10.14 + osx-x64 + + + + + true + 14.0 + maccatalyst-x64 + + + + + true + 10.0.18362.0 + 10.0.18362.0 + + + + diff --git a/FrontendPlatformUno/Directory.Build.targets b/FrontendPlatformUno/Directory.Build.targets new file mode 100644 index 0000000..0d24ec2 --- /dev/null +++ b/FrontendPlatformUno/Directory.Build.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Base/AppHead.xaml b/FrontendPlatformUno/FrontendPlatformUno.Base/AppHead.xaml new file mode 100644 index 0000000..0af6d29 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Base/AppHead.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Base/AppHead.xaml.cs b/FrontendPlatformUno/FrontendPlatformUno.Base/AppHead.xaml.cs new file mode 100644 index 0000000..068b5f1 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Base/AppHead.xaml.cs @@ -0,0 +1,14 @@ +namespace FrontendPlatformUno +{ + public sealed partial class AppHead : App + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public AppHead() + { + this.InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Base/Icons/appconfig.svg b/FrontendPlatformUno/FrontendPlatformUno.Base/Icons/appconfig.svg new file mode 100644 index 0000000..3106b1a --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Base/Icons/appconfig.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Base/Icons/iconapp.svg b/FrontendPlatformUno/FrontendPlatformUno.Base/Icons/iconapp.svg new file mode 100644 index 0000000..f621ea5 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Base/Icons/iconapp.svg @@ -0,0 +1,42 @@ + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Base/Splash/splash_screen.svg b/FrontendPlatformUno/FrontendPlatformUno.Base/Splash/splash_screen.svg new file mode 100644 index 0000000..3106b1a --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Base/Splash/splash_screen.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Base/base.props b/FrontendPlatformUno/FrontendPlatformUno.Base/base.props new file mode 100644 index 0000000..10bfdc1 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Base/base.props @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.DataContracts/FrontendPlatformUno.DataContracts.csproj b/FrontendPlatformUno/FrontendPlatformUno.DataContracts/FrontendPlatformUno.DataContracts.csproj new file mode 100644 index 0000000..a56e0b0 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.DataContracts/FrontendPlatformUno.DataContracts.csproj @@ -0,0 +1,8 @@ + + + net7.0 + true + + $(NoWarn);CS1591 + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.DataContracts/Serialization/WeatherForecastContext.cs b/FrontendPlatformUno/FrontendPlatformUno.DataContracts/Serialization/WeatherForecastContext.cs new file mode 100644 index 0000000..52c94dc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.DataContracts/Serialization/WeatherForecastContext.cs @@ -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))] + [JsonSerializable(typeof(IImmutableList))] + [JsonSerializable(typeof(ImmutableList))] + [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] + public partial class WeatherForecastContext : JsonSerializerContext + { + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.DataContracts/WeatherForecast.cs b/FrontendPlatformUno/FrontendPlatformUno.DataContracts/WeatherForecast.cs new file mode 100644 index 0000000..53c2484 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.DataContracts/WeatherForecast.cs @@ -0,0 +1,16 @@ +namespace FrontendPlatformUno.DataContracts +{ + /// + /// A Weather Forecast for a specific date + /// + /// Gets the Date of the Forecast. + /// Gets the Forecast Temperature in Celsius. + /// Get a description of how the weather will feel. + public record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) + { + /// + /// Gets the Forecast Temperature in Fahrenheit + /// + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/AndroidManifest.xml b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/AndroidManifest.xml new file mode 100644 index 0000000..95ae075 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Assets/AboutAssets.txt b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Assets/AboutAssets.txt new file mode 100644 index 0000000..210a93b --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Assets/AboutAssets.txt @@ -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"); diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Main.Android.cs b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Main.Android.cs new file mode 100644 index 0000000..5ce16fe --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Main.Android.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/MainActivity.Android.cs b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/MainActivity.Android.cs new file mode 100644 index 0000000..dcd3909 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/MainActivity.Android.cs @@ -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 + { + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/AboutResources.txt b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/AboutResources.txt new file mode 100644 index 0000000..17e3b13 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/AboutResources.txt @@ -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. diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/values/Strings.xml b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/values/Strings.xml new file mode 100644 index 0000000..27299d4 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/values/Strings.xml @@ -0,0 +1,5 @@ + + + Hello World, Click Me! + FrontendPlatformUno + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/values/Styles.xml b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/values/Styles.xml new file mode 100644 index 0000000..fd16cd7 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/Resources/values/Styles.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/environment.conf b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/environment.conf new file mode 100644 index 0000000..fa6c2e3 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/Android/environment.conf @@ -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 \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/FrontendPlatformUno.Mobile.csproj b/FrontendPlatformUno/FrontendPlatformUno.Mobile/FrontendPlatformUno.Mobile.csproj new file mode 100644 index 0000000..ece10a2 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/FrontendPlatformUno.Mobile.csproj @@ -0,0 +1,84 @@ + + + net7.0-ios;net7.0-android;net7.0-maccatalyst + true + Exe + + FrontendPlatformUno + + FrontendPlatformUno + 36537AB1-6EE7-4E43-9642-A94BA47355DA + + 1.0 + 1 + + Android\AndroidManifest.xml + + + + + True + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep + + $(MtouchExtraArgs) --registrar:static + + $(MtouchExtraArgs) --marshal-objectivec-exceptions:disable + + + + + + $(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep + + $(MtouchExtraArgs) --registrar:static + + $(MtouchExtraArgs) --marshal-objectivec-exceptions:disable + + false + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/FrontendPlatformUno.Mobile.csproj.user b/FrontendPlatformUno/FrontendPlatformUno.Mobile/FrontendPlatformUno.Mobile.csproj.user new file mode 100644 index 0000000..7ec349d --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/FrontendPlatformUno.Mobile.csproj.user @@ -0,0 +1,12 @@ + + + + False + net7.0-ios + + + + Designer + + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Entitlements.plist b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..24c3103 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Info.plist b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Info.plist new file mode 100644 index 0000000..752b37a --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Info.plist @@ -0,0 +1,29 @@ + + + + + UIDeviceFamily + + 2 + + LSApplicationCategoryType + public.app-category.utilities + UILaunchStoryboardName + LaunchScreen + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Media.xcassets/iconapp.appiconset + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Main.maccatalyst.cs b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Main.maccatalyst.cs new file mode 100644 index 0000000..e1883c3 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Main.maccatalyst.cs @@ -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)); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 0000000..69555e4 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -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": "" + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Entitlements.plist b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Entitlements.plist new file mode 100644 index 0000000..24c3103 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Info.plist b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Info.plist new file mode 100644 index 0000000..056bbaf --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Info.plist @@ -0,0 +1,51 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + UILaunchImageMinimumOSVersion + 9.0 + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + XSAppIconAssets + Media.xcassets/iconapp.appiconset + UIApplicationSupportsIndirectInputEvents + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Main.iOS.cs b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Main.iOS.cs new file mode 100644 index 0000000..e65f07c --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Main.iOS.cs @@ -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)); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 0000000..69555e4 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Mobile/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -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": "" + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/FrontendPlatformUno.Skia.Gtk.csproj b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/FrontendPlatformUno.Skia.Gtk.csproj new file mode 100644 index 0000000..d9d43dc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/FrontendPlatformUno.Skia.Gtk.csproj @@ -0,0 +1,40 @@ + + + WinExe + Exe + net7.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/FrontendPlatformUno.Skia.Gtk.csproj.user b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/FrontendPlatformUno.Skia.Gtk.csproj.user new file mode 100644 index 0000000..0c6c6c1 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/FrontendPlatformUno.Skia.Gtk.csproj.user @@ -0,0 +1,19 @@ + + + + ProjectDebugger + + + FrontendPlatformUno.Skia.Gtk + + + + Designer + + + + + Designer + + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Package.appxmanifest b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Package.appxmanifest new file mode 100644 index 0000000..03ed548 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Package.appxmanifest @@ -0,0 +1,43 @@ + + + + + + + + FrontendPlatformUno + FrontendPlatformUno + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Program.cs b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Program.cs new file mode 100644 index 0000000..09350dc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Program.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Properties/launchSettings.json b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Properties/launchSettings.json new file mode 100644 index 0000000..f59e5b0 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "FrontendPlatformUno.Skia.Gtk": { + "commandName": "Project" + }, + "WSL": { + "commandName": "WSL2", + "distributionName": "" + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/app.manifest b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/app.manifest new file mode 100644 index 0000000..7d963b0 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Skia.Gtk/app.manifest @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PerMonitor + true + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Tests/AppInfoTests.cs b/FrontendPlatformUno/FrontendPlatformUno.Tests/AppInfoTests.cs new file mode 100644 index 0000000..9b30d2c --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Tests/AppInfoTests.cs @@ -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"); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Tests/FrontendPlatformUno.Tests.csproj b/FrontendPlatformUno/FrontendPlatformUno.Tests/FrontendPlatformUno.Tests.csproj new file mode 100644 index 0000000..63d29fc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Tests/FrontendPlatformUno.Tests.csproj @@ -0,0 +1,19 @@ + + + + net7.0 + false + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Tests/GlobalUsings.cs b/FrontendPlatformUno/FrontendPlatformUno.Tests/GlobalUsings.cs new file mode 100644 index 0000000..60af382 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Tests/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using FluentAssertions; +global using FrontendPlatformUno.Business.Models; +global using NUnit.Framework; diff --git a/FrontendPlatformUno/FrontendPlatformUno.UITests/Constants.cs b/FrontendPlatformUno/FrontendPlatformUno.UITests/Constants.cs new file mode 100644 index 0000000..6e28c3b --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.UITests/Constants.cs @@ -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; + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.UITests/FrontendPlatformUno.UITests.csproj b/FrontendPlatformUno/FrontendPlatformUno.UITests/FrontendPlatformUno.UITests.csproj new file mode 100644 index 0000000..c8514a7 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.UITests/FrontendPlatformUno.UITests.csproj @@ -0,0 +1,16 @@ + + + + net48 + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.UITests/Given_MainPage.cs b/FrontendPlatformUno/FrontendPlatformUno.UITests/Given_MainPage.cs new file mode 100644 index 0000000..6e74a0d --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.UITests/Given_MainPage.cs @@ -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"); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.UITests/GlobalUsings.cs b/FrontendPlatformUno/FrontendPlatformUno.UITests/GlobalUsings.cs new file mode 100644 index 0000000..be400b2 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.UITests/GlobalUsings.cs @@ -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; + diff --git a/FrontendPlatformUno/FrontendPlatformUno.UITests/TestBase.cs b/FrontendPlatformUno/FrontendPlatformUno.UITests/TestBase.cs new file mode 100644 index 0000000..1eade33 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.UITests/TestBase.cs @@ -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; + } + + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/FrontendPlatformUno.Wasm.csproj b/FrontendPlatformUno/FrontendPlatformUno.Wasm/FrontendPlatformUno.Wasm.csproj new file mode 100644 index 0000000..c3c8ca6 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/FrontendPlatformUno.Wasm.csproj @@ -0,0 +1,87 @@ + + + Exe + net7.0 + $(NoWarn);NU1504;NU1505;NU1701 + + disable + manifest.webmanifest + Properties + + + true + $(DefineConstants);TRACE;DEBUG + portable + true + + false + + + + + + + + + + + True + $(DefineConstants);USE_UITESTS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/FrontendPlatformUno.Wasm.csproj.user b/FrontendPlatformUno/FrontendPlatformUno.Wasm/FrontendPlatformUno.Wasm.csproj.user new file mode 100644 index 0000000..6199b7b --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/FrontendPlatformUno.Wasm.csproj.user @@ -0,0 +1,9 @@ + + + + + + Designer + + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/LinkerConfig.xml b/FrontendPlatformUno/FrontendPlatformUno.Wasm/LinkerConfig.xml new file mode 100644 index 0000000..2a8a778 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/LinkerConfig.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/Program.cs b/FrontendPlatformUno/FrontendPlatformUno.Wasm/Program.cs new file mode 100644 index 0000000..58f26fb --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/Program.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/Properties/launchSettings.json b/FrontendPlatformUno/FrontendPlatformUno.Wasm/Properties/launchSettings.json new file mode 100644 index 0000000..e328e33 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/Properties/launchSettings.json @@ -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" + } + } + } +} diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/WasmCSS/Fonts.css b/FrontendPlatformUno/FrontendPlatformUno.Wasm/WasmCSS/Fonts.css new file mode 100644 index 0000000..cccf7c8 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/WasmCSS/Fonts.css @@ -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; +} diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/WasmScripts/AppManifest.js b/FrontendPlatformUno/FrontendPlatformUno.Wasm/WasmScripts/AppManifest.js new file mode 100644 index 0000000..ed7526c --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/WasmScripts/AppManifest.js @@ -0,0 +1,3 @@ +var UnoAppManifest = { + displayName: "FrontendPlatformUno" +} diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/manifest.webmanifest b/FrontendPlatformUno/FrontendPlatformUno.Wasm/manifest.webmanifest new file mode 100644 index 0000000..fa91268 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/manifest.webmanifest @@ -0,0 +1,10 @@ +{ + "background_color": "#ffffff", + "description": "FrontendPlatformUno", + "display": "standalone", + "name": "FrontendPlatformUno", + "short_name": "FrontendPlatformUno", + "start_url": "/index.html", + "theme_color": "#ffffff", + "scope": "/" +} diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/wwwroot/staticwebapp.config.json b/FrontendPlatformUno/FrontendPlatformUno.Wasm/wwwroot/staticwebapp.config.json new file mode 100644 index 0000000..79c1b17 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/wwwroot/staticwebapp.config.json @@ -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" + } + } + ] +} diff --git a/FrontendPlatformUno/FrontendPlatformUno.Wasm/wwwroot/web.config b/FrontendPlatformUno/FrontendPlatformUno.Wasm/wwwroot/web.config new file mode 100644 index 0000000..8f5a860 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Wasm/wwwroot/web.config @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/FrontendPlatformUno.Windows.csproj b/FrontendPlatformUno/FrontendPlatformUno.Windows/FrontendPlatformUno.Windows.csproj new file mode 100644 index 0000000..18b266e --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/FrontendPlatformUno.Windows.csproj @@ -0,0 +1,71 @@ + + + WinExe + net7.0-windows10.0.19041.0 + 10.0.18362.0 + UnoWinUIQuickStart + x86;x64;arm64 + win10-x86;win10-x64;win10-arm64 + win10-$(Platform).pubxml + true + true + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/FrontendPlatformUno.Windows.csproj.user b/FrontendPlatformUno/FrontendPlatformUno.Windows/FrontendPlatformUno.Windows.csproj.user new file mode 100644 index 0000000..f3d9b31 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/FrontendPlatformUno.Windows.csproj.user @@ -0,0 +1,17 @@ + + + + ProjectDebugger + + + FrontendPlatformUno.Windows (Package) + + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/Package.appxmanifest b/FrontendPlatformUno/FrontendPlatformUno.Windows/Package.appxmanifest new file mode 100644 index 0000000..03ed548 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/Package.appxmanifest @@ -0,0 +1,43 @@ + + + + + + + + FrontendPlatformUno + FrontendPlatformUno + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-arm64.pubxml b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-arm64.pubxml new file mode 100644 index 0000000..1bfeb23 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-arm64.pubxml @@ -0,0 +1,20 @@ + + + + + FileSystem + arm64 + win10-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-x64.pubxml b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-x64.pubxml new file mode 100644 index 0000000..e6d3024 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-x64.pubxml @@ -0,0 +1,20 @@ + + + + + FileSystem + x64 + win10-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-x86.pubxml b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-x86.pubxml new file mode 100644 index 0000000..71540c0 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/PublishProfiles/win10-x86.pubxml @@ -0,0 +1,20 @@ + + + + + FileSystem + x86 + win10-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/launchsettings.json b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/launchsettings.json new file mode 100644 index 0000000..e827673 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/Properties/launchsettings.json @@ -0,0 +1,14 @@ +{ + "profiles": { + "FrontendPlatformUno.Windows (Package)": { + "commandName": "MsixPackage" + }, + "FrontendPlatformUno.Windows (Unpackaged)": { + "commandName": "Project" + }, + "WSL": { + "commandName": "WSL2", + "distributionName": "" + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/Resources.lang-en-us.resw b/FrontendPlatformUno/FrontendPlatformUno.Windows/Resources.lang-en-us.resw new file mode 100644 index 0000000..fad04be --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/Resources.lang-en-us.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hello World! + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno.Windows/app.manifest b/FrontendPlatformUno/FrontendPlatformUno.Windows/app.manifest new file mode 100644 index 0000000..d34a711 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno.sln b/FrontendPlatformUno/FrontendPlatformUno.sln new file mode 100644 index 0000000..7d783bc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno.sln @@ -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 diff --git a/FrontendPlatformUno/FrontendPlatformUno/App.cs b/FrontendPlatformUno/FrontendPlatformUno/App.cs new file mode 100644 index 0000000..fd18c8b --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/App.cs @@ -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() + .Section() + ) + // 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() +#endif + .AddSingleton() + .AddRefitClient(context)) + .ConfigureServices((context, services) => + { + // TODO: Register your services + //services.AddSingleton(); + //services.AddSingleton(); + }) + .UseNavigation(RegisterRoutes) + ); + _window = builder.Window; + + UnhandledException += (sender, e) => + { + Console.WriteLine(e.ToString()); + }; + + Host = await builder.NavigateAsync(); + } + + private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes) + { + views.Register( + new ViewMap(ViewModel: typeof(ShellViewModel)), + //new ViewMap(), + //new DataViewMap(), + new ViewMap(), + new ViewMap() + ); + + routes.Register( + new RouteMap("", View: views.FindByViewModel(), + Nested: new RouteMap[] + { + new RouteMap("Gamenights", View: views.FindByViewModel()), + new RouteMap("Login", View: views.FindByViewModel()), + } + ) + ); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/AppResources.xaml b/FrontendPlatformUno/FrontendPlatformUno/AppResources.xaml new file mode 100644 index 0000000..3fb1bc2 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/AppResources.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/Assets/Icons/back.svg b/FrontendPlatformUno/FrontendPlatformUno/Assets/Icons/back.svg new file mode 100644 index 0000000..bcd7851 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Assets/Icons/back.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/Assets/SharedAssets.md b/FrontendPlatformUno/FrontendPlatformUno/Assets/SharedAssets.md new file mode 100644 index 0000000..6d84997 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Assets/SharedAssets.md @@ -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 | + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/Business/Models/AppConfig.cs b/FrontendPlatformUno/FrontendPlatformUno/Business/Models/AppConfig.cs new file mode 100644 index 0000000..972b93d --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Business/Models/AppConfig.cs @@ -0,0 +1,8 @@ + +namespace FrontendPlatformUno.Business.Models +{ + public record AppConfig + { + public string? Title { get; init; } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Business/Models/Entity.cs b/FrontendPlatformUno/FrontendPlatformUno/Business/Models/Entity.cs new file mode 100644 index 0000000..75b237a --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Business/Models/Entity.cs @@ -0,0 +1,5 @@ + +namespace FrontendPlatformUno.Business.Models +{ + public record Entity(string Name); +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/FrontendPlatformUno.csproj b/FrontendPlatformUno/FrontendPlatformUno/FrontendPlatformUno.csproj new file mode 100644 index 0000000..c325657 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/FrontendPlatformUno.csproj @@ -0,0 +1,92 @@ + + + $(TargetFrameworks);net7.0-windows10.0.19041 + $(TargetFrameworks);net7.0;net7.0-ios;net7.0-android;net7.0-maccatalyst + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(Filename) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/FrontendPlatformUno.csproj.user b/FrontendPlatformUno/FrontendPlatformUno/FrontendPlatformUno.csproj.user new file mode 100644 index 0000000..b532320 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/FrontendPlatformUno.csproj.user @@ -0,0 +1,12 @@ + + + + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/GlobalUsings.cs b/FrontendPlatformUno/FrontendPlatformUno/GlobalUsings.cs new file mode 100644 index 0000000..0c66040 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/GlobalUsings.cs @@ -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; diff --git a/FrontendPlatformUno/FrontendPlatformUno/Infrastructure/DebugHandler.cs b/FrontendPlatformUno/FrontendPlatformUno/Infrastructure/DebugHandler.cs new file mode 100644 index 0000000..ed9deb4 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Infrastructure/DebugHandler.cs @@ -0,0 +1,41 @@ +namespace FrontendPlatformUno.Infrastructure +{ + internal class DebugHttpHandler : DelegatingHandler + { + private readonly ILogger _logger; + public DebugHttpHandler(ILogger logger, HttpMessageHandler? innerHandler = null) + : base(innerHandler ?? new HttpClientHandler()) + { + _logger = logger; + } + + protected async override Task 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; + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Services/Caching/IWeatherCache.cs b/FrontendPlatformUno/FrontendPlatformUno/Services/Caching/IWeatherCache.cs new file mode 100644 index 0000000..87f04fb --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Services/Caching/IWeatherCache.cs @@ -0,0 +1,10 @@ +using FrontendPlatformUno.DataContracts; +using System.Collections.Immutable; + +namespace FrontendPlatformUno.Services.Caching +{ + public interface IWeatherCache + { + ValueTask> GetForecast(CancellationToken token); + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Services/Caching/WeatherCache.cs b/FrontendPlatformUno/FrontendPlatformUno/Services/Caching/WeatherCache.cs new file mode 100644 index 0000000..db5896c --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Services/Caching/WeatherCache.cs @@ -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 logger) + { + _api = api; + _serializer = serializer; + _logger = logger; + } + + private bool IsConnected => NetworkInformation.GetInternetConnectionProfile().GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess; + + public async ValueTask> GetForecast(CancellationToken token) + { + var weatherText = await GetCachedWeather(); + if (!string.IsNullOrWhiteSpace(weatherText)) + { + return _serializer.FromString>(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.Empty; + } + } + + private async ValueTask GetFile(CreationCollisionOption option) => + await ApplicationData.Current.TemporaryFolder.CreateFileAsync("weather.json", option); + + private async ValueTask 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 weather, CancellationToken token) + { + var weatherText = _serializer.ToString(weather); + var file = await GetFile(CreationCollisionOption.ReplaceExisting); + await File.WriteAllTextAsync(file.Path, weatherText); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Services/Endpoints/IApiClient.cs b/FrontendPlatformUno/FrontendPlatformUno/Services/Endpoints/IApiClient.cs new file mode 100644 index 0000000..7680b02 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Services/Endpoints/IApiClient.cs @@ -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>> GetWeather(CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Strings/en/Resources.resw b/FrontendPlatformUno/FrontendPlatformUno/Strings/en/Resources.resw new file mode 100644 index 0000000..f0b4c87 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Strings/en/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Gamenight + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Strings/es/Resources.resw b/FrontendPlatformUno/FrontendPlatformUno/Strings/es/Resources.resw new file mode 100644 index 0000000..88fb8f9 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Strings/es/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Gamenight + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Strings/fr/Resources.resw b/FrontendPlatformUno/FrontendPlatformUno/Strings/fr/Resources.resw new file mode 100644 index 0000000..88fb8f9 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Strings/fr/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Gamenight + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Strings/pt-BR/Resources.resw b/FrontendPlatformUno/FrontendPlatformUno/Strings/pt-BR/Resources.resw new file mode 100644 index 0000000..88fb8f9 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Strings/pt-BR/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Gamenight + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Styles/ColorPaletteOverride.xaml b/FrontendPlatformUno/FrontendPlatformUno/Styles/ColorPaletteOverride.xaml new file mode 100644 index 0000000..2710b29 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Styles/ColorPaletteOverride.xaml @@ -0,0 +1,65 @@ + + + + + #5946D2 + #FFFFFF + #E5DEFF + #170065 + #6B4EA2 + #FFFFFF + #EBDDFF + #1F182B + #0061A4 + #FFFFFF + #CFE4FF + #001D36 + #B3261E + #F9DEDC + #FFFFFF + #410E0B + #FCFBFF + #1C1B1F + #FFFFFF + #1C1B1F + #F3EFF5 + #8B8494 + #79747E + #F4EFF4 + #313033 + #C8BFFF + #5946D2 + #C9C5D0 + + + #C7BFFF + #2A009F + #4129BA + #E4DFFF + #CDC2DC + #332D41 + #433C52 + #EBDDFF + #9FCAFF + #003258 + #00497E + #D1E4FF + #FFB4AB + #93000A + #690005 + #FFDAD6 + #1C1B1F + #E5E1E6 + #302D38 + #E6E1E5 + #47464F + #C9C5D0 + #928F99 + #1C1B1F + #E6E1E5 + #2A009F + #544794 + #57545D + + + \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Styles/ColorPaletteOverride.zip b/FrontendPlatformUno/FrontendPlatformUno/Styles/ColorPaletteOverride.zip new file mode 100644 index 0000000..dfac0a9 Binary files /dev/null and b/FrontendPlatformUno/FrontendPlatformUno/Styles/ColorPaletteOverride.zip differ diff --git a/FrontendPlatformUno/FrontendPlatformUno/Styles/MaterialFontsOverride.xaml b/FrontendPlatformUno/FrontendPlatformUno/Styles/MaterialFontsOverride.xaml new file mode 100644 index 0000000..385d659 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Styles/MaterialFontsOverride.xaml @@ -0,0 +1,8 @@ + + + ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf#Roboto + ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf#Roboto + ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf#Roboto + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/ViewModels/GamenightsViewModel.cs b/FrontendPlatformUno/FrontendPlatformUno/ViewModels/GamenightsViewModel.cs new file mode 100644 index 0000000..8237cfb --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/ViewModels/GamenightsViewModel.cs @@ -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(this); + } + } +} diff --git a/FrontendPlatformUno/FrontendPlatformUno/ViewModels/LoginViewModel.cs b/FrontendPlatformUno/FrontendPlatformUno/ViewModels/LoginViewModel.cs new file mode 100644 index 0000000..cf1c9fc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/ViewModels/LoginViewModel.cs @@ -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(this); + } + } +} diff --git a/FrontendPlatformUno/FrontendPlatformUno/ViewModels/ShellViewModel.cs b/FrontendPlatformUno/FrontendPlatformUno/ViewModels/ShellViewModel.cs new file mode 100644 index 0000000..3f758df --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/ViewModels/ShellViewModel.cs @@ -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(this); + } + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/Views/GamenightsPage.xaml b/FrontendPlatformUno/FrontendPlatformUno/Views/GamenightsPage.xaml new file mode 100644 index 0000000..ad85a47 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Views/GamenightsPage.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/Views/GamenightsPage.xaml.cs b/FrontendPlatformUno/FrontendPlatformUno/Views/GamenightsPage.xaml.cs new file mode 100644 index 0000000..5f62773 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Views/GamenightsPage.xaml.cs @@ -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 +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class GamenightsPage : Page + { + public GamenightsPage() + { + this.InitializeComponent(); + } + } +} diff --git a/FrontendPlatformUno/FrontendPlatformUno/Views/LoginPage.xaml b/FrontendPlatformUno/FrontendPlatformUno/Views/LoginPage.xaml new file mode 100644 index 0000000..7130b7d --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Views/LoginPage.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/Views/LoginPage.xaml.cs b/FrontendPlatformUno/FrontendPlatformUno/Views/LoginPage.xaml.cs new file mode 100644 index 0000000..a15ce74 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Views/LoginPage.xaml.cs @@ -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 +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class LoginPage : Page + { + public LoginPage() + { + this.InitializeComponent(); + } + } +} diff --git a/FrontendPlatformUno/FrontendPlatformUno/Views/Shell.xaml b/FrontendPlatformUno/FrontendPlatformUno/Views/Shell.xaml new file mode 100644 index 0000000..04b9185 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Views/Shell.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + diff --git a/FrontendPlatformUno/FrontendPlatformUno/Views/Shell.xaml.cs b/FrontendPlatformUno/FrontendPlatformUno/Views/Shell.xaml.cs new file mode 100644 index 0000000..3a708bc --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/Views/Shell.xaml.cs @@ -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; + } +} \ No newline at end of file diff --git a/FrontendPlatformUno/FrontendPlatformUno/appsettings.development.json b/FrontendPlatformUno/FrontendPlatformUno/appsettings.development.json new file mode 100644 index 0000000..2d24ce3 --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/appsettings.development.json @@ -0,0 +1,9 @@ +{ + "AppConfig": { + "Title": "FrontendPlatformUno - Dev" + }, + "ApiClient": { + "Url": "https://localhost:5001", + "UseNativeHandler": true + } +} diff --git a/FrontendPlatformUno/FrontendPlatformUno/appsettings.json b/FrontendPlatformUno/FrontendPlatformUno/appsettings.json new file mode 100644 index 0000000..91a7b3d --- /dev/null +++ b/FrontendPlatformUno/FrontendPlatformUno/appsettings.json @@ -0,0 +1,16 @@ +{ + "AppConfig": { + "Title": "FrontendPlatformUno" + }, + "ApiClient": { + "UseNativeHandler": true + }, + "LocalizationConfiguration": { + "Cultures": [ + "es", + "fr", + "pt-BR", + "en" + ] + } +}