Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeObject"/> class.
 /// </summary>
 /// <param name="minimum">Minimum value of gauge.</param>
 /// <param name="maximum">Maximum value of gauge.</param>
 /// <param name="value">Current value of gauge.</param>
 /// <param name="scale">Scale of gauge.</param>
 /// <param name="pointer">Pointer of gauge.</param>
 public GaugeObject(double minimum, double maximum, double value, GaugeScale scale, GaugePointer pointer)
 {
     this.minimum = minimum;
     this.maximum = maximum;
     this.value   = value;
     this.scale   = scale;
     this.pointer = pointer;
     label        = new GaugeLabel(this);
     expression   = "";
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeObject"/> class.
 /// </summary>
 /// <param name="minimum">Minimum value of gauge.</param>
 /// <param name="maximum">Maximum value of gauge.</param>
 /// <param name="value">Current value of gauge.</param>
 public GaugeObject(double minimum, double maximum, double value)
 {
     this.minimum = minimum;
     this.maximum = maximum;
     this.value   = value;
     scale        = new GaugeScale(this);
     pointer      = new GaugePointer(this);
     label        = new GaugeLabel(this);
     expression   = "";
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeObject"/> class.
 /// </summary>
 public GaugeObject()
 {
     minimum    = 0;
     maximum    = 100;
     value      = 10;
     scale      = new GaugeScale(this);
     pointer    = new GaugePointer(this);
     label      = new GaugeLabel(this);
     expression = "";
 }
Exemplo n.º 4
0
 /// <summary>
 /// Serializes the gauge label.
 /// </summary>
 /// <param name="writer">Writer object.</param>
 /// <param name="prefix">Gauge label property name.</param>
 /// <param name="diff">Another GaugeLabel to compare with.</param>
 /// <remarks>
 /// This method is for internal use only.
 /// </remarks>
 public virtual void Serialize(FRWriter writer, string prefix, GaugeLabel diff)
 {
     if (Text != diff.Text)
     {
         writer.WriteStr(prefix + ".Text", Text);
     }
     if (!Font.Equals(diff.Font))
     {
         writer.WriteValue(prefix + ".Font", Font);
     }
     if (Color != diff.Color)
     {
         writer.WriteValue(prefix + ".Color", Color);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Serializes the gauge label.
 /// </summary>
 /// <param name="writer">Writer object.</param>
 /// <param name="prefix">Gauge label property name.</param>
 /// <param name="diff">Another GaugeLabel to compare with.</param>
 /// <remarks>
 /// This method is for internal use only.
 /// </remarks>
 public virtual void Serialize(FRWriter writer, string prefix, GaugeLabel diff)
 {
     if (Text != diff.Text)
     {
         writer.WriteStr(prefix + ".Text", Text);
     }
     if ((writer.SerializeTo != SerializeTo.Preview || !Font.Equals(diff.Font)) && writer.ItemName != "inherited")
     {
         writer.WriteValue(prefix + ".Font", Font);
     }
     if (Color != diff.Color)
     {
         writer.WriteValue(prefix + ".Color", Color);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Copies the contents of another GaugeLabel.
 /// </summary>
 /// <param name="src">The GaugeLabel instance to copy the contents from.</param>
 public virtual void Assign(GaugeLabel src)
 {
     Text  = src.Text;
     Font  = src.Font;
     Color = src.Color;
 }