المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Delegate calling from a child class



C# Programming
08-24-2009, 01:32 PM
Hi

I have a GUI class that creates a IO object that handles IP based connections, packets and whatnot. On the GUI I have a label that is supposed to report the status of the connection (connected, failed, connecting, disconnected etc...) The label update function is written as a delegate in the GUI class to allow cross-thread calls - but I cannot work out the best way to call the delegate from the child object when an IO event occurs.

Could anyone suggest the best way to do this?

Many thanks indeed

FR :