C# Class SebWindowsClient.SebWindowsClientMain

Mostra file Open project: SafeExamBrowser/seb-win Class Usage Examples

Public Properties

Property Type Description
sessionCreateNewDesktop bool
singleInstanceController SingleInstanceController
splash SEBSplashScreen

Public Methods

Method Description
CheckIfInsideVirtualMachine ( ) : void

Check if running in VM and if SEB Windows Service is running or not.

CheckServicePolicy ( bool isServiceAvailable ) : void
CloseSplash ( ) : void
InitSEBDesktop ( ) : bool

Create and initialize new desktop.

InitSebSettings ( ) : bool

Create and initialize SEB client settings and check system compatibility. This method needs to be executed only once when SEB first starts (not when reconfiguring).

LoadingSebFile ( bool loading ) : void

Set loading .seb file flag.

ResetSEBDesktop ( ) : void

Reset desktop to the default one which was active before starting SEB.

SEBToForeground ( ) : void

Move SEB to the foreground.

SetVisibility ( bool show ) : void

Hide or show the Windows taskbar and startmenu.

StartSplash ( ) : void
isLoadingSebFile ( ) : bool

Get loading .seb file flag.

Private Methods

Method Description
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
GetDesktopWindow ( ) : IntPtr
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
IsIconic ( IntPtr handle ) : bool
IsInsideVM ( ) : bool

Detect if running in various virtual machines. C# code only solution which is more compatible.

Main ( ) : void

The main entry point for the application.

MyEnumThreadWindowsProc ( IntPtr hWnd, IntPtr lParam ) : bool

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

SetForegroundWindow ( IntPtr hWnd ) : IntPtr
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

Method Details

CheckIfInsideVirtualMachine() public static method

Check if running in VM and if SEB Windows Service is running or not.
public static CheckIfInsideVirtualMachine ( ) : void
return void

CheckServicePolicy() public static method

public static CheckServicePolicy ( bool isServiceAvailable ) : void
isServiceAvailable bool
return void

CloseSplash() public static method

public static CloseSplash ( ) : void
return void

InitSEBDesktop() public static method

Create and initialize new desktop.
public static InitSEBDesktop ( ) : bool
return bool

InitSebSettings() public static method

Create and initialize SEB client settings and check system compatibility. This method needs to be executed only once when SEB first starts (not when reconfiguring).
public static InitSebSettings ( ) : bool
return bool

LoadingSebFile() public static method

Set loading .seb file flag.
public static LoadingSebFile ( bool loading ) : void
loading bool
return void

ResetSEBDesktop() public static method

Reset desktop to the default one which was active before starting SEB.
public static ResetSEBDesktop ( ) : void
return void

SEBToForeground() public static method

Move SEB to the foreground.
public static SEBToForeground ( ) : void
return void

SetVisibility() public static method

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

StartSplash() public static method

public static StartSplash ( ) : void
return void

isLoadingSebFile() public static method

Get loading .seb file flag.
public static isLoadingSebFile ( ) : bool
return bool

Property Details

sessionCreateNewDesktop public_oe static_oe property

public static bool sessionCreateNewDesktop
return bool

singleInstanceController public_oe static_oe property

public static SingleInstanceController,SebWindowsClient singleInstanceController
return SingleInstanceController

splash public_oe static_oe property

public static SEBSplashScreen,SebWindowsClient splash
return SEBSplashScreen