mirror of
https://github.com/WhaleFell/SMSBoom.git
synced 2026-02-11 14:35:02 +08:00
✨ feat: 提交一个GUI的伪实现
* 注意:GUI版本暂且不可使用.只是一个伪实现
This commit is contained in:
57
smsboom_GUI.py
Normal file
57
smsboom_GUI.py
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user