Compare commits

..

No commits in common. "f2679a83071c85a360fc0911da05373d7afe9184" and "7f6bbfc4206a435c9b3aa0dbf3c0fe7d7f8e006a" have entirely different histories.

2 changed files with 5 additions and 30 deletions

View file

@ -3,32 +3,21 @@ import os
import json
import customtkinter
from winotify import Notification, audio
import keyboard
class App(customtkinter.CTk):
def __init__(self):
super().__init__()
self.title("Dislocker ロック中")
self.attributes('-fullscreen', True)
self.frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
self.frame.grid(row=0, column=0, sticky='nsew')
self.restore_button = customtkinter.CTkButton(self.frame, text='認証ウィンドウを再表示', command=self.handler_close, width=240)
self.restore_button.grid(row=0, column=0)
self.block_key()
lock = Lock()
Lock()
def exit(self):
self.toast()
self.destroy()
def block_key(self):
block_keys = ['ctrl', 'alt', 'windows', 'shift', 'delete']
for i in block_keys:
keyboard.block_key(i)
def toast(self):
resource_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "resource")
success = Notification(
@ -40,19 +29,13 @@ class App(customtkinter.CTk):
success.set_audio(audio.Default, loop=False)
success.show()
def handler_close(self):
pass
class Lock(customtkinter.CTkToplevel):
def __init__(self):
super().__init__()
self.title('Dislocker | PC番号 10 | ロックされています')
self.geometry('400x200')
self.geometry('400x500')
self.resizable(height=False, width=False)
self.attributes('-topmost', True)
self.lift()
self.protocol("WM_DELETE_WINDOW", self.handler_close)
self.msg_title_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
self.msg_title_frame.grid(row=0, column=0, sticky="nsew")
@ -92,12 +75,6 @@ class Lock(customtkinter.CTkToplevel):
else:
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nパスワードが違います!')
def handler_close(self):
pass
def exit(self):
self.destroy()
@ -123,5 +100,4 @@ elif os.path.isfile(db_config_path):
if __name__ == '__main__':
app = App()
app.protocol("WM_DELETE_WINDOW", app.handler_close)
app.mainloop()

View file

@ -4,4 +4,3 @@ flask-login
psycopg2
winotify
customtkinter
keyboard