Exemplo n.º 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;
	}
Exemplo n.º 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;
        }
Exemplo n.º 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;
 }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }