Example #1
0
        private void PopulateGlucoseDataPoints()
        {
            foreach (var glucose in Glucoses)
            {
                GlucoseDataPoints.Add(glucose.GetDataPoint());
            }
            ;

            GlucoseDataPoints.Sort(point => point.X);
        }
Example #2
0
        public void AddGlucoseDatapoint(DataPoint point)
        {
            var item = GlucoseDataPoints.FirstOrDefault(p => p.X > point.X);

            if (item.Equals(new DataPoint()))
            {
                GlucoseDataPoints.Add(point);
            }
            else
            {
                var index = GlucoseDataPoints.IndexOf(item);
                GlucoseDataPoints.Insert(index, point);
            }
        }