Skip to content

Commit 18006cb

Browse files
AdWMGUI 1.7
1 parent 59a8fcd commit 18006cb

File tree

4 files changed

+69
-11
lines changed

4 files changed

+69
-11
lines changed

AdWMFuncLib/ShutdownPC/shutdownpc.py

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,63 @@
88
from tkinter import messagebox
99
from AdWMFuncLib.Systemrepair import *
1010
from AdWMFuncLib.Systemclean import *
11+
from tkinter import font
12+
13+
def get_input():
14+
user_input = str(private_time_input.get("1.0", "end-1c"))
15+
print(user_input)
16+
os.system("cmd.exe /c shutdown -s -t {0}". format(user_input))
17+
18+
def shutdownpc(second):
19+
os.system("cmd.exe /c shutdown -s -t {0}". format(second))
20+
print(second)
1121

1222
def ShutdownPC():
23+
global private_time_input
1324
if messagebox.askyesno(adwmgui_txt_title, shutdownpc_askyesno_txt_title) == True:
14-
userTime = str(input(usertm_title))
15-
os.system("cmd.exe /c shutdown -s -t {0}". format(userTime))
25+
window = Tk()
26+
window.title(shutdownpc_title)
27+
window.geometry("500x500")
28+
window.resizable(FALSE,FALSE)
29+
quick_access = Label(window, text=quick_access_title, font=("Arial",12,"bold"), anchor="w", justify=LEFT)
30+
quick_access.pack(fill="x", anchor="w")
31+
zero_second = Button(window, text="0", width=10, command=lambda: shutdownpc(0))
32+
zero_second.place(x=5, y=35)
33+
five_second = Button(window, text="5", width=10, command=lambda: shutdownpc(5))
34+
five_second.place(x=85, y=35)
35+
ten_second = Button(window, text="10", width=10, command=lambda: shutdownpc(10))
36+
ten_second.place(x=165, y=35)
37+
fifteen_second = Button(window, text="15", width=10, command=lambda: shutdownpc(15))
38+
fifteen_second.place(x=245, y=35)
39+
twenty_second = Button(window, text="20", width=10, command=lambda: shutdownpc(20))
40+
twenty_second.place(x=325, y=35)
41+
twentyfive_second = Button(window, text="25", width=10, command=lambda: shutdownpc(25))
42+
twentyfive_second.place(x=405, y=35)
43+
thirty_second = Button(window, text="30", width=10, command=lambda: shutdownpc(30))
44+
thirty_second.place(x=5, y=70)
45+
thirtyfive_second = Button(window, text="35", width=10, command=lambda: shutdownpc(35))
46+
thirtyfive_second.place(x=85, y=70)
47+
fourty_second = Button(window, text="40", width=10, command=lambda: shutdownpc(40))
48+
fourty_second.place(x=165, y=70)
49+
fourtyfive_second = Button(window, text="45", width=10, command=lambda: shutdownpc(45))
50+
fourtyfive_second.place(x=245, y=70)
51+
fifty_second = Button(window, text="50", width=10, command=lambda: shutdownpc(50))
52+
fifty_second.place(x=325, y=70)
53+
fiftyfive_second = Button(window, text="55", width=10, command=lambda: shutdownpc(55))
54+
fiftyfive_second.place(x=405, y=70)
55+
sixty_second = Button(window, text="60", width=10, command=lambda: shutdownpc(60))
56+
sixty_second.place(x=5, y=105)
57+
private_time = Label(window, text=private_time_title, font=("Arial",12,"bold"), anchor="w", justify=LEFT)
58+
private_time.place(y=140)
59+
private_time_input = Text(window, width=15, height=1)
60+
private_time_input.place(x=5, y=170)
61+
private_time_button = Button(window, text=private_time_button_title, width=13, command=get_input)
62+
private_time_button.place(x=135, y=170)
63+
all_operations_shutdownpc = Label(window, text=all_operations_shutdownpc_title_, font=("Arial",12,"bold"), anchor="w", justify=LEFT)
64+
all_operations_shutdownpc.place(y=200)
65+
all_operations_shutdownpc_button = Button(window, text=all_operations_shutdownpc_title, command=all_operations_ShutdownPC)
66+
all_operations_shutdownpc_button.place(x=5, y=230)
67+
window.mainloop()
1668
else:
1769
print(shutdownpc_askyesno_cancel_txt_title)
1870

@@ -25,6 +77,6 @@ def all_operations_ShutdownPC():
2577
time(0.5)
2678
RepairSystem()
2779
time(0.5)
28-
ShutdownPC()
80+
shutdownpc(0)
2981
else:
3082
print(shutdownpc_askyesno_cancel_txt_title)

AdWMGUILang/lang.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def set_en():
3333
lang_button_en.pack(side=LEFT)
3434
exit_button = Button(lang, text="Exit",command=lang.destroy,width=10)
3535
exit_button.pack()
36-
adwmgui_version_label = Label(lang,text="AdWMGUI v1.6", font=("Arial",10,"bold"))
36+
adwmgui_version_label = Label(lang,text="AdWMGUI v1.7", font=("Arial",10,"bold"))
3737
adwmgui_version_label.pack()
3838
lang.mainloop()
3939

@@ -43,11 +43,11 @@ def set_en():
4343
advanced_system_clean_title = "DISM WinSxS Folder clean"
4444
system_repair_title = "SystemRepair"
4545
about_title = "About"
46-
shutdownpc_title = "ShutdownPC"
46+
shutdownpc_title = "Shutdown PC"
4747
all_operations_shutdownpc_title = "Do all operations and then shut down the computer"
4848
app_information_title = "App knowledge:\n"
4949
app_name_txt = "App name: AdWMGUI (Advanced Windows Manager GUI)"
50-
app_version_txt = "Version: 1.6"
50+
app_version_txt = "Version: 1.7"
5151
app_version_type_txt = "Version type: Stable version"
5252
licence_information_title = "Licence information:\n"
5353
licence_name_txt = "Licence name: GPL"
@@ -77,6 +77,10 @@ def set_en():
7777
usertm_title = "After how many seconds should the computer be shut down?: "
7878
adwmgui_platform_error_title_txt = "AdWMGUI platform system error"
7979
adwmgui_platform_error_txt = "Sorry! You do not meet the Platform system requirement to use the AdWMGUI application."
80+
quick_access_title = "Quick Access:"
81+
private_time_title = "Private time (second):"
82+
private_time_button_title = "Shutdown PC"
83+
all_operations_shutdownpc_title_ = "Do all operations and then shut down the computer:"
8084
if userLang == "TR":
8185
windows_title = "AdWMGUI (Gelişmiş Windows Yönetimi GUI)"
8286
system_clean_title = "Sistem Temizliği"
@@ -87,7 +91,7 @@ def set_en():
8791
all_operations_shutdownpc_title = "Tüm işlemleri yap ardından Bilgisayarı kapat"
8892
app_information_title = "Uygulama bilgisi:\n"
8993
app_name_txt = "Uygulama adı: AdWMGUI (Advanced Windows Manager GUI)"
90-
app_version_txt = "Sürüm: 1.6"
94+
app_version_txt = "Sürüm: 1.7"
9195
app_version_type_txt = "Sürüm tipi: Stabil sürüm"
9296
licence_information_title = "Lisans bilgisi:\n"
9397
licence_name_txt = "Lisans adı: GPL"
@@ -116,4 +120,8 @@ def set_en():
116120
repair_sys_done_title = "Sistem Onarımı tamamlandı!"
117121
usertm_title = "Bilgisayar kaç saniye sonra kapatılsın?: "
118122
adwmgui_platform_error_title_txt = "AdWMGUI platform sistem hatası"
119-
adwmgui_platform_error_txt = "Üzgünüm! AdWMGUI uygulamasını kullanmak için Platform sistem gereksinimini karşılamıyorsunuz."
123+
adwmgui_platform_error_txt = "Üzgünüm! AdWMGUI uygulamasını kullanmak için Platform sistem gereksinimini karşılamıyorsunuz."
124+
quick_access_title = "Hızlı erişim:"
125+
private_time_title = "Özel zaman (saniye):"
126+
private_time_button_title = "Bilgisayarı kapat"
127+
all_operations_shutdownpc_title_ = "Tüm islemleri yap ardından bilgisayarı kapat:"

Icon/adwmgui_icon.ico

170 KB
Binary file not shown.

adwm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
window.title(windows_title)
1919
icon = PhotoImage(file="Icon/adwmgui_icon.png")
2020
window.iconphoto(False, icon)
21-
window.geometry("800x30")
21+
window.geometry("570x30")
2222
window.resizable(FALSE,FALSE)
2323
systemclean = Button(window, text=system_clean_title , command=AdWMFuncLib.Systemclean.OpenCleanmgr)
2424
systemclean.pack(side=LEFT)
@@ -30,8 +30,6 @@
3030
about.pack(side=LEFT)
3131
shutdownpc = Button(window, text=shutdownpc_title, command=AdWMFuncLib.ShutdownPC.shutdownpc.ShutdownPC)
3232
shutdownpc.pack(side=LEFT)
33-
all_operations_shutdownpc = Button(window, text=all_operations_shutdownpc_title, command=AdWMFuncLib.ShutdownPC.shutdownpc.all_operations_ShutdownPC)
34-
all_operations_shutdownpc.pack(side=LEFT)
3533
window.mainloop()
3634
else:
3735
messagebox.showerror(adwmgui_platform_error_title_txt, adwmgui_platform_error_txt)

0 commit comments

Comments
 (0)