public Form1()
        {
            InitializeComponent();

            captcha = new CAPTCHABreaker(new SimpleNeuralNetSolver("0123456789", 20, 20, 100, 8), new BlobSegmentMethod(15, 25, 8));
            captcha.OnBeforeSegmentation += new CAPTCHABreaker.BeforeSegmentHandler(captcha_OnBeforeSegmentation);
            captcha.OnTrainingComplete += new CAPTCHABreaker.TrainingCompleteHandler(captcha_OnTrainingComplete);
            captcha.OnTrainingProgressChanged += new CAPTCHABreaker.TrainingProgressChangedHandler(captcha_OnTrainingProgressChanged);
            captcha.OnSolvingComplete += new CAPTCHABreaker.SolverCompleteHandler(captcha_OnSolvingComplete);
            captcha.OnSolverSetCreated += new CAPTCHABreaker.SolverSetCreatedHandler(captcha_OnSolverSetCreated);
            captcha.OnSolverSetProgressChanged += new CAPTCHABreaker.SolverProgressChangedEventArgsHandler(captcha_OnSolverSetProgressChanged);

            cv = new CAPTCHABreaker(new ContourAnalysisSolver("0123456789", 50, 50), new BlobSegmentMethod(15, 25, 8));
            cv.OnBeforeSegmentation += new CAPTCHABreaker.BeforeSegmentHandler(captcha_OnBeforeSegmentation);
            cv.OnTrainingComplete += new CAPTCHABreaker.TrainingCompleteHandler(cv_OnTrainingComplete);
            cv.OnTrainingProgressChanged += new CAPTCHABreaker.TrainingProgressChangedHandler(cv_OnTrainingProgressChanged);
            cv.OnSolvingComplete += new CAPTCHABreaker.SolverCompleteHandler(cv_OnSolvingComplete);
        }
        public CaptchaInterpreter(string program, Bitmap image)
        {
            ProgramCode = program;

            foreach (string term in CONST.LINE_TERMINATORS)
            {
                ProgramCode = ProgramCode.Replace(term, CONST.STATEMENT_TERMINATOR);
            }

            if (image != null)
            {
                ImageToBreak = image;
            }

            subtractionImages = new Dictionary<string, Bitmap>();

            captcha = new CAPTCHABreaker();
            captcha.OnBeforeSegmentation += new CAPTCHABreaker.BeforeSegmentHandler(captcha_OnBeforeSegmentation);

            GlobalMessage.OnGlobalBitmapMessage += new GlobalMessage.BitmapMessageHandler(GlobalMessage_OnGlobalBitmapMessage);
        }
 private void button7_Click(object sender, EventArgs e)
 {
     captcha = new CAPTCHABreaker(new BitmapSubtractionSolver("0123456789", 20, 20), new BlobSegmentMethod(15, 25, 8));
     captcha.OnBeforeSegmentation += new CAPTCHABreaker.BeforeSegmentHandler(captcha_OnBeforeSegmentation);
     captcha.OnTrainingComplete += new CAPTCHABreaker.TrainingCompleteHandler(captcha_OnTrainingComplete);
     captcha.OnTrainingProgressChanged += new CAPTCHABreaker.TrainingProgressChangedHandler(captcha_OnTrainingProgressChanged);
     captcha.OnSolvingComplete += new CAPTCHABreaker.SolverCompleteHandler(captcha_OnSolvingComplete);
     captcha.OnSolverSetCreated += new CAPTCHABreaker.SolverSetCreatedHandler(captcha_OnSolverSetCreated);
     captcha.OnSolverSetProgressChanged += new CAPTCHABreaker.SolverProgressChangedEventArgsHandler(captcha_OnSolverSetProgressChanged);
 }