private void btnUninstall_Click(object sender, RoutedEventArgs e) { if (!IsModSelected()) { return; } InstalledModViewModel selected = (lstMods.SelectedItem as InstalledModViewModel); MessageDialogWindow messageDialog = new MessageDialogWindow("Uninstall Warning", $"Are you sure you want to delete {selected.Name}?", MessageBoxButton.YesNo, MessageBoxImage.Warning); messageDialog.ShowDialog(); if (messageDialog.ViewModel.Result == MessageBoxResult.Yes) { ViewModel.UninstallMod(selected); } }
private void btnUninstall_Click(object sender, RoutedEventArgs e) { if (!IsModSelected()) { return; } InstalledModViewModel selected = (lstMods.SelectedItem as InstalledModViewModel); MessageDialogWindow messageDialog = new MessageDialogWindow(ResourceHelper.Get(StringKey.UninstallWarning), $"{ResourceHelper.Get(StringKey.AreYouSureYouWantToDelete)} {selected.Name}?", MessageBoxButton.YesNo, MessageBoxImage.Warning); messageDialog.ShowDialog(); if (messageDialog.ViewModel.Result == MessageBoxResult.Yes) { ViewModel.UninstallMod(selected); } }