private void cylinderFunctionWithGasPressure_Force_FunctionChanged(object sender, FunctionEventArgs e)
        {
            CylinderFunctionWithGasPressure _cylinderFunctionWithGasPressure = (CylinderFunctionWithGasPressure)sender;

            #region "requires harmonic order"
            bool _requiresHarmonicOrder = false;
            if (e.FunctionInfoBase is FunctionInfoKinematic)
            {
                FunctionInfoKinematic _functionInfoKinematic = (FunctionInfoKinematic)e.FunctionInfoBase;

                if (_functionInfoKinematic.RequiresHarmonicOrder)
                {
                    _requiresHarmonicOrder = true;
                }
            }
            if (_requiresHarmonicOrder)
            {
                _cylinderFunctionWithGasPressure.ReselectHarmonicOrder();
                _cylinderFunctionWithGasPressure.EnableHarmonicOrder();
            }
            else
            {
                _cylinderFunctionWithGasPressure.DisableHarmonicOrder();
                _cylinderFunctionWithGasPressure.DeselectHarmonicOrder();
            }
            #endregion "requires harmonic order"

            #region "requires indicator function"
            bool _requiresIndicatorFunction = false;
            if (e.FunctionInfoBase is FunctionInfoForce)
            {
                FunctionInfoForce _functionInfoForce = (FunctionInfoForce)e.FunctionInfoBase;

                if (_functionInfoForce.RequiresIndicatorFunction)
                {
                    _requiresIndicatorFunction = true;
                }
            }
            if (_requiresIndicatorFunction)
            {
                _cylinderFunctionWithGasPressure.EnableCylinderPressureVsCrankAngleIndicatorFunction();
            }
            else
            {
                _cylinderFunctionWithGasPressure.DisableCylinderPressureVsCrankAngleIndicatorFunction();
            }
            #endregion "requires indicator function"


            //pokličemo kar tega, da pohendlamo še enable/disable ok buttona
            this.tabControl1_SelectedIndexChanged(base.tabControl1, new EventArgs());
        }
Example #2
0
        private void cylinderFunctionWithGasPressure_Torque_FunctionChanged(object sender, FunctionEventArgs e)
        {
            CylinderFunctionWithGasPressure _cylinderFunctionWithGasPressure = (CylinderFunctionWithGasPressure)sender;

            #region "requires indicator function"
            bool _requiresIndicatorFunction = false;
            if (e.FunctionInfoBase is FunctionInfoTorque)
            {
                FunctionInfoTorque _functionInfoTorque = (FunctionInfoTorque)e.FunctionInfoBase;

                if (_functionInfoTorque.RequiresIndicatorFunction)
                {
                    _requiresIndicatorFunction = true;
                }
            }
            if (_requiresIndicatorFunction)
            {
                _cylinderFunctionWithGasPressure.EnableCylinderPressureVsCrankAngleIndicatorFunction();
            }
            else
            {
                _cylinderFunctionWithGasPressure.DisableCylinderPressureVsCrankAngleIndicatorFunction();
            }
            #endregion "requires indicator function"


            //pokličemo kar tega, da pohendlamo še enable/disable ok buttona
            this.tabControl1_SelectedIndexChanged(base.tabControl1, new EventArgs());
        }