public SelectTournamentWindow(TournamentData data)
        {
            InitializeComponent();
            _data = data;

            _hills = new Dictionary <string, Hill>();
            TournamentUtilities.GetHills().ForEach(hill =>
            {
                var hillName = $"{hill.Name} ({hill.City})";
                _hills.Add(hillName, hill);
                listBoxTournament.Items.Add(hillName);
            });

            SetGateRange(0, 0);
        }
        public MainWindow()
        {
            InitializeComponent();

            _data          = new TournamentData();
            _data.Athletes = TournamentUtilities.GetAthletes();
            if (!_data.MoreAthletes())
            {
                MessageBox.Show("No athletes!");
                return;
            }

            _closePending = false;

            var dlg = new SelectTournamentWindow(_data);

            dlg.ShowDialog();

            var hill = _data.Hill;

            _compensation = new Compensation(hill);

            // gate
            textBoxTournament.Text = $"{hill.Name} ({hill.City})";
            textBoxGate.Text       = $"{hill.CurrGate}";

            // wind
            sliderWind.Minimum = -5.0;
            sliderWind.Maximum = +5.0;

            // jump length
            sliderJumpLength.Minimum = 0.0;
            sliderJumpLength.Maximum = hill.LongestJump + 10.0;

            // judges
            _judges = new ComboBox[] { comboBoxJudge1, comboBoxJudge2, comboBoxJudge3, comboBoxJudge4, comboBoxJudge5 };
            for (var f = 20.0; f > 0.0; f -= 0.5)
            {
                var s = $"{f:F1}";
                foreach (var judge in _judges)
                {
                    judge.Items.Add(s);
                }
            }

            NextAthlete();
        }