[text] 1

Viewer

  1. from easygui import *
  2.  
  3. text = "Reserveer uw vergaderruimte. Maak een keuze:"
  4. title = "Vergaderruimtes reserveren"
  5.  
  6. menu1 = ["Reservering maken",
  7.          "Reservering verwijderen"]
  8.  
  9. rooms1 = ["Vergaderruimte 1",
  10.           "Vergaderruimte 2", 
  11.           "Vergaderruimte 3"]
  12.  
  13. days1 = ["Maandag",
  14.          "Dinsdag", 
  15.          "Woensdag",
  16.          "Donderdag",
  17.          "Vrijdag"]
  18.  
  19. times1 = ["09:00 - 10:00",
  20.           "10:00 - 11:00",
  21.           "11:00 - 12:00",
  22.           "12:00 - 13:00",
  23.           "13:00 - 14:00",
  24.           "14:00 - 15:00",
  25.           "15:00 - 16:00",
  26.           "16:00 - 17:00"]
  27.  
  28. times2 = ["09:00 - 10:00",
  29.           "10:00 - 11:00",
  30.           "11:00 - 12:00",
  31.           "12:00 - 13:00",
  32.           "13:00 - 14:00",
  33.           "14:00 - 15:00",
  34.           "15:00 - 16:00",
  35.           "16:00 - 17:00"]
  36.  
  37. times3 = ["09:00 - 10:00",
  38.           "10:00 - 11:00",
  39.           "11:00 - 12:00",
  40.           "12:00 - 13:00",
  41.           "13:00 - 14:00",
  42.           "14:00 - 15:00",
  43.           "15:00 - 16:00",
  44.           "16:00 - 17:00"]
  45.  
  46. message1 = "Uw keuze:"
  47. message2 = "Uw keuze is opgeslagen"
  48.  
  49. finished = False
  50.  
  51. print("before the loop")
  52.  
  53. while not finished:
  54.  
  55.     print("top of loop")
  56.     
  57.     output = choicebox(text, title, menu1)
  58.     
  59.     if output == menu1[0]:
  60.         
  61.         message = "Geselecteerd: " + str(output)
  62.         
  63.         output = choicebox(message, title, rooms1)
  64.         
  65.         if output == rooms1[0]:
  66.             
  67.             message = "Geselecteerd: " + str(output)
  68.             
  69.             output = choicebox(message, title, days1)
  70.             
  71.             if output == days1[0]:
  72.                 
  73.                 message = "Geselecteerd: " + str(output)
  74.                 
  75.                 output = choicebox(message, title, times1)
  76.                 
  77.                 if output == days1[1]:
  78.                     
  79.                     message = "Geselecteerd: " + str(output)
  80.                     
  81.                     output = choicebox(message, title, times1)
  82.                     
  83.                     if output == days1[2]:
  84.                         
  85.                         message = "Geselecteerd: " + str(output)
  86.                         
  87.                         output = choicebox(message, title, times1)
  88.                         
  89.                         if output == days1[3]:
  90.                             
  91.                             message = "Geselecteerd: " + str(output)
  92.                             
  93.                             output = choicebox(message, title, times1)
  94.                             
  95.                             if output == days1[4]:
  96.                                 
  97.                                 message = "Geselecteerd: " + str(output)
  98.                                 
  99.                                 output = choicebox(message, title, times1)
  100.  
  101.         print("ask finished?")
  102.         finished = ynbox("Are you finished?")
  103. print("after the loop")

Editor

You can edit this paste and save as new: