Beispiel #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();
            }
        }
Beispiel #2
0
        private void GeneralLayout_Load(object sender, EventArgs e)
        {
#if FileAutoLoad
            // for Testing only
            int    x                 = 1;
            String FileOpened        = "D:\\ink\\Multi\\SKETCH39.wpi";
            int    RelativThreshold  = 9;
            int    AbsoluteThreshold = 10;
            int    SlidingThreshold  = 0;
            OpenedFile = new PaperInkFile(FileOpened, RelativThreshold, AbsoluteThreshold, SlidingThreshold);
            IntPtr DasInkHandel = LayoutArea.Panel1.Handle;
            aInkPage     = new PaperInkPage(OpenedFile, DasInkHandel, ref richRecognizedTextBox);
            InkPagExists = true;
            aInkPage.AddStokesFromFileAndDisplay(OpenedFile);
#else
            InkPagExists = false;
#endif
        }
Beispiel #3
0
        public bool AddStrokesFromFile(PaperInkFile usedFile, Color StrokeColor)
        {
            int xyz = StrokeColor.ToArgb();

            return(AddStrokesFromFile(CInkAnalyzerClass, usedFile.cFileClass, StrokeColor.ToArgb()));
        }
Beispiel #4
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();
            }
        }
Beispiel #5
0
 private void GeneralLayout_Load(object sender, EventArgs e)
 {
     #if FileAutoLoad
                 // for Testing only
        int x = 1;
     String FileOpened = "D:\\ink\\Multi\\SKETCH39.wpi";
     int RelativThreshold = 9;
     int AbsoluteThreshold = 10;
     int SlidingThreshold = 0;
     OpenedFile = new PaperInkFile(FileOpened, RelativThreshold, AbsoluteThreshold, SlidingThreshold);
     IntPtr DasInkHandel = LayoutArea.Panel1.Handle;
     aInkPage = new PaperInkPage(OpenedFile, DasInkHandel, ref richRecognizedTextBox);
     InkPagExists = true;
     aInkPage.AddStokesFromFileAndDisplay(OpenedFile);
     #else
     InkPagExists = false;
     #endif
 }
Beispiel #6
0
 public void AddStokesFromInkFile(PaperInkFile OpenedFile)
 {
     // red, green, blue
     // Color x = Color.FromArgb(   255,   0,    0);
     aInkAnalyzerPage.AddStrokesFromFile(OpenedFile, Color.Black);
 }
Beispiel #7
0
 public void AddStokesFromInkFile(PaperInkFile OpenedFile)
 {
     // red, green, blue
                         // Color x = Color.FromArgb(   255,   0,    0);
     aInkAnalyzerPage.AddStrokesFromFile(OpenedFile, Color.Black);
 }
 public bool AddStrokesFromFile(PaperInkFile usedFile,Color StrokeColor)
 {
     int xyz = StrokeColor.ToArgb();
     return AddStrokesFromFile(CInkAnalyzerClass, usedFile.cFileClass, StrokeColor.ToArgb());
 }