C# Class PixelShare.Core.SnapperWindow

Inheritance: Window
Afficher le fichier Open project: Wiladams/NewTOAPIA

Méthodes publiques

Méthode Description
OnCloseRequested ( ) : bool

This is our opportunity to shut things down cleanly as the window has been requested to close. We shut down the thread that's taking the snapshots, and wait 100 milliseconds before returning 'true' which indicates that we are ok with the shutdown continuing.

OnKeyUp ( KeyboardActivityArgs ke ) : IntPtr
OnMaximized ( int width, int height ) : void
OnMinimized ( ) : void
OnResizedTo ( int width, int height ) : void

After resizing has occured, this method is called. At this point, you know the new width and height of the client area. We set the field 'fNeedsResize' to true so that the next time the snapper thread asks to take a snapshot, the PixelBuffer object will be resized. the newWidth, and newHeight capture the new sizes. This could be eliminated as the CaptureClientArea could simply take the current ClientRectangle size at the time of the call.

SnapperWindow ( ) : System
SnapperWindow ( int x, int y, int width, int height ) : System

Private Methods

Méthode Description
RunSnaps ( ) : void

This thread routine takes snapshots of the screen periodically. The frame rate is governed by the FrameRate property of the window. The frame rate is governed by taking time stamps after each frame is captured and sent to the network. If there is more than 10 ms before the next frame is to be captured, the thread will sleep for that amount of time before performing the next capture.

SendSnapshot ( ) : void
SnapClientArea ( ) : void

Method Details

OnCloseRequested() public méthode

This is our opportunity to shut things down cleanly as the window has been requested to close. We shut down the thread that's taking the snapshots, and wait 100 milliseconds before returning 'true' which indicates that we are ok with the shutdown continuing.
public OnCloseRequested ( ) : bool
Résultat bool

OnKeyUp() public méthode

public OnKeyUp ( KeyboardActivityArgs ke ) : IntPtr
ke NewTOAPIA.UI.KeyboardActivityArgs
Résultat System.IntPtr

OnMaximized() public méthode

public OnMaximized ( int width, int height ) : void
width int
height int
Résultat void

OnMinimized() public méthode

public OnMinimized ( ) : void
Résultat void

OnResizedTo() public méthode

After resizing has occured, this method is called. At this point, you know the new width and height of the client area. We set the field 'fNeedsResize' to true so that the next time the snapper thread asks to take a snapshot, the PixelBuffer object will be resized. the newWidth, and newHeight capture the new sizes. This could be eliminated as the CaptureClientArea could simply take the current ClientRectangle size at the time of the call.
public OnResizedTo ( int width, int height ) : void
width int
height int
Résultat void

SnapperWindow() public méthode

public SnapperWindow ( ) : System
Résultat System

SnapperWindow() public méthode

public SnapperWindow ( int x, int y, int width, int height ) : System
x int
y int
width int
height int
Résultat System