/// <inheritdoc/> public override void Serialize(FRWriter writer) { ReportPage c = writer.DiffObject as ReportPage; base.Serialize(writer); if (Landscape != c.Landscape) { writer.WriteBool("Landscape", Landscape); } if (FloatDiff(PaperWidth, c.PaperWidth)) { writer.WriteFloat("PaperWidth", PaperWidth); } if (FloatDiff(PaperHeight, c.PaperHeight)) { writer.WriteFloat("PaperHeight", PaperHeight); } if (RawPaperSize != c.RawPaperSize) { writer.WriteInt("RawPaperSize", RawPaperSize); } if (FloatDiff(LeftMargin, c.LeftMargin)) { writer.WriteFloat("LeftMargin", LeftMargin); } if (FloatDiff(TopMargin, c.TopMargin)) { writer.WriteFloat("TopMargin", TopMargin); } if (FloatDiff(RightMargin, c.RightMargin)) { writer.WriteFloat("RightMargin", RightMargin); } if (FloatDiff(BottomMargin, c.BottomMargin)) { writer.WriteFloat("BottomMargin", BottomMargin); } if (MirrorMargins != c.MirrorMargins) { writer.WriteBool("MirrorMargins", MirrorMargins); } if (FirstPageSource != c.FirstPageSource) { writer.WriteInt("FirstPageSource", FirstPageSource); } if (OtherPagesSource != c.OtherPagesSource) { writer.WriteInt("OtherPagesSource", OtherPagesSource); } if (Duplex != c.Duplex) { writer.WriteValue("Duplex", Duplex); } Columns.Serialize(writer, c.Columns); if (Guides.Count > 0) { writer.WriteValue("Guides", Guides); } Border.Serialize(writer, "Border", c.Border); Fill.Serialize(writer, "Fill", c.Fill); Watermark.Serialize(writer, "Watermark", c.Watermark); if (TitleBeforeHeader != c.TitleBeforeHeader) { writer.WriteBool("TitleBeforeHeader", TitleBeforeHeader); } if (OutlineExpression != c.OutlineExpression) { writer.WriteStr("OutlineExpression", OutlineExpression); } if (PrintOnPreviousPage != c.PrintOnPreviousPage) { writer.WriteBool("PrintOnPreviousPage", PrintOnPreviousPage); } if (ResetPageNumber != c.ResetPageNumber) { writer.WriteBool("ResetPageNumber", ResetPageNumber); } if (ExtraDesignWidth != c.ExtraDesignWidth) { writer.WriteBool("ExtraDesignWidth", ExtraDesignWidth); } if (StartOnOddPage != c.StartOnOddPage) { writer.WriteBool("StartOnOddPage", StartOnOddPage); } if (StartPageEvent != c.StartPageEvent) { writer.WriteStr("StartPageEvent", StartPageEvent); } if (FinishPageEvent != c.FinishPageEvent) { writer.WriteStr("FinishPageEvent", FinishPageEvent); } if (ManualBuildEvent != c.ManualBuildEvent) { writer.WriteStr("ManualBuildEvent", ManualBuildEvent); } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { PictureObject c = writer.DiffObject as PictureObject; base.Serialize(writer); #if PRINT_HOUSE writer.WriteStr("ImageLocation", ImageLocation); #endif if (TransparentColor != c.TransparentColor) { writer.WriteValue("TransparentColor", TransparentColor); } if (FloatDiff(Transparency, c.Transparency)) { writer.WriteFloat("Transparency", Transparency); } if (Tile != c.Tile) { writer.WriteBool("Tile", Tile); } if (ImageFormat != c.ImageFormat) { writer.WriteValue("ImageFormat", ImageFormat); } // store image data if (writer.SerializeTo != SerializeTo.SourcePages) { if (writer.SerializeTo == SerializeTo.Preview || (String.IsNullOrEmpty(ImageLocation) && String.IsNullOrEmpty(DataColumn))) { if (writer.BlobStore != null) { // check FImageIndex >= writer.BlobStore.Count is needed when we close the designer // and run it again, the BlobStore is empty, but FImageIndex is pointing to // previous BlobStore item and is not -1. if (imageIndex == -1 || imageIndex >= writer.BlobStore.Count) { byte[] bytes = imageData; if (bytes == null) { using (MemoryStream stream = new MemoryStream()) { ImageHelper.Save(Image, stream, imageFormat); bytes = stream.ToArray(); } } if (bytes != null) { string imgHash = BitConverter.ToString(new Murmur3().ComputeHash(bytes)); imageIndex = writer.BlobStore.AddOrUpdate(bytes, imgHash); } } } else { if (Image == null && imageData != null) { writer.WriteStr("Image", Convert.ToBase64String(imageData)); } else if (!writer.AreEqual(Image, c.Image)) { writer.WriteValue("Image", Image); } } if (writer.BlobStore != null || writer.SerializeTo == SerializeTo.Undo) { writer.WriteInt("ImageIndex", imageIndex); } } } }
/// <inheritdoc/> public override void Serialize(FRWriter writer, string prefix, FillBase fill) { base.Serialize(writer, prefix, fill); TextureFill c = fill as TextureFill; if (c == null || c.ImageWidth != ImageWidth) { writer.WriteValue(prefix + ".ImageWidth", ImageWidth); } if (c == null || c.ImageHeight != ImageHeight) { writer.WriteValue(prefix + ".ImageHeight", ImageHeight); } if (c == null || c.PreserveAspectRatio != PreserveAspectRatio) { writer.WriteBool(prefix + ".PreserveAspectRatio", PreserveAspectRatio); } if (c == null || c.WrapMode != WrapMode) { writer.WriteValue(prefix + ".WrapMode", WrapMode); } if (c == null || c.ImageOffsetX != ImageOffsetX) { writer.WriteValue(prefix + ".ImageOffsetX", ImageOffsetX); } if (c == null || c.ImageOffsetY != ImageOffsetY) { writer.WriteValue(prefix + ".ImageOffsetY", ImageOffsetY); } // store image data if (writer.SerializeTo != SerializeTo.SourcePages) { if (writer.BlobStore != null) { // check FImageIndex >= writer.BlobStore.Count is needed when we close the designer // and run it again, the BlobStore is empty, but FImageIndex is pointing to // previous BlobStore item and is not -1. if (imageIndex == -1 || imageIndex >= writer.BlobStore.Count) { byte[] bytes = imageData; if (bytes == null) { using (MemoryStream stream = new MemoryStream()) { ImageHelper.Save(image, stream, ImageFormat.Png); bytes = stream.ToArray(); } } if (bytes != null) { string imgHash = BitConverter.ToString(new Murmur3().ComputeHash(bytes)); if (imgHash != dummyImageHash) { imageIndex = writer.BlobStore.AddOrUpdate(bytes, imgHash.Replace("-", String.Empty)); } } } } else { if (imageData != null) { string hash = BitConverter.ToString(new Murmur3().ComputeHash(imageData)); if (hash != dummyImageHash) { if (c == null || !writer.AreEqual(ImageData, c.ImageData)) { writer.WriteStr(prefix + ".ImageData", Convert.ToBase64String(ImageData)); } } } } if (writer.BlobStore != null || writer.SerializeTo == SerializeTo.Undo) { writer.WriteInt(prefix + ".ImageIndex", imageIndex); } } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { BarcodeObject c = writer.DiffObject as BarcodeObject; base.Serialize(writer); if (Angle != c.Angle) { writer.WriteInt("Angle", Angle); } if (AutoSize != c.AutoSize) { writer.WriteBool("AutoSize", AutoSize); } if (DataColumn != c.DataColumn) { writer.WriteStr("DataColumn", DataColumn); } if (Expression != c.Expression) { writer.WriteStr("Expression", Expression); } if (Text != c.Text) { writer.WriteStr("Text", Text); } if (ShowText != c.ShowText) { writer.WriteBool("ShowText", ShowText); } if (Padding != c.Padding) { writer.WriteValue("Padding", Padding); } if (Zoom != c.Zoom) { writer.WriteFloat("Zoom", Zoom); } if (HideIfNoData != c.HideIfNoData) { writer.WriteBool("HideIfNoData", HideIfNoData); } if (NoDataText != c.NoDataText) { writer.WriteStr("NoDataText", NoDataText); } if (AllowExpressions != c.AllowExpressions) { writer.WriteBool("AllowExpressions", AllowExpressions); } if (Brackets != c.Brackets) { writer.WriteStr("Brackets", Brackets); } if (AsBitmap != c.AsBitmap) { writer.WriteBool("AsBitmap", AsBitmap); } if (HorzAlign != c.HorzAlign) { writer.WriteValue("HorzAlign", HorzAlign); } Barcode.Serialize(writer, "Barcode.", c.Barcode); }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { ComponentBase c = writer.DiffObject as ComponentBase; base.Serialize(writer); if (Printable != c.Printable) { writer.WriteBool("Printable", Printable); } if (PrintableExpression != c.PrintableExpression) { writer.WriteStr("PrintableExpression", PrintableExpression); } if (HasFlag(Flags.CanWriteBounds)) { if (FloatDiff(Left, c.Left)) { writer.WriteFloat("Left", Left); } if (FloatDiff(Top, c.Top)) { writer.WriteFloat("Top", Top); } if (FloatDiff(Width, c.Width)) { writer.WriteFloat("Width", Width); } if (FloatDiff(Height, c.Height)) { writer.WriteFloat("Height", Height); } } if (writer.SerializeTo != SerializeTo.Preview) { if (Dock != c.Dock) { writer.WriteValue("Dock", Dock); } if (Anchor != c.Anchor) { writer.WriteValue("Anchor", Anchor); } if (Visible != c.Visible) { writer.WriteBool("Visible", Visible); } if (VisibleExpression != c.VisibleExpression) { writer.WriteStr("VisibleExpression", VisibleExpression); } if (GroupIndex != c.GroupIndex) { writer.WriteInt("GroupIndex", GroupIndex); } } if (Tag != c.Tag) { writer.WriteStr("Tag", Tag); } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { PictureObject c = writer.DiffObject as PictureObject; base.Serialize(writer); if (SizeMode != c.SizeMode) { writer.WriteValue("SizeMode", SizeMode); } if (FloatDiff(MaxWidth, c.MaxWidth)) { writer.WriteFloat("MaxWidth", MaxWidth); } if (FloatDiff(MaxHeight, c.MaxHeight)) { writer.WriteFloat("MaxHeight", MaxHeight); } if (Padding != c.Padding) { writer.WriteValue("Padding", Padding); } if (writer.SerializeTo != SerializeTo.Preview && writer.SerializeTo != SerializeTo.SourcePages && ImageLocation != c.ImageLocation) { writer.WriteStr("ImageLocation", ImageLocation); } if (DataColumn != c.DataColumn) { writer.WriteStr("DataColumn", DataColumn); } if (TransparentColor != c.TransparentColor) { writer.WriteValue("TransparentColor", TransparentColor); } if (FloatDiff(Transparency, c.Transparency)) { writer.WriteFloat("Transparency", Transparency); } if (ShowErrorImage != c.ShowErrorImage) { writer.WriteBool("ShowErrorImage", ShowErrorImage); } if (Tile != c.Tile) { writer.WriteBool("Tile", Tile); } if (Angle != c.Angle) { writer.WriteInt("Angle", Angle); } // store image data if (writer.SerializeTo != SerializeTo.SourcePages) { if (writer.SerializeTo == SerializeTo.Preview || (String.IsNullOrEmpty(ImageLocation) && String.IsNullOrEmpty(DataColumn))) { if (writer.BlobStore != null) { // check FImageIndex >= writer.BlobStore.Count is needed when we close the designer // and run it again, the BlobStore is empty, but FImageIndex is pointing to // previous BlobStore item and is not -1. if (FImageIndex == -1 || FImageIndex >= writer.BlobStore.Count) { MemoryStream stream; if (FImageData == null) { stream = new MemoryStream(); ImageHelper.Save(Image, stream, ImageFormat.Png); } else { stream = new MemoryStream(FImageData); } FImageIndex = writer.BlobStore.Add(stream); } } else { if (Image == null && FImageData != null) { writer.WriteStr("Image", Convert.ToBase64String(FImageData)); } else if (!writer.AreEqual(Image, c.Image)) { writer.WriteValue("Image", Image); } } if (writer.BlobStore != null || writer.SerializeTo == SerializeTo.Undo) { writer.WriteInt("ImageIndex", FImageIndex); } } } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { DataBand c = writer.DiffObject as DataBand; base.Serialize(writer); if (writer.SerializeTo == SerializeTo.Preview) { return; } if (DataSource != c.DataSource) { writer.WriteRef("DataSource", DataSource); } if (RowCount != c.RowCount) { writer.WriteInt("RowCount", RowCount); } if (MaxRows != c.MaxRows) { writer.WriteInt("MaxRows", MaxRows); } if (Relation != c.Relation) { writer.WriteRef("Relation", Relation); } if (Sort.Count > 0) { writer.Write(Sort); } if (Filter != c.Filter) { writer.WriteStr("Filter", Filter); } Columns.Serialize(writer, c.Columns); if (PrintIfDetailEmpty != c.PrintIfDetailEmpty) { writer.WriteBool("PrintIfDetailEmpty", PrintIfDetailEmpty); } if (PrintIfDatasourceEmpty != c.PrintIfDatasourceEmpty) { writer.WriteBool("PrintIfDatasourceEmpty", PrintIfDatasourceEmpty); } if (KeepTogether != c.KeepTogether) { writer.WriteBool("KeepTogether", KeepTogether); } if (KeepDetail != c.KeepDetail) { writer.WriteBool("KeepDetail", KeepDetail); } if (IdColumn != c.IdColumn) { writer.WriteStr("IdColumn", IdColumn); } if (ParentIdColumn != c.ParentIdColumn) { writer.WriteStr("ParentIdColumn", ParentIdColumn); } if (FloatDiff(Indent, c.Indent)) { writer.WriteFloat("Indent", Indent); } if (CollectChildRows != c.CollectChildRows) { writer.WriteBool("CollectChildRows", CollectChildRows); } if (ResetPageNumber != c.ResetPageNumber) { writer.WriteBool("ResetPageNumber", ResetPageNumber); } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { GridControl c = writer.DiffObject as GridControl; base.Serialize(writer); if (DataSource != c.DataSource) { writer.WriteRef("DataSource", DataSource); } if (AllowUserToAddRows != c.AllowUserToAddRows) { writer.WriteBool("AllowUserToAddRows", AllowUserToAddRows); } if (AllowUserToDeleteRows != c.AllowUserToDeleteRows) { writer.WriteBool("AllowUserToDeleteRows", AllowUserToDeleteRows); } WriteCellStyle(writer, "AlternatingRowsDefaultCellStyle", AlternatingRowsDefaultCellStyle, c.AlternatingRowsDefaultCellStyle); if (AutoSizeColumnsMode != c.AutoSizeColumnsMode) { writer.WriteValue("AutoSizeColumnsMode", AutoSizeColumnsMode); } if (AutoSizeRowsMode != c.AutoSizeRowsMode) { writer.WriteValue("AutoSizeRowsMode", AutoSizeRowsMode); } if (BackgroundColor != c.BackgroundColor) { writer.WriteValue("BackgroundColor", BackgroundColor); } if (BorderStyle != c.BorderStyle) { writer.WriteValue("BorderStyle", BorderStyle); } if (CellBorderStyle != c.CellBorderStyle) { writer.WriteValue("CellBorderStyle", CellBorderStyle); } if (ColumnHeadersBorderStyle != c.ColumnHeadersBorderStyle) { writer.WriteValue("ColumnHeadersBorderStyle", ColumnHeadersBorderStyle); } WriteCellStyle(writer, "ColumnHeadersDefaultCellStyle", ColumnHeadersDefaultCellStyle, c.ColumnHeadersDefaultCellStyle); if (ColumnHeadersHeight != c.ColumnHeadersHeight) { writer.WriteInt("ColumnHeadersHeight", ColumnHeadersHeight); } if (ColumnHeadersHeightSizeMode != c.ColumnHeadersHeightSizeMode) { writer.WriteValue("ColumnHeadersHeightSizeMode", ColumnHeadersHeightSizeMode); } if (ColumnHeadersVisible != c.ColumnHeadersVisible) { writer.WriteBool("ColumnHeadersVisible", ColumnHeadersVisible); } WriteCellStyle(writer, "DefaultCellStyle", DefaultCellStyle, c.DefaultCellStyle); if (GridColor != c.GridColor) { writer.WriteValue("GridColor", GridColor); } if (MultiSelect != c.MultiSelect) { writer.WriteBool("MultiSelect", MultiSelect); } if (ReadOnly != c.ReadOnly) { writer.WriteBool("ReadOnly", ReadOnly); } if (RowHeadersBorderStyle != c.RowHeadersBorderStyle) { writer.WriteValue("RowHeadersBorderStyle", RowHeadersBorderStyle); } WriteCellStyle(writer, "RowHeadersDefaultCellStyle", RowHeadersDefaultCellStyle, c.RowHeadersDefaultCellStyle); if (RowHeadersVisible != c.RowHeadersVisible) { writer.WriteBool("RowHeadersVisible", RowHeadersVisible); } if (RowHeadersWidth != c.RowHeadersWidth) { writer.WriteInt("RowHeadersWidth", RowHeadersWidth); } if (RowHeadersWidthSizeMode != c.RowHeadersWidthSizeMode) { writer.WriteValue("RowHeadersWidthSizeMode", RowHeadersWidthSizeMode); } WriteCellStyle(writer, "RowsDefaultCellStyle", RowsDefaultCellStyle, c.RowsDefaultCellStyle); if (ScrollBars != c.ScrollBars) { writer.WriteValue("ScrollBars", ScrollBars); } if (SelectionMode != c.SelectionMode) { writer.WriteValue("SelectionMode", SelectionMode); } if (Columns.Count > 0) { writer.Write(Columns); } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { if (writer.SerializeTo == SerializeTo.Preview && AutoWidth) { WordWrap = false; float width = CalcSize().Width; if ((Anchor & AnchorStyles.Right) != 0) { Left = Right - width; } Width = width; } TextObject c = writer.DiffObject as TextObject; base.Serialize(writer); if (AutoWidth != c.AutoWidth) { writer.WriteBool("AutoWidth", AutoWidth); } if (AutoShrink != c.AutoShrink) { writer.WriteValue("AutoShrink", AutoShrink); } if (FloatDiff(AutoShrinkMinSize, c.AutoShrinkMinSize)) { writer.WriteFloat("AutoShrinkMinSize", AutoShrinkMinSize); } if (HorzAlign != c.HorzAlign) { writer.WriteValue("HorzAlign", HorzAlign); } if (VertAlign != c.VertAlign) { writer.WriteValue("VertAlign", VertAlign); } if (Angle != c.Angle) { writer.WriteInt("Angle", Angle); } if (RightToLeft != c.RightToLeft) { writer.WriteBool("RightToLeft", RightToLeft); } if (WordWrap != c.WordWrap) { writer.WriteBool("WordWrap", WordWrap); } if (Underlines != c.Underlines) { writer.WriteBool("Underlines", Underlines); } if (!Font.Equals(c.Font)) { writer.WriteValue("Font", Font); } TextFill.Serialize(writer, "TextFill", c.TextFill); if (Trimming != c.Trimming) { writer.WriteValue("Trimming", Trimming); } if (FontWidthRatio != c.FontWidthRatio) { writer.WriteFloat("FontWidthRatio", FontWidthRatio); } if (FirstTabOffset != c.FirstTabOffset) { writer.WriteFloat("FirstTabOffset", FirstTabOffset); } if (TabWidth != c.TabWidth) { writer.WriteFloat("TabWidth", TabWidth); } if (Clip != c.Clip) { writer.WriteBool("Clip", Clip); } if (Wysiwyg != c.Wysiwyg) { writer.WriteBool("Wysiwyg", Wysiwyg); } if (LineHeight != c.LineHeight) { writer.WriteFloat("LineHeight", LineHeight); } if (HtmlTags != c.HtmlTags) { writer.WriteBool("HtmlTags", HtmlTags); } if (ForceJustify != c.ForceJustify) { writer.WriteBool("ForceJustify", ForceJustify); } if (writer.SerializeTo != SerializeTo.Preview) { if (Style != c.Style) { writer.WriteStr("Style", Style); } if (Highlight.Count > 0) { writer.Write(Highlight); } } }
/// <inheritdoc/> public override void Serialize(FRWriter writer) { DialogControl c = writer.DiffObject as DialogControl; base.Serialize(writer); if (BackColor != c.BackColor) { writer.WriteValue("BackColor", BackColor); } if (Cursor != c.Cursor) { writer.WriteValue("Cursor", Cursor); } if (Enabled != c.Enabled) { writer.WriteBool("Enabled", Enabled); } if (!Font.Equals(c.Font)) { writer.WriteValue("Font", Font); } if (ForeColor != c.ForeColor) { writer.WriteValue("ForeColor", ForeColor); } if (RightToLeft != c.RightToLeft) { writer.WriteValue("RightToLeft", RightToLeft); } writer.WriteInt("TabIndex", TabIndex); if (TabStop != c.TabStop) { writer.WriteBool("TabStop", TabStop); } if (Text != c.Text) { writer.WriteStr("Text", Text); } if (ClickEvent != c.ClickEvent) { writer.WriteStr("ClickEvent", ClickEvent); } if (DoubleClickEvent != c.DoubleClickEvent) { writer.WriteStr("DoubleClickEvent", DoubleClickEvent); } if (EnterEvent != c.EnterEvent) { writer.WriteStr("EnterEvent", EnterEvent); } if (LeaveEvent != c.LeaveEvent) { writer.WriteStr("LeaveEvent", LeaveEvent); } if (KeyDownEvent != c.KeyDownEvent) { writer.WriteStr("KeyDownEvent", KeyDownEvent); } if (KeyPressEvent != c.KeyPressEvent) { writer.WriteStr("KeyPressEvent", KeyPressEvent); } if (KeyUpEvent != c.KeyUpEvent) { writer.WriteStr("KeyUpEvent", KeyUpEvent); } if (MouseDownEvent != c.MouseDownEvent) { writer.WriteStr("MouseDownEvent", MouseDownEvent); } if (MouseMoveEvent != c.MouseMoveEvent) { writer.WriteStr("MouseMoveEvent", MouseMoveEvent); } if (MouseUpEvent != c.MouseUpEvent) { writer.WriteStr("MouseUpEvent", MouseUpEvent); } if (MouseEnterEvent != c.MouseEnterEvent) { writer.WriteStr("MouseEnterEvent", MouseEnterEvent); } if (MouseLeaveEvent != c.MouseLeaveEvent) { writer.WriteStr("MouseLeaveEvent", MouseLeaveEvent); } if (ResizeEvent != c.ResizeEvent) { writer.WriteStr("ResizeEvent", ResizeEvent); } if (TextChangedEvent != c.TextChangedEvent) { writer.WriteStr("TextChangedEvent", TextChangedEvent); } if (PaintEvent != c.PaintEvent) { writer.WriteStr("PaintEvent", PaintEvent); } }