예제 #1
0
	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;
	}
예제 #2
0
        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;
        }
예제 #3
0
 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;
 }
예제 #4
0
        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);
        }
예제 #5
0
        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;
        }
예제 #6
0
        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;
        }
예제 #7
0
        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;
        }