Пример #1
0
        public void startOcrOnload(bool doStart)
        {
            ocr = new Ocr(_parent);
            cbStartOCROnLoad.Checked = true;
            //ocr.StartMonitoring(Program.DBCon.getIniValue<String>(IBE.IBESettings.DB_GROUPNAME, "MostRecentOCRFolder);

            if (_fileSystemWatcher == null)
            {
                _fileSystemWatcher = new FileSystemWatcher();
            }

            _fileSystemWatcher.Path = Program.DBCon.getIniValue <String>(IBE.IBESettingsView.DB_GROUPNAME, "MostRecentOCRFolder");

            _fileSystemWatcher.Filter = "*.bmp";

            _fileSystemWatcher.NotifyFilter = NotifyFilters.LastAccess |
                                              NotifyFilters.LastWrite |
                                              NotifyFilters.FileName |
                                              NotifyFilters.DirectoryName;

            _fileSystemWatcher.IncludeSubdirectories = false;

            _fileSystemWatcher.Created += ScreenshotCreated;

            _fileSystemWatcher.EnableRaisingEvents = true;

            ocr.IsMonitoring = true;
        }
Пример #2
0
        public void startOcrOnload(bool doStart)
        {

            ocr = new Ocr(_parent);
            cbStartOCROnLoad.Checked = true;
            //ocr.StartMonitoring(Program.DBCon.getIniValue<String>(IBE.IBESettings.DB_GROUPNAME, "MostRecentOCRFolder);

            if (_fileSystemWatcher == null)
                _fileSystemWatcher = new FileSystemWatcher();

            _fileSystemWatcher.Path = Program.DBCon.getIniValue<String>(IBE.IBESettingsView.DB_GROUPNAME, "MostRecentOCRFolder");

            _fileSystemWatcher.Filter = "*.bmp";

            _fileSystemWatcher.NotifyFilter = NotifyFilters.LastAccess |
                         NotifyFilters.LastWrite |
                         NotifyFilters.FileName |
                         NotifyFilters.DirectoryName;

            _fileSystemWatcher.IncludeSubdirectories = false;

            _fileSystemWatcher.Created += ScreenshotCreated;

            _fileSystemWatcher.EnableRaisingEvents = true;

            ocr.IsMonitoring = true;
        }