/// <summary>Handles the MouseDoubleClick event of any WPF DataGrid control containing team information.</summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">
        ///     The <see cref="MouseButtonEventArgs" /> instance containing the event data.
        /// </param>
        public static void AnyTeamDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var s = sender as DataGrid;
            if (s != null && s.SelectedCells.Count > 0)
            {
                var row = (DataRowView) s.SelectedItems[0];
                var team = row["Name"].ToString();

                var tow = new TeamOverviewWindow(team);
                tow.ShowDialog();
            }
        }
        private void QuickFind(object sender, ExecutedRoutedEventArgs e)
        {
            if (SQLiteIO.IsTSTEmpty())
            {
                return;
            }

            var qfw = new QuickFindWindow();
            if (qfw.ShowDialog() != true)
            {
                return;
            }

            var item = QuickFindWindow.SelectedItem;
            if (item.Type == SearchItem.SelectionType.Team)
            {
                var w = new TeamOverviewWindow(item.ID);
                w.ShowDialog();
            }
            else
            {
                var w = new PlayerOverviewWindow(PST[item.ID].TeamF, item.ID);
                w.ShowDialog();
            }
        }
        /// <summary>Handles the Click event of the btnTeamOverview control. Displays the Team 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 btnTeamOverview_Click(object sender, RoutedEventArgs e)
        {
            if (String.IsNullOrEmpty(CurrentDB))
            {
                return;
            }
            if (SQLiteIO.IsTSTEmpty())
            {
                MessageBox.Show("You need to create a team or import stats before using the Analysis features.");
                return;
            }

            dispatcherTimer_Tick(null, null);
            var tow = new TeamOverviewWindow();
            tow.ShowDialog();
        }