Compare commits
53 Commits
v1.8.7
...
feature/Wi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fbcf8e104 | ||
|
|
495885e006 | ||
|
|
f112f369a7 | ||
|
|
1f472d78e0 | ||
|
|
ebf4bc6f97 | ||
|
|
654b7ec1a7 | ||
|
|
e3a36b9191 | ||
|
|
2944e80540 | ||
|
|
2d6155ae6f | ||
|
|
e04c17d591 | ||
|
|
5b68f237f0 | ||
|
|
026151e7e4 | ||
|
|
7d0934b679 | ||
|
|
756cf5992c | ||
|
|
0cb39d41e8 | ||
|
|
3f17a10ad0 | ||
|
|
5a1aafb3ce | ||
|
|
38f44a8b39 | ||
|
|
7ef045a0ad | ||
|
|
a9a9907bc6 | ||
|
|
329eae3a25 | ||
|
|
ad1c7e1fd3 | ||
|
|
06d85594d8 | ||
|
|
7d3dbc6bb0 | ||
|
|
ec4162e71f | ||
|
|
3b8454269e | ||
|
|
2e0dd24cdd | ||
|
|
403e5e5de0 | ||
|
|
fbdd068274 | ||
|
|
564485a574 | ||
|
|
0280710a73 | ||
|
|
d152a87db9 | ||
|
|
592e5d899e | ||
|
|
2de78f520c | ||
|
|
cba937a640 | ||
|
|
eb9568a76e | ||
|
|
76a9fe496a | ||
|
|
a19330afa4 | ||
|
|
75dec01eb8 | ||
|
|
bd6a929988 | ||
|
|
91b6a4204e | ||
|
|
e6e758e9ba | ||
|
|
ef151aa7a6 | ||
|
|
1ff82e62ff | ||
|
|
c45d0022d6 | ||
|
|
bdfff1536d | ||
|
|
6ce806e4ef | ||
|
|
40657ee109 | ||
|
|
9edb06c1cc | ||
|
|
dec5d2b2b7 | ||
|
|
ffd7cef409 | ||
|
|
f62cc1e243 | ||
|
|
f7656da56d |
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@@ -1,3 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [bkaankose]
|
||||
20
.github/ISSUE_TEMPLATE/bug-report.md
vendored
20
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Something is not working as intended
|
||||
title: "[Bug]"
|
||||
labels: bug
|
||||
assignees: bkaankose
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
17
.github/ISSUE_TEMPLATE/feature-proposal.md
vendored
17
.github/ISSUE_TEMPLATE/feature-proposal.md
vendored
@@ -1,17 +0,0 @@
|
||||
---
|
||||
name: Feature Proposal
|
||||
about: Suggest an idea for this project
|
||||
title: "[Proposal]"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Is your proposal implemented in Windows Mail?**
|
||||
Wino's priority is to catch up with the feature set of Windows Mail first.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"AttributesTolerance": 2,
|
||||
"KeepFirstAttributeOnSameLine": false,
|
||||
"MaxAttributeCharactersPerLine": 0,
|
||||
"MaxAttributesPerLine": 1,
|
||||
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter",
|
||||
"SeparateByGroups": false,
|
||||
"AttributeIndentation": 0,
|
||||
"AttributeIndentationStyle": 1,
|
||||
"RemoveDesignTimeReferences": false,
|
||||
"IgnoreDesignTimeReferencePrefix": false,
|
||||
"EnableAttributeReordering": true,
|
||||
"AttributeOrderingRuleGroups": [
|
||||
"x:Class",
|
||||
"xmlns, xmlns:x",
|
||||
"xmlns:*",
|
||||
"x:Key, Key, x:Name, Name, x:Uid, Uid, Title",
|
||||
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom",
|
||||
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
|
||||
"Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
|
||||
"*:*, *",
|
||||
"PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint",
|
||||
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText",
|
||||
"Storyboard.*, From, To, Duration"
|
||||
],
|
||||
"FirstLineAttributes": "",
|
||||
"OrderAttributesByName": true,
|
||||
"PutEndingBracketOnNewLine": false,
|
||||
"RemoveEndingTagOfEmptyElement": true,
|
||||
"SpaceBeforeClosingSlash": true,
|
||||
"RootElementLineBreakRule": 0,
|
||||
"ReorderVSM": 2,
|
||||
"ReorderGridChildren": false,
|
||||
"ReorderCanvasChildren": false,
|
||||
"ReorderSetters": 0,
|
||||
"FormatMarkupExtension": true,
|
||||
"NoNewLineMarkupExtensions": "x:Bind, Binding",
|
||||
"ThicknessSeparator": 2,
|
||||
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin",
|
||||
"FormatOnSave": true,
|
||||
"CommentPadding": 2,
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using Microsoft.Toolkit.Uwp.Notifications;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Background;
|
||||
|
||||
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);
|
||||
|
||||
// TODO: Handle with Translator, but it's not initialized here yet.
|
||||
builder.AddText("Wino Mail is updated!");
|
||||
builder.AddText(string.Format("New version {0} is ready.", versionText));
|
||||
|
||||
builder.Show();
|
||||
|
||||
def.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Wino.BackgroundTasks")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Wino.BackgroundTasks")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
||||
@@ -1,126 +0,0 @@
|
||||
<?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|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|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" />
|
||||
</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)' < '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>
|
||||
@@ -1,7 +0,0 @@
|
||||
<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>
|
||||
@@ -1,100 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -1,14 +0,0 @@
|
||||
<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>
|
||||
@@ -1,30 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Wino.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)]
|
||||
@@ -1,31 +0,0 @@
|
||||
<!--
|
||||
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>
|
||||
@@ -1,172 +0,0 @@
|
||||
<?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)' < '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>
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Wino.Core.Domain
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Domain
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
@@ -8,11 +10,35 @@
|
||||
public const string WinoLocalDraftHeader = "X-Wino-Draft-Id";
|
||||
public const string LocalDraftStartPrefix = "localDraft_";
|
||||
|
||||
public const string ToastMailUniqueIdKey = nameof(ToastMailUniqueIdKey);
|
||||
// Toast Notification Keys
|
||||
public const string ToastMailItemIdKey = nameof(ToastMailItemIdKey);
|
||||
public const string ToastMailItemRemoteFolderIdKey = nameof(ToastMailItemRemoteFolderIdKey);
|
||||
public const string ToastActionKey = nameof(ToastActionKey);
|
||||
|
||||
public const string ClientLogFile = "Client_.log";
|
||||
public const string ServerLogFile = "Server_.log";
|
||||
public const string LogArchiveFileName = "WinoLogs.zip";
|
||||
// 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";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public class AccountSignature
|
||||
{
|
||||
|
||||
@@ -1,49 +1,31 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SQLite;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Back storage for simple name-address book.
|
||||
/// These values will be inserted during MIME fetch.
|
||||
/// </summary>
|
||||
|
||||
|
||||
// TODO: This can easily evolve to Contact store, just like People app in Windows 10/11.
|
||||
// Do it.
|
||||
public class AccountContact : IEquatable<AccountContact>
|
||||
public class AddressInformation : IEquatable<AddressInformation>
|
||||
{
|
||||
/// <summary>
|
||||
/// E-mail address of the contact.
|
||||
/// </summary>
|
||||
[PrimaryKey]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Display name of the contact.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Base64 encoded profile image of the contact.
|
||||
/// </summary>
|
||||
public string Base64ContactPicture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// All registered accounts have their contacts registered as root.
|
||||
/// Root contacts must not be overridden by any configuration.
|
||||
/// They are created on account creation.
|
||||
/// </summary>
|
||||
public bool IsRootContact { get; set; }
|
||||
|
||||
public string DisplayName => Address == Name ? Address : $"{Name} <{Address}>";
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return Equals(obj as AccountContact);
|
||||
return Equals(obj as AddressInformation);
|
||||
}
|
||||
|
||||
public bool Equals(AccountContact other)
|
||||
public bool Equals(AddressInformation other)
|
||||
{
|
||||
return !(other is null) &&
|
||||
Address == other.Address &&
|
||||
@@ -58,12 +40,12 @@ namespace Wino.Core.Domain.Entities
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
public static bool operator ==(AccountContact left, AccountContact right)
|
||||
public static bool operator ==(AddressInformation left, AddressInformation right)
|
||||
{
|
||||
return EqualityComparer<AccountContact>.Default.Equals(left, right);
|
||||
return EqualityComparer<AddressInformation>.Default.Equals(left, right);
|
||||
}
|
||||
|
||||
public static bool operator !=(AccountContact left, AccountContact right)
|
||||
public static bool operator !=(AddressInformation left, AddressInformation right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public class CustomServerInformation
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public class MailAccount
|
||||
{
|
||||
@@ -44,11 +44,6 @@ namespace Wino.Core.Domain.Entities
|
||||
/// </summary>
|
||||
public string AccountColorHex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Base64 encoded profile picture of the account.
|
||||
/// </summary>
|
||||
public string Base64ProfilePictureData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the listing order of the account in the accounts list.
|
||||
/// </summary>
|
||||
@@ -83,15 +78,5 @@ namespace Wino.Core.Domain.Entities
|
||||
/// </summary>
|
||||
[Ignore]
|
||||
public MailAccountPreferences Preferences { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the account can perform ProfileInformation sync type.
|
||||
/// </summary>
|
||||
public bool IsProfileInfoSyncSupported => ProviderType == MailProviderType.Outlook || ProviderType == MailProviderType.Office365 || ProviderType == MailProviderType.Gmail;
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the account can perform AliasInformation sync type.
|
||||
/// </summary>
|
||||
public bool IsAliasSyncSupported => ProviderType == MailProviderType.Gmail;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
{
|
||||
public class RemoteAccountAlias
|
||||
{
|
||||
/// <summary>
|
||||
/// Display address of the alias.
|
||||
/// </summary>
|
||||
public string AliasAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Address to be included in Reply-To header when alias is used for sending messages.
|
||||
/// </summary>
|
||||
public string ReplyToAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this alias is the primary alias for the account.
|
||||
/// </summary>
|
||||
public bool IsPrimary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the alias is verified by the server.
|
||||
/// Only Gmail aliases are verified for now.
|
||||
/// Non-verified alias messages might be rejected by SMTP server.
|
||||
/// </summary>
|
||||
public bool IsVerified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this alias is the root alias for the account.
|
||||
/// Root alias means the first alias that was created for the account.
|
||||
/// It can't be deleted or changed.
|
||||
/// </summary>
|
||||
public bool IsRootAlias { get; set; }
|
||||
}
|
||||
|
||||
public class MailAccountAlias : RemoteAccountAlias
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique Id for the alias.
|
||||
/// </summary>
|
||||
[PrimaryKey]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Account id that this alias is attached to.
|
||||
/// </summary>
|
||||
public Guid AccountId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Root aliases can't be deleted.
|
||||
/// </summary>
|
||||
public bool CanDelete => !IsRootAlias;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public class MailAccountPreferences
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SQLite;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary of the parsed MIME messages.
|
||||
@@ -141,16 +141,7 @@ namespace Wino.Core.Domain.Entities
|
||||
/// </summary>
|
||||
[Ignore]
|
||||
public MailAccount AssignedAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Contact information of the sender if exists.
|
||||
/// Warning: This field is not populated by queries.
|
||||
/// Services or View Models are responsible for populating this field.
|
||||
/// </summary>
|
||||
[Ignore]
|
||||
public AccountContact SenderContact { get; set; }
|
||||
|
||||
public IEnumerable<Guid> GetContainingIds() => [UniqueId];
|
||||
public IEnumerable<Guid> GetContainingIds() => new[] { UniqueId };
|
||||
public override string ToString() => $"{Subject} <-> {Id}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using SQLite;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Domain;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
[DebuggerDisplay("{FolderName} - {SpecialFolderType}")]
|
||||
public class MailItemFolder : IMailItemFolder
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public class MergedInbox
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public record SystemFolderConfiguration(MailItemFolder SentFolder,
|
||||
MailItemFolder DraftFolder,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using SQLite;
|
||||
using Wino.Core.Domain.Models.Authentication;
|
||||
using Wino.Domain.Models.Authentication;
|
||||
|
||||
namespace Wino.Core.Domain.Entities
|
||||
namespace Wino.Domain.Entities
|
||||
{
|
||||
public class TokenInformation : TokenInformationBase
|
||||
{
|
||||
@@ -11,10 +11,6 @@ namespace Wino.Core.Domain.Entities
|
||||
|
||||
public Guid AccountId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique object storage for authenticators if needed.
|
||||
/// </summary>
|
||||
public string UniqueId { get; set; }
|
||||
public string Address { get; set; }
|
||||
|
||||
public void RefreshTokens(TokenInformationBase tokenInformationBase)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum AccountAttentionReason
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum AccountCreationDialogState
|
||||
{
|
||||
@@ -9,7 +9,6 @@
|
||||
ManuelSetupWaiting,
|
||||
TestingConnection,
|
||||
AutoDiscoverySetup,
|
||||
AutoDiscoveryInProgress,
|
||||
FetchingProfileInformation
|
||||
AutoDiscoveryInProgress
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates the state of synchronizer.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum AppLanguage
|
||||
{
|
||||
@@ -15,6 +15,5 @@
|
||||
Indonesian,
|
||||
Greek,
|
||||
PortugeseBrazil,
|
||||
Italian
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum AppThemeType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum ApplicationElementTheme
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum BackgroundSynchronizationReason
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum ChangeRequestType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum CustomIncomingServerType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum DraftCreationReason
|
||||
{
|
||||
|
||||
11
Wino.Core.Domain/Enums/EditorToolbarSectionType.cs
Normal file
11
Wino.Core.Domain/Enums/EditorToolbarSectionType.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum EditorToolbarSectionType
|
||||
{
|
||||
None,
|
||||
Format,
|
||||
Insert,
|
||||
Draw,
|
||||
Options
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum FilterOptionType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all possible folder operations that can be done.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum ImapAuthenticationMethod
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum ImapConnectionSecurity
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum InfoBarAnimationType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum InfoBarMessageType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum MailAttachmentType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum MailImportance
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum MailListDisplayMode
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum MailMarkAsOption
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
// Synchronizer requests.
|
||||
public enum MailSynchronizerOperation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum MailProviderType
|
||||
{
|
||||
|
||||
8
Wino.Core.Domain/Enums/MenuPaneMode.cs
Normal file
8
Wino.Core.Domain/Enums/MenuPaneMode.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum MenuPaneMode
|
||||
{
|
||||
Visible,
|
||||
Hidden
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum NavigationReferenceFrame
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the potential reasons for picking folder in the folder picking dialog.
|
||||
|
||||
15
Wino.Core.Domain/Enums/ReaderFont.cs
Normal file
15
Wino.Core.Domain/Enums/ReaderFont.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum ReaderFont
|
||||
{
|
||||
Arial,
|
||||
TimesNewRoman,
|
||||
Verdana,
|
||||
Tahoma,
|
||||
CourierNew,
|
||||
Georgia,
|
||||
TrebuchetMS,
|
||||
Calibri,
|
||||
Helvetica
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// What should happen to server app when the client is terminated.
|
||||
/// </summary>
|
||||
public enum ServerBackgroundMode
|
||||
{
|
||||
MinimizedTray, // Still runs, tray icon is visible.
|
||||
Invisible, // Still runs, tray icon is invisible.
|
||||
Terminate // Server is terminated as Wino terminates.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum SortingOptionType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum SpecialFolderType
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
{
|
||||
public enum StartupBehaviorResult
|
||||
{
|
||||
Enabled,
|
||||
Disabled,
|
||||
DisabledByUser,
|
||||
DisabledByPolicy,
|
||||
Fatal
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
// From the SDK.
|
||||
public enum StorePurchaseResult
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum SynchronizationCompletedState
|
||||
{
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration for the source of synchronization.
|
||||
/// Right now it can either be from the client or the server.
|
||||
/// </summary>
|
||||
public enum SynchronizationSource
|
||||
{
|
||||
Client,
|
||||
Server
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum SynchronizationType
|
||||
{
|
||||
FoldersOnly, // Only synchronize folder metadata.
|
||||
ExecuteRequests, // Run the queued requests, and then synchronize if needed.
|
||||
Inbox, // Only Inbox, Sent and Draft folders.
|
||||
Inbox, // Only Inbox
|
||||
Custom, // Only sync folders that are specified in the options.
|
||||
Full, // Synchronize all folders. This won't update profile or alias information.
|
||||
UpdateProfile, // Only update profile information
|
||||
Alias, // Only update alias information
|
||||
Full, // Synchronize everything
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
{
|
||||
public enum WinoCustomMessageDialogIcon
|
||||
{
|
||||
Information,
|
||||
Warning,
|
||||
Error,
|
||||
Question
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// All registered views.
|
||||
@@ -19,10 +19,8 @@
|
||||
PersonalizationPage,
|
||||
MessageListPage,
|
||||
MailListPage,
|
||||
ReadComposePanePage,
|
||||
ReadingPanePage,
|
||||
LanguageTimePage,
|
||||
AppPreferencesPage,
|
||||
SettingOptionsPage,
|
||||
AliasManagementPage
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
namespace Wino.Domain.Enums
|
||||
{
|
||||
public enum WinoServerConnectionStatus
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class AccountSetupCanceledException : System.Exception
|
||||
public class AccountSetupCanceledException : Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// All exceptions related to authentication.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// An exception thrown when the background task execution policies are denied for some reason.
|
||||
/// </summary>
|
||||
public class BackgroundTaskExecutionRequestDeniedException : Exception { }
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// An exception thrown when the background task registration is failed.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Thrown when composer cant find the mime to load.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class CustomThemeCreationFailedException : Exception
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class GoogleAuthenticationException : System.Exception
|
||||
public class GoogleAuthenticationException : Exception
|
||||
{
|
||||
public GoogleAuthenticationException(string message) : base(message) { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class ImapClientPoolException : Exception
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Domain.Models.AutoDiscovery;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class ImapConnectionFailedPackage
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class InvalidMoveTargetException : Exception { }
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class MissingAliasException : System.Exception
|
||||
{
|
||||
public MissingAliasException() : base(Translator.Exception_MissingAlias) { }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class SynchronizerEntityNotFoundException : Exception
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
public class SynchronizerException : Exception
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// When IMAP account's system folder configuration setup is not done yet.
|
||||
/// </summary>
|
||||
public class SystemFolderConfigurationMissingException : System.Exception { }
|
||||
public class SystemFolderConfigurationMissingException : Exception { }
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Emitted when special folder is needed for an operation but it couldn't be found.
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// All server crash types. Wino Server ideally should not throw anything else than this Exception type.
|
||||
/// </summary>
|
||||
public class WinoServerException : Exception
|
||||
{
|
||||
public WinoServerException(string message) : base(message) { }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Wino.Core.Extensions
|
||||
namespace Wino.Domain.Extensions
|
||||
{
|
||||
public static class LongExtensions
|
||||
{
|
||||
@@ -11,34 +7,34 @@ namespace Wino.Core.Extensions
|
||||
public static string GetBytesReadable(this long i)
|
||||
{
|
||||
// Get absolute value
|
||||
long absolute_i = (i < 0 ? -i : i);
|
||||
long absolute_i = i < 0 ? -i : i;
|
||||
// Determine the suffix and readable value
|
||||
string suffix;
|
||||
double readable;
|
||||
if (absolute_i >= 0x1000000000000000) // Exabyte
|
||||
{
|
||||
suffix = "EB";
|
||||
readable = (i >> 50);
|
||||
readable = i >> 50;
|
||||
}
|
||||
else if (absolute_i >= 0x4000000000000) // Petabyte
|
||||
{
|
||||
suffix = "PB";
|
||||
readable = (i >> 40);
|
||||
readable = i >> 40;
|
||||
}
|
||||
else if (absolute_i >= 0x10000000000) // Terabyte
|
||||
{
|
||||
suffix = "TB";
|
||||
readable = (i >> 30);
|
||||
readable = i >> 30;
|
||||
}
|
||||
else if (absolute_i >= 0x40000000) // Gigabyte
|
||||
{
|
||||
suffix = "GB";
|
||||
readable = (i >> 20);
|
||||
readable = i >> 20;
|
||||
}
|
||||
else if (absolute_i >= 0x100000) // Megabyte
|
||||
{
|
||||
suffix = "MB";
|
||||
readable = (i >> 10);
|
||||
readable = i >> 10;
|
||||
}
|
||||
else if (absolute_i >= 0x400) // Kilobyte
|
||||
{
|
||||
@@ -50,7 +46,7 @@ namespace Wino.Core.Extensions
|
||||
return i.ToString("0 B"); // Byte
|
||||
}
|
||||
// Divide by 1024 to get fractional value
|
||||
readable = (readable / 1024);
|
||||
readable = readable / 1024;
|
||||
// Return formatted number with suffix
|
||||
return readable.ToString("0.# ") + suffix;
|
||||
}
|
||||
14
Wino.Core.Domain/Extensions/MailkitClientExtensions.cs
Normal file
14
Wino.Core.Domain/Extensions/MailkitClientExtensions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,22 @@
|
||||
using System;
|
||||
using MimeKit;
|
||||
using Wino.Domain;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Extensions
|
||||
namespace Wino.Domain.Extensions
|
||||
{
|
||||
public static class MimeExtensions
|
||||
{
|
||||
public static string GetBase64MimeMessage(this MimeKit.MimeMessage message)
|
||||
|
||||
|
||||
public static AddressInformation ToAddressInformation(this MailboxAddress address)
|
||||
{
|
||||
using System.IO.MemoryStream memoryStream = new();
|
||||
message.WriteTo(MimeKit.FormatOptions.Default, memoryStream);
|
||||
byte[] buffer = memoryStream.GetBuffer();
|
||||
int count = (int)memoryStream.Length;
|
||||
if (address == null)
|
||||
return new AddressInformation() { Name = Translator.UnknownSender, Address = Translator.UnknownAddress };
|
||||
|
||||
return Convert.ToBase64String(buffer);
|
||||
if (string.IsNullOrEmpty(address.Name))
|
||||
address.Name = address.Address;
|
||||
|
||||
return new AddressInformation() { Name = address.Name, Address = address.Address };
|
||||
}
|
||||
|
||||
public static MimeKit.MimeMessage GetMimeMessageFromBase64(this string base64)
|
||||
=> MimeKit.MimeMessage.Load(new System.IO.MemoryStream(Convert.FromBase64String(base64)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface that should force synchronizer to do synchronization for only given folder ids
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountCreationDialog
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountMenuItem : IMenuItem
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountPickerDialog
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountProviderDetailViewModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountProviderDetails
|
||||
{
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountService
|
||||
{
|
||||
@@ -101,59 +100,5 @@ namespace Wino.Core.Domain.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="accountIdOrderPair">AccountId-OrderNumber pair for all accounts.</param>
|
||||
Task UpdateAccountOrdersAsync(Dictionary<Guid, int> accountIdOrderPair);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the account aliases.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id.</param>
|
||||
/// <returns>A list of MailAccountAlias that has e-mail aliases.</returns>
|
||||
Task<List<MailAccountAlias>> GetAccountAliasesAsync(Guid accountId);
|
||||
|
||||
/// <summary>
|
||||
/// Updated account's aliases.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id to update aliases for.</param>
|
||||
/// <param name="aliases">Full list of updated aliases.</param>
|
||||
/// <returns></returns>
|
||||
Task UpdateAccountAliasesAsync(Guid accountId, List<MailAccountAlias> aliases);
|
||||
|
||||
/// <summary>
|
||||
/// Delete account alias.
|
||||
/// </summary>
|
||||
/// <param name="aliasId">Alias to remove.</param>
|
||||
Task DeleteAccountAliasAsync(Guid aliasId);
|
||||
|
||||
/// <summary>
|
||||
/// Updated profile information of the account.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id to update info for.</param>
|
||||
/// <param name="profileInformation">Info data.</param>
|
||||
/// <returns></returns>
|
||||
Task UpdateProfileInformationAsync(Guid accountId, ProfileInformation profileInformation);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a root + primary alias for the account.
|
||||
/// This is only called when the account is created.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id.</param>
|
||||
/// <param name="address">Address to create root primary alias from.</param>
|
||||
Task CreateRootAliasAsync(Guid accountId, string address);
|
||||
|
||||
/// <summary>
|
||||
/// Will compare local-remote aliases and update the local ones or add/delete new ones.
|
||||
/// </summary>
|
||||
/// <param name="remoteAccountAliases">Remotely fetched basic alias info from synchronizer.</param>
|
||||
/// <param name="account">Account to update remote aliases for..</param>
|
||||
Task UpdateRemoteAliasInformationAsync(MailAccount account, List<RemoteAccountAlias> remoteAccountAliases);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the primary account alias for the given account id.
|
||||
/// Used when creating draft messages.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id.</param>
|
||||
/// <returns>Primary alias for the account.</returns>
|
||||
Task<MailAccountAlias> GetPrimaryAccountAliasAsync(Guid accountId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Singleton object that holds the application data folder path and the publisher shared folder path.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IApplicationResourceManager<T>
|
||||
{
|
||||
@@ -7,5 +7,6 @@
|
||||
bool ContainsResourceKey(string resourceKey);
|
||||
void ReplaceResource(string resourceKey, object resource);
|
||||
T GetLastResource();
|
||||
TReturn GetResource<TReturn>(string resourceKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAuthenticationProvider
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user