private void comboBoxServers_SelectedIndexChanged(object sender, EventArgs e) { _currentCursor = Cursor.Current; Cursor.Current = Cursors.WaitCursor; _wmsCapabilitiesState.Clear(); _wmsClientState.Clear(); _featureLayerState.Clear(); this.Refresh(); _serverInfo = comboBoxServers.SelectedItem as WmsServerInfo; try { _wmsCapabilitiesState.Set(_serverInfo.Capabilities); _wmsClientState.Set(_serverInfo.Client); _featureLayerState.Set(_serverInfo.FeatureLayer); } catch (System.Net.WebException x) { showError(x.Message); } catch (System.ApplicationException x) { showError(x.Message); } Cursor.Current = _currentCursor; }
private void LoadServerList(WmsServerInfo[] serverList) { _comboBoxServers.Items.Clear(); foreach (WmsServerInfo si in serverList) { _comboBoxServers.Items.Add(si); } _comboBoxServers.SelectedIndex = _comboBoxServers.FindString(_defaultServer); }