Example #1
0
        public override void Serialize(FRWriter writer)
        {
            PictureObjectBase c = writer.DiffObject as PictureObjectBase;

            base.Serialize(writer);

            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 (ImageSourceExpression != c.ImageSourceExpression)
            {
                writer.WriteStr("ImageSourceExpression", ImageSourceExpression);
            }

            if (Padding != c.Padding)
            {
                writer.WriteValue("Padding", Padding);
            }
            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 (Angle != c.Angle)
            {
                writer.WriteInt("Angle", Angle);
            }
            if (Grayscale != c.Grayscale)
            {
                writer.WriteBool("Grayscale", Grayscale);
            }
            if (ShowErrorImage != c.ShowErrorImage)
            {
                writer.WriteBool("ShowErrorImage", ShowErrorImage);
            }
            if (ImageAlign != ImageAlign.None)
            {
                writer.WriteValue("ImageAlign", ImageAlign);
            }
        }
Example #2
0
        /// <inheritdoc/>
        public override void Assign(Base source)
        {
            base.Assign(source);

            PictureObjectBase src = source as PictureObjectBase;

            if (src != null)
            {
                ImageLocation  = src.ImageLocation;
                DataColumn     = src.DataColumn;
                Padding        = src.Padding;
                SizeMode       = src.SizeMode;
                MaxWidth       = src.MaxWidth;
                MaxHeight      = src.MaxHeight;
                Angle          = src.Angle;
                Grayscale      = src.Grayscale;
                ShowErrorImage = src.ShowErrorImage;
            }
        }