Initial commit.

This commit is contained in:
Burak Kaan Köse
2024-04-18 01:44:37 +02:00
parent 524ea4c0e1
commit 12d3814626
671 changed files with 77295 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System.Collections.Generic;
using Wino.Core.Domain.Entities;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Models.Folders
{
/// <summary>
/// Grouped folder information for the menu for given account.
/// </summary>
public class AccountFolderTree
{
public MailAccount Account { get; }
public List<IMailItemFolder> Folders { get; set; } = new List<IMailItemFolder>();
public AccountFolderTree(MailAccount account)
{
Account = account;
}
public bool HasSpecialTypeFolder(SpecialFolderType type)
{
foreach (var folderStructure in Folders)
{
bool hasSpecialFolder = folderStructure.ContainsSpecialFolderType(type);
if (hasSpecialFolder)
return true;
}
return false;
}
}
}

View File

@@ -0,0 +1,14 @@
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Menus;
namespace Wino.Core.Domain.Models.Folders
{
public class FolderOperationMenuItem : MenuOperationItemBase<FolderOperation>, IMenuOperation
{
protected FolderOperationMenuItem(FolderOperation operation, bool isEnabled) : base(operation, isEnabled) { }
public static FolderOperationMenuItem Create(FolderOperation operation, bool isEnabled = true)
=> new FolderOperationMenuItem(operation, isEnabled);
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Models.Folders
{
public interface IMailItemFolder
{
string BackgroundColorHex { get; set; }
string DeltaToken { get; set; }
string FolderName { get; set; }
long HighestModeSeq { get; set; }
Guid Id { get; set; }
bool IsHidden { get; set; }
bool IsSticky { get; set; }
bool IsSynchronizationEnabled { get; set; }
bool IsSystemFolder { get; set; }
DateTime? LastSynchronizedDate { get; set; }
Guid MailAccountId { get; set; }
string ParentRemoteFolderId { get; set; }
string RemoteFolderId { get; set; }
SpecialFolderType SpecialFolderType { get; set; }
string TextColorHex { get; set; }
uint UidValidity { get; set; }
List<IMailItemFolder> ChildFolders { get; set; }
bool IsMoveTarget { get; }
bool ShowUnreadCount { get; set; }
bool ContainsSpecialFolderType(SpecialFolderType type);
}
}