Exemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            //定义坐标系统
            FrmSetCoordSys frmSetCoord = new FrmSetCoordSys(TransferType.Unknown);
            string coordSysStr = string.Empty;

            if (frmSetCoord.ShowDialog() == DialogResult.OK)
            {
                if (coordSysStr == string.Empty)
                {
                    MessageBox.Show("请选择坐标系统");
                    return;
                }

                //this.prjDatum1 = frmcoord.Datum;
                coordSysStr = frmSetCoord.CoorSysString;
                textBox2.Text = frmSetCoord.SpatialReferenceName;
            }

            try
            {
                //DefineCoorSystem defineCoordSys = new DefineCoorSystem();
                //defineCoordSys.FileName = textBox1.Text;
                //defineCoordSys.CoorSystemStr = coordSysStr;
                //defineCoordSys.Run();
                //MessageBox.Show(defineCoordSys.DefineResult);
            }
            catch { }
        }
Exemplo n.º 2
0
        private void button5_Click(object sender, EventArgs e)
        {
            //ѡ��Ŀ������ϵͳ
            FrmSetCoordSys frmCoord = new FrmSetCoordSys(TransferType.Unknown);

            if (frmCoord.ShowDialog() == DialogResult.OK)
            {
                this.prjCoorSystem = frmCoord.CoorSysString;
                if (this.prjCoorSystem == "")
                {
                    MessageBox.Show("��ѡ��Ŀ������ϵͳ!");
                    return;
                }

                if (frmCoord.CurGeoCoord != null)
                {
                    this.textBox4.Text = frmCoord.CurGeoCoord.Name;
                    this.prjDatum2 = frmCoord.Datum;
                    if (this.prjDatum2 != this.prjDatum1)
                    {
                        textBox5.Enabled = true;
                        label6.Enabled = true;
                        button7.Enabled = true;
                    }
                }
                else
                {
                    this.textBox4.Text = frmCoord.CurProCoord.Name;
                    this.prjDatum2 = frmCoord.Datum;
                    if (this.prjDatum2 != this.prjDatum1)
                    {
                        textBox5.Enabled = true;
                        button7.Enabled = true;
                        label6.Enabled = true;
                    }
                }
            }
        }