/// <summary> /// Method is invoked when drop element is closed. /// </summary> /// <param name="bookmarks"></param> /// <param name="selectedPath"></param> /// <param name="result"></param> private void DropDownClosedResult(IBookmarkedLocationsViewModel bookmarks, string selectedPath, FolderBrowser.Dialogs.Interfaces.Result result) { if (result == FolderBrowser.Dialogs.Interfaces.Result.OK) { this.BookmarkedLocations = bookmarks.Copy(); this.NewSolutionLocation = selectedPath; var optGroup = GetService <ISettingsManager>().Options.GetOptionGroup("Options"); EditBookmarksViewModel.SaveBookmarksToModel(BookmarkedLocations.DropDownItems, optGroup); } }
/// <summary> /// Constructs a few initial entries for /// the recent folder collection that implements folder bookmarks. /// </summary> /// <returns></returns> private IBookmarkedLocationsViewModel ConstructBookmarks() { IBookmarkedLocationsViewModel ret = FolderBrowserFactory.CreateReceentLocationsViewModel(); var optGroup = GetService <ISettingsManager>().Options.GetOptionGroup("Options"); EditBookmarksViewModel.LoadBookMarkOptionsFromModel(GetService <ISettingsManager>().Options, ret); if (ret.DropDownItems.Count > 0) { ret.SelectedItem = ret.DropDownItems[0]; } return(ret); }