单据信息显示
This commit is contained in:
commit
d047a4f23e
4 files changed
+46
-35
No files matched your search
+20
-17
@@ -1,33 +1,34 @@
|
|||||||
using System;
|
using DyeingComputer.UserClass;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using ScottPlot;
|
||||||
|
using ScottPlot.Colormaps;
|
||||||
|
using SkiaSharp;
|
||||||
|
using SunlightCentralizedControlManagement_SCCM_.View;
|
||||||
|
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Diagnostics;
|
using System.Windows;
|
||||||
|
using System.Xml.Linq;
|
||||||
using TouchSocket.Core;
|
using TouchSocket.Core;
|
||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using ScottPlot.Colormaps;
|
|
||||||
using static System.Windows.Forms.AxHost;
|
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper;
|
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper;
|
||||||
using SunlightCentralizedControlManagement_SCCM_.View;
|
using static System.Windows.Forms.AxHost;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||||||
using TcpClient = TouchSocket.Sockets.TcpClient;
|
using TcpClient = TouchSocket.Sockets.TcpClient;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
using ScottPlot;
|
|
||||||
using System.Collections;
|
|
||||||
using DyeingComputer.UserClass;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
||||||
{/// <summary>
|
{/// <summary>
|
||||||
@@ -240,7 +241,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MainWindowViewModel.MachineLOG = DAT.Substring(DAT.IndexOf("]") + 1);
|
DAT = DAT.Substring(DAT.IndexOf("]") + 1);
|
||||||
|
MonitorView.Product_DAT = JsonConvert.DeserializeObject<DataTable>(DAT).Copy();//反序列化
|
||||||
|
MonitorView.Product_bool=true;
|
||||||
}
|
}
|
||||||
catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; }
|
catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; }
|
||||||
}//当前领料单信息
|
}//当前领料单信息
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Grams}" Width="150" Binding="{Binding Grams}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.Grams}" Width="150" Binding="{Binding Grams}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.DispenseGrams}" Width="150" Binding="{Binding DispenseGrams}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.DispenseGrams}" Width="150" Binding="{Binding Amount}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.DispenseEndTime}" Width="200" Binding="{Binding DispenseEndTime}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.DispenseEndTime}" Width="200" Binding="{Binding DispenseEndTime}" IsReadOnly="True"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|||||||
@@ -48,7 +48,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
|
|
||||||
Grid_data.ItemsSource = dat_c.DefaultView;
|
Grid_data.ItemsSource = dat_c.DefaultView;
|
||||||
}
|
}
|
||||||
|
public void DyelotDatatable(DataTable dat)
|
||||||
|
{
|
||||||
|
Grid_data.ItemsSource = dat.DefaultView;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+21
-16
@@ -67,7 +67,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
dyelot= MainWindowViewModel.dyelot;
|
dyelot= MainWindowViewModel.dyelot;
|
||||||
machin_LOG.Text = MainWindowViewModel.machin_LOG;
|
machin_LOG.Text = MainWindowViewModel.machin_LOG;
|
||||||
IsInteractive = false;
|
IsInteractive = false;
|
||||||
DATA_view();
|
DATA_view();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string machine;
|
private string machine;
|
||||||
@@ -75,6 +75,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
private string dyelot;
|
private string dyelot;
|
||||||
private int machines_info=0;
|
private int machines_info=0;
|
||||||
public static string Sys_log;
|
public static string Sys_log;
|
||||||
|
public static DataTable Product_DAT = new DataTable();
|
||||||
|
public static bool Product_bool = false;
|
||||||
|
|
||||||
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
||||||
{
|
{
|
||||||
@@ -122,7 +124,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Gridstep_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Gridstep_SelectionChanged(object sender, SelectionChangedEventArgs e)//步骤定位
|
||||||
{
|
{
|
||||||
TechnologicalProcess_bool = false;
|
TechnologicalProcess_bool = false;
|
||||||
int rownum = Gridstep.SelectedIndex;//获取鼠标选中行并定义变量
|
int rownum = Gridstep.SelectedIndex;//获取鼠标选中行并定义变量
|
||||||
@@ -145,7 +147,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
rdp.Visibility = Visibility.Collapsed;
|
rdp.Visibility = Visibility.Collapsed;
|
||||||
Picture.Visibility = Visibility.Collapsed;
|
Picture.Visibility = Visibility.Collapsed;
|
||||||
}//信息
|
}//信息
|
||||||
|
|
||||||
private async Task<bool> PingTest(string ip)
|
private async Task<bool> PingTest(string ip)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
@@ -210,12 +211,19 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||||
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'")
|
||||||
|
});
|
||||||
|
|
||||||
machines_info = 2;
|
machines_info = 2;
|
||||||
log.Visibility = Visibility.Visible;
|
log.Visibility = Visibility.Collapsed;
|
||||||
rdp.Visibility = Visibility.Collapsed;
|
rdp.Visibility = Visibility.Collapsed;
|
||||||
Picture.Visibility = Visibility.Collapsed;
|
Picture.Visibility = Visibility.Visible;
|
||||||
DyelotView dyelotView = new DyelotView();
|
DyelotView dyelotView = new DyelotView();
|
||||||
dyelotView.Dyelot(workOrder);
|
dyelotView.DyelotDatatable(Product_DAT);
|
||||||
Picture.Content = dyelotView;
|
Picture.Content = dyelotView;
|
||||||
}//单据
|
}//单据
|
||||||
private void ListViewItem_LOCK_XML(object sender, MouseButtonEventArgs e)
|
private void ListViewItem_LOCK_XML(object sender, MouseButtonEventArgs e)
|
||||||
@@ -249,7 +257,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
MessageBox.Show(machine + Properties.Resources.user_unlock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
MessageBox.Show(machine + Properties.Resources.user_unlock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
}//锁定
|
}//锁定
|
||||||
|
|
||||||
private void ListViewItem_Curve(object sender, MouseButtonEventArgs e)
|
private void ListViewItem_Curve(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
log.Visibility = Visibility.Collapsed;
|
log.Visibility = Visibility.Collapsed;
|
||||||
@@ -258,6 +265,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
Picture.Content = new View.CurveDiagram(true, "", "", "", workOrder);
|
Picture.Content = new View.CurveDiagram(true, "", "", "", workOrder);
|
||||||
machines_info = 3;
|
machines_info = 3;
|
||||||
}//曲线
|
}//曲线
|
||||||
|
|
||||||
private void ListViewItem_Resume(object sender, MouseButtonEventArgs e)
|
private void ListViewItem_Resume(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
IsInteractive = false;
|
IsInteractive = false;
|
||||||
@@ -356,7 +364,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
|
|
||||||
TechnologicalProcess_bool = true;
|
TechnologicalProcess_bool = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ListViewItem_Jump(object sender, MouseButtonEventArgs e)
|
private void ListViewItem_Jump(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
||||||
@@ -541,13 +548,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
{
|
{
|
||||||
|
|
||||||
}//输送状态
|
}//输送状态
|
||||||
else if (machines_info == 2)
|
else if (machines_info == 2 && Product_bool)
|
||||||
{
|
{
|
||||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
Product_bool = false;
|
||||||
{
|
DyelotView dyelotView = new DyelotView();
|
||||||
ID = index,
|
dyelotView.DyelotDatatable(Product_DAT);
|
||||||
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'")
|
Picture.Content = dyelotView;
|
||||||
});
|
|
||||||
}//单据
|
}//单据
|
||||||
|
|
||||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
@@ -626,8 +632,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
technologicalProcess_View = value;
|
technologicalProcess_View = value;
|
||||||
RaisePropertyChanged("TechnologicalProcess_View");
|
RaisePropertyChanged("TechnologicalProcess_View");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<TechnologicalM> TechnologicalMachine_View
|
public ObservableCollection<TechnologicalM> TechnologicalMachine_View
|
||||||
{
|
{
|
||||||
get { return technologicalMachine_View; }
|
get { return technologicalMachine_View; }
|
||||||
|
|||||||
Reference in new issue
Block a user