• 大小: 82KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-05-11
  • 语言: C#
  • 标签: C#  

资源简介

C# 坐标正反算完整严密程序,基于C#08和10

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 坐标正反算
{
    public partial class Frm_SF : Form
    {
        public Frm_SF()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender EventArgs e)
        {
            Double a1 a2 a3 a4a5;
            Int32 a7a8;
            if (textBox4.Text == ““)
            {
                MessageBox.Show(“坐标不能为空“);
                textBox4.Focus();
            }
            else
            {
                a1 = Convert.ToDouble(textBox1.Text);
                a2 = Convert.ToDouble(textBox2.Text);
                a3 = Convert.ToDouble(textBox3.Text);
                a4 = Convert.ToDouble(textBox4.Text);
                a1 = a3 - a1;
                a2 = a4 - a2;
                if (a1 == 0 && a2 == 0)
                {
                    MessageBox.Show(“数据错误,两个已知点坐标不能相等“);
                    button2_Click(sender e);
                }
                else
                {
                    a5 = Math.Sqrt(a1 * a1 + a2 * a2);
                    label8.Text = a5.ToString(“f3“);
                    a5 = Math.Atan(a2 / a1);
                    a5 = a5 * 180 / Math.PI * 60 * 60;
                    a7 = Convert.ToInt32(a5);
                    if (a1 < 0 && a2 < 0)                         //个种特殊角的计算,不同象限角的计算
                        a7 = 180 * 60 * 60 + a7;
                    else if (a1 == 0 && a2 < 0)
                        a7 = 360 * 60 * 60 + a7;
                    else if (a1 < 0 && a2 > 0)
                        a7 = 90 * 60 * 60 - a7;
                    else if (a1 < 0 && a2 == 0)
                        a7 = 180 * 60 * 60;
                    else if (a1 > 0 && a2 < 0)
                        a7 = 270 * 60 * 60 - a7;
                    a8 = a7 % 60;
                    label11.Text = Convert.ToString(a8);
                    a8 = a7 / 60;
                    a7 = a8 % 60;
                    label10.Text = Convert.ToString(a7);
                    a8 = a8 / 60;
                    label9.Text = Convert.ToString(a8);
                }
            }
        }

        private void button4_Click(object sender EventArgs e)
        {
            Application.Exit();
        }

        private void button3_Click(object sender EventArgs e)
        {
            Frm_ZS z = new Frm_ZS();
            z.Show();
            this.Hide();
        }

        private void button2_Click(object sender EventArgs e)
        {
            textBox1.Text = ““;
            textBox1.BackColor = Color.White;
            textBox2.Text = ““;
            textBox2.BackColor = Color.White;
            textBox3.Text = ““;
            textBox3.BackColor = Color.White;
            textBox4.Text = ““;
            textBox4.BackColor = Color.White;
            la

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1634  2013-06-03 19:59  坐标正反算\UpgradeLog.xml

     文件       3348  2013-06-03 19:59  坐标正反算\_UpgradeReport_Files\UpgradeReport.css

     文件      12505  2010-05-04 01:19  坐标正反算\_UpgradeReport_Files\UpgradeReport.xslt

     文件         69  2013-06-03 19:59  坐标正反算\_UpgradeReport_Files\UpgradeReport_Minus.gif

     文件         71  2013-06-03 19:59  坐标正反算\_UpgradeReport_Files\UpgradeReport_Plus.gif

     文件      28160  2013-06-05 22:23  坐标正反算\坐标正反算\bin\Debug\坐标正反算.exe

     文件      40448  2013-06-05 22:23  坐标正反算\坐标正反算\bin\Debug\坐标正反算.pdb

     文件      14328  2013-06-18 12:37  坐标正反算\坐标正反算\bin\Debug\坐标正反算.vshost.exe

     文件        490  2009-06-11 05:14  坐标正反算\坐标正反算\bin\Debug\坐标正反算.vshost.exe.manifest

     文件       4359  2013-06-05 22:23  坐标正反算\坐标正反算\Frm_SF.cs

     文件      16694  2013-06-05 22:23  坐标正反算\坐标正反算\Frm_SF.Designer.cs

     文件      11037  2013-06-05 22:23  坐标正反算\坐标正反算\Frm_SF.resx

     文件       4879  2013-06-05 22:23  坐标正反算\坐标正反算\Frm_ZS.cs

     文件      17024  2013-06-05 22:23  坐标正反算\坐标正反算\Frm_ZS.Designer.cs

     文件      11037  2013-06-05 22:23  坐标正反算\坐标正反算\Frm_ZS.resx

     文件       5284  2013-06-03 20:00  坐标正反算\坐标正反算\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       4608  2013-06-03 19:59  坐标正反算\坐标正反算\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       1466  2013-06-18 12:37  坐标正反算\坐标正反算\obj\Debug\坐标正反算.csproj.FileListAbsolute.txt

     文件        907  2013-06-05 22:23  坐标正反算\坐标正反算\obj\Debug\坐标正反算.csproj.GenerateResource.Cache

     文件      28160  2013-06-05 22:23  坐标正反算\坐标正反算\obj\Debug\坐标正反算.exe

     文件       3770  2013-06-05 22:23  坐标正反算\坐标正反算\obj\Debug\坐标正反算.Frm_SF.resources

     文件       3770  2013-06-05 22:23  坐标正反算\坐标正反算\obj\Debug\坐标正反算.Frm_ZS.resources

     文件      40448  2013-06-05 22:23  坐标正反算\坐标正反算\obj\Debug\坐标正反算.pdb

     文件        180  2013-06-03 20:00  坐标正反算\坐标正反算\obj\Debug\坐标正反算.Properties.Resources.resources

     文件        369  2013-06-03 14:54  坐标正反算\坐标正反算\obj\坐标正反算.csproj.FileList.txt

     文件        475  2013-06-03 14:14  坐标正反算\坐标正反算\Program.cs

     文件       1202  2013-06-03 13:54  坐标正反算\坐标正反算\Properties\AssemblyInfo.cs

     文件       2868  2013-06-03 19:59  坐标正反算\坐标正反算\Properties\Resources.Designer.cs

     文件       5612  2013-06-03 13:54  坐标正反算\坐标正反算\Properties\Resources.resx

     文件       1113  2013-06-03 19:59  坐标正反算\坐标正反算\Properties\Settings.Designer.cs

............此处省略18个文件信息

评论

共有 条评论