【发布时间】:2014-05-01 16:35:19
【问题描述】:
我正在处理我有多个按钮的项目。
我只想使用一个处理程序按钮进行多次点击。
我有以下此类按钮 Next 的代码,但它无法正常工作
private void ButtonNext_Click(object sender, EventArgs e)
{
if (fFirst.Enabled == true)
{
fFirst.Hide();
lectureSecondToolStripMenuItem_Click(sender, e);
}
else if (fSecond.Enabled == true)
{
fSecond.Hide();
lectureThirdToolStripMenuItem_Click(sender, e);
}
else if (fThird.Enabled == true)
{
//
}
}
当我单击 Button Next 时,它进入 fSecond 表单,但是当我再次单击 Button Next 时,它什么也不做...
我认为如果其他条件不适合它。
如果有其他方法可以做同样的工作,请告诉代码是什么样子的
【问题讨论】:
-
我认为您正在寻找 .Visible,而不是 .Enabled,因为您似乎在使用 .Hide()...