Пример #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;
        }