Example #1
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (textBox10.Text == "" || textBox11.Text == "" || textBox12.Text == "")
     {
         MessageBox.Show("必需数据不足!");
     }
     else
     {
         dPoint dp = new dPoint();
         kPoint kp = new kPoint();
         double L0;
         L0            = double.Parse(textBox12.Text);
         kp.X          = double.Parse(textBox10.Text);
         kp.Y          = double.Parse(textBox11.Text);
         dp            = Gauss.BackCal(kp, comboBox1.SelectedIndex);
         textBox1.Text = dp.B.ToString("F8");
         textBox8.Text = (dp.L + L0).ToString("F8");
     }
 }
Example #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     if ((textBox7.Text == "") || (textBox8.Text == ""))
     {
         MessageBox.Show("必需数据不足!");
     }
     else
     {
         dPoint dp = new dPoint();
         kPoint kp = new kPoint();
         dp.L = double.Parse(textBox1.Text);
         dp.B = double.Parse(textBox8.Text);
         int what = comboBox1.SelectedIndex;
         kp             = Gauss.Forsol(dp, what);
         textBox10.Text = kp.X.ToString("F6");
         textBox11.Text = kp.Y.ToString("F6");
         double L0;
         L0             = 6 * ((int)(dp.L / 6) + 1) - 3;
         textBox12.Text = L0.ToString();
     }
 }