Please, help me with events...
I created C# DLL with simple class for testing event:
B4PPC code:
(ME - MyEvent.dll)
But, if I clicked on Button1, event OnSomeEvent doesn't work.
How to correct?
:sign0085:
I created C# DLL with simple class for testing event:
B4X:
using System;
using System.Collections.Generic;
using System.Text;
namespace EventHandlersTest
{
public delegate void MyEventHandler();
public class MyEvent
{
public event MyEventHandler SomeEvent;
public void OnSomeEvent()
{
if (SomeEvent != null)
SomeEvent();
}
public void Test(int X)
{
if (X == 10)
OnSomeEvent();
}
}
}
B4PPC code:
(ME - MyEvent.dll)
B4X:
Sub App_Start
Form1.Show
ME.New1
End Sub
Sub Button1_Click
ME.Test(10)
End Sub
Sub ME_OnSomeEvent
Msgbox("SomeEvent!")
End Sub
But, if I clicked on Button1, event OnSomeEvent doesn't work.
How to correct?
:sign0085: