Exemplo n.º 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();
            }
        }
Exemplo n.º 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
        }
Exemplo n.º 3
0
        public bool AddStrokesFromFile(PaperInkFile usedFile, Color StrokeColor)
        {
            int xyz = StrokeColor.ToArgb();

            return(AddStrokesFromFile(CInkAnalyzerClass, usedFile.cFileClass, StrokeColor.ToArgb()));
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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
 }
Exemplo n.º 6
0
 public void AddStokesFromInkFile(PaperInkFile OpenedFile)
 {
     // red, green, blue
     // Color x = Color.FromArgb(   255,   0,    0);
     aInkAnalyzerPage.AddStrokesFromFile(OpenedFile, Color.Black);
 }
Exemplo n.º 7
0
 public void AddStokesFromInkFile(PaperInkFile OpenedFile)
 {
     // red, green, blue
                         // Color x = Color.FromArgb(   255,   0,    0);
     aInkAnalyzerPage.AddStrokesFromFile(OpenedFile, Color.Black);
 }
Exemplo n.º 8
0
 public bool AddStrokesFromFile(PaperInkFile usedFile,Color StrokeColor)
 {
     int xyz = StrokeColor.ToArgb();
     return AddStrokesFromFile(CInkAnalyzerClass, usedFile.cFileClass, StrokeColor.ToArgb());
 }