Esempio n. 1
0
        private void Change_Fuel(object sender, SelectionChangedEventArgs e)
        {
            object selectedFuelName = cmbFuel.SelectedValue;
            Fuel   selectedFuel     = lFuels.Find(item => item.getName() == (string)selectedFuelName);

            txtFuelC.Text = selectedFuel.getC().ToString();
            txtFuelP.Text = selectedFuel.getP().ToString();
            txtFuelV.Text = selectedFuel.getV().ToString();

            object selectedCoolantName = cmbCoolant.SelectedValue;

            if (selectedCoolantName != null)
            {
                Coolant selectedCoolant = lCoolants.Find(item => item.getName() == (string)selectedCoolantName);
                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";
            }
        }
Esempio n. 2
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();
            }
        }