Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            var p = new populateDB();

            p.populate(comboBox3.Text, comboBox4.Text, comboBox2.Text, startDateTextBox.Text, endDateTextBox.Text, thetaTextBox.Text);

            var Calc = new Calculator();

            setUnderRobinsonLabel(Calc.Robinson_Under25(comboBox3.Text, comboBox4.Text, comboBox2.Text));
            setOverRobinsonLabel(Calc.Robinson_Over25(comboBox3.Text, comboBox4.Text, comboBox2.Text));

            string [] homx = new string[5];
            homx[0] = Poisson5LastX1.Text;
            homx[1] = Poisson5LastX2.Text;
            homx[2] = Poisson5LastX3.Text;
            homx[3] = Poisson5LastX4.Text;
            homx[4] = Poisson5LastX5.Text;

            string[] aways = new string[5];
            aways[0] = Poisson5LastY1.Text;
            aways[1] = Poisson5LastY2.Text;
            aways[2] = Poisson5LastY3.Text;
            aways[3] = Poisson5LastY4.Text;
            aways[4] = Poisson5LastY5.Text;

            Calc.PoissonTheta(homx, aways);
        }
Exemplo n.º 2
0
        private async void button4_Click(object sender, EventArgs e)
        {
            var placard = new PlacardRequest();

            placard.eventos = new List <Event>(await placard.GetEvents(placard.NextEvents, "FOOT"));
            //var eventos = await placard.GetEvents(placard.NextEvents, "FOOT");

            var teams = new List <Team>();

            foreach (var v in placard.eventos)
            {
                //var evn = v.homeOpponentDescription + " vs " + v.awayOpponentDescription + "\n" + v.eventPaths[1].eventPathDescription + "\n" + v.eventPaths[2].eventPathDescription;
                teams.Add(new Team()
                {
                    Name = v.homeOpponentDescription, Country_name = v.eventPaths[1].eventPathDescription
                });
                teams.Add(new Team()
                {
                    Name = v.awayOpponentDescription, Country_name = v.eventPaths[1].eventPathDescription
                });
            }

            var p = new populateDB();

            p.addTeams(teams);
        }
Exemplo n.º 3
0
        private void button5_Click(object sender, EventArgs e)
        {
            var dialog = new CommonOpenFileDialog
            {
                InitialDirectory = "C:\\Users",
                IsFolderPicker   = false,
            };

            if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
            {
                MessageBox.Show("You selected: " + dialog.FileName);
            }

            var p = new populateDB();

            p.readCSV(dialog.FileName, comboBox1.Text, comboBox2.Text, 1); // Todo: Alter this to generic input
        }
Exemplo n.º 4
0
        private void button9_Click(object sender, EventArgs e)
        {
            var p = new populateDB();

            p.testTheta(comboBox2.Text, startDateTextBox.Text, endDateTextBox.Text, Convert.ToDouble(thetaTextBox.Text));
        }
Exemplo n.º 5
0
        private void button7_Click(object sender, EventArgs e)
        {
            var p = new populateDB();

            p.populate2(comboBox2.Text, startDateTextBox.Text, endDateTextBox.Text);
        }