public void downloadMods() { foreach (Item mod in downloadableListPopup.selectedItems()) { modManager.installMod((Repo)repoListPopup.selectedItem(), (Mod)mod); } downloadableListPopup.SetItemList(repoManager.getModListForRepo((Repo)repoListPopup.selectedItem())); downloadableListPopup.setSelectedItems(new List <Item> ()); modListPopup.SetItemList(modManager.installedMods); App.Popups.KillCurrentPopup(); }
public void ItemClicked(UIListPopup popup, Item card) { if (popup == repoListPopup) { repoListPopup.setSelectedItem(card); downloadableListPopup.SetItemList(repoManager.getModListForRepo((Repo)repoListPopup.selectedItem())); } if (popup == downloadableListPopup) { System.Diagnostics.Process.Start((repoListPopup.selectedItem() as Repo).url + "mod/" + (downloadableListPopup.selectedItem() as Mod).id); } if (popup == modListPopup) { if (modListPopup.selectedItems().Contains(card)) { modManager.enableMod((LocalMod)card); } else { modManager.disableMod((LocalMod)card); } modListPopup.SetItemList(modManager.installedMods); } }