Added pre-sorting
- Pre-sorting uses ascending natural sorting - Previously, the files would initially be displayed in the order the operating system returned
This commit is contained in:
parent
10153a9bd2
commit
4119cb9eac
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
|
using Avalonia.Input;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.VisualTree;
|
using Avalonia.VisualTree;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
@ -13,7 +14,7 @@ using Avalonia.LogicalTree;
|
||||||
|
|
||||||
using BFR.Helpers;
|
using BFR.Helpers;
|
||||||
using BFR.DataModels;
|
using BFR.DataModels;
|
||||||
using Avalonia.Input;
|
using BFR.Operations;
|
||||||
|
|
||||||
namespace BFR
|
namespace BFR
|
||||||
{
|
{
|
||||||
|
@ -27,6 +28,7 @@ namespace BFR
|
||||||
{
|
{
|
||||||
WorkingDirectory = directory.Replace('\\', '/');
|
WorkingDirectory = directory.Replace('\\', '/');
|
||||||
AllFiles.ReplaceAll(Directory.GetFiles(WorkingDirectory).Select(x => new FileModel(x.Replace('\\', '/'))));
|
AllFiles.ReplaceAll(Directory.GetFiles(WorkingDirectory).Select(x => new FileModel(x.Replace('\\', '/'))));
|
||||||
|
new Sort() { Mode = SortMode.Natural }.ApplyTo(AllFiles);
|
||||||
Filter();
|
Filter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user