public Form1() { InitializeComponent(); //set default options ScrapeMethod = UiScrapingMethod.UI_AUTOMATIC; ScrapeMethod_Combo.SelectedIndex = 0; OCREngine = UiOCREngine.UI_OCR_TESSERACT; OCREngine_combo.SelectedIndex = 0; //create uiNode uiNode = UiFactory.Instance.NewUiNode(); }
private void ScrapeMethod_Combo_SelectedIndexChanged(object sender, EventArgs e) { //get the selected scraping method ScrapeMethod = (UiScrapingMethod)ScrapeMethod_Combo.SelectedIndex; //Update ui switch (ScrapeMethod) { case UiScrapingMethod.UI_AUTOMATIC: { NativeScrapeOptions(false); FullTextScrapeOptions(false); OCRScrapeOptions(false); } break; case UiScrapingMethod.UI_NATIVE: { NativeScrapeOptions(true); FullTextScrapeOptions(false); OCRScrapeOptions(false); } break; case UiScrapingMethod.UI_FULLTEXT: { NativeScrapeOptions(false); FullTextScrapeOptions(true); OCRScrapeOptions(false); } break; case UiScrapingMethod.UI_OCR: { NativeScrapeOptions(false); FullTextScrapeOptions(false); OCRScrapeOptions(true); } break; } }