From 0a821a79551523d290757a5150a42d716d20b511 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 6 Aug 2022 23:48:23 +0200 Subject: [PATCH] Init MAUI project --- I18N Commander/I18N Commander.sln | 10 +- I18N Commander/UI MAUI/App.xaml | 14 + I18N Commander/UI MAUI/App.xaml.cs | 10 + I18N Commander/UI MAUI/AppShell.xaml | 71 ++++ I18N Commander/UI MAUI/AppShell.xaml.cs | 34 ++ I18N Commander/UI MAUI/MainPage.xaml | 41 ++ I18N Commander/UI MAUI/MainPage.xaml.cs | 23 ++ I18N Commander/UI MAUI/MauiProgram.cs | 22 + .../UI MAUI/Pages/LoadProjectPage.xaml | 10 + .../UI MAUI/Pages/LoadProjectPage.xaml.cs | 9 + .../UI MAUI/Pages/SettingsPage.xaml | 9 + .../UI MAUI/Pages/SettingsPage.xaml.cs | 9 + .../UI MAUI/Pages/TranslationPage.xaml | 9 + .../UI MAUI/Pages/TranslationPage.xaml.cs | 9 + .../Platforms/Android/AndroidManifest.xml | 6 + .../UI MAUI/Platforms/Android/MainActivity.cs | 10 + .../Platforms/Android/MainApplication.cs | 14 + .../Android/Resources/values/colors.xml | 6 + .../Platforms/MacCatalyst/AppDelegate.cs | 9 + .../UI MAUI/Platforms/MacCatalyst/Info.plist | 30 ++ .../UI MAUI/Platforms/MacCatalyst/Program.cs | 15 + .../UI MAUI/Platforms/Windows/App.xaml | 8 + .../UI MAUI/Platforms/Windows/App.xaml.cs | 18 + .../Platforms/Windows/Package.appxmanifest | 43 ++ .../UI MAUI/Platforms/Windows/app.manifest | 15 + .../UI MAUI/Platforms/iOS/AppDelegate.cs | 9 + .../UI MAUI/Platforms/iOS/Info.plist | 32 ++ .../UI MAUI/Platforms/iOS/Program.cs | 15 + .../UI MAUI/Properties/Resources.Designer.cs | 63 +++ .../UI MAUI/Properties/Resources.resx | 101 +++++ .../UI MAUI/Properties/launchSettings.json | 8 + .../UI MAUI/Resources/AppIcon/planet.svg | 1 + .../Resources/Fonts/OpenSans-Regular.ttf | Bin 0 -> 107140 bytes .../Resources/Fonts/OpenSans-Semibold.ttf | Bin 0 -> 111048 bytes .../UI MAUI/Resources/Images/dotnet_bot.svg | 93 +++++ .../UI MAUI/Resources/Images/expand.svg | 1 + .../UI MAUI/Resources/Images/load.svg | 1 + .../UI MAUI/Resources/Images/settings.svg | 1 + .../UI MAUI/Resources/Images/shrink.svg | 1 + .../UI MAUI/Resources/Images/translation.svg | 1 + .../UI MAUI/Resources/Raw/AboutAssets.txt | 15 + .../UI MAUI/Resources/Splash/splash.svg | 8 + .../UI MAUI/Resources/Styles/Colors.xaml | 44 ++ .../UI MAUI/Resources/Styles/Styles.xaml | 384 ++++++++++++++++++ I18N Commander/UI MAUI/UI MAUI.csproj | 75 ++++ 45 files changed, 1306 insertions(+), 1 deletion(-) create mode 100644 I18N Commander/UI MAUI/App.xaml create mode 100644 I18N Commander/UI MAUI/App.xaml.cs create mode 100644 I18N Commander/UI MAUI/AppShell.xaml create mode 100644 I18N Commander/UI MAUI/AppShell.xaml.cs create mode 100644 I18N Commander/UI MAUI/MainPage.xaml create mode 100644 I18N Commander/UI MAUI/MainPage.xaml.cs create mode 100644 I18N Commander/UI MAUI/MauiProgram.cs create mode 100644 I18N Commander/UI MAUI/Pages/LoadProjectPage.xaml create mode 100644 I18N Commander/UI MAUI/Pages/LoadProjectPage.xaml.cs create mode 100644 I18N Commander/UI MAUI/Pages/SettingsPage.xaml create mode 100644 I18N Commander/UI MAUI/Pages/SettingsPage.xaml.cs create mode 100644 I18N Commander/UI MAUI/Pages/TranslationPage.xaml create mode 100644 I18N Commander/UI MAUI/Pages/TranslationPage.xaml.cs create mode 100644 I18N Commander/UI MAUI/Platforms/Android/AndroidManifest.xml create mode 100644 I18N Commander/UI MAUI/Platforms/Android/MainActivity.cs create mode 100644 I18N Commander/UI MAUI/Platforms/Android/MainApplication.cs create mode 100644 I18N Commander/UI MAUI/Platforms/Android/Resources/values/colors.xml create mode 100644 I18N Commander/UI MAUI/Platforms/MacCatalyst/AppDelegate.cs create mode 100644 I18N Commander/UI MAUI/Platforms/MacCatalyst/Info.plist create mode 100644 I18N Commander/UI MAUI/Platforms/MacCatalyst/Program.cs create mode 100644 I18N Commander/UI MAUI/Platforms/Windows/App.xaml create mode 100644 I18N Commander/UI MAUI/Platforms/Windows/App.xaml.cs create mode 100644 I18N Commander/UI MAUI/Platforms/Windows/Package.appxmanifest create mode 100644 I18N Commander/UI MAUI/Platforms/Windows/app.manifest create mode 100644 I18N Commander/UI MAUI/Platforms/iOS/AppDelegate.cs create mode 100644 I18N Commander/UI MAUI/Platforms/iOS/Info.plist create mode 100644 I18N Commander/UI MAUI/Platforms/iOS/Program.cs create mode 100644 I18N Commander/UI MAUI/Properties/Resources.Designer.cs create mode 100644 I18N Commander/UI MAUI/Properties/Resources.resx create mode 100644 I18N Commander/UI MAUI/Properties/launchSettings.json create mode 100644 I18N Commander/UI MAUI/Resources/AppIcon/planet.svg create mode 100644 I18N Commander/UI MAUI/Resources/Fonts/OpenSans-Regular.ttf create mode 100644 I18N Commander/UI MAUI/Resources/Fonts/OpenSans-Semibold.ttf create mode 100644 I18N Commander/UI MAUI/Resources/Images/dotnet_bot.svg create mode 100644 I18N Commander/UI MAUI/Resources/Images/expand.svg create mode 100644 I18N Commander/UI MAUI/Resources/Images/load.svg create mode 100644 I18N Commander/UI MAUI/Resources/Images/settings.svg create mode 100644 I18N Commander/UI MAUI/Resources/Images/shrink.svg create mode 100644 I18N Commander/UI MAUI/Resources/Images/translation.svg create mode 100644 I18N Commander/UI MAUI/Resources/Raw/AboutAssets.txt create mode 100644 I18N Commander/UI MAUI/Resources/Splash/splash.svg create mode 100644 I18N Commander/UI MAUI/Resources/Styles/Colors.xaml create mode 100644 I18N Commander/UI MAUI/Resources/Styles/Styles.xaml create mode 100644 I18N Commander/UI MAUI/UI MAUI.csproj diff --git a/I18N Commander/I18N Commander.sln b/I18N Commander/I18N Commander.sln index 53e4473..fcafa61 100644 --- a/I18N Commander/I18N Commander.sln +++ b/I18N Commander/I18N Commander.sln @@ -7,7 +7,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Processor", "Processor\Proc EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UI WinForms", "UI WinForms\UI WinForms.csproj", "{5AE84E7C-3141-46CA-B390-4E42878B6195}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataModel", "DataModel\DataModel.csproj", "{D18DD193-3F93-4D21-92DC-BA0E26B0342A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataModel", "DataModel\DataModel.csproj", "{D18DD193-3F93-4D21-92DC-BA0E26B0342A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI MAUI", "UI MAUI\UI MAUI.csproj", "{BA8BE958-0DCC-4054-B731-DF911AECC429}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -27,6 +29,12 @@ Global {D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Debug|Any CPU.Build.0 = Debug|Any CPU {D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Release|Any CPU.ActiveCfg = Release|Any CPU {D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Release|Any CPU.Build.0 = Release|Any CPU + {BA8BE958-0DCC-4054-B731-DF911AECC429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA8BE958-0DCC-4054-B731-DF911AECC429}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA8BE958-0DCC-4054-B731-DF911AECC429}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {BA8BE958-0DCC-4054-B731-DF911AECC429}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA8BE958-0DCC-4054-B731-DF911AECC429}.Release|Any CPU.Build.0 = Release|Any CPU + {BA8BE958-0DCC-4054-B731-DF911AECC429}.Release|Any CPU.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/I18N Commander/UI MAUI/App.xaml b/I18N Commander/UI MAUI/App.xaml new file mode 100644 index 0000000..35a536a --- /dev/null +++ b/I18N Commander/UI MAUI/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/I18N Commander/UI MAUI/App.xaml.cs b/I18N Commander/UI MAUI/App.xaml.cs new file mode 100644 index 0000000..93506e7 --- /dev/null +++ b/I18N Commander/UI MAUI/App.xaml.cs @@ -0,0 +1,10 @@ +namespace UI_MAUI; + +public partial class App : Application +{ + public App() + { + this.InitializeComponent(); + this.MainPage = new AppShell(); + } +} \ No newline at end of file diff --git a/I18N Commander/UI MAUI/AppShell.xaml b/I18N Commander/UI MAUI/AppShell.xaml new file mode 100644 index 0000000..75b58d7 --- /dev/null +++ b/I18N Commander/UI MAUI/AppShell.xaml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/I18N Commander/UI MAUI/AppShell.xaml.cs b/I18N Commander/UI MAUI/AppShell.xaml.cs new file mode 100644 index 0000000..11246d3 --- /dev/null +++ b/I18N Commander/UI MAUI/AppShell.xaml.cs @@ -0,0 +1,34 @@ +using System.ComponentModel; + +namespace UI_MAUI; + +public partial class AppShell : Shell, INotifyPropertyChanged +{ + private bool isOpen = DeviceInfo.Idiom == DeviceIdiom.Phone || DeviceInfo.Idiom == DeviceIdiom.Tablet; + + public double CurrentFlyoutWidth => this.isOpen ? 200 : 90; + + public string TextLoadProject => this.isOpen ? "Load Project" : string.Empty; + + public string TextSettings => this.isOpen ? "Settings" : string.Empty; + + public string TextTranslations => this.isOpen ? "Translations" : string.Empty; + + public string TextToggle => this.isOpen ? "Toggle menu" : string.Empty; + + public AppShell() + { + this.InitializeComponent(); + } + + private void MenuItemToggle_OnClicked(object sender, EventArgs e) + { + this.isOpen = !this.isOpen; + this.OnPropertyChanged(nameof(this.CurrentFlyoutWidth)); + this.OnPropertyChanged(nameof(this.TextSettings)); + this.OnPropertyChanged(nameof(this.TextTranslations)); + this.OnPropertyChanged(nameof(this.TextLoadProject)); + this.OnPropertyChanged(nameof(this.TextToggle)); + this.InvalidateMeasure(); + } +} \ No newline at end of file diff --git a/I18N Commander/UI MAUI/MainPage.xaml b/I18N Commander/UI MAUI/MainPage.xaml new file mode 100644 index 0000000..9967020 --- /dev/null +++ b/I18N Commander/UI MAUI/MainPage.xaml @@ -0,0 +1,41 @@ + + + + + + + + +