RSSWeatherLayer.WeatherItemSelectionDlg.ShowProgressBar C# (CSharp) Method

ShowProgressBar() private method

show the progressbar and hide the refresh button
private ShowProgressBar ( ) : void
return void
    private void ShowProgressBar()
    {
      //test whether Invoke is required (was this call made on a different thread than the main thread?)
      if (this.lstWeatherItemNames.InvokeRequired)
      {
        //call itself on the main thread
        ShowProgressBarCallBack d = new ShowProgressBarCallBack(ShowProgressBar);
        this.Invoke(d);
      }
      else
      {
        //clear all the rows from the table
        m_weatherItemsTable.Rows.Clear();

        //clear all the items of the listbox
        lstWeatherItemNames.Items.Clear();

        //set the progressbar properties
        int count = m_cityNames.Length;
        progressBar1.Maximum = count;
        progressBar1.Value = 0;
        btnRefreshList.Visible = false;
        progressBar1.Visible = true;
        this.UpdateStyles();
      }
    }