private void btn_FirstApproximation_Click(object sender, EventArgs e) { double pan = (double)nupd_FirstApproxPan.Value; double tilt = (double)nupd_FirstApproxTilt.Value; int[] p1 = { (int)nupd_FirstApproxP10.Value, (int)nupd_FirstApproxP11.Value }; int[] p2 = { (int)nupd_FirstApproxP20.Value, (int)nupd_FirstApproxP21.Value }; nativeCommunicator.TestFirstAproximation(p1, p2, ref pan, ref tilt); nupd_FirstApproxPan.Value = (decimal)pan; nupd_FirstApproxTilt.Value = (decimal)tilt; MessageBox.Show($"Pan : {pan}, Tilt: {tilt}"); }