Ejemplo n.º 1
0
        /// <summary>
        ///     Set up data sources and load stored models as selected choices
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cpConsequenceModels_Load(object sender, EventArgs e)
        {
            var qraInst = QraStateContainer.Instance;

            cbNotionalNozzleModel.DataSource   = qraInst.NozzleModels;
            cbNotionalNozzleModel.SelectedItem = QraStateContainer.GetValue <NozzleModel>("NozzleModel");

            cbDeflagrationModel.DataSource = qraInst.DeflagrationModels;
            var model = QraStateContainer.GetValue <DeflagrationModel>("DeflagrationModel");

            cbDeflagrationModel.SelectedItem = model;
            UpdateCfdInput(model);

            cbThermalProbitModel.DataSource   = qraInst.ThermalProbitModels;
            cbThermalProbitModel.SelectedItem = QraStateContainer.GetValue <ThermalProbitModel>("ThermalProbit");

            cbOverpressureProbitModel.DataSource   = qraInst.OverpressureProbitModels;
            cbOverpressureProbitModel.SelectedItem =
                QraStateContainer.GetValue <OverpressureProbitModel>("OverpressureProbit");

            var radModel = QraStateContainer.GetValue <RadiativeSourceModels>("RadiativeSourceModel");

            cbRadiativeSourceModel.Fill(UiStateRoutines.GetRadiativeSourceModelDict(), radModel);
            cbRadiativeSourceModel.SelectedItem = radModel;
        }
Ejemplo n.º 2
0
        private void SetRadiativeSourceModel()
        {
            var current = QraStateContainer.GetValue <RadiativeSourceModels>("RadiativeSourceModel");

            cbRadiativeSourceModel.Fill(UiStateRoutines.GetRadiativeSourceModelDict(), current);
        }