public static class global
{
public static object obj = null;
}
private void nfrmItem_Load(object sender, EventArgs e)
{
global.obj = this.BtnDiamond;
}
private void chkDimond_CheckedChanged(object sender, EventArgs e)
{
Button btn = global.obj as Button;
if (chkDimond.Checked)
btn.Enabled = true;
else
btn.Enabled = false;
}
{
public static object obj = null;
}
private void nfrmItem_Load(object sender, EventArgs e)
{
global.obj = this.BtnDiamond;
}
private void chkDimond_CheckedChanged(object sender, EventArgs e)
{
Button btn = global.obj as Button;
if (chkDimond.Checked)
btn.Enabled = true;
else
btn.Enabled = false;
}
No comments:
Post a Comment