Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeLabel"/> class.
 /// </summary>
 public GaugeLabel(GaugeObject parent)
 {
     Text        = "";
     Color       = Color.Black;
     Font        = parent.Scale.Font;
     this.parent = parent;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeLabel"/> class.
 /// </summary>
 /// <param name="text">Label text</param>
 /// <param name="font">Label font</param>
 /// <param name="color">Label color</param>
 /// <param name="parent">Label parent</param>
 public GaugeLabel(GaugeObject parent, string text, Font font, Color color)
 {
     Text        = text;
     Font        = font;
     Color       = color;
     this.parent = parent;
 }
Ejemplo n.º 3
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer)
        {
            GaugeObject c = writer.DiffObject as GaugeObject;

            base.Serialize(writer);

            if (Maximum != c.Maximum)
            {
                writer.WriteDouble("Maximum", Maximum);
            }
            if (Minimum != c.Minimum)
            {
                writer.WriteDouble("Minimum", Minimum);
            }
            if (Value != c.Value)
            {
                writer.WriteDouble("Value", Value);
            }
            if (Expression != c.Expression)
            {
                writer.WriteStr("Expression", Expression);
            }
            if (Scale != c.Scale)
            {
                Scale.Serialize(writer, "Scale", c.Scale);
            }
            if (Pointer != c.Pointer)
            {
                Pointer.Serialize(writer, "Pointer", c.Pointer);
            }
            if (Label != c.Label)
            {
                Label.Serialize(writer, "Label", c.Label);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugePointer"/> class.
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public GaugePointer(GaugeObject parent)
 {
     fill        = new SolidFill(Color.Orange);
     borderWidth = 1.0f;
     borderColor = Color.Black;
     this.parent = parent;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeScale"/> class.
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public GaugeScale(GaugeObject parent)
 {
     this.parent = parent;
     font        = new Font("Arial", 8.0f);
     TextFill    = new SolidFill(Color.Black);
     majorTicks  = new ScaleTicks();
     minorTicks  = new ScaleTicks();
 }
Ejemplo n.º 6
0
        /// <inheritdoc/>
        public override void Assign(Base source)
        {
            base.Assign(source);

            GaugeObject src = source as GaugeObject;

            Maximum    = src.Maximum;
            Minimum    = src.Minimum;
            Value      = src.Value;
            Expression = src.Expression;
            Scale.Assign(src.Scale);
            Pointer.Assign(src.Pointer);
            Label.Assign(src.Label);
        }