Exemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            if (!DesignMode)
            {
                var block = (LayoutBlock)LayoutBlockBindingSource.AddNew();
                SetDefaultBlockValues(block);
                LayoutBlockBindingSource.EndEdit();

                Debug.Assert(block != null, "block != null");
                CurrentDisplayBlock = new DisplayBlock(Rectangle.Empty);
                CurrentDisplayBlock.SetPictureBox(PictureBox);
                CurrentDisplayBlock.SizeChanged += CurrentDisplayBlock_SizeChanged;

                tesseract = new Tesseract();
                tesseract.SetVariable("tessedit_char_whitelist", "0123456789.");
                tesseract.Init("OcrData", "eng", false);
            }
        }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            if (!DesignMode)
            {
                var block = (LayoutBlock)LayoutBlockBindingSource.AddNew();
                SetDefaultBlockValues(block);
                LayoutBlockBindingSource.EndEdit();

                Debug.Assert(block != null, "block != null");
                CurrentDisplayBlock = new DisplayBlock(Rectangle.Empty);
                CurrentDisplayBlock.SetPictureBox(PictureBox);
                CurrentDisplayBlock.SizeChanged += CurrentDisplayBlock_SizeChanged;

                tesseract = new Tesseract();
                tesseract.SetVariable("tessedit_char_whitelist", "0123456789.");
                tesseract.Init("OcrData", "eng", false);
            }
        }