Exemple #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;
	}
Exemple #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;
        }
Exemple #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;
 }
Exemple #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);
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #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;
        }