private void InfoButton_Click(object sender, RoutedEventArgs e) { Mods.ModListItem mod = ((Mods.ModListItem)Mods.Instance.ModsListView.SelectedItem); string infoUrl = mod.ModInfo.link; if (String.IsNullOrEmpty(infoUrl)) { MessageBox.Show(mod.ModName + " does not have an info page"); } else { System.Diagnostics.Process.Start(infoUrl); } }
private void InfoButton_Click(object sender, RoutedEventArgs e) { if ((Mods.ModListItem)Mods.Instance.ModsListView.SelectedItem == null) { MessageBox.Show((string)Application.Current.FindResource("MainWindow:NoModSelected")); return; } Mods.ModListItem mod = ((Mods.ModListItem)Mods.Instance.ModsListView.SelectedItem); string infoUrl = mod.ModInfo.link; if (string.IsNullOrEmpty(infoUrl)) { MessageBox.Show(string.Format((string)Application.Current.FindResource("MainWindow:NoModInfoPage"), mod.ModName)); } else { System.Diagnostics.Process.Start(infoUrl); } }