Пример #1
0
 public MainWindowViewModel()
 {
     CurrentVocabulary = new Vocabulary();
     //             CurrentVocabulary.Vocables.Add(new Vocable("먹다", "to eat"));
     //             CurrentVocabulary.Vocables.Add(new Vocable("살다", "to live, reside"));
     //             CurrentVocabulary.Vocables.Add(new Vocable("싸다", "cheap"));
     //             CurrentVocabulary.Vocables.Add(new Vocable("가족", "family"));
     //             CurrentVocabulary.Vocables.Add(new Vocable("사랑하다", "to love"));
     //             CurrentVocabulary.Vocables.Add(new Vocable("이름", "name"));
 }
Пример #2
0
 public void LoadVocabulary()
 {
     //             Stream stream = File.Open("Vocabulary.voc", FileMode.Open);
     //             BinaryFormatter bf = new BinaryFormatter();
     //             CurrentVocabulary = (Vocabulary)bf.Deserialize(stream);
     //             stream.Close();
     using (var stream = new FileStream("Vocabulary.voc", FileMode.Open))
     {
         BinaryFormatter bf = new BinaryFormatter();
         CurrentVocabulary = (Vocabulary) bf.Deserialize(stream);
     }
 }