ShowAndDoWork() public method

public ShowAndDoWork ( Action work ) : void
work Action
return void
Ejemplo n.º 1
0
 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));
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 /// <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));
     }
 }