C#窗体之间事件传值
2021-02-16 23:18
阅读:359
//第二个窗体
public delegate void DAddress(string address);
public event DAddress ESignAddress;
protected void SignAddress(string address)
{
ESignAddress(address);
}
private void BtnClick(object sender,Eventargs e)
{
SignAddress(comCity.Text + comArea.Text + txtAddress.Text);
}
//第一个窗体
from f=new from();
f.ESignAddress+=new from.DAddress()
f.show();
protected void signaddress(string str)
{
Msg.Text=str;
}
下一篇:wpf获取目录路径
评论
亲,登录后才可以留言!