private void cmdDelete_Click(object sender, EventArgs e) { var msg = string.Format( Properties.Resources.ConfirmDeleteDb, _database.Details.Name); var confirm = MessageBox.Show(msg, Properties.Resources.DeleteDbTitle, MessageBoxButton.OKCancel) == MessageBoxResult.OK; if (!confirm) { return; } _database.Delete(); TilesManager.Deleted(_database); this.NavigateTo <MainPage>(); }
private void mnuDelete_Click(object sender, RoutedEventArgs e) { var item = (MenuItem)sender; var database = (DatabaseInfo)item.Tag; var msg = string.Format( Properties.Resources.ConfirmDeleteDb, database.Details.Name); var confirm = MessageBox.Show(msg, Properties.Resources.DeleteDbTitle, MessageBoxButton.OKCancel) == MessageBoxResult.OK; if (!confirm) { return; } database.Delete(); TilesManager.Deleted(database); RefreshDbList(false, null); }