Geography Reference
In-Depth Information
if (cityList.Count > 0)
{
lsbCountyResults.Items.Add( "Citys in this county" );
foreach ( string city in cityList)
{
lsbCountyResults.Items.Add(city);
}
lsbCountyResults.Items.Add( "" );
}
if (townList.Count > 0)
{
lsbCountyResults.Items.Add( "Towns in this county" );
foreach ( string town in townList)
{
lsbCountyResults.Items.Add(town);
}
lsbCountyResults.Items.Add( "" );
}
Next, we add the status bar message just after the first if statement.
lblStatusText.Text = "Querying Map... please wait for results." ;
Application .DoEvents();
And we add the completed message just before the closing brace.
lblStatusText.Text = "Query finished." ;
Before we go any further, some of you will say, "Wow, what a long method," and wonder
why I'm using Application.DoEvents to make sure the label is updated in an event
handler. Please remember that this is example code only; it's not supposed to be a perfect
example, or simply copy and pasted verbatim to make production-quality apps. Its purpose is
purely to show you how to use SharpMap to create a simple GIS application.
Search WWH ::




Custom Search