Ejemplo n.º 1
0
        public Test(List <StudyDictionary> studies, DirectoryInfo info)
        {
            InitializeComponent();
            directory = info;
            NotStudiedDictionary notStudied = new NotStudiedDictionary();

            notStudiedList.Add(notStudied);
            using (StreamReader sr = new StreamReader("BaseDictionary.txt", System.Text.Encoding.Default))
            {
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    notStudied = notStudied.AddWord(line);
                    notStudiedList.Add(notStudied);
                    notStudied = new NotStudiedDictionary();
                }
            }
            for (int l = 0; l < studyDictionaries.Count; l++)
            {
                arr.Add(l);
            }
            studyDictionaries = studies;
            SelectWord();
            TextButton();
        }
Ejemplo n.º 2
0
        public ShowDictionary()
        {
            InitializeComponent();
            NotStudiedDictionary notStudied = new NotStudiedDictionary();

            notStudiedList.Add(notStudied);
            using (StreamReader sr = new StreamReader("BaseDictionary.txt", System.Text.Encoding.Default))
            {
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    notStudied = notStudied.AddWord(line);
                    notStudiedList.Add(notStudied);
                    notStudied = new NotStudiedDictionary();
                }
                notStudiedList.RemoveAt(0);
            }
        }
Ejemplo n.º 3
0
        public void Reader(DirectoryInfo directory)
        {
            NotStudiedDictionary notStudied = new NotStudiedDictionary();

            notStudiedList.Add(notStudied);
            dirInfo = directory;
            string path = directory + "\\Dictionary.txt";

            using (StreamReader sr = new StreamReader(path, Encoding.Default))
            {
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    notStudied = notStudied.AddWord(line);
                    notStudiedList.Add(notStudied);
                    notStudied = new NotStudiedDictionary();
                }
                notStudiedList.RemoveAt(0);
            }
        }