コード例 #1
0
        public void LoadRecommendedSites()
        {
            HomepageItems.Clear();
            var recommendedSites = PBData.GetRecommendedSites();

            if (recommendedSites != null)
            {
                foreach (var site in recommendedSites)
                {
                    HomepageItems.Add(new SecureBrowserItem(site));
                }
            }

            HomepageModel = new PageableViewModel <SecureItem>(HomepageItems);
        }
コード例 #2
0
        public void LoadRecentlyUsedItems()
        {
            HomepageItems.Clear();

            var recentlyUsedItemList = PBData.GetSecureItemsByItemType(SecurityItemsDefaultProperties.SecurityItemType_PasswordVault, SecureItemOrderEnum.LastAccess);

            foreach (var item in recentlyUsedItemList)
            {
                HomepageItems.Add(new SecureBrowserItem(item));
                if (HomepageItems.Count() == 24)
                {
                    break;
                }
            }
            HomepageModel = new PageableViewModel <SecureItem>(HomepageItems);
        }
コード例 #3
0
        public void LoadFavoriteItems()
        {
            HomepageItems.Clear();
            var favoriteSecureItemsList = PBData.GetSecureItemsByItemType(SecurityItemsDefaultProperties.SecurityItemType_PasswordVault).Where(x => x.Favorite).ToList();

            if (favoriteSecureItemsList.Count == 0)
            {
                LoadRecentlyUsedItems();
            }
            foreach (var favoriteItem in favoriteSecureItemsList)
            {
                HomepageItems.Add(new SecureBrowserItem(favoriteItem));
                if (HomepageItems.Count() == 24)
                {
                    break;
                }
            }
            HomepageModel = new PageableViewModel <SecureItem>(HomepageItems);
        }