private void _viewCalibrationMenuItem_Click(object sender, EventArgs e) { try { var calibration =_connectedTracker.GetCalibration(); var resultForm = new CalibrationResultForm(); resultForm.SetPlotData(calibration); resultForm.ShowDialog(); } catch(EyetrackerException ee) { MessageBox.Show("Failed to get calibration data. Got exception " + ee, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void _calibrateButton_Click(object sender, EventArgs e) { var runner = new CalibrationRunner(); try { // Start a new calibration procedure var result = runner.RunCalibration(_connectedTracker); // Show a calibration plot if everything went OK if (result != null) { var resultForm = new CalibrationResultForm(); resultForm.SetPlotData(result); resultForm.ShowDialog(); } else { MessageBox.Show("Not enough data to create a calibration (or calibration aborted)."); } } catch(EyetrackerException ee) { MessageBox.Show("Failed to calibrate. Got exception " + ee, "Calibration Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } }