From b45f7a6424f136c3587326712053c854be468b7c Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 8 Aug 2022 21:18:39 +0200 Subject: [PATCH] Changed to MAUI Blazor --- I18N Commander/UI MAUI/App.xaml | 24 ++++-- I18N Commander/UI MAUI/App.xaml.cs | 12 +-- I18N Commander/UI MAUI/AppShell.xaml | 71 ------------------ I18N Commander/UI MAUI/AppShell.xaml.cs | 34 --------- I18N Commander/UI MAUI/Main.razor | 11 +++ I18N Commander/UI MAUI/MainPage.xaml | 45 +++-------- I18N Commander/UI MAUI/MainPage.xaml.cs | 24 ++---- I18N Commander/UI MAUI/MauiProgram.cs | 37 ++++----- I18N Commander/UI MAUI/Pages/Index.razor | 7 ++ I18N Commander/UI MAUI/Pages/Index.razor.cs | 25 +++++++ .../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 --- .../UI MAUI/Shared/MainLayout.razor | 25 +++++++ .../UI MAUI/Shared/MainLayout.razor.css | 75 +++++++++++++++++++ I18N Commander/UI MAUI/UI MAUI.csproj | 14 +--- I18N Commander/UI MAUI/_Imports.razor | 8 ++ I18N Commander/UI MAUI/wwwroot/css/app.css | 0 .../UI MAUI/wwwroot/css/bootstrap.min.css | 7 ++ .../UI MAUI/wwwroot/css/bootstrap.min.css.map | 1 + I18N Commander/UI MAUI/wwwroot/index.html | 18 +++++ .../wwwroot/js/bootstrap.bundle.min.js | 7 ++ .../wwwroot/js/bootstrap.bundle.min.js.map | 1 + 26 files changed, 246 insertions(+), 255 deletions(-) delete mode 100644 I18N Commander/UI MAUI/AppShell.xaml delete mode 100644 I18N Commander/UI MAUI/AppShell.xaml.cs create mode 100644 I18N Commander/UI MAUI/Main.razor create mode 100644 I18N Commander/UI MAUI/Pages/Index.razor create mode 100644 I18N Commander/UI MAUI/Pages/Index.razor.cs delete mode 100644 I18N Commander/UI MAUI/Pages/LoadProjectPage.xaml delete mode 100644 I18N Commander/UI MAUI/Pages/LoadProjectPage.xaml.cs delete mode 100644 I18N Commander/UI MAUI/Pages/SettingsPage.xaml delete mode 100644 I18N Commander/UI MAUI/Pages/SettingsPage.xaml.cs delete mode 100644 I18N Commander/UI MAUI/Pages/TranslationPage.xaml delete mode 100644 I18N Commander/UI MAUI/Pages/TranslationPage.xaml.cs create mode 100644 I18N Commander/UI MAUI/Shared/MainLayout.razor create mode 100644 I18N Commander/UI MAUI/Shared/MainLayout.razor.css create mode 100644 I18N Commander/UI MAUI/_Imports.razor create mode 100644 I18N Commander/UI MAUI/wwwroot/css/app.css create mode 100644 I18N Commander/UI MAUI/wwwroot/css/bootstrap.min.css create mode 100644 I18N Commander/UI MAUI/wwwroot/css/bootstrap.min.css.map create mode 100644 I18N Commander/UI MAUI/wwwroot/index.html create mode 100644 I18N Commander/UI MAUI/wwwroot/js/bootstrap.bundle.min.js create mode 100644 I18N Commander/UI MAUI/wwwroot/js/bootstrap.bundle.min.js.map diff --git a/I18N Commander/UI MAUI/App.xaml b/I18N Commander/UI MAUI/App.xaml index 35a536a..1a460c9 100644 --- a/I18N Commander/UI MAUI/App.xaml +++ b/I18N Commander/UI MAUI/App.xaml @@ -1,14 +1,26 @@ - + - - - - + + #512bdf + White + + + + + - + \ No newline at end of file diff --git a/I18N Commander/UI MAUI/App.xaml.cs b/I18N Commander/UI MAUI/App.xaml.cs index 93506e7..c681902 100644 --- a/I18N Commander/UI MAUI/App.xaml.cs +++ b/I18N Commander/UI MAUI/App.xaml.cs @@ -2,9 +2,9 @@ public partial class App : Application { - public App() - { - this.InitializeComponent(); - this.MainPage = new AppShell(); - } -} \ No newline at end of file + public App() + { + this.InitializeComponent(); + this.MainPage = new MainPage(); + } +} diff --git a/I18N Commander/UI MAUI/AppShell.xaml b/I18N Commander/UI MAUI/AppShell.xaml deleted file mode 100644 index 75b58d7..0000000 --- a/I18N Commander/UI MAUI/AppShell.xaml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/I18N Commander/UI MAUI/AppShell.xaml.cs b/I18N Commander/UI MAUI/AppShell.xaml.cs deleted file mode 100644 index 11246d3..0000000 --- a/I18N Commander/UI MAUI/AppShell.xaml.cs +++ /dev/null @@ -1,34 +0,0 @@ -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/Main.razor b/I18N Commander/UI MAUI/Main.razor new file mode 100644 index 0000000..0d8de5c --- /dev/null +++ b/I18N Commander/UI MAUI/Main.razor @@ -0,0 +1,11 @@ + + + + + + + +

Sorry, there's nothing at this address.

+
+
+
diff --git a/I18N Commander/UI MAUI/MainPage.xaml b/I18N Commander/UI MAUI/MainPage.xaml index 9967020..5bcafea 100644 --- a/I18N Commander/UI MAUI/MainPage.xaml +++ b/I18N Commander/UI MAUI/MainPage.xaml @@ -1,41 +1,14 @@  + xmlns:local="clr-namespace:UI_MAUI" + x:Class="UI_MAUI.MainPage" + BackgroundColor="{DynamicResource PageBackgroundColor}"> - - + + + + + - - -