public void WinFormTest() { EventTest e = new EventTest(); EventHandler h = new EventHandler(e.ClickHandler); Form f = new Form(); f.Click += h; //f.Click(null, new EventArgs()); f.Click -= h; }
public void WinFormTest() { EventTest e = new EventTest(); EventHandler h = new EventHandler(e.ClickHandler); Form f = new Form(); f.Click += h; //f.Click(null, new EventArgs()); f.Click -= h; }
public static void ShutUpCompiler() { // Quiet compiler warnings. EventTest e = new EventTest(); TestEventHandler f = new TestEventHandler(e.GenericHandler); ProtectedStaticEvent += f; InternalStaticEvent += f; PrivateStaticEvent += f; e.ProtectedEvent += f; e.InternalEvent += f; e.PrivateEvent += f; }
public static int test_event(IInterfaceTest x, int value) { // reuse the event handler from eventtest.cs EventTest et = new EventTest(); x.TestEvent += et.GenericHandler; // raise the event (should trigger both python and managed handlers) x.OnTestEvent(value); x.TestEvent -= et.GenericHandler; return(et.value); }
public static void ShutUpCompiler() { // Quiet compiler warnings. var e = new EventTest(); EventHandlerTest f = e.GenericHandler; ProtectedStaticEvent += f; InternalStaticEvent += f; PrivateStaticEvent += f; e.ProtectedEvent += f; e.InternalEvent += f; e.PrivateEvent += f; }
public static void ShutUpCompiler() { // Quiet compiler warnings. EventTest e = new EventTest(); TestEventHandler f = new TestEventHandler(e.GenericHandler); ProtectedStaticEvent += f; InternalStaticEvent += f; PrivateStaticEvent += f; e.ProtectedEvent += f; e.InternalEvent += f; e.PrivateEvent += f; }
public static int test_event(IInterfaceTest x, int value) { // reuse the event handler from eventtest.cs EventTest et = new EventTest(); x.TestEvent += et.GenericHandler; // raise the event (should trigger both python and managed handlers) x.OnTestEvent(value); x.TestEvent -= et.GenericHandler; return et.value; }