Exemplo n.º 1
0
 private void setGuessButtonFromColorForm(GuessColorButton sender)
 {
     m_ColorChoiceForm.ShowDialog();
     if (m_ColorChoiceForm.UserChoiceOfColor != null && m_ColorChoiceForm.DialogResult == DialogResult.OK)
     {
         sender.BackColor = m_ColorChoiceForm.UserChoiceOfColor.Value;
         sender.ValueOfTheGuessInStringFormat = m_ColorChoiceForm.UserChoiceValue.Value;
     }
 }
Exemplo n.º 2
0
            protected override ColorButton CreateButton(Color i_Color, Point i_Location, int i_PivotLeft)
            {
                GuessColorButton colorButton = new GuessColorButton(i_Color);

                colorButton.Location = i_Location;
                colorButton.Left    += i_PivotLeft * (ColorButton.k_Width + k_ColorButtonSpacing);
                colorButton.Click   += new EventHandler(ButtonColor_Click);

                return(colorButton);
            }
Exemplo n.º 3
0
        private void OnClickColoredButton(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            GuessColorButton button = sender as GuessColorButton;

            if (button != null)
            {
                m_UserChocieOfColor = button.BackColor;
                m_UserChoiceValue   = button.ValueOfTheGuessInStringFormat;
                this.Close();
            }
        }
Exemplo n.º 4
0
        private void createGuessColoredButton(eColor i_Color)
        {
            GuessColorButton coloredButton = new GuessColorButton(i_Color);

            m_ColorButtons.Add(Enum.GetName(typeof(eColor), i_Color), coloredButton);
        }