OSDN Git Service

Remove cruft.
authorLatif Khalifa <latifer@streamgrid.net>
Wed, 26 Aug 2009 22:21:42 +0000 (22:21 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Wed, 26 Aug 2009 22:21:42 +0000 (22:21 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@163 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/Core/Types/ListViewNoFlicker.cs

index 76ee651..76e858e 100644 (file)
@@ -29,9 +29,6 @@
 // $Id$\r
 //\r
 \r
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
 using System.Windows.Forms;\r
 \r
 namespace Radegast\r
@@ -57,74 +54,5 @@ namespace Radegast
                 base.OnNotifyMessage(m);\r
             }\r
         }\r
-\r
-    }\r
-\r
-    public class ListViewItemComparer : IComparer<object>\r
-    {\r
-        // Initialize the variables to default\r
-        public int column = 0;\r
-        public bool bAscending = true;\r
-\r
-        // Using the Compare function of IComparer\r
-        public int Compare(object x, object y)\r
-        {\r
-            // Cast the objects to ListViewItems\r
-            ListViewItem lvi1 = (ListViewItem)x;\r
-            ListViewItem lvi2 = (ListViewItem)y;\r
-\r
-            // If the column is the string columns\r
-            if (column != 2)\r
-            {\r
-                string lvi1String = lvi1.SubItems[column].ToString();\r
-                string lvi2String = lvi2.SubItems[column].ToString();\r
-\r
-                // Return the normal Compare\r
-                if (bAscending)\r
-                    return String.Compare(lvi1String, lvi2String);\r
-\r
-                // Return the negated Compare\r
-                return -String.Compare(lvi1String, lvi2String);\r
-            }\r
-\r
-            // The column is the Age column\r
-            int lvi1Int = ParseListItemString(lvi1.SubItems[column].ToString());\r
-            int lvi2Int = ParseListItemString(lvi2.SubItems[column].ToString());\r
-\r
-            // Return the normal compare.. if x < y then return -1\r
-            if (bAscending)\r
-            {\r
-                if (lvi1Int < lvi2Int)\r
-                    return -1;\r
-                else if (lvi1Int == lvi2Int)\r
-                    return 0;\r
-\r
-                return 1;\r
-            }\r
-\r
-            // Return the opposites for descending\r
-            if (lvi1Int > lvi2Int)\r
-                return -1;\r
-            else if (lvi1Int == lvi2Int)\r
-                return 0;\r
-\r
-            return 1;\r
-        }\r
-\r
-        private int ParseListItemString(string x)\r
-        {\r
-            //ListViewItems are returned like this: "ListViewSubItem: {19}"\r
-            int counter = 0;\r
-            for (int i = x.Length - 1; i >= 0; i--, counter++)\r
-            {\r
-                if (x[i] == '{')\r
-                    break;\r
-            }\r
-\r
-            return Int32.Parse(x.Substring(x.Length - counter, counter - 1));\r
-        }\r
     }\r
-\r
-\r
-\r
 }\r