コード例 #1
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            // Do we have everything we need to run a race?
            if (this.ReadyToRace())
            {
                // Are we emulate mode?
                if (RaceDataStore.EmulateRace == false)
                {
                    try
                    {
                        // Initialize the track
                        RaceDataStore.RaceProc.InitializeTrack();
                    }
                    catch (ApplicationException appExp)
                    {
                        string message = String.Concat(appExp.Message, " \r\n If you want to emulate, click the emulate checkbox at the top right corner of this page");

                        DialogResult result = MessageBox.Show(message, "Did you hear that crash?", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }

                // Show the Prelim Race Command Center
                FormPrelimRaceScoreboard prelimScoreboardForm = new FormPrelimRaceScoreboard();
                prelimScoreboardForm.Show(this);

                // Hook up the Prelim Complete event so we can update our tree
                // with results
                prelimScoreboardForm.OnPrelimCompleteEvent += new FormPrelimRaceScoreboard.PrelimCompleteHandler(prelimScoreboardForm_OnPrelimCompleteEvent);
            }
        }
コード例 #2
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            // Do we have everything we need to run a race?
            if (this.ReadyToRace())
            {
                // Are we emulate mode?
                if (RaceDataStore.EmulateRace == false)
                {
                    try
                    {
                        // Initialize the track
                        RaceDataStore.RaceProc.InitializeTrack();
                    }
                    catch (ApplicationException appExp)
                    {
                        string message = String.Concat(appExp.Message, " \r\n If you want to emulate, click the emulate checkbox at the top right corner of this page");

                        DialogResult result = MessageBox.Show(message, "Did you hear that crash?", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }

                }

                // Show the Prelim Race Command Center
                FormPrelimRaceScoreboard prelimScoreboardForm = new FormPrelimRaceScoreboard();
                prelimScoreboardForm.Show(this);

                // Hook up the Prelim Complete event so we can update our tree
                // with results
                prelimScoreboardForm.OnPrelimCompleteEvent += new FormPrelimRaceScoreboard.PrelimCompleteHandler(prelimScoreboardForm_OnPrelimCompleteEvent);
            }
        }