private void importAddressingDistrictsToolStripMenuItem_Click(object sender, EventArgs e) { dlgOpenMdbFile.Title = "Please select an addressing database"; dlgOpenMdbFile.FileName = "*.mdb"; dlgOpenMdbFile.Filter = "Addressing Database|*.mdb"; if (dlgOpenMdbFile.ShowDialog() == DialogResult.OK) { try { var mDistrictsFeatureSet = ExtFunctions.GetDistrictsFeatureSetFromAdmAdrMdb(ref this.pgBar, dlgOpenMdbFile.FileName, 0); if (mDistrictsFeatureSet == null) { return; } var mDistrictsLayer = ExtFunctions.GetFeatureLayer(theMap.Layers, mDistrictsFeatureSet, "Districts", MapSymbols.PolygonSymbol(Color.Transparent, Color.Red), KnownCoordinateSystems.Projected.UtmWgs1984.WGS1984UTMZone40N); mDistrictsLayer.DataSet.ExportToShapeUsingOgr(DistrictImport.GetShapefileName()); mDistrictsLayer.Reproject(theMap.Projection); theMap.Refresh(); // Set properties Properties.Settings.Default.DistrictFilePresent = true; Properties.Settings.Default.DistrictImportFileDate = DateTime.Now; Log("Operation completed, saved imported districts to: " + DistrictImport.GetShapefileName()); } catch (Exception ex) { Log("Operation aborted: " + ex.Message); Log("Look for issues with duplicate district abbreviations and make sure that you have selected an 'adm-adr' ESRI Personal Geodatabase file that contains districts..."); } } }