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(); }
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); } }
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); } }