Skip to content

Commit

Permalink
Merge pull request #43 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
updating master
  • Loading branch information
shadrackkibet authored Sep 19, 2017
2 parents d06ca88 + bbac71e commit 384b928
Show file tree
Hide file tree
Showing 5 changed files with 276 additions and 287 deletions.
4 changes: 2 additions & 2 deletions instat/dlgColumnStats.Designer.vb

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

8 changes: 6 additions & 2 deletions instat/dlgConvertColumns.vb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Public Class dlgConvertColumns

Private Sub ReopenDialog()
SetToFactorStatus(bToFactorOnly)
If rdoNumeric.Checked Then
grpFactorToNumericOptions.Visible = True
Else
grpFactorToNumericOptions.Visible = False
End If
End Sub

Private Sub InitialiseDialog()
Expand All @@ -65,6 +70,7 @@ Public Class dlgConvertColumns
ucrPnlConvertTo.AddRadioButton(rdoCharacter, Chr(34) & "character" & Chr(34))
ucrPnlConvertTo.AddRadioButton(rdoInteger, Chr(34) & "integer" & Chr(34))
ucrPnlConvertTo.AddToLinkedControls(ucrChkSpecifyDecimalsToDisplay, {rdoFactor, rdoOrderedFactor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlConvertTo.AddToLinkedControls(ucrPnlFactorToNumericOptions, {rdoNumeric}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoDefault)

ucrPnlFactorToNumericOptions.SetParameter(New RParameter("factor_values", 3))
ucrPnlFactorToNumericOptions.AddRadioButton(rdoDefault, "NULL")
Expand All @@ -73,8 +79,6 @@ Public Class dlgConvertColumns
ucrPnlFactorToNumericOptions.SetRDefault("NULL")
ucrPnlFactorToNumericOptions.SetLinkedDisplayControl(grpFactorToNumericOptions)

ucrPnlConvertTo.AddToLinkedControls(ucrPnlFactorToNumericOptions, {rdoNumeric}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)

ucrChkSpecifyDecimalsToDisplay.SetParameter(New RParameter("set_digits", 4))
ucrChkSpecifyDecimalsToDisplay.SetText("Specify Decimals (from Numeric)")
ucrChkSpecifyDecimalsToDisplay.SetValuesCheckedAndUnchecked("TRUE", "FALSE")
Expand Down
15 changes: 14 additions & 1 deletion instat/dlgReplaceValues.vb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,23 @@ Public Class dlgReplaceValues
ucrPnlOld.AddRadioButton(rdoOldMissing)
ucrPnlOld.AddRadioButton(rdoOldInterval)

ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "old_value")
ucrPnlOld.AddParameterValuesCondition(rdoOldMissing, "old_is_missing", "TRUE")
ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "old_is_missing", False)
ucrPnlOld.AddParameterPresentCondition(rdoOldInterval, "old_is_missing", False)

ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "old_value")
ucrPnlOld.AddParameterPresentCondition(rdoOldMissing, "old_value", False)
ucrPnlOld.AddParameterPresentCondition(rdoOldInterval, "old_value", False)

ucrPnlOld.AddParameterPresentCondition(rdoOldInterval, "start_value")
ucrPnlOld.AddParameterPresentCondition(rdoOldMissing, "start_value", False)
ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "start_value", False)

ucrPnlOld.AddParameterPresentCondition(rdoOldInterval, "end_value")
ucrPnlOld.AddParameterPresentCondition(rdoOldMissing, "end_value", False)
ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "end_value", False)

ucrPnlOld.AddToLinkedControls(ucrPnlNew, {rdoOldInterval, rdoOldValue, rdoOldMissing}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoNewMissing)
ucrPnlOld.AddToLinkedControls(ucrInputOldValue, {rdoOldValue}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True)
ucrPnlOld.AddToLinkedControls(ucrInputRangeFrom, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0)
ucrPnlOld.AddToLinkedControls(ucrInputRangeTo, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1)
Expand Down Expand Up @@ -206,6 +218,7 @@ Public Class dlgReplaceValues
clsReplace.RemoveParameterByName("locf")
clsReplace.RemoveParameterByName("from_last")
End If
Else
End If
End Sub

Expand Down
10 changes: 6 additions & 4 deletions instat/sdgProportionsPercentages.vb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ Public Class sdgProportionsPercentages
ucrChkProportionsPercentages.SetRDefault(Chr(34) & "none" & Chr(34))
ucrChkProportionsPercentages.SetText("Calculate Proportions or Percentages")

ucrPnlBY.AddToLinkedControls({ucrReceiverByFactor, ucrChkDisplayAsDecimal}, {rdoByFactors}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrChkProportionsPercentages.AddToLinkedControls({ucrPnlBY, ucrSelectorProportionsPercentiles}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoByFactors)
ucrPnlBY.AddToLinkedControls(ucrReceiverColumn, {rdoByColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlBY.AddToLinkedControls(ucrReceiverFilter, {rdoByFilter}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlBY.AddToLinkedControls(ucrReceiverByFactor, objValues:={rdoByFactors}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlBY.AddToLinkedControls(ucrChkDisplayAsDecimal, objValues:={rdoByFactors}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrChkProportionsPercentages.AddToLinkedControls(ucrPnlBY, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoByFactors)
ucrChkProportionsPercentages.AddToLinkedControls(ucrSelectorProportionsPercentiles, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlBY.AddToLinkedControls(ucrReceiverColumn, objValues:={rdoByColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlBY.AddToLinkedControls(ucrReceiverFilter, objValues:={rdoByFilter}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrReceiverByFactor.SetLinkedDisplayControl(lblByFactors)
ucrReceiverColumn.SetLinkedDisplayControl(lblColumn)
ucrChkDisplayAsDecimal.SetLinkedDisplayControl(grpOptions)
Expand Down
Loading

0 comments on commit 384b928

Please sign in to comment.