async void removeButton_Click(object sender, EventArgs e) { if (this.stateList.SelectedItem == null) { MessageBox.Show(AppResources.RemoveStateNoSelection, AppResources.ErrorCaption, MessageBoxButton.OK); return; } bool result = await FileHandler.DeleteSaveState(this.stateList.SelectedItem as SavestateEntry); if (!result) { MessageBox.Show(AppResources.ManageDeleteUnknownError, AppResources.ErrorCaption, MessageBoxButton.OK); return; } this.stateList.ItemsSource = null; this.stateList.ItemsSource = this.db.GetSavestatesForROM(this.romEntry); }