Пример #1
0
 private void addResultButtons(GuessLine i_NewGuessLine)
 {
     foreach (ResultButton resultButton in i_NewGuessLine.ResultButtons)
     {
         Controls.Add(resultButton);
     }
 }
Пример #2
0
 private void addColorButtons(GuessLine i_NewGuessLine)
 {
     foreach (ColorButton guessButton in i_NewGuessLine.GuessButtons)
     {
         Controls.Add(guessButton);
         guessButton.Click += new EventHandler(colorButton_Click);
     }
 }
Пример #3
0
        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);
        }
Пример #4
0
 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);
     }
 }