From a46539a9fa417132a546ccf6a0992ec013d66033 Mon Sep 17 00:00:00 2001 From: AdminWhaleFall Date: Tue, 3 May 2022 22:14:40 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=8F=90=E4=BA=A4=E4=B8=80?= =?UTF-8?q?=E4=B8=AAGUI=E7=9A=84=E4=BC=AA=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 注意:GUI版本暂且不可使用.只是一个伪实现 --- smsboom_GUI.py | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 smsboom_GUI.py diff --git a/smsboom_GUI.py b/smsboom_GUI.py new file mode 100644 index 0000000..039c610 --- /dev/null +++ b/smsboom_GUI.py @@ -0,0 +1,57 @@ +from tkinter import Tk, StringVar +from tkinter import ttk + + +class InputWidget(ttk.Frame): + """输入框,确认框""" + + def __init__(self, parent=None): + ttk.Frame.__init__(self, parent) + self.parent = parent + self.columnconfigure(0, weight=1) + self.rowconfigure(0, weight=1) + self.phone = StringVar() + self.createWidget() + + for child in self.winfo_children(): + child.grid_configure(padx=5, pady=5) + + self.pack() + + def createWidget(self): + """InputWidget""" + ttk.Label(self, text="手机号:").grid(column=0, row=0, sticky='nsew') + ttk.Entry(self, textvariable=self.phone).grid( + column=1, row=0, columnspan=3, sticky='nsew') + ttk.Button(self, text="启动轰炸").grid( + column=4, row=0, sticky='nsew') + + +class Application(ttk.Frame): + """APP main frame""" + + def __init__(self, parent=None): + ttk.Frame.__init__(self, parent) + self.parent = parent + # 伸缩 + self.columnconfigure(0, weight=1) + self.rowconfigure(0, weight=1) + self.createWidget() + # 间隔 + for child in self.winfo_children(): + child.grid_configure(padx=5, pady=5) + + self.pack() + + def createWidget(self): + """Widget""" + input_wiget = InputWidget(self) + + +if __name__ == "__main__": + root = Tk() + root.title("SMSBoom - 短信轰炸机 ©落落") + root.columnconfigure(0, weight=1) + root.rowconfigure(0, weight=1) + Application(parent=root) + root.mainloop()