예제 #1
0
        /// <summary>
        /// Create new Vocab with given parameters.
        /// We allow vocabs to exist as duplicates.
        /// </summary>
        /// <param name="pSide1"<>/param>
        /// <param name="pSide2"></param>
        public void addVokabel(string pSide1, string pSide2)
        {
            //How to handle if Vocab already exists with both or one of the sides?
            Vocab voc = new Vocab(pSide1, pSide2, countVocs);

            Vokabeln.Add(voc);
            countVocs++;
        }
예제 #2
0
        /// <summary>
        /// Change attributes of Vocab identified by ID.
        /// Return on error to be done.
        /// </summary>
        /// <param name="pID"></param>
        /// <param name="pSide1"></param>
        /// <param name="pSide2"></param>
        /// <param name="pLevel"></param>
        public void changeVokabel(int pID, string pSide1, string pSide2, int pLevel)
        {
            int index = Vokabeln.IndexOf(Vokabeln.Find(item => item.id == id));

            if (index == -1)
            {
                //theGUI.appendTB_outputText("Vocab Box " + pName + " not found.");
                return;
            }
            Vokabeln[index].EditVocab(pSide1, pSide2, pLevel);
        }
예제 #3
0
        /// <summary>
        /// Delete Vocab identified by given ID.
        /// RWe assume that
        /// </summary>
        /// <param name="pID"></param>
        public void removeVokabel(int id)
        {
            int index = Vokabeln.IndexOf(Vokabeln.Find(item => item.id == id));

            if (index == -1)
            {
                //theGUI.appendTB_outputText("Vocab Box " + pName + " not found.");
                return;
            }
            Vokabeln.RemoveAt(index);
        }
예제 #4
0
 /// <summary>
 /// Clear Vocabs.
 /// </summary>
 public void unloadVocabs()
 {
     Vokabeln.Clear();
 }