Դ:

import win.ui;
/*DSG{{*/
mainForm = ..win.form( bottom=487;parent=...;right=891;text="Nginx־ Power by AAuto";maxmize=1 )
mainForm.add( 
button2={ dl=1;bottom=37;text="ɸѡ(ָ)";left=768;dt=1;top=13;z=4;right=881;cls="button" };
listview={ dr=1;dl=1;bgcolor=16777215;right=883;left=9;dt=1;db=1;cls="listview";bottom=478;top=60;z=1;gridLines=1;edge=1;fullRow=1 };
edit={ dl=1;bottom=35;right=510;left=12;dt=1;top=13;z=3;edge=1;cls="edit" };
button={ dl=1;bottom=36;text="ѡ־ļ";left=517;dt=1;top=12;z=2;right=608;cls="button" };
edit2={ dl=1;bottom=36;text="Baiduspider";left=630;dt=1;top=14;z=5;right=761;edge=1;cls="edit" }
)
/*}}*/

//
var logList = mainForm.listview
logList.insertColumn("IP",150)
logList.insertColumn("Time",150)
logList.insertColumn("Method",100)
logList.insertColumn("Url",300)
logList.insertColumn("HTTP",50)
logList.insertColumn("Status",50)
logList.insertColumn("Length",50)
logList.insertColumn("User-Agent",600)



//̷߳, [б,־ļλ,]
function insertList(hwnd,logPath,keyword){
    import win;
    import win.ui.ctrl.listview;
    
    var listview = win.ui.ctrl.listview()   
    listview.hwnd = hwnd;
    listview.clear()    //ԭб
    
    thread.set("stop", false)
    io.print(hwnd,logPath,keyword)
    var lineNum = 0
    //־ļ
    for line in io.lines(logPath) { 
        //;²ѯĿ,Լ۸ж
        var stop = thread.get("stop")
        if(stop){
            listview.clear()    //ԭб
            break;
        }
        //˰,ûвҵ,,
        if(keyword && !string.find(line,keyword)){  
            continue ;
        }
        var lineTxt = string.trim(line,'\n')
        var logTab = string.split(lineTxt," ")  //Կո,ָÿеַ

        //table.remove(logTab,1)
        //ƳԪ
        table.remove(logTab,2)
        table.remove(logTab,2)
        table.remove(logTab,3)
        table.remove(logTab,8)
        //ȥʱǰķ [
        logTab[2] = string.trim(logTab[2],"'\[")
        var user_agent = ""
        //ϲuser-agent
        for(i=8;table.count(logTab);1){
            user_agent += logTab[ i ]
        }
        logTab[8] = user_agent; 
        //뵽б
        listview.addItem(logTab)
        lineNum++;  //
        if(lineNum%50 == 0){    //ÿ50,һ,һҳ
            listview.ensureVisible(lineNum) //һҳ,ȻΪס
            listview.setColumnText(1,"IP("++listview.count++")")    //
        }
        win.delay(1)
    } 
    listview.setColumnText(1,"IP("++listview.count++")")
}

//ѡ־ļ
mainForm.button.oncommand = function(id,event){
    //mainForm.msgbox( mainForm.button.text );
    import fsys.dlg;
    var path = fsys.dlg.open("*.*||","ѡ־ļ")
    if(path){
        //ýϵ·ֵ
        mainForm.edit.text = path;
        thread.set("stop", true)    //ֹͣǰ߳
        //һ insertList߳,־,뵽б
        thread.create(
            insertList,
            mainForm.listview.hwnd,
            path
        )
    }
}
//ֻʾ
mainForm.button2.oncommand = function(id,event){
    if(mainForm.edit.text){
        thread.set("stop", true)    //ֹͣǰ߳
        //һ insertList߳,־,뵽б
        thread.create(
            insertList,
            mainForm.listview.hwnd,
            mainForm.edit.text,     //־ļ·
            mainForm.edit2.text //,Ǹûв
        )
    }else{
        win.msgboxTest("ѡ־ļ!","ʾ")
    }
}


import config;
mainForm.bindConfig( config.mainForm,{
    edit = "text"; //editؼtextֵļ
    radiobutton = "checked";
    checkbox = "checked";
    combobox = "selIndex";
} );



mainForm.show() 
win.loopMessage();