Initial commit: FluidExplorer:从零实现的 WinUI 3 文件资源管理器替代品(Mica、命令栏、面包屑)
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
namespace FluidExplorer.Models;
|
||||
|
||||
public enum SortColumn
|
||||
{
|
||||
Name,
|
||||
DateModified,
|
||||
DateCreated,
|
||||
Type,
|
||||
Size,
|
||||
Path,
|
||||
Extension,
|
||||
Attributes
|
||||
}
|
||||
|
||||
public enum SortDirection
|
||||
{
|
||||
Ascending,
|
||||
Descending
|
||||
}
|
||||
|
||||
public sealed record SortSpec(SortColumn Column, SortDirection Direction)
|
||||
{
|
||||
public static SortSpec Default { get; } = new(SortColumn.Name, SortDirection.Ascending);
|
||||
public SortSpec Toggle(SortColumn column)
|
||||
=> Column == column
|
||||
? this with { Direction = Direction == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending }
|
||||
: new SortSpec(column, SortDirection.Ascending);
|
||||
}
|
||||
|
||||
/// <summary>视图模式:对齐资源管理器(详情/列表/网格三档/内容)。</summary>
|
||||
public enum ViewMode
|
||||
{
|
||||
ExtraLargeIcons,
|
||||
LargeIcons,
|
||||
MediumIcons,
|
||||
SmallIcons,
|
||||
List,
|
||||
Details,
|
||||
Tiles,
|
||||
Content
|
||||
}
|
||||
|
||||
public enum GroupBy
|
||||
{
|
||||
None,
|
||||
Name,
|
||||
DateModified,
|
||||
Type,
|
||||
Size
|
||||
}
|
||||
Reference in New Issue
Block a user