internal BarStyleAttrib GetThermometerStyleAttrib(GaugeGraphics g)
        {
            BarStyleAttrib barStyleAttrib = new BarStyleAttrib();

            if (Image != "")
            {
                return(barStyleAttrib);
            }
            LinearScale scale = GetScale();
            double      num   = scale.GetValueLimit(GetBarStartValue());

            if ((Type == LinearPointerType.Thermometer || BarStart == BarStart.ScaleStart) && num > scale.MinimumLog)
            {
                num = scale.MinimumLog;
            }
            double valueLimit         = scale.GetValueLimit(base.Position);
            float  positionFromValue  = scale.GetPositionFromValue(num);
            float  positionFromValue2 = scale.GetPositionFromValue(valueLimit);
            float  num2              = positionFromValue2 - positionFromValue;
            float  width             = Width;
            float  bulbSize          = ThermometerBulbSize;
            float  bulbOffset        = thermometerBulbOffset;
            float  distanceFromScale = DistanceFromScale;

            if (Math.Round(num2, 4) == 0.0 && Type != LinearPointerType.Thermometer)
            {
                return(barStyleAttrib);
            }
            double num3 = scale.GetValueLimit(double.PositiveInfinity);

            if (num3 < scale.Maximum)
            {
                num3 = scale.Maximum;
            }
            float positionFromValue3 = scale.GetPositionFromValue(num3);

            barStyleAttrib.primaryPath = g.GetThermometerPath(positionFromValue, positionFromValue2, width, scale.Position, GetGauge().GetOrientation(), distanceFromScale, Placement, scale.GetReversed(), scale.Width, bulbOffset, bulbSize, ThermometerStyle);
            if (barStyleAttrib.primaryPath == null)
            {
                return(barStyleAttrib);
            }
            barStyleAttrib.totalPath    = g.GetThermometerPath(positionFromValue, positionFromValue3, Width, scale.Position, GetGauge().GetOrientation(), DistanceFromScale, Placement, scale.GetReversed(), scale.Width, ThermometerBulbOffset, ThermometerBulbSize, ThermometerStyle);
            barStyleAttrib.totalBrush   = g.GetLinearRangeBrush(barStyleAttrib.totalPath.GetBounds(), ThermometerBackColor, ThermometerBackHatchStyle, (RangeGradientType)Enum.Parse(typeof(RangeGradientType), ThermometerBackGradientType.ToString()), ThermometerBackGradientEndColor, GetGauge().GetOrientation(), GetScale().GetReversed(), 0.0, 0.0);
            barStyleAttrib.primaryBrush = g.GetLinearRangeBrush(barStyleAttrib.primaryPath.GetBounds(), FillColor, FillHatchStyle, (RangeGradientType)Enum.Parse(typeof(RangeGradientType), FillGradientType.ToString()), FillGradientEndColor, GetGauge().GetOrientation(), GetScale().GetReversed(), 0.0, 0.0);
            LinearRange[] colorRanges = GetColorRanges();
            if (colorRanges != null)
            {
                barStyleAttrib.secondaryPaths   = new GraphicsPath[colorRanges.Length];
                barStyleAttrib.secondaryBrushes = new Brush[colorRanges.Length];
                int           num4  = 0;
                LinearRange[] array = colorRanges;
                foreach (LinearRange linearRange in array)
                {
                    double num5 = scale.GetValueLimit(linearRange.StartValue);
                    if (num5 < num)
                    {
                        num5 = num;
                    }
                    if (num5 > valueLimit)
                    {
                        num5 = valueLimit;
                    }
                    double num6 = scale.GetValueLimit(linearRange.EndValue);
                    if (num6 < num)
                    {
                        num6 = num;
                    }
                    if (num6 > valueLimit)
                    {
                        num6 = valueLimit;
                    }
                    float positionFromValue4 = scale.GetPositionFromValue(num5);
                    float positionFromValue5 = scale.GetPositionFromValue(num6);
                    if (Math.Round(positionFromValue5 - positionFromValue4, 4) == 0.0)
                    {
                        barStyleAttrib.secondaryPaths[num4]   = null;
                        barStyleAttrib.secondaryBrushes[num4] = null;
                    }
                    else
                    {
                        barStyleAttrib.secondaryPaths[num4]   = g.GetLinearRangePath(positionFromValue4, positionFromValue5, width, width, scale.Position, GetGauge().GetOrientation(), distanceFromScale, Placement, scale.Width);
                        barStyleAttrib.secondaryBrushes[num4] = g.GetLinearRangeBrush(barStyleAttrib.primaryPath.GetBounds(), linearRange.InRangeBarPointerColor, FillHatchStyle, (RangeGradientType)Enum.Parse(typeof(RangeGradientType), FillGradientType.ToString()), FillGradientEndColor, GetGauge().GetOrientation(), GetScale().GetReversed(), 0.0, 0.0);
                    }
                    num4++;
                }
            }
            return(barStyleAttrib);
        }
        internal BarStyleAttrib GetBarStyleAttrib(GaugeGraphics g)
        {
            BarStyleAttrib barStyleAttrib = new BarStyleAttrib();

            if (Image != "")
            {
                return(barStyleAttrib);
            }
            LinearScale scale = GetScale();
            double      num   = scale.GetValueLimit(GetBarStartValue());

            if ((Type == LinearPointerType.Thermometer || BarStart == BarStart.ScaleStart) && num > scale.Minimum)
            {
                num = scale.Minimum;
            }
            double valueLimit        = scale.GetValueLimit(base.Position);
            float  positionFromValue = scale.GetPositionFromValue(num);

            _ = ThermometerBulbOffset;
            float positionFromValue2 = scale.GetPositionFromValue(valueLimit);

            if (Math.Round(positionFromValue2 - positionFromValue, 4) == 0.0)
            {
                return(barStyleAttrib);
            }
            if (base.BarStyle == BarStyle.Style1)
            {
                barStyleAttrib.primaryPath = g.GetLinearRangePath(positionFromValue, positionFromValue2, Width, Width, scale.Position, GetGauge().GetOrientation(), DistanceFromScale, Placement, scale.Width);
                if (barStyleAttrib.primaryPath == null)
                {
                    return(barStyleAttrib);
                }
                barStyleAttrib.primaryBrush = g.GetLinearRangeBrush(barStyleAttrib.primaryPath.GetBounds(), FillColor, FillHatchStyle, (RangeGradientType)Enum.Parse(typeof(RangeGradientType), FillGradientType.ToString()), FillGradientEndColor, GetGauge().GetOrientation(), GetScale().GetReversed(), 0.0, 0.0);
                LinearRange[] colorRanges = GetColorRanges();
                if (colorRanges != null)
                {
                    barStyleAttrib.secondaryPaths   = new GraphicsPath[colorRanges.Length];
                    barStyleAttrib.secondaryBrushes = new Brush[colorRanges.Length];
                    int           num2  = 0;
                    LinearRange[] array = colorRanges;
                    foreach (LinearRange linearRange in array)
                    {
                        double num3 = scale.GetValueLimit(linearRange.StartValue);
                        if (num3 < num)
                        {
                            num3 = num;
                        }
                        if (num3 > valueLimit)
                        {
                            num3 = valueLimit;
                        }
                        double num4 = scale.GetValueLimit(linearRange.EndValue);
                        if (num4 < num)
                        {
                            num4 = num;
                        }
                        if (num4 > valueLimit)
                        {
                            num4 = valueLimit;
                        }
                        float positionFromValue3 = scale.GetPositionFromValue(num3);
                        float positionFromValue4 = scale.GetPositionFromValue(num4);
                        if (Math.Round(positionFromValue4 - positionFromValue3, 4) == 0.0)
                        {
                            barStyleAttrib.secondaryPaths[num2]   = null;
                            barStyleAttrib.secondaryBrushes[num2] = null;
                        }
                        else
                        {
                            barStyleAttrib.secondaryPaths[num2]   = g.GetLinearRangePath(positionFromValue3, positionFromValue4, Width, Width, scale.Position, GetGauge().GetOrientation(), DistanceFromScale, Placement, scale.Width);
                            barStyleAttrib.secondaryBrushes[num2] = g.GetLinearRangeBrush(barStyleAttrib.primaryPath.GetBounds(), linearRange.InRangeBarPointerColor, FillHatchStyle, (RangeGradientType)Enum.Parse(typeof(RangeGradientType), FillGradientType.ToString()), FillGradientEndColor, GetGauge().GetOrientation(), GetScale().GetReversed(), 0.0, 0.0);
                        }
                        num2++;
                    }
                }
            }
            return(barStyleAttrib);
        }