form1:
1.主窗体点击按钮(或其他事件)实例化TofoinfoForm
TofoinfoForm tif = new TofoinfoForm();
tif.setFormTextValue += new setTextValue(form2_setFormTextValue);
//第五步:实现事件
void form2_setFormTextValue(string name,string code,string detail,string id)
{}
TofoinfoForm :
// 第一步:声明一个委托。(根据自己的需求)
public delegate void setTextValue(string name, string code, string detail,string id);
//第二步:声明一个委托类型的事件
public event setTextValue setFormTextValue;
//第三步:准备相关数据。
setFormTextValue( name, code, detail,id);