-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShutDownApp.py
More file actions
33 lines (23 loc) · 1.03 KB
/
Copy pathShutDownApp.py
File metadata and controls
33 lines (23 loc) · 1.03 KB
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
from tkinter import *
import os
def restart():
os.system("shutdown /r /t 1")
def restart_time():
os.system(shutdown /r /t /20)
def logout():
os.system("shutdown -l")
def shutdown():
os.system("shutdown /s /t 1")
st = Tk()
st.title("ShutDown App")
st.geometry("500x500")
st.config(bg="Blue")
r_button = Button(st,text="Restart", font=("Time New Roman",20, "bold"), relief = RAISED, cursor="plus", command= restart)
r_button.place(x=150, y=60, height= 50, width = 200)
rt_button = Button(st,text="Restart Time", font=("Time New Roman",20, "bold"), relief = RAISED, cursor="plus",command= restart_time)
rt_button.place(x=150, y=170, height= 50, width = 200)
lg_button = Button(st,text="Log Out", font=("Time New Roman",20, "bold"), relief = RAISED, cursor="plus", command = logout)
lg_button.place(x=150, y=270, height= 50, width = 200)
st_button = Button(st,text="Shut Down", font=("Time New Roman",20, "bold"), relief = RAISED, cursor="plus", command = shutdown)
st_button.place(x=150, y=370, height= 50, width = 200)
st.mainloop()