Пример #1
0
        private void Win()
        {
            double recordTime = Convert.ToInt32(Data.GetTime((Convert.ToInt16(this.Tag))));
            string time;

            if (mili < 10)
            {
                time = sec.ToString() + "0" + mili.ToString();
            }
            else
            {
                time = sec.ToString() + mili.ToString();
            }

            tmrTime.Enabled = false;
            if (Convert.ToInt16(time) < recordTime || !Data.GetComplete((Convert.ToInt16(this.Tag))))
            {
                Data.UpdateTime((Convert.ToInt16(this.Tag)), time);
            }
            Data.LevelComplete((Convert.ToInt16(this.Tag)));
            start = false;
            MessageBox.Show(@"You Win!");
            Hide();

            //Level Specific Code
            var l3 = new Hardcore3();

            l3.Show();
        }
Пример #2
0
        private void lblLvl_Click(object sender, EventArgs e)
        {
            Hide();
            var label = new Label();

            label = (Label)sender;
            if (!Data.GetHardcoreSelected())
            {
                switch (label.Tag.ToString())
                {
                case "1":
                    var l1 = new Level1();
                    l1.Show();
                    break;

                case "2":
                    var l2 = new Level2();
                    l2.Show();
                    break;

                case "3":
                    var l3 = new Level3();
                    l3.Show();
                    break;

                case "4":
                    var l4 = new Level4();
                    l4.Show();
                    break;

                case "5":
                    var l5 = new Level5();
                    l5.Show();
                    break;

                case "6":
                    var l6 = new Level6();
                    l6.Show();
                    break;

                case "7":
                    var l7 = new Level7();
                    l7.Show();
                    break;

                case "8":
                    var l8 = new Level8();
                    l8.Show();
                    break;

                case "9":
                    var l9 = new Level9();
                    l9.Show();
                    break;

                case "10":
                    var l10 = new Level10();
                    l10.Show();
                    break;
                }
            }
            else
            {
                switch (label.Tag.ToString())
                {
                case "1":
                    var l1 = new Hardcore1();
                    l1.Show();
                    break;

                case "2":
                    var l2 = new Hardcore2();
                    l2.Show();
                    break;

                case "3":
                    var l3 = new Hardcore3();
                    l3.Show();
                    break;

                case "4":
                    var l4 = new Hardcore4();
                    l4.Show();
                    break;

                case "5":
                    var l5 = new Hardcore5();
                    l5.Show();
                    break;

                case "6":
                    var l6 = new Hardcore6();
                    l6.Show();
                    break;

                case "7":
                    var l7 = new Hardcore7();
                    l7.Show();
                    break;

                case "8":
                    var l8 = new Hardcore8();
                    l8.Show();
                    break;

                case "9":
                    var l9 = new Hardcore9();
                    l9.Show();
                    break;

                case "10":
                    var l10 = new Hardcore10();
                    l10.Show();
                    break;
                }
            }
        }