Пример #1
0
        /// <summary>
        /// Constructs a few initial entries for
        /// the recent folder collection that implements folder bookmarks.
        /// </summary>
        /// <returns></returns>
        private IBookmarksViewModel ConstructBookmarks()
        {
            IBookmarksViewModel ret = FileSystemModels.Factory.CreateBookmarksViewModel();

            ret.AddFolder(@"C:\Windows");
            ret.AddFolder(@"C:\Users");
            ret.AddFolder(@"C:\Program Files");

            ret.SelectedItem = ret.DropDownItems.First();

            return(ret);
        }
Пример #2
0
        /// <summary>
        /// Copies all of the given bookmars into the destionations bookmarks collection.
        /// </summary>
        /// <param name="srcRecentFolders"></param>
        /// <param name="dstRecentFolders"></param>
        public void CloneBookmarks(IBookmarksViewModel srcRecentFolders,
                                   IBookmarksViewModel dstRecentFolders)
        {
            if (srcRecentFolders == null || dstRecentFolders == null)
                return;

            dstRecentFolders.ClearFolderCollection();

            // Set collection of recent folder locations
            foreach (var item in srcRecentFolders.DropDownItems)
                dstRecentFolders.AddFolder(item.ItemPath);
        }