C# Class MediaPortalApp, MediaPortal-1

Inheritance: D3D, IRender
ファイルを表示 Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Public Methods

Method Description
MPProcess ( ) : void

Process() gets called when a dialog is presented. It contains the message loop

MadVRMPProcess ( ) : void

Process() gets called for madVR. It contains the message loop

MediaPortalApp ( ) : DirectShowLib

OnStartExternal ( Process proc, bool waitForExit ) : void

OnStopExternal ( Process proc, bool waitForExit ) : void

RenderFrame ( float timePassed, GUILayers layers ) : void
RenderFrame ( float timePassed, GUILayers layers, bool &uiVisible ) : void
SetDWORDRegKey ( RegistryKey hklm, string key, string value, Int32 iValue ) : void

SetREGSZRegKey ( RegistryKey hklm, string key, string name, string value ) : void

ShowStartupWarningDialogs ( ) : void

Protected Methods

Method Description
CheckSkinVersion ( ) : void

FrameMove ( ) : void

GetCleanDisplayName ( Screen screen ) : string

XP returns random garbage in a name of a display in .NET

GetDate ( ) : string

Get the current date from the system and localize it based on the user preferences.

GetDay ( ) : string

GetDayOfWeek ( ) : string

GetMonth ( ) : string
GetMonthOfYear ( ) : string

GetShortDayOfWeek ( ) : string

GetShortMonthOfYear ( ) : string

GetShortYear ( ) : string

GetTime ( ) : string

Get the current time from the system. Set the format in the Home plugin's config

GetYear ( ) : string

InitializeDeviceObjects ( ) : void

KeyDownEvent ( KeyEventArgs e ) : void

This is coming indirectly from System.Windows.Forms.Control.KeyDown event. It's notably needed to be able to handle direction arrows and escape.

KeyPressEvent ( KeyPressEventArgs e ) : void

This is coming indirectly from System.Windows.Forms.Control.KeyPress event. I believe it does not fire for some keys such as direction arrows and escape.

MouseClickEvent ( MouseEventArgs e ) : void

MouseDoubleClickEvent ( MouseEventArgs e ) : void

MouseMoveEvent ( MouseEventArgs e ) : void

NotifyIconRestore ( Object sender, EventArgs e ) : void

OnDeviceLost ( object sender, EventArgs e ) : void

OnExit ( ) : void

OnExit() Gets called just b4 application stops

OnMouseWheel ( MouseEventArgs e ) : void

OnProcess ( ) : void

OnStartup ( ) : void

OnStartup() gets called just before the application starts

Render ( float timePassed ) : void

WndProc ( Message &msg ) : void

Message Pump

Private Methods

Method Description
AddExceptionHandler ( ) : void
Application_ApplicationExit ( object sender, EventArgs e ) : void
Application_ThreadException ( object sender, System e ) : void
CheckDelayedResume ( ) : bool
CheckSingleClick ( MouseEventArgs e ) : void

CreateStateBlock ( ) : void

CurrentDomain_UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
Currentmodulefullscreen ( ) : bool

DisableProcessWindowsGhosting ( ) : void
DisableSplashScreen ( ) : void

Disables the Splash Screen

DisposeDBs ( ) : void

DoStartupJobs ( ) : void

EnumDisplayDevices ( string lpDevice, int iDevNum, [ lpDisplayDevice, int dwFlags ) : bool
ExitMP ( ) : void

ForceMPFocus ( ) : void

Focus Mediaportal is visible.

GCD ( long a, long b ) : long

Find the Greatest Common Divisor

IsSuspendOrHibernationAllowed ( ) : bool

LegacyKeyPressEvent ( KeyPressEventArgs e ) : void

Major mess goes here.

LoadLanguageString ( ) : void

Load string_xx.xml based on config

Main ( string args ) : void
MediaPortalAppActivated ( object sender, EventArgs e ) : void

MediaPortalAppDeactivate ( object sender, EventArgs e ) : void

OnAction ( MediaPortal.GUI.Library.Action action ) : void

OnActivate ( Message &msg ) : void

OnDeviceChange ( Message &msg ) : void

OnDisplayChange ( Message &msg ) : void

OnGetMinMaxInfo ( Message &msg ) : void

OnMessage ( GUIMessage message ) : void

OnMoving ( Message &msg ) : void

OnPowerBroadcast ( Message &msg ) : bool

Process WM_POWERBROADCAST messages

OnRemoteCommand ( object command ) : void

OnResumeAutomatic ( ) : void

This event is delivered every time the system resumes and does not indicate whether a user is present

OnResumeSuspend ( ) : void

This event is sent with the PBT_APMRESUMEAUTOMATIC event if the system has resumed operation due to user activity.

OnSize ( Message &msg ) : void

OnSizing ( Message &msg ) : void

OnSuspend ( ) : void

OnSysCommand ( Message &msg ) : bool

OnThreadException ( object sender, ThreadExceptionEventArgs e ) : void

OnUnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void

PathIsNetworkPath ( string path ) : bool
PostMessage ( IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam ) : bool
PrepareSuspend ( ) : void

Prepare application for suspend, this is done before power events get passed to plugins

PromptUserBeforeChangingPowermode ( MediaPortal.GUI.Library.Action action ) : bool

ReOpenDBs ( ) : void

RegisterDeviceNotification ( IntPtr hRecipient, IntPtr notificationFilter, uint flags ) : IntPtr
RegisterForDeviceNotifications ( ) : void
RegisterPowerSettingNotification ( IntPtr hRecipient, System.Guid &powerSettingGuid, Int32 flags ) : IntPtr
RenderStats ( ) : void

SaveLastActiveModule ( ) : void

saves last active module.

ScaleCursorPosition ( Point location ) : Point

SetProcessDPIAware ( ) : int
SetProcessWorkingSetSize ( IntPtr handle, int minSize, int maxSize ) : bool
SetThreadExecutionState ( EXECUTION_STATE esFlags ) : EXECUTION_STATE
SystemParametersInfo ( int uAction, int uParam, bool &lpvParam, int fuWinIni ) : bool
SystemParametersInfo ( int uAction, int uParam, int lpvParam, int fuWinIni ) : bool
UnregisterDeviceNotification ( IntPtr hHandle ) : uint
UnregisterForDeviceNotification ( ) : void

UnregisterForPowerSettingNotitication ( ) : void

UnregisterPowerSettingNotification ( IntPtr handle ) : bool
UpdateSplashScreenMessage ( string aSplashLine ) : void

Updates the splash screen to display the given string. This method checks whether the splash screen exists.

Method Details

CheckSkinVersion() protected method

protected CheckSkinVersion ( ) : void
return void

FrameMove() protected method

protected FrameMove ( ) : void
return void

GetCleanDisplayName() protected static method

XP returns random garbage in a name of a display in .NET
protected static GetCleanDisplayName ( Screen screen ) : string
screen Screen
return string

GetDate() protected method

Get the current date from the system and localize it based on the user preferences.
protected GetDate ( ) : string
return string

GetDay() protected method

protected GetDay ( ) : string
return string

GetDayOfWeek() protected method

protected GetDayOfWeek ( ) : string
return string

GetMonth() protected method

protected GetMonth ( ) : string
return string

GetMonthOfYear() protected method

protected GetMonthOfYear ( ) : string
return string

GetShortDayOfWeek() protected method

protected GetShortDayOfWeek ( ) : string
return string

GetShortMonthOfYear() protected method

protected GetShortMonthOfYear ( ) : string
return string

GetShortYear() protected method

protected GetShortYear ( ) : string
return string

GetTime() protected method

Get the current time from the system. Set the format in the Home plugin's config
protected GetTime ( ) : string
return string

GetYear() protected method

protected GetYear ( ) : string
return string

InitializeDeviceObjects() protected method

protected InitializeDeviceObjects ( ) : void
return void

KeyDownEvent() protected method

This is coming indirectly from System.Windows.Forms.Control.KeyDown event. It's notably needed to be able to handle direction arrows and escape.
protected KeyDownEvent ( KeyEventArgs e ) : void
e KeyEventArgs
return void

KeyPressEvent() protected method

This is coming indirectly from System.Windows.Forms.Control.KeyPress event. I believe it does not fire for some keys such as direction arrows and escape.
protected KeyPressEvent ( KeyPressEventArgs e ) : void
e KeyPressEventArgs
return void

MPProcess() public method

Process() gets called when a dialog is presented. It contains the message loop
public MPProcess ( ) : void
return void

MadVRMPProcess() public method

Process() gets called for madVR. It contains the message loop
public MadVRMPProcess ( ) : void
return void

MediaPortalApp() public method

public MediaPortalApp ( ) : DirectShowLib
return DirectShowLib

MouseClickEvent() protected method

protected MouseClickEvent ( MouseEventArgs e ) : void
e MouseEventArgs
return void

MouseDoubleClickEvent() protected method

protected MouseDoubleClickEvent ( MouseEventArgs e ) : void
e MouseEventArgs
return void

MouseMoveEvent() protected method

protected MouseMoveEvent ( MouseEventArgs e ) : void
e MouseEventArgs
return void

NotifyIconRestore() protected method

protected NotifyIconRestore ( Object sender, EventArgs e ) : void
sender Object
e EventArgs
return void

OnDeviceLost() protected method

protected OnDeviceLost ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

OnExit() protected method

OnExit() Gets called just b4 application stops
protected OnExit ( ) : void
return void

OnMouseWheel() protected method

protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnProcess() protected method

protected OnProcess ( ) : void
return void

OnStartExternal() public method

public OnStartExternal ( Process proc, bool waitForExit ) : void
proc Process
waitForExit bool
return void

OnStartup() protected method

OnStartup() gets called just before the application starts
protected OnStartup ( ) : void
return void

OnStopExternal() public method

public OnStopExternal ( Process proc, bool waitForExit ) : void
proc Process
waitForExit bool
return void

Render() protected method

protected Render ( float timePassed ) : void
timePassed float
return void

RenderFrame() public method

public RenderFrame ( float timePassed, GUILayers layers ) : void
timePassed float
layers GUILayers
return void

RenderFrame() public method

public RenderFrame ( float timePassed, GUILayers layers, bool &uiVisible ) : void
timePassed float
layers GUILayers
uiVisible bool
return void

SetDWORDRegKey() public static method

public static SetDWORDRegKey ( RegistryKey hklm, string key, string value, Int32 iValue ) : void
hklm RegistryKey
key string
value string
iValue System.Int32
return void

SetREGSZRegKey() public static method

public static SetREGSZRegKey ( RegistryKey hklm, string key, string name, string value ) : void
hklm RegistryKey
key string
name string
value string
return void

ShowStartupWarningDialogs() public static method

public static ShowStartupWarningDialogs ( ) : void
return void

WndProc() protected method

Message Pump
protected WndProc ( Message &msg ) : void
msg Message
return void