#region <<< Using Directives >>>
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

using Volpe.Cafe.DfsSrModels;
using Volpe.Cafe.EspressoUI.Utils;
using Volpe.Cafe.ModelSettings;
using Volpe.Cafe.Utils;
#endregion

namespace Volpe.Cafe.EspressoUI.LegacyControls.Panels
{
    /// <summary>
    /// Provides a panel for configuring runtime settings for the compliance model.
    /// </summary>
    public class RuntimeSettingsPanel : CafeUserControl
    {

        #region /*** Constructors ***/

        /// <summary>
        /// Initializes a new instance of the <see cref="RuntimeSettingsPanel"/> class.
        /// </summary>
        public RuntimeSettingsPanel()
        {
            this.InitializeComponent();
            this.PostInitialize();
        }

        #endregion

        #region /*** Methods ***/

        #region /* Designer generated code */

        void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.Windows.Forms.Label ux_analysisStartYearLabel;
            System.Windows.Forms.Label ux_alternativeStartYearLabel;
            System.Windows.Forms.Label ux_techStartYearLabel;
            System.Windows.Forms.Label ux_analysisEndYearLabel;
            System.Windows.Forms.Label ux_dsrNumberIterationsLabel;
            System.Windows.Forms.Label ux_dsrPriceElasticityMultiplierLabel;
            System.Windows.Forms.Label ux_commercialShareLDLabel;
            System.Windows.Forms.Label ux_assumedPaybackMilesLabel;
            System.Windows.Forms.FlowLayoutPanel ux_analysisStartYearPanel;
            System.Windows.Forms.FlowLayoutPanel ux_alternativeStartYearPanel;
            System.Windows.Forms.FlowLayoutPanel ux_techStartYearPanel;
            System.Windows.Forms.FlowLayoutPanel ux_analysisEndYearPanel;
            System.Windows.Forms.FlowLayoutPanel ux_assumedPaybackMilesPanel;
            System.Windows.Forms.FlowLayoutPanel ux_scaleConsumerBenefitsPanel;
            System.Windows.Forms.Label ux_demSalesEstimatorPriceElasticityMultiplierLabel;
            System.Windows.Forms.Label ux_demDfsModelPriceCoefficientLabel;
            this.ux_analysisStartYear = new System.Windows.Forms.TextBox();
            this.ux_alternativeStartYear = new System.Windows.Forms.TextBox();
            this.ux_techStartYear = new System.Windows.Forms.TextBox();
            this.ux_analysisEndYear = new System.Windows.Forms.TextBox();
            this.ux_assumedPaybackMiles = new System.Windows.Forms.TextBox();
            this.ux_scaleConsumerBenefits = new System.Windows.Forms.CheckBox();
            this.ux_consumerBenefitsScale = new System.Windows.Forms.TextBox();
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demSalesEstimatorPriceElasticityMultiplier = new System.Windows.Forms.TextBox();
            this.ux_demDfsModelPriceCoefficientPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demDfsModelPriceCoefficient = new System.Windows.Forms.TextBox();
            this.ux_fatalityRateEstimatesGroupBox = new System.Windows.Forms.GroupBox();
            this.ux_fatalityRateEstimatesPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_fatalityRateLow = new System.Windows.Forms.RadioButton();
            this.ux_fatalityRateAverage = new System.Windows.Forms.RadioButton();
            this.ux_fatalityRateHigh = new System.Windows.Forms.RadioButton();
            this.ux_capOffCycleCosts = new System.Windows.Forms.CheckBox();
            this.ux_calcCommercialOpportunityCost = new System.Windows.Forms.CheckBox();
            this.ux_commercialShareLD = new System.Windows.Forms.TextBox();
            this.ux_calcImplicitOpportunityCost = new System.Windows.Forms.CheckBox();
            this.ux_allowCreditTrading = new System.Windows.Forms.CheckBox();
            this.ux_complianceProgramGroupBox = new System.Windows.Forms.GroupBox();
            this.ux_complianceProgramPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_complianceProgramCAFE = new System.Windows.Forms.RadioButton();
            this.ux_complianceProgramCO2 = new System.Windows.Forms.RadioButton();
            this.ux_complianceProgramBoth = new System.Windows.Forms.RadioButton();
            this.ux_settingsProfileCustom = new System.Windows.Forms.RadioButton();
            this.ux_settingsProfileLdEis = new System.Windows.Forms.RadioButton();
            this.ux_settingsProfileLightDuty = new System.Windows.Forms.RadioButton();
            this.ux_settingsProfilePanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_settingsProfileLabel = new System.Windows.Forms.Label();
            this.ux_complianceSettingsPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_excludeBevFcvFromAnalysis = new System.Windows.Forms.CheckBox();
            this.ux_commercialOpportunityCostSettingsPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.us_runtimeSettingsPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demSettings = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_enableDynamicEconomicModeling = new System.Windows.Forms.CheckBox();
            this.ux_demSalesEstimatorGroupBox = new System.Windows.Forms.GroupBox();
            this.ux_demSalesEstimatorPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demSalesEstimatorFixedForecast = new System.Windows.Forms.RadioButton();
            this.ux_demSalesEstimatorUserDefined = new System.Windows.Forms.RadioButton();
            this.ux_demSalesEstimatorNominalForecast = new System.Windows.Forms.RadioButton();
            this.ux_demSalesEstimatorPriceElasticity = new System.Windows.Forms.CheckBox();
            this.ux_demDfsModelGroupBox = new System.Windows.Forms.GroupBox();
            this.ux_demDfsModelPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demDfsModelFixedShares = new System.Windows.Forms.RadioButton();
            this.ux_demDfsModelUserDefined = new System.Windows.Forms.RadioButton();
            this.ux_demDfsModelExperimental = new System.Windows.Forms.RadioButton();
            this.ux_demDfsModelPriceElasticity = new System.Windows.Forms.CheckBox();
            this.ux_demIterationsPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demIterationsLabel = new System.Windows.Forms.Label();
            this.ux_demIterations = new System.Windows.Forms.TextBox();
            this.ux_demAdvancedSettingsGroupBox = new System.Windows.Forms.GroupBox();
            this.ux_demAdvancedSettingsPanel = new System.Windows.Forms.FlowLayoutPanel();
            this.ux_demDisableDynamicVmtModel = new System.Windows.Forms.CheckBox();
            this.ux_toolTip = new System.Windows.Forms.ToolTip(this.components);
            ux_analysisStartYearLabel = new System.Windows.Forms.Label();
            ux_alternativeStartYearLabel = new System.Windows.Forms.Label();
            ux_techStartYearLabel = new System.Windows.Forms.Label();
            ux_analysisEndYearLabel = new System.Windows.Forms.Label();
            ux_dsrNumberIterationsLabel = new System.Windows.Forms.Label();
            ux_dsrPriceElasticityMultiplierLabel = new System.Windows.Forms.Label();
            ux_commercialShareLDLabel = new System.Windows.Forms.Label();
            ux_assumedPaybackMilesLabel = new System.Windows.Forms.Label();
            ux_analysisStartYearPanel = new System.Windows.Forms.FlowLayoutPanel();
            ux_alternativeStartYearPanel = new System.Windows.Forms.FlowLayoutPanel();
            ux_techStartYearPanel = new System.Windows.Forms.FlowLayoutPanel();
            ux_analysisEndYearPanel = new System.Windows.Forms.FlowLayoutPanel();
            ux_assumedPaybackMilesPanel = new System.Windows.Forms.FlowLayoutPanel();
            ux_scaleConsumerBenefitsPanel = new System.Windows.Forms.FlowLayoutPanel();
            ux_demSalesEstimatorPriceElasticityMultiplierLabel = new System.Windows.Forms.Label();
            ux_demDfsModelPriceCoefficientLabel = new System.Windows.Forms.Label();
            ux_analysisStartYearPanel.SuspendLayout();
            ux_alternativeStartYearPanel.SuspendLayout();
            ux_techStartYearPanel.SuspendLayout();
            ux_analysisEndYearPanel.SuspendLayout();
            ux_assumedPaybackMilesPanel.SuspendLayout();
            ux_scaleConsumerBenefitsPanel.SuspendLayout();
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.SuspendLayout();
            this.ux_demDfsModelPriceCoefficientPanel.SuspendLayout();
            this.ux_fatalityRateEstimatesGroupBox.SuspendLayout();
            this.ux_fatalityRateEstimatesPanel.SuspendLayout();
            this.ux_complianceProgramGroupBox.SuspendLayout();
            this.ux_complianceProgramPanel.SuspendLayout();
            this.ux_settingsProfilePanel.SuspendLayout();
            this.ux_complianceSettingsPanel.SuspendLayout();
            this.ux_commercialOpportunityCostSettingsPanel.SuspendLayout();
            this.us_runtimeSettingsPanel.SuspendLayout();
            this.ux_demSettings.SuspendLayout();
            this.ux_demSalesEstimatorGroupBox.SuspendLayout();
            this.ux_demSalesEstimatorPanel.SuspendLayout();
            this.ux_demDfsModelGroupBox.SuspendLayout();
            this.ux_demDfsModelPanel.SuspendLayout();
            this.ux_demIterationsPanel.SuspendLayout();
            this.ux_demAdvancedSettingsGroupBox.SuspendLayout();
            this.ux_demAdvancedSettingsPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // ux_analysisStartYearLabel
            // 
            ux_analysisStartYearLabel.AutoSize = true;
            ux_analysisStartYearLabel.Location = new System.Drawing.Point(8, 2);
            ux_analysisStartYearLabel.Margin = new System.Windows.Forms.Padding(8, 2, 0, 0);
            ux_analysisStartYearLabel.Name = "ux_analysisStartYearLabel";
            ux_analysisStartYearLabel.Size = new System.Drawing.Size(344, 25);
            ux_analysisStartYearLabel.TabIndex = 1;
            ux_analysisStartYearLabel.Text = "Begin compliance modeling starting in:";
            // 
            // ux_alternativeStartYearLabel
            // 
            ux_alternativeStartYearLabel.AutoSize = true;
            ux_alternativeStartYearLabel.Location = new System.Drawing.Point(8, 2);
            ux_alternativeStartYearLabel.Margin = new System.Windows.Forms.Padding(8, 2, 0, 0);
            ux_alternativeStartYearLabel.Name = "ux_alternativeStartYearLabel";
            ux_alternativeStartYearLabel.Size = new System.Drawing.Size(337, 25);
            ux_alternativeStartYearLabel.TabIndex = 3;
            ux_alternativeStartYearLabel.Text = "Begin alternative scenario analysis in:";
            // 
            // ux_techStartYearLabel
            // 
            ux_techStartYearLabel.AutoSize = true;
            ux_techStartYearLabel.Location = new System.Drawing.Point(8, 2);
            ux_techStartYearLabel.Margin = new System.Windows.Forms.Padding(8, 2, 0, 0);
            ux_techStartYearLabel.Name = "ux_techStartYearLabel";
            ux_techStartYearLabel.Size = new System.Drawing.Size(354, 25);
            ux_techStartYearLabel.TabIndex = 5;
            ux_techStartYearLabel.Text = "Begin technology application starting in:";
            // 
            // ux_analysisEndYearLabel
            // 
            ux_analysisEndYearLabel.AutoSize = true;
            ux_analysisEndYearLabel.Location = new System.Drawing.Point(8, 2);
            ux_analysisEndYearLabel.Margin = new System.Windows.Forms.Padding(8, 2, 0, 0);
            ux_analysisEndYearLabel.Name = "ux_analysisEndYearLabel";
            ux_analysisEndYearLabel.Size = new System.Drawing.Size(322, 25);
            ux_analysisEndYearLabel.TabIndex = 7;
            ux_analysisEndYearLabel.Text = "Evaluate compliance modeling until:";
            // 
            // ux_dsrNumberIterationsLabel
            // 
            ux_dsrNumberIterationsLabel.AutoSize = true;
            ux_dsrNumberIterationsLabel.Location = new System.Drawing.Point(16, 104);
            ux_dsrNumberIterationsLabel.Name = "ux_dsrNumberIterationsLabel";
            ux_dsrNumberIterationsLabel.Size = new System.Drawing.Size(226, 16);
            ux_dsrNumberIterationsLabel.TabIndex = 1;
            ux_dsrNumberIterationsLabel.Text = "Number of Iterations for Sales Model:";
            // 
            // ux_dsrPriceElasticityMultiplierLabel
            // 
            ux_dsrPriceElasticityMultiplierLabel.AutoSize = true;
            ux_dsrPriceElasticityMultiplierLabel.Location = new System.Drawing.Point(16, 128);
            ux_dsrPriceElasticityMultiplierLabel.Name = "ux_dsrPriceElasticityMultiplierLabel";
            ux_dsrPriceElasticityMultiplierLabel.Size = new System.Drawing.Size(153, 16);
            ux_dsrPriceElasticityMultiplierLabel.TabIndex = 2;
            ux_dsrPriceElasticityMultiplierLabel.Text = "Price Elasticity Multiplier:";
            // 
            // ux_commercialShareLDLabel
            // 
            ux_commercialShareLDLabel.AutoSize = true;
            ux_commercialShareLDLabel.Location = new System.Drawing.Point(8, 2);
            ux_commercialShareLDLabel.Margin = new System.Windows.Forms.Padding(8, 2, 0, 0);
            ux_commercialShareLDLabel.Name = "ux_commercialShareLDLabel";
            ux_commercialShareLDLabel.Size = new System.Drawing.Size(291, 25);
            ux_commercialShareLDLabel.TabIndex = 1;
            ux_commercialShareLDLabel.Text = "Commercial share of ownership:";
            // 
            // ux_assumedPaybackMilesLabel
            // 
            ux_assumedPaybackMilesLabel.AutoSize = true;
            ux_assumedPaybackMilesLabel.Location = new System.Drawing.Point(8, 1);
            ux_assumedPaybackMilesLabel.Margin = new System.Windows.Forms.Padding(8, 1, 0, 0);
            ux_assumedPaybackMilesLabel.Name = "ux_assumedPaybackMilesLabel";
            ux_assumedPaybackMilesLabel.Size = new System.Drawing.Size(233, 25);
            ux_assumedPaybackMilesLabel.TabIndex = 0;
            ux_assumedPaybackMilesLabel.Text = "Assumed Payback Miles:";
            // 
            // ux_analysisStartYearPanel
            // 
            ux_analysisStartYearPanel.AutoSize = true;
            ux_analysisStartYearPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            ux_analysisStartYearPanel.Controls.Add(ux_analysisStartYearLabel);
            ux_analysisStartYearPanel.Controls.Add(this.ux_analysisStartYear);
            ux_analysisStartYearPanel.Location = new System.Drawing.Point(8, 78);
            ux_analysisStartYearPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            ux_analysisStartYearPanel.Name = "ux_analysisStartYearPanel";
            ux_analysisStartYearPanel.Size = new System.Drawing.Size(466, 30);
            ux_analysisStartYearPanel.TabIndex = 5;
            // 
            // ux_analysisStartYear
            // 
            this.ux_analysisStartYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_analysisStartYear.Location = new System.Drawing.Point(366, 0);
            this.ux_analysisStartYear.Margin = new System.Windows.Forms.Padding(14, 0, 0, 0);
            this.ux_analysisStartYear.MaxLength = 4;
            this.ux_analysisStartYear.Name = "ux_analysisStartYear";
            this.ux_analysisStartYear.Size = new System.Drawing.Size(100, 30);
            this.ux_analysisStartYear.TabIndex = 2;
            this.ux_analysisStartYear.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_alternativeStartYearPanel
            // 
            ux_alternativeStartYearPanel.AutoSize = true;
            ux_alternativeStartYearPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            ux_alternativeStartYearPanel.Controls.Add(ux_alternativeStartYearLabel);
            ux_alternativeStartYearPanel.Controls.Add(this.ux_alternativeStartYear);
            ux_alternativeStartYearPanel.Location = new System.Drawing.Point(8, 112);
            ux_alternativeStartYearPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            ux_alternativeStartYearPanel.Name = "ux_alternativeStartYearPanel";
            ux_alternativeStartYearPanel.Size = new System.Drawing.Size(464, 30);
            ux_alternativeStartYearPanel.TabIndex = 6;
            // 
            // ux_alternativeStartYear
            // 
            this.ux_alternativeStartYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_alternativeStartYear.Location = new System.Drawing.Point(364, 0);
            this.ux_alternativeStartYear.Margin = new System.Windows.Forms.Padding(19, 0, 0, 0);
            this.ux_alternativeStartYear.MaxLength = 4;
            this.ux_alternativeStartYear.Name = "ux_alternativeStartYear";
            this.ux_alternativeStartYear.Size = new System.Drawing.Size(100, 30);
            this.ux_alternativeStartYear.TabIndex = 4;
            this.ux_alternativeStartYear.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_techStartYearPanel
            // 
            ux_techStartYearPanel.AutoSize = true;
            ux_techStartYearPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            ux_techStartYearPanel.Controls.Add(ux_techStartYearLabel);
            ux_techStartYearPanel.Controls.Add(this.ux_techStartYear);
            ux_techStartYearPanel.Location = new System.Drawing.Point(8, 146);
            ux_techStartYearPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            ux_techStartYearPanel.Name = "ux_techStartYearPanel";
            ux_techStartYearPanel.Size = new System.Drawing.Size(470, 30);
            ux_techStartYearPanel.TabIndex = 7;
            // 
            // ux_techStartYear
            // 
            this.ux_techStartYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_techStartYear.Location = new System.Drawing.Point(370, 0);
            this.ux_techStartYear.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_techStartYear.MaxLength = 4;
            this.ux_techStartYear.Name = "ux_techStartYear";
            this.ux_techStartYear.Size = new System.Drawing.Size(100, 30);
            this.ux_techStartYear.TabIndex = 6;
            this.ux_techStartYear.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_analysisEndYearPanel
            // 
            ux_analysisEndYearPanel.AutoSize = true;
            ux_analysisEndYearPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            ux_analysisEndYearPanel.Controls.Add(ux_analysisEndYearLabel);
            ux_analysisEndYearPanel.Controls.Add(this.ux_analysisEndYear);
            ux_analysisEndYearPanel.Location = new System.Drawing.Point(8, 180);
            ux_analysisEndYearPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            ux_analysisEndYearPanel.Name = "ux_analysisEndYearPanel";
            ux_analysisEndYearPanel.Size = new System.Drawing.Size(459, 30);
            ux_analysisEndYearPanel.TabIndex = 8;
            // 
            // ux_analysisEndYear
            // 
            this.ux_analysisEndYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_analysisEndYear.Location = new System.Drawing.Point(359, 0);
            this.ux_analysisEndYear.Margin = new System.Windows.Forms.Padding(29, 0, 0, 0);
            this.ux_analysisEndYear.MaxLength = 4;
            this.ux_analysisEndYear.Name = "ux_analysisEndYear";
            this.ux_analysisEndYear.Size = new System.Drawing.Size(100, 30);
            this.ux_analysisEndYear.TabIndex = 8;
            this.ux_analysisEndYear.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_assumedPaybackMilesPanel
            // 
            ux_assumedPaybackMilesPanel.AutoSize = true;
            ux_assumedPaybackMilesPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            ux_assumedPaybackMilesPanel.Controls.Add(ux_assumedPaybackMilesLabel);
            ux_assumedPaybackMilesPanel.Controls.Add(this.ux_assumedPaybackMiles);
            ux_assumedPaybackMilesPanel.Location = new System.Drawing.Point(8, 313);
            ux_assumedPaybackMilesPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            ux_assumedPaybackMilesPanel.Name = "ux_assumedPaybackMilesPanel";
            ux_assumedPaybackMilesPanel.Size = new System.Drawing.Size(349, 30);
            ux_assumedPaybackMilesPanel.TabIndex = 9;
            // 
            // ux_assumedPaybackMiles
            // 
            this.ux_assumedPaybackMiles.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_assumedPaybackMiles.Location = new System.Drawing.Point(249, 0);
            this.ux_assumedPaybackMiles.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_assumedPaybackMiles.MaxLength = 7;
            this.ux_assumedPaybackMiles.Name = "ux_assumedPaybackMiles";
            this.ux_assumedPaybackMiles.Size = new System.Drawing.Size(100, 30);
            this.ux_assumedPaybackMiles.TabIndex = 1;
            this.ux_assumedPaybackMiles.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_scaleConsumerBenefitsPanel
            // 
            ux_scaleConsumerBenefitsPanel.AutoSize = true;
            ux_scaleConsumerBenefitsPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            ux_scaleConsumerBenefitsPanel.Controls.Add(this.ux_scaleConsumerBenefits);
            ux_scaleConsumerBenefitsPanel.Controls.Add(this.ux_consumerBenefitsScale);
            ux_scaleConsumerBenefitsPanel.Location = new System.Drawing.Point(8, 347);
            ux_scaleConsumerBenefitsPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            ux_scaleConsumerBenefitsPanel.Name = "ux_scaleConsumerBenefitsPanel";
            ux_scaleConsumerBenefitsPanel.Size = new System.Drawing.Size(414, 30);
            ux_scaleConsumerBenefitsPanel.TabIndex = 9;
            // 
            // ux_scaleConsumerBenefits
            // 
            this.ux_scaleConsumerBenefits.AutoSize = true;
            this.ux_scaleConsumerBenefits.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_scaleConsumerBenefits.Location = new System.Drawing.Point(8, 1);
            this.ux_scaleConsumerBenefits.Margin = new System.Windows.Forms.Padding(8, 1, 0, 0);
            this.ux_scaleConsumerBenefits.Name = "ux_scaleConsumerBenefits";
            this.ux_scaleConsumerBenefits.Size = new System.Drawing.Size(298, 29);
            this.ux_scaleConsumerBenefits.TabIndex = 1;
            this.ux_scaleConsumerBenefits.Text = "Scale Consumer Benefits (%):";
            // 
            // ux_consumerBenefitsScale
            // 
            this.ux_consumerBenefitsScale.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_consumerBenefitsScale.Enabled = false;
            this.ux_consumerBenefitsScale.Location = new System.Drawing.Point(314, 0);
            this.ux_consumerBenefitsScale.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_consumerBenefitsScale.MaxLength = 3;
            this.ux_consumerBenefitsScale.Name = "ux_consumerBenefitsScale";
            this.ux_consumerBenefitsScale.Size = new System.Drawing.Size(100, 30);
            this.ux_consumerBenefitsScale.TabIndex = 2;
            this.ux_consumerBenefitsScale.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_demSalesEstimatorPriceElasticityMultiplierPanel
            // 
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.AutoSize = true;
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Controls.Add(ux_demSalesEstimatorPriceElasticityMultiplierLabel);
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Controls.Add(this.ux_demSalesEstimatorPriceElasticityMultiplier);
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Enabled = false;
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Location = new System.Drawing.Point(16, 136);
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Name = "ux_demSalesEstimatorPriceElasticityMultiplierPanel";
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Size = new System.Drawing.Size(362, 30);
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.TabIndex = 4;
            // 
            // ux_demSalesEstimatorPriceElasticityMultiplierLabel
            // 
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.AutoSize = true;
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.Location = new System.Drawing.Point(32, 1);
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.Margin = new System.Windows.Forms.Padding(32, 1, 0, 1);
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.Name = "ux_demSalesEstimatorPriceElasticityMultiplierLabel";
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.Size = new System.Drawing.Size(222, 25);
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.TabIndex = 0;
            ux_demSalesEstimatorPriceElasticityMultiplierLabel.Text = "Price elasticity multiplier:";
            // 
            // ux_demSalesEstimatorPriceElasticityMultiplier
            // 
            this.ux_demSalesEstimatorPriceElasticityMultiplier.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.SetFlowBreak(this.ux_demSalesEstimatorPriceElasticityMultiplier, true);
            this.ux_demSalesEstimatorPriceElasticityMultiplier.Location = new System.Drawing.Point(262, 0);
            this.ux_demSalesEstimatorPriceElasticityMultiplier.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_demSalesEstimatorPriceElasticityMultiplier.MaxLength = 5;
            this.ux_demSalesEstimatorPriceElasticityMultiplier.Name = "ux_demSalesEstimatorPriceElasticityMultiplier";
            this.ux_demSalesEstimatorPriceElasticityMultiplier.Size = new System.Drawing.Size(100, 30);
            this.ux_demSalesEstimatorPriceElasticityMultiplier.TabIndex = 1;
            this.ux_demSalesEstimatorPriceElasticityMultiplier.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_demDfsModelPriceCoefficientPanel
            // 
            this.ux_demDfsModelPriceCoefficientPanel.AutoSize = true;
            this.ux_demDfsModelPriceCoefficientPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demDfsModelPriceCoefficientPanel.Controls.Add(ux_demDfsModelPriceCoefficientLabel);
            this.ux_demDfsModelPriceCoefficientPanel.Controls.Add(this.ux_demDfsModelPriceCoefficient);
            this.ux_demDfsModelPriceCoefficientPanel.Enabled = false;
            this.ux_demDfsModelPriceCoefficientPanel.Location = new System.Drawing.Point(16, 136);
            this.ux_demDfsModelPriceCoefficientPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demDfsModelPriceCoefficientPanel.Name = "ux_demDfsModelPriceCoefficientPanel";
            this.ux_demDfsModelPriceCoefficientPanel.Size = new System.Drawing.Size(294, 30);
            this.ux_demDfsModelPriceCoefficientPanel.TabIndex = 4;
            // 
            // ux_demDfsModelPriceCoefficientLabel
            // 
            ux_demDfsModelPriceCoefficientLabel.AutoSize = true;
            ux_demDfsModelPriceCoefficientLabel.Location = new System.Drawing.Point(32, 1);
            ux_demDfsModelPriceCoefficientLabel.Margin = new System.Windows.Forms.Padding(32, 1, 0, 1);
            ux_demDfsModelPriceCoefficientLabel.Name = "ux_demDfsModelPriceCoefficientLabel";
            ux_demDfsModelPriceCoefficientLabel.Size = new System.Drawing.Size(154, 25);
            ux_demDfsModelPriceCoefficientLabel.TabIndex = 0;
            ux_demDfsModelPriceCoefficientLabel.Text = "Price coefficient:";
            // 
            // ux_demDfsModelPriceCoefficient
            // 
            this.ux_demDfsModelPriceCoefficient.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_demDfsModelPriceCoefficientPanel.SetFlowBreak(this.ux_demDfsModelPriceCoefficient, true);
            this.ux_demDfsModelPriceCoefficient.Location = new System.Drawing.Point(194, 0);
            this.ux_demDfsModelPriceCoefficient.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_demDfsModelPriceCoefficient.MaxLength = 10;
            this.ux_demDfsModelPriceCoefficient.Name = "ux_demDfsModelPriceCoefficient";
            this.ux_demDfsModelPriceCoefficient.Size = new System.Drawing.Size(100, 30);
            this.ux_demDfsModelPriceCoefficient.TabIndex = 1;
            this.ux_demDfsModelPriceCoefficient.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_fatalityRateEstimatesGroupBox
            // 
            this.ux_fatalityRateEstimatesGroupBox.AutoSize = true;
            this.ux_fatalityRateEstimatesGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_fatalityRateEstimatesGroupBox.Controls.Add(this.ux_fatalityRateEstimatesPanel);
            this.ux_fatalityRateEstimatesGroupBox.Location = new System.Drawing.Point(8, 481);
            this.ux_fatalityRateEstimatesGroupBox.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            this.ux_fatalityRateEstimatesGroupBox.Name = "ux_fatalityRateEstimatesGroupBox";
            this.ux_fatalityRateEstimatesGroupBox.Padding = new System.Windows.Forms.Padding(2, 2, 8, 8);
            this.ux_fatalityRateEstimatesGroupBox.Size = new System.Drawing.Size(321, 66);
            this.ux_fatalityRateEstimatesGroupBox.TabIndex = 6;
            this.ux_fatalityRateEstimatesGroupBox.TabStop = false;
            this.ux_fatalityRateEstimatesGroupBox.Text = "Fatality Rate Estimates";
            // 
            // ux_fatalityRateEstimatesPanel
            // 
            this.ux_fatalityRateEstimatesPanel.AutoSize = true;
            this.ux_fatalityRateEstimatesPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_fatalityRateEstimatesPanel.Controls.Add(this.ux_fatalityRateLow);
            this.ux_fatalityRateEstimatesPanel.Controls.Add(this.ux_fatalityRateAverage);
            this.ux_fatalityRateEstimatesPanel.Controls.Add(this.ux_fatalityRateHigh);
            this.ux_fatalityRateEstimatesPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ux_fatalityRateEstimatesPanel.Location = new System.Drawing.Point(2, 25);
            this.ux_fatalityRateEstimatesPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_fatalityRateEstimatesPanel.Name = "ux_fatalityRateEstimatesPanel";
            this.ux_fatalityRateEstimatesPanel.Padding = new System.Windows.Forms.Padding(16, 4, 0, 0);
            this.ux_fatalityRateEstimatesPanel.Size = new System.Drawing.Size(311, 33);
            this.ux_fatalityRateEstimatesPanel.TabIndex = 4;
            // 
            // ux_fatalityRateLow
            // 
            this.ux_fatalityRateLow.AutoSize = true;
            this.ux_fatalityRateLow.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_fatalityRateLow.Location = new System.Drawing.Point(24, 4);
            this.ux_fatalityRateLow.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
            this.ux_fatalityRateLow.Name = "ux_fatalityRateLow";
            this.ux_fatalityRateLow.Size = new System.Drawing.Size(71, 29);
            this.ux_fatalityRateLow.TabIndex = 0;
            this.ux_fatalityRateLow.Text = "Low";
            // 
            // ux_fatalityRateAverage
            // 
            this.ux_fatalityRateAverage.AutoSize = true;
            this.ux_fatalityRateAverage.Checked = true;
            this.ux_fatalityRateAverage.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_fatalityRateAverage.Location = new System.Drawing.Point(111, 4);
            this.ux_fatalityRateAverage.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
            this.ux_fatalityRateAverage.Name = "ux_fatalityRateAverage";
            this.ux_fatalityRateAverage.Size = new System.Drawing.Size(109, 29);
            this.ux_fatalityRateAverage.TabIndex = 1;
            this.ux_fatalityRateAverage.TabStop = true;
            this.ux_fatalityRateAverage.Text = "Average";
            // 
            // ux_fatalityRateHigh
            // 
            this.ux_fatalityRateHigh.AutoSize = true;
            this.ux_fatalityRateHigh.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_fatalityRateHigh.Location = new System.Drawing.Point(236, 4);
            this.ux_fatalityRateHigh.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_fatalityRateHigh.Name = "ux_fatalityRateHigh";
            this.ux_fatalityRateHigh.Size = new System.Drawing.Size(75, 29);
            this.ux_fatalityRateHigh.TabIndex = 2;
            this.ux_fatalityRateHigh.Text = "High";
            // 
            // ux_capOffCycleCosts
            // 
            this.ux_capOffCycleCosts.AutoSize = true;
            this.ux_capOffCycleCosts.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_capOffCycleCosts.Location = new System.Drawing.Point(16, 247);
            this.ux_capOffCycleCosts.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_capOffCycleCosts.Name = "ux_capOffCycleCosts";
            this.ux_capOffCycleCosts.Size = new System.Drawing.Size(245, 29);
            this.ux_capOffCycleCosts.TabIndex = 13;
            this.ux_capOffCycleCosts.Text = "Cap AC/Off-Cycle costs";
            // 
            // ux_calcCommercialOpportunityCost
            // 
            this.ux_calcCommercialOpportunityCost.AutoSize = true;
            this.ux_calcCommercialOpportunityCost.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_calcCommercialOpportunityCost.Location = new System.Drawing.Point(16, 414);
            this.ux_calcCommercialOpportunityCost.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_calcCommercialOpportunityCost.Name = "ux_calcCommercialOpportunityCost";
            this.ux_calcCommercialOpportunityCost.Padding = new System.Windows.Forms.Padding(0, 0, 0, 4);
            this.ux_calcCommercialOpportunityCost.Size = new System.Drawing.Size(459, 33);
            this.ux_calcCommercialOpportunityCost.TabIndex = 4;
            this.ux_calcCommercialOpportunityCost.Text = "Calculate Commercial Operator Opportunity Cost";
            // 
            // ux_commercialShareLD
            // 
            this.ux_commercialShareLD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_commercialShareLD.Location = new System.Drawing.Point(307, 0);
            this.ux_commercialShareLD.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_commercialShareLD.MaxLength = 4;
            this.ux_commercialShareLD.Name = "ux_commercialShareLD";
            this.ux_commercialShareLD.Size = new System.Drawing.Size(100, 30);
            this.ux_commercialShareLD.TabIndex = 2;
            this.ux_commercialShareLD.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_calcImplicitOpportunityCost
            // 
            this.ux_calcImplicitOpportunityCost.AutoSize = true;
            this.ux_calcImplicitOpportunityCost.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_calcImplicitOpportunityCost.Location = new System.Drawing.Point(16, 381);
            this.ux_calcImplicitOpportunityCost.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_calcImplicitOpportunityCost.Name = "ux_calcImplicitOpportunityCost";
            this.ux_calcImplicitOpportunityCost.Size = new System.Drawing.Size(332, 29);
            this.ux_calcImplicitOpportunityCost.TabIndex = 3;
            this.ux_calcImplicitOpportunityCost.Text = "Calculate Implicit Opportunity Cost";
            // 
            // ux_allowCreditTrading
            // 
            this.ux_allowCreditTrading.AutoSize = true;
            this.ux_allowCreditTrading.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_allowCreditTrading.Location = new System.Drawing.Point(16, 214);
            this.ux_allowCreditTrading.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_allowCreditTrading.Name = "ux_allowCreditTrading";
            this.ux_allowCreditTrading.Size = new System.Drawing.Size(197, 29);
            this.ux_allowCreditTrading.TabIndex = 12;
            this.ux_allowCreditTrading.Text = "Allow credit trading";
            // 
            // ux_complianceProgramGroupBox
            // 
            this.ux_complianceProgramGroupBox.AutoSize = true;
            this.ux_complianceProgramGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_complianceProgramGroupBox.Controls.Add(this.ux_complianceProgramPanel);
            this.ux_complianceProgramGroupBox.Location = new System.Drawing.Point(8, 8);
            this.ux_complianceProgramGroupBox.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            this.ux_complianceProgramGroupBox.Name = "ux_complianceProgramGroupBox";
            this.ux_complianceProgramGroupBox.Padding = new System.Windows.Forms.Padding(2, 2, 8, 8);
            this.ux_complianceProgramGroupBox.Size = new System.Drawing.Size(314, 66);
            this.ux_complianceProgramGroupBox.TabIndex = 0;
            this.ux_complianceProgramGroupBox.TabStop = false;
            this.ux_complianceProgramGroupBox.Text = "Compliance Program to Enforce";
            // 
            // ux_complianceProgramPanel
            // 
            this.ux_complianceProgramPanel.AutoSize = true;
            this.ux_complianceProgramPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_complianceProgramPanel.Controls.Add(this.ux_complianceProgramCAFE);
            this.ux_complianceProgramPanel.Controls.Add(this.ux_complianceProgramCO2);
            this.ux_complianceProgramPanel.Controls.Add(this.ux_complianceProgramBoth);
            this.ux_complianceProgramPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ux_complianceProgramPanel.Location = new System.Drawing.Point(2, 25);
            this.ux_complianceProgramPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_complianceProgramPanel.Name = "ux_complianceProgramPanel";
            this.ux_complianceProgramPanel.Padding = new System.Windows.Forms.Padding(16, 4, 0, 0);
            this.ux_complianceProgramPanel.Size = new System.Drawing.Size(304, 33);
            this.ux_complianceProgramPanel.TabIndex = 0;
            // 
            // ux_complianceProgramCAFE
            // 
            this.ux_complianceProgramCAFE.AutoSize = true;
            this.ux_complianceProgramCAFE.Checked = true;
            this.ux_complianceProgramCAFE.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_complianceProgramCAFE.Location = new System.Drawing.Point(24, 4);
            this.ux_complianceProgramCAFE.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
            this.ux_complianceProgramCAFE.Name = "ux_complianceProgramCAFE";
            this.ux_complianceProgramCAFE.Size = new System.Drawing.Size(89, 29);
            this.ux_complianceProgramCAFE.TabIndex = 0;
            this.ux_complianceProgramCAFE.TabStop = true;
            this.ux_complianceProgramCAFE.Text = "CAFE";
            this.ux_complianceProgramCAFE.UseVisualStyleBackColor = true;
            // 
            // ux_complianceProgramCO2
            // 
            this.ux_complianceProgramCO2.AutoSize = true;
            this.ux_complianceProgramCO2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_complianceProgramCO2.Location = new System.Drawing.Point(129, 4);
            this.ux_complianceProgramCO2.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
            this.ux_complianceProgramCO2.Name = "ux_complianceProgramCO2";
            this.ux_complianceProgramCO2.Size = new System.Drawing.Size(84, 29);
            this.ux_complianceProgramCO2.TabIndex = 1;
            this.ux_complianceProgramCO2.Text = "CO-2";
            this.ux_complianceProgramCO2.UseVisualStyleBackColor = true;
            // 
            // ux_complianceProgramBoth
            // 
            this.ux_complianceProgramBoth.AutoSize = true;
            this.ux_complianceProgramBoth.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_complianceProgramBoth.Location = new System.Drawing.Point(229, 4);
            this.ux_complianceProgramBoth.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
            this.ux_complianceProgramBoth.Name = "ux_complianceProgramBoth";
            this.ux_complianceProgramBoth.Size = new System.Drawing.Size(75, 29);
            this.ux_complianceProgramBoth.TabIndex = 2;
            this.ux_complianceProgramBoth.Text = "Both";
            this.ux_complianceProgramBoth.UseVisualStyleBackColor = true;
            // 
            // ux_settingsProfileCustom
            // 
            this.ux_settingsProfileCustom.AutoSize = true;
            this.ux_settingsProfileCustom.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_settingsProfileCustom.Location = new System.Drawing.Point(331, 37);
            this.ux_settingsProfileCustom.Margin = new System.Windows.Forms.Padding(0, 0, 8, 0);
            this.ux_settingsProfileCustom.Name = "ux_settingsProfileCustom";
            this.ux_settingsProfileCustom.Size = new System.Drawing.Size(103, 29);
            this.ux_settingsProfileCustom.TabIndex = 4;
            this.ux_settingsProfileCustom.Text = "Custom";
            this.ux_settingsProfileCustom.UseVisualStyleBackColor = true;
            // 
            // ux_settingsProfileLdEis
            // 
            this.ux_settingsProfileLdEis.AutoSize = true;
            this.ux_settingsProfileLdEis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_settingsProfileLdEis.Location = new System.Drawing.Point(148, 37);
            this.ux_settingsProfileLdEis.Margin = new System.Windows.Forms.Padding(0, 0, 8, 0);
            this.ux_settingsProfileLdEis.Name = "ux_settingsProfileLdEis";
            this.ux_settingsProfileLdEis.Size = new System.Drawing.Size(175, 29);
            this.ux_settingsProfileLdEis.TabIndex = 2;
            this.ux_settingsProfileLdEis.Text = "Light-Duty (EIS)";
            this.ux_settingsProfileLdEis.UseVisualStyleBackColor = true;
            // 
            // ux_settingsProfileLightDuty
            // 
            this.ux_settingsProfileLightDuty.AutoSize = true;
            this.ux_settingsProfileLightDuty.Checked = true;
            this.ux_settingsProfileLightDuty.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_settingsProfileLightDuty.Location = new System.Drawing.Point(16, 37);
            this.ux_settingsProfileLightDuty.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
            this.ux_settingsProfileLightDuty.Name = "ux_settingsProfileLightDuty";
            this.ux_settingsProfileLightDuty.Size = new System.Drawing.Size(124, 29);
            this.ux_settingsProfileLightDuty.TabIndex = 1;
            this.ux_settingsProfileLightDuty.TabStop = true;
            this.ux_settingsProfileLightDuty.Text = "Light-Duty";
            this.ux_settingsProfileLightDuty.UseVisualStyleBackColor = true;
            // 
            // ux_settingsProfilePanel
            // 
            this.ux_settingsProfilePanel.AutoSize = true;
            this.ux_settingsProfilePanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_settingsProfilePanel.Controls.Add(this.ux_settingsProfileLabel);
            this.ux_settingsProfilePanel.Controls.Add(this.ux_settingsProfileLightDuty);
            this.ux_settingsProfilePanel.Controls.Add(this.ux_settingsProfileLdEis);
            this.ux_settingsProfilePanel.Controls.Add(this.ux_settingsProfileCustom);
            this.ux_settingsProfilePanel.Dock = System.Windows.Forms.DockStyle.Top;
            this.ux_settingsProfilePanel.Location = new System.Drawing.Point(0, 0);
            this.ux_settingsProfilePanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_settingsProfilePanel.Name = "ux_settingsProfilePanel";
            this.ux_settingsProfilePanel.Padding = new System.Windows.Forms.Padding(8);
            this.ux_settingsProfilePanel.Size = new System.Drawing.Size(806, 74);
            this.ux_settingsProfilePanel.TabIndex = 0;
            // 
            // ux_settingsProfileLabel
            // 
            this.ux_settingsProfileLabel.AutoSize = true;
            this.ux_settingsProfilePanel.SetFlowBreak(this.ux_settingsProfileLabel, true);
            this.ux_settingsProfileLabel.Location = new System.Drawing.Point(8, 8);
            this.ux_settingsProfileLabel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_settingsProfileLabel.Name = "ux_settingsProfileLabel";
            this.ux_settingsProfileLabel.Size = new System.Drawing.Size(216, 25);
            this.ux_settingsProfileLabel.TabIndex = 0;
            this.ux_settingsProfileLabel.Text = "Select Settings \"Profile\"";
            // 
            // ux_complianceSettingsPanel
            // 
            this.ux_complianceSettingsPanel.AutoSize = true;
            this.ux_complianceSettingsPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_complianceProgramGroupBox);
            this.ux_complianceSettingsPanel.Controls.Add(ux_analysisStartYearPanel);
            this.ux_complianceSettingsPanel.Controls.Add(ux_alternativeStartYearPanel);
            this.ux_complianceSettingsPanel.Controls.Add(ux_techStartYearPanel);
            this.ux_complianceSettingsPanel.Controls.Add(ux_analysisEndYearPanel);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_allowCreditTrading);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_capOffCycleCosts);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_excludeBevFcvFromAnalysis);
            this.ux_complianceSettingsPanel.Controls.Add(ux_assumedPaybackMilesPanel);
            this.ux_complianceSettingsPanel.Controls.Add(ux_scaleConsumerBenefitsPanel);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_calcImplicitOpportunityCost);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_calcCommercialOpportunityCost);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_commercialOpportunityCostSettingsPanel);
            this.ux_complianceSettingsPanel.Controls.Add(this.ux_fatalityRateEstimatesGroupBox);
            this.ux_complianceSettingsPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.ux_complianceSettingsPanel.Location = new System.Drawing.Point(0, 0);
            this.ux_complianceSettingsPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_complianceSettingsPanel.Name = "ux_complianceSettingsPanel";
            this.ux_complianceSettingsPanel.Padding = new System.Windows.Forms.Padding(8);
            this.ux_complianceSettingsPanel.Size = new System.Drawing.Size(486, 559);
            this.ux_complianceSettingsPanel.TabIndex = 1;
            // 
            // ux_excludeBevFcvFromAnalysis
            // 
            this.ux_excludeBevFcvFromAnalysis.AutoSize = true;
            this.ux_excludeBevFcvFromAnalysis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_excludeBevFcvFromAnalysis.Location = new System.Drawing.Point(16, 280);
            this.ux_excludeBevFcvFromAnalysis.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_excludeBevFcvFromAnalysis.Name = "ux_excludeBevFcvFromAnalysis";
            this.ux_excludeBevFcvFromAnalysis.Size = new System.Drawing.Size(315, 29);
            this.ux_excludeBevFcvFromAnalysis.TabIndex = 22;
            this.ux_excludeBevFcvFromAnalysis.Text = "Exclude BEV/FCV from analysis";
            // 
            // ux_commercialOpportunityCostSettingsPanel
            // 
            this.ux_commercialOpportunityCostSettingsPanel.AutoSize = true;
            this.ux_commercialOpportunityCostSettingsPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_commercialOpportunityCostSettingsPanel.Controls.Add(ux_commercialShareLDLabel);
            this.ux_commercialOpportunityCostSettingsPanel.Controls.Add(this.ux_commercialShareLD);
            this.ux_commercialOpportunityCostSettingsPanel.Enabled = false;
            this.ux_commercialOpportunityCostSettingsPanel.Location = new System.Drawing.Point(32, 447);
            this.ux_commercialOpportunityCostSettingsPanel.Margin = new System.Windows.Forms.Padding(24, 0, 0, 4);
            this.ux_commercialOpportunityCostSettingsPanel.Name = "ux_commercialOpportunityCostSettingsPanel";
            this.ux_commercialOpportunityCostSettingsPanel.Size = new System.Drawing.Size(407, 30);
            this.ux_commercialOpportunityCostSettingsPanel.TabIndex = 5;
            // 
            // us_runtimeSettingsPanel
            // 
            this.us_runtimeSettingsPanel.AutoScroll = true;
            this.us_runtimeSettingsPanel.Controls.Add(this.ux_complianceSettingsPanel);
            this.us_runtimeSettingsPanel.Controls.Add(this.ux_demSettings);
            this.us_runtimeSettingsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.us_runtimeSettingsPanel.Location = new System.Drawing.Point(0, 74);
            this.us_runtimeSettingsPanel.Margin = new System.Windows.Forms.Padding(0);
            this.us_runtimeSettingsPanel.Name = "us_runtimeSettingsPanel";
            this.us_runtimeSettingsPanel.Size = new System.Drawing.Size(806, 435);
            this.us_runtimeSettingsPanel.TabIndex = 3;
            // 
            // ux_demSettings
            // 
            this.ux_demSettings.AutoSize = true;
            this.ux_demSettings.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demSettings.Controls.Add(this.ux_enableDynamicEconomicModeling);
            this.ux_demSettings.Controls.Add(this.ux_demSalesEstimatorGroupBox);
            this.ux_demSettings.Controls.Add(this.ux_demDfsModelGroupBox);
            this.ux_demSettings.Controls.Add(this.ux_demIterationsPanel);
            this.ux_demSettings.Controls.Add(this.ux_demAdvancedSettingsGroupBox);
            this.ux_demSettings.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.ux_demSettings.Location = new System.Drawing.Point(486, 0);
            this.ux_demSettings.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demSettings.Name = "ux_demSettings";
            this.ux_demSettings.Padding = new System.Windows.Forms.Padding(8);
            this.ux_demSettings.Size = new System.Drawing.Size(543, 563);
            this.ux_demSettings.TabIndex = 2;
            // 
            // ux_enableDynamicEconomicModeling
            // 
            this.ux_enableDynamicEconomicModeling.AutoSize = true;
            this.ux_enableDynamicEconomicModeling.Checked = true;
            this.ux_enableDynamicEconomicModeling.CheckState = System.Windows.Forms.CheckState.Checked;
            this.ux_enableDynamicEconomicModeling.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_enableDynamicEconomicModeling.Location = new System.Drawing.Point(16, 8);
            this.ux_enableDynamicEconomicModeling.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_enableDynamicEconomicModeling.Name = "ux_enableDynamicEconomicModeling";
            this.ux_enableDynamicEconomicModeling.Size = new System.Drawing.Size(352, 29);
            this.ux_enableDynamicEconomicModeling.TabIndex = 0;
            this.ux_enableDynamicEconomicModeling.Text = "Enable Dynamic Economic Modeling";
            // 
            // ux_demSalesEstimatorGroupBox
            // 
            this.ux_demSalesEstimatorGroupBox.AutoSize = true;
            this.ux_demSalesEstimatorGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demSalesEstimatorGroupBox.Controls.Add(this.ux_demSalesEstimatorPanel);
            this.ux_demSalesEstimatorGroupBox.Location = new System.Drawing.Point(8, 41);
            this.ux_demSalesEstimatorGroupBox.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            this.ux_demSalesEstimatorGroupBox.Name = "ux_demSalesEstimatorGroupBox";
            this.ux_demSalesEstimatorGroupBox.Padding = new System.Windows.Forms.Padding(2, 2, 8, 8);
            this.ux_demSalesEstimatorGroupBox.Size = new System.Drawing.Size(527, 199);
            this.ux_demSalesEstimatorGroupBox.TabIndex = 1;
            this.ux_demSalesEstimatorGroupBox.TabStop = false;
            this.ux_demSalesEstimatorGroupBox.Text = "Select Sales Estimator to use";
            // 
            // ux_demSalesEstimatorPanel
            // 
            this.ux_demSalesEstimatorPanel.AutoSize = true;
            this.ux_demSalesEstimatorPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demSalesEstimatorPanel.Controls.Add(this.ux_demSalesEstimatorFixedForecast);
            this.ux_demSalesEstimatorPanel.Controls.Add(this.ux_demSalesEstimatorUserDefined);
            this.ux_demSalesEstimatorPanel.Controls.Add(this.ux_demSalesEstimatorNominalForecast);
            this.ux_demSalesEstimatorPanel.Controls.Add(this.ux_demSalesEstimatorPriceElasticity);
            this.ux_demSalesEstimatorPanel.Controls.Add(this.ux_demSalesEstimatorPriceElasticityMultiplierPanel);
            this.ux_demSalesEstimatorPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ux_demSalesEstimatorPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.ux_demSalesEstimatorPanel.Location = new System.Drawing.Point(2, 25);
            this.ux_demSalesEstimatorPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demSalesEstimatorPanel.Name = "ux_demSalesEstimatorPanel";
            this.ux_demSalesEstimatorPanel.Padding = new System.Windows.Forms.Padding(16, 4, 0, 0);
            this.ux_demSalesEstimatorPanel.Size = new System.Drawing.Size(517, 166);
            this.ux_demSalesEstimatorPanel.TabIndex = 0;
            // 
            // ux_demSalesEstimatorFixedForecast
            // 
            this.ux_demSalesEstimatorFixedForecast.AutoSize = true;
            this.ux_demSalesEstimatorFixedForecast.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demSalesEstimatorFixedForecast.Location = new System.Drawing.Point(24, 4);
            this.ux_demSalesEstimatorFixedForecast.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demSalesEstimatorFixedForecast.Name = "ux_demSalesEstimatorFixedForecast";
            this.ux_demSalesEstimatorFixedForecast.Size = new System.Drawing.Size(164, 29);
            this.ux_demSalesEstimatorFixedForecast.TabIndex = 0;
            this.ux_demSalesEstimatorFixedForecast.Text = "Fixed Forecast";
            this.ux_demSalesEstimatorFixedForecast.UseVisualStyleBackColor = true;
            // 
            // ux_demSalesEstimatorUserDefined
            // 
            this.ux_demSalesEstimatorUserDefined.AutoSize = true;
            this.ux_demSalesEstimatorUserDefined.Checked = true;
            this.ux_demSalesEstimatorUserDefined.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demSalesEstimatorUserDefined.Location = new System.Drawing.Point(24, 37);
            this.ux_demSalesEstimatorUserDefined.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demSalesEstimatorUserDefined.Name = "ux_demSalesEstimatorUserDefined";
            this.ux_demSalesEstimatorUserDefined.Size = new System.Drawing.Size(229, 29);
            this.ux_demSalesEstimatorUserDefined.TabIndex = 1;
            this.ux_demSalesEstimatorUserDefined.TabStop = true;
            this.ux_demSalesEstimatorUserDefined.Text = "User Defined Forecast";
            this.ux_demSalesEstimatorUserDefined.UseVisualStyleBackColor = true;
            // 
            // ux_demSalesEstimatorNominalForecast
            // 
            this.ux_demSalesEstimatorNominalForecast.AutoSize = true;
            this.ux_demSalesEstimatorNominalForecast.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demSalesEstimatorNominalForecast.Location = new System.Drawing.Point(24, 70);
            this.ux_demSalesEstimatorNominalForecast.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demSalesEstimatorNominalForecast.Name = "ux_demSalesEstimatorNominalForecast";
            this.ux_demSalesEstimatorNominalForecast.Size = new System.Drawing.Size(187, 29);
            this.ux_demSalesEstimatorNominalForecast.TabIndex = 2;
            this.ux_demSalesEstimatorNominalForecast.Text = "Nominal Forecast";
            this.ux_demSalesEstimatorNominalForecast.UseVisualStyleBackColor = true;
            // 
            // ux_demSalesEstimatorPriceElasticity
            // 
            this.ux_demSalesEstimatorPriceElasticity.AutoSize = true;
            this.ux_demSalesEstimatorPriceElasticity.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demSalesEstimatorPriceElasticity.Location = new System.Drawing.Point(24, 103);
            this.ux_demSalesEstimatorPriceElasticity.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demSalesEstimatorPriceElasticity.Name = "ux_demSalesEstimatorPriceElasticity";
            this.ux_demSalesEstimatorPriceElasticity.Size = new System.Drawing.Size(493, 29);
            this.ux_demSalesEstimatorPriceElasticity.TabIndex = 3;
            this.ux_demSalesEstimatorPriceElasticity.Text = "Use Price Elasticity estimator for alternative scenarios";
            // 
            // ux_demDfsModelGroupBox
            // 
            this.ux_demDfsModelGroupBox.AutoSize = true;
            this.ux_demDfsModelGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demDfsModelGroupBox.Controls.Add(this.ux_demDfsModelPanel);
            this.ux_demDfsModelGroupBox.Location = new System.Drawing.Point(8, 244);
            this.ux_demDfsModelGroupBox.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            this.ux_demDfsModelGroupBox.Name = "ux_demDfsModelGroupBox";
            this.ux_demDfsModelGroupBox.Padding = new System.Windows.Forms.Padding(2, 2, 8, 8);
            this.ux_demDfsModelGroupBox.Size = new System.Drawing.Size(501, 199);
            this.ux_demDfsModelGroupBox.TabIndex = 2;
            this.ux_demDfsModelGroupBox.TabStop = false;
            this.ux_demDfsModelGroupBox.Text = "Select DFS Model to use";
            // 
            // ux_demDfsModelPanel
            // 
            this.ux_demDfsModelPanel.AutoSize = true;
            this.ux_demDfsModelPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demDfsModelPanel.Controls.Add(this.ux_demDfsModelFixedShares);
            this.ux_demDfsModelPanel.Controls.Add(this.ux_demDfsModelUserDefined);
            this.ux_demDfsModelPanel.Controls.Add(this.ux_demDfsModelExperimental);
            this.ux_demDfsModelPanel.Controls.Add(this.ux_demDfsModelPriceElasticity);
            this.ux_demDfsModelPanel.Controls.Add(this.ux_demDfsModelPriceCoefficientPanel);
            this.ux_demDfsModelPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ux_demDfsModelPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.ux_demDfsModelPanel.Location = new System.Drawing.Point(2, 25);
            this.ux_demDfsModelPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demDfsModelPanel.Name = "ux_demDfsModelPanel";
            this.ux_demDfsModelPanel.Padding = new System.Windows.Forms.Padding(16, 4, 0, 0);
            this.ux_demDfsModelPanel.Size = new System.Drawing.Size(491, 166);
            this.ux_demDfsModelPanel.TabIndex = 0;
            // 
            // ux_demDfsModelFixedShares
            // 
            this.ux_demDfsModelFixedShares.AutoSize = true;
            this.ux_demDfsModelFixedShares.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demDfsModelFixedShares.Location = new System.Drawing.Point(24, 4);
            this.ux_demDfsModelFixedShares.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demDfsModelFixedShares.Name = "ux_demDfsModelFixedShares";
            this.ux_demDfsModelFixedShares.Size = new System.Drawing.Size(199, 29);
            this.ux_demDfsModelFixedShares.TabIndex = 0;
            this.ux_demDfsModelFixedShares.Text = "Fixed Fleet Shares";
            this.ux_demDfsModelFixedShares.UseVisualStyleBackColor = true;
            // 
            // ux_demDfsModelUserDefined
            // 
            this.ux_demDfsModelUserDefined.AutoSize = true;
            this.ux_demDfsModelUserDefined.Checked = true;
            this.ux_demDfsModelUserDefined.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demDfsModelUserDefined.Location = new System.Drawing.Point(24, 37);
            this.ux_demDfsModelUserDefined.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demDfsModelUserDefined.Name = "ux_demDfsModelUserDefined";
            this.ux_demDfsModelUserDefined.Size = new System.Drawing.Size(216, 29);
            this.ux_demDfsModelUserDefined.TabIndex = 1;
            this.ux_demDfsModelUserDefined.TabStop = true;
            this.ux_demDfsModelUserDefined.Text = "User Defined Shares";
            this.ux_demDfsModelUserDefined.UseVisualStyleBackColor = true;
            // 
            // ux_demDfsModelExperimental
            // 
            this.ux_demDfsModelExperimental.AutoSize = true;
            this.ux_demDfsModelExperimental.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demDfsModelExperimental.Location = new System.Drawing.Point(24, 70);
            this.ux_demDfsModelExperimental.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demDfsModelExperimental.Name = "ux_demDfsModelExperimental";
            this.ux_demDfsModelExperimental.Size = new System.Drawing.Size(148, 29);
            this.ux_demDfsModelExperimental.TabIndex = 2;
            this.ux_demDfsModelExperimental.Text = "Experimental";
            this.ux_demDfsModelExperimental.UseVisualStyleBackColor = true;
            // 
            // ux_demDfsModelPriceElasticity
            // 
            this.ux_demDfsModelPriceElasticity.AutoSize = true;
            this.ux_demDfsModelPriceElasticity.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demDfsModelPriceElasticity.Location = new System.Drawing.Point(24, 103);
            this.ux_demDfsModelPriceElasticity.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demDfsModelPriceElasticity.Name = "ux_demDfsModelPriceElasticity";
            this.ux_demDfsModelPriceElasticity.Size = new System.Drawing.Size(467, 29);
            this.ux_demDfsModelPriceElasticity.TabIndex = 3;
            this.ux_demDfsModelPriceElasticity.Text = "Use Price Elasticity model for alternative scenarios";
            // 
            // ux_demIterationsPanel
            // 
            this.ux_demIterationsPanel.AutoSize = true;
            this.ux_demIterationsPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demIterationsPanel.Controls.Add(this.ux_demIterationsLabel);
            this.ux_demIterationsPanel.Controls.Add(this.ux_demIterations);
            this.ux_demIterationsPanel.Location = new System.Drawing.Point(8, 447);
            this.ux_demIterationsPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demIterationsPanel.Name = "ux_demIterationsPanel";
            this.ux_demIterationsPanel.Size = new System.Drawing.Size(470, 34);
            this.ux_demIterationsPanel.TabIndex = 3;
            // 
            // ux_demIterationsLabel
            // 
            this.ux_demIterationsLabel.AutoSize = true;
            this.ux_demIterationsLabel.Location = new System.Drawing.Point(8, 2);
            this.ux_demIterationsLabel.Margin = new System.Windows.Forms.Padding(8, 2, 0, 4);
            this.ux_demIterationsLabel.Name = "ux_demIterationsLabel";
            this.ux_demIterationsLabel.Size = new System.Drawing.Size(354, 25);
            this.ux_demIterationsLabel.TabIndex = 0;
            this.ux_demIterationsLabel.Text = "Number of iterations for DFS/SR model:";
            // 
            // ux_demIterations
            // 
            this.ux_demIterations.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.ux_demIterationsPanel.SetFlowBreak(this.ux_demIterations, true);
            this.ux_demIterations.Location = new System.Drawing.Point(370, 0);
            this.ux_demIterations.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demIterations.MaxLength = 2;
            this.ux_demIterations.Name = "ux_demIterations";
            this.ux_demIterations.Size = new System.Drawing.Size(100, 30);
            this.ux_demIterations.TabIndex = 1;
            this.ux_demIterations.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // ux_demAdvancedSettingsGroupBox
            // 
            this.ux_demAdvancedSettingsGroupBox.AutoSize = true;
            this.ux_demAdvancedSettingsGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demAdvancedSettingsGroupBox.Controls.Add(this.ux_demAdvancedSettingsPanel);
            this.ux_demAdvancedSettingsGroupBox.Location = new System.Drawing.Point(8, 481);
            this.ux_demAdvancedSettingsGroupBox.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
            this.ux_demAdvancedSettingsGroupBox.Name = "ux_demAdvancedSettingsGroupBox";
            this.ux_demAdvancedSettingsGroupBox.Padding = new System.Windows.Forms.Padding(2, 2, 8, 8);
            this.ux_demAdvancedSettingsGroupBox.Size = new System.Drawing.Size(321, 70);
            this.ux_demAdvancedSettingsGroupBox.TabIndex = 4;
            this.ux_demAdvancedSettingsGroupBox.TabStop = false;
            this.ux_demAdvancedSettingsGroupBox.Text = "Advanced Settings";
            // 
            // ux_demAdvancedSettingsPanel
            // 
            this.ux_demAdvancedSettingsPanel.AutoSize = true;
            this.ux_demAdvancedSettingsPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ux_demAdvancedSettingsPanel.Controls.Add(this.ux_demDisableDynamicVmtModel);
            this.ux_demAdvancedSettingsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ux_demAdvancedSettingsPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.ux_demAdvancedSettingsPanel.Location = new System.Drawing.Point(2, 25);
            this.ux_demAdvancedSettingsPanel.Margin = new System.Windows.Forms.Padding(0);
            this.ux_demAdvancedSettingsPanel.Name = "ux_demAdvancedSettingsPanel";
            this.ux_demAdvancedSettingsPanel.Padding = new System.Windows.Forms.Padding(16, 4, 0, 0);
            this.ux_demAdvancedSettingsPanel.Size = new System.Drawing.Size(311, 37);
            this.ux_demAdvancedSettingsPanel.TabIndex = 0;
            // 
            // ux_demDisableDynamicVmtModel
            // 
            this.ux_demDisableDynamicVmtModel.AutoSize = true;
            this.ux_demDisableDynamicVmtModel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.ux_demDisableDynamicVmtModel.Location = new System.Drawing.Point(24, 4);
            this.ux_demDisableDynamicVmtModel.Margin = new System.Windows.Forms.Padding(8, 0, 0, 4);
            this.ux_demDisableDynamicVmtModel.Name = "ux_demDisableDynamicVmtModel";
            this.ux_demDisableDynamicVmtModel.Size = new System.Drawing.Size(287, 29);
            this.ux_demDisableDynamicVmtModel.TabIndex = 0;
            this.ux_demDisableDynamicVmtModel.Text = "Disable Dynamic VMT model";
            // 
            // ux_toolTip
            // 
            this.ux_toolTip.IsBalloon = true;
            this.ux_toolTip.StripAmpersands = true;
            // 
            // RuntimeSettingsPanel
            // 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
            this.Controls.Add(this.us_runtimeSettingsPanel);
            this.Controls.Add(this.ux_settingsProfilePanel);
            this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Margin = new System.Windows.Forms.Padding(0);
            this.MinimumSize = new System.Drawing.Size(752, 0);
            this.Name = "RuntimeSettingsPanel";
            this.Size = new System.Drawing.Size(806, 509);
            ux_analysisStartYearPanel.ResumeLayout(false);
            ux_analysisStartYearPanel.PerformLayout();
            ux_alternativeStartYearPanel.ResumeLayout(false);
            ux_alternativeStartYearPanel.PerformLayout();
            ux_techStartYearPanel.ResumeLayout(false);
            ux_techStartYearPanel.PerformLayout();
            ux_analysisEndYearPanel.ResumeLayout(false);
            ux_analysisEndYearPanel.PerformLayout();
            ux_assumedPaybackMilesPanel.ResumeLayout(false);
            ux_assumedPaybackMilesPanel.PerformLayout();
            ux_scaleConsumerBenefitsPanel.ResumeLayout(false);
            ux_scaleConsumerBenefitsPanel.PerformLayout();
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.ResumeLayout(false);
            this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.PerformLayout();
            this.ux_demDfsModelPriceCoefficientPanel.ResumeLayout(false);
            this.ux_demDfsModelPriceCoefficientPanel.PerformLayout();
            this.ux_fatalityRateEstimatesGroupBox.ResumeLayout(false);
            this.ux_fatalityRateEstimatesGroupBox.PerformLayout();
            this.ux_fatalityRateEstimatesPanel.ResumeLayout(false);
            this.ux_fatalityRateEstimatesPanel.PerformLayout();
            this.ux_complianceProgramGroupBox.ResumeLayout(false);
            this.ux_complianceProgramGroupBox.PerformLayout();
            this.ux_complianceProgramPanel.ResumeLayout(false);
            this.ux_complianceProgramPanel.PerformLayout();
            this.ux_settingsProfilePanel.ResumeLayout(false);
            this.ux_settingsProfilePanel.PerformLayout();
            this.ux_complianceSettingsPanel.ResumeLayout(false);
            this.ux_complianceSettingsPanel.PerformLayout();
            this.ux_commercialOpportunityCostSettingsPanel.ResumeLayout(false);
            this.ux_commercialOpportunityCostSettingsPanel.PerformLayout();
            this.us_runtimeSettingsPanel.ResumeLayout(false);
            this.us_runtimeSettingsPanel.PerformLayout();
            this.ux_demSettings.ResumeLayout(false);
            this.ux_demSettings.PerformLayout();
            this.ux_demSalesEstimatorGroupBox.ResumeLayout(false);
            this.ux_demSalesEstimatorGroupBox.PerformLayout();
            this.ux_demSalesEstimatorPanel.ResumeLayout(false);
            this.ux_demSalesEstimatorPanel.PerformLayout();
            this.ux_demDfsModelGroupBox.ResumeLayout(false);
            this.ux_demDfsModelGroupBox.PerformLayout();
            this.ux_demDfsModelPanel.ResumeLayout(false);
            this.ux_demDfsModelPanel.PerformLayout();
            this.ux_demIterationsPanel.ResumeLayout(false);
            this.ux_demIterationsPanel.PerformLayout();
            this.ux_demAdvancedSettingsGroupBox.ResumeLayout(false);
            this.ux_demAdvancedSettingsGroupBox.PerformLayout();
            this.ux_demAdvancedSettingsPanel.ResumeLayout(false);
            this.ux_demAdvancedSettingsPanel.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        /// <inheritdoc/>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null)) {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        /// <inheritdoc/>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.AdjustLayout();
        }

        /// <inheritdoc/>
        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);
            this.AdjustLayout();
        }

        /// <inheritdoc/>
        protected override void OnFontChanged(EventArgs e)
        {
            base.OnFontChanged(e);
            this.AdjustLayout(resizeTextBoxes: true);
        }

        private void AdjustLayout(bool resizeTextBoxes = false)
        {
            if (!this.IsHandleCreated || !this.Visible) {
                return;
            }

            this.SuspendLayout();
            SetNewSize(this.ux_complianceSettingsPanel);
            SetNewSize(this.ux_demSettings);
            this.ResumeLayout(true);

            // local helper functions
            void SetNewSize(Panel panel)
            {
                if (panel == null || panel.IsDisposed) {
                    return;
                }
                if (!(panel.Tag is Control[] controls)) {
                    return;
                }

                if (resizeTextBoxes) {
                    ResizeTextBoxes(controls);
                }
                ResetPaddingsAndMargins(controls);

                int w = panel.Width;

                foreach (Control c in controls) {
                    if (c is GroupBox) {
                        var padding = c.Padding;
                        padding.Right = Math.Max(8, w - 8 - c.Width);
                        c.Padding = padding;
                    }
                    else if (c is TextBox) {
                        if (c.Parent?.Parent == panel) {
                            var margin = c.Margin;
                            margin.Left += w - c.Parent.Right - 8;
                            c.Margin = margin;
                        }
                    }
                }
            }

            void ResizeTextBoxes(Control[] controls)
            {
                foreach (var c in controls) {
                    if (c is TextBox) {
                        c.Width = (int)(c.Height * 4.5);
                    }
                }
            }

            void ResetPaddingsAndMargins(Control[] controls)
            {
                foreach (var c in controls) {
                    if (c is TextBox) {
                        var margin = c.Margin;
                        margin.Left = 8;
                        c.Margin = margin;
                    }
                    else if (c is GroupBox) {
                        var padding = c.Padding;
                        padding.Right = 0;
                        c.Padding = padding;
                    }
                }
            }
        }

        private void PostInitialize()
        {
            // fix font for systems with custom DPI scalling
            // windows forms scales fonts, but its auto-size feature does not work for fixed pos controls
            this.Font = new Font("Microsoft Sans Serif",
                9.75F * GlobalSettings.DPIScale, FontStyle.Regular, GraphicsUnit.Point, 0);

            // initialize check-changes
            this.AutoInitializeCheckChangesDetector(this.Controls);

            // we don't want to track changes to settings "profile" controls
            this.DeInitializeCheckChangesDetector(this.ux_settingsProfileLightDuty);
            this.DeInitializeCheckChangesDetector(this.ux_settingsProfileLdEis);
            this.DeInitializeCheckChangesDetector(this.ux_settingsProfileCustom);

            this._defaultLdSettings = RuntimeSettings.DefaultSettings;
            this._defaultLdEisSettings = RuntimeSettings.DefaultLdEisSettings;

            this.HookEvents();
            this.AddToolTips();

            // add groupboxes and textboxes to panel's tag (for quick finding during layout calcs)
            this.ux_complianceSettingsPanel.Tag = new Control[] {
                this.ux_complianceProgramGroupBox,
                this.ux_fatalityRateEstimatesGroupBox,
                this.ux_analysisStartYear,
                this.ux_alternativeStartYear,
                this.ux_techStartYear,
                this.ux_analysisEndYear,
                this.ux_assumedPaybackMiles,
                this.ux_consumerBenefitsScale,
                this.ux_commercialShareLD
            };
            this.ux_demSettings.Tag = new Control[] {
                this.ux_demSalesEstimatorGroupBox,
                this.ux_demDfsModelGroupBox,
                this.ux_demAdvancedSettingsGroupBox,
                this.ux_demSalesEstimatorPriceElasticityMultiplier,
                this.ux_demDfsModelPriceCoefficient,
                this.ux_demIterations
            };
        }

        private void AddToolTips()
        {
            // compliance settings
            this.ux_toolTip.SetToolTip(this.ux_analysisStartYear,
                "Specifies the first model year the system will evaluate for compliance. This should\n" +
                "typically correlate to the model year for which the baseline input fleet is defined.");
            this.ux_toolTip.SetToolTip(this.ux_alternativeStartYear,
                "Specifies the first model year the system will evaluate for compliance for alternative\n" +
                "(non-baseline) scenarios. Any fleet improvements made during analysis of the baseline\n" +
                "scenario will be inherited during evaluation of alternative scenarios for each model year\n" +
                "prior to the alternative start year.");
            this.ux_toolTip.SetToolTip(this.ux_techStartYear,
                "Specifies the first model year when the system will begin evaluating technologies for\n" +
                "application on vehicles. Prior to this year, the system will only determine manufacturers'\n" +
                "compliance levels, generate available credits and fines owed, and use expiring credits\n" +
                "(if credit trading is enabled) to offset compliance shortfalls as needed. Any non-expiring\n" +
                "banked credits available prior to start of the analysis (which are specified as input for\n" +
                "each manufacturer) will not be used for model years prior to this starting year.");
            this.ux_toolTip.SetToolTip(this.ux_analysisEndYear,
                "Specifies the last model year the system will evaluate for compliance.");

            this.ux_toolTip.SetToolTip(this.ux_excludeBevFcvFromAnalysis,
                "Specifies whether the model should remove all BEVs and FCVs from the industry fleet\n" +
                "prior to start of analysis and disallow application of new BEVs or FCVs during modeling\n" +
                "(including for the ZEV mandate).");

            // sales estimators
            this.ux_toolTip.SetToolTip(this.ux_demSalesEstimatorFixedForecast,
                "Specifies a sales estimator that projects a constant sales forecast into each future\n" +
                "model year, based on the initial sales volumes obtained from the product plan\n" +
                "industry data.");
            this.ux_toolTip.SetToolTip(this.ux_demSalesEstimatorUserDefined,
                "Specifies a sales estimator that relies on a user supplied annual sales forecast for\n" +
                "estimating the total vehicle sales in each future model year.");
            this.ux_toolTip.SetToolTip(this.ux_demSalesEstimatorNominalForecast,
                "Specifies a sales estimator that uses a macroeconomic model for dynamically estimating\n" +
                "the total vehicle sales in each future model year.");
            this.ux_toolTip.SetToolTip(this.ux_demSalesEstimatorPriceElasticity,
                "Specifies a sales estimator that forecasts the total vehicle sales in each future model year\n" +
                "in the action alternatives, based on the price elasticity effect with regard to the incremental\n" +
                "differences of regulatory costs, tax credits, and fuel savings occurring between the baseline\n" +
                "and the action alternative scenarios.\n\n" +
                "Note that for the baseline scenario, a sales estimator selected above will be used as a\n" +
                "reference to forecast the new vehicle sales.");

            // DFS models
            this.ux_toolTip.SetToolTip(this.ux_demDfsModelFixedShares,
                "Specifies a DFS model that projects constant fleet shares into each future model year,\n" +
                "based on the initial fleet shares obtained from the product plan industry data.");
            this.ux_toolTip.SetToolTip(this.ux_demDfsModelUserDefined,
                "Specifies a DFS model that relies on a user supplied annual light-duty car shares for\n" +
                "estimating the fleet shares in each future model year.");
            this.ux_toolTip.SetToolTip(this.ux_demDfsModelExperimental,
                "Specifies a new macroeconomic DFS model that forecasts the fleet shares in each future\n" +
                "model year in response to the differences in fuel economy, vehicle power, and curb weight\n" +
                "occurring between the light-duty car and light-duty truck fleets.");
            this.ux_toolTip.SetToolTip(this.ux_demDfsModelPriceElasticity,
                "Specifies a DFS model that forecasts the fleet shares in each future model year in the\n" +
                "action alternatives, based on the price elasticity effect with regard to the incremental\n" +
                "differences of regulatory costs, tax credits, and fuel savings occurring between the\n" +
                "baseline and the action alternative scenarios, additionally taken as the differences\n" +
                "between the light-duty car and light-duty truck fleets.\n\n" +
                "Note that for the baseline scenario, a DFS model selected above will be used as a\n" +
                "reference to forecast the fleet shares.");
        }

        private void HookEvents()
        {
            Application.Idle += (sender, e) => {
                if (this._updatingSettings) {
                    return;
                }

                RuntimeSettings tempSettings = new RuntimeSettings(false);
                this.ToRuntimeSettings(tempSettings);
                if (tempSettings.CompareTo(this._defaultLdSettings)) {
                    this.ux_settingsProfileLightDuty.Checked = true;
                    this.ux_settingsProfileCustom.Enabled = false;
                }
                else if (tempSettings.CompareTo(this._defaultLdEisSettings)) {
                    this.ux_settingsProfileLdEis.Checked = true;
                    this.ux_settingsProfileCustom.Enabled = false;
                }
                else {
                    this.ux_settingsProfileCustom.Checked = true;
                    this.ux_settingsProfileCustom.Enabled = true;
                }
            };

            this.ux_settingsProfilePanel.Paint += (sender, e) => {
                int x1 = this.ux_settingsProfileLightDuty.Left;
                int x2 = this.ux_settingsProfilePanel.Width;
                int y = this.ux_settingsProfilePanel.Height - 1;
                e.Graphics.DrawLine(Pens.Black, x1, y, x2, y);
            };

            this.ux_analysisStartYear.TextChanged += this.AnalysisYears_TextChanged;
            this.ux_alternativeStartYear.TextChanged += this.AnalysisYears_TextChanged;
            this.ux_techStartYear.TextChanged += this.AnalysisYears_TextChanged;
            this.ux_analysisEndYear.TextChanged += this.AnalysisYears_TextChanged;

            this.ux_settingsProfileLightDuty.CheckedChanged += (sender, e) => {
                if (this.ux_settingsProfileLightDuty.Checked) {
                    this.FromRuntimeSettings(this._defaultLdSettings);
                }
            };

            this.ux_settingsProfileLdEis.CheckedChanged += (sender, e) => {
                if (this.ux_settingsProfileLdEis.Checked) {
                    this.FromRuntimeSettings(this._defaultLdEisSettings);
                }
            };

            this.ux_enableDynamicEconomicModeling.CheckedChanged += (sender, e) => {
                bool enabled = this.ux_enableDynamicEconomicModeling.Checked;

                this.ux_demSalesEstimatorGroupBox.Enabled = enabled;
                this.ux_demDfsModelGroupBox.Enabled = enabled;
                this.ux_demIterationsLabel.Enabled = enabled;
                this.ux_demIterations.Enabled = enabled;
                this.ux_demAdvancedSettingsGroupBox.Enabled = enabled;
            };

            this.ux_demSalesEstimatorPriceElasticity.CheckedChanged += (sender, e) => {
                this.ux_demSalesEstimatorPriceElasticityMultiplierPanel.Enabled = this.ux_demSalesEstimatorPriceElasticity.Checked;
            };

            this.ux_demDfsModelPriceElasticity.CheckedChanged += (sender, e) => {
                this.ux_demDfsModelPriceCoefficientPanel.Enabled = this.ux_demDfsModelPriceElasticity.Checked;
            };

            this.ux_scaleConsumerBenefits.CheckedChanged += (sender, e) => {
                this.ux_consumerBenefitsScale.Enabled = this.ux_scaleConsumerBenefits.Checked;
            };

            this.ux_calcCommercialOpportunityCost.CheckedChanged += ToggleCommercialOpportunityCostSettingsPanel;
            this.ux_calcImplicitOpportunityCost.CheckedChanged += ToggleCommercialOpportunityCostSettingsPanel;

            void ToggleCommercialOpportunityCostSettingsPanel(object sender, EventArgs e)
            {
                this.ux_commercialOpportunityCostSettingsPanel.Enabled =
                    this.ux_calcImplicitOpportunityCost.Checked || this.ux_calcCommercialOpportunityCost.Checked;
            }
        }

        private void AnalysisYears_TextChanged(object sender, EventArgs e)
        {
            // when the min/max years change (to valid values!), we need to update dependant registered controls

            // first, get refs to wrappers for registered controls
            var analysisStartYear = this.FindNumericTextControl(this.ux_analysisStartYear);
            var altStartYear = this.FindNumericTextControl(this.ux_alternativeStartYear);
            var techStartYear = this.FindNumericTextControl(this.ux_techStartYear);
            var analysisEndYear = this.FindNumericTextControl(this.ux_analysisEndYear);

            // if analysis start year is invalid, cannot update anything else
            // otherwise, update min-/max-value setting for affected controls
            if (analysisStartYear != null && analysisStartYear.ValueValid) {
                int minYear = this.ux_analysisStartYear.Text.GetInt32();
                analysisEndYear.MinValue = minYear;
                altStartYear.MinValue = minYear;
                techStartYear.MinValue = minYear;

                // refresh analysis end year control to check for new errors
                this.RefreshRegisteredTextControl(this.ux_analysisEndYear);
                // if analysis end year is valid, update min-/max-value setting for affected controls
                if (analysisEndYear.ValueValid) {
                    int maxYear = this.ux_analysisEndYear.Text.GetInt32();
                    altStartYear.MaxValue = maxYear;
                    techStartYear.MaxValue = maxYear;
                }

                // refresh remaining affected controls to check for new errors
                this.RefreshRegisteredTextControl(this.ux_alternativeStartYear);
                this.RefreshRegisteredTextControl(this.ux_techStartYear);
            }
        }

        /// <summary>
        /// Sets up the initial states of the controls for the <see cref="RuntimeSettingsPanel"/> instance based on the
        /// specified runtime settings.
        /// </summary>
        /// <param name="runtimeSettings">The runtime settings to use with the modeling system.</param>
        public void SetInitialState(RuntimeSettings runtimeSettings)
        {
            this._runtimeSettings = runtimeSettings;
            this.FromRuntimeSettings(runtimeSettings);

            // register numeric text controls
            this.RegisterNumericTextControl(this.ux_analysisStartYear,
                runtimeSettings.AnalysisStartYear, 2000, double.NaN,
                "The compliance modeling starting year should be greater than or equal to {MIN}.", true, "0");
            this.RegisterNumericTextControl(this.ux_analysisEndYear,
                runtimeSettings.AnalysisEndYear, runtimeSettings.AnalysisStartYear, double.NaN,
                "The compliance modeling ending year should be greater than or equal to {MIN}.", true, "0");
            this.RegisterNumericTextControl(this.ux_techStartYear, runtimeSettings.TechStartYear,
                runtimeSettings.AnalysisStartYear, runtimeSettings.AnalysisEndYear,
                "The technology application starting year should be between {MIN} and {MAX}.", true, "0");
            this.RegisterNumericTextControl(this.ux_alternativeStartYear, runtimeSettings.AlternativeStartYear,
                runtimeSettings.AnalysisStartYear, runtimeSettings.AnalysisEndYear,
                "The alternative start year should be between {MIN} and {MAX}.", true, "0");
            this.RegisterNumericTextControl(this.ux_demIterations,
                runtimeSettings.DfsSrIterations, 2, 20,
                "The Number of Iterations for the DFS/SR model should be between {MIN} and {MAX}.", true, "0");
            this.RegisterNumericTextControl(this.ux_demSalesEstimatorPriceElasticityMultiplier,
                runtimeSettings.PriceElasticitySalesEstimatorMultiplier, -3, 1,
                "The Price Elasticity Multiplier for the DFS/SR model should be between {MIN} and {MAX}.", true, "0.00");
            this.RegisterNumericTextControl(this.ux_demDfsModelPriceCoefficient,
                runtimeSettings.PriceElasticityDfsModelCoefficient, -0.1, 0,
                "The Price Coefficient for the DFS model should be between {MIN} and {MAX}.", true, "0.0000000");
            this.RegisterNumericTextControl(this.ux_consumerBenefitsScale, 100, 1, 100,
                "The Consumer Benefits Scale should be between {MIN} and {MAX}.", true, "0");
            this.RegisterNumericTextControl(this.ux_assumedPaybackMiles, 35000, 0, 250000,
                "The Assumed Payback Miles should be between {MIN} and {MAX}.", true, "0");
            this.RegisterNumericTextControl(this.ux_commercialShareLD, 0.0, 0.0, 1.0,
                "The Commercial Share for light-duty vehicles should be between {MIN} and {MAX}.", true, "0.00");

            // call save in base to reset changes
            base.SaveChanges();
        }

        /// <summary>
        /// Commits the most recently made changes to the internal <see cref="RuntimeSettings"/> structure.
        /// </summary>
        public override void SaveChanges()
        {
            if (this.SettingsChanged) {
                this.ToRuntimeSettings(this._runtimeSettings);
                base.SaveChanges();
            }
        }

        private void FromRuntimeSettings(RuntimeSettings runtimeSettings)
        {
            this._updatingSettings = true;

            // compliance model settings
            this.SelectedComplianceProgram = runtimeSettings.ComplianceProgram;
            this.ux_analysisStartYear.Text = runtimeSettings.AnalysisStartYear.ToString("0");
            this.ux_techStartYear.Text = runtimeSettings.TechStartYear.ToString("0");
            this.ux_alternativeStartYear.Text = runtimeSettings.AlternativeStartYear.ToString("0");
            this.ux_analysisEndYear.Text = runtimeSettings.AnalysisEndYear.ToString("0");
            this.ux_allowCreditTrading.Checked = runtimeSettings.AllowCreditTrading;
            this.ux_capOffCycleCosts.Checked = runtimeSettings.CapOffCycleCosts;

            // dynamic economic modeling settings
            this.ux_enableDynamicEconomicModeling.Checked = runtimeSettings.DynamicEconomicModeling;
            this.SelectedSalesEstimator = runtimeSettings.SalesEstimator;
            this.SelectedReferenceSalesEstimator = runtimeSettings.ReferenceSalesEstimator;
            this.ux_demSalesEstimatorPriceElasticityMultiplier.Text = runtimeSettings.PriceElasticitySalesEstimatorMultiplier.ToString("0.00");
            this.SelectedDfsModel = runtimeSettings.DfsModel;
            this.SelectedReferenceDfsModel = runtimeSettings.ReferenceDfsModel;
            this.ux_demDfsModelPriceCoefficient.Text = runtimeSettings.PriceElasticityDfsModelCoefficient.ToString("0.0000000");
            this.ux_demIterations.Text = runtimeSettings.DfsSrIterations.ToString("0");
            this.ux_demDisableDynamicVmtModel.Checked = runtimeSettings.DisableDynamicVmtModel;

            // assumed fuel savings (dynamic models and effects model)
            this.ux_assumedPaybackMiles.Text = runtimeSettings.AssumedPaybackMiles.ToString("0");

            // effects model settings
            this.SelectedFatalityRateEstimates = runtimeSettings.FatalityRateEstimates;
            this.SelectedConsumerBenefitsScale = runtimeSettings.ConsumerBenefitsScale;
            this.ux_calcImplicitOpportunityCost.Checked = runtimeSettings.CalcImplicitOpportunityCost;
            this.ux_calcCommercialOpportunityCost.Checked = runtimeSettings.CalcCommercialOpportunityCost;
            this.ux_commercialShareLD.Text = runtimeSettings.CommercialShareLD.ToString("0.00");

            // misc settings
            this.ux_excludeBevFcvFromAnalysis.Checked = runtimeSettings.ExcludeBevFcvFromAnalysis;

            this._updatingSettings = false;
        }

        private void ToRuntimeSettings(RuntimeSettings runtimeSettings)
        {
            // compliance model settings
            runtimeSettings.ComplianceProgram = this.SelectedComplianceProgram;
            runtimeSettings.AnalysisStartYear = this.ux_analysisStartYear.Text.GetInt32();
            runtimeSettings.TechStartYear = this.ux_techStartYear.Text.GetInt32();
            runtimeSettings.AlternativeStartYear = this.ux_alternativeStartYear.Text.GetInt32();
            runtimeSettings.AnalysisEndYear = this.ux_analysisEndYear.Text.GetInt32();
            runtimeSettings.AllowCreditTrading = this.ux_allowCreditTrading.Checked;
            runtimeSettings.CapOffCycleCosts = this.ux_capOffCycleCosts.Checked;

            // dynamic economic modeling settings
            runtimeSettings.DynamicEconomicModeling = this.ux_enableDynamicEconomicModeling.Checked;
            runtimeSettings.SalesEstimator = this.SelectedSalesEstimator;
            runtimeSettings.ReferenceSalesEstimator = this.SelectedReferenceSalesEstimator;
            runtimeSettings.PriceElasticitySalesEstimatorMultiplier = this.ux_demSalesEstimatorPriceElasticityMultiplier.Text.GetDouble();
            runtimeSettings.DfsModel = this.SelectedDfsModel;
            runtimeSettings.ReferenceDfsModel = this.SelectedReferenceDfsModel;
            runtimeSettings.PriceElasticityDfsModelCoefficient = this.ux_demDfsModelPriceCoefficient.Text.GetDouble();
            runtimeSettings.DfsSrAggregationMode = AggregationMode.ByBaselineRegClass;
            runtimeSettings.DfsSrIterations = this.ux_demIterations.Text.GetInt32();
            runtimeSettings.DisableDynamicVmtModel = this.ux_demDisableDynamicVmtModel.Checked;

            // assumed fuel savings (dynamic models and effects model)
            runtimeSettings.AssumedPaybackMiles = this.ux_assumedPaybackMiles.Text.GetDouble();

            // effects model settings
            runtimeSettings.FatalityRateEstimates = this.SelectedFatalityRateEstimates;
            runtimeSettings.ConsumerBenefitsScale = this.SelectedConsumerBenefitsScale;
            runtimeSettings.CalcImplicitOpportunityCost = this.ux_calcImplicitOpportunityCost.Checked;
            runtimeSettings.CalcCommercialOpportunityCost = this.ux_calcCommercialOpportunityCost.Checked;
            runtimeSettings.CommercialShareLD = this.ux_commercialShareLD.Text.GetDouble();

            // misc settings
            runtimeSettings.ExcludeBevFcvFromAnalysis = this.ux_excludeBevFcvFromAnalysis.Checked;
        }

        #endregion

        #region /*** Properties ***/

        ComplianceProgram SelectedComplianceProgram
        {
            get {
                return (this.ux_complianceProgramBoth.Checked) ? ComplianceProgram.CAFEAndCO2
                     : (this.ux_complianceProgramCO2 .Checked) ? ComplianceProgram.CO2
                     :                                           ComplianceProgram.CAFE;
            }
            set {
                if (value.IsCAFEAndCO2()) {
                    this.ux_complianceProgramBoth.Checked = true;
                }
                else if (value.IsCO2()) {
                    this.ux_complianceProgramCO2.Checked = true;
                }
                else {
                    this.ux_complianceProgramCAFE.Checked = true;
                }
            }
        }

        Estimates SelectedFatalityRateEstimates
        {
            get {
                return (this.ux_fatalityRateLow .Checked) ? Estimates.Low
                     : (this.ux_fatalityRateHigh.Checked) ? Estimates.High
                     :                                      Estimates.Average;
            }
            set {
                if (value == Estimates.Low) {
                    this.ux_fatalityRateLow.Checked = true;
                }
                else if (value == Estimates.High) {
                    this.ux_fatalityRateHigh.Checked = true;
                }
                else {
                    this.ux_fatalityRateAverage.Checked = true;
                }
            }
        }

        double SelectedConsumerBenefitsScale
        {
            get {
                return (!this.ux_scaleConsumerBenefits.Checked)
                    ? 1
                    : this.ux_consumerBenefitsScale.Text.GetDouble() / 100;
            }
            set {
                this.ux_scaleConsumerBenefits.Checked = (value != 1);
                this.ux_consumerBenefitsScale.Text = (value * 100).ToString("0");
            }
        }

        SalesEstimator SelectedSalesEstimator
        {
            get {
                return this.ux_demSalesEstimatorPriceElasticity.Checked ? SalesEstimator.PriceElasticity
                     : this.ux_demSalesEstimatorFixedForecast.Checked ? SalesEstimator.FixedForecast
                     : this.ux_demSalesEstimatorNominalForecast.Checked ? SalesEstimator.NominalForecast
                     : SalesEstimator.UserDefinedForecast;
            }
            set {
                switch (value) {
                    case SalesEstimator.FixedForecast:
                        this.ux_demSalesEstimatorFixedForecast.Checked = true;
                        break;

                    case SalesEstimator.UserDefinedForecast:
                        this.ux_demSalesEstimatorUserDefined.Checked = true;
                        break;

                    case SalesEstimator.NominalForecast:
                        this.ux_demSalesEstimatorNominalForecast.Checked = true;
                        break;

                    case SalesEstimator.PriceElasticity:
                    default:
                        this.ux_demSalesEstimatorPriceElasticity.Checked = true;
                        break;
                }
            }
        }

        SalesEstimator SelectedReferenceSalesEstimator
        {
            get {
                return this.ux_demSalesEstimatorFixedForecast.Checked ? SalesEstimator.FixedForecast
                     : this.ux_demSalesEstimatorNominalForecast.Checked ? SalesEstimator.NominalForecast
                     : SalesEstimator.UserDefinedForecast;
            }
            set {
                switch (value) {
                    case SalesEstimator.FixedForecast:
                        this.ux_demSalesEstimatorFixedForecast.Checked = true;
                        break;

                    case SalesEstimator.NominalForecast:
                        this.ux_demSalesEstimatorNominalForecast.Checked = true;
                        break;

                    case SalesEstimator.UserDefinedForecast:
                    default:
                        this.ux_demSalesEstimatorUserDefined.Checked = true;
                        break;
                }
            }
        }

        DfsModel SelectedDfsModel
        {
            get {
                return this.ux_demDfsModelPriceElasticity.Checked ? DfsModel.PriceElasticity
                     : this.ux_demDfsModelFixedShares.Checked ? DfsModel.FixedFleetShares
                     : this.ux_demDfsModelExperimental.Checked ? DfsModel.Experimental
                     : DfsModel.UserDefinedShares;
            }
            set {
                switch (value) {
                    case DfsModel.FixedFleetShares:
                        this.ux_demDfsModelFixedShares.Checked = true;
                        break;

                    case DfsModel.UserDefinedShares:
                        this.ux_demDfsModelUserDefined.Checked = true;
                        break;

                    case DfsModel.Experimental:
                        this.ux_demDfsModelExperimental.Checked = true;
                        break;

                    case DfsModel.PriceElasticity:
                    default:
                        this.ux_demDfsModelPriceElasticity.Checked = true;
                        break;
                }
            }
        }

        DfsModel SelectedReferenceDfsModel
        {
            get {
                return this.ux_demDfsModelFixedShares.Checked ? DfsModel.FixedFleetShares
                     : this.ux_demDfsModelExperimental.Checked ? DfsModel.Experimental
                     : DfsModel.UserDefinedShares;
            }
            set {
                switch (value) {
                    case DfsModel.FixedFleetShares:
                        this.ux_demDfsModelFixedShares.Checked = true;
                        break;

                    case DfsModel.Experimental:
                        this.ux_demDfsModelExperimental.Checked = true;
                        break;

                    case DfsModel.UserDefinedShares:
                    default:
                        this.ux_demDfsModelUserDefined.Checked = true;
                        break;
                }
            }
        }

        #endregion

        #region /*** Variables ***/

        #region /* UI Variables */
#pragma warning disable IDE1006 // Naming Styles

        IContainer components;
        ToolTip ux_toolTip;

        //===== profiles =====
        FlowLayoutPanel ux_settingsProfilePanel;
        Label           ux_settingsProfileLabel;
        RadioButton     ux_settingsProfileLightDuty;
        RadioButton     ux_settingsProfileLdEis;
        RadioButton     ux_settingsProfileCustom;

        //===== runtime settings =====
        FlowLayoutPanel us_runtimeSettingsPanel;

        //----- compliance model settings -----
        FlowLayoutPanel ux_complianceSettingsPanel;

        GroupBox        ux_complianceProgramGroupBox;
        FlowLayoutPanel ux_complianceProgramPanel;
        RadioButton     ux_complianceProgramCAFE;
        RadioButton     ux_complianceProgramCO2;
        RadioButton     ux_complianceProgramBoth;

        TextBox         ux_analysisStartYear;
        TextBox         ux_techStartYear;
        TextBox         ux_alternativeStartYear;
        TextBox         ux_analysisEndYear;
        CheckBox        ux_allowCreditTrading;
        CheckBox        ux_capOffCycleCosts;
        CheckBox        ux_excludeBevFcvFromAnalysis;

        //----- effects modeling settings -----
        CheckBox        ux_scaleConsumerBenefits;
        TextBox         ux_consumerBenefitsScale;
        CheckBox        ux_calcImplicitOpportunityCost;
        CheckBox        ux_calcCommercialOpportunityCost;
        FlowLayoutPanel ux_commercialOpportunityCostSettingsPanel;
        TextBox         ux_commercialShareLD;

        GroupBox        ux_fatalityRateEstimatesGroupBox;
        FlowLayoutPanel ux_fatalityRateEstimatesPanel;
        RadioButton     ux_fatalityRateLow;
        RadioButton     ux_fatalityRateAverage;
        RadioButton     ux_fatalityRateHigh;
        TextBox         ux_assumedPaybackMiles;

        //----- dynamic economic modeling settings -----
        FlowLayoutPanel ux_demSettings;
        CheckBox        ux_enableDynamicEconomicModeling;

        GroupBox        ux_demSalesEstimatorGroupBox;
        FlowLayoutPanel ux_demSalesEstimatorPanel;
        RadioButton     ux_demSalesEstimatorFixedForecast;
        RadioButton     ux_demSalesEstimatorUserDefined;
        RadioButton     ux_demSalesEstimatorNominalForecast;
        FlowLayoutPanel ux_demSalesEstimatorPriceElasticityMultiplierPanel;
        CheckBox        ux_demSalesEstimatorPriceElasticity;
        TextBox         ux_demSalesEstimatorPriceElasticityMultiplier;

        GroupBox        ux_demDfsModelGroupBox;
        FlowLayoutPanel ux_demDfsModelPanel;
        RadioButton     ux_demDfsModelFixedShares;
        RadioButton     ux_demDfsModelUserDefined;
        RadioButton     ux_demDfsModelExperimental;
        FlowLayoutPanel ux_demDfsModelPriceCoefficientPanel;
        CheckBox        ux_demDfsModelPriceElasticity;
        TextBox         ux_demDfsModelPriceCoefficient;

        FlowLayoutPanel ux_demIterationsPanel;
        Label           ux_demIterationsLabel;
        TextBox         ux_demIterations;

        GroupBox        ux_demAdvancedSettingsGroupBox;
        FlowLayoutPanel ux_demAdvancedSettingsPanel;
        CheckBox        ux_demDisableDynamicVmtModel;

#pragma warning restore IDE1006 // Naming Styles
        #endregion

        RuntimeSettings _runtimeSettings;
        RuntimeSettings _defaultLdSettings;
        RuntimeSettings _defaultLdEisSettings;

        // indicates if GUI elements are being updated with current settings
        bool _updatingSettings = false;

        #endregion

    }
}
