Exemple #1
0
        internal ScaleBase GetScaleBase()
        {
            if (Common == null)
            {
                return(null);
            }
            if (scaleName == string.Empty)
            {
                return(null);
            }
            GaugeBase       gaugeBase       = 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(scaleName));
        }
Exemple #2
0
 private void RemoveAutoLayout()
 {
     if (Parent != null && Parent is GaugeBase)
     {
         GaugeBase gaugeBase = (GaugeBase)Parent;
         if (gaugeBase.Location == 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;
         }
     }
 }
Exemple #3
0
 public override string ToString()
 {
     if (Parent != null && Parent is GaugeBase)
     {
         GaugeBase gaugeBase = (GaugeBase)Parent;
         if (gaugeBase.Location == this && gaugeBase.Common.GaugeContainer.AutoLayout && gaugeBase.Parent.Length == 0)
         {
             return("(AutoLayout)");
         }
     }
     return(point.X.ToString(CultureInfo.CurrentCulture) + ", " + point.Y.ToString(CultureInfo.CurrentCulture));
 }
 public override string ToString()
 {
     if (Parent != null && Parent is GaugeBase)
     {
         GaugeBase gaugeBase = (GaugeBase)Parent;
         if (gaugeBase.Size == this && gaugeBase.Common.GaugeContainer.AutoLayout && gaugeBase.Parent.Length == 0)
         {
             return("(AutoLayout)");
         }
     }
     return(size.Width.ToString(CultureInfo.CurrentCulture) + ", " + size.Height.ToString(CultureInfo.CurrentCulture));
 }