コード例 #1
0
        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));
        }
コード例 #2
0
 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;
         }
     }
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 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));
 }
コード例 #5
0
        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;
            }
        }