I’ve been struggling to subscribe a form to an event that originates in the rhino command class. I can accomplish this easily when using the existing events but I would like to produce a custom event that alerts me to the completion of a process within my own code.
Does a custom class need to inherit from the command class in order for a form to subscribe to it? (ie. CustomRhinoEvent : Rhino.Commands.CommandEventArgs) I understand that this might sound like a silly question but I ask because I have been trying to use higher level event arguments (ie. System.EventArgs) but have not successfully been able to subscribe a form to them when the event originates from a process based in the command class. The opposite (subscribing the command class to a form) does however work.
If a custom class is actually needed to subscribe a form to a command class event, and that class must inherit from the command class eventargs then can someone please provide an example of this custom class?
I could be totally wrong on the above - if so an example for producing a custom event based on System.EventArgs would be appreciated. I have tried but unfortunately have not been able to have a form subscribe to an event in Rhino when using these higher level events. All subscriptions compile successfully but at run time subscriptions are not found by the relevant OnEvent method.
I have been trying to write a custom event class but am receiving no constructor errors or errors that state member names cannot be the same as their enclosing type - each of which are starting to confuse me so examples would be greatly appreciated.
Thank you sincerely.