Exemplo n.º 1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string fn = Dialogs.GetOpenTelemetry();

            var events = SimpleTelemetryLoader.LoadTelemetry(fn);
            var smart  = SmartTelemetryAnalyser.AnalyseTelemetry(events);

            FillTree(smart);
            FillLists(events);
        }
Exemplo n.º 2
0
        private void btnScan_Click(object sender, EventArgs e)
        {
            btnScan.Enabled    = false;
            btnProcess.Enabled = false;
            Application.DoEvents();

            var events    = SimpleTelemetryLoader.LoadTelemetry(txtFile.Text);
            var smartData = SmartTelemetryAnalyser.AnalyseTelemetry(events);

            ClearCombos();

            int index = 1;

            foreach (var fItem in smartData)
            {
                ComboItem ci = new ComboItem(fItem, index);

                if (fItem.SessionInfo.SessionType == SessionInfo.eSessionType.kSessionTypePractice &&
                    fItem.SessionInfo.SessionNum == PRACTICE_SESSION_NUMBER)
                {
                    cmbPractice.Items.Add(ci);
                }
                if (fItem.SessionInfo.SessionType == SessionInfo.eSessionType.kSessionTypeQualifyLone ||
                    fItem.SessionInfo.SessionType == SessionInfo.eSessionType.kSessionTypeQualifyOpen)
                {
                    cmbQualify.Items.Add(ci);
                }
                if (fItem.SessionInfo.SessionType == SessionInfo.eSessionType.kSessionTypePractice &&
                    fItem.SessionInfo.SessionNum == PRE_RACE_SESSION_NUMBER)
                {
                    cmbHappyHour.Items.Add(ci);
                }
                if (fItem.SessionInfo.SessionType == SessionInfo.eSessionType.kSessionTypeRace)
                {
                    cmbRace.Items.Add(ci);
                }

                index++;
            } // foreach (var fItem in result)

            btnScan.Enabled    = true;
            btnProcess.Enabled = true;
        }