public static void sessionsLauncher(seekerSessions sessionsToLaunch) { foreach (seekerObjects sessionObj in sessionsToLaunch.Objects) { switch (sessionObj.Type) { case seekerObjectType.AD_Computer: frmSeekComputer computerToSeek = new frmSeekComputer(); computerToSeek.machineToQuery = sessionObj.QueryData; computerToSeek.WindowState = FormWindowState.Normal; computerToSeek.StartPosition = FormStartPosition.Manual; computerToSeek.Location = sessionObj.ScreenPos; computerToSeek.Show(); break; case seekerObjectType.AD_User: frmSeek userToSeek = new frmSeek(); userToSeek.userToQuery = sessionObj.QueryData; userToSeek.WindowState = FormWindowState.Normal; userToSeek.StartPosition = FormStartPosition.Manual; userToSeek.Location = sessionObj.ScreenPos; userToSeek.Show(); break; case seekerObjectType.AD_Group: frmSeekGroup frmSeekGroup = new frmSeekGroup(); frmSeekGroup.groupToQuery = sessionObj.QueryData; frmSeekGroup.WindowState = FormWindowState.Normal; frmSeekGroup.StartPosition = FormStartPosition.Manual; frmSeekGroup.Location = sessionObj.ScreenPos; frmSeekGroup.Show(); break; case seekerObjectType.AD_OrganizationalUnit: frmSeekOu frmSeekOu = new frmSeekOu(); frmSeekOu.ouToQuery = sessionObj.QueryData; frmSeekOu.WindowState = FormWindowState.Normal; frmSeekOu.StartPosition = FormStartPosition.Manual; frmSeekOu.Location = sessionObj.ScreenPos; frmSeekOu.Show(); break; } } }