Esempio n. 1
0
def AddWord():
    doContinue = True
    myMenu = Menu()
    API = WordList()
    while doContinue:
        os.system("cls")
        myMenu.ShowTitle("Add a new word")
        wordToSearch = myMenu.RequestWord()
        myMenu.SearchMenu()
        os.system("cls")
        API.AddNewWord(wordToSearch)
        continueResp = myMenu.Continue("add another word")
        if continueResp == "n" or continueResp == "N":
            doContinue = False
Esempio n. 2
0
def RemoveWord():
    doContinue = True
    myMenu = Menu()
    API = WordList()
    while doContinue:
        os.system("cls")
        myMenu.ShowTitle("Remove word")
        wordToSearch = myMenu.RequestWord()
        myMenu.SearchMenu()
        os.system("cls")
        API.RemoveWord(wordToSearch)
        continueResp = myMenu.Continue("remove another word")
        if continueResp == "n" or continueResp == "N":
            doContinue = False
Esempio n. 3
0
def GetExample():
    doContinue = True
    myMenu = Menu()
    API = WordList()
    while doContinue:
        os.system("cls")
        myMenu.ShowTitle("Get Example")
        wordToSearch = myMenu.RequestWord()
        myMenu.SearchMenu()
        os.system("cls")
        API.GetExample(wordToSearch)
        continueResp = myMenu.Continue("search another example")
        if continueResp == "n" or continueResp == "N":
            doContinue = False