Exemple #1
0
    //初始化 访问次数筛选器
    void initFilter()
    {
        string path = filterFile;

        visitFilter = new VisitFilter();
        FileInfo fi = new FileInfo(path);

        FileInfo[]    files = directoryInfo.GetFiles();
        List <string> names = new List <string>();

        foreach (FileInfo file in files)
        {
            names.Add(file.Name);
        }
        if (fi.Exists)
        {
            string str = ReadData(path);


            visitFilter.Deserialize(str, names);
        }
        else
        {
            visitFilter.Deserialize("[]", names);
        }
    }