public PasswordFolderViewModel(PasswordFolder passwordFolder, PasswordFolderViewModel containingFolder)
        {
            PasswordFolder = passwordFolder;
            ContainingFolder = containingFolder;

            SubFolders = new ReadOnlyCollection<PasswordFolderViewModel>(
                (from subFolder in passwordFolder.SubFolders
                    select new PasswordFolderViewModel(subFolder, this))
                    .ToList<PasswordFolderViewModel>());

            PasswordEntries = new ReadOnlyCollection<PasswordEntryViewModel>(
                (from passwordEntry in passwordFolder.PasswordEntries
                     select new PasswordEntryViewModel(passwordEntry, this))
                     .ToList<PasswordEntryViewModel>());
        }
 public PasswordStoreTreeViewModel(PasswordFolder passwordFolder)
 {
     RootPasswordFolder = new PasswordFolderViewModel(passwordFolder);
 }
 public PasswordEntryViewModel(PasswordEntry passwordEntry, PasswordFolderViewModel containingFolder)
 {
     PasswordEntry = passwordEntry;
     ContainingFolder = containingFolder;
 }