Exemplo n.º 1
0
        private void button_Tapped(object sender, TappedRoutedEventArgs e)
        {
            Button button = (Button)sender;

            UserManager.Instance.CurrentProfile = (UserProfile)button.Tag;
            FrameManager.GoTo(FrameManager.MainPageFrame);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Pyhton response to the registred picture
        /// </summary>
        /// <returns>task</returns>
        private async void PythonResponse(string str)
        {
            if (str == Protocol.RegisterFaceOK)
            {
                LineGrid.Visibility      = Visibility.Collapsed;
                PhotoTookGrid.Visibility = Visibility.Visible;
                PhotoTookMessage.Text    = Globals.GlobalStrings.PhotoRegistred;
                await Task.Delay(4000);

                UserManager.Instance.CurrentProfile.IsFaceLinked = true;
                UserManager.Instance.CurrentProfilUpdated();
                FrameManager.GoTo(FrameManager.MainPageFrame);
                LineGrid.Visibility      = Visibility.Visible;
                PhotoTookGrid.Visibility = Visibility.Collapsed;
                await GlobalMessageManager.Instance.SendMessageAsync(Protocol.StartGesture);
            }
            else if (str == Protocol.RegisterFaceKO)
            {
                LineGrid.Visibility      = Visibility.Collapsed;
                PhotoTookGrid.Visibility = Visibility.Visible;
                PhotoTookMessage.Text    = Globals.GlobalStrings.PhotoNotRegistred;
                await Task.Delay(4000);

                LineGrid.Visibility      = Visibility.Visible;
                PhotoTookGrid.Visibility = Visibility.Collapsed;
                await InitializeCameraAsync();
            }
            else if (str == Protocol.StopCamOK)
            {
                await InitializeCameraAsync();
            }
        }
Exemplo n.º 3
0
 private void BackButton_Tapped(object sender, TappedRoutedEventArgs e)
 {
     if (GlobalStatusManager.Instance.GlobalStatus == EGlobalStatus.FirstLaunch)
     {
         FrameManager.GoTo(FrameManager.LockPageFrame);
     }
     else
     {
         FrameManager.GoTo(FrameManager.MainPageFrame);
     }
 }
Exemplo n.º 4
0
        // Recupère le profil de l'utilisateur actuellement connecté
        private async void GetProfile()
        {
            if (UserManager.Instance.CurrentProfile.IsFaceLinked)
            {
                msgWelcome.Text = "Bienvenue " + UserManager.Instance.CurrentProfile.Name;

                // Défini un offset pour que le message descende de manière proportionnelle à la taille de l'ecran.
                float offset = (float)((Frame)Window.Current.Content).ActualHeight * 0.35f;
                // Animation du message
                msgWelcome.Offset(offsetX: 0, offsetY: offset, duration: 2500, delay: 500, easingType: EasingType.Default).Start();
            }
            else
            {
                await GlobalMessageManager.Instance.SendMessageAsync(Protocol.StartGesture);

                msgWelcome.Text = Globals.GlobalStrings.PhotoRequired;
                await Task.Delay(3000);

                FrameManager.GoTo(FrameManager.CapturePage);
            }
        }
Exemplo n.º 5
0
 // Go to Home Page
 private void HomeButton_Tapped(object sender, RoutedEventArgs e)
 {
     FrameManager.GoTo(FrameManager.MainPageFrame);
 }
Exemplo n.º 6
0
 private void Capture_Button_Click(object sender, RoutedEventArgs e)
 {
     FrameManager.GoTo(FrameManager.CapturePage, false);
 }
Exemplo n.º 7
0
 // Va a la page de verouillage
 private void GoToMainPage()
 {
     FrameManager.GoTo(FrameManager.MainPageFrame);
 }
Exemplo n.º 8
0
 // Va a la page de verouillage
 private void GoToLockPage()
 {
     FrameManager.GoTo(FrameManager.LockPageFrame);
 }