//---------------------------------------------------------------------
 private void Update(ProgressBar progressBar,
     uint        currentSiteDataIndex)
 {
     uint increment = (uint) (prevSiteDataIndex.HasValue
                                 ? (currentSiteDataIndex - prevSiteDataIndex.Value)
                                 : currentSiteDataIndex);
     progressBar.IncrementWorkDone(increment);
     prevSiteDataIndex = currentSiteDataIndex;
 }
 //---------------------------------------------------------------------
 private void CleanUp(ProgressBar progressBar)
 {
     if (! prevSiteDataIndex.HasValue) {
         //    Then no sites were processed; the site iterator was a
         //    disturbed-sites iterator, and there were no disturbed
         //    sites.  So increment the progress bar to 100%.
         progressBar.IncrementWorkDone((uint) Model.Core.Landscape.ActiveSiteCount);
     }
 }