public LeftSideViewModel(ITesseractOrc orc)
        {
            _tesseractOrc = orc;
            OpenImageCommand = new RelayCommand(OpenImages);
            OpenPdfCommand = new RelayCommand(OpenPdf);
            BeginOcrCommand = new RelayCommand(BeginOcr);
            NextImageCommand = new RelayCommand(NextImage);
            PrevImageCommand = new RelayCommand(PrevImage);

            ExitCommand = new RelayCommand(Exit);
            OpenWebSiteCommand = new RelayCommand(OpenWebSite);
            AboutCommand = new RelayCommand(About);
            InstallLanguageCommand = new RelayCommand(InstallLanguage);
            OpenLanguageFolderCommand = new RelayCommand(OpenLanguageFolder);

            ImagesList = new List<ImageClass>();

            CurrentImage = new ImageClass
            {
                Image = new BitmapImage(new Uri(@"pack://application:,,,/(a9t9)OcrDesktop;component/introtext.jpg",
                        UriKind.Absolute)),
                FilePath = "introtext.jpg"//otherwise image not found, also: file has to be in same folder as EXE
            };
            ImagesList.Add(CurrentImage);
        }
        public LeftSideViewModel(ITesseractOrc orc)
        {
            _tesseractOrc    = orc;
            OpenImageCommand = new RelayCommand(OpenImages);
            OpenPdfCommand   = new RelayCommand(OpenPdf);
            BeginOcrCommand  = new RelayCommand(BeginOcr);
            NextImageCommand = new RelayCommand(NextImage);
            PrevImageCommand = new RelayCommand(PrevImage);

            ExitCommand               = new RelayCommand(Exit);
            OpenWebSiteCommand        = new RelayCommand(OpenWebSite);
            AboutCommand              = new RelayCommand(About);
            InstallLanguageCommand    = new RelayCommand(InstallLanguage);
            OpenLanguageFolderCommand = new RelayCommand(OpenLanguageFolder);

            ImagesList = new List <ImageClass>();

            CurrentImage = new ImageClass
            {
                Image = new BitmapImage(new Uri(@"pack://application:,,,/(a9t9)OcrDesktop;component/introtext.jpg",
                                                UriKind.Absolute)),
                FilePath = "introtext.jpg"//otherwise image not found, also: file has to be in same folder as EXE
            };
            ImagesList.Add(CurrentImage);
        }
 public string RecognizeOneImage(ImageClass image)
 {
     if (image == null)
     {
         return(string.Empty);
     }
     return(BeginRecognize(image.FilePath));
 }
Esempio n. 4
0
 public string RecognizeOneImage(ImageClass image)
 {
     if (image == null)
         return string.Empty;
     return BeginRecognize(image.FilePath);
 }