Delete IListView.cs

This commit is contained in:
Belim 2020-09-20 19:18:05 +02:00 committed by GitHub
parent 42a81a65b3
commit 3ff324541f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,40 +0,0 @@
using System;
using System.Collections;
using System.Windows.Forms;
namespace Privatezilla
{
/* Modified ListView sort example from https://support.microsoft.com/en-us/kb/319401
which will not only sort ascending but both ways */
public class ListViewItemComparer : IComparer
{
private readonly int col;
private readonly bool bAsc = false;
public ListViewItemComparer()
{
col = 0;
}
public ListViewItemComparer(int column, bool b)
{
col = column;
bAsc = b;
}
public int Compare(object x, object y)
{
if (bAsc)
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
// bAsc = false;
}
else
{
return String.Compare(((ListViewItem)y).SubItems[col].Text, ((ListViewItem)x).SubItems[col].Text);
// bAsc = true;
}
}
}
}