2020-07-07 07:15:45 +12:00
|
|
|
|
// <copyright file="WindowsExplorerSort.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
2020-03-28 08:43:16 +13:00
|
|
|
|
|
2023-04-17 00:17:33 +12:00
|
|
|
|
namespace SystemTrayMenu.Helpers
|
2020-03-28 08:43:16 +13:00
|
|
|
|
{
|
2022-12-04 09:23:19 +13:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using SystemTrayMenu.DllImports;
|
|
|
|
|
|
2022-12-06 09:46:53 +13:00
|
|
|
|
internal class WindowsExplorerSort : IComparer<string?>
|
2020-03-28 08:43:16 +13:00
|
|
|
|
{
|
2022-12-04 09:23:19 +13:00
|
|
|
|
public int Compare(string? x, string? y)
|
|
|
|
|
{
|
|
|
|
|
if (x != null && y != null)
|
|
|
|
|
{
|
|
|
|
|
return NativeMethods.ShlwapiStrCmpLogicalW(x, y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
2020-03-28 08:43:16 +13:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|