/// <summary> /// refresh botton click event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnRefreshList_Click(object sender, System.EventArgs e) { //clear all the items on the list m_weatherItemsTable.Rows.Clear(); //get an up-to-date list of citynames m_cityNames = m_weatherLayer.GetCityNames(); //add the citynames to the listbox PopulateList(); }
/// <summary> /// Ctor /// </summary> /// <param name="weatherLayer"></param> public WeatherItemSelectionDlg(RSSWeatherLayer3DClass weatherLayer) { InitializeComponent(); //get the layer m_weatherLayer = weatherLayer; //get the list of all citynames for all items in the layer m_cityNames = m_weatherLayer.GetCityNames(); //create a table to host the citynames m_weatherItemsTable = new DataTable("CityNames"); m_weatherItemsTable.Columns.Add("CITYNAME", typeof(string)); //populate the listbox and build a table containing the items PopulateList(); }