private void btnAddEpsg_Click(object sender, EventArgs e) { if (_metadata != null) { ProjDBTables tables = new ProjDBTables(); FormSpatialReferenceSystems dlg = new FormSpatialReferenceSystems(tables); if (dlg.ShowDialog() == DialogResult.OK) { try { ISpatialReference sRef = dlg.SpatialRefererence; if (!sRef.Name.ToLower().StartsWith("epsg:")) { MessageBox.Show("Only spatialreference system with EPSG-Code allowed"); return; } int epsg = int.Parse(sRef.Name.Split(':')[1]); if (!_metadata.EPSGCodes.Contains(epsg)) { _metadata.EPSGCodes.Add(epsg); } FillEpsgList(); cmbEpsgs.SelectedItem = epsg; } catch (Exception ex) { MessageBox.Show(ex.Message); return; } } } }
public FormSpatialReferenceSystems(ProjDBTables table) { // // Erforderlich für die Windows Form-Designerunterstützung // InitializeComponent(); _table = table; }
public ProjDB(ProjDBTables table) : this(table.ToString()) { }
public FormSpatialReferenceSystems(ProjDBTables table, string filter) : this(table) { _filter = filter; }