Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
9ac80c6786
1 file changed
+20
-1
@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace Audit.ViewModel
|
namespace Audit.ViewModel
|
||||||
{
|
{
|
||||||
@@ -51,8 +52,26 @@ namespace Audit.ViewModel
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public QueryViewModel()
|
public QueryViewModel()
|
||||||
{
|
{
|
||||||
|
|
||||||
dyelots = new DyelotsProvider().Select();
|
dyelots = new DyelotsProvider().Select();
|
||||||
}
|
DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event
|
||||||
|
{
|
||||||
|
Interval = TimeSpan.FromSeconds(0.1)
|
||||||
|
};
|
||||||
|
timer.Tick += Tick_Event;
|
||||||
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int a = 0;//计数器用变量
|
||||||
|
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
|
||||||
|
{
|
||||||
|
|
||||||
|
if (a == 20)//
|
||||||
|
{
|
||||||
|
|
||||||
|
a = 0;
|
||||||
|
}
|
||||||
|
else a++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user