Inheritance: IComparable
        public int CompareTo(object o)
        {
            TypeSelection typeSelection = (TypeSelection)o;

            if (typeSelection.objects.Length != this.objects.Length)
            {
                return(typeSelection.objects.Length.CompareTo(this.objects.Length));
            }
            return(this.label.text.CompareTo(typeSelection.label.text));
        }
Example #2
0
        public int CompareTo(object o)
        {
            TypeSelection selection = (TypeSelection)o;

            if (selection.objects.Length != this.objects.Length)
            {
                int length = selection.objects.Length;
                return(length.CompareTo(this.objects.Length));
            }
            return(this.label.text.CompareTo(selection.label.text));
        }
Example #3
0
        public int CompareTo(object o)
        {
            TypeSelection other = (TypeSelection)o;

            // Sort by amount of objects
            if (other.objects.Length != objects.Length)
            {
                return(other.objects.Length.CompareTo(objects.Length));
            }

            // Sort alphabetically
            return(label.text.CompareTo(other.label.text));
        }
        public int CompareTo(object o)
        {
            TypeSelection typeSelection = (TypeSelection)o;
            int           result;

            if (typeSelection.objects.Length != this.objects.Length)
            {
                result = typeSelection.objects.Length.CompareTo(this.objects.Length);
            }
            else
            {
                result = this.label.text.CompareTo(typeSelection.label.text);
            }
            return(result);
        }