C# 树的不同节点显示不同的右键菜单
private void trvMoldManage_MouseClick(object sender, MouseEventArgs e)
{
trvMoldManage.ContextMenuStrip = null;
TreeNode selectNode = trvMoldManage.GetNodeAt(e.X, e.Y);
if (selectNode.Level == 2)
{
trvMoldManage.ContextMenuStrip = ctmsMold;
}
else if (selectNode.Level == 3)
{
trvMoldManage.ContextMenuStrip = ctmsMold;
}
else if (selectNode.Level == 4)
{
trvMoldManage.ContextMenuStrip = cmueDP;
}
}