From 74143a54c37284ae3d37d762711c095f5747ec3b Mon Sep 17 00:00:00 2001 From: Stephen Lloyd Date: Sun, 21 Jan 2024 16:20:14 +0100 Subject: [PATCH 01/11] Added support for if-else key words to Script window --- instat/instat.vbproj | 4 ++-- instat/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 305340244de..ff6ca7c9ce7 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -155,8 +155,8 @@ ..\packages\R.NET.1.8.2\lib\netstandard2.0\RDotNet.dll - - ..\packages\RInsightF461.0.0.7\lib\net461\RInsightF461.dll + + ..\packages\RInsightF461.0.0.8\lib\net461\RInsightF461.dll ..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll diff --git a/instat/packages.config b/instat/packages.config index 82fa6c86ff3..f9108d85782 100644 --- a/instat/packages.config +++ b/instat/packages.config @@ -11,7 +11,7 @@ - + From 93ab31fa10091635c646ae2460a91efd69fc5c06 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Thu, 25 Jan 2024 12:01:51 +0100 Subject: [PATCH 02/11] Some improvement made on Add Code control on General Graph dialog. --- instat/dlgGeneralForGraphics.Designer.vb | 2 +- instat/dlgGeneralForGraphics.vb | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/instat/dlgGeneralForGraphics.Designer.vb b/instat/dlgGeneralForGraphics.Designer.vb index 83bc3139f89..a175bff8c64 100644 --- a/instat/dlgGeneralForGraphics.Designer.vb +++ b/instat/dlgGeneralForGraphics.Designer.vb @@ -491,7 +491,7 @@ Partial Class dlgGeneralForGraphics Me.ucrInputAddCode.IsReadOnly = False Me.ucrInputAddCode.Location = New System.Drawing.Point(159, 362) Me.ucrInputAddCode.Name = "ucrInputAddCode" - Me.ucrInputAddCode.Size = New System.Drawing.Size(267, 21) + Me.ucrInputAddCode.Size = New System.Drawing.Size(316, 21) Me.ucrInputAddCode.TabIndex = 218 ' 'ucrChkAddCode diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 3db68c1e86d..43f6a624a73 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -167,7 +167,7 @@ Public Class dlgGeneralForGraphics ucrChkAddCode.SetText("Add Code:") ucrChkAddCode.AddToLinkedControls({ucrInputAddCode}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="") - ucrInputAddCode.SetItems({"geom_hline(yintercept=20)", "geom_vline(xintercept = 5)", "geom_vline(xintercept = 5)", "scale_x_binned()", "scale_x_binned(n.breaks=20)"}) + ucrInputAddCode.SetItems({"geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=""green"")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=""log10"", label=scales::dollar)"}) ucrSave.SetPrefix("graph") ucrSave.SetIsComboBox() @@ -272,6 +272,14 @@ Public Class dlgGeneralForGraphics TestOKEnabled() End Sub + Private Sub Reset() + ucrInputAddCode.ResetText() + End Sub + + Public Sub SetCalculationHistory() + ucrInputAddCode.AddItems({ucrInputAddCode.GetText()}) + End Sub + Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverX.AddAdditionalCodeParameterPair(clsLevelsFunction, New RParameter("y", ucrReceiverX.GetVariableNames(False), bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) ucrGraphicsSelector.SetRCode(clsGgplotFunction, bReset) @@ -297,6 +305,10 @@ Public Class dlgGeneralForGraphics TestOKEnabled() End Sub + Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk + SetCalculationHistory() + End Sub + Private Sub TestOKEnabled() If Not ucrSave.IsComplete OrElse (ucrReceiverX.IsEmpty AndAlso ucrReceiverY.IsEmpty) Then ucrBase.OKEnabled(False) From 9fd39ef16b1b0dc35d712bebe99df1268cdcf1fd Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Thu, 25 Jan 2024 12:07:59 +0100 Subject: [PATCH 03/11] minor code change --- instat/dlgGeneralForGraphics.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 43f6a624a73..ce2d5d0ef57 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -276,7 +276,7 @@ Public Class dlgGeneralForGraphics ucrInputAddCode.ResetText() End Sub - Public Sub SetCalculationHistory() + Private Sub SetCalculationHistory() ucrInputAddCode.AddItems({ucrInputAddCode.GetText()}) End Sub From 8327769f4d45386d2b9e4a61b24fe99949de9531 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Thu, 25 Jan 2024 12:38:17 +0100 Subject: [PATCH 04/11] minor change --- instat/dlgGeneralForGraphics.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index ce2d5d0ef57..19f1b534220 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -682,7 +682,7 @@ Public Class dlgGeneralForGraphics End Sub Private Sub UpdateParameters() - clsFacetVariablesOperator.RemoveParameterByName("wrap" & ucrInputStation.Name) + clsFacetVariablesOperator.RemoveParameterByName("var1") clsFacetColOp.RemoveParameterByName("col" & ucrInputStation.Name) clsFacetRowOp.RemoveParameterByName("row" & ucrInputStation.Name) From 6c8f76508ac2a7e2fec61fc386d6af093be0f161 Mon Sep 17 00:00:00 2001 From: Stephen Lloyd Date: Sun, 11 Feb 2024 12:22:30 +0100 Subject: [PATCH 05/11] upgraded to RInsightF461 0.0.9 --- instat/instat.vbproj | 4 ++-- instat/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/instat.vbproj b/instat/instat.vbproj index ff6ca7c9ce7..51d320a00d9 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -155,8 +155,8 @@ ..\packages\R.NET.1.8.2\lib\netstandard2.0\RDotNet.dll - - ..\packages\RInsightF461.0.0.8\lib\net461\RInsightF461.dll + + ..\packages\RInsightF461.0.0.9\lib\net461\RInsightF461.dll ..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll diff --git a/instat/packages.config b/instat/packages.config index f9108d85782..1e18339ce5d 100644 --- a/instat/packages.config +++ b/instat/packages.config @@ -11,7 +11,7 @@ - + From 7edaef224ea024daf5cc2aac17e8edb8c1d6adb4 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Tue, 13 Feb 2024 10:45:09 +0100 Subject: [PATCH 06/11] minor code change --- instat/dlgGeneralForGraphics.vb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 19f1b534220..537d0e96ea5 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -167,7 +167,7 @@ Public Class dlgGeneralForGraphics ucrChkAddCode.SetText("Add Code:") ucrChkAddCode.AddToLinkedControls({ucrInputAddCode}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="") - ucrInputAddCode.SetItems({"geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=""green"")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=""log10"", label=scales::dollar)"}) + ucrInputAddCode.SetItems({"geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=" & Chr(34) & "green" & Chr(34) & ")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=" & Chr(34) & "log10" & Chr(34) & ", label=scales::dollar)"}) ucrSave.SetPrefix("graph") ucrSave.SetIsComboBox() @@ -272,10 +272,6 @@ Public Class dlgGeneralForGraphics TestOKEnabled() End Sub - Private Sub Reset() - ucrInputAddCode.ResetText() - End Sub - Private Sub SetCalculationHistory() ucrInputAddCode.AddItems({ucrInputAddCode.GetText()}) End Sub From 0e376a79980083263a5513fe0c4d3ffe2849a7dc Mon Sep 17 00:00:00 2001 From: JUMA Date: Wed, 14 Feb 2024 13:07:41 +0300 Subject: [PATCH 07/11] help_ids --- instat/dlgCalculator.vb | 3 +++ instat/dlgCircular.vb | 1 + instat/dlgExportForClimpact.vb | 2 +- instat/dlgExportToClimsoft.vb | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 58002ce15bc..b544e8d7b90 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -198,10 +198,13 @@ Public Class dlgCalculator ucrBase.iHelpTopicID = 598 Case "Integer" Me.Width = iBasicWidth * 1.5 + ucrBase.iHelpTopicID = 463 Case "Complex" Me.Width = iBasicWidth * 1.5 + ucrBase.iHelpTopicID = 455 Case "List" Me.Width = iBasicWidth * 1.5 + ucrBase.iHelpTopicID = 439 Case Else Me.Width = iBasicWidth End Select diff --git a/instat/dlgCircular.vb b/instat/dlgCircular.vb index 433addfe9a9..18d089f3a7a 100644 --- a/instat/dlgCircular.vb +++ b/instat/dlgCircular.vb @@ -32,6 +32,7 @@ Public Class dlgCircular End Sub Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 520 ucrReceiverCircular.Selector = ucrSelectorCircular ucrReceiverCircular.SetMeAsReceiver() diff --git a/instat/dlgExportForClimpact.vb b/instat/dlgExportForClimpact.vb index 9949b76e5b6..91770b69bc6 100644 --- a/instat/dlgExportForClimpact.vb +++ b/instat/dlgExportForClimpact.vb @@ -37,7 +37,7 @@ Public Class dlgExportForClimpact End Sub Private Sub InitialiseDialog() - + ucrBase.iHelpTopicID = 506 ucrInputCodeMissingValues.SetParameter(New RParameter("missing_code", 6)) ucrInputCodeMissingValues.SetRDefault("-99.9") diff --git a/instat/dlgExportToClimsoft.vb b/instat/dlgExportToClimsoft.vb index 0bf4d4c6126..72c2faa3d8a 100644 --- a/instat/dlgExportToClimsoft.vb +++ b/instat/dlgExportToClimsoft.vb @@ -39,7 +39,7 @@ Public Class dlgExportToClimsoft End Sub Private Sub InitialiseDialog() - + ucrBase.iHelpTopicID=476 ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True ucrReceiverStation.Selector = ucrSelectorImportToClimsoft From cee753017c7cd94e138962cbadaaf3eea7b170f9 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Thu, 15 Feb 2024 11:52:21 +0100 Subject: [PATCH 08/11] Minor code change --- instat/dlgGeneralForGraphics.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 537d0e96ea5..9d2c9ed2d5c 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -167,7 +167,7 @@ Public Class dlgGeneralForGraphics ucrChkAddCode.SetText("Add Code:") ucrChkAddCode.AddToLinkedControls({ucrInputAddCode}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="") - ucrInputAddCode.SetItems({"geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=" & Chr(34) & "green" & Chr(34) & ")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=" & Chr(34) & "log10" & Chr(34) & ", label=scales::dollar)"}) + ucrInputAddCode.SetItems({"scale_colour_manual(values=c(" & Chr(34) & "red" & Chr(34) & "," & Chr(34) & "blue" & Chr(34) & "," & Chr(34) & "green" & Chr(34) & "," & Chr(34) & "black" & Chr(34) & "," & Chr(34) & "brown" & Chr(34) & "))", "scale_fill_manual(values = c(" & Chr(34) & "coral" & Chr(34) & "," & Chr(34) & "beige4" & Chr(34) & "," & Chr(34) & "gold" & Chr(34) & "," & Chr(34) & "cyan" & Chr(34) & "," & Chr(34) & "khaki" & Chr(34) & "," & Chr(34) & "orange" & Chr(34) & "," & Chr(34) & "orchid" & Chr(34) & "))", "geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=" & Chr(34) & "green" & Chr(34) & ")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=" & Chr(34) & "log10" & Chr(34) & ", label=scales::dollar)"}) ucrSave.SetPrefix("graph") ucrSave.SetIsComboBox() From 1a06230545510a407b616fb0bffbbee35684e9a0 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Thu, 15 Feb 2024 14:59:16 +0100 Subject: [PATCH 09/11] minor Change --- instat/dlgGeneralForGraphics.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 9d2c9ed2d5c..0efb0d1a226 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -167,7 +167,7 @@ Public Class dlgGeneralForGraphics ucrChkAddCode.SetText("Add Code:") ucrChkAddCode.AddToLinkedControls({ucrInputAddCode}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="") - ucrInputAddCode.SetItems({"scale_colour_manual(values=c(" & Chr(34) & "red" & Chr(34) & "," & Chr(34) & "blue" & Chr(34) & "," & Chr(34) & "green" & Chr(34) & "," & Chr(34) & "black" & Chr(34) & "," & Chr(34) & "brown" & Chr(34) & "))", "scale_fill_manual(values = c(" & Chr(34) & "coral" & Chr(34) & "," & Chr(34) & "beige4" & Chr(34) & "," & Chr(34) & "gold" & Chr(34) & "," & Chr(34) & "cyan" & Chr(34) & "," & Chr(34) & "khaki" & Chr(34) & "," & Chr(34) & "orange" & Chr(34) & "," & Chr(34) & "orchid" & Chr(34) & "))", "geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=" & Chr(34) & "green" & Chr(34) & ")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=" & Chr(34) & "log10" & Chr(34) & ", label=scales::dollar)"}) + ucrInputAddCode.SetItems({"scale_colour_manual(values=c(" & Chr(34) & "red" & Chr(34) & "," & Chr(34) & "blue" & Chr(34) & "," & Chr(34) & "green" & Chr(34) & "," & Chr(34) & "black" & Chr(34) & "," & Chr(34) & "brown" & Chr(34) & "))", "scale_fill_manual(values = c(" & Chr(34) & "coral" & Chr(34) & "," & Chr(34) & "bisque4" & Chr(34) & "," & Chr(34) & "gold" & Chr(34) & "," & Chr(34) & "cyan" & Chr(34) & "," & Chr(34) & "khaki" & Chr(34) & "," & Chr(34) & "orange" & Chr(34) & "," & Chr(34) & "orchid" & Chr(34) & "))", "geom_hline(yintercept=20)", "geom_vline(xintercept=5) + geom_hline(yintercept = 1)", "geom_vline(xintercept=c(1,3,5),colour=" & Chr(34) & "green" & Chr(34) & ")", "scale_x_binned()", "scale_x_binned(n.breaks=20)", "scale_y_continuous(trans=" & Chr(34) & "log10" & Chr(34) & ", label=scales::dollar)"}) ucrSave.SetPrefix("graph") ucrSave.SetIsComboBox() From af502b9f372deac67909af103c17e5600febf688 Mon Sep 17 00:00:00 2001 From: Stephen Lloyd Date: Fri, 16 Feb 2024 11:28:23 +0100 Subject: [PATCH 10/11] upgraded to RInsightF461 0.0.10, ensured that script in IDEMSInternational/R-Instat#8657 runs correctly --- instat/instat.vbproj | 4 ++-- instat/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 51d320a00d9..0fc4a673cdb 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -155,8 +155,8 @@ ..\packages\R.NET.1.8.2\lib\netstandard2.0\RDotNet.dll - - ..\packages\RInsightF461.0.0.9\lib\net461\RInsightF461.dll + + ..\packages\RInsightF461.0.0.10\lib\net461\RInsightF461.dll ..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll diff --git a/instat/packages.config b/instat/packages.config index 1e18339ce5d..30419269a79 100644 --- a/instat/packages.config +++ b/instat/packages.config @@ -11,7 +11,7 @@ - + From 842f659997b6943a3e506e6be99fa62548544253 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Fri, 16 Feb 2024 12:44:01 +0100 Subject: [PATCH 11/11] Minor Change --- instat/dlgGeneralForGraphics.vb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 0efb0d1a226..04112a21464 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -273,7 +273,11 @@ Public Class dlgGeneralForGraphics End Sub Private Sub SetCalculationHistory() - ucrInputAddCode.AddItems({ucrInputAddCode.GetText()}) + Dim newItem As String = ucrInputAddCode.GetText().Trim() + + If Not String.IsNullOrEmpty(newItem) AndAlso Not ucrInputAddCode.cboInput.Items.Contains(newItem) Then + ucrInputAddCode.AddItems({newItem}) + End If End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -301,10 +305,6 @@ Public Class dlgGeneralForGraphics TestOKEnabled() End Sub - Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk - SetCalculationHistory() - End Sub - Private Sub TestOKEnabled() If Not ucrSave.IsComplete OrElse (ucrReceiverX.IsEmpty AndAlso ucrReceiverY.IsEmpty) Then ucrBase.OKEnabled(False) @@ -802,6 +802,7 @@ Public Class dlgGeneralForGraphics End Sub Private Sub ucrChkAddCode_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddCode.ControlValueChanged, ucrInputAddCode.ControlValueChanged + SetCalculationHistory() If ucrChkAddCode.Checked AndAlso Not ucrInputAddCode.IsEmpty Then clsAddCodeOperator.AddParameter("code1", ucrInputAddCode.GetText(), bIncludeArgumentName:=False, iPosition:=1) clsBaseOperator.AddParameter("newcode", clsROperatorParameter:=clsAddCodeOperator, bIncludeArgumentName:=False)