/// <summary> /// Invokes a prompt to select the coordinate system /// </summary> /// <returns></returns> public string GetCoordinateSystem() { var dlg = new CoordinateSystemPicker(_conn.CoordinateSystemCatalog); if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { return(dlg.SelectedCoordSys.WKT); } return(string.Empty); }
private void btnPickCs_Click(object sender, EventArgs e) { using (var picker = new CoordinateSystemPicker(_conn.CoordinateSystemCatalog)) { if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK) { var cs = picker.SelectedCoordSys; txtCoordinateSystem.Text = cs.WKT; } } }
internal string PickCoordinateSystemCode() { CoordinateSystemPicker picker = new CoordinateSystemPicker(_conn.CoordinateSystemCatalog); if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK) { var cs = picker.SelectedCoordSys; return(cs.Code); } return(null); }
private void btnOtherSRS_Click(object sender, EventArgs e) { using (var picker = new CoordinateSystemPicker(m_connection.CoordinateSystemCatalog)) { if (picker.ShowDialog() == DialogResult.OK) { var cs = picker.SelectedCoordSys; if (!string.IsNullOrEmpty(cs.EPSG)) { txtOtherSRS.Text = $"EPSG:{cs.EPSG}"; //NOXLATE } } } }
public override void Run() { var wb = Workbench.Instance; var exp = wb.ActiveSiteExplorer; var mgr = ServiceRegistry.GetService <ServerConnectionManager>(); var conn = mgr.GetConnection(exp.ConnectionName); var picker = new CoordinateSystemPicker(conn.CoordinateSystemCatalog); if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK) { MessageService.ShowMessage(picker.SelectedCoordSys.ToString()); } else { MessageService.ShowMessage(Strings.Cancelled); } }