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); } }
public void SetInvisibleOcrArea() { foreach (var pair in OcrAreaFormList) { pair.SetVisible(false); } if (quickOcrAreaForm != null) { quickOcrAreaForm.SetVisible(false); } foreach (var pair in exceptionAreaFormList) { pair.SetVisible(false); } }