private void BulidGN_Configuration_Load(object sender, EventArgs e) { if (BulidGeometryNetworkHelper.BulidGNHelper.UseDefaultConfigKey) { this.radioGroup1.SelectedIndex = 0; BulidGeometryNetworkHelper.BulidGNHelper.ConfigurationKeyword = ""; } else { this.radioGroup1.SelectedIndex = 1; BulidGeometryNetworkHelper.BulidGNHelper.ConfigurationKeyword = this.comboBoxEdit.Text; } IWorkspaceConfiguration workspace = BulidGeometryNetworkHelper.BulidGNHelper.FeatureDataset.Workspace as IWorkspaceConfiguration; if (workspace != null) { IEnumConfigurationKeyword configurationKeywords = workspace.ConfigurationKeywords; configurationKeywords.Reset(); for (IConfigurationKeyword keyword2 = configurationKeywords.Next(); keyword2 != null; keyword2 = configurationKeywords.Next()) { if (keyword2.KeywordType == esriConfigurationKeywordType.esriConfigurationKeywordNetwork) { this.comboBoxEdit.Properties.Items.Add(keyword2.Name); } this.comboBoxEdit.SelectedIndex = 0; } } }
private void method_2(IWorkspaceConfiguration iworkspaceConfiguration_0) { IEnumConfigurationKeyword configurationKeywords = iworkspaceConfiguration_0.ConfigurationKeywords; configurationKeywords.Reset(); for (IConfigurationKeyword keyword2 = configurationKeywords.Next(); keyword2 != null; keyword2 = configurationKeywords.Next()) { this.cboConfigKey.Properties.Items.Add(keyword2.Name); } }
public static List <IConfigurationKeyword> GetConfigurationKeywordList(IWorkspace pWS) { List <IConfigurationKeyword> pList = new List <IConfigurationKeyword>(); IWorkspaceConfiguration pWConfig = pWS as IWorkspaceConfiguration; IEnumConfigurationKeyword pEnumConfig = pWConfig.ConfigurationKeywords; IConfigurationKeyword pConfig = pEnumConfig.Next(); while (pConfig != null) { pList.Add(pConfig); pConfig = pEnumConfig.Next(); } return(pList); }