C# Класс MediaPortalApp, MediaPortal-1

Наследование: D3D, IRender
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

CheckSkinVersion() защищенный Метод

protected CheckSkinVersion ( ) : void
Результат void

FrameMove() защищенный Метод

protected FrameMove ( ) : void
Результат void

GetCleanDisplayName() защищенный статический Метод

XP returns random garbage in a name of a display in .NET
protected static GetCleanDisplayName ( Screen screen ) : string
screen Screen
Результат string

GetDate() защищенный Метод

Get the current date from the system and localize it based on the user preferences.
protected GetDate ( ) : string
Результат string

GetDay() защищенный Метод

protected GetDay ( ) : string
Результат string

GetDayOfWeek() защищенный Метод

protected GetDayOfWeek ( ) : string
Результат string

GetMonth() защищенный Метод

protected GetMonth ( ) : string
Результат string

GetMonthOfYear() защищенный Метод

protected GetMonthOfYear ( ) : string
Результат string

GetShortDayOfWeek() защищенный Метод

protected GetShortDayOfWeek ( ) : string
Результат string

GetShortMonthOfYear() защищенный Метод

protected GetShortMonthOfYear ( ) : string
Результат string

GetShortYear() защищенный Метод

protected GetShortYear ( ) : string
Результат string

GetTime() защищенный Метод

Get the current time from the system. Set the format in the Home plugin's config
protected GetTime ( ) : string
Результат string

GetYear() защищенный Метод

protected GetYear ( ) : string
Результат string

InitializeDeviceObjects() защищенный Метод

protected InitializeDeviceObjects ( ) : void
Результат void

KeyDownEvent() защищенный Метод

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
Результат void

KeyPressEvent() защищенный Метод

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
Результат void

MPProcess() публичный Метод

Process() gets called when a dialog is presented. It contains the message loop
public MPProcess ( ) : void
Результат void

MadVRMPProcess() публичный Метод

Process() gets called for madVR. It contains the message loop
public MadVRMPProcess ( ) : void
Результат void

MediaPortalApp() публичный Метод

public MediaPortalApp ( ) : DirectShowLib
Результат DirectShowLib

MouseClickEvent() защищенный Метод

protected MouseClickEvent ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

MouseDoubleClickEvent() защищенный Метод

protected MouseDoubleClickEvent ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

MouseMoveEvent() защищенный Метод

protected MouseMoveEvent ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

NotifyIconRestore() защищенный Метод

protected NotifyIconRestore ( Object sender, EventArgs e ) : void
sender Object
e EventArgs
Результат void

OnDeviceLost() защищенный Метод

protected OnDeviceLost ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void

OnExit() защищенный Метод

OnExit() Gets called just b4 application stops
protected OnExit ( ) : void
Результат void

OnMouseWheel() защищенный Метод

protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnProcess() защищенный Метод

protected OnProcess ( ) : void
Результат void

OnStartExternal() публичный Метод

public OnStartExternal ( Process proc, bool waitForExit ) : void
proc Process
waitForExit bool
Результат void

OnStartup() защищенный Метод

OnStartup() gets called just before the application starts
protected OnStartup ( ) : void
Результат void

OnStopExternal() публичный Метод

public OnStopExternal ( Process proc, bool waitForExit ) : void
proc Process
waitForExit bool
Результат void

Render() защищенный Метод

protected Render ( float timePassed ) : void
timePassed float
Результат void

RenderFrame() публичный Метод

public RenderFrame ( float timePassed, GUILayers layers ) : void
timePassed float
layers GUILayers
Результат void

RenderFrame() публичный Метод

public RenderFrame ( float timePassed, GUILayers layers, bool &uiVisible ) : void
timePassed float
layers GUILayers
uiVisible bool
Результат void

SetDWORDRegKey() публичный статический Метод

public static SetDWORDRegKey ( RegistryKey hklm, string key, string value, Int32 iValue ) : void
hklm RegistryKey
key string
value string
iValue System.Int32
Результат void

SetREGSZRegKey() публичный статический Метод

public static SetREGSZRegKey ( RegistryKey hklm, string key, string name, string value ) : void
hklm RegistryKey
key string
name string
value string
Результат void

ShowStartupWarningDialogs() публичный статический Метод

public static ShowStartupWarningDialogs ( ) : void
Результат void

WndProc() защищенный Метод

Message Pump
protected WndProc ( Message &msg ) : void
msg Message
Результат void