各位大侠:
  我正在做一个小工具,用在一种设备上的,主要是读取设备的日志文件,后缀为DAT,功能非常简单:
实现在DAT文件中筛选某一种记录,比如筛选下面所有的End Maintenance ,还可以按时间段查找
从来没有做过这种例子,有没有哪位前辈可以指导一下,先谢过了。DAT文件格式如下:28/06/2013 18:06:46 31282 End Maintenance                                                  
28/06/2013 18:07:00 40005 Valid Dongle Detected                                            
28/06/2013 18:07:00 40361 Print start check                                                
28/06/2013 18:07:01 40359 Stencil alignment start                                          
28/06/2013 18:07:02 40360 Stencil alignment end                                            
28/06/2013 18:07:02 31273 Start Print cycle                            RUN 234             
28/06/2013 18:07:03 40005 Valid Dongle Detected                                            
28/06/2013 18:07:06 31274 Board received                               RUN                 
28/06/2013 18:07:09 40191 Fiducial Alignment Started                                       
28/06/2013 18:07:12 40359 Stencil alignment start                                          
28/06/2013 18:07:12 40192 Fiducial Alignment Complete                                      
28/06/2013 18:07:13 40360 Stencil alignment end                                            
28/06/2013 18:07:18 40183 Proflow Paste Head OK                                            
28/06/2013 18:07:21 31277 Board Printed                                RUN 234             
28/06/2013 18:07:25 31276 Printed board ready                                              
28/06/2013 18:07:25 40005 Valid Dongle Detected                                            
28/06/2013 18:07:27 31274 Board received                               RUN                 
28/06/2013 18:07:31 40191 Fiducial Alignment Started                                       
28/06/2013 18:07:33 40359 Stencil alignment start                                          
28/06/2013 18:07:34 40192 Fiducial Alignment Complete                                      
28/06/2013 18:07:34 40360 Stencil alignment end                                            
28/06/2013 18:07:39 40183 Proflow Paste Head OK                                            
28/06/2013 18:07:42 31277 Board Printed                                RUN 235             
28/06/2013 18:07:44 40064 Screen clean started                                             
28/06/2013 18:07:44 31262 Cleaning screen                              RUN                 
28/06/2013 18:07:46 31276 Printed board ready                                              
28/06/2013 18:08:08 31261 Cycle completed                              RUN                 
28/06/2013 18:08:08 40065 Screen clean completed                                           
28/06/2013 18:08:10 40005 Valid Dongle Detected                                            
28/06/2013 18:08:12 31274 Board received                               RUN                 DAT文件