diff --git a/Jugenddienst Stunden/App.xaml.cs b/Jugenddienst Stunden/App.xaml.cs index f427868..8f43930 100644 --- a/Jugenddienst Stunden/App.xaml.cs +++ b/Jugenddienst Stunden/App.xaml.cs @@ -1,51 +1,49 @@  -namespace Jugenddienst_Stunden { - public partial class App : Application { - public App() { - InitializeComponent(); +namespace Jugenddienst_Stunden; +public partial class App : Application { + public App() { + InitializeComponent(); + MainPage = new AppShell(); - MainPage = new AppShell(); - - } - - - - //protected override Window CreateWindow(IActivationState activationState) => - //new Window(new AppShell()) { - // Width = 500, - // Height = 900 - //}; - - - // protected override Window CreateWindow(IActivationState activationState) { - // Window window = base.CreateWindow(activationState); - // window.Activated += Window_Activated; - // return window; - // } - - // private async void Window_Activated(object sender, EventArgs e) { - //#if WINDOWS - // const int DefaultWidth = 500; - // const int DefaultHeight = 900; - - // var window = sender as Window; - - // // change window size. - // window.Width = DefaultWidth; - // window.Height = DefaultHeight; - - // // give it some time to complete window resizing task. - // await window.Dispatcher.DispatchAsync(() => { }); - - // var disp = DeviceDisplay.Current.MainDisplayInfo; - - // // move to screen center - // //window.X = (disp.Width / disp.Density - window.Width) / 2; - // //window.Y = (disp.Height / disp.Density - window.Height) / 2; - //#endif - // } } + + + + //protected override Window CreateWindow(IActivationState activationState) => + //new Window(new AppShell()) { + // Width = 500, + // Height = 900 + //}; + + + // protected override Window CreateWindow(IActivationState activationState) { + // Window window = base.CreateWindow(activationState); + // window.Activated += Window_Activated; + // return window; + // } + + // private async void Window_Activated(object sender, EventArgs e) { + //#if WINDOWS + // const int DefaultWidth = 500; + // const int DefaultHeight = 900; + + // var window = sender as Window; + + // // change window size. + // window.Width = DefaultWidth; + // window.Height = DefaultHeight; + + // // give it some time to complete window resizing task. + // await window.Dispatcher.DispatchAsync(() => { }); + + // var disp = DeviceDisplay.Current.MainDisplayInfo; + + // // move to screen center + // //window.X = (disp.Width / disp.Density - window.Width) / 2; + // //window.Y = (disp.Height / disp.Density - window.Height) / 2; + //#endif + // } } diff --git a/Jugenddienst Stunden/MauiProgram.cs b/Jugenddienst Stunden/MauiProgram.cs index c991459..a31c524 100644 --- a/Jugenddienst Stunden/MauiProgram.cs +++ b/Jugenddienst Stunden/MauiProgram.cs @@ -1,12 +1,9 @@ - - - -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; using Microsoft.Maui.LifecycleEvents; using ZXing.Net.Maui.Controls; - namespace Jugenddienst_Stunden; + public static class MauiProgram { public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder();