Exemple #1
0
 void CurrentDisplayBlock_SizeChanged(object sender, DisplayBlockSizeChangedHandlerArgs args)
 {
     CurrentLayoutBlock.SetRect(CurrentDisplayBlock.GetRect());
     LayoutBlockBindingSource.EndEdit();
     LayoutBlocksDataGridView.EndEdit();
     LayoutBlocksDataGridView.Refresh();
 }
Exemple #2
0
        private void AddNewBlockButton_Click(object sender, EventArgs e)
        {
            var block = (LayoutBlock)LayoutBlockBindingSource.AddNew();

            SetDefaultBlockValues(block);
            LayoutBlockBindingSource.EndEdit();

            Debug.Assert(block != null, "block != null");
            CurrentDisplayBlock.SetRect(block.GetRect());
        }
Exemple #3
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);
            }
        }