private void addResultButtons(GuessLine i_NewGuessLine) { foreach (ResultButton resultButton in i_NewGuessLine.ResultButtons) { Controls.Add(resultButton); } }
private void addColorButtons(GuessLine i_NewGuessLine) { foreach (ColorButton guessButton in i_NewGuessLine.GuessButtons) { Controls.Add(guessButton); guessButton.Click += new EventHandler(colorButton_Click); } }
private void addGuessLinesControlsToForm(GuessLine i_NewGuessLine) { Controls.Add(i_NewGuessLine.EnterGuess); i_NewGuessLine.EnterGuess.Click += new EventHandler(enterGuess_Click); addResultButtons(i_NewGuessLine); addColorButtons(i_NewGuessLine); }
private void setListOfGuessLines(int i_NumberOfGuesses) { m_GuessLinesList = new List <GuessLine>(); for (int i = 0; i < i_NumberOfGuesses; i++) { GuessLine newGuessLine = new GuessLine(i); m_GuessLinesList.Add(newGuessLine); addGuessLinesControlsToForm(newGuessLine); } }