private void refreshViewRight() { foreach (Button b in panelButtons.Controls) { Logic.Field f = myGame.GetField((Point)b.Tag); if (f.Covered == true) { b.ForeColor = Color.Yellow; //b.BackColor = Color.Yellow; b.Text = "P"; } } }
private void refreshView() { foreach (Button b in panelButtons.Controls) { Logic.Field f = myGame.GetField((Point)b.Tag); if (f.Covered == false) { if (f.FieldType == Logic.FieldTypeEnum.Bomb) { b.BackColor = Color.Red; b.Text = "#"; } else { b.BackColor = Color.White; if (f.FieldType == Logic.FieldTypeEnum.BombNumber) { b.Text = f.BombCount.ToString(); } } } } }