子菜单,单选事件
/// <summary>
/// 菜单复选框
/// </summary>
/// <param name="sender">MenuItem</param>
private void CheckedMenuItem(object sender)
{
MenuItem m = sender as MenuItem ;
foreach(MenuItem item in this.menuItem2.MenuItems)
{
item.Checked = false;
if ( m.Text == item.Text )
{
m.Checked = true;
}
}
}
/// 菜单复选框
/// </summary>
/// <param name="sender">MenuItem</param>
private void CheckedMenuItem(object sender)
{
MenuItem m = sender as MenuItem ;
foreach(MenuItem item in this.menuItem2.MenuItems)
{
item.Checked = false;
if ( m.Text == item.Text )
{
m.Checked = true;
}
}
}