Ejemplo n.º 1
0
        public void AddData(ConcurrentQueue <string> qData, CancellationToken token, PlotViewModel plot)
        {
            string local;

            while (true)
            {
                if (token.IsCancellationRequested)
                {
                    break;
                }
                while (qData.TryDequeue(out local))
                {
                    String[] data  = local.Split(' ');
                    string   point = data[1];
                    try
                    {
                        DataPoint dp = new DataPoint(xTime.ElapsedMilliseconds, Convert.ToDouble(point));
                        plot.AddDataPointToSeries(0, dp);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }