@@ -1,5 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public record AccountCreationDialogResult(MailProviderType ProviderType, string AccountName, SpecialImapProviderDetails SpecialImapProviderDetails);
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
public record AccountCreationDialogResult(MailProviderType ProviderType, string AccountName, SpecialImapProviderDetails SpecialImapProviderDetails);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public class ImapAuthenticationMethodModel(ImapAuthenticationMethod imapAuthenticationMethod, string displayName)
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
public ImapAuthenticationMethod ImapAuthenticationMethod { get; } = imapAuthenticationMethod;
|
||||
public string DisplayName { get; } = displayName;
|
||||
public class ImapAuthenticationMethodModel(ImapAuthenticationMethod imapAuthenticationMethod, string displayName)
|
||||
{
|
||||
public ImapAuthenticationMethod ImapAuthenticationMethod { get; } = imapAuthenticationMethod;
|
||||
public string DisplayName { get; } = displayName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public class ImapConnectionSecurityModel(ImapConnectionSecurity imapConnectionSecurity, string displayName)
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
public ImapConnectionSecurity ImapConnectionSecurity { get; } = imapConnectionSecurity;
|
||||
public string DisplayName { get; } = displayName;
|
||||
public class ImapConnectionSecurityModel(ImapConnectionSecurity imapConnectionSecurity, string displayName)
|
||||
{
|
||||
public ImapConnectionSecurity ImapConnectionSecurity { get; } = imapConnectionSecurity;
|
||||
public string DisplayName { get; } = displayName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
/// <summary>
|
||||
/// Encapsulates the profile information of an account.
|
||||
/// </summary>
|
||||
/// <param name="SenderName">Display sender name for the account.</param>
|
||||
/// <param name="Base64ProfilePictureData">Base 64 encoded profile picture data of the account. Thumbnail size.</param>
|
||||
/// <param name="AccountAddress">Address of the profile.</param>
|
||||
public record ProfileInformation(string SenderName, string Base64ProfilePictureData, string AccountAddress);
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// Encapsulates the profile information of an account.
|
||||
/// </summary>
|
||||
/// <param name="SenderName">Display sender name for the account.</param>
|
||||
/// <param name="Base64ProfilePictureData">Base 64 encoded profile picture data of the account. Thumbnail size.</param>
|
||||
/// <param name="AccountAddress">Address of the profile.</param>
|
||||
public record ProfileInformation(string SenderName, string Base64ProfilePictureData, string AccountAddress);
|
||||
}
|
||||
|
||||
@@ -1,68 +1,69 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public class ProviderDetail : IProviderDetail
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
public MailProviderType Type { get; }
|
||||
public SpecialImapProvider SpecialImapProvider { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public string Description { get; }
|
||||
|
||||
public string ProviderImage
|
||||
public class ProviderDetail : IProviderDetail
|
||||
{
|
||||
get
|
||||
public MailProviderType Type { get; }
|
||||
public SpecialImapProvider SpecialImapProvider { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public string Description { get; }
|
||||
|
||||
public string ProviderImage
|
||||
{
|
||||
if (SpecialImapProvider == SpecialImapProvider.None)
|
||||
get
|
||||
{
|
||||
return $"/Wino.Core.UWP/Assets/Providers/{Type}.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"/Wino.Core.UWP/Assets/Providers/{SpecialImapProvider}.png";
|
||||
if (SpecialImapProvider == SpecialImapProvider.None)
|
||||
{
|
||||
return $"/Wino.Core.UWP/Assets/Providers/{Type}.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"/Wino.Core.UWP/Assets/Providers/{SpecialImapProvider}.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSupported => Type == MailProviderType.Outlook || Type == MailProviderType.Gmail || Type == MailProviderType.IMAP4;
|
||||
public bool IsSupported => Type == MailProviderType.Outlook || Type == MailProviderType.Gmail || Type == MailProviderType.IMAP4;
|
||||
|
||||
public ProviderDetail(MailProviderType type, SpecialImapProvider specialImapProvider)
|
||||
{
|
||||
Type = type;
|
||||
SpecialImapProvider = specialImapProvider;
|
||||
|
||||
switch (Type)
|
||||
public ProviderDetail(MailProviderType type, SpecialImapProvider specialImapProvider)
|
||||
{
|
||||
case MailProviderType.Outlook:
|
||||
Name = "Outlook";
|
||||
Description = "Outlook.com, Live.com, Hotmail, MSN";
|
||||
break;
|
||||
case MailProviderType.Gmail:
|
||||
Name = "Gmail";
|
||||
Description = Translator.ProviderDetail_Gmail_Description;
|
||||
break;
|
||||
case MailProviderType.IMAP4:
|
||||
switch (specialImapProvider)
|
||||
{
|
||||
case SpecialImapProvider.None:
|
||||
Name = Translator.ProviderDetail_IMAP_Title;
|
||||
Description = Translator.ProviderDetail_IMAP_Description;
|
||||
break;
|
||||
case SpecialImapProvider.iCloud:
|
||||
Name = Translator.ProviderDetail_iCloud_Title;
|
||||
Description = Translator.ProviderDetail_iCloud_Description;
|
||||
break;
|
||||
case SpecialImapProvider.Yahoo:
|
||||
Name = Translator.ProviderDetail_Yahoo_Title;
|
||||
Description = Translator.ProviderDetail_Yahoo_Description;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Type = type;
|
||||
SpecialImapProvider = specialImapProvider;
|
||||
|
||||
break;
|
||||
switch (Type)
|
||||
{
|
||||
case MailProviderType.Outlook:
|
||||
Name = "Outlook";
|
||||
Description = "Outlook.com, Live.com, Hotmail, MSN";
|
||||
break;
|
||||
case MailProviderType.Gmail:
|
||||
Name = "Gmail";
|
||||
Description = Translator.ProviderDetail_Gmail_Description;
|
||||
break;
|
||||
case MailProviderType.IMAP4:
|
||||
switch (specialImapProvider)
|
||||
{
|
||||
case SpecialImapProvider.None:
|
||||
Name = Translator.ProviderDetail_IMAP_Title;
|
||||
Description = Translator.ProviderDetail_IMAP_Description;
|
||||
break;
|
||||
case SpecialImapProvider.iCloud:
|
||||
Name = Translator.ProviderDetail_iCloud_Title;
|
||||
Description = Translator.ProviderDetail_iCloud_Description;
|
||||
break;
|
||||
case SpecialImapProvider.Yahoo:
|
||||
Name = Translator.ProviderDetail_Yahoo_Title;
|
||||
Description = Translator.ProviderDetail_Yahoo_Description;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public record SpecialImapProviderDetails(string Address, string Password, string SenderName, SpecialImapProvider SpecialImapProvider);
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
public record SpecialImapProviderDetails(string Address, string Password, string SenderName, SpecialImapProvider SpecialImapProvider);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public class UnreadItemCountResult
|
||||
namespace Wino.Core.Domain.Models.Accounts
|
||||
{
|
||||
public Guid FolderId { get; set; }
|
||||
public Guid AccountId { get; set; }
|
||||
public SpecialFolderType SpecialFolderType { get; set; }
|
||||
public int UnreadItemCount { get; set; }
|
||||
public class UnreadItemCountResult
|
||||
{
|
||||
public Guid FolderId { get; set; }
|
||||
public Guid AccountId { get; set; }
|
||||
public SpecialFolderType SpecialFolderType { get; set; }
|
||||
public int UnreadItemCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user