如何在运行时设置计时器值? [英] how to set timer value at run time?

查看:82
本文介绍了如何在运行时设置计时器值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的vb.net测验应用程序中有一个计时器。计时器在代码本身中设置。有两个帐户-admin和user。我希望管理员能够在运行时设置计时器。我怎样才能做到这一点?我应该在数据库中创建一个表来存储值吗?或者还有其他任何方式..?请建议..

i have a timer in my vb.net quiz application.the timer is set in the code itself.there are two accounts -admin and user. i want the administrator to be able to be able to set the timer during runtime. how can i do this? should i create a table in the database to store the value? or is there any other way..?please suggest..

推荐答案

嗯,这应该很简单,因为计时器 class具有 Interval 属性。如果管理员的更改应该是永久性的,那么您必须以某种方式存储此类间隔。您可以使用数据库(如果已有)或更轻量级的解决方案(例如文件)进行录制。
Well, that should be simple, since the Timer class has the Interval property. If the administrator's changes should be permanent then you have to store such interval somehow. You may use the database if you already have it or a more lightweight solution (e.g. a file) for recording it.


这篇关于如何在运行时设置计时器值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆