private void RefreshButtonField() { for (int position = 0; position < 16; position++) { GetButton(position).Text = game.GetNumber(position).ToString(); GetButton(position).Visible = (game.GetNumber(position) > 0); } }
private void RefreshButtonField() { for (int position = 0; position < size * size; position++) { GetButton(position).Text = game.GetNumber(position).ToString(); if (game.GetNumber(position) == 0) { GetButton(position).Hide(); } else { GetButton(position).Show(); } } }
private void RefreshButtonField() { for (int position = 0; position < 16; position++) { GetButton(position).Content = game.GetNumber(position).ToString(); if (game.GetNumber(position) == 0) { GetButton(position).Visibility = Visibility.Hidden; } else { GetButton(position).Visibility = Visibility.Visible; } } }