private void Form1_Load(object sender, EventArgs e) { crearTablero(); timer1.Start(); Form2 frm2 = new Form2(panel1.Width / 8, panel1.Height / 8, this.Location.X, this.Location.Y, '-'); Form2 frm3 = new Form2(panel1.Width / 8, panel1.Height / 8, this.Location.X, this.Location.Y, '+'); this.AddOwnedForm(frm2); this.AddOwnedForm(frm3); frm2.Show(); frm3.Show(); this.Text = "Turno Blancas"; hist = new Historial(this); //hist.Location = new Point(frm3.Location.X+frm3.Width, frm3.Location.Y); hist.Show(); DBconnect.iniciarConexion(); nump = DBconnect.obtenerNumeroDePartida(); DBconnect.cerrarConexion(); //nump = 1; hist.agregarMovimiento(nump, tableros.Count(), "Juegan Blancas"); hist.fijarTiempoBlancas(tBlancas); hist.fijarTiempoNegras(tNegras); }
public void agregarMovimiento(int n, int i, string s) { DBconnect.agregarJugada(n, i, s); DBconnect.cerrarConexion(); dataGridView1.DataSource = DBconnect.obtenerJugadas(f.nump); DBconnect.cerrarConexion(); dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[0]; }