Beispiel #1
0
        /// <summary>
        /// Serializes the style.
        /// </summary>
        /// <param name="writer">Writer object.</param>
        /// <remarks>
        /// This method is for internal use only.
        /// </remarks>
        public virtual void Serialize(FRWriter writer)
        {
            StyleBase c = writer.DiffObject as StyleBase;

            Border.Serialize(writer, "Border", c.Border);
            Fill.Serialize(writer, "Fill", c.Fill);
            TextFill.Serialize(writer, "TextFill", c.TextFill);
            if (!Font.Equals(c.Font))
            {
                writer.WriteValue("Font", Font);
            }
            if (ApplyBorder != c.ApplyBorder)
            {
                writer.WriteBool("ApplyBorder", ApplyBorder);
            }
            if (ApplyFill != c.ApplyFill)
            {
                writer.WriteBool("ApplyFill", ApplyFill);
            }
            if (ApplyTextFill != c.ApplyTextFill)
            {
                writer.WriteBool("ApplyTextFill", ApplyTextFill);
            }
            if (ApplyFont != c.ApplyFont)
            {
                writer.WriteBool("ApplyFont", ApplyFont);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Serializes the style.
        /// </summary>
        /// <param name="writer">Writer object.</param>
        /// <remarks>
        /// This method is for internal use only.
        /// </remarks>
        public virtual void Serialize(FRWriter writer)
        {
            StyleBase c = writer.DiffObject as StyleBase;

            Border.Serialize(writer, "Border", c.Border);
            Fill.Serialize(writer, "Fill", c.Fill);
            TextFill.Serialize(writer, "TextFill", c.TextFill);
            if ((writer.SerializeTo != SerializeTo.Preview || !Font.Equals(c.Font)) && writer.ItemName != "inherited")
            {
                writer.WriteValue("Font", Font);
            }
            if (ApplyBorder != c.ApplyBorder)
            {
                writer.WriteBool("ApplyBorder", ApplyBorder);
            }
            if (ApplyFill != c.ApplyFill)
            {
                writer.WriteBool("ApplyFill", ApplyFill);
            }
            if (ApplyTextFill != c.ApplyTextFill)
            {
                writer.WriteBool("ApplyTextFill", ApplyTextFill);
            }
            if (ApplyFont != c.ApplyFont)
            {
                writer.WriteBool("ApplyFont", ApplyFont);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Assigns values from another source.
 /// </summary>
 /// <param name="source">Source to assign from.</param>
 public virtual void Assign(StyleBase source)
 {
     Border        = source.Border.Clone();
     Fill          = source.Fill.Clone();
     TextFill      = source.TextFill.Clone();
     Font          = source.Font;
     ApplyBorder   = source.ApplyBorder;
     ApplyFill     = source.ApplyFill;
     ApplyTextFill = source.ApplyTextFill;
     ApplyFont     = source.ApplyFont;
 }
Beispiel #4
0
 /// <inheritdoc/>
 public override void Assign(StyleBase source)
 {
     base.Assign(source);
     Name = (source as Style).Name;
 }
Beispiel #5
0
 /// <inheritdoc/>
 public override void Assign(StyleBase source)
 {
     base.Assign(source);
     Expression = (source as HighlightCondition).Expression;
     Visible    = (source as HighlightCondition).Visible;
 }