public SearchGUI(GUI parent, CountryTree tree) { InitializeComponent(); _parent = parent; _tree = tree; lstResults.DataSource = _tree.ToArray(); }
public PartnersGUI(CountryTree tree, Country selectedCountry) { InitializeComponent(); txtCountry.Text = selectedCountry.ToString(); var countries = tree.ToArray().Where(country => country.MainTradePartners.Contains(selectedCountry)).ToList(); foreach (var country in selectedCountry.MainTradePartners) { if (!countries.Contains(country)) { countries.Add(country); } } countries.Sort(); lstPartners.DataSource = countries; }