diff --git a/UserClass/AsyncTcpClient.cs b/UserClass/AsyncTcpClient.cs
index 1b43035..438fac1 100644
--- a/UserClass/AsyncTcpClient.cs
+++ b/UserClass/AsyncTcpClient.cs
@@ -106,6 +106,11 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
drEmployee.AcceptChanges();
drEmployee.ClearErrors();
}
+ else if (SYSAPI == "SC832")
+ {
+ MonitorView.Sys_log = DAT.Substring(DAT.IndexOf("]") + 1);
+
+ }//当前细节信息
else if (SYSAPI == "SC851")
{
DAT = DAT.Substring(DAT.IndexOf("]") + 1);
diff --git a/View/MonitorView.xaml b/View/MonitorView.xaml
index 8570b2c..b839cbf 100644
--- a/View/MonitorView.xaml
+++ b/View/MonitorView.xaml
@@ -111,7 +111,7 @@
-
+
diff --git a/View/MonitorView.xaml.cs b/View/MonitorView.xaml.cs
index 109ada3..197dd45 100644
--- a/View/MonitorView.xaml.cs
+++ b/View/MonitorView.xaml.cs
@@ -1,6 +1,7 @@
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
using System;
using System.Collections.Generic;
+using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -13,6 +14,10 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using System.Windows.Threading;
+using System.Xml.Linq;
+using TouchSocket.Sockets;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.Rebar;
namespace SunlightCentralizedControlManagement_SCCM_.View
{
@@ -25,14 +30,24 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
{
InitializeComponent();
Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView;
+ CountDown();
}
- private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
-
- }
+ private string machine;
+ private string workOrder;
+ private string dyelot;
+ public static string Sys_log;
-
+ private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
+ {
+ int rownum = Griddata.SelectedIndex;//获取鼠标选中行并定义变量
+ if (rownum != -1)//判断鼠标定位是否有效
+ {
+ machine = (Griddata.Columns[0].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第1列,
+ workOrder = (Griddata.Columns[1].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
+ dyelot = (Griddata.Columns[2].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
+ }
+ }
private void Gridstep_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
@@ -80,5 +95,35 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
{
}
+
+ public void CountDown()
+ {
+ DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
+ {
+ Interval = TimeSpan.FromSeconds(1)//秒
+ };
+ timer1s.Tick += Tick_Event_1S;
+ timer1s.Start();
+ }//时间周期初始化
+
+ void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
+ {
+ if (!string.IsNullOrEmpty(machine))
+ {
+ try
+ {
+ DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
+ int State_ = Convert.ToInt16(drEmployee.Field