Exemple #1
0
        public void AddPoint(GraphPoint point)
        {
            lock (_lockObject)
            {
                _samples.Add(point);

                // Updating Y range
                if (_samples.Count == 0)
                {
                    projection.UpdateAutoscrollFromMeasurement(point.Y);
                    _yMin = point.Y;
                    _yMax = point.Y;
                    return;
                }

                if (point.Y < Projection.YMin)
                {
                    _yMin = point.Y;
                    projection.UpdateAutoscrollFromMeasurement(_yMin);
                }
                else if (point.Y > Projection.YMax)
                {
                    _yMax = point.Y;
                    projection.UpdateAutoscrollFromMeasurement(_yMax);
                }
            }
        }
Exemple #2
0
        public void AddPoint(GraphPoint point, bool bUpdateAutoscroll)
        {
            lock (_lockObject)
            {
                _samples.Add(point);
                usedLength++;
                // Updating Y range
                if (_samples.Count == 1)
                {
                    if (bUpdateAutoscroll)
                    {
                        projection.UpdateAutoscrollFromMeasurement(point.Y);
                    }
                    _yMin = point.Y;
                    _yMax = point.Y;
                    return;
                }

                if (point.Y < _yMin) //Projection.YMin)
                {
                    _yMin = point.Y;

                    if (bUpdateAutoscroll)
                    {
                        projection.UpdateAutoscrollFromMeasurement(_yMin);
                    }
                }
                else if (point.Y > _yMax) //Projection.YMax)
                {
                    _yMax = point.Y;

                    if (bUpdateAutoscroll)
                    {
                        projection.UpdateAutoscrollFromMeasurement(_yMax);
                    }
                }
            }
        }