界面如下图:把源代码存为(hta)文件,因为hta文件没有状态栏,所以我这里建议大家存为html文件,这样可以在状态栏下看到
NCC扫描的进度,我这里把NCC的maxloop设置为3000,所以文件统计到3000的时候,会自动终止,以防文件夹中文件太多造成运行的负担。
如果大家喜欢这样的代码,就请关注"NeverModules"
主要功能有-
1。可自己选择文件夹,或者单个文件。
2。自己选择文件后缀名进行统计
3。outputinformation输出的数据有:
文件个数,
文件的代码字节数,
单词个数,
代码行数,
总代码字节数
总代码行数。
4。可以把代码统计结果用SaveAs存为html或者txt文件。 代码如下:<?xmlversion="1.0"encoding="UTF-8"?>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NCCTools-http://www.never-online.net</title>
<hta:applicationid="NCC"
applicationname="NCCapplication"
border="thin"
borderstyle="normal"
caption="yes"
icon="http://www.never-online.net/images/icon.ico"
maximizebutton="no"
minimizebutton="yes"
showintaskbar="no"
singleinstance="yes"
sysmenu="yes"
version="1.01"
windowState="normal"/>
<metahttp-equiv="ImageToolbar"content="no"/>
<metaname="author"content="BlueDestiny,never-online"/>
<metaname="keywords"content="nevermodules,MozillaCSS,C#,.net,Refercence,BlueDestiny,never-online,www.never-online.net"/>
<metaname="description"content="BlueDestiny,never-online"/>
<metaname="title"content="nevercodecounter(NCC)-http://www.never-online.net"/>
<metaname="creator.name"content="GeniusLau,never-online,blueDestiny"/>
<styletype="text/css"media="all"title="Default">
body{background-color:buttonface;}
body,td,input{font:9pttahoma;}
h1{text-align:center;font-weight:bold;font-family:tahoma;font-size:16pt;}
fieldset{height:300px;}
legend{font-weight:bolder;}
.btn{border-left:4pxsolid#444;border-top:1pxsolid#444;border-bottom:1pxsolid#444;border-right:1pxsolid#444;}