Skip to content

Commit

Permalink
Merge pull request #262 from IDEMSInternational/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Vitalis95 authored Jul 19, 2024
2 parents 119cc68 + 9dc686f commit 508f5cc
Show file tree
Hide file tree
Showing 14 changed files with 188 additions and 158 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
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 508f5cc

Please sign in to comment.