Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public void ShowColorGroupForm(OcrAreaForm ocrAreaForm)
        {
            if (colorGroupForm == null || colorGroupForm.IsDisposed)
            {
                ColorGroupForm form = new ColorGroupForm();
                colorGroupForm = form;
            }

            colorGroupForm.Show();
            colorGroupForm.ShowGroupForm(ocrAreaForm);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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();
        }
Exemple #6
0
        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();
        }
Exemple #7
0
        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);
            }
        }
Exemple #8
0
        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);
                    }
                }
            }
        }
Exemple #9
0
 public void ShowGroupForm(OcrAreaForm ocrAreaForm)
 {
     this.ocrAreaForm = ocrAreaForm;
     this.checkedListBox.Items.Clear();
     UpdateList(ocrAreaForm.screenType);
 }
Exemple #10
0
 public void MakeSnapShotOcrAreaForm(OcrAreaForm newForm)
 {
     snapOcrAreaForm = newForm;
 }
Exemple #11
0
 public void MakeQuickOcrAreaForm(OcrAreaForm newForm)
 {
     quickOcrAreaForm = newForm;
 }
Exemple #12
0
 public void AddExceptionAreaForm(OcrAreaForm newForm)
 {
     exceptionAreaFormList.Add(newForm);
 }