private void MakeGui() { cmbDatabaseViews.Items.Clear(); cmbRefFeatureClass.Items.Clear(); if (_dataset == null) { return; } foreach (IDatasetElement element in _dataset.Elements) { if (element.Class is IFeatureClass) { if (element.Class.Name.Contains("@")) { continue; } cmbRefFeatureClass.Items.Add(new FeatureClassItem((IFeatureClass)element.Class)); } } AccessFDB fdb = _dataset.Database as AccessFDB; if (fdb != null) { foreach (string view in fdb.DatabaseViews()) { IFields fields = fdb.TableFields(view); if (fields == null || fields.FindField("FDB_OID") == null || fields.FindField("FDB_SHAPE") == null || fields.FindField("FDB_NID") == null) { continue; } cmbDatabaseViews.Items.Add(view); } } }