SaveCalibration() public static method

public static SaveCalibration ( ) : void
return void
Beispiel #1
0
        private void Pb_calibratorBox_MouseUp(object sender, MouseEventArgs e)
        {
            if (OcrCalibrator.CalibrationBoxes == null)
            {
                return;
            }

            _isMouseDown = false;

            //Update position
            if (_selCalibrationPoint == null)
            {
                return;
            }

            OcrCalibrator.CalibrationBoxes[_selCalibrationPoint.Id] = _selCalibrationPoint;

            AlignCalibrationBoxesWhereRelevant(OcrCalibrator.CalibrationBoxes);

            FillRawData();

            pb_calibratorBox.Refresh();

            OcrCalibrator.SaveCalibration();
        }
Beispiel #2
0
        private void btn_calibrate_Click(object sender, EventArgs e)
        {
            _drawPoints = false;
            DoCalibration();

            if (_refbmp != null)
            {
                _refbmp.Dispose();
            }

            _refbmp = getReferenceScreenshot();

            if (_refbmp == null)
            {
                return;
            }

            btn_calibration_reset.Enabled = true;
            pb_calibratorBox.Image        = _refbmp;

            if (OcrCalibrator.CalibrationBoxes == null)
            {
                //Manual calibrate here
                MessageBox.Show("To calibrate, drag the crosshairs to the position shown and described on the right.");
                ManualCalibrate();
            }
            else
            {
                FillRawData();
                _drawPoints = true;
                OcrCalibrator.SaveCalibration();
            }
        }
Beispiel #3
0
        private void Btn_calibration_reset_Click(object sender, EventArgs e)
        {
            if (Program.GameSettings.Display != null)
            {
                var calibrations = OcrCalibrator.GetCalculatedCalibrationPoints(Program.GameSettings.Display.Resolution);
                DrawCalibrationPoints(calibrations);
                FillRawData();
                pb_calibratorBox.Refresh();
                OcrCalibrator.SaveCalibration();
                return;
            }

            MessageBox.Show("Unable to calibrate automatically, please calibrate manually...");
        }