Using Events to notify and change a property i.e. button.color
Good day all
I have been going through tutorials from youtube and msdn pages to forums explaining events and how they work.
I have had no luck, so I will be asking a situation specific question and hopefully someone could get through to me, this is hopefully a simple enough example and a problem I need to implement into a project of mine.
I have always found ways around events since I never fully understood it, but now I have no choice!
Code:
public class tcp_sender
{
//for testing
static bool ServerOnline = false;
void THREAD_CheckServer
{
ServerOnline = (Ping == success);
}
}
tcp_listener
{
//button.color = ((ServerOnline) ? Color.Green : Color.Red);
}
Re: Using Events to notify and change a property i.e. button.color