Beispiel #1
0
        /// <summary>
        /// Compares this object to another <see cref="DesignLineStyle"/>.
        /// </summary>
        public int CompareTo(DayStyle other)
        {
            int delta = DayBackcolor == null ? -1 : DayBackcolor.CompareTo(other.DayBackcolor);

            if (delta == 0)
            {
                delta = BorderStyle.CompareTo(other.BorderStyle);
            }
            if (delta == 0)
            {
                delta = FontStyle.CompareTo(other.FontStyle);
            }
            if (delta == 0)
            {
                delta = DayTextAlign == null ? -1 : DayTextAlign.CompareTo(other.DayTextAlign);
            }
            if (delta == 0)
            {
                delta = DayVerticalAlign == null ? -1 : DayVerticalAlign.CompareTo(other.DayVerticalAlign);
            }
            return(delta);
        }