public TeamInfo(string selectedTeam) { teamPartial = WPFRepo.GetTeamVM(selectedTeam); Topmost = true; InitializeComponent(); }
public static TeamPartial GetTeamVM(string selectFavouriteTeam) { TeamPartial team = new TeamPartial(); try { foreach (var item in TeamPartials) { if (item.GetCountryAndCode() == selectFavouriteTeam) { team = item; } } } catch (Exception) { throw new Exception("Nema podatka o momčadi."); } return(team); }