diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 810c5f6e..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -github: [bkaankose] diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 4b61a31b..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Bug Report -about: Something is not working as intended -title: "[Bug]" -labels: bug -assignees: bkaankose - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature-proposal.md b/.github/ISSUE_TEMPLATE/feature-proposal.md deleted file mode 100644 index 0fc10d0b..00000000 --- a/.github/ISSUE_TEMPLATE/feature-proposal.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature Proposal -about: Suggest an idea for this project -title: "[Proposal]" -labels: enhancement -assignees: '' - ---- - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Is your proposal implemented in Windows Mail?** -Wino's priority is to catch up with the feature set of Windows Mail first. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/Wino.BackgroundTasks/Wino.BackgroundTasks.NET8.csproj b/Wino.BackgroundTasks/Wino.BackgroundTasks.NET8.csproj index ae774d76..d0272eaf 100644 --- a/Wino.BackgroundTasks/Wino.BackgroundTasks.NET8.csproj +++ b/Wino.BackgroundTasks/Wino.BackgroundTasks.NET8.csproj @@ -1,9 +1,8 @@  - net8.0-windows10.0.22621.0 - 10.0.19041.0 + net8.0-windows10.0.19041.0 + 10.0.17763.0 Wino.BackgroundTasks.NET8 - win-x86;win-x64;win-arm64 win10-x86;win10-x64;win10-arm64 true diff --git a/Wino.Calendar/App.xaml b/Wino.Calendar/App.xaml new file mode 100644 index 00000000..5707d1ac --- /dev/null +++ b/Wino.Calendar/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/Wino.Calendar/App.xaml.cs b/Wino.Calendar/App.xaml.cs new file mode 100644 index 00000000..971e694b --- /dev/null +++ b/Wino.Calendar/App.xaml.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +namespace Wino.Calendar +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs e) + { + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + rootFrame.NavigationFailed += OnNavigationFailed; + + if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (e.PrelaunchActivated == false) + { + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(typeof(MainPage), e.Arguments); + } + // Ensure the current window is active + Window.Current.Activate(); + } + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} diff --git a/Wino.Calendar/Assets/LockScreenLogo.scale-200.png b/Wino.Calendar/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 00000000..735f57ad Binary files /dev/null and b/Wino.Calendar/Assets/LockScreenLogo.scale-200.png differ diff --git a/Wino.Calendar/Assets/SplashScreen.scale-200.png b/Wino.Calendar/Assets/SplashScreen.scale-200.png new file mode 100644 index 00000000..023e7f1f Binary files /dev/null and b/Wino.Calendar/Assets/SplashScreen.scale-200.png differ diff --git a/Wino.Calendar/Assets/Square150x150Logo.scale-200.png b/Wino.Calendar/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 00000000..af49fec1 Binary files /dev/null and b/Wino.Calendar/Assets/Square150x150Logo.scale-200.png differ diff --git a/Wino.Calendar/Assets/Square44x44Logo.scale-200.png b/Wino.Calendar/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 00000000..ce342a2e Binary files /dev/null and b/Wino.Calendar/Assets/Square44x44Logo.scale-200.png differ diff --git a/Wino.Calendar/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Wino.Calendar/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 00000000..f6c02ce9 Binary files /dev/null and b/Wino.Calendar/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/Wino.Calendar/Assets/StoreLogo.png b/Wino.Calendar/Assets/StoreLogo.png new file mode 100644 index 00000000..7385b56c Binary files /dev/null and b/Wino.Calendar/Assets/StoreLogo.png differ diff --git a/Wino.Calendar/Assets/Wide310x150Logo.scale-200.png b/Wino.Calendar/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 00000000..288995b3 Binary files /dev/null and b/Wino.Calendar/Assets/Wide310x150Logo.scale-200.png differ diff --git a/Wino.Calendar/MainPage.xaml b/Wino.Calendar/MainPage.xaml new file mode 100644 index 00000000..136e046c --- /dev/null +++ b/Wino.Calendar/MainPage.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/Wino.Calendar/MainPage.xaml.cs b/Wino.Calendar/MainPage.xaml.cs new file mode 100644 index 00000000..281f422f --- /dev/null +++ b/Wino.Calendar/MainPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 + +namespace Wino.Calendar +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainPage : Page + { + public MainPage() + { + this.InitializeComponent(); + } + } +} diff --git a/Wino.Calendar/Package.appxmanifest b/Wino.Calendar/Package.appxmanifest new file mode 100644 index 00000000..6e261c84 --- /dev/null +++ b/Wino.Calendar/Package.appxmanifest @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + Wino Calendar + Burak KÖSE + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Wino.Calendar/Properties/AssemblyInfo.cs b/Wino.Calendar/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..979badd3 --- /dev/null +++ b/Wino.Calendar/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Wino.Calendar")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Wino.Calendar")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/Wino.Calendar/Properties/Default.rd.xml b/Wino.Calendar/Properties/Default.rd.xml new file mode 100644 index 00000000..af00722c --- /dev/null +++ b/Wino.Calendar/Properties/Default.rd.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Wino.Calendar/Wino.Calendar.csproj b/Wino.Calendar/Wino.Calendar.csproj new file mode 100644 index 00000000..2a0e6530 --- /dev/null +++ b/Wino.Calendar/Wino.Calendar.csproj @@ -0,0 +1,172 @@ + + + + + Debug + x86 + {600F4979-DB7E-409D-B7DA-B60BE4C55C35} + AppContainerExe + Properties + Wino.Calendar + Wino.Calendar + en-US + UAP + 10.0.22621.0 + 10.0.17763.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true + True + 125A5273FCFE8D551C3FED87F67C87A663E98F1B + + True + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\ARM64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM64 + false + prompt + true + true + + + bin\ARM64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM64 + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + PackageReference + + + + App.xaml + + + MainPage.xaml + + + + + + Designer + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + 6.2.14 + + + + 14.0 + + + + \ No newline at end of file diff --git a/Wino.Core.Domain/Wino.Core.Domain.NET8.csproj b/Wino.Core.Domain/Wino.Core.Domain.NET8.csproj index 66ebaf5b..7dc4c8e4 100644 --- a/Wino.Core.Domain/Wino.Core.Domain.NET8.csproj +++ b/Wino.Core.Domain/Wino.Core.Domain.NET8.csproj @@ -56,6 +56,7 @@ + diff --git a/Wino.Core.UWP/CoreUWPContainerSetup.cs b/Wino.Core.UWP/CoreUWPContainerSetup.cs index 3ff22c19..40529d1e 100644 --- a/Wino.Core.UWP/CoreUWPContainerSetup.cs +++ b/Wino.Core.UWP/CoreUWPContainerSetup.cs @@ -21,8 +21,7 @@ namespace Wino.Core.UWP services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - - + services.AddSingleton(); services.AddTransient(); services.AddTransient(); services.AddTransient(); diff --git a/Wino.Core.UWP/UWPDispatcher.cs b/Wino.Core.UWP/Dispatcher.cs similarity index 100% rename from Wino.Core.UWP/UWPDispatcher.cs rename to Wino.Core.UWP/Dispatcher.cs diff --git a/Wino.Core.UWP/Wino.Core.WinUI.csproj b/Wino.Core.UWP/Wino.Core.WinUI.csproj index bb2046be..db104424 100644 --- a/Wino.Core.UWP/Wino.Core.WinUI.csproj +++ b/Wino.Core.UWP/Wino.Core.WinUI.csproj @@ -1,13 +1,12 @@  - net8.0-windows10.0.22621.0 - 10.0.19041.0 + net8.0-windows10.0.19041.0 + 10.0.17763.0 Wino.Core.WinUI win-x86;win-x64;win-arm64 win10-x86;win10-x64;win10-arm64 true - diff --git a/Wino.Mail.WinUI/App.xaml b/Wino.Mail.WinUI/App.xaml index f0538f18..98d017e8 100644 --- a/Wino.Mail.WinUI/App.xaml +++ b/Wino.Mail.WinUI/App.xaml @@ -1,16 +1,234 @@ + xmlns:controls="using:Wino.Controls" + xmlns:selectors="using:Wino.Selectors" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + + + + + + + + + + + + + 19 + 19 + 24,24,24,24 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + 0 + + + + - diff --git a/Wino.Mail.WinUI/App.xaml.cs b/Wino.Mail.WinUI/App.xaml.cs index bb36f1d4..ca532336 100644 --- a/Wino.Mail.WinUI/App.xaml.cs +++ b/Wino.Mail.WinUI/App.xaml.cs @@ -1,4 +1,5 @@ -using System.Text; +using System; +using System.Text; using Microsoft.Extensions.DependencyInjection; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; @@ -9,8 +10,7 @@ using Wino.Core.Services; using Wino.Core.WinUI.Services; using Wino.Views; using WinUIEx; - -namespace Wino.Mail.WinUI +namespace Wino { public partial class App : Application { @@ -62,7 +62,7 @@ namespace Wino.Mail.WinUI m_Window.Activate(); } - private void ConfigureWindow() + private async void ConfigureWindow() { m_Window = new WindowEx { diff --git a/Wino.Mail.WinUI/AppThemes/Custom.xaml b/Wino.Mail.WinUI/AppThemes/Custom.xaml index 97df0020..9323c48c 100644 --- a/Wino.Mail.WinUI/AppThemes/Custom.xaml +++ b/Wino.Mail.WinUI/AppThemes/Custom.xaml @@ -1,4 +1,4 @@ - diff --git a/Wino.Mail.WinUI/Assets/LargeTile.scale-100.png b/Wino.Mail.WinUI/Assets/LargeTile.scale-100.png index aca6e4e2..914dbf12 100644 Binary files a/Wino.Mail.WinUI/Assets/LargeTile.scale-100.png and b/Wino.Mail.WinUI/Assets/LargeTile.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/LargeTile.scale-125.png b/Wino.Mail.WinUI/Assets/LargeTile.scale-125.png index b80bf9d4..064a430a 100644 Binary files a/Wino.Mail.WinUI/Assets/LargeTile.scale-125.png and b/Wino.Mail.WinUI/Assets/LargeTile.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/LargeTile.scale-150.png b/Wino.Mail.WinUI/Assets/LargeTile.scale-150.png index 1ed2a001..926ef868 100644 Binary files a/Wino.Mail.WinUI/Assets/LargeTile.scale-150.png and b/Wino.Mail.WinUI/Assets/LargeTile.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/LargeTile.scale-200.png b/Wino.Mail.WinUI/Assets/LargeTile.scale-200.png index a8e471dd..942e65af 100644 Binary files a/Wino.Mail.WinUI/Assets/LargeTile.scale-200.png and b/Wino.Mail.WinUI/Assets/LargeTile.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/LargeTile.scale-400.png b/Wino.Mail.WinUI/Assets/LargeTile.scale-400.png index 54cea310..23fa4eec 100644 Binary files a/Wino.Mail.WinUI/Assets/LargeTile.scale-400.png and b/Wino.Mail.WinUI/Assets/LargeTile.scale-400.png differ diff --git a/Wino.Mail.WinUI/Assets/SmallTile.scale-100.png b/Wino.Mail.WinUI/Assets/SmallTile.scale-100.png index f0d52390..bd9d3edf 100644 Binary files a/Wino.Mail.WinUI/Assets/SmallTile.scale-100.png and b/Wino.Mail.WinUI/Assets/SmallTile.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/SmallTile.scale-125.png b/Wino.Mail.WinUI/Assets/SmallTile.scale-125.png index 4a0404cf..af9bc65c 100644 Binary files a/Wino.Mail.WinUI/Assets/SmallTile.scale-125.png and b/Wino.Mail.WinUI/Assets/SmallTile.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/SmallTile.scale-150.png b/Wino.Mail.WinUI/Assets/SmallTile.scale-150.png index f801334e..809bd4cc 100644 Binary files a/Wino.Mail.WinUI/Assets/SmallTile.scale-150.png and b/Wino.Mail.WinUI/Assets/SmallTile.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/SmallTile.scale-200.png b/Wino.Mail.WinUI/Assets/SmallTile.scale-200.png index bb2c20c9..e1fb3314 100644 Binary files a/Wino.Mail.WinUI/Assets/SmallTile.scale-200.png and b/Wino.Mail.WinUI/Assets/SmallTile.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/SmallTile.scale-400.png b/Wino.Mail.WinUI/Assets/SmallTile.scale-400.png index c931a5dd..c0126862 100644 Binary files a/Wino.Mail.WinUI/Assets/SmallTile.scale-400.png and b/Wino.Mail.WinUI/Assets/SmallTile.scale-400.png differ diff --git a/Wino.Mail.WinUI/Assets/SplashScreen.scale-100.png b/Wino.Mail.WinUI/Assets/SplashScreen.scale-100.png index 23c8f147..07f543a6 100644 Binary files a/Wino.Mail.WinUI/Assets/SplashScreen.scale-100.png and b/Wino.Mail.WinUI/Assets/SplashScreen.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/SplashScreen.scale-125.png b/Wino.Mail.WinUI/Assets/SplashScreen.scale-125.png index ceb2dff6..f73d3264 100644 Binary files a/Wino.Mail.WinUI/Assets/SplashScreen.scale-125.png and b/Wino.Mail.WinUI/Assets/SplashScreen.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/SplashScreen.scale-150.png b/Wino.Mail.WinUI/Assets/SplashScreen.scale-150.png index 885d9bc2..741dfbab 100644 Binary files a/Wino.Mail.WinUI/Assets/SplashScreen.scale-150.png and b/Wino.Mail.WinUI/Assets/SplashScreen.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/SplashScreen.scale-200.png b/Wino.Mail.WinUI/Assets/SplashScreen.scale-200.png index 58c8ca7c..f8877820 100644 Binary files a/Wino.Mail.WinUI/Assets/SplashScreen.scale-200.png and b/Wino.Mail.WinUI/Assets/SplashScreen.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/SplashScreen.scale-400.png b/Wino.Mail.WinUI/Assets/SplashScreen.scale-400.png index fa77f2b7..824c4aa7 100644 Binary files a/Wino.Mail.WinUI/Assets/SplashScreen.scale-400.png and b/Wino.Mail.WinUI/Assets/SplashScreen.scale-400.png differ diff --git a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-100.png b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-100.png index a5f235b8..8cdf8794 100644 Binary files a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-100.png and b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-125.png b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-125.png index be92b5ae..c666ed70 100644 Binary files a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-125.png and b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-150.png b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-150.png index d0039797..6f82a0ba 100644 Binary files a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-150.png and b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-200.png b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-200.png index 430e6fa3..8071f410 100644 Binary files a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-200.png and b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-400.png b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-400.png index 9726829b..831d82c2 100644 Binary files a/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-400.png and b/Wino.Mail.WinUI/Assets/Square150x150Logo.scale-400.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png index 4d6b9dfe..3e5ca37f 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png index c0aa2ba3..a1469030 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png index 7be00300..bacb0965 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png index a6e4b0a2..3bc97a80 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png index 07514cc2..9518de76 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png index 4d6b9dfe..3e5ca37f 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png index 7be00300..bacb0965 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png index a6e4b0a2..3bc97a80 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png index 07514cc2..9518de76 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-100.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-100.png index 7432521d..ae2a25af 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-100.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-125.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-125.png index fe38dbdf..8b69ca05 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-125.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-150.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-150.png index 1ee950af..690da58d 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-150.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-200.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-200.png index 807e9ed4..44080349 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-200.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-400.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-400.png index f4457476..c1aa666e 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-400.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.scale-400.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-16.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-16.png index 9acb3cc8..8c7301ae 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-16.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-16.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24.png index c1e08a4f..258ea791 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png index c0aa2ba3..a1469030 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-256.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-256.png index 37f8decd..2a315657 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-256.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-256.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-32.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-32.png index 93c856d9..1bb3d19c 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-32.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-32.png differ diff --git a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-48.png b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-48.png index a2ca3afc..6b414eab 100644 Binary files a/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-48.png and b/Wino.Mail.WinUI/Assets/Square44x44Logo.targetsize-48.png differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.backup.png b/Wino.Mail.WinUI/Assets/StoreLogo.backup.png index 7385b56c..a4586f26 100644 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.backup.png and b/Wino.Mail.WinUI/Assets/StoreLogo.backup.png differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.png b/Wino.Mail.WinUI/Assets/StoreLogo.png deleted file mode 100644 index a4586f26..00000000 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.png and /dev/null differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.scale-100.png b/Wino.Mail.WinUI/Assets/StoreLogo.scale-100.png index 4c4b4b34..019e7c19 100644 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.scale-100.png and b/Wino.Mail.WinUI/Assets/StoreLogo.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.scale-125.png b/Wino.Mail.WinUI/Assets/StoreLogo.scale-125.png index 1c325127..597bfcb8 100644 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.scale-125.png and b/Wino.Mail.WinUI/Assets/StoreLogo.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.scale-150.png b/Wino.Mail.WinUI/Assets/StoreLogo.scale-150.png index bb194ef7..98adf39d 100644 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.scale-150.png and b/Wino.Mail.WinUI/Assets/StoreLogo.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.scale-200.png b/Wino.Mail.WinUI/Assets/StoreLogo.scale-200.png index b77a5ddc..7d7106c5 100644 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.scale-200.png and b/Wino.Mail.WinUI/Assets/StoreLogo.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/StoreLogo.scale-400.png b/Wino.Mail.WinUI/Assets/StoreLogo.scale-400.png index 8d0a133e..59fe9b24 100644 Binary files a/Wino.Mail.WinUI/Assets/StoreLogo.scale-400.png and b/Wino.Mail.WinUI/Assets/StoreLogo.scale-400.png differ diff --git a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-100.png b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-100.png index f330133d..d8715395 100644 Binary files a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-100.png and b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-100.png differ diff --git a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-125.png b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-125.png index e4656fa7..0ce162bd 100644 Binary files a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-125.png and b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-125.png differ diff --git a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-150.png b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-150.png index 884084b3..b1676d1a 100644 Binary files a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-150.png and b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-150.png differ diff --git a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-200.png b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-200.png index 23c8f147..07f543a6 100644 Binary files a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-200.png and b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-200.png differ diff --git a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-400.png b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-400.png index 58c8ca7c..f8877820 100644 Binary files a/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-400.png and b/Wino.Mail.WinUI/Assets/Wide310x150Logo.scale-400.png differ diff --git a/Wino.Mail.WinUI/BasePage.cs b/Wino.Mail.WinUI/BasePage.cs index 57474c96..cd67561c 100644 --- a/Wino.Mail.WinUI/BasePage.cs +++ b/Wino.Mail.WinUI/BasePage.cs @@ -6,9 +6,7 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; using Wino.Core.Messages.Shell; -using Wino.Core.WinUI; using Wino.Mail.ViewModels; -using Wino.Mail.WinUI; namespace Wino { diff --git a/Wino.Mail.WinUI/Package.appxmanifest b/Wino.Mail.WinUI/Package.appxmanifest index 90343c7f..d61e59d4 100644 --- a/Wino.Mail.WinUI/Package.appxmanifest +++ b/Wino.Mail.WinUI/Package.appxmanifest @@ -7,16 +7,25 @@ xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap rescap"> - + + + + + + + + - + + + - Wino.Mail.WinUI - bkaan + Wino Mail (Preview) + Burak KÖSE Assets\StoreLogo.png @@ -34,14 +43,53 @@ Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$"> - + + + + + + + + + + + + + + + + + + + Google Auth Protocol + + + + + + + + + + EML\eml.png + + .eml + + + + + diff --git a/Wino.Mail.WinUI/Properties/launchSettings.json b/Wino.Mail.WinUI/Properties/launchSettings.json new file mode 100644 index 00000000..8d2cf66c --- /dev/null +++ b/Wino.Mail.WinUI/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "Wino.Mail.WinUI (Package)": { + "commandName": "MsixPackage" + }, + "Wino.Mail.WinUI (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/Wino.Mail.WinUI/Views/WelcomePage.xaml b/Wino.Mail.WinUI/Views/WelcomePage.xaml index 743d5944..c9eb0f75 100644 --- a/Wino.Mail.WinUI/Views/WelcomePage.xaml +++ b/Wino.Mail.WinUI/Views/WelcomePage.xaml @@ -1,36 +1,15 @@ - + + mc:Ignorable="d" + Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - - - + - - - - - + + diff --git a/Wino.Mail.WinUI/Views/WelcomePage.xaml.cs b/Wino.Mail.WinUI/Views/WelcomePage.xaml.cs index 056c1811..d529cc18 100644 --- a/Wino.Mail.WinUI/Views/WelcomePage.xaml.cs +++ b/Wino.Mail.WinUI/Views/WelcomePage.xaml.cs @@ -1,17 +1,31 @@ -using Wino.Views.Abstract; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. namespace Wino.Views { - public sealed partial class WelcomePage : WelcomePageAbstract + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class WelcomePage : Page { public WelcomePage() { - InitializeComponent(); + this.InitializeComponent(); } - - //private async void HyperlinkClicked(object sender, Microsoft.Toolkit.Uwp.UI.Controls.LinkClickedEventArgs e) - //{ - // await Launcher.LaunchUriAsync(new System.Uri(e.Link)); - //} } } diff --git a/Wino.Core.UWP/WinAppDispatcher.cs b/Wino.Mail.WinUI/WinAppDispatcher.cs similarity index 95% rename from Wino.Core.UWP/WinAppDispatcher.cs rename to Wino.Mail.WinUI/WinAppDispatcher.cs index 9966606d..9df43663 100644 --- a/Wino.Core.UWP/WinAppDispatcher.cs +++ b/Wino.Mail.WinUI/WinAppDispatcher.cs @@ -4,7 +4,7 @@ using CommunityToolkit.WinUI; using Microsoft.UI.Dispatching; using Wino.Core.Domain.Interfaces; -namespace Wino.Core.WinUI +namespace Wino { public class WinAppDispatcher : IDispatcher { diff --git a/Wino.Mail.WinUI/Wino.Mail.WinUI.csproj b/Wino.Mail.WinUI/Wino.Mail.WinUI.csproj index e9814396..79466454 100644 --- a/Wino.Mail.WinUI/Wino.Mail.WinUI.csproj +++ b/Wino.Mail.WinUI/Wino.Mail.WinUI.csproj @@ -1,47 +1,207 @@  WinExe - net8.0-windows10.0.22621.0 - 10.0.19041.0 - Wino.Mail.WinUI + net8.0-windows10.0.19041.0 + 10.0.17763.0 + Wino app.manifest x86;x64;ARM64 win-x86;win-x64;win-arm64 win10-x86;win10-x64;win10-arm64 - 10.0.22621.35-preview win-$(Platform).pubxml - true true - True + 10.0.19041.35-preview + True + False + True + False + SHA256 + False + C:\Users\bkaan\Desktop\Packages\WinUI\ + True + True + Always + x86|x64|arm64 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + - + + + + + + + + + + - - - - - - - - - - - @@ -54,14 +214,215 @@ + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + XamlIntelliSenseFileGenerator + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + diff --git a/Wino.Mail/App.xaml.cs b/Wino.Mail/App.xaml.cs new file mode 100644 index 00000000..fd1b9051 --- /dev/null +++ b/Wino.Mail/App.xaml.cs @@ -0,0 +1,226 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.AppCenter.Analytics; +using Microsoft.AppCenter.Crashes; +using Microsoft.Extensions.DependencyInjection; +using Serilog; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.ApplicationModel.AppService; +using Windows.ApplicationModel.Background; +using Windows.Storage; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Wino.Activation; +using Wino.Core.Domain.Interfaces; +using Wino.Core.Services; +using Wino.Core.WinUI.Services; + +namespace Wino +{ + public sealed partial class App : Application + { + private BackgroundTaskDeferral backgroundTaskDeferral; + + private readonly IApplicationConfiguration _applicationFolderConfiguration; + + public App() + { + InitializeComponent(); + + UnhandledException += OnAppUnhandledException; + EnteredBackground += OnEnteredBackground; + LeavingBackground += OnLeavingBackground; + + Resuming += OnResuming; + Suspending += OnSuspending; + + Services = ConfigureServices(); + + _logInitializer = Services.GetService(); + + ConfigureLogger(); + ConfigureAppCenter(); + ConfigurePrelaunch(); + ConfigureXbox(); + + _applicationFolderConfiguration = Services.GetService(); + + // Make sure the paths are setup on app start. + _applicationFolderConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path; + _applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(ApplicationConfiguration.SharedFolderName).Path; + + _appServiceConnectionManager = Services.GetService>(); + _themeService = Services.GetService(); + _databaseService = Services.GetService(); + _translationService = Services.GetService(); + _appShellService = Services.GetService(); + + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + } + + private async void OnResuming(object sender, object e) + { + // App Service connection was lost on suspension. + // We must restore it. + // Server might be running already, but re-launching it will trigger a new connection attempt. + + await _appServiceConnectionManager.ConnectAsync(); + } + + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + deferral.Complete(); + } + + private void LogActivation(string log) => Log.Information($"{WinoLaunchLogPrefix}{log}"); + private void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) => LogActivation($"Wino went foreground."); + private void OnEnteredBackground(object sender, EnteredBackgroundEventArgs e) => LogActivation($"Wino went background."); + + + protected override void OnWindowCreated(WindowCreatedEventArgs args) + { + base.OnWindowCreated(args); + + _appShellService.AppWindow = args.Window; + + LogActivation("Window is created."); + + ConfigureTitleBar(); + } + + protected override async void OnLaunched(LaunchActivatedEventArgs args) + { + LogActivation($"OnLaunched -> {args.GetType().Name}, Kind -> {args.Kind}, PreviousExecutionState -> {args.PreviousExecutionState}, IsPrelaunch -> {args.PrelaunchActivated}"); + + if (!args.PrelaunchActivated) + { + await ActivateWinoAsync(args); + } + } + + protected override async void OnFileActivated(FileActivatedEventArgs args) + { + base.OnFileActivated(args); + + Log.Information($"File activation for {args.Files.Count} item(s)."); + + await ActivateWinoAsync(args); + } + + protected override async void OnActivated(IActivatedEventArgs args) + { + base.OnActivated(args); + + Log.Information($"OnActivated -> {args.GetType().Name}, Kind -> {args.Kind}, Prev Execution State -> {args.PreviousExecutionState}"); + + await ActivateWinoAsync(args); + } + + protected override async void OnBackgroundActivated(BackgroundActivatedEventArgs args) + { + base.OnBackgroundActivated(args); + + // This can only be handled in App.xaml.cs + // Using handler activation makes it crash at runtime with a COM error... + if (args.TaskInstance.TriggerDetails is AppServiceTriggerDetails appServiceTriggerDetails) + { + // Only accept connections from callers in the same package + if (appServiceTriggerDetails.CallerPackageFamilyName == Package.Current.Id.FamilyName) + { + // Connection established from the fulltrust process + + backgroundTaskDeferral = args.TaskInstance.GetDeferral(); + args.TaskInstance.Canceled += OnBackgroundTaskCanceled; + + _appServiceConnectionManager.Connection = appServiceTriggerDetails.AppServiceConnection; + } + } + + LogActivation($"OnBackgroundActivated -> {args.GetType().Name}, TaskInstanceIdName -> {args.TaskInstance?.Task?.Name ?? "NA"}"); + + await ActivateWinoAsync(args); + } + + private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e) + { + var parameters = new Dictionary() + { + { "BaseMessage", e.Exception.GetBaseException().Message }, + { "BaseStackTrace", e.Exception.GetBaseException().StackTrace }, + { "StackTrace", e.Exception.StackTrace }, + { "Message", e.Exception.Message }, + }; + + Log.Error(e.Exception, "[Wino Crash]"); + + Crashes.TrackError(e.Exception, parameters); + Analytics.TrackEvent("Wino Crashed", parameters); + } + + private bool IsInteractiveLaunchArgs(object args) => args is IActivatedEventArgs; + + private async Task ActivateWinoAsync(object args) + { + foreach (var service in initializeServices) + { + await service.InitializeAsync(); + } + + if (IsInteractiveLaunchArgs(args)) + { + if (Window.Current.Content == null) + { + var mainFrame = new Frame(); + + Window.Current.Content = mainFrame; + + await _themeService.InitializeAsync(); + } + } + + await HandleActivationAsync(args); + + if (IsInteractiveLaunchArgs(args)) + { + Window.Current.Activate(); + + LogActivation("Window activated"); + } + } + + private async Task HandleActivationAsync(object activationArgs) + { + var activationHandler = GetActivationHandlers().FirstOrDefault(h => h.CanHandle(activationArgs)); + + if (activationHandler != null) + { + await activationHandler.HandleAsync(activationArgs); + } + + if (IsInteractiveLaunchArgs(activationArgs)) + { + var defaultHandler = new DefaultActivationHandler(); + if (defaultHandler.CanHandle(activationArgs)) + { + await defaultHandler.HandleAsync(activationArgs); + } + } + } + + public async void OnBackgroundTaskCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason) + { + Log.Information($"Background task {sender.Task.Name} was canceled. Reason: {reason}"); + + await _appServiceConnectionManager.DisconnectAsync(); + + backgroundTaskDeferral?.Complete(); + backgroundTaskDeferral = null; + + _appServiceConnectionManager.Connection = null; + } + } +} diff --git a/Wino.Mail.WinUI/AppShell.xaml b/Wino.Mail/AppShell.xaml similarity index 99% rename from Wino.Mail.WinUI/AppShell.xaml rename to Wino.Mail/AppShell.xaml index f8f886f2..b839ea34 100644 --- a/Wino.Mail.WinUI/AppShell.xaml +++ b/Wino.Mail/AppShell.xaml @@ -514,6 +514,14 @@ IsOpen="False" PreferredPlacement="Bottom" Target="{x:Bind ShellInfoBar}" /> + + +