diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 355d74f..b619a32 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -78,6 +78,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Add water 的本地化字符串。 + /// + public static string AddWater { + get { + return ResourceManager.GetString("AddWater", resourceCulture); + } + } + /// /// 查找类似 Auto 的本地化字符串。 /// @@ -186,6 +195,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Flowmeter 的本地化字符串。 + /// + public static string Flowmeter { + get { + return ResourceManager.GetString("Flowmeter", resourceCulture); + } + } + /// /// 查找类似 History 的本地化字符串。 /// @@ -429,6 +447,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Temperature Control 的本地化字符串。 + /// + public static string TemperatureControl { + get { + return ResourceManager.GetString("TemperatureControl", resourceCulture); + } + } + /// /// 查找类似 Time 的本地化字符串。 /// @@ -438,6 +465,24 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Washing 的本地化字符串。 + /// + public static string Washing { + get { + return ResourceManager.GetString("Washing", resourceCulture); + } + } + + /// + /// 查找类似 Water Level 的本地化字符串。 + /// + public static string WaterLevel { + get { + return ResourceManager.GetString("WaterLevel", resourceCulture); + } + } + /// /// 查找类似 Worklist 的本地化字符串。 /// diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index 755aaf7..da4f5a9 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -249,4 +249,16 @@ Quit + + Temperature Control + + + Add water + + + Flowmeter + + + Water Level + \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 37ccca6..025f262 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -249,4 +249,19 @@ Quit + + Add water + + + Flowmeter + + + Temperature Control + + + Washing + + + Water Level + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index 8d71663..06006c2 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -249,4 +249,16 @@ 退出 + + 温度控制 + + + 入水 + + + 流量 + + + 水位 + \ No newline at end of file diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index 0f8631d..574316d 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -249,4 +249,16 @@ 退出 + + 溫度控制 + + + 入水 + + + 流量 + + + 水位 + \ No newline at end of file diff --git a/Windows/ViewStep.xaml b/Windows/ViewStep.xaml index 3574de7..49bcbc4 100644 --- a/Windows/ViewStep.xaml +++ b/Windows/ViewStep.xaml @@ -11,8 +11,8 @@ - - + diff --git a/Windows/ViewStep.xaml.cs b/Windows/ViewStep.xaml.cs index 4302ace..09ac1f5 100644 --- a/Windows/ViewStep.xaml.cs +++ b/Windows/ViewStep.xaml.cs @@ -23,6 +23,7 @@ namespace DyeingComputer.Windows public ViewStep() { InitializeComponent(); + Form1_Load(); } private void Tb_KeyPress(object sender, TextCompositionEventArgs e)//输入事件 @@ -31,23 +32,48 @@ namespace DyeingComputer.Windows //Regex re = new Regex("[^0-9.-]+"); Regex re = new Regex(@"^[0-9]+(.[0-9]{1,3})?$");// 非零的正整数 e.Handled = !re.IsMatch(e.Text); + } + + 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 + ")"); + + + + + + + } private void TextBox_TextChanged(object sender, TextChangedEventArgs e) { - int l = code.Text.Length; - string text = code.Text.ToString(); + int l = boxNAME.Text.Length; + string text = boxNAME.Text.ToString(); if (l == 3) { - if(text == "001") { } + if(text == "001") + { + boxID.SelectedIndex = 0; //温度控制 + } else - if (text == "007") { } + if (text == "007") + { + boxID.SelectedIndex = 1; //水位入水 + } else - if (text == "008") { } + if (text == "008") + { + boxID.SelectedIndex = 2; //流量入水 + } else - if (text == "013") { } - else - if (text == "014") { } + if (text == "013") + { + boxID.SelectedIndex = 3;//水洗 + } else if (text == "017") { } else @@ -123,5 +149,10 @@ namespace DyeingComputer.Windows } } + + private void boxID_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + + } } }