Exemplo n.º 1
0
 /// <summary>
 /// Compares this style to another and returns true if both will have the same
 /// layout, but not necessarily the same appearance (eg: color change, underline etc...)
 /// </summary>
 /// <param name="This">The style instance</param>
 /// <param name="other">The other style instance to compare to</param>
 /// <returns>True if both styles will give the same layout</returns>
 public static bool IsSame(this IStyle This, IStyle other)
 {
     if (This == null && other == null)
     {
         return(true);
     }
     if (This == null || other == null)
     {
         return(false);
     }
     if (!This.HasSameLayout(other))
     {
         return(false);
     }
     if (This.TextColor != other.TextColor)
     {
         return(false);
     }
     if (This.Underline != other.Underline)
     {
         return(false);
     }
     if (This.StrikeThrough != other.StrikeThrough)
     {
         return(false);
     }
     return(true);
 }