猫史档案馆


python视力保护程序!

用户:上帝之鹰上帝之鹰查看:1 回复:1 评论:1 创建时间:2021-06-10T13:03:30


import time
from tkinter import *
import tkinter.messagebox as messagebox

class Application(Frame):
    def __init__(self, master=None):
        Frame.__init__(self, master)
        self.pack()
        self.createWidgets()

    def createWidgets(self):
        self.timeInput = Entry(self)
        self.timeInput.pack()
        self.alertButton = Button(self, text='start', command=self.start)
        self.alertButton.pack()

    def start(self):
        ST = self.timeInput.get() or '1800'
        ST = int(ST)
        while True:
            time.sleep(ST)
            messagebox.showinfo('Message', "Time's up! Take a break!")

app = Application()
# 设置窗口标题:
app.master.title('preserve eyesight')
# 主消息循环:
app.mainloop()


回复

上一页1 页 / 共 1下一页
xigaixigai

include <cstdio>
using namespace std;
int main(){
cout<<"???";
return 0;
}

点赞0


评论