This commit is contained in:
sc committed 2022-03-07 22:09:37 +08:00
commit c5a8f7a8f8
3 files changed
+7 -13

No files matched your search

+6 -6
View File
@@ -44,18 +44,18 @@ namespace Audit.ViewModel
{
products = new ProductProvider().Select();
DispatcherTimer timer = new DispatcherTimer();//每0.5秒调用一次Tick_Event
timer.Interval = TimeSpan.FromSeconds(0.5);
timer.Interval = TimeSpan.FromSeconds(0.1);
timer.Tick += Tick_Event;
timer.Start();
}
void Tick_Event(object sender, EventArgs e)
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
{
if (StuffView.Button_sql == true)
if (StuffView.Button_sql == true)//获取按钮状态
{
Product = new ProductProvider().Select();
StuffView.Button_sql = false;
}//扫描数据库
Product = new ProductProvider().Select();//扫描数据库
StuffView.Button_sql = false;//清除按钮状态
}
}
}
}