public ScaleBase GetScaleBase() { if (this.Common == null) { return(null); } if (this.scaleName == string.Empty) { return(null); } GaugeBase gaugeBase = this.GetGaugeBase(); NamedCollection namedCollection = null; if (gaugeBase is CircularGauge) { namedCollection = ((CircularGauge)gaugeBase).Scales; } if (gaugeBase is LinearGauge) { namedCollection = ((LinearGauge)gaugeBase).Scales; } if (namedCollection == null) { return(null); } return((ScaleBase)namedCollection.GetByName(this.scaleName)); }
private void RemoveAutoLayout() { if (this.Parent != null && this.Parent is GaugeBase) { GaugeBase gaugeBase = (GaugeBase)this.Parent; if (gaugeBase.Size == this && gaugeBase.Parent == string.Empty && gaugeBase.Common != null && gaugeBase.Common.GaugeContainer != null && gaugeBase.Common.GaugeContainer.AutoLayout && gaugeBase.Common.GaugeCore != null && !gaugeBase.Common.GaugeCore.layoutFlag) { gaugeBase.Common.GaugeContainer.AutoLayout = false; } } }
public override string ToString() { if (this.Parent != null && this.Parent is GaugeBase) { GaugeBase gaugeBase = (GaugeBase)this.Parent; if (gaugeBase.Size == this && gaugeBase.Common.GaugeContainer.AutoLayout && gaugeBase.Parent.Length == 0) { return("(AutoLayout)"); } } return(this.size.Width.ToString(CultureInfo.CurrentCulture) + ", " + this.size.Height.ToString(CultureInfo.CurrentCulture)); }
public override string ToString() { if (this.Parent != null && this.Parent is GaugeBase) { GaugeBase gaugeBase = (GaugeBase)this.Parent; if (gaugeBase.Location == this && gaugeBase.Common.GaugeContainer.AutoLayout && gaugeBase.Parent.Length == 0) { return("(AutoLayout)"); } } return(this.point.X.ToString(CultureInfo.CurrentCulture) + ", " + this.point.Y.ToString(CultureInfo.CurrentCulture)); }
void IPointerProvider.DataValueChanged(bool initialize) { if (!initialize) { GaugeBase gaugeBase = this.GetGaugeBase(); if (gaugeBase != null) { gaugeBase.PointerValueChanged(this); } } ScaleBase scaleBase = this.GetScaleBase(); if (scaleBase != null) { double valueLimit = scaleBase.GetValueLimit(this.data.Value, this.snappingEnabled, this.snappingInterval); if (!initialize && this.dampeningEnabled && this.Data.StartDampening(valueLimit, scaleBase.MinimumLog, scaleBase.Maximum, this.dampeningSweepTime, this.Common.GaugeCore.RefreshRate)) { return; } this.Position = valueLimit; } }