Ejemplo n.º 1
0
 private async void buttonRecup_Click(object sender, RoutedEventArgs e)
 {
     if (ContexteAppli.IsCortanaActive && await ImageUnlockBusiness.FileExist())
     {
         ((Frame)Window.Current.Content).Navigate(typeof(SecureImageView), OuvertureSecureImageEnum.MODE_DEBLOCAGE);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Méthode chargeant des paramètres les données déjà existantes
        /// </summary>
        public async Task <bool> LoadSecurity()
        {
            if (await ImageUnlockBusiness.FileExist())
            {
                var element = await ImageUnlockBusiness.Load();

                if (element != null)
                {
                    _imageToSave = element.Image;
                    ImageLock    = ResizedImage(await ObjectUtils.ConvertBytesToBitmap(_imageToSave), (int)_maxSizeX, (int)_maxSizeY);
                    ListePoint   = new List <Point>(element.ListePoint);
                    EtapeUnOk    = true;
                    VerifPointImage();
                    VerifEtapeDeux();
                    return(true);
                }
            }
            EtapeUnOk = false;
            VerifPointImage();
            EtapeDeuxOk = false;
            return(false);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Se lance lors de l'ouverture de la page
        /// </summary>
        /// <param name="e"></param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            ViewModel                  = new StartPageViewModel((ModeOuvertureEnum)e.Parameter);
            StackTitre.Background      = ContexteAppli.GetColorTheme();
            ButtonRecupPass.Visibility = (ContexteAppli.IsFichierRoamingOuvert && ContexteAppli.IsCortanaActive && await ImageUnlockBusiness.FileExist() && ViewModel.ModeSelect.Equals(ModeOuvertureEnum.FichierDejaExistant))
                ? Visibility.Visible
                : Visibility.Collapsed;


            if (ViewModel.ModeSelect.Equals(ModeOuvertureEnum.FichierDejaExistant))
            {
                TextTitre.Text              = ResourceLoader.GetForCurrentView().GetString("phraseAcceuilExistant");
                GridConfirm.Visibility      = Visibility.Collapsed;
                ProgressBarForce.Visibility = Visibility.Collapsed;
                ButtonReinit.Visibility     = ContexteAppli.IsFichierRoamingOuvert? Visibility.Visible : Visibility.Collapsed;
            }

            if (ViewModel.ModeSelect.Equals(ModeOuvertureEnum.FichierACreer))
            {
                TextTitre.Text              = ResourceLoader.GetForCurrentView().GetString("phraseAcceuilNouveau");
                GridConfirm.Visibility      = Visibility.Visible;
                ProgressBarForce.Visibility = Visibility.Visible;
                ButtonReinit.Visibility     = Visibility.Collapsed;
            }
            PasswordBoxMdp.Focus(FocusState.Keyboard);
            Frame.BackStack.Clear();
        }