public static CoordinateSystemDefinition NewCoordinateSystem()
 {
     CoordinateSystemDialog diag = new CoordinateSystemDialog();
     _editing = false;
     if (diag.ShowDialog() == DialogResult.OK)
     {
         return new CoordinateSystemDefinition(diag.txtName.Text, diag.txtDescription.Text, diag.txtWKT.Text);
     }
     return null;
 }
示例#2
0
        public static CoordinateSystemDefinition NewCoordinateSystem()
        {
            CoordinateSystemDialog diag = new CoordinateSystemDialog();

            _editing = false;
            if (diag.ShowDialog() == DialogResult.OK)
            {
                return(new CoordinateSystemDefinition(diag.txtName.Text, diag.txtDescription.Text, diag.txtWKT.Text));
            }
            return(null);
        }
 public static bool EditCoordinateSystem(CoordinateSystemDefinition cs)
 {
     CoordinateSystemDialog diag = new CoordinateSystemDialog();
     _editing = true;
     diag.txtName.Text = cs.Name;
     diag.txtName.Enabled = false;
     diag.txtDescription.Text = cs.Description;
     diag.txtWKT.Text = cs.Wkt;
     if (diag.ShowDialog() == DialogResult.OK)
     {
         cs.Name = diag.txtName.Text;
         cs.Description = diag.txtDescription.Text;
         cs.Wkt = diag.txtWKT.Text;
         return true;
     }
     return false;
 }
示例#4
0
        public static bool EditCoordinateSystem(CoordinateSystemDefinition cs)
        {
            CoordinateSystemDialog diag = new CoordinateSystemDialog();

            _editing                 = true;
            diag.txtName.Text        = cs.Name;
            diag.txtName.Enabled     = false;
            diag.txtDescription.Text = cs.Description;
            diag.txtWKT.Text         = cs.Wkt;
            if (diag.ShowDialog() == DialogResult.OK)
            {
                cs.Name        = diag.txtName.Text;
                cs.Description = diag.txtDescription.Text;
                cs.Wkt         = diag.txtWKT.Text;
                return(true);
            }
            return(false);
        }