Demo entry 6783114

111

   

Submitted by anonymous on Jan 30, 2019 at 04:37
Language: C#. Code size: 1.1 kB.

namespace IDW
{
    public partial class Form1 : Form
    {
        DataEntity Data = new DataEntity();
        public Form1()
        {
            InitializeComponent();
        }

        private void toolOpen_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                Data = FileHelper.Read(openFileDialog1.FileName);
                richTextBox1.Text = Data.ToString();
            }
        }

        private void toolCal_Click(object sender, EventArgs e)
        {
            string res = "点名  X(m)     Y(m)       H(m)     参与插值的点列表\n";
            Algo go = new Algo(Data, 5);
            var Q1 = new Point("Q1", 4310, 3600);
            var Q2 = new Point("Q2", 4330, 3600);
            var Q3 = new Point("Q3", 4310, 3620);
            var Q4 = new Point("Q4", 4330, 3620);

            res += go.Idw(Q1) + "\n";
            res += go.Idw(Q2) + "\n";
            res += go.Idw(Q3) + "\n";
            res += go.Idw(Q4) + "\n";

            richTextBox1.Text = res;
        }

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).