Merge branch 'master' of http://192.168.0.12:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
8914ea3660
1 file changed
+89
-11
+89
-11
@@ -28,6 +28,8 @@ using System.Xml.Linq;
|
|||||||
using TouchSocket.Core;
|
using TouchSocket.Core;
|
||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
using VncSharpWpf;
|
using VncSharpWpf;
|
||||||
|
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper;
|
||||||
|
using static SunlightCentralizedControlManagement_SCCM_.ViewModel.MainWindowViewModel;
|
||||||
using static SunlightCentralizedControlManagement_SCCM_.WindowsView.ViewStep;
|
using static SunlightCentralizedControlManagement_SCCM_.WindowsView.ViewStep;
|
||||||
using static System.Net.WebRequestMethods;
|
using static System.Net.WebRequestMethods;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Rebar;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Rebar;
|
||||||
@@ -120,7 +122,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show(Properties.Resources.TMNR, "800", MessageBoxButton.OK, MessageBoxImage.Information); //
|
// MessageBox.Show(Properties.Resources.TMNR, "800", MessageBoxButton.OK, MessageBoxImage.Information); //
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,12 +166,50 @@ 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
|
|
||||||
{
|
|
||||||
ID = index,
|
|
||||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
|
||||||
});
|
|
||||||
|
|
||||||
|
if (MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<bool>("Type"))
|
||||||
|
{//网络
|
||||||
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{//串口
|
||||||
|
if (drEmployee.Field<string>("Serial") == "PORT1")
|
||||||
|
{
|
||||||
|
stringQueueSerial_1.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (drEmployee.Field<string>("Serial") == "PORT2")
|
||||||
|
{
|
||||||
|
stringQueueSerial_2.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (drEmployee.Field<string>("Serial") == "PORT3")
|
||||||
|
{
|
||||||
|
stringQueueSerial_3.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (drEmployee.Field<string>("Serial") == "PORT4")
|
||||||
|
{
|
||||||
|
stringQueueSerial_4.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!mode)
|
if (!mode)
|
||||||
{
|
{
|
||||||
MessageBox.Show(machine + Properties.Resources.user_lock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
MessageBox.Show(machine + Properties.Resources.user_lock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
@@ -204,11 +244,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 (MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<bool>("Type"))
|
||||||
{
|
{//网络
|
||||||
ID = index,
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
{
|
||||||
});
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{//串口
|
||||||
|
if (drEmployee.Field<string>("Serial") == "PORT1")
|
||||||
|
{
|
||||||
|
stringQueueSerial_1.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (drEmployee.Field<string>("Serial") == "PORT2")
|
||||||
|
{
|
||||||
|
stringQueueSerial_2.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (drEmployee.Field<string>("Serial") == "PORT3")
|
||||||
|
{
|
||||||
|
stringQueueSerial_3.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (drEmployee.Field<string>("Serial") == "PORT4")
|
||||||
|
{
|
||||||
|
stringQueueSerial_4.Enqueue(new QueueSerial
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}//手自动
|
}//手自动
|
||||||
|
|||||||
Reference in new issue
Block a user