//保存 public void Save() { if (txtp1.Text.Trim() != string.Empty && txtp2.Text.Trim() != string.Empty && txtp3.Text.Trim() != string.Empty && txtp4.Text.Trim() != string.Empty) { /************************************/ captche[0].Code = txtp1.Text.Trim(); captche[1].Code = txtp2.Text.Trim(); captche[2].Code = txtp3.Text.Trim(); captche[3].Code = txtp4.Text.Trim(); /************************************/ CaptcheIO.CaptcheIO io = new CaptcheIO.CaptcheIO(); for (int i = 0; i < captche.Length; i++) { io.Add(captche[i]); } } else rtxState.Text = "为空"; rtxState.Text = "保存成功"; txtp1.Clear(); txtp2.Clear(); txtp3.Clear(); txtp4.Clear(); }
//保存 public void Save() { if (txtp1.Text.Trim() != string.Empty && txtp2.Text.Trim() != string.Empty && txtp3.Text.Trim() != string.Empty && txtp4.Text.Trim() != string.Empty) { /************************************/ captche[0].Code = txtp1.Text.Trim(); captche[1].Code = txtp2.Text.Trim(); captche[2].Code = txtp3.Text.Trim(); captche[3].Code = txtp4.Text.Trim(); /************************************/ CaptcheIO.CaptcheIO io = new CaptcheIO.CaptcheIO(); for (int i = 0; i < captche.Length; i++) { io.Add(captche[i]); } } else { rtxState.Text = "为空"; } rtxState.Text = "保存成功"; txtp1.Clear(); txtp2.Clear(); txtp3.Clear(); txtp4.Clear(); }
//识别图片 private void btnSmart_Click(object sender, EventArgs e) { CaptcheIO.CaptcheIO io = new CaptcheIO.CaptcheIO(); txtp1.Text = io.Is_Equal(captche[0]); txtp2.Text = io.Is_Equal(captche[1]); txtp3.Text = io.Is_Equal(captche[2]); txtp4.Text = io.Is_Equal(captche[3]); //YanMoCaptche yanmo = new YanMoCaptche(); //if (txtp1.Text.Length != 1) //{ // captche[0].Character = yanmo.CharacterLine(bit[0], true, 7); // captche[0].Bearing = "H"; // captche[0].Line = "7"; // txtp1.Text = io.Is_Equal(captche[0]); // if (txtp1.Text.Length != 1) // { // captche[0].Character = yanmo.CharacterLine(bit[0], true, 8); // captche[0].Bearing = "H"; // captche[0].Line = "8"; // txtp1.Text = io.Is_Equal(captche[0]); // } //} //if (txtp2.Text.Length != 1) //{ // captche[1].Character = yanmo.CharacterLine(bit[1], false, 7); // captche[1].Bearing = "H"; // captche[1].Line = "7"; // txtp1.Text = io.Is_Equal(captche[1]); // if (txtp2.Text.Length != 1) // { // captche[1].Character = yanmo.CharacterLine(bit[1], true, 8); // captche[1].Bearing = "H"; // captche[1].Line = "8"; // txtp2.Text = io.Is_Equal(captche[1]); // } //} //if (txtp3.Text.Length != 1) //{ // captche[2].Character = yanmo.CharacterLine(bit[2], false, 7); // captche[2].Bearing = "H"; // captche[2].Line = "7"; // txtp1.Text = io.Is_Equal(captche[2]); // if (txtp3.Text.Length != 1) // { // captche[2].Character = yanmo.CharacterLine(bit[2], true, 8); // captche[2].Bearing = "H"; // captche[2].Line = "8"; // txtp3.Text = io.Is_Equal(captche[2]); // } //} //if (txtp4.Text.Length != 1) //{ // captche[3].Character = yanmo.CharacterLine(bit[3], false, 7); // captche[3].Bearing = "H"; // captche[3].Line = "7"; // txtp1.Text = io.Is_Equal(captche[3]); // if (txtp4.Text.Length != 1) // { // captche[3].Character = yanmo.CharacterLine(bit[3], true, 8); // captche[3].Bearing = "H"; // captche[3].Line = "8"; // txtp4.Text = io.Is_Equal(captche[3]); // } //} }