-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMForm.cs
42 lines (40 loc) · 1.28 KB
/
CMForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CoorTransform
{
public partial class CMForm : Form
{
public CMForm()
{
InitializeComponent();
}
private void btnCal_Click(object sender, EventArgs e)
{
double longitude = Convert.ToDouble(txtlongitude.Text);
if (rb3.Checked)
{
ProjectionZone myProject = new ProjectionZone(longitude, ZoneType.ThreeZone);
txtZoneNumber.Text = myProject.ZoneNumber.ToString();
txtCentralMeridianLongitude.Text = myProject.CentralMeridianLongitude.ToString();
}
else if (rb6.Checked)
{
ProjectionZone myProject = new ProjectionZone(longitude, ZoneType.SixZone);
txtZoneNumber.Text = myProject.ZoneNumber.ToString();
txtCentralMeridianLongitude.Text = myProject.CentralMeridianLongitude.ToString();
}
else
{
MessageBox.Show("请选择投影带,再计算!!!");
return;
}
}
}
}