Ejemplo n.º 1
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();
        }
Ejemplo n.º 2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            ViewModel            = new ImportExportViewModel();
            GridTitre.Background = ContexteAppli.GetColorTheme();

            if (e.Parameter is ImportExportEnum)
            {
                ViewModel.Mode            = ((ImportExportEnum)e.Parameter);
                ViewModel.SelectedDossier = AbstractViewModel.SelectedDossierAbstract;

                switch (ViewModel.Mode)
                {
                case ImportExportEnum.Import:
                    TitrePage.Text           = ResourceLoader.GetForCurrentView().GetString("phraseImporter");
                    DossierTextBox.Text      = ResourceLoader.GetForCurrentView().GetString("phraseExpImport");
                    FormatComboBox.IsEnabled = false;
                    EraseCheckBox.Visibility = Visibility.Visible;
                    break;

                case ImportExportEnum.Export:
                    TitrePage.Text      = ResourceLoader.GetForCurrentView().GetString("phraseExporter");
                    DossierTextBox.Text = ResourceLoader.GetForCurrentView().GetString("phraseExpExport");
                    break;
                }
                AfficherResultatOutil(false);
            }
        }
Ejemplo n.º 3
0
 public ChiffreDechiffreFichierView()
 {
     InitializeComponent();
     GridTitre.Background = ContexteAppli.GetColorTheme();
     _timerCapsLock       = new DispatcherTimer();
     _timerCapsLock.Tick += TimerCapsLockOnTick;
     _timerCapsLock.Start();
 }
Ejemplo n.º 4
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     StackPanelSecurite.Visibility = (ContexteAppli.IsFichierRoamingOuvert)
         ? Visibility.Visible
         : Visibility.Collapsed;
     ViewModel            = new ParamsViewModel();
     GridTitre.Background = ContexteAppli.GetColorTheme();
 }
Ejemplo n.º 5
0
        public AboutPageView()
        {
            InitializeComponent();

            GridTitre.Background = ContexteAppli.GetColorTheme();

            NomAppli.Text = ContexteStatic.NomAppli;
            Version.Text  = ContexteStatic.Version;
            Dev.Text      = ContexteStatic.Developpeur;
        }
Ejemplo n.º 6
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            GridTitre.Background = ContexteAppli.GetColorTheme();

            if (e.Parameter is StorageFile)
            {
                await ViewModel.Init((StorageFile)e.Parameter);
            }

            if (e.Parameter is ObservableCollection <MotDePasse> )
            {
                ViewModel.Init((ObservableCollection <MotDePasse>)e.Parameter);
            }
            ChangeNomButtonValid();
            //ViewModel.ListeMotDePasses = new ObservableCollection<MotDePasse>(ViewModel.ListeMotDePasses);
        }
Ejemplo n.º 7
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            GridTitre.Background = ContexteAppli.GetColorTheme();
            TextTitre.Text       = ResourceLoader.GetForCurrentView().GetString("phraseAcceuilExistant");
            PasswordBoxMdp.Focus(FocusState.Keyboard);
            ViewModel = new ResultCortanaViewModel(e.Parameter as string);

            if (await ViewModel.LanceRechercheSansMotDePasse())
            {
                GridMdp.Visibility    = Visibility.Collapsed;
                GridResult.Visibility = Visibility.Visible;
            }
            else
            {
                GridMdp.Visibility    = Visibility.Visible;
                GridResult.Visibility = Visibility.Collapsed;
            }
        }
Ejemplo n.º 8
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            GridTitre.Background = ContexteAppli.GetColorTheme();
            ViewModel            = new SecureImageViewModel((OuvertureSecureImageEnum)e.Parameter);
            await ViewModel.LoadSecurity();

            if (ViewModel.Mode == OuvertureSecureImageEnum.MODE_CHANGEMENT_IMAGE)
            {
                GridChargement.Visibility = Visibility.Visible;
                GridDeblocage.Visibility  = Visibility.Collapsed;
                AfficherPoints();
            }
            if (ViewModel.Mode == OuvertureSecureImageEnum.MODE_DEBLOCAGE)
            {
                GridDeblocage.Visibility  = Visibility.Visible;
                GridChargement.Visibility = Visibility.Collapsed;
            }
        }
Ejemplo n.º 9
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            ViewModel = new MainPageViewModel();
            ViewModel.OuvrirDossier(AbstractViewModel.SelectedDossierAbstract);

            DerniereSynchroText.Visibility = (ContexteAppli.IsFichierRoamingOuvert)
                ? Visibility.Visible
                : Visibility.Collapsed;


            var couleur = ContexteAppli.GetColorTheme();

            BgColor = couleur;
            DossierSplitview.Background     = couleur;
            DossierSplitview.PaneBackground = couleur;
            GridTitre.Background            = couleur;

            await ViewModel.MajDerniereSynchro();
        }
Ejemplo n.º 10
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            GridTitre.Background = ContexteAppli.GetColorTheme();
            ViewModel            = new AfficherPasswordViewModel(e.Parameter as MotDePasse);

            _timerLogin = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, 1)
            };
            _timerPassword = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, 1)
            };
            _timerCleanClipBoard = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, 1)
            };
            _timerCleanClipBoard.Tick    += timerClean_Tick;
            _timerLogin.Tick             += timerLogin_Tick;
            _timerPassword.Tick          += timerPassword_Tick;
            _compteurSecondeTimerLogin    = 0;
            _compteurSecondeTimerPassword = 0;
            _isTimerLoginLaunch           = false;
            _isTimerPasswordLaunch        = false;
        }
Ejemplo n.º 11
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            GridTitre.Background = ContexteAppli.GetColorTheme();

            //si ont fournit un dossier c'est qu'on veut y ajouter un mot de passe
            var dossier = e.Parameter as Dossier;

            if (dossier != null)
            {
                ViewModel      = new EditPasswordViewModel(dossier);
                TitrePage.Text = ResourceLoader.GetForCurrentView().GetString("phraseAjout");
            }

            //si c'est un mot de passe, c'est qu'ont souhaite le modifier
            var motDePasse = e.Parameter as MotDePasse;

            if (motDePasse != null)
            {
                ViewModel      = new EditPasswordViewModel(motDePasse);
                TitrePage.Text = ResourceLoader.GetForCurrentView().GetString("phraseModification");
            }
        }
Ejemplo n.º 12
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     ViewModel            = new PartageViewModel();
     GridTitre.Background = ContexteAppli.GetColorTheme();
 }
Ejemplo n.º 13
0
        //change la couleur du thème
        private async void Rectangle_Tapped(object sender, TappedRoutedEventArgs e)
        {
            await ViewModel.ChangeCouleur(((SolidColorBrush)((Rectangle)sender).Tag));

            GridTitre.Background = ContexteAppli.GetColorTheme();
        }
Ejemplo n.º 14
0
 public OutilsView()
 {
     InitializeComponent();
     GridTitre.Background = ContexteAppli.GetColorTheme();
 }