/// <summary> /// Serializes the gauge scale. /// </summary> /// <param name="writer">Writer object.</param> /// <param name="prefix">Scale property name.</param> /// <param name="diff">Another GaugeScale to compare with.</param> /// <remarks> /// This method is for internal use only. /// </remarks> public virtual void Serialize(FRWriter writer, string prefix, GaugeScale diff) { TextFill.Serialize(writer, prefix + ".TextFill", diff.TextFill); if (writer.SerializeTo != SerializeTo.Preview || !Font.Equals(diff.Font)) { writer.WriteValue(prefix + ".Font", Font); } }
/// <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 = ""; }
/// <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 = ""; }
/// <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 = ""; }
/// <summary> /// Copies the contents of another GaugeScale. /// </summary> /// <param name="src">The GaugeScale instance to copy the contents from.</param> public virtual void Assign(GaugeScale src) { Font = src.Font; TextFill = src.TextFill; }