I am developing an application using FezHydra board. Is there any sample code or example that shows how to access the button on board (Reset Button) from program. I would like to use it as an interrupt port.
Also, when I add modules to the board using the designer, I can access them from Program class. However, when I want to access them from other classes, I pass them as arguments from the Program class. I am not sure if this the right way of accessing modules from other classes or I should use a specific namespace for this purpose.
How about my second question? Let’s say I have added Rs232 module with the name of “[em]rs232[/em]” to the board using the designer. I am able to acess it in [em]Program [/em]class by calling [em]rs232[/em]. However, what is the best way to access it in another class, say Class [em]A[/em]. Is passing it as an argument to class [em]A [/em]the only way?
@ Afshin - you can also define public methods in the Program class that will call required methods of the module(s) instance and use that instead. Passing module instances as parameter will work too. There are different design patterns for that.