/// <summary>Handles the MouseDoubleClick event of the dgvBoxScores control. The selected box score is displayed in the Box Score Window.</summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="MouseButtonEventArgs" /> instance containing the event data.
        /// </param>
        private void dgvBoxScores_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var boxScoreEntry = dgvBoxScores.SelectedItem as BoxScoreEntry;
            if (boxScoreEntry != null)
            {
                var id = boxScoreEntry.BS.ID;

                var bw = new BoxScoreWindow(BoxScoreWindow.Mode.ViewAndIgnore, id);
                try
                {
                    bw.ShowDialog();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Exception thrown while trying to open Box Score dialog: " + ex.Message);
                }
            }
        }
        /// <summary>
        ///     Handles the MouseDoubleClick event of the dgvBoxScores control. Allows the user to view a specific box score in the Box Score
        ///     window.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="MouseButtonEventArgs" /> instance containing the event data.
        /// </param>
        private async void dgvBoxScores_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (dgvBoxScores.SelectedCells.Count > 0)
            {
                var row = (TeamBoxScore) dgvBoxScores.SelectedItems[0];

                var bsw = new BoxScoreWindow(BoxScoreWindow.Mode.View, row.ID);
                try
                {
                    if (bsw.ShowDialog() == true)
                    {
                        await updateData();
                    }
                }
                catch
                {
                }
            }
        }
        /// <summary>Handles the MouseDoubleClick event of the dgvBoxScores control. Views the selected box score in the Box Score Window.</summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="MouseButtonEventArgs" /> instance containing the event data.
        /// </param>
        private async void dgvBoxScores_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (dgvBoxScores.SelectedCells.Count > 0)
            {
                var row = (DataRowView) dgvBoxScores.SelectedItems[0];
                var gameid = Convert.ToInt32(row["GameID"].ToString());

                var bsw = new BoxScoreWindow(BoxScoreWindow.Mode.View, gameid);
                try
                {
                    if (bsw.ShowDialog() == true)
                    {
                        _reload = true;
                        await updateData();
                        tbcLeagueOverview_SelectionChanged(null, null);
                    }
                }
                catch
                {
                }
            }
        }
        /// <summary>
        ///     Handles the MouseDoubleClick event of the dgvHTHBoxScores control.
        ///     Views the selected box score in the Box Score window.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="MouseButtonEventArgs" /> instance containing the event data.
        /// </param>
        private void dgvHTHBoxScores_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (dgvHTHBoxScores.SelectedCells.Count > 0)
            {
                var row = (DataRowView) dgvHTHBoxScores.SelectedItems[0];
                int gameid = Convert.ToInt32(row["GameID"].ToString());

                var bsw = new BoxScoreWindow(BoxScoreWindow.Mode.View, gameid);
                try
                {
                    bsw.ShowDialog();
                }
                catch
                {
                }
            }
        }
        /// <summary>
        ///     Handles the Click event of the btnLoadUpdate control. Opens the Box Score window to allow the user to update the team stats
        ///     by entering a box score.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="RoutedEventArgs" /> instance containing the event data.
        /// </param>
        private async void btnLoadUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (SQLiteIO.IsTSTEmpty())
            {
                UpdateStatus("No file is loaded or the file currently loaded is empty");
                return;
            }

            TempBSE_BS = new TeamBoxScore();
            var bsW = new BoxScoreWindow();
            bsW.ShowDialog();

            await parseBoxScoreResult();
        }
        /// <summary>Handles the Click event of the mnuMiscLiveBoxScore control. Allows the user to keep track of the box score of a live game.</summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="RoutedEventArgs" /> instance containing the event data.
        /// </param>
        private async void mnuMiscLiveBoxScore_Click(object sender, RoutedEventArgs e)
        {
            var lbsw = new LiveBoxScoreWindow();
            if (lbsw.ShowDialog() == true)
            {
                var bsw = new BoxScoreWindow(TempLiveBSE);
                bsw.ShowDialog();

                await parseBoxScoreResult();
            }
        }
        /// <summary>
        ///     OBSOLETE:
        ///     Handles the Click event of the mnuHistoryBoxScores control.
        ///     Used to open the Box Score window in View mode so that the user can view and edit any box score.
        ///     Superseded by the Box Scores tab in the League Overview window.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="RoutedEventArgs" /> instance containing the event data.
        /// </param>
        private void mnuHistoryBoxScores_Click(object sender, RoutedEventArgs e)
        {
            if (SQLiteIO.IsTSTEmpty())
            {
                return;
            }

            bs = new TeamBoxScore();
            var bsw = new BoxScoreWindow(BoxScoreWindow.Mode.View);
            bsw.ShowDialog();

            UpdateBoxScore();
        }
        /// <summary>
        ///     Handles the MouseDoubleClick event of the dgvHTHBoxScores control.
        ///     Allows the user to view a specific box score in the Box Score window.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="MouseButtonEventArgs" /> instance containing the event data.
        /// </param>
        private void dgvHTHBoxScores_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (dgvHTHBoxScores.SelectedCells.Count > 0)
            {
                var row = (PlayerBoxScore) dgvHTHBoxScores.SelectedItems[0];
                int gameID = row.GameID;

                var bsw = new BoxScoreWindow(BoxScoreWindow.Mode.View, gameID);
                try
                {
                    bsw.ShowDialog();

                    MainWindow.UpdateBoxScore();
                }
                catch
                {
                }
            }
        }