Exemplo n.º 1
0
def main():
    # instantiate menu class
    mainMenu = Menu("Choice: ", [
        "Input Project Details", "View Projects", "Schedule Projects",
        "Get A Project", "Exit"
    ])

    # program loop
    while True:
        Common.cls()
        print("--- COPY TYPING SCHEDULER ---")
        choice, errorMsg = mainMenu.show()

        if errorMsg:
            print(errorMsg)
            Common.pause()
            continue
        # main menu
        if choice == 1:
            # Input Project Details
            inputProjectDetails()
        elif choice == 2:
            # View Projects
            viewProjects()
        elif choice == 3:
            # Schedule Project
            scheduleProjects()
        elif choice == 4:
            # Get A Project
            getProject()
        elif choice == 5:
            # Exit
            exit()
Exemplo n.º 2
0
def viewProjects():
    # view project sub menu
    viewProjectsMenu = Menu(
        "Choice: ", ["One Project", "Completed", "All Projects", "Back"])

    while True:
        Common.cls()
        print("--- VIEW PROJECTS ---")
        choice, errorMsg = viewProjectsMenu.show()

        if errorMsg:
            print(errorMsg)
            Common.pause()
            continue

        if choice == 1:
            # One project
            viewProjectsOneProject()
        elif choice == 2:
            viewProjectsCompletedProjects()

        elif choice == 3:
            viewProjectsAllProjects()

        elif choice == 4:
            break
Exemplo n.º 3
0
def scheduleProjects():
    # schedule projects sub menu
    scheduleProjectsMenu = Menu(
        "Choice: ", ["Create Schedule", "View Updated Schedule", "Back"])

    while True:
        Common.cls()
        print("---SCHEDULE PROJECTS ---")
        choice, errorMsg = scheduleProjectsMenu.show()

        if errorMsg:
            print(errorMsg)
            Common.pause()
            continue

        if choice == 1:
            scheduleProjectsCreateSchedule()
        elif choice == 2:
            scheduleProjectsViewSchedule()
        elif choice == 3:
            break
Exemplo n.º 4
0
    mc.read()
    print_msg('Résultat : {}'.format(len(mc.mails)) + ' mail(s).')


def clean():
    print('Nettoyer mails..')
    mc.delete()


def connect_server():
    global mc
    login = input('login : '******'password : '******'tests..')

if __name__ == '__main__':
    print_msg('Ma Boite Mail')

    connect_server()
    menu = Menu([
        Option('Boite Mail : Lire!', read),
        Option('Boite Mail : Nettoyer!', clean)
        # , Option('Tests', test)
    ])
    while not menu.want_exit:
        menu.show()