日期:2014-05-18 浏览次数:20902 次
//將ForTest修改如下:
public void ForTest(object state)
{
ucTestScriptTree tn = (ucTestScriptTree)state;
tn.BeginImport(tn.m_node, tn.list);
}
//使用下面的代碼即可啟動線程,亦即樓主所列之第二種方法
Thread m_Thread = new Thread(new ParameterizedThreadStart(ForTest));
m_Thread.Start(_tree);
------解决方案--------------------
public ucTestScriptTree _tree = new ucTestScriptTree();
public void ForTest( object obj )
{
ucTestScriptTree tn = ( ucTestScriptTree )obj;
tn.BeginImport( tn.m_node, tn.list );
}