public void StartDelete(List <Geocache> caches, OCMMainWindow win) { this.copyLabel.Markup = Catalog.GetString("<big><b>Deleting Geocaches</b></big>"); this.Title = Catalog.GetString("Delete Caches...."); targetDBLabel.Visible = false; TargetLabel.Visible = false; ACacheStore store = win.App.CacheStore; store.StartUpdate(); double count = 0; total = caches.Count; foreach (Geocache cache in caches) { if (cancel) { store.CancelUpdate(); this.Hide(); this.Dispose(); return; } count++; DeleteProgress(count, cache.Name); store.DeleteWaypoint(cache.Name); win.DeleteCacheImages(cache.Name); } statusLabel.Markup = Catalog.GetString("<i>Complete</i>"); progressBar.Text = Catalog.GetString("Complete"); buttonOk.Visible = true; buttonCancel.Visible = false; store.CompleteUpdate(); }