ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/xmltv_parser/trunk/xmltv_parser/ListViewSorter.cs
(Generate patch)

Comparing trunk/xmltv_parser/ListViewSorter.cs (file contents):
Revision 61 by william, Fri Mar 8 14:13:19 2013 UTC vs.
Revision 62 by william, Fri Mar 8 14:24:17 2013 UTC

--- 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 @@ namespace xmltv_parser
 {
     public class ListViewSorter : System.Collections.IComparer
     {
+        public ListViewSorter() { }
         public int Compare(object o1, object o2)
         {
             if (!(o1 is ListViewItem))
@@ -16,9 +17,9 @@ namespace xmltv_parser
                 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 @@ namespace xmltv_parser
             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;
+        
     } 
 }