Пример #1
0
        private void openInkFile_FileOk(object sender, CancelEventArgs e)
        {
            String FileOpened       = openInkFile.FileName;
            int    StrokeThreshold  = 9;
            int    AllThreshold     = 10;
            int    SlidingThreshold = 0;

            OpenedFile = new PaperInkFile(FileOpened, StrokeThreshold, AllThreshold, SlidingThreshold);
            if (OpenedFile.EOFfound())
            {
                MessageBox.Show("Cannot open File or no valid ink file");
            }
            else
            {
                IntPtr aInkHandel = LayoutArea.Panel1.Handle;
                if (InkPagExists)
                {
                    hInkHScrollBar.Value = 0;               // Set Scrollbar to the left side
                    aCompletePaperInkPage.ClearPage();
                }
                else
                {
                    aCompletePaperInkPage = new PaperInkAnalysedPage(aInkHandel, ref richRecognizedTextBox);
                    InkPagExists          = true;
                }

                aCompletePaperInkPage.AddStokesFromInkFile(OpenedFile);
                LayoutArea.Panel1.Refresh();
            }
        }
Пример #2
0
        private void openInkFile_FileOk(object sender, CancelEventArgs e)
        {
            String FileOpened = openInkFile.FileName;
            int StrokeThreshold = 9;
            int AllThreshold = 10;
            int SlidingThreshold = 0;
            OpenedFile = new PaperInkFile(FileOpened, StrokeThreshold, AllThreshold, SlidingThreshold);
            if (OpenedFile.EOFfound()) {
                MessageBox.Show("Cannot open File or no valid ink file");
            } else {
                IntPtr aInkHandel = LayoutArea.Panel1.Handle;
                if (InkPagExists)
                {
                    hInkHScrollBar.Value = 0;               // Set Scrollbar to the left side
                    aCompletePaperInkPage.ClearPage();
                }
                else
                {
                    aCompletePaperInkPage = new PaperInkAnalysedPage( aInkHandel, ref richRecognizedTextBox);
                    InkPagExists = true;
                }

                aCompletePaperInkPage.AddStokesFromInkFile(OpenedFile);
                LayoutArea.Panel1.Refresh();
            }
        }