/[xmltv_parser]/trunk/xmltv_parser/ListViewSorter.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/ListViewSorter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/xmltv_parser/ListViewSorter.cs	2013/03/08 14:13:19	61
+++ trunk/xmltv_parser/ListViewSorter.cs	2013/03/08 14:24:17	62
@@ -8,6 +8,7 @@
 {
     public class ListViewSorter : System.Collections.IComparer
     {
+        public ListViewSorter() { }
         public int Compare(object o1, object o2)
         {
             if (!(o1 is ListViewItem))
@@ -16,9 +17,9 @@
                 return (0);
 
             ListViewItem lvi1 = (ListViewItem)o2;
-            string str1 = lvi1.SubItems[ByColumn].Text;
+            string str1 = lvi1.SubItems[CurrentColumn].Text;
             ListViewItem lvi2 = (ListViewItem)o1;
-            string str2 = lvi2.SubItems[ByColumn].Text;
+            string str2 = lvi2.SubItems[CurrentColumn].Text;
 
             int result;
             if (lvi1.ListView.Sorting == SortOrder.Ascending)
@@ -26,24 +27,24 @@
             else
                 result = String.Compare(str2, str1);
 
-            LastSort = ByColumn;
+            LastColumn = CurrentColumn;
 
             return (result);
         }
 
-
-        public int ByColumn
+        int _LastColumn;
+        public int LastColumn
         {
-            get { return Column; }
-            set { Column = value; }
-        }
-        int Column = 0;
+            get { return _LastColumn; }
+            set { _LastColumn = value; }
+        }        
 
-        public int LastSort
+        int _CurrentColumn = 0;
+        public int CurrentColumn
         {
-            get { return LastColumn; }
-            set { LastColumn = value; }
+            get { return _CurrentColumn; }
+            set { _CurrentColumn = value; }
         }
-        int LastColumn = 0;
+        
     } 
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22