Exemplo n.º 1
0
        /// <summary>
        /// The list view of folders and files requests to add or remove a folder
        /// to/from the collection of recent folders.
        /// -> Forward event to <seealso cref="FolderComboBoxViewModel"/> who manages
        /// the actual list of recent folders.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void FolderItemsView_RequestEditBookmarkedFolders(object sender, EditBookmarkEvent e)
        {
            switch (e.Action)
            {
            case EditBookmarkEvent.RecentFolderAction.Remove:
                this.RecentFolders.RemoveFolder(e.Folder.Path);
                break;

            case EditBookmarkEvent.RecentFolderAction.Add:
                this.RecentFolders.AddFolder(e.Folder.Path);
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Removes or adds a folder bookmark if the event requests that.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BookmarkFolder_RequestEditBookmarkedFolders(object sender, EditBookmarkEvent e)
        {
            switch (e.Action)
            {
            case EditBookmarkEvent.RecentFolderAction.Remove:
                BookmarkedLocations.RemoveFolder(e.Folder.Path);
                break;

            case EditBookmarkEvent.RecentFolderAction.Add:
                BookmarkedLocations.AddFolder(e.Folder.Path);
                break;

            default:
                throw new System.NotImplementedException(e.Action.ToString());
            }
        }