• / 6
  • 下载费用:10 金币  

四等水准c#开源代码.doc

关 键 词:
四等水准c#开源代码.doc
资源描述:
四等水准测量开源代码namespace 测量程序设计{public partial class Form3 : Form{public Form3(){InitializeComponent();}private void button3_Click(object sender, EventArgs e){}private void radioButton1_CheckedChanged(object sender, EventArgs e){//选择路线类型 附合有终点高程 闭合和支水准都不存在终点高程//选中附合 txtz 可用 而闭合和和支水准不可用choiceStyle();}//定义全局变量 方便其他控件调用int istation ;double[] dis;double []detH;double startpoint;double endpoint;//声明泛型集合来存储文件全路径List listdis = new List();List listdetH= new List();private void button1_Click(object sender, EventArgs e){AddDate();}double[] BMPoint;//转点高程数组double closeDetH;//闭合差double totalDetH = 0;//累计高差 private void button2_Click(object sender, EventArgs e){double[] diss = listdis.ToArray();double[] detHh = listdetH.ToArray();CalcDate(diss, detHh);}private void txtc_TextChanged(object sender, EventArgs e){}//选择类型public void choiceStyle(){if (rb1.Checked == true){txtz.Enabled = true;}else if (rb2.Checked == true){txtz.Enabled = false;}else if (rb3.Checked == true){txtz.Enabled = false;}}//读入数据public void AddDate(){if (txtq.Text == ““){MessageBox.Show(“还没有输入起始高程“);txtq.Focus();}else if (rb1.Checked == true txtz.Focus();}else if (txtc.Text == ““){MessageBox.Show(“还没有输入测站数“);txtc.Focus();}else{//点击弹出对话框OpenFileDialog ofd = new OpenFileDialog();//设置对话框可以多选ofd.Multiselect = true;//设置对话框的初始目录ofd.InitialDirectory = @“C:\Documents and Settings\Administrator\桌面“ ;//设置对话框的文件类型ofd.Filter = “文本文件|*.txt|所有文件|*.*“;//展示对话框ofd.ShowDialog();//获得在打开对话框中选中文件的路径string path = ofd.FileName;if (path == ““){return;}istation = int.Parse(txtc.Text);startpoint = double.Parse(txtq.Text);endpoint = double.Parse(txtz.Text);string[] line = File.ReadAllLines(path);for (int i = 0; i 40 * Math.Sqrt(tDist / 1000)){MessageBox.Show(“闭合差超限,测量成果不合格! “);txtre.Text = txtre.Text + “闭合差超限,成果不合格 “;return;}else{MessageBox.Show(“闭合差合格,继续计算转点高程! “);}BMPoint = new double[istation];BMPoint[0] = startpoint;txtre.Text = txtre.Text + “平差后的高程为:“ + “\r\n“ + “(“ + “0“ + “)“ + startpoint.ToString() + “\r\n“;for (int i = 1; i is
展开阅读全文
  微传网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
0条评论

还可以输入200字符

暂无评论,赶快抢占沙发吧。

关于本文
本文标题:四等水准c#开源代码.doc
链接地址:https://www.weizhuannet.com/p-10032060.html
微传网是一个办公文档、学习资料下载的在线文档分享平台!

微传网博客

网站资源均来自网络,如有侵权,请联系客服删除!

 网站客服QQ:80879498  会员QQ群:727456886

copyright@ 2018-2028 微传网络工作室版权所有

     经营许可证编号:冀ICP备18006529号-1 ,公安局备案号:13028102000124

收起
展开