Esempio n. 1
0
        private void DrawPlot(object o)
        {
            double timeMin = Int32.MaxValue, timeMax = Int32.MinValue;

            if (DR_ReadingDone == false)
            {
                Thread.Sleep(50);
                ThreadPool.QueueUserWorkItem(DrawPlot);
                return;
            }

            cTrackMap.Samples.Clear();

            foreach (PlotterGraph g in cPlotter.Graphs)
            {
                foreach (PlotterCurves c in g.Curves)
                {
                    c.Data.Clear();
                }
            }

            if (Plot_SelectedLap == -1)
            {
                cPlotter.Draw();
                cTrackMap.Draw();
                return;
            }
            try
            {
                DataChannels.Reset();
                foreach (KeyValuePair <int, DataSample> s in _dR.Samples)
                {
                    if (cPlotter.Graphs[0].Curves[0].Data.ContainsKey(s.Value.Time) == false)// && s.Value.Drivers[0].Laps == Plot_SelectedLap)
                    {
                        timeMin = Math.Min(timeMin, s.Value.Time);
                        timeMax = Math.Max(timeMax, s.Value.Time);

                        cTrackMap.Samples.Add(s.Value);

                        int i_g = 0;
                        foreach (PlotterGraph g in cPlotter.Graphs)
                        {
                            int i_c = 0;
                            foreach (PlotterCurves c in g.Curves)
                            {
                                cPlotter.Graphs[i_g].Curves[i_c].Data.Add(s.Value.Time - timeMin, DataChannels.Parse(c.Legend, s.Value, s.Value.Time));
                                i_c++;
                            }
                            i_g++;
                        }
                    }
                }

                _timeLineStart = timeMin;
                _timeLineEnd   = timeMax;

                DrawPlotbounds();
            }
            catch (Exception e)
            {
                cTrackMap.Samples.Clear();
                cPlotter.Draw();
            }
        }
Esempio n. 2
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     DataChannels ch = new DataChannels();
     ch.ShowDialog();
 }
Esempio n. 3
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            DataChannels ch = new DataChannels();

            ch.ShowDialog();
        }