C# Class FacialRecognitionDoor.MainPage

Inheritance: Windows.UI.Xaml.Controls.Page
ファイルを表示 Open project: ms-iot/Facial-Recognition-Door

Public Methods

Method Description
InitializeGpio ( ) : void

Called once, when the app is first opened. Initializes device GPIO.

InitializeOxford ( ) : void

Called once, when the app is first opened. Initializes Oxford facial recognition.

MainPage ( ) : FacialRecognitionDoor.FacialRecognition

Called when the page is first navigated to.

Protected Methods

Method Description
OnNavigatedTo ( NavigationEventArgs e ) : void

Triggered every time the page is navigated to.

Private Methods

Method Description
DoorBellPressed ( Windows.Devices.Gpio.GpioPin sender, Windows.Devices.Gpio.GpioPinValueChangedEventArgs args ) : void

Triggered when user presses physical door bell button

DoorbellButton_Click ( object sender, RoutedEventArgs e ) : void

Triggered when user presses virtual doorbell app bar button

DoorbellPressed ( ) : System.Threading.Tasks.Task

Called when user hits physical or vitual doorbell buttons. Captures photo of current webcam view and sends it to Oxford for facial recognition processing.

NewUserButton_Click ( object sender, RoutedEventArgs e ) : void

Called when user hits vitual add user button. Navigates to NewUserPage page.

ShutdownButton_Click ( object sender, RoutedEventArgs e ) : void

Triggered when the user selects the Shutdown button in the app bar. Closes app.

UnlockDoor ( string visitorName ) : void

Unlocks door and greets visitor

UpdateWhitelistedVisitors ( ) : void

Updates internal list of of whitelisted visitors (whitelistedVisitors) and the visible UI grid

UpdateWhitelistedVisitorsGrid ( ) : void

Updates UserInterface list of whitelisted users from the list of Visitor objects (WhitelistedVisitors)

UpdateWhitelistedVisitorsList ( ) : System.Threading.Tasks.Task

Updates the list of Visitor objects with all whitelisted visitors stored on disk

WebcamFeed_Loaded ( object sender, RoutedEventArgs e ) : void

Triggered when webcam feed loads both for the first time and every time page is navigated to. If no WebcamHelper has been created, it creates one. Otherwise, simply restarts webcam preview feed on page.

WhitelistedUsersGrid_ItemClick ( object sender, ItemClickEventArgs e ) : void

Triggered when the user selects a visitor in the WhitelistedUsersGrid

WhitelistedUsersGrid_Loaded ( object sender, RoutedEventArgs e ) : void

Triggered when the whitelisted users grid is loaded. Sets the size of each photo within the grid.

speechMediaElement_Loaded ( object sender, RoutedEventArgs e ) : void

Triggered when media element used to play synthesized speech messages is loaded. Initializes SpeechHelper and greets user.

Method Details

InitializeGpio() public method

Called once, when the app is first opened. Initializes device GPIO.
public InitializeGpio ( ) : void
return void

InitializeOxford() public method

Called once, when the app is first opened. Initializes Oxford facial recognition.
public InitializeOxford ( ) : void
return void

MainPage() public method

Called when the page is first navigated to.
public MainPage ( ) : FacialRecognitionDoor.FacialRecognition
return FacialRecognitionDoor.FacialRecognition

OnNavigatedTo() protected method

Triggered every time the page is navigated to.
protected OnNavigatedTo ( NavigationEventArgs e ) : void
e Windows.UI.Xaml.Navigation.NavigationEventArgs
return void