Ejemplo n.º 1
0
        private void UpdateLastGameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <List <string> > lastGameData;
            string        location;
            FrmStatistics Statistics = new FrmStatistics(frmSettings);

            lastGameData = Statistics.GetLastGameData();

            while (lastGameData.Count < 14)
            {
                lastGameData.Add(new List <string>()
                {
                    "", "", "", "", "", "", ""
                });
            }

            location = lastGameData[0][1];

            UpdateGoogleSpreadsheetCell("1pgtVGwY1ba3BxL5p5HwS_aYpDj1Go_Y1UPgam9S57Ac", "'" + location.ToUpper() + " Last Game'!C3", lastGameData[0][0]);

            lastGameData.Remove(lastGameData.First());
            UpdateGoogleSpreadsheetCellRange("1pgtVGwY1ba3BxL5p5HwS_aYpDj1Go_Y1UPgam9S57Ac", "'" + location.ToUpper() + " Last Game'!C7:I20", lastGameData);

            MessageBox.Show("Last Game stats have been updated.");
        }
Ejemplo n.º 2
0
        private void UpdateSeasonStats()
        {
            List <List <string> > leagueData;
            FrmStatistics         Statistics = new FrmStatistics(frmSettings);

            leagueData = Statistics.GetLeagueData();

            //MessageBox.Show(settings[Settings.Default.IniSection]["GameLocation"].ToUpper());

            UpdateGoogleSpreadsheetCellRange("1pgtVGwY1ba3BxL5p5HwS_aYpDj1Go_Y1UPgam9S57Ac", "'" + settings[Settings.Default.IniSection]["GameLocation"].ToUpper() + " Seasons'!C5:P8", leagueData);
        }
Ejemplo n.º 3
0
        private void StatsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string resultsPath = Environment.ExpandEnvironmentVariables(settings[Settings.Default.IniSection]["ResultsFolder"]);

            if (!Directory.Exists(resultsPath))
            {
                MessageBox.Show("Please go to settings and set a results folder location.");
            }
            else if (IsDirectoryEmpty(resultsPath))
            {
                MessageBox.Show("Chosen results folder is empty.  Go to settings and select a different results folder.");
            }
            else
            {
                FrmStatistics Statistics = new FrmStatistics(frmSettings);
                Statistics.Show();
            }
        }