コード例 #1
0
        private void bReadCode_Click(object sender, EventArgs e)
        {
            CodeType type = (CodeType)this.cb_CodeType.SelectedIndex;

            //MessageBox.Show(ReadCodeHelper.ReadCode(Form_Main.Instance.imageSet.Image, Form_Main.Instance.imageSet.Roi, type));
            tLinkCode.Text = ReadCodeHelper.ReadCode(Form_Main.Instance.imageSet.Image, Form_Main.Instance.imageSet.Roi, type);
        }
コード例 #2
0
        private void bRead_Click(object sender, EventArgs e)
        {
            try
            {
                var         bean  = ReadCodeBean.Load(this.cbCodeList.Text);
                VisionImage image = Form_Main.Instance.imageSet.Image;
                for (int i = 0; i < bean.Cycle; ++i)
                {
                    image = Form_Main.Instance.GainOffset(Form_Main.Instance.imageSet.Image, bean.Gain, bean.Offset);
                }

                Algorithms.Copy(image, Form_Main.Instance.imageSet.Image);

                this.tbBarcode.Text = ReadCodeHelper.ReadCode(Form_Main.Instance.imageSet.Image, bean.ROI.ConvertToRoi(), bean.CodeType);
            }
            catch
            {
                MessageBox.Show("读取失败");
            }
        }