Exemple #1
0
        private void updateFlightView()
        {
            this.Cursor = Cursors.WaitCursor;

            flightDataGridPenalties.Rows.Clear();
            flightImageFlight.Image = new Bitmap(flightImageFlight.Width, flightImageFlight.Width);
            if (flightCurrentCompetitor != null && flightCurrentGroup != null)
            {
                flightCurrentFlight = flightCurrentRace.Flights.GetFlightByGroupAndCompetitorId(flightCurrentGroup, flightCurrentCompetitor);
                if (flightCurrentFlight != null)
                {

                    flightLblCompetitor.Text = flightCurrentCompetitor.PilotName + " / " + flightCurrentCompetitor.NavigatorName;
                    flightLblFilename.Text = flightCurrentFlight.Filename;
                    flightLblStartgatePlan.Text = flightCurrentFlight.PlannedStartGateTime.ToString("HH:mm:ss");
                    flightLblStartgatePassed.Text = flightCurrentFlight.StartGateTime.ToString("HH:mm:ss");
                    flightLblEndgatePlan.Text = flightCurrentFlight.PlannedFinishGateTime.ToString("HH:mm:ss");
                    flightLblEndgatePassed.Text = flightCurrentFlight.FinishGateTime.ToString("HH:mm:ss");
                    flightLblTakeoffTimePlan.Text = flightCurrentFlight.PlannedTakeOffTime.ToString("HH:mm:ss");
                    flightLblTakeoffTime.Text = flightCurrentFlight.TakeOffTime.ToString("HH:mm:ss");
                    flightImageFlight.Image = Common.drawFlight(flightCurrentRace.Map, flightCurrentGroup.Parcours, flightCurrentFlight);
                    flightCurrentFlight.resetPenalties();
                    flightUpdatePenaltyGrid();
                    this.Cursor = Cursors.Default;
                }
            }
            else
            {
                flightImageFlight.Image = new Bitmap(1, 1);
                flightLblCompetitor.Text = string.Empty;
                flightLblFilename.Text = string.Empty;
                flightLblStartgatePassed.Text = string.Empty;
                flightLblEndgatePassed.Text = string.Empty;
                flightLblTakeoffTime.Text = string.Empty;
            }
        }