Esempio n. 1
0
        protected void AddValue(DateTime time, object value)
        {
            if (value == null)
            {
                return;
            }
            if (values.Count > 0)
            {
                var diff = time - stateEnter;
                values[values.Count - 1].Y = diff.TotalSeconds;
            }

            if (!value.Equals(state))
            {
                state      = value;
                stateEnter = time;
                values.Add(stateIndex++, 0, value.ToString());

                var textLabels = new string[values.Count];
                for (int i = 0; i < textLabels.Length; i++)
                {
                    textLabels[i] = (string)values[i].Tag;
                }
                graph.GraphPane.XAxis.Scale.TextLabels = textLabels;
            }

            graph.Invalidate();
        }
Esempio n. 2
0
        public override void Show(object value)
        {
            var time = DateTime.Now;

            controller.AddValues(value, this);
            if ((time - updateTime) > TargetElapsedTime)
            {
                graph.Invalidate();
                updateTime = time;
            }
        }
Esempio n. 3
0
 public override void Show(object value)
 {
     controller.AddValues(value, this);
     graph.Invalidate();
 }