Beispiel #1
0
 private void BtnChangeToSelectedClick(object sender, EventArgs e)
 {
     using var pf = new ProjectionSelectDialog();
     pf.SelectedCoordinateSystem = Projection;
     pf.ChangesApplied          += PfOnChangesApplied;
     pf.ShowDialog(this);
     pf.ChangesApplied -= PfOnChangesApplied;
 }
        private void btnChangeProjection_Click(object sender, EventArgs e)
        {
            ProjectionSelectDialog projDialog = new ProjectionSelectDialog();

            projDialog.SelectedCoordinateSystem = _projection;
            if (projDialog.ShowDialog() == DialogResult.OK)
            {
                _projection = projDialog.SelectedCoordinateSystem;
                UpdateProjectionStrings();
                _changesApplied = false;
            }
        }
Beispiel #3
0
 /// <summary>
 /// Changes the projection of this param via the ProjectionSelectDialog.
 /// </summary>
 /// <param name="sender">Sender that raised the event.</param>
 /// <param name="e">The event args.</param>
 private void CmdSelectClick(object sender, EventArgs e)
 {
     using (ProjectionSelectDialog dlg = new ProjectionSelectDialog())
     {
         if (dlg.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         if (Param == null)
         {
             Param = new ProjectionParam("destination projection", dlg.SelectedCoordinateSystem);
         }
         else
         {
             Param.Value = dlg.SelectedCoordinateSystem;
         }
     }
 }
Beispiel #4
0
        private void CmdSelectClick(object sender, EventArgs e)
        {
            ProjectionSelectDialog dlg = new ProjectionSelectDialog();

            if (dlg.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (Param == null)
            {
                Param = new ProjectionParam("destination projection", dlg.SelectedCoordinateSystem);
            }
            else
            {
                Param.Value = dlg.SelectedCoordinateSystem;
            }
            lblProjection.Text = Param.Value.ToProj4String();
            _tthelp.SetToolTip(lblProjection, Param.Value.ToProj4String());
        }
Beispiel #5
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService svc = (IWindowsFormsEditorService)
                                             provider.GetService(typeof(IWindowsFormsEditorService));

            if (svc != null)
            {
                ProjectionSelectDialog form = new ProjectionSelectDialog();
                if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    value = form.SelectedCoordinateSystem;
                }
                else
                {
                    value = KnownCoordinateSystems.Geographic.World.WGS1984;
                }
            }
            return(value);
        }