T
Tim Gallivan
Hello,
I have a question: There is a form (Form1) with a text box, which is used
for logging/display purposes. When the project starts up, Form1 starts Class
A on it's own thread. When a timer in Class A elapses, it creates an
instance of Class B, which, in turn will create several instances of Class
C. Each of classes A, B and C need to report back to Form1.
In my design, when Class C (for example) raises an event, it is handled by
B, which raises an event handled by Class A, which raises an event which is
handled by Form1. Although it works, I'm certain I must be violating some
OOP principle here, or at least, I'm re-inventing the wheel.
Could someone please point me at the correct way of "bubbling" the event in
Class C back to Form1. Your time is greatly appreciated.
Thanks in advance,
Tim
I have a question: There is a form (Form1) with a text box, which is used
for logging/display purposes. When the project starts up, Form1 starts Class
A on it's own thread. When a timer in Class A elapses, it creates an
instance of Class B, which, in turn will create several instances of Class
C. Each of classes A, B and C need to report back to Form1.
In my design, when Class C (for example) raises an event, it is handled by
B, which raises an event handled by Class A, which raises an event which is
handled by Form1. Although it works, I'm certain I must be violating some
OOP principle here, or at least, I'm re-inventing the wheel.
Could someone please point me at the correct way of "bubbling" the event in
Class C back to Form1. Your time is greatly appreciated.
Thanks in advance,
Tim