在程序需要讀取CAD文件列表中的文件信息
public partial class frmMain : Form
{
private volatile bool _stoped = false;
private void btFilter_Click(object sender
{
_stoped = false;
Thread t = new Thread(new ThreadStart(StartNewThread));
t
}
private void btStop_Click(object sender
{
_stoped = true;
}
private void GetFileSize()
{
btFilter
using (AutoCADConnector CAD = new AutoCADConnector())
{
foreach (ListViewItem t in lvSource
{
if (!_stoped)
{
AutoCAD
double[] p
double[] p
double scale =
p
p
scale = Convert
double w = Math
double h = Math
doc
t
//lvSource
//Thread
Application
}
else
break;
}
}
btFilter
}
private void StartNewThread()
{
MethodInvoker me = new MethodInvoker(this
this
}
}
From:http://tw.wingwit.com/Article/program/net/201311/11468.html