Exemplo n.º 1
0
        // Returns the names of available translations
        // The first value of each tubple is the display name, the second value
        // is the file name that must be passed to the open function.
        public List<Tuple<String, String>> GetAvailableTranslations()
        {
            List<Tuple<String, String>> retval = new List<Tuple<String, String>>();
            foreach (String file in System.IO.Directory.EnumerateFiles(
                GetBasePath(),
                "*" + TRANSLATION_FILE_EXT,
                System.IO.SearchOption.TopDirectoryOnly))
            {
                IniFile tempFile = new IniFile(file);

                retval.Add(new Tuple<String, String>(tempFile.getValue(StringID.TRANSLATION_DISPLAY_NAME.ToString(), ""), System.IO.Path.GetFileNameWithoutExtension(file)));
            }
            return retval;
        }