110,499
社区成员
发帖
与我相关
我的任务
分享
//定义个委托
private delegate void Read_Card_info();
/// <summary>
/// 通过委托去执行读卡函数
/// </summary>
private void Read_Info()
{
Invoke(new Read_Card_info(New_recadcard));
}
private void New_recadcard()
{
try
{
//调用服务跟银行交互,获取卡片相关信息
}
catch (System.Exception ex)
{
throw new Exception("读卡片信息错误:" + + ex.ToString());
}
}
//读卡按钮
private void btn_readcard_Click(object sender, EventArgs e)
{
this.ReadCardInfo();
}
//定义个委托
private delegate void Read_Card_info();
/// <summary>
/// 通过委托去执行读卡函数
/// </summary>
private void Read_Info()
{
Invoke(new Read_Card_info(New_recadcard));
}
private void New_recadcard()
{
try
{
//调用服务跟银行交互,获取卡片相关信息
}
catch (System.Exception ex)
{
throw new Exception("读卡片信息错误:" + + ex.ToString());
}
}
//读卡按钮
private void btn_readcard_Click(object sender, EventArgs e)
{
this.ReadCardInfo();
}
public bool ReadCardInfo()
{
Thread w = new Thread(new ThreadStart(Read_Info));
w.Start();
return true;
}