Exemplo n.º 1
0
 static Logger()
 {
     if (string.IsNullOrEmpty(DllDir))
     {
         AssemblyDataExt ass = new AssemblyDataExt();
         DllDir = ass.GetAssemblyDir();
     }
 }
Exemplo n.º 2
0
        public static string GetParentDir(int level)
        {
            AssemblyDataExt ass = new AssemblyDataExt();
            string          app = ass.GetAssemblyDir();

            while (level > 0)
            {
                DirectoryInfo di = new DirectoryInfo(app);
                if (di.Root.FullName == app)
                {
                    return(app);
                }
                app = di.Parent.FullName;
                level--;
            }
            return(app);
        }