示例#1
0
文件: Sensor.cs 项目: dliutyi/warfare
        public void AddPoint(Point point)
        {
            if (Points.Count == 6000)
            {
                Points.RemoveLast();
            }

            if (Values.Count == 200)
            {
                Values.RemoveAt(0);
            }

            Points.AddFirst(point);
            Values.Add(point);

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Points"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Values"));
        }