You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.7 KiB
56 lines
1.7 KiB
|
2 years ago
|
using formula_manage.SQLModels;
|
||
|
|
using formula_manage.Windows;
|
||
|
|
using GalaSoft.MvvmLight;
|
||
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Linq;
|
||
|
|
using System.Text;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
using System.Windows.Threading;
|
||
|
|
|
||
|
|
namespace formula_manage.ViewModel
|
||
|
|
{
|
||
|
|
///<Summary>
|
||
|
2 years ago
|
/// RRODUCTiewModel
|
||
|
2 years ago
|
///</Summary>
|
||
|
2 years ago
|
public class RRODUCTiewModel : ViewModelBase
|
||
|
2 years ago
|
{
|
||
|
2 years ago
|
// private List<RRODUCT> products = new List<RRODUCT>();
|
||
|
2 years ago
|
|
||
|
|
/// <summary>
|
||
|
2 years ago
|
///
|
||
|
2 years ago
|
/// </summary>
|
||
|
2 years ago
|
/* public List<RRODUCT> RRODUCT
|
||
|
2 years ago
|
{
|
||
|
2 years ago
|
|
||
|
|
}*/
|
||
|
2 years ago
|
|
||
|
|
/// <summary>
|
||
|
|
/// StuffViewModeldl
|
||
|
|
/// </summary>
|
||
|
2 years ago
|
public RRODUCTiewModel()
|
||
|
2 years ago
|
{
|
||
|
|
//products = new ProductProvider().Select();
|
||
|
|
DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event
|
||
|
|
{
|
||
|
|
Interval = TimeSpan.FromSeconds(0.1)
|
||
|
|
};
|
||
|
|
timer.Tick += Tick_Event;
|
||
|
|
timer.Start();
|
||
|
|
}
|
||
|
|
|
||
|
|
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
|
||
|
|
{
|
||
|
2 years ago
|
// if (Stuff.Button_sql == true)//获取按钮状态
|
||
|
2 years ago
|
{
|
||
|
|
// if (Stuff.Buttontype_sql == -1) Product = new ProductProvider().Select();
|
||
|
|
// if (Stuff.Buttontype_sql == 0) Product = new ProductProvider().Selects0();
|
||
|
|
// if (Stuff.Buttontype_sql == 1) Product = new ProductProvider().Selects1();
|
||
|
|
// if (Stuff.Buttontype_sql == 2) Product = new ProductProvider().Selects2();
|
||
|
|
// if (Stuff.Buttontype_sql == 3) Product = new ProductProvider().Selects3();
|
||
|
2 years ago
|
// Stuff.Button_sql = false;//清除按钮状态
|
||
|
2 years ago
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|