Skip to content

Commit

Permalink
Merge pull request #194 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
updating branch
  • Loading branch information
maxwellfundi authored Aug 18, 2017
2 parents 4d0baa2 + 2175d4e commit 3b3adf9
Show file tree
Hide file tree
Showing 292 changed files with 3,534 additions and 2,385 deletions.
16 changes: 8 additions & 8 deletions instat/dlgClimaticSummary.Designer.vb

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

30 changes: 20 additions & 10 deletions instat/dlgClimaticSummary.vb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ Public Class dlgClimaticSummary
ucrSelectorVariable.SetParameterIsString()

'panel setting
ucrPnlAnnual.AddRadioButton(rdoAnnual)
ucrPnlAnnual.AddRadioButton(rdoAnnualVariable)
ucrPnlAnnual.AddRadioButton(rdoWithinYear)
ucrPnlAnnualWithin.AddRadioButton(rdoAnnual)
ucrPnlAnnualWithin.AddRadioButton(rdoAnnualVariable)
ucrPnlAnnualWithin.AddRadioButton(rdoWithinYear)

ucrPnlAnnual.AddParameterPresentCondition(rdoWithinYear, "within_variable", True)
ucrPnlAnnual.AddParameterPresentCondition(rdoAnnual, "within_variable", False)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "within_variable", True)
ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "within_variable", False)

'receivers:
' by receivers
Expand Down Expand Up @@ -132,8 +132,8 @@ Public Class dlgClimaticSummary
'linking controls
'ucrPnlAnnual.AddToLinkedControls(ucrNudFrom, {rdoAnnual, rdoWithinYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1)
'ucrPnlAnnual.AddToLinkedControls(ucrNudTo, {rdoAnnual, rdoWithinYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=366)
ucrPnlAnnual.AddToLinkedControls({ucrReceiverFrom, ucrReceiverTo}, {rdoAnnualVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlAnnual.AddToLinkedControls({ucrReceiverWithinYear}, {rdoWithinYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlAnnualWithin.AddToLinkedControls({ucrReceiverFrom, ucrReceiverTo}, {rdoAnnualVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlAnnualWithin.AddToLinkedControls({ucrReceiverWithinYear}, {rdoWithinYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)

ucrNudFrom.SetLinkedDisplayControl(lblFrom)
ucrNudTo.SetLinkedDisplayControl(lblTo)
Expand Down Expand Up @@ -186,6 +186,7 @@ Public Class dlgClimaticSummary

ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction)
bResetSubdialog = True
ReceiverFocus()
End Sub

Private Sub SetRCodeForControls(bReset As Boolean)
Expand All @@ -197,8 +198,10 @@ Public Class dlgClimaticSummary

ucrSelectorVariable.SetRCode(clsDefaultFunction, bReset)
ucrReceiverElement.SetRCode(clsDefaultFunction, bReset)
ucrChkStoreResults.SetRCode(clsDefaultFunction, bReset)
ucrChkPrintOutput.SetRCode(clsDefaultFunction, bReset)

ucrPnlAnnual.SetRCode(clsDefaultFactors, bReset)
ucrPnlAnnualWithin.SetRCode(clsDefaultFactors, bReset)
ucrReceiverStation.SetRCode(clsDefaultFactors, bReset)
ucrReceiverYear.SetRCode(clsDefaultFactors, bReset)
ucrReceiverWithinYear.SetRCode(clsDefaultFactors, bReset)
Expand Down Expand Up @@ -231,6 +234,12 @@ Public Class dlgClimaticSummary
End If
End Sub

Private Sub ReceiverFocus()
If rdoAnnual.Checked Then
ucrReceiverStation.SetMeAsReceiver()
End If
End Sub

Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
SetDefaults()
SetRCodeForControls(True)
Expand All @@ -253,15 +262,16 @@ Public Class dlgClimaticSummary
DayBoundaries()
End Sub

Private Sub ucrPnlAnnual_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlAnnual.ControlValueChanged
Private Sub ucrPnlAnnualWithin_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlAnnualWithin.ControlValueChanged
ReceiverFocus()
If rdoWithinYear.Checked Then
clsDefaultFactors.AddParameter("within_variable", ucrReceiverWithinYear.GetVariableNames, bIncludeArgumentName:=False, iPosition:=2)
Else
clsDefaultFactors.RemoveParameterByName("within_variable")
End If
End Sub

Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnual.ControlContentsChanged, ucrNudTo.ControlContentsChanged, ucrNudFrom.ControlContentsChanged, ucrReceiverFrom.ControlContentsChanged, ucrReceiverTo.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged
Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnualWithin.ControlContentsChanged, ucrNudTo.ControlContentsChanged, ucrNudFrom.ControlContentsChanged, ucrReceiverFrom.ControlContentsChanged, ucrReceiverTo.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged
TestOKEnabled()
End Sub
End Class
20 changes: 10 additions & 10 deletions instat/dlgClimdex.Designer.vb

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

Loading

0 comments on commit 3b3adf9

Please sign in to comment.