public bool checkEqualParagraph(Paragraph paragraph1, Paragraph paragraph2) { ABIW_Borders borders1 = new ABIW_Borders(paragraph1.Borders); ABIW_Borders borders2 = new ABIW_Borders(paragraph2.Borders); CompareObject compareObject = new CompareObject(); if (compareObject.compareTwoObject(paragraph1.Alignment, paragraph2.Alignment) && compareObject.compareTwoObject(paragraph1.LeftIndent, paragraph2.LeftIndent) && compareObject.compareTwoObject(paragraph1.RightIndent, paragraph2.RightIndent) && compareObject.compareTwoObject(paragraph1.FirstLineIndent, paragraph2.FirstLineIndent) && compareObject.compareTwoObject(paragraph1.MirrorIndents, paragraph2.MirrorIndents) && compareObject.compareTwoObject(paragraph1.LineSpacingRule, paragraph2.LineSpacingRule) && compareObject.compareTwoObject(paragraph1.SpaceAfter, paragraph2.SpaceAfter) && compareObject.compareTwoObject(paragraph1.SpaceBefore, paragraph2.SpaceBefore) && compareObject.compareTwoObject(paragraph1.LineSpacing, paragraph2.LineSpacing) && borders1.Compare(borders2).Result == ComparisonResultIndicate.equal ) { return(true); } else { return(false); } }
public bool checkEqualPageSetup(PageSetup pageSetup1, PageSetup pageSetup2) { CompareObject compareObject = new CompareObject(); if (compareObject.compareTwoObject(pageSetup1.LeftMargin, pageSetup2.LeftMargin) && compareObject.compareTwoObject(pageSetup1.RightMargin, pageSetup2.RightMargin) && compareObject.compareTwoObject(pageSetup1.BottomMargin, pageSetup2.BottomMargin) && compareObject.compareTwoObject(pageSetup1.TopMargin, pageSetup2.TopMargin) && compareObject.compareTwoObject(pageSetup1.PageHeight, pageSetup2.PageHeight) && compareObject.compareTwoObject(pageSetup1.PageWidth, pageSetup2.PageWidth) ) { return(true); } else { return(false); } }
public bool checkEqualFont(Font font1, Font font2) { CompareObject compareObject = new CompareObject(); if (compareObject.compareTwoObject(font1.Bold, font2.Bold) && compareObject.compareTwoObject(font1.Italic, font2.Italic) && compareObject.compareTwoObject(font1.Size, font2.Size) && compareObject.compareTwoObject(font1.Name, font2.Name) && compareObject.compareTwoObject(font1.Color, font2.Color) && compareObject.compareTwoObject(font1.StrikeThrough, font2.StrikeThrough) && compareObject.compareTwoObject(font1.UnderlineColor, font2.UnderlineColor) && compareObject.compareTwoObject(font1.Underline, font2.Underline) && compareObject.compareTwoObject(font1.Parent.HighlightColorIndex, font2.Parent.HighlightColorIndex) //&& checkTextEffect(range1, range2) ) { return(true); } else { return(false); } }
public IComparisonResult Compare(object other) { if (other is ABIW_Border otherBorder) { CompareObject compareObject = new CompareObject(); if (compareObject.compareTwoObject(border.LineStyle, otherBorder.Border.LineStyle) && compareObject.compareTwoObject(border.LineWidth, otherBorder.Border.LineWidth) && compareObject.compareTwoObject(border.Color, otherBorder.Border.Color) && compareObject.compareTwoObject(border.ColorIndex, otherBorder.Border.ColorIndex) && compareObject.compareTwoObject(border.Visible, otherBorder.Border.Visible) ) { return(new ComparisonResult(ComparisonResultIndicate.equal)); } else { return(new ComparisonResult(ComparisonResultIndicate.not_equal)); } } else { return(new ComparisonResult(ComparisonResultIndicate.not_equal)); } }