底层:
如 Public Class dataLayer
{
public event Action<string> reEvent;/传值
void Test(string info)
{
reDataEvent?.Invoke(info);
}
}
使用层:
dataLayer d=new dataLayer();
d.reEvent += new Action<string>(Recieve);
private void Recieve(string message)
{
Invoke(new EventHandler(delegate
{
//页面层代码~
}
}));
}