private void kontroltimer_Tick(object sender, EventArgs e) { if (top.Right == pg.Right) { x *= -1; } if (top.Left == pg.Left) { x *= -1; } if (top.Top == pg.Top) { y *= -1; } if (raket.Top == top.Bottom && top.Bottom <= raket.Bottom && top.Left >= raket.Left && top.Right <= raket.Right) { y *= -1; } if (top.Bottom >= pg.Bottom) { tophareket.Enabled = false; kontroltimer.Enabled = false; Bitis bts = new Bitis(); bts.doldur(snc); bts.ShowDialog(); } for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { kontrol(p[i, j]); } } }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("Oyuncu adi bos olamaz !!!", "Uyarii !!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { oyuncuAdi = textBox1.Text; playground pg = new playground(); pg.Show(); Bitis bts = new Bitis(); bts.strDoldur(oyuncuAdi); this.Hide(); } }