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); } }