private Tuple<List<RegionPopulationInfo>, List<string>> ParseAndMatch() { if (_pp == null) _pp = new Parsers.PopulationParser(); var result = _pp.ParseCompleteSimulationInputData(txBoxPopulationFile.Text, txBoxTextfile.Text, txBoxImage.Text); txBoxMatchResults.Text += "Following regions could get matched: (" + result.Item1.Count + ")" + Environment.NewLine; //lBoxMatches.Items.Add("Following regions could get matched:"); foreach (var item in result.Item1) { txBoxMatchResults.Text += item.Name + Environment.NewLine; //lBoxMatches.Items.Add(item.Name); } //lBoxMatches.Items.Add("Follwing regions could not be matched: (check for typos)"); txBoxMatchResults.Text += "Following regions could not be matched: (" + result.Item2.Count + ") (check for typos)" + Environment.NewLine; foreach (var item in result.Item2) { txBoxMatchResults.Text += item + Environment.NewLine; //lBoxMatches.Items.Add(item); } return result; }
private void btnParse_Click(object sender, EventArgs e) { if (_pp == null) _pp = new Parsers.PopulationParser(); foreach (RegionPopulationInfo info in _pp.ParsePopulationFile(txBoxPopulationFile.Text)) { lBoxCities.Items.Add(info); } }