Code
private void maintainLoginUserMenuItem_Click(object sender, EventArgs e)
{
if (tvRole.SelectedNode != null)
{
TreeNode node = tvRole.SelectedNode;
frmAddUserToRole addUserToRole = new frmAddUserToRole();
addUserToRole.RoleName = node.Text;
if (addUserToRole.ShowDialog() == DialogResult.OK)
{
}
}
}
private void tvRole_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && tvRole.SelectedNode != null)
{
this.contextMenuTVRole.Show(tvRole, e.X, e.Y);
}
}
private void tvRole_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
tvRole.SelectedNode = tvRole.HitTest(e.Location).Node;
}
}