/// <inheritdoc/> public override void Serialize(FRWriter writer, string prefix, GaugeScale diff) { base.Serialize(writer, prefix, diff); RadialScale dc = diff as RadialScale; MajorTicks.Serialize(writer, prefix + ".MajorTicks", dc.MajorTicks); MinorTicks.Serialize(writer, prefix + ".MinorTicks", dc.MinorTicks); }
/// <inheritdoc/> public override void Assign(GaugeScale src) { base.Assign(src); RadialScale s = src as RadialScale; MajorTicks.Assign(s.MajorTicks); MinorTicks.Assign(s.MinorTicks); }
/// <summary> /// Initializes a new instance of the <see cref="RadialGauge"/> class. /// </summary> public RadialGauge() : base() { InitializeComponent(); Scale = new RadialScale(this); Pointer = new RadialPointer(this, Scale as RadialScale); Label = new RadialLabel(this); Height = 4.0f * Units.Centimeters; Width = 4.0f * Units.Centimeters; semicircleOffsetRatio = type == RadialGaugeType.Semicircle && (position == RadialGaugePosition.Left || position == RadialGaugePosition.Right) ? 1.5f : 1; Type = RadialGaugeType.Circle; Border.Lines = BorderLines.None; }
/// <summary> /// Initializes a new instance of the <see cref="RadialPointer"/> /// </summary> /// <param name="parent">The parent gauge object.</param> /// <param name="scale">The scale object.</param> public RadialPointer(GaugeObject parent, RadialScale scale) : base(parent) { this.scale = scale; gradAutoRotate = true; }