Esempio n. 1
0
        public static void LapChanged(object sender, ExecuteEventArgs e)
        {
            RibbonComboBox selectChartViewComboBox = sender as RibbonComboBox;

            if (selectChartViewComboBox == null)
            {
                return;
            }
            s_lap = (int)selectChartViewComboBox.SelectedItem;
            if (s_lap > 0)
            {
                s_lapStartIndex = DataManager.Instance.LapManager.GetStartIndex(s_lap);
                s_lapEndIndex   = DataManager.Instance.LapManager.GetEndIndex(s_lap);
            }
            else
            {
                s_lapStartIndex = 0;
                s_lapEndIndex   = DataManager.Instance.RecordList.Count - 1;
            }
            if (s_lap >= 0)
            {
                List <RecordValues> list = DataManager.Instance.RecordList;
                DateTime            from = list[s_lapStartIndex].Timestamp;
                DateTime            to   = list[s_lapEndIndex].Timestamp;
                TimeSpan            span = new TimeSpan(to.Ticks - from.Ticks);
                ChartHelp.SetIntervals(span);
            }

            DataManager.Instance.ClearChart();
            DataManager.Instance.FillChart();
        }
Esempio n. 2
0
        public static void SetDateTime(DateTime from, DateTime to)
        {
            s_fromDateTime = from;
            s_toDateTime   = to;
            TimeSpan span = new TimeSpan(to.Ticks - from.Ticks);

            ChartHelp.SetIntervals(span);
        }
Esempio n. 3
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     _chartHelp = new ChartHelp(chart);
     _ribbonItems.Load();
 }