From 259dc22dfbc4330b6dd200fc7b2daba51f1a52db Mon Sep 17 00:00:00 2001 From: Ahmed Mohamed Abdel-Razek Date: Tue, 16 May 2023 10:21:57 +0300 Subject: [PATCH] Update All Nuget and now project uses .net7 --- src/PostDroid/App.axaml.cs | 6 +- src/PostDroid/Program.cs | 7 + src/PostDroid/SuperPostDroidPunk.csproj | 18 +- src/PostDroid/Views/MainWindow.axaml | 806 +++++++++++------- .../WebApplicationPostTest.csproj | 20 +- 5 files changed, 535 insertions(+), 322 deletions(-) diff --git a/src/PostDroid/App.axaml.cs b/src/PostDroid/App.axaml.cs index bea51d5..9e0b190 100644 --- a/src/PostDroid/App.axaml.cs +++ b/src/PostDroid/App.axaml.cs @@ -21,8 +21,10 @@ public override void OnFrameworkInitializationCompleted() if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { desktop.MainWindow = new MainWindow(); - _notificationManager = new WindowNotificationManager(desktop.MainWindow); - _notificationManager.Position = NotificationPosition.BottomRight; + _notificationManager = new WindowNotificationManager(desktop.MainWindow) + { + Position = NotificationPosition.BottomRight + }; desktop.MainWindow.DataContext = new MainWindowViewModel(_notificationManager); } diff --git a/src/PostDroid/Program.cs b/src/PostDroid/Program.cs index 5047b75..bf5b2ee 100644 --- a/src/PostDroid/Program.cs +++ b/src/PostDroid/Program.cs @@ -1,5 +1,7 @@ using Avalonia; using Avalonia.ReactiveUI; +using Xilium.CefGlue; +using Xilium.CefGlue.Common; namespace SuperPostDroidPunk { @@ -15,6 +17,11 @@ public static void Main(string[] args) => BuildAvaloniaApp() public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() + .With(new Win32PlatformOptions + { + UseWindowsUIComposition = false + }) + .AfterSetup(_ => CefRuntimeLoader.Initialize(new CefSettings())) .LogToTrace() .UseReactiveUI(); } diff --git a/src/PostDroid/SuperPostDroidPunk.csproj b/src/PostDroid/SuperPostDroidPunk.csproj index 080cec9..b2be32b 100644 --- a/src/PostDroid/SuperPostDroidPunk.csproj +++ b/src/PostDroid/SuperPostDroidPunk.csproj @@ -1,7 +1,7 @@  WinExe - net5.0 + net7.0 MIT enable SuperPostDroidPunk-Logo.png @@ -20,14 +20,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/PostDroid/Views/MainWindow.axaml b/src/PostDroid/Views/MainWindow.axaml index 9221731..b470e6a 100644 --- a/src/PostDroid/Views/MainWindow.axaml +++ b/src/PostDroid/Views/MainWindow.axaml @@ -1,315 +1,519 @@ - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - + - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + - - - - diff --git a/src/WebApplicationPostTest/WebApplicationPostTest.csproj b/src/WebApplicationPostTest/WebApplicationPostTest.csproj index 08ca745..33da608 100644 --- a/src/WebApplicationPostTest/WebApplicationPostTest.csproj +++ b/src/WebApplicationPostTest/WebApplicationPostTest.csproj @@ -1,7 +1,7 @@ - net5.0 + net7.0 aspnet-WebApplicationPostTest-4E6BB37A-B46E-4CE4-AA53-CA59686C8DB7 @@ -14,18 +14,18 @@ - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + +