示例#1
0
    private string GetPath(string pp)    // 判断路径是否存在,不存在返回桌面的路径
    {
        string        path = ES3.LoadStr(pp, Environment.GetFolderPath(Environment.SpecialFolder.Desktop));
        DirectoryInfo dir  = new DirectoryInfo(path);

        if (!dir.Exists)  // 不存在的情况
        {
            path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
        }
        return(path);
    }