diff --git a/instat/dlgEvapotranspiration.vb b/instat/dlgEvapotranspiration.vb index 13e70ffc238..45452879aa7 100644 --- a/instat/dlgEvapotranspiration.vb +++ b/instat/dlgEvapotranspiration.vb @@ -226,8 +226,6 @@ Public Class dlgEvapotranspiration clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPMFunction, iPosition:=0) clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPMFunction, iPosition:=1) clsReadInputsFunction.AddParameter("missing_method", Chr(34) & "monthly average" & Chr(34), iPosition:=8) - clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPTFunction, iPosition:=10) - clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPTFunction, iPosition:=11) clsReadInputsFunction.SetAssignTo("temp_data") clsVarnamesVectorPTFunction.SetRCommand("c") @@ -295,6 +293,8 @@ Public Class dlgEvapotranspiration ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) ucrBase.clsRsyntax.AddToBeforeCodes(clsListFunction, iPosition:=1) + + Constants() End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -316,7 +316,6 @@ Public Class dlgEvapotranspiration ucrReceiverTmin.SetRCode(clsDataFunctionPMFunction, bReset) ucrReceiverHumidityMax.SetRCode(clsDataFunctionPMFunction, bReset) ucrReceiverHumidityMin.SetRCode(clsDataFunctionPMFunction, bReset) - ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset) ucrInputTimeStep.SetRCode(clsETPenmanMonteithFunction, bReset) ucrInputCrop.SetRCode(clsETPenmanMonteithFunction, bReset) ucrChkWind.SetRCode(clsETPenmanMonteithFunction, bReset) @@ -324,6 +323,7 @@ Public Class dlgEvapotranspiration ucrPnlMethod.SetRCode(clsBaseOperator, bReset) ucrNudAlpha.SetRCode(clsETPriestleyTaylorFunction, bReset) If bReset Then + ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset) ucrInputSolar.SetRCode(clsETPenmanMonteithFunction, bReset) End If End Sub @@ -488,9 +488,9 @@ Public Class dlgEvapotranspiration Private Sub ucrReceiverWindSpeed_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWindSpeed.ControlValueChanged, ucrChkWind.ControlValueChanged If ucrChkWind.Checked AndAlso Not ucrReceiverWindSpeed.IsEmpty Then - clsVarnamesVectorPMFunction.AddParameter("u2", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorPMFunction.AddParameter("x", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False) Else - clsVarnamesVectorPMFunction.RemoveParameterByName("u2") + clsVarnamesVectorPMFunction.RemoveParameterByName("x") ucrReceiverHumidityMax.SetMeAsReceiver() End If End Sub @@ -610,7 +610,7 @@ Public Class dlgEvapotranspiration Solar() End Sub - Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged, ucrChkWind.ControlContentsChanged + Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged TestOKEnabled() End Sub End Class