当前位置: 首页 > news >正文

解决国外网站很慢阆中 网站建设

解决国外网站很慢,阆中 网站建设,seo优化轻松seo优化排名,电商网站支付体系建设特点本章内容主要是利用python制作一个简单的桌面倒计时程序,包含开始、重置 、设置功能。 目录 一、效果演示 二、程序代码 一、效果演示 二、程序代码 #!/usr/bin/python # -*- coding: UTF-8 -*- """ author: Roc-xb """import tkin…

本章内容主要是利用python制作一个简单的桌面倒计时程序,包含开始、重置 、设置功能。

目录

一、效果演示

二、程序代码


一、效果演示

二、程序代码

#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@author: Roc-xb
"""import tkinter as tk
from tkinter import simpledialog
from tkinter import messageboxclass CountdownTimer:def __init__(self, root):self.root = rootself.root.title("倒计时程序")self.root.geometry("450x300")self.countdown_value = 60self.is_counting = Falseself.canvas = tk.Canvas(self.root, width=200, height=200, bg="white")self.canvas.place(x=20, y=20)self.countdown_label = tk.Label(self.root, text="倒计时: 60s", font=("Arial", 20))self.countdown_label.place(x=250, y=20)self.start_button = tk.Button(self.root, text="开始", command=self.start_countdown)self.start_button.place(x=250, y=70)self.reset_button = tk.Button(self.root, text="重置", command=self.reset_countdown)self.reset_button.place(x=250, y=120)self.set_button = tk.Button(self.root, text="设置", command=self.set_countdown)self.set_button.place(x=250, y=170)def start_countdown(self):if self.is_counting:returnself.is_counting = Trueself.countdown()def countdown(self):if self.countdown_value > 0 and self.is_counting is True:self.countdown_value -= 1self.countdown_label.config(text="倒计时: " + str(self.countdown_value) + "s")self.canvas.delete("all")self.canvas.create_rectangle(0, 200 - self.countdown_value * 2, 200, 300, fill="green")self.root.after(1000, self.countdown)elif self.countdown_value > 0 and self.is_counting is False:self.canvas.delete("all")self.is_counting = Falsereturnelse:self.is_counting = Falsemessagebox.showinfo("提示", "倒计时结束")def reset_countdown(self):self.is_counting = Falseself.countdown_value = 60self.countdown_label.config(text="倒计时: " + str(self.countdown_value) + "s")self.canvas.delete("all")def set_countdown(self):if self.is_counting:returnvalue = tk.simpledialog.askinteger("设置倒计时", "请输入倒计时时间(秒):", parent=self.root)if value is not None:self.countdown_value = valueself.countdown_label.config(text="倒计时: " + str(self.countdown_value) + "s")self.canvas.delete("all")if __name__ == '__main__':root = tk.Tk()app = CountdownTimer(root)root.mainloop()

http://www.15wanjia.com/news/182707.html

相关文章:

  • 成都高薪南网站建设织梦wordpress帝国对比
  • 企业网站的建立多少钱wordpress功能修改
  • 网站如何使用cdn通知模板范文
  • 网站开发语言包括哪些现在 做网站 技术路线
  • 海晏网站建设公司长沙短视频制作
  • 网站初期建设宣传自有服务器怎么做网站备案
  • 湖北建设网站知识管理软件
  • 网站开发android客户端王野摩托车是什么牌子
  • 中企动力做的网站升级收费网站备案期间打不开
  • 棋牌游戏网站怎么做的做网站广告联盟
  • flash 做ppt的模板下载网站营销网站建设网站开发
  • 网站开头flash怎么做wordpress adams主题
  • 购物网站功能详细介绍网站竞价推广托管公司
  • 网站建设品wordpress 二栏
  • 黑科技软件合集网站网站制作将栏目分类
  • 网站推广费用柳城 wordpress
  • wordpress后台极慢seo sem关键词优化
  • 佛山英文网建站济宁优化网络公司
  • 建个网站需要多少钱?廊坊关键词优化服务
  • 一个企业网站需要多少钱东莞seo排名扣费
  • 以百度云做网站空间百度信息流广告推广
  • 天猫网站做链接怎么做景县住房和城乡规划建设局网站
  • 网站建设需要什么证书nas做流媒体网站
  • 做设计用的素材下载网站刚入手一手房怎么网上做网站
  • 厦门免费自助建站模板seo网站设计工具
  • 手机电脑网站网站统计系统
  • 站长之家工具高清网站建设哪个语言好
  • 中山企业手机网站建设南京手机网站
  • 网站正在建设中 免费建材网站设计
  • 温州 网站制作网站有哪些备案