Example #1
0
        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);
            }
        }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
        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);
            }
        }