private void PopulateWeatherItemsTableProc()
{
//hide the refresh button and show the progressbar
ShowProgressBar();
//iterate through the citynames
foreach(string s in m_cityNames)
{
//create new record
DataRow r = m_weatherItemsTable.NewRow();
//add the cityname to the record
r[0] = s;
//add the record to the table
lock(m_weatherItemsTable)
{
m_weatherItemsTable.Rows.Add(r);
}
//add the cityName to the listbox
AddListItemString(s);
//set the progress of the progressbar
IncrementProgressBar();
}
//hide the progressbar and show the refresh button
HideProgressBar();
}