public void PageChanged(string id)
{
Image image;
if (_images.TryGetValue(id, out image))
{
_images.Remove(id);
if (image.Tag != null)
{
string thumbnailPath = image.Tag as string;
if (!string.IsNullOrEmpty(thumbnailPath))
{
if (RobustFile.Exists(thumbnailPath))
{
try
{
RobustFile.Delete(thumbnailPath);
}
catch (Exception)
{
Debug.Fail("Could not delete path (would not see this in release version)");
//oh well, couldn't delete it);
throw;
}
}
}
}
image.Dispose();
}
}