Exemple #1
0
 ///<summary>
 /// Serves as a hash of this type.
 ///</summary>
 public override int GetHashCode()
 {
     return
         (ColorSpace.GetHashCode() ^
          CompressionMethod.GetHashCode() ^
          Format.GetHashCode() ^
          Height.GetHashCode() ^
          Interlace.GetHashCode() ^
          ResolutionUnits.GetHashCode() ^
          ResolutionX.GetHashCode() ^
          ResolutionY.GetHashCode() ^
          Width.GetHashCode());
 }
 public void FillCurrentPage()
 {
     labelColorType.Text  += ColorType;
     labelResolution.Text += (imageType.ToUpper() == "TIF" ? ResolutionY.ToString() + "x" + ResolutionX.ToString() : Environment.StringResources.GetString("PrinterOp_Status2"));
     labelSize.Text       += ((PixelHeight * 2.54) / ResolutionY).ToString("N2") + "cm x " + ((PixelWigth * 2.54) / ResolutionX).ToString("N2") + "cm";
     if (PixelHeight > 2950 * ResolutionY / 254 && PixelHeight < 2990 * ResolutionY / 254 && PixelWigth > 2080 * ResolutionY / 254 && PixelWigth < 2120 * ResolutionY / 254)
     {
         labelSize.Text += " (A4)";
     }
     if (PixelWigth > 2950 * ResolutionY / 254 && PixelWigth < 2990 * ResolutionY / 254 && PixelHeight > 2080 * ResolutionY / 254 && PixelHeight < 2120 * ResolutionY / 254)
     {
         labelSize.Text += " (A4 landscape)";
     }
 }
 /// <summary>
 /// Converts the page resolution setting to human-readable string.
 /// </summary>
 /// <returns>A string that represents this page resolution setting.</returns>
 public override string ToString()
 {
     return(ResolutionX.ToString(CultureInfo.CurrentCulture) + "x" +
            ResolutionY.ToString(CultureInfo.CurrentCulture) +
            "(qualitative: " + QualitativeResolution.ToString() + ")");
 }