示例#1
0
 public SublistManager(ListOfWords list1, ListOfSublists list2)
 {
     InitializeComponent();
     MyWordList    = list1;
     MySublistList = list2;
     initializeAutoCompletion();
 }
示例#2
0
 public Normal_Mode(ListOfWords list)
 {
     InitializeComponent();
     MyWordList = list;
     initializeQuizList();
     loadQnA();
 }
示例#3
0
        public void loadListToCLB(ListOfWords list)
        {
            myMeaningList = new List <Label>();
            clbWordlist.Items.Clear();
            flpMeaning.Controls.Clear();
            myMeaningList.Clear();
            prevSelectIndex = 0;

            for (int i = 0; i < list.WordItem.Count; i++)
            {
                Label label = new Label();
                label.Size = new Size(flpMeaning.Width, flpMeaning.Height / numOfMeanings);
                myMeaningList.Add(label);
                myMeaningList[i].Text = list.WordItem[i].Meaning;
            }

            foreach (Word word in list.WordItem)
            {
                clbWordlist.Items.Add(word.OneWord);
            }

            foreach (Label label in myMeaningList)
            {
                flpMeaning.Controls.Add(label);
            }
        }
示例#4
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";
        }
示例#5
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();
 }
示例#6
0
        public void loadSublistToCLB(Sublist list)
        {
            ListOfWords listOfWords = new ListOfWords();

            for (int i = 0; i < list.SublistWords.Count(); i++)
            {
                listOfWords.WordItem.Add(MyWordList.WordItem[list.SublistWords[i]]);
            }

            loadListToCLB(listOfWords);
        }
示例#7
0
        public ListOfWords initializeSublist(Sublist sublist)
        {
            ListOfWords listOfWords = new ListOfWords();

            foreach (int i in sublist.SublistWords)
            {
                listOfWords.WordItem.Add(MyWordList.WordItem[i]);
            }

            return(listOfWords);
        }
示例#8
0
        private void tbWord_TextChanged(object sender, EventArgs e)
        {
            SearchList = new ListOfWords();

            for (int i = 0; i < MyWordList.WordItem.Count; i++)
            {
                if (MyWordList.WordItem[i].OneWord.StartsWith(tbWord.Text))
                {
                    SearchList.WordItem.Add(MyWordList.WordItem[i]);
                }
            }

            if (SearchList.WordItem.Count == 0)
            {
                return;
            }

            loadListToCLB(SearchList);
        }