C# 클래스 RemoteLedMatrix.MainPage

Main page of the RemoteLedMatrix application. Contains the actual controls for the led matrix, as well as the settings bar and instance.
상속: Windows.UI.Xaml.Controls.Page
파일 보기 프로젝트 열기: ms-iot/LEDMatrix

공개 프로퍼티들

프로퍼티 타입 설명
CurrentConnection RemoteLedMatrix.Helpers.Connection
Instance MainPage
IsInSettings bool
_isPreviewing bool

공개 메소드들

메소드 설명
CheckAlwaysRunning ( bool force = null ) : void

Tries to keep the machine from locking/sleeping by periodically making a DisplayRequest

Connect ( Connection selectedConnection ) : System.Threading.Tasks.Task

Connects to a remote device over firmata

Disconnect ( ) : void

Disconnects the current connection and cleans up any related objects

MainPage ( ) : System
PopulateList ( ) : void

Populates the list of connections in the settings UI

RefreshConnections ( ) : Task

Refreshes the connections from the available device sources

보호된 메소드들

메소드 설명
OnNavigatedTo ( NavigationEventArgs e ) : void
OnNavigatingFrom ( NavigatingCancelEventArgs e ) : void

비공개 메소드들

메소드 설명
Application_Resuming ( object sender, object o ) : void
Application_Suspending ( object sender, SuspendingEventArgs e ) : void
CaptureTimerTick ( object sender, object e ) : void

Performs a capture every timer tick, to provide continuous streaming

CleanupCameraAsync ( ) : System.Threading.Tasks.Task

Cleans up the camera resources (after stopping the preview if necessary) and unregisters from MediaCapture events

ConvertDisplayOrientationToDegrees ( DisplayOrientations orientation ) : int

Converts the given orientation of the app on the screen to the corresponding rotation in degrees

DisplayInformation_OrientationChanged ( DisplayInformation sender, object args ) : void

This event will fire when the page is rotated

Display_Tapped ( object sender, TappedRoutedEventArgs e ) : void

Display button tapped event handler

FindCameraDeviceByPanelAsync ( Windows.Devices.Enumeration.Panel desiredPanel ) : Task

Queries the available video capture devices to try and find one mounted on the desired panel

GetPreviewFrameAsSoftwareBitmapAsync ( ) : System.Threading.Tasks.Task

Gets the current preview frame as a SoftwareBitmap, displays its properties in a TextBlock, and can optionally display the image in the UI and/or save it to disk as a jpg

GetPreviewFrameButton_Tapped ( object sender, TappedRoutedEventArgs e ) : void
InitializeCameraAsync ( ) : System.Threading.Tasks.Task

Initializes the MediaCapture, registers events, gets camera device information for mirroring and rotating, and starts preview

MediaCapture_Failed ( MediaCapture sender, MediaCaptureFailedEventArgs errorEventArgs ) : void
OnConnectionEstablished ( ) : void

OnConnectionFailed ( string message ) : void

Handler for failed connection event, logs and displays a UI message

OnConnectionLost ( string message ) : void

Handler for lost connection event, logs and displays a UI message

PreviewButton_Checked ( object sender, RoutedEventArgs e ) : void
PreviewButton_Click ( object sender, RoutedEventArgs e ) : void

Handler for clicking the preview button

PreviewButton_Unchecked ( object sender, RoutedEventArgs e ) : void
SetPreviewRotationAsync ( ) : System.Threading.Tasks.Task

Gets the current orientation of the UI in relation to the device and applies a corrective rotation to the preview

SettingButton_Click ( object sender, RoutedEventArgs e ) : void

Handler for clicking the setting button

StartPreviewAsync ( ) : System.Threading.Tasks.Task

Starts the preview and adjusts it for for rotation and mirroring after making a request to keep the screen on and unlocks the UI

StopPreviewAsync ( ) : System.Threading.Tasks.Task

Stops the preview and deactivates a display request, to allow the screen to go into power saving modes, and locks the UI

TestButton_Click ( object sender, RoutedEventArgs e ) : void

Handler for clicking the test button

메소드 상세

CheckAlwaysRunning() 공개 메소드

Tries to keep the machine from locking/sleeping by periodically making a DisplayRequest
public CheckAlwaysRunning ( bool force = null ) : void
force bool Forces the request, even if AlwaysRunning isn't set
리턴 void

Connect() 공개 메소드

Connects to a remote device over firmata
public Connect ( Connection selectedConnection ) : System.Threading.Tasks.Task
selectedConnection RemoteLedMatrix.Helpers.Connection Connection to connect to
리턴 System.Threading.Tasks.Task

Disconnect() 공개 메소드

Disconnects the current connection and cleans up any related objects
public Disconnect ( ) : void
리턴 void

MainPage() 공개 메소드

public MainPage ( ) : System
리턴 System

OnNavigatedTo() 보호된 메소드

protected OnNavigatedTo ( NavigationEventArgs e ) : void
e Windows.UI.Xaml.Navigation.NavigationEventArgs
리턴 void

OnNavigatingFrom() 보호된 메소드

protected OnNavigatingFrom ( NavigatingCancelEventArgs e ) : void
e Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs
리턴 void

PopulateList() 공개 메소드

Populates the list of connections in the settings UI
public PopulateList ( ) : void
리턴 void

RefreshConnections() 공개 메소드

Refreshes the connections from the available device sources
public RefreshConnections ( ) : Task
리턴 Task

프로퍼티 상세

CurrentConnection 공개적으로 프로퍼티

public Connection,RemoteLedMatrix.Helpers CurrentConnection
리턴 RemoteLedMatrix.Helpers.Connection

Instance 공개적으로 정적으로 프로퍼티

public static MainPage Instance
리턴 MainPage

IsInSettings 공개적으로 프로퍼티

public bool IsInSettings
리턴 bool

_isPreviewing 공개적으로 프로퍼티

public bool _isPreviewing
리턴 bool