diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index a633ca8..1cb6ecb 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -78,6 +78,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 AddTheMedicine 的本地化字符串。 + /// + public static string AddTheMedicine { + get { + return ResourceManager.GetString("AddTheMedicine", resourceCulture); + } + } + /// /// 查找类似 Add water 的本地化字符串。 /// @@ -105,6 +114,42 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 CallDistribution 的本地化字符串。 + /// + public static string CallDistribution { + get { + return ResourceManager.GetString("CallDistribution", resourceCulture); + } + } + + /// + /// 查找类似 CallPreparation 的本地化字符串。 + /// + public static string CallPreparation { + get { + return ResourceManager.GetString("CallPreparation", resourceCulture); + } + } + + /// + /// 查找类似 CallWorkers 的本地化字符串。 + /// + public static string CallWorkers { + get { + return ResourceManager.GetString("CallWorkers", resourceCulture); + } + } + + /// + /// 查找类似 ClothIntake 的本地化字符串。 + /// + public static string ClothIntake { + get { + return ResourceManager.GetString("ClothIntake", resourceCulture); + } + } + /// /// 查找类似 Code 的本地化字符串。 /// @@ -150,6 +195,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Depressurized 的本地化字符串。 + /// + public static string Depressurized { + get { + return ResourceManager.GetString("Depressurized", resourceCulture); + } + } + /// /// 查找类似 Directives 的本地化字符串。 /// @@ -177,6 +231,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 End of program 的本地化字符串。 + /// + public static string End { + get { + return ResourceManager.GetString("End", resourceCulture); + } + } + /// /// 查找类似 EndTime 的本地化字符串。 /// @@ -222,6 +285,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Function 的本地化字符串。 + /// + public static string Function { + get { + return ResourceManager.GetString("Function", resourceCulture); + } + } + /// /// 查找类似 History 的本地化字符串。 /// @@ -258,6 +330,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Invalid features 的本地化字符串。 + /// + public static string Invalidfeatures { + get { + return ResourceManager.GetString("Invalidfeatures", resourceCulture); + } + } + /// /// 查找类似 LineUp 的本地化字符串。 /// @@ -303,6 +384,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 OutTheCloth 的本地化字符串。 + /// + public static string OutTheCloth { + get { + return ResourceManager.GetString("OutTheCloth", resourceCulture); + } + } + /// /// 查找类似 Parameter 的本地化字符串。 /// @@ -312,6 +402,51 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 PHControl 的本地化字符串。 + /// + public static string PHControl { + get { + return ResourceManager.GetString("PHControl", resourceCulture); + } + } + + /// + /// 查找类似 PHDetection 的本地化字符串。 + /// + public static string PHDetection { + get { + return ResourceManager.GetString("PHDetection", resourceCulture); + } + } + + /// + /// 查找类似 PHTemperatureControl 的本地化字符串。 + /// + public static string PHTemperatureControl { + get { + return ResourceManager.GetString("PHTemperatureControl", resourceCulture); + } + } + + /// + /// 查找类似 PrepareMedications 的本地化字符串。 + /// + public static string PrepareMedications { + get { + return ResourceManager.GetString("PrepareMedications", resourceCulture); + } + } + + /// + /// 查找类似 Pressurized 的本地化字符串。 + /// + public static string Pressurized { + get { + return ResourceManager.GetString("Pressurized", resourceCulture); + } + } + /// /// 查找类似 back 的本地化字符串。 /// @@ -339,6 +474,42 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 PumpDrainage 的本地化字符串。 + /// + public static string PumpDrainage { + get { + return ResourceManager.GetString("PumpDrainage", resourceCulture); + } + } + + /// + /// 查找类似 PumpSpeed 的本地化字符串。 + /// + public static string PumpSpeed { + get { + return ResourceManager.GetString("PumpSpeed", resourceCulture); + } + } + + /// + /// 查找类似 PumpStart 的本地化字符串。 + /// + public static string PumpStart { + get { + return ResourceManager.GetString("PumpStart", resourceCulture); + } + } + + /// + /// 查找类似 PumpStops 的本地化字符串。 + /// + public static string PumpStops { + get { + return ResourceManager.GetString("PumpStops", resourceCulture); + } + } + /// /// 查找类似 Quit 的本地化字符串。 /// @@ -348,6 +519,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 RapidAcidAddition 的本地化字符串。 + /// + public static string RapidAcidAddition { + get { + return ResourceManager.GetString("RapidAcidAddition", resourceCulture); + } + } + /// /// 查找类似 Ready 的本地化字符串。 /// @@ -393,6 +573,24 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 RunningTime 的本地化字符串。 + /// + public static string RunningTime { + get { + return ResourceManager.GetString("RunningTime", resourceCulture); + } + } + + /// + /// 查找类似 Sampling 的本地化字符串。 + /// + public static string Sampling { + get { + return ResourceManager.GetString("Sampling", resourceCulture); + } + } + /// /// 查找类似 Save 的本地化字符串。 /// diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index b281163..034d5a2 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -270,4 +270,70 @@ Drainage + + Pump Drainage + + + Out The Cloth + + + Running Time + + + Put in the cloth + + + Add The Medicine + + + Call Distribution + + + Call Preparation + + + Call Workers + + + Depressurized + + + End of program + + + PH Control + + + PH Detection + + + PH Temperature Control + + + Prepare Medications + + + Pressurized + + + Pump Speed + + + Pump Start + + + Pump Stops + + + Rapid Acid Addition + + + Sampling + + + Invalid features + + + Function + \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index bba5a2b..4060c5a 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -270,4 +270,70 @@ Water Level + + ClothIntake + + + OutTheCloth + + + PumpDrainage + + + RunningTime + + + AddTheMedicine + + + CallDistribution + + + CallPreparation + + + CallWorkers + + + Depressurized + + + End of program + + + PHControl + + + PHDetection + + + PHTemperatureControl + + + PrepareMedications + + + Pressurized + + + PumpSpeed + + + PumpStart + + + PumpStops + + + RapidAcidAddition + + + Sampling + + + Function + + + Invalid features + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index 8dad822..d94000d 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -270,4 +270,70 @@ 排水 + + 主泵排水 + + + 运转 + + + 准备入布 + + + 准备出布 + + + 呼叫输送 + + + 加药 + + + 呼叫准备 + + + 呼叫操作员 + + + 减压 + + + 程序结束 + + + PH控制 + + + PH检测 + + + PH温度控制 + + + 备药 + + + 加压 + + + 主泵速 + + + 主泵启动 + + + 主泵停止 + + + 快速加酸 + + + 取样 + + + 功能无效 + + + 功能 + \ No newline at end of file diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index 15c5ac3..8bed079 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -270,4 +270,70 @@ 排水 + + 泵排水 + + + 運轉 + + + 準備入布 + + + 準備出布 + + + 加藥 + + + 呼叫輸送 + + + 呼叫準備 + + + 呼叫操作員 + + + 減壓 + + + 程式結束 + + + PH控制 + + + PH溫度控制 + + + 備藥 + + + 加壓 + + + 主泵速 + + + 主泵啟動 + + + 主泵停止 + + + 快速加酸 + + + 取樣 + + + PH檢測 + + + 無效的圖徵 + + + 機能 + \ No newline at end of file diff --git a/Windows/ViewStep.xaml b/Windows/ViewStep.xaml index 49bcbc4..9318de3 100644 --- a/Windows/ViewStep.xaml +++ b/Windows/ViewStep.xaml @@ -4,16 +4,17 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:DyeingComputer.Windows" + xmlns:lang="clr-namespace:DyeingComputer.Properties" mc:Ignorable="d" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Title="SUNLIGHT 800" Height="450" Width="400"> - - - + + + + TextChanged="TextBox_TextChanged" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/> diff --git a/Windows/ViewStep.xaml.cs b/Windows/ViewStep.xaml.cs index 448c28f..2bc8528 100644 --- a/Windows/ViewStep.xaml.cs +++ b/Windows/ViewStep.xaml.cs @@ -34,37 +34,65 @@ namespace DyeingComputer.Windows e.Handled = !re.IsMatch(e.Text); } - string[] a = {"001","007","008","013","017", "020", "022", "031", "035", "036", "039", "040", "041", "049", "050", - "051", "054", "055", "056","065","066","067","090","091","092","093","094" }; + private readonly string[] a = {"001","007","008","013","017", "020", "022", "031", "035", "036", "039", "040", "041", "049", "050", + "051", "054", "055", "056","064","065","066","067","090","091","093","094" }; private void Form1_Load() { - this.boxID.Items.Add(Properties.Resources.TemperatureControl); - this.boxID.Items.Add(Properties.Resources.AddWater + "(" + Properties.Resources.WaterLevel + ")"); - this.boxID.Items.Add(Properties.Resources.AddWater + "(" + Properties.Resources.Flowmeter + ")"); - this.boxID.Items.Add(Properties.Resources.Washing + "(" + Properties.Resources.WaterLevel + ")"); - this.boxID.Items.Add(Properties.Resources.Washing + "(" + Properties.Resources.Cooling + ")"); - this.boxID.Items.Add(Properties.Resources.Drainage); - - - - - + this.boxID.Items.Add(Properties.Resources.TemperatureControl);//温度控制001 + this.boxID.Items.Add(Properties.Resources.AddWater + "(" + Properties.Resources.WaterLevel + ")");//水位进水007 + this.boxID.Items.Add(Properties.Resources.AddWater + "(" + Properties.Resources.Flowmeter + ")");//流量进水008 + this.boxID.Items.Add(Properties.Resources.Washing + "(" + Properties.Resources.WaterLevel + ")");//水位水洗013 + this.boxID.Items.Add(Properties.Resources.Washing + "(" + Properties.Resources.Cooling + ")");//降温水洗017 + this.boxID.Items.Add(Properties.Resources.Drainage);//排水020 + this.boxID.Items.Add(Properties.Resources.PumpDrainage);//主泵排水022 + this.boxID.Items.Add(Properties.Resources.RunningTime);//运转031 + this.boxID.Items.Add(Properties.Resources.ClothIntake);//入布035 + this.boxID.Items.Add(Properties.Resources.OutTheCloth);//出布036 + this.boxID.Items.Add(Properties.Resources.CallWorkers);//呼叫操作员039 + this.boxID.Items.Add(Properties.Resources.Sampling);//取样040 + this.boxID.Items.Add(Properties.Resources.End);//程序结束041 + this.boxID.Items.Add(Properties.Resources.Await);//等待049 + this.boxID.Items.Add(Properties.Resources.Pressurized);//加压050 + this.boxID.Items.Add(Properties.Resources.Depressurized);//减压051 + this.boxID.Items.Add(Properties.Resources.PumpSpeed);//泵速度054 + this.boxID.Items.Add(Properties.Resources.PumpStart);//泵启动055 + this.boxID.Items.Add(Properties.Resources.PumpStops);//泵停止056 + this.boxID.Items.Add(Properties.Resources.PrepareMedications);//备药064 + this.boxID.Items.Add(Properties.Resources.AddTheMedicine);//加药065 + this.boxID.Items.Add(Properties.Resources.CallDistribution);//呼叫输送066 + this.boxID.Items.Add(Properties.Resources.CallPreparation);//呼叫准备067 + this.boxID.Items.Add(Properties.Resources.RapidAcidAddition);//快速加酸090 + this.boxID.Items.Add(Properties.Resources.PHTemperatureControl);//ph温度控制091 + this.boxID.Items.Add(Properties.Resources.PHDetection);//ph检测093 + this.boxID.Items.Add(Properties.Resources.PHControl);//ph控制094 } - private void TextBox_TextChanged(object sender, TextChangedEventArgs e) + private void TextBox_TextChanged(object sender, TextChangedEventArgs e)//输入事件 { int l = boxNAME.Text.Length; string text = boxNAME.Text.ToString(); if (l == 3) - { - boxID.SelectedIndex = Array.IndexOf(a, text); + { + int g = Array.IndexOf(a, text);//数组索引 + if (g != -1) + { + boxID.SelectedIndex = g;//有效索引传入 + } else + { + boxID.SelectedIndex =-1; + // boxNAME.Text = Properties.Resources.Invalidfeatures;//功能无效 + } } } - private void boxID_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void BoxID_SelectionChanged(object sender, SelectionChangedEventArgs e)//下拉框选择事件 { - + if (boxID.SelectedIndex !=-1) + { + int i = boxID.SelectedIndex; + boxNAME.Text = a.ElementAt(i); + } } } }