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 @@ + + + + + + + + +