Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
25e6ae1563
1 file changed
+100
-25
+100
-25
@@ -167,12 +167,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||
|
||||
if (MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<bool>("Type"))
|
||||
if (drEmployee.Field<bool>("Type"))
|
||||
{//网络
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("SYSKEY") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -190,7 +190,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_2.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT3")
|
||||
@@ -198,7 +198,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_3.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT4")
|
||||
@@ -206,7 +206,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_4.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -244,12 +244,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||
if (MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<bool>("Type"))
|
||||
if (drEmployee.Field<bool>("Type"))
|
||||
{//网络
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("SYSKEY") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -259,7 +259,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_1.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT2")
|
||||
@@ -267,7 +267,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_2.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT3")
|
||||
@@ -275,7 +275,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_3.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT4")
|
||||
@@ -283,12 +283,11 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
stringQueueSerial_4.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
DAT = "SC829" + drEmployee.Field<string>("Station") + dat_.ToJsonString()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}//手自动
|
||||
private void MenuItem_Stop_XML(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -299,12 +298,50 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
dat_821.Add("INSTRUCTION", "STOP");
|
||||
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||
if (drEmployee.Field<bool>("Type"))
|
||||
{//网络
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
else
|
||||
{//串口
|
||||
if (drEmployee.Field<string>("Serial") == "PORT1")
|
||||
{
|
||||
stringQueueSerial_1.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + drEmployee.Field<string>("Station") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT2")
|
||||
{
|
||||
stringQueueSerial_2.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + drEmployee.Field<string>("Station") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT3")
|
||||
{
|
||||
stringQueueSerial_3.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + drEmployee.Field<string>("Station") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT4")
|
||||
{
|
||||
stringQueueSerial_4.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + drEmployee.Field<string>("Station") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}//停止
|
||||
private void MenuItem_Start_XML(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -312,12 +349,50 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||
if (drEmployee.Field<bool>("Type"))
|
||||
{//网络
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC822" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'")
|
||||
DAT = "SC822" + drEmployee.Field<string>("SYSKEY")
|
||||
});
|
||||
}
|
||||
else
|
||||
{//串口
|
||||
if (drEmployee.Field<string>("Serial") == "PORT1")
|
||||
{
|
||||
stringQueueSerial_1.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC822" + drEmployee.Field<string>("Station")
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT2")
|
||||
{
|
||||
stringQueueSerial_2.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC822" + drEmployee.Field<string>("Station")
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT3")
|
||||
{
|
||||
stringQueueSerial_3.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC822" + drEmployee.Field<string>("Station")
|
||||
});
|
||||
}
|
||||
else if (drEmployee.Field<string>("Serial") == "PORT4")
|
||||
{
|
||||
stringQueueSerial_4.Enqueue(new QueueSerial
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC822" + drEmployee.Field<string>("Station")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}//开始
|
||||
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
@@ -393,7 +468,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'")
|
||||
DAT = "SC833" + drEmployee.Field<string>("SYSKEY")
|
||||
});
|
||||
|
||||
machines_info = 2;
|
||||
@@ -426,7 +501,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
Insert.IsHitTestVisible = false;
|
||||
@@ -449,7 +524,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
Insert.IsHitTestVisible = true;
|
||||
@@ -473,7 +548,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
}
|
||||
}//停止
|
||||
@@ -535,7 +610,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
TechnologicalProcess_bool = true;
|
||||
}
|
||||
@@ -563,7 +638,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
|
||||
TechnologicalProcess_bool = true;
|
||||
@@ -626,7 +701,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
|
||||
}
|
||||
@@ -643,7 +718,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
|
||||
MainWindowViewModel.dt_TP.Select("Step="+ID).First().Delete();
|
||||
@@ -703,7 +778,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC821" + drEmployee.Field<string>("SYSKEY") + dat_821.ToJsonString()
|
||||
});
|
||||
|
||||
MainWindowViewModel.dt_TP.Select("Step=" + ID).First().Delete();
|
||||
@@ -757,7 +832,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'")
|
||||
DAT = "SC832" + drEmployee.Field<string>("SYSKEY")
|
||||
});
|
||||
}//信息
|
||||
else if (machines_info == 1)
|
||||
@@ -775,7 +850,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'")
|
||||
DAT = "SC831" + drEmployee.Field<string>("SYSKEY")
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user