public void CopyImageMetadataToWholeBook(Metadata metadata) { using (var dlg = new ProgressDialogForeground())//REVIEW: this foreground dialog has known problems in other contexts... it was used here because of its ability to handle exceptions well. TODO: make the background one handle exceptions well { dlg.ShowAndDoWork(progress => CurrentBook.CopyImageMetadataToWholeBookAndSave(metadata, progress)); } }
public void BringBookUpToDate() { var b = _bookSelection.CurrentSelection; _bookSelection.SelectBook(null); using (var dlg = new ProgressDialogForeground()) //REVIEW: this foreground dialog has known problems in other contexts... it was used here because of its ability to handle exceptions well. TODO: make the background one handle exceptions well { dlg.ShowAndDoWork(progress=>b.BringBookUpToDate(progress)); } _bookSelection.SelectBook(b); }
/// <summary> /// Before calling this, ConfigurationData has to be loaded. E.g., by running ShowConfigurationDialog() /// </summary> /// <param name="bookPath"></param> public void ConfigureBook(string bookPath) { using (var dlg = new ProgressDialogForeground()) { dlg.Text = L10NSharp.LocalizationManager.GetString("CollectionTab.ConfiguringBookMessage", "Building..."); dlg.ShowAndDoWork((progress) => ConfigureBookInternal(bookPath)); } }