This commit is contained in:
sc committed 2024-12-11 23:38:04 +08:00
commit 1a0b10015c
10 files changed
+553 -7

No files matched your search

+28 -1
View File
@@ -97,7 +97,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
DispatcherTimer dis50ms = new DispatcherTimer
{
Interval = TimeSpan.FromMilliseconds(50) //毫秒
Interval = TimeSpan.FromMilliseconds(100) //毫秒
};
dis50ms.Tick += new EventHandler(DisTimer_50MS);//每一秒执行的方法
dis50ms.Start();//计时开始
@@ -276,10 +276,37 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
public static DataTable dt_TM = new DataTable();
public static DataTable dt_TP = new DataTable();
public static bool TechnologicalProcess_bool =true;
public static bool A_view =true;
public static bool D_view =true;
public static bool IO_view;
private async void DATA_view()//IO显示
{
await Task.Run(() =>
{
try
{
if (dt_m.Rows.Count > 0)
{
SYSData_M = ToObservableCollection<DATA_M>(dt_m);
}
}
catch (Exception ) { }
try
{
if (dt_a.Rows.Count > 0)
{
if ((bool)A_view) SYSData_A = ToObservableCollection<DATA_A>(dt_a);
}
}
catch (Exception ) { }
try
{
if (dt_d.Rows.Count > 0)
{
if ((bool)D_view) SYSData_D = ToObservableCollection<DATA_D>(dt_d);
}
}
catch (Exception) { }
try
{
TechnologicalMachine_View = ToObservableCollection<TechnologicalM>(Machines);