예제 #1
0
 public SublistManager(ListOfWords list1, ListOfSublists list2)
 {
     InitializeComponent();
     MyWordList    = list1;
     MySublistList = list2;
     initializeAutoCompletion();
 }
예제 #2
0
        public void setDefaultLists()
        {
            MyWordList    = new ListOfWords();
            MySublistList = new ListOfSublists();
            Word item = new Word();

            MyWordList.WordItem.Add(item);
            MyWordList.WordItem[0].OneWord = "Default Word";
            MyWordList.WordItem[0].Meaning = "Default Meaning";
        }
예제 #3
0
 public Word_List(ListOfWords list1, ListOfSublists list2)
 {
     InitializeComponent();
     lbWordInserted.Text = "WORD COUNT: " + list1.WordItem.Count;
     MyWordList          = list1;
     MySublistList       = list2;
     initializeSublistAutoCompletion();
     wordCount();
     loadListToCLB(MyWordList);
     defaultBtn();
 }
예제 #4
0
        private void DeserializeFromXML(string savePath1, string savePath2)
        {
            FileStream fs1 = new FileStream(savePath1, FileMode.Open, FileAccess.Read);
            FileStream fs2 = new FileStream(savePath2, FileMode.Open, FileAccess.Read);

            try
            {
                XmlSerializer serializer1 = new XmlSerializer(typeof(ListOfWords));
                XmlSerializer serializer2 = new XmlSerializer(typeof(ListOfSublists));
                MyWordList    = (ListOfWords)serializer1.Deserialize(fs1);
                MySublistList = (ListOfSublists)serializer2.Deserialize(fs2);
                fs1.Close();
                fs2.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                fs1.Close();
                fs2.Close();
            }
        }