/// <summary> /// Compare two TextBox segments. /// </summary> /// <param name="Font">Segment font.</param> /// <param name="FontSize">Segment font size.</param> /// <param name="DrawStyle">Segment drawing style.</param> /// <param name="FontColor">Segment color.</param> /// <param name="AnnotAction">Segment annotation action.</param> /// <returns>Result</returns> internal Boolean IsEqual ( PdfFont Font, Double FontSize, DrawStyle DrawStyle, Color FontColor, AnnotAction AnnotAction ) { // test all but annotation action return(this.Font == Font && this.FontSize == FontSize && this.DrawStyle == DrawStyle && this.FontColor == FontColor && AnnotAction.IsEqual(this.AnnotAction, AnnotAction)); }
internal static bool IsEqual ( AnnotAction One, AnnotAction Two ) { if (One == null && Two == null) { return(true); } if (One == null && Two != null || One != null && Two == null || One.GetType() != Two.GetType()) { return(false); } return(One.IsEqual(Two)); }
/// <summary> /// Compare two annotation objects /// </summary> /// <param name="One">First object</param> /// <param name="Two">Second object</param> /// <returns>Result</returns> public static bool IsEqual ( AnnotAction One, AnnotAction Two ) { if (One == null) { return(Two == null); } else { if (Two == null || One.GetType() != Two.GetType()) { return(false); } // the two annotations are the same type return(One.IsEqual(Two)); } }