While these examples are written in GHPython, they do demonstrate how to implement mouse events for dynamically drawing stuff. It might help:
Should be very similar in C#, whether compiled or in a scripting component.