Ejemplo n.º 1
0
        /// <summary>
        /// Action lors du clic sur le label "lbl_aCardUpdate".
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void lbl_aCardUpdate_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            // Assigne les données d'une fiche d'authentification pour la modifier.
            Label  clickedLabel = sender as Label;
            string authenCardID = clickedLabel.Name.Substring(13);

            List <string> authenCardName = VaultDatabase.GetACardNameList(authenCardID);
            List <string> authenCardShc  = VaultDatabase.GetACardShcList(authenCardID);

            List <byte[]> authenCardCipheredUsn = VaultDatabase.GetACardUsnList(authenCardID);
            List <string> authenCardPlainUsn    = PlainData(authenCardCipheredUsn);

            List <byte[]> authenCardCipheredPwd = VaultDatabase.GetACardPwdList(authenCardID);
            List <string> authenCardPlainPwd    = PlainData(authenCardCipheredPwd);

            List <byte[]> authenCardCipheredScrNote = VaultDatabase.GetACardScrNoteList(authenCardID);
            List <string> authenCardPlainScrNote    = PlainData(authenCardCipheredScrNote);

            bool          authenCardBookmark = VaultDatabase.GetACardBookmark(authenCardID);
            List <string> authenCardCrtDate  = VaultDatabase.GetACardCrtDate(authenCardID);
            List <string> authenCardChgDate  = VaultDatabase.GetACardChgDate(authenCardID);
            List <string> authenCardCategory = VaultDatabase.GetACardCategory(authenCardID);

            List <string> authenCardData = new List <string>();

            authenCardData.Add(authenCardName[0]);
            authenCardData.Add(authenCardShc[0]);
            authenCardData.Add(authenCardPlainUsn[0]);
            authenCardData.Add(authenCardPlainPwd[0]);
            authenCardData.Add(authenCardPlainScrNote[0]);
            authenCardData.Add(authenCardBookmark.ToString());
            authenCardData.Add(authenCardCrtDate[0]);
            authenCardData.Add(authenCardChgDate[0]);
            authenCardData.Add(authenCardCategory[0]);
            authenCardData.Add(authenCardID);

            usc_authenCard usc_authenCardHome = new usc_authenCard(authenCardData);

            Switcher.Switch(usc_authenCardHome);

            return;
        }