Пример #1
0
        public void ReadFile(String fileName)
        {
            string[]     lines = System.IO.File.ReadAllLines(fileName);
            FileStream   fs    = new FileStream(fileName, FileMode.Open);
            StreamReader sr    = new StreamReader(fs);

            for (int i = 1; i < lines.Length; i = i + 2)
            {
                if (!holder.contains(lines[i]))
                {
                    addPhrase(lines[i]);
                    addTranslation(lines[i], lines[0], lines[i + 1]);
                }
                else
                {
                    addTranslation(lines[i], lines[0], lines[i + 1]);
                }
            }

            fs.Close();
            sr.Close();
        }
Пример #2
0
 public Boolean HasPhrase(String p)
 {
     return(holder.contains(p));
 }