Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     Detect detect = new Detect();
     detect.Show();
     this.Hide();
 }
Пример #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Detect form = new Detect();
     form.Show();
     this.Hide();
 }
Пример #3
0
        private void AnalyseThis()
        {
            button1.Enabled = false;
            Graphics Gc = pictureBox1.CreateGraphics();
            Gc.Clear(Color.White);
            //Yorumlama;
            string OCRText = OCR.ToString();
            String value = OCRText;
            Regex regexA1 = new Regex("241");
            Match matchA1 = Regex.Match(value, "241");  // A
            Regex regexA2 = new Regex("4123");
            Match matchA2 = Regex.Match(value, "4123");
            Regex regexA3 = new Regex("3121");
            Match matchA3 = Regex.Match(value, "3121");  // A
            Regex regexA4 = new Regex("314231");
            Match matchA4 = Regex.Match(value, "314231");  // A
            Regex regexA5 = new Regex("412");
            Match matchA5 = Regex.Match(value, "412");  // A

            Regex regexB5 = new Regex("1434");
            Match matchB5 = Regex.Match(value, "1434");  // B

            if (matchA1.Success)
            {
                OCRText = "3123";
            }
            // A
            else if (matchA2.Success)
            {
                OCRText = "3123";
            }

            else if (matchA3.Success)
            {
                OCRText = "3123";
            }

            else if (matchA4.Success)
            {
                OCRText = "3123";
            }

            else if (matchA5.Success)
            {
                OCRText = "3123";
            }

            else if (matchB5.Success)
            {
                OCRText = "2324324";
            }

            else
            {
                DialogResult result1 = MessageBox.Show("Wrong Password. Try Again !", "Important Query", MessageBoxButtons.OK, MessageBoxIcon.Question);

                if (result1 == DialogResult.OK)
                {

                    Detect form = new Detect();
                    form.Show();
                    this.Hide();
                }

            }

            switch (OCRText)
            {
                //A
                case "3123":
                    DialogResult result2 = MessageBox.Show("Congratulation ! System Unlocked", "Important Query", MessageBoxButtons.OK, MessageBoxIcon.Question);
                    if (result2 == DialogResult.OK)
                    {
                        Main main = new Main();
                        main.Show();
                        this.Hide();

                    }
                    break;

                case "314234132":
                    goto case "3123";
                case "413243124":
                    goto case "3123";

            }
            OCR.Remove(0, OCR.Length);
        }
Пример #4
0
        private void AnalyseThis()
        {
            button1.Enabled = false;
            Graphics Gc = pictureBox1.CreateGraphics();

            Gc.Clear(Color.White);
            //Yorumlama;
            string OCRText = OCR.ToString();
            String value   = OCRText;
            Regex  regexA1 = new Regex("241");
            Match  matchA1 = Regex.Match(value, "241"); // A
            Regex  regexA2 = new Regex("4123");
            Match  matchA2 = Regex.Match(value, "4123");
            Regex  regexA3 = new Regex("3121");
            Match  matchA3 = Regex.Match(value, "3121");   // A
            Regex  regexA4 = new Regex("314231");
            Match  matchA4 = Regex.Match(value, "314231"); // A
            Regex  regexA5 = new Regex("412");
            Match  matchA5 = Regex.Match(value, "412");    // A

            Regex regexB5 = new Regex("1434");
            Match matchB5 = Regex.Match(value, "1434");  // B

            if (matchA1.Success)
            {
                OCRText = "3123";
            }
            // A
            else if (matchA2.Success)
            {
                OCRText = "3123";
            }


            else if (matchA3.Success)
            {
                OCRText = "3123";
            }



            else if (matchA4.Success)
            {
                OCRText = "3123";
            }


            else if (matchA5.Success)
            {
                OCRText = "3123";
            }



            else if (matchB5.Success)
            {
                OCRText = "2324324";
            }

            else
            {
                DialogResult result1 = MessageBox.Show("Wrong Password. Try Again !", "Important Query", MessageBoxButtons.OK, MessageBoxIcon.Question);

                if (result1 == DialogResult.OK)
                {
                    Detect form = new Detect();
                    form.Show();
                    this.Hide();
                }
            }

            switch (OCRText)
            {
            //A
            case "3123":
                DialogResult result2 = MessageBox.Show("Congratulation ! System Unlocked", "Important Query", MessageBoxButtons.OK, MessageBoxIcon.Question);
                if (result2 == DialogResult.OK)
                {
                    Main main = new Main();
                    main.Show();
                    this.Hide();
                }
                break;

            case "314234132":
                goto case "3123";

            case "413243124":
                goto case "3123";
            }
            OCR.Remove(0, OCR.Length);
        }