Pavol

Pavol

  • NA
  • 23
  • 9k

Change variables in form from class

Aug 16 2013 4:54 AM
Hi

I need change variables in form from class

I have event on button.

private void listenClick(object sender, EventArgs e)   
{
if (button == false)
            {
                button = true;
                listen.Text = "Close";
                listen.BackColor = Color.Red;
                textLp.Enabled = false;
                textRp.Enabled = false;
                textIp.Enabled = false;
                textSend.Enabled = true;
             
            }
            else
            {
                button = false;
                listen.Text = "Listen";
                listen.BackColor = Color.Lime;
                textLp.Enabled = true;
                textRp.Enabled = true;
                textIp.Enabled = true;
                textSend.Enabled = false;

            }
}

I need change all this variables in class.

Answers (8)