//省略判断拓展名是否合法及目录是否为空,详见源码
count(ext, label3.Text, ref codeList); //调用统计函数
if (codeList.Count == 0)
listBox1.Items.Add(" 没有找到指定扩展名的源文件!");
else
{
listBox1.Items.Add(" 共找到" + ext.Length + "种源文件");
listBox1.Items.Add(" ");
codeInfo typecur = (codeInfo)codeList[0];
long numcur = 0, linecur = 0, lineall = 0;
//下面按照文件名分类统计不同扩展名源程序的总行数
foreach (string extcur in ext)
{
numcur = 0;
linecur = 0;
for (int i = 0; i < codeList.Count; i++)
{
codeInfo cur = (codeInfo)codeList[i];
if (extcur == cur.ext)
{

发表评论