Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
6f4d43c412
2 files changed
+112
-33
No files matched your search
@@ -122,6 +122,8 @@ namespace DyeingComputer.ViewModel
|
||||
execute:ProgramgroupView_run_ );//开始/暂停事件
|
||||
ProgramgroupView_stop = new RelayCommand(
|
||||
execute: ProgramgroupView_stop_);//结束事件
|
||||
|
||||
|
||||
}
|
||||
|
||||
DataTable dt_con = new DataTable();
|
||||
@@ -240,6 +242,7 @@ namespace DyeingComputer.ViewModel
|
||||
|
||||
SK5 = Selet_sys("SK5");//
|
||||
}
|
||||
|
||||
private void ProgramgroupView_run_()////运行/暂停
|
||||
{
|
||||
if (WORK_RUN == 2)
|
||||
@@ -1856,8 +1859,11 @@ namespace DyeingComputer.ViewModel
|
||||
dt_ParameterSet = SQLiteHelpers.ExecuteDataSet("select * from Parameters order by ParameterID asc", null).Tables[0];
|
||||
dt_SysSet = SQLiteHelpers.ExecuteDataSet("select * from System order by ParameterID asc", null).Tables[0];
|
||||
dt_TP = SQLiteHelpers.ExecuteDataSet("select * from RUN", null).Tables[0];
|
||||
|
||||
SQLiteHelpers.Close();
|
||||
|
||||
dt_d.RowChanged += new DataRowChangeEventHandler(ROW_changed_D);
|
||||
dt_a.RowChanged += new DataRowChangeEventHandler(ROW_changed_A);
|
||||
|
||||
//创建dt_d主建
|
||||
DataColumn[] dt_dcols =new DataColumn[] { dt_d.Columns["ID"] };
|
||||
dt_d.PrimaryKey = dt_dcols;
|
||||
@@ -1935,6 +1941,35 @@ namespace DyeingComputer.ViewModel
|
||||
});
|
||||
}
|
||||
}
|
||||
private static void ROW_changed_D(object sender, DataRowChangeEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
int MD = int.Parse(e.Row.Field<string>("ID"));
|
||||
if (MD < 3001 || MD > 3004)
|
||||
{
|
||||
APILog.IOlog(e.Row.Field<string>("IOName")
|
||||
, e.Row.Field<string>("type")
|
||||
, e.Row.Field<bool>("DIO")
|
||||
, e.Row.Field<string>("ID")
|
||||
, e.Row.Field<string>("PLC"));
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
private static void ROW_changed_A(object sender, DataRowChangeEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
APILog.IOlog(e.Row.Field<string>("IOName")
|
||||
, e.Row.Field<string>("type")
|
||||
, e.Row.Field<int>("AIO")
|
||||
, e.Row.Field<string>("ID")
|
||||
, e.Row.Field<string>("PLC"));
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
public static double Selet_dtm(string key)//M寄存器
|
||||
{
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user