// Decompiled with JetBrains decompiler
// Type: ListViewSorter.ImageTextComparer
// Assembly: FileCash_v3.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 1DECC99D-34C5-4E02-A85D-DC744B5C555A
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Constructor.MSIL.ArchSMS.a-33cc8dceb24ed9df287e1f92d02773477af42b8d2b6de53a45bb9b5a3ead070b.exe

using System.Collections;
using System.Windows.Forms;

namespace ListViewSorter
{
  public class ImageTextComparer : IComparer
  {
    private NumberCaseInsensitiveComparer ObjectCompare;

    public ImageTextComparer() => this.ObjectCompare = new NumberCaseInsensitiveComparer();

    public int Compare(object x, object y)
    {
      ListViewItem listViewItem1 = (ListViewItem) x;
      int imageIndex1 = listViewItem1.ImageIndex;
      ListViewItem listViewItem2 = (ListViewItem) y;
      int imageIndex2 = listViewItem2.ImageIndex;
      if (imageIndex1 < imageIndex2)
        return -1;
      return imageIndex1 == imageIndex2 ? this.ObjectCompare.Compare((object) listViewItem1.Text, (object) listViewItem2.Text) : 1;
    }
  }
}
