private void Change_Coolant(object sender, SelectionChangedEventArgs e) { object selectedCoolantName = cmbCoolant.SelectedValue; Coolant selectedCoolant = lCoolants.Find(item => item.getName() == (string)selectedCoolantName); txtCoolantС.Text = selectedCoolant.getC().ToString(); txtCoolantP.Text = selectedCoolant.getP().ToString(); txtCoolantV.Text = selectedCoolant.getV().ToString(); object selectedFuelName = cmbFuel.SelectedValue; if (selectedFuelName != null) { txtCoolantA.Text = selectedCoolant.getA().ToString(); // txtCoolantF.Text = selectedCoolant.getF().ToString(); txtCoolantT.Text = selectedCoolant.getT().ToString(); } //Holding a*Ft if ((string)selectedCoolantName == "Вода" && (string)selectedFuelName == "Диоксид урана") { txtCoolantA.Text = "6.014"; } else { txtCoolantA.Text = "0"; } }
private void Change_Coolant(object sender, SelectionChangedEventArgs e) { object selectedCoolantName = cmbCoolant.SelectedValue; Coolant selectedCoolant = lCoolants.Find(item => item.getName() == (string)selectedCoolantName); txtCoolantС.Text = selectedCoolant.getC().ToString(); txtCoolantP.Text = selectedCoolant.getP().ToString(); txtCoolantV.Text = selectedCoolant.getV().ToString(); object selectedFuelName = cmbFuel.SelectedValue; if (selectedFuelName != null) { txtCoolantA.Text = selectedCoolant.getA().ToString(); txtCoolantF.Text = selectedCoolant.getF().ToString(); txtCoolantT.Text = selectedCoolant.getT().ToString(); } }