/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Content != null) { hashCode = hashCode * 59 + Content.GetHashCode(); } if (FileName != null) { hashCode = hashCode * 59 + FileName.GetHashCode(); } if (Password != null) { hashCode = hashCode * 59 + Password.GetHashCode(); } hashCode = hashCode * 59 + Conformance.GetHashCode(); hashCode = hashCode * 59 + ContentEncoding.GetHashCode(); hashCode = hashCode * 59 + EnableColorDetection.GetHashCode(); hashCode = hashCode * 59 + GetPreview.GetHashCode(); hashCode = hashCode * 59 + ThumbnailWidth.GetHashCode(); hashCode = hashCode * 59 + ThumbnailHeight.GetHashCode(); if (ThumbnailBackgroundColor != null) { hashCode = hashCode * 59 + ThumbnailBackgroundColor.GetHashCode(); } hashCode = hashCode * 59 + ThumbnailFitToPageSize.GetHashCode(); hashCode = hashCode * 59 + TxtPageWidth.GetHashCode(); hashCode = hashCode * 59 + TxtPageHeight.GetHashCode(); hashCode = hashCode * 59 + TxtPageMarginLeft.GetHashCode(); hashCode = hashCode * 59 + TxtPageMarginTop.GetHashCode(); hashCode = hashCode * 59 + TxtPageMarginRight.GetHashCode(); hashCode = hashCode * 59 + TxtPageMarginBottom.GetHashCode(); hashCode = hashCode * 59 + TxtHorizontalTextAlignment.GetHashCode(); hashCode = hashCode * 59 + TxtFontSize.GetHashCode(); if (TxtFontFamily != null) { hashCode = hashCode * 59 + TxtFontFamily.GetHashCode(); } hashCode = hashCode * 59 + TxtFontBold.GetHashCode(); hashCode = hashCode * 59 + TxtFontItalic.GetHashCode(); return(hashCode); } }
private void BtnOK_Click(object sender, RoutedEventArgs e) { TxtFontSize.GetBindingExpression(TextBox.TextProperty).UpdateSource(); Close(); }
private void Button_Click(object sender, RoutedEventArgs e) { BindingExpression binding = TxtFontSize.GetBindingExpression(TextBox.TextProperty); binding.UpdateSource(); }
/// <summary> /// Returns true if PdfLoadDocumentParameters instances are equal /// </summary> /// <param name="input">Instance of PdfLoadDocumentParameters to be compared</param> /// <returns>Boolean</returns> public bool Equals(PdfLoadDocumentParameters input) { if (input == null) { return(false); } return (( FileName == input.FileName || (FileName != null && FileName.Equals(input.FileName)) ) && ( Password == input.Password || (Password != null && Password.Equals(input.Password)) ) && ( Conformance == input.Conformance || Conformance.Equals(input.Conformance) ) && ( ContentEncoding == input.ContentEncoding || ContentEncoding.Equals(input.ContentEncoding) ) && ( EnableColorDetection == input.EnableColorDetection || EnableColorDetection.Equals(input.EnableColorDetection) ) && ( GetPreview == input.GetPreview || GetPreview.Equals(input.GetPreview) ) && ( ThumbnailWidth == input.ThumbnailWidth || ThumbnailWidth.Equals(input.ThumbnailWidth) ) && ( ThumbnailHeight == input.ThumbnailHeight || ThumbnailHeight.Equals(input.ThumbnailHeight) ) && ( ThumbnailBackgroundColor == input.ThumbnailBackgroundColor || (ThumbnailBackgroundColor != null && ThumbnailBackgroundColor.Equals(input.ThumbnailBackgroundColor)) ) && ( ThumbnailFitToPageSize == input.ThumbnailFitToPageSize || ThumbnailFitToPageSize.Equals(input.ThumbnailFitToPageSize) ) && ( TxtPageWidth == input.TxtPageWidth || TxtPageWidth.Equals(input.TxtPageWidth) ) && ( TxtPageHeight == input.TxtPageHeight || TxtPageHeight.Equals(input.TxtPageHeight) ) && ( TxtPageMarginLeft == input.TxtPageMarginLeft || TxtPageMarginLeft.Equals(input.TxtPageMarginLeft) ) && ( TxtPageMarginTop == input.TxtPageMarginTop || TxtPageMarginTop.Equals(input.TxtPageMarginTop) ) && ( TxtPageMarginRight == input.TxtPageMarginRight || TxtPageMarginRight.Equals(input.TxtPageMarginRight) ) && ( TxtPageMarginBottom == input.TxtPageMarginBottom || TxtPageMarginBottom.Equals(input.TxtPageMarginBottom) ) && ( TxtHorizontalTextAlignment == input.TxtHorizontalTextAlignment || TxtHorizontalTextAlignment.Equals(input.TxtHorizontalTextAlignment) ) && ( TxtFontSize == input.TxtFontSize || TxtFontSize.Equals(input.TxtFontSize) ) && ( TxtFontFamily == input.TxtFontFamily || (TxtFontFamily != null && TxtFontFamily.Equals(input.TxtFontFamily)) ) && ( TxtFontBold == input.TxtFontBold || TxtFontBold.Equals(input.TxtFontBold) ) && ( TxtFontItalic == input.TxtFontItalic || TxtFontItalic.Equals(input.TxtFontItalic) )); }