public override bool Equals(object o) { if (!(o is CompressColorAndGray)) { return(false); } CompressColorAndGray v = o as CompressColorAndGray; if (!Compression.Equals(v.Compression)) { return(false); } if (!Dpi.Equals(v.Dpi)) { return(false); } if (!Enabled.Equals(v.Enabled)) { return(false); } if (!JpegCompressionFactor.Equals(v.JpegCompressionFactor)) { return(false); } if (!Resampling.Equals(v.Resampling)) { return(false); } return(true); }
public void StoreValues(Data data, string path) { data.SetValue(@"" + path + @"Compression", Compression.ToString()); data.SetValue(@"" + path + @"Dpi", Dpi.ToString(CultureInfo.InvariantCulture)); data.SetValue(@"" + path + @"Enabled", Enabled.ToString()); data.SetValue(@"" + path + @"JpegCompressionFactor", JpegCompressionFactor.ToString(CultureInfo.InvariantCulture)); data.SetValue(@"" + path + @"Resampling", Resampling.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendLine("Compression=" + Compression.ToString()); sb.AppendLine("Dpi=" + Dpi.ToString()); sb.AppendLine("Enabled=" + Enabled.ToString()); sb.AppendLine("JpegCompressionFactor=" + JpegCompressionFactor.ToString()); sb.AppendLine("Resampling=" + Resampling.ToString()); return(sb.ToString()); }