コード例 #1
0
 private void CodeBreakerPrevious_Click(object sender, EventArgs e)
 {
     GuessPanel1.BringToFront();
 }
コード例 #2
0
        private void Reset()
        {
            switch (Dificulty2)
            {
            case "Easy":
                EasyEntryPanel.BringToFront();
                Code[0] = r.Next(0, 4);
                Code[1] = r.Next(0, 4);
                Code[2] = r.Next(0, 4);
                break;

            case "Medium":
                MediumEntryPanel.BringToFront();
                Code[0] = r.Next(0, 7);
                Code[1] = r.Next(0, 7);
                Code[2] = r.Next(0, 7);
                break;

            case "Hard":
                HardEntryPanel.BringToFront();
                Code[0] = r.Next(0, 9);
                Code[1] = r.Next(0, 9);
                Code[2] = r.Next(0, 9);
                break;
            }
            switch (ChalengeMode2)
            {
            case "False":
                ChalengeOn.Hide();
                ChEasy.Hide();
                ChHard.Hide();
                break;

            case "True":
                progressBar1.Value = 100;
                ChalengeOn.Show();
                switch (Dificulty2)
                {
                case "Easy":
                    CodeBreakerNext.Hide();
                    Code[0] = r.Next(0, 4);
                    Code[1] = r.Next(0, 4);
                    Code[2] = r.Next(0, 4);
                    break;

                case "Medium":
                    ChEasy.Hide();
                    CodeBreakerNext.Hide();
                    break;

                case "Hard":
                    ChEasy.Hide();
                    ChHard.Show();
                    break;
                }
                break;
            }
            GuessPanel1.BringToFront();
            CodeBreakerNext.Hide();
            round      = 1;
            Test1.Text = Code[0].ToString();
            Test2.Text = Code[1].ToString();
            Test3.Text = Code[2].ToString();
        }