Exemple #1
0
 /// <summary>
 /// Unloads a selected VocabBox
 /// </summary>
 /// The selected box is saved using SaveVocabBoxesXML.
 /// All Vocabs are deleted from the selected VocabBox and the loadedBox-member is nulled.
 public void restoreLoadedBox()
 {
     if (loadedBox != null)
     {
         SaveVocabBoxXML();
         loadedBox.unloadVocabs();
         loadedBox = null;
     }
 }
Exemple #2
0
        /// <summary>
        /// Adds a empty Vocabbox into the list
        /// </summary>
        /// Checks if a vocabBox with this name already exists, if not the vocabBox is added into the list and is then selected.
        /// <returns>Returns if the operation was successfull</returns>
        /// <param name="newBox">The vocabBox to add into the list</param>
        public bool CreateVocabBox(VocabBox newBox)
        {
            if (CheckExistenceVocabBox(newBox.getName(), newBox.getFilePath()))
            {
                vocabBoxes.Add(newBox);
                selectVocabBox(vocabBoxes.Count - 1);
            }


            return(true);
        }
Exemple #3
0
 /// <summary>
 /// Selects, loads and returns a VocabBox
 /// </summary>
 /// A vocabBox is selected from the vocabBoxes-list using an index.
 /// The selected vocabBox is then saved into the loadedBox, loaded and returned.
 /// <param name="select">The index of the wanted vocabBox.</param>
 /// <returns VocabBox>The selected VocabBox</returns>
 public VocabBox selectVocabBox(int select)
 {
     loadedBox = vocabBoxes[select];
     readVocabBox();
     return(loadedBox);
 }