C# 클래스 HueApp.Initializer

Handles inital loading of Hue resources (including the bridge and lights), and displaying an extended splash screen to the user while the app prepares.
파일 보기 프로젝트 열기: Microsoft/Windows-appsample-huelightcontroller 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
rect Windows.Foundation.Rect
rootFrame Windows.UI.Xaml.Controls.Frame
splash Windows.ApplicationModel.Activation.SplashScreen

공개 메소드들

메소드 설명
Initializer ( SplashScreen splashscreen ) : HueLibrary

Constructor for the initializer. This displays an extended splash screen and progress ring while the app loads the bridge, lights, and Cortana.

비공개 메소드들

메소드 설명
Current_SizeChanged ( object sender, WindowSizeChangedEventArgs e ) : void

Fires when the user changes the size of the app window to adjust the image and progress ring positioning.

DispatchAwaitableUITask ( Func task ) : System.Threading.Tasks.Task

Utility method for awaiting calls sent to the UI thread via the dispatcher. Used to display popups on the UI thread from a background thread and wait for user input before proceeding.

FindBridgeAsync ( ) : System.Threading.Tasks.Task

Tries to find the bridge using multiple methods. Note: this is not an exhaustive list of discovery options. For complete guidance, see http://www.developers.meethue.com/documentation/hue-bridge-discovery

FindLightsAsync ( ) : System.Threading.Tasks.Task

Tries to find lights on the network.

Initialize ( SplashScreen sender, object args ) : void

Prepares the app for use by finding the bridge and lights, and initalizing Cortana.

InitializeCortanaAsync ( ) : System.Threading.Tasks.Task

Prepares Cortana for background use.

PrepareBridgeAsync ( int attempts ) : Task

Checks whether the bridge is reachable and the app is authorized to send commands. If the bridge is reachable but the app isn't authorized, it prompts the user to register it.

ReportErrorAsync ( string message ) : System.Threading.Tasks.Task

Displays a popup to the user indicating an error occured.

SaveBridgeToCache ( ) : void

Saves bridge information to the app's local storage so the app can load faster next time.

SetImage ( ) : void

Sets the extended splash screen image. Called on first load and if the app window is resized by the user.

메소드 상세

Initializer() 공개 메소드

Constructor for the initializer. This displays an extended splash screen and progress ring while the app loads the bridge, lights, and Cortana.
public Initializer ( SplashScreen splashscreen ) : HueLibrary
splashscreen Windows.ApplicationModel.Activation.SplashScreen
리턴 HueLibrary

프로퍼티 상세

rect 보호되어 있는 프로퍼티

protected Rect,Windows.Foundation rect
리턴 Windows.Foundation.Rect

rootFrame 보호되어 있는 프로퍼티

protected Frame,Windows.UI.Xaml.Controls rootFrame
리턴 Windows.UI.Xaml.Controls.Frame

splash 보호되어 있는 프로퍼티

protected SplashScreen,Windows.ApplicationModel.Activation splash
리턴 Windows.ApplicationModel.Activation.SplashScreen