Exemplo n.º 1
0
        public int CompareTo(ConsolePlusTheme other)
        {
            int foreCompare = BackgroundColor.CompareTo(other.BackgroundColor);

            if (foreCompare != 0)
            {
                return(foreCompare);
            }

            return(ForegroundColor.CompareTo(other.ForegroundColor));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compare to
        /// </summary>
        /// <param name="other">Other</param>
        /// <returns>Comparison result</returns>
        public int CompareTo(BufferCell other)
        {
            int ret = Character.CompareTo(other.Character);

            if (ret == 0)
            {
                ret = ForegroundColor.CompareTo(other.ForegroundColor);
                if (ret == 0)
                {
                    ret = BackgroundColor.CompareTo(other.BackgroundColor);
                }
            }
            return(ret);
        }