/// <summary> /// Defragments the database. /// </summary> private void DefragmentDatabase() { try { booksManager.DefragmentDatabase(); } catch (BookEntitiesException) { string errorMessage = String.Format("{0}\r\n{1}", "Could not defragment the database.", "Exiting the application."); MessageBox.Show(errorMessage, "Database Defragmentation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } }