-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI_main.py
77 lines (50 loc) · 2.4 KB
/
GUI_main.py
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
76
77
import tkinter as tk
from tkinter import ttk, LEFT, END
from PIL import Image, ImageTk
##############################################+=============================================================
root = tk.Tk()
root.configure(background="#FFFF00")
# root.geometry("1300x700")
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.geometry("%dx%d+0+0" % (w, h))
root.title("Crop Disease & Pest Identification System")
# 43
# ++++++++++++++++++++++++++++++++++++++++++++
#####For background Image
image2 = Image.open('1.jpg')
image2 = image2.resize((1500, 800), Image.ANTIALIAS)
background_image = ImageTk.PhotoImage(image2)
background_label = tk.Label(root, image=background_image)
background_label.image = background_image
background_label.place(x=0, y=0) # , relwidth=1, relheight=1)
#
label_l1 = tk.Label(root, text="Crop Disease & Pest Identification System",font=("Times New Roman", 30, 'bold'),
background="#ADFF2F", fg="black", width=60, height=2)
label_l1.place(x=0, y=0)
#T1.tag_configure("center", justify='center')
#T1.tag_add("center", 1.0, "end")
################################$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#def clear_img():
# img11 = tk.Label(root, background='bisque2')
# img11.place(x=0, y=0)
#################################################################$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
################################$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# def cap_video():
# video1.upload()
# #from subprocess import call
# #call(['python','video_second.py'])
def reg():
from subprocess import call
call(["python","registration.py"])
def log():
from subprocess import call
call(["python","login.py"])
def window():
root.destroy()
button1 = tk.Button(root, text="Login", command=log, width=17, height=1,font=('times', 20, ' bold '), bg="#008000", fg="white")
button1.place(x=100, y=160)
button2 = tk.Button(root, text="Registration",command=reg,width=17, height=1,font=('times', 20, ' bold '), bg="#008000", fg="white")
button2.place(x=100, y=240)
button3 = tk.Button(root, text="Exit",command=window,width=17, height=1,font=('times', 20, ' bold '), bg="red", fg="white")
button3.place(x=100, y=330)
root.mainloop()