private void seekGroupToolStripMenuItem_Click(object sender, EventArgs e) { frmSeekGroup groupToSeek = new frmSeekGroup(); groupToSeek.groupToQuery = cMenuSeekGroup.Tag.ToString(); groupToSeek.WindowState = FormWindowState.Normal; groupToSeek.Show(); }
private void tvResults_DoubleClick(object sender, EventArgs e) { if (tvResults.SelectedNode != null) { //User Seek if ((tvResults.SelectedNode.Parent != null) && (tvResults.SelectedNode.Text != string.Empty) && (tvResults.SelectedNode.Parent.Name.Contains("users"))) { frmSeek userToSeek = new frmSeek(); userToSeek.userToQuery = tvResults.SelectedNode.Text.Split(',')[1]; userToSeek.WindowState = FormWindowState.Normal; userToSeek.Show(); } //Computer Seek if ((tvResults.SelectedNode.Parent != null) && (tvResults.SelectedNode.Text != string.Empty) && (tvResults.SelectedNode.Parent.Name.Contains("computer"))) { frmSeekComputer computerToSeek = new frmSeekComputer(); computerToSeek.machineToQuery = tvResults.SelectedNode.Text.Split(',')[0]; computerToSeek.WindowState = FormWindowState.Normal; computerToSeek.Show(); } //Group Seek if ((tvResults.SelectedNode.Parent != null) && (tvResults.SelectedNode.Text != string.Empty) && (tvResults.SelectedNode.Parent.Name.Contains("group"))) { frmSeekGroup frmSeekGroup = new frmSeekGroup(); frmSeekGroup.groupToQuery = tvResults.SelectedNode.Text; frmSeekGroup.WindowState = FormWindowState.Normal; frmSeekGroup.Show(); } //OU Seek if ((tvResults.SelectedNode.Parent != null) && (tvResults.SelectedNode.Text != string.Empty) && (tvResults.SelectedNode.Parent.Name.Contains("ous"))) { frmSeekOu frmSeekOu = new frmSeekOu(); frmSeekOu.ouToQuery = tvResults.SelectedNode.Tag.ToString(); frmSeekOu.WindowState = FormWindowState.Normal; frmSeekOu.Show(); } } }