Skip to content

Commit

Permalink
Merge pull request #61 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
updating master
  • Loading branch information
Vitalis95 authored May 30, 2022
2 parents 364c3b5 + 321853f commit 9c5c619
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 80 deletions.
54 changes: 27 additions & 27 deletions instat/dlgClimaticSummary.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 14 additions & 23 deletions instat/dlgClimaticSummary.vb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ Public Class dlgClimaticSummary
Private iReceiverMaxY As Integer
Private iReceiverLabelMaxY As Integer
Private bResetSubdialog As Boolean = False
Private clsDefaultFunction, clsConcFunction, clsSummariesList, clsDefaultFactors, clsDayFilterCalc, clsDayFilterCalcFromConvert, clsDayFilterCalcFromList, clsAddDateFunction As New RFunction
Private clsDefaultFunction, clsConcFunction, clsSummariesList,
clsDefaultFactors, clsDayFilterCalc, clsDayFilterCalcFromConvert,
clsDayFilterCalcFromList, clsAddDateFunction,
clsDummyFunction As New RFunction
Private clsFromAndToConditionOperator, clsFromConditionOperator, clsToConditionOperator As New ROperator

Private Sub dlgClimaticSummary_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Expand Down Expand Up @@ -59,27 +62,12 @@ Public Class dlgClimaticSummary
ucrSelectorVariable.SetParameterIsString()

'panel setting
ucrPnlAnnualWithin.AddRadioButton(rdoAnnual)
ucrPnlAnnualWithin.AddRadioButton(rdoAnnualWithinYear)
ucrPnlAnnualWithin.AddRadioButton(rdoWithinYear)
ucrPnlAnnualWithin.AddRadioButton(rdoStation)
ucrPnlAnnualWithin.AddRadioButton(rdoDaily)

ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "year", True)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "within_variable", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "date", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "within_variable", True)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "year", True)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "date", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "within_variable", True)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "year", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "date", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "within_variable", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "year", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "date", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "within_variable", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "year", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "date", True)
ucrPnlAnnualWithin.SetParameter(New RParameter("checked", 0))
ucrPnlAnnualWithin.AddRadioButton(rdoAnnual, "annual")
ucrPnlAnnualWithin.AddRadioButton(rdoAnnualWithinYear, "annual_within_year")
ucrPnlAnnualWithin.AddRadioButton(rdoWithinYear, "within_year")
ucrPnlAnnualWithin.AddRadioButton(rdoStation, "station")
ucrPnlAnnualWithin.AddRadioButton(rdoDaily, "daily")

'receivers:
' by receivers
Expand Down Expand Up @@ -167,6 +155,7 @@ Public Class dlgClimaticSummary
clsDefaultFactors = New RFunction
clsConcFunction = New RFunction
clsAddDateFunction = New RFunction
clsDummyFunction = New RFunction

clsFromAndToConditionOperator = New ROperator
clsDayFilterCalc = New RFunction
Expand All @@ -183,6 +172,8 @@ Public Class dlgClimaticSummary
ucrSelectorVariable.Reset()
ucrReceiverElements.SetMeAsReceiver()

clsDummyFunction.AddParameter("checked", "annual", iPosition:=0)

'TODO: this changes to from >= receiver and to <= receiver if annual-variable is checekd.
clsFromAndToConditionOperator.bToScriptAsRString = True
clsDayFilterCalc.SetRCommand("instat_calculation$new")
Expand Down Expand Up @@ -239,7 +230,7 @@ Public Class dlgClimaticSummary
ucrChkOmitMissing.SetRCode(clsDefaultFunction, bReset)
ucrReceiverDate.SetRCode(clsAddDateFunction, bReset)

ucrPnlAnnualWithin.SetRCode(clsDefaultFactors, bReset)
ucrPnlAnnualWithin.SetRCode(clsDummyFunction, bReset)
End Sub

'TODO: run these things at the correct times
Expand Down
Loading

0 comments on commit 9c5c619

Please sign in to comment.