Linking all views.

This commit is contained in:
Burak Kaan Köse
2024-07-12 21:45:42 +02:00
parent 1ff82e62ff
commit ef151aa7a6
96 changed files with 930 additions and 295 deletions

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Reflection;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Translations

View File

@@ -6,8 +6,53 @@
<Nullable>disable</Nullable>
<BaseOutputPath>bin\</BaseOutputPath>
<RootNamespace>Wino.Core.Domain</RootNamespace>
<AssemblyName>Wino.Core.Domain</AssemblyName>
</PropertyGroup>
<ItemGroup>
<None Remove="Translations\ca_ES\resources.json" />
<None Remove="Translations\cs_CZ\resources.json" />
<None Remove="Translations\da_DK\resources.json" />
<None Remove="Translations\de_DE\resources.json" />
<None Remove="Translations\el_GR\resources.json" />
<None Remove="Translations\en_US\resources.json" />
<None Remove="Translations\es_ES\resources.json" />
<None Remove="Translations\fr_FR\resources.json" />
<None Remove="Translations\gl_ES\resources.json" />
<None Remove="Translations\id_ID\resources.json" />
<None Remove="Translations\it_IT\resources.json" />
<None Remove="Translations\ja_JP\resources.json" />
<None Remove="Translations\nl_NL\resources.json" />
<None Remove="Translations\pl_PL\resources.json" />
<None Remove="Translations\pt_BR\resources.json" />
<None Remove="Translations\ru_RU\resources.json" />
<None Remove="Translations\tr_TR\resources.json" />
<None Remove="Translations\uk_UA\resources.json" />
<None Remove="Translations\zh_CN\resources.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Translations\ca_ES\resources.json" />
<EmbeddedResource Include="Translations\cs_CZ\resources.json" />
<EmbeddedResource Include="Translations\da_DK\resources.json" />
<EmbeddedResource Include="Translations\de_DE\resources.json" />
<EmbeddedResource Include="Translations\el_GR\resources.json" />
<EmbeddedResource Include="Translations\en_US\resources.json" />
<EmbeddedResource Include="Translations\es_ES\resources.json" />
<EmbeddedResource Include="Translations\fr_FR\resources.json" />
<EmbeddedResource Include="Translations\gl_ES\resources.json" />
<EmbeddedResource Include="Translations\id_ID\resources.json" />
<EmbeddedResource Include="Translations\it_IT\resources.json" />
<EmbeddedResource Include="Translations\ja_JP\resources.json" />
<EmbeddedResource Include="Translations\nl_NL\resources.json" />
<EmbeddedResource Include="Translations\pl_PL\resources.json" />
<EmbeddedResource Include="Translations\pt_BR\resources.json" />
<EmbeddedResource Include="Translations\ru_RU\resources.json" />
<EmbeddedResource Include="Translations\tr_TR\resources.json" />
<EmbeddedResource Include="Translations\uk_UA\resources.json" />
<EmbeddedResource Include="Translations\zh_CN\resources.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MimeKit" Version="4.7.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

View File

@@ -1,20 +0,0 @@
using System;
using System.Threading.Tasks;
using Windows.UI.Core;
using Wino.Core.Domain.Interfaces;
namespace Wino.Core.UWP
{
public class UWPDispatcher : IDispatcher
{
private readonly CoreDispatcher _coreDispatcher;
public UWPDispatcher(CoreDispatcher coreDispatcher)
{
_coreDispatcher = coreDispatcher;
}
public Task ExecuteOnUIThread(Action action)
=> _coreDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()).AsTask();
}
}

View File

@@ -165,6 +165,7 @@ namespace Wino.Services
// Save reference as this might be null when the user is in another app
// WinUI
mainApplicationFrame = Window.Current.Content as Frame;
if (mainApplicationFrame == null) return;

View File

@@ -8,6 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.5" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
</ItemGroup>

View File

@@ -2,7 +2,10 @@
<Application
x:Class="Wino.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="using:Wino.Controls"
xmlns:selectors="using:Wino.Selectors"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@@ -11,10 +14,221 @@
<ResourceDictionary Source="/Styles/Colors.xaml" />
<ResourceDictionary Source="/Styles/ContentPresenters.xaml" />
<ResourceDictionary Source="/Styles/ImagePreviewControl.xaml" />
<ResourceDictionary Source="/Styles/CommandBarItems.xaml" />
<ResourceDictionary Source="/Styles/ItemContainerStyles.xaml" />
<ResourceDictionary Source="/Styles/WinoInfoBar.xaml" />
<ResourceDictionary>
<x:Double x:Key="AppBarButtonContentHeight">19</x:Double>
<x:Double x:Key="NavigationViewItemOnLeftIconBoxHeight">19</x:Double>
<Thickness x:Key="ImapSetupDialogSubPagePadding">24,24,24,24</Thickness>
<Style x:Key="PageStyle" TargetType="Page">
<Setter Property="Margin" Value="-1,0,0,0" />
<Setter Property="Padding" Value="12" />
<Setter Property="Background" Value="{ThemeResource AppBarBackgroundColor}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Padding="12">
<ContentPresenter />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Border style for each page's root border for separation of zones. -->
<Style TargetType="Border" x:Key="PageRootBorderStyle">
<Setter Property="Margin" Value="7,0,7,7" />
<Setter Property="Background" Value="{ThemeResource WinoContentZoneBackgroud}" />
<Setter Property="BorderBrush" Value="{StaticResource CardStrokeColorDefaultBrush}" />
<Setter Property="CornerRadius" Value="7" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<!-- Default StackPanel animation. -->
<Style TargetType="StackPanel">
<Setter Property="ChildrenTransitions">
<Setter.Value>
<TransitionCollection>
<EntranceThemeTransition IsStaggeringEnabled="True" />
</TransitionCollection>
</Setter.Value>
</Setter>
</Style>
<!-- Default Style for ContentDialog -->
<Style
x:Key="WinoDialogStyle"
BasedOn="{StaticResource DefaultContentDialogStyle}"
TargetType="ContentDialog" />
<!-- Settings Menu Item Template -->
<Style TargetType="controls:SettingsMenuItemControl">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="IsClickable" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:SettingsMenuItemControl">
<Grid>
<Button
Padding="0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Command="{TemplateBinding Command}"
CommandParameter="{TemplateBinding CommandParameter}"
IsEnabled="{TemplateBinding IsEnabled}"
IsHitTestVisible="{TemplateBinding IsClickable}">
<Grid
Height="70"
Padding="0,6,12,6"
CornerRadius="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentControl
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Icon}" />
<Grid
Grid.Column="1"
Margin="4,0"
VerticalAlignment="Center"
RowSpacing="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
VerticalAlignment="Center"
FontWeight="SemiBold"
Style="{StaticResource BodyTextBlockStyle}"
Text="{TemplateBinding Title}" />
<TextBlock
Grid.Row="1"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{TemplateBinding Description}" />
</Grid>
<Viewbox
Grid.Column="0"
Grid.ColumnSpan="2"
Width="16"
Height="16"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsNavigateIconVisible}">
<PathIcon Data="F1 M 5.029297 19.091797 L 14.111328 10 L 5.029297 0.908203 L 5.908203 0.029297 L 15.888672 10 L 5.908203 19.970703 Z " />
</Viewbox>
</Grid>
</Button>
<ContentControl
Grid.RowSpan="2"
Margin="0,0,16,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Content="{TemplateBinding SideContent}"
IsHitTestVisible="True"
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsNavigateIconVisible, Converter={StaticResource ReverseBooleanToVisibilityConverter}}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Wino Navigation View Item -->
<Style TargetType="controls:WinoNavigationViewItem">
<Setter Property="ContentTransitions">
<Setter.Value>
<TransitionCollection>
<PopupThemeTransition />
</TransitionCollection>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="NoneTemplate">
<Image Source="/Assets/FileTypes/type_none.png" />
</DataTemplate>
<DataTemplate x:Key="ExecutableTemplate">
<Image Source="/Assets/FileTypes/type_executable.png" />
</DataTemplate>
<DataTemplate x:Key="ImageTemplate">
<Image Source="/Assets/FileTypes/type_image.png" />
</DataTemplate>
<DataTemplate x:Key="VideoTemplate">
<Image Source="/Assets/FileTypes/type_video.png" />
</DataTemplate>
<DataTemplate x:Key="AudioTemplate">
<Image Source="/Assets/FileTypes/type_audio.png" />
</DataTemplate>
<DataTemplate x:Key="PDFTemplate">
<Image Source="/Assets/FileTypes/type_pdf.png" />
</DataTemplate>
<DataTemplate x:Key="HTMLTemplate">
<Image Source="/Assets/FileTypes/type_html.png" />
</DataTemplate>
<DataTemplate x:Key="RarTemplate">
<Image Source="/Assets/FileTypes/type_rar.png" />
</DataTemplate>
<DataTemplate x:Key="ArchiveTemplate">
<Image Source="/Assets/FileTypes/type_archive.png" />
</DataTemplate>
<DataTemplate x:Key="OtherTemplate">
<Image Source="/Assets/FileTypes/type_other.png" />
</DataTemplate>
<selectors:FileAttachmentTypeSelector
x:Key="FileTypeIconSelector"
Archive="{StaticResource ArchiveTemplate}"
Executable="{StaticResource ExecutableTemplate}"
HTML="{StaticResource HTMLTemplate}"
Image="{StaticResource ImageTemplate}"
None="{StaticResource NoneTemplate}"
Other="{StaticResource OtherTemplate}"
PDF="{StaticResource PDFTemplate}"
RarArchive="{StaticResource RarTemplate}"
Video="{StaticResource VideoTemplate}" />
</ResourceDictionary>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Define Global Styles here -->
<ResourceDictionary>
<Style TargetType="ScrollViewer">
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
</Style>
<!-- Remove border/backgroud of command bar -->
<SolidColorBrush x:Key="CommandBarBackground" Color="Transparent" />
<SolidColorBrush x:Key="CommandBarBackgroundOpen" Color="Transparent" />
<SolidColorBrush x:Key="CommandBarBorderBrushOpen" Color="Transparent" />
<Thickness x:Key="CommandBarBorderThicknessOpen">0</Thickness>
</ResourceDictionary>
<!-- Last item must always be the default theme. -->
<ResourceDictionary Source="/AppThemes/Mica.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
</ResourceDictionary>
</Application.Resources>
</Application>

View File

@@ -1,24 +1,47 @@
using System;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.UI.Xaml;
using Wino.Core;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Services;
namespace Wino
{
public partial class App : Application
{
public new static App Current => (App)Application.Current;
public IServiceProvider Services { get; }
public static MainWindow MainWindow = new MainWindow();
public App()
{
this.InitializeComponent();
InitializeComponent();
Services = ConfigureServices();
_logInitializer = Services.GetService<ILogInitializer>();
ConfigureLogger();
ConfigureAppCenter();
ConfigurePrelaunch();
ConfigureXbox();
_themeService = Services.GetService<IThemeService>();
_databaseService = Services.GetService<IDatabaseService>();
_appInitializerService = Services.GetService<IAppInitializerService>();
_synchronizerFactory = Services.GetService<IWinoSynchronizerFactory>();
_translationService = Services.GetService<ITranslationService>();
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
protected override void OnLaunched(LaunchActivatedEventArgs args)
protected override async void OnLaunched(LaunchActivatedEventArgs args)
{
m_window = new MainWindow();
m_window.Activate();
}
foreach (var service in initializeServices)
{
await service.InitializeAsync();
}
private Window m_window;
MainWindow.Activate();
MainWindow.StartWino();
}
}
}

View File

@@ -0,0 +1,47 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Microsoft.UI.Xaml">
<x:String x:Key="ThemeName">Custom</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appdata:///local/CustomWallpaper.jpg</x:String>
<x:Boolean x:Key="UseMica">False</x:Boolean>
<ImageBrush
x:Key="WinoApplicationBackgroundColor"
ImageSource="{StaticResource ThemeBackgroundImage}"
Stretch="UniformToFill" />
<!-- Navigation View Settings -->
<xaml:CornerRadius x:Key="NavigationViewContentGridCornerRadius">0,0,0,0</xaml:CornerRadius>
<xaml:CornerRadius x:Key="OverlayCornerRadius">0,1,0,0</xaml:CornerRadius>
<Thickness x:Key="NavigationViewContentMargin">0,0,0,0</Thickness>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Reading Page Date/Name Group Header Background -->
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#ecf0f1</SolidColorBrush>
<Color x:Key="MainCustomThemeColor">#D9FFFFFF</Color>
<SolidColorBrush x:Key="AppBarBackgroundColor" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="NavigationViewDefaultPaneBackground" Color="{StaticResource MainCustomThemeColor}" />
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<!-- Reading Page Date/Name Group Header Background -->
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#1f1f1f</SolidColorBrush>
<Color x:Key="MainCustomThemeColor">#E61F1F1F</Color>
<!-- Reading Pane Background -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="AppBarBackgroundColor" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="NavigationViewDefaultPaneBackground" Color="{StaticResource MainCustomThemeColor}" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 456 B

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -6,8 +6,6 @@ using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Navigation;
using Wino.Core.Messages.Shell;
using Wino.Core.UWP;
using Wino.Mail;
using Wino.Mail.ViewModels;
namespace Wino
@@ -36,7 +34,12 @@ namespace Wino
protected BasePage()
{
// UWP and WinUI Dispatchers are different.
#if NET8_0
ViewModel.Dispatcher = new WinAppDispatcher(DispatcherQueue);
#else
ViewModel.Dispatcher = new UWPDispatcher(Dispatcher);
#endif
}
~BasePage()

View File

@@ -7,10 +7,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Button x:Name="myButton" Click="myButton_Click">Click Me</Button>
</StackPanel>
<Frame x:Name="WindowFrame" />
</Window>

View File

@@ -1,5 +1,5 @@
using Microsoft.UI.Xaml;
using Wino.Views;
namespace Wino
{
@@ -10,9 +10,9 @@ namespace Wino
InitializeComponent();
}
private void myButton_Click(object sender, RoutedEventArgs e)
public void StartWino()
{
myButton.Content = "Clicked";
WindowFrame.Navigate(typeof(AppShell));
}
}
}

View File

@@ -34,12 +34,12 @@
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Wino.Mail.WinUI"
Description="Wino.Mail.WinUI"
DisplayName="Wino Mail WinUI"
Description="WinUI 3 for Wino Mail"
BackgroundColor="transparent"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square71x71Logo="Assets\SmallTile.png" Square310x310Logo="Assets\LargeTile.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="Wino.Views.WelcomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Wino.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
</Grid>
</Page>

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using Windows.Foundation;
using Windows.Foundation.Collections;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace Wino.Views
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class WelcomePage : Page
{
public WelcomePage()
{
this.InitializeComponent();
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;
using CommunityToolkit.WinUI;
using Microsoft.UI.Dispatching;
using Wino.Core.Domain.Interfaces;
namespace Wino
{
public class WinAppDispatcher : IDispatcher
{
private readonly DispatcherQueue _dispatcherQueue;
public WinAppDispatcher(DispatcherQueue dispatcherQueue)
{
_dispatcherQueue = dispatcherQueue;
}
public Task ExecuteOnUIThread(Action action) => _dispatcherQueue.EnqueueAsync(() => { action(); });
}
}

View File

@@ -13,8 +13,21 @@
<EnableMsixTooling>true</EnableMsixTooling>
<WindowsSdkPackageVersion>10.0.19041.35-preview</WindowsSdkPackageVersion>
</PropertyGroup>
<ItemGroup>
<None Remove="AppThemes\Custom.xaml" />
<None Remove="Views\WelcomePage.xaml" />
</ItemGroup>
<ItemGroup>
<Page Remove="AppThemes\Custom.xaml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Wino.Mail\Activation\ActivationHandler.cs" Link="Activation\ActivationHandler.cs" />
<Compile Include="..\Wino.Mail\Activation\BackgroundActivationHandler.cs" Link="Activation\BackgroundActivationHandler.cs" />
<Compile Include="..\Wino.Mail\Activation\DefaultActivationHandler.cs" Link="Activation\DefaultActivationHandler.cs" />
<Compile Include="..\Wino.Mail\Activation\FileActivationHandler.cs" Link="Activation\FileActivationHandler.cs" />
<Compile Include="..\Wino.Mail\Activation\ProtocolActivationHandler.cs" Link="Activation\ProtocolActivationHandler.cs" />
<Compile Include="..\Wino.Mail\Activation\ToastNotificationActivationHandler.cs" Link="Activation\ToastNotificationActivationHandler.cs" />
<Compile Include="..\Wino.Mail\AppShell.xaml.cs" Link="AppShell.xaml.cs" />
<Compile Include="..\Wino.Mail\Behaviors\BindableCommandBarBehavior.cs" Link="Behaviors\BindableCommandBarBehavior.cs" />
<Compile Include="..\Wino.Mail\Behaviors\CreateMailNavigationItemBehavior.cs" Link="Behaviors\CreateMailNavigationItemBehavior.cs" />
@@ -71,6 +84,7 @@
<Compile Include="..\Wino.Mail\MenuFlyouts\RendererCommandBarItem.cs" Link="MenuFlyouts\RendererCommandBarItem.cs" />
<Compile Include="..\Wino.Mail\MenuFlyouts\WinoOperationFlyout.cs" Link="MenuFlyouts\WinoOperationFlyout.cs" />
<Compile Include="..\Wino.Mail\MenuFlyouts\WinoOperationFlyoutItem.cs" Link="MenuFlyouts\WinoOperationFlyoutItem.cs" />
<Compile Include="..\Wino.Mail\PartialApp.cs" Link="PartialApp.cs" />
<Compile Include="..\Wino.Mail\Selectors\AccountProviderViewModelTemplateSelector.cs" Link="Selectors\AccountProviderViewModelTemplateSelector.cs" />
<Compile Include="..\Wino.Mail\Selectors\AccountReorderTemplateSelector.cs" Link="Selectors\AccountReorderTemplateSelector.cs" />
<Compile Include="..\Wino.Mail\Selectors\AppThemePreviewTemplateSelector.cs" Link="Selectors\AppThemePreviewTemplateSelector.cs" />
@@ -81,19 +95,65 @@
<Compile Include="..\Wino.Mail\Selectors\NavigationMenuTemplateSelector.cs" Link="Selectors\NavigationMenuTemplateSelector.cs" />
<Compile Include="..\Wino.Mail\Selectors\RendererCommandBarItemTemplateSelector.cs" Link="Selectors\RendererCommandBarItemTemplateSelector.cs" />
<Compile Include="..\Wino.Mail\Services\ApplicationResourceManager.cs" Link="Services\ApplicationResourceManager.cs" />
<Compile Include="..\Wino.Mail\Services\DialogService.cs" Link="Services\DialogService.cs" />
<Compile Include="..\Wino.Mail\Services\LaunchProtocolService.cs" Link="Services\LaunchProtocolService.cs" />
<Compile Include="..\Wino.Mail\Services\PreferencesService.cs" Link="Services\PreferencesService.cs" />
<Compile Include="..\Wino.Mail\Services\StatePersistenceService.cs" Link="Services\StatePersistenceService.cs" />
<Compile Include="..\Wino.Mail\Services\ToastActivationService.cs" Link="Services\ToastActivationService.cs" />
<Compile Include="..\Wino.Mail\Services\WinoNavigationService.cs" Link="Services\WinoNavigationService.cs" />
<Compile Include="..\Wino.Mail\Styles\CommandBarItems.xaml.cs" Link="Styles\CommandBarItems.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Account\AccountDetailsPage.xaml.cs" Link="Views\Account\AccountDetailsPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Account\AccountManagementPage.xaml.cs" Link="Views\Account\AccountManagementPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Account\MergedAccountDetailsPage.xaml.cs" Link="Views\Account\MergedAccountDetailsPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\ComposePage.xaml.cs" Link="Views\ComposePage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\IdlePage.xaml.cs" Link="Views\IdlePage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\ImapSetup\AdvancedImapSetupPage.xaml.cs" Link="Views\ImapSetup\AdvancedImapSetupPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\ImapSetup\ImapConnectionFailedPage.xaml.cs" Link="Views\ImapSetup\ImapConnectionFailedPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\ImapSetup\PreparingImapFoldersPage.xaml.cs" Link="Views\ImapSetup\PreparingImapFoldersPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\ImapSetup\TestingImapConnectionPage.xaml.cs" Link="Views\ImapSetup\TestingImapConnectionPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\ImapSetup\WelcomeImapSetupPage.xaml.cs" Link="Views\ImapSetup\WelcomeImapSetupPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\MailListPage.xaml.cs" Link="Views\MailListPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\MailRenderingPage.xaml.cs" Link="Views\MailRenderingPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\NewAccountManagementPage.xaml.cs" Link="Views\NewAccountManagementPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\SettingsPage.xaml.cs" Link="Views\SettingsPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\AboutPage.xaml.cs" Link="Views\Settings\AboutPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\LanguageTimePage.xaml.cs" Link="Views\Settings\LanguageTimePage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\MessageListPage.xaml.cs" Link="Views\Settings\MessageListPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\PersonalizationPage.xaml.cs" Link="Views\Settings\PersonalizationPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\ReadingPanePage.xaml.cs" Link="Views\Settings\ReadingPanePage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\SettingOptionsPage.xaml.cs" Link="Views\Settings\SettingOptionsPage.xaml.cs" />
<Compile Include="..\Wino.Mail\Views\Settings\SignatureManagementPage.xaml.cs" Link="Views\Settings\SignatureManagementPage.xaml.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="..\Wino.Mail\Assets\EML\eml.png" Link="Assets\EML\eml.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_archive.png" Link="Assets\FileTypes\type_archive.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_audio.png" Link="Assets\FileTypes\type_audio.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_executable.png" Link="Assets\FileTypes\type_executable.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_html.png" Link="Assets\FileTypes\type_html.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_image.png" Link="Assets\FileTypes\type_image.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_none.png" Link="Assets\FileTypes\type_none.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_other.png" Link="Assets\FileTypes\type_other.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_pdf.png" Link="Assets\FileTypes\type_pdf.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_rar.png" Link="Assets\FileTypes\type_rar.png" />
<Content Include="..\Wino.Mail\Assets\FileTypes\type_video.png" Link="Assets\FileTypes\type_video.png" />
<Content Include="..\Wino.Mail\Assets\NotificationIcons\delete.png" Link="Assets\NotificationIcons\delete.png" />
<Content Include="..\Wino.Mail\Assets\NotificationIcons\dismiss.png" Link="Assets\NotificationIcons\dismiss.png" />
<Content Include="..\Wino.Mail\Assets\NotificationIcons\markread.png" Link="Assets\NotificationIcons\markread.png" />
<Content Include="..\Wino.Mail\Assets\NotificationIcons\profile-dark.png" Link="Assets\NotificationIcons\profile-dark.png" />
<Content Include="..\Wino.Mail\Assets\NotificationIcons\profile-light.png" Link="Assets\NotificationIcons\profile-light.png" />
<Content Include="..\Wino.Mail\Assets\Providers\Gmail.png" Link="Assets\Providers\Gmail.png" />
<Content Include="..\Wino.Mail\Assets\Providers\IMAP4.png" Link="Assets\Providers\IMAP4.png" />
<Content Include="..\Wino.Mail\Assets\Providers\Office 365.png" Link="Assets\Providers\Office 365.png" />
<Content Include="..\Wino.Mail\Assets\Providers\Outlook.png" Link="Assets\Providers\Outlook.png" />
<Content Include="..\Wino.Mail\Assets\Providers\Yahoo.png" Link="Assets\Providers\Yahoo.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\airbnb.com.png" Link="Assets\Thumbnails\airbnb.com.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\apple.com.png" Link="Assets\Thumbnails\apple.com.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\google.com.png" Link="Assets\Thumbnails\google.com.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\microsoft.com.png" Link="Assets\Thumbnails\microsoft.com.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\steampowered.com.png" Link="Assets\Thumbnails\steampowered.com.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\uber.com.png" Link="Assets\Thumbnails\uber.com.png" />
<Content Include="..\Wino.Mail\Assets\Thumbnails\youtube.com.png" Link="Assets\Thumbnails\youtube.com.png" />
<Content Include="..\Wino.Mail\BackgroundImages\Acrylic.jpg" Link="BackgroundImages\Acrylic.jpg" />
<Content Include="..\Wino.Mail\BackgroundImages\Clouds.jpg" Link="BackgroundImages\Clouds.jpg" />
<Content Include="..\Wino.Mail\BackgroundImages\Forest.jpg" Link="BackgroundImages\Forest.jpg" />
@@ -105,12 +165,15 @@
<Content Include="..\Wino.Mail\JS\global.css" Link="JS\global.css" />
<Content Include="..\Wino.Mail\JS\libs\jodit.min.css" Link="JS\libs\jodit.min.css" />
<Content Include="..\Wino.Mail\JS\reader.html" Link="JS\reader.html" />
<Content Include="AppThemes\Custom.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
@@ -120,9 +183,15 @@
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.TokenizingTextBox" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.0.240109" />
<PackageReference Include="EmailValidation" Version="1.2.0" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.5" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.5" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240701003-experimental2" />
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
<PackageReference Include="WinUIEx" Version="2.3.4" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
@@ -143,6 +212,11 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Activation\" />
<Folder Include="Assets\FileTypes\" />
<Folder Include="Assets\EML\" />
<Folder Include="Assets\Thumbnails\" />
<Folder Include="Assets\Providers\" />
<Folder Include="Assets\NotificationIcons\" />
<Folder Include="Controls\Advanced\" />
<Folder Include="Converters\" />
<Folder Include="Helpers\" />
@@ -156,6 +230,7 @@
<Folder Include="Selectors\" />
<Folder Include="Styles\" />
<Folder Include="Views\ImapSetup\" />
<Folder Include="Views\Account\" />
<Folder Include="Views\Settings\" />
</ItemGroup>
<ItemGroup>
@@ -167,6 +242,34 @@
<Page Include="..\Wino.Mail\AppShell.xaml" Link="AppShell.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Content Include="..\Wino.Mail\AppThemes\Clouds.xaml" Link="AppThemes\Clouds.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="..\Wino.Mail\AppThemes\Forest.xaml" Link="AppThemes\Forest.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="..\Wino.Mail\AppThemes\Garden.xaml" Link="AppThemes\Garden.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="..\Wino.Mail\AppThemes\Mica.xaml" Link="AppThemes\Mica.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="..\Wino.Mail\AppThemes\Nighty.xaml" Link="AppThemes\Nighty.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="..\Wino.Mail\AppThemes\Snowflake.xaml" Link="AppThemes\Snowflake.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Content Include="..\Wino.Mail\AppThemes\TestTheme.xaml" Link="AppThemes\TestTheme.xaml">
<Generator>MSBuild:Compile</Generator>
<CustomToolNamespace>XamlIntelliSenseFileGenerator</CustomToolNamespace>
</Content>
<Page Include="..\Wino.Mail\Controls\Advanced\WinoAppTitleBar.xaml" Link="Controls\Advanced\WinoAppTitleBar.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -221,6 +324,9 @@
<Page Include="..\Wino.Mail\Styles\Colors.xaml" Link="Styles\Colors.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Styles\CommandBarItems.xaml" Link="Styles\CommandBarItems.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Styles\ContentPresenters.xaml" Link="Styles\ContentPresenters.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -233,6 +339,27 @@
<Page Include="..\Wino.Mail\Styles\ImagePreviewControl.xaml" Link="Styles\ImagePreviewControl.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Styles\ItemContainerStyles.xaml" Link="Styles\ItemContainerStyles.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Styles\WinoInfoBar.xaml" Link="Styles\WinoInfoBar.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Account\AccountDetailsPage.xaml" Link="Views\Account\AccountDetailsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Account\AccountManagementPage.xaml" Link="Views\Account\AccountManagementPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Account\MergedAccountDetailsPage.xaml" Link="Views\Account\MergedAccountDetailsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\ComposePage.xaml" Link="Views\ComposePage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\IdlePage.xaml" Link="Views\IdlePage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\ImapSetup\AdvancedImapSetupPage.xaml" Link="Views\ImapSetup\AdvancedImapSetupPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -248,10 +375,45 @@
<Page Include="..\Wino.Mail\Views\ImapSetup\WelcomeImapSetupPage.xaml" Link="Views\ImapSetup\WelcomeImapSetupPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\MailListPage.xaml" Link="Views\MailListPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\MailRenderingPage.xaml" Link="Views\MailRenderingPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\NewAccountManagementPage.xaml" Link="Views\NewAccountManagementPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\SettingsPage.xaml" Link="Views\SettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\AboutPage.xaml" Link="Views\Settings\AboutPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\LanguageTimePage.xaml" Link="Views\Settings\LanguageTimePage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\MessageListPage.xaml" Link="Views\Settings\MessageListPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\PersonalizationPage.xaml" Link="Views\Settings\PersonalizationPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\ReadingPanePage.xaml" Link="Views\Settings\ReadingPanePage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\SettingOptionsPage.xaml" Link="Views\Settings\SettingOptionsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="..\Wino.Mail\Views\Settings\SignatureManagementPage.xaml" Link="Views\Settings\SignatureManagementPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\WelcomePage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<!--
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution

View File

@@ -1,6 +1,6 @@
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.Toolkit.Uwp.Notifications;
using Serilog;
using Windows.ApplicationModel.Activation;
using Windows.ApplicationModel.Background;
@@ -14,6 +14,12 @@ using Wino.Core.Domain.Models.Synchronization;
using Wino.Core.UWP.Services;
using Wino.Services;
#if NET8_0
using CommunityToolkit.WinUI.Notifications;
#else
using Microsoft.Toolkit.Uwp.Notifications;
#endif
namespace Wino.Activation
{
internal class BackgroundActivationHandler : ActivationHandler<BackgroundActivatedEventArgs>

View File

@@ -1,9 +1,16 @@
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Wino.Views;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Wino.Views;
#endif
namespace Wino.Activation
{

View File

@@ -4,14 +4,21 @@ using System.Linq;
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Services;
using Wino.Helpers;
using Wino.Views;
#if NET8_0
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
#endif
namespace Wino.Activation
{
internal class FileActivationHandler : ActivationHandler<FileActivatedEventArgs>
@@ -57,6 +64,7 @@ namespace Wino.Activation
else
{
_statePersistanceService.ShouldShiftMailRenderingDesign = true;
(Window.Current.Content as Frame).Navigate(typeof(MailRenderingPage), messageInformation, new DrillInNavigationTransitionInfo());
}
}

View File

@@ -2,13 +2,18 @@
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Uwp.Notifications;
using Serilog;
using Windows.ApplicationModel.Activation;
using Wino.Core.Domain;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Messages.Accounts;
#if NET8_0
using CommunityToolkit.WinUI.Notifications;
#else
using Microsoft.Toolkit.Uwp.Notifications;
#endif
namespace Wino.Activation
{
/// <summary>

View File

@@ -1,57 +1,25 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Microsoft.Extensions.DependencyInjection;
using Serilog;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.ApplicationModel.Core;
using Windows.Foundation.Metadata;
using Windows.Storage;
using Windows.System.Profile;
using Windows.UI;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Wino.Activation;
using Wino.Core;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Services;
using Wino.Core.UWP;
using Wino.Core.UWP.Services;
using Wino.Mail.ViewModels;
using Wino.Services;
namespace Wino
{
public sealed partial class App : Application
{
private const string WinoLaunchLogPrefix = "[Wino Launch] ";
private const string AppCenterKey = "90deb1d0-a77f-47d0-8a6b-7eaf111c6b72";
public new static App Current => (App)Application.Current;
public IServiceProvider Services { get; }
private readonly ILogInitializer _logInitializer;
private readonly IThemeService _themeService;
private readonly IDatabaseService _databaseService;
private readonly IAppInitializerService _appInitializerService;
private readonly IWinoSynchronizerFactory _synchronizerFactory;
private readonly ITranslationService _translationService;
// Order matters.
private List<IInitializeAsync> initializeServices => new List<IInitializeAsync>()
{
_translationService,
_databaseService,
_themeService,
_synchronizerFactory
};
public App()
{
@@ -82,103 +50,6 @@ namespace Wino
private void LogActivation(string log) => Log.Information($"{WinoLaunchLogPrefix}{log}");
private void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) => LogActivation($"Wino went foreground.");
private void OnEnteredBackground(object sender, EnteredBackgroundEventArgs e) => LogActivation($"Wino went background.");
private IServiceProvider ConfigureServices()
{
var services = new ServiceCollection();
services.RegisterCoreServices();
services.RegisterCoreUWPServices();
RegisterUWPServices(services);
RegisterViewModels(services);
RegisterActivationHandlers(services);
return services.BuildServiceProvider();
}
#region Dependency Injection
private void RegisterActivationHandlers(IServiceCollection services)
{
services.AddTransient<ProtocolActivationHandler>();
services.AddTransient<BackgroundActivationHandler>();
services.AddTransient<ToastNotificationActivationHandler>();
services.AddTransient<FileActivationHandler>();
}
private void RegisterUWPServices(IServiceCollection services)
{
services.AddSingleton<IApplicationResourceManager<ResourceDictionary>, ApplicationResourceManager>();
services.AddSingleton<IThemeService, ThemeService>();
services.AddSingleton<IPreferencesService, PreferencesService>();
services.AddSingleton<IStatePersistanceService, StatePersistenceService>();
services.AddSingleton<ILaunchProtocolService, LaunchProtocolService>();
services.AddSingleton<IWinoNavigationService, WinoNavigationService>();
services.AddSingleton<IDialogService, DialogService>();
}
private void RegisterViewModels(IServiceCollection services)
{
services.AddSingleton(typeof(AppShellViewModel));
services.AddTransient(typeof(SettingsDialogViewModel));
services.AddTransient(typeof(PersonalizationPageViewModel));
services.AddTransient(typeof(SettingOptionsPageViewModel));
services.AddTransient(typeof(MailListPageViewModel));
services.AddTransient(typeof(MailRenderingPageViewModel));
services.AddTransient(typeof(AccountManagementViewModel));
services.AddTransient(typeof(WelcomePageViewModel));
services.AddTransient(typeof(AboutPageViewModel));
services.AddTransient(typeof(ComposePageViewModel));
services.AddTransient(typeof(IdlePageViewModel));
services.AddTransient(typeof(SettingsPageViewModel));
services.AddTransient(typeof(NewAccountManagementPageViewModel));
services.AddTransient(typeof(AccountDetailsPageViewModel));
services.AddTransient(typeof(SignatureManagementPageViewModel));
services.AddTransient(typeof(MessageListPageViewModel));
services.AddTransient(typeof(ReadingPanePageViewModel));
services.AddTransient(typeof(MergedAccountDetailsPageViewModel));
services.AddTransient(typeof(LanguageTimePageViewModel));
}
#endregion
#region Misc Configuration
private void ConfigureLogger() => _logInitializer.SetupLogger(ApplicationData.Current.LocalFolder.Path);
private void ConfigureAppCenter() => AppCenter.Start(AppCenterKey, typeof(Analytics), typeof(Crashes));
private void ConfigurePrelaunch()
{
if (ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch"))
CoreApplication.EnablePrelaunch(true);
}
private void ConfigureXbox()
{
// Xbox users should use Reveal focus.
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 6))
{
FocusVisualKind = AnalyticsInfo.VersionInfo.DeviceFamily == "Xbox" ? FocusVisualKind.Reveal : FocusVisualKind.HighVisibility;
}
}
private void ConfigureTitleBar()
{
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
var applicationViewTitleBar = ApplicationView.GetForCurrentView().TitleBar;
// Extend shell content into core window to meet design requirements.
coreTitleBar.ExtendViewIntoTitleBar = true;
// Change system buttons and background colors to meet design requirements.
applicationViewTitleBar.ButtonBackgroundColor = Colors.Transparent;
applicationViewTitleBar.BackgroundColor = Colors.Transparent;
applicationViewTitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
applicationViewTitleBar.ButtonForegroundColor = Colors.White;
}
#endregion
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
@@ -270,37 +141,6 @@ namespace Wino
}
}
/// <summary>
/// Tasks that must run before the activation and launch.
/// Regardless of whether it's an interactive launch or not.
/// </summary>
private async Task PreInitializationAsync()
{
// Handle migrations.
// TODO: Automate migration process with more proper way.
if (!ApplicationData.Current.LocalSettings.Values.ContainsKey("Migration_169"))
{
try
{
await _appInitializerService.MigrateAsync();
}
catch (Exception ex)
{
Log.Error(ex, $"{WinoLaunchLogPrefix}Migration_169 failed.");
}
finally
{
ApplicationData.Current.LocalSettings.Values["Migration_169"] = true;
}
}
foreach (var service in initializeServices)
{
await service.InitializeAsync();
}
}
private async Task HandleActivationAsync(object activationArgs)
{
var activationHandler = GetActivationHandlers().FirstOrDefault(h => h.CanHandle(activationArgs));
@@ -319,13 +159,5 @@ namespace Wino
}
}
}
private IEnumerable<ActivationHandler> GetActivationHandlers()
{
yield return Services.GetService<ProtocolActivationHandler>();
yield return Services.GetService<BackgroundActivationHandler>();
yield return Services.GetService<ToastNotificationActivationHandler>();
yield return Services.GetService<FileActivationHandler>();
}
}
}

View File

@@ -35,6 +35,7 @@ using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Navigation;
using Microsoft.Extensions.DependencyInjection;
#endif
namespace Wino.Views
@@ -49,14 +50,13 @@ namespace Wino.Views
public AppShell() : base()
{
InitializeComponent();
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.LayoutMetricsChanged += TitleBarLayoutUpdated;
#if !NET8_0
// BackdropMaterial is not available in WinUI 3.0.
// We manually apply it for UWP version only.
SetupMica();
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.LayoutMetricsChanged += TitleBarLayoutUpdated;
#endif
}

View File

@@ -1,7 +1,4 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:String x:Key="ThemeName">Clouds</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Clouds.jpg</x:String>

View File

@@ -1,7 +1,4 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:String x:Key="ThemeName">Garden</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Garden.jpg</x:String>

View File

@@ -1,7 +1,4 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:String x:Key="ThemeName">Mica</x:String>
<x:Boolean x:Key="UseMica">True</x:Boolean>

View File

@@ -1,7 +1,4 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:String x:Key="ThemeName">Nighty</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Nighty.jpg</x:String>

View File

@@ -1,7 +1,4 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:String x:Key="ThemeName">Snowflake</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Snowflake.jpg</x:String>

View File

@@ -151,9 +151,12 @@ namespace Wino.Controls.Advanced
public WinoAppTitleBar()
{
this.InitializeComponent();
InitializeComponent();
#if NET8_0
App.MainWindow.SetTitleBar(dragbar);
#else
Window.Current.SetTitleBar(dragbar);
#endif
}
private void BackClicked(object sender, RoutedEventArgs e)

193
Wino.Mail/PartialApp.cs Normal file
View File

@@ -0,0 +1,193 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Microsoft.Extensions.DependencyInjection;
using Serilog;
using Windows.ApplicationModel.Core;
using Windows.Foundation.Metadata;
using Windows.Storage;
using Windows.System.Profile;
using Windows.UI.ViewManagement;
using Wino.Activation;
using Wino.Core;
using Wino.Core.Domain.Interfaces;
using Wino.Core.UWP;
using Wino.Mail.ViewModels;
using Wino.Services;
using Wino.Core.Services;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI;
#else
using Windows.UI.Xaml;
using Windows.UI;
#endif
namespace Wino
{
public partial class App : Application
{
private const string WinoLaunchLogPrefix = "[Wino Launch] ";
private const string AppCenterKey = "90deb1d0-a77f-47d0-8a6b-7eaf111c6b72";
private readonly ILogInitializer _logInitializer;
private readonly IThemeService _themeService;
private readonly IDatabaseService _databaseService;
private readonly IAppInitializerService _appInitializerService;
private readonly IWinoSynchronizerFactory _synchronizerFactory;
private readonly ITranslationService _translationService;
public new static App Current => (App)Application.Current;
public IServiceProvider Services { get; }
// Order matters.
private List<IInitializeAsync> initializeServices => new List<IInitializeAsync>()
{
_translationService,
_databaseService,
_themeService,
_synchronizerFactory
};
private IServiceProvider ConfigureServices()
{
var services = new ServiceCollection();
services.RegisterCoreServices();
services.RegisterCoreUWPServices();
RegisterUWPServices(services);
RegisterViewModels(services);
RegisterActivationHandlers(services);
return services.BuildServiceProvider();
}
#region Misc Configuration
private void ConfigureLogger() => _logInitializer.SetupLogger(ApplicationData.Current.LocalFolder.Path);
private void ConfigureAppCenter() => AppCenter.Start(AppCenterKey, typeof(Analytics), typeof(Crashes));
private void ConfigurePrelaunch()
{
if (ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch"))
CoreApplication.EnablePrelaunch(true);
}
private void ConfigureXbox()
{
// Xbox users should use Reveal focus.
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 6))
{
FocusVisualKind = AnalyticsInfo.VersionInfo.DeviceFamily == "Xbox" ? FocusVisualKind.Reveal : FocusVisualKind.HighVisibility;
}
}
private void ConfigureTitleBar()
{
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
var applicationViewTitleBar = ApplicationView.GetForCurrentView().TitleBar;
// Extend shell content into core window to meet design requirements.
coreTitleBar.ExtendViewIntoTitleBar = true;
// Change system buttons and background colors to meet design requirements.
applicationViewTitleBar.ButtonBackgroundColor = Colors.Transparent;
applicationViewTitleBar.BackgroundColor = Colors.Transparent;
applicationViewTitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
applicationViewTitleBar.ButtonForegroundColor = Colors.White;
}
#endregion
#region Dependency Injection
private void RegisterActivationHandlers(IServiceCollection services)
{
services.AddTransient<ProtocolActivationHandler>();
services.AddTransient<BackgroundActivationHandler>();
services.AddTransient<ToastNotificationActivationHandler>();
services.AddTransient<FileActivationHandler>();
}
private void RegisterUWPServices(IServiceCollection services)
{
services.AddSingleton<IApplicationResourceManager<ResourceDictionary>, ApplicationResourceManager>();
services.AddSingleton<IThemeService, ThemeService>();
services.AddSingleton<IPreferencesService, PreferencesService>();
services.AddSingleton<IStatePersistanceService, StatePersistenceService>();
services.AddSingleton<ILaunchProtocolService, LaunchProtocolService>();
services.AddSingleton<IWinoNavigationService, WinoNavigationService>();
services.AddSingleton<IDialogService, DialogService>();
}
private void RegisterViewModels(IServiceCollection services)
{
services.AddSingleton(typeof(AppShellViewModel));
services.AddTransient(typeof(SettingsDialogViewModel));
services.AddTransient(typeof(PersonalizationPageViewModel));
services.AddTransient(typeof(SettingOptionsPageViewModel));
services.AddTransient(typeof(MailListPageViewModel));
services.AddTransient(typeof(MailRenderingPageViewModel));
services.AddTransient(typeof(AccountManagementViewModel));
services.AddTransient(typeof(WelcomePageViewModel));
services.AddTransient(typeof(AboutPageViewModel));
services.AddTransient(typeof(ComposePageViewModel));
services.AddTransient(typeof(IdlePageViewModel));
services.AddTransient(typeof(SettingsPageViewModel));
services.AddTransient(typeof(NewAccountManagementPageViewModel));
services.AddTransient(typeof(AccountDetailsPageViewModel));
services.AddTransient(typeof(SignatureManagementPageViewModel));
services.AddTransient(typeof(MessageListPageViewModel));
services.AddTransient(typeof(ReadingPanePageViewModel));
services.AddTransient(typeof(MergedAccountDetailsPageViewModel));
services.AddTransient(typeof(LanguageTimePageViewModel));
}
#endregion
/// <summary>
/// Tasks that must run before the activation and launch.
/// Regardless of whether it's an interactive launch or not.
/// </summary>
private async Task PreInitializationAsync()
{
// Handle migrations.
// TODO: Automate migration process with more proper way.
if (!ApplicationData.Current.LocalSettings.Values.ContainsKey("Migration_169"))
{
try
{
await _appInitializerService.MigrateAsync();
}
catch (Exception ex)
{
Log.Error(ex, $"{WinoLaunchLogPrefix}Migration_169 failed.");
}
finally
{
ApplicationData.Current.LocalSettings.Values["Migration_169"] = true;
}
}
foreach (var service in initializeServices)
{
await service.InitializeAsync();
}
}
private IEnumerable<ActivationHandler> GetActivationHandlers()
{
yield return Services.GetService<ProtocolActivationHandler>();
yield return Services.GetService<BackgroundActivationHandler>();
yield return Services.GetService<ToastNotificationActivationHandler>();
yield return Services.GetService<FileActivationHandler>();
}
}
}

View File

@@ -4,11 +4,9 @@ using System.Collections.ObjectModel;
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.Toolkit.Uwp.Helpers;
using Serilog;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.UI.Xaml.Controls;
using Wino.Core.Domain;
using Wino.Core.Domain.Entities;
using Wino.Core.Domain.Enums;
@@ -21,6 +19,13 @@ using Wino.Core.Messages.Synchronization;
using Wino.Core.Requests;
using Wino.Core.UWP.Extensions;
using Wino.Dialogs;
using Wino.Helpers;
#if NET8_0
using Microsoft.UI.Xaml.Controls;
#else
using Windows.UI.Xaml.Controls;
#endif
namespace Wino.Services
{

View File

@@ -1,7 +1,7 @@
using System.Collections.Specialized;
using Wino.Core.Domain.Interfaces;
namespace Wino.Core.UWP.Services
namespace Wino.Services
{
public class LaunchProtocolService : ILaunchProtocolService
{

View File

@@ -1,9 +1,6 @@
using System;
using System.Linq;
using CommunityToolkit.Mvvm.Messaging;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.MailItem;
@@ -15,6 +12,16 @@ using Wino.Views;
using Wino.Views.Account;
using Wino.Views.Settings;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
#endif
namespace Wino.Services
{
public class WinoNavigationService : IWinoNavigationService

View File

@@ -1,4 +1,8 @@
using Windows.UI.Xaml;
#if NET8_0
using Microsoft.UI.Xaml;
#else
using Windows.UI.Xaml;
#endif
namespace Wino.Styles
{

View File

@@ -1,7 +1,14 @@
using Windows.UI.Xaml.Controls;
using Wino.Core.Domain.Models.Folders;
using Wino.Core.Domain.Models.Folders;
using Wino.Views.Abstract;
#if NET8_0
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml;
#else
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml;
#endif
namespace Wino.Views
{
public sealed partial class AccountDetailsPage : AccountDetailsPageAbstract
@@ -11,7 +18,7 @@ namespace Wino.Views
InitializeComponent();
}
private async void SyncFolderToggled(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private async void SyncFolderToggled(object sender, RoutedEventArgs e)
{
if (sender is CheckBox checkBox && checkBox.Tag is IMailItemFolder folder)
{
@@ -19,7 +26,7 @@ namespace Wino.Views
}
}
private async void UnreadBadgeCheckboxToggled(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private async void UnreadBadgeCheckboxToggled(object sender, RoutedEventArgs e)
{
if (sender is CheckBox checkBox && checkBox.Tag is IMailItemFolder folder)
{

View File

@@ -1,6 +1,10 @@
using System;
using Wino.Views.Abstract;
#if NET8_0
using Microsoft.UI.Xaml.Navigation;
#else
using Windows.UI.Xaml.Navigation;
using Wino.Views.Abstract;
#endif
namespace Wino.Views
{

View File

@@ -1,6 +1,5 @@
using Wino.Views.Abstract;
namespace Wino.Views.Account
{
public sealed partial class MergedAccountDetailsPage : MergedAccountDetailsPageAbstract

View File

@@ -6,10 +6,8 @@ using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Messaging;
using CommunityToolkit.WinUI.Controls;
using EmailValidation;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Uwp.Helpers;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Web.WebView2.Core;
using MimeKit;
@@ -19,10 +17,6 @@ using Windows.Foundation;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.UI.ViewManagement.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
using Wino.Core.Domain;
using Wino.Core.Domain.Entities;
using Wino.Core.Domain.Enums;
@@ -33,6 +27,19 @@ using Wino.Core.Messages.Shell;
using Wino.Extensions;
using Wino.Mail.ViewModels.Data;
using Wino.Views.Abstract;
using CommunityToolkit.WinUI.Controls;
using Wino.Helpers;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
#endif
namespace Wino.Views
{

View File

@@ -17,7 +17,7 @@
xmlns:menuflyouts="using:Wino.MenuFlyouts"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:selectors="using:Wino.Selectors"
xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewModelData="using:Wino.Mail.ViewModels.Data"
xmlns:wino="using:Wino"
xmlns:converters="using:Wino.Converters"

View File

@@ -8,12 +8,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.UI.Xaml.Controls;
using MoreLinq;
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
using Wino.Controls;
using Wino.Controls.Advanced;
using Wino.Core.Domain;
@@ -29,6 +24,21 @@ using Wino.Mail.ViewModels.Messages;
using Wino.MenuFlyouts.Context;
using Wino.Views.Abstract;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
#endif
namespace Wino.Views
{
public sealed partial class MailListPage : MailListPageAbstract,
@@ -90,7 +100,7 @@ namespace Wino.Views
SelectAllCheckbox.Unchecked += SelectAllCheckboxUnchecked;
}
private void SelectionModeToggleChecked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private void SelectionModeToggleChecked(object sender, RoutedEventArgs e)
{
ChangeSelectionMode(ListViewSelectionMode.Multiple);
}
@@ -132,17 +142,17 @@ namespace Wino.Views
}
}
private void SelectionModeToggleUnchecked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private void SelectionModeToggleUnchecked(object sender, RoutedEventArgs e)
{
ChangeSelectionMode(ListViewSelectionMode.Extended);
}
private void SelectAllCheckboxChecked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private void SelectAllCheckboxChecked(object sender, RoutedEventArgs e)
{
MailListView.SelectAllWino();
}
private void SelectAllCheckboxUnchecked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private void SelectAllCheckboxUnchecked(object sender, RoutedEventArgs e)
{
MailListView.ClearSelections();
}

View File

@@ -15,10 +15,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:selectors="using:Wino.Selectors"
xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
xmlns:viewModelData="using:Wino.Mail.ViewModels.Data"
x:Name="root"
muxc:BackdropMaterial.ApplyToRootOrPageBackground="{ThemeResource UseMica}"
IsDarkEditor="{x:Bind ViewModel.IsDarkWebviewRenderer, Mode=TwoWay}"
mc:Ignorable="d">
@@ -376,10 +374,7 @@
<Grid Margin="1" CornerRadius="7">
<Grid Background="White" Visibility="{x:Bind IsDarkEditor, Converter={StaticResource ReverseBooleanToVisibilityConverter}, Mode=OneWay}" />
<controls:WebView2
x:Name="Chromium"
FontFamily="Segoe UI"
NavigationStarting="WebViewNavigationStarting" />
<controls:WebView2 x:Name="Chromium" NavigationStarting="WebViewNavigationStarting" />
<muxc:ProgressRing
Width="50"

View File

@@ -8,10 +8,7 @@ using Microsoft.UI.Xaml.Controls;
using Microsoft.Web.WebView2.Core;
using Newtonsoft.Json;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
using Wino.Core.Domain;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
@@ -20,6 +17,17 @@ using Wino.Core.Messages.Shell;
using Wino.Mail.ViewModels.Data;
using Wino.Views.Abstract;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
#endif
namespace Wino.Views
{
public sealed partial class MailRenderingPage : MailRenderingPageAbstract,

View File

@@ -3,8 +3,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using CommunityToolkit.Mvvm.Messaging;
using MoreLinq;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
using Wino.Core.Domain.Enums;
using Wino.Core.Messages.Navigation;
using Wino.Core.Requests;
@@ -13,6 +12,14 @@ using Wino.Views.Abstract;
using Wino.Views.Account;
using Wino.Views.Settings;
#if NET8_0
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
#else
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
#endif
namespace Wino.Views
{
public sealed partial class NewAccountManagementPage : NewAccountManagementPageAbstract,

View File

@@ -5,7 +5,7 @@
xmlns:abstract="using:Wino.Views.Abstract"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:helpers="using:Wino.Helpers"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:selectors="using:Wino.Selectors"

View File

@@ -3,8 +3,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using CommunityToolkit.Mvvm.Messaging;
using MoreLinq;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
using Wino.Core.Domain;
using Wino.Core.Domain.Enums;
using Wino.Core.Messages.Navigation;
@@ -12,6 +11,13 @@ using Wino.Mail.ViewModels.Data;
using Wino.Views.Abstract;
using Wino.Views.Settings;
#if NET8_0
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
#else
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
#endif
namespace Wino.Views
{
public sealed partial class SettingsPage : SettingsPageAbstract, IRecipient<BreadcrumbNavigationRequested>

View File

@@ -324,6 +324,7 @@
<Compile Include="MenuFlyouts\RendererCommandBarItem.cs" />
<Compile Include="Helpers\WinoVisualTreeHelper.cs" />
<Compile Include="Helpers\XamlHelpers.cs" />
<Compile Include="PartialApp.cs" />
<Compile Include="Selectors\AccountProviderViewModelTemplateSelector.cs" />
<Compile Include="Selectors\AccountReorderTemplateSelector.cs" />
<Compile Include="Selectors\AppThemePreviewTemplateSelector.cs" />