示例#1
0
        /// <inheritdoc />
        public bool Equals([AllowNull] RangeSlider other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     BgColor == other.BgColor ||
                     BgColor != null &&
                     BgColor.Equals(other.BgColor)
                     ) &&
                 (
                     BorderColor == other.BorderColor ||
                     BorderColor != null &&
                     BorderColor.Equals(other.BorderColor)
                 ) &&
                 (
                     BorderWidth == other.BorderWidth ||
                     BorderWidth != null &&
                     BorderWidth.Equals(other.BorderWidth)
                 ) &&
                 (
                     AutoRange == other.AutoRange ||
                     AutoRange != null &&
                     AutoRange.Equals(other.AutoRange)
                 ) &&
                 (
                     Equals(Range, other.Range) ||
                     Range != null && other.Range != null &&
                     Range.SequenceEqual(other.Range)
                 ) &&
                 (
                     Thickness == other.Thickness ||
                     Thickness != null &&
                     Thickness.Equals(other.Thickness)
                 ) &&
                 (
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                 ) &&
                 (
                     Equals(YAxis, other.YAxis) ||
                     YAxis != null && other.YAxis != null &&
                     YAxis.SequenceEqual(other.YAxis)
                 ));
        }
        public static Charting.Visuals.Axes.AutoRange FromXfAutoRange(AutoRange xfAutoRange)
        {
            switch (xfAutoRange)
            {
            case AutoRange.Always: return(WpfAutoRange.Always);

            case AutoRange.Once: return(WpfAutoRange.Once);

            case AutoRange.Never: return(WpfAutoRange.Never);

            default:
                throw new NotImplementedException("The AutoRange value " + xfAutoRange.ToString() + " has not been handled");
            }
        }
示例#3
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (BgColor != null)
                {
                    hashCode = hashCode * 59 + BgColor.GetHashCode();
                }

                if (BorderColor != null)
                {
                    hashCode = hashCode * 59 + BorderColor.GetHashCode();
                }

                if (BorderWidth != null)
                {
                    hashCode = hashCode * 59 + BorderWidth.GetHashCode();
                }

                if (AutoRange != null)
                {
                    hashCode = hashCode * 59 + AutoRange.GetHashCode();
                }

                if (Range != null)
                {
                    hashCode = hashCode * 59 + Range.GetHashCode();
                }

                if (Thickness != null)
                {
                    hashCode = hashCode * 59 + Thickness.GetHashCode();
                }

                if (Visible != null)
                {
                    hashCode = hashCode * 59 + Visible.GetHashCode();
                }

                if (YAxis != null)
                {
                    hashCode = hashCode * 59 + YAxis.GetHashCode();
                }

                return(hashCode);
            }
        }
示例#4
0
        public ChartControlViewModelDesign()
        {
            //
            IsAnnotationsVisible   = true;
            IsToZoomXAxisOnly      = false;
            IsAntialiasingEnabled  = true;
            StrokeThickness        = 1;
            SelectedResamplingMode = ResamplingMode.MinMax;
            IsMarkersVisible       = false;

            //
            InitializeCommands();

            //
            DiscreteSeries = new ObservableCollection <IChartSeriesViewModel>();
            AnalogSeries   = new ObservableCollection <IChartSeriesViewModel>();

            DiscreteSeriesAdditionalData = new ObservableCollection <ISeriesAdditionalData>();
            AnalogSeriesAdditionalData   = new ObservableCollection <ISeriesAdditionalData>();

            RpdAnalogSeriesViewModels   = new ObservableCollection <IRpdChartSeriesViewModel>();
            RpdDiscreteSeriesViewModels = new ObservableCollection <IDiscreteChartSeriesViewModel>();


            YAxes = new AxisCollection()
            {
                new NumericAxis()
                {
                    Id            = ChartControlViewModel.MainYAxisId,
                    IsPrimaryAxis = true,
                    AutoRange     = AutoRange.Once,
                    AxisAlignment = AxisAlignment.Left,
                }
            };

            ColorsBrush         = new ObservableCollection <SolidColorBrush>();
            AllThemes           = new string[] { };
            StrokeThicknesses   = new int[] { };
            SharedXVisibleRange = new DateRange(DateTime.Now, DateTime.Now + TimeSpan.FromMinutes(12));
            AutoRange           = new AutoRange();
            BindingTest         = new object();
            ChartModifiers      = new ObservableCollection <IChartModifier>();
            Bookmarks           = new ObservableCollection <ChartBookmarkViewModel>();

            GenerateSampleData();
        }
        private void OnRunExample()
        {
            // Reset all variables
            _reached     = 0;
            MaHighSeries = new XyDataSeries <int, double>();
            MaLowSeries  = new XyDataSeries <int, double>();
            MainSeries   = new XyDataSeries <int, double>();

            _maLow  = new MovingAverage(200);
            _maHigh = new MovingAverage(1000);

            BoundRange = AutoRange.Always;

            _timer           = new Timer(TimerInterval);
            _timer.Elapsed  += OnTick;
            _timer.AutoReset = true;
            _timer.Start();
        }
示例#6
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Visible != null)
         {
             hashCode = hashCode * 59 + Visible.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (AutoTypeNumbers != null)
         {
             hashCode = hashCode * 59 + AutoTypeNumbers.GetHashCode();
         }
         if (AutoRange != null)
         {
             hashCode = hashCode * 59 + AutoRange.GetHashCode();
         }
         if (RangeMode != null)
         {
             hashCode = hashCode * 59 + RangeMode.GetHashCode();
         }
         if (Range != null)
         {
             hashCode = hashCode * 59 + Range.GetHashCode();
         }
         if (CategoryOrder != null)
         {
             hashCode = hashCode * 59 + CategoryOrder.GetHashCode();
         }
         if (CategoryArray != null)
         {
             hashCode = hashCode * 59 + CategoryArray.GetHashCode();
         }
         if (Angle != null)
         {
             hashCode = hashCode * 59 + Angle.GetHashCode();
         }
         if (Side != null)
         {
             hashCode = hashCode * 59 + Side.GetHashCode();
         }
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (HoverFormat != null)
         {
             hashCode = hashCode * 59 + HoverFormat.GetHashCode();
         }
         if (UiRevision != null)
         {
             hashCode = hashCode * 59 + UiRevision.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (ShowLine != null)
         {
             hashCode = hashCode * 59 + ShowLine.GetHashCode();
         }
         if (LineColor != null)
         {
             hashCode = hashCode * 59 + LineColor.GetHashCode();
         }
         if (LineWidth != null)
         {
             hashCode = hashCode * 59 + LineWidth.GetHashCode();
         }
         if (ShowGrid != null)
         {
             hashCode = hashCode * 59 + ShowGrid.GetHashCode();
         }
         if (GridColor != null)
         {
             hashCode = hashCode * 59 + GridColor.GetHashCode();
         }
         if (GridWidth != null)
         {
             hashCode = hashCode * 59 + GridWidth.GetHashCode();
         }
         if (TickMode != null)
         {
             hashCode = hashCode * 59 + TickMode.GetHashCode();
         }
         if (NTicks != null)
         {
             hashCode = hashCode * 59 + NTicks.GetHashCode();
         }
         if (Tick0 != null)
         {
             hashCode = hashCode * 59 + Tick0.GetHashCode();
         }
         if (DTick != null)
         {
             hashCode = hashCode * 59 + DTick.GetHashCode();
         }
         if (TickVals != null)
         {
             hashCode = hashCode * 59 + TickVals.GetHashCode();
         }
         if (TickText != null)
         {
             hashCode = hashCode * 59 + TickText.GetHashCode();
         }
         if (Ticks != null)
         {
             hashCode = hashCode * 59 + Ticks.GetHashCode();
         }
         if (TickLen != null)
         {
             hashCode = hashCode * 59 + TickLen.GetHashCode();
         }
         if (TickWidth != null)
         {
             hashCode = hashCode * 59 + TickWidth.GetHashCode();
         }
         if (TickColor != null)
         {
             hashCode = hashCode * 59 + TickColor.GetHashCode();
         }
         if (ShowTickLabels != null)
         {
             hashCode = hashCode * 59 + ShowTickLabels.GetHashCode();
         }
         if (ShowTickPrefix != null)
         {
             hashCode = hashCode * 59 + ShowTickPrefix.GetHashCode();
         }
         if (TickPrefix != null)
         {
             hashCode = hashCode * 59 + TickPrefix.GetHashCode();
         }
         if (ShowTickSuffix != null)
         {
             hashCode = hashCode * 59 + ShowTickSuffix.GetHashCode();
         }
         if (TickSuffix != null)
         {
             hashCode = hashCode * 59 + TickSuffix.GetHashCode();
         }
         if (ShowExponent != null)
         {
             hashCode = hashCode * 59 + ShowExponent.GetHashCode();
         }
         if (ExponentFormat != null)
         {
             hashCode = hashCode * 59 + ExponentFormat.GetHashCode();
         }
         if (MinExponent != null)
         {
             hashCode = hashCode * 59 + MinExponent.GetHashCode();
         }
         if (SeparateThousands != null)
         {
             hashCode = hashCode * 59 + SeparateThousands.GetHashCode();
         }
         if (TickFont != null)
         {
             hashCode = hashCode * 59 + TickFont.GetHashCode();
         }
         if (TickAngle != null)
         {
             hashCode = hashCode * 59 + TickAngle.GetHashCode();
         }
         if (TickFormat != null)
         {
             hashCode = hashCode * 59 + TickFormat.GetHashCode();
         }
         if (TickFormatStops != null)
         {
             hashCode = hashCode * 59 + TickFormatStops.GetHashCode();
         }
         if (Layer != null)
         {
             hashCode = hashCode * 59 + Layer.GetHashCode();
         }
         if (Calendar != null)
         {
             hashCode = hashCode * 59 + Calendar.GetHashCode();
         }
         if (CategoryArraySrc != null)
         {
             hashCode = hashCode * 59 + CategoryArraySrc.GetHashCode();
         }
         if (TickValsSrc != null)
         {
             hashCode = hashCode * 59 + TickValsSrc.GetHashCode();
         }
         if (TickTextSrc != null)
         {
             hashCode = hashCode * 59 + TickTextSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#7
0
        /// <inheritdoc />
        public bool Equals([AllowNull] RadialAxis other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                     ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     AutoTypeNumbers == other.AutoTypeNumbers ||
                     AutoTypeNumbers != null &&
                     AutoTypeNumbers.Equals(other.AutoTypeNumbers)
                 ) &&
                 (
                     AutoRange == other.AutoRange ||
                     AutoRange != null &&
                     AutoRange.Equals(other.AutoRange)
                 ) &&
                 (
                     RangeMode == other.RangeMode ||
                     RangeMode != null &&
                     RangeMode.Equals(other.RangeMode)
                 ) &&
                 (
                     Equals(Range, other.Range) ||
                     Range != null && other.Range != null &&
                     Range.SequenceEqual(other.Range)
                 ) &&
                 (
                     CategoryOrder == other.CategoryOrder ||
                     CategoryOrder != null &&
                     CategoryOrder.Equals(other.CategoryOrder)
                 ) &&
                 (
                     Equals(CategoryArray, other.CategoryArray) ||
                     CategoryArray != null && other.CategoryArray != null &&
                     CategoryArray.SequenceEqual(other.CategoryArray)
                 ) &&
                 (
                     Angle == other.Angle ||
                     Angle != null &&
                     Angle.Equals(other.Angle)
                 ) &&
                 (
                     Side == other.Side ||
                     Side != null &&
                     Side.Equals(other.Side)
                 ) &&
                 (
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                 ) &&
                 (
                     HoverFormat == other.HoverFormat ||
                     HoverFormat != null &&
                     HoverFormat.Equals(other.HoverFormat)
                 ) &&
                 (
                     UiRevision == other.UiRevision ||
                     UiRevision != null &&
                     UiRevision.Equals(other.UiRevision)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     ShowLine == other.ShowLine ||
                     ShowLine != null &&
                     ShowLine.Equals(other.ShowLine)
                 ) &&
                 (
                     LineColor == other.LineColor ||
                     LineColor != null &&
                     LineColor.Equals(other.LineColor)
                 ) &&
                 (
                     LineWidth == other.LineWidth ||
                     LineWidth != null &&
                     LineWidth.Equals(other.LineWidth)
                 ) &&
                 (
                     ShowGrid == other.ShowGrid ||
                     ShowGrid != null &&
                     ShowGrid.Equals(other.ShowGrid)
                 ) &&
                 (
                     GridColor == other.GridColor ||
                     GridColor != null &&
                     GridColor.Equals(other.GridColor)
                 ) &&
                 (
                     GridWidth == other.GridWidth ||
                     GridWidth != null &&
                     GridWidth.Equals(other.GridWidth)
                 ) &&
                 (
                     TickMode == other.TickMode ||
                     TickMode != null &&
                     TickMode.Equals(other.TickMode)
                 ) &&
                 (
                     NTicks == other.NTicks ||
                     NTicks != null &&
                     NTicks.Equals(other.NTicks)
                 ) &&
                 (
                     Tick0 == other.Tick0 ||
                     Tick0 != null &&
                     Tick0.Equals(other.Tick0)
                 ) &&
                 (
                     DTick == other.DTick ||
                     DTick != null &&
                     DTick.Equals(other.DTick)
                 ) &&
                 (
                     Equals(TickVals, other.TickVals) ||
                     TickVals != null && other.TickVals != null &&
                     TickVals.SequenceEqual(other.TickVals)
                 ) &&
                 (
                     Equals(TickText, other.TickText) ||
                     TickText != null && other.TickText != null &&
                     TickText.SequenceEqual(other.TickText)
                 ) &&
                 (
                     Ticks == other.Ticks ||
                     Ticks != null &&
                     Ticks.Equals(other.Ticks)
                 ) &&
                 (
                     TickLen == other.TickLen ||
                     TickLen != null &&
                     TickLen.Equals(other.TickLen)
                 ) &&
                 (
                     TickWidth == other.TickWidth ||
                     TickWidth != null &&
                     TickWidth.Equals(other.TickWidth)
                 ) &&
                 (
                     TickColor == other.TickColor ||
                     TickColor != null &&
                     TickColor.Equals(other.TickColor)
                 ) &&
                 (
                     ShowTickLabels == other.ShowTickLabels ||
                     ShowTickLabels != null &&
                     ShowTickLabels.Equals(other.ShowTickLabels)
                 ) &&
                 (
                     ShowTickPrefix == other.ShowTickPrefix ||
                     ShowTickPrefix != null &&
                     ShowTickPrefix.Equals(other.ShowTickPrefix)
                 ) &&
                 (
                     TickPrefix == other.TickPrefix ||
                     TickPrefix != null &&
                     TickPrefix.Equals(other.TickPrefix)
                 ) &&
                 (
                     ShowTickSuffix == other.ShowTickSuffix ||
                     ShowTickSuffix != null &&
                     ShowTickSuffix.Equals(other.ShowTickSuffix)
                 ) &&
                 (
                     TickSuffix == other.TickSuffix ||
                     TickSuffix != null &&
                     TickSuffix.Equals(other.TickSuffix)
                 ) &&
                 (
                     ShowExponent == other.ShowExponent ||
                     ShowExponent != null &&
                     ShowExponent.Equals(other.ShowExponent)
                 ) &&
                 (
                     ExponentFormat == other.ExponentFormat ||
                     ExponentFormat != null &&
                     ExponentFormat.Equals(other.ExponentFormat)
                 ) &&
                 (
                     MinExponent == other.MinExponent ||
                     MinExponent != null &&
                     MinExponent.Equals(other.MinExponent)
                 ) &&
                 (
                     SeparateThousands == other.SeparateThousands ||
                     SeparateThousands != null &&
                     SeparateThousands.Equals(other.SeparateThousands)
                 ) &&
                 (
                     TickFont == other.TickFont ||
                     TickFont != null &&
                     TickFont.Equals(other.TickFont)
                 ) &&
                 (
                     TickAngle == other.TickAngle ||
                     TickAngle != null &&
                     TickAngle.Equals(other.TickAngle)
                 ) &&
                 (
                     TickFormat == other.TickFormat ||
                     TickFormat != null &&
                     TickFormat.Equals(other.TickFormat)
                 ) &&
                 (
                     Equals(TickFormatStops, other.TickFormatStops) ||
                     TickFormatStops != null && other.TickFormatStops != null &&
                     TickFormatStops.SequenceEqual(other.TickFormatStops)
                 ) &&
                 (
                     Layer == other.Layer ||
                     Layer != null &&
                     Layer.Equals(other.Layer)
                 ) &&
                 (
                     Calendar == other.Calendar ||
                     Calendar != null &&
                     Calendar.Equals(other.Calendar)
                 ) &&
                 (
                     CategoryArraySrc == other.CategoryArraySrc ||
                     CategoryArraySrc != null &&
                     CategoryArraySrc.Equals(other.CategoryArraySrc)
                 ) &&
                 (
                     TickValsSrc == other.TickValsSrc ||
                     TickValsSrc != null &&
                     TickValsSrc.Equals(other.TickValsSrc)
                 ) &&
                 (
                     TickTextSrc == other.TickTextSrc ||
                     TickTextSrc != null &&
                     TickTextSrc.Equals(other.TickTextSrc)
                 ));
        }
示例#8
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Visible != null)
                {
                    hashCode = hashCode * 59 + Visible.GetHashCode();
                }

                if (ShowSpikes != null)
                {
                    hashCode = hashCode * 59 + ShowSpikes.GetHashCode();
                }

                if (SpikeSides != null)
                {
                    hashCode = hashCode * 59 + SpikeSides.GetHashCode();
                }

                if (SpikeThickness != null)
                {
                    hashCode = hashCode * 59 + SpikeThickness.GetHashCode();
                }

                if (SpikeColor != null)
                {
                    hashCode = hashCode * 59 + SpikeColor.GetHashCode();
                }

                if (ShowBackground != null)
                {
                    hashCode = hashCode * 59 + ShowBackground.GetHashCode();
                }

                if (BackgroundColor != null)
                {
                    hashCode = hashCode * 59 + BackgroundColor.GetHashCode();
                }

                if (ShowAxesLabels != null)
                {
                    hashCode = hashCode * 59 + ShowAxesLabels.GetHashCode();
                }

                if (Color != null)
                {
                    hashCode = hashCode * 59 + Color.GetHashCode();
                }

                if (CategoryOrder != null)
                {
                    hashCode = hashCode * 59 + CategoryOrder.GetHashCode();
                }

                if (CategoryArray != null)
                {
                    hashCode = hashCode * 59 + CategoryArray.GetHashCode();
                }

                if (Title != null)
                {
                    hashCode = hashCode * 59 + Title.GetHashCode();
                }

                if (Type != null)
                {
                    hashCode = hashCode * 59 + Type.GetHashCode();
                }

                if (AutoRange != null)
                {
                    hashCode = hashCode * 59 + AutoRange.GetHashCode();
                }

                if (RangeMode != null)
                {
                    hashCode = hashCode * 59 + RangeMode.GetHashCode();
                }

                if (Range != null)
                {
                    hashCode = hashCode * 59 + Range.GetHashCode();
                }

                if (TickMode != null)
                {
                    hashCode = hashCode * 59 + TickMode.GetHashCode();
                }

                if (NTicks != null)
                {
                    hashCode = hashCode * 59 + NTicks.GetHashCode();
                }

                if (Tick0 != null)
                {
                    hashCode = hashCode * 59 + Tick0.GetHashCode();
                }

                if (DTick != null)
                {
                    hashCode = hashCode * 59 + DTick.GetHashCode();
                }

                if (TickVals != null)
                {
                    hashCode = hashCode * 59 + TickVals.GetHashCode();
                }

                if (TickText != null)
                {
                    hashCode = hashCode * 59 + TickText.GetHashCode();
                }

                if (Ticks != null)
                {
                    hashCode = hashCode * 59 + Ticks.GetHashCode();
                }

                if (Mirror != null)
                {
                    hashCode = hashCode * 59 + Mirror.GetHashCode();
                }

                if (TickleN != null)
                {
                    hashCode = hashCode * 59 + TickleN.GetHashCode();
                }

                if (TickWidth != null)
                {
                    hashCode = hashCode * 59 + TickWidth.GetHashCode();
                }

                if (TickColor != null)
                {
                    hashCode = hashCode * 59 + TickColor.GetHashCode();
                }

                if (ShowTickLabels != null)
                {
                    hashCode = hashCode * 59 + ShowTickLabels.GetHashCode();
                }

                if (TickFont != null)
                {
                    hashCode = hashCode * 59 + TickFont.GetHashCode();
                }

                if (TickAngle != null)
                {
                    hashCode = hashCode * 59 + TickAngle.GetHashCode();
                }

                if (TickPrefix != null)
                {
                    hashCode = hashCode * 59 + TickPrefix.GetHashCode();
                }

                if (ShowTickPrefix != null)
                {
                    hashCode = hashCode * 59 + ShowTickPrefix.GetHashCode();
                }

                if (TickSuffix != null)
                {
                    hashCode = hashCode * 59 + TickSuffix.GetHashCode();
                }

                if (ShowTickSuffix != null)
                {
                    hashCode = hashCode * 59 + ShowTickSuffix.GetHashCode();
                }

                if (ShowExponent != null)
                {
                    hashCode = hashCode * 59 + ShowExponent.GetHashCode();
                }

                if (ExponentFormat != null)
                {
                    hashCode = hashCode * 59 + ExponentFormat.GetHashCode();
                }

                if (SeparateThousands != null)
                {
                    hashCode = hashCode * 59 + SeparateThousands.GetHashCode();
                }

                if (TickFormat != null)
                {
                    hashCode = hashCode * 59 + TickFormat.GetHashCode();
                }

                if (TickFormatStops != null)
                {
                    hashCode = hashCode * 59 + TickFormatStops.GetHashCode();
                }

                if (HoverFormat != null)
                {
                    hashCode = hashCode * 59 + HoverFormat.GetHashCode();
                }

                if (ShowLine != null)
                {
                    hashCode = hashCode * 59 + ShowLine.GetHashCode();
                }

                if (LineColor != null)
                {
                    hashCode = hashCode * 59 + LineColor.GetHashCode();
                }

                if (LineWidth != null)
                {
                    hashCode = hashCode * 59 + LineWidth.GetHashCode();
                }

                if (ShowGrid != null)
                {
                    hashCode = hashCode * 59 + ShowGrid.GetHashCode();
                }

                if (GridColor != null)
                {
                    hashCode = hashCode * 59 + GridColor.GetHashCode();
                }

                if (GridWidth != null)
                {
                    hashCode = hashCode * 59 + GridWidth.GetHashCode();
                }

                if (ZeroLine != null)
                {
                    hashCode = hashCode * 59 + ZeroLine.GetHashCode();
                }

                if (ZeroLineColor != null)
                {
                    hashCode = hashCode * 59 + ZeroLineColor.GetHashCode();
                }

                if (ZeroLineWidth != null)
                {
                    hashCode = hashCode * 59 + ZeroLineWidth.GetHashCode();
                }

                if (Calendar != null)
                {
                    hashCode = hashCode * 59 + Calendar.GetHashCode();
                }

                if (CategoryArraySrc != null)
                {
                    hashCode = hashCode * 59 + CategoryArraySrc.GetHashCode();
                }

                if (TickValsSrc != null)
                {
                    hashCode = hashCode * 59 + TickValsSrc.GetHashCode();
                }

                if (TickTextSrc != null)
                {
                    hashCode = hashCode * 59 + TickTextSrc.GetHashCode();
                }

                return(hashCode);
            }
        }
示例#9
0
        public bool Equals([AllowNull] XAxis other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (ShowSpikes == other.ShowSpikes && ShowSpikes != null && other.ShowSpikes != null && ShowSpikes.Equals(other.ShowSpikes)) &&
                   (SpikeSides == other.SpikeSides && SpikeSides != null && other.SpikeSides != null && SpikeSides.Equals(other.SpikeSides)) &&
                   (SpikeThickness == other.SpikeThickness && SpikeThickness != null && other.SpikeThickness != null && SpikeThickness.Equals(other.SpikeThickness)) &&
                   (SpikeColor == other.SpikeColor && SpikeColor != null && other.SpikeColor != null && SpikeColor.Equals(other.SpikeColor)) &&
                   (ShowBackground == other.ShowBackground && ShowBackground != null && other.ShowBackground != null && ShowBackground.Equals(other.ShowBackground)) &&
                   (BackgroundColor == other.BackgroundColor && BackgroundColor != null && other.BackgroundColor != null && BackgroundColor.Equals(other.BackgroundColor)) &&
                   (ShowAxesLabels == other.ShowAxesLabels && ShowAxesLabels != null && other.ShowAxesLabels != null && ShowAxesLabels.Equals(other.ShowAxesLabels)) &&
                   (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) &&
                   (CategoryOrder == other.CategoryOrder && CategoryOrder != null && other.CategoryOrder != null && CategoryOrder.Equals(other.CategoryOrder)) &&
                   (Equals(CategoryArray, other.CategoryArray) || CategoryArray != null && other.CategoryArray != null && CategoryArray.SequenceEqual(other.CategoryArray)) &&
                   (Title == other.Title && Title != null && other.Title != null && Title.Equals(other.Title)) &&
                   (Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (AutoRange == other.AutoRange && AutoRange != null && other.AutoRange != null && AutoRange.Equals(other.AutoRange)) &&
                   (RangeMode == other.RangeMode && RangeMode != null && other.RangeMode != null && RangeMode.Equals(other.RangeMode)) &&
                   (Equals(Range, other.Range) || Range != null && other.Range != null && Range.SequenceEqual(other.Range)) &&
                   (TickMode == other.TickMode && TickMode != null && other.TickMode != null && TickMode.Equals(other.TickMode)) &&
                   (NTicks == other.NTicks && NTicks != null && other.NTicks != null && NTicks.Equals(other.NTicks)) &&
                   (Tick0 == other.Tick0 && Tick0 != null && other.Tick0 != null && Tick0.Equals(other.Tick0)) &&
                   (DTick == other.DTick && DTick != null && other.DTick != null && DTick.Equals(other.DTick)) &&
                   (Equals(TickVals, other.TickVals) || TickVals != null && other.TickVals != null && TickVals.SequenceEqual(other.TickVals)) &&
                   (Equals(TickText, other.TickText) || TickText != null && other.TickText != null && TickText.SequenceEqual(other.TickText)) &&
                   (Ticks == other.Ticks && Ticks != null && other.Ticks != null && Ticks.Equals(other.Ticks)) &&
                   (Mirror == other.Mirror && Mirror != null && other.Mirror != null && Mirror.Equals(other.Mirror)) &&
                   (TickleN == other.TickleN && TickleN != null && other.TickleN != null && TickleN.Equals(other.TickleN)) &&
                   (TickWidth == other.TickWidth && TickWidth != null && other.TickWidth != null && TickWidth.Equals(other.TickWidth)) &&
                   (TickColor == other.TickColor && TickColor != null && other.TickColor != null && TickColor.Equals(other.TickColor)) &&
                   (ShowTickLabels == other.ShowTickLabels && ShowTickLabels != null && other.ShowTickLabels != null && ShowTickLabels.Equals(other.ShowTickLabels)) &&
                   (TickFont == other.TickFont && TickFont != null && other.TickFont != null && TickFont.Equals(other.TickFont)) &&
                   (TickAngle == other.TickAngle && TickAngle != null && other.TickAngle != null && TickAngle.Equals(other.TickAngle)) &&
                   (TickPrefix == other.TickPrefix && TickPrefix != null && other.TickPrefix != null && TickPrefix.Equals(other.TickPrefix)) &&
                   (ShowTickPrefix == other.ShowTickPrefix && ShowTickPrefix != null && other.ShowTickPrefix != null && ShowTickPrefix.Equals(other.ShowTickPrefix)) &&
                   (TickSuffix == other.TickSuffix && TickSuffix != null && other.TickSuffix != null && TickSuffix.Equals(other.TickSuffix)) &&
                   (ShowTickSuffix == other.ShowTickSuffix && ShowTickSuffix != null && other.ShowTickSuffix != null && ShowTickSuffix.Equals(other.ShowTickSuffix)) &&
                   (ShowExponent == other.ShowExponent && ShowExponent != null && other.ShowExponent != null && ShowExponent.Equals(other.ShowExponent)) &&
                   (ExponentFormat == other.ExponentFormat && ExponentFormat != null && other.ExponentFormat != null && ExponentFormat.Equals(other.ExponentFormat)) &&
                   (SeparateThousands == other.SeparateThousands && SeparateThousands != null && other.SeparateThousands != null && SeparateThousands.Equals(other.SeparateThousands)) &&
                   (TickFormat == other.TickFormat && TickFormat != null && other.TickFormat != null && TickFormat.Equals(other.TickFormat)) &&
                   (Equals(TickFormatStops, other.TickFormatStops) || TickFormatStops != null && other.TickFormatStops != null && TickFormatStops.SequenceEqual(other.TickFormatStops)) &&
                   (HoverFormat == other.HoverFormat && HoverFormat != null && other.HoverFormat != null && HoverFormat.Equals(other.HoverFormat)) &&
                   (ShowLine == other.ShowLine && ShowLine != null && other.ShowLine != null && ShowLine.Equals(other.ShowLine)) &&
                   (LineColor == other.LineColor && LineColor != null && other.LineColor != null && LineColor.Equals(other.LineColor)) &&
                   (LineWidth == other.LineWidth && LineWidth != null && other.LineWidth != null && LineWidth.Equals(other.LineWidth)) &&
                   (ShowGrid == other.ShowGrid && ShowGrid != null && other.ShowGrid != null && ShowGrid.Equals(other.ShowGrid)) &&
                   (GridColor == other.GridColor && GridColor != null && other.GridColor != null && GridColor.Equals(other.GridColor)) &&
                   (GridWidth == other.GridWidth && GridWidth != null && other.GridWidth != null && GridWidth.Equals(other.GridWidth)) &&
                   (ZeroLine == other.ZeroLine && ZeroLine != null && other.ZeroLine != null && ZeroLine.Equals(other.ZeroLine)) &&
                   (ZeroLineColor == other.ZeroLineColor && ZeroLineColor != null && other.ZeroLineColor != null && ZeroLineColor.Equals(other.ZeroLineColor)) &&
                   (ZeroLineWidth == other.ZeroLineWidth && ZeroLineWidth != null && other.ZeroLineWidth != null && ZeroLineWidth.Equals(other.ZeroLineWidth)) &&
                   (Calendar == other.Calendar && Calendar != null && other.Calendar != null && Calendar.Equals(other.Calendar)) &&
                   (CategoryArraySrc == other.CategoryArraySrc && CategoryArraySrc != null && other.CategoryArraySrc != null && CategoryArraySrc.Equals(other.CategoryArraySrc)) &&
                   (TickValsSrc == other.TickValsSrc && TickValsSrc != null && other.TickValsSrc != null && TickValsSrc.Equals(other.TickValsSrc)) &&
                   (TickTextSrc == other.TickTextSrc && TickTextSrc != null && other.TickTextSrc != null && TickTextSrc.Equals(other.TickTextSrc)));
        }
示例#10
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (Smoothing != null)
         {
             hashCode = hashCode * 59 + Smoothing.GetHashCode();
         }
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (AutoTypeNumbers != null)
         {
             hashCode = hashCode * 59 + AutoTypeNumbers.GetHashCode();
         }
         if (AutoRange != null)
         {
             hashCode = hashCode * 59 + AutoRange.GetHashCode();
         }
         if (RangeMode != null)
         {
             hashCode = hashCode * 59 + RangeMode.GetHashCode();
         }
         if (Range != null)
         {
             hashCode = hashCode * 59 + Range.GetHashCode();
         }
         if (FixedRange != null)
         {
             hashCode = hashCode * 59 + FixedRange.GetHashCode();
         }
         if (CheaterType != null)
         {
             hashCode = hashCode * 59 + CheaterType.GetHashCode();
         }
         if (TickMode != null)
         {
             hashCode = hashCode * 59 + TickMode.GetHashCode();
         }
         if (NTicks != null)
         {
             hashCode = hashCode * 59 + NTicks.GetHashCode();
         }
         if (TickVals != null)
         {
             hashCode = hashCode * 59 + TickVals.GetHashCode();
         }
         if (TickText != null)
         {
             hashCode = hashCode * 59 + TickText.GetHashCode();
         }
         if (ShowTickLabels != null)
         {
             hashCode = hashCode * 59 + ShowTickLabels.GetHashCode();
         }
         if (TickFont != null)
         {
             hashCode = hashCode * 59 + TickFont.GetHashCode();
         }
         if (TickAngle != null)
         {
             hashCode = hashCode * 59 + TickAngle.GetHashCode();
         }
         if (TickPrefix != null)
         {
             hashCode = hashCode * 59 + TickPrefix.GetHashCode();
         }
         if (ShowTickPrefix != null)
         {
             hashCode = hashCode * 59 + ShowTickPrefix.GetHashCode();
         }
         if (TickSuffix != null)
         {
             hashCode = hashCode * 59 + TickSuffix.GetHashCode();
         }
         if (ShowTickSuffix != null)
         {
             hashCode = hashCode * 59 + ShowTickSuffix.GetHashCode();
         }
         if (ShowExponent != null)
         {
             hashCode = hashCode * 59 + ShowExponent.GetHashCode();
         }
         if (ExponentFormat != null)
         {
             hashCode = hashCode * 59 + ExponentFormat.GetHashCode();
         }
         if (MinExponent != null)
         {
             hashCode = hashCode * 59 + MinExponent.GetHashCode();
         }
         if (SeparateThousands != null)
         {
             hashCode = hashCode * 59 + SeparateThousands.GetHashCode();
         }
         if (TickFormat != null)
         {
             hashCode = hashCode * 59 + TickFormat.GetHashCode();
         }
         if (TickFormatStops != null)
         {
             hashCode = hashCode * 59 + TickFormatStops.GetHashCode();
         }
         if (CategoryOrder != null)
         {
             hashCode = hashCode * 59 + CategoryOrder.GetHashCode();
         }
         if (CategoryArray != null)
         {
             hashCode = hashCode * 59 + CategoryArray.GetHashCode();
         }
         if (LabelPadding != null)
         {
             hashCode = hashCode * 59 + LabelPadding.GetHashCode();
         }
         if (LabelPrefix != null)
         {
             hashCode = hashCode * 59 + LabelPrefix.GetHashCode();
         }
         if (LabelSuffix != null)
         {
             hashCode = hashCode * 59 + LabelSuffix.GetHashCode();
         }
         if (ShowLine != null)
         {
             hashCode = hashCode * 59 + ShowLine.GetHashCode();
         }
         if (LineColor != null)
         {
             hashCode = hashCode * 59 + LineColor.GetHashCode();
         }
         if (LineWidth != null)
         {
             hashCode = hashCode * 59 + LineWidth.GetHashCode();
         }
         if (GridColor != null)
         {
             hashCode = hashCode * 59 + GridColor.GetHashCode();
         }
         if (GridWidth != null)
         {
             hashCode = hashCode * 59 + GridWidth.GetHashCode();
         }
         if (ShowGrid != null)
         {
             hashCode = hashCode * 59 + ShowGrid.GetHashCode();
         }
         if (MinorGridCount != null)
         {
             hashCode = hashCode * 59 + MinorGridCount.GetHashCode();
         }
         if (MinorGridWidth != null)
         {
             hashCode = hashCode * 59 + MinorGridWidth.GetHashCode();
         }
         if (MinorGridColor != null)
         {
             hashCode = hashCode * 59 + MinorGridColor.GetHashCode();
         }
         if (StartLine != null)
         {
             hashCode = hashCode * 59 + StartLine.GetHashCode();
         }
         if (StartLineColor != null)
         {
             hashCode = hashCode * 59 + StartLineColor.GetHashCode();
         }
         if (StartLineWidth != null)
         {
             hashCode = hashCode * 59 + StartLineWidth.GetHashCode();
         }
         if (EndLine != null)
         {
             hashCode = hashCode * 59 + EndLine.GetHashCode();
         }
         if (EndlineWidth != null)
         {
             hashCode = hashCode * 59 + EndlineWidth.GetHashCode();
         }
         if (EndlineColor != null)
         {
             hashCode = hashCode * 59 + EndlineColor.GetHashCode();
         }
         if (Tick0 != null)
         {
             hashCode = hashCode * 59 + Tick0.GetHashCode();
         }
         if (DTick != null)
         {
             hashCode = hashCode * 59 + DTick.GetHashCode();
         }
         if (ArrayTick0 != null)
         {
             hashCode = hashCode * 59 + ArrayTick0.GetHashCode();
         }
         if (ArrayDTick != null)
         {
             hashCode = hashCode * 59 + ArrayDTick.GetHashCode();
         }
         if (TickValsSrc != null)
         {
             hashCode = hashCode * 59 + TickValsSrc.GetHashCode();
         }
         if (TickTextSrc != null)
         {
             hashCode = hashCode * 59 + TickTextSrc.GetHashCode();
         }
         if (CategoryArraySrc != null)
         {
             hashCode = hashCode * 59 + CategoryArraySrc.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#11
0
        /// <inheritdoc />
        public bool Equals([AllowNull] AAxis other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                     ) &&
                 (
                     Smoothing == other.Smoothing ||
                     Smoothing != null &&
                     Smoothing.Equals(other.Smoothing)
                 ) &&
                 (
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     AutoTypeNumbers == other.AutoTypeNumbers ||
                     AutoTypeNumbers != null &&
                     AutoTypeNumbers.Equals(other.AutoTypeNumbers)
                 ) &&
                 (
                     AutoRange == other.AutoRange ||
                     AutoRange != null &&
                     AutoRange.Equals(other.AutoRange)
                 ) &&
                 (
                     RangeMode == other.RangeMode ||
                     RangeMode != null &&
                     RangeMode.Equals(other.RangeMode)
                 ) &&
                 (
                     Equals(Range, other.Range) ||
                     Range != null && other.Range != null &&
                     Range.SequenceEqual(other.Range)
                 ) &&
                 (
                     FixedRange == other.FixedRange ||
                     FixedRange != null &&
                     FixedRange.Equals(other.FixedRange)
                 ) &&
                 (
                     CheaterType == other.CheaterType ||
                     CheaterType != null &&
                     CheaterType.Equals(other.CheaterType)
                 ) &&
                 (
                     TickMode == other.TickMode ||
                     TickMode != null &&
                     TickMode.Equals(other.TickMode)
                 ) &&
                 (
                     NTicks == other.NTicks ||
                     NTicks != null &&
                     NTicks.Equals(other.NTicks)
                 ) &&
                 (
                     Equals(TickVals, other.TickVals) ||
                     TickVals != null && other.TickVals != null &&
                     TickVals.SequenceEqual(other.TickVals)
                 ) &&
                 (
                     Equals(TickText, other.TickText) ||
                     TickText != null && other.TickText != null &&
                     TickText.SequenceEqual(other.TickText)
                 ) &&
                 (
                     ShowTickLabels == other.ShowTickLabels ||
                     ShowTickLabels != null &&
                     ShowTickLabels.Equals(other.ShowTickLabels)
                 ) &&
                 (
                     TickFont == other.TickFont ||
                     TickFont != null &&
                     TickFont.Equals(other.TickFont)
                 ) &&
                 (
                     TickAngle == other.TickAngle ||
                     TickAngle != null &&
                     TickAngle.Equals(other.TickAngle)
                 ) &&
                 (
                     TickPrefix == other.TickPrefix ||
                     TickPrefix != null &&
                     TickPrefix.Equals(other.TickPrefix)
                 ) &&
                 (
                     ShowTickPrefix == other.ShowTickPrefix ||
                     ShowTickPrefix != null &&
                     ShowTickPrefix.Equals(other.ShowTickPrefix)
                 ) &&
                 (
                     TickSuffix == other.TickSuffix ||
                     TickSuffix != null &&
                     TickSuffix.Equals(other.TickSuffix)
                 ) &&
                 (
                     ShowTickSuffix == other.ShowTickSuffix ||
                     ShowTickSuffix != null &&
                     ShowTickSuffix.Equals(other.ShowTickSuffix)
                 ) &&
                 (
                     ShowExponent == other.ShowExponent ||
                     ShowExponent != null &&
                     ShowExponent.Equals(other.ShowExponent)
                 ) &&
                 (
                     ExponentFormat == other.ExponentFormat ||
                     ExponentFormat != null &&
                     ExponentFormat.Equals(other.ExponentFormat)
                 ) &&
                 (
                     MinExponent == other.MinExponent ||
                     MinExponent != null &&
                     MinExponent.Equals(other.MinExponent)
                 ) &&
                 (
                     SeparateThousands == other.SeparateThousands ||
                     SeparateThousands != null &&
                     SeparateThousands.Equals(other.SeparateThousands)
                 ) &&
                 (
                     TickFormat == other.TickFormat ||
                     TickFormat != null &&
                     TickFormat.Equals(other.TickFormat)
                 ) &&
                 (
                     Equals(TickFormatStops, other.TickFormatStops) ||
                     TickFormatStops != null && other.TickFormatStops != null &&
                     TickFormatStops.SequenceEqual(other.TickFormatStops)
                 ) &&
                 (
                     CategoryOrder == other.CategoryOrder ||
                     CategoryOrder != null &&
                     CategoryOrder.Equals(other.CategoryOrder)
                 ) &&
                 (
                     Equals(CategoryArray, other.CategoryArray) ||
                     CategoryArray != null && other.CategoryArray != null &&
                     CategoryArray.SequenceEqual(other.CategoryArray)
                 ) &&
                 (
                     LabelPadding == other.LabelPadding ||
                     LabelPadding != null &&
                     LabelPadding.Equals(other.LabelPadding)
                 ) &&
                 (
                     LabelPrefix == other.LabelPrefix ||
                     LabelPrefix != null &&
                     LabelPrefix.Equals(other.LabelPrefix)
                 ) &&
                 (
                     LabelSuffix == other.LabelSuffix ||
                     LabelSuffix != null &&
                     LabelSuffix.Equals(other.LabelSuffix)
                 ) &&
                 (
                     ShowLine == other.ShowLine ||
                     ShowLine != null &&
                     ShowLine.Equals(other.ShowLine)
                 ) &&
                 (
                     LineColor == other.LineColor ||
                     LineColor != null &&
                     LineColor.Equals(other.LineColor)
                 ) &&
                 (
                     LineWidth == other.LineWidth ||
                     LineWidth != null &&
                     LineWidth.Equals(other.LineWidth)
                 ) &&
                 (
                     GridColor == other.GridColor ||
                     GridColor != null &&
                     GridColor.Equals(other.GridColor)
                 ) &&
                 (
                     GridWidth == other.GridWidth ||
                     GridWidth != null &&
                     GridWidth.Equals(other.GridWidth)
                 ) &&
                 (
                     ShowGrid == other.ShowGrid ||
                     ShowGrid != null &&
                     ShowGrid.Equals(other.ShowGrid)
                 ) &&
                 (
                     MinorGridCount == other.MinorGridCount ||
                     MinorGridCount != null &&
                     MinorGridCount.Equals(other.MinorGridCount)
                 ) &&
                 (
                     MinorGridWidth == other.MinorGridWidth ||
                     MinorGridWidth != null &&
                     MinorGridWidth.Equals(other.MinorGridWidth)
                 ) &&
                 (
                     MinorGridColor == other.MinorGridColor ||
                     MinorGridColor != null &&
                     MinorGridColor.Equals(other.MinorGridColor)
                 ) &&
                 (
                     StartLine == other.StartLine ||
                     StartLine != null &&
                     StartLine.Equals(other.StartLine)
                 ) &&
                 (
                     StartLineColor == other.StartLineColor ||
                     StartLineColor != null &&
                     StartLineColor.Equals(other.StartLineColor)
                 ) &&
                 (
                     StartLineWidth == other.StartLineWidth ||
                     StartLineWidth != null &&
                     StartLineWidth.Equals(other.StartLineWidth)
                 ) &&
                 (
                     EndLine == other.EndLine ||
                     EndLine != null &&
                     EndLine.Equals(other.EndLine)
                 ) &&
                 (
                     EndlineWidth == other.EndlineWidth ||
                     EndlineWidth != null &&
                     EndlineWidth.Equals(other.EndlineWidth)
                 ) &&
                 (
                     EndlineColor == other.EndlineColor ||
                     EndlineColor != null &&
                     EndlineColor.Equals(other.EndlineColor)
                 ) &&
                 (
                     Tick0 == other.Tick0 ||
                     Tick0 != null &&
                     Tick0.Equals(other.Tick0)
                 ) &&
                 (
                     DTick == other.DTick ||
                     DTick != null &&
                     DTick.Equals(other.DTick)
                 ) &&
                 (
                     ArrayTick0 == other.ArrayTick0 ||
                     ArrayTick0 != null &&
                     ArrayTick0.Equals(other.ArrayTick0)
                 ) &&
                 (
                     ArrayDTick == other.ArrayDTick ||
                     ArrayDTick != null &&
                     ArrayDTick.Equals(other.ArrayDTick)
                 ) &&
                 (
                     TickValsSrc == other.TickValsSrc ||
                     TickValsSrc != null &&
                     TickValsSrc.Equals(other.TickValsSrc)
                 ) &&
                 (
                     TickTextSrc == other.TickTextSrc ||
                     TickTextSrc != null &&
                     TickTextSrc.Equals(other.TickTextSrc)
                 ) &&
                 (
                     CategoryArraySrc == other.CategoryArraySrc ||
                     CategoryArraySrc != null &&
                     CategoryArraySrc.Equals(other.CategoryArraySrc)
                 ));
        }
        private void DataAppendLoop()
        {
            // if timer was released in another thread - skip all further processing
            if (_timer == null)
            {
                return;
            }

            // By nesting multiple updates inside a SuspendUpdates using block, you get one redraw at the end
            using (_mainSeries.SuspendUpdates())
            {
                // Preload previous value with k-1 sample, or 0.0 if the count is zero
                int    xValue = _mainSeries.Count > 0 ? _mainSeries.XValues[_mainSeries.Count - 1] : 0;
                double yValue = _mainSeries.Count > 0 ? _mainSeries.YValues[_mainSeries.Count - 1] : 10.0f;

                // Add N points at a time. We want to get to the higher point counts
                // quickly to demonstrate performance.
                // Also, it is more efficient to buffer and block update the chart
                // even if you use SuspendUpdates due to the overhead of calculating min, max
                // for a series
                for (int i = 0; i < BufferSize; i++)
                {
                    // Generate a new X,Y value in the random walk and buffer
                    xValue = xValue + 1;
                    yValue = (double)(yValue + (_random.NextDouble() - 0.5));

                    _xBuffer[i] = xValue;
                    _yBuffer[i] = yValue;

                    // Update moving averages
                    _maLowBuffer[i]  = (double)_maLow.Push(yValue).Current;
                    _maHighBuffer[i] = (double)_maHigh.Push(yValue).Current;
                }

                // Append block of values to all three series
                _mainSeries.Append(_xBuffer, _yBuffer);
                _maLowSeries.Append(_xBuffer, _maLowBuffer);
                _maHighSeries.Append(_xBuffer, _maHighBuffer);
            }

            // Render the total point count (all series) to the screen
            int numPoints = 3 * _mainSeries.Count;

            if (numPoints > 10000 && _reached < 10000)
            {
                _reached = 10000;
            }

            if (numPoints > 100000 && _reached < 100000)
            {
                _reached = 100000;
            }

            if (numPoints > 300000 && _reached < 300000)
            {
                _reached = 300000;
            }

            if (numPoints > 500000 && _reached < 500000)
            {
                _reached = 500000;
            }

            if (numPoints > 1000000 && _reached < 1000000)
            {
                _reached = 1000000;
            }

            if (numPoints > 3000000 && _reached < 3000000)
            {
                Messages.Add("Reached 3,000,000 Points!");
                _reached = 3000000;
            }

            if (numPoints > 5000000 && _reached < 5000000)
            {
                Messages.Add("Reached 5,000,000 Points!");
                _reached = 5000000;
            }

            if (numPoints > MaxCount)
            {
                Messages.Add("Reached 10M points!");
                Messages.Add(".. and I'm still going!");
                _timer.Stop();
                _timer     = null;
                BoundRange = AutoRange.Never;

                this.ShowInstructionsToUser();
            }
        }
 public static SCIAutoRange FromXfAutoRange(AutoRange value)
 {
     throw new NotImplementedException();
 }
        private void InitializeAxes()
        {
            try
            {
                System.Windows.Application.Current.Dispatcher.Invoke((Action) delegate
                {
                    AutoRange _xAutorange = AutoRange.Never;
                    lock (_lockAxes)
                    {
                        _xAxisLog = new LogarithmicNumericAxis
                        {
                            TextFormatting     = "#0#",
                            ScientificNotation = ScientificNotation.Normalized,
                            VisibleRange       = _xAxisDoubleRange,
                            GrowBy             = new DoubleRange(0.1, 0.1),
                            DrawMajorBands     = false,
                            AutoRange          = _xAutorange,
                            DrawMinorGridLines = true,
                            DrawMajorTicks     = true,
                            DrawMinorTicks     = true,
                            StrokeThickness    = 1,
                            LogarithmicBase    = 10.0,
                            FontSize           = 5
                        };
                        XAxis1    = _xAxisLog;
                        _xAxisLog = new LogarithmicNumericAxis
                        {
                            TextFormatting     = "#0#",
                            ScientificNotation = ScientificNotation.Normalized,
                            VisibleRange       = _xAxisDoubleRange,
                            GrowBy             = new DoubleRange(0.1, 0.1),
                            DrawMajorBands     = false,
                            AutoRange          = _xAutorange,
                            DrawMinorGridLines = true,
                            DrawMajorTicks     = true,
                            DrawMinorTicks     = true,
                            StrokeThickness    = 1,
                            LogarithmicBase    = 10.0,
                            FontSize           = 5
                        };
                        XAxis2            = _xAxisLog;
                        MagVisibleRange   = _magVisibleRange;
                        PhaseVisibleRange = _phaseVisibleRange;
                    }
                });
            }
            catch { }
#if Yaxes
            NumericAxis Y1 = new NumericAxis()
            {
                Id                   = "Y1_Magnitude",
                TextFormatting       = "0.00",
                ScientificNotation   = ScientificNotation.Normalized,
                AxisAlignment        = AxisAlignment.Left,
                GrowBy               = new DoubleRange(0.2, 0.2),
                VisibleRange         = new DoubleRange(-50, 20),
                AnimatedVisibleRange = new DoubleRange(-50, 20),
                AxisTitle            = "Magnitude (dB)",
                TickTextBrush        = new SolidColorBrush(Colors.White),
                DrawMajorBands       = false,
                DrawMinorGridLines   = false,
                DrawMajorTicks       = false,
                DrawMinorTicks       = false,
                StrokeThickness      = 1
            };
            NumericAxis Y2 = new NumericAxis()
            {
                Id                   = "Y2_Phase",
                TextFormatting       = "0.00",
                ScientificNotation   = ScientificNotation.Normalized,
                AxisAlignment        = AxisAlignment.Right,
                GrowBy               = new DoubleRange(0.2, 0.2),
                VisibleRange         = new DoubleRange(-200, 200),
                AutoRange            = AutoRange.Always,
                AnimatedVisibleRange = new DoubleRange(-200, 200),
                AxisTitle            = "Phase (Degree)",
                TickTextBrush        = new SolidColorBrush(Colors.White),
                DrawMajorBands       = false,
                DrawMinorGridLines   = false,
                DrawMajorTicks       = false,
                DrawMinorTicks       = false,
                StrokeThickness      = 1
            };
            //ChartYAxes.Add(new NumericAxis() {
            //Id = "DefaultAxisId",
            //Visibility = Visibility.Hidden
            //});
            //ChartYAxes.Add(Y1);
            //ChartYAxes.Add(Y2);
#endif
        }