Exemplo n.º 1
0
        public Dictionary Read()
        {
            var text = System.IO.File.ReadAllText(@"dictionary.txt");

            var lines = text.Split("\n");

            Dictionary d = new Dictionary();

            foreach (var line in lines)
            {
                var            words = line.Split(",");
                DictionaryLine dl    = new DictionaryLine();

                foreach (var word in words)
                {
                    dl.words.Add(word);
                }
                d.DictionaryLines.Add(dl);
            }

            return(d);
        }
Exemplo n.º 2
0
        private string GenerateNfoText()
        {
            string fullText = firstLine;

            Dictionary <string, Alignment> nfoMutContent = nfoInfo.MapMutableValue();

            foreach (KeyValuePair <string, Alignment> dataPair in nfoMutContent)
            {
                fullText += new MutableLine(dataPair, nfoStyle).ToString();
            }

            fullText += lineEmpty;

            Dictionary <string, string> nfoDictContent = nfoInfo.MapDictionaryValue();

            foreach (KeyValuePair <string, string> dataPair in nfoDictContent)
            {
                fullText += new DictionaryLine(dataPair, nfoStyle).ToString();
            }

            fullText += lastLine;
            return(fullText);
        }