Compare commits
2
Commits
f64e213305
...
ab557a192f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab557a192f | ||
|
|
8432d6391a |
+11
-3
@@ -502,19 +502,28 @@ namespace formula_manage
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CP_CONC_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
|
private void CP_CONC_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)//目标饱和度输入事件
|
||||||
{
|
{
|
||||||
double ang;
|
double ang;
|
||||||
|
double conc;
|
||||||
|
|
||||||
System.Windows.Controls.TextBox curTextBox = sender as System.Windows.Controls.TextBox;
|
System.Windows.Controls.TextBox curTextBox = sender as System.Windows.Controls.TextBox;
|
||||||
|
|
||||||
if (!double.TryParse(curTextBox.Text, out ang) && curTextBox.Text != "")
|
if (!double.TryParse(curTextBox.Text, out ang) && curTextBox.Text != "")
|
||||||
{
|
{
|
||||||
System.Windows.MessageBox.Show("数值错误,重新输入");
|
System.Windows.MessageBox.Show("错误,重新输入");
|
||||||
curTextBox.Text = "";
|
curTextBox.Text = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
conc = double.Parse(curTextBox.Text); //转换后判断数值输入是否异常
|
||||||
|
if (conc > 100)
|
||||||
|
{
|
||||||
|
System.Windows.MessageBox.Show("比例错误");
|
||||||
|
curTextBox.Text = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (e.Key == Key.Enter)
|
if (e.Key == Key.Enter)
|
||||||
{
|
{
|
||||||
PressKey.PressKeys(Keys.Left, false);
|
PressKey.PressKeys(Keys.Left, false);
|
||||||
@@ -529,7 +538,6 @@ namespace formula_manage
|
|||||||
row["UNIT"] = "g";
|
row["UNIT"] = "g";
|
||||||
// row["STEP"] = Procedures_P.Text;
|
// row["STEP"] = Procedures_P.Text;
|
||||||
RRODUCTdataTable.Rows.Add(row);
|
RRODUCTdataTable.Rows.Add(row);
|
||||||
|
|
||||||
}
|
}
|
||||||
DataGridHelper.SetRealTimeCommit(Grid_RRODUCT, true); //实时更新datagrid
|
DataGridHelper.SetRealTimeCommit(Grid_RRODUCT, true); //实时更新datagrid
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user