Example #1
0
        //227; 292 >> 227; 125 (167)

        public Sperm(int Cap, string nick)
        {
            player.Play();
            InitializeComponent();
            this.Cap  = Cap;
            this.nick = nick;
            placar[0] = this.nick;
            plc       = new Placar(placar);

            lstPosition.DataSource = placar;
        }
Example #2
0
        public Sperm()
        {
            InitializeComponent();
            plc = new Placar(placar);
            dv = new DataView(plc.table);

<<<<<<< HEAD
            //dgvPlacar.DataSource = plc.table.Select(" ");
            plcArr = (from Jogo in plc.table.AsEnumerable()
                      orderby plc.table.Columns[1]
                      select plc.table.Columns[0].ToString()).ToArray();
            lstbPlacar.DataSource = plcArr;
        }
Example #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Trim() != "")
     {
         MySqlConnection conexao = new MySqlConnection("Persist Security Info = False; server=localhost; database=rimas;uid=root");
         MySqlCommand    comando = new MySqlCommand("SELECT COUNT(*) FROM topgeral", conexao);
         conexao.Open();
         MySqlDataReader leitor = comando.ExecuteReader();
         if (leitor.Read())
         {
             codigoaluno = int.Parse(leitor.GetString(0));
             codigoaluno++;
         }
         leitor.Close();
         comando = new MySqlCommand("INSERT INTO `topgeral` VALUES ('" + codigoaluno.ToString() + "','" + textBox1.Text + "','" + pontuacao + "')", conexao);
         comando.ExecuteNonQuery();
         conexao.Close();
         this.Visible = false;
         Placar next = new Placar();
         next.Show();
     }
 }