Example #1
0
        static int ViewPointCompare(AVViewPoint A, AVViewPoint B)
        {
            // these next two lines provide a value for
            // views which provide no index.
            int a = A.InsertionIndex.HasValue ? A.InsertionIndex.Value: 0;
            int b = B.InsertionIndex.HasValue ? B.InsertionIndex.Value: 0;

            // Use string comparison for values with equal indexes.
            if (a == b)
            {
                return(A.Title.CompareTo(B.Title));
            }

            // Standard comparison.
            return(a - b);
        }
Example #2
0
 static int ViewPointCompare_Reverse(AVViewPoint A, AVViewPoint B)
 {
     return(ViewPointCompare(A, B) * -1);
 }