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