Пример #1
0
 public OcrAreaForm(screenForm.ScreenType screenType)
 {
     //Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(155)))), ((int)(((byte)(191)))))
     this.screenType = screenType;
     if (screenType == screenForm.ScreenType.Normal)
     {
         this.Activate();
         InitializeComponent();
         Index = ++ocrAreaIndex;
         setTitleLabel();
     }
     else if (screenType == screenForm.ScreenType.Exception)
     {
         this.Activate();
         InitializeComponent();
         Index = ++exceptionAreaIndex;
         setTitleLabel();
     }
     else
     {
         this.Activate();
         InitializeComponent();
         Index = -1;
         setTitleLabel();
     }
     Init();
     SetVisible(true);
     Refresh();
 }
Пример #2
0
        public void UpdateList(screenForm.ScreenType screenType)
        {
            if (ocrAreaForm != null && !ocrAreaForm.IsDisposed)
            {
                int        index        = ocrAreaForm.Index;
                List <int> useColorList = null;
                if (screenType == screenForm.ScreenType.Normal)
                {
                    useColorList = FormManager.Instace.MyMainForm.MySettingManager.UseColorGroup[index - 1];
                }
                else if (screenType == screenForm.ScreenType.Quick)
                {
                    useColorList = FormManager.Instace.MyMainForm.MySettingManager.QuickOcrUsecolorGroup;
                }

                List <ColorGroup> list = FormManager.Instace.MyMainForm.MySettingManager.NowColorGroup;

                for (int i = 0; i < list.Count; i++)
                {
                    string value = (i + 1).ToString() + " : R=" + (list[i].getValueR().ToString()) + ",G=" + list[i].getValueG().ToString() + ",B=" + list[i].getValueB().ToString();
                    value += " / S=" + list[i].getValueS1().ToString() + "~" + list[i].getValueS2().ToString() + "V=" + list[i].getValueV1().ToString() + "~" + list[i].getValueV2().ToString();
                    this.checkedListBox.Items.Add(value);


                    bool isChecked = true;
                    if (useColorList[i] == 0)
                    {
                        isChecked = false;
                    }
                    checkedListBox.SetItemChecked(i, isChecked);
                }
            }
        }
Пример #3
0
 public OcrAreaForm()
 {
     screenType = screenForm.ScreenType.Normal;
     this.Activate();
     InitializeComponent();
     Index = ++ocrAreaIndex;
     setTitleLabel();
     Init();
     Refresh();
 }