From 7b3708dd51ab2d270249cccb2c1e5141c487e656 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Thu, 25 Jul 2024 10:44:07 +0900 Subject: [PATCH] =?UTF-8?q?=E8=AA=8D=E8=A8=BC=E3=82=A6=E3=82=A3=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=82=A6=E3=82=92=E4=B8=AD=E5=A4=AE=E3=81=AB=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6=E3=81=8C=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker_client.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dislocker_client.py b/dislocker_client.py index 4eeda44..69a61cf 100644 --- a/dislocker_client.py +++ b/dislocker_client.py @@ -71,7 +71,14 @@ class Lock(customtkinter.CTkToplevel): self.title(f'{app_name} | PC番号 {client_config["pc_number"]} | テストモード') else: self.title(f'{app_name} | PC番号 {client_config["pc_number"]} | ロックされています') - self.geometry("600x400") + + self.window_width = 600 + self.window_height = 400 + self.screen_width = self.winfo_screenwidth() + self.screen_height = self.winfo_screenheight() + self.center_x = int(self.screen_width/2 - self.window_width/2) + self.center_y = int(self.screen_height/2 - self.window_height/2) + self.geometry(f"{str(self.window_width)}x{str(self.window_height)}+{str(self.center_x)}+{str(self.center_y)}") self.resizable(height=False, width=False) self.attributes('-topmost', True) self.grab_set() @@ -174,8 +181,10 @@ class Lock(customtkinter.CTkToplevel): self.exit() else: print("認証サーバー経由での認証に失敗しました。") + self.withdraw() msgbox = tkinter.messagebox.showinfo(title=f"{app_name} | 誤ったパスワード", message=f"パスワードが間違っています!") self.msg_subtitle_1.configure(text='パスワードが間違っています! ') + self.deiconify() except: @@ -186,8 +195,10 @@ class Lock(customtkinter.CTkToplevel): self.exit() else: print("マスターパスワードで認証できませんでした。") + self.withdraw() msgbox = tkinter.messagebox.showinfo(title=f"{app_name} | ネットワークエラー", message=f"認証サーバーにアクセスできませんでした。\n続行するには、マスターパスワードを入力してください。") self.msg_subtitle_1.configure(text='ネットワークエラーが発生しています。\n続行するには、マスターパスワードを入力して下さい。 ') + self.deiconify() def logout(self): app.unlock_taskmgr() @@ -200,7 +211,9 @@ class Lock(customtkinter.CTkToplevel): pass def help_dummy(self): + self.withdraw() msgbox = tkinter.messagebox.showinfo(title=f"{app_name} | 未実装", message=f"ヘルプページは製作途中です。\nDiscordサーバーの指示に従って、認証を進めてください。") + self.deiconify() def exit(self): self.destroy() @@ -214,6 +227,7 @@ class Help(customtkinter.CTkToplevel): self.title(f'{app_name} | ヘルプ | テストモード') else: self.title(f'{app_name} | ヘルプ') + self.iconbitmap("./resource/icon/dislocker.ico") self.geometry("600x400") self.resizable(height=False, width=False) self.attributes('-topmost', True)