1 Commits

Author SHA1 Message Date
Burak Kaan Köse
a641a51188 Release beta 1.7.1 2024-04-20 03:07:40 +02:00
758 changed files with 34434 additions and 22151 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [bkaankose]

20
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Bug Report
about: Something is not working as intended
title: "[Bug]"
labels: bug
assignees: bkaankose
---
**Describe the bug**
A clear and concise description of what the bug is.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature Proposal
about: Suggest an idea for this project
title: "[Proposal]"
labels: enhancement
assignees: ''
---
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Is your proposal implemented in Windows Mail?**
Wino's priority is to catch up with the feature set of Windows Mail first.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -25,7 +25,6 @@ I'm a big fan of Windows Mail & Calendars due to its simplicity. Personally, I f
- API integration for Outlook and Gmail
- IMAP/SMTP support for custom mail servers
- Send, receive, mark as (read,important,spam etc), move mails.
- Linked/Merged Accounts
- Toast notifications with background sync.
- Instant startup performance
- Offline use / search.
@@ -44,7 +43,7 @@ Download latest version of Wino Mail from Microsoft Store for free.
## Beta Releases
Stable releases will always be distributed on Microsoft Store. However, beta releases will be distributed in [GitHub Releases](https://github.com/bkaankose/Wino-Mail/releases). Please keep in mind that beta releases might not be for daily use, only for testing purposes and recommended for experienced users or developers. Beta releases are also managed manually. Therefore, code in the repository might be ahead of the released Beta version at the moment. Make sure to compare versions before tryout out the Beta version.
Stable releases will always be distributed on Microsoft Store. However, beta releases will be distributed in [GitHub Releases](https://github.com/bkaankose/Wino-Mail/releases). Please keep in mind that beta releases might not be for daily use, only for testing purposes and recommended for experienced users or developers.
These releases are distributed as side-loaded packages. To install them, download the **.msixbundle** file in GitHub releases and [follow the steps explained here.](https://learn.microsoft.com/en-us/windows/application-management/sideload-apps-in-windows)
@@ -53,6 +52,10 @@ These releases are distributed as side-loaded packages. To install them, downloa
Check out the [contribution guidelines](/CONTRIBUTING.md) before diving into the source code or opening an issue. There are multiple ways to contribute and all of them are explained in detail there.
#### Attention
Sources here **does not belong to the Store version of Wino Mail. It belongs to beta release as of April 17 2024.** I've been working on a big patch for couple months already and the code here includes those changes, but these changes are not yet released to Microsoft Store. Therefore, if you'd like to contribute, please validate the bug before in beta version and start working on it. I will delete this text from here once this big patch goes alive in the Store, so everything will be aligned then.
## Donate
Your donations will motivate me more to work on Wino in my spare time and cover the expenses to keep [project's website](https://www.winomail.app/) alive.

View File

@@ -0,0 +1,34 @@
using Microsoft.Toolkit.Uwp.Notifications;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Background;
using Wino.Core.Domain;
namespace Wino.BackgroundTasks
{
/// <summary>
/// Creates a toast notification to notify user when the Store update happens.
/// </summary>
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);
builder.AddText(Translator.Notifications_WinoUpdatedTitle);
builder.AddText(string.Format(Translator.Notifications_WinoUpdatedMessage, versionText));
builder.Show();
def.Complete();
}
}
}

View File

@@ -0,0 +1,29 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Wino.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)]

View File

@@ -0,0 +1,48 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using Serilog;
using Windows.ApplicationModel.Background;
using Windows.Storage;
using Wino.Core;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Services;
using Wino.Core.UWP;
using Wino.Services;
namespace Wino.BackgroundTasks
{
public sealed class SessionConnectedTask : IBackgroundTask
{
public async void Run(IBackgroundTaskInstance taskInstance)
{
var def = taskInstance.GetDeferral();
try
{
var services = new ServiceCollection();
services.RegisterCoreServices();
services.RegisterCoreUWPServices();
var providere = services.BuildServiceProvider();
var backgroundTaskService = providere.GetService<IBackgroundSynchronizer>();
var dbService = providere.GetService<IDatabaseService>();
var logInitializer = providere.GetService<ILogInitializer>();
logInitializer.SetupLogger(ApplicationData.Current.LocalFolder.Path);
await dbService.InitializeAsync();
await backgroundTaskService.RunBackgroundSynchronizationAsync(Core.Domain.Enums.BackgroundSynchronizationReason.SessionConnected);
}
catch (Exception ex)
{
Log.Error(ex, "Background synchronization failed from background task.");
}
finally
{
def.Complete();
}
}
}
}

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D9EF0F59-F5F2-4D6C-A5BA-84043D8F3E08}</ProjectGuid>
<OutputType>winmdobj</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wino.BackgroundTasks</RootNamespace>
<AssemblyName>Wino.BackgroundTasks</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AllowCrossPlatformRetargeting>false</AllowCrossPlatformRetargeting>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="AppUpdatedTask.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SessionConnectedTask.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications">
<Version>7.1.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj">
<Project>{CF3312E5-5DA0-4867-9945-49EA7598AF1F}</Project>
<Name>Wino.Core.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\Wino.Core.UWP\Wino.Core.UWP.csproj">
<Project>{395f19ba-1e42-495c-9db5-1a6f537fccb8}</Project>
<Name>Wino.Core.UWP</Name>
</ProjectReference>
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj">
<Project>{e6b1632a-8901-41e8-9ddf-6793c7698b0b}</Project>
<Name>Wino.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsDesktop, Version=10.0.22621.0">
<Name>Windows Desktop Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

7
Wino.Calendar/App.xaml Normal file
View File

@@ -0,0 +1,7 @@
<Application
x:Class="Wino.Calendar.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Wino.Calendar">
</Application>

100
Wino.Calendar/App.xaml.cs Normal file
View File

@@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace Wino.Calendar
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,14 @@
<Page
x:Class="Wino.Calendar.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Wino.Calendar"
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,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace Wino.Calendar
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
}

View File

@@ -4,25 +4,32 @@
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
IgnorableNamespaces="uap mp">
<!-- Publisher Cache Folders -->
<Extensions>
<Extension Category="windows.publisherCacheFolders">
<PublisherCacheFolders>
<Folder Name="WinoShared" />
</PublisherCacheFolders>
</Extension>
</Extensions>
<Identity
Name="f7498058-466c-48d4-bc53-0afe4ec4de31"
Publisher="CN=bkaan"
Name="58272BurakKSE.WinoCalendar"
Publisher="CN=51FBDAF3-E212-4149-89A2-A2636B3BC911"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="f7498058-466c-48d4-bc53-0afe4ec4de31" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<mp:PhoneIdentity PhoneProductId="f047b7dd-96ec-4d54-a862-9321e271e449" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>Wino.Server.NET8</DisplayName>
<PublisherDisplayName>bkaan</PublisherDisplayName>
<DisplayName>Wino Calendar</DisplayName>
<PublisherDisplayName>Burak KÖSE</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
@@ -32,20 +39,20 @@
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
EntryPoint="Wino.Calendar.App">
<uap:VisualElements
DisplayName="Wino.Server.NET8"
Description="Wino.Server.NET8"
BackgroundColor="transparent"
DisplayName="Wino Calendar"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
Square44x44Logo="Assets\Square44x44Logo.png"
Description="Wino.Calendar"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<Capability Name="internetClient" />
</Capabilities>
</Package>
</Package>

View File

@@ -0,0 +1,29 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Wino.Calendar")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Wino.Calendar")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

View File

@@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{600F4979-DB7E-409D-B7DA-B60BE4C55C35}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wino.Calendar</RootNamespace>
<AssemblyName>Wino.Calendar</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>125A5273FCFE8D551C3FED87F67C87A663E98F1B</PackageCertificateThumbprint>
<PackageCertificateKeyFile />
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<None Include="Package.StoreAssociation.xml" />
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.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>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.14</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,6 +1,4 @@
using Wino.Domain.Enums;
namespace Wino.Domain
namespace Wino.Core.Domain
{
public static class Constants
{
@@ -10,35 +8,7 @@ namespace Wino.Domain
public const string WinoLocalDraftHeader = "X-Wino-Draft-Id";
public const string LocalDraftStartPrefix = "localDraft_";
// Toast Notification Keys
public const string ToastMailItemIdKey = nameof(ToastMailItemIdKey);
public const string ToastMailItemRemoteFolderIdKey = nameof(ToastMailItemRemoteFolderIdKey);
public const string ToastActionKey = nameof(ToastActionKey);
// App Configuration
public const AppLanguage DefaultAppLanguage = AppLanguage.English;
public const string SharedFolderName = "WinoShared";
public static char MailCopyUidSeparator = '_';
// GMail Category Labels
public const string FORUMS_LABEL_ID = "FORUMS";
public const string UPDATES_LABEL_ID = "UPDATES";
public const string PROMOTIONS_LABEL_ID = "PROMOTIONS";
public const string SOCIAL_LABEL_ID = "SOCIAL";
public const string PERSONAL_LABEL_ID = "PERSONAL";
public static string[] SubCategoryFolderLabelIds =
[
FORUMS_LABEL_ID,
UPDATES_LABEL_ID,
PROMOTIONS_LABEL_ID,
SOCIAL_LABEL_ID,
PERSONAL_LABEL_ID
];
// File Names
public const string ProtocolLogFileName = "ImapProtocolLog.log";
public const string WinoLogFileName = "WinoDiagnostics.log";
}
}

View File

@@ -1,17 +1,13 @@
using System;
using SQLite;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public class AccountSignature
{
[PrimaryKey]
public Guid Id { get; set; }
public string Name { get; set; }
public string HtmlBody { get; set; }
public Guid MailAccountId { get; set; }
}
}

View File

@@ -2,7 +2,7 @@
using System;
using System.Collections.Generic;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
/// <summary>
/// Back storage for simple name-address book.

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
using Wino.Domain.Enums;
using Wino.Core.Domain.Enums;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public class CustomServerInformation
{
@@ -11,10 +11,6 @@ namespace Wino.Domain.Entities
public Guid AccountId { get; set; }
/// <summary>
/// This field is ignored. DisplayName is stored in MailAccount as SenderName from now.
/// </summary>
[Ignore]
public string DisplayName { get; set; }
public string Address { get; set; }
public string IncomingServer { get; set; }
@@ -43,11 +39,11 @@ namespace Wino.Domain.Entities
public string ProxyServer { get; set; }
public string ProxyServerPort { get; set; }
[Obsolete("As 1.7.0")]
public bool IncomingRequiresSSL { get; set; }
/// <summary>
/// Number of concurrent clients that can connect to the server.
/// Default is 5.
/// </summary>
public int MaxConcurrentClients { get; set; }
[Obsolete("As 1.7.0")]
public bool OutgoingRequresSSL { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
using Wino.Domain.Enums;
using Wino.Core.Domain.Enums;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public class MailAccount
{
@@ -20,7 +20,7 @@ namespace Wino.Domain.Entities
/// IMAP is populated by user on setup dialog.
/// </summary>
public string SenderName { get; set; }
public string ProfileName { get; set; }
/// <summary>
/// Account e-mail address.
@@ -40,14 +40,10 @@ namespace Wino.Domain.Entities
public string SynchronizationDeltaIdentifier { get; set; }
/// <summary>
/// TODO: Gets or sets the custom account identifier color in hex.
/// Gets or sets the signature to be used for this account.
/// Null if no signature should be used.
/// </summary>
public string AccountColorHex { get; set; }
/// <summary>
/// Gets or sets the listing order of the account in the accounts list.
/// </summary>
public int Order { get; set; }
public Guid? SignatureId { get; set; }
/// <summary>
/// Gets or sets whether the account has any reason for an interactive user action to fix continue operating.

View File

@@ -1,7 +1,7 @@
using System;
using SQLite;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public class MailAccountPreferences
{
@@ -25,25 +25,15 @@ namespace Wino.Domain.Entities
/// </summary>
public bool IsNotificationsEnabled { get; set; }
/// <summary>
/// Gets or sets the custom account identifier color in hex.
/// </summary>
public string AccountColorHex { get; set; }
/// <summary>
/// Gets or sets whether the account has Focused inbox support.
/// Null if the account provider type doesn't support Focused inbox.
/// </summary>
public bool? IsFocusedInboxEnabled { get; set; }
/// <summary>
/// Gets or sets whether signature should be appended automatically.
/// </summary>
public bool IsSignatureEnabled { get; set; }
/// <summary>
/// Gets or sets signature for new messages. Null if signature is not needed.
/// </summary>
public Guid? SignatureIdForNewMessages { get; set; }
/// <summary>
/// Gets or sets signature for following messages. Null if signature is not needed.
/// </summary>
public Guid? SignatureIdForFollowingMessages { get; set; }
}
}

View File

@@ -1,10 +1,9 @@
using System;
using System.Collections.Generic;
using SQLite;
using Wino.Domain.Enums;
using Wino.Domain.Models.MailItem;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.MailItem;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
/// <summary>
/// Summary of the parsed MIME messages.
@@ -108,12 +107,6 @@ namespace Wino.Domain.Entities
/// </summary>
public string DraftId { get; set; }
/// <summary>
/// Whether this mail is only created locally.
/// </summary>
[Ignore]
public bool IsLocalDraft => !string.IsNullOrEmpty(DraftId) && DraftId.StartsWith(Constants.LocalDraftStartPrefix);
/// <summary>
/// Whether this copy is draft or not.
/// </summary>
@@ -141,7 +134,7 @@ namespace Wino.Domain.Entities
/// </summary>
[Ignore]
public MailAccount AssignedAccount { get; set; }
public IEnumerable<Guid> GetContainingIds() => new[] { UniqueId };
public override string ToString() => $"{Subject} <-> {Id}";
}
}

View File

@@ -2,11 +2,10 @@
using System.Collections.Generic;
using System.Diagnostics;
using SQLite;
using Wino.Domain;
using Wino.Domain.Enums;
using Wino.Domain.Models.Folders;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Folders;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
[DebuggerDisplay("{FolderName} - {SpecialFolderType}")]
public class MailItemFolder : IMailItemFolder
@@ -68,9 +67,6 @@ namespace Wino.Domain.Entities
return false;
}
public static MailItemFolder CreateMoreFolder() => new MailItemFolder() { IsSticky = true, SpecialFolderType = SpecialFolderType.More, FolderName = Translator.MoreFolderNameOverride };
public static MailItemFolder CreateCategoriesFolder() => new MailItemFolder() { IsSticky = true, SpecialFolderType = SpecialFolderType.Category, FolderName = Translator.CategoriesFolderNameOverride };
public override string ToString() => FolderName;
}
}

View File

@@ -1,7 +1,7 @@
using System;
using SQLite;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public class MergedInbox
{

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public record SystemFolderConfiguration(MailItemFolder SentFolder,
MailItemFolder DraftFolder,

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
using Wino.Domain.Models.Authentication;
using Wino.Core.Domain.Models.Authentication;
namespace Wino.Domain.Entities
namespace Wino.Core.Domain.Entities
{
public class TokenInformation : TokenInformationBase
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum AccountAttentionReason
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum AccountCreationDialogState
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
/// <summary>
/// Indicates the state of synchronizer.

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum AppLanguage
{
@@ -11,9 +11,6 @@
Czech,
Chinese,
Spanish,
French,
Indonesian,
Greek,
PortugeseBrazil,
French
}
}

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum AppThemeType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum ApplicationElementTheme
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum BackgroundSynchronizationReason
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum ChangeRequestType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum CustomIncomingServerType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum DraftCreationReason
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum EditorToolbarSectionType
{

View File

@@ -1,11 +1,10 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum FilterOptionType
{
All,
Unread,
Flagged,
Mentions,
Files
Mentions
}
}

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
/// <summary>
/// Defines all possible folder operations that can be done.

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum ImapAuthenticationMethod
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum ImapConnectionSecurity
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum InfoBarAnimationType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum InfoBarMessageType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum MailAttachmentType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum MailImportance
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum MailListDisplayMode
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum MailMarkAsOption
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
// Synchronizer requests.
public enum MailSynchronizerOperation
@@ -11,10 +11,7 @@
ChangeFlag,
AlwaysMoveTo,
MoveToFocused,
Archive,
RenameFolder,
EmptyFolder,
MarkFolderRead,
RenameFolder
}
// UI requests
@@ -47,7 +44,6 @@
DarkEditor,
LightEditor,
Print,
DiscardLocalDraft,
Navigate // For toast activation
}
}

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum MailProviderType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum MenuPaneMode
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum NavigationReferenceFrame
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
/// <summary>
/// Defines the potential reasons for picking folder in the folder picking dialog.

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum ReaderFont
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum SortingOptionType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum SpecialFolderType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
// From the SDK.
public enum StorePurchaseResult

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum SynchronizationCompletedState
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
public enum SynchronizationType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Enums
namespace Wino.Core.Domain.Enums
{
/// <summary>
/// All registered views.
@@ -20,7 +20,6 @@
MessageListPage,
MailListPage,
ReadingPanePage,
LanguageTimePage,
SettingOptionsPage,
SettingOptionsPage
}
}

View File

@@ -1,11 +0,0 @@
namespace Wino.Domain.Enums
{
public enum WinoServerConnectionStatus
{
None,
Connecting,
Connected,
Disconnected,
Failed
}
}

View File

@@ -1,6 +1,6 @@
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
public class AccountSetupCanceledException : Exception
public class AccountSetupCanceledException : System.Exception
{
}

View File

@@ -1,7 +1,7 @@
using System;
using Wino.Domain.Entities;
using Wino.Core.Domain.Entities;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// All exceptions related to authentication.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// An exception thrown when the background task execution policies are denied for some reason.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// An exception thrown when the background task registration is failed.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// Thrown when composer cant find the mime to load.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
public class CustomThemeCreationFailedException : Exception
{

View File

@@ -1,6 +1,6 @@
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
public class GoogleAuthenticationException : Exception
public class GoogleAuthenticationException : System.Exception
{
public GoogleAuthenticationException(string message) : base(message) { }
}

View File

@@ -1,12 +1,11 @@
namespace Wino.Domain.Exceptions
using System;
namespace Wino.Core.Domain.Exceptions
{
public class ImapClientPoolException : Exception
{
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
public ImapClientPoolException(Exception innerException) : base(Translator.Exception_ImapClientPoolFailed, innerException)
{
ProtocolLog = protocolLog;
}
public string ProtocolLog { get; }
}
}

View File

@@ -1,21 +0,0 @@
using System;
using Wino.Domain.Models.AutoDiscovery;
namespace Wino.Domain.Exceptions
{
public class ImapConnectionFailedPackage
{
public ImapConnectionFailedPackage(Exception error, string protocolLog, AutoDiscoverySettings settings)
{
Error = error;
ProtocolLog = protocolLog;
Settings = settings;
}
public AutoDiscoverySettings Settings { get; }
public Exception Error { get; }
public string ProtocolLog { get; }
public string GetErrorMessage() => Error.InnerException == null ? Error.Message : Error.InnerException.Message;
}
}

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
public class InvalidMoveTargetException : Exception { }
}

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
public class SynchronizerEntityNotFoundException : Exception
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
public class SynchronizerException : Exception
{

View File

@@ -1,7 +1,7 @@
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// When IMAP account's system folder configuration setup is not done yet.
/// </summary>
public class SystemFolderConfigurationMissingException : Exception { }
public class SystemFolderConfigurationMissingException : System.Exception { }
}

View File

@@ -1,7 +1,7 @@
using System;
using Wino.Domain.Enums;
using Wino.Core.Domain.Enums;
namespace Wino.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// Emitted when special folder is needed for an operation but it couldn't be found.

View File

@@ -1,14 +0,0 @@
namespace Wino.Domain.Extensions
{
public static class MailkitClientExtensions
{
public static uint ResolveUid(string mailCopyId)
{
var splitted = mailCopyId.Split(Constants.MailCopyUidSeparator);
if (splitted.Length > 1 && uint.TryParse(splitted[1], out uint parsedUint)) return parsedUint;
throw new ArgumentOutOfRangeException(nameof(mailCopyId), mailCopyId, "Invalid mailCopyId format.");
}
}
}

View File

@@ -1,22 +0,0 @@
using MimeKit;
using Wino.Domain;
using Wino.Domain.Entities;
namespace Wino.Domain.Extensions
{
public static class MimeExtensions
{
public static AddressInformation ToAddressInformation(this MailboxAddress address)
{
if (address == null)
return new AddressInformation() { Name = Translator.UnknownSender, Address = Translator.UnknownAddress };
if (string.IsNullOrEmpty(address.Name))
address.Name = address.Address;
return new AddressInformation() { Name = address.Name, Address = address.Address };
}
}
}

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
/// <summary>
/// An interface that should force synchronizer to do synchronization for only given folder ids

View File

@@ -1,6 +1,6 @@
using Wino.Domain.Enums;
using Wino.Core.Domain.Enums;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAccountCreationDialog
{

View File

@@ -1,21 +1,13 @@
using System.Collections.Generic;
using Wino.Domain.Entities;
using Wino.Core.Domain.Entities;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAccountMenuItem : IMenuItem
{
bool IsEnabled { get; set; }
double SynchronizationProgress { get; set; }
int UnreadItemCount { get; set; }
IEnumerable<MailAccount> HoldingAccounts { get; }
void UpdateAccount(MailAccount account);
}
public interface IMergedAccountMenuItem : IAccountMenuItem
{
int MergedAccountCount { get; }
MergedInbox Parameter { get; }
}
}

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAccountPickerDialog
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAccountProviderDetailViewModel
{
@@ -13,26 +13,5 @@ namespace Wino.Domain.Interfaces
/// Name representation of the view model that will be used to identify the startup entity on launch.
/// </summary>
string StartupEntityTitle { get; }
/// <summary>
/// E-mail addresses that this account holds.
/// </summary>
string StartupEntityAddresses { get; }
/// <summary>
/// Represents the account order in the accounts list.
/// </summary>
int Order { get; }
/// <summary>
/// Provider details of the account.
/// </summary>
IProviderDetail ProviderDetail { get; set; }
/// <summary>
/// How many accounts this provider has.
/// </summary>
int HoldingAccountCount { get; }
}
}

View File

@@ -1,6 +1,6 @@
using Wino.Domain.Entities;
using Wino.Core.Domain.Entities;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAccountProviderDetails
{

View File

@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Wino.Domain.Entities;
using Wino.Core.Domain.Entities;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAccountService
{
@@ -68,37 +68,12 @@ namespace Wino.Domain.Interfaces
/// <returns>Current account synchronization modifier.</returns>
Task<string> UpdateSynchronizationIdentifierAsync(Guid accountId, string newIdentifier);
/// <summary>
/// Renames the merged inbox with the given id.
/// </summary>
/// <param name="mergedInboxId">Merged Inbox id</param>
/// <param name="newName">New name for the merged/linked inbox.</param>
Task RenameMergedAccountAsync(Guid mergedInboxId, string newName);
/// <summary>
/// Creates a new merged inbox with the given accounts.
/// </summary>
/// <param name="mergedInbox">Merged inbox properties.</param>
/// <param name="accountsToMerge">List of accounts to merge together.</param>
Task CreateMergeAccountsAsync(MergedInbox mergedInbox, IEnumerable<MailAccount> accountsToMerge);
/// <summary>
/// Updates the merged inbox with the given id with the new linked accounts.
/// </summary>
/// <param name="mergedInboxId">Updating merged inbox id.</param>
/// <param name="linkedAccountIds">List of linked account ids.</param>
Task UpdateMergedInboxAsync(Guid mergedInboxId, IEnumerable<Guid> linkedAccountIds);
/// <summary>
/// Destroys the merged inbox with the given id.
/// </summary>
/// <param name="mergedInboxId">Merged inbox id to destroy.</param>
Task UnlinkMergedInboxAsync(Guid mergedInboxId);
/// <summary>
/// Updates the account listing orders.
/// </summary>
/// <param name="accountIdOrderPair">AccountId-OrderNumber pair for all accounts.</param>
Task UpdateAccountOrdersAsync(Dictionary<Guid, int> accountIdOrderPair);
}
}

View File

@@ -0,0 +1,11 @@
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces
{
public interface IAppInitializerService
{
string GetApplicationDataFolder();
Task MigrateAsync();
}
}

View File

@@ -1,21 +0,0 @@
namespace Wino.Domain.Interfaces
{
/// <summary>
/// Singleton object that holds the application data folder path and the publisher shared folder path.
/// Load the values before calling any service.
/// App data folder is used for storing files.
/// Pubhlisher cache folder is only used for database file so other apps can access it in the same package by same publisher.
/// </summary>
public interface IApplicationConfiguration
{
/// <summary>
/// Application data folder.
/// </summary>
string ApplicationDataFolderPath { get; set; }
/// <summary>
/// Publisher shared folder path.
/// </summary>
string PublisherSharedFolderPath { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IApplicationResourceManager<T>
{
@@ -7,6 +7,5 @@
bool ContainsResourceKey(string resourceKey);
void ReplaceResource(string resourceKey, object resource);
T GetLastResource();
TReturn GetResource<TReturn>(string resourceKey);
}
}

View File

@@ -1,6 +1,6 @@
using Wino.Domain.Enums;
using Wino.Core.Domain.Enums;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAuthenticationProvider
{

View File

@@ -1,9 +1,9 @@
using System;
using System.Threading.Tasks;
using Wino.Domain.Entities;
using Wino.Domain.Enums;
using Wino.Core.Domain.Entities;
using Wino.Core.Domain.Enums;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
public interface IAuthenticator
{

View File

@@ -1,7 +1,7 @@
using System.Threading.Tasks;
using Wino.Domain.Models.AutoDiscovery;
using Wino.Core.Domain.Models.AutoDiscovery;
namespace Wino.Domain.Interfaces
namespace Wino.Core.Domain.Interfaces
{
/// <summary>
/// Searches for Auto Discovery settings for custom mail accounts.

View File

@@ -0,0 +1,19 @@
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces
{
public interface IBackgroundTaskService
{
/// <summary>
/// Manages background task registrations, requests access if needed, checks the statusses of them etc.
/// </summary>
/// <exception cref="BackgroundTaskExecutionRequestDeniedException">If the access request is denied for some reason.</exception>
/// <exception cref="BackgroundTaskRegistrationFailedException">If one of the requires background tasks are failed during registration.</exception>
Task HandleBackgroundTaskRegistrations();
/// <summary>
/// Unregisters all existing background tasks. Useful for migrations.
/// </summary>
void UnregisterAllBackgroundTask();
}
}

View File

@@ -1,54 +0,0 @@
using System.Threading;
using System.Threading.Tasks;
using MailKit;
using Wino.Domain.Entities;
using Wino.Domain.Enums;
using Wino.Domain.Models.MailItem;
using Wino.Domain.Models.Synchronization;
namespace Wino.Domain.Interfaces
{
public interface IBaseSynchronizer
{
/// <summary>
/// Account that is assigned for this synchronizer.
/// </summary>
MailAccount Account { get; }
/// <summary>
/// Synchronizer state.
/// </summary>
AccountSynchronizerState State { get; }
/// <summary>
/// Queues a single request to be executed in the next synchronization.
/// </summary>
/// <param name="request">Request to queue.</param>
void QueueRequest(IRequestBase request);
/// <summary>
/// TODO
/// </summary>
/// <returns>Whether active synchronization is stopped or not.</returns>
bool CancelActiveSynchronization();
/// <summary>
/// Performs a full synchronization with the server with given options.
/// This will also prepares batch requests for execution.
/// Requests are executed in the order they are queued and happens before the synchronization.
/// Result of the execution queue is processed during the synchronization.
/// </summary>
/// <param name="options">Options for synchronization.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>Result summary of synchronization.</returns>
Task<SynchronizationResult> SynchronizeAsync(SynchronizationOptions options, CancellationToken cancellationToken = default);
/// <summary>
/// Downloads a single MIME message from the server and saves it to disk.
/// </summary>
/// <param name="mailItem">Mail item to download from server.</param>
/// <param name="transferProgress">Optional progress reporting for download operation.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task DownloadMissingMimeMessageAsync(IMailItem mailItem, ITransferProgress transferProgress, CancellationToken cancellationToken = default);
}
}

Some files were not shown because too many files have changed in this diff Show More