/// <summary> /// user has selected or de-selected a content language /// </summary> public void ContentLanguagesSelectionChanged() { Logger.WriteEvent("Changing Content Languages"); string l2 = null; string l3 = null; foreach (var language in _contentLanguages) { if (language.Locked) { continue; //that's the vernacular } if (language.Selected && l2 == null) { l2 = language.Iso639Code; } else if (language.Selected) { l3 = language.Iso639Code; break; } } //Reload to display these changes SaveNow(); CurrentBook.SetMultilingualContentLanguages(l2, l3); CurrentBook.PrepareForEditing(); _view.UpdateSingleDisplayedPage(_pageSelection.CurrentSelection); _view.UpdatePageList(true); //counting on this to redo the thumbnails Logger.WriteEvent("ChangingContentLanguages"); Analytics.Track("Change Content Languages"); }
public void ViewVisibleNowDoSlowStuff() { if (_currentlyDisplayedBook != CurrentBook) { CurrentBook.PrepareForEditing(); } _currentlyDisplayedBook = CurrentBook; var errors = _bookSelection.CurrentSelection.GetErrorsIfNotCheckedBefore(); if (!string.IsNullOrEmpty(errors)) { Palaso.Reporting.ErrorReport.NotifyUserOfProblem(errors); return; } var page = _bookSelection.CurrentSelection.FirstPage; if (page != null) { _pageSelection.SelectPage(page); } if (_view != null) { if (ShowTemplatePanel) { _view.UpdateTemplateList(); } _view.UpdatePageList(false); } }
public void SetLayout(Layout layout) { SaveNow(); CurrentBook.SetLayout(layout); CurrentBook.PrepareForEditing(); _view.UpdateSingleDisplayedPage(_pageSelection.CurrentSelection); _view.UpdatePageList(true); //counting on this to redo the thumbnails }