Exemple #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     var dlg = new CoordSysOverrideDialog(_ed);
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         _fs.AddSpatialContextOverride(dlg.CsName, dlg.CoordinateSystemWkt);
         UpdateSpatialContextList();
         OnResourceChanged();
     }
 }
Exemple #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (grdOverrides.SelectedRows.Count != 1)
                return;

            var sc = (ISpatialContextInfo)grdOverrides.SelectedRows[0].DataBoundItem;
            var dlg = new CoordSysOverrideDialog(_ed);
            dlg.CsName = sc.Name;
            dlg.CoordinateSystemWkt = sc.CoordinateSystem;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                sc.Name = dlg.CsName;
                sc.CoordinateSystem = dlg.CoordinateSystemWkt;
                UpdateSpatialContextList();
                OnResourceChanged();
            }
        }