Esempio n. 1
0
        /// <summary>
        /// 获取登录验证码
        /// </summary>
        private void GetLoginImage()
        {
            Program.mainForm.ShowMessage("正在获取验证码...", false);
            Thread12306.Stop();
            //Program.mainForm.ChangeOtherButton(false);
            btnLogin.Enabled     = false;
            btnFlushCode.Enabled = false;

            Bitmap v = null;

            do
            {
                v = _12306Class.GetLoginImage();
            } while (v == null);
            pictureBox1.Image = v;

            btnLogin.Enabled     = true;
            btnFlushCode.Enabled = true;

            Program.mainForm.ShowMessage("完成");
            //ImageFrom.GetImageFrom.Show(v);
            //string str = ImageFrom.GetImageFrom.Code;
            //tbCode.Text = str;
            //tbCode.Text = imgOCR.GetCodeText(v);
            if (ConfigStore.isAutoWriterVerify)
            {
                UnCode UnCheckobj = new UnCode(v);
                string strNum     = UnCheckobj.getPicnum(0); //识别图片
                tbCode.Text = strNum;
            }
        }
Esempio n. 2
0
        private void shibie()
        {
            string strNum = "";

            try
            {
                UnCode UnCheckobj = new UnCode(map);
                strNum = UnCheckobj.getPicnum(0); //识别图片
            }
            catch { }
            textBox1.Text = strNum;
        }
Esempio n. 3
0
        public void shibie()
        {
            UnCode UnCheckobj = new UnCode(v);

            if (ConfigStore.algorithm.Equals("1"))
            {
                string strNum1 = UnCheckobj.getPicnum(1);     //识别图片
                verifyText     = strNum1;
                text_Box1.Text = strNum1;
            }
            else if (ConfigStore.algorithm.Equals("2"))
            {
                string strNum2 = UnCheckobj.getPicnum(2);     //识别图片
                verifyText     = strNum2;
                text_Box2.Text = strNum2;
            }
            SetTbcd();
        }