Ejemplo 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();
        }
Ejemplo 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;
            }
        }
Ejemplo n.º 3
0
 public override void Show(object value)
 {
     controller.AddValues(value, this);
     graph.Invalidate();
 }