diff --git a/Wino.BackgroundTasks/AppUpdatedTask.cs b/Wino.BackgroundTasks/AppUpdatedTask.cs deleted file mode 100644 index 1a70899f..00000000 --- a/Wino.BackgroundTasks/AppUpdatedTask.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.Toolkit.Uwp.Notifications; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Background; - -namespace Wino.BackgroundTasks -{ - /// - /// Creates a toast notification to notify user when the Store update happens. - /// - public sealed class AppUpdatedTask : IBackgroundTask - { - public void Run(IBackgroundTaskInstance taskInstance) - { - var def = taskInstance.GetDeferral(); - - var builder = new ToastContentBuilder(); - builder.SetToastScenario(ToastScenario.Default); - - Package package = Package.Current; - PackageId packageId = package.Id; - PackageVersion version = packageId.Version; - - var versionText = string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision); - - // TODO: Handle with Translator, but it's not initialized here yet. - builder.AddText("Wino Mail is updated!"); - builder.AddText(string.Format("New version {0} is ready.", versionText)); - - builder.Show(); - - def.Complete(); - } - } -} diff --git a/Wino.BackgroundTasks/Properties/AssemblyInfo.cs b/Wino.BackgroundTasks/Properties/AssemblyInfo.cs deleted file mode 100644 index 9887885d..00000000 --- a/Wino.BackgroundTasks/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -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.BackgroundTasks")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Wino.BackgroundTasks")] -[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.BackgroundTasks/Wino.BackgroundTasks.csproj b/Wino.BackgroundTasks/Wino.BackgroundTasks.csproj deleted file mode 100644 index 67f9296c..00000000 --- a/Wino.BackgroundTasks/Wino.BackgroundTasks.csproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - - Debug - AnyCPU - {D9EF0F59-F5F2-4D6C-A5BA-84043D8F3E08} - winmdobj - Properties - Wino.BackgroundTasks - Wino.BackgroundTasks - en-US - UAP - 10.0.22621.0 - 10.0.17763.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - false - - - x86 - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - x86 - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - ARM64 - true - bin\ARM64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - ARM64 - bin\ARM64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - x64 - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - x64 - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - PackageReference - - - - - - - - 4.66.2 - - - 6.2.14 - - - 7.1.3 - - - - - {CF3312E5-5DA0-4867-9945-49EA7598AF1F} - Wino.Core.Domain - - - {395f19ba-1e42-495c-9db5-1a6f537fccb8} - Wino.Core.UWP - - - {e6b1632a-8901-41e8-9ddf-6793c7698b0b} - Wino.Core - - - - - Windows Desktop Extensions for the UWP - - - - 14.0 - - - - \ No newline at end of file diff --git a/Wino.Core.UWP/Wino.Core.UWP.csproj b/Wino.Core.UWP/Wino.Core.UWP.csproj deleted file mode 100644 index 563450be..00000000 --- a/Wino.Core.UWP/Wino.Core.UWP.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - net9.0-windows10.0.26100.0 - 10.0.17763.0 - x86;x64;arm64 - win-x86;win-x64;win-arm64 - disable - true - en-US - true - true - 10.0.18362.0 - True - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Activation/ActivationHandler.cs b/Wino.Core.WinUI/Activation/ActivationHandler.cs deleted file mode 100644 index bbe692f1..00000000 --- a/Wino.Core.WinUI/Activation/ActivationHandler.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -namespace Wino.Activation; - -public abstract class ActivationHandler -{ - public abstract bool CanHandle(object args); - - public abstract Task HandleAsync(object args); -} - -// Extend this class to implement new ActivationHandlers -public abstract class ActivationHandler : ActivationHandler - where T : class -{ - // Override this method to add the activation logic in your activation handler - protected abstract Task HandleInternalAsync(T args); - - public override async Task HandleAsync(object args) - { - await HandleInternalAsync(args as T); - } - - public override bool CanHandle(object args) - { - // CanHandle checks the args is of type you have configured - return args is T && CanHandleInternal(args as T); - } - - // You can override this method to add extra validation on activation args - // to determine if your ActivationHandler should handle this activation args - protected virtual bool CanHandleInternal(T args) - { - return true; - } -} diff --git a/Wino.Core.WinUI/AppThemes/Acrylic.xaml b/Wino.Core.WinUI/AppThemes/Acrylic.xaml deleted file mode 100644 index 058a8842..00000000 --- a/Wino.Core.WinUI/AppThemes/Acrylic.xaml +++ /dev/null @@ -1,34 +0,0 @@ - - - Acrylic - - Transparent - - - - - - #ecf0f1 - - - - - - #2C2C2C - - - - - diff --git a/Wino.Core.WinUI/AppThemes/Clouds.xaml b/Wino.Core.WinUI/AppThemes/Clouds.xaml deleted file mode 100644 index 265b7a73..00000000 --- a/Wino.Core.WinUI/AppThemes/Clouds.xaml +++ /dev/null @@ -1,24 +0,0 @@ - - - Clouds - ms-appx:///Wino.Core.WinUI/BackgroundImages/Clouds.jpg - - - Transparent - - - - #b2dffc - - #222f3e - - - #b2dffc - - #222f3e - - - diff --git a/Wino.Core.WinUI/AppThemes/Custom.xaml b/Wino.Core.WinUI/AppThemes/Custom.xaml deleted file mode 100644 index f510d322..00000000 --- a/Wino.Core.WinUI/AppThemes/Custom.xaml +++ /dev/null @@ -1,46 +0,0 @@ - - - Custom - ms-appdata:///local/CustomWallpaper.jpg - - - - - 0,0,0,0 - 0,1,0,0 - 0,0,0,0 - - - - - #ecf0f1 - - #D9FFFFFF - - - - - - - - - #1f1f1f - - #E61F1F1F - - - - - - - - - - - diff --git a/Wino.Core.WinUI/AppThemes/Default.xaml b/Wino.Core.WinUI/AppThemes/Default.xaml deleted file mode 100644 index d8adf74d..00000000 --- a/Wino.Core.WinUI/AppThemes/Default.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - Default - - Transparent - Transparent - - - - - - #ecf0f1 - - - #1f1f1f - - - diff --git a/Wino.Core.WinUI/AppThemes/Forest.xaml b/Wino.Core.WinUI/AppThemes/Forest.xaml deleted file mode 100644 index 78c7dc6c..00000000 --- a/Wino.Core.WinUI/AppThemes/Forest.xaml +++ /dev/null @@ -1,20 +0,0 @@ - - - Forest - ms-appx:///Wino.Core.WinUI/BackgroundImages/Forest.jpg - - - Transparent - - - - #A800D608 - - - #59001C01 - - - diff --git a/Wino.Core.WinUI/AppThemes/Garden.xaml b/Wino.Core.WinUI/AppThemes/Garden.xaml deleted file mode 100644 index c0e7b09e..00000000 --- a/Wino.Core.WinUI/AppThemes/Garden.xaml +++ /dev/null @@ -1,23 +0,0 @@ - - - Garden - ms-appx:///Wino.Core.WinUI/BackgroundImages/Garden.jpg - - - Transparent - - - - #dcfad8 - #576574 - - - - - #dcfad8 - - - diff --git a/Wino.Core.WinUI/AppThemes/Nighty.xaml b/Wino.Core.WinUI/AppThemes/Nighty.xaml deleted file mode 100644 index 5b3d4877..00000000 --- a/Wino.Core.WinUI/AppThemes/Nighty.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - Nighty - ms-appx:///Wino.Core.WinUI/BackgroundImages/Nighty.jpg - - - Transparent - - - - - #fdcb6e - - - - #5413191F - - - diff --git a/Wino.Core.WinUI/AppThemes/Snowflake.xaml b/Wino.Core.WinUI/AppThemes/Snowflake.xaml deleted file mode 100644 index 22635a61..00000000 --- a/Wino.Core.WinUI/AppThemes/Snowflake.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - Snowflake - ms-appx:///Wino.Core.WinUI/BackgroundImages/Snowflake.jpg - - - Transparent - - - - - #b0c6dd - - - - #b0c6dd - - - diff --git a/Wino.Core.WinUI/AppThemes/TestTheme.xaml b/Wino.Core.WinUI/AppThemes/TestTheme.xaml deleted file mode 100644 index 903b065b..00000000 --- a/Wino.Core.WinUI/AppThemes/TestTheme.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - TestTheme.xaml - - - - - ms-appx:///BackgroundImages/bg6.jpg - #A3FFFFFF - #A3FFFFFF - #fdcb6e - - - - ms-appx:///BackgroundImages/bg6.jpg - - #A3000000 - #A3000000 - #A3262626 - - - diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_archive.png b/Wino.Core.WinUI/Assets/FileTypes/type_archive.png deleted file mode 100644 index b4227523..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_archive.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_audio.png b/Wino.Core.WinUI/Assets/FileTypes/type_audio.png deleted file mode 100644 index 5489d5e9..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_audio.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_executable.png b/Wino.Core.WinUI/Assets/FileTypes/type_executable.png deleted file mode 100644 index e8fc6e6e..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_executable.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_html.png b/Wino.Core.WinUI/Assets/FileTypes/type_html.png deleted file mode 100644 index 2bf4e140..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_html.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_image.png b/Wino.Core.WinUI/Assets/FileTypes/type_image.png deleted file mode 100644 index 378b9559..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_image.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_none.png b/Wino.Core.WinUI/Assets/FileTypes/type_none.png deleted file mode 100644 index 900b00cc..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_none.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_other.png b/Wino.Core.WinUI/Assets/FileTypes/type_other.png deleted file mode 100644 index c16c9edd..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_other.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_pdf.png b/Wino.Core.WinUI/Assets/FileTypes/type_pdf.png deleted file mode 100644 index b08ee4a2..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_pdf.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_rar.png b/Wino.Core.WinUI/Assets/FileTypes/type_rar.png deleted file mode 100644 index 4260115a..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_rar.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/FileTypes/type_video.png b/Wino.Core.WinUI/Assets/FileTypes/type_video.png deleted file mode 100644 index 829bd686..00000000 Binary files a/Wino.Core.WinUI/Assets/FileTypes/type_video.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/Providers/Gmail.png b/Wino.Core.WinUI/Assets/Providers/Gmail.png deleted file mode 100644 index 79dcff5b..00000000 Binary files a/Wino.Core.WinUI/Assets/Providers/Gmail.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/Providers/IMAP4.png b/Wino.Core.WinUI/Assets/Providers/IMAP4.png deleted file mode 100644 index 145023d0..00000000 Binary files a/Wino.Core.WinUI/Assets/Providers/IMAP4.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/Providers/Office 365.png b/Wino.Core.WinUI/Assets/Providers/Office 365.png deleted file mode 100644 index 8cecb7cb..00000000 Binary files a/Wino.Core.WinUI/Assets/Providers/Office 365.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/Providers/Outlook.png b/Wino.Core.WinUI/Assets/Providers/Outlook.png deleted file mode 100644 index d1956be1..00000000 Binary files a/Wino.Core.WinUI/Assets/Providers/Outlook.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/Providers/Yahoo.png b/Wino.Core.WinUI/Assets/Providers/Yahoo.png deleted file mode 100644 index a9881f75..00000000 Binary files a/Wino.Core.WinUI/Assets/Providers/Yahoo.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/Providers/iCloud.png b/Wino.Core.WinUI/Assets/Providers/iCloud.png deleted file mode 100644 index c19c75d4..00000000 Binary files a/Wino.Core.WinUI/Assets/Providers/iCloud.png and /dev/null differ diff --git a/Wino.Core.WinUI/Assets/WinoIcons.ttf b/Wino.Core.WinUI/Assets/WinoIcons.ttf deleted file mode 100644 index ef8acbf8..00000000 Binary files a/Wino.Core.WinUI/Assets/WinoIcons.ttf and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Acrylic.jpg b/Wino.Core.WinUI/BackgroundImages/Acrylic.jpg deleted file mode 100644 index 48c3b7d9..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Acrylic.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Clouds.jpg b/Wino.Core.WinUI/BackgroundImages/Clouds.jpg deleted file mode 100644 index f643572d..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Clouds.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Forest.jpg b/Wino.Core.WinUI/BackgroundImages/Forest.jpg deleted file mode 100644 index aa58e6af..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Forest.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Garden.jpg b/Wino.Core.WinUI/BackgroundImages/Garden.jpg deleted file mode 100644 index eaf1d05a..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Garden.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Mica.jpg b/Wino.Core.WinUI/BackgroundImages/Mica.jpg deleted file mode 100644 index 10519a41..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Mica.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Nighty.jpg b/Wino.Core.WinUI/BackgroundImages/Nighty.jpg deleted file mode 100644 index b79c8f1b..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Nighty.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BackgroundImages/Snowflake.jpg b/Wino.Core.WinUI/BackgroundImages/Snowflake.jpg deleted file mode 100644 index f5129640..00000000 Binary files a/Wino.Core.WinUI/BackgroundImages/Snowflake.jpg and /dev/null differ diff --git a/Wino.Core.WinUI/BasePage.cs b/Wino.Core.WinUI/BasePage.cs deleted file mode 100644 index d9b36395..00000000 --- a/Wino.Core.WinUI/BasePage.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Diagnostics; -using CommunityToolkit.Mvvm.Messaging; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Navigation; -using Wino.Core.ViewModels; -using Wino.Messaging.Client.Shell; - -namespace Wino.Core.WinUI; - -public partial class BasePage : Page, IRecipient -{ - public UIElement ShellContent - { - get { return (UIElement)GetValue(ShellContentProperty); } - set { SetValue(ShellContentProperty, value); } - } - - public static readonly DependencyProperty ShellContentProperty = DependencyProperty.Register(nameof(ShellContent), typeof(UIElement), typeof(BasePage), new PropertyMetadata(null)); - - public void Receive(LanguageChanged message) - { - OnLanguageChanged(); - } - - public virtual void OnLanguageChanged() { } - - /// - /// Register message recipients for this page. Override to register specific message types. - /// - protected virtual void RegisterRecipients() { } - - /// - /// Unregister message recipients for this page. Override to unregister specific message types. - /// - protected virtual void UnregisterRecipients() { } -} - -public abstract class BasePage : BasePage where T : CoreBaseViewModel -{ - public T ViewModel { get; } = WinoApplication.Current.Services.GetService(); - - protected BasePage() - { - ViewModel.Dispatcher = new WinUIDispatcher(DispatcherQueue); - - Loaded += PageLoaded; - Unloaded += PageUnloaded; - } - - private void PageUnloaded(object sender, RoutedEventArgs e) - { - Loaded -= PageLoaded; - Unloaded -= PageUnloaded; - } - - private void PageLoaded(object sender, RoutedEventArgs e) => ViewModel.OnPageLoaded(); - - ~BasePage() { Debug.WriteLine($"Disposed {GetType().Name}"); } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - var mode = GetNavigationMode(e.NavigationMode); - var parameter = e.Parameter; - - WeakReferenceMessenger.Default.Register(this); - RegisterRecipients(); - - ViewModel.OnNavigatedTo(mode, parameter); - } - - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - base.OnNavigatingFrom(e); - - var mode = GetNavigationMode(e.NavigationMode); - var parameter = e.Parameter; - - WeakReferenceMessenger.Default.Unregister(this); - UnregisterRecipients(); - - ViewModel.OnNavigatedFrom(mode, parameter); - - GC.Collect(); - } - - private Domain.Models.Navigation.NavigationMode GetNavigationMode(NavigationMode mode) - { - return (Domain.Models.Navigation.NavigationMode)mode; - } -} diff --git a/Wino.Core.WinUI/Controls/AccountCreationDialogControl.xaml b/Wino.Core.WinUI/Controls/AccountCreationDialogControl.xaml deleted file mode 100644 index 5f4cc520..00000000 --- a/Wino.Core.WinUI/Controls/AccountCreationDialogControl.xaml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Dialogs/CustomThemeBuilderDialog.xaml.cs b/Wino.Core.WinUI/Dialogs/CustomThemeBuilderDialog.xaml.cs deleted file mode 100644 index 339474eb..00000000 --- a/Wino.Core.WinUI/Dialogs/CustomThemeBuilderDialog.xaml.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using CommunityToolkit.WinUI.Helpers; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; -using Wino.Core.Domain.Interfaces; -using Wino.Core.WinUI; - -namespace Wino.Dialogs; - -public sealed partial class CustomThemeBuilderDialog : ContentDialog -{ - public byte[] WallpaperData { get; private set; } - public string AccentColor { get; private set; } - - private INewThemeService _themeService; - - public CustomThemeBuilderDialog() - { - InitializeComponent(); - - _themeService = WinoApplication.Current.Services.GetService(); - } - - private async void ApplyClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - if (Array.Empty() == WallpaperData) - return; - - var deferal = args.GetDeferral(); - - try - { - await _themeService.CreateNewCustomThemeAsync(ThemeNameBox.Text, AccentColor, WallpaperData); - } - catch (Exception exception) - { - ErrorTextBlock.Text = exception.Message; - } - finally - { - deferal.Complete(); - } - } - - private async void BrowseWallpaperClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) - { - var dialogService = WinoApplication.Current.Services.GetService(); - - var pickedFileData = await dialogService.PickWindowsFileContentAsync(".jpg", ".png"); - - if (pickedFileData == Array.Empty()) return; - - IsPrimaryButtonEnabled = true; - - WallpaperData = pickedFileData; - } - - private void PickerColorChanged(Microsoft.UI.Xaml.Controls.ColorPicker sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args) - { - PreviewAccentColorGrid.Background = new SolidColorBrush(args.NewColor); - AccentColor = args.NewColor.ToHex(); - } -} diff --git a/Wino.Core.WinUI/Dialogs/NewAccountDialog.xaml b/Wino.Core.WinUI/Dialogs/NewAccountDialog.xaml deleted file mode 100644 index 9dcc9ad9..00000000 --- a/Wino.Core.WinUI/Dialogs/NewAccountDialog.xaml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Dialogs/NewAccountDialog.xaml.cs b/Wino.Core.WinUI/Dialogs/NewAccountDialog.xaml.cs deleted file mode 100644 index 613e8e12..00000000 --- a/Wino.Core.WinUI/Dialogs/NewAccountDialog.xaml.cs +++ /dev/null @@ -1,180 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Windows.System; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Accounts; -using Wino.Core.ViewModels.Data; -using Wino.Helpers; - -namespace Wino.Core.WinUI.Dialogs; - -public sealed partial class NewAccountDialog : ContentDialog -{ - private Dictionary helpingLinks = new Dictionary() - { - { SpecialImapProvider.iCloud, "https://support.apple.com/en-us/102654" }, - { SpecialImapProvider.Yahoo, "http://help.yahoo.com/kb/SLN15241.html" }, - }; - - public static readonly DependencyProperty IsProviderSelectionVisibleProperty = DependencyProperty.Register(nameof(IsProviderSelectionVisible), typeof(bool), typeof(NewAccountDialog), new PropertyMetadata(true)); - public static readonly DependencyProperty IsSpecialImapServerPartVisibleProperty = DependencyProperty.Register(nameof(IsSpecialImapServerPartVisible), typeof(bool), typeof(NewAccountDialog), new PropertyMetadata(false)); - public static readonly DependencyProperty SelectedMailProviderProperty = DependencyProperty.Register(nameof(SelectedMailProvider), typeof(ProviderDetail), typeof(NewAccountDialog), new PropertyMetadata(null, new PropertyChangedCallback(OnSelectedProviderChanged))); - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register(nameof(SelectedColor), typeof(AppColorViewModel), typeof(NewAccountDialog), new PropertyMetadata(null, new PropertyChangedCallback(OnSelectedColorChanged))); - - - public AppColorViewModel SelectedColor - { - get { return (AppColorViewModel)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - /// - /// Gets or sets current selected mail provider in the dialog. - /// - public ProviderDetail SelectedMailProvider - { - get { return (ProviderDetail)GetValue(SelectedMailProviderProperty); } - set { SetValue(SelectedMailProviderProperty, value); } - } - - - public bool IsProviderSelectionVisible - { - get { return (bool)GetValue(IsProviderSelectionVisibleProperty); } - set { SetValue(IsProviderSelectionVisibleProperty, value); } - } - - public bool IsSpecialImapServerPartVisible - { - get { return (bool)GetValue(IsSpecialImapServerPartVisibleProperty); } - set { SetValue(IsSpecialImapServerPartVisibleProperty, value); } - } - - // List of available mail providers for now. - - public List Providers { get; set; } - - public List AvailableColors { get; set; } - - - public AccountCreationDialogResult Result = null; - - public NewAccountDialog() - { - InitializeComponent(); - - var themeService = WinoApplication.Current.NewThemeService.GetAvailableAccountColors(); - AvailableColors = themeService.Select(a => new AppColorViewModel(a)).ToList(); - - UpdateSelectedColor(); - } - - private static void OnSelectedProviderChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) - { - if (obj is NewAccountDialog dialog) - dialog.Validate(); - } - - private static void OnSelectedColorChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) - { - if (obj is NewAccountDialog dialog) - dialog.UpdateSelectedColor(); - } - - private void UpdateSelectedColor() - { - PickColorTextblock.Visibility = SelectedColor == null ? Visibility.Visible : Visibility.Collapsed; - SelectedColorEllipse.Fill = SelectedColor == null ? null : XamlHelpers.GetSolidColorBrushFromHex(SelectedColor.Hex); - } - - - private void CancelClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - Hide(); - } - - private void CreateClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - if (IsSpecialImapServerPartVisible) - { - // Special imap detail input. - - var details = new SpecialImapProviderDetails(SpecialImapAddress.Text.Trim(), AppSpecificPassword.Password.Trim(), DisplayNameTextBox.Text.Trim(), SelectedMailProvider.SpecialImapProvider); - Result = new AccountCreationDialogResult(SelectedMailProvider.Type, AccountNameTextbox.Text.Trim(), details, SelectedColor?.Hex ?? string.Empty); - Hide(); - - return; - } - - Validate(); - - if (IsSecondaryButtonEnabled) - { - if (SelectedMailProvider.SpecialImapProvider != SpecialImapProvider.None) - { - // This step requires app-sepcific password login for some providers. - args.Cancel = true; - - IsProviderSelectionVisible = false; - IsSpecialImapServerPartVisible = true; - - Validate(); - } - else - { - Result = new AccountCreationDialogResult(SelectedMailProvider.Type, AccountNameTextbox.Text.Trim(), null, SelectedColor?.Hex ?? string.Empty); - Hide(); - } - } - } - - private void InputChanged(object sender, TextChangedEventArgs e) => Validate(); - private void SenderNameChanged(object sender, TextChangedEventArgs e) => Validate(); - - private void Validate() - { - ValidateCreateButton(); - ValidateNames(); - } - - // Returns whether we can create account or not. - private void ValidateCreateButton() - { - bool shouldEnable = SelectedMailProvider != null - && SelectedMailProvider.IsSupported - && !string.IsNullOrEmpty(AccountNameTextbox.Text) - && (IsSpecialImapServerPartVisible ? (!string.IsNullOrEmpty(AppSpecificPassword.Password) - && !string.IsNullOrEmpty(DisplayNameTextBox.Text) - && EmailValidation.EmailValidator.Validate(SpecialImapAddress.Text)) : true); - - IsPrimaryButtonEnabled = shouldEnable; - } - - private void ValidateNames() - { - AccountNameTextbox.IsEnabled = SelectedMailProvider != null; - } - - private void DialogOpened(ContentDialog sender, ContentDialogOpenedEventArgs args) => Validate(); - - private void BackClicked(object sender, RoutedEventArgs e) - { - IsSpecialImapServerPartVisible = false; - IsProviderSelectionVisible = true; - - Validate(); - } - - private void ImapPasswordChanged(object sender, RoutedEventArgs e) => Validate(); - - private async void AppSpecificHelpButtonClicked(object sender, RoutedEventArgs e) - { - var helpUrl = helpingLinks[SelectedMailProvider.SpecialImapProvider]; - - await Launcher.LaunchUriAsync(new Uri(helpUrl)); - } -} diff --git a/Wino.Core.WinUI/Dialogs/PrintDialog.xaml b/Wino.Core.WinUI/Dialogs/PrintDialog.xaml deleted file mode 100644 index 11b878db..00000000 --- a/Wino.Core.WinUI/Dialogs/PrintDialog.xaml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Dialogs/PrintDialog.xaml.cs b/Wino.Core.WinUI/Dialogs/PrintDialog.xaml.cs deleted file mode 100644 index 888668a4..00000000 --- a/Wino.Core.WinUI/Dialogs/PrintDialog.xaml.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System.Collections.Generic; -using System.Drawing.Printing; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.UI.Xaml.Controls; -using Serilog; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Printing; - -namespace Wino.Core.WinUI.Dialogs; - -/// -/// Custom print dialog for configuring WebView2 print settings. -/// -public sealed partial class PrintDialog : ContentDialog -{ - public WebView2PrintSettingsModel PrintSettings { get; set; } = new WebView2PrintSettingsModel(); - - public PrintDialog() - { - this.InitializeComponent(); - } - - /// - /// Initializes the dialog with existing print settings. - /// - /// The initial print settings to load. - public PrintDialog(WebView2PrintSettingsModel printSettings = null) - { - if (printSettings != null) PrintSettings = printSettings; - - this.InitializeComponent(); - } - - private void PrintDialog_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) => LoadSettingsToUI(PrintSettings); - - private void OrientationRadio_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (sender is RadioButtons radioButtons) - { - PrintSettings.Orientation = (PrintOrientation)radioButtons.SelectedIndex; - } - } - - private void PrinterComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (sender is ComboBox comboBox && comboBox.SelectedItem != null) - { - PrintSettings.PrinterName = comboBox.SelectedItem.ToString(); - } - } - - /// - /// Sets the list of available printers for the dialog. - /// - /// List of available printer names. - public void SetAvailablePrinters(IEnumerable printers) - { - var printerList = printers?.ToList() ?? new List(); - - if (this.FindName("PrinterComboBox") is ComboBox printerComboBox) - { - printerComboBox.ItemsSource = printerList; - - if (printerList.Any()) - { - // Set to first printer or to the one in settings - var targetPrinter = !string.IsNullOrEmpty(PrintSettings.PrinterName) - ? PrintSettings.PrinterName - : printerList.First(); - - var index = printerList.IndexOf(targetPrinter); - printerComboBox.SelectedIndex = index >= 0 ? index : 0; - - // Update the settings model with the selected printer - PrintSettings.PrinterName = printerComboBox.SelectedItem?.ToString() ?? string.Empty; - } - } - } - - /// - /// Loads available printers asynchronously and sets them in the dialog. - /// - public async Task LoadAvailablePrintersAsync() - { - try - { - var printers = await Task.Run(() => - { - var printerList = new List(); - - // Get all installed printers using System.Drawing.Printing - foreach (string printerName in PrinterSettings.InstalledPrinters) - { - printerList.Add(printerName); - } - - return printerList.AsEnumerable(); - }); - - SetAvailablePrinters(printers); - } - catch (System.Exception ex) - { - // Log the exception if logging is available - Log.Error(ex, "Error getting available printers"); - - // Set empty list if printer discovery fails - SetAvailablePrinters(Enumerable.Empty()); - } - } - - private void LoadSettingsToUI(WebView2PrintSettingsModel settings) - { - if (settings == null) return; - - // Only handle orientation manually since other properties are bound via x:Bind - if (this.FindName("OrientationRadioButtons") is RadioButtons orientationRadio) - { - orientationRadio.SelectedIndex = (int)settings.Orientation; - } - } - - private void UpdateSettingsFromUI() - { - // Most properties are bound via x:Bind, only handle orientation manually - if (this.FindName("OrientationRadioButtons") is RadioButtons orientationRadio) - { - PrintSettings.Orientation = (PrintOrientation)orientationRadio.SelectedIndex; - } - - // Also update printer name from ComboBox since it uses ItemsSource binding - if (this.FindName("PrinterComboBox") is ComboBox printerComboBox && - printerComboBox.SelectedItem != null) - { - PrintSettings.PrinterName = printerComboBox.SelectedItem.ToString(); - } - } - - /// - /// Validates the current print settings before closing the dialog. - /// - /// True if settings are valid, false otherwise. - private bool ValidateSettings() - { - // Check if a printer is selected - if (this.FindName("PrinterComboBox") is ComboBox printerComboBox && - printerComboBox.SelectedItem == null) - { - return false; - } - - // Copies validation is handled by the bound property with validation in the model - if (PrintSettings.Copies <= 0) - { - return false; - } - - return true; - } - - private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - // Update settings from UI before validation - UpdateSettingsFromUI(); - - // Validate settings before closing - if (!ValidateSettings()) - { - args.Cancel = true; - } - } - - private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - // Cancel was clicked, no validation needed - } -} diff --git a/Wino.Core.WinUI/Dialogs/TextInputDialog.xaml b/Wino.Core.WinUI/Dialogs/TextInputDialog.xaml deleted file mode 100644 index af4215ce..00000000 --- a/Wino.Core.WinUI/Dialogs/TextInputDialog.xaml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 400 - 400 - 200 - 756 - - - - - - - diff --git a/Wino.Core.WinUI/Dialogs/TextInputDialog.xaml.cs b/Wino.Core.WinUI/Dialogs/TextInputDialog.xaml.cs deleted file mode 100644 index b0572f22..00000000 --- a/Wino.Core.WinUI/Dialogs/TextInputDialog.xaml.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; - -namespace Wino.Dialogs; - -public sealed partial class TextInputDialog : ContentDialog -{ - public bool? HasInput { get; set; } - - public string CurrentInput - { - get { return (string)GetValue(CurrentInputProperty); } - set { SetValue(CurrentInputProperty, value); } - } - - public static readonly DependencyProperty CurrentInputProperty = DependencyProperty.Register(nameof(CurrentInput), typeof(string), typeof(TextInputDialog), new PropertyMetadata(string.Empty)); - - public TextInputDialog() - { - InitializeComponent(); - } - - public void SetDescription(string description) - { - DialogDescription.Text = description; - } - - public void SetPrimaryButtonText(string text) - { - PrimaryButtonText = text; - } - - private void CancelClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - Hide(); - } - - private void UpdateOrCreateClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args) - { - HasInput = true; - - Hide(); - } -} diff --git a/Wino.Core.WinUI/Dispatcher.cs b/Wino.Core.WinUI/Dispatcher.cs deleted file mode 100644 index 24929c6e..00000000 --- a/Wino.Core.WinUI/Dispatcher.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Threading.Tasks; -using CommunityToolkit.WinUI; -using Microsoft.UI.Dispatching; -using Wino.Core.Domain.Interfaces; - -namespace Wino.Core.WinUI; - -public class WinUIDispatcher : IDispatcher -{ - private readonly DispatcherQueue _coreDispatcher; - - public WinUIDispatcher(DispatcherQueue coreDispatcher) - { - _coreDispatcher = coreDispatcher; - } - - public Task ExecuteOnUIThread(Action action) => _coreDispatcher.EnqueueAsync(action, DispatcherQueuePriority.Normal); -} diff --git a/Wino.Core.WinUI/Extensions/AnimationExtensions.cs b/Wino.Core.WinUI/Extensions/AnimationExtensions.cs deleted file mode 100644 index 39d8db58..00000000 --- a/Wino.Core.WinUI/Extensions/AnimationExtensions.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Text; -using System.Threading.Tasks; -using Windows.UI.Composition; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media.Animation; - -namespace Wino.Extensions; - -public static class AnimationExtensions -{ - #region Composition - - public static ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(this Compositor compositor, float? from, float to, - double duration, double delay, CompositionEasingFunction easing, AnimationIterationBehavior iterationBehavior) - { - var animation = compositor.CreateScalarKeyFrameAnimation(); - - animation.Duration = TimeSpan.FromMilliseconds(duration); - if (!delay.Equals(0)) animation.DelayTime = TimeSpan.FromMilliseconds(delay); - if (from.HasValue) animation.InsertKeyFrame(0.0f, from.Value, easing); - animation.InsertKeyFrame(1.0f, to, easing); - animation.IterationBehavior = iterationBehavior; - - return animation; - } - - public static Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(this Compositor compositor, Vector2? from, Vector2 to, - double duration, double delay, CompositionEasingFunction easing, AnimationIterationBehavior iterationBehavior) - { - var animation = compositor.CreateVector2KeyFrameAnimation(); - - animation.Duration = TimeSpan.FromMilliseconds(duration); - animation.DelayTime = TimeSpan.FromMilliseconds(delay); - if (from.HasValue) animation.InsertKeyFrame(0.0f, from.Value, easing); - animation.InsertKeyFrame(1.0f, to, easing); - animation.IterationBehavior = iterationBehavior; - - return animation; - } - - public static Vector3KeyFrameAnimation CreateVector3KeyFrameAnimation(this Compositor compositor, Vector2? from, Vector2 to, - double duration, double delay, CompositionEasingFunction easing, AnimationIterationBehavior iterationBehavior) - { - var animation = compositor.CreateVector3KeyFrameAnimation(); - - animation.Duration = TimeSpan.FromMilliseconds(duration); - animation.DelayTime = TimeSpan.FromMilliseconds(delay); - if (from.HasValue) animation.InsertKeyFrame(0.0f, new Vector3(from.Value, 1.0f), easing); - animation.InsertKeyFrame(1.0f, new Vector3(to, 1.0f), easing); - animation.IterationBehavior = iterationBehavior; - - return animation; - } - - public static Vector3KeyFrameAnimation CreateVector3KeyFrameAnimation(this Compositor compositor, Vector3? from, Vector3 to, - double duration, double delay, CompositionEasingFunction easing, AnimationIterationBehavior iterationBehavior) - { - var animation = compositor.CreateVector3KeyFrameAnimation(); - - animation.Duration = TimeSpan.FromMilliseconds(duration); - animation.DelayTime = TimeSpan.FromMilliseconds(delay); - if (from.HasValue) animation.InsertKeyFrame(0.0f, from.Value, easing); - animation.InsertKeyFrame(1.0f, to, easing); - animation.IterationBehavior = iterationBehavior; - - return animation; - } - - #endregion - - #region Xaml Storyboard - - public static void Animate(this DependencyObject target, double? from, double to, - string propertyPath, int duration = 400, int startTime = 0, - EasingFunctionBase easing = null, Action completed = null, bool enableDependentAnimation = false) - { - if (easing == null) - { - easing = new ExponentialEase(); - } - - var db = new DoubleAnimation - { - EnableDependentAnimation = enableDependentAnimation, - To = to, - From = from, - EasingFunction = easing, - Duration = TimeSpan.FromMilliseconds(duration) - }; - Storyboard.SetTarget(db, target); - Storyboard.SetTargetProperty(db, propertyPath); - - var sb = new Storyboard - { - BeginTime = TimeSpan.FromMilliseconds(startTime) - }; - - if (completed != null) - { - sb.Completed += (s, e) => - { - completed(); - }; - } - - sb.Children.Add(db); - sb.Begin(); - } - - #endregion -} diff --git a/Wino.Core.WinUI/Extensions/CompositionEnums.cs b/Wino.Core.WinUI/Extensions/CompositionEnums.cs deleted file mode 100644 index 06f1f169..00000000 --- a/Wino.Core.WinUI/Extensions/CompositionEnums.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Wino.Extensions; - -public enum TransitionDirection -{ - TopToBottom, - BottomToTop, - LeftToRight, - RightToLeft -} - -public enum ClipAnimationDirection -{ - Top, - Bottom, - Left, - Right -} - -public enum AnimationAxis -{ - X, - Y, - Z -} - -public enum AnimationType -{ - KeyFrame, - Expression -} - -public enum FlickDirection -{ - None, - Up, - Down, - Left, - Right -} - -public enum ViewState -{ - Empty, - Small, - Big, - Full -} - -public enum Gesture -{ - Initial, - Tap, - Swipe -} - -[Flags] -public enum VisualPropertyType -{ - None = 0, - Opacity = 1 << 0, - Offset = 1 << 1, - Scale = 1 << 2, - Size = 1 << 3, - RotationAngleInDegrees = 1 << 4, - All = ~0 -} diff --git a/Wino.Core.WinUI/Extensions/CompositionExtensions.Implicit.cs b/Wino.Core.WinUI/Extensions/CompositionExtensions.Implicit.cs deleted file mode 100644 index ce6ce24f..00000000 --- a/Wino.Core.WinUI/Extensions/CompositionExtensions.Implicit.cs +++ /dev/null @@ -1,195 +0,0 @@ -using System; -using System.Numerics; -using Microsoft.UI.Composition; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Hosting; - -namespace Wino.Extensions; - -public static partial class CompositionExtensions -{ - public static void EnableFluidVisibilityAnimation(this UIElement element, AnimationAxis? axis = null, - float showFromOffset = 0.0f, float hideToOffset = 0.0f, Vector3? centerPoint = null, - float showFromScale = 1.0f, float hideToScale = 1.0f, float showDuration = 800.0f, float hideDuration = 800.0f, - int showDelay = 0, int hideDelay = 0, bool animateOpacity = true) - { - var elementVisual = element.Visual(); - var compositor = elementVisual.Compositor; - ElementCompositionPreview.SetIsTranslationEnabled(element, true); - - ScalarKeyFrameAnimation hideOpacityAnimation = null; - ScalarKeyFrameAnimation showOpacityAnimation = null; - ScalarKeyFrameAnimation hideOffsetAnimation = null; - ScalarKeyFrameAnimation showOffsetAnimation = null; - Vector2KeyFrameAnimation hideScaleAnimation = null; - Vector2KeyFrameAnimation showeScaleAnimation = null; - - if (animateOpacity) - { - hideOpacityAnimation = compositor.CreateScalarKeyFrameAnimation(); - hideOpacityAnimation.InsertKeyFrame(1.0f, 0.0f); - hideOpacityAnimation.Duration = TimeSpan.FromMilliseconds(hideDuration); - hideOpacityAnimation.DelayTime = TimeSpan.FromMilliseconds(hideDelay); - hideOpacityAnimation.Target = "Opacity"; - } - - if (!hideToOffset.Equals(0.0f)) - { - hideOffsetAnimation = compositor.CreateScalarKeyFrameAnimation(); - hideOffsetAnimation.InsertKeyFrame(1.0f, hideToOffset); - hideOffsetAnimation.Duration = TimeSpan.FromMilliseconds(hideDuration); - hideOffsetAnimation.DelayTime = TimeSpan.FromMilliseconds(hideDelay); - hideOffsetAnimation.Target = $"Translation.{axis}"; - } - - if (centerPoint.HasValue) - { - elementVisual.CenterPoint = centerPoint.Value; - } - - if (!hideToScale.Equals(1.0f)) - { - hideScaleAnimation = compositor.CreateVector2KeyFrameAnimation(); - hideScaleAnimation.InsertKeyFrame(1.0f, new Vector2(hideToScale)); - hideScaleAnimation.Duration = TimeSpan.FromMilliseconds(hideDuration); - hideScaleAnimation.DelayTime = TimeSpan.FromMilliseconds(hideDelay); - hideScaleAnimation.Target = "Scale.XY"; - } - - var hideAnimationGroup = compositor.CreateAnimationGroup(); - if (hideOpacityAnimation != null) - { - hideAnimationGroup.Add(hideOpacityAnimation); - } - if (hideOffsetAnimation != null) - { - hideAnimationGroup.Add(hideOffsetAnimation); - } - if (hideScaleAnimation != null) - { - hideAnimationGroup.Add(hideScaleAnimation); - } - - ElementCompositionPreview.SetImplicitHideAnimation(element, hideAnimationGroup); - - if (animateOpacity) - { - showOpacityAnimation = compositor.CreateScalarKeyFrameAnimation(); - showOpacityAnimation.InsertKeyFrame(1.0f, 1.0f); - showOpacityAnimation.Duration = TimeSpan.FromMilliseconds(showDuration); - showOpacityAnimation.DelayTime = TimeSpan.FromMilliseconds(showDelay); - showOpacityAnimation.Target = "Opacity"; - } - - if (!showFromOffset.Equals(0.0f)) - { - showOffsetAnimation = compositor.CreateScalarKeyFrameAnimation(); - showOffsetAnimation.InsertKeyFrame(0.0f, showFromOffset); - showOffsetAnimation.InsertKeyFrame(1.0f, 0.0f); - showOffsetAnimation.Duration = TimeSpan.FromMilliseconds(showDuration); - showOffsetAnimation.DelayTime = TimeSpan.FromMilliseconds(showDelay); - showOffsetAnimation.Target = $"Translation.{axis}"; - } - - if (!showFromScale.Equals(1.0f)) - { - showeScaleAnimation = compositor.CreateVector2KeyFrameAnimation(); - showeScaleAnimation.InsertKeyFrame(0.0f, new Vector2(showFromScale)); - showeScaleAnimation.InsertKeyFrame(1.0f, Vector2.One); - showeScaleAnimation.Duration = TimeSpan.FromMilliseconds(showDuration); - showeScaleAnimation.DelayTime = TimeSpan.FromMilliseconds(showDelay); - showeScaleAnimation.Target = "Scale.XY"; - } - - var showAnimationGroup = compositor.CreateAnimationGroup(); - if (showOpacityAnimation != null) - { - showAnimationGroup.Add(showOpacityAnimation); - } - if (showOffsetAnimation != null) - { - showAnimationGroup.Add(showOffsetAnimation); - } - if (showeScaleAnimation != null) - { - showAnimationGroup.Add(showeScaleAnimation); - } - - ElementCompositionPreview.SetImplicitShowAnimation(element, showAnimationGroup); - } - - public static void EnableImplicitAnimation(this UIElement element, VisualPropertyType typeToAnimate, - double duration = 800, double delay = 0, CompositionEasingFunction easing = null) - { - var visual = element.Visual(); - var compositor = visual.Compositor; - - var animationCollection = compositor.CreateImplicitAnimationCollection(); - - foreach (var type in UtilExtensions.GetValues()) - { - if (!typeToAnimate.HasFlag(type)) continue; - - var animation = CreateAnimationByType(compositor, type, duration, delay, easing); - - if (animation != null) - { - animationCollection[type.ToString()] = animation; - } - } - - visual.ImplicitAnimations = animationCollection; - } - - public static void EnableImplicitAnimation(this Visual visual, VisualPropertyType typeToAnimate, - double duration = 800, double delay = 0, CompositionEasingFunction easing = null) - { - var compositor = visual.Compositor; - - var animationCollection = compositor.CreateImplicitAnimationCollection(); - - foreach (var type in UtilExtensions.GetValues()) - { - if (!typeToAnimate.HasFlag(type)) continue; - - var animation = CreateAnimationByType(compositor, type, duration, delay, easing); - - if (animation != null) - { - animationCollection[type.ToString()] = animation; - } - } - - visual.ImplicitAnimations = animationCollection; - } - - private static KeyFrameAnimation CreateAnimationByType(Compositor compositor, VisualPropertyType type, - double duration = 800, double delay = 0, CompositionEasingFunction easing = null) - { - KeyFrameAnimation animation; - - switch (type) - { - case VisualPropertyType.Offset: - case VisualPropertyType.Scale: - animation = compositor.CreateVector3KeyFrameAnimation(); - break; - case VisualPropertyType.Size: - animation = compositor.CreateVector2KeyFrameAnimation(); - break; - case VisualPropertyType.Opacity: - case VisualPropertyType.RotationAngleInDegrees: - animation = compositor.CreateScalarKeyFrameAnimation(); - break; - default: - return null; - } - - animation.InsertExpressionKeyFrame(1.0f, "this.FinalValue", easing); - animation.Duration = TimeSpan.FromMilliseconds(duration); - animation.DelayTime = TimeSpan.FromMilliseconds(delay); - animation.Target = type.ToString(); - - return animation; - } -} diff --git a/Wino.Core.WinUI/Extensions/ElementThemeExtensions.cs b/Wino.Core.WinUI/Extensions/ElementThemeExtensions.cs deleted file mode 100644 index 9b60b871..00000000 --- a/Wino.Core.WinUI/Extensions/ElementThemeExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.UI.Xaml; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.WinUI.Extensions; - -public static class ElementThemeExtensions -{ - public static ApplicationElementTheme ToWinoElementTheme(this ElementTheme elementTheme) - { - switch (elementTheme) - { - case ElementTheme.Light: - return ApplicationElementTheme.Light; - case ElementTheme.Dark: - return ApplicationElementTheme.Dark; - } - - return ApplicationElementTheme.Default; - } - - public static ElementTheme ToWindowsElementTheme(this ApplicationElementTheme elementTheme) - { - switch (elementTheme) - { - case ApplicationElementTheme.Light: - return ElementTheme.Light; - case ApplicationElementTheme.Dark: - return ElementTheme.Dark; - } - - return ElementTheme.Default; - } -} diff --git a/Wino.Core.WinUI/Extensions/PrintSettingsExtensions.cs b/Wino.Core.WinUI/Extensions/PrintSettingsExtensions.cs deleted file mode 100644 index 33a50ec1..00000000 --- a/Wino.Core.WinUI/Extensions/PrintSettingsExtensions.cs +++ /dev/null @@ -1,212 +0,0 @@ -using Microsoft.Web.WebView2.Core; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Printing; - -namespace Wino.Core.WinUI.Extensions; - -/// -/// Extension methods and utilities for converting between Domain print models and CoreWebView2 print settings. -/// -public static class PrintSettingsExtensions -{ - /// - /// Converts a Domain PrintOrientation to CoreWebView2PrintOrientation. - /// - public static CoreWebView2PrintOrientation ToCoreWebView2Orientation(this PrintOrientation orientation) - { - return orientation switch - { - PrintOrientation.Portrait => CoreWebView2PrintOrientation.Portrait, - PrintOrientation.Landscape => CoreWebView2PrintOrientation.Landscape, - _ => CoreWebView2PrintOrientation.Portrait - }; - } - - /// - /// Converts a CoreWebView2PrintOrientation to Domain PrintOrientation. - /// - public static PrintOrientation ToDomainOrientation(this CoreWebView2PrintOrientation orientation) - { - return orientation switch - { - CoreWebView2PrintOrientation.Portrait => PrintOrientation.Portrait, - CoreWebView2PrintOrientation.Landscape => PrintOrientation.Landscape, - _ => PrintOrientation.Portrait - }; - } - - /// - /// Converts a Domain PrintColorMode to CoreWebView2PrintColorMode. - /// - public static CoreWebView2PrintColorMode ToCoreWebView2ColorMode(this PrintColorMode colorMode) - { - return colorMode switch - { - PrintColorMode.Default => CoreWebView2PrintColorMode.Default, - PrintColorMode.Color => CoreWebView2PrintColorMode.Color, - PrintColorMode.Grayscale => CoreWebView2PrintColorMode.Grayscale, - _ => CoreWebView2PrintColorMode.Default - }; - } - - /// - /// Converts a CoreWebView2PrintColorMode to Domain PrintColorMode. - /// - public static PrintColorMode ToDomainColorMode(this CoreWebView2PrintColorMode colorMode) - { - return colorMode switch - { - CoreWebView2PrintColorMode.Default => PrintColorMode.Default, - CoreWebView2PrintColorMode.Color => PrintColorMode.Color, - CoreWebView2PrintColorMode.Grayscale => PrintColorMode.Grayscale, - _ => PrintColorMode.Default - }; - } - - /// - /// Converts a Domain PrintCollation to CoreWebView2PrintCollation. - /// - public static CoreWebView2PrintCollation ToCoreWebView2Collation(this PrintCollation collation) - { - return collation switch - { - PrintCollation.Default => CoreWebView2PrintCollation.Default, - PrintCollation.Collated => CoreWebView2PrintCollation.Collated, - PrintCollation.Uncollated => CoreWebView2PrintCollation.Uncollated, - _ => CoreWebView2PrintCollation.Default - }; - } - - /// - /// Converts a CoreWebView2PrintCollation to Domain PrintCollation. - /// - public static PrintCollation ToDomainCollation(this CoreWebView2PrintCollation collation) - { - return collation switch - { - CoreWebView2PrintCollation.Default => PrintCollation.Default, - CoreWebView2PrintCollation.Collated => PrintCollation.Collated, - CoreWebView2PrintCollation.Uncollated => PrintCollation.Uncollated, - _ => PrintCollation.Default - }; - } - - /// - /// Converts a Domain PrintDuplex to CoreWebView2PrintDuplex. - /// - public static CoreWebView2PrintDuplex ToCoreWebView2Duplex(this PrintDuplex duplex) - { - // Note: Simplified mapping due to enum value differences - return duplex switch - { - PrintDuplex.Default => CoreWebView2PrintDuplex.Default, - _ => CoreWebView2PrintDuplex.Default - }; - } - - /// - /// Converts a CoreWebView2PrintDuplex to Domain PrintDuplex. - /// - public static PrintDuplex ToDomainDuplex(this CoreWebView2PrintDuplex duplex) - { - // Note: Simplified mapping due to enum value differences - return duplex switch - { - CoreWebView2PrintDuplex.Default => PrintDuplex.Default, - _ => PrintDuplex.Default - }; - } - - /// - /// Converts a Domain PrintMediaSize to CoreWebView2PrintMediaSize. - /// - public static CoreWebView2PrintMediaSize ToCoreWebView2MediaSize(this PrintMediaSize mediaSize) - { - // Note: Simplified mapping due to enum value differences - return mediaSize switch - { - PrintMediaSize.Default => CoreWebView2PrintMediaSize.Default, - _ => CoreWebView2PrintMediaSize.Default - }; - } - - /// - /// Converts a CoreWebView2PrintMediaSize to Domain PrintMediaSize. - /// - public static PrintMediaSize ToDomainMediaSize(this CoreWebView2PrintMediaSize mediaSize) - { - // Note: Simplified mapping due to enum value differences - return mediaSize switch - { - CoreWebView2PrintMediaSize.Default => PrintMediaSize.Default, - _ => PrintMediaSize.Default - }; - } - - /// - /// Creates a CoreWebView2PrintSettings object from a WebView2PrintSettingsModel. - /// - /// The domain model containing the print settings. - /// The CoreWebView2Environment to create the settings object. - /// A configured CoreWebView2PrintSettings object. - public static CoreWebView2PrintSettings ToCoreWebView2PrintSettings( - this WebView2PrintSettingsModel model, - CoreWebView2Environment environment) - { - var settings = environment.CreatePrintSettings(); - - settings.PrinterName = model.PrinterName; - settings.Orientation = model.Orientation.ToCoreWebView2Orientation(); - settings.ColorMode = model.ColorMode.ToCoreWebView2ColorMode(); - settings.Collation = model.Collation.ToCoreWebView2Collation(); - settings.Duplex = model.Duplex.ToCoreWebView2Duplex(); - settings.MediaSize = model.MediaSize.ToCoreWebView2MediaSize(); - settings.Copies = model.Copies; - settings.MarginTop = model.MarginTop; - settings.MarginBottom = model.MarginBottom; - settings.MarginLeft = model.MarginLeft; - settings.MarginRight = model.MarginRight; - settings.ShouldPrintBackgrounds = model.ShouldPrintBackgrounds; - settings.ShouldPrintSelectionOnly = model.ShouldPrintSelectionOnly; - settings.ShouldPrintHeaderAndFooter = model.ShouldPrintHeaderAndFooter; - settings.HeaderTitle = model.HeaderTitle; - settings.FooterUri = model.FooterUri; - settings.ScaleFactor = model.ScaleFactor; - settings.PagesPerSide = model.PagesPerSide; - settings.PageRanges = model.PageRanges; - - return settings; - } - - /// - /// Updates a WebView2PrintSettingsModel from a CoreWebView2PrintSettings object. - /// - /// The domain model to update. - /// The source CoreWebView2PrintSettings. - public static void FromCoreWebView2PrintSettings( - this WebView2PrintSettingsModel model, - CoreWebView2PrintSettings settings) - { - if (settings == null) return; - - model.PrinterName = settings.PrinterName ?? string.Empty; - model.Orientation = settings.Orientation.ToDomainOrientation(); - model.ColorMode = settings.ColorMode.ToDomainColorMode(); - model.Collation = settings.Collation.ToDomainCollation(); - model.Duplex = settings.Duplex.ToDomainDuplex(); - model.MediaSize = settings.MediaSize.ToDomainMediaSize(); - model.Copies = settings.Copies; - model.MarginTop = settings.MarginTop; - model.MarginBottom = settings.MarginBottom; - model.MarginLeft = settings.MarginLeft; - model.MarginRight = settings.MarginRight; - model.ShouldPrintBackgrounds = settings.ShouldPrintBackgrounds; - model.ShouldPrintSelectionOnly = settings.ShouldPrintSelectionOnly; - model.ShouldPrintHeaderAndFooter = settings.ShouldPrintHeaderAndFooter; - model.HeaderTitle = settings.HeaderTitle ?? string.Empty; - model.FooterUri = settings.FooterUri ?? string.Empty; - model.ScaleFactor = settings.ScaleFactor; - model.PagesPerSide = settings.PagesPerSide; - model.PageRanges = settings.PageRanges ?? string.Empty; - } -} \ No newline at end of file diff --git a/Wino.Core.WinUI/Extensions/StartupTaskStateExtensions.cs b/Wino.Core.WinUI/Extensions/StartupTaskStateExtensions.cs deleted file mode 100644 index cbfc11cf..00000000 --- a/Wino.Core.WinUI/Extensions/StartupTaskStateExtensions.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Windows.ApplicationModel; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.WinUI.Extensions; - -public static class StartupTaskStateExtensions -{ - public static StartupBehaviorResult AsStartupBehaviorResult(this StartupTaskState state) - { - switch (state) - { - case StartupTaskState.Disabled: - case StartupTaskState.DisabledByPolicy: - return StartupBehaviorResult.Disabled; - case StartupTaskState.DisabledByUser: - return StartupBehaviorResult.DisabledByUser; - case StartupTaskState.Enabled: - case StartupTaskState.EnabledByPolicy: - return StartupBehaviorResult.Enabled; - default: - return StartupBehaviorResult.Fatal; - } - } -} diff --git a/Wino.Core.WinUI/Extensions/StorageFileExtensions.cs b/Wino.Core.WinUI/Extensions/StorageFileExtensions.cs deleted file mode 100644 index 4e1813ea..00000000 --- a/Wino.Core.WinUI/Extensions/StorageFileExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; -using Windows.Storage; -using Wino.Core.Domain.Models.Common; - -namespace Wino.Core.WinUI.Extensions; - -public static class StorageFileExtensions -{ - public static async Task ToSharedFileAsync(this Windows.Storage.StorageFile storageFile) - { - var content = await storageFile.ToByteArrayAsync(); - - return new SharedFile(storageFile.Path, content); - } - - public static async Task ToByteArrayAsync(this StorageFile file) - { - if (file == null) - throw new ArgumentNullException(nameof(file)); - - using (var stream = await file.OpenReadAsync()) - using (var memoryStream = new MemoryStream()) - { - await stream.AsStreamForRead().CopyToAsync(memoryStream); - return memoryStream.ToArray(); - } - } -} diff --git a/Wino.Core.WinUI/Extensions/UIExtensions.cs b/Wino.Core.WinUI/Extensions/UIExtensions.cs deleted file mode 100644 index 698b654a..00000000 --- a/Wino.Core.WinUI/Extensions/UIExtensions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.UI.Xaml.Controls; -using Wino.Core.Domain.Enums; - -namespace Wino.Extensions; - -public static class UIExtensions -{ - public static InfoBarSeverity AsMUXCInfoBarSeverity(this InfoBarMessageType messageType) - { - return messageType switch - { - InfoBarMessageType.Error => InfoBarSeverity.Error, - InfoBarMessageType.Warning => InfoBarSeverity.Warning, - InfoBarMessageType.Information => InfoBarSeverity.Informational, - InfoBarMessageType.Success => InfoBarSeverity.Success, - _ => InfoBarSeverity.Informational - }; - } -} diff --git a/Wino.Core.WinUI/Extensions/UtilExtensions.cs b/Wino.Core.WinUI/Extensions/UtilExtensions.cs deleted file mode 100644 index 5e1f280f..00000000 --- a/Wino.Core.WinUI/Extensions/UtilExtensions.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.UI.Composition; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Hosting; -using Microsoft.UI.Xaml.Media; -using Windows.Foundation; - -namespace Wino.Extensions; - -public static class UtilExtensions -{ - public static float ToFloat(this double value) => (float)value; - - public static List Children(this DependencyObject parent) - { - var list = new List(); - - for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++) - { - var child = VisualTreeHelper.GetChild(parent, i); - - if (child is FrameworkElement) - { - list.Add(child as FrameworkElement); - } - - list.AddRange(Children(child)); - } - - return list; - } - - public static T GetChildByName(this DependencyObject parent, string name) - { - var childControls = Children(parent); - var controls = childControls.OfType(); - - if (controls == null) - { - return default(T); - } - - var control = controls - .Where(x => x.Name.Equals(name)) - .Cast() - .First(); - - return control; - } - - public static Visual Visual(this UIElement element) => - ElementCompositionPreview.GetElementVisual(element); - - public static void SetChildVisual(this UIElement element, Visual childVisual) => - ElementCompositionPreview.SetElementChildVisual(element, childVisual); - - public static Point RelativePosition(this UIElement element, UIElement other) => - element.TransformToVisual(other).TransformPoint(new Point(0, 0)); - - public static bool IsFullyVisibile(this FrameworkElement element, FrameworkElement parent) - { - if (element == null || parent == null) - return false; - - if (element.Visibility != Visibility.Visible) - return false; - - var elementBounds = element.TransformToVisual(parent).TransformBounds(new Windows.Foundation.Rect(0, 0, element.ActualWidth, element.ActualHeight)); - var containerBounds = new Windows.Foundation.Rect(0, 0, parent.ActualWidth, parent.ActualHeight); - - var originalElementWidth = elementBounds.Width; - var originalElementHeight = elementBounds.Height; - - elementBounds.Intersect(containerBounds); - - var newElementWidth = elementBounds.Width; - var newElementHeight = elementBounds.Height; - - return originalElementWidth.Equals(newElementWidth) && originalElementHeight.Equals(newElementHeight); - } - - public static void ScrollToElement(this ScrollViewer scrollViewer, FrameworkElement element, - bool isVerticalScrolling = true, bool smoothScrolling = true, float? zoomFactor = null, bool bringToTopOrLeft = true, bool addMargin = true) - { - if (!bringToTopOrLeft && element.IsFullyVisibile(scrollViewer)) - return; - - var contentArea = (FrameworkElement)scrollViewer.Content; - var position = element.RelativePosition(contentArea); - - if (isVerticalScrolling) - { - // Accomodate for additional header. - scrollViewer.ChangeView(null, Math.Max(0, position.Y - (addMargin ? 48 : 0)), zoomFactor, !smoothScrolling); - } - else - { - scrollViewer.ChangeView(position.X, null, zoomFactor, !smoothScrolling); - } - } - - - public static T[] GetValues() where T : struct, Enum => Enum.GetValues(); -} diff --git a/Wino.Core.WinUI/Extensions/WebViewExtensions.cs b/Wino.Core.WinUI/Extensions/WebViewExtensions.cs deleted file mode 100644 index 7695412d..00000000 --- a/Wino.Core.WinUI/Extensions/WebViewExtensions.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Threading.Tasks; - -namespace Wino.Core.WinUI.Extensions; - -public static class WebViewExtensions -{ - /// - /// Executes a script function in the WebView2 control. - /// - /// Weird parameter that needed in mailRendering page. TODO: should be reconsidered. - /// Parameters should be serialized to json - public static async Task ExecuteScriptFunctionAsync(this Microsoft.UI.Xaml.Controls.WebView2 Chromium, string functionName, bool isChromiumDisposed = false, params string[] parameters) - { - string script = functionName + "(" + string.Join(", ", parameters) + ");"; - - return isChromiumDisposed ? string.Empty : await Chromium.ExecuteScriptAsync(script); - } - - public static async Task ExecuteScriptFunctionSafeAsync(this Microsoft.UI.Xaml.Controls.WebView2 Chromium, string functionName, params string[] parameters) - { - if (Chromium == null) return string.Empty; - - try - { - return await Chromium.ExecuteScriptFunctionAsync(functionName, parameters: parameters); - } - catch { } - - return string.Empty; - } - - public static async Task ExecuteScriptSafeAsync(this Microsoft.UI.Xaml.Controls.WebView2 Chromium, string script) - { - if (Chromium == null) return string.Empty; - - try - { - return await Chromium.ExecuteScriptAsync(script); - } - catch { } - - return string.Empty; - } -} diff --git a/Wino.Core.WinUI/Helpers/WinoVisualTreeHelper.cs b/Wino.Core.WinUI/Helpers/WinoVisualTreeHelper.cs deleted file mode 100644 index 39c96cd7..00000000 --- a/Wino.Core.WinUI/Helpers/WinoVisualTreeHelper.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Collections.Generic; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; - -namespace Wino.Helpers; - -public static class WinoVisualTreeHelper -{ - public static T GetChildObject(DependencyObject obj, string name) where T : FrameworkElement - { - DependencyObject child = null; - T grandChild = null; - - for (int i = 0; i <= VisualTreeHelper.GetChildrenCount(obj) - 1; i++) - { - child = VisualTreeHelper.GetChild(obj, i); - - if (child is T && (((T)child).Name == name | string.IsNullOrEmpty(name))) - { - return (T)child; - } - else - { - grandChild = GetChildObject(child, name); - } - if (grandChild != null) - { - return grandChild; - } - } - return null; - } - - public static IEnumerable FindDescendants(this DependencyObject depObj) where T : DependencyObject - { - if (depObj != null) - { - for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++) - { - var child = VisualTreeHelper.GetChild(depObj, i); - if (child != null && child is T) - { - yield return (T)child; - } - - foreach (T childOfChild in FindDescendants(child)) - { - yield return childOfChild; - } - } - } - } -} diff --git a/Wino.Core.WinUI/Helpers/XamlHelpers.cs b/Wino.Core.WinUI/Helpers/XamlHelpers.cs deleted file mode 100644 index 24730be7..00000000 --- a/Wino.Core.WinUI/Helpers/XamlHelpers.cs +++ /dev/null @@ -1,389 +0,0 @@ -using System; -using System.Globalization; -using System.IO; -using System.Linq; -using CommunityToolkit.WinUI.Helpers; -using Microsoft.UI; -using Microsoft.UI.Text; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Controls.Primitives; -using Microsoft.UI.Xaml.Markup; -using Microsoft.UI.Xaml.Media; -using Windows.UI; -using Windows.UI.Text; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities.Mail; -using Wino.Core.Domain.Entities.Shared; -using Wino.Core.Domain.Enums; -using Wino.Core.WinUI.Controls; - -namespace Wino.Helpers; - -public static class XamlHelpers -{ - private const string TwentyFourHourTimeFormat = "HH:mm"; - private const string TwelveHourTimeFormat = "hh:mm tt"; - - #region Converters - - public static Thickness GetMailItemControlMargin(bool isDisplayedInThread) => isDisplayedInThread ? new Thickness(40, 0, 6, 0) : new Thickness(6, 0, 6, 0); - public static bool IsMultiple(int count) => count > 1; - public static bool ReverseIsMultiple(int count) => count < 1; - public static PopupPlacementMode GetPlaccementModeForCalendarType(CalendarDisplayType type) - { - return type switch - { - CalendarDisplayType.Week => PopupPlacementMode.Right, - _ => PopupPlacementMode.Bottom, - }; - } - - public static Visibility ReverseBoolToVisibilityConverter(bool value) => value ? Visibility.Collapsed : Visibility.Visible; - public static Visibility ReverseVisibilityConverter(Visibility visibility) => visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; - public static bool ReverseBoolConverter(bool value) => !value; - public static bool ShouldDisplayPreview(string text) => text == null ? false : text.Any(x => char.IsLetter(x)); - public static bool CountToBooleanConverter(int value) => value > 0; - public static bool ObjectEquals(object obj1, object obj2) => object.Equals(obj1, obj2); - public static Visibility CountToVisibilityConverter(int value) => value > 0 ? Visibility.Visible : Visibility.Collapsed; - public static Visibility CountToVisibilityConverterWithThreshold(int value, int threshold) => value > threshold ? Visibility.Visible : Visibility.Collapsed; - public static ListViewSelectionMode BoolToSelectionMode(bool isSelectionMode) => isSelectionMode ? ListViewSelectionMode.Multiple : ListViewSelectionMode.None; - public static string BoolToSelectionModeText(bool isSelectionMode) => isSelectionMode ? Translator.Buttons_Cancel : Translator.Buttons_Multiselect; - - public static Microsoft.UI.Xaml.Media.Imaging.BitmapImage Base64ToBitmapImage(string base64String) - { - if (string.IsNullOrEmpty(base64String)) - return null; - - try - { - var imageBytes = Convert.FromBase64String(base64String); - using var stream = new System.IO.MemoryStream(imageBytes); - var bitmap = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(); - bitmap.SetSource(stream.AsRandomAccessStream()); - return bitmap; - } - catch - { - return null; - } - } - public static InfoBarSeverity InfoBarSeverityConverter(InfoBarMessageType messageType) - { - return messageType switch - { - InfoBarMessageType.Information => InfoBarSeverity.Informational, - InfoBarMessageType.Success => InfoBarSeverity.Success, - InfoBarMessageType.Warning => InfoBarSeverity.Warning, - InfoBarMessageType.Error => InfoBarSeverity.Error, - _ => InfoBarSeverity.Informational, - }; - } - - public static SolidColorBrush GetReadableTextColor(string backgroundColor) - { - if (!backgroundColor.StartsWith("#")) throw new ArgumentException("Hex color must start with #."); - - backgroundColor = backgroundColor.TrimStart('#'); - - if (backgroundColor.Length == 6) - { - var r = int.Parse(backgroundColor.Substring(0, 2), NumberStyles.HexNumber); - var g = int.Parse(backgroundColor.Substring(2, 2), NumberStyles.HexNumber); - var b = int.Parse(backgroundColor.Substring(4, 2), NumberStyles.HexNumber); - - // Calculate relative luminance - double luminance = (0.2126 * GetLinearValue(r)) + - (0.7152 * GetLinearValue(g)) + - (0.0722 * GetLinearValue(b)); - - return luminance > 0.5 ? new SolidColorBrush(Colors.Black) : new SolidColorBrush(Colors.White); - } - else - { - throw new ArgumentException("Hex color must be 6 characters long (e.g., #RRGGBB)."); - } - } - - private static double GetLinearValue(int colorComponent) - { - double sRGB = colorComponent / 255.0; - return sRGB <= 0.03928 ? sRGB / 12.92 : Math.Pow((sRGB + 0.055) / 1.055, 2.4); - } - - public static Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode NavigationViewDisplayModeConverter(SplitViewDisplayMode splitViewDisplayMode) - { - return splitViewDisplayMode switch - { - SplitViewDisplayMode.CompactOverlay => Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Compact, - SplitViewDisplayMode.CompactInline => Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Minimal, - SplitViewDisplayMode.Overlay => Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Expanded, - SplitViewDisplayMode.Inline => Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Expanded, - _ => Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Minimal, - }; - } - - public static string GetColorFromHex(Color color) => color.ToHex(); - public static Color GetWindowsColorFromHex(string hex) => hex.ToColor(); - - public static SolidColorBrush GetSolidColorBrushFromHex(string colorHex) => string.IsNullOrEmpty(colorHex) ? new SolidColorBrush(Colors.Transparent) : new SolidColorBrush(colorHex.ToColor()); - public static FontWeight GetFontWeightBySyncState(bool isSyncing) => isSyncing ? FontWeights.SemiBold : FontWeights.Normal; - public static FontWeight GetFontWeightByChildSelectedState(bool isChildSelected) => isChildSelected ? FontWeights.SemiBold : FontWeights.Normal; - public static FontWeight GetFontWeightByReadState(bool isChildSelected) => isChildSelected ? FontWeights.Normal : FontWeights.SemiBold; - public static Visibility StringToVisibilityConverter(string value) => string.IsNullOrWhiteSpace(value) ? Visibility.Collapsed : Visibility.Visible; - public static Visibility StringToVisibilityReversedConverter(string value) => string.IsNullOrWhiteSpace(value) ? Visibility.Visible : Visibility.Collapsed; - public static string GetMailItemDisplaySummaryForListing(bool isDraft, DateTime receivedDate, bool prefer24HourTime) - { - if (isDraft) - return Translator.Draft; - else - { - var localTime = receivedDate.ToLocalTime(); - - return prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat); - } - } - public static string GetCreationDateString(DateTime date, bool prefer24HourTime) - { - var localTime = date.ToLocalTime(); - return $"{localTime.ToString("D", CultureInfo.DefaultThreadCurrentUICulture)} {(prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat))}"; - } - public static string GetMailGroupDateString(object groupObject) - { - if (groupObject is string stringObject) - return stringObject; - - object dateObject = null; - - // From regular mail header template - if (groupObject is DateTime groupedDate) - dateObject = groupedDate; - else if (groupObject is IGrouping groupKey) - { - // From semantic group header. - dateObject = groupKey.Key; - } - - if (dateObject != null) - { - if (dateObject is DateTime dateTimeValue) - { - if (dateTimeValue == DateTime.Today) - return Translator.Today; - else if (dateTimeValue == DateTime.Today.AddDays(-1)) - return Translator.Yesterday; - else - { - return dateTimeValue.ToString("D", CultureInfo.DefaultThreadCurrentUICulture); - } - - } - else - return dateObject.ToString(); - } - - return Translator.UnknownDateHeader; - } - - - #endregion - - #region Wino Font Icon Transformation - - public static WinoIconGlyph GetWinoIconGlyph(FilterOptionType type) => type switch - { - FilterOptionType.All => WinoIconGlyph.Mail, - FilterOptionType.Unread => WinoIconGlyph.MarkUnread, - FilterOptionType.Flagged => WinoIconGlyph.Flag, - FilterOptionType.Mentions => WinoIconGlyph.NewMail, - FilterOptionType.Files => WinoIconGlyph.Attachment, - _ => WinoIconGlyph.None, - }; - - public static WinoIconGlyph GetWinoIconGlyph(SortingOptionType type) => type switch - { - SortingOptionType.Sender => WinoIconGlyph.SortTextDesc, - SortingOptionType.ReceiveDate => WinoIconGlyph.SortLinesDesc, - _ => WinoIconGlyph.None, - }; - - public static WinoIconGlyph GetWinoIconGlyph(MailOperation operation) - { - return operation switch - { - MailOperation.None => WinoIconGlyph.None, - MailOperation.Archive => WinoIconGlyph.Archive, - MailOperation.UnArchive => WinoIconGlyph.UnArchive, - MailOperation.SoftDelete => WinoIconGlyph.Delete, - MailOperation.HardDelete => WinoIconGlyph.Delete, - MailOperation.Move => WinoIconGlyph.Forward, - MailOperation.MoveToJunk => WinoIconGlyph.Blocked, - MailOperation.MoveToFocused => WinoIconGlyph.None, - MailOperation.MoveToOther => WinoIconGlyph.None, - MailOperation.AlwaysMoveToOther => WinoIconGlyph.None, - MailOperation.AlwaysMoveToFocused => WinoIconGlyph.None, - MailOperation.SetFlag => WinoIconGlyph.Flag, - MailOperation.ClearFlag => WinoIconGlyph.ClearFlag, - MailOperation.MarkAsRead => WinoIconGlyph.MarkRead, - MailOperation.MarkAsUnread => WinoIconGlyph.MarkUnread, - MailOperation.MarkAsNotJunk => WinoIconGlyph.Blocked, - MailOperation.Ignore => WinoIconGlyph.Ignore, - MailOperation.Reply => WinoIconGlyph.Reply, - MailOperation.ReplyAll => WinoIconGlyph.ReplyAll, - MailOperation.Zoom => WinoIconGlyph.Zoom, - MailOperation.SaveAs => WinoIconGlyph.Save, - MailOperation.Print => WinoIconGlyph.Print, - MailOperation.Find => WinoIconGlyph.Find, - MailOperation.Forward => WinoIconGlyph.Forward, - MailOperation.DarkEditor => WinoIconGlyph.DarkEditor, - MailOperation.LightEditor => WinoIconGlyph.LightEditor, - MailOperation.ViewMessageSource => WinoIconGlyph.ViewMessageSource, - _ => WinoIconGlyph.None, - }; - } - - public static WinoIconGlyph GetPathGeometry(FolderOperation operation) - { - return operation switch - { - FolderOperation.None => WinoIconGlyph.None, - FolderOperation.Pin => WinoIconGlyph.Pin, - FolderOperation.Unpin => WinoIconGlyph.UnPin, - FolderOperation.MarkAllAsRead => WinoIconGlyph.MarkRead, - FolderOperation.DontSync => WinoIconGlyph.DontSync, - FolderOperation.Empty => WinoIconGlyph.EmptyFolder, - FolderOperation.Rename => WinoIconGlyph.Rename, - FolderOperation.Delete => WinoIconGlyph.Delete, - FolderOperation.Move => WinoIconGlyph.Forward, - FolderOperation.TurnOffNotifications => WinoIconGlyph.TurnOfNotifications, - FolderOperation.CreateSubFolder => WinoIconGlyph.CreateFolder, - _ => WinoIconGlyph.None, - }; - } - - public static WinoIconGlyph GetSpecialFolderPathIconGeometry(SpecialFolderType specialFolderType) - { - return specialFolderType switch - { - SpecialFolderType.Inbox => WinoIconGlyph.SpecialFolderInbox, - SpecialFolderType.Starred => WinoIconGlyph.SpecialFolderStarred, - SpecialFolderType.Important => WinoIconGlyph.SpecialFolderImportant, - SpecialFolderType.Sent => WinoIconGlyph.SpecialFolderSent, - SpecialFolderType.Draft => WinoIconGlyph.SpecialFolderDraft, - SpecialFolderType.Archive => WinoIconGlyph.SpecialFolderArchive, - SpecialFolderType.Deleted => WinoIconGlyph.SpecialFolderDeleted, - SpecialFolderType.Junk => WinoIconGlyph.SpecialFolderJunk, - SpecialFolderType.Chat => WinoIconGlyph.SpecialFolderChat, - SpecialFolderType.Category => WinoIconGlyph.SpecialFolderCategory, - SpecialFolderType.Unread => WinoIconGlyph.SpecialFolderUnread, - SpecialFolderType.Forums => WinoIconGlyph.SpecialFolderForums, - SpecialFolderType.Updates => WinoIconGlyph.SpecialFolderUpdated, - SpecialFolderType.Personal => WinoIconGlyph.SpecialFolderPersonal, - SpecialFolderType.Promotions => WinoIconGlyph.SpecialFolderPromotions, - SpecialFolderType.Social => WinoIconGlyph.SpecialFolderSocial, - SpecialFolderType.Other => WinoIconGlyph.SpecialFolderOther, - SpecialFolderType.More => WinoIconGlyph.SpecialFolderMore, - _ => WinoIconGlyph.None, - }; - } - - - public static WinoIconGlyph GetProviderIcon(MailProviderType providerType, SpecialImapProvider specialImapProvider) - { - if (specialImapProvider == SpecialImapProvider.None) - { - return providerType switch - { - MailProviderType.Outlook => WinoIconGlyph.Microsoft, - MailProviderType.Gmail => WinoIconGlyph.Google, - MailProviderType.IMAP4 => WinoIconGlyph.IMAP, - _ => WinoIconGlyph.None, - }; - } - else - { - return specialImapProvider switch - { - SpecialImapProvider.iCloud => WinoIconGlyph.Apple, - SpecialImapProvider.Yahoo => WinoIconGlyph.Yahoo, - _ => WinoIconGlyph.None, - }; - } - } - public static WinoIconGlyph GetProviderIcon(MailAccount account) - => GetProviderIcon(account.ProviderType, account.SpecialImapProvider); - - public static Geometry GetPathGeometry(string pathMarkup) - { - string xaml = - "" + - "" + pathMarkup + ""; - var path = XamlReader.Load(xaml) as Microsoft.UI.Xaml.Shapes.Path; - - Geometry geometry = path.Data; - path.Data = null; - return geometry; - } - - #endregion - - #region Internationalization - - public static string GetOperationString(MailOperation operation) - { - return operation switch - { - MailOperation.None => "unknown", - MailOperation.Archive => Translator.MailOperation_Archive, - MailOperation.UnArchive => Translator.MailOperation_Unarchive, - MailOperation.SoftDelete => Translator.MailOperation_Delete, - MailOperation.HardDelete => Translator.MailOperation_Delete, - MailOperation.Move => Translator.MailOperation_Move, - MailOperation.MoveToJunk => Translator.MailOperation_MoveJunk, - MailOperation.MoveToFocused => Translator.MailOperation_MoveFocused, - MailOperation.MoveToOther => Translator.MailOperation_MoveOther, - MailOperation.AlwaysMoveToOther => Translator.MailOperation_AlwaysMoveOther, - MailOperation.AlwaysMoveToFocused => Translator.MailOperation_AlwaysMoveFocused, - MailOperation.SetFlag => Translator.MailOperation_SetFlag, - MailOperation.ClearFlag => Translator.MailOperation_ClearFlag, - MailOperation.MarkAsRead => Translator.MailOperation_MarkAsRead, - MailOperation.MarkAsUnread => Translator.MailOperation_MarkAsUnread, - MailOperation.MarkAsNotJunk => Translator.MailOperation_MarkNotJunk, - MailOperation.Seperator => string.Empty, - MailOperation.Ignore => Translator.MailOperation_Ignore, - MailOperation.Reply => Translator.MailOperation_Reply, - MailOperation.ReplyAll => Translator.MailOperation_ReplyAll, - MailOperation.Zoom => Translator.MailOperation_Zoom, - MailOperation.SaveAs => Translator.MailOperation_SaveAs, - MailOperation.Find => Translator.MailOperation_Find, - MailOperation.Forward => Translator.MailOperation_Forward, - MailOperation.DarkEditor => string.Empty, - MailOperation.LightEditor => string.Empty, - MailOperation.Print => Translator.MailOperation_Print, - MailOperation.ViewMessageSource => Translator.MailOperation_ViewMessageSource, - MailOperation.Navigate => Translator.MailOperation_Navigate, - _ => "unknown", - }; - } - - public static string GetOperationString(FolderOperation operation) - { - return operation switch - { - FolderOperation.None => string.Empty, - FolderOperation.Pin => Translator.FolderOperation_Pin, - FolderOperation.Unpin => Translator.FolderOperation_Unpin, - FolderOperation.MarkAllAsRead => Translator.FolderOperation_MarkAllAsRead, - FolderOperation.DontSync => Translator.FolderOperation_DontSync, - FolderOperation.Empty => Translator.FolderOperation_Empty, - FolderOperation.Rename => Translator.FolderOperation_Rename, - FolderOperation.Delete => Translator.FolderOperation_Delete, - FolderOperation.Move => Translator.FolderOperation_Move, - FolderOperation.CreateSubFolder => Translator.FolderOperation_CreateSubFolder, - _ => string.Empty, - }; - } - - #endregion -} diff --git a/Wino.Core.WinUI/Interfaces/IWinoShellWindow.cs b/Wino.Core.WinUI/Interfaces/IWinoShellWindow.cs deleted file mode 100644 index e124ebe1..00000000 --- a/Wino.Core.WinUI/Interfaces/IWinoShellWindow.cs +++ /dev/null @@ -1,14 +0,0 @@ -using CommunityToolkit.Mvvm.Messaging; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Wino.Messaging.UI; - -namespace Wino.Core.WinUI.Interfaces; - -public interface IWinoShellWindow : IRecipient -{ - void HandleAppActivation(LaunchActivatedEventArgs args); - TitleBar GetTitleBar(); - Frame GetMainFrame(); - FrameworkElement GetRootContent(); -} diff --git a/Wino.Core.WinUI/Models/Personalization/CustomAppTheme.cs b/Wino.Core.WinUI/Models/Personalization/CustomAppTheme.cs deleted file mode 100644 index 4f3350b2..00000000 --- a/Wino.Core.WinUI/Models/Personalization/CustomAppTheme.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Threading.Tasks; -using Windows.Storage; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Personalization; -using Wino.Services; - -namespace Wino.Core.WinUI.Models.Personalization; - -/// -/// Custom themes that are generated by users. -/// -public class CustomAppTheme : AppThemeBase -{ - public CustomAppTheme(CustomThemeMetadata metadata) : base(metadata.Name, metadata.Id) - { - AccentColor = metadata.AccentColorHex; - } - - public override AppThemeType AppThemeType => AppThemeType.Custom; - - public override string GetBackgroundPreviewImagePath() - => $"ms-appdata:///local/{NewThemeService.CustomThemeFolderName}/{Id}_preview.jpg"; - - public override async Task GetThemeResourceDictionaryContentAsync() - { - var customAppThemeFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Wino.Core.WinUI/AppThemes/Custom.xaml")); - return await FileIO.ReadTextAsync(customAppThemeFile); - } -} diff --git a/Wino.Core.WinUI/Models/Personalization/PreDefinedAppTheme.cs b/Wino.Core.WinUI/Models/Personalization/PreDefinedAppTheme.cs deleted file mode 100644 index c21eccb6..00000000 --- a/Wino.Core.WinUI/Models/Personalization/PreDefinedAppTheme.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Threading.Tasks; -using Windows.Storage; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Personalization; - -namespace Wino.Core.WinUI.Models.Personalization; - -/// -/// Forest, Nighty, Clouds etc. applies to pre-defined themes in Wino. -/// -public class PreDefinedAppTheme : AppThemeBase -{ - public PreDefinedAppTheme(string themeName, - Guid id, - string accentColor = "", - ApplicationElementTheme forcedElementTheme = ApplicationElementTheme.Default) : base(themeName, id) - { - AccentColor = accentColor; - ForceElementTheme = forcedElementTheme; - } - - public override AppThemeType AppThemeType => AppThemeType.PreDefined; - - public override string GetBackgroundPreviewImagePath() - => $"ms-appx:///Wino.Core.WinUI/BackgroundImages/{ThemeName}.jpg"; - - public override async Task GetThemeResourceDictionaryContentAsync() - { - var xamlDictionaryFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Wino.Core.WinUI/AppThemes/{ThemeName}.xaml")); - return await FileIO.ReadTextAsync(xamlDictionaryFile); - } -} diff --git a/Wino.Core.WinUI/Models/Personalization/SystemAppTheme.cs b/Wino.Core.WinUI/Models/Personalization/SystemAppTheme.cs deleted file mode 100644 index 4ae4aec9..00000000 --- a/Wino.Core.WinUI/Models/Personalization/SystemAppTheme.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.WinUI.Models.Personalization; - -// Mica - Acrylic. -public class SystemAppTheme : PreDefinedAppTheme -{ - public SystemAppTheme(string themeName, Guid id) : base(themeName, id, "") { } - - public override AppThemeType AppThemeType => AppThemeType.System; -} diff --git a/Wino.Core.WinUI/Models/PrintDialogViewModel.cs b/Wino.Core.WinUI/Models/PrintDialogViewModel.cs deleted file mode 100644 index 7947403e..00000000 --- a/Wino.Core.WinUI/Models/PrintDialogViewModel.cs +++ /dev/null @@ -1,276 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using Microsoft.UI.Xaml.Controls; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Printing; - -namespace Wino.Core.WinUI.Dialogs; - -/// -/// ViewModel for the PrintDialog that handles data binding and state management. -/// -public class PrintDialogViewModel : INotifyPropertyChanged -{ - private List _availablePrinters = new(); - private bool _isCustomPageRange = false; - private WebView2PrintSettingsModel _printSettings = new(); - - public event PropertyChangedEventHandler PropertyChanged; - - public PrintDialogViewModel() - { - // Initialize default values - PrintSettings.PropertyChanged += OnPrintSettingsChanged; - } - - /// - /// The print settings model that will be configured by the dialog. - /// - public WebView2PrintSettingsModel PrintSettings - { - get => _printSettings; - set - { - if (_printSettings != value) - { - if (_printSettings != null) - _printSettings.PropertyChanged -= OnPrintSettingsChanged; - - _printSettings = value; - - if (_printSettings != null) - _printSettings.PropertyChanged += OnPrintSettingsChanged; - - OnPropertyChanged(nameof(PrintSettings)); - UpdateDerivedProperties(); - } - } - } - - /// - /// List of available printers. - /// - public List AvailablePrinters - { - get => _availablePrinters; - set - { - if (_availablePrinters != value) - { - _availablePrinters = value ?? new List(); - OnPropertyChanged(nameof(AvailablePrinters)); - } - } - } - - /// - /// Index for the orientation radio buttons. - /// - public int OrientationIndex - { - get => (int)PrintSettings.Orientation; - set - { - if (value >= 0 && value <= 1) - { - PrintSettings.Orientation = (PrintOrientation)value; - OnPropertyChanged(nameof(OrientationIndex)); - } - } - } - - /// - /// Index for the color mode radio buttons. - /// - public int ColorModeIndex - { - get => (int)PrintSettings.ColorMode; - set - { - if (value >= 0 && value <= 2) - { - PrintSettings.ColorMode = (PrintColorMode)value; - OnPropertyChanged(nameof(ColorModeIndex)); - } - } - } - - /// - /// Index for the collation radio buttons. - /// - public int CollationIndex - { - get => (int)PrintSettings.Collation; - set - { - if (value >= 0 && value <= 2) - { - PrintSettings.Collation = (PrintCollation)value; - OnPropertyChanged(nameof(CollationIndex)); - } - } - } - - /// - /// Index for the duplex radio buttons. - /// - public int DuplexIndex - { - get => (int)PrintSettings.Duplex; - set - { - if (value >= 0 && value <= 3) - { - PrintSettings.Duplex = (PrintDuplex)value; - OnPropertyChanged(nameof(DuplexIndex)); - } - } - } - - /// - /// Index for the media size combo box. - /// - public int MediaSizeIndex - { - get => (int)PrintSettings.MediaSize; - set - { - if (value >= 0 && value <= 9) - { - PrintSettings.MediaSize = (PrintMediaSize)value; - OnPropertyChanged(nameof(MediaSizeIndex)); - } - } - } - - /// - /// Index for the pages per side combo box. - /// - public int PagesPerSideIndex - { - get - { - var validValues = new[] { 1, 2, 4, 6, 9, 16 }; - return Array.IndexOf(validValues, PrintSettings.PagesPerSide); - } - set - { - var validValues = new[] { 1, 2, 4, 6, 9, 16 }; - if (value >= 0 && value < validValues.Length) - { - PrintSettings.PagesPerSide = validValues[value]; - OnPropertyChanged(nameof(PagesPerSideIndex)); - } - } - } - - /// - /// Index for the page range option (0 = All pages, 1 = Custom range). - /// - public int PageRangeOptionIndex - { - get => IsCustomPageRange ? 1 : 0; - set - { - IsCustomPageRange = value == 1; - if (!IsCustomPageRange) - { - PrintSettings.PageRanges = string.Empty; - } - OnPropertyChanged(nameof(PageRangeOptionIndex)); - } - } - - /// - /// Whether custom page range is selected. - /// - public bool IsCustomPageRange - { - get => _isCustomPageRange; - private set - { - if (_isCustomPageRange != value) - { - _isCustomPageRange = value; - OnPropertyChanged(nameof(IsCustomPageRange)); - } - } - } - - /// - /// Scale factor as percentage text for display. - /// - public string ScalePercentageText => $"{(int)(PrintSettings.ScaleFactor * 100)}%"; - - /// - /// Initializes the dialog with the provided print settings. - /// - /// The initial print settings. - public void Initialize(WebView2PrintSettingsModel printSettings = null) - { - if (printSettings != null) - { - PrintSettings = printSettings; - } - else - { - PrintSettings = new WebView2PrintSettingsModel(); - } - - UpdateDerivedProperties(); - } - - /// - /// Sets the list of available printers. - /// - /// List of printer names. - public void SetAvailablePrinters(IEnumerable printers) - { - AvailablePrinters = printers?.ToList() ?? new List(); - - // If current printer is not in the list, select the first one - if (AvailablePrinters.Any() && !AvailablePrinters.Contains(PrintSettings.PrinterName)) - { - PrintSettings.PrinterName = AvailablePrinters.First(); - } - } - - private void OnPrintSettingsChanged(object sender, PropertyChangedEventArgs e) - { - if (e.PropertyName == nameof(WebView2PrintSettingsModel.ScaleFactor)) - { - OnPropertyChanged(nameof(ScalePercentageText)); - } - else if (e.PropertyName == nameof(WebView2PrintSettingsModel.PageRanges)) - { - // Update custom page range flag based on whether page ranges is empty - if (!string.IsNullOrWhiteSpace(PrintSettings.PageRanges)) - { - IsCustomPageRange = true; - OnPropertyChanged(nameof(PageRangeOptionIndex)); - } - } - } - - private void UpdateDerivedProperties() - { - OnPropertyChanged(nameof(OrientationIndex)); - OnPropertyChanged(nameof(ColorModeIndex)); - OnPropertyChanged(nameof(CollationIndex)); - OnPropertyChanged(nameof(DuplexIndex)); - OnPropertyChanged(nameof(MediaSizeIndex)); - OnPropertyChanged(nameof(PagesPerSideIndex)); - OnPropertyChanged(nameof(PageRangeOptionIndex)); - OnPropertyChanged(nameof(ScalePercentageText)); - - // Update custom page range based on current page ranges value - IsCustomPageRange = !string.IsNullOrWhiteSpace(PrintSettings.PageRanges); - } - - protected virtual void OnPropertyChanged(string propertyName) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } -} \ No newline at end of file diff --git a/Wino.Core.WinUI/Selectors/AppThemePreviewTemplateSelector.cs b/Wino.Core.WinUI/Selectors/AppThemePreviewTemplateSelector.cs deleted file mode 100644 index 81d87a25..00000000 --- a/Wino.Core.WinUI/Selectors/AppThemePreviewTemplateSelector.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Wino.Core.WinUI.Models.Personalization; - -namespace Wino.Core.WinUI.Selectors; - -public partial class AppThemePreviewTemplateSelector : DataTemplateSelector -{ - public DataTemplate SystemThemeTemplate { get; set; } - public DataTemplate PreDefinedThemeTemplate { get; set; } - public DataTemplate CustomAppTemplate { get; set; } - - protected override DataTemplate SelectTemplateCore(object item) - { - if (item is SystemAppTheme) - return SystemThemeTemplate; - else if (item is PreDefinedAppTheme) - return PreDefinedThemeTemplate; - else if (item is CustomAppTheme) - return CustomAppTemplate; - - return base.SelectTemplateCore(item); - } -} diff --git a/Wino.Core.WinUI/Selectors/CustomWinoMessageDialogIconSelector.cs b/Wino.Core.WinUI/Selectors/CustomWinoMessageDialogIconSelector.cs deleted file mode 100644 index 721b05fe..00000000 --- a/Wino.Core.WinUI/Selectors/CustomWinoMessageDialogIconSelector.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.WinUI.Selectors; - -public partial class CustomWinoMessageDialogIconSelector : DataTemplateSelector -{ - public DataTemplate InfoIconTemplate { get; set; } - public DataTemplate WarningIconTemplate { get; set; } - public DataTemplate QuestionIconTemplate { get; set; } - public DataTemplate ErrorIconTemplate { get; set; } - - protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) - { - if (item == null) return null; - - if (item is WinoCustomMessageDialogIcon icon) - { - switch (icon) - { - case WinoCustomMessageDialogIcon.Information: - return InfoIconTemplate; - case WinoCustomMessageDialogIcon.Warning: - return WarningIconTemplate; - case WinoCustomMessageDialogIcon.Error: - return ErrorIconTemplate; - case WinoCustomMessageDialogIcon.Question: - return QuestionIconTemplate; - default: - throw new Exception("Unknown custom message dialog icon."); - } - } - return base.SelectTemplateCore(item, container); - } -} diff --git a/Wino.Core.WinUI/Selectors/FileAttachmentTypeSelector.cs b/Wino.Core.WinUI/Selectors/FileAttachmentTypeSelector.cs deleted file mode 100644 index 8a5e97fd..00000000 --- a/Wino.Core.WinUI/Selectors/FileAttachmentTypeSelector.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.WinUI.Selectors; - -public partial class FileAttachmentTypeSelector : DataTemplateSelector -{ - public DataTemplate None { get; set; } - public DataTemplate Executable { get; set; } - public DataTemplate Image { get; set; } - public DataTemplate Audio { get; set; } - public DataTemplate Video { get; set; } - public DataTemplate PDF { get; set; } - public DataTemplate HTML { get; set; } - public DataTemplate RarArchive { get; set; } - public DataTemplate Archive { get; set; } - public DataTemplate Other { get; set; } - - protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) - { - if (item == null) - return None; - - var type = (MailAttachmentType)item; - - switch (type) - { - case MailAttachmentType.None: - return None; - case MailAttachmentType.Executable: - return Executable; - case MailAttachmentType.Image: - return Image; - case MailAttachmentType.Audio: - return Audio; - case MailAttachmentType.Video: - return Video; - case MailAttachmentType.PDF: - return PDF; - case MailAttachmentType.HTML: - return HTML; - case MailAttachmentType.RarArchive: - return RarArchive; - case MailAttachmentType.Archive: - return Archive; - default: - return Other; - } - } -} diff --git a/Wino.Core.WinUI/Selectors/NavigationMenuTemplateSelector.cs b/Wino.Core.WinUI/Selectors/NavigationMenuTemplateSelector.cs deleted file mode 100644 index d5d8d9f1..00000000 --- a/Wino.Core.WinUI/Selectors/NavigationMenuTemplateSelector.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Wino.Core.Domain.MenuItems; - -namespace Wino.Core.WinUI.Selectors; - -public partial class NavigationMenuTemplateSelector : DataTemplateSelector -{ - public DataTemplate MenuItemTemplate { get; set; } - public DataTemplate ContactsMenuItemTemplate { get; set; } - public DataTemplate AccountManagementTemplate { get; set; } - public DataTemplate ClickableAccountMenuTemplate { get; set; } - public DataTemplate MergedAccountTemplate { get; set; } - public DataTemplate MergedAccountFolderTemplate { get; set; } - public DataTemplate MergedAccountMoreExpansionItemTemplate { get; set; } - public DataTemplate FolderMenuTemplate { get; set; } - public DataTemplate SettingsItemTemplate { get; set; } - public DataTemplate MoreItemsFolderTemplate { get; set; } - public DataTemplate RatingItemTemplate { get; set; } - public DataTemplate CreateNewFolderTemplate { get; set; } - public DataTemplate SeperatorTemplate { get; set; } - public DataTemplate NewMailTemplate { get; set; } - public DataTemplate CategoryItemsTemplate { get; set; } - public DataTemplate FixAuthenticationIssueTemplate { get; set; } - public DataTemplate FixMissingFolderConfigTemplate { get; set; } - - protected override DataTemplate SelectTemplateCore(object item) - { - if (item is NewMailMenuItem) - return NewMailTemplate; - else if (item is ContactsMenuItem) - return ContactsMenuItemTemplate; - else if (item is SettingsItem) - return SettingsItemTemplate; - else if (item is SeperatorItem) - return SeperatorTemplate; - else if (item is AccountMenuItem accountMenuItem) - // Merged inbox account menu items must be nested. - return ClickableAccountMenuTemplate; - else if (item is ManageAccountsMenuItem) - return AccountManagementTemplate; - else if (item is RateMenuItem) - return RatingItemTemplate; - else if (item is MergedAccountMenuItem) - return MergedAccountTemplate; - else if (item is MergedAccountMoreFolderMenuItem) - return MergedAccountMoreExpansionItemTemplate; - else if (item is MergedAccountFolderMenuItem) - return MergedAccountFolderTemplate; - else if (item is FolderMenuItem) - return FolderMenuTemplate; - else if (item is FixAccountIssuesMenuItem fixAccountIssuesMenuItem) - return fixAccountIssuesMenuItem.Account.AttentionReason == Domain.Enums.AccountAttentionReason.MissingSystemFolderConfiguration - ? FixMissingFolderConfigTemplate : FixAuthenticationIssueTemplate; - else - { - var type = item.GetType(); - return null; - } - } -} diff --git a/Wino.Core.WinUI/Services/ApplicationResourceManager.cs b/Wino.Core.WinUI/Services/ApplicationResourceManager.cs deleted file mode 100644 index c47e74b0..00000000 --- a/Wino.Core.WinUI/Services/ApplicationResourceManager.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Linq; -using Microsoft.UI.Xaml; -using Wino.Core.Domain.Interfaces; -using Wino.Core.WinUI; - -namespace Wino.Services; - -public class ApplicationResourceManager : IApplicationResourceManager -{ - public void AddResource(ResourceDictionary resource) - => WinoApplication.Current.Resources.MergedDictionaries.Add(resource); - public void RemoveResource(ResourceDictionary resource) - => WinoApplication.Current.Resources.MergedDictionaries.Remove(resource); - - public bool ContainsResourceKey(string resourceKey) - => WinoApplication.Current.Resources.ContainsKey(resourceKey); - - public ResourceDictionary GetLastResource() - => WinoApplication.Current.Resources.MergedDictionaries.LastOrDefault(); - - public void ReplaceResource(string resourceKey, object resource) - => WinoApplication.Current.Resources[resourceKey] = resource; - - public TReturnType GetResource(string resourceKey) - => (TReturnType)WinoApplication.Current.Resources[resourceKey]; -} diff --git a/Wino.Core.WinUI/Services/ClipboardService.cs b/Wino.Core.WinUI/Services/ClipboardService.cs deleted file mode 100644 index 55ff635f..00000000 --- a/Wino.Core.WinUI/Services/ClipboardService.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Threading.Tasks; -using Windows.ApplicationModel.DataTransfer; -using Wino.Core.Domain.Interfaces; - -namespace Wino.Core.WinUI.Services; - -public class ClipboardService : IClipboardService -{ - public Task CopyClipboardAsync(string text) - { - var package = new DataPackage(); - package.SetText(text); - - Clipboard.SetContent(package); - - return Task.CompletedTask; - } -} diff --git a/Wino.Core.WinUI/Services/ConfigurationService.cs b/Wino.Core.WinUI/Services/ConfigurationService.cs deleted file mode 100644 index 49bdae81..00000000 --- a/Wino.Core.WinUI/Services/ConfigurationService.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.ComponentModel; -using System.Globalization; -using Windows.Foundation.Collections; -using Windows.Storage; -using Wino.Core.Domain.Interfaces; - -namespace Wino.Core.WinUI.Services; - -public class ConfigurationService : IConfigurationService -{ - public T Get(string key, T defaultValue = default) - => GetInternal(key, ApplicationData.Current.LocalSettings.Values, defaultValue); - - public T GetRoaming(string key, T defaultValue = default) - => GetInternal(key, ApplicationData.Current.RoamingSettings.Values, defaultValue); - - public void Set(string key, object value) - => SetInternal(key, value, ApplicationData.Current.LocalSettings.Values); - - public void SetRoaming(string key, object value) - => SetInternal(key, value, ApplicationData.Current.RoamingSettings.Values); - - private static T GetInternal(string key, IPropertySet collection, T defaultValue = default) - { - if (collection.TryGetValue(key, out object value)) - { - var stringValue = value?.ToString(); - - if (typeof(T).IsEnum) - return (T)Enum.Parse(typeof(T), stringValue); - - if ((typeof(T) == typeof(Guid?) || typeof(T) == typeof(Guid)) && Guid.TryParse(stringValue, out Guid guidResult)) - { - return (T)(object)guidResult; - } - - if (typeof(T) == typeof(TimeSpan)) - { - return (T)(object)TimeSpan.Parse(stringValue); - } - - return (T)Convert.ChangeType(stringValue, typeof(T)); - } - - return defaultValue; - } - - private static void SetInternal(string key, object value, IPropertySet collection) - => collection[key] = value?.ToString(); -} diff --git a/Wino.Core.WinUI/Services/DialogServiceBase.cs b/Wino.Core.WinUI/Services/DialogServiceBase.cs deleted file mode 100644 index ca9edf8c..00000000 --- a/Wino.Core.WinUI/Services/DialogServiceBase.cs +++ /dev/null @@ -1,345 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using CommunityToolkit.Mvvm.Messaging; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Serilog; -using Windows.Storage; -using Windows.Storage.AccessCache; -using Windows.Storage.Pickers; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Accounts; -using Wino.Core.Domain.Models.Common; -using Wino.Core.Domain.Models.Printing; -using Wino.Core.WinUI.Dialogs; -using Wino.Core.WinUI.Extensions; -using Wino.Dialogs; -using Wino.Messaging.Client.Shell; -using WinRT.Interop; - -namespace Wino.Core.WinUI.Services; - -public class DialogServiceBase : IDialogServiceBase -{ - private SemaphoreSlim _presentationSemaphore = new SemaphoreSlim(1); - - protected INewThemeService ThemeService { get; } - protected IConfigurationService ConfigurationService { get; } - - protected IApplicationResourceManager ApplicationResourceManager { get; } - - public DialogServiceBase(INewThemeService themeService, IConfigurationService configurationService, IApplicationResourceManager applicationResourceManager) - { - ThemeService = themeService; - ConfigurationService = configurationService; - ApplicationResourceManager = applicationResourceManager; - } - - protected XamlRoot GetXamlRoot() - { - return WinoApplication.MainWindow?.Content?.XamlRoot; - } - - public async Task PickFilePathAsync(string saveFileName) - { - var picker = new FolderPicker() - { - SuggestedStartLocation = PickerLocationId.Desktop - }; - - picker.FileTypeFilter.Add("*"); - - nint windowHandle = WindowNative.GetWindowHandle(WinoApplication.MainWindow); - InitializeWithWindow.Initialize(picker, windowHandle); - - var folder = await picker.PickSingleFolderAsync(); - if (folder == null) return string.Empty; - - StorageApplicationPermissions.FutureAccessList.Add(folder); - - return folder.Path; - - //var picker = new FileSavePicker - //{ - // SuggestedStartLocation = PickerLocationId.Desktop, - // SuggestedFileName = saveFileName - //}; - - //picker.FileTypeChoices.Add(Translator.FilteringOption_All, [".*"]); - - //var file = await picker.PickSaveFileAsync(); - //if (file == null) return string.Empty; - - //StorageApplicationPermissions.FutureAccessList.Add(file); - - //return file.Path; - } - - public async Task> PickFilesAsync(params object[] typeFilters) - { - var returnList = new List(); - var picker = new FileOpenPicker - { - ViewMode = PickerViewMode.Thumbnail, - SuggestedStartLocation = PickerLocationId.Desktop - }; - - foreach (var filter in typeFilters) - { - picker.FileTypeFilter.Add(filter.ToString()); - } - - nint windowHandle = WindowNative.GetWindowHandle(WinoApplication.MainWindow); - InitializeWithWindow.Initialize(picker, windowHandle); - - var files = await picker.PickMultipleFilesAsync(); - if (files == null) return returnList; - - foreach (var file in files) - { - StorageApplicationPermissions.FutureAccessList.Add(file); - - var sharedFile = await file.ToSharedFileAsync(); - returnList.Add(sharedFile); - } - - return returnList; - } - - private async Task PickFileAsync(params object[] typeFilters) - { - var picker = new FileOpenPicker - { - ViewMode = PickerViewMode.Thumbnail - }; - - foreach (var filter in typeFilters) - { - picker.FileTypeFilter.Add(filter.ToString()); - } - - nint windowHandle = WindowNative.GetWindowHandle(WinoApplication.MainWindow); - InitializeWithWindow.Initialize(picker, windowHandle); - - var file = await picker.PickSingleFileAsync(); - - if (file == null) return null; - - StorageApplicationPermissions.FutureAccessList.Add(file); - - return file; - } - - public virtual IAccountCreationDialog GetAccountCreationDialog(AccountCreationDialogResult accountCreationDialogResult) - { - return new AccountCreationDialog - { - RequestedTheme = ThemeService.RootTheme.ToWindowsElementTheme(), - XamlRoot = GetXamlRoot() - }; - } - - public async Task PickWindowsFileContentAsync(params object[] typeFilters) - { - var file = await PickFileAsync(typeFilters); - - if (file == null) return []; - - return await file.ToByteArrayAsync(); - } - - public Task ShowMessageAsync(string message, string title, WinoCustomMessageDialogIcon icon = WinoCustomMessageDialogIcon.Information) - => ShowWinoCustomMessageDialogAsync(title, message, Translator.Buttons_Close, icon); - - public Task ShowConfirmationDialogAsync(string question, string title, string confirmationButtonTitle) - => ShowWinoCustomMessageDialogAsync(title, question, confirmationButtonTitle, WinoCustomMessageDialogIcon.Question, Translator.Buttons_Cancel, string.Empty); - - public async Task ShowWinoCustomMessageDialogAsync(string title, - string description, - string approveButtonText, - WinoCustomMessageDialogIcon? icon, - string cancelButtonText = "", - string dontAskAgainConfigurationKey = "") - - { - // This config key has been marked as don't ask again already. - // Return immidiate result without presenting the dialog. - - bool isDontAskEnabled = !string.IsNullOrEmpty(dontAskAgainConfigurationKey); - - if (isDontAskEnabled && ConfigurationService.Get(dontAskAgainConfigurationKey, false)) return false; - - var informationContainer = new CustomMessageDialogInformationContainer(title, description, icon.Value, isDontAskEnabled); - - var dialog = new ContentDialog - { - Style = ApplicationResourceManager.GetResource - - - - diff --git a/Wino.Core.WinUI/Styles/DataTemplates.xaml.cs b/Wino.Core.WinUI/Styles/DataTemplates.xaml.cs deleted file mode 100644 index d57cff20..00000000 --- a/Wino.Core.WinUI/Styles/DataTemplates.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Microsoft.UI.Xaml; - -namespace Wino.Core.WinUI.Styles; - -public partial class DataTemplates : ResourceDictionary -{ - public DataTemplates() - { - InitializeComponent(); - } -} diff --git a/Wino.Core.WinUI/Styles/FontIcons.xaml b/Wino.Core.WinUI/Styles/FontIcons.xaml deleted file mode 100644 index 37409b5d..00000000 --- a/Wino.Core.WinUI/Styles/FontIcons.xaml +++ /dev/null @@ -1,33 +0,0 @@ - - - - M128.5,799.5C128.5,778.5 132.5,758.25 140.5,738.75C148.5,719.25 160,702 175,687L525,337C531.333,330.667 538.833,327.5 547.5,327.5C556.167,327.5 563.667,330.667 570,337C576.333,343.333 579.5,350.833 579.5,359.5C579.5,368.167 576.333,375.667 570,382L220,732C211.333,740.667 204.5,750.917 199.5,762.75C194.5,774.583 192,786.833 192,799.5C192,812.833 194.5,825.333 199.5,837C204.5,848.667 211.333,858.833 220,867.5C228.667,876.167 238.833,883 250.5,888C262.167,893 274.667,895.5 288,895.5C300.667,895.5 312.833,893.167 324.5,888.5C336.167,883.833 346.5,877 355.5,868L775,456.5C793,438.833 807,418.083 817,394.25C827,370.417 832,346 832,321C832,295.667 827.083,271.333 817.25,248C807.417,224.667 794,204.083 777,186.25C760,168.417 740.083,154.25 717.25,143.75C694.417,133.25 670,128 644,128C617.333,128 592.083,132.583 568.25,141.75C544.417,150.917 523,165 504,184L120,568C113.667,574.333 106.167,577.5 97.5,577.5C88.8333,577.5 81.3333,574.333 75,568C68.6667,561.667 65.5,554.167 65.5,545.5C65.5,536.833 68.6667,529.333 75,523L459,139C472.333,125.667 485.75,114.25 499.25,104.75C512.75,95.25 526.917,87.5 541.75,81.5C556.583,75.5 572.083,71.0834 588.25,68.25C604.417,65.4167 621.833,64.0001 640.5,64C675.833,64.0001 709,70.8334 740,84.5C771,98.1667 798.083,116.667 821.25,140C844.417,163.333 862.667,190.583 876,221.75C889.333,252.917 896,286.167 896,321.5C896,338.167 894.25,354.75 890.75,371.25C887.25,387.75 882.25,403.833 875.75,419.5C869.25,435.167 861.25,450.083 851.75,464.25C842.25,478.417 831.667,491.167 820,502.5L400.5,914C385.167,929 367.75,940.333 348.25,948C328.75,955.667 308.333,959.5 287,959.5C265,959.5 244.333,955.25 225,946.75C205.667,938.25 188.917,926.75 174.75,912.25C160.583,897.75 149.333,880.833 141,861.5C132.667,842.167 128.5,821.5 128.5,799.5Z - M896,392L896,898.5C896,915.167 892.583,931.083 885.75,946.25C878.917,961.417 869.75,974.75 858.25,986.25C846.75,997.75 833.417,1006.92 818.25,1013.75C803.083,1020.58 787.167,1024 770.5,1024L517,1024C528.667,1014.67 539.833,1004.67 550.5,994C561.167,983.333 571,972 580,960L768,960C777,960 785.333,958.333 793,955C800.667,951.667 807.417,947.083 813.25,941.25C819.083,935.417 823.667,928.667 827,921C830.333,913.333 832,905 832,896L832,392C832,390.667 832,389.333 832,388C832,386.667 831.833,385.333 831.5,384L637.5,384C620.167,384 603.917,380.5 588.75,373.5C573.583,366.5 560.333,357.167 549,345.5C537.667,333.833 528.667,320.25 522,304.75C515.333,289.25 512,273 512,256L512,64.5C510.667,64.1667 509.333,64.0001 508,64C506.667,64.0001 505.333,64.0001 504,64L256,64C247,64.0001 238.667,65.6667 231,69C223.333,72.3334 216.583,76.9167 210.75,82.75C204.917,88.5834 200.333,95.3334 197,103C193.667,110.667 192,119 192,128L192,380.5C169.667,386.5 148.333,394.5 128,404.5L128,125.5C128,108.833 131.417,92.9167 138.25,77.75C145.083,62.5834 154.25,49.2501 165.75,37.75C177.25,26.2501 190.583,17.0834 205.75,10.25C220.917,3.41669 236.833,0 253.5,0L504,0C521,0 537.333,3.25 553,9.75C568.667,16.25 582.5,25.5 594.5,37.5L858.5,301.5C870.5,313.5 879.75,327.333 886.25,343C892.75,358.667 896,375 896,392ZM576,256C576,265 577.667,273.417 581,281.25C584.333,289.083 588.833,295.833 594.5,301.5C600.167,307.167 606.917,311.667 614.75,315C622.583,318.333 631,320 640,320L787,320L576,109ZM576,736C576,775.667 568.417,813 553.25,848C538.083,883 517.5,913.5 491.5,939.5C465.5,965.5 435,986.083 400,1001.25C365,1016.42 327.667,1024 288,1024C248,1024 210.5,1016.5 175.5,1001.5C140.5,986.5 110,966 84,940C58,914 37.5,883.5 22.5,848.5C7.5,813.5 0,776 0,736C0,696.333 7.58333,659 22.75,624C37.9167,589 58.5,558.5 84.5,532.5C110.5,506.5 141,485.917 176,470.75C211,455.583 248.333,448 288,448C314.333,448 339.75,451.417 364.25,458.25C388.75,465.083 411.667,474.75 433,487.25C454.333,499.75 473.833,514.833 491.5,532.5C509.167,550.167 524.25,569.667 536.75,591C549.25,612.333 558.917,635.25 565.75,659.75C572.583,684.25 576,709.667 576,736ZM452,736C452,726 448.5,717.5 441.5,710.5L313.5,582.5C306.5,575.5 298,572 288,572C278,572 269.5,575.5 262.5,582.5L134.5,710.5C127.5,717.5 124,726 124,736C124,746 127.5,754.5 134.5,761.5C141.5,768.5 150,772 160,772C170,772 178.5,768.5 185.5,761.5L256,691L256,864C256,872.667 259.167,880.167 265.5,886.5C271.833,892.833 279.333,896 288,896C296.667,896 304.167,892.833 310.5,886.5C316.833,880.167 320,872.667 320,864L320,691L390.5,761.5C397.5,768.5 406,772 416,772C426,772 434.5,768.5 441.5,761.5C448.5,754.5 452,746 452,736Z - M192,960C174.333,960 157.75,956.667 142.25,950C126.75,943.333 113.167,934.167 101.5,922.5C89.8333,910.833 80.6667,897.25 74,881.75C67.3333,866.25 64,849.667 64,832L64,192C64,174.333 67.3333,157.75 74,142.25C80.6667,126.75 89.8333,113.167 101.5,101.5C113.167,89.8334 126.75,80.6667 142.25,74C157.75,67.3334 174.333,64.0001 192,64L696,64C713,64.0001 729.333,67.2501 745,73.75C760.667,80.2501 774.5,89.5001 786.5,101.5L922.5,237.5C934.5,249.5 943.75,263.333 950.25,279C956.75,294.667 960,311 960,328L960,444C950,436.333 939.667,429.25 929,422.75C918.333,416.25 907.333,410.167 896,404.5L896,328C896,319.333 894.417,311.083 891.25,303.25C888.083,295.417 883.5,288.5 877.5,282.5L741.5,146.5C731.167,136.167 718.667,130.167 704,128.5L704,288C704,301.333 701.5,313.833 696.5,325.5C691.5,337.167 684.667,347.333 676,356C667.333,364.667 657.167,371.5 645.5,376.5C633.833,381.5 621.333,384 608,384L352,384C338.667,384 326.167,381.5 314.5,376.5C302.833,371.5 292.667,364.667 284,356C275.333,347.333 268.5,337.167 263.5,325.5C258.5,313.833 256,301.333 256,288L256,128L192,128C183,128 174.583,129.667 166.75,133C158.917,136.333 152.167,140.833 146.5,146.5C140.833,152.167 136.333,158.917 133,166.75C129.667,174.583 128,183 128,192L128,832C128,841 129.667,849.417 133,857.25C136.333,865.083 140.833,871.833 146.5,877.5C152.167,883.167 158.917,887.667 166.75,891C174.583,894.333 183,896 192,896L192,608C192,594.667 194.5,582.167 199.5,570.5C204.5,558.833 211.333,548.667 220,540C228.667,531.333 238.833,524.5 250.5,519.5C262.167,514.5 274.667,512 288,512L444,512C436.333,522 429.25,532.333 422.75,543C416.25,553.667 410.167,564.667 404.5,576L288,576C279.333,576 271.833,579.167 265.5,585.5C259.167,591.833 256,599.333 256,608L256,896L404.5,896C410.167,907.333 416.25,918.333 422.75,929C429.25,939.667 436.333,950 444,960ZM608,320C616.667,320 624.167,316.833 630.5,310.5C636.833,304.167 640,296.667 640,288L640,128L320,128L320,288C320,296.667 323.167,304.167 329.5,310.5C335.833,316.833 343.333,320 352,320ZM448,736C448,696.333 455.583,659 470.75,624C485.917,589 506.5,558.5 532.5,532.5C558.5,506.5 589,485.917 624,470.75C659,455.583 696.333,448 736,448C762.333,448 787.75,451.417 812.25,458.25C836.75,465.083 859.667,474.75 881,487.25C902.333,499.75 921.833,514.833 939.5,532.5C957.167,550.167 972.25,569.667 984.75,591C997.25,612.333 1006.92,635.25 1013.75,659.75C1020.58,684.25 1024,709.667 1024,736C1024,775.667 1016.42,813 1001.25,848C986.083,883 965.5,913.5 939.5,939.5C913.5,965.5 883,986.083 848,1001.25C813,1016.42 775.667,1024 736,1024C696,1024 658.5,1016.5 623.5,1001.5C588.5,986.5 558,966 532,940C506,914 485.5,883.5 470.5,848.5C455.5,813.5 448,776 448,736ZM736,900C746,900 754.5,896.5 761.5,889.5L889.5,761.5C896.5,754.5 900,746 900,736C900,726 896.5,717.5 889.5,710.5C882.5,703.5 874,700 864,700C854,700 845.5,703.5 838.5,710.5L768,781L768,608C768,599.333 764.833,591.833 758.5,585.5C752.167,579.167 744.667,576 736,576C727.333,576 719.833,579.167 713.5,585.5C707.167,591.833 704,599.333 704,608L704,781L633.5,710.5C626.5,703.5 618,700 608,700C598,700 589.5,703.5 582.5,710.5C575.5,717.5 572,726 572,736C572,746 575.5,754.5 582.5,761.5L710.5,889.5C717.5,896.5 726,900 736,900Z - - - M270.5,954C259.833,954 249.75,952 240.25,948C230.75,944 222.417,938.5 215.25,931.5C208.083,924.5 202.417,916.333 198.25,907C194.083,897.667 192,887.667 192,877L192,147C192,136 194.25,125.5 198.75,115.5C203.25,105.5 209.333,96.6667 217,89C224.667,81.3334 233.5,75.2501 243.5,70.75C253.5,66.2501 264,64.0001 275,64L499,64C534.333,64.0001 567.5,70.7501 598.5,84.25C629.5,97.7501 656.583,116.083 679.75,139.25C702.917,162.417 721.25,189.5 734.75,220.5C748.25,251.5 755,284.667 755,320C755,348.333 750.583,375.25 741.75,400.75C732.917,426.25 720.333,450.5 704,473.5C737.333,499.5 762.75,530.667 780.25,567C797.75,603.333 806.5,642.667 806.5,685C806.5,711.333 803.333,737.083 797,762.25C790.667,787.417 780,811 765,833C752.333,851.667 737.583,868.417 720.75,883.25C703.917,898.083 685.667,910.75 666,921.25C646.333,931.75 625.583,939.75 603.75,945.25C581.917,950.75 559.833,953.5 537.5,953.5C492.833,953.5 448.333,953.583 404,953.75C359.667,953.917 315.167,954 270.5,954ZM493,416C506.333,416 518.833,413.5 530.5,408.5C542.167,403.5 552.333,396.667 561,388C569.667,379.333 576.5,369.167 581.5,357.5C586.5,345.833 589,333.333 589,320C589,306.667 586.5,294.167 581.5,282.5C576.5,270.833 569.667,260.667 561,252C552.333,243.333 542.167,236.5 530.5,231.5C518.833,226.5 506.333,224 493,224L352,224L352,416ZM531,800C546.667,800 561.167,797.083 574.5,791.25C587.833,785.417 599.333,777.5 609,767.5C618.667,757.5 626.25,745.75 631.75,732.25C637.25,718.75 640,704.167 640,688.5C640,673.833 637.083,659.75 631.25,646.25C625.417,632.75 617.583,620.75 607.75,610.25C597.917,599.75 586.417,591.417 573.25,585.25C560.083,579.083 546,576 531,576L352,576L352,800Z - M896,64C904.667,64.0001 912.167,67.1667 918.5,73.5C924.833,79.8334 928,87.3334 928,96C928,104.667 924.833,112.167 918.5,118.5C912.167,124.833 904.667,128 896,128L694,128L398.5,896L608,896C616.667,896 624.167,899.167 630.5,905.5C636.833,911.833 640,919.333 640,928C640,936.667 636.833,944.167 630.5,950.5C624.167,956.833 616.667,960 608,960L128,960C119.333,960 111.833,956.833 105.5,950.5C99.1667,944.167 96,936.667 96,928C96,919.333 99.1667,911.833 105.5,905.5C111.833,899.167 119.333,896 128,896L330,896L625.5,128L416,128C407.333,128 399.833,124.833 393.5,118.5C387.167,112.167 384,104.667 384,96C384,87.3334 387.167,79.8334 393.5,73.5C399.833,67.1667 407.333,64.0001 416,64Z - M192,509L192,96C192,87.3334 195.167,79.8334 201.5,73.5C207.833,67.1667 215.333,64.0001 224,64C232.667,64.0001 240.167,67.1667 246.5,73.5C252.833,79.8334 256,87.3334 256,96L256,514C256,548.667 262.833,581.417 276.5,612.25C290.167,643.083 308.667,670 332,693C355.333,716 382.5,734.25 413.5,747.75C444.5,761.25 477.333,768 512,768C547.667,768 581.083,761.167 612.25,747.5C643.417,733.833 670.5,715.25 693.5,691.75C716.5,668.25 734.667,640.833 748,609.5C761.333,578.167 768,544.667 768,509L768,96C768,87.3334 771.167,79.8334 777.5,73.5C783.833,67.1667 791.333,64.0001 800,64C808.667,64.0001 816.167,67.1667 822.5,73.5C828.833,79.8334 832,87.3334 832,96L832,509C832,538.667 828.25,567.167 820.75,594.5C813.25,621.833 802.583,647.5 788.75,671.5C774.917,695.5 758.25,717.333 738.75,737C719.25,756.667 697.667,773.5 674,787.5C650.333,801.5 624.833,812.417 597.5,820.25C570.167,828.083 541.667,832 512,832C482.333,832 453.833,828.083 426.5,820.25C399.167,812.417 373.667,801.5 350,787.5C326.333,773.5 304.75,756.667 285.25,737C265.75,717.333 249.083,695.5 235.25,671.5C221.417,647.5 210.75,621.75 203.25,594.25C195.75,566.75 192,538.333 192,509ZM224,960C215.333,960 207.833,956.833 201.5,950.5C195.167,944.167 192,936.667 192,928C192,919.333 195.167,911.833 201.5,905.5C207.833,899.167 215.333,896 224,896L800,896C808.667,896 816.167,899.167 822.5,905.5C828.833,911.833 832,919.333 832,928C832,936.667 828.833,944.167 822.5,950.5C816.167,956.833 808.667,960 800,960Z - M270.5,448C218.167,407.333 192,354 192,288C192,271.333 194.667,255.417 200,240.25C205.333,225.083 212.5,210.75 221.5,197.25C230.5,183.75 240.917,171.333 252.75,160C264.583,148.667 277,138.5 290,129.5C322,107.5 357.333,91.0834 396,80.25C434.667,69.4167 473.333,64.0001 512,64C536.333,64.0001 560.5,65.8334 584.5,69.5C608.5,73.1667 632,79.1667 655,87.5C670.333,93.1667 686,99.8334 702,107.5C718,115.167 733.583,124 748.75,134C763.917,144 778.083,154.917 791.25,166.75C804.417,178.583 815.833,191.333 825.5,205C827.833,208.333 829.5,211.25 830.5,213.75C831.5,216.25 832,219.667 832,224C832,232.667 828.833,240.167 822.5,246.5C816.167,252.833 808.667,256 800,256C794,256 789.167,254.917 785.5,252.75C781.833,250.583 778.167,247.333 774.5,243C766.167,233.667 757.833,225 749.5,217C741.167,209 732,201.167 722,193.5C707.333,182.5 691.583,172.833 674.75,164.5C657.917,156.167 640.5,149.333 622.5,144C604.5,138.667 586.167,134.667 567.5,132C548.833,129.333 530.333,128 512,128C479.333,128 446.917,132.333 414.75,141C382.583,149.667 353,163.5 326,182.5C317.667,188.5 309.333,195.25 301,202.75C292.667,210.25 285.167,218.5 278.5,227.5C271.833,236.5 266.417,246.083 262.25,256.25C258.083,266.417 256,277 256,288C256,311.333 260.417,331.5 269.25,348.5C278.083,365.5 289.75,380.25 304.25,392.75C318.75,405.25 335.25,415.917 353.75,424.75C372.25,433.583 391.167,441.333 410.5,448ZM192,800C192,791 195.25,783.417 201.75,777.25C208.25,771.083 215.833,768 224.5,768C230.167,768 235.083,769.25 239.25,771.75C243.417,774.25 247.167,777.667 250.5,782C258.833,792.667 266.333,802.25 273,810.75C279.667,819.25 286.667,827 294,834C301.333,841 309.583,847.417 318.75,853.25C327.917,859.083 339,864.833 352,870.5C376.667,881.167 402.917,888.083 430.75,891.25C458.583,894.417 485.667,896 512,896C528,896 545.417,894.833 564.25,892.5C583.083,890.167 602,886.417 621,881.25C640,876.083 658.333,869.417 676,861.25C693.667,853.083 709.333,843.083 723,831.25C736.667,819.417 747.583,805.583 755.75,789.75C763.917,773.917 768,756 768,736C768,707 761.583,682.833 748.75,663.5C735.917,644.167 717.5,627.167 693.5,612.5C690.5,610.833 685.083,608 677.25,604C669.417,600 661.25,595.917 652.75,591.75C644.25,587.583 636.167,583.917 628.5,580.75C620.833,577.583 615.833,576 613.5,576L96,576C87.3333,576 79.8333,572.833 73.5,566.5C67.1667,560.167 64,552.667 64,544C64,535.333 67.1667,527.833 73.5,521.5C79.8333,515.167 87.3333,512 96,512L928,512C936.667,512 944.167,515.167 950.5,521.5C956.833,527.833 960,535.333 960,544C960,552.667 956.833,560.167 950.5,566.5C944.167,572.833 936.667,576 928,576L753.5,576C805.833,616.667 832,670 832,736C832,763 827.167,787.25 817.5,808.75C807.833,830.25 794.917,849.333 778.75,866C762.583,882.667 743.75,896.917 722.25,908.75C700.75,920.583 678.167,930.333 654.5,938C630.833,945.667 606.75,951.25 582.25,954.75C557.75,958.25 534.333,960 512,960C480.667,960 449.333,958.083 418,954.25C386.667,950.417 356.333,942.167 327,929.5C301,918.167 276.667,902.833 254,883.5C231.333,864.167 212.5,842.333 197.5,818C193.833,812.333 192,806.333 192,800Z - M0,224C0,215 1.66667,206.667 5,199C8.33333,191.333 12.9167,184.583 18.75,178.75C24.5833,172.917 31.3333,168.333 39,165C46.6667,161.667 55,160 64,160C72.6667,160 80.9167,161.667 88.75,165C96.5833,168.333 103.417,172.917 109.25,178.75C115.083,184.583 119.667,191.417 123,199.25C126.333,207.083 128,215.333 128,224C128,233 126.333,241.333 123,249C119.667,256.667 115.083,263.417 109.25,269.25C103.417,275.083 96.6667,279.667 89,283C81.3333,286.333 73,288 64,288C55,288 46.5833,286.333 38.75,283C30.9167,279.667 24.1667,275.167 18.5,269.5C12.8333,263.833 8.33333,257.083 5,249.25C1.66667,241.417 0,233 0,224ZM288,256C279.333,256 271.833,252.833 265.5,246.5C259.167,240.167 256,232.667 256,224C256,215.333 259.167,207.833 265.5,201.5C271.833,195.167 279.333,192 288,192L992,192C1000.67,192 1008.17,195.167 1014.5,201.5C1020.83,207.833 1024,215.333 1024,224C1024,232.667 1020.83,240.167 1014.5,246.5C1008.17,252.833 1000.67,256 992,256ZM0,480C0,471 1.66667,462.667 5,455C8.33333,447.333 12.9167,440.583 18.75,434.75C24.5833,428.917 31.3333,424.333 39,421C46.6667,417.667 55,416 64,416C72.6667,416 80.9167,417.667 88.75,421C96.5833,424.333 103.417,428.917 109.25,434.75C115.083,440.583 119.667,447.417 123,455.25C126.333,463.083 128,471.333 128,480C128,489 126.333,497.333 123,505C119.667,512.667 115.083,519.417 109.25,525.25C103.417,531.083 96.6667,535.667 89,539C81.3333,542.333 73,544 64,544C55,544 46.5833,542.333 38.75,539C30.9167,535.667 24.1667,531.167 18.5,525.5C12.8333,519.833 8.33333,513.083 5,505.25C1.66667,497.417 0,489 0,480ZM288,512C279.333,512 271.833,508.833 265.5,502.5C259.167,496.167 256,488.667 256,480C256,471.333 259.167,463.833 265.5,457.5C271.833,451.167 279.333,448 288,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM0,736C0,727 1.66667,718.667 5,711C8.33333,703.333 12.9167,696.583 18.75,690.75C24.5833,684.917 31.3333,680.333 39,677C46.6667,673.667 55,672 64,672C72.6667,672 80.9167,673.667 88.75,677C96.5833,680.333 103.417,684.917 109.25,690.75C115.083,696.583 119.667,703.417 123,711.25C126.333,719.083 128,727.333 128,736C128,745 126.333,753.333 123,761C119.667,768.667 115.083,775.417 109.25,781.25C103.417,787.083 96.6667,791.667 89,795C81.3333,798.333 73,800 64,800C55,800 46.5833,798.333 38.75,795C30.9167,791.667 24.1667,787.167 18.5,781.5C12.8333,775.833 8.33333,769.083 5,761.25C1.66667,753.417 0,745 0,736ZM288,768C279.333,768 271.833,764.833 265.5,758.5C259.167,752.167 256,744.667 256,736C256,727.333 259.167,719.833 265.5,713.5C271.833,707.167 279.333,704 288,704L992,704C1000.67,704 1008.17,707.167 1014.5,713.5C1020.83,719.833 1024,727.333 1024,736C1024,744.667 1020.83,752.167 1014.5,758.5C1008.17,764.833 1000.67,768 992,768Z - F1 M 15 6.25 C 14.824218 6.25 14.65983 6.217448 14.506836 6.152344 C 14.353841 6.08724 14.222005 5.99935 14.111328 5.888672 C 14.00065 5.777995 13.91276 5.646159 13.847656 5.493164 C 13.782552 5.34017 13.75 5.175782 13.75 5 L 13.75 2.5 C 13.75 2.324219 13.782552 2.161459 13.847656 2.011719 C 13.91276 1.86198 14.002277 1.730145 14.116211 1.616211 C 14.230143 1.502279 14.361979 1.412762 14.511719 1.347656 C 14.661457 1.282553 14.824218 1.25 15 1.25 L 17.5 1.25 C 17.66927 1.25 17.830402 1.282553 17.983398 1.347656 C 18.136393 1.412762 18.269855 1.502279 18.383789 1.616211 C 18.497721 1.730145 18.587238 1.863607 18.652344 2.016602 C 18.717447 2.169598 18.75 2.33073 18.75 2.5 L 18.75 5 C 18.75 5.175782 18.717447 5.338543 18.652344 5.488281 C 18.587238 5.638021 18.497721 5.769857 18.383789 5.883789 C 18.269855 5.997723 18.13802 6.08724 17.988281 6.152344 C 17.838541 6.217448 17.675781 6.25 17.5 6.25 Z M 1.875 3.75 C 1.705729 3.75 1.559245 3.688152 1.435547 3.564453 C 1.311849 3.440756 1.25 3.294271 1.25 3.125 C 1.25 2.95573 1.311849 2.809246 1.435547 2.685547 C 1.559245 2.56185 1.705729 2.5 1.875 2.5 L 11.875 2.5 C 12.04427 2.5 12.190754 2.56185 12.314453 2.685547 C 12.43815 2.809246 12.5 2.95573 12.5 3.125 C 12.5 3.294271 12.43815 3.440756 12.314453 3.564453 C 12.190754 3.688152 12.04427 3.75 11.875 3.75 Z M 15 2.5 L 15 5 L 17.5 5 L 17.5 2.5 Z M 15 12.5 C 14.824218 12.5 14.65983 12.467448 14.506836 12.402344 C 14.353841 12.33724 14.222005 12.24935 14.111328 12.138672 C 14.00065 12.027995 13.91276 11.896159 13.847656 11.743164 C 13.782552 11.59017 13.75 11.425781 13.75 11.25 L 13.75 8.75 C 13.75 8.574219 13.782552 8.411459 13.847656 8.261719 C 13.91276 8.111979 14.002277 7.980144 14.116211 7.866211 C 14.230143 7.752279 14.361979 7.662762 14.511719 7.597656 C 14.661457 7.532553 14.824218 7.5 15 7.5 L 17.5 7.5 C 17.66927 7.5 17.830402 7.532553 17.983398 7.597656 C 18.136393 7.662762 18.269855 7.752279 18.383789 7.866211 C 18.497721 7.980144 18.587238 8.113607 18.652344 8.266602 C 18.717447 8.419597 18.75 8.580729 18.75 8.75 L 18.75 11.25 C 18.75 11.425781 18.717447 11.588542 18.652344 11.738281 C 18.587238 11.888021 18.497721 12.019857 18.383789 12.133789 C 18.269855 12.247722 18.13802 12.33724 17.988281 12.402344 C 17.838541 12.467448 17.675781 12.5 17.5 12.5 Z M 1.875 10 C 1.705729 10 1.559245 9.938151 1.435547 9.814453 C 1.311849 9.690756 1.25 9.544271 1.25 9.375 C 1.25 9.205729 1.311849 9.059245 1.435547 8.935547 C 1.559245 8.81185 1.705729 8.75 1.875 8.75 L 11.875 8.75 C 12.04427 8.75 12.190754 8.81185 12.314453 8.935547 C 12.43815 9.059245 12.5 9.205729 12.5 9.375 C 12.5 9.544271 12.43815 9.690756 12.314453 9.814453 C 12.190754 9.938151 12.04427 10 11.875 10 Z M 15 8.75 L 15 11.25 L 17.5 11.25 L 17.5 8.75 Z M 15 18.75 C 14.824218 18.75 14.65983 18.717447 14.506836 18.652344 C 14.353841 18.58724 14.222005 18.49935 14.111328 18.388672 C 14.00065 18.277994 13.91276 18.146158 13.847656 17.993164 C 13.782552 17.84017 13.75 17.675781 13.75 17.5 L 13.75 15 C 13.75 14.824219 13.782552 14.661459 13.847656 14.511719 C 13.91276 14.361979 14.002277 14.230144 14.116211 14.116211 C 14.230143 14.002279 14.361979 13.912761 14.511719 13.847656 C 14.661457 13.782553 14.824218 13.75 15 13.75 L 17.5 13.75 C 17.66927 13.75 17.830402 13.782553 17.983398 13.847656 C 18.136393 13.912761 18.269855 14.002279 18.383789 14.116211 C 18.497721 14.230144 18.587238 14.363607 18.652344 14.516602 C 18.717447 14.669597 18.75 14.830729 18.75 15 L 18.75 17.5 C 18.75 17.675781 18.717447 17.838541 18.652344 17.988281 C 18.587238 18.138021 18.497721 18.269857 18.383789 18.383789 C 18.269855 18.497721 18.13802 18.58724 17.988281 18.652344 C 17.838541 18.717447 17.675781 18.75 17.5 18.75 Z M 1.875 16.25 C 1.705729 16.25 1.559245 16.188152 1.435547 16.064453 C 1.311849 15.940756 1.25 15.794271 1.25 15.625 C 1.25 15.455729 1.311849 15.309245 1.435547 15.185547 C 1.559245 15.06185 1.705729 15 1.875 15 L 11.875 15 C 12.04427 15 12.190754 15.06185 12.314453 15.185547 C 12.43815 15.309245 12.5 15.455729 12.5 15.625 C 12.5 15.794271 12.43815 15.940756 12.314453 16.064453 C 12.190754 16.188152 12.04427 16.25 11.875 16.25 Z M 15 15 L 15 17.5 L 17.5 17.5 L 17.5 15 Z - M288,192C279.333,192 271.833,188.833 265.5,182.5C259.167,176.167 256,168.667 256,160C256,151.333 259.167,143.833 265.5,137.5C271.833,131.167 279.333,128 288,128L800,128C808.667,128 816.167,131.167 822.5,137.5C828.833,143.833 832,151.333 832,160C832,168.667 828.833,176.167 822.5,182.5C816.167,188.833 808.667,192 800,192ZM0,480C0,471.333 3.16667,463.833 9.5,457.5L100,367C106.333,360.667 113.833,357.5 122.5,357.5C131.167,357.5 138.667,360.667 145,367C151.333,373.333 154.5,380.833 154.5,389.5C154.5,398.167 151.333,405.667 145,412L77.5,480L145,548C151.333,554.333 154.5,561.833 154.5,570.5C154.5,579.167 151.333,586.667 145,593C138.667,599.333 131.167,602.5 122.5,602.5C113.833,602.5 106.333,599.333 100,593L9.5,502.5C3.16667,496.167 0,488.667 0,480ZM288,512C279.333,512 271.833,508.833 265.5,502.5C259.167,496.167 256,488.667 256,480C256,471.333 259.167,463.833 265.5,457.5C271.833,451.167 279.333,448 288,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM288,832C279.333,832 271.833,828.833 265.5,822.5C259.167,816.167 256,808.667 256,800C256,791.333 259.167,783.833 265.5,777.5C271.833,771.167 279.333,768 288,768L672,768C680.667,768 688.167,771.167 694.5,777.5C700.833,783.833 704,791.333 704,800C704,808.667 700.833,816.167 694.5,822.5C688.167,828.833 680.667,832 672,832Z - M288,192C279.333,192 271.833,188.833 265.5,182.5C259.167,176.167 256,168.667 256,160C256,151.333 259.167,143.833 265.5,137.5C271.833,131.167 279.333,128 288,128L800,128C808.667,128 816.167,131.167 822.5,137.5C828.833,143.833 832,151.333 832,160C832,168.667 828.833,176.167 822.5,182.5C816.167,188.833 808.667,192 800,192ZM0,570.5C0,561.833 3.16667,554.333 9.5,548L77.5,480L9.5,412C3.16667,405.667 0,398.167 0,389.5C0,380.833 3.16667,373.333 9.5,367C15.8333,360.667 23.3333,357.5 32,357.5C40.6667,357.5 48.1667,360.667 54.5,367L145,457.5C151.333,463.833 154.5,471.333 154.5,480C154.5,488.667 151.333,496.167 145,502.5L54.5,593C48.1667,599.333 40.6667,602.5 32,602.5C23.3333,602.5 15.8333,599.333 9.5,593C3.16667,586.667 0,579.167 0,570.5ZM288,512C279.333,512 271.833,508.833 265.5,502.5C259.167,496.167 256,488.667 256,480C256,471.333 259.167,463.833 265.5,457.5C271.833,451.167 279.333,448 288,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM288,832C279.333,832 271.833,828.833 265.5,822.5C259.167,816.167 256,808.667 256,800C256,791.333 259.167,783.833 265.5,777.5C271.833,771.167 279.333,768 288,768L672,768C680.667,768 688.167,771.167 694.5,777.5C700.833,783.833 704,791.333 704,800C704,808.667 700.833,816.167 694.5,822.5C688.167,828.833 680.667,832 672,832Z - M768,576L667,576C632.333,576 599.75,569.083 569.25,555.25C538.75,541.417 512.167,522.75 489.5,499.25C466.833,475.75 448.917,448.583 435.75,417.75C422.583,386.917 416,354.333 416,320C416,285.667 422.583,253.083 435.75,222.25C448.917,191.417 466.833,164.25 489.5,140.75C512.167,117.25 538.75,98.5834 569.25,84.75C599.75,70.9167 632.333,64.0001 667,64L992,64C1000.67,64.0001 1008.17,67.1667 1014.5,73.5C1020.83,79.8334 1024,87.3334 1024,96C1024,103.333 1022.58,109.167 1019.75,113.5C1016.92,117.833 1013.25,121.083 1008.75,123.25C1004.25,125.417 999.25,126.833 993.75,127.5C988.25,128.167 982.667,128.5 977,128.5C974,128.5 971.083,128.417 968.25,128.25C965.417,128.083 962.667,128 960,128L960,992C960,1000.67 956.833,1008.17 950.5,1014.5C944.167,1020.83 936.667,1024 928,1024C919.333,1024 911.833,1020.83 905.5,1014.5C899.167,1008.17 896,1000.67 896,992L896,128L832,128L832,992C832,1000.67 828.833,1008.17 822.5,1014.5C816.167,1020.83 808.667,1024 800,1024C791.333,1024 783.833,1020.83 777.5,1014.5C771.167,1008.17 768,1000.67 768,992ZM768,512L768,128L668,128C642,128 617.583,133.167 594.75,143.5C571.917,153.833 552,167.833 535,185.5C518,203.167 504.583,223.583 494.75,246.75C484.917,269.917 480,294.333 480,320C480,345.667 484.917,370.083 494.75,393.25C504.583,416.417 518,436.833 535,454.5C552,472.167 571.917,486.167 594.75,496.5C617.583,506.833 642,512 668,512ZM64,672C64,663.333 67.1667,655.833 73.5,649.5L243,480L73.5,310.5C67.1667,304.167 64,296.667 64,288C64,279.333 67.1667,271.833 73.5,265.5C79.8333,259.167 87.3333,256 96,256C104.667,256 112.167,259.167 118.5,265.5L310.5,457.5C316.833,463.833 320,471.333 320,480C320,488.667 316.833,496.167 310.5,502.5L118.5,694.5C112.167,700.833 104.667,704 96,704C87.3333,704 79.8333,700.833 73.5,694.5C67.1667,688.167 64,680.667 64,672Z - M832,706.5C832,723.167 828.583,739.083 821.75,754.25C814.917,769.417 805.75,782.75 794.25,794.25C782.75,805.75 769.417,814.917 754.25,821.75C739.083,828.583 723.167,832 706.5,832L189.5,832C172.833,832 156.917,828.583 141.75,821.75C126.583,814.917 113.25,805.75 101.75,794.25C90.25,782.75 81.0833,769.417 74.25,754.25C67.4167,739.083 64,723.167 64,706.5L64,189.5C64,172.833 67.4167,156.917 74.25,141.75C81.0833,126.583 90.25,113.25 101.75,101.75C113.25,90.25 126.583,81.0834 141.75,74.25C156.917,67.4167 172.833,64.0001 189.5,64L706.5,64C723.167,64.0001 739.083,67.4167 754.25,74.25C769.417,81.0834 782.75,90.25 794.25,101.75C805.75,113.25 814.917,126.583 821.75,141.75C828.583,156.917 832,172.833 832,189.5ZM128,704C128,706.667 128.167,709.5 128.5,712.5C128.833,715.5 129.333,718.333 130,721L357.5,493C369.167,481.333 383,472.417 399,466.25C415,460.083 431.333,457 448,457C465,457 481.417,460 497.25,466C513.083,472 526.833,481 538.5,493L766,721C766.667,718.333 767.167,715.5 767.5,712.5C767.833,709.5 768,706.667 768,704L768,192C768,183.333 766.333,175.083 763,167.25C759.667,159.417 755.083,152.583 749.25,146.75C743.417,140.917 736.583,136.333 728.75,133C720.917,129.667 712.667,128 704,128L192,128C183,128 174.667,129.667 167,133C159.333,136.333 152.583,140.917 146.75,146.75C140.917,152.583 136.333,159.333 133,167C129.667,174.667 128,183 128,192ZM960,320L960,772C960,797 954.917,820.917 944.75,843.75C934.583,866.583 920.917,886.583 903.75,903.75C886.583,920.917 866.583,934.583 843.75,944.75C820.917,954.917 797,960 772,960L320,960C297,960 275.583,954.333 255.75,943C235.917,931.667 220.333,916 209,896L770.5,896C787.833,896 804.083,892.5 819.25,885.5C834.417,878.5 847.667,869.167 859,857.5C870.333,845.833 879.333,832.25 886,816.75C892.667,801.25 896,785 896,768L896,209C916,220.333 931.667,235.917 943,255.75C954.333,275.583 960,297 960,320ZM544,288C544,279 545.667,270.667 549,263C552.333,255.333 556.917,248.583 562.75,242.75C568.583,236.917 575.333,232.333 583,229C590.667,225.667 599,224 608,224C616.667,224 624.917,225.667 632.75,229C640.583,232.333 647.417,236.917 653.25,242.75C659.083,248.583 663.667,255.417 667,263.25C670.333,271.083 672,279.333 672,288C672,297 670.333,305.333 667,313C663.667,320.667 659.083,327.417 653.25,333.25C647.417,339.083 640.667,343.667 633,347C625.333,350.333 617,352 608,352C599,352 590.583,350.333 582.75,347C574.917,343.667 568.167,339.167 562.5,333.5C556.833,327.833 552.333,321.083 549,313.25C545.667,305.417 544,297 544,288ZM175,766C177.667,766.667 180.5,767.167 183.5,767.5C186.5,767.833 189.333,768 192,768L704,768C706.667,768 709.5,767.833 712.5,767.5C715.5,767.167 718.333,766.667 721,766L493.5,538.5C487.5,532.5 480.5,528 472.5,525C464.5,522 456.333,520.5 448,520.5C439.667,520.5 431.583,522 423.75,525C415.917,528 409,532.5 403,538.5Z - M32,192C23.3333,192 15.8333,188.833 9.5,182.5C3.16667,176.167 0,168.667 0,160C0,151.333 3.16667,143.833 9.5,137.5C15.8333,131.167 23.3333,128 32,128L736,128C744.667,128 752.167,131.167 758.5,137.5C764.833,143.833 768,151.333 768,160C768,168.667 764.833,176.167 758.5,182.5C752.167,188.833 744.667,192 736,192ZM32,512C23.3333,512 15.8333,508.833 9.5,502.5C3.16667,496.167 0,488.667 0,480C0,471.333 3.16667,463.833 9.5,457.5C15.8333,451.167 23.3333,448 32,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM32,832C23.3333,832 15.8333,828.833 9.5,822.5C3.16667,816.167 0,808.667 0,800C0,791.333 3.16667,783.833 9.5,777.5C15.8333,771.167 23.3333,768 32,768L608,768C616.667,768 624.167,771.167 630.5,777.5C636.833,783.833 640,791.333 640,800C640,808.667 636.833,816.167 630.5,822.5C624.167,828.833 616.667,832 608,832Z - M160,192C151.333,192 143.833,188.833 137.5,182.5C131.167,176.167 128,168.667 128,160C128,151.333 131.167,143.833 137.5,137.5C143.833,131.167 151.333,128 160,128L864,128C872.667,128 880.167,131.167 886.5,137.5C892.833,143.833 896,151.333 896,160C896,168.667 892.833,176.167 886.5,182.5C880.167,188.833 872.667,192 864,192ZM32,512C23.3333,512 15.8333,508.833 9.5,502.5C3.16667,496.167 0,488.667 0,480C0,471.333 3.16667,463.833 9.5,457.5C15.8333,451.167 23.3333,448 32,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM288,832C279.333,832 271.833,828.833 265.5,822.5C259.167,816.167 256,808.667 256,800C256,791.333 259.167,783.833 265.5,777.5C271.833,771.167 279.333,768 288,768L736,768C744.667,768 752.167,771.167 758.5,777.5C764.833,783.833 768,791.333 768,800C768,808.667 764.833,816.167 758.5,822.5C752.167,828.833 744.667,832 736,832Z - M288,192C279.333,192 271.833,188.833 265.5,182.5C259.167,176.167 256,168.667 256,160C256,151.333 259.167,143.833 265.5,137.5C271.833,131.167 279.333,128 288,128L992,128C1000.67,128 1008.17,131.167 1014.5,137.5C1020.83,143.833 1024,151.333 1024,160C1024,168.667 1020.83,176.167 1014.5,182.5C1008.17,188.833 1000.67,192 992,192ZM32,512C23.3333,512 15.8333,508.833 9.5,502.5C3.16667,496.167 0,488.667 0,480C0,471.333 3.16667,463.833 9.5,457.5C15.8333,451.167 23.3333,448 32,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM480,832C471.333,832 463.833,828.833 457.5,822.5C451.167,816.167 448,808.667 448,800C448,791.333 451.167,783.833 457.5,777.5C463.833,771.167 471.333,768 480,768L992,768C1000.67,768 1008.17,771.167 1014.5,777.5C1020.83,783.833 1024,791.333 1024,800C1024,808.667 1020.83,816.167 1014.5,822.5C1008.17,828.833 1000.67,832 992,832Z - M32,192C23.3333,192 15.8333,188.833 9.5,182.5C3.16667,176.167 0,168.667 0,160C0,151.333 3.16667,143.833 9.5,137.5C15.8333,131.167 23.3333,128 32,128L992,128C1000.67,128 1008.17,131.167 1014.5,137.5C1020.83,143.833 1024,151.333 1024,160C1024,168.667 1020.83,176.167 1014.5,182.5C1008.17,188.833 1000.67,192 992,192ZM32,512C23.3333,512 15.8333,508.833 9.5,502.5C3.16667,496.167 0,488.667 0,480C0,471.333 3.16667,463.833 9.5,457.5C15.8333,451.167 23.3333,448 32,448L992,448C1000.67,448 1008.17,451.167 1014.5,457.5C1020.83,463.833 1024,471.333 1024,480C1024,488.667 1020.83,496.167 1014.5,502.5C1008.17,508.833 1000.67,512 992,512ZM32,832C23.3333,832 15.8333,828.833 9.5,822.5C3.16667,816.167 0,808.667 0,800C0,791.333 3.16667,783.833 9.5,777.5C15.8333,771.167 23.3333,768 32,768L992,768C1000.67,768 1008.17,771.167 1014.5,777.5C1020.83,783.833 1024,791.333 1024,800C1024,808.667 1020.83,816.167 1014.5,822.5C1008.17,828.833 1000.67,832 992,832Z - F1 M 0 10 C 0 9.082031 0.118815 8.196615 0.356445 7.34375 C 0.594076 6.490886 0.93099 5.694987 1.367188 4.956055 C 1.803385 4.217123 2.325846 3.543295 2.93457 2.93457 C 3.543294 2.325848 4.217122 1.803387 4.956055 1.367188 C 5.694986 0.93099 6.490885 0.594076 7.34375 0.356445 C 8.196614 0.118816 9.082031 0 10 0 C 10.917969 0 11.803385 0.118816 12.65625 0.356445 C 13.509114 0.594076 14.305013 0.93099 15.043945 1.367188 C 15.782877 1.803387 16.456705 2.325848 17.06543 2.93457 C 17.674152 3.543295 18.196613 4.217123 18.632812 4.956055 C 19.06901 5.694987 19.405924 6.490886 19.643555 7.34375 C 19.881184 8.196615 20 9.082031 20 10 C 20 10.917969 19.881184 11.803386 19.643555 12.65625 C 19.405924 13.509115 19.06901 14.305014 18.632812 15.043945 C 18.196613 15.782878 17.674152 16.456705 17.06543 17.06543 C 16.456705 17.674154 15.782877 18.196615 15.043945 18.632812 C 14.305013 19.06901 13.509114 19.405924 12.65625 19.643555 C 11.803385 19.881186 10.917969 20 10 20 C 9.082031 20 8.196614 19.881186 7.34375 19.643555 C 6.490885 19.405924 5.694986 19.06901 4.956055 18.632812 C 4.217122 18.196615 3.543294 17.674154 2.93457 17.06543 C 2.325846 16.456705 1.803385 15.782878 1.367188 15.043945 C 0.93099 14.305014 0.594076 13.509115 0.356445 12.65625 C 0.118815 11.803386 0 10.917969 0 10 Z M 18.75 10 C 18.75 9.199219 18.645832 8.426107 18.4375 7.680664 C 18.229166 6.935222 17.93457 6.238607 17.553711 5.59082 C 17.172852 4.943035 16.715494 4.352215 16.181641 3.818359 C 15.647785 3.284506 15.056965 2.827148 14.40918 2.446289 C 13.761393 2.06543 13.064778 1.770834 12.319336 1.5625 C 11.573893 1.354168 10.800781 1.25 10 1.25 C 9.192708 1.25 8.416341 1.354168 7.670898 1.5625 C 6.925456 1.770834 6.228841 2.06543 5.581055 2.446289 C 4.933268 2.827148 4.344075 3.282879 3.813477 3.813477 C 3.282877 4.344076 2.827148 4.933269 2.446289 5.581055 C 2.06543 6.228842 1.770833 6.925457 1.5625 7.670898 C 1.354167 8.416342 1.25 9.192709 1.25 10 C 1.25 10.807292 1.354167 11.583659 1.5625 12.329102 C 1.770833 13.074545 2.06543 13.771159 2.446289 14.418945 C 2.827148 15.066732 3.282877 15.655925 3.813477 16.186523 C 4.344075 16.717123 4.933268 17.172852 5.581055 17.553711 C 6.228841 17.93457 6.925456 18.229166 7.670898 18.4375 C 8.416341 18.645834 9.192708 18.75 10 18.75 C 10.807291 18.75 11.583658 18.645834 12.329102 18.4375 C 13.074543 18.229166 13.771158 17.93457 14.418945 17.553711 C 15.066731 17.172852 15.655924 16.717123 16.186523 16.186523 C 16.717121 15.655925 17.172852 15.066732 17.553711 14.418945 C 17.93457 13.771159 18.229166 13.074545 18.4375 12.329102 C 18.645832 11.583659 18.75 10.807292 18.75 10 Z M 5.625 8.125 C 5.625 7.949219 5.657552 7.786459 5.722656 7.636719 C 5.78776 7.486979 5.877278 7.355144 5.991211 7.241211 C 6.105143 7.127279 6.236979 7.037761 6.386719 6.972656 C 6.536458 6.907553 6.699219 6.875001 6.875 6.875 C 7.044271 6.875001 7.205403 6.907553 7.358398 6.972656 C 7.511393 7.037761 7.644856 7.127279 7.758789 7.241211 C 7.872721 7.355144 7.962239 7.488607 8.027344 7.641602 C 8.092447 7.794598 8.125 7.95573 8.125 8.125 C 8.125 8.300781 8.092447 8.463542 8.027344 8.613281 C 7.962239 8.763021 7.872721 8.894857 7.758789 9.008789 C 7.644856 9.122722 7.513021 9.21224 7.363281 9.277344 C 7.213542 9.342448 7.050781 9.375 6.875 9.375 C 6.699219 9.375 6.534831 9.342448 6.381836 9.277344 C 6.228841 9.21224 6.097005 9.12435 5.986328 9.013672 C 5.875651 8.902995 5.78776 8.771159 5.722656 8.618164 C 5.657552 8.46517 5.625 8.300781 5.625 8.125 Z M 11.875 8.125 C 11.875 7.949219 11.907552 7.786459 11.972656 7.636719 C 12.03776 7.486979 12.127277 7.355144 12.241211 7.241211 C 12.355143 7.127279 12.486979 7.037761 12.636719 6.972656 C 12.786457 6.907553 12.949218 6.875001 13.125 6.875 C 13.294271 6.875001 13.455403 6.907553 13.608398 6.972656 C 13.761393 7.037761 13.894856 7.127279 14.008789 7.241211 C 14.122721 7.355144 14.212238 7.488607 14.277344 7.641602 C 14.342447 7.794598 14.375 7.95573 14.375 8.125 C 14.375 8.300781 14.342447 8.463542 14.277344 8.613281 C 14.212238 8.763021 14.122721 8.894857 14.008789 9.008789 C 13.894856 9.122722 13.763021 9.21224 13.613281 9.277344 C 13.463541 9.342448 13.30078 9.375 13.125 9.375 C 12.949218 9.375 12.78483 9.342448 12.631836 9.277344 C 12.478841 9.21224 12.347005 9.12435 12.236328 9.013672 C 12.12565 8.902995 12.03776 8.771159 11.972656 8.618164 C 11.907552 8.46517 11.875 8.300781 11.875 8.125 Z M 5.3125 13.4375 C 5.3125 13.268229 5.374349 13.121745 5.498047 12.998047 C 5.621745 12.87435 5.768229 12.8125 5.9375 12.8125 C 6.041666 12.8125 6.123046 12.827148 6.181641 12.856445 C 6.240234 12.885742 6.305338 12.932943 6.376953 12.998047 C 6.669922 13.245443 6.948242 13.463542 7.211914 13.652344 C 7.475586 13.841146 7.747396 14.000651 8.027344 14.130859 C 8.307291 14.261068 8.606771 14.360352 8.925781 14.428711 C 9.244791 14.49707 9.602864 14.53125 10 14.53125 C 10.572916 14.53125 11.101888 14.448242 11.586914 14.282227 C 12.071939 14.116211 12.542317 13.860678 12.998047 13.515625 C 13.108724 13.43099 13.212891 13.346354 13.310547 13.261719 C 13.408203 13.177084 13.512369 13.089193 13.623047 12.998047 C 13.694661 12.939453 13.759766 12.893881 13.818359 12.861328 C 13.876953 12.828776 13.958333 12.8125 14.0625 12.8125 C 14.231771 12.8125 14.378255 12.87435 14.501953 12.998047 C 14.62565 13.121745 14.6875 13.268229 14.6875 13.4375 C 14.6875 13.528646 14.671224 13.606771 14.638672 13.671875 C 14.606119 13.736979 14.560546 13.805339 14.501953 13.876953 C 14.397786 14.000651 14.269205 14.125977 14.116211 14.25293 C 13.963215 14.379883 13.800455 14.501953 13.62793 14.619141 C 13.455403 14.736328 13.282877 14.845378 13.110352 14.946289 C 12.937825 15.047201 12.779947 15.133464 12.636719 15.205078 C 12.226562 15.413412 11.798502 15.561523 11.352539 15.649414 C 10.906575 15.737305 10.455729 15.78125 10 15.78125 C 9.53125 15.78125 9.070638 15.73405 8.618164 15.639648 C 8.165689 15.545248 7.731119 15.390625 7.314453 15.175781 C 7.229817 15.136719 7.122396 15.079753 6.992188 15.004883 C 6.861979 14.930014 6.723632 14.84375 6.577148 14.746094 C 6.430664 14.648438 6.282552 14.544271 6.132812 14.433594 C 5.983073 14.322917 5.846354 14.210612 5.722656 14.09668 C 5.598958 13.982748 5.499674 13.868815 5.424805 13.754883 C 5.349935 13.640951 5.3125 13.535156 5.3125 13.4375 Z - F1 M 5.625 15 C 4.85026 15 4.121094 14.851889 3.4375 14.555664 C 2.753906 14.25944 2.158203 13.857422 1.650391 13.349609 C 1.142578 12.841797 0.74056 12.246094 0.444336 11.5625 C 0.148112 10.878906 0 10.14974 0 9.375 C 0 8.600261 0.148112 7.871094 0.444336 7.1875 C 0.74056 6.503906 1.142578 5.908203 1.650391 5.400391 C 2.158203 4.892578 2.753906 4.490561 3.4375 4.194336 C 4.121094 3.898113 4.85026 3.75 5.625 3.75 L 8.125 3.75 C 8.294271 3.75 8.440755 3.81185 8.564453 3.935547 C 8.68815 4.059246 8.75 4.20573 8.75 4.375 C 8.75 4.544271 8.68815 4.690756 8.564453 4.814453 C 8.440755 4.938152 8.294271 5.000001 8.125 5 L 5.625 5 C 5.019531 5.000001 4.451497 5.113934 3.920898 5.341797 C 3.390299 5.569662 2.926432 5.882162 2.529297 6.279297 C 2.132161 6.676434 1.819661 7.140301 1.591797 7.670898 C 1.363932 8.201498 1.25 8.769531 1.25 9.375 C 1.25 9.980469 1.363932 10.548503 1.591797 11.079102 C 1.819661 11.609701 2.132161 12.073568 2.529297 12.470703 C 2.926432 12.867839 3.390299 13.180339 3.920898 13.408203 C 4.451497 13.636068 5.019531 13.75 5.625 13.75 L 8.125 13.75 C 8.294271 13.75 8.440755 13.81185 8.564453 13.935547 C 8.68815 14.059245 8.75 14.205729 8.75 14.375 C 8.75 14.544271 8.68815 14.690756 8.564453 14.814453 C 8.440755 14.938151 8.294271 15 8.125 15 Z M 11.875 15 C 11.705729 15 11.559244 14.938151 11.435547 14.814453 C 11.311849 14.690756 11.25 14.544271 11.25 14.375 C 11.25 14.205729 11.311849 14.059245 11.435547 13.935547 C 11.559244 13.81185 11.705729 13.75 11.875 13.75 L 14.375 13.75 C 14.980469 13.75 15.548502 13.636068 16.079102 13.408203 C 16.609699 13.180339 17.073566 12.867839 17.470703 12.470703 C 17.867838 12.073568 18.180338 11.609701 18.408203 11.079102 C 18.636066 10.548503 18.75 9.980469 18.75 9.375 C 18.75 8.769531 18.636066 8.201498 18.408203 7.670898 C 18.180338 7.140301 17.867838 6.676434 17.470703 6.279297 C 17.073566 5.882162 16.609699 5.569662 16.079102 5.341797 C 15.548502 5.113934 14.980469 5.000001 14.375 5 L 11.875 5 C 11.705729 5.000001 11.559244 4.938152 11.435547 4.814453 C 11.311849 4.690756 11.25 4.544271 11.25 4.375 C 11.25 4.20573 11.311849 4.059246 11.435547 3.935547 C 11.559244 3.81185 11.705729 3.75 11.875 3.75 L 14.375 3.75 C 15.149739 3.75 15.878906 3.898113 16.5625 4.194336 C 17.246094 4.490561 17.841797 4.892578 18.349609 5.400391 C 18.857422 5.908203 19.259439 6.503906 19.555664 7.1875 C 19.851887 7.871094 20 8.600261 20 9.375 C 20 10.14974 19.851887 10.878906 19.555664 11.5625 C 19.259439 12.246094 18.857422 12.841797 18.349609 13.349609 C 17.841797 13.857422 17.246094 14.25944 16.5625 14.555664 C 15.878906 14.851889 15.149739 15 14.375 15 Z M 5.556641 10 C 5.38737 10 5.252278 9.934896 5.151367 9.804688 C 5.050456 9.674479 5 9.53125 5 9.375 C 5 9.21875 5.050456 9.075521 5.151367 8.945312 C 5.252278 8.815104 5.38737 8.75 5.556641 8.75 L 14.443359 8.75 C 14.61263 8.75 14.747721 8.815104 14.848633 8.945312 C 14.949543 9.075521 14.999999 9.21875 15 9.375 C 14.999999 9.53125 14.949543 9.674479 14.848633 9.804688 C 14.747721 9.934896 14.61263 10 14.443359 10 Z - F1 M 0.625 17.5 C 0.455729 17.5 0.309245 17.43815 0.185547 17.314453 C 0.061849 17.190756 0 17.044271 0 16.875 C 0 16.829428 0.035807 16.689453 0.107422 16.455078 C 0.179036 16.220703 0.268555 15.9375 0.375977 15.605469 C 0.483398 15.273438 0.600586 14.916992 0.727539 14.536133 C 0.854492 14.155273 0.976562 13.79069 1.09375 13.442383 C 1.210938 13.094076 1.315104 12.788086 1.40625 12.524414 C 1.497396 12.260742 1.559245 12.083334 1.591797 11.992188 C 1.617839 11.907553 1.669922 11.826172 1.748047 11.748047 L 12.529297 0.966797 C 12.815755 0.68034 13.146158 0.458984 13.520508 0.302734 C 13.894856 0.146484 14.283854 0.068359 14.6875 0.068359 C 15.104166 0.068359 15.498047 0.148113 15.869141 0.307617 C 16.240234 0.467123 16.565754 0.68685 16.845703 0.966797 C 17.12565 1.246746 17.345377 1.572266 17.504883 1.943359 C 17.664387 2.314453 17.744141 2.708334 17.744141 3.125 C 17.744141 3.535156 17.666016 3.924154 17.509766 4.291992 C 17.353516 4.659831 17.13216 4.990234 16.845703 5.283203 L 15.263672 6.875 C 15.524088 7.161459 15.727539 7.444662 15.874023 7.724609 C 16.020508 8.004558 16.09375 8.346354 16.09375 8.75 C 16.09375 9.082031 16.030273 9.401042 15.90332 9.707031 C 15.776367 10.013021 15.595703 10.283203 15.361328 10.517578 L 13.564453 12.314453 C 13.440755 12.438151 13.294271 12.5 13.125 12.5 C 12.955729 12.5 12.809244 12.438151 12.685547 12.314453 C 12.561849 12.190756 12.5 12.044271 12.5 11.875 C 12.5 11.705729 12.561849 11.559245 12.685547 11.435547 L 14.482422 9.638672 C 14.729816 9.391276 14.853515 9.095053 14.853516 8.75 C 14.853515 8.548178 14.811197 8.365886 14.726562 8.203125 C 14.641927 8.040365 14.524739 7.893881 14.375 7.763672 L 6.064453 16.064453 C 5.979817 16.14909 5.885417 16.204428 5.78125 16.230469 L 0.78125 17.480469 C 0.716146 17.49349 0.664062 17.5 0.625 17.5 Z M 1.582031 15.996094 L 5.302734 15.058594 L 15.966797 4.404297 C 16.136066 4.235027 16.266275 4.039715 16.357422 3.818359 C 16.448566 3.597006 16.494141 3.365887 16.494141 3.125 C 16.494141 2.871094 16.446939 2.635092 16.352539 2.416992 C 16.258137 2.198895 16.129557 2.008465 15.966797 1.845703 C 15.804036 1.682943 15.613606 1.554363 15.395508 1.459961 C 15.177408 1.365561 14.941406 1.318359 14.6875 1.318359 C 14.446613 1.318359 14.215494 1.363934 13.994141 1.455078 C 13.772786 1.546225 13.577474 1.676434 13.408203 1.845703 L 2.734375 12.529297 Z M 1.523438 18.583984 L 3.203125 18.164062 C 3.580729 18.352865 3.972982 18.497721 4.379883 18.598633 C 4.786784 18.699545 5.201823 18.75 5.625 18.75 C 6.067708 18.75 6.500651 18.6556 6.923828 18.466797 C 7.347005 18.277994 7.762044 18.041992 8.168945 17.758789 C 8.575846 17.475586 8.976236 17.169596 9.370117 16.84082 C 9.763997 16.512045 10.151367 16.206055 10.532227 15.922852 C 10.913086 15.639648 11.287435 15.403646 11.655273 15.214844 C 12.023111 15.026042 12.386067 14.931641 12.744141 14.931641 C 12.952474 14.931641 13.144531 14.964193 13.320312 15.029297 C 13.59375 15.126953 13.818359 15.255534 13.994141 15.415039 C 14.169922 15.574545 14.316406 15.753581 14.433594 15.952148 C 14.550781 16.150717 14.650064 16.367188 14.731445 16.601562 C 14.812824 16.835938 14.892577 17.076824 14.970703 17.324219 C 15.003255 17.434896 15.0472 17.542318 15.102539 17.646484 C 15.157877 17.75065 15.224609 17.845053 15.302734 17.929688 C 15.341797 17.97526 15.388997 18.019205 15.444336 18.061523 C 15.499674 18.103842 15.559895 18.125 15.625 18.125 C 15.768229 18.125 15.939127 18.081055 16.137695 17.993164 C 16.336262 17.905273 16.536457 17.799479 16.738281 17.675781 C 16.940104 17.552084 17.133789 17.425131 17.319336 17.294922 C 17.504883 17.164713 17.659504 17.057291 17.783203 16.972656 C 17.978516 16.842449 18.185221 16.722006 18.40332 16.611328 C 18.621418 16.50065 18.8444 16.402994 19.072266 16.318359 C 19.182941 16.272787 19.283854 16.25 19.375 16.25 C 19.550781 16.25 19.698893 16.310223 19.819336 16.430664 C 19.939777 16.551107 20 16.699219 20 16.875 C 20 17.011719 19.957682 17.135416 19.873047 17.246094 C 19.78841 17.356771 19.680988 17.431641 19.550781 17.470703 C 19.54427 17.483725 19.524738 17.490234 19.492188 17.490234 C 19.186197 17.613932 18.873697 17.781576 18.554688 17.993164 C 18.235676 18.204752 17.91341 18.413086 17.587891 18.618164 C 17.262369 18.823242 16.935221 19.00065 16.606445 19.150391 C 16.277668 19.300131 15.95052 19.375 15.625 19.375 C 15.371094 19.375 15.139974 19.319662 14.931641 19.208984 C 14.723307 19.098307 14.534504 18.948568 14.365234 18.759766 C 14.215494 18.597006 14.09668 18.427734 14.008789 18.251953 C 13.920898 18.076172 13.8444 17.884115 13.779297 17.675781 C 13.740234 17.558594 13.694661 17.415365 13.642578 17.246094 C 13.590494 17.076822 13.523762 16.914062 13.442383 16.757812 C 13.361002 16.601562 13.263346 16.4681 13.149414 16.357422 C 13.03548 16.246746 12.90039 16.191406 12.744141 16.191406 C 12.496744 16.191406 12.223307 16.285809 11.923828 16.474609 C 11.624349 16.663412 11.298828 16.897787 10.947266 17.177734 C 10.595703 17.457682 10.218099 17.763672 9.814453 18.095703 C 9.410807 18.427734 8.986002 18.733725 8.540039 19.013672 C 8.094075 19.293619 7.626953 19.527994 7.138672 19.716797 C 6.650391 19.9056 6.145833 20 5.625 20 C 4.902344 20 4.192708 19.881186 3.496094 19.643555 C 2.799479 19.405924 2.161458 19.06901 1.582031 18.632812 Z - - - M1024,317.5L1024,507C1014.67,495.333 1004.67,484.167 994,473.5C983.333,462.833 972,453 960,444L960,320C960,311.333 958.333,303.083 955,295.25C951.667,287.417 947.083,280.583 941.25,274.75C935.417,268.917 928.583,264.333 920.75,261C912.917,257.667 904.667,256 896,256L522,256L458,298.5C436,312.833 412.333,320 387,320L64,320L64,832C64,841 65.6667,849.417 69,857.25C72.3333,865.083 76.8333,871.833 82.5,877.5C88.1667,883.167 94.9167,887.667 102.75,891C110.583,894.333 119,896 128,896L404.5,896C410.167,907.333 416.25,918.333 422.75,929C429.25,939.667 436.333,950 444,960L125.5,960C108.833,960 92.9167,956.583 77.75,949.75C62.5833,942.917 49.25,933.75 37.75,922.25C26.25,910.75 17.0833,897.417 10.25,882.25C3.41667,867.083 0,851.167 0,834.5L0,189.5C0,172.833 3.41667,156.917 10.25,141.75C17.0833,126.583 26.25,113.25 37.75,101.75C49.25,90.25 62.5833,81.0834 77.75,74.25C92.9167,67.4167 108.833,64.0001 125.5,64L368,64C388,64.0001 407.167,68.5001 425.5,77.5C443.833,86.5001 458.833,99.0001 470.5,115L528,192L898.5,192C915.167,192 931.083,195.417 946.25,202.25C961.417,209.083 974.75,218.25 986.25,229.75C997.75,241.25 1006.92,254.583 1013.75,269.75C1020.58,284.917 1024,300.833 1024,317.5ZM466,216L419,153.5C413,145.5 405.5,139.25 396.5,134.75C387.5,130.25 378,128 368,128L128,128C119,128 110.667,129.667 103,133C95.3333,136.333 88.5833,140.917 82.75,146.75C76.9167,152.583 72.3333,159.333 69,167C65.6667,174.667 64,183 64,192L64,256L387,256C394.333,256 401.5,254.667 408.5,252C415.5,249.333 422.25,246 428.75,242C435.25,238 441.583,233.667 447.75,229C453.917,224.333 460,220 466,216ZM1024,736C1024,775.667 1016.42,813 1001.25,848C986.083,883 965.5,913.5 939.5,939.5C913.5,965.5 883,986.083 848,1001.25C813,1016.42 775.667,1024 736,1024C696,1024 658.5,1016.5 623.5,1001.5C588.5,986.5 558,966 532,940C506,914 485.5,883.5 470.5,848.5C455.5,813.5 448,776 448,736C448,696.333 455.583,659 470.75,624C485.917,589 506.5,558.5 532.5,532.5C558.5,506.5 589,485.917 624,470.75C659,455.583 696.333,448 736,448C762.333,448 787.75,451.417 812.25,458.25C836.75,465.083 859.667,474.75 881,487.25C902.333,499.75 921.833,514.833 939.5,532.5C957.167,550.167 972.25,569.667 984.75,591C997.25,612.333 1006.92,635.25 1013.75,659.75C1020.58,684.25 1024,709.667 1024,736ZM896,576C896,567.333 892.833,559.833 886.5,553.5C880.167,547.167 872.667,544 864,544C857.667,544 852.5,545.167 848.5,547.5C844.5,549.833 841.25,552.917 838.75,556.75C836.25,560.583 834.5,565 833.5,570C832.5,575 832,580.167 832,585.5C816.333,577.167 800.917,570.833 785.75,566.5C770.583,562.167 754,560 736,560C724,560 711.75,561.25 699.25,563.75C686.75,566.25 674.5,569.917 662.5,574.75C650.5,579.583 639.083,585.417 628.25,592.25C617.417,599.083 608,607 600,616C597,619.333 594.667,622.75 593,626.25C591.333,629.75 590.5,633.833 590.5,638.5C590.5,647.5 593.667,655.167 600,661.5C606.333,667.833 614,671 623,671C628.667,671 634.75,668.583 641.25,663.75C647.75,658.917 655.333,653.5 664,647.5C672.667,641.5 682.75,636.083 694.25,631.25C705.75,626.417 719.333,624 735,624C746.667,624 757.5,625.25 767.5,627.75C777.5,630.25 787.667,634.333 798,640L785,640C779,640 773.083,640.25 767.25,640.75C761.417,641.25 756.167,642.583 751.5,644.75C746.833,646.917 743.083,650.167 740.25,654.5C737.417,658.833 736,664.667 736,672C736,680.667 739.167,688.167 745.5,694.5C751.833,700.833 759.333,704 768,704L864,704C872.667,704 880.167,700.833 886.5,694.5C892.833,688.167 896,680.667 896,672ZM881.5,833C881.5,824.333 878.333,816.833 872,810.5C865.667,804.167 858.167,801 849.5,801C842.833,801 836.333,803.417 830,808.25C823.667,813.083 816.333,818.5 808,824.5C799.667,830.5 789.833,835.917 778.5,840.75C767.167,845.583 753.333,848 737,848C725.333,848 714.5,846.75 704.5,844.25C694.5,841.75 684.333,837.667 674,832L687,832C692.667,832 698.417,831.75 704.25,831.25C710.083,830.75 715.333,829.417 720,827.25C724.667,825.083 728.5,821.833 731.5,817.5C734.5,813.167 736,807.333 736,800C736,791.333 732.833,783.833 726.5,777.5C720.167,771.167 712.667,768 704,768L608,768C599.333,768 591.833,771.167 585.5,777.5C579.167,783.833 576,791.333 576,800L576,896C576,904.667 579.167,912.167 585.5,918.5C591.833,924.833 599.333,928 608,928C614.333,928 619.5,926.833 623.5,924.5C627.5,922.167 630.75,919.083 633.25,915.25C635.75,911.417 637.5,907 638.5,902C639.5,897 640,891.833 640,886.5C655.667,894.833 671.083,901.167 686.25,905.5C701.417,909.833 718,912 736,912C748,912 760.333,910.75 773,908.25C785.667,905.75 797.917,902.083 809.75,897.25C821.583,892.417 832.833,886.583 843.5,879.75C854.167,872.917 863.667,865 872,856C878.333,849.333 881.5,841.667 881.5,833Z - M128,220C128,190 134.083,161.667 146.25,135C158.417,108.333 174.75,85 195.25,65C215.75,45 239.5,29.1667 266.5,17.5C293.5,5.83337 322,0 352,0C382.667,0 411.583,5.91669 438.75,17.75C465.917,29.5834 489.667,45.6667 510,66C530.333,86.3334 546.417,110.083 558.25,137.25C570.083,164.417 576,193.333 576,224C576,254.667 570.083,283.583 558.25,310.75C546.417,337.917 530.333,361.667 510,382C489.667,402.333 465.917,418.417 438.75,430.25C411.583,442.083 382.667,448 352,448C320.333,448 290.833,442 263.5,430C236.167,418 212.5,401.667 192.5,381C172.5,360.333 156.75,336.167 145.25,308.5C133.75,280.833 128,251.333 128,220ZM512,220.5C512,198.833 507.667,178.5 499,159.5C490.333,140.5 478.667,123.917 464,109.75C449.333,95.5834 432.333,84.4167 413,76.25C393.667,68.0834 373.333,64.0001 352,64C329.667,64.0001 308.833,68.1667 289.5,76.5C270.167,84.8334 253.25,96.25 238.75,110.75C224.25,125.25 212.833,142.167 204.5,161.5C196.167,180.833 192,201.667 192,224C192,246.333 196.167,267.167 204.5,286.5C212.833,305.833 224.25,322.75 238.75,337.25C253.25,351.75 270.167,363.167 289.5,371.5C308.833,379.833 329.667,384 352,384C375,384 396.25,379.75 415.75,371.25C435.25,362.75 452.167,351.083 466.5,336.25C480.833,321.417 492,304.083 500,284.25C508,264.417 512,243.167 512,220.5ZM640,284.5C640,262.833 644.333,242.5 653,223.5C661.667,204.5 673.333,187.917 688,173.75C702.667,159.583 719.667,148.417 739,140.25C758.333,132.083 778.667,128 800,128C822.333,128 843.167,132.167 862.5,140.5C881.833,148.833 898.75,160.25 913.25,174.75C927.75,189.25 939.167,206.167 947.5,225.5C955.833,244.833 960,265.667 960,288C960,310.333 955.833,331.167 947.5,350.5C939.167,369.833 927.75,386.75 913.25,401.25C898.75,415.75 881.833,427.167 862.5,435.5C843.167,443.833 822.333,448 800,448C777,448 755.75,443.75 736.25,435.25C716.75,426.75 699.833,415.083 685.5,400.25C671.167,385.417 660,368.083 652,348.25C644,328.417 640,307.167 640,284.5ZM896,288C896,275 893.5,262.667 888.5,251C883.5,239.333 876.583,229.083 867.75,220.25C858.917,211.417 848.667,204.5 837,199.5C825.333,194.5 813,192 800,192C787,192 774.667,194.5 763,199.5C751.333,204.5 741.083,211.417 732.25,220.25C723.417,229.083 716.5,239.333 711.5,251C706.5,262.667 704,275 704,288C704,301 706.5,313.333 711.5,325C716.5,336.667 723.417,346.917 732.25,355.75C741.083,364.583 751.333,371.5 763,376.5C774.667,381.5 787,384 800,384C813,384 825.333,381.5 837,376.5C848.667,371.5 858.917,364.583 867.75,355.75C876.583,346.917 883.5,336.667 888.5,325C893.5,313.333 896,301 896,288ZM0,638C0,623.667 2.41667,609 7.25,594C12.0833,579 19,565.417 28,553.25C37,541.083 47.9167,531.167 60.75,523.5C73.5833,515.833 88,512 104,512L600,512C616,512 630.417,515.833 643.25,523.5C656.083,531.167 667,541.083 676,553.25C685,565.417 691.917,579 696.75,594C701.583,609 704,623.667 704,638C704,667 701,694.917 695,721.75C689,748.583 679.75,773.833 667.25,797.5C654.75,821.167 639.083,842.917 620.25,862.75C601.417,882.583 579.167,899.833 553.5,914.5C538.5,923.167 522.75,930.417 506.25,936.25C489.75,942.083 473,946.75 456,950.25C439,953.75 421.75,956.25 404.25,957.75C386.75,959.25 369.333,960 352,960C317,960 282.333,956.833 248,950.5C213.667,944.167 181.167,932.167 150.5,914.5C124.5,899.5 102.083,882.167 83.25,862.5C64.4167,842.833 48.8333,821.25 36.5,797.75C24.1667,774.25 15,749.083 9,722.25C3,695.417 0,667.333 0,638ZM698.5,896C714.833,876.333 728.833,854.5 740.5,830.5C771.5,828.167 800.417,822.417 827.25,813.25C854.083,804.083 877.333,791.083 897,774.25C916.667,757.417 932.083,736.583 943.25,711.75C954.417,686.917 960,657.667 960,624C960,619 959.25,613.75 957.75,608.25C956.25,602.75 954.083,597.583 951.25,592.75C948.417,587.917 944.833,583.917 940.5,580.75C936.167,577.583 931.167,576 925.5,576L775,576C771.333,564.667 767,553.583 762,542.75C757,531.917 751.167,521.667 744.5,512L925.5,512C940.167,512 953.583,515.25 965.75,521.75C977.917,528.25 988.333,536.75 997,547.25C1005.67,557.75 1012.33,569.75 1017,583.25C1021.67,596.75 1024,610.333 1024,624C1024,675.333 1012.5,720.833 989.5,760.5C966.5,800.167 932.333,832.333 887,857C858.333,872.667 827.833,883.083 795.5,888.25C763.167,893.417 730.833,896 698.5,896ZM640,640C640,634.333 639.167,627.75 637.5,620.25C635.833,612.75 633.25,605.75 629.75,599.25C626.25,592.75 621.833,587.25 616.5,582.75C611.167,578.25 605,576 598,576L106,576C99,576 92.8333,578.25 87.5,582.75C82.1667,587.25 77.75,592.75 74.25,599.25C70.75,605.75 68.1667,612.75 66.5,620.25C64.8333,627.75 64,634.333 64,640C64,684.333 71.25,722.583 85.75,754.75C100.25,786.917 120.333,813.5 146,834.5C171.667,855.5 202.083,871 237.25,881C272.417,891 310.667,896 352,896C393.333,896 431.583,891 466.75,881C501.917,871 532.333,855.5 558,834.5C583.667,813.5 603.75,786.917 618.25,754.75C632.75,722.583 640,684.333 640,640Z - - - F1 M 8.75 10.625 C 8.75 10.455729 8.811849 10.309245 8.935547 10.185547 L 16.621094 2.5 L 10.625 2.5 C 10.455729 2.5 10.309244 2.438152 10.185547 2.314453 C 10.061849 2.190756 10 2.044271 10 1.875 C 10 1.70573 10.061849 1.559246 10.185547 1.435547 C 10.309244 1.31185 10.455729 1.25 10.625 1.25 L 18.125 1.25 C 18.29427 1.25 18.440754 1.31185 18.564453 1.435547 C 18.68815 1.559246 18.75 1.70573 18.75 1.875 L 18.75 9.375 C 18.75 9.544271 18.68815 9.690756 18.564453 9.814453 C 18.440754 9.938151 18.29427 10 18.125 10 C 17.955729 10 17.809244 9.938151 17.685547 9.814453 C 17.561848 9.690756 17.5 9.544271 17.5 9.375 L 17.5 3.388672 L 9.814453 11.064453 C 9.749349 11.123047 9.682617 11.16862 9.614258 11.201172 C 9.545898 11.233725 9.466146 11.25 9.375 11.25 C 9.205729 11.25 9.059244 11.188151 8.935547 11.064453 C 8.811849 10.940756 8.75 10.794271 8.75 10.625 Z M 4.921875 18.75 C 4.433594 18.75 3.966471 18.650717 3.520508 18.452148 C 3.074544 18.25358 2.683919 17.986654 2.348633 17.651367 C 2.013346 17.31608 1.746419 16.925455 1.547852 16.479492 C 1.349284 16.033529 1.25 15.566406 1.25 15.078125 L 1.25 6.171875 C 1.25 5.683595 1.349284 5.216473 1.547852 4.770508 C 1.746419 4.324545 2.013346 3.93392 2.348633 3.598633 C 2.683919 3.263348 3.074544 2.99642 3.520508 2.797852 C 3.966471 2.599285 4.433594 2.5 4.921875 2.5 L 8.125 2.5 C 8.294271 2.5 8.440755 2.56185 8.564453 2.685547 C 8.68815 2.809246 8.75 2.95573 8.75 3.125 C 8.75 3.294271 8.68815 3.440756 8.564453 3.564453 C 8.440755 3.688152 8.294271 3.75 8.125 3.75 L 4.951172 3.75 C 4.625651 3.75 4.314778 3.816732 4.018555 3.950195 C 3.722331 4.08366 3.461914 4.262696 3.237305 4.487305 C 3.012695 4.711915 2.833659 4.972332 2.700195 5.268555 C 2.566732 5.564779 2.5 5.875651 2.5 6.201172 L 2.5 15.048828 C 2.5 15.37435 2.566732 15.685222 2.700195 15.981445 C 2.833659 16.27767 3.012695 16.538086 3.237305 16.762695 C 3.461914 16.987305 3.722331 17.166342 4.018555 17.299805 C 4.314778 17.433268 4.625651 17.5 4.951172 17.5 L 13.798828 17.5 C 14.137369 17.5 14.454752 17.431641 14.750977 17.294922 C 15.0472 17.158203 15.305989 16.975912 15.527344 16.748047 C 15.748697 16.520182 15.924479 16.254883 16.054688 15.952148 C 16.184895 15.649414 16.25 15.332031 16.25 15 L 16.25 11.875 C 16.25 11.705729 16.311848 11.559245 16.435547 11.435547 C 16.559244 11.31185 16.705729 11.25 16.875 11.25 C 17.04427 11.25 17.190754 11.31185 17.314453 11.435547 C 17.43815 11.559245 17.5 11.705729 17.5 11.875 L 17.5 15.078125 C 17.5 15.566406 17.400715 16.033529 17.202148 16.479492 C 17.00358 16.925455 16.736652 17.31608 16.401367 17.651367 C 16.06608 17.986654 15.675455 18.25358 15.229492 18.452148 C 14.783527 18.650717 14.316405 18.75 13.828125 18.75 Z - diff --git a/Wino.Core.WinUI/Styles/IconTemplates.xaml b/Wino.Core.WinUI/Styles/IconTemplates.xaml deleted file mode 100644 index 67172286..00000000 --- a/Wino.Core.WinUI/Styles/IconTemplates.xaml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Styles/SharedStyles.xaml b/Wino.Core.WinUI/Styles/SharedStyles.xaml deleted file mode 100644 index ce4837f8..00000000 --- a/Wino.Core.WinUI/Styles/SharedStyles.xaml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - diff --git a/Wino.Core.WinUI/Styles/WinoInfoBar.xaml b/Wino.Core.WinUI/Styles/WinoInfoBar.xaml deleted file mode 100644 index 6983a992..00000000 --- a/Wino.Core.WinUI/Styles/WinoInfoBar.xaml +++ /dev/null @@ -1,422 +0,0 @@ - - - - #74b9ff - - - - - - - - - - - - - - - - - - - - - - 1 - - - - #3867d6 - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - 2 - - - - 14 - SemiBold - - 14 - Normal - - 48 - - 38 - 16 - - - -12,0,0,0 - - - - - - - - 16,0,0,0 - - 0,16,14,16 - 16 - - 0,0,16,0 - 0,0,0,0 - 0,14,0,18 - - 0,14,0,0 - 0,14,0,0 - - 12,14,0,0 - 0,4,0,0 - - 16,8,0,0 - 0,12,0,0 - - Cancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Views/Abstract/ManageAccountsPageAbstract.cs b/Wino.Core.WinUI/Views/Abstract/ManageAccountsPageAbstract.cs deleted file mode 100644 index ad542046..00000000 --- a/Wino.Core.WinUI/Views/Abstract/ManageAccountsPageAbstract.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Wino.Core.ViewModels; - -namespace Wino.Core.WinUI.Views.Abstract; - -public abstract class ManageAccountsPageAbstract : BasePage -{ -} diff --git a/Wino.Core.WinUI/Views/Abstract/SettingOptionsPageAbstract.cs b/Wino.Core.WinUI/Views/Abstract/SettingOptionsPageAbstract.cs deleted file mode 100644 index 34a3b020..00000000 --- a/Wino.Core.WinUI/Views/Abstract/SettingOptionsPageAbstract.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Wino.Core.ViewModels; - -namespace Wino.Views.Abstract; - -public abstract class SettingOptionsPageAbstract : SettingsPageBase -{ -} diff --git a/Wino.Core.WinUI/Views/Abstract/SettingsPageAbstract.cs b/Wino.Core.WinUI/Views/Abstract/SettingsPageAbstract.cs deleted file mode 100644 index 3800b720..00000000 --- a/Wino.Core.WinUI/Views/Abstract/SettingsPageAbstract.cs +++ /dev/null @@ -1,6 +0,0 @@ -using Wino.Core.WinUI; -using Wino.Core.ViewModels; - -namespace Wino.Views.Abstract; - -public abstract class SettingsPageAbstract : BasePage { } diff --git a/Wino.Core.WinUI/Views/Abstract/SettingsPageBase.cs b/Wino.Core.WinUI/Views/Abstract/SettingsPageBase.cs deleted file mode 100644 index bee7377f..00000000 --- a/Wino.Core.WinUI/Views/Abstract/SettingsPageBase.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.UI.Xaml; -using Wino.Core.ViewModels; -using Wino.Core.WinUI; - -namespace Wino.Views.Abstract; - -public partial class SettingsPageBase : BasePage where T : CoreBaseViewModel -{ - public string Title - { - get { return (string)GetValue(TitleProperty); } - set { SetValue(TitleProperty, value); } - } - - public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(nameof(Title), typeof(string), typeof(SettingsPageBase), new PropertyMetadata(string.Empty)); -} diff --git a/Wino.Core.WinUI/Views/ManageAccountsPage.xaml b/Wino.Core.WinUI/Views/ManageAccountsPage.xaml deleted file mode 100644 index 94905364..00000000 --- a/Wino.Core.WinUI/Views/ManageAccountsPage.xaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Views/ManageAccountsPage.xaml.cs b/Wino.Core.WinUI/Views/ManageAccountsPage.xaml.cs deleted file mode 100644 index d277f88b..00000000 --- a/Wino.Core.WinUI/Views/ManageAccountsPage.xaml.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System.Collections.ObjectModel; -using System.Linq; -using CommunityToolkit.Mvvm.Messaging; -using Microsoft.UI.Xaml.Media.Animation; -using Microsoft.UI.Xaml.Navigation; -using MoreLinq; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.WinUI.Views.Abstract; -using Wino.Mail.ViewModels.Data; -using Wino.Messaging.Client.Navigation; -using Wino.Messaging.UI; - -namespace Wino.Views; - -public sealed partial class ManageAccountsPage : ManageAccountsPageAbstract, - IRecipient, - IRecipient, - IRecipient, - IRecipient -{ - public ObservableCollection PageHistory { get; set; } = new ObservableCollection(); - - - public ManageAccountsPage() - { - InitializeComponent(); - } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - // Re-register message handlers after base.OnNavigatedTo unregisters all handlers - WeakReferenceMessenger.Default.Register(this); - WeakReferenceMessenger.Default.Register(this); - WeakReferenceMessenger.Default.Register(this); - WeakReferenceMessenger.Default.Register(this); - - var initialRequest = new BreadcrumbNavigationRequested(Translator.MenuManageAccounts, WinoPage.AccountManagementPage); - PageHistory.Add(new BreadcrumbNavigationItemViewModel(initialRequest, true)); - - var accountManagementPageType = ViewModel.NavigationService.GetPageType(WinoPage.AccountManagementPage); - - AccountPagesFrame.Navigate(accountManagementPageType, null, new SuppressNavigationTransitionInfo()); - } - - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - // Explicitly unregister our message handlers before base.OnNavigatingFrom calls UnregisterAll - WeakReferenceMessenger.Default.Unregister(this); - WeakReferenceMessenger.Default.Unregister(this); - WeakReferenceMessenger.Default.Unregister(this); - WeakReferenceMessenger.Default.Unregister(this); - - base.OnNavigatingFrom(e); - } - - void IRecipient.Receive(BreadcrumbNavigationRequested message) - { - var pageType = ViewModel.NavigationService.GetPageType(message.PageType); - - if (pageType == null) return; - - AccountPagesFrame.Navigate(pageType, message.Parameter, new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight }); - - PageHistory.ForEach(a => a.IsActive = false); - - PageHistory.Add(new BreadcrumbNavigationItemViewModel(message, true)); - } - - private void GoBackFrame() - { - if (AccountPagesFrame.CanGoBack) - { - PageHistory.RemoveAt(PageHistory.Count - 1); - - AccountPagesFrame.GoBack(new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight }); - } - } - - private void BreadItemClicked(Microsoft.UI.Xaml.Controls.BreadcrumbBar sender, Microsoft.UI.Xaml.Controls.BreadcrumbBarItemClickedEventArgs args) - { - var clickedPageHistory = PageHistory[args.Index]; - - while (PageHistory.FirstOrDefault(a => a.IsActive) != clickedPageHistory) - { - AccountPagesFrame.GoBack(new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight }); - PageHistory.RemoveAt(PageHistory.Count - 1); - PageHistory[PageHistory.Count - 1].IsActive = true; - } - } - - public void Receive(BackBreadcrumNavigationRequested message) - { - GoBackFrame(); - } - - public void Receive(AccountUpdatedMessage message) - { - var activePage = PageHistory.FirstOrDefault(a => a.Request.PageType == WinoPage.AccountDetailsPage); - - if (activePage == null) return; - - DispatcherQueue.TryEnqueue(() => - { - activePage.Title = message.Account.Name; - }); - } - - public void Receive(MergedInboxRenamed message) - { - // TODO: Find better way to retrieve page history from the stack for the merged account. - var activePage = PageHistory.LastOrDefault(); - - if (activePage == null) return; - - activePage.Title = message.NewName; - } -} diff --git a/Wino.Core.WinUI/Views/SettingOptionsPage.xaml b/Wino.Core.WinUI/Views/SettingOptionsPage.xaml deleted file mode 100644 index c6e4acc9..00000000 --- a/Wino.Core.WinUI/Views/SettingOptionsPage.xaml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Views/SettingOptionsPage.xaml.cs b/Wino.Core.WinUI/Views/SettingOptionsPage.xaml.cs deleted file mode 100644 index d5e35bd6..00000000 --- a/Wino.Core.WinUI/Views/SettingOptionsPage.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Wino.Views.Abstract; - -namespace Wino.Views.Settings; - -public sealed partial class SettingOptionsPage : SettingOptionsPageAbstract -{ - public SettingOptionsPage() - { - InitializeComponent(); - } -} diff --git a/Wino.Core.WinUI/Views/SettingsPage.xaml b/Wino.Core.WinUI/Views/SettingsPage.xaml deleted file mode 100644 index 4f8a8ba3..00000000 --- a/Wino.Core.WinUI/Views/SettingsPage.xaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wino.Core.WinUI/Views/SettingsPage.xaml.cs b/Wino.Core.WinUI/Views/SettingsPage.xaml.cs deleted file mode 100644 index e44bfbcc..00000000 --- a/Wino.Core.WinUI/Views/SettingsPage.xaml.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections.ObjectModel; -using System.Linq; -using CommunityToolkit.Mvvm.Messaging; -using MoreLinq; -using Microsoft.UI.Xaml.Media.Animation; -using Microsoft.UI.Xaml.Navigation; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Mail.ViewModels.Data; -using Wino.Messaging.Client.Navigation; -using Wino.Views.Abstract; -using Wino.Views.Settings; - -namespace Wino.Views; - -public sealed partial class SettingsPage : SettingsPageAbstract, IRecipient -{ - public ObservableCollection PageHistory { get; set; } = []; - - public SettingsPage() - { - InitializeComponent(); - } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - SettingsFrame.Navigate(typeof(SettingOptionsPage), null, new SuppressNavigationTransitionInfo()); - - var initialRequest = new BreadcrumbNavigationRequested(Translator.MenuSettings, WinoPage.SettingOptionsPage); - PageHistory.Add(new BreadcrumbNavigationItemViewModel(initialRequest, true)); - - if (e.Parameter is WinoPage parameterPage) - { - switch (parameterPage) - { - case WinoPage.AppPreferencesPage: - WeakReferenceMessenger.Default.Send(new BreadcrumbNavigationRequested(Translator.SettingsAppPreferences_Title, WinoPage.AppPreferencesPage)); - break; - case WinoPage.PersonalizationPage: - WeakReferenceMessenger.Default.Send(new BreadcrumbNavigationRequested(Translator.SettingsPersonalization_Title, WinoPage.PersonalizationPage)); - break; - } - } - } - - public override void OnLanguageChanged() - { - base.OnLanguageChanged(); - - // Update Settings header in breadcrumb. - - var settingsHeader = PageHistory.FirstOrDefault(); - - if (settingsHeader == null) return; - - settingsHeader.Title = Translator.MenuSettings; - } - - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - base.OnNavigatingFrom(e); - } - - protected override void RegisterRecipients() - { - base.RegisterRecipients(); - - WeakReferenceMessenger.Default.Register(this); - } - - protected override void UnregisterRecipients() - { - base.UnregisterRecipients(); - - WeakReferenceMessenger.Default.Unregister(this); - } - - void IRecipient.Receive(BreadcrumbNavigationRequested message) - { - var pageType = ViewModel.NavigationService.GetPageType(message.PageType); - - if (pageType == null) return; - - SettingsFrame.Navigate(pageType, message.Parameter, new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight }); - - PageHistory.ForEach(a => a.IsActive = false); - - PageHistory.Add(new BreadcrumbNavigationItemViewModel(message, true)); - } - - private void BreadItemClicked(Microsoft.UI.Xaml.Controls.BreadcrumbBar sender, Microsoft.UI.Xaml.Controls.BreadcrumbBarItemClickedEventArgs args) - { - var clickedPageHistory = PageHistory[args.Index]; - var activeIndex = PageHistory.IndexOf(PageHistory.FirstOrDefault(a => a.IsActive)); - - while (PageHistory.FirstOrDefault(a => a.IsActive) != clickedPageHistory) - { - SettingsFrame.GoBack(new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight }); - PageHistory.RemoveAt(PageHistory.Count - 1); - PageHistory[PageHistory.Count - 1].IsActive = true; - } - } -} diff --git a/Wino.Core.WinUI/Wino.Core.WinUI.csproj b/Wino.Core.WinUI/Wino.Core.WinUI.csproj deleted file mode 100644 index d674b2a8..00000000 --- a/Wino.Core.WinUI/Wino.Core.WinUI.csproj +++ /dev/null @@ -1,67 +0,0 @@ - - - net10.0-windows10.0.19041.0 - 10.0.17763.0 - Wino.Core.WinUI - x86;x64;arm64 - win-x86;win-x64;win-arm64 - true - true - true - true - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Wino.Core.WinUI/WinoApplication.cs b/Wino.Core.WinUI/WinoApplication.cs deleted file mode 100644 index a0fd5e54..00000000 --- a/Wino.Core.WinUI/WinoApplication.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using CommunityToolkit.Mvvm.Messaging; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.UI.Xaml; -using Microsoft.Windows.Globalization; -using Nito.AsyncEx; -using Serilog; -using Windows.ApplicationModel.Activation; -using Windows.ApplicationModel.Core; -using Windows.Foundation.Metadata; -using Windows.Storage; -using Wino.Core.Domain; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Translations; -using Wino.Core.Services; -using Wino.Messaging.Client.Shell; -using Wino.Services; -using WinUIEx; - -namespace Wino.Core.WinUI; - -public abstract class WinoApplication : Application, IRecipient -{ - public new static WinoApplication Current => (WinoApplication)Application.Current; - public const string WinoLaunchLogPrefix = "[Wino Launch] "; - - public IServiceProvider Services { get; } - protected IWinoLogger LogInitializer { get; } - protected IApplicationConfiguration AppConfiguration { get; } - public INewThemeService NewThemeService { get; } - public IUnderlyingThemeService UnderlyingThemeService { get; } - public IThumbnailService ThumbnailService { get; } - protected IDatabaseService DatabaseService { get; } - protected ITranslationService TranslationService { get; } - - public static WindowEx MainWindow { get; set; } - - protected WinoApplication() - { - ConfigurePrelaunch(); - - Services = ConfigureServices(); - - AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; - TaskScheduler.UnobservedTaskException += OnUnobservedTaskException; - UnhandledException += OnAppUnhandledException; - - LogInitializer = Services.GetService(); - AppConfiguration = Services.GetService(); - - NewThemeService = Services.GetService(); - DatabaseService = Services.GetService(); - TranslationService = Services.GetService(); - UnderlyingThemeService = Services.GetService(); - ThumbnailService = Services.GetService(); - - // Make sure the paths are setup on app start. - AppConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path; - AppConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(ApplicationConfiguration.SharedFolderName).Path; - AppConfiguration.ApplicationTempFolderPath = ApplicationData.Current.TemporaryFolder.Path; - - ConfigureLogging(); - } - - private void CurrentDomain_UnhandledException(object sender, System.UnhandledExceptionEventArgs e) - => Log.Fatal(e.ExceptionObject as Exception, "AppDomain Unhandled Exception"); - - private void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) - => Log.Error(e.Exception, "Unobserved Task Exception"); - - private void OnAppUnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) - { - Log.Fatal(e.Exception, "Unhandled Exception"); - e.Handled = true; - } - - public IEnumerable GetActivationServices() - { - yield return DatabaseService; - yield return TranslationService; - yield return Services.GetService(); - } - - public Task InitializeServicesAsync() => GetActivationServices().Select(a => a.InitializeAsync()).WhenAll(); - - public bool IsInteractiveLaunchArgs(object args) => args is IActivatedEventArgs; - - public void LogActivation(string log) => Log.Information($"{WinoLaunchLogPrefix}{log}"); - - protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) - { - base.OnLaunched(args); - - LogActivation("OnLaunched."); - } - - private void ConfigurePrelaunch() - { - if (ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch")) - CoreApplication.EnablePrelaunch(true); - } - - public abstract IServiceProvider ConfigureServices(); - - public void ConfigureLogging() - { - string logFilePath = Path.Combine(ApplicationData.Current.LocalFolder.Path, Constants.ClientLogFile); - LogInitializer.SetupLogger(logFilePath); - } - - public virtual void OnLanguageChanged(AppLanguageModel languageModel) - { - var newCulture = new CultureInfo(languageModel.Code); - - ApplicationLanguages.PrimaryLanguageOverride = languageModel.Code; - - CultureInfo.DefaultThreadCurrentCulture = newCulture; - CultureInfo.DefaultThreadCurrentUICulture = newCulture; - } - - public void Receive(LanguageChanged message) => OnLanguageChanged(TranslationService.CurrentLanguageModel); -} diff --git a/Wino.Server/App.xaml b/Wino.Server/App.xaml deleted file mode 100644 index f36b711a..00000000 --- a/Wino.Server/App.xaml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/Wino.Server/App.xaml.cs b/Wino.Server/App.xaml.cs deleted file mode 100644 index cc095c29..00000000 --- a/Wino.Server/App.xaml.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using H.NotifyIcon; -using Microsoft.Extensions.DependencyInjection; -using Serilog; -using Windows.Storage; -using Wino.Calendar.Services; -using Wino.Core; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.UWP.Services; -using Wino.Server.Core; -using Wino.Server.MessageHandlers; -using Wino.Services; - -namespace Wino.Server; - -/// -/// Single instance Wino Server. -/// Instancing is done using Mutex. -/// App will not start if another instance is already running. -/// App will let running server know that server execution is triggered, which will -/// led server to start new connection to requesting UWP app. -/// -public partial class App : Application -{ - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId); - - private const string FRAME_WINDOW = "ApplicationFrameWindow"; - - public const string WinoMailLaunchProtocol = "wino.mail.launch"; - public const string WinoCalendarLaunchProtocol = "wino.calendar.launch"; - - private const string NotifyIconResourceKey = "NotifyIcon"; - - - private const string WinoMailServerAppName = "Wino.Mail.Server"; - private const string WinoMailServerActivatedName = "Wino.Mail.Server.Activated"; - - private const string WinoCalendarServerAppName = "Wino.Calendar.Server"; - private const string WinoCalendarServerActivatedName = "Wino.Calendar.Server.Activated"; - public new static App Current => (App)Application.Current; - - public WinoAppType WinoServerType { get; private set; } - - private TaskbarIcon? _notifyIcon; - private static Mutex _mutex = null; - private EventWaitHandle _eventWaitHandle; - - public IServiceProvider Services { get; private set; } - - private ServiceProvider ConfigureServices() - { - var services = new ServiceCollection(); - - services.AddTransient(); - services.AddTransient(); - - services.RegisterCoreServices(); - services.RegisterSharedServices(); - - // Below services belongs to UWP.Core package and some APIs are not available for WPF. - // We register them here to avoid compilation errors. - - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddTransient(); - services.AddTransient(); - services.AddSingleton(); - services.AddSingleton(); - - // Register server message handler factory. - var serverMessageHandlerFactory = new ServerMessageHandlerFactory(); - serverMessageHandlerFactory.Setup(services); - - services.AddSingleton(serverMessageHandlerFactory); - - // Server type related services. - // TODO: Better abstraction. - - if (WinoServerType == WinoAppType.Mail) - { - services.AddSingleton(); - } - else - { - services.AddSingleton(); - } - - return services.BuildServiceProvider(); - } - - private async Task InitializeNewServerAsync() - { - // Make sure app config is setup before anything else. - var applicationFolderConfiguration = Services.GetService(); - - applicationFolderConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path; - applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(ApplicationConfiguration.SharedFolderName).Path; - applicationFolderConfiguration.ApplicationTempFolderPath = ApplicationData.Current.TemporaryFolder.Path; - - // Setup logger - var logInitializer = Services.GetService(); - var logFilePath = Path.Combine(ApplicationData.Current.LocalFolder.Path, Constants.ServerLogFile); - - logInitializer.SetupLogger(logFilePath); - - // Make sure the database is ready. - var databaseService = Services.GetService(); - await databaseService.InitializeAsync(); - - // Setup core window handler for native app service. - // WPF app uses UWP app's window handle to display authentication dialog. - var nativeAppService = Services.GetService(); - nativeAppService.GetCoreWindowHwnd = FindUWPClientWindowHandle; - - // Initialize translations. - var translationService = Services.GetService(); - await translationService.InitializeAsync(); - - // Make sure all accounts have synchronizers. - var synchronizerFactory = Services.GetService(); - await synchronizerFactory.InitializeAsync(); - - // Load up the server view model. - var serverViewModel = Services.GetRequiredService(); - await serverViewModel.InitializeAsync(); - - return serverViewModel; - } - - /// - /// OutlookAuthenticator for WAM requires window handle to display the dialog. - /// Since server app is windowless, we need to find the UWP app window handle. - /// - /// - /// Pointer to running UWP app's hwnd. - private IntPtr FindUWPClientWindowHandle() - { - string processName = WinoServerType == WinoAppType.Mail ? "Wino.Mail" : "Wino.Calendar"; - - var proc = Process.GetProcessesByName(processName).FirstOrDefault() ?? throw new Exception($"{processName} client is not running."); - - for (IntPtr appWindow = FindWindowEx(IntPtr.Zero, IntPtr.Zero, FRAME_WINDOW, null); appWindow != IntPtr.Zero; - appWindow = FindWindowEx(IntPtr.Zero, appWindow, FRAME_WINDOW, null)) - { - IntPtr coreWindow = FindWindowEx(appWindow, IntPtr.Zero, "Windows.UI.Core.CoreWindow", null); - if (coreWindow != IntPtr.Zero) - { - if (GetWindowThreadProcessId(coreWindow, out var corePid) == 0) - { - throw new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error()); - } - if (corePid == proc.Id) - { - return appWindow; - } - } - } - - return IntPtr.Zero; - } - - protected override async void OnStartup(StartupEventArgs e) - { - // Same server code runs for both Mail and Calendar. - - string winoAppTypeParameter = e.Args.Length > 0 ? e.Args[^1] : "Mail"; - - WinoServerType = winoAppTypeParameter == "Mail" ? WinoAppType.Mail : WinoAppType.Calendar; - - // TODO: Better abstraction. - - string serverName = WinoServerType == WinoAppType.Mail ? WinoMailServerAppName : WinoCalendarServerAppName; - string serverActivatedName = WinoServerType == WinoAppType.Mail ? WinoMailServerActivatedName : WinoCalendarServerActivatedName; - - _mutex = new Mutex(true, serverName, out bool isCreatedNew); - _eventWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, serverActivatedName); - - if (isCreatedNew) - { - AppDomain.CurrentDomain.UnhandledException += ServerCrashed; - Application.Current.DispatcherUnhandledException += UIThreadCrash; - TaskScheduler.UnobservedTaskException += TaskCrashed; - - // Ensure proper encodings are available for MimeKit - System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); - - // Spawn a thread which will be waiting for our event - var thread = new Thread(() => - { - while (_eventWaitHandle.WaitOne()) - { - if (_notifyIcon == null) return; - - Current.Dispatcher.BeginInvoke(async () => - { - if (_notifyIcon.DataContext is ServerViewModel trayIconViewModel) - { - await trayIconViewModel.ReconnectAsync(); - } - }); - } - }) - { - // It is important mark it as background otherwise it will prevent app from exiting. - IsBackground = true - }; - thread.Start(); - - Services = ConfigureServices(); - - base.OnStartup(e); - - var serverViewModel = await InitializeNewServerAsync(); - - // Create taskbar icon for the new server. - _notifyIcon = (TaskbarIcon)FindResource(NotifyIconResourceKey); - _notifyIcon.DataContext = serverViewModel; - _notifyIcon.ForceCreate(enablesEfficiencyMode: true); - - // Hide the icon if user has set it to invisible. - var preferencesService = Services.GetService(); - ChangeNotifyIconVisiblity(preferencesService.ServerTerminationBehavior != ServerBackgroundMode.Invisible); - } - else - { - // Notify other instance so it could reconnect to UWP app if needed. - _eventWaitHandle.Set(); - - // Terminate this instance. - Shutdown(); - } - } - - private void TaskCrashed(object sender, UnobservedTaskExceptionEventArgs e) => Log.Error(e.Exception, "Server task crashed."); - - private void UIThreadCrash(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) => Log.Error(e.Exception, "Server UI thread crashed."); - - private void ServerCrashed(object sender, UnhandledExceptionEventArgs e) => Log.Error((Exception)e.ExceptionObject, "Server crashed."); - - protected override void OnExit(ExitEventArgs e) - { - _notifyIcon?.Dispose(); - base.OnExit(e); - } - - public void ChangeNotifyIconVisiblity(bool isVisible) - { - if (_notifyIcon == null) return; - - Current.Dispatcher.BeginInvoke(() => - { - _notifyIcon.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed; - }); - } -} diff --git a/Wino.Server/AssemblyInfo.cs b/Wino.Server/AssemblyInfo.cs deleted file mode 100644 index b0ec8275..00000000 --- a/Wino.Server/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows; - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/Wino.Server/Core/ServerMessageHandlerBase.cs b/Wino.Server/Core/ServerMessageHandlerBase.cs deleted file mode 100644 index a28cd6ca..00000000 --- a/Wino.Server/Core/ServerMessageHandlerBase.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Windows.ApplicationModel.AppService; -using Windows.Foundation.Collections; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging; - -namespace Wino.Server.Core; - -public abstract class ServerMessageHandlerBase -{ - public string HandlingRequestType { get; } - - public abstract Task ExecuteAsync(IClientMessage message, AppServiceRequest request = null, CancellationToken cancellationToken = default); -} - -public abstract class ServerMessageHandler : ServerMessageHandlerBase where TClientMessage : IClientMessage -{ - /// - /// Response to return when server encounters and exception while executing code. - /// - /// Exception that target threw. - /// Default response on failure object. - public abstract WinoServerResponse FailureDefaultResponse(Exception ex); - - - /// - /// Safely executes the handler code and returns the response. - /// This call will never crash the server. Exceptions encountered will be handled and returned as response. - /// - /// IClientMessage that client asked the response for from the server. - /// optional AppServiceRequest to return response for. - /// Cancellation token. - /// Response object that server executes for the given method. - public override async Task ExecuteAsync(IClientMessage message, AppServiceRequest request = null, CancellationToken cancellationToken = default) - { - WinoServerResponse response = default; - - try - { - response = await HandleAsync((TClientMessage)message, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - response = FailureDefaultResponse(ex); - } - finally - { - // No need to send response if request is null. - // Handler might've been called directly from the server itself. - if (request != null) - { - var valueSet = new ValueSet() - { - { MessageConstants.MessageDataKey, JsonSerializer.Serialize(response) } - }; - - await request.SendResponseAsync(valueSet); - } - } - } - - /// - /// Code that will be executed directly on the server. - /// All handlers must implement this method. - /// Response is wrapped with WinoServerResponse. - /// - /// IClientMessage that client asked the response for from the server. - /// Cancellation token. - protected abstract Task> HandleAsync(TClientMessage message, CancellationToken cancellationToken = default); -} diff --git a/Wino.Server/Core/ServerMessageHandlerFactory.cs b/Wino.Server/Core/ServerMessageHandlerFactory.cs deleted file mode 100644 index abbb1e79..00000000 --- a/Wino.Server/Core/ServerMessageHandlerFactory.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using Wino.Core.Domain.Models.Requests; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Messaging.Server; -using Wino.Server.MessageHandlers; - -namespace Wino.Server.Core; - -public class ServerMessageHandlerFactory : IServerMessageHandlerFactory -{ - public ServerMessageHandlerBase GetHandler(string typeName) - { - return typeName switch - { - nameof(NewMailSynchronizationRequested) => App.Current.Services.GetService(), - nameof(NewCalendarSynchronizationRequested) => App.Current.Services.GetService(), - nameof(ServerRequestPackage) => App.Current.Services.GetService(), - nameof(DownloadMissingMessageRequested) => App.Current.Services.GetService(), - nameof(AuthorizationRequested) => App.Current.Services.GetService(), - nameof(SynchronizationExistenceCheckRequest) => App.Current.Services.GetService(), - nameof(ServerTerminationModeChanged) => App.Current.Services.GetService(), - nameof(TerminateServerRequested) => App.Current.Services.GetService(), - nameof(ImapConnectivityTestRequested) => App.Current.Services.GetService(), - nameof(KillAccountSynchronizerRequested) => App.Current.Services.GetService(), - nameof(OnlineSearchRequested) => App.Current.Services.GetService(), - _ => throw new Exception($"Server handler for {typeName} is not registered."), - }; - } - - public void Setup(IServiceCollection serviceCollection) - { - // Register all known handlers. - - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - serviceCollection.AddTransient(); - } -} diff --git a/Wino.Server/Images/Wino_Icon.ico b/Wino.Server/Images/Wino_Icon.ico deleted file mode 100644 index be12c893..00000000 Binary files a/Wino.Server/Images/Wino_Icon.ico and /dev/null differ diff --git a/Wino.Server/Interfaces/IServerMessageHandlerFactory.cs b/Wino.Server/Interfaces/IServerMessageHandlerFactory.cs deleted file mode 100644 index 32e6d003..00000000 --- a/Wino.Server/Interfaces/IServerMessageHandlerFactory.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public interface IServerMessageHandlerFactory -{ - void Setup(IServiceCollection serviceCollection); - - ServerMessageHandlerBase GetHandler(string typeName); -} diff --git a/Wino.Server/MessageHandlers/AuthenticationHandler.cs b/Wino.Server/MessageHandlers/AuthenticationHandler.cs deleted file mode 100644 index bf53099c..00000000 --- a/Wino.Server/MessageHandlers/AuthenticationHandler.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Authentication; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class AuthenticationHandler : ServerMessageHandler -{ - private readonly IAuthenticationProvider _authenticationProvider; - - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - public AuthenticationHandler(IAuthenticationProvider authenticationProvider) - { - _authenticationProvider = authenticationProvider; - } - - protected override async Task> HandleAsync(AuthorizationRequested message, - CancellationToken cancellationToken = default) - { - var authenticator = _authenticationProvider.GetAuthenticator(message.MailProviderType); - - // Some users are having issues with Gmail authentication. - // Their browsers may never launch to complete authentication. - // Offer to copy auth url for them to complete it manually. - // Redirection will occur to the app and the token will be saved. - - if (message.ProposeCopyAuthorizationURL && authenticator is IGmailAuthenticator gmailAuthenticator) - { - gmailAuthenticator.ProposeCopyAuthURL = true; - } - - TokenInformationEx generatedToken = null; - - if (message.CreatedAccount != null) - { - generatedToken = await authenticator.GetTokenInformationAsync(message.CreatedAccount); - } - else - { - // Initial authentication request. - // There is no account to get token for. - - generatedToken = await authenticator.GenerateTokenInformationAsync(message.CreatedAccount); - } - - return WinoServerResponse.CreateSuccessResponse(generatedToken); - } -} diff --git a/Wino.Server/MessageHandlers/CalendarSynchronizationRequestHandler.cs b/Wino.Server/MessageHandlers/CalendarSynchronizationRequestHandler.cs deleted file mode 100644 index 4f60743a..00000000 --- a/Wino.Server/MessageHandlers/CalendarSynchronizationRequestHandler.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class CalendarSynchronizationRequestHandler : ServerMessageHandler -{ - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - private readonly ISynchronizerFactory _synchronizerFactory; - - public CalendarSynchronizationRequestHandler(ISynchronizerFactory synchronizerFactory) - { - _synchronizerFactory = synchronizerFactory; - } - - protected override async Task> HandleAsync(NewCalendarSynchronizationRequested message, CancellationToken cancellationToken = default) - { - var synchronizer = await _synchronizerFactory.GetAccountSynchronizerAsync(message.Options.AccountId); - - try - { - var synchronizationResult = await synchronizer.SynchronizeCalendarEventsAsync(message.Options, cancellationToken); - - return WinoServerResponse.CreateSuccessResponse(synchronizationResult); - } - catch (Exception ex) - { - throw; - } - } -} diff --git a/Wino.Server/MessageHandlers/ImapConnectivityTestHandler.cs b/Wino.Server/MessageHandlers/ImapConnectivityTestHandler.cs deleted file mode 100644 index 5f69e9ac..00000000 --- a/Wino.Server/MessageHandlers/ImapConnectivityTestHandler.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Exceptions; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Connectivity; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class ImapConnectivityTestHandler : ServerMessageHandler -{ - private readonly IImapTestService _imapTestService; - - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - public ImapConnectivityTestHandler(IImapTestService imapTestService) - { - _imapTestService = imapTestService; - } - - protected override async Task> HandleAsync(ImapConnectivityTestRequested message, CancellationToken cancellationToken = default) - { - try - { - await _imapTestService.TestImapConnectionAsync(message.ServerInformation, message.IsSSLHandshakeAllowed); - - return WinoServerResponse.CreateSuccessResponse(ImapConnectivityTestResults.Success()); - } - catch (ImapTestSSLCertificateException sslTestException) - { - // User must confirm to continue ignoring the SSL certificate. - return WinoServerResponse.CreateSuccessResponse(ImapConnectivityTestResults.CertificateUIRequired(sslTestException.Issuer, sslTestException.ExpirationDateString, sslTestException.ValidFromDateString)); - } - catch (ImapClientPoolException clientPoolException) - { - // Connectivity failed with protocol log. - return WinoServerResponse.CreateSuccessResponse(ImapConnectivityTestResults.Failure(clientPoolException, clientPoolException.ProtocolLog)); - } - catch (Exception exception) - { - // Unknown error - return WinoServerResponse.CreateSuccessResponse(ImapConnectivityTestResults.Failure(exception, string.Empty)); - } - } -} diff --git a/Wino.Server/MessageHandlers/KillAccountSynchronizerHandler.cs b/Wino.Server/MessageHandlers/KillAccountSynchronizerHandler.cs deleted file mode 100644 index 881bad27..00000000 --- a/Wino.Server/MessageHandlers/KillAccountSynchronizerHandler.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class KillAccountSynchronizerHandler : ServerMessageHandler -{ - private readonly ISynchronizerFactory _synchronizerFactory; - - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - public KillAccountSynchronizerHandler(ISynchronizerFactory synchronizerFactory) - { - _synchronizerFactory = synchronizerFactory; - } - - protected override async Task> HandleAsync(KillAccountSynchronizerRequested message, CancellationToken cancellationToken = default) - { - await _synchronizerFactory.DeleteSynchronizerAsync(message.AccountId); - - return WinoServerResponse.CreateSuccessResponse(true); - } -} diff --git a/Wino.Server/MessageHandlers/MailSynchronizationRequestHandler.cs b/Wino.Server/MessageHandlers/MailSynchronizationRequestHandler.cs deleted file mode 100644 index e888c3fe..00000000 --- a/Wino.Server/MessageHandlers/MailSynchronizationRequestHandler.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Messaging.Server; -using Wino.Messaging.UI; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -/// -/// Handler for NewMailSynchronizationRequested from the client. -/// -public class MailSynchronizationRequestHandler : ServerMessageHandler -{ - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - private readonly ISynchronizerFactory _synchronizerFactory; - private readonly INotificationBuilder _notificationBuilder; - private readonly IAccountService _accountService; - private readonly IFolderService _folderService; - - public MailSynchronizationRequestHandler(ISynchronizerFactory synchronizerFactory, - INotificationBuilder notificationBuilder, - IAccountService accountService, - IFolderService folderService) - { - _synchronizerFactory = synchronizerFactory; - _notificationBuilder = notificationBuilder; - _accountService = accountService; - _folderService = folderService; - } - - protected override async Task> HandleAsync(NewMailSynchronizationRequested message, CancellationToken cancellationToken = default) - { - var synchronizer = await _synchronizerFactory.GetAccountSynchronizerAsync(message.Options.AccountId); - - // 1. Don't send message for sync completion when we execute requests. - // People are usually interested in seeing the notification after they trigger the synchronization. - - // 2. Don't send message for sync completion when we are synchronizing from the server. - // It happens very common and there is no need to send a message for each synchronization. - - bool shouldReportSynchronizationResult = - message.Options.Type != MailSynchronizationType.ExecuteRequests && - message.Options.Type != MailSynchronizationType.IMAPIdle && - message.Source == SynchronizationSource.Client; - - try - { - var synchronizationResult = await synchronizer.SynchronizeMailsAsync(message.Options, cancellationToken).ConfigureAwait(false); - - bool isNotificationsEnabled = await _accountService.IsNotificationsEnabled(synchronizer.Account.Id).ConfigureAwait(false); - - if (isNotificationsEnabled && (synchronizationResult.DownloadedMessages?.Any() ?? false)) - { - var accountInboxFolder = await _folderService.GetSpecialFolderByAccountIdAsync(message.Options.AccountId, SpecialFolderType.Inbox); - - if (accountInboxFolder != null) - { - await _notificationBuilder.CreateNotificationsAsync(accountInboxFolder.Id, synchronizationResult.DownloadedMessages); - } - } - - var isSynchronizationSucceeded = synchronizationResult.CompletedState == SynchronizationCompletedState.Success; - - // IDLE requests might be canceled successfully. - if (message.Options.Type == MailSynchronizationType.IMAPIdle && synchronizationResult.CompletedState == SynchronizationCompletedState.Canceled) - { - isSynchronizationSucceeded = true; - } - - // Update badge count of the notification task. - if (isSynchronizationSucceeded) - { - await _notificationBuilder.UpdateTaskbarIconBadgeAsync(); - } - - if (shouldReportSynchronizationResult) - { - var completedMessage = new AccountSynchronizationCompleted(message.Options.AccountId, - isSynchronizationSucceeded ? SynchronizationCompletedState.Success : SynchronizationCompletedState.Failed, - message.Options.GroupedSynchronizationTrackingId); - - WeakReferenceMessenger.Default.Send(completedMessage); - } - - return WinoServerResponse.CreateSuccessResponse(synchronizationResult); - } - // TODO: Following cases might always be thrown from server. Handle them properly. - - //catch (AuthenticationAttentionException) - //{ - // // TODO - // // await SetAccountAttentionAsync(accountId, AccountAttentionReason.InvalidCredentials); - //} - //catch (SystemFolderConfigurationMissingException) - //{ - // // TODO - // // await SetAccountAttentionAsync(accountId, AccountAttentionReason.MissingSystemFolderConfiguration); - //} - catch (Exception) - { - throw; - } - } -} diff --git a/Wino.Server/MessageHandlers/OnlineSearchRequestHandler.cs b/Wino.Server/MessageHandlers/OnlineSearchRequestHandler.cs deleted file mode 100644 index 6ba4ca7b..00000000 --- a/Wino.Server/MessageHandlers/OnlineSearchRequestHandler.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class OnlineSearchRequestHandler : ServerMessageHandler -{ - private readonly ISynchronizerFactory _synchronizerFactory; - - public OnlineSearchRequestHandler(ISynchronizerFactory synchronizerFactory) - { - _synchronizerFactory = synchronizerFactory; - } - - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - protected override async Task> HandleAsync(OnlineSearchRequested message, CancellationToken cancellationToken = default) - { - List synchronizers = new(); - - foreach (var accountId in message.AccountIds) - { - var synchronizer = await _synchronizerFactory.GetAccountSynchronizerAsync(accountId); - synchronizers.Add(synchronizer); - } - - var tasks = synchronizers.Select(s => s.OnlineSearchAsync(message.QueryText, message.Folders, cancellationToken)).ToList(); - var results = await Task.WhenAll(tasks); - - // Flatten the results from all synchronizers into a single list - var allResults = results.SelectMany(x => x).ToList(); - - return WinoServerResponse.CreateSuccessResponse(new OnlineSearchResult(allResults)); - } -} diff --git a/Wino.Server/MessageHandlers/ServerTerminationModeHandler.cs b/Wino.Server/MessageHandlers/ServerTerminationModeHandler.cs deleted file mode 100644 index 6c4af49f..00000000 --- a/Wino.Server/MessageHandlers/ServerTerminationModeHandler.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class ServerTerminationModeHandler : ServerMessageHandler -{ - public override WinoServerResponse FailureDefaultResponse(Exception ex) => WinoServerResponse.CreateErrorResponse(ex.Message); - - protected override Task> HandleAsync(ServerTerminationModeChanged message, CancellationToken cancellationToken = default) - { - WeakReferenceMessenger.Default.Send(message); - - return Task.FromResult(WinoServerResponse.CreateSuccessResponse(true)); - } -} diff --git a/Wino.Server/MessageHandlers/SingleMimeDownloadHandler.cs b/Wino.Server/MessageHandlers/SingleMimeDownloadHandler.cs deleted file mode 100644 index 1ad12981..00000000 --- a/Wino.Server/MessageHandlers/SingleMimeDownloadHandler.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class SingleMimeDownloadHandler : ServerMessageHandler -{ - public override WinoServerResponse FailureDefaultResponse(Exception ex) => WinoServerResponse.CreateErrorResponse(ex.Message); - - private readonly ISynchronizerFactory _synchronizerFactory; - public SingleMimeDownloadHandler(ISynchronizerFactory synchronizerFactory) - { - _synchronizerFactory = synchronizerFactory; - } - - protected override async Task> HandleAsync(DownloadMissingMessageRequested message, CancellationToken cancellationToken = default) - { - var synchronizer = await _synchronizerFactory.GetAccountSynchronizerAsync(message.AccountId); - - // TODO: ITransferProgress support is lost. - await synchronizer.DownloadMissingMimeMessageAsync(message.MailItem, null, cancellationToken); - - return WinoServerResponse.CreateSuccessResponse(true); - } -} diff --git a/Wino.Server/MessageHandlers/SyncExistenceHandler.cs b/Wino.Server/MessageHandlers/SyncExistenceHandler.cs deleted file mode 100644 index 815e0c14..00000000 --- a/Wino.Server/MessageHandlers/SyncExistenceHandler.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Server; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class SyncExistenceHandler : ServerMessageHandler -{ - public override WinoServerResponse FailureDefaultResponse(Exception ex) - => WinoServerResponse.CreateErrorResponse(ex.Message); - - private readonly ISynchronizerFactory _synchronizerFactory; - - public SyncExistenceHandler(ISynchronizerFactory synchronizerFactory) - { - _synchronizerFactory = synchronizerFactory; - } - - protected override async Task> HandleAsync(SynchronizationExistenceCheckRequest message, CancellationToken cancellationToken = default) - { - var synchronizer = await _synchronizerFactory.GetAccountSynchronizerAsync(message.AccountId); - - return WinoServerResponse.CreateSuccessResponse(synchronizer.State != Wino.Core.Domain.Enums.AccountSynchronizerState.Idle); - } -} diff --git a/Wino.Server/MessageHandlers/TerminateServerRequestHandler.cs b/Wino.Server/MessageHandlers/TerminateServerRequestHandler.cs deleted file mode 100644 index 3b5b98cc..00000000 --- a/Wino.Server/MessageHandlers/TerminateServerRequestHandler.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Serilog; -using Wino.Core.Domain.Models.Server; -using Wino.Messaging.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class TerminateServerRequestHandler : ServerMessageHandler -{ - public override WinoServerResponse FailureDefaultResponse(Exception ex) => WinoServerResponse.CreateErrorResponse(ex.Message); - - protected override Task> HandleAsync(TerminateServerRequested message, CancellationToken cancellationToken = default) - { - // This handler is only doing the logging right now. - // Client will always expect success response. - // Server will be terminated in the server context once the client gets the response. - - Log.Information("Terminate server is requested by client. Killing server."); - - return Task.FromResult(WinoServerResponse.CreateSuccessResponse(true)); - } -} diff --git a/Wino.Server/MessageHandlers/UserActionRequestHandler.cs b/Wino.Server/MessageHandlers/UserActionRequestHandler.cs deleted file mode 100644 index efaf8bb6..00000000 --- a/Wino.Server/MessageHandlers/UserActionRequestHandler.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Requests; -using Wino.Core.Domain.Models.Server; -using Wino.Server.Core; - -namespace Wino.Server.MessageHandlers; - -public class UserActionRequestHandler : ServerMessageHandler -{ - private readonly ISynchronizerFactory _synchronizerFactory; - - public override WinoServerResponse FailureDefaultResponse(Exception ex) => WinoServerResponse.CreateErrorResponse(ex.Message); - - public UserActionRequestHandler(ISynchronizerFactory synchronizerFactory) - { - _synchronizerFactory = synchronizerFactory; - } - - protected override async Task> HandleAsync(ServerRequestPackage package, CancellationToken cancellationToken = default) - { - var synchronizer = await _synchronizerFactory.GetAccountSynchronizerAsync(package.AccountId); - synchronizer.QueueRequest(package.Request); - - return WinoServerResponse.CreateSuccessResponse(true); - } -} diff --git a/Wino.Server/ServerContext.cs b/Wino.Server/ServerContext.cs deleted file mode 100644 index 4219324a..00000000 --- a/Wino.Server/ServerContext.cs +++ /dev/null @@ -1,404 +0,0 @@ -using System; -using System.Diagnostics; -using System.Text.Json; -using System.Threading.Tasks; -using System.Windows; -using CommunityToolkit.Mvvm.Messaging; -using Serilog; -using Windows.ApplicationModel; -using Windows.ApplicationModel.AppService; -using Windows.Foundation.Collections; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Requests; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Core.Integration.Json; -using Wino.Messaging; -using Wino.Messaging.Enums; -using Wino.Messaging.Server; -using Wino.Messaging.UI; -using Wino.Server.MessageHandlers; -using Wino.Services; - -namespace Wino.Server; - -public class ServerContext : - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient, - IRecipient -{ - private const double MinimumSynchronizationIntervalMinutes = 1; - - private readonly System.Timers.Timer _timer = new System.Timers.Timer(); - private static object connectionLock = new object(); - - private AppServiceConnection connection = null; - - private readonly IServerMessageHandlerFactory _serverMessageHandlerFactory; - private readonly IAccountService _accountService; - private readonly IPreferencesService _preferencesService; - private readonly JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions - { - TypeInfoResolver = new ServerRequestTypeInfoResolver() - }; - - public ServerContext(IDatabaseService databaseService, - IApplicationConfiguration applicationFolderConfiguration, - ISynchronizerFactory synchronizerFactory, - IServerMessageHandlerFactory serverMessageHandlerFactory, - IAccountService accountService, - IPreferencesService preferencesService) - { - _preferencesService = preferencesService; - - _timer.Elapsed += SynchronizationTimerTriggered; - _preferencesService.PropertyChanged += PreferencesUpdated; - - _serverMessageHandlerFactory = serverMessageHandlerFactory; - _accountService = accountService; - - WeakReferenceMessenger.Default.RegisterAll(this); - - // Setup timer for synchronization. - RestartSynchronizationTimer(); - } - - private void PreferencesUpdated(object sender, System.ComponentModel.PropertyChangedEventArgs e) - { - if (e.PropertyName == nameof(IPreferencesService.EmailSyncIntervalMinutes)) - RestartSynchronizationTimer(); - } - - private void RestartSynchronizationTimer() - { - _timer.Stop(); - - // Ensure that the interval is at least 1 minute. - _timer.Interval = 1000 * 60 * Math.Max(MinimumSynchronizationIntervalMinutes, _preferencesService.EmailSyncIntervalMinutes); - _timer.Start(); - } - - private async void SynchronizationTimerTriggered(object sender, System.Timers.ElapsedEventArgs e) - { - if (Debugger.IsAttached) return; - - // Send sync request for all accounts. - - var accounts = await _accountService.GetAccountsAsync(); - - foreach (var account in accounts) - { - var options = new MailSynchronizationOptions - { - AccountId = account.Id, - Type = MailSynchronizationType.InboxOnly, - }; - - var request = new NewMailSynchronizationRequested(options, SynchronizationSource.Server); - - await ExecuteServerMessageSafeAsync(null, request); - } - } - - #region Message Handlers - - public async void Receive(MailAddedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountCreatedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountUpdatedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountRemovedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(DraftCreated message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(DraftFailed message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(DraftMapped message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(FolderRenamed message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(FolderSynchronizationEnabled message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(MailDownloadedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(MailRemovedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(MailUpdatedMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(MergedInboxRenamed message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountSynchronizationCompleted message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(RefreshUnreadCountsMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountSynchronizerStateChanged message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountFolderConfigurationUpdated message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(CopyAuthURLRequested message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(NewMailSynchronizationRequested message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(OnlineSearchRequested message) => await SendMessageAsync(MessageType.UIMessage, message); - - public async void Receive(AccountCacheResetMessage message) => await SendMessageAsync(MessageType.UIMessage, message); - - #endregion - - private string GetAppPackagFamilyName() - { - // If running as a standalone app, Package will throw exception. - // Return hardcoded value for debugging purposes. - // Connection will not be available in this case. - - try - { - return Package.Current.Id.FamilyName; - } - catch (Exception) - { - return "Debug.Wino.Server.FamilyName"; - } - } - - /// - /// Open connection to UWP app service - /// - public async Task InitializeAppServiceConnectionAsync() - { - if (connection != null) DisposeConnection(); - - connection = new AppServiceConnection - { - AppServiceName = "WinoInteropService", - PackageFamilyName = GetAppPackagFamilyName() - }; - - connection.RequestReceived += OnWinRTMessageReceived; - connection.ServiceClosed += OnConnectionClosed; - - AppServiceConnectionStatus status = await connection.OpenAsync(); - - if (status != AppServiceConnectionStatus.Success) - { - Log.Error("Opening server connection failed. Status: {status}", status); - - DisposeConnection(); - } - } - - /// - /// Disposes current connection to UWP app service. - /// - private void DisposeConnection() - { - lock (connectionLock) - { - if (connection == null) return; - - connection.RequestReceived -= OnWinRTMessageReceived; - connection.ServiceClosed -= OnConnectionClosed; - - connection.Dispose(); - connection = null; - } - } - - /// - /// Sends a serialized object to UWP application if connection exists with given type. - /// - /// Type of the message. - /// IServerMessage object that will be serialized. - /// - /// When the message is not IServerMessage. - private async Task SendMessageAsync(MessageType messageType, object message) - { - if (connection == null) return; - - if (message is not IUIMessage serverMessage) - throw new ArgumentException("Server message must be a type of IUIMessage"); - - string json = JsonSerializer.Serialize(message); - - var set = new ValueSet - { - { MessageConstants.MessageTypeKey, (int)messageType }, - { MessageConstants.MessageDataKey, json }, - { MessageConstants.MessageDataTypeKey, message.GetType().Name } - }; - - try - { - await connection.SendMessageAsync(set); - } - catch (InvalidOperationException) - { - // Connection might've been disposed during the SendMessageAsync call. - // This is a safe way to handle the exception. - // We don't lock the connection since this request may take sometime to complete. - } - catch (Exception exception) - { - Log.Error(exception, "SendMessageAsync threw an exception"); - } - } - - private void OnConnectionClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) - { - // UWP app might've been terminated or suspended. - // At this point, we must keep active synchronizations going, but connection is lost. - // As long as this process is alive, database will be kept updated, but no messages will be sent. - - DisposeConnection(); - } - - private async void OnWinRTMessageReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args) - { - if (args.Request.Message.TryGetValue(MessageConstants.MessageTypeKey, out object messageTypeObject) && messageTypeObject is int messageTypeInt) - { - var messageType = (MessageType)messageTypeInt; - - if (args.Request.Message.TryGetValue(MessageConstants.MessageDataKey, out object messageDataObject) && messageDataObject is string messageJson) - { - if (!args.Request.Message.TryGetValue(MessageConstants.MessageDataTypeKey, out object dataTypeObject) || dataTypeObject is not string dataTypeName) - throw new ArgumentException("Message data type is missing."); - - if (messageType == MessageType.ServerMessage) - { - // Client is awaiting a response from server. - // ServerMessage calls are awaited on the server and response is returned back in the args. - - await HandleServerMessageAsync(messageJson, dataTypeName, args).ConfigureAwait(false); - } - else if (messageType == MessageType.UIMessage) - throw new Exception("Received UIMessage from UWP. This is not expected."); - } - } - } - - private async Task HandleServerMessageAsync(string messageJson, string typeName, AppServiceRequestReceivedEventArgs args) - { - switch (typeName) - { - case nameof(NewMailSynchronizationRequested): - Debug.WriteLine($"New mail synchronization requested."); - - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(NewCalendarSynchronizationRequested): - Debug.WriteLine($"New calendar synchronization requested."); - - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(DownloadMissingMessageRequested): - Debug.WriteLine($"Download missing message requested."); - - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(ServerRequestPackage): - var serverPackage = JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions); - - Debug.WriteLine(serverPackage); - - await ExecuteServerMessageSafeAsync(args, serverPackage); - break; - case nameof(AuthorizationRequested): - Debug.WriteLine($"Authorization requested."); - - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(SynchronizationExistenceCheckRequest): - - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - - case nameof(ServerTerminationModeChanged): - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(ImapConnectivityTestRequested): - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(TerminateServerRequested): - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - - KillServer(); - break; - case nameof(KillAccountSynchronizerRequested): - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - case nameof(OnlineSearchRequested): - await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize(messageJson, _jsonSerializerOptions)); - break; - default: - Debug.WriteLine($"Missing handler for {typeName} in the server. Check ServerContext.cs - HandleServerMessageAsync."); - break; - } - } - - private void KillServer() - { - DisposeConnection(); - - Application.Current.Dispatcher.Invoke(() => - { - Application.Current.Shutdown(); - }); - } - - /// - /// Executes ServerMessage coming from the UWP. - /// These requests are awaited and expected to return a response. - /// - /// App service request args. - /// Message that client sent to server. - private async Task ExecuteServerMessageSafeAsync(AppServiceRequestReceivedEventArgs args, IClientMessage message) - { - AppServiceDeferral deferral = args?.GetDeferral() ?? null; - - try - { - var messageName = message.GetType().Name; - - var handler = _serverMessageHandlerFactory.GetHandler(messageName); - await handler.ExecuteAsync(message, args?.Request ?? null).ConfigureAwait(false); - } - catch (Exception ex) - { - Log.Error(ex, "ExecuteServerMessageSafeAsync crashed."); - Debugger.Break(); - } - finally - { - deferral?.Complete(); - } - } - - public void Receive(ServerTerminationModeChanged message) - { - var backgroundMode = message.ServerBackgroundMode; - - bool isServerTrayIconVisible = backgroundMode == ServerBackgroundMode.MinimizedTray || backgroundMode == ServerBackgroundMode.Terminate; - - App.Current.ChangeNotifyIconVisiblity(isServerTrayIconVisible); - } -} diff --git a/Wino.Server/ServerViewModel.cs b/Wino.Server/ServerViewModel.cs deleted file mode 100644 index 42efac2c..00000000 --- a/Wino.Server/ServerViewModel.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; -using CommunityToolkit.Mvvm.ComponentModel; -using CommunityToolkit.Mvvm.Input; -using Windows.ApplicationModel; -using Windows.System; -using Wino.Core.Domain.Interfaces; - -namespace Wino.Server; - -public partial class ServerViewModel : ObservableObject, IInitializeAsync -{ - private readonly INotificationBuilder _notificationBuilder; - - public ServerContext Context { get; } - - public ServerViewModel(ServerContext serverContext, INotificationBuilder notificationBuilder) - { - Context = serverContext; - _notificationBuilder = notificationBuilder; - } - - [RelayCommand] - public Task LaunchWinoAsync() - { - return Launcher.LaunchUriAsync(new Uri($"{App.WinoMailLaunchProtocol}:")).AsTask(); - } - - /// - /// Shuts down the application. - /// - [RelayCommand] - public async Task ExitApplication() - { - // Find the running UWP app by AppDiagnosticInfo API and terminate it if possible. - var appDiagnosticInfos = await AppDiagnosticInfo.RequestInfoForPackageAsync(Package.Current.Id.FamilyName); - - var clientDiagnosticInfo = appDiagnosticInfos.FirstOrDefault(); - - if (clientDiagnosticInfo == null) - { - Debug.WriteLine($"Wino Mail client is not running. Termination is skipped."); - } - else - { - var appResourceGroupInfo = clientDiagnosticInfo.GetResourceGroups().FirstOrDefault(); - - if (appResourceGroupInfo != null) - { - await appResourceGroupInfo.StartTerminateAsync(); - - Debug.WriteLine($"Wino Mail client is terminated succesfully."); - } - } - - Application.Current.Shutdown(); - } - - public async Task ReconnectAsync() => await Context.InitializeAppServiceConnectionAsync(); - - public Task InitializeAsync() => Context.InitializeAppServiceConnectionAsync(); -} diff --git a/Wino.Server/TrayIconResources.xaml b/Wino.Server/TrayIconResources.xaml deleted file mode 100644 index 8d0225bf..00000000 --- a/Wino.Server/TrayIconResources.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - diff --git a/Wino.Server/Wino.Server.csproj b/Wino.Server/Wino.Server.csproj deleted file mode 100644 index 6adf9d21..00000000 --- a/Wino.Server/Wino.Server.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - net9.0-windows10.0.19041.0 - 10.0.19041.0 - WinExe - true - true - true - true - 10.0.22621.0 - x64;x86;ARM64 - win-x86;win-x64;win-arm64 - false - - - Wino.Server.App - - - - - - - - - - - - - - - - - Always - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WinoCalendar.Packaging/Images/LargeTile.scale-100.png b/WinoCalendar.Packaging/Images/LargeTile.scale-100.png deleted file mode 100644 index 74092a4c..00000000 Binary files a/WinoCalendar.Packaging/Images/LargeTile.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/LargeTile.scale-125.png b/WinoCalendar.Packaging/Images/LargeTile.scale-125.png deleted file mode 100644 index 4223410d..00000000 Binary files a/WinoCalendar.Packaging/Images/LargeTile.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/LargeTile.scale-150.png b/WinoCalendar.Packaging/Images/LargeTile.scale-150.png deleted file mode 100644 index 0a25ce33..00000000 Binary files a/WinoCalendar.Packaging/Images/LargeTile.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/LargeTile.scale-200.png b/WinoCalendar.Packaging/Images/LargeTile.scale-200.png deleted file mode 100644 index eebe3fe0..00000000 Binary files a/WinoCalendar.Packaging/Images/LargeTile.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/LargeTile.scale-400.png b/WinoCalendar.Packaging/Images/LargeTile.scale-400.png deleted file mode 100644 index 1784c97f..00000000 Binary files a/WinoCalendar.Packaging/Images/LargeTile.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SmallTile.scale-100.png b/WinoCalendar.Packaging/Images/SmallTile.scale-100.png deleted file mode 100644 index 9fb6e0bb..00000000 Binary files a/WinoCalendar.Packaging/Images/SmallTile.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SmallTile.scale-125.png b/WinoCalendar.Packaging/Images/SmallTile.scale-125.png deleted file mode 100644 index 02f2306f..00000000 Binary files a/WinoCalendar.Packaging/Images/SmallTile.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SmallTile.scale-150.png b/WinoCalendar.Packaging/Images/SmallTile.scale-150.png deleted file mode 100644 index 712c7b54..00000000 Binary files a/WinoCalendar.Packaging/Images/SmallTile.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SmallTile.scale-200.png b/WinoCalendar.Packaging/Images/SmallTile.scale-200.png deleted file mode 100644 index 1b1d60d0..00000000 Binary files a/WinoCalendar.Packaging/Images/SmallTile.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SmallTile.scale-400.png b/WinoCalendar.Packaging/Images/SmallTile.scale-400.png deleted file mode 100644 index 654e0e69..00000000 Binary files a/WinoCalendar.Packaging/Images/SmallTile.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SplashScreen.scale-100.png b/WinoCalendar.Packaging/Images/SplashScreen.scale-100.png deleted file mode 100644 index 64b90277..00000000 Binary files a/WinoCalendar.Packaging/Images/SplashScreen.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SplashScreen.scale-125.png b/WinoCalendar.Packaging/Images/SplashScreen.scale-125.png deleted file mode 100644 index 6035970a..00000000 Binary files a/WinoCalendar.Packaging/Images/SplashScreen.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SplashScreen.scale-150.png b/WinoCalendar.Packaging/Images/SplashScreen.scale-150.png deleted file mode 100644 index 67b3e9b3..00000000 Binary files a/WinoCalendar.Packaging/Images/SplashScreen.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SplashScreen.scale-200.png b/WinoCalendar.Packaging/Images/SplashScreen.scale-200.png deleted file mode 100644 index 62d7c654..00000000 Binary files a/WinoCalendar.Packaging/Images/SplashScreen.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/SplashScreen.scale-400.png b/WinoCalendar.Packaging/Images/SplashScreen.scale-400.png deleted file mode 100644 index 914ad53c..00000000 Binary files a/WinoCalendar.Packaging/Images/SplashScreen.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-100.png b/WinoCalendar.Packaging/Images/Square150x150Logo.scale-100.png deleted file mode 100644 index a0ee76fd..00000000 Binary files a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-125.png b/WinoCalendar.Packaging/Images/Square150x150Logo.scale-125.png deleted file mode 100644 index a9937d63..00000000 Binary files a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-150.png b/WinoCalendar.Packaging/Images/Square150x150Logo.scale-150.png deleted file mode 100644 index 0811b6f3..00000000 Binary files a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-200.png b/WinoCalendar.Packaging/Images/Square150x150Logo.scale-200.png deleted file mode 100644 index e731031c..00000000 Binary files a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-400.png b/WinoCalendar.Packaging/Images/Square150x150Logo.scale-400.png deleted file mode 100644 index 7a99db0d..00000000 Binary files a/WinoCalendar.Packaging/Images/Square150x150Logo.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png deleted file mode 100644 index d469abfc..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png deleted file mode 100644 index 1fce2a5d..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png deleted file mode 100644 index 35be4579..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png deleted file mode 100644 index 34f0de43..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png deleted file mode 100644 index 445dce04..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-16.png deleted file mode 100644 index d469abfc..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-16.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-24.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-24.png deleted file mode 100644 index 1fce2a5d..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-24.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-256.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-256.png deleted file mode 100644 index 35be4579..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-256.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-32.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-32.png deleted file mode 100644 index 34f0de43..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-32.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-48.png b/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-48.png deleted file mode 100644 index 445dce04..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-48.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-100.png b/WinoCalendar.Packaging/Images/Square44x44Logo.scale-100.png deleted file mode 100644 index 67389fcd..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-125.png b/WinoCalendar.Packaging/Images/Square44x44Logo.scale-125.png deleted file mode 100644 index 6d67883d..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-150.png b/WinoCalendar.Packaging/Images/Square44x44Logo.scale-150.png deleted file mode 100644 index 9f608bf8..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-200.png b/WinoCalendar.Packaging/Images/Square44x44Logo.scale-200.png deleted file mode 100644 index cbdf8653..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-400.png b/WinoCalendar.Packaging/Images/Square44x44Logo.scale-400.png deleted file mode 100644 index c2e70a20..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-16.png b/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-16.png deleted file mode 100644 index 64d343db..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-16.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-24.png b/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-24.png deleted file mode 100644 index 4bfd7760..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-24.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-256.png b/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-256.png deleted file mode 100644 index de8a5e6b..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-256.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-32.png b/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-32.png deleted file mode 100644 index 3736a2f7..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-32.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-48.png b/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-48.png deleted file mode 100644 index 536e4018..00000000 Binary files a/WinoCalendar.Packaging/Images/Square44x44Logo.targetsize-48.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/StoreLogo.scale-100.png b/WinoCalendar.Packaging/Images/StoreLogo.scale-100.png deleted file mode 100644 index c8f21747..00000000 Binary files a/WinoCalendar.Packaging/Images/StoreLogo.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/StoreLogo.scale-125.png b/WinoCalendar.Packaging/Images/StoreLogo.scale-125.png deleted file mode 100644 index 046acfc0..00000000 Binary files a/WinoCalendar.Packaging/Images/StoreLogo.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/StoreLogo.scale-150.png b/WinoCalendar.Packaging/Images/StoreLogo.scale-150.png deleted file mode 100644 index 4f5f779a..00000000 Binary files a/WinoCalendar.Packaging/Images/StoreLogo.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/StoreLogo.scale-200.png b/WinoCalendar.Packaging/Images/StoreLogo.scale-200.png deleted file mode 100644 index e666c775..00000000 Binary files a/WinoCalendar.Packaging/Images/StoreLogo.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/StoreLogo.scale-400.png b/WinoCalendar.Packaging/Images/StoreLogo.scale-400.png deleted file mode 100644 index d7bd1f3e..00000000 Binary files a/WinoCalendar.Packaging/Images/StoreLogo.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-100.png b/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-100.png deleted file mode 100644 index 7ee19f83..00000000 Binary files a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-100.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-125.png b/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-125.png deleted file mode 100644 index d7ae8df7..00000000 Binary files a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-125.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-150.png b/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-150.png deleted file mode 100644 index e39268f4..00000000 Binary files a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-150.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-200.png b/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-200.png deleted file mode 100644 index 64b90277..00000000 Binary files a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-400.png b/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-400.png deleted file mode 100644 index 62d7c654..00000000 Binary files a/WinoCalendar.Packaging/Images/Wide310x150Logo.scale-400.png and /dev/null differ diff --git a/WinoCalendar.Packaging/Package.appxmanifest b/WinoCalendar.Packaging/Package.appxmanifest deleted file mode 100644 index bf4c629e..00000000 --- a/WinoCalendar.Packaging/Package.appxmanifest +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - Wino Calendar - Burak KÖSE - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WinoCalendar.Packaging/WinoCalendar.Packaging.wapproj b/WinoCalendar.Packaging/WinoCalendar.Packaging.wapproj deleted file mode 100644 index 4e16d39e..00000000 --- a/WinoCalendar.Packaging/WinoCalendar.Packaging.wapproj +++ /dev/null @@ -1,122 +0,0 @@ - - - - 15.0 - - - - Debug - x86 - - - Release - x86 - - - Debug - x64 - - - Release - x64 - - - Debug - ARM64 - - - Release - ARM64 - - - - $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ - - - AppHostLocalDebugger - False - CoreClr - - - - 52c4d001-f64b-43d5-8b78-3be45aea63e9 - 10.0.26100.0 - 10.0.17763.0 - en-US - false - $(NoWarn);NU1702 - ..\Wino.Calendar\Wino.Calendar.csproj - - - - Package.appxmanifest - Designer - - - - - - - - - - True - True - Properties\PublishProfiles\win-$(Platform).pubxml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WinoMail.Packaging/Images/LargeTile.scale-100.png b/WinoMail.Packaging/Images/LargeTile.scale-100.png deleted file mode 100644 index aca6e4e2..00000000 Binary files a/WinoMail.Packaging/Images/LargeTile.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/LargeTile.scale-125.png b/WinoMail.Packaging/Images/LargeTile.scale-125.png deleted file mode 100644 index b80bf9d4..00000000 Binary files a/WinoMail.Packaging/Images/LargeTile.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/LargeTile.scale-150.png b/WinoMail.Packaging/Images/LargeTile.scale-150.png deleted file mode 100644 index 1ed2a001..00000000 Binary files a/WinoMail.Packaging/Images/LargeTile.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/LargeTile.scale-200.png b/WinoMail.Packaging/Images/LargeTile.scale-200.png deleted file mode 100644 index a8e471dd..00000000 Binary files a/WinoMail.Packaging/Images/LargeTile.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/LargeTile.scale-400.png b/WinoMail.Packaging/Images/LargeTile.scale-400.png deleted file mode 100644 index 54cea310..00000000 Binary files a/WinoMail.Packaging/Images/LargeTile.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/LockScreenLogo.scale-200.png b/WinoMail.Packaging/Images/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57ad..00000000 Binary files a/WinoMail.Packaging/Images/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SmallTile.scale-100.png b/WinoMail.Packaging/Images/SmallTile.scale-100.png deleted file mode 100644 index f0d52390..00000000 Binary files a/WinoMail.Packaging/Images/SmallTile.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SmallTile.scale-125.png b/WinoMail.Packaging/Images/SmallTile.scale-125.png deleted file mode 100644 index 4a0404cf..00000000 Binary files a/WinoMail.Packaging/Images/SmallTile.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SmallTile.scale-150.png b/WinoMail.Packaging/Images/SmallTile.scale-150.png deleted file mode 100644 index f801334e..00000000 Binary files a/WinoMail.Packaging/Images/SmallTile.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SmallTile.scale-200.png b/WinoMail.Packaging/Images/SmallTile.scale-200.png deleted file mode 100644 index bb2c20c9..00000000 Binary files a/WinoMail.Packaging/Images/SmallTile.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SmallTile.scale-400.png b/WinoMail.Packaging/Images/SmallTile.scale-400.png deleted file mode 100644 index c931a5dd..00000000 Binary files a/WinoMail.Packaging/Images/SmallTile.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SplashScreen.scale-100.png b/WinoMail.Packaging/Images/SplashScreen.scale-100.png deleted file mode 100644 index 23c8f147..00000000 Binary files a/WinoMail.Packaging/Images/SplashScreen.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SplashScreen.scale-125.png b/WinoMail.Packaging/Images/SplashScreen.scale-125.png deleted file mode 100644 index ceb2dff6..00000000 Binary files a/WinoMail.Packaging/Images/SplashScreen.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SplashScreen.scale-150.png b/WinoMail.Packaging/Images/SplashScreen.scale-150.png deleted file mode 100644 index 885d9bc2..00000000 Binary files a/WinoMail.Packaging/Images/SplashScreen.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SplashScreen.scale-200.png b/WinoMail.Packaging/Images/SplashScreen.scale-200.png deleted file mode 100644 index 58c8ca7c..00000000 Binary files a/WinoMail.Packaging/Images/SplashScreen.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/SplashScreen.scale-400.png b/WinoMail.Packaging/Images/SplashScreen.scale-400.png deleted file mode 100644 index fa77f2b7..00000000 Binary files a/WinoMail.Packaging/Images/SplashScreen.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square150x150Logo.scale-100.png b/WinoMail.Packaging/Images/Square150x150Logo.scale-100.png deleted file mode 100644 index a5f235b8..00000000 Binary files a/WinoMail.Packaging/Images/Square150x150Logo.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square150x150Logo.scale-125.png b/WinoMail.Packaging/Images/Square150x150Logo.scale-125.png deleted file mode 100644 index be92b5ae..00000000 Binary files a/WinoMail.Packaging/Images/Square150x150Logo.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square150x150Logo.scale-150.png b/WinoMail.Packaging/Images/Square150x150Logo.scale-150.png deleted file mode 100644 index d0039797..00000000 Binary files a/WinoMail.Packaging/Images/Square150x150Logo.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square150x150Logo.scale-200.png b/WinoMail.Packaging/Images/Square150x150Logo.scale-200.png deleted file mode 100644 index 430e6fa3..00000000 Binary files a/WinoMail.Packaging/Images/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square150x150Logo.scale-400.png b/WinoMail.Packaging/Images/Square150x150Logo.scale-400.png deleted file mode 100644 index 9726829b..00000000 Binary files a/WinoMail.Packaging/Images/Square150x150Logo.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png deleted file mode 100644 index 4d6b9dfe..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png deleted file mode 100644 index c0aa2ba3..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png deleted file mode 100644 index 7be00300..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png deleted file mode 100644 index a6e4b0a2..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png deleted file mode 100644 index 07514cc2..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-16.png deleted file mode 100644 index 4d6b9dfe..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-16.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-256.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-256.png deleted file mode 100644 index 7be00300..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-256.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-32.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-32.png deleted file mode 100644 index a6e4b0a2..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-32.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-48.png b/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-48.png deleted file mode 100644 index 07514cc2..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.altform-unplated_targetsize-48.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.scale-100.png b/WinoMail.Packaging/Images/Square44x44Logo.scale-100.png deleted file mode 100644 index 7432521d..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.scale-125.png b/WinoMail.Packaging/Images/Square44x44Logo.scale-125.png deleted file mode 100644 index fe38dbdf..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.scale-150.png b/WinoMail.Packaging/Images/Square44x44Logo.scale-150.png deleted file mode 100644 index 1ee950af..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.scale-200.png b/WinoMail.Packaging/Images/Square44x44Logo.scale-200.png deleted file mode 100644 index 807e9ed4..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.scale-400.png b/WinoMail.Packaging/Images/Square44x44Logo.scale-400.png deleted file mode 100644 index f4457476..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-16.png b/WinoMail.Packaging/Images/Square44x44Logo.targetsize-16.png deleted file mode 100644 index 9acb3cc8..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-16.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-24.png b/WinoMail.Packaging/Images/Square44x44Logo.targetsize-24.png deleted file mode 100644 index c1e08a4f..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-24.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/WinoMail.Packaging/Images/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index c0aa2ba3..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-256.png b/WinoMail.Packaging/Images/Square44x44Logo.targetsize-256.png deleted file mode 100644 index 37f8decd..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-256.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-32.png b/WinoMail.Packaging/Images/Square44x44Logo.targetsize-32.png deleted file mode 100644 index 93c856d9..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-32.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-48.png b/WinoMail.Packaging/Images/Square44x44Logo.targetsize-48.png deleted file mode 100644 index a2ca3afc..00000000 Binary files a/WinoMail.Packaging/Images/Square44x44Logo.targetsize-48.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/StoreLogo.backup.png b/WinoMail.Packaging/Images/StoreLogo.backup.png deleted file mode 100644 index 7385b56c..00000000 Binary files a/WinoMail.Packaging/Images/StoreLogo.backup.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/StoreLogo.scale-100.png b/WinoMail.Packaging/Images/StoreLogo.scale-100.png deleted file mode 100644 index 4c4b4b34..00000000 Binary files a/WinoMail.Packaging/Images/StoreLogo.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/StoreLogo.scale-125.png b/WinoMail.Packaging/Images/StoreLogo.scale-125.png deleted file mode 100644 index 1c325127..00000000 Binary files a/WinoMail.Packaging/Images/StoreLogo.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/StoreLogo.scale-150.png b/WinoMail.Packaging/Images/StoreLogo.scale-150.png deleted file mode 100644 index bb194ef7..00000000 Binary files a/WinoMail.Packaging/Images/StoreLogo.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/StoreLogo.scale-200.png b/WinoMail.Packaging/Images/StoreLogo.scale-200.png deleted file mode 100644 index b77a5ddc..00000000 Binary files a/WinoMail.Packaging/Images/StoreLogo.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/StoreLogo.scale-400.png b/WinoMail.Packaging/Images/StoreLogo.scale-400.png deleted file mode 100644 index 8d0a133e..00000000 Binary files a/WinoMail.Packaging/Images/StoreLogo.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Wide310x150Logo.scale-100.png b/WinoMail.Packaging/Images/Wide310x150Logo.scale-100.png deleted file mode 100644 index f330133d..00000000 Binary files a/WinoMail.Packaging/Images/Wide310x150Logo.scale-100.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Wide310x150Logo.scale-125.png b/WinoMail.Packaging/Images/Wide310x150Logo.scale-125.png deleted file mode 100644 index e4656fa7..00000000 Binary files a/WinoMail.Packaging/Images/Wide310x150Logo.scale-125.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Wide310x150Logo.scale-150.png b/WinoMail.Packaging/Images/Wide310x150Logo.scale-150.png deleted file mode 100644 index 884084b3..00000000 Binary files a/WinoMail.Packaging/Images/Wide310x150Logo.scale-150.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Wide310x150Logo.scale-200.png b/WinoMail.Packaging/Images/Wide310x150Logo.scale-200.png deleted file mode 100644 index 23c8f147..00000000 Binary files a/WinoMail.Packaging/Images/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/WinoMail.Packaging/Images/Wide310x150Logo.scale-400.png b/WinoMail.Packaging/Images/Wide310x150Logo.scale-400.png deleted file mode 100644 index 58c8ca7c..00000000 Binary files a/WinoMail.Packaging/Images/Wide310x150Logo.scale-400.png and /dev/null differ diff --git a/WinoMail.Packaging/Package.appxmanifest b/WinoMail.Packaging/Package.appxmanifest deleted file mode 100644 index 5644a43b..00000000 --- a/WinoMail.Packaging/Package.appxmanifest +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - Wino Mail - Burak KÖSE - Images\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Wino Google Authentication Protocol - - - - - - - - Wino Mail Launcher Protocol - - - - - - - EML\eml.png - - .eml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WinoMail.Packaging/WinoMail.Packaging.wapproj b/WinoMail.Packaging/WinoMail.Packaging.wapproj deleted file mode 100644 index 84ec0286..00000000 --- a/WinoMail.Packaging/WinoMail.Packaging.wapproj +++ /dev/null @@ -1,156 +0,0 @@ - - - - 15.0 - - - - Debug - x86 - - - Release - x86 - - - Debug - x64 - - - Release - x64 - - - Debug - ARM64 - - - Release - ARM64 - - - - $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ - - - AppHostLocalDebugger - False - CoreClr - - - - ee28910b-6418-4ec2-8f4b-8e85a2e75af7 - 10.0.26100.0 - 10.0.17763.0 - en-US - False - $(NoWarn);NU1702 - ..\Wino.Mail\Wino.Mail.csproj - SHA256 - x86|x64|arm64 - False - False - True - True - 0 - true - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - - Package.appxmanifest - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Properties\PublishProfiles\win-$(Platform).pubxml - - - - \ No newline at end of file