I am working on an application which uses a VB GUI to collect data from the user and pass it to C# classes. In the VB code I have the following delegate and event:
|
When the user creates a new analysis, the analysis should be added to a tree view in the GUI and sent to a C# class called Header.cs, which maintains a list of analyses. That list is used for activites on the C# side, such as writing an XML file containing the data for later retrieval.
In tracing through the code, the analysis shows up correctly in the GUI, raising events in one class, which are responded to by event handlers in other classes. However, the data never makes it to the Header class.
How do I wire up the Header.cs class to listen for the OnAnalysisAdded event from the VB code?
Thanks in advance,
LG Rains
Louise RainsPosted Apr 7, 2010, 11:50 AM
Beg pardon, the class is called Header, in the file Header.cs. One member of Header is analyses, which is a list of Analysis objects. The GUI provides a user with the opportunity to define a new Analysis object. After the user clicks OK, the new Analysis object needs to 1) show up in the GUI as a node on a Tree, and 2) be added to the Header's analyses list. Step 2) isn't happening.
Step 1 happens in the VB code. Events are raised and then handled in other VB files along the way.
How do I get my Header to listen for an OnAnalysisAdded event?
Sam HobbsPosted Apr 7, 2010, 11:15 AM