Пример #1
0
        private void Change_Reactor(object sender, SelectionChangedEventArgs e)
        {
            object  selectedReactorName = cmbReactor.SelectedValue;
            Reactor selectedReactor     = reactors.Find(item => item.GetName() == (string)selectedReactorName);

            txtInitPower.Text = selectedReactor.GetW();

            cmbFuel.Text  = selectedReactor.GetFuel().getName();
            txtFuelC.Text = selectedReactor.GetFuel().getC().ToString();
            txtFuelP.Text = selectedReactor.GetFuel().getP().ToString();
            txtFuelV.Text = selectedReactor.GetFuel().getV().ToString();

            cmbCoolant.Text  = selectedReactor.GetCoolant().getName().ToString();
            txtCoolantС.Text = selectedReactor.GetCoolant().getC().ToString();
            txtCoolantP.Text = selectedReactor.GetCoolant().getP().ToString();
            txtCoolantV.Text = selectedReactor.GetCoolant().getV().ToString();

            txtCoolantA.Text = selectedReactor.GetAlphaFt().ToString();
            txtCoolantT.Text = selectedReactor.GetT0().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";
             * }*/
        }