Connect lib events to UI in c#