Exemple #1
0
        public static INIFile Legacy(String filename)
        {
            if (Legacy_INI_Root == null)
            {
                String result_buf = new String(' ', 256);
                //char[] result_buf = new char[256];
                StringBuilder INI_Root = new StringBuilder();
                INI_Root.Length = 256;
                GetProfileString("Fortunet", "System Path", "c:/ftn3000/working/ftnsys.ini", INI_Root, result_buf.Length);
                Legacy_INI_FtnSys = INI_Root.ToString();
                Legacy_INI_Root   = INI.File(INI_Root.ToString())["System"]["INI Path", "c:/ftn3000/working"].Value;
            }
            if (filename == null)
            {
                filename = Legacy_INI_FtnSys;
            }

            if (filename[1] == ':' || filename[0] == '/' || filename[0] == '\\')
            {
                ;
            }
            else
            {
                filename = Legacy_INI_Root + "/" + filename;
            }

            foreach (INIFile file in files)
            {
                if (file.file == filename)
                {
                    return(file);
                }
            }
            INIFile result = new INIFile();

            result.file = filename;
            files.Add(result);
            result.OpenFile(filename);
            return(result);
        }
Exemple #2
0
 public DsnOdbcConnection()
     : base(INI.File("CTK.INI")["ODBC"]["DSN", "MySQL"])
 {
 }