public void Delete(bool all)
{
string dbpath = System.IO.Path.GetDirectoryName(db_name);
try
{
foreach (string f in System.IO.Directory.GetFiles(dbpath))
{
if (!all)
{
if (f.ToLower() != this.db_name.ToLower())
{
System.IO.File.Delete(f);
}
}
else
{
System.IO.File.Delete(f);
}
}
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message);
}
}