如何在 buttonClick 事件处理程序中获取单击的按钮文本?
let buttonClick args =
let rnd = new Random()
//MessageBox.Show(button.Text)
let r, g, b = rnd.Next(256), rnd.Next(256), rnd.Next(256)
form.BackColor <- Color.FromArgb(r, g, b)
for x = 0 to 3 do
for y = 0 to 3 do
let button = new Game15Button(new Point(x, y))
button.Size <- new Size(50, 50)
button.Click.Add(buttonClick)
form.Controls.Add(button)