private void tvDepartment_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
try
{
Point point = new Point(e.X, e.Y);
TreeNode tn = this.tvDepartment.GetNodeAt(point);
tvDepartment.SelectedNode = tn;
if (e.Button == MouseButtons.Right)
{
//显示上下文菜单
cmsOperation.Show(tvDepartment.PointToScreen(point));
}
}
}
catch
{
throw;
}
}
{
try
{
Point point = new Point(e.X, e.Y);
TreeNode tn = this.tvDepartment.GetNodeAt(point);
tvDepartment.SelectedNode = tn;
if (e.Button == MouseButtons.Right)
{
//显示上下文菜单
cmsOperation.Show(tvDepartment.PointToScreen(point));
}
}
}
catch
{
throw;
}
}