diff --git a/ConvertMoels/StatexmlConvert.cs b/ConvertMoels/StatexmlConvert.cs new file mode 100644 index 0000000..345634e --- /dev/null +++ b/ConvertMoels/StatexmlConvert.cs @@ -0,0 +1,43 @@ +using ScottPlot.TickGenerators.Financial; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; + +namespace SunlightCentralizedControlManagement_SCCM_.ConvertMoels +{ + internal class StatexmlConvert : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return null; + } + else + { + string Staten = "None"; + string i = value.ToString(); + if (i == "101") Staten = "Walk";//运行 + else if (i == "202") Staten = "RunFast";//运行 + else if (i == "301") Staten = "Stop";//完成 + else if (i == "309") Staten = "ErrorOutline";//错误 + else if (i == "800") Staten = "LinkOff";//未连接 + else if (i == "801") Staten = "Link";//连接成功 + else if (i == "899") Staten = "LinkOff";//关闭连接 + else if (i == "TRUE") Staten = "Lock";//锁 + + return Staten; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 1af675b..ed6bcfb 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -2607,6 +2607,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties { } } + /// + /// 查找类似 The machine is not ready 的本地化字符串。 + /// + public static string TMNR { + get { + return ResourceManager.GetString("TMNR", resourceCulture); + } + } + /// /// 查找类似 Today 的本地化字符串。 /// diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index 972e174..3e2a764 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -1047,4 +1047,7 @@ Powder + + The machine is not ready + \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 4565c25..90b5c33 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -1047,4 +1047,7 @@ powder + + The machine is not ready + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index 9c249f2..840cbb8 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -1047,4 +1047,7 @@ 粉体 + + 机台未就绪 + \ No newline at end of file diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index beaebb1..4adedbd 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -1039,12 +1039,15 @@ 機台不存在 - + 染料 - + 助劑 - + 粉體 + + + 機台未就緒 \ No newline at end of file diff --git a/SunlightCentralizedControlManagement_SCCM_.csproj b/SunlightCentralizedControlManagement_SCCM_.csproj index 02150fb..c3e98bd 100644 --- a/SunlightCentralizedControlManagement_SCCM_.csproj +++ b/SunlightCentralizedControlManagement_SCCM_.csproj @@ -103,6 +103,7 @@ + DispenseState.xaml diff --git a/UserClass/AsyncTcpClient.cs b/UserClass/AsyncTcpClient.cs index f4b66e3..6d2c3e4 100644 --- a/UserClass/AsyncTcpClient.cs +++ b/UserClass/AsyncTcpClient.cs @@ -66,7 +66,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass { DataRow drEmployee = MainWindowViewModel.Machines.Select("IP='" + client.IP + "'").First(); drEmployee.BeginEdit(); - drEmployee["State"] = "899"; + drEmployee["State"] = "800"; drEmployee["WorkOrder"] = "------"; drEmployee["Dyelot"] = ""; drEmployee["Temperature"] = "---.-"; diff --git a/View/CurveView.xaml b/View/CurveView.xaml index 7e3c34c..4437278 100644 --- a/View/CurveView.xaml +++ b/View/CurveView.xaml @@ -13,6 +13,7 @@ Loaded="UserControl_Loaded" d:DesignHeight="900" d:DesignWidth="1800"> + @@ -21,7 +22,7 @@ GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" FontSize="15" Grid.ColumnSpan="2" CanUserResizeRows="False" AutoGenerateColumns="False" MinColumnWidth="30" CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" SelectionMode="Single" - Margin="0,0,0,60" HorizontalAlignment="Right" Width="300" MouseDoubleClick="Griddata_MouseDoubleClick"> + Margin="0,0,0,60" HorizontalAlignment="Right" Width="330" MouseDoubleClick="Griddata_MouseDoubleClick"> @@ -51,6 +54,7 @@