예제 #1
0
            public int Compare(ButtonGridItem x, ButtonGridItem y)
            {
                Task xItem = (Task)x.UserObject;
                Task yItem = (Task)y.UserObject;

                return(NaturalSortAlgorithm.CompareFunc(xItem.Name, yItem.Name));
            }
예제 #2
0
 public static int Compare(TreeNode x, TreeNode y)
 {
     if (x is DirectoryNode)
     {
         if (y is DirectoryNode)
         {
             return(NaturalSortAlgorithm.CompareFunc(x.Text, y.Text));
         }
         else
         {
             return(-1);
         }
     }
     else
     {
         if (y is DirectoryNode)
         {
             return(1);
         }
         else
         {
             return(NaturalSortAlgorithm.CompareFunc(x.Text, y.Text));
         }
     }
 }
 public int Compare(ButtonGridItem x, ButtonGridItem y)
 {
     return(NaturalSortAlgorithm.CompareFunc(x.Caption, y.Caption));
 }