Inheritance: IComparable
Exemplo n.º 1
0
        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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 4
0
        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);
        }