|
|
|
@ -486,6 +486,10 @@ namespace formula_manage |
|
|
|
{ |
|
|
|
if (e.Key == Key.Enter) |
|
|
|
{ |
|
|
|
System.Windows.Controls.ComboBox curComboBox = sender as System.Windows.Controls.ComboBox; |
|
|
|
string a = curComboBox.Text; |
|
|
|
if (a == "") return; |
|
|
|
|
|
|
|
PressKey.PressKeys(Keys.Right, false); |
|
|
|
PressKey.PressKeys(Keys.Right, true); |
|
|
|
// PressKey.PressKeys(Keys.Up, false);
|
|
|
|
@ -505,27 +509,27 @@ namespace formula_manage |
|
|
|
private void CP_CONC_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)//目标饱和度输入事件
|
|
|
|
{ |
|
|
|
double ang; |
|
|
|
double conc; |
|
|
|
double conc=0; |
|
|
|
|
|
|
|
System.Windows.Controls.TextBox curTextBox = sender as System.Windows.Controls.TextBox; |
|
|
|
|
|
|
|
if (!double.TryParse(curTextBox.Text, out ang) && curTextBox.Text != "") |
|
|
|
{ |
|
|
|
System.Windows.MessageBox.Show("错误,重新输入"); |
|
|
|
curTextBox.Text = ""; |
|
|
|
} |
|
|
|
else |
|
|
|
if (e.Key == Key.Enter) |
|
|
|
{ |
|
|
|
conc = double.Parse(curTextBox.Text); //转换后判断数值输入是否异常
|
|
|
|
if (conc > 100) |
|
|
|
if (!double.TryParse(curTextBox.Text, out ang)) |
|
|
|
{ |
|
|
|
System.Windows.MessageBox.Show("比例错误"); |
|
|
|
System.Windows.MessageBox.Show("错误,重新输入"); |
|
|
|
curTextBox.Text = ""; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (e.Key == Key.Enter) |
|
|
|
else |
|
|
|
{ |
|
|
|
if (curTextBox.Text != "") conc = double.Parse(curTextBox.Text); //转换后判断数值输入是否异常
|
|
|
|
if (conc > 100) |
|
|
|
{ |
|
|
|
System.Windows.MessageBox.Show("比例错误"); |
|
|
|
curTextBox.Text = ""; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
PressKey.PressKeys(Keys.Left, false); |
|
|
|
PressKey.PressKeys(Keys.Left, true); |
|
|
|
PressKey.PressKeys(Keys.Tab, false); |
|
|
|
@ -535,11 +539,13 @@ namespace formula_manage |
|
|
|
row = RRODUCTdataTable.NewRow(); |
|
|
|
ID_N++; |
|
|
|
row["ID"] = ID_N; |
|
|
|
row["STEP"] = "1"; |
|
|
|
row["UNIT"] = "g"; |
|
|
|
// row["STEP"] = Procedures_P.Text;
|
|
|
|
RRODUCTdataTable.Rows.Add(row); |
|
|
|
|
|
|
|
DataGridHelper.SetRealTimeCommit(Grid_RRODUCT, true); //实时更新datagrid
|
|
|
|
} |
|
|
|
DataGridHelper.SetRealTimeCommit(Grid_RRODUCT, true); //实时更新datagrid
|
|
|
|
} |
|
|
|
} //目标饱和度输入事件
|
|
|
|
|
|
|
|
@ -547,8 +553,14 @@ namespace formula_manage |
|
|
|
{ |
|
|
|
System.Windows.Controls.ComboBox curComboBox = sender as System.Windows.Controls.ComboBox; |
|
|
|
string a = curComboBox.Text; |
|
|
|
MainWindowViewModel.STUFFdatatemp.Select("ProductCode ='"+ a +"'"); |
|
|
|
|
|
|
|
DataTable data = null; |
|
|
|
if (a != "") |
|
|
|
{ |
|
|
|
data = MainWindowViewModel.STUFFdatatemp.Select("ProductCode ='" + a + "'").CopyToDataTable(); |
|
|
|
//Grid_RRODUCT.ItemsSource = data.Columns.//Add("ProductName").ToString();
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|