Hello,
I have two projects in this solution: ProjectA and ProjectB. ProjectA is the main start-up project, and has a reference to ProjectB.
ProjectA has a file called MainForm.cs, which contains a textbox and the main UI.
ProjectB has a class inside Shapes.cs, containing a particular structure we're using. Shapes.cs contains an event that is fired when the user changes some text for that object.
What I need to do is catch that text and set a textbox in MainForm.cs to that text. Is there a way we can do that? Basically I don't see any reference to the main form inside Shapes.cs. I would like to do something like this:
( Shape1.Parent as MainForm ).TextBox1.Text = Shape1.Name;
, assuming the user types a string that gets stored in Shape1.Name. I need to escalate it to the main form.
Thanks.