-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui
76 lines (70 loc) · 2.78 KB
/
gui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import PySimpleGUI as sg
import pandas as pd
import mysql.connector as mc
def vendingmachine():
sg.theme("Tan")
col1= [[sg.Image("1.png")],
[sg.Button('Ok')]]
layout=[[sg.Column(col1)]]
window=sg.Window("Hello",layout).finalize()
event=window.read()
window.close()
return(event)
def frspng():
sg.theme("Tan")
col1 = [[sg.Button(enable_events=True,image_filename="10.png",key='b1'),
sg.Button(enable_events=True,image_filename="3.png",key='b2'),
sg.Button(enable_events=True,image_filename="4.png",key='b3')]]
layout = [[sg.Column(col1)]]
window = sg.Window('Welcome',layout).finalize()
events,values = window.read()
window.close()
return (events ,values)
def startday():
sg.theme("Tan")
col1=[[sg.Text("Day")],
[sg.Combo(["Monday","Tuesday","Wednesday","Thursday","Friday"], size=(20, 20), default_value='-Select-')],
[sg.Text("Product Name")],
[sg.Combo(["Juice","Biscuit","Chips","Chocolates","Healthy snacks"], size=(20, 20), default_value='-Select-')],
[sg.Text("Total Number of products")],
[sg.Input("")],
[sg.Button("Update"),sg.Button("Back"),sg.Button("Exit")]]
layout=[[sg.Column(col1)]]
window=sg.Window("Stock Detaills",layout).finalize()
event,values=window.read()
print(event,values[0])
window.close()
return(event,values)
def endday():
sg.theme("Tan")
col1=[[sg.Text("Day")],
[sg.Combo(["Monday","Tuesday","Wednesday","Thursday","Friday"], size=(20, 20), default_value='-Select-')],
[sg.Text("Product Name")],
[sg.Combo(["Juice","Biscuit","Chips","Chocolates","Healthy snacks"], size=(20, 20), default_value='-Select-')],
[sg.Text("Total Number of products left")],
[sg.Input("")],
[sg.Button("Update"),sg.Button("Back"),sg.Button("Exit")]]
layout=[[sg.Column(col1)]]
window=sg.Window("Remaining Stock Detaills",layout).finalize()
event,values=window.read()
print(event,values[0])
window.close()
return(event,values)
def exit():
sg.theme("Tan")
layout=[[sg.Text("Are you sure want to exit the app?")],
[sg.Button("Yes"),sg.Button("No")]]
window=sg.Window("Patients",layout).finalize()
event1,values1=window.read()
window.close()
return(event1,values1)
def sgpage():
sg.theme("Tan")
col1=[[sg.Text("Day")],
[sg.Combo(["Monday","Tuesday","Wednesday","Thursday","Friday"], size=(20, 20), default_value='-Select-')],
[sg.Button("Show"),sg.Button("Back"),sg.Button("Exit")]]
layout=[[sg.Column(col1)]]
window=sg.Window("Suggestion",layout).finalize()
event,values2=window.read()
window.close()
return(event,values2)