Exemple #1
0
        /// <summary>
        /// The button spawns a new window containing Game Information for the given team on the given date.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void uxGetGameResultsButton_Click(object sender, EventArgs e)
        {
            TeamData    currentTeamData    = (TeamData)uxComboBox.SelectedItem;
            DateTime    currentDateTime    = uxDatePicker.Value;
            TeamAndDate currentTeamAndDate = new TeamAndDate(currentTeamData.TeamAbreviation, currentDateTime);

            if (_gameInformation.ContainsKey(currentTeamAndDate) == true)
            {
                List <GameData> allGamesFound = _gameInformation[currentTeamAndDate];

                for (int i = 0; i < allGamesFound.Count; i++)
                {
                    GameInformation GI = new GameInformation(allGamesFound[i]);
                    GI.Show();
                }
            }
            else
            {
                MessageBox.Show("No results for that team on that date.");
            }
        }
        /// <summary>
        /// The button spawns a new window containing Game Information for the given team on the given date.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void uxGetGameResultsButton_Click(object sender, EventArgs e)
        {
            TeamData currentTeamData = (TeamData)uxComboBox.SelectedItem;
            DateTime currentDateTime = uxDatePicker.Value;
            TeamAndDate currentTeamAndDate = new TeamAndDate(currentTeamData.TeamAbreviation, currentDateTime);

            if (_gameInformation.ContainsKey(currentTeamAndDate) == true)
            {
                List<GameData> allGamesFound = _gameInformation[currentTeamAndDate];

                for (int i = 0; i < allGamesFound.Count; i++)
                {
                    GameInformation GI = new GameInformation(allGamesFound[i]);
                    GI.Show();
                }
            }
            else
            {
                MessageBox.Show("No results for that team on that date.");
            }
        }