/// <summary> /// Reset the view model to those options that are going to be presented for editing. /// </summary> /// <param name="settingData"></param> public override void ApplyOptionsFromModel(IEngine optionsEngine) { var group = optionsEngine.GetOptionGroup("Options"); Bookmarks.Clear(); EditBookmarksViewModel.LoadOptionsFromModel(group, Bookmarks); if (Bookmarks.Count > 0) { BookmarkSelected = Bookmarks[0]; } // Construct bookmark collection and folder browser viewmodels BookmarkedLocations = this.ConstructBookmarks(); DropDownBrowser = InitializeDropDownBrowser(BookmarkSelected); }
/// <summary> /// Reset the view model to those options that are going to be presented for editing. /// </summary> /// <param name="settingData"></param> public override void ApplyOptionsFromModel(IEngine optionsEngine) { var group = optionsEngine.GetOptionGroup("Options"); LoadOptionsFromModel(group); if (mBookmarkedFolders != null) { mBookmarkedFolders.DirtyFlagChangedEvent -= BookmarkedFolders_DirtyFlagChangedEvent; mBookmarkedFolders = null; } // Construct bookmark collection and folder browser viewmodels BookmarkedFolders = new EditBookmarksViewModel(Local.Strings.STR_BOOKMARKS_OPTION_CAPTION); BookmarkedFolders.DirtyFlagChangedEvent += BookmarkedFolders_DirtyFlagChangedEvent; BookmarkedFolders.ApplyOptionsFromModel(optionsEngine); }