應用版上googleandy發問及ambercrystal提供的精簡整合程式後,發現在下單登入後,隨即斷線。有"執行緒已經從等候狀態中斷"及crossThreadMessageException
[原文]
請教如何將兩個C#專案合併成一個?
http://www.coco-in.net/forum.php?mod=viewthread&tid=38520&fromuid=25481
中斷點在下單trade的OnGetStatus的this.Invoke這行
private void OnGetStatus(object sender, COM_STATUS staus, byte[] msg)
{
TaiFexCom com = (TaiFexCom)sender;
// com.WriterLog("OnGetStatus step [0] COM_STATUS-> " + staus);
if (this.InvokeRequired)
{
//com.WriterLog("OnGetStatus step [1] COM_STATUS-> " + staus);
Smart.OnGetStatus_EventHandler d = new Smart.OnGetStatus_EventHandler(OnGetStatus);
//com.WriterLog("OnGetStatus step [2] COM_STATUS-> " + staus);
this.Invoke(d, new object[] { sender, staus, msg });
//com.WriterLog("OnGetStatus step [3] COM_STATUS-> " + staus);
return;
}
//TaiFexCom com = (TaiFexCom)sender;
//com.WriterLog("OnGetStatusUpdateUI before COM_STATUS-> " + staus);
OnGetStatusUpdateUI(sender, staus, msg);
//com.WriterLog("OnGetStatusUpdateUI after COM_STATUS-> " + staus);
}
請前輩指導如何解決這樣的問題?或提示可以尋找的關鍵字
謝謝
|