static public void MakeAreaForm(ScreenType scrrenType, int newX, int newY, int newX2, int newY2, bool isShowFlag) { if (newY < 20) { newY = 20; } OcrAreaForm searchOptionForm = new OcrAreaForm(scrrenType); int BorderWidth = Util.ocrFormBorder; int TitlebarHeight = Util.ocrFormTitleBar; searchOptionForm.StartPosition = FormStartPosition.Manual; searchOptionForm.Location = new Point(newX - BorderWidth, newY - TitlebarHeight); searchOptionForm.Size = new Size(newX2 + BorderWidth * 2, newY2 + TitlebarHeight + BorderWidth); searchOptionForm.Show(); if (scrrenType == ScreenType.Normal) { FormManager.Instace.AddOcrAreaForm(searchOptionForm); } else if (scrrenType == ScreenType.Exception) { FormManager.Instace.AddExceptionAreaForm(searchOptionForm); } if (isShowFlag == false) { searchOptionForm.SetVisible(false); } }
static public void MakeSnapOcrAreaForm(int newX, int newY, int newX2, int newY2) { if (newY < 20) { newY = 20; } OcrAreaForm searchOptionForm = null; if (FormManager.Instace.snapOcrAreaForm == null) { searchOptionForm = new OcrAreaForm(ScreenType.Snap); } else { searchOptionForm = FormManager.Instace.snapOcrAreaForm; } int BorderWidth = Util.ocrFormBorder; int TitlebarHeight = Util.ocrFormTitleBar; searchOptionForm.StartPosition = FormStartPosition.Manual; searchOptionForm.Location = new Point(newX - BorderWidth, newY - TitlebarHeight); searchOptionForm.Size = new Size(newX2 + BorderWidth * 2, newY2 + TitlebarHeight + BorderWidth); searchOptionForm.Show(); FormManager.Instace.MakeSnapShotOcrAreaForm(searchOptionForm); searchOptionForm.SetVisible(false); }
public void ShowColorGroupForm(OcrAreaForm ocrAreaForm) { if (colorGroupForm == null || colorGroupForm.IsDisposed) { ColorGroupForm form = new ColorGroupForm(); colorGroupForm = form; } colorGroupForm.Show(); colorGroupForm.ShowGroupForm(ocrAreaForm); }
public OcrAreaForm GetOCRArea(int index) { OcrAreaForm area = null; for (int i = 0; i < OcrAreaFormList.Count; i++) { if (OcrAreaFormList[i].Index == index) { area = OcrAreaFormList[i]; break; } } return(area); }
private void AddExceptButton_Click(object sender, EventArgs e) { for (int i = 0; i < FormManager.Instace.exceptionAreaFormList.Count; i++) { OcrAreaForm foundedForm = FormManager.Instace.exceptionAreaFormList[i]; foundedForm.Activate(); } if (FormManager.Instace.quickOcrAreaForm != null) { FormManager.Instace.quickOcrAreaForm.Activate(); } FormManager.Instace.MakeExceptionAreaForm(); }
private void addButton_Click(object sender, EventArgs e) { for (int i = 0; i < FormManager.Instace.OcrAreaFormList.Count; i++) { OcrAreaForm foundedForm = FormManager.Instace.OcrAreaFormList[i]; foundedForm.Activate(); } if (FormManager.Instace.quickOcrAreaForm != null) { FormManager.Instace.quickOcrAreaForm.Activate(); } MakeScreenForm(); }
static public void MakeQuickOcrAreaForm(int newX, int newY, int newX2, int newY2, bool isShow) { if (newY < 20) { newY = 20; } OcrAreaForm searchOptionForm = null; if (FormManager.Instace.quickOcrAreaForm == null) { searchOptionForm = new OcrAreaForm(ScreenType.Quick); } else { searchOptionForm = FormManager.Instace.quickOcrAreaForm; } int BorderWidth = Util.ocrFormBorder; int TitlebarHeight = Util.ocrFormTitleBar; //TitlebarHeight = 27; Util.ShowLog("TitlebarHeight " + TitlebarHeight); searchOptionForm.StartPosition = FormStartPosition.Manual; searchOptionForm.Location = new Point(newX - BorderWidth, newY - TitlebarHeight); searchOptionForm.Size = new Size(newX2 + BorderWidth * 2, newY2 + TitlebarHeight + BorderWidth); searchOptionForm.Show(); FormManager.Instace.MakeQuickOcrAreaForm(searchOptionForm); FormManager.Instace.MyMainForm.SetCaptureArea(); if (isShow == false) { searchOptionForm.SetVisible(false); } else { searchOptionForm.SetVisible(true); } }
public void AddOcrAreaForm(OcrAreaForm newForm) { OcrAreaFormList.Add(newForm); List <List <int> > useColorGroup = MyMainForm.MySettingManager.UseColorGroup; List <ColorGroup> colorGroup = MyMainForm.MySettingManager.NowColorGroup; if (useColorGroup.Count < OcrAreaFormList.Count) { for (int i = useColorGroup.Count; i < OcrAreaFormList.Count; i++) { useColorGroup.Add(new List <int>()); for (int j = 0; j < colorGroup.Count; j++) { useColorGroup[i].Add(1); } } } }
public void ShowGroupForm(OcrAreaForm ocrAreaForm) { this.ocrAreaForm = ocrAreaForm; this.checkedListBox.Items.Clear(); UpdateList(ocrAreaForm.screenType); }
public void MakeSnapShotOcrAreaForm(OcrAreaForm newForm) { snapOcrAreaForm = newForm; }
public void MakeQuickOcrAreaForm(OcrAreaForm newForm) { quickOcrAreaForm = newForm; }
public void AddExceptionAreaForm(OcrAreaForm newForm) { exceptionAreaFormList.Add(newForm); }