C# Class SebWindowsClient.SebWindowsClientForm

Inheritance: System.Windows.Forms.Form
Afficher le fichier Open project: SafeExamBrowser/seb-win Class Usage Examples

Méthodes publiques

Свойство Type Description
closeSebClient bool
permittedProcessesCalls List
permittedProcessesIconImages List
permittedProcessesReferences List
sebPassword string
xulRunner System.Diagnostics.Process

Méthodes publiques

Méthode Description
CloseSEBForm ( ) : void

Close SEB Form.

ExitApplication ( bool showLoadingScreen = true ) : void

Central code to exit the application Closes the form and asks for a quit password if necessary

GetApplicationPath ( string executable, string executablePath = "" ) : string

Get the full path of an application from which we know the executable name by searching the application paths which are set in the Registry.

GetPermittedApplicationPath ( Dictionary,System.Collections.Generic permittedProcess ) : string

Get the full path of an application from which we know the executable name by searching the application paths which are set in the Registry.

HideApplicationChooserForm ( ) : void

Hide SEB Application Chooser Form.

LoadFile ( string file ) : bool
OpenSEBForm ( ) : bool

Open SEB form.

SEBToForeground ( ) : void

Move SEB to the foreground.

SebWindowsClientForm ( ) : System

Constructor - initialise components.

SebWindowsClientForm_FormClosing ( object sender, FormClosingEventArgs e ) : void

Close form, if Quit Password is correct.

SebWindowsClientForm_Load ( object sender, EventArgs e ) : void

Load form.

SelectNextListItem ( ) : void

Show SEB Application Chooser Form.

SetVisibility ( bool show ) : void

Hide or show the Windows taskbar and startmenu.

ShowApplicationChooserForm ( ) : void

Show SEB Application Chooser Form.

ShowCloseDialogForm ( ) : void

Show SEB Close Form.

ShowCloseDialogFormConfirmation ( ) : void

Méthodes protégées

Méthode Description
OnLoad ( EventArgs e ) : void

OnLoad: Get the file name from command line arguments and load it.

ToolStripButton_Click ( object sender, EventArgs e ) : void

Handle click on permitted process in SEB taskbar: If process isn't running, it is started, otherwise the click is ignored.

Private Methods

Méthode Description
CreateProcessWithExitHandler ( string fullPathArgumentsCall ) : Process

Create a new process and add an exited event handler.

EnumThreadCallback ( IntPtr hWnd, IntPtr lParam ) : bool
EnumThreadWindows ( int threadId, EnumThreadProc pfnEnum, IntPtr lParam ) : bool
FindWindow ( string lpClassName, string lpWindowName ) : IntPtr
FindWindowEx ( IntPtr parentHwnd, IntPtr childAfterHwnd, IntPtr className, string windowText ) : IntPtr
FindWindowEx ( IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle ) : IntPtr
GetActiveWindowOfProcess ( Process proc ) : IntPtr

Returns the handle of the active window of a process

GetApplicationIcon ( string fullPath ) : Icon

Get icon for an application specified by a full path.

GetDesktopWindow ( ) : IntPtr
GetProcessIcon ( Process process ) : Icon

Get icon for a running process.

GetVistaStartMenuWnd ( IntPtr taskBarWnd ) : IntPtr

Returns the window handle of the Vista start menu orb.

GetWindowText ( IntPtr hWnd, StringBuilder text, int count ) : int
GetWindowThreadProcessId ( IntPtr hwnd, int &lpdwProcessId ) : uint
InitClientRegistryAndKillProcesses ( ) : bool

Set registry values and close prohibited processes.

IsIconic ( IntPtr handle ) : bool
MyEnumThreadWindowsForProcess ( int pid, IntPtr lParam ) : bool

Callback method that is called from 'EnumThreadWindows' in 'GetVistaStartMenuWnd'.

MyEnumThreadWindowsProc ( IntPtr hWnd, IntPtr lParam ) : bool

Callback method that is called from 'EnumThreadWindows' in 'GetVistaStartMenuWnd'.

OnXULRunnerShutdDownRequested ( object sender, EventArgs e ) : void
OnXulRunnerQuitLinkPressed ( object sender, EventArgs e ) : void
PlaceFormOnDesktop ( bool KeyboardShown, bool isInitial = false ) : void
SetForegroundWindow ( IntPtr hWnd ) : IntPtr
SetFormOnDesktop ( ) : bool

Set form on Desktop.

SetParent ( IntPtr hWndChild, IntPtr hWndNewParent ) : IntPtr
SetWindowPos ( IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags ) : bool
ShowWindow ( IntPtr hwnd, int nCmdShow ) : int
StartXulRunner ( string userDefinedArguments ) : bool

Start xulRunner process.

addPermittedProcessesToTS ( ) : void

Add permitted process names and icons to the SEB task bar (ToolStrip control) and start permitted processes which have the autostart option set

noSelectButton1_Click ( object sender, EventArgs e ) : void

Show dialog asking whether SEB should be closed

permittedProcess_Exited ( object sender, System e ) : void

Handle xulRunner_Exited event and display process information.

xulRunner_Exited ( object sender, System e ) : void

Handle xulRunner_Exited event and display process information.

Method Details

CloseSEBForm() public méthode

Close SEB Form.
public CloseSEBForm ( ) : void
Résultat void

ExitApplication() public méthode

Central code to exit the application Closes the form and asks for a quit password if necessary
public ExitApplication ( bool showLoadingScreen = true ) : void
showLoadingScreen bool
Résultat void

GetApplicationPath() public méthode

Get the full path of an application from which we know the executable name by searching the application paths which are set in the Registry.
public GetApplicationPath ( string executable, string executablePath = "" ) : string
executable string
executablePath string
Résultat string

GetPermittedApplicationPath() public méthode

Get the full path of an application from which we know the executable name by searching the application paths which are set in the Registry.
public GetPermittedApplicationPath ( Dictionary,System.Collections.Generic permittedProcess ) : string
permittedProcess Dictionary,System.Collections.Generic
Résultat string

HideApplicationChooserForm() public méthode

Hide SEB Application Chooser Form.
public HideApplicationChooserForm ( ) : void
Résultat void

LoadFile() public méthode

public LoadFile ( string file ) : bool
file string
Résultat bool

OnLoad() protected méthode

OnLoad: Get the file name from command line arguments and load it.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs
Résultat void

OpenSEBForm() public méthode

Open SEB form.
public OpenSEBForm ( ) : bool
Résultat bool

SEBToForeground() public static méthode

Move SEB to the foreground.
public static SEBToForeground ( ) : void
Résultat void

SebWindowsClientForm() public méthode

Constructor - initialise components.
public SebWindowsClientForm ( ) : System
Résultat System

SebWindowsClientForm_FormClosing() public méthode

Close form, if Quit Password is correct.
public SebWindowsClientForm_FormClosing ( object sender, FormClosingEventArgs e ) : void
sender object
e System.Windows.Forms.FormClosingEventArgs
Résultat void

SebWindowsClientForm_Load() public méthode

Load form.
public SebWindowsClientForm_Load ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

SelectNextListItem() public méthode

Show SEB Application Chooser Form.
public SelectNextListItem ( ) : void
Résultat void

SetVisibility() public static méthode

Hide or show the Windows taskbar and startmenu.
public static SetVisibility ( bool show ) : void
show bool true to show, false to hide
Résultat void

ShowApplicationChooserForm() public méthode

Show SEB Application Chooser Form.
public ShowApplicationChooserForm ( ) : void
Résultat void

ShowCloseDialogForm() public méthode

Show SEB Close Form.
public ShowCloseDialogForm ( ) : void
Résultat void

ShowCloseDialogFormConfirmation() public méthode

public ShowCloseDialogFormConfirmation ( ) : void
Résultat void

ToolStripButton_Click() protected méthode

Handle click on permitted process in SEB taskbar: If process isn't running, it is started, otherwise the click is ignored.
protected ToolStripButton_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

Property Details

closeSebClient public_oe property

public bool closeSebClient
Résultat bool

permittedProcessesCalls public_oe property

public List permittedProcessesCalls
Résultat List

permittedProcessesIconImages public_oe property

public List permittedProcessesIconImages
Résultat List

permittedProcessesReferences public_oe property

public List permittedProcessesReferences
Résultat List

sebPassword public_oe property

public string sebPassword
Résultat string

xulRunner public_oe property

public Process,System.Diagnostics xulRunner
Résultat System.Diagnostics.Process