コード例 #1
0
        public IndicatorFunction()
        {
            InitializeComponent();


            this.comboBox_InterpolateMissingValues.Items.Clear();
            this.comboBox_InterpolateMissingValues.Items.AddRange(InterpolationMethodInfo.GetAvailableInterpolationMethods());
            this.comboBox_InterpolateMissingValues.SelectedItem = this.comboBox_InterpolateMissingValues.Items[0];
        }
コード例 #2
0
 protected virtual void OnIndicatorFunctionChanged(Function _function, InterpolationMethodInfo _interpolationMethodInfo)
 {
     if (this.indicatorFunctionChanged != null)
     {
         this.indicatorFunctionChanged(
             this,
             new IndicatorFunctionEventArgs(
                 _function,
                 _interpolationMethodInfo));
     }
 }
コード例 #3
0
        public override bool Equals(object obj)
        {
            if (obj is InterpolationMethodInfo)
            {
                InterpolationMethodInfo _interpolationMethodInfo = (InterpolationMethodInfo)obj;

                if (this.name == _interpolationMethodInfo.name)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            return(base.Equals(obj));
        }
コード例 #4
0
 public IndicatorFunctionEventArgs(Function _function, InterpolationMethodInfo _interpolationMethodInfo)
 {
     this.function = _function;
     this.interpolationMethodInfo = _interpolationMethodInfo;
 }
コード例 #5
0
 protected virtual void OnCylinderPressureVsCrankAngleIndicatorFunctionChanged(Function _function, InterpolationMethodInfo _interpolationMethodInfo)
 {
     if (this.cylinderPressureVsCrankAngleIndicatorFunctionChanged != null)
     {
         this.cylinderPressureVsCrankAngleIndicatorFunctionChanged(
             this,
             new IndicatorFunctionEventArgs(
                 _function,
                 _interpolationMethodInfo));
     }
 }
コード例 #6
0
        public CylinderFunctionWithGasPressure(FunctionInfoBase[] _availableFunctions, PositionedCylinder[] _availablePositionedCylinders, HarmonicOrderInfo[] _availableHarmonicOrders,
                                               Function _selectedCylinderPressureVsCrankAngleIndicatorFunction, FileInfo _selectedIndicatorFunctionFile, InterpolationMethodInfo _selectedInterpolationMethod)
            : base(_availableFunctions, _availablePositionedCylinders, _availableHarmonicOrders)
        {
            InitializeComponent();


            this.indicatorFunction_CylinderPressureVsCrankAngle.SelectedIndicatorFunction     = _selectedCylinderPressureVsCrankAngleIndicatorFunction;
            this.indicatorFunction_CylinderPressureVsCrankAngle.SelectedIndicatorFunctionFile = _selectedIndicatorFunctionFile;
            this.indicatorFunction_CylinderPressureVsCrankAngle.SelectedInterpolationMethod   = _selectedInterpolationMethod;
        }
コード例 #7
0
        public Form_AddAFunctionForce(ChartAreaInfo[] _availableChartAreas, PositionedCylinder[] _availablePositionedCylinders,
                                      Function _selectedCylinderPressureVsCrankAngleIndicatorFunction, FileInfo _selectedIndicatorFunctionFile, InterpolationMethodInfo _selectedInterpolationMethod)
            : base(_availableChartAreas, _availablePositionedCylinders)
        {
            this.Constructor();


            this.cylinderFunctionWithGasPressure_Force.AvailablePositionedCylinders = _availablePositionedCylinders;
            this.cylinderFunctionWithGasPressure_Force.AvailableFunctions           = FunctionInfoForce.GetAvailableFunctions();
            this.cylinderFunctionWithGasPressure_Force.AvailableHarmonicOrders      = new HarmonicOrderInfo[]
            {
                HarmonicOrderInfo.Full,
                HarmonicOrderInfo.FirstApproximation,
                HarmonicOrderInfo.SecondApproximation,
            };

            this.cylinderFunctionWithGasPressure_Force.SelectedCylinderPressureVsCrankAngleIndicatorFunction     = _selectedCylinderPressureVsCrankAngleIndicatorFunction;
            this.cylinderFunctionWithGasPressure_Force.SelectedCylinderPressureVsCrankAngleIndicatorFunctionFile = _selectedIndicatorFunctionFile;
            this.cylinderFunctionWithGasPressure_Force.SelectedCylinderPressureVsCrankAngleIndicatorFunctionInterpolationMethod = _selectedInterpolationMethod;


            //disablamo, ker je po defaultu izbrana neustrezna funkcija za to
            this.cylinderFunctionWithGasPressure_Force.DisableHarmonicOrder();
            this.cylinderFunctionWithGasPressure_Force.DeselectHarmonicOrder();


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