protected override async void OnNavigatedTo(NavigationEventArgs e) { PaintingCanvas.Background = null; _state = StreamingState.Idle; if (_faceDetector == null) { _faceDetector = await FaceDetector.CreateAsync(); } if (_faceApiHelper == null) { try { _faceApiHelper = new FaceApiHelper(); await _faceApiHelper.CheckGroupExistAsync(); } catch (FaceAPIException faceEx) { ShowAlertHelper.ShowDialog(faceEx.ErrorMessage, faceEx.ErrorCode); } catch (Exception ex) { ShowAlertHelper.ShowDialog(ex.Message); } } }
protected override async void OnNavigatedTo(NavigationEventArgs e) { _state = StreamingState.Idle; if (_faceTracker == null) { _faceTracker = await FaceTracker.CreateAsync(); } if (_faceApiHelper == null) { try { _faceApiHelper = new FaceApiHelper(); await _faceApiHelper.CheckGroupExistAsync(); } catch (Microsoft.ProjectOxford.Face.FaceAPIException faceEx) { ShowAlertHelper.ShowDialog(faceEx.ErrorMessage, faceEx.ErrorCode); } catch (Exception ex) { ShowAlertHelper.ShowDialog(ex.Message); } } if (_dataHelper == null) { try { _dataHelper = new DataHelper(); } catch (Exception ex) { ShowAlertHelper.ShowDialog(ex.Message); } } }