C# Class MediaPortal.D3D

The base class for all the graphics (D3D) samples, it derives from windows forms
Inheritance: MediaPortal.UserInterface.Controls.MPForm
Afficher le fichier Open project: MediaPortal/MediaPortal-1

Protected Properties

Свойство Type Description
AdapterInfo MediaPortal.GraphicsAdapterInfo
AppActive bool
AutoHideMouse bool
AutoHideTaskbar bool
ExitToTray bool
FrameStatsLine1 string
FrameStatsLine2 string
Frames int
FullscreenOverride bool
IsDisplayTurnedOn bool
IsInAwayMode bool
IsUserPresent bool
IsVisible bool
KeyEventTimer System.DateTime
LastCursorPosition Point
LastRect RECT
MinimizeOnFocusLoss bool
MinimizeOnGuiExit bool
MinimizeOnStartup bool
MouseCursor bool
MouseTimeOutFullscreen int
MouseTimeOutMP int
MouseTimeOutTimer System.DateTime
NeedRecreateSwapChain bool
PlaylistPlayer MediaPortal.Playlists.PlayListPlayer
PreviousKeyEvent System.Windows.Forms.KeyPressEventArgs
ScreenNumberOverride int
ScreenSaverEventTimer System.DateTime
ShuttingDown bool
SkinOverride string
SplashScreen MediaPortal.SplashScreen
UseEnhancedVideoRenderer bool
UseMadVideoRenderer bool
Volume int
WINDOWS_NATIVE_RESOLUTION System.Drawing.Size
Windowed bool
WindowedOverride bool
_backupBounds System.Drawing.Rectangle
_backupscreen System.Windows.Forms.Screen
_firstLoadedScreen bool
_presentParams PresentParameters
_presentParamsBackup PresentParameters
_restoreLoadedScreen bool
_screenFocus System.Windows.Forms.Screen

Méthodes publiques

Méthode Description
ShowMouseCursor ( bool visible ) : void

Wrapper for shown/hiding cursor

Méthodes protégées

Méthode Description
BuildPresentParams ( bool windowed ) : void

Build D3D presentation parameters

CalcMaxClientArea ( ) : Size

Calculates the maximum client area if skin is larger than working area

D3D ( ) : System

Constructor

Dispose ( bool disposing ) : void

Clean up any resources

FrameMove ( ) : void

FullRender ( ) : void

Called when nothing else needs to be done and it's time to render

GetStats ( ) : void

Get the statistics

HandleMessage ( ) : void

Message Loop - Handles ANSI and Unicode Messages and dispatch them

HideTaskBar ( bool hide ) : void

Hides the task bar

Init ( ) : bool

Init graphics device

InitializeDevice ( ) : void

Initialization of the D3D Device

InitializeDeviceObjects ( ) : void

KeyDownEvent ( KeyEventArgs e ) : void

KeyPressEvent ( KeyPressEventArgs e ) : void

MinimizeToTray ( ) : void

Minimized MP To System Tray

MouseClickEvent ( MouseEventArgs e ) : void

MouseDoubleClickEvent ( MouseEventArgs e ) : void

MouseMoveEvent ( MouseEventArgs e ) : void

NotifyIconRestore ( Object sender, EventArgs e ) : void

OnDeviceLost ( Object sender, EventArgs e ) : void

OnEnumeration ( ) : void

OnExit ( ) : void

OnFormClosing ( FormClosingEventArgs formClosingEventArgs ) : void

http://msdn.microsoft.com/en-us/library/system.windows.forms.form.onformclosing.aspx

OnGotFocus ( EventArgs e ) : void

Raises the GotFocus event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.ongotfocus.aspx

OnKeyPress ( KeyPressEventArgs e ) : void

Raises the KeyPress event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeypress.aspx

OnLostFocus ( EventArgs e ) : void

Raises the Lost Focus event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onlostfocus.aspx

OnMouseMove ( MouseEventArgs e ) : void

Raises the MouseMove event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onmousemove.aspx

OnPaint ( PaintEventArgs e ) : void

OnPaintEvent ( ) : void

Repaints the current window independent of WM_PAINT messages

OnProcess ( ) : void

OnStartup ( ) : void

RecoverDevice ( ) : void

Render ( float timePassed ) : void

RestoreFromTray ( ) : void

Restores MP from System Tray

ResumePlayer ( ) : void

Restore player from saved state

SavePlayerState ( ) : void

Save player state (when form was resized)

ShowLastActiveModule ( ) : bool

ToggleFullscreen ( ) : void

UpdateStats ( ) : void

Update the various statistics the simulation keeps track of

Private Methods

Méthode Description
CleanupEnvironment ( ) : void

Set our variables to not active and not ready

ConfirmDevice ( Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat ) : bool

CreateDirectX9ExDevice ( ) : void

Creates a DirectX9Ex Device

Exit ( object sender, EventArgs e ) : void

Exit Form

FindAdapterForScreen ( Screen screen ) : MediaPortal.GraphicsAdapterInfo

Finds the adapter that has the specified screen on its primary monitor

GetCapabilities ( ) : Caps

GetForegroundWindow ( ) : IntPtr
GetMonitorInfo ( IntPtr hWnd, MonitorInformation &info ) : bool
InitializeComponent ( ) : void

Initialize Menus and Event Handlers

MenuItemConfiguration ( object sender, EventArgs e ) : void

MenuItemDVD ( object sender, EventArgs e ) : void

MenuItemFullscreen ( object sender, EventArgs e ) : void

MenuItemMiniTV ( object sender, EventArgs e ) : void

toggles default and minitv mode

MenuItemMovies ( object sender, EventArgs e ) : void

MenuItemMusic ( object sender, EventArgs e ) : void

MenuItemPictures ( object sender, EventArgs e ) : void

MenuItemTV ( object sender, EventArgs e ) : void

NotifyIconExit ( Object sender, EventArgs e ) : void

OnClick ( object sender, MouseEventArgs e ) : void

OnIdle ( object sender, EventArgs e ) : void

OnKeyDown ( object sender, KeyEventArgs e ) : void

OnKeyPress ( object sender, KeyPressEventArgs e ) : void

OnLoad ( object sender, EventArgs e ) : void

OnMouseDoubleClick ( object sender, MouseEventArgs e ) : void

OnMouseMove ( object sender, MouseEventArgs e ) : void

RecreateSwapChain ( bool useBackup ) : void

reset device if back buffer does not match skin dimensions (e.g. 16:10 display with 16:9 skin, 720p skin on 1080p display etc.)

ShowCursor ( bool bShow ) : int
StartConfiguration ( ) : void

Start Configuration.exe

TVDelayThread ( ) : void

ToggleMiniTV ( ) : void

UpdateMouseCursor ( ) : void

Automatically hides or show mouse cursor when over form

Method Details

BuildPresentParams() protected méthode

Build D3D presentation parameters
protected BuildPresentParams ( bool windowed ) : void
windowed bool true for window, false for fullscreen
Résultat void

CalcMaxClientArea() protected méthode

Calculates the maximum client area if skin is larger than working area
protected CalcMaxClientArea ( ) : Size
Résultat System.Drawing.Size

D3D() protected méthode

Constructor
protected D3D ( ) : System
Résultat System

Dispose() protected méthode

Clean up any resources
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

FrameMove() protected méthode

protected FrameMove ( ) : void
Résultat void

FullRender() protected méthode

Called when nothing else needs to be done and it's time to render
protected FullRender ( ) : void
Résultat void

GetStats() protected méthode

Get the statistics
protected GetStats ( ) : void
Résultat void

HandleMessage() protected méthode

Message Loop - Handles ANSI and Unicode Messages and dispatch them
protected HandleMessage ( ) : void
Résultat void

HideTaskBar() protected static méthode

Hides the task bar
protected static HideTaskBar ( bool hide ) : void
hide bool hides taskbar on true, shows it on false
Résultat void

Init() protected méthode

Init graphics device
protected Init ( ) : bool
Résultat bool

InitializeDevice() protected méthode

Initialization of the D3D Device
protected InitializeDevice ( ) : void
Résultat void

InitializeDeviceObjects() protected méthode

protected InitializeDeviceObjects ( ) : void
Résultat void

KeyDownEvent() protected méthode

protected KeyDownEvent ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
Résultat void

KeyPressEvent() protected méthode

protected KeyPressEvent ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
Résultat void

MinimizeToTray() protected méthode

Minimized MP To System Tray
protected MinimizeToTray ( ) : void
Résultat void

MouseClickEvent() protected méthode

protected MouseClickEvent ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

MouseDoubleClickEvent() protected méthode

protected MouseDoubleClickEvent ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

MouseMoveEvent() protected méthode

protected MouseMoveEvent ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

NotifyIconRestore() protected méthode

protected NotifyIconRestore ( Object sender, EventArgs e ) : void
sender Object
e System.EventArgs
Résultat void

OnDeviceLost() protected méthode

protected OnDeviceLost ( Object sender, EventArgs e ) : void
sender Object
e System.EventArgs
Résultat void

OnEnumeration() protected méthode

protected OnEnumeration ( ) : void
Résultat void

OnExit() protected méthode

protected OnExit ( ) : void
Résultat void

OnFormClosing() protected méthode

http://msdn.microsoft.com/en-us/library/system.windows.forms.form.onformclosing.aspx
protected OnFormClosing ( FormClosingEventArgs formClosingEventArgs ) : void
formClosingEventArgs System.Windows.Forms.FormClosingEventArgs
Résultat void

OnGotFocus() protected méthode

Raises the GotFocus event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.ongotfocus.aspx
protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
Résultat void

OnKeyPress() protected méthode

Raises the KeyPress event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeypress.aspx
protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs A KeyPressEventArgs that contains the event data.
Résultat void

OnLostFocus() protected méthode

Raises the Lost Focus event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onlostfocus.aspx
protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
Résultat void

OnMouseMove() protected méthode

Raises the MouseMove event. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onmousemove.aspx
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs A MouseEventArgs that contains the event data.
Résultat void

OnPaint() protected méthode

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnPaintEvent() protected méthode

Repaints the current window independent of WM_PAINT messages
protected OnPaintEvent ( ) : void
Résultat void

OnProcess() protected méthode

protected OnProcess ( ) : void
Résultat void

OnStartup() protected méthode

protected OnStartup ( ) : void
Résultat void

RecoverDevice() protected méthode

protected RecoverDevice ( ) : void
Résultat void

Render() protected méthode

protected Render ( float timePassed ) : void
timePassed float
Résultat void

RestoreFromTray() protected méthode

Restores MP from System Tray
protected RestoreFromTray ( ) : void
Résultat void

ResumePlayer() protected méthode

Restore player from saved state
protected ResumePlayer ( ) : void
Résultat void

SavePlayerState() protected méthode

Save player state (when form was resized)
protected SavePlayerState ( ) : void
Résultat void

ShowLastActiveModule() protected méthode

protected ShowLastActiveModule ( ) : bool
Résultat bool

ShowMouseCursor() public méthode

Wrapper for shown/hiding cursor
public ShowMouseCursor ( bool visible ) : void
visible bool
Résultat void

ToggleFullscreen() protected méthode

protected ToggleFullscreen ( ) : void
Résultat void

UpdateStats() protected méthode

Update the various statistics the simulation keeps track of
protected UpdateStats ( ) : void
Résultat void

Property Details

AdapterInfo protected_oe property

protected GraphicsAdapterInfo,MediaPortal AdapterInfo
Résultat MediaPortal.GraphicsAdapterInfo

AppActive protected_oe property

protected bool AppActive
Résultat bool

AutoHideMouse protected_oe property

protected bool AutoHideMouse
Résultat bool

AutoHideTaskbar protected_oe property

protected bool AutoHideTaskbar
Résultat bool

ExitToTray protected_oe property

protected bool ExitToTray
Résultat bool

FrameStatsLine1 protected_oe property

protected string FrameStatsLine1
Résultat string

FrameStatsLine2 protected_oe property

protected string FrameStatsLine2
Résultat string

Frames protected_oe property

protected int Frames
Résultat int

FullscreenOverride protected_oe static_oe property

protected static bool FullscreenOverride
Résultat bool

IsDisplayTurnedOn protected_oe property

protected bool IsDisplayTurnedOn
Résultat bool

IsInAwayMode protected_oe property

protected bool IsInAwayMode
Résultat bool

IsUserPresent protected_oe property

protected bool IsUserPresent
Résultat bool

IsVisible protected_oe property

protected bool IsVisible
Résultat bool

KeyEventTimer protected_oe property

protected DateTime,System KeyEventTimer
Résultat System.DateTime

LastCursorPosition protected_oe property

protected Point LastCursorPosition
Résultat Point

LastRect protected_oe property

protected RECT LastRect
Résultat RECT

MinimizeOnFocusLoss protected_oe property

protected bool MinimizeOnFocusLoss
Résultat bool

MinimizeOnGuiExit protected_oe property

protected bool MinimizeOnGuiExit
Résultat bool

MinimizeOnStartup protected_oe property

protected bool MinimizeOnStartup
Résultat bool

MouseCursor protected_oe property

protected bool MouseCursor
Résultat bool

MouseTimeOutFullscreen protected_oe property

protected int MouseTimeOutFullscreen
Résultat int

MouseTimeOutMP protected_oe property

protected int MouseTimeOutMP
Résultat int

MouseTimeOutTimer protected_oe property

protected DateTime,System MouseTimeOutTimer
Résultat System.DateTime

NeedRecreateSwapChain protected_oe property

protected bool NeedRecreateSwapChain
Résultat bool

PlaylistPlayer protected_oe property

protected PlayListPlayer,MediaPortal.Playlists PlaylistPlayer
Résultat MediaPortal.Playlists.PlayListPlayer

PreviousKeyEvent protected_oe property

protected KeyPressEventArgs,System.Windows.Forms PreviousKeyEvent
Résultat System.Windows.Forms.KeyPressEventArgs

ScreenNumberOverride protected_oe static_oe property

protected static int ScreenNumberOverride
Résultat int

ScreenSaverEventTimer protected_oe property

protected DateTime,System ScreenSaverEventTimer
Résultat System.DateTime

ShuttingDown protected_oe property

protected bool ShuttingDown
Résultat bool

SkinOverride protected_oe static_oe property

protected static string SkinOverride
Résultat string

SplashScreen protected_oe static_oe property

protected static SplashScreen,MediaPortal SplashScreen
Résultat MediaPortal.SplashScreen

UseEnhancedVideoRenderer protected_oe property

protected bool UseEnhancedVideoRenderer
Résultat bool

UseMadVideoRenderer protected_oe property

protected bool UseMadVideoRenderer
Résultat bool

Volume protected_oe static_oe property

protected static int Volume
Résultat int

WINDOWS_NATIVE_RESOLUTION protected_oe static_oe property

protected static Size,System.Drawing WINDOWS_NATIVE_RESOLUTION
Résultat System.Drawing.Size

Windowed protected_oe property

protected bool Windowed
Résultat bool

WindowedOverride protected_oe static_oe property

protected static bool WindowedOverride
Résultat bool

_backupBounds protected_oe static_oe property

protected static Rectangle,System.Drawing _backupBounds
Résultat System.Drawing.Rectangle

_backupscreen protected_oe static_oe property

protected static Screen,System.Windows.Forms _backupscreen
Résultat System.Windows.Forms.Screen

_firstLoadedScreen protected_oe static_oe property

protected static bool _firstLoadedScreen
Résultat bool

_presentParams protected_oe property

protected PresentParameters _presentParams
Résultat PresentParameters

_presentParamsBackup protected_oe property

protected PresentParameters _presentParamsBackup
Résultat PresentParameters

_restoreLoadedScreen protected_oe static_oe property

protected static bool _restoreLoadedScreen
Résultat bool

_screenFocus protected_oe static_oe property

protected static Screen,System.Windows.Forms _screenFocus
Résultat System.Windows.Forms.Screen