From e1831f4665781af57813484bea9bda01cb3b8b85 Mon Sep 17 00:00:00 2001 From: Stephen Lloyd Date: Thu, 21 Mar 2024 09:28:56 +0100 Subject: [PATCH 1/5] Removed unused code from RCodeStructure --- instat/clsRCodeStructure.vb | 162 +++++++++++------------------------- instat/clsRFunction.vb | 6 -- instat/clsROperator.vb | 2 - 3 files changed, 50 insertions(+), 120 deletions(-) diff --git a/instat/clsRCodeStructure.vb b/instat/clsRCodeStructure.vb index 5e96db4c7fa..7e779ce852d 100644 --- a/instat/clsRCodeStructure.vb +++ b/instat/clsRCodeStructure.vb @@ -49,17 +49,17 @@ Public Class RCodeStructure ''' This could be a data frame, data frame colmun, model, graph etc. ''' If the output from the R command doesn't to be assigned, then this string is null or empty. ''' - Public _strAssignToObject As String - Public _strAssignToName As String - Public _strAssignToObjectTypeLabel As String - Public _strAssignToObjectFormat As String + Protected _strAssignToObject As String + Protected _strAssignToName As String + Protected _strAssignToObjectTypeLabel As String + Protected _strAssignToObjectFormat As String Public _strDataFrameNameToAddAssignToObject As String ''' ''' If true then a list of data frames is assigned (i.e. the R "_strAssignToName" ''' parameter needs to be an R string list). ''' - Private bDataFrameList As Boolean = False + Private _bDataFrameList As Boolean = False ''' If true then the R parameter "use_col_name_as_prefix" is set to true, ''' else the parameter is set to false. @@ -79,7 +79,7 @@ Public Class RCodeStructure ''' The name of the column to associate with the R "adjacent_column" parameter. ''' Only used when assigning to a column. ''' - Public strAdjacentColumn As String = "" + Private _strAdjacentColumn As String = "" ''' If true then there is no effect. ''' If false then set the R "require_correct_length" parameter to false. @@ -100,8 +100,7 @@ Public Class RCodeStructure ''' Note: This is currently only used in RSyntax as a before/after code to ''' determine whether the position code should be run in the list. ''' - Public iPosition = -1 ' TODO SJL 03/04/20 This seems to be a constant, should we declare it with 'const'? - 'TODO SJL 03/04/20 - Also, it only seems to be used by RSyntax. Move the constant to that class and give it a less confusing name? + Public iPosition = -1 ''' Deprecated. What to do with the result returned by executing the R code: ''' @@ -143,10 +142,6 @@ Public Class RCodeStructure ''' Public bExcludeAssignedFunctionOutput As Boolean = True - ''' This is used to clear the global environment of unused variables. - ''' - Public bClearFromGlobal As Boolean = False 'TODO SJL 03/04/20 This variable is never checked or set to true, can we remove? - ''' If true then 'clsRFunction.ToScript' and 'clsROperator.ToScript' return a string ''' that can be passed to R (i.e. double quotes are replaced with single quotes, ''' and the string is wrapped in double quotes). @@ -162,19 +157,6 @@ Public Class RCodeStructure ''' Tag object for any use. Public Tag As Object 'TODO SJL 03/04/20 This only seems to be used by dlgCalculationsSummary. Could we add something local to this dialog and then remove the tag from this calss? - ''' Event queue for all listeners interested in ParametersChanged events. - Public Event ParametersChanged() 'TODO SJL 03/04/20 Is this used? Can it be removed? - - ''' Executes the parameters changed action. - ''' - Protected Sub OnParametersChanged() - RaiseEvent ParametersChanged() - 'TODO SJL 03/04/20 Is this still used? Can it be removed? - ' Currently only used when this is in RSyntax as a before/after code to determine if - ' position code should be run in the list. This is because RSyntax has iCallType and - ' bExcludeAssignedFunctionOutput which it uses for the base code. Eventually migrate these out of RSyntax. - End Sub - '''-------------------------------------------------------------------------------------------- ''' Deprecated. @@ -288,10 +270,12 @@ Public Class RCodeStructure End Sub + '''-------------------------------------------------------------------------------------------- ''' ''' Gets the assign to variable ''' ''' assign to value + '''-------------------------------------------------------------------------------------------- Public Function GetRObjectToAssignTo() As String Return _strAssignToObject End Function @@ -300,19 +284,22 @@ Public Class RCodeStructure Return Not String.IsNullOrEmpty(_strAssignToObject) End Function + '''-------------------------------------------------------------------------------------------- ''' ''' Sets the assign to variable for objects that will not be added in the data book and displayed in the output viewer. ''' For instance objects used as input parameters for other R funtions ''' ''' The new value for the R object assignment string + '''-------------------------------------------------------------------------------------------- Public Sub SetAssignToObject(strRObjectToAssignTo As String) - Me._strAssignToObject = strRObjectToAssignTo - Me._strAssignToObjectTypeLabel = "" - Me._strAssignToObjectFormat = "" - Me._strDataFrameNameToAddAssignToObject = "" - Me._strAssignToName = "" + _strAssignToObject = strRObjectToAssignTo + _strAssignToObjectTypeLabel = "" + _strAssignToObjectFormat = "" + _strDataFrameNameToAddAssignToObject = "" + _strAssignToName = "" End Sub + '''-------------------------------------------------------------------------------------------- ''' ''' Sets the assign to variables for objects that will be added to the databook and possibly displayed in the output viewer. ''' To prevent the object from being diplayed in the output viewer, @@ -323,17 +310,18 @@ Public Class RCodeStructure ''' The new value for the object format ''' The new value for the data frame name that the object will be added to. ''' The new value for the object name + '''-------------------------------------------------------------------------------------------- Public Sub SetAssignToOutputObject(strRObjectToAssignTo As String, strRObjectTypeLabelToAssignTo As String, strRObjectFormatToAssignTo As String, Optional strRDataFrameNameToAddObjectTo As String = "", Optional strObjectName As String = "") - Me._strAssignToObject = strRObjectToAssignTo - Me._strAssignToObjectTypeLabel = strRObjectTypeLabelToAssignTo - Me._strAssignToObjectFormat = strRObjectFormatToAssignTo - Me._strDataFrameNameToAddAssignToObject = strRDataFrameNameToAddObjectTo - Me._strAssignToName = strObjectName + _strAssignToObject = strRObjectToAssignTo + _strAssignToObjectTypeLabel = strRObjectTypeLabelToAssignTo + _strAssignToObjectFormat = strRObjectFormatToAssignTo + _strDataFrameNameToAddAssignToObject = strRDataFrameNameToAddObjectTo + _strAssignToName = strObjectName End Sub Public Sub SetAssignToColumnObject(strColToAssignTo As String, @@ -345,26 +333,26 @@ Public Class RCodeStructure Optional bInsertColumnBefore As Boolean = False, Optional strAdjacentColumn As String = "") - Me._strAssignToObject = strColToAssignTo - Me._strAssignToObjectTypeLabel = RObjectTypeLabel.Column - Me._strDataFrameNameToAddAssignToObject = strRDataFrameNameToAddObjectTo - Me._strAssignToName = strColName + _strAssignToObject = strColToAssignTo + _strAssignToObjectTypeLabel = RObjectTypeLabel.Column + _strDataFrameNameToAddAssignToObject = strRDataFrameNameToAddObjectTo + _strAssignToName = strColName Me.bAssignToIsPrefix = bAssignToIsPrefix Me.bAssignToColumnWithoutNames = bAssignToColumnWithoutNames Me.bInsertColumnBefore = bInsertColumnBefore - Me.strAdjacentColumn = strAdjacentColumn + _strAdjacentColumn = strAdjacentColumn Me.bRequireCorrectLength = bRequireCorrectLength End Sub - Public Sub SetAssignToDataFrameObject(strDataFrameToAssignTo As String, + Private Sub SetAssignToDataFrameObject(strDataFrameToAssignTo As String, strDataFrameName As String, Optional bDataFrameList As Boolean = False) - Me._strAssignToObject = strDataFrameToAssignTo - Me._strAssignToObjectTypeLabel = RObjectTypeLabel.Dataframe - Me._strAssignToName = strDataFrameName - Me.bDataFrameList = bDataFrameList + _strAssignToObject = strDataFrameToAssignTo + _strAssignToObjectTypeLabel = RObjectTypeLabel.Dataframe + _strAssignToName = strDataFrameName + _bDataFrameList = bDataFrameList End Sub '''-------------------------------------------------------------------------------------------- @@ -380,10 +368,10 @@ Public Class RCodeStructure bAssignToColumnWithoutNames = False bInsertColumnBefore = False - Me._strAssignToObject = "" - Me._strAssignToName = "" - Me._strAssignToObjectTypeLabel = "" - Me._strAssignToObjectFormat = "" + _strAssignToObject = "" + _strAssignToName = "" + _strAssignToObjectTypeLabel = "" + _strAssignToObjectFormat = "" End Sub '''-------------------------------------------------------------------------------------------- @@ -479,8 +467,8 @@ Public Class RCodeStructure End If End If clsAddRObject.AddParameter("before", If(bInsertColumnBefore, "TRUE", "FALSE")) - If Not String.IsNullOrEmpty(strAdjacentColumn) Then - clsAddRObject.AddParameter("adjacent_column", strAdjacentColumn) + If Not String.IsNullOrEmpty(_strAdjacentColumn) Then + clsAddRObject.AddParameter("adjacent_column", _strAdjacentColumn) End If If Not bRequireCorrectLength Then clsAddRObject.AddParameter("require_correct_length", "FALSE") @@ -500,7 +488,7 @@ Public Class RCodeStructure 'for data frame object clsAddRObject.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_data") - If bDataFrameList Then + If _bDataFrameList Then clsAddRObject.AddParameter("data_tables", _strAssignToObject, iPosition:=0) If _strAssignToName <> "" Then clsAddRObject.AddParameter("data_names", _strAssignToName, iPosition:=5) @@ -665,33 +653,6 @@ Public Class RCodeStructure AddParameter(clsParam) End Sub - '''-------------------------------------------------------------------------------------------- - ''' TODO SJL 03/04/20 This function is not used, and is not overridden by any child classes. Can we remove? - ''' - ''' - ''' (Optional) Name of the parameter. - ''' (Optional) The parameter value. - ''' (Optional) The R code structure parameter. - ''' (Optional) True to include, false to exclude the argument - ''' name. - ''' (Optional) (Optional) The relative position of the - ''' parameter in this object's parameter list. - '''-------------------------------------------------------------------------------------------- - Public Overridable Sub AddParameterWithCodeStructure(Optional strParameterName As String = "", Optional strParameterValue As String = "", Optional clsRCodeObject As RCodeStructure = Nothing, Optional bIncludeArgumentName As Boolean = True, Optional iPosition As Integer = -1) - ' TODO Legacy - This should be call AddParameter but need to make it unambiguous with above. - ' TODO SJL 03/04/20 I think this function has a bug: If strParameterValue is specified then the - ' clsRFunctionParameter and clsROperatorParameter parameters will be ignored. - If TypeOf (clsRCodeObject) Is RFunction Then - AddParameter(strParameterName:=strParameterName, strParameterValue:=strParameterValue, - clsRFunctionParameter:=clsRCodeObject, bIncludeArgumentName:=bIncludeArgumentName, - iPosition:=iPosition) - ElseIf TypeOf (clsRCodeObject) Is ROperator Then - AddParameter(strParameterName:=strParameterName, strParameterValue:=strParameterValue, - clsROperatorParameter:=clsRCodeObject, bIncludeArgumentName:=bIncludeArgumentName, - iPosition:=iPosition) - End If - End Sub - '''-------------------------------------------------------------------------------------------- ''' If the object already has a parameter with the same name then changes the ''' parameter's value to the value in . @@ -743,7 +704,6 @@ Public Class RCodeStructure End If 'bIsAssigned = False 'parameters have changed so the output of the R command needs to be reassigned iNumberOfAddedParameters = iNumberOfAddedParameters + 1 - OnParametersChanged() 'TODO SJL 03/04/20 can this line be removed? End Sub '''-------------------------------------------------------------------------------------------- @@ -794,7 +754,9 @@ Public Class RCodeStructure End If End Sub + '''-------------------------------------------------------------------------------------------- ''' Sorts the parameters into position order. + '''-------------------------------------------------------------------------------------------- Public Sub SortParameters() 'This sub is used to reorder the parameters according to their Position property. 'It will be called only in places where it is necessary ie before ToScript or RemoveAdditionalParameters in ROperator. @@ -831,21 +793,6 @@ Public Class RCodeStructure End If End Function - ''' Removes all parameters that do not have a specified position - ''' (i.e. parameter's position is -1). - ''' - Public Sub RemoveUnorderedParameters() - 'TODO SJL 03/04/20 This function is not used, remove it? - Dim clsParam As RParameter - 'TODO SJL 03/04/20 This function only seems to remove the first unordered param, is this a bug? - If Not clsParameters Is Nothing Then - clsParam = clsParameters.Find(Function(x) x.Position = -1) - clsParameters.Remove(clsParam) - End If - 'bIsAssigned = False 'parameters have changed so the output of the R command needs to be reassigned - OnParametersChanged() 'TODO SJL 03/04/20 can this line be removed? - End Sub - '''-------------------------------------------------------------------------------------------- ''' Removes the parameter named . ''' @@ -862,8 +809,6 @@ Public Class RCodeStructure clsParam = clsParameters.Find(Function(x) x.strArgumentName = strArgName) clsParameters.Remove(clsParam) ' End If - 'bIsAssigned = False 'parameters have changed so the output of the R command needs to be reassigned - OnParametersChanged() 'TODO SJL 03/04/20 can this line be removed? End Sub '''-------------------------------------------------------------------------------------------- @@ -882,8 +827,6 @@ Public Class RCodeStructure clsParam = clsParameters.Find(Function(x) x.Position = iPosition) clsParameters.Remove(clsParam) End If - 'bIsAssigned = False 'parameters have changed so the output of the R command needs to be reassigned - OnParametersChanged() 'TODO SJL 03/04/20 can this line be removed? End Sub '''-------------------------------------------------------------------------------------------- @@ -896,8 +839,6 @@ Public Class RCodeStructure If Not clsParameters Is Nothing Then clsParameters.Remove(clsParam) End If - ' bIsAssigned = False 'parameters have changed so the output of the R command needs to be reassigned - OnParametersChanged() 'TODO SJL 03/04/20 can this line be removed? End Sub '''-------------------------------------------------------------------------------------------- @@ -926,22 +867,20 @@ Public Class RCodeStructure ''' Clears this object to its blank/initial state. Public Overridable Sub Clear() - 'TODO legacy tidy up iPosition iPosition = -1 iCallType = 0 bExcludeAssignedFunctionOutput = True - bClearFromGlobal = False bToScriptAsRString = False RemoveAssignTo() ClearParameters() End Sub + '''-------------------------------------------------------------------------------------------- ''' Clears the parameters. + '''-------------------------------------------------------------------------------------------- Public Overridable Sub ClearParameters() clsParameters.Clear() iNumberOfAddedParameters = 0 - 'bIsAssigned = False - OnParametersChanged() 'TODO SJL 03/04/20 can this line be removed? End Sub '''-------------------------------------------------------------------------------------------- @@ -953,13 +892,13 @@ Public Class RCodeStructure Dim clsTempCode As New RCodeStructure Dim clsRParam As RParameter - clsTempCode._strAssignToObject = Me._strAssignToObject - clsTempCode._strAssignToName = Me._strAssignToName - clsTempCode._strAssignToObjectTypeLabel = Me._strAssignToObjectTypeLabel - clsTempCode._strAssignToObjectFormat = Me._strAssignToObjectFormat - clsTempCode._strDataFrameNameToAddAssignToObject = Me._strDataFrameNameToAddAssignToObject + clsTempCode._strAssignToObject = _strAssignToObject + clsTempCode._strAssignToName = _strAssignToName + clsTempCode._strAssignToObjectTypeLabel = _strAssignToObjectTypeLabel + clsTempCode._strAssignToObjectFormat = _strAssignToObjectFormat + clsTempCode._strDataFrameNameToAddAssignToObject = _strDataFrameNameToAddAssignToObject - clsTempCode.bDataFrameList = bDataFrameList + clsTempCode._bDataFrameList = _bDataFrameList clsTempCode.bAssignToIsPrefix = bAssignToIsPrefix clsTempCode.bAssignToColumnWithoutNames = bAssignToColumnWithoutNames clsTempCode.bInsertColumnBefore = bInsertColumnBefore @@ -967,7 +906,6 @@ Public Class RCodeStructure clsTempCode.iPosition = iPosition clsTempCode.iCallType = iCallType clsTempCode.bExcludeAssignedFunctionOutput = bExcludeAssignedFunctionOutput - clsTempCode.bClearFromGlobal = bClearFromGlobal clsTempCode.bToScriptAsRString = bToScriptAsRString clsTempCode.Tag = Tag For Each clsRParam In clsParameters diff --git a/instat/clsRFunction.vb b/instat/clsRFunction.vb index a38465061d8..9659f559af0 100644 --- a/instat/clsRFunction.vb +++ b/instat/clsRFunction.vb @@ -41,11 +41,6 @@ Public Class RFunction ''' The R command's package name. Private strPackageName As String = "" - ''' Initializes a new instance of this class. - Public Sub New() - OnParametersChanged() 'TODO SJL is this still needed? - End Sub - '''-------------------------------------------------------------------------------------------- ''' Sets the R command's name (e.g. "facet_grid") and flags that the R script ''' associated with this object is no longer correctly assigned. @@ -228,7 +223,6 @@ Public Class RFunction clsRFunction.iPosition = iPosition clsRFunction.iCallType = iCallType clsRFunction.bExcludeAssignedFunctionOutput = bExcludeAssignedFunctionOutput - clsRFunction.bClearFromGlobal = bClearFromGlobal clsRFunction.bToScriptAsRString = bToScriptAsRString clsRFunction.Tag = Tag For Each clsRParam In clsParameters diff --git a/instat/clsROperator.vb b/instat/clsROperator.vb index 6286b4ae5c2..20595b518e7 100644 --- a/instat/clsROperator.vb +++ b/instat/clsROperator.vb @@ -277,7 +277,6 @@ Public Class ROperator Else clsParameters.Clear() End If - OnParametersChanged() End Sub ''' Clears this object to its blank/initial state. @@ -310,7 +309,6 @@ Public Class ROperator clsTempROperator.iPosition = iPosition clsTempROperator.iCallType = iCallType clsTempROperator.bExcludeAssignedFunctionOutput = bExcludeAssignedFunctionOutput - clsTempROperator.bClearFromGlobal = bClearFromGlobal clsTempROperator.bToScriptAsRString = bToScriptAsRString clsTempROperator.Tag = Tag For Each clsRParam In clsParameters From 2dcd168566a39f068f5b7672a8073092038ba31e Mon Sep 17 00:00:00 2001 From: Stephen Lloyd Date: Thu, 21 Mar 2024 10:22:33 +0100 Subject: [PATCH 2/5] removed unused line --- instat/clsROperator.vb | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/instat/clsROperator.vb b/instat/clsROperator.vb index 20595b518e7..fa6fdf727e2 100644 --- a/instat/clsROperator.vb +++ b/instat/clsROperator.vb @@ -94,7 +94,6 @@ Public Class ROperator Public Sub SetOperation(strTemp As String, Optional bBracketsTemp As Boolean = True) strOperation = strTemp bBrackets = bBracketsTemp - 'bIsAssigned = False End Sub '''-------------------------------------------------------------------------------------------- @@ -264,21 +263,6 @@ Public Class ROperator Return Nothing End Function - ''' Removes all additional parameters. - Public Sub RemoveAllAdditionalParameters() - 'TODO SJL 03/04/20 this function is only used by 1 dialog. This hints that there may be an alternative way of doing the same thing. - ' It's also suspicious that the other RCodeStructure classes don't have such a function. Why is it only needed for an operator? - ' Can this function be removed? - SortParameters() 'This is used to bring the parameter with position 0 to the front if it exists, then clear all the others using range. - If clsParameters(0).Position = 0 Then - If clsParameters.Count > 1 Then - clsParameters.RemoveRange(1, clsParameters.Count - 1) - End If - Else - clsParameters.Clear() - End If - End Sub - ''' Clears this object to its blank/initial state. Public Overrides Sub Clear() SetOperation("") From 3e70fb27dc4b5526bcbc46c37eca08d9acb70fc3 Mon Sep 17 00:00:00 2001 From: Stephen Lloyd Date: Mon, 25 Mar 2024 09:52:59 +0100 Subject: [PATCH 3/5] Corrected comments --- instat/clsRCodeStructure.vb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/instat/clsRCodeStructure.vb b/instat/clsRCodeStructure.vb index 7e779ce852d..1044c69d182 100644 --- a/instat/clsRCodeStructure.vb +++ b/instat/clsRCodeStructure.vb @@ -149,8 +149,7 @@ Public Class RCodeStructure ''' For example: seq(from = 1, to = 10) becomes "seq(from = 1, to = 10)". ''' ''' Note: if true then the returned string can no longer be used for the - ''' function or its parameters because it will not produce the correct script - ''' (i.e. it should not be true if 'bToBeAssigned' or 'bIsAssigned' is true. + ''' function or its parameters because it will not produce the correct script. ''' Public bToScriptAsRString As Boolean = False @@ -416,8 +415,6 @@ Public Class RCodeStructure ''' ''' This function sets the value of several data members. It stores the new ''' assign-to script in 'strAssignTo' (replacing the previous value stored). - ''' This function also updates the 'bIsAssigned' and 'bToBeAssigned' flags that - ''' store this object's assignment status. ''' ''' ''' [in,out] (Optional) The existing script including any From e52df1352c364ab3956cf0894215941da77364bb Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 25 Mar 2024 15:47:07 +0300 Subject: [PATCH 4/5] changes to the code --- instat/dlgInventoryPlot.vb | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 36b10d5af5b..4ef4427aae9 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -253,7 +253,6 @@ Public Class dlgInventoryPlot ucrInventoryPlotSelector.SetRCode(clsInventoryPlot, bReset) ucrReceiverDate.SetRCode(clsInventoryPlot, bReset) - ucrReceiverElements.SetRCode(clsInventoryPlot, bReset) ucrChkFlipCoordinates.SetRCode(clsInventoryPlot, bReset) ucrInputTitle.SetRCode(clsInventoryPlot, bReset) ucrChkDisplayRainDays.SetRCode(clsInventoryPlot, bReset) @@ -262,7 +261,6 @@ Public Class dlgInventoryPlot ucrInputFacetBy.SetRCode(clsInventoryPlot, bReset) ucrSaveGraph.SetRCode(clsInventoryPlot, bReset) ucrReceiverStation.SetRCode(clsInventoryPlot, bReset) - ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkYear.SetRCode(clsClimaticDetails, bReset) ucrChkMonth.SetRCode(clsClimaticDetails, bReset) ucrChkDay.SetRCode(clsClimaticDetails, bReset) @@ -274,6 +272,8 @@ Public Class dlgInventoryPlot If bReset Then ucrPnlOptions.SetRCode(clsDummyFunction, bReset) ucrChkSummary.SetRCode(clsDummyFunction, bReset) + ucrReceiverElements.SetRCode(clsInventoryPlot, bReset) + ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) End If End Sub @@ -336,7 +336,6 @@ Public Class dlgInventoryPlot clsInventoryPlot.iCallType = 3 clsInventoryPlot.bExcludeAssignedFunctionOutput = False End If - End Sub Private Sub AddOrRemoveKeyFunctions() @@ -350,27 +349,21 @@ Public Class dlgInventoryPlot End Sub Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged - If rdoMissing.Checked Then - If ucrChkSummary.Checked Then - ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) - clsClimaticMissing.iCallType = 2 - Else - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) - End If - AddOrRemoveKeyFunctions() + If ucrChkSummary.Checked Then + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) + clsClimaticMissing.iCallType = 2 Else ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) - End If + End If + AddOrRemoveKeyFunctions() End Sub Private Sub ucrChkDetails_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDetails.ControlValueChanged If ucrChkDetails.Checked Then - ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticDetails, iPosition:=2) - ucrBase.clsRsyntax.AddToAfterCodes(clsDataFrameFunction, iPosition:=3) + ucrBase.clsRsyntax.AddToAfterCodes(clsDataFrameFunction, iPosition:=2) clsCumulativeInventoryFunction.AddParameter("data", clsRFunctionParameter:=clsClimaticDetails, iPosition:=0) clsClimaticDetails.iCallType = 2 Else - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsDataFrameFunction) End If From e45969e0d23050101bbeec8d26f949c5ea1946d8 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 25 Mar 2024 15:53:44 +0300 Subject: [PATCH 5/5] changes --- instat/dlgInventoryPlot.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 4ef4427aae9..ca4fe3055d8 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -268,7 +268,6 @@ Public Class dlgInventoryPlot ucrChkOmitStart.SetRCode(clsClimaticMissing, bReset) ucrChkOmitEnd.SetRCode(clsClimaticMissing, bReset) ucrPnlOrder.SetRCode(clsClimaticDetails, bReset) - If bReset Then ucrPnlOptions.SetRCode(clsDummyFunction, bReset) ucrChkSummary.SetRCode(clsDummyFunction, bReset)