void SayiGir_Click(object sender, EventArgs e) { Kolon tus = (Kolon)sender; // sayi gir formundaki basılan buton k.Text = tus.Text; // basılan tuşdaki sayıyı butona koy. this.Hide(); }
public Sahne() { sayiGir = new SayiGir(kolon); for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { kolon[i, j] = new Kolon(); kolon[i, j].Click += new EventHandler(Sahne_Click); } } }
private void FormDuzenle() { this.FormBorderStyle = FormBorderStyle.Fixed3D; this.MaximizeBox = false; this.Size = new Size(555, 150); this.BackColor = Color.Black; for (int i = 1; i < 10; i++) { sayi[i] = new Kolon(); sayi[i].Text = i.ToString(); sayi[i].Location = new Point((i - 1) * 60 + 5, 10); sayi[i].Click += new EventHandler(SayiGir_Click); this.Controls.Add(sayi[i]); } btnIptal = new MyButton(this, "iptal"); btnIptal.Location = new Point(230, 70); this.Controls.Add(btnIptal); btnIptal.Click += new EventHandler(btnIptal_Click); }
public void ButonAl(Object sender) { k = (Kolon)sender; }