Exemplo n.º 1
0
        /// <summary>
        /// Commit password entry creation
        /// </summary>
        private void CreateEntry()
        {
            var copy = PasswordEntry.Copy();

            databaseRepository.AddPasswordEntry(copy);
            iconsService.DownloadIcon(copy.Website);
            Messenger.Default.Send(new EntryAddedMessage(this, copy));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Commit the edition
        /// </summary>
        private void ValidateEdition()
        {
            // Copy to avoid same instance manipulation
            var copy = PasswordEntry.Copy();

            databaseRepository.UpdatePasswordEntry(copy);
            iconsService.DownloadIcon(copy.Website);
            Messenger.Default.Send(new EntryEditedMessage(this, copy));
            RaisePropertyChanged(nameof(PasswordEntry));
            SetElementsVisibility(ViewModes.View);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Set the view mode to edition
 /// </summary>
 private void StartEdition()
 {
     backupPasswordEntry            = PasswordEntry.Copy();
     PasswordEntry.PropertyChanged += PasswordPropertyChanged;
     SetElementsVisibility(ViewModes.Edition);
 }