示例#1
0
 void game_NextStage(object sender, EventArgs e)
 {
     alreadyWin = false;
     buttons.Clear();
     panel1.Controls.Clear();
     foreach (Star star in game.Source)
     {
         Button b = new ButtonEx();
         b.BackColor = star.Color;
         b.FlatAppearance.BorderColor = Color.White;
         b.FlatAppearance.BorderSize  = 2;
         b.Parent       = panel1;
         b.Tag          = star;
         b.Click       += new EventHandler(b_Click);
         b.DoubleClick += new EventHandler(b_DoubleClick);
         buttons.Add(b);
     }
     JustifySize();
     stageToolStrip.Text  = string.Format("第{0}关:{1}分", game.Stage, game.ScoreTarget);
     statusToolStrip.Text = game.Stage == 1?"新的一局~~好运!":string.Empty;
     scoreToolStrip.Text  = string.Format("总分:{0}", game.Score);
 }
示例#2
0
 void game_NextStage(object sender, EventArgs e)
 {
     alreadyWin = false;
     buttons.Clear();
     panel1.Controls.Clear();
     foreach (Star star in game.Source)
     {
         Button b = new ButtonEx();
         b.BackColor = star.Color;
         b.FlatAppearance.BorderColor = Color.White;
         b.FlatAppearance.BorderSize = 2;
         b.Parent = panel1;
         b.Tag = star;
         b.Click += new EventHandler(b_Click);
         b.DoubleClick += new EventHandler(b_DoubleClick);
         buttons.Add(b);
     }
     JustifySize();
     stageToolStrip.Text = string.Format("第{0}关:{1}分", game.Stage, game.ScoreTarget);
     statusToolStrip.Text = game.Stage == 1?"新的一局~~好运!":string.Empty;
     scoreToolStrip.Text = string.Format("总分:{0}", game.Score);
 }