Пример #1
0
        private void Form1_Load(object sender, EventArgs e)           //被调用,显示外观
        {
            assembly  = Assembly.GetExecutingAssembly();
            rmManager = new ResourceManager("LLK.images", assembly);
            Size size = map.GetMapSize();

            this.pictureBox1.Width  = size.Width;
            this.pictureBox1.Height = size.Height;
            this.Width  = this.pictureBox1.Width + 300;
            this.Height = this.pictureBox1.Height + 200;
            san         = 3; //设置求助次数
            if (t1 == null)
            {
                t1 = new Thread(new ThreadStart(SS1));
            }
            //   Console.WriteLine(t1.ThreadState);
            // t1.Start();
            //   button3_Click(sender,e);
        }
Пример #2
0
        private void Start_Click(object sender, EventArgs e)
        {
            GameBox.Visible = true;
            map             = new BlockMap();
            GameBox.Size    = map.GetMapSize();
            Graphics g = GameBox.CreateGraphics();

            PaintMap(g);
            Start.Enabled     = false;
            Tip.Enabled       = true;
            MessUp.Enabled    = true;
            gameStatus        = GameStatus.Playing;
            preHit            = DateTime.Now.Ticks;
            combo             = 0;
            score             = 0;
            maxCombo          = 0;
            messUpTime        = 1;
            tipTime           = 3;
            MessUp.Text       = string.Format("打乱({0})", messUpTime);
            Tip.Text          = string.Format("提示({0})", tipTime);
            timeLeft          = 60;
            CountDown.Visible = true;
            timer             = new System.Threading.Timer(update, null, 0, 500);
        }