public static NSObject SetupAction (NSObject target, EventHandler handler) { ActionDispatcher ctarget = target as ActionDispatcher; if (ctarget == null){ ctarget = new ActionDispatcher (); ctarget.Activated += handler; } return ctarget; }
public static void RemoveAction(NSObject target, EventHandler handler) { ActionDispatcher ctarget = target as ActionDispatcher; if (ctarget == null) { return; } ctarget.Activated -= handler; }
public static NSObject SetupDoubleAction(NSObject target, EventHandler doubleHandler) { ActionDispatcher ctarget = target as ActionDispatcher; if (ctarget == null) { ctarget = new ActionDispatcher(); ctarget.DoubleActivated += doubleHandler; } return(ctarget); }