Skip to content

Commit

Permalink
Merge branch 'IDEMSInternational:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmusyoka authored Aug 19, 2024
2 parents b56cd0d + 0b8d880 commit 1023f5c
Show file tree
Hide file tree
Showing 28 changed files with 1,701 additions and 1,372 deletions.
4 changes: 2 additions & 2 deletions instat/DlgDefineClimaticData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Public Class DlgDefineClimaticData
Dim kvpLongitude As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("lon", {"lon", "lont", "longitude"}.ToList())
Dim kvpLatitude As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("lat", {"lat", "latitude"}.ToList())
Dim kvpCloudCover As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("cloud_cover", {"cloud"}.ToList())
Dim kvpTempMax As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_max", {"tmax", "tx", "tempmax", "tmp_max"}.ToList())
Dim kvpTempMin As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_min", {"tmin", "tn", "tempmin", "tmp_min"}.ToList())
Dim kvpTempMax As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_max", {"tmax", "tx", "tempmax", "tmp_max", "tmpmax"}.ToList())
Dim kvpTempMin As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_min", {"tmin", "tn", "tempmin", "tmp_min", "tmpmin"}.ToList())
Dim kvpRadiation As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("radiation", {"radiation", "rad"}.ToList())
Dim kvpSunshineHours As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("sunshine_hours", {"sunshine", "sunh", "sunhrs"}.ToList())
Dim kvpWindDirection As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("wind_direction", {"winddirection"}.ToList())
Expand Down
13 changes: 7 additions & 6 deletions instat/dlgCalculator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Public Class dlgCalculator
SetDefaults()
bFirstLoad = False
End If
SetHelpOptions()
SetStructuredMenu()
ReopenDialog()
TestOKEnabled()
autoTranslate(Me)
Expand Down Expand Up @@ -75,7 +75,7 @@ Public Class dlgCalculator
bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore,
bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength)
ucrBase.Visible = True
SetHelpOptions()
SetStructuredMenu()
End Sub

Private Sub ReopenDialog()
Expand All @@ -85,6 +85,8 @@ Public Class dlgCalculator
End Sub

Private Sub InitialiseDialog()
ucrBase.iHelpTopicID = 14

ucrCalc.ucrReceiverForCalculation.SetMeAsReceiver()
ucrCalc.ucrTryCalculator.SetIsCommand()
ucrCalc.ucrTryCalculator.SetReceiver(ucrCalc.ucrReceiverForCalculation)
Expand Down Expand Up @@ -259,10 +261,8 @@ Public Class dlgCalculator
End If
End Sub

Private Sub SetHelpOptions()
Private Sub SetStructuredMenu()
Select Case enumCalculatorMode
Case CalculatorMode.Prepare
ucrBase.iHelpTopicID = 14
Case CalculatorMode.Structured
ucrCalc.ucrInputCalOptions.SetName("Circular")
ucrBase.iHelpTopicID = 677
Expand Down Expand Up @@ -322,7 +322,7 @@ Public Class dlgCalculator
Case "Symbols"
Me.Width = iBasicWidth * 2.56
Case "Goodness of Fit"
Me.Width = iBasicWidth * 1.27
Me.Width = iBasicWidth * 1.25
ucrBase.iHelpTopicID = 717
Case "Integer"
Me.Width = iBasicWidth * 1.5
Expand All @@ -335,6 +335,7 @@ Public Class dlgCalculator
ucrBase.iHelpTopicID = 439
Case Else
Me.Width = iBasicWidth
ucrBase.iHelpTopicID = 14
End Select
End Sub
End Class
Expand Down
741 changes: 460 additions & 281 deletions instat/dlgExportClimaticDefinitions.Designer.vb

Large diffs are not rendered by default.

222 changes: 170 additions & 52 deletions instat/dlgExportClimaticDefinitions.vb

Large diffs are not rendered by default.

33 changes: 23 additions & 10 deletions instat/dlgFindInVariableOrFilter.Designer.vb

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

18 changes: 16 additions & 2 deletions instat/dlgFindInVariableOrFilter.vb
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ Public Class dlgFindInVariableOrFilter
ucrChkIncludeRegularExpressions.SetParameter(New RParameter("use_regex", 4))
ucrChkIncludeRegularExpressions.SetValuesCheckedAndUnchecked("TRUE", "FALSE")

ucrPnlOptions.AddToLinkedControls({ucrInputPattern, ucrPnlSelect, ucrChkIgnoreCase, ucrChkIncludeRegularExpressions}, {rdoVariable}, bNewLinkedHideIfParameterMissing:=True)
ucrWholeValue.SetText("Whole Value")
ucrWholeValue.SetParameter(New RParameter("match_entire_cell", 5))
ucrWholeValue.SetValuesCheckedAndUnchecked("TRUE", "FALSE")

ucrPnlOptions.AddToLinkedControls({ucrInputPattern, ucrPnlSelect, ucrChkIgnoreCase, ucrChkIncludeRegularExpressions, ucrWholeValue}, {rdoVariable}, bNewLinkedHideIfParameterMissing:=True)
ucrInputPattern.SetLinkedDisplayControl(lblPattern)
ucrPnlSelect.SetLinkedDisplayControl(grpSelect)

ucrBase.OKEnabled(False)
ucrBase.cmdReset.Enabled = False
ucrBase.cmdReset.Enabled = True
End Sub

Private Sub SetDefaults()
Expand Down Expand Up @@ -113,6 +117,7 @@ Public Class dlgFindInVariableOrFilter
clsGetRowHeadersFunction.AddParameter("data", clsRFunctionParameter:=clsGetDataFrameFunction, iPosition:=0)
clsGetRowHeadersFunction.AddParameter("ignore_case", "TRUE", iPosition:=3)
clsGetRowHeadersFunction.AddParameter("use_regex", "FALSE", iPosition:=4)
clsGetRowHeadersFunction.AddParameter("match_entire_cell", "FALSE", iPosition:=5)

ucrReceiverVariable.SetMeAsReceiver()
cmdFindNext.Enabled = False
Expand All @@ -126,6 +131,7 @@ Public Class dlgFindInVariableOrFilter
ucrSelectorFind.SetRCode(clsGetDataFrameFunction, bReset)
ucrReceiverVariable.SetRCode(clsGetRowHeadersFunction, bReset)
ucrChkIgnoreCase.SetRCode(clsGetRowHeadersFunction, bReset)
ucrWholeValue.SetRCode(clsGetRowHeadersFunction, bReset)
ucrChkIncludeRegularExpressions.SetRCode(clsGetRowHeadersFunction, bReset)
ucrPnlOptions.SetRCode(clsDummyFunction, bReset)
ucrPnlSelect.SetRCode(clsDummyFunction, bReset)
Expand Down Expand Up @@ -155,6 +161,14 @@ Public Class dlgFindInVariableOrFilter
End If
End Function

Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
ucrSelectorFind.Reset()
rdoVariable.Checked = True
rdoCell.Checked = True
ucrReceiverVariable.Clear()
ucrInputPattern.cboInput.ResetText()
End Sub

Private Sub cmdFind_Click(sender As Object, e As EventArgs) Handles cmdFind.Click
Try
If rdoVariable.Checked OrElse rdoInFilter.Checked Then
Expand Down
12 changes: 8 additions & 4 deletions instat/dlgInventoryPlot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ Public Class dlgInventoryPlot
SetDefaults()
SetRCodeForControls(True)
TestOkEnabled()

End Sub

Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged
Expand All @@ -335,6 +334,7 @@ Public Class dlgInventoryPlot
clsInventoryPlot.iCallType = 3
clsInventoryPlot.bExcludeAssignedFunctionOutput = False
End If
AddClimateMissingFunction()
End Sub

Private Sub AddOrRemoveKeyFunctions()
Expand All @@ -347,13 +347,17 @@ Public Class dlgInventoryPlot
End If
End Sub

Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged
If ucrChkSummary.Checked Then
Private Sub AddClimateMissingFunction()
If rdoMissing.Checked AndAlso ucrChkSummary.Checked Then
ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1)
clsClimaticMissing.iCallType = 2
Else
ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing)
End If
End If
End Sub

Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged, ucrChkOmitEnd.ControlValueChanged, ucrChkOmitStart.ControlValueChanged
AddClimateMissingFunction()
AddOrRemoveKeyFunctions()
End Sub

Expand Down
16 changes: 0 additions & 16 deletions instat/dlgMerge.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ Imports instat
Imports instat.Translations

Public Class dlgMerge
Public enumMergeMode As String = MergeMode.Prepare
Public Enum MergeMode
Prepare
Climatic
End Enum

Private bFirstLoad As Boolean = True
Private clsMergeFunction As New RFunction
Private clsByListFunction As New RFunction
Expand All @@ -48,7 +42,6 @@ Public Class dlgMerge
SetDefaults()
End If
SetRCodeForControls(bReset)
SetHelpOptions()
bReset = False
SetMergingBy()
TestOKEnabled()
Expand Down Expand Up @@ -155,15 +148,6 @@ Public Class dlgMerge
SetMergingBy()
End Sub

Private Sub SetHelpOptions()
Select Case enumMergeMode
Case MergeMode.Prepare
ucrBase.iHelpTopicID = 60
Case MergeMode.Climatic
ucrBase.iHelpTopicID = 609
End Select
End Sub

Private Sub ucrInputJoinType_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputJoinType.ControlValueChanged
Dim bFound As Boolean = True

Expand Down
17 changes: 16 additions & 1 deletion instat/dlgMergeAdditionalData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ Imports instat.Translations
Imports RDotNet

Public Class dlgMergeAdditionalData
Public enumMergeMode As String = MergeMode.Prepare
Public Enum MergeMode
Prepare
Climatic
End Enum

Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
Private clsInsertColumnFunction, clsGetColumnsFromData, clsListFunction, clsImportDataFunction As New RFunction
Expand All @@ -39,13 +45,13 @@ Public Class dlgMergeAdditionalData
End If
SetRCodeforControls(bReset)
bReset = False
SetHelpOptions()
SetMergingBy()
autoTranslate(Me)
TestOkEnabled()
End Sub

Private Sub InitialiseDialog()
ucrBase.iHelpTopicID = 186
ucrToDataFrame.SetParameter(New RParameter("x", 0))
ucrToDataFrame.SetParameterIsRFunction()
ucrToDataFrame.SetLabelText("To Data Frame:")
Expand Down Expand Up @@ -111,6 +117,15 @@ Public Class dlgMergeAdditionalData
ucrChkSaveDataFrame.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset)
End Sub

Private Sub SetHelpOptions()
Select Case enumMergeMode
Case MergeMode.Prepare
ucrBase.iHelpTopicID = 186
Case MergeMode.Climatic
ucrBase.iHelpTopicID = 609
End Select
End Sub

Private Sub TestOkEnabled()
If ucrToDataFrame.cboAvailableDataFrames.Text <> "" AndAlso ucrFromDataFrame.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso
Not ucrReceiverSecond.IsEmpty() AndAlso bBySpecified AndAlso bJoinColsAreUnique Then
Expand Down
Loading

0 comments on commit 1023f5c

Please sign in to comment.