示例#1
0
        private void seekOuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSeekOu frmSeekOu = new frmSeekOu();

            frmSeekOu.ouToQuery   = cMenuSeekOu.Tag.ToString();
            frmSeekOu.WindowState = FormWindowState.Normal;
            frmSeekOu.Show();
        }
示例#2
0
        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();
                }
            }
        }