Exemplo n.º 1
0
        private void autoUpdateYearsProToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string        baseYear    = StringInputDlg.GetString("Base year:", "Enter the year for the season", "2004");
            string        teamsString = StringInputDlg.GetString("Teams:", "Enter the teams you wish to update (seperated by comma), blank for all teams", "");
            List <string> teams       = new List <string>(teamsString.Split(new char[] { ',' }));

            if (teamsString == "" || teams.Count < 1)
            {
                teams = new List <string>(GamesaveTool.Teams);
                teams.Add("FreeAgents");
                teams.Add("DraftClass");
            }

            if (!String.IsNullOrEmpty(baseYear))
            {
                int year = 0;
                Int32.TryParse(baseYear, out year);
                Tool.AutoUpdateYearsProFromYear(year, teams.ToArray());
            }
        }