Skip to content

Commit

Permalink
Merge pull request #489 from IDEMSInternational/master
Browse files Browse the repository at this point in the history
updated my master
  • Loading branch information
Patowhiz authored Jul 28, 2024
2 parents d2c1d28 + 470eaea commit ce9e23a
Show file tree
Hide file tree
Showing 15 changed files with 199 additions and 163 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
3 changes: 3 additions & 0 deletions instat/dlgCalculator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -335,6 +337,7 @@ Public Class dlgCalculator
ucrBase.iHelpTopicID = 439
Case Else
Me.Width = iBasicWidth
ucrBase.iHelpTopicID = 14
End Select
End Sub
End Class
Expand Down
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 ce9e23a

Please sign in to comment.