|
-
January 21st, 2016, 07:53 AM
#1
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);
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|