Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. from Tkinter import*
  2. from tkMessageBox import*
  3.  
  4. Interface = Tk()
  5.  
  6. def Restaurant_Info():
  7. showinfo('Info','Restaurant: lalala\nPhone Number: 010101010\nAddress: ggwp')
  8. def SignUp():
  9. SignUp = Toplevel()
  10. SignUp.title("Cyber Roll")
  11. SignUp.geometry("450x200")
  12.  
  13. Greeting=Label(SignUp,text="Cyber Roll - Sign Up")
  14. Greeting.place(x=20,y=0)
  15.  
  16. username = Label(SignUp,text="Username: ")
  17. username.place(x=20,y=40)
  18.  
  19. username_input = Entry(SignUp,width=45)
  20. username_input.place(x=140,y=40)
  21.  
  22. password = Label(SignUp,text="Password: ")
  23. password.place(x=20,y=70)
  24.  
  25. password_input = Entry(SignUp,width=45,show="*")
  26. password_input.place(x=140,y=70)
  27.  
  28. passconfirm = Label(SignUp,text="Confirm Password: ")
  29. passconfirm.place(x=20,y=100)
  30.  
  31. passconfirm_input = Entry(SignUp,width=45,show="*")
  32. passconfirm_input.place(x=140,y=100)
  33.  
  34. sign_up = Button(SignUp,width=15,text="Sign Up",command=SignUp.destroy)
  35. sign_up.place(x=220,y=130)
  36.  
  37. def Menu():
  38. Interface.withdraw()
  39. Menu = Toplevel()
  40. Menu.title("Cyber Roll")
  41. Menu.geometry("300x200")
  42.  
  43. Title = Label(Menu,text="Cyber Roll - Menu")
  44. Title.place(x=20,y=0)
  45.  
  46. halal = Checkbutton(Menu,text="Halal",)
  47. halal.place(x=20,y=40)
  48.  
  49. non_halal = Checkbutton(Menu,text="Non - Halal",)
  50. non_halal.place(x=20,y=70)
  51.  
  52. ppl_num=Label(Menu,text="Number of People: ")
  53. ppl_num.place(x=20,y=100)
  54.  
  55. ppl_num_input = Entry(Menu,width=20)
  56. ppl_num_input.place(x=130,y=100)
  57.  
  58. Roll = Button(Menu,width=15,text="Roll",command=Menu2)
  59. Roll.place(x=100,y=140)
  60.  
  61. def Menu2():
  62. Menu2 = Toplevel()
  63. Menu2.title("Cyber Roll")
  64. Menu2.geometry("500x200")
  65.  
  66. title = Label(Menu2,text="Cyber Roll - Menu")
  67. title.place(x=20,y=0)
  68.  
  69. Rec_Restaurant = Label(Menu2,text="Recommended Restaurant: ")
  70. Rec_Restaurant.place(x=20,y=40)
  71.  
  72. Rec_Restaurant_input = Entry(Menu2,width=45)
  73. Rec_Restaurant_input.place(x=180,y=40)
  74.  
  75. Vote = Label(Menu2,text="Vote to Reroll: ")
  76. Vote.place(x=20,y=70)
  77.  
  78. Vote_input = Entry(Menu2,width=45)
  79. Vote_input.place(x=180,y=70)
  80.  
  81. Restaurantinfo = Button(Menu2,text="Resturant\n info",width = 15,command=Restaurant_Info)
  82. Restaurantinfo.place(x=80,y=120)
  83.  
  84. Reroll = Button(Menu2,text="Re-Roll\n",width = 15,state=DISABLED)
  85. Reroll.place(x=200,y=120)
  86.  
  87. Accept = Button(Menu2,text="Accept\n",width = 15,command=Interface.destroy)
  88. Accept.place(x=320,y=120)
  89. def Login():
  90. Interface.title ("Cyber Roll")
  91. Interface.geometry("400x200")
  92.  
  93. Hello=Label(Interface,text="Welcome to Cyber Roll")
  94. Hello.place(x=160,y=0)
  95.  
  96. username = Label(Interface,text="Username: ")
  97. username.place(x=20,y=40)
  98.  
  99. username_input = Entry(Interface,width=45)
  100. username_input.place(x=100,y=40)
  101.  
  102. password = Label(Interface,text="Password: ")
  103. password.place(x=20,y=70)
  104.  
  105. password_input = Entry(Interface,width=45,show="*")
  106. password_input.place(x=100,y=70)
  107.  
  108. login = Button(Interface,width=15,text="Login",command=Menu)
  109. login.place(x=70,y=100)
  110.  
  111. sign_up = Button(Interface,width=15,text="Sign Up",command=SignUp)
  112. sign_up.place(x=270,y=100)
  113.  
  114. Login()
  115. Interface.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement