public void DeleteException (Exception e, string fname)
{
string ok_caption = Catalog.GetString ("_Ok");
string error = Catalog.GetString ("Error Deleting Picture");
string msg;
if (e is UnauthorizedAccessException)
msg = String.Format (
Catalog.GetString ("No permission to delete the file:{1}{0}"),
fname, Environment.NewLine).Replace ("_", "__");
else
msg = String.Format (
Catalog.GetString ("An error of type {0} occurred while deleting the file:{2}{1}"),
e.GetType (), fname.Replace ("_", "__"), Environment.NewLine);
HigMessageDialog.RunHigConfirmation (
main_window, DialogFlags.DestroyWithParent, MessageType.Error,
error, msg, ok_caption);
}