Skip to content

Commit

Permalink
Merge pull request #9290 from Vitalis95/display_2_3Var
Browse files Browse the repository at this point in the history
Improved the skim option in the 2/3 Variable summarise dialog
  • Loading branch information
N-thony authored Dec 3, 2024
2 parents 9391ca3 + 98e8c12 commit b3383be
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 4 deletions.
17 changes: 17 additions & 0 deletions instat/clsInstatOptions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Imports RDotNet
Public bIncludeRDefaultParameters As Nullable(Of Boolean)
Public iPreviewRows As Nullable(Of Integer)
Public iMaxRows As Nullable(Of Integer)
Public iMaxWidth As Nullable(Of Integer)
Public iMaxCols As Nullable(Of Integer)
Public iUndoColLimit As Nullable(Of Integer)
Public iUndoRowLimit As Nullable(Of Integer)
Expand Down Expand Up @@ -78,6 +79,7 @@ Imports RDotNet
clrEditor = clsInstatOptionsDefaults.DEFAULTclrEditor
iPreviewRows = clsInstatOptionsDefaults.DEFAULTiPreviewRows
iMaxRows = clsInstatOptionsDefaults.DEFAULTiMaxRows
iMaxWidth = clsInstatOptionsDefaults.DEFAULTiMaxWidth
iMaxCols = clsInstatOptionsDefaults.DEFAULTiMaxCols
iUndoColLimit = clsInstatOptionsDefaults.DEFAULTiUndoColLimit
iUndoRowLimit = clsInstatOptionsDefaults.DEFAULTiUndoRowLimit
Expand Down Expand Up @@ -145,6 +147,12 @@ Imports RDotNet
SetMaxRows(clsInstatOptionsDefaults.DEFAULTiMaxRows)
End If

If iMaxWidth.HasValue Then
SetMaxWidth(iMaxWidth)
Else
SetMaxWidth(clsInstatOptionsDefaults.DEFAULTiMaxWidth)
End If

If iMaxCols.HasValue Then
SetMaxCols(iMaxCols)
Else
Expand Down Expand Up @@ -348,6 +356,11 @@ Imports RDotNet
clsOptionsFunction.AddParameter("dplyr.summarise.inform", "FALSE")
End If

strROption = GetROption("width")
If strROption Is Nothing OrElse strROption <> iMaxWidth.ToString Then
clsOptionsFunction.AddParameter("width", iMaxWidth)
End If

'add "R.commands.displayed.in.the.output.window" as options parameter of its been changed
If frmMain.mnuShowRCommand.Checked Then
clsOptionsFunction.AddParameter("R.commands.displayed.in.the.output.window", "TRUE")
Expand Down Expand Up @@ -394,6 +407,10 @@ Imports RDotNet
frmMain.UpdateAllGrids()
End Sub

Public Sub SetMaxWidth(iNewMaxWidth As Integer)
iMaxWidth = iNewMaxWidth
'frmMain.UpdateAllGrids()
End Sub
Public Sub SetMaxCols(iCols As Integer)
iMaxCols = iCols
frmMain.UpdateAllGrids()
Expand Down
1 change: 1 addition & 0 deletions instat/clsInstatOptionsDefaults.vb
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ Public Class clsInstatOptionsDefaults
Public Shared ReadOnly DEFAULTstrClimsoftPort As String = "3308"
Public Shared ReadOnly DEFAULTstrClimsoftUsername As String = "root"
Public Shared ReadOnly DEFAULTiMaxOutputsHeight As Integer = 500
Public Shared ReadOnly DEFAULTiMaxWidth As Integer = 80
Public Shared ReadOnly DEFAULTbRemindLaterOption As Boolean = False
End Class
2 changes: 1 addition & 1 deletion instat/dlgDescribeTwoVariable.Designer.vb

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

7 changes: 6 additions & 1 deletion instat/dlgDescribeTwoVariable.vb
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ Public Class dlgDescribeTwoVariable
ucrSaveTable.AddAdditionalRCode(clsGroupByPipeOperator4, iAdditionalPairNo:=2)

ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset)
ucrReceiverFirstVars.SetRCode(clsDummyFunction, bReset)
ucrReceiverSecondTwoVariableFactor.SetRCode(clsDummyFunction, bReset)
ucrSelectorDescribeTwoVar.SetRCode(clsRCorrelationFunction, bReset)
ucrReceiverSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset)
Expand All @@ -558,6 +557,9 @@ Public Class dlgDescribeTwoVariable
ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset)
ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset)
ucrSaveTable.SetRCode(clsGroupByPipeOperator, bReset)
If bReset Then
ucrReceiverFirstVars.SetRCode(clsDummyFunction, bReset)
End If
bRcodeSet = True

FillListView()
Expand Down Expand Up @@ -1436,8 +1438,11 @@ Public Class dlgDescribeTwoVariable
Else
ucrReceiverFirstVars.SetMeAsReceiver()
End If
ElseIf rdoSkim.Checked Then
ucrReceiverFirstVars.SetMeAsReceiver()
Else
ucrReceiverFirstVars.SetMeAsReceiver()

End If
If rdoORow.Checked OrElse rdoOCell.Checked Then
If ucrChkDisplayMargins.Checked Then
Expand Down
29 changes: 29 additions & 0 deletions instat/dlgOptions.Designer.vb

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

7 changes: 5 additions & 2 deletions instat/dlgOptions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Public Class dlgOptions
SetView()

ucrNudDigits.SetMinMax(0, 22)
ucrNudWidth.SetMinMax(0, Integer.MaxValue)
ucrChkIncludeCommentsbyDefault.SetText("Include Comments by Default")
ucrChkViewStructuredMenu.SetText("Show Structured Menu")
ucrChkViewClimaticMenu.SetText("Show Climatic Menu")
Expand Down Expand Up @@ -130,6 +131,7 @@ Public Class dlgOptions
ucrChkViewClimaticMenu.Checked = frmMain.clsInstatOptions.bShowClimaticMenu
ucrChkShowRCommandsinOutputWindow.Checked = frmMain.clsInstatOptions.bCommandsinOutput
ucrNudDigits.Value = frmMain.clsInstatOptions.iDigits
ucrNudWidth.Value = frmMain.clsInstatOptions.iMaxWidth
ucrChkShowSignifStars.Checked = frmMain.clsInstatOptions.bShowSignifStars
ucrChkShowDataonGrid.Checked = frmMain.clsInstatOptions.bChangeDataFrame
ucrChkShowWaitDialog.Checked = frmMain.clsInstatOptions.bShowWaitDialog
Expand Down Expand Up @@ -197,6 +199,7 @@ Public Class dlgOptions
frmMain.clsInstatOptions.SetShowClimaticMenu(ucrChkViewClimaticMenu.Checked)
frmMain.clsInstatOptions.SetCommandInOutpt(ucrChkShowRCommandsinOutputWindow.Checked)
frmMain.clsInstatOptions.SetDigits(ucrNudDigits.Value)
frmMain.clsInstatOptions.SetMaxWidth(ucrNudWidth.Value)
frmMain.clsInstatOptions.SetSignifStars(ucrChkShowSignifStars.Checked)
frmMain.clsInstatOptions.SetChangeDataFrame(ucrChkShowDataonGrid.Checked)
frmMain.clsInstatOptions.SetShowWaitDialog(ucrChkShowWaitDialog.Checked)
Expand Down Expand Up @@ -375,7 +378,7 @@ Public Class dlgOptions

End Sub

Private Sub AllControls_ControlValueChanged() Handles ucrNudMaxCols.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrChkTurnOffUndo.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrNudWaitSeconds.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkViewStructuredMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputUserName.ControlValueChanged, ucrChkMaxOutputsHeight.ControlValueChanged, ucrNudMaxOutputsHeight.ControlValueChanged, ucrChkReminder.ControlValueChanged, ucrNudColUndoLimit.ControlValueChanged, ucrNudRowUndoLimit.ControlValueChanged
Private Sub AllControls_ControlValueChanged() Handles ucrNudMaxCols.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrNudWidth.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrChkTurnOffUndo.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrNudWaitSeconds.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkViewStructuredMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputUserName.ControlValueChanged, ucrChkMaxOutputsHeight.ControlValueChanged, ucrNudMaxOutputsHeight.ControlValueChanged, ucrChkReminder.ControlValueChanged, ucrNudColUndoLimit.ControlValueChanged, ucrNudRowUndoLimit.ControlValueChanged
ApplyEnabled(True)
End Sub

Expand Down Expand Up @@ -443,7 +446,7 @@ Public Class dlgOptions
ApplyEnabled(True)
End Sub

Private Sub AllControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudWaitSeconds.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrNudMaxCols.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrInputUserName.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkViewStructuredMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrNudMaxOutputsHeight.ControlValueChanged, ucrChkMaxOutputsHeight.ControlValueChanged, ucrChkReminder.ControlValueChanged, ucrNudColUndoLimit.ControlValueChanged, ucrNudRowUndoLimit.ControlValueChanged, ucrChkTurnOffUndo.ControlValueChanged
Private Sub AllControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudWaitSeconds.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrNudWidth.ControlValueChanged, ucrNudMaxCols.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrInputUserName.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkViewStructuredMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrNudMaxOutputsHeight.ControlValueChanged, ucrChkMaxOutputsHeight.ControlValueChanged, ucrChkReminder.ControlValueChanged, ucrNudColUndoLimit.ControlValueChanged, ucrNudRowUndoLimit.ControlValueChanged, ucrChkTurnOffUndo.ControlValueChanged

End Sub

Expand Down

0 comments on commit b3383be

Please sign in to comment.