From ef95c54d627aea3ec231515804580e1ad4304a82 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 27 Jan 2022 15:40:11 +0300 Subject: [PATCH 01/68] Added Hypergeometric distribution --- instat/ucrDistributions.vb | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb index 44ca2002c35..36d0241c76d 100644 --- a/instat/ucrDistributions.vb +++ b/instat/ucrDistributions.vb @@ -221,7 +221,7 @@ Public Class ucrDistributions Dim clsCauchyDist As New Distribution Dim clsChiSqDist As New Distribution Dim clsFDist As New Distribution - 'Dim clsHyperGeoDist As New Distribution + Dim clsHyperGeoDist As New Distribution Dim clsLogNormDist As New Distribution Dim clsExtremeValueDist As New Distribution Dim clsGeneralizedParetoDist As New Distribution @@ -368,6 +368,7 @@ Public Class ucrDistributions clsStudentsTDist.strQFunctionName = "qt" clsStudentsTDist.strDFunctionName = "dt" clsStudentsTDist.AddParameter("df", "DF", 1) + clsStudentsTDist.AddParameter("ncp", "Non-Centrality", 0) lstAllDistributions.Add(clsStudentsTDist) ' von mises distribution @@ -404,6 +405,7 @@ Public Class ucrDistributions clsChiSqDist.strDFunctionName = "dchisq" clsChiSqDist.bIsContinuous = True clsChiSqDist.AddParameter("df", "DF", 1) + clsChiSqDist.AddParameter("ncp", "Non-Centrality", 0) lstAllDistributions.Add(clsChiSqDist) ' F Distribution @@ -419,17 +421,17 @@ Public Class ucrDistributions 'Hypergeometric Distribution ' For rhyper, the parameters are nn = size, whereas for the other parameters this is n. - 'clsHyperGeoDist.strNameTag = "Hypergeometric" - 'clsHyperGeoDist.strRName = "hyper" - 'clsHyperGeoDist.strRFunctionName = "rhyper" - 'clsHyperGeoDist.strPFunctionName = "phyper" - 'clsHyperGeoDist.strQFunctionName = "qhyper" - 'clsHyperGeoDist.strDFunctionName = "dhyper" - 'clsHyperGeoDist.bIsContinuous = False - 'clsHyperGeoDist.AddParameter("m", "Population_Successes", 10) - 'clsHyperGeoDist.AddParameter("n", "Population_Failures", 10) - 'clsHyperGeoDist.AddParameter("k", "Sample_Size", 10) - 'lstAllDistributions.Add(clsHyperGeoDist) + clsHyperGeoDist.strNameTag = "Hypergeometric" + clsHyperGeoDist.strRName = "hyper" + clsHyperGeoDist.strRFunctionName = "rhyper" + clsHyperGeoDist.strPFunctionName = "phyper" + clsHyperGeoDist.strQFunctionName = "qhyper" + clsHyperGeoDist.strDFunctionName = "dhyper" + clsHyperGeoDist.bIsContinuous = False + clsHyperGeoDist.AddParameter("m", "Population_Successes", 10) + clsHyperGeoDist.AddParameter("n", "Population_Failures", 10) + clsHyperGeoDist.AddParameter("k", "Sample_Size", 10) + lstAllDistributions.Add(clsHyperGeoDist) ' Lognormal Distribution clsLogNormDist.strNameTag = "Lognormal" From 86ba498244ce405ec7023a0c8d3893de3da6e4f2 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Tue, 1 Feb 2022 16:01:51 +0300 Subject: [PATCH 02/68] multinomial distribution --- instat/dlgRandomSample.vb | 37 ++++++++++++++++++++++++++----------- instat/ucrDistributions.vb | 11 ++++++++++- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/instat/dlgRandomSample.vb b/instat/dlgRandomSample.vb index b35d577d709..fecb8f80f0a 100644 --- a/instat/dlgRandomSample.vb +++ b/instat/dlgRandomSample.vb @@ -139,19 +139,30 @@ Public Class dlgRandomSample End Sub Private Sub SetNewColumName() - If ucrNudNumberOfSamples.Value = 1 Then - ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=False) - ucrSaveRandomSample.SetLabelText("New Column Name:") - If Not ucrSaveRandomSample.bUserTyped Then - ucrSaveRandomSample.SetPrefix("random_sample") + If Not ucrDistWithParameters.clsCurrDistribution.strNameTag = "Multinomial" Then + If ucrNudNumberOfSamples.Value = 1 Then + ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=False) + ucrSaveRandomSample.SetLabelText("New Column Name:") + If Not ucrSaveRandomSample.bUserTyped Then + ucrSaveRandomSample.SetPrefix("random_sample") + End If + Else + ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=True) + ucrSaveRandomSample.SetLabelText("Prefix for New Columns:") + If Not ucrSaveRandomSample.bUserTyped Then + ucrSaveRandomSample.SetPrefix("") + ucrSaveRandomSample.SetName("random_sample") + End If End If + End If + End Sub + + Private Sub ucrDistributions() + If ucrDistWithParameters.clsCurrDistribution.strNameTag = "Multinomial" Then + ucrBase.clsRsyntax.RemoveAssignTo() + ucrBase.clsRsyntax.iCallType = 2 Else - ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=True) - ucrSaveRandomSample.SetLabelText("Prefix for New Columns:") - If Not ucrSaveRandomSample.bUserTyped Then - ucrSaveRandomSample.SetPrefix("") - ucrSaveRandomSample.SetName("random_sample") - End If + ucrBase.clsRsyntax.iCallType = 0 End If End Sub @@ -200,4 +211,8 @@ Public Class dlgRandomSample ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsRNGKindFunction) End If End Sub + + Private Sub ucrDistWithParameters_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDistWithParameters.ControlValueChanged + ucrDistributions() + End Sub End Class \ No newline at end of file diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb index 36d0241c76d..05732061f83 100644 --- a/instat/ucrDistributions.vb +++ b/instat/ucrDistributions.vb @@ -227,6 +227,7 @@ Public Class ucrDistributions Dim clsGeneralizedParetoDist As New Distribution Dim clsGumbelDist As New Distribution Dim clsNoDist As New Distribution + Dim clsMultinomDist As New Distribution ' Normal distribution clsNormalDist.strNameTag = "Normal" @@ -433,6 +434,15 @@ Public Class ucrDistributions clsHyperGeoDist.AddParameter("k", "Sample_Size", 10) lstAllDistributions.Add(clsHyperGeoDist) + 'multinomial distribution + clsMultinomDist.strNameTag = "Multinomial" + clsMultinomDist.strRName = "multinom" + clsMultinomDist.strDFunctionName = "dmultinom" + clsMultinomDist.strRFunctionName = "rmultinom" + clsMultinomDist.AddParameter("size", "Size", 10) + clsMultinomDist.AddParameter("prob", "probability", "c(0.2,0.3,0.5)") + lstAllDistributions.Add(clsMultinomDist) + ' Lognormal Distribution clsLogNormDist.strNameTag = "Lognormal" clsLogNormDist.strRName = "lnorm" @@ -441,7 +451,6 @@ Public Class ucrDistributions clsLogNormDist.strQFunctionName = "qlnorm" clsLogNormDist.strDFunctionName = "dlnorm" clsLogNormDist.AddParameter("meanlog", "Meanlog", 0) - clsLogNormDist.AddParameter("sdlog", "SDlog", 1) lstAllDistributions.Add(clsLogNormDist) 'TODO Categorical distribution From 38b120fc2999f8461e79b6e86d9f9d83e6421db2 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Wed, 2 Feb 2022 00:03:20 -0800 Subject: [PATCH 03/68] Implements the delete key for Reogrids --- instat/Interface/IDataViewGrid.vb | 2 ++ instat/Interface/IGrid.vb | 2 ++ .../RCommand/clsPrepareFunctionsForGrids.vb | 15 +++++++++++++ .../DataGrid/Linux/ucrDataViewLinuxGrid.vb | 7 +++++++ .../DataGrid/Linux/ucrLinuxGrid.vb | 10 +++++++++ .../DataGrid/ReoGrid/ucrDataViewReoGrid.vb | 13 +++++++++++- .../DataGrid/ReoGrid/ucrReoGrid.vb | 16 ++++++++++---- instat/ucrDataView.Designer.vb | 13 ++++++++++-- instat/ucrDataView.vb | 21 +++++++++++++++++++ 9 files changed, 92 insertions(+), 7 deletions(-) diff --git a/instat/Interface/IDataViewGrid.vb b/instat/Interface/IDataViewGrid.vb index 29bc0f8c89a..26866cf8848 100644 --- a/instat/Interface/IDataViewGrid.vb +++ b/instat/Interface/IDataViewGrid.vb @@ -23,6 +23,8 @@ Public Interface IDataViewGrid Event ReplaceValueInData(strNewValue As String, strColumnName As String, strRowText As String) + Event DeleteValuesToDataframe() + Event WorksheetChanged() Event WorksheetRemoved(worksheet As clsWorksheetAdapter) diff --git a/instat/Interface/IGrid.vb b/instat/Interface/IGrid.vb index 5fce312b0d8..2481acdd25b 100644 --- a/instat/Interface/IGrid.vb +++ b/instat/Interface/IGrid.vb @@ -28,6 +28,8 @@ Public Interface IGrid Function GetSelectedRows() As List(Of String) + Function GetSelectedColumnIndexes() As List(Of String) + Function GetWorksheet(strName As String) As clsWorksheetAdapter Sub RemoveOldWorksheets() diff --git a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb index 9a4436fb92a..5273c1f996f 100644 --- a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb +++ b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb @@ -303,6 +303,7 @@ Public Class clsPrepareFunctionsForGrids End If _RLink.RunScript(clsReplaceValue.ToScript(), strComment:="Replace Value In Data") End Sub + ''' ''' Get the column type for a given column ''' @@ -312,5 +313,19 @@ Public Class clsPrepareFunctionsForGrids Return _RLink.GetColumnType(_strDataFrame, strColumnName) End Function + '' + ''' Delete one or many columns + ''' + ''' + ''' + Public Sub DeleteCells(lstRowNames As List(Of String), lstColumnNames As List(Of String)) + Dim clsDeleteCells As New RFunction + clsDeleteCells.SetRCommand(_RLink.strInstatDataObject & "$replace_values_with_NA") + clsDeleteCells.AddParameter("data_name", Chr(34) & _strDataFrame & Chr(34)) + clsDeleteCells.AddParameter("column_index", _RLink.GetListAsRString(lstColumnNames, bWithQuotes:=False)) + clsDeleteCells.AddParameter("row_index", _RLink.GetListAsRString(lstRowNames, bWithQuotes:=False)) + _RLink.RunScript(clsDeleteCells.ToScript(), strComment:="Right click menu: Delete Cell(s)") + End Sub + End Class diff --git a/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb index 2fb0a2ac336..01871383f7c 100644 --- a/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb @@ -27,6 +27,8 @@ Public Class ucrDataViewLinuxGrid Public Event PasteValuesToDataframe() Implements IDataViewGrid.PasteValuesToDataframe + Public Event DeleteValueToDataframe() Implements IDataViewGrid.DeleteValuesToDataframe + Public Event WorksheetChanged() Implements IDataViewGrid.WorksheetChanged Public Event WorksheetRemoved(worksheet As clsWorksheetAdapter) Implements IDataViewGrid.WorksheetRemoved @@ -141,5 +143,10 @@ Public Class ucrDataViewLinuxGrid Private Sub tcTabs_SelectedIndexChanged(sender As Object, e As EventArgs) Handles tcTabs.SelectedIndexChanged RaiseEvent WorksheetChanged() End Sub + Private Sub DataGridView_BeforeCellKeyDown(sender As Object, e As KeyEventArgs) + If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then + RaiseEvent DeleteValueToDataframe() + End If + End Sub End Class \ No newline at end of file diff --git a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb index cfade7d21d7..63964305634 100644 --- a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb @@ -118,6 +118,16 @@ Public MustInherit Class ucrLinuxGrid Return lstSelectedRows End Function + + Public Function GetSelectedColumnIndexes() As List(Of String) Implements IGrid.GetSelectedColumnIndexes + Dim lstSelectedColumnIndexes As New List(Of String) + Dim dataGrid = GetGrid(tcTabs.SelectedTab) + For Each Column As DataGridViewRow In dataGrid.SelectedColumns + lstSelectedColumnIndexes.Add(Column.HeaderCell.Value) + Next + Return lstSelectedColumnIndexes + End Function + Public Function GetWorksheet(name As String) As clsWorksheetAdapter Implements IGrid.GetWorksheet For Each tabPage As TabPage In tcTabs.TabPages If tabPage.Text = name Then diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb index fd738b2dcb9..8155ae320a0 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb @@ -26,6 +26,8 @@ Public Class ucrDataViewReoGrid Public Event ReplaceValueInData(strNewValue As String, strColumnName As String, strRowText As String) Implements IDataViewGrid.ReplaceValueInData + Public Event DeleteValueToDataframe() Implements IDataViewGrid.DeleteValuesToDataframe + Public Event WorksheetChanged() Implements IDataViewGrid.WorksheetChanged Public Event WorksheetRemoved(worksheet As clsWorksheetAdapter) Implements IDataViewGrid.WorksheetRemoved @@ -84,7 +86,7 @@ Public Class ucrDataViewReoGrid AddHandler worksheet.BeforeCut, AddressOf Worksheet_BeforeCut AddHandler worksheet.BeforePaste, AddressOf Worksheet_BeforePaste AddHandler worksheet.BeforeRangeMove, AddressOf Worksheet_BeforeRangeMove - AddHandler worksheet.BeforeCellKeyDown, AddressOf Worksheet_BeforeCellKeyDown + AddHandler worksheet.BeforeCellKeyDown, AddressOf Worksheet_BeforeCellsKeyDown AddHandler worksheet.CellDataChanged, AddressOf Worksheet_CellDataChanged End Sub @@ -149,4 +151,13 @@ Public Class ucrDataViewReoGrid Private Sub Worksheet_CellDataChanged(sender As Object, e As CellEventArgs) RaiseEvent CellDataChanged() End Sub + + Private Sub Worksheet_BeforeCellsKeyDown(sender As Object, e As BeforeCellKeyDownEventArgs) + e.IsCancelled = True + If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then + RaiseEvent DeleteValueToDataframe() + End If + + End Sub + End Class diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb index 6ae084453f3..484ebd4c393 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb @@ -78,6 +78,14 @@ Public MustInherit Class ucrReoGrid Return lstSelectedRows End Function + Public Function GetSelectedColumnIndexes() As List(Of String) Implements IGrid.GetSelectedColumnIndexes + Dim lstSelectedColumnIndexes As New List(Of String) + For i As Integer = grdData.CurrentWorksheet.SelectionRange.Col To grdData.CurrentWorksheet.SelectionRange.Col + grdData.CurrentWorksheet.SelectionRange.Cols - 1 + lstSelectedColumnIndexes.Add(grdData.CurrentWorksheet.ColumnHeaders.Item(i).Index + 1) + Next + Return lstSelectedColumnIndexes + End Function + Public Function GetWorksheet(name As String) As clsWorksheetAdapter Implements IGrid.GetWorksheet Dim worksheet = grdData.Worksheets.Where(Function(x) x.Name = name).FirstOrDefault If worksheet IsNot Nothing Then @@ -150,10 +158,10 @@ Public MustInherit Class ucrReoGrid Protected MustOverride Sub AttachEventsToWorksheet(Worksheet As Worksheet) Protected Sub Worksheet_BeforeCellKeyDown(sender As Object, e As BeforeCellKeyDownEventArgs) - If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then - MsgBox("Deleting cells is currently disabled. This feature will be included in future versions." & Environment.NewLine & "To remove a cell's value, replace the value with NA.", MsgBoxStyle.Information, "Cannot delete cells.") - e.IsCancelled = True - End If + 'If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then + ' MsgBox("This will replace the selected cells with missing values (NA)." & Environment.NewLine & "Continue?", MsgBoxStyle.Question, "Replace values with NA") + ' e.IsCancelled = True + 'End If End Sub Protected Sub Worksheet_BeforeCut(sender As Object, e As BeforeRangeOperationEventArgs) diff --git a/instat/ucrDataView.Designer.vb b/instat/ucrDataView.Designer.vb index 6ff9a40ab7d..83c7e9bd91d 100644 --- a/instat/ucrDataView.Designer.vb +++ b/instat/ucrDataView.Designer.vb @@ -65,6 +65,7 @@ Partial Class ucrDataView Me.mnuRenameColumn = New System.Windows.Forms.ToolStripMenuItem() Me.mnuDuplColumn = New System.Windows.Forms.ToolStripMenuItem() Me.mnuReorderColumn = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuDeleteCells = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCellPasteRange = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator5 = New System.Windows.Forms.ToolStripSeparator() Me.mnuConvertToFact = New System.Windows.Forms.ToolStripMenuItem() @@ -266,9 +267,9 @@ Partial Class ucrDataView 'cellContextMenuStrip ' Me.cellContextMenuStrip.ImageScalingSize = New System.Drawing.Size(20, 20) - Me.cellContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator3, Me.mnuRenameColumn, Me.mnuDuplColumn, Me.mnuReorderColumn, Me.mnuCellPasteRange, Me.ToolStripSeparator5, Me.mnuConvertToFact, Me.mnuConvertToOrderedFactor, Me.mnuConvertToCharacter, Me.mnuConvertToLogic, Me.mnuConvertToNumeric, Me.ToolStripSeparator6, Me.mnuLabelsLevel, Me.ToolStripSeparator7, Me.mnuSorts, Me.mnuComment, Me.mnuFilters, Me.mnuRemoveCurrentFilters}) + Me.cellContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator3, Me.mnuRenameColumn, Me.mnuDuplColumn, Me.mnuReorderColumn, Me.mnuDeleteCells, Me.mnuCellPasteRange, Me.ToolStripSeparator5, Me.mnuConvertToFact, Me.mnuConvertToOrderedFactor, Me.mnuConvertToCharacter, Me.mnuConvertToLogic, Me.mnuConvertToNumeric, Me.ToolStripSeparator6, Me.mnuLabelsLevel, Me.ToolStripSeparator7, Me.mnuSorts, Me.mnuComment, Me.mnuFilters, Me.mnuRemoveCurrentFilters}) Me.cellContextMenuStrip.Name = "cellContextMenuStrip" - Me.cellContextMenuStrip.Size = New System.Drawing.Size(213, 336) + Me.cellContextMenuStrip.Size = New System.Drawing.Size(213, 380) ' 'ToolStripSeparator3 ' @@ -293,6 +294,12 @@ Partial Class ucrDataView Me.mnuReorderColumn.Size = New System.Drawing.Size(212, 22) Me.mnuReorderColumn.Text = "Reorder Column(s)..." ' + 'mnuDeleteCells + ' + Me.mnuDeleteCells.Name = "mnuDeleteCells" + Me.mnuDeleteCells.Size = New System.Drawing.Size(212, 22) + Me.mnuDeleteCells.Text = "Delete Cell(s)" + ' 'mnuCellPasteRange ' Me.mnuCellPasteRange.Name = "mnuCellPasteRange" @@ -984,4 +991,6 @@ Partial Class ucrDataView Friend WithEvents linkStartOpenLibrary As LinkLabel Friend WithEvents ucrReoGrid As ucrDataViewReoGrid Friend WithEvents ucrLinuxGrid As ucrDataViewLinuxGrid + Private WithEvents mnuDeleteCell As ToolStripMenuItem + Friend WithEvents mnuDeleteCells As ToolStripMenuItem End Class diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 198a0aa2ad5..27c625364b5 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -90,6 +90,7 @@ Public Class ucrDataView AddHandler _grid.ReplaceValueInData, AddressOf ReplaceValueInData AddHandler _grid.PasteValuesToDataframe, AddressOf PasteValuesToDataFrame AddHandler _grid.CellDataChanged, AddressOf CellDataChanged + AddHandler _grid.DeleteValuesToDataframe, AddressOf DeleteCell_Click End Sub Private Sub RefreshWorksheet(fillWorkSheet As clsWorksheetAdapter, dataFrame As clsDataFrame) @@ -345,6 +346,10 @@ Public Class ucrDataView Return _grid.GetSelectedColumns() End Function + Private Function GetSelectedColumnIndexes() As List(Of String) + Return _grid.GetSelectedColumnIndexes() + End Function + Private Function GetSelectedColumnNames() As List(Of String) Return GetSelectedColumns().Select(Function(x) x.strName).ToList() End Function @@ -787,4 +792,20 @@ Public Class ucrDataView Private Sub ucrDataView_Resize(sender As Object, e As EventArgs) Handles TblPanPageDisplay.Resize ResizeLabels() End Sub + + Private Sub DeleteCell_Click() + 'If GetSelectedColumns.Count = GetCurrentDataFrameFocus()?.iTotalColumnCount Then + ' MsgBox("Cannot delete all visible cells." & Environment.NewLine & "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", MsgBoxStyle.Information, "Cannot Delete All Columns") + 'Else + Dim deleteCell = MsgBox("Are you sure you want to delete these cell(s)?" & Environment.NewLine & "This action cannot be undone.", MessageBoxButtons.YesNo, "Delete Cells") + If deleteCell = DialogResult.Yes Then + StartWait() + GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) + EndWait() + End If + End Sub + + Private Sub mnuDeleteCells_Click(sender As Object, e As EventArgs) Handles mnuDeleteCells.Click + DeleteCell_Click() + End Sub End Class \ No newline at end of file From 7a308a62ef06c6e1105344c6ddf1601e6c087e1b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Feb 2022 13:49:15 +0300 Subject: [PATCH 04/68] adding back R code --- instat/static/InstatObject/R/data_object_R6.R | 9 +++++++++ instat/static/InstatObject/R/instat_object_R6.R | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 5b78af702d8..3b6c96d23c5 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -4231,3 +4231,12 @@ DataSheet$set("public", "add_flag_fields", function(col_names) { self$add_columns_to_data(col_data = col_data, col_name = paste0(i, "_fl")) } }) + +DataSheet$set("public", "replace_values_with_NA", function(row_index, column_index) { + curr_data <- self$get_data_frame(use_current_filter = FALSE) + if(!all(row_index %in% seq_len(nrow(curr_data)))) stop("All row indexes must be within the dataframe") + if(!all(column_index %in% seq_len(ncol(curr_data)))) stop("All column indexes must be within the dataframe") + curr_data[row_index, column_index] <- NA + self$set_data(curr_data) +} +) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 9a0c56c4ac2..8f7dec05b63 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2714,3 +2714,7 @@ DataBook$set("public", "add_flag_fields", function(data_name, col_names, key_col self$get_data_objects(data_name)$add_flag_fields(col_names = col_names) } ) + +DataBook$set("public", "replace_values_with_NA", function(data_name, row_index, column_index) { + self$get_data_objects(data_name)$replace_values_with_NA(row_index = row_index, column_index = column_index) +}) From 8adbe23f4ad2d167d402c67b1268fd3ef684145e Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 2 Feb 2022 15:08:31 +0300 Subject: [PATCH 05/68] Fixed the Reset issue in the dialog --- instat/dlgTransform.vb | 141 +++++++++++++++++++++-------------------- 1 file changed, 73 insertions(+), 68 deletions(-) diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index 3d89457ded4..6ffdc2c0103 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -486,72 +486,69 @@ Public Class dlgTransform ucrChkEditPreview.Checked = False End Sub - Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, - ucrPnlNonNegative.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrNudLagPosition.ControlValueChanged, - ucrNudLagLeadPosition.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, - ucrChkAddConstant.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputConstant.ControlValueChanged, - ucrInputAdd.ControlValueChanged, ucrInputDivide.ControlValueChanged, ucrInputMultiply.ControlValueChanged, ucrInputSubtract.ControlValueChanged, ucrChkAdd.ControlValueChanged, - ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrChkPreview.ControlValueChanged - ucrBase.clsRsyntax.ClearCodes() - If rdoRank.Checked Then - clsPreviewTextFunction = clsRankFunction.Clone - clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRankFunction) - ElseIf rdoSort.Checked Then - clsPreviewTextFunction = clsSortFunction.Clone - clsDummyTransformFunction.AddParameter("check", "sort", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsSortFunction) - ElseIf rdoNumeric.Checked Then - clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0) - If rdoRoundOf.Checked Then - clsPreviewTextFunction = clsRoundFunction.Clone - clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRoundFunction) - ElseIf rdoSignificantDigits.Checked Then - clsPreviewTextFunction = clsSignifFunction.Clone - clsNumericDummyFunction.AddParameter("check", "signif", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsSignifFunction) - ElseIf rdoLag.Checked Then - clsPreviewTextFunction = clsLagFunction.Clone - clsNumericDummyFunction.AddParameter("check", "lag", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLagFunction) - ElseIf rdoLead.Checked Then - clsPreviewTextFunction = clsLeadFunction.Clone - clsNumericDummyFunction.AddParameter("check", "lead", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLeadFunction) - ElseIf rdoDifference.Checked Then - clsPreviewTextFunction = clsConcDiffFunction.Clone - clsNumericDummyFunction.AddParameter("check", "diff", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsConcDiffFunction) - ElseIf rdoStandardize.Checked Then - clsPreviewTextFunction = clsDivisionOperator.Clone - clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsDivisionOperator) - End If - ElseIf rdoNonNegative.Checked Then - UpdateConstantParameter() - clsDummyTransformFunction.AddParameter("check", "non-negative", iPosition:=0) - If rdoSquareRoot.Checked Then - clsPreviewTextFunction = clsSquarerootFunction.Clone - ucrBase.clsRsyntax.SetBaseRFunction(clsSquarerootFunction) - clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0) - ElseIf rdoPower.Checked Then - clsPreviewTextFunction = clsPowerOperator.Clone - clsNonNegativeDummyFunction.AddParameter("check", "power", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsPowerOperator) - ElseIf rdoLogToBase10.Checked Then - clsPreviewTextFunction = clsLogBase10Function.Clone - clsNonNegativeDummyFunction.AddParameter("check", "log10", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLogBase10Function) - ElseIf rdoNaturalLog.Checked Then - clsPreviewTextFunction = clsNaturalLogFunction.Clone - clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsNaturalLogFunction) + Private Sub BaseFunctions() + If bResetRCode Then + ucrBase.clsRsyntax.ClearCodes() + If rdoRank.Checked Then + clsPreviewTextFunction = clsRankFunction.Clone + clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsRankFunction) + ElseIf rdoSort.Checked Then + clsPreviewTextFunction = clsSortFunction.Clone + clsDummyTransformFunction.AddParameter("check", "sort", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsSortFunction) + ElseIf rdoNumeric.Checked Then + clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0) + If rdoRoundOf.Checked Then + clsPreviewTextFunction = clsRoundFunction.Clone + clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsRoundFunction) + ElseIf rdoSignificantDigits.Checked Then + clsPreviewTextFunction = clsSignifFunction.Clone + clsNumericDummyFunction.AddParameter("check", "signif", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsSignifFunction) + ElseIf rdoLag.Checked Then + clsPreviewTextFunction = clsLagFunction.Clone + clsNumericDummyFunction.AddParameter("check", "lag", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsLagFunction) + ElseIf rdoLead.Checked Then + clsPreviewTextFunction = clsLeadFunction.Clone + clsNumericDummyFunction.AddParameter("check", "lead", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsLeadFunction) + ElseIf rdoDifference.Checked Then + clsPreviewTextFunction = clsConcDiffFunction.Clone + clsNumericDummyFunction.AddParameter("check", "diff", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsConcDiffFunction) + ElseIf rdoStandardize.Checked Then + clsPreviewTextFunction = clsDivisionOperator.Clone + clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0) + ucrBase.clsRsyntax.SetBaseROperator(clsDivisionOperator) + End If + ElseIf rdoNonNegative.Checked Then + UpdateConstantParameter() + clsDummyTransformFunction.AddParameter("check", "non-negative", iPosition:=0) + If rdoSquareRoot.Checked Then + clsPreviewTextFunction = clsSquarerootFunction.Clone + ucrBase.clsRsyntax.SetBaseRFunction(clsSquarerootFunction) + clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0) + ElseIf rdoPower.Checked Then + clsPreviewTextFunction = clsPowerOperator.Clone + clsNonNegativeDummyFunction.AddParameter("check", "power", iPosition:=0) + ucrBase.clsRsyntax.SetBaseROperator(clsPowerOperator) + ElseIf rdoLogToBase10.Checked Then + clsPreviewTextFunction = clsLogBase10Function.Clone + clsNonNegativeDummyFunction.AddParameter("check", "log10", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsLogBase10Function) + ElseIf rdoNaturalLog.Checked Then + clsPreviewTextFunction = clsNaturalLogFunction.Clone + clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsNaturalLogFunction) + End If + ElseIf rdoScale.Checked Then + clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0) + clsPreviewTextFunction = clsScaleAddOperator.Clone + ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If - ElseIf rdoScale.Checked Then - clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0) - clsPreviewTextFunction = clsScaleAddOperator.Clone - ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If clsPreviewTextFunction.RemoveAssignTo() If Not ucrReceiverRank.IsEmpty Then @@ -559,8 +556,12 @@ Public Class dlgTransform Else ucrInputPreview.SetText("") End If + End Sub + Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, + ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged NewDefaultName() ResetPreview() + BaseFunctions() End Sub Private Sub ucrReceiverRank_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlValueChanged @@ -575,6 +576,7 @@ Public Class dlgTransform clsLogBase10Function.RemoveParameterByName("x") clsPowerOperator.RemoveParameterByName("x") End If + NewDefaultName() End Sub Private Sub UpdateConstantParameter() @@ -593,12 +595,15 @@ Public Class dlgTransform End If End Sub - Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrPnlNonNegative.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged + Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged UpdateConstantParameter() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, - ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, + ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, + ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, ucrChkMultiply.ControlContentsChanged, + ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, + ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged TestOKEnabled() End Sub From 0a4923952e60414c00cc4d59c354a562854530f0 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Thu, 3 Feb 2022 08:28:20 -0800 Subject: [PATCH 06/68] Recommended Changes --- instat/Model/RCommand/clsPrepareFunctionsForGrids.vb | 1 - instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb | 2 +- instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb | 8 ++++---- instat/ucrDataView.vb | 5 +---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb index 911ebc67aec..d8a44aeb31a 100644 --- a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb +++ b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb @@ -335,6 +335,5 @@ Public Class clsPrepareFunctionsForGrids clsDeleteCells.AddParameter("row_index", _RLink.GetListAsRString(lstRowNames, bWithQuotes:=False)) _RLink.RunScript(clsDeleteCells.ToScript(), strComment:="Right click menu: Delete Cell(s)") End Sub - End Class diff --git a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb index 63964305634..9af34ca5b13 100644 --- a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb @@ -122,7 +122,7 @@ Public MustInherit Class ucrLinuxGrid Public Function GetSelectedColumnIndexes() As List(Of String) Implements IGrid.GetSelectedColumnIndexes Dim lstSelectedColumnIndexes As New List(Of String) Dim dataGrid = GetGrid(tcTabs.SelectedTab) - For Each Column As DataGridViewRow In dataGrid.SelectedColumns + For Each Column As DataGridViewColumn In dataGrid.SelectedColumns lstSelectedColumnIndexes.Add(Column.HeaderCell.Value) Next Return lstSelectedColumnIndexes diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb index 484ebd4c393..35346c8512c 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb @@ -158,10 +158,10 @@ Public MustInherit Class ucrReoGrid Protected MustOverride Sub AttachEventsToWorksheet(Worksheet As Worksheet) Protected Sub Worksheet_BeforeCellKeyDown(sender As Object, e As BeforeCellKeyDownEventArgs) - 'If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then - ' MsgBox("This will replace the selected cells with missing values (NA)." & Environment.NewLine & "Continue?", MsgBoxStyle.Question, "Replace values with NA") - ' e.IsCancelled = True - 'End If + If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then + MsgBox("Deleting cells is currently disabled. This feature will be included in future versions." & Environment.NewLine & "To remove a cell's value, replace the value with NA.", MsgBoxStyle.Information, "Cannot delete cells.") + e.IsCancelled = True + End If End Sub Protected Sub Worksheet_BeforeCut(sender As Object, e As BeforeRangeOperationEventArgs) diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index d651ef5b790..937e0b22293 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -845,10 +845,7 @@ Public Class ucrDataView End Sub Private Sub DeleteCell_Click() - 'If GetSelectedColumns.Count = GetCurrentDataFrameFocus()?.iTotalColumnCount Then - ' MsgBox("Cannot delete all visible cells." & Environment.NewLine & "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", MsgBoxStyle.Information, "Cannot Delete All Columns") - 'Else - Dim deleteCell = MsgBox("Are you sure you want to delete these cell(s)?" & Environment.NewLine & "This action cannot be undone.", MessageBoxButtons.YesNo, "Delete Cells") + Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & Environment.NewLine & "Continue?", MessageBoxButtons.YesNo, "Delete Cells") If deleteCell = DialogResult.Yes Then StartWait() GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) From d5d9ef06f0827a74453fc22577ab641410bcd636 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Thu, 3 Feb 2022 08:29:17 -0800 Subject: [PATCH 07/68] Recommeded Changes on DataViewReoGrid --- instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb index 42caf8b87f3..a12c8a3e5b1 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb @@ -157,7 +157,6 @@ Public Class ucrDataViewReoGrid If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then RaiseEvent DeleteValueToDataframe() End If - End Sub End Class From 9f9598bc754180c88b9b543888a377c56f929fd0 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Fri, 4 Feb 2022 12:08:18 +0300 Subject: [PATCH 08/68] Adding distributions --- instat/dlgRandomSample.vb | 37 +++++++++++-------------------------- instat/ucrDistributions.vb | 36 +++++++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/instat/dlgRandomSample.vb b/instat/dlgRandomSample.vb index fecb8f80f0a..b35d577d709 100644 --- a/instat/dlgRandomSample.vb +++ b/instat/dlgRandomSample.vb @@ -139,30 +139,19 @@ Public Class dlgRandomSample End Sub Private Sub SetNewColumName() - If Not ucrDistWithParameters.clsCurrDistribution.strNameTag = "Multinomial" Then - If ucrNudNumberOfSamples.Value = 1 Then - ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=False) - ucrSaveRandomSample.SetLabelText("New Column Name:") - If Not ucrSaveRandomSample.bUserTyped Then - ucrSaveRandomSample.SetPrefix("random_sample") - End If - Else - ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=True) - ucrSaveRandomSample.SetLabelText("Prefix for New Columns:") - If Not ucrSaveRandomSample.bUserTyped Then - ucrSaveRandomSample.SetPrefix("") - ucrSaveRandomSample.SetName("random_sample") - End If + If ucrNudNumberOfSamples.Value = 1 Then + ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=False) + ucrSaveRandomSample.SetLabelText("New Column Name:") + If Not ucrSaveRandomSample.bUserTyped Then + ucrSaveRandomSample.SetPrefix("random_sample") End If - End If - End Sub - - Private Sub ucrDistributions() - If ucrDistWithParameters.clsCurrDistribution.strNameTag = "Multinomial" Then - ucrBase.clsRsyntax.RemoveAssignTo() - ucrBase.clsRsyntax.iCallType = 2 Else - ucrBase.clsRsyntax.iCallType = 0 + ucrSaveRandomSample.SetAssignToBooleans(bTempAssignToIsPrefix:=True) + ucrSaveRandomSample.SetLabelText("Prefix for New Columns:") + If Not ucrSaveRandomSample.bUserTyped Then + ucrSaveRandomSample.SetPrefix("") + ucrSaveRandomSample.SetName("random_sample") + End If End If End Sub @@ -211,8 +200,4 @@ Public Class dlgRandomSample ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsRNGKindFunction) End If End Sub - - Private Sub ucrDistWithParameters_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDistWithParameters.ControlValueChanged - ucrDistributions() - End Sub End Class \ No newline at end of file diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb index 05732061f83..dcf1006d823 100644 --- a/instat/ucrDistributions.vb +++ b/instat/ucrDistributions.vb @@ -227,7 +227,8 @@ Public Class ucrDistributions Dim clsGeneralizedParetoDist As New Distribution Dim clsGumbelDist As New Distribution Dim clsNoDist As New Distribution - Dim clsMultinomDist As New Distribution + Dim clsEmpiricalDist As New Distribution + Dim clsTriangularDist As New Distribution ' Normal distribution clsNormalDist.strNameTag = "Normal" @@ -305,6 +306,7 @@ Public Class ucrDistributions clsBernouliDist.strExactName = "binom" clsBernouliDist.lstExact = {"prob", "Probability:", 0.5, 0.1, 2, 0, 1} clsBernouliDist.AddParameter("prob", "Probability", 0.5) + clsBernouliDist.AddParameter("size", "Number", 1) lstAllDistributions.Add(clsBernouliDist) 'Binomial Distribution @@ -434,14 +436,30 @@ Public Class ucrDistributions clsHyperGeoDist.AddParameter("k", "Sample_Size", 10) lstAllDistributions.Add(clsHyperGeoDist) - 'multinomial distribution - clsMultinomDist.strNameTag = "Multinomial" - clsMultinomDist.strRName = "multinom" - clsMultinomDist.strDFunctionName = "dmultinom" - clsMultinomDist.strRFunctionName = "rmultinom" - clsMultinomDist.AddParameter("size", "Size", 10) - clsMultinomDist.AddParameter("prob", "probability", "c(0.2,0.3,0.5)") - lstAllDistributions.Add(clsMultinomDist) + 'Discrete Empirical distribution + clsEmpiricalDist.strNameTag = "Discrete_Emprical" + clsEmpiricalDist.strRName = "empiricalD" + clsEmpiricalDist.strDFunctionName = "dempiricalD" + clsEmpiricalDist.strPFunctionName = "pempiricalD" + clsEmpiricalDist.strQFunctionName = "qempiricalD" + clsEmpiricalDist.strRFunctionName = "rempiricalD" + clsEmpiricalDist.SetPackageName("mc2d") + clsEmpiricalDist.AddParameter("values", "Values", "1:5") + clsEmpiricalDist.AddParameter("prob", "Probability", "c(10, 10, 10, 0, 10)") + lstAllDistributions.Add(clsEmpiricalDist) + + 'Triangular distribution + clsTriangularDist.strNameTag = "Triangular" + clsTriangularDist.strRName = "triang" + clsTriangularDist.strRFunctionName = "rtriang" + clsTriangularDist.strPFunctionName = "ptriang" + clsTriangularDist.strQFunctionName = "qtriang" + clsTriangularDist.strDFunctionName = "dtriang" + clsTriangularDist.strPackagName = "mc2d" + clsTriangularDist.AddParameter("min ", "Minimum", -1) + clsTriangularDist.AddParameter("mode ", "Mode", 0) + clsTriangularDist.AddParameter("max ", "Maximum", 1) + lstAllDistributions.Add(clsTriangularDist) ' Lognormal Distribution clsLogNormDist.strNameTag = "Lognormal" From 8ee28f4bef6c982b76c9ff122c0b971814e5bfdf Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 4 Feb 2022 13:14:16 +0300 Subject: [PATCH 09/68] Added mc2d R package and loaded it by default --- instat/static/InstatObject/R/Rsetup.R | 3 ++- instat/static/InstatObject/R/install_packages.R | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/Rsetup.R b/instat/static/InstatObject/R/Rsetup.R index 55a1db22a25..b5b814f1ae2 100644 --- a/instat/static/InstatObject/R/Rsetup.R +++ b/instat/static/InstatObject/R/Rsetup.R @@ -221,7 +221,8 @@ load_R_Instat_packages <- function() { # texmex loaded because of extreme value distributions # tidyr loaded because unite() function is required by mmtable() function from mmtable2 package # purrr loaded because map_int() is required by function(s) such as header_top_left() from mmtable2 package - packs_to_load <- c("purrr", "plyr", "tidyr", "dplyr", "ggplot2", "ggthemes", "svglite", "ggfortify", "PCICt", "sp", "ggmosaic", "wakefield", "circular", "latticeExtra", "texmex") + # mc2d loaded because of triangular and continuous empirical distributions + packs_to_load <- c("purrr", "plyr", "tidyr", "dplyr", "ggplot2", "ggthemes", "svglite", "ggfortify", "PCICt", "sp", "ggmosaic", "wakefield", "circular", "latticeExtra", "texmex", "mc2d") for(pack in packs_to_load) { try(library(pack, character.only = TRUE)) } diff --git a/instat/static/InstatObject/R/install_packages.R b/instat/static/InstatObject/R/install_packages.R index 2f128426971..eb08b6ccc4b 100644 --- a/instat/static/InstatObject/R/install_packages.R +++ b/instat/static/InstatObject/R/install_packages.R @@ -1,7 +1,7 @@ require("miniCRAN") r_version <- "4.1" # Specify list of packages to download -pkgs <- c("reshape2", "lubridate","plyr", "dplyr", "rtf", "openxlsx", "ggplot2", "extRemes", "GGally", "agridat", "DAAG", "FactoMineR", "plotrix", "candisc", "R6", "openair", "circular", "survival", "Evapotranspiration", "clifro", "devtools", "factoextra", "circlize", "CircStats", "gridExtra", "ggfortify", "rio", "readxl", "lme4", "dummies", "ggthemes", "lazyeval", "stringr", "httr", "jsonlite", "fitdistrplus", "visreg", "climdex.pcic", "mosaic", "ncdf4", "ncdf4.helpers", "getPass", "RMySQL", "DBI", "EnvStats", "signmedian.test", "sjPlot", "sjmisc", "plotly", "svglite", "htmlTable", "rje", "tidyr", "faraway", "rrefine", "dae", "gapminder", "questionr", "nycflights13", "Lahman", "RcppRoll", "cmsaf", "sjlabelled", "maptools", "RColorBrewer", "colorRamps", "mapdata", "rworldmap", "rworldxtra", "e1071", "robustbase", "wakefield", "Hmisc", "SPEI", "agricolae", "sf", "weathermetrics", "geosphere", "ggmosaic", "readODS", "ggalt", "ggpmisc", "treemapify", "stringdist", "imputeTS", "chillR", "patchwork", "changepoint", "trend", "pbs", "visdat", "texmex", "zyp", "DescTools", "MKinfer", "ggplotify", "clipr", "ecmwfr", "hydroGOF", "lemon", "HistData", "caret", "rpivotTable", "gcookbook", "tidytext", "janitor", "ggwordcloud", "splines2") +pkgs <- c("reshape2", "lubridate","plyr", "dplyr", "rtf", "openxlsx", "ggplot2", "extRemes", "GGally", "agridat", "DAAG", "FactoMineR", "plotrix", "candisc", "R6", "openair", "circular", "survival", "Evapotranspiration", "clifro", "devtools", "factoextra", "circlize", "CircStats", "gridExtra", "ggfortify", "rio", "readxl", "lme4", "dummies", "ggthemes", "lazyeval", "stringr", "httr", "jsonlite", "fitdistrplus", "visreg", "climdex.pcic", "mosaic", "ncdf4", "ncdf4.helpers", "getPass", "RMySQL", "DBI", "EnvStats", "signmedian.test", "sjPlot", "sjmisc", "plotly", "svglite", "htmlTable", "rje", "tidyr", "faraway", "rrefine", "dae", "gapminder", "questionr", "nycflights13", "Lahman", "RcppRoll", "cmsaf", "sjlabelled", "maptools", "RColorBrewer", "colorRamps", "mapdata", "rworldmap", "rworldxtra", "e1071", "robustbase", "wakefield", "Hmisc", "SPEI", "agricolae", "sf", "weathermetrics", "geosphere", "ggmosaic", "readODS", "ggalt", "ggpmisc", "treemapify", "stringdist", "imputeTS", "chillR", "patchwork", "changepoint", "trend", "pbs", "visdat", "texmex", "zyp", "DescTools", "MKinfer", "ggplotify", "clipr", "ecmwfr", "hydroGOF", "lemon", "HistData", "caret", "rpivotTable", "gcookbook", "tidytext", "janitor", "ggwordcloud", "splines2","mc2d") pkgList <- pkgDep(pkgs, type="win.binary", repos = "https://cran.rstudio.com/", suggests = FALSE, includeBasePkgs = FALSE, Rversion = r_version) pth <- "C:/Users/Danny/Documents/RPackages" makeRepo(pkgList, path = pth, type = "win.binary", Rversion = r_version, repos = "https://cran.rstudio.com/") From dd0ffac3f8a0294dc2b86513d8b931f78298614c Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 4 Feb 2022 13:25:34 +0300 Subject: [PATCH 10/68] Added mc2d package --- instat/static/InstatObject/R/install_packages.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/install_packages.R b/instat/static/InstatObject/R/install_packages.R index 955df9a6ef6..2a7938dce3d 100644 --- a/instat/static/InstatObject/R/install_packages.R +++ b/instat/static/InstatObject/R/install_packages.R @@ -116,7 +116,11 @@ pkgs <- "janitor", "ggwordcloud", # For producing periodic and natural splines in Climatic > Compare > Seasonal Plot - "splines2" + "splines2", + # For density, distribution function and random generation for triangular and continuous empirical distributions + # Model > Probability Distributions > Show Model + # Model > Probability Distributions > Random Samples + "mc2d" # also install mmtable2 from GitHub devtools::install_github("ianmoran11/mmtable2") ) pkgList <- pkgDep(pkgs, type="win.binary", repos = "https://cran.rstudio.com/", suggests = FALSE, includeBasePkgs = FALSE, Rversion = r_version) From ae2c0763485444f87411d4abba6dbd61a9e5af7c Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Tue, 8 Feb 2022 04:32:24 -0800 Subject: [PATCH 11/68] Update instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb index 9af34ca5b13..8a43b8edce6 100644 --- a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb @@ -122,7 +122,7 @@ Public MustInherit Class ucrLinuxGrid Public Function GetSelectedColumnIndexes() As List(Of String) Implements IGrid.GetSelectedColumnIndexes Dim lstSelectedColumnIndexes As New List(Of String) Dim dataGrid = GetGrid(tcTabs.SelectedTab) - For Each Column As DataGridViewColumn In dataGrid.SelectedColumns + For Each column As DataGridViewColumn In dataGrid.SelectedColumns lstSelectedColumnIndexes.Add(Column.HeaderCell.Value) Next Return lstSelectedColumnIndexes From 9013f8792f47fb3b41e7ce1769896936000aaebd Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Tue, 8 Feb 2022 04:32:46 -0800 Subject: [PATCH 12/68] Update instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb index 35346c8512c..ee89ed2280f 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb @@ -80,7 +80,8 @@ Public MustInherit Class ucrReoGrid Public Function GetSelectedColumnIndexes() As List(Of String) Implements IGrid.GetSelectedColumnIndexes Dim lstSelectedColumnIndexes As New List(Of String) - For i As Integer = grdData.CurrentWorksheet.SelectionRange.Col To grdData.CurrentWorksheet.SelectionRange.Col + grdData.CurrentWorksheet.SelectionRange.Cols - 1 + Dim clsRange As RangePosition = grdData.CurrentWorksheet.SelectionRange + For i As Integer = clsRange.Col To clsRange.Col + clsRange.Cols - 1 lstSelectedColumnIndexes.Add(grdData.CurrentWorksheet.ColumnHeaders.Item(i).Index + 1) Next Return lstSelectedColumnIndexes From 7c0478514cb0001910b50b6ad5f43d5bfeeed01c Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Wed, 9 Feb 2022 15:43:16 +0300 Subject: [PATCH 13/68] Changes requested --- instat/ucrDistributions.vb | 7 ++++--- instat/ucrDistributionsWithParameters.vb | 12 +++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb index dcf1006d823..a4ebde13046 100644 --- a/instat/ucrDistributions.vb +++ b/instat/ucrDistributions.vb @@ -29,6 +29,7 @@ Public Class ucrDistributions Private bParameterIsDistFunction As Boolean = False Private bFunctionIsDistFunction As Boolean = False Private bParameterIsDistName As Boolean = False + Private intNumber As Integer Public Sub New() @@ -89,7 +90,6 @@ Public Class ucrDistributions Else clsCurrRFunction.AddParameter(strArgumentName, strArgumentValue) End If - End Sub Public Sub SetRDistributions() @@ -229,6 +229,7 @@ Public Class ucrDistributions Dim clsNoDist As New Distribution Dim clsEmpiricalDist As New Distribution Dim clsTriangularDist As New Distribution + Dim clsBirthDist As New Distribution ' Normal distribution clsNormalDist.strNameTag = "Normal" @@ -294,7 +295,7 @@ Public Class ucrDistributions lstAllDistributions.Add(clsUniformDist) 'Bernouli Distribution - clsBernouliDist.strNameTag = "Bernouli" + clsBernouliDist.strNameTag = "Bernoulli" clsBernouliDist.strRName = "binom" clsBernouliDist.strRFunctionName = "rbinom" clsBernouliDist.strPFunctionName = "pbinom" @@ -437,7 +438,7 @@ Public Class ucrDistributions lstAllDistributions.Add(clsHyperGeoDist) 'Discrete Empirical distribution - clsEmpiricalDist.strNameTag = "Discrete_Emprical" + clsEmpiricalDist.strNameTag = "Discrete_Empirical" clsEmpiricalDist.strRName = "empiricalD" clsEmpiricalDist.strDFunctionName = "dempiricalD" clsEmpiricalDist.strPFunctionName = "pempiricalD" diff --git a/instat/ucrDistributionsWithParameters.vb b/instat/ucrDistributionsWithParameters.vb index 009a6113461..2b6284c1602 100644 --- a/instat/ucrDistributionsWithParameters.vb +++ b/instat/ucrDistributionsWithParameters.vb @@ -82,7 +82,7 @@ Public Class ucrDistributionsWithParameters End If OnControlValueChanged() Next - If clsCurrDistribution.strNameTag = "Bernouli" Then + If clsCurrDistribution.strNameTag = "Bernoulli" Then AddParameter("size", 1) End If bParametersFilled = False @@ -116,6 +116,16 @@ Public Class ucrDistributionsWithParameters CheckParametersFilled() End If OnControlValueChanged() + End Sub + + Private Sub ucrInputParameter2_ContentsChanged() Handles ucrInputParameter2.ContentsChanged + If clsCurrDistribution.strNameTag = "Discrete_Empirical" Then + ucrInputParameter1.SetName("1:" & ucrInputParameter2.GetText.Split(",").Length) + ucrInputParameter1.IsReadOnly = True + Else + ucrInputParameter1.IsReadOnly = False + End If + OnControlContentsChanged() End Sub Private Sub ucrInputParameter3_ControlValueChanged() Handles ucrInputParameter3.ControlValueChanged From 8bea5da2b35f57730fe2206234feb1eec894defa Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 9 Feb 2022 17:00:17 +0300 Subject: [PATCH 14/68] Adding empty radio button and the function to delete empty rows and cols. --- instat/dlgDeleteRowsOrColums.Designer.vb | 72 ++++++++++++++++--- instat/dlgDeleteRowsOrColums.vb | 92 ++++++++++++++++++++++-- 2 files changed, 151 insertions(+), 13 deletions(-) diff --git a/instat/dlgDeleteRowsOrColums.Designer.vb b/instat/dlgDeleteRowsOrColums.Designer.vb index 149a0811cbc..5c789d71ffc 100644 --- a/instat/dlgDeleteRowsOrColums.Designer.vb +++ b/instat/dlgDeleteRowsOrColums.Designer.vb @@ -19,7 +19,7 @@ Partial Class dlgDeleteRowsOrColums Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -36,7 +36,7 @@ Partial Class dlgDeleteRowsOrColums 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() Me.lblNumberofRows = New System.Windows.Forms.Label() Me.lblColumnsToDelete = New System.Windows.Forms.Label() @@ -44,6 +44,9 @@ Partial Class dlgDeleteRowsOrColums Me.rdoColumns = New System.Windows.Forms.RadioButton() Me.rdoRows = New System.Windows.Forms.RadioButton() Me.lblTo = New System.Windows.Forms.Label() + Me.rdoEmpty = New System.Windows.Forms.RadioButton() + Me.ucrChkEmptyRows = New instat.ucrCheck() + Me.ucrChkEmptyColumns = New instat.ucrCheck() Me.ucrNudTo = New instat.ucrNud() Me.ucrPnlColumnsOrRows = New instat.UcrPanel() Me.ucrDataFrameLengthForDeleteRows = New instat.ucrDataFrameLength() @@ -51,6 +54,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrSelectorForDeleteColumns = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverForColumnsToDelete = New instat.ucrReceiverMultiple() Me.ucrBase = New instat.ucrButtons() + Me.ucrNewDataFrame = New instat.ucrSave() Me.SuspendLayout() ' 'lblNumberofRows @@ -95,7 +99,7 @@ Partial Class dlgDeleteRowsOrColums Me.rdoColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoColumns.ForeColor = System.Drawing.SystemColors.ControlText Me.rdoColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoColumns.Location = New System.Drawing.Point(105, 12) + Me.rdoColumns.Location = New System.Drawing.Point(53, 12) Me.rdoColumns.Name = "rdoColumns" Me.rdoColumns.Size = New System.Drawing.Size(100, 28) Me.rdoColumns.TabIndex = 1 @@ -114,7 +118,7 @@ Partial Class dlgDeleteRowsOrColums Me.rdoRows.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoRows.ForeColor = System.Drawing.SystemColors.ActiveCaptionText Me.rdoRows.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoRows.Location = New System.Drawing.Point(203, 12) + Me.rdoRows.Location = New System.Drawing.Point(151, 12) Me.rdoRows.Name = "rdoRows" Me.rdoRows.Size = New System.Drawing.Size(100, 28) Me.rdoRows.TabIndex = 2 @@ -133,6 +137,41 @@ Partial Class dlgDeleteRowsOrColums Me.lblTo.Tag = "" Me.lblTo.Text = "To:" ' + 'rdoEmpty + ' + Me.rdoEmpty.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoEmpty.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEmpty.FlatAppearance.BorderSize = 2 + Me.rdoEmpty.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEmpty.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoEmpty.ForeColor = System.Drawing.SystemColors.ControlText + Me.rdoEmpty.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoEmpty.Location = New System.Drawing.Point(249, 12) + Me.rdoEmpty.Name = "rdoEmpty" + Me.rdoEmpty.Size = New System.Drawing.Size(100, 28) + Me.rdoEmpty.TabIndex = 13 + Me.rdoEmpty.Text = "Empty" + Me.rdoEmpty.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoEmpty.UseVisualStyleBackColor = True + ' + 'ucrChkEmptyRows + ' + Me.ucrChkEmptyRows.AutoSize = True + Me.ucrChkEmptyRows.Checked = False + Me.ucrChkEmptyRows.Location = New System.Drawing.Point(11, 141) + Me.ucrChkEmptyRows.Name = "ucrChkEmptyRows" + Me.ucrChkEmptyRows.Size = New System.Drawing.Size(109, 23) + Me.ucrChkEmptyRows.TabIndex = 16 + ' + 'ucrChkEmptyColumns + ' + Me.ucrChkEmptyColumns.AutoSize = True + Me.ucrChkEmptyColumns.Checked = False + Me.ucrChkEmptyColumns.Location = New System.Drawing.Point(11, 106) + Me.ucrChkEmptyColumns.Name = "ucrChkEmptyColumns" + Me.ucrChkEmptyColumns.Size = New System.Drawing.Size(108, 23) + Me.ucrChkEmptyColumns.TabIndex = 15 + ' 'ucrNudTo ' Me.ucrNudTo.AutoSize = True @@ -149,9 +188,9 @@ Partial Class dlgDeleteRowsOrColums 'ucrPnlColumnsOrRows ' Me.ucrPnlColumnsOrRows.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnsOrRows.Location = New System.Drawing.Point(97, 11) + Me.ucrPnlColumnsOrRows.Location = New System.Drawing.Point(53, 11) Me.ucrPnlColumnsOrRows.Name = "ucrPnlColumnsOrRows" - Me.ucrPnlColumnsOrRows.Size = New System.Drawing.Size(214, 29) + Me.ucrPnlColumnsOrRows.Size = New System.Drawing.Size(303, 29) Me.ucrPnlColumnsOrRows.TabIndex = 0 ' 'ucrDataFrameLengthForDeleteRows @@ -205,17 +244,30 @@ Partial Class dlgDeleteRowsOrColums ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(9, 243) + Me.ucrBase.Location = New System.Drawing.Point(7, 273) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(405, 52) Me.ucrBase.TabIndex = 12 ' + 'ucrNewDataFrame + ' + Me.ucrNewDataFrame.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrNewDataFrame.Location = New System.Drawing.Point(7, 236) + Me.ucrNewDataFrame.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrNewDataFrame.Name = "ucrNewDataFrame" + Me.ucrNewDataFrame.Size = New System.Drawing.Size(405, 34) + Me.ucrNewDataFrame.TabIndex = 17 + ' 'dlgDeleteRowsOrColums ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(416, 299) + Me.ClientSize = New System.Drawing.Size(416, 330) + Me.Controls.Add(Me.ucrNewDataFrame) + Me.Controls.Add(Me.ucrChkEmptyRows) + Me.Controls.Add(Me.ucrChkEmptyColumns) + Me.Controls.Add(Me.rdoEmpty) Me.Controls.Add(Me.lblTo) Me.Controls.Add(Me.ucrNudTo) Me.Controls.Add(Me.rdoColumns) @@ -254,4 +306,8 @@ Partial Class dlgDeleteRowsOrColums Friend WithEvents ucrPnlColumnsOrRows As UcrPanel Friend WithEvents lblTo As Label Friend WithEvents ucrNudTo As ucrNud + Friend WithEvents rdoEmpty As RadioButton + Friend WithEvents ucrChkEmptyRows As ucrCheck + Friend WithEvents ucrChkEmptyColumns As ucrCheck + Friend WithEvents ucrNewDataFrame As ucrSave End Class diff --git a/instat/dlgDeleteRowsOrColums.vb b/instat/dlgDeleteRowsOrColums.vb index d509dd43ca7..e7199403ee1 100644 --- a/instat/dlgDeleteRowsOrColums.vb +++ b/instat/dlgDeleteRowsOrColums.vb @@ -20,6 +20,9 @@ Public Class dlgDeleteRowsOrColums Private bReset As Boolean = True Private clsOperatorRowNames As New ROperator Private clsDeleteRows, clsDeleteColumns As RFunction + Private clsRemoveEmptyColumns, clsConcFunction As New RFunction + Private clsColsPipeOperator As New ROperator + Private clsDummyFunction As New RFunction Private Sub dlgDeleteRows_Load(sender As Object, e As EventArgs) Handles Me.Load If bFirstLoad Then InitialiseDialog() @@ -40,17 +43,25 @@ Public Class dlgDeleteRowsOrColums ucrPnlColumnsOrRows.AddRadioButton(rdoColumns) ucrPnlColumnsOrRows.AddRadioButton(rdoRows) - ucrPnlColumnsOrRows.AddFunctionNamesCondition(rdoColumns, frmMain.clsRLink.strInstatDataObject & "$remove_columns_in_data") - ucrPnlColumnsOrRows.AddFunctionNamesCondition(rdoRows, frmMain.clsRLink.strInstatDataObject & "$remove_rows_in_data") + ucrPnlColumnsOrRows.AddRadioButton(rdoEmpty) + ucrPnlColumnsOrRows.AddParameterValuesCondition(rdoColumns, "checked", "columns") + ucrPnlColumnsOrRows.AddParameterValuesCondition(rdoRows, "checked", "rows") + ucrPnlColumnsOrRows.AddParameterValuesCondition(rdoEmpty, "checked", "empty") ucrPnlColumnsOrRows.AddToLinkedControls(ucrReceiverForColumnsToDelete, {rdoColumns}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlColumnsOrRows.AddToLinkedControls(ucrNudFrom, {rdoRows}, bNewLinkedHideIfParameterMissing:=True) ucrPnlColumnsOrRows.AddToLinkedControls(ucrNudTo, {rdoRows}, bNewLinkedHideIfParameterMissing:=True) ucrPnlColumnsOrRows.AddToLinkedControls(ucrDataFrameLengthForDeleteRows, {rdoRows}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlColumnsOrRows.AddToLinkedControls({ucrChkEmptyRows, ucrChkEmptyColumns, ucrNewDataFrame}, {rdoEmpty}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrSelectorForDeleteColumns.SetParameter(New RParameter("data_name", 0)) ucrSelectorForDeleteColumns.SetParameterIsString() + ucrNewDataFrame.SetIsTextBox() + ucrNewDataFrame.SetSaveTypeAsDataFrame() + ucrNewDataFrame.SetDataFrameSelector(ucrSelectorForDeleteColumns.ucrAvailableDataFrames) + ucrNewDataFrame.SetLabelText("New Data Frame Name:") + ucrReceiverForColumnsToDelete.SetParameter(New RParameter("cols", 1)) ucrReceiverForColumnsToDelete.Selector = ucrSelectorForDeleteColumns ucrReceiverForColumnsToDelete.SetMeAsReceiver() @@ -63,6 +74,18 @@ Public Class dlgDeleteRowsOrColums ucrNudTo.SetParameter(New RParameter("To", 1)) ucrNudTo.SetLinkedDisplayControl(lblTo) + ucrChkEmptyColumns.SetText("Columns") + ' ucrChkEmptyColumns.SetParameter(New RParameter("x", 0)) + ucrChkEmptyColumns.AddParameterPresentCondition(True, "x", True) + ucrChkEmptyColumns.AddParameterPresentCondition(False, "x", False) + 'ucrChkEmptyColumns.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + + ucrChkEmptyRows.SetText("Rows") + 'ucrChkEmptyRows.SetParameter(New RParameter("y", 1)) + 'ucrChkEmptyRows.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkEmptyRows.AddParameterPresentCondition(True, "y", True) + ucrChkEmptyRows.AddParameterPresentCondition(False, "y", False) + ucrDataFrameLengthForDeleteRows.SetLinkedDisplayControl(lblNumberofRows) ucrDataFrameLengthForDeleteRows.SetDataFrameSelector(ucrSelectorForDeleteColumns.ucrAvailableDataFrames) End Sub @@ -71,8 +94,14 @@ Public Class dlgDeleteRowsOrColums clsDeleteColumns = New RFunction clsDeleteRows = New RFunction clsOperatorRowNames = New ROperator + clsRemoveEmptyColumns = New RFunction + clsColsPipeOperator = New ROperator + clsConcFunction = New RFunction + clsDummyFunction = New RFunction ucrSelectorForDeleteColumns.Reset() + ucrNewDataFrame.Reset() + NewDefaultName() clsDeleteRows.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$remove_rows_in_data") clsDeleteColumns.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$remove_columns_in_data") @@ -82,16 +111,31 @@ Public Class dlgDeleteRowsOrColums clsOperatorRowNames.AddParameter("To", 1, iPosition:=1) clsDeleteRows.AddParameter("row_names", clsROperatorParameter:=clsOperatorRowNames) + + clsConcFunction.SetRCommand("c") + + clsRemoveEmptyColumns.SetPackageName("janitor") + clsRemoveEmptyColumns.SetRCommand("remove_empty") + clsRemoveEmptyColumns.AddParameter("which", clsRFunctionParameter:=clsConcFunction, iPosition:=0) + + clsColsPipeOperator.SetOperation("%>%") + clsColsPipeOperator.AddParameter("x", clsRFunctionParameter:=clsRemoveEmptyColumns, iPosition:=1, bIncludeArgumentName:=False) + + clsDummyFunction.AddParameter("checked", "columns", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsDeleteColumns) End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrSelectorForDeleteColumns.AddAdditionalCodeParameterPair(clsDeleteColumns, ucrSelectorForDeleteColumns.GetParameter, iAdditionalPairNo:=1) - ucrPnlColumnsOrRows.SetRCode(ucrBase.clsRsyntax.clsBaseFunction) + ucrPnlColumnsOrRows.SetRCode(clsDummyFunction, bReset) + ucrNewDataFrame.SetRCode(clsColsPipeOperator, bReset) ucrReceiverForColumnsToDelete.SetRCode(clsDeleteColumns) ucrSelectorForDeleteColumns.SetRCode(clsDeleteRows) ucrNudTo.SetRCode(clsOperatorRowNames, bReset) ucrNudFrom.SetRCode(clsOperatorRowNames, bReset) + ucrChkEmptyColumns.SetRCode(clsColsPipeOperator, bReset) + ucrChkEmptyRows.SetRCode(clsColsPipeOperator, bReset) End Sub Private Sub TestOKEnabled() @@ -107,6 +151,12 @@ Public Class dlgDeleteRowsOrColums Else ucrBase.OKEnabled(False) End If + ElseIf rdoEmpty.Checked Then + If ucrChkEmptyColumns.Checked OrElse ucrChkEmptyRows.Checked AndAlso ucrNewDataFrame.IsComplete Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If Else ucrBase.OKEnabled(False) End If @@ -124,21 +174,38 @@ Public Class dlgDeleteRowsOrColums TestOKEnabled() End Sub - Private Sub ucrPnlColumnsOrRows_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnsOrRows.ControlValueChanged + Private Sub NewDefaultName() + If ucrSelectorForDeleteColumns.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso (Not ucrNewDataFrame.bUserTyped) Then + ucrNewDataFrame.SetPrefix(ucrSelectorForDeleteColumns.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + End If + End Sub + + Private Sub ucrPnlColumnsOrRows_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnsOrRows.ControlValueChanged, ucrChkEmptyColumns.ControlValueChanged, ucrChkEmptyRows.ControlValueChanged If rdoColumns.Checked Then + clsDummyFunction.AddParameter("checked", "columns", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsDeleteColumns) ucrSelectorForDeleteColumns.SetVariablesVisible(True) ElseIf rdoRows.Checked Then + clsDummyFunction.AddParameter("checked", "rows", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsDeleteRows) ucrSelectorForDeleteColumns.SetVariablesVisible(False) + ElseIf rdoEmpty.Checked Then + clsDummyFunction.AddParameter("checked", "empty", iPosition:=0) + ucrBase.clsRsyntax.SetBaseROperator(clsColsPipeOperator) + ucrSelectorForDeleteColumns.SetVariablesVisible(False) End If + DeletingEmptyColsAndRows() End Sub Private Sub ucrSelectorForDeleteColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForDeleteColumns.ControlValueChanged SetMaxMin() + NewDefaultName() + clsColsPipeOperator.AddParameter("left", clsRFunctionParameter:=ucrSelectorForDeleteColumns.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverForColumnsToDelete.ControlContentsChanged, ucrNudFrom.ControlContentsChanged, ucrPnlColumnsOrRows.ControlContentsChanged, ucrNudTo.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverForColumnsToDelete.ControlContentsChanged, + ucrNudFrom.ControlContentsChanged, ucrPnlColumnsOrRows.ControlContentsChanged, ucrNudTo.ControlContentsChanged, + ucrChkEmptyColumns.ControlContentsChanged, ucrChkEmptyRows.ControlContentsChanged, ucrNewDataFrame.ControlContentsChanged TestOKEnabled() End Sub @@ -152,4 +219,19 @@ Public Class dlgDeleteRowsOrColums ucrNudTo.SetMinMax(1, iLength) End If End Sub + + Private Sub DeletingEmptyColsAndRows() + If rdoEmpty.Checked Then + If ucrChkEmptyRows.Checked Then + clsConcFunction.AddParameter("y", Chr(34) & "rows" & Chr(34), iPosition:=1, bIncludeArgumentName:=False) + Else + clsConcFunction.RemoveParameterByName("y") + End If + If ucrChkEmptyColumns.Checked Then + clsConcFunction.AddParameter("x", Chr(34) & "cols" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + Else + clsConcFunction.RemoveParameterByName("x") + End If + End If + End Sub End Class \ No newline at end of file From 902c70085472eeee75713ce37e48b31bd3920dcf Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Thu, 10 Feb 2022 10:51:06 +0300 Subject: [PATCH 15/68] some minor changes to fix a bug when returning to the dialog --- instat/dlgDeleteRowsOrColums.vb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/instat/dlgDeleteRowsOrColums.vb b/instat/dlgDeleteRowsOrColums.vb index e7199403ee1..a48a5051f2e 100644 --- a/instat/dlgDeleteRowsOrColums.vb +++ b/instat/dlgDeleteRowsOrColums.vb @@ -75,14 +75,10 @@ Public Class dlgDeleteRowsOrColums ucrNudTo.SetLinkedDisplayControl(lblTo) ucrChkEmptyColumns.SetText("Columns") - ' ucrChkEmptyColumns.SetParameter(New RParameter("x", 0)) ucrChkEmptyColumns.AddParameterPresentCondition(True, "x", True) ucrChkEmptyColumns.AddParameterPresentCondition(False, "x", False) - 'ucrChkEmptyColumns.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkEmptyRows.SetText("Rows") - 'ucrChkEmptyRows.SetParameter(New RParameter("y", 1)) - 'ucrChkEmptyRows.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkEmptyRows.AddParameterPresentCondition(True, "y", True) ucrChkEmptyRows.AddParameterPresentCondition(False, "y", False) @@ -134,8 +130,8 @@ Public Class dlgDeleteRowsOrColums ucrSelectorForDeleteColumns.SetRCode(clsDeleteRows) ucrNudTo.SetRCode(clsOperatorRowNames, bReset) ucrNudFrom.SetRCode(clsOperatorRowNames, bReset) - ucrChkEmptyColumns.SetRCode(clsColsPipeOperator, bReset) - ucrChkEmptyRows.SetRCode(clsColsPipeOperator, bReset) + ucrChkEmptyColumns.SetRCode(clsConcFunction, bReset) + ucrChkEmptyRows.SetRCode(clsConcFunction, bReset) End Sub Private Sub TestOKEnabled() From 1910594b541c80ebd208696ee81606d9fc039642 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Thu, 10 Feb 2022 01:47:34 -0800 Subject: [PATCH 16/68] Line Breaks for Rows and Columns --- instat/ucrDataView.vb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 937e0b22293..71a747ec1f0 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -845,11 +845,19 @@ Public Class ucrDataView End Sub Private Sub DeleteCell_Click() - Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & Environment.NewLine & "Continue?", MessageBoxButtons.YesNo, "Delete Cells") - If deleteCell = DialogResult.Yes Then - StartWait() - GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) - EndWait() + If GetSelectedRows.Count = GetCurrentDataFrameFocus()?.iTotalRowCount Then + MsgBox("Cannot delete all visible Rows." & Environment.NewLine & "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", MsgBoxStyle.Information, "Cannot Delete All Rows") + Else + If GetSelectedColumns.Count = GetCurrentDataFrameFocus()?.iTotalColumnCount Then + MsgBox("Cannot delete all visible columns." & Environment.NewLine & "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", MsgBoxStyle.Information, "Cannot Delete All Columns") + Else + Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & Environment.NewLine & "Continue?", MessageBoxButtons.YesNo, "Delete Cells") + If deleteCell = DialogResult.Yes Then + StartWait() + GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) + EndWait() + End If + End If End If End Sub From e9e7b59d5c86af965a0abc66b87af2b1e7860c5d Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 10 Feb 2022 15:14:39 +0300 Subject: [PATCH 17/68] Fixing scrolling to the last dialog --- instat/UserControl/ucrOutputPage.vb | 1 + instat/frmMain.vb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/instat/UserControl/ucrOutputPage.vb b/instat/UserControl/ucrOutputPage.vb index d402d772d3e..cd242f83e69 100644 --- a/instat/UserControl/ucrOutputPage.vb +++ b/instat/UserControl/ucrOutputPage.vb @@ -166,6 +166,7 @@ Public Class ucrOutputPage } pnlMain.Controls.Add(panel) pnlMain.Controls.SetChildIndex(panel, 0) + panel.Focus() AddCheckBoxToElementPanel(panel, outputElement) AddHandler panel.Resize, AddressOf Panel_Resize Return panel diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 3e099b26ff8..e3460f0cafb 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -394,11 +394,13 @@ Public Class frmMain End Sub Private Sub mnuFileNewDataFrame_Click(sender As Object, e As EventArgs) Handles mnuFileNewDataFrame.Click + ActiveControl = Nothing 'this can be done in a general way dlgNewDataFrame.ShowDialog() End Sub Private Sub mnuPrepareColumnNumericRegularSequence_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnNumericRegularSequence.Click dlgRegularSequence.bNumericIsDefault = True + ActiveControl = Nothing 'this can be done in a general way dlgRegularSequence.ShowDialog() End Sub @@ -588,6 +590,7 @@ Public Class frmMain Private Sub EditLastDialogueToolStrip_Click(sender As Object, e As EventArgs) Handles mnuTbEditLastDialog.Click If clsRecentItems.lstRecentDialogs.Count > 0 Then + ActiveControl = Nothing 'this can be done in a general way clsRecentItems.lstRecentDialogs.Last.ShowDialog() End If End Sub From bae3d74ace3559262708eb375adc42b40f234c19 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 11 Feb 2022 22:37:28 +0300 Subject: [PATCH 18/68] adding option for selecting variables by variable type --- instat/static/InstatObject/R/data_object_R6.R | 16 +++++++++++++--- .../static/InstatObject/R/labels_and_defaults.R | 2 +- .../InstatObject/R/stand_alone_functions.R | 5 +++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 2b022b0c310..deb69b88f06 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -1931,11 +1931,21 @@ DataSheet$set("public", "get_column_selection_column_names", function(name) { "tidyselect::matches" = tidyselect::matches, "tidyselect::num_range" = tidyselect::num_range, "tidyselect::last_col" = tidyselect::last_col, + "tidyselect::where" = NULL, NULL ) - if (op == "base::match") args$table <- all_column_names - else args$vars <- all_column_names - res[[i]] <- do.call(fn, args) + if (op == "base::match") { + args$table <- all_column_names + res[[i]] <- do.call(fn, args) + }else if (op == "tidyselect::where"){ + selected_columns <- private$data |> + dplyr::select(where(args$fn)) |> + colnames() + res[[i]] <- which(all_column_names %in% selected_columns) + }else{ + args$vars <- all_column_names + res[[i]] <- do.call(fn, args) + } if (neg) res[[i]] <- setdiff(1:length(all_column_names), res[[i]]) i <- i + 1 } diff --git a/instat/static/InstatObject/R/labels_and_defaults.R b/instat/static/InstatObject/R/labels_and_defaults.R index b44bfe75882..ed6338aac03 100644 --- a/instat/static/InstatObject/R/labels_and_defaults.R +++ b/instat/static/InstatObject/R/labels_and_defaults.R @@ -69,4 +69,4 @@ keyed_link_label="keyed_link" max_labels_display=4 # Column Selection Operations -column_selection_operations <- c("base::match", "tidyselect::starts_with", "tidyselect::ends_with", "tidyselect::contains", "tidyselect::matches", "tidyselect::num_range", "tidyselect::last_col") +column_selection_operations <- c("base::match", "tidyselect::starts_with", "tidyselect::ends_with", "tidyselect::contains", "tidyselect::matches", "tidyselect::num_range", "tidyselect::last_col", "tidyselect::where") diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index ca8290f9b76..18cb09ba4cb 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2518,3 +2518,8 @@ get_quarter_label <- function(quarter, start_month){ paste(mabb[start_pos:(start_pos+2)], collapse = "")}) return(factor(x = qtr, levels = unique(qtr))) } + + +is.labelled <- function(x){ + return(isTRUE(sjlabelled::get_label(x) != "")) +} From 9de11164741d9195397647bd62d5ad0a9d6c2bfd Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 11 Feb 2022 22:38:03 +0300 Subject: [PATCH 19/68] Enabled selection by a column type --- instat/dlgSelectColumns.vb | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/instat/dlgSelectColumns.vb b/instat/dlgSelectColumns.vb index 177a87764c9..47452b1fec8 100644 --- a/instat/dlgSelectColumns.vb +++ b/instat/dlgSelectColumns.vb @@ -46,17 +46,17 @@ Public Class dlgSelectColumns ucrReceiverMultipleVariables.SetParameter(New RParameter("x", 0)) ucrReceiverMultipleVariables.SetParameterIsString() - ucrInputSelectOperation.SetItems({"Columns", "Starts with", "Ends with", "Contains", "Matches", "Numeric range", "Last column"}) + ucrInputSelectOperation.SetItems({"Columns", "Starts with", "Ends with", "Contains", "Matches", "Numeric range", "Last column", "Where"}) ucrInputSelectOperation.SetDropDownStyleAsNonEditable() - ucrInputColumnType.SetItems({"Numeric", "Factor", "Character"}) + ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Labelled"}) ucrInputColumnType.SetDropDownStyleAsNonEditable() ucrInputSelectOperation.AddToLinkedControls(ucrChkIgnoreCase, {"Starts with", "Ends with", "Contains", "Matches"}, bNewLinkedHideIfParameterMissing:=True) ucrInputSelectOperation.AddToLinkedControls(ucrReceiverMultipleVariables, {"Columns"}, bNewLinkedHideIfParameterMissing:=True) ucrInputSelectOperation.AddToLinkedControls({ucrNudFrom, ucrNudTo}, {"Numeric range"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputSelectOperation.AddToLinkedControls(ucrInputText, {"Numeric range", "Starts with", "Ends with", "Contains", "Matches"}, bNewLinkedHideIfParameterMissing:=True) - 'ucrInputSelectOperation.AddToLinkedControls(ucrInputColumnType, {"Where"}, bNewLinkedHideIfParameterMissing:=True)' TODO: uncomment once selection using where is added + ucrInputSelectOperation.AddToLinkedControls(ucrInputColumnType, {"Where"}, bNewLinkedHideIfParameterMissing:=True) ucrReceiverMultipleVariables.SetLinkedDisplayControl(lblSeclectedColumns) ucrInputText.SetLinkedDisplayControl(lblString) ucrNudFrom.SetLinkedDisplayControl(lblFrom) @@ -196,16 +196,20 @@ Public Class dlgSelectColumns clsParametersList.AddParameter("prefix", Chr(34) & ucrInputText.GetText & Chr(34), iPosition:=0) clsParametersList.AddParameter("range", clsROperatorParameter:=clsFromToOperation, iPosition:=1) strValue = clsFromToOperation.ToScript - 'TODO: this will be needed when selection depending of variable type e.g factors,characters etc is added! - 'Case "Where" - 'clsCurrentConditionList.AddParameter("operation", Chr(34) & "where" & Chr(34), iPosition:=0) - 'If ucrInputColumnType.GetText = "Numeric" Then - 'clsParametersList.AddParameter("fn", "is.numeric", iPosition:=0) - 'ElseIf ucrInputColumnType.GetText = "Factor" Then - 'clsParametersList.AddParameter("fn", "is.factor", iPosition:=0) - 'ElseIf ucrInputColumnType.GetText = "Character" Then - 'clsParametersList.AddParameter("fn", "is.character", iPosition:=0) - 'End If + Case "Where" + strValue = ucrInputColumnType.GetText + clsCurrentConditionList.AddParameter("operation", Chr(34) & "tidyselect::where" & Chr(34), iPosition:=0) + If strValue = "Numeric" Then + clsParametersList.AddParameter("fn", "is.numeric", iPosition:=0) + ElseIf strValue = "Factor" Then + clsParametersList.AddParameter("fn", "is.factor", iPosition:=0) + ElseIf strValue = "Character" Then + clsParametersList.AddParameter("fn", "is.character", iPosition:=0) + ElseIf strValue = "Logical" Then + clsParametersList.AddParameter("fn", "is.logical", iPosition:=0) + ElseIf strValue = "Labelled" Then + clsParametersList.AddParameter("fn", "is.labelled", iPosition:=0) + End If Case "Last column" strValue = "Last column" clsCurrentConditionList.AddParameter("operation", Chr(34) & "tidyselect::last_col" & Chr(34), iPosition:=0) @@ -245,12 +249,12 @@ Public Class dlgSelectColumns bEnableOrDisable = False End If Case "Where" - 'add where instance when enabled + bEnableOrDisable = Not ucrInputColumnType.IsEmpty End Select cmdAddCondition.Enabled = bEnableOrDisable End Sub - Private Sub ucrReceiverMultipleVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleVariables.ControlValueChanged, ucrInputSelectOperation.ControlValueChanged, ucrNudFrom.ControlValueChanged, ucrNudTo.ControlValueChanged, ucrInputText.ControlContentsChanged + Private Sub ucrReceiverMultipleVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleVariables.ControlValueChanged, ucrInputSelectOperation.ControlValueChanged, ucrNudFrom.ControlValueChanged, ucrNudTo.ControlValueChanged, ucrInputText.ControlContentsChanged, ucrInputColumnType.ControlContentsChanged EnableDisableAddConditionButton() End Sub @@ -268,13 +272,11 @@ Public Class dlgSelectColumns If Not cmdAddCondition.Enabled Then Exit Sub End If - Dim result As MsgBoxResult = MessageBox.Show( text:="Are you sure you want to return to the main dialog?" & Environment.NewLine & "The condition for " & ucrInputSelectOperation.GetText & " has not been added." & Environment.NewLine & "Click the ""Add Condition"" button if you want to add it.", caption:="Return to main dialog?", buttons:=MessageBoxButtons.YesNo, icon:=MessageBoxIcon.Information) e.Cancel = result = MsgBoxResult.No - End Sub End Class \ No newline at end of file From 4f5f5c14233cd2d2d930c6f903b22a82620a286d Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 11 Feb 2022 23:29:36 +0300 Subject: [PATCH 20/68] added options to select empty & NA variables --- instat/dlgSelectColumns.vb | 6 +++++- instat/static/InstatObject/R/stand_alone_functions.R | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/instat/dlgSelectColumns.vb b/instat/dlgSelectColumns.vb index 47452b1fec8..5183dd573f0 100644 --- a/instat/dlgSelectColumns.vb +++ b/instat/dlgSelectColumns.vb @@ -49,7 +49,7 @@ Public Class dlgSelectColumns ucrInputSelectOperation.SetItems({"Columns", "Starts with", "Ends with", "Contains", "Matches", "Numeric range", "Last column", "Where"}) ucrInputSelectOperation.SetDropDownStyleAsNonEditable() - ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Labelled"}) + ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Labelled", "Empty columns", "NA columns"}) ucrInputColumnType.SetDropDownStyleAsNonEditable() ucrInputSelectOperation.AddToLinkedControls(ucrChkIgnoreCase, {"Starts with", "Ends with", "Contains", "Matches"}, bNewLinkedHideIfParameterMissing:=True) @@ -209,6 +209,10 @@ Public Class dlgSelectColumns clsParametersList.AddParameter("fn", "is.logical", iPosition:=0) ElseIf strValue = "Labelled" Then clsParametersList.AddParameter("fn", "is.labelled", iPosition:=0) + ElseIf strValue = "Empty columns" Then + clsParametersList.AddParameter("fn", "is.emptyvariable", iPosition:=0) + ElseIf strValue = "NA columns" Then + clsParametersList.AddParameter("fn", "is.NAvariable", iPosition:=0) End If Case "Last column" strValue = "Last column" diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 18cb09ba4cb..cfe2d760f86 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2519,7 +2519,14 @@ get_quarter_label <- function(quarter, start_month){ return(factor(x = qtr, levels = unique(qtr))) } - is.labelled <- function(x){ return(isTRUE(sjlabelled::get_label(x) != "")) } + +is.emptyvariable <- function(x){ + return(isTRUE(length(x) == sum(x == ""))) +} + +is.NAvariable <- function(x){ + return(isTRUE(length(x) == sum(is.na(x)))) +} From 5ac030b0697edcea78f5a67398a845011b2cd09b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 11 Feb 2022 23:56:02 +0300 Subject: [PATCH 21/68] added levels count function --- instat/static/InstatObject/R/stand_alone_functions.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index cfe2d760f86..6a4264ddeb1 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2530,3 +2530,7 @@ is.emptyvariable <- function(x){ is.NAvariable <- function(x){ return(isTRUE(length(x) == sum(is.na(x)))) } + +is.levelscount <- function(x, n){ + return(isTRUE(sum(levels(x)) == n)) +} From 157cebb80aca7a8f4b3ca02f65e3492e399fbddf Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 14 Feb 2022 19:07:26 +0300 Subject: [PATCH 22/68] Bug fixes and adding NOT --- instat/dlgSelectColumns.Designer.vb | 14 ++++++++++- instat/dlgSelectColumns.vb | 25 ++++++++++++------- instat/sdgDataOptions.vb | 2 +- .../InstatObject/R/stand_alone_functions.R | 2 +- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/instat/dlgSelectColumns.Designer.vb b/instat/dlgSelectColumns.Designer.vb index 56440696846..9f94031b7a5 100644 --- a/instat/dlgSelectColumns.Designer.vb +++ b/instat/dlgSelectColumns.Designer.vb @@ -34,6 +34,7 @@ Partial Class dlgSelectColumns Me.lblTo = New System.Windows.Forms.Label() Me.lblFrom = New System.Windows.Forms.Label() Me.lblColumnType = New System.Windows.Forms.Label() + Me.ucrChkNot = New instat.ucrCheck() Me.ucrInputColumnType = New instat.ucrInputComboBox() Me.ucrNudTo = New instat.ucrNud() Me.ucrNudFrom = New instat.ucrNud() @@ -103,7 +104,7 @@ Partial Class dlgSelectColumns ' Me.cmdAddCondition.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdAddCondition.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdAddCondition.Location = New System.Drawing.Point(275, 85) + Me.cmdAddCondition.Location = New System.Drawing.Point(276, 107) Me.cmdAddCondition.Name = "cmdAddCondition" Me.cmdAddCondition.Size = New System.Drawing.Size(112, 30) Me.cmdAddCondition.TabIndex = 12 @@ -172,6 +173,15 @@ Partial Class dlgSelectColumns Me.lblColumnType.Text = "Column Type:" Me.lblColumnType.Visible = False ' + 'ucrChkNot + ' + Me.ucrChkNot.AutoSize = True + Me.ucrChkNot.Checked = False + Me.ucrChkNot.Location = New System.Drawing.Point(276, 81) + Me.ucrChkNot.Name = "ucrChkNot" + Me.ucrChkNot.Size = New System.Drawing.Size(110, 23) + Me.ucrChkNot.TabIndex = 23 + ' 'ucrInputColumnType ' Me.ucrInputColumnType.AddQuotesIfUnrecognised = True @@ -305,6 +315,7 @@ Partial Class dlgSelectColumns Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(518, 464) + Me.Controls.Add(Me.ucrChkNot) Me.Controls.Add(Me.lblColumnType) Me.Controls.Add(Me.ucrInputColumnType) Me.Controls.Add(Me.lblFrom) @@ -362,4 +373,5 @@ Partial Class dlgSelectColumns Friend WithEvents ucrNudFrom As ucrNud Friend WithEvents ucrInputColumnType As ucrInputComboBox Friend WithEvents lblColumnType As Label + Friend WithEvents ucrChkNot As ucrCheck End Class diff --git a/instat/dlgSelectColumns.vb b/instat/dlgSelectColumns.vb index 5183dd573f0..4505169ab65 100644 --- a/instat/dlgSelectColumns.vb +++ b/instat/dlgSelectColumns.vb @@ -31,6 +31,7 @@ Public Class dlgSelectColumns SetDefaults() End If SetRcodeForControls(bReset) + EnableDisableAddConditionButton() bReset = False autoTranslate(Me) End Sub @@ -49,7 +50,7 @@ Public Class dlgSelectColumns ucrInputSelectOperation.SetItems({"Columns", "Starts with", "Ends with", "Contains", "Matches", "Numeric range", "Last column", "Where"}) ucrInputSelectOperation.SetDropDownStyleAsNonEditable() - ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Labelled", "Empty columns", "NA columns"}) + ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Variable label", "Empty columns", "NA columns"}) ucrInputColumnType.SetDropDownStyleAsNonEditable() ucrInputSelectOperation.AddToLinkedControls(ucrChkIgnoreCase, {"Starts with", "Ends with", "Contains", "Matches"}, bNewLinkedHideIfParameterMissing:=True) @@ -82,6 +83,8 @@ Public Class dlgSelectColumns ucrNudTo.SetParameter(New RParameter("to", 1)) ucrNudTo.SetMinMax(1, Integer.MaxValue) + + ucrChkNot.SetText("Add not") End Sub Private Sub SetDefaults() @@ -89,7 +92,6 @@ Public Class dlgSelectColumns clsConditionsList = New RFunction clsFromToOperation = New ROperator - ucrSelectorForColumnSelection.Reset() ucrInputSelectOperation.SetText("Columns") ucrInputColumnType.SetText("Numeric") @@ -106,14 +108,14 @@ Public Class dlgSelectColumns End Sub Private Sub SetRcodeForControls(bReset As Boolean) - ucrSelectorForColumnSelection.SetRCode(clsAddColumnSelection, bReset) - ucrNudFrom.SetRCode(clsFromToOperation, bReset) - ucrNudTo.SetRCode(clsFromToOperation, bReset) + ucrSelectorForColumnSelection.SetRCode(clsAddColumnSelection, bReset, bCloneIfNeeded:=True) + ucrNudFrom.SetRCode(clsFromToOperation, bReset, bCloneIfNeeded:=True) + ucrNudTo.SetRCode(clsFromToOperation, bReset, bCloneIfNeeded:=True) End Sub - Public Sub SetDefaultDataFrame(Optional strDefaultDataframe As String = "") + Public Sub SetDefaultDataFrame(Optional strDefaultDataframe As String = "", Optional bEnableDataframe As Boolean = False) If strDefaultDataframe <> "" Then - ucrSelectorForColumnSelection.SetDataframe(strDefaultDataframe, bEnableDataframe:=False) + ucrSelectorForColumnSelection.SetDataframe(strDefaultDataframe, bEnableDataframe:=bEnableDataframe) ucrSelectorForColumnSelection.ucrAvailableDataFrames.Enabled = False 'Note: This is potentially a duplication because for some reason setting bEnableDataframe:=False in line 117 changes internally End If End Sub @@ -208,7 +210,7 @@ Public Class dlgSelectColumns ElseIf strValue = "Logical" Then clsParametersList.AddParameter("fn", "is.logical", iPosition:=0) ElseIf strValue = "Labelled" Then - clsParametersList.AddParameter("fn", "is.labelled", iPosition:=0) + clsParametersList.AddParameter("fn", "is.containlabel", iPosition:=0) ElseIf strValue = "Empty columns" Then clsParametersList.AddParameter("fn", "is.emptyvariable", iPosition:=0) ElseIf strValue = "NA columns" Then @@ -219,7 +221,11 @@ Public Class dlgSelectColumns clsCurrentConditionList.AddParameter("operation", Chr(34) & "tidyselect::last_col" & Chr(34), iPosition:=0) End Select clsCurrentConditionList.AddParameter("parameters", clsRFunctionParameter:=clsParametersList, iPosition:=1) - + If ucrChkNot.Checked Then + clsCurrentConditionList.AddParameter("negation", "TRUE", iPosition:=2) + Else + clsCurrentConditionList.RemoveParameterByName("negation") + End If clsConditionsList.AddParameter("C" & clsConditionsList.clsParameters.Count, clsRFunctionParameter:=(clsCurrentConditionList)) lviCondition = New ListViewItem({ucrInputSelectOperation.GetText, strValue}) lstColumnSelections.Items.Add(lviCondition) @@ -267,6 +273,7 @@ Public Class dlgSelectColumns If lstColumnSelections.Items.Count > 0 Then frmMain.clsRLink.RunScript(clsAddColumnSelection.ToScript, strComment:="Column selection subdialog: Created new column selection", bSilent:=True) dlgSelect.ucrReceiverSelect.Add(ucrInputSelectName.GetText()) + sdgDataOptions.ucrReceiverSelect.Add(ucrInputSelectName.GetText) lstColumnSelections.Items.Clear() clsConditionsList.ClearParameters() End If diff --git a/instat/sdgDataOptions.vb b/instat/sdgDataOptions.vb index c7e45302f7c..e407efbe31b 100644 --- a/instat/sdgDataOptions.vb +++ b/instat/sdgDataOptions.vb @@ -148,8 +148,8 @@ Public Class sdgDataOptions End Sub Private Sub cmdDefineNewSelect_Click(sender As Object, e As EventArgs) Handles cmdDefineNewSelect.Click + dlgSelectColumns.SetDefaultDataFrame(strCurrentDataFrame) dlgSelectColumns.ShowDialog() - ucrReceiverSelect.Add(dlgSelectColumns.ucrInputSelectName.GetText) ucrSelectorForSelectColumns.LoadList() End Sub diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 6a4264ddeb1..a49ee46a453 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2519,7 +2519,7 @@ get_quarter_label <- function(quarter, start_month){ return(factor(x = qtr, levels = unique(qtr))) } -is.labelled <- function(x){ +is.containlabel <- function(x){ return(isTRUE(sjlabelled::get_label(x) != "")) } From 9ee31892f757b648ea159558d0af041986e42193 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 15 Feb 2022 11:05:16 +0300 Subject: [PATCH 23/68] added remove_empty columns function --- instat/static/InstatObject/R/data_object_R6.R | 30 +++++++++++++++++++ .../static/InstatObject/R/instat_object_R6.R | 5 ++++ 2 files changed, 35 insertions(+) diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 5b78af702d8..9e1dfebbeca 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -4231,3 +4231,33 @@ DataSheet$set("public", "add_flag_fields", function(col_names) { self$add_columns_to_data(col_data = col_data, col_name = paste0(i, "_fl")) } }) + +DataSheet$set("public", "remove_empty", function(which = c("rows", "cols")) { + curr_data <- self$get_data_frame() + old_metadata <- attributes(curr_data) + new_df <- curr_data |> + janitor::remove_empty(which = which) + row_message <- paste(nrow(curr_data) - nrow(new_df), "empty rows deleted") + cols_message <- paste(ncol(curr_data) - ncol(new_df), "empty variables deleted") + if (all(which %in% "rows")) cat(row_message, "\n") + if (all(which %in% "cols")) cat(cols_message) + if (all(c("rows", "cols") %in% which)) { + cat(row_message, "\n") + cat(cols_message) + } + for (name in names(old_metadata)) { + if (!(name %in% c("names", "class", "row.names"))) { + attr(new_df, name) <- old_metadata[[name]] + } + } + for (col_name in names(new_df)) { + for (attr_name in names(attributes(private$data[[col_name]]))) { + if (!attr_name %in% c("class", "levels")) { + attr(new_df[[col_name]], attr_name) <- attr(private$data[[col_name]], attr_name) + } + } + } + self$set_data(new_df) + self$data_changed <- TRUE + private$.variables_metadata_changed <- TRUE +}) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 9a0c56c4ac2..195050be45d 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2714,3 +2714,8 @@ DataBook$set("public", "add_flag_fields", function(data_name, col_names, key_col self$get_data_objects(data_name)$add_flag_fields(col_names = col_names) } ) + + +DataBook$set("public", "remove_empty", function(data_name, which = c("rows","cols")) { + self$get_data_objects(data_name)$remove_empty(which = which) +}) From cf331c6f891150a2a16cde2f2862868eb9e939d0 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 15 Feb 2022 11:05:36 +0300 Subject: [PATCH 24/68] Bug fixes --- instat/dlgDeleteRowsOrColums.Designer.vb | 46 ++++++-------- instat/dlgDeleteRowsOrColums.vb | 76 +++++++++--------------- 2 files changed, 45 insertions(+), 77 deletions(-) diff --git a/instat/dlgDeleteRowsOrColums.Designer.vb b/instat/dlgDeleteRowsOrColums.Designer.vb index 5c789d71ffc..773ed4761f3 100644 --- a/instat/dlgDeleteRowsOrColums.Designer.vb +++ b/instat/dlgDeleteRowsOrColums.Designer.vb @@ -54,7 +54,6 @@ Partial Class dlgDeleteRowsOrColums Me.ucrSelectorForDeleteColumns = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverForColumnsToDelete = New instat.ucrReceiverMultiple() Me.ucrBase = New instat.ucrButtons() - Me.ucrNewDataFrame = New instat.ucrSave() Me.SuspendLayout() ' 'lblNumberofRows @@ -75,7 +74,7 @@ Partial Class dlgDeleteRowsOrColums Me.lblColumnsToDelete.Location = New System.Drawing.Point(254, 89) Me.lblColumnsToDelete.Name = "lblColumnsToDelete" Me.lblColumnsToDelete.Size = New System.Drawing.Size(96, 13) - Me.lblColumnsToDelete.TabIndex = 4 + Me.lblColumnsToDelete.TabIndex = 5 Me.lblColumnsToDelete.Tag = "Columns_to_Delete" Me.lblColumnsToDelete.Text = "Columns to Delete:" ' @@ -99,7 +98,7 @@ Partial Class dlgDeleteRowsOrColums Me.rdoColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoColumns.ForeColor = System.Drawing.SystemColors.ControlText Me.rdoColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoColumns.Location = New System.Drawing.Point(53, 12) + Me.rdoColumns.Location = New System.Drawing.Point(58, 12) Me.rdoColumns.Name = "rdoColumns" Me.rdoColumns.Size = New System.Drawing.Size(100, 28) Me.rdoColumns.TabIndex = 1 @@ -118,7 +117,7 @@ Partial Class dlgDeleteRowsOrColums Me.rdoRows.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoRows.ForeColor = System.Drawing.SystemColors.ActiveCaptionText Me.rdoRows.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoRows.Location = New System.Drawing.Point(151, 12) + Me.rdoRows.Location = New System.Drawing.Point(158, 12) Me.rdoRows.Name = "rdoRows" Me.rdoRows.Size = New System.Drawing.Size(100, 28) Me.rdoRows.TabIndex = 2 @@ -133,7 +132,7 @@ Partial Class dlgDeleteRowsOrColums Me.lblTo.Location = New System.Drawing.Point(51, 169) Me.lblTo.Name = "lblTo" Me.lblTo.Size = New System.Drawing.Size(23, 13) - Me.lblTo.TabIndex = 10 + Me.lblTo.TabIndex = 12 Me.lblTo.Tag = "" Me.lblTo.Text = "To:" ' @@ -146,10 +145,10 @@ Partial Class dlgDeleteRowsOrColums Me.rdoEmpty.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoEmpty.ForeColor = System.Drawing.SystemColors.ControlText Me.rdoEmpty.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoEmpty.Location = New System.Drawing.Point(249, 12) + Me.rdoEmpty.Location = New System.Drawing.Point(258, 12) Me.rdoEmpty.Name = "rdoEmpty" Me.rdoEmpty.Size = New System.Drawing.Size(100, 28) - Me.rdoEmpty.TabIndex = 13 + Me.rdoEmpty.TabIndex = 3 Me.rdoEmpty.Text = "Empty" Me.rdoEmpty.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoEmpty.UseVisualStyleBackColor = True @@ -161,7 +160,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrChkEmptyRows.Location = New System.Drawing.Point(11, 141) Me.ucrChkEmptyRows.Name = "ucrChkEmptyRows" Me.ucrChkEmptyRows.Size = New System.Drawing.Size(109, 23) - Me.ucrChkEmptyRows.TabIndex = 16 + Me.ucrChkEmptyRows.TabIndex = 10 ' 'ucrChkEmptyColumns ' @@ -170,7 +169,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrChkEmptyColumns.Location = New System.Drawing.Point(11, 106) Me.ucrChkEmptyColumns.Name = "ucrChkEmptyColumns" Me.ucrChkEmptyColumns.Size = New System.Drawing.Size(108, 23) - Me.ucrChkEmptyColumns.TabIndex = 15 + Me.ucrChkEmptyColumns.TabIndex = 7 ' 'ucrNudTo ' @@ -182,7 +181,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrNudTo.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTo.Name = "ucrNudTo" Me.ucrNudTo.Size = New System.Drawing.Size(82, 20) - Me.ucrNudTo.TabIndex = 11 + Me.ucrNudTo.TabIndex = 13 Me.ucrNudTo.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrPnlColumnsOrRows @@ -190,7 +189,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrPnlColumnsOrRows.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlColumnsOrRows.Location = New System.Drawing.Point(53, 11) Me.ucrPnlColumnsOrRows.Name = "ucrPnlColumnsOrRows" - Me.ucrPnlColumnsOrRows.Size = New System.Drawing.Size(303, 29) + Me.ucrPnlColumnsOrRows.Size = New System.Drawing.Size(321, 29) Me.ucrPnlColumnsOrRows.TabIndex = 0 ' 'ucrDataFrameLengthForDeleteRows @@ -199,7 +198,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrDataFrameLengthForDeleteRows.Location = New System.Drawing.Point(100, 104) Me.ucrDataFrameLengthForDeleteRows.Name = "ucrDataFrameLengthForDeleteRows" Me.ucrDataFrameLengthForDeleteRows.Size = New System.Drawing.Size(62, 24) - Me.ucrDataFrameLengthForDeleteRows.TabIndex = 7 + Me.ucrDataFrameLengthForDeleteRows.TabIndex = 8 Me.ucrDataFrameLengthForDeleteRows.ucrDataFrameSelector = Nothing ' 'ucrNudFrom @@ -212,7 +211,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrNudFrom.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudFrom.Name = "ucrNudFrom" Me.ucrNudFrom.Size = New System.Drawing.Size(82, 20) - Me.ucrNudFrom.TabIndex = 9 + Me.ucrNudFrom.TabIndex = 11 Me.ucrNudFrom.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrSelectorForDeleteColumns @@ -225,7 +224,7 @@ Partial Class dlgDeleteRowsOrColums Me.ucrSelectorForDeleteColumns.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForDeleteColumns.Name = "ucrSelectorForDeleteColumns" Me.ucrSelectorForDeleteColumns.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorForDeleteColumns.TabIndex = 3 + Me.ucrSelectorForDeleteColumns.TabIndex = 4 ' 'ucrReceiverForColumnsToDelete ' @@ -237,34 +236,24 @@ Partial Class dlgDeleteRowsOrColums Me.ucrReceiverForColumnsToDelete.Selector = Nothing Me.ucrReceiverForColumnsToDelete.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverForColumnsToDelete.strNcFilePath = "" - Me.ucrReceiverForColumnsToDelete.TabIndex = 5 + Me.ucrReceiverForColumnsToDelete.TabIndex = 6 Me.ucrReceiverForColumnsToDelete.ucrSelector = Nothing ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(7, 273) + Me.ucrBase.Location = New System.Drawing.Point(5, 238) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(405, 52) - Me.ucrBase.TabIndex = 12 - ' - 'ucrNewDataFrame - ' - Me.ucrNewDataFrame.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrNewDataFrame.Location = New System.Drawing.Point(7, 236) - Me.ucrNewDataFrame.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrNewDataFrame.Name = "ucrNewDataFrame" - Me.ucrNewDataFrame.Size = New System.Drawing.Size(405, 34) - Me.ucrNewDataFrame.TabIndex = 17 + Me.ucrBase.TabIndex = 14 ' 'dlgDeleteRowsOrColums ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(416, 330) - Me.Controls.Add(Me.ucrNewDataFrame) + Me.ClientSize = New System.Drawing.Size(416, 294) Me.Controls.Add(Me.ucrChkEmptyRows) Me.Controls.Add(Me.ucrChkEmptyColumns) Me.Controls.Add(Me.rdoEmpty) @@ -309,5 +298,4 @@ Partial Class dlgDeleteRowsOrColums Friend WithEvents rdoEmpty As RadioButton Friend WithEvents ucrChkEmptyRows As ucrCheck Friend WithEvents ucrChkEmptyColumns As ucrCheck - Friend WithEvents ucrNewDataFrame As ucrSave End Class diff --git a/instat/dlgDeleteRowsOrColums.vb b/instat/dlgDeleteRowsOrColums.vb index a48a5051f2e..081b75bf61f 100644 --- a/instat/dlgDeleteRowsOrColums.vb +++ b/instat/dlgDeleteRowsOrColums.vb @@ -21,7 +21,6 @@ Public Class dlgDeleteRowsOrColums Private clsOperatorRowNames As New ROperator Private clsDeleteRows, clsDeleteColumns As RFunction Private clsRemoveEmptyColumns, clsConcFunction As New RFunction - Private clsColsPipeOperator As New ROperator Private clsDummyFunction As New RFunction Private Sub dlgDeleteRows_Load(sender As Object, e As EventArgs) Handles Me.Load If bFirstLoad Then @@ -40,6 +39,8 @@ Public Class dlgDeleteRowsOrColums Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 165 + ucrBase.clsRsyntax.iCallType = 2 + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False ucrPnlColumnsOrRows.AddRadioButton(rdoColumns) ucrPnlColumnsOrRows.AddRadioButton(rdoRows) @@ -52,16 +53,11 @@ Public Class dlgDeleteRowsOrColums ucrPnlColumnsOrRows.AddToLinkedControls(ucrNudFrom, {rdoRows}, bNewLinkedHideIfParameterMissing:=True) ucrPnlColumnsOrRows.AddToLinkedControls(ucrNudTo, {rdoRows}, bNewLinkedHideIfParameterMissing:=True) ucrPnlColumnsOrRows.AddToLinkedControls(ucrDataFrameLengthForDeleteRows, {rdoRows}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlColumnsOrRows.AddToLinkedControls({ucrChkEmptyRows, ucrChkEmptyColumns, ucrNewDataFrame}, {rdoEmpty}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlColumnsOrRows.AddToLinkedControls({ucrChkEmptyRows, ucrChkEmptyColumns}, {rdoEmpty}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrSelectorForDeleteColumns.SetParameter(New RParameter("data_name", 0)) ucrSelectorForDeleteColumns.SetParameterIsString() - ucrNewDataFrame.SetIsTextBox() - ucrNewDataFrame.SetSaveTypeAsDataFrame() - ucrNewDataFrame.SetDataFrameSelector(ucrSelectorForDeleteColumns.ucrAvailableDataFrames) - ucrNewDataFrame.SetLabelText("New Data Frame Name:") - ucrReceiverForColumnsToDelete.SetParameter(New RParameter("cols", 1)) ucrReceiverForColumnsToDelete.Selector = ucrSelectorForDeleteColumns ucrReceiverForColumnsToDelete.SetMeAsReceiver() @@ -75,11 +71,11 @@ Public Class dlgDeleteRowsOrColums ucrNudTo.SetLinkedDisplayControl(lblTo) ucrChkEmptyColumns.SetText("Columns") - ucrChkEmptyColumns.AddParameterPresentCondition(True, "x", True) + ucrChkEmptyColumns.AddParameterPresentCondition(True, "x") ucrChkEmptyColumns.AddParameterPresentCondition(False, "x", False) ucrChkEmptyRows.SetText("Rows") - ucrChkEmptyRows.AddParameterPresentCondition(True, "y", True) + ucrChkEmptyRows.AddParameterPresentCondition(True, "y") ucrChkEmptyRows.AddParameterPresentCondition(False, "y", False) ucrDataFrameLengthForDeleteRows.SetLinkedDisplayControl(lblNumberofRows) @@ -91,13 +87,10 @@ Public Class dlgDeleteRowsOrColums clsDeleteRows = New RFunction clsOperatorRowNames = New ROperator clsRemoveEmptyColumns = New RFunction - clsColsPipeOperator = New ROperator clsConcFunction = New RFunction clsDummyFunction = New RFunction ucrSelectorForDeleteColumns.Reset() - ucrNewDataFrame.Reset() - NewDefaultName() clsDeleteRows.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$remove_rows_in_data") clsDeleteColumns.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$remove_columns_in_data") @@ -109,14 +102,12 @@ Public Class dlgDeleteRowsOrColums clsDeleteRows.AddParameter("row_names", clsROperatorParameter:=clsOperatorRowNames) clsConcFunction.SetRCommand("c") + clsConcFunction.AddParameter("x", Chr(34) & "cols" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsConcFunction.AddParameter("y", Chr(34) & "rows" & Chr(34), iPosition:=1, bIncludeArgumentName:=False) - clsRemoveEmptyColumns.SetPackageName("janitor") - clsRemoveEmptyColumns.SetRCommand("remove_empty") + clsRemoveEmptyColumns.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$remove_empty") clsRemoveEmptyColumns.AddParameter("which", clsRFunctionParameter:=clsConcFunction, iPosition:=0) - clsColsPipeOperator.SetOperation("%>%") - clsColsPipeOperator.AddParameter("x", clsRFunctionParameter:=clsRemoveEmptyColumns, iPosition:=1, bIncludeArgumentName:=False) - clsDummyFunction.AddParameter("checked", "columns", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsDeleteColumns) @@ -125,7 +116,6 @@ Public Class dlgDeleteRowsOrColums Private Sub SetRCodeForControls(bReset As Boolean) ucrSelectorForDeleteColumns.AddAdditionalCodeParameterPair(clsDeleteColumns, ucrSelectorForDeleteColumns.GetParameter, iAdditionalPairNo:=1) ucrPnlColumnsOrRows.SetRCode(clsDummyFunction, bReset) - ucrNewDataFrame.SetRCode(clsColsPipeOperator, bReset) ucrReceiverForColumnsToDelete.SetRCode(clsDeleteColumns) ucrSelectorForDeleteColumns.SetRCode(clsDeleteRows) ucrNudTo.SetRCode(clsOperatorRowNames, bReset) @@ -148,7 +138,7 @@ Public Class dlgDeleteRowsOrColums ucrBase.OKEnabled(False) End If ElseIf rdoEmpty.Checked Then - If ucrChkEmptyColumns.Checked OrElse ucrChkEmptyRows.Checked AndAlso ucrNewDataFrame.IsComplete Then + If ucrChkEmptyColumns.Checked OrElse ucrChkEmptyRows.Checked Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -170,13 +160,7 @@ Public Class dlgDeleteRowsOrColums TestOKEnabled() End Sub - Private Sub NewDefaultName() - If ucrSelectorForDeleteColumns.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso (Not ucrNewDataFrame.bUserTyped) Then - ucrNewDataFrame.SetPrefix(ucrSelectorForDeleteColumns.ucrAvailableDataFrames.cboAvailableDataFrames.Text) - End If - End Sub - - Private Sub ucrPnlColumnsOrRows_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnsOrRows.ControlValueChanged, ucrChkEmptyColumns.ControlValueChanged, ucrChkEmptyRows.ControlValueChanged + Private Sub ucrPnlColumnsOrRows_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnsOrRows.ControlValueChanged If rdoColumns.Checked Then clsDummyFunction.AddParameter("checked", "columns", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsDeleteColumns) @@ -187,22 +171,14 @@ Public Class dlgDeleteRowsOrColums ucrSelectorForDeleteColumns.SetVariablesVisible(False) ElseIf rdoEmpty.Checked Then clsDummyFunction.AddParameter("checked", "empty", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsColsPipeOperator) + ucrBase.clsRsyntax.SetBaseRFunction(clsRemoveEmptyColumns) ucrSelectorForDeleteColumns.SetVariablesVisible(False) End If - DeletingEmptyColsAndRows() End Sub Private Sub ucrSelectorForDeleteColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForDeleteColumns.ControlValueChanged SetMaxMin() - NewDefaultName() - clsColsPipeOperator.AddParameter("left", clsRFunctionParameter:=ucrSelectorForDeleteColumns.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - End Sub - - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverForColumnsToDelete.ControlContentsChanged, - ucrNudFrom.ControlContentsChanged, ucrPnlColumnsOrRows.ControlContentsChanged, ucrNudTo.ControlContentsChanged, - ucrChkEmptyColumns.ControlContentsChanged, ucrChkEmptyRows.ControlContentsChanged, ucrNewDataFrame.ControlContentsChanged - TestOKEnabled() + clsRemoveEmptyColumns.AddParameter("data_name", Chr(34) & ucrSelectorForDeleteColumns.strCurrentDataFrame & Chr(34), iPosition:=0) End Sub Private Sub SetMaxMin() @@ -216,18 +192,22 @@ Public Class dlgDeleteRowsOrColums End If End Sub - Private Sub DeletingEmptyColsAndRows() - If rdoEmpty.Checked Then - If ucrChkEmptyRows.Checked Then - clsConcFunction.AddParameter("y", Chr(34) & "rows" & Chr(34), iPosition:=1, bIncludeArgumentName:=False) - Else - clsConcFunction.RemoveParameterByName("y") - End If - If ucrChkEmptyColumns.Checked Then - clsConcFunction.AddParameter("x", Chr(34) & "cols" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) - Else - clsConcFunction.RemoveParameterByName("x") - End If + Private Sub ucrChkEmptyColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEmptyColumns.ControlValueChanged, ucrChkEmptyRows.ControlValueChanged + If ucrChkEmptyRows.Checked Then + clsConcFunction.AddParameter("y", Chr(34) & "rows" & Chr(34), iPosition:=1, bIncludeArgumentName:=False) + Else + clsConcFunction.RemoveParameterByName("y") + End If + If ucrChkEmptyColumns.Checked Then + clsConcFunction.AddParameter("x", Chr(34) & "cols" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + Else + clsConcFunction.RemoveParameterByName("x") End If End Sub + + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverForColumnsToDelete.ControlContentsChanged, + ucrNudFrom.ControlContentsChanged, ucrPnlColumnsOrRows.ControlContentsChanged, ucrNudTo.ControlContentsChanged, + ucrChkEmptyColumns.ControlContentsChanged, ucrChkEmptyRows.ControlContentsChanged + TestOKEnabled() + End Sub End Class \ No newline at end of file From d62943994b00ceb06a6a1028282a12c023d7a4ab Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 15 Feb 2022 11:29:39 +0300 Subject: [PATCH 25/68] Made the sufficient change --- instat/UserControl/ucrOutputPage.vb | 8 +++++++- instat/frmMain.vb | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/instat/UserControl/ucrOutputPage.vb b/instat/UserControl/ucrOutputPage.vb index cd242f83e69..f8ff320d6f0 100644 --- a/instat/UserControl/ucrOutputPage.vb +++ b/instat/UserControl/ucrOutputPage.vb @@ -166,7 +166,6 @@ Public Class ucrOutputPage } pnlMain.Controls.Add(panel) pnlMain.Controls.SetChildIndex(panel, 0) - panel.Focus() AddCheckBoxToElementPanel(panel, outputElement) AddHandler panel.Resize, AddressOf Panel_Resize Return panel @@ -183,6 +182,7 @@ Public Class ucrOutputPage panel.Controls.Add(checkBox) _checkBoxes.Add(checkBox) AddHandler checkBox.Click, AddressOf checkButton_Click + AddHandler checkBox.MouseLeave, AddressOf panelContents_MouseLeave End Sub Private Sub AddNewScript(outputElement As clsOutputElement) @@ -196,6 +196,7 @@ Public Class ucrOutputPage panel.Controls.SetChildIndex(richTextBox, 0) SetRichTextBoxHeight(richTextBox) AddHandler richTextBox.KeyUp, AddressOf richTextBox_CopySelectedText + AddHandler richTextBox.MouseLeave, AddressOf panelContents_MouseLeave End Sub Private Function CopyOneImageOnly() As Boolean @@ -257,6 +258,7 @@ Public Class ucrOutputPage panel.Controls.SetChildIndex(richTextBox, 0) SetRichTextBoxHeight(richTextBox) AddHandler richTextBox.KeyUp, AddressOf richTextBox_CopySelectedText + AddHandler richTextBox.MouseLeave, AddressOf panelContents_MouseLeave End Sub Private Sub AddNewImageOutput(outputElement As clsOutputElement) @@ -295,6 +297,10 @@ Public Class ucrOutputPage End If End Sub + Private Sub panelContents_MouseLeave(sender As Object, e As EventArgs) + pnlMain.Focus() + End Sub + Private Sub CopySelectedTextToClipBoard(richText As RichTextBox, richTextFormat As String) Dim strClip As String = String.Empty Dim dto As New DataObject() diff --git a/instat/frmMain.vb b/instat/frmMain.vb index e3460f0cafb..3e099b26ff8 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -394,13 +394,11 @@ Public Class frmMain End Sub Private Sub mnuFileNewDataFrame_Click(sender As Object, e As EventArgs) Handles mnuFileNewDataFrame.Click - ActiveControl = Nothing 'this can be done in a general way dlgNewDataFrame.ShowDialog() End Sub Private Sub mnuPrepareColumnNumericRegularSequence_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnNumericRegularSequence.Click dlgRegularSequence.bNumericIsDefault = True - ActiveControl = Nothing 'this can be done in a general way dlgRegularSequence.ShowDialog() End Sub @@ -590,7 +588,6 @@ Public Class frmMain Private Sub EditLastDialogueToolStrip_Click(sender As Object, e As EventArgs) Handles mnuTbEditLastDialog.Click If clsRecentItems.lstRecentDialogs.Count > 0 Then - ActiveControl = Nothing 'this can be done in a general way clsRecentItems.lstRecentDialogs.Last.ShowDialog() End If End Sub From d586c1a50061b2c4828df92989ab04a755397cbe Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Tue, 15 Feb 2022 01:02:40 -0800 Subject: [PATCH 26/68] Additional changes in ucrDataView and clsPrepareFunctionsForGrids --- .../Model/RCommand/clsPrepareFunctionsForGrids.vb | 4 +++- instat/ucrDataView.vb | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb index d8a44aeb31a..7ccbf7f5e27 100644 --- a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb +++ b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb @@ -323,7 +323,9 @@ Public Class clsPrepareFunctionsForGrids End Function '' - ''' Delete one or many columns + ''' Description: To Delete one or many cells + ''' the delete cell function is to be used to Replace selected values with NA + ''' in the dataframe. ''' ''' ''' diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 71a747ec1f0..e024fe3d88e 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -846,12 +846,19 @@ Public Class ucrDataView Private Sub DeleteCell_Click() If GetSelectedRows.Count = GetCurrentDataFrameFocus()?.iTotalRowCount Then - MsgBox("Cannot delete all visible Rows." & Environment.NewLine & "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", MsgBoxStyle.Information, "Cannot Delete All Rows") + MsgBox("Cannot delete all visible Rows." & + Environment.NewLine & + "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", + MsgBoxStyle.Information, "Cannot Delete All Rows") Else If GetSelectedColumns.Count = GetCurrentDataFrameFocus()?.iTotalColumnCount Then - MsgBox("Cannot delete all visible columns." & Environment.NewLine & "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", MsgBoxStyle.Information, "Cannot Delete All Columns") + MsgBox("Cannot delete all visible columns." & Environment.NewLine & + "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", + MsgBoxStyle.Information, "Cannot Delete All Columns") Else - Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & Environment.NewLine & "Continue?", MessageBoxButtons.YesNo, "Delete Cells") + Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & + Environment.NewLine & "Continue?", + MessageBoxButtons.YesNo, "Delete Cells") If deleteCell = DialogResult.Yes Then StartWait() GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) From c2bbbd58d991e5035e95e6a705724f96cd974892 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 15 Feb 2022 12:54:00 +0300 Subject: [PATCH 27/68] Added rcorpora and mlbench packages for data sets --- instat/static/InstatObject/R/install_packages.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/static/InstatObject/R/install_packages.R b/instat/static/InstatObject/R/install_packages.R index 30435fd43e9..b8e6f9f38e1 100644 --- a/instat/static/InstatObject/R/install_packages.R +++ b/instat/static/InstatObject/R/install_packages.R @@ -114,6 +114,8 @@ pkgs <- "tidytext", "janitor", "ggwordcloud", + "rcorpora", + "mlbench", # For producing periodic and natural splines in Climatic > Compare > Seasonal Plot "splines2", # For fast creation of dummy (binary) variables from categories variables in Prepare > Column:Factor > Dummy Variables From 543ad3118566549b8e9f7c0b165c705fe7deaaa8 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Tue, 15 Feb 2022 05:14:13 -0800 Subject: [PATCH 28/68] additional changes --- instat/ucrDataView.vb | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index e024fe3d88e..7bb4b26adfc 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -845,26 +845,13 @@ Public Class ucrDataView End Sub Private Sub DeleteCell_Click() - If GetSelectedRows.Count = GetCurrentDataFrameFocus()?.iTotalRowCount Then - MsgBox("Cannot delete all visible Rows." & - Environment.NewLine & - "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", - MsgBoxStyle.Information, "Cannot Delete All Rows") - Else - If GetSelectedColumns.Count = GetCurrentDataFrameFocus()?.iTotalColumnCount Then - MsgBox("Cannot delete all visible columns." & Environment.NewLine & - "Use Prepare > Data Object > Delete Data Frame if you wish to delete the data.", - MsgBoxStyle.Information, "Cannot Delete All Columns") - Else - Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & - Environment.NewLine & "Continue?", - MessageBoxButtons.YesNo, "Delete Cells") - If deleteCell = DialogResult.Yes Then - StartWait() - GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) - EndWait() - End If - End If + Dim deleteCell = MsgBox("This will replace the selected cells with missing values (NA)." & + Environment.NewLine & "Continue?", + MessageBoxButtons.YesNo, "Delete Cells") + If deleteCell = DialogResult.Yes Then + StartWait() + GetCurrentDataFrameFocus().clsPrepareFunctions.DeleteCells(GetSelectedRows(), GetSelectedColumnIndexes()) + EndWait() End If End Sub From 002872ae6eb07cc0258bd414c20932c02b7c6d9e Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Tue, 15 Feb 2022 17:14:36 +0300 Subject: [PATCH 29/68] Added arim.sim function to random samples --- instat/dlgRandomSample.designer.vb | 51 +++++++++++++++++++++++++++--- instat/dlgRandomSample.vb | 44 ++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 8 deletions(-) diff --git a/instat/dlgRandomSample.designer.vb b/instat/dlgRandomSample.designer.vb index 47c04c79fd2..e10a3c6a092 100644 --- a/instat/dlgRandomSample.designer.vb +++ b/instat/dlgRandomSample.designer.vb @@ -19,7 +19,7 @@ Partial Class dlgRandomSample Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -36,12 +36,15 @@ Partial Class dlgRandomSample 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Me.lblSampleSize = New System.Windows.Forms.Label() Me.lblNumberofSamples = New System.Windows.Forms.Label() Me.ttRngKind = New System.Windows.Forms.ToolTip(Me.components) + Me.lblAutoregressive = New System.Windows.Forms.Label() + Me.ucrNudAr = New instat.ucrNud() + Me.ucrChkArima = New instat.ucrCheck() Me.ucrInputRngKind = New instat.ucrInputComboBox() Me.ucrChkRngKind = New instat.ucrCheck() Me.ucrSaveRandomSample = New instat.ucrSave() @@ -74,6 +77,38 @@ Partial Class dlgRandomSample Me.lblNumberofSamples.Tag = "Number_of_Samples:" Me.lblNumberofSamples.Text = "Number of Samples:" ' + 'lblAutoregressive + ' + Me.lblAutoregressive.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblAutoregressive.Location = New System.Drawing.Point(23, 207) + Me.lblAutoregressive.Name = "lblAutoregressive" + Me.lblAutoregressive.Size = New System.Drawing.Size(118, 13) + Me.lblAutoregressive.TabIndex = 14 + Me.lblAutoregressive.Tag = "Number_of_Samples:" + Me.lblAutoregressive.Text = "Autoregressive:" + ' + 'ucrNudAr + ' + Me.ucrNudAr.AutoSize = True + Me.ucrNudAr.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudAr.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudAr.Location = New System.Drawing.Point(151, 203) + Me.ucrNudAr.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudAr.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudAr.Name = "ucrNudAr" + Me.ucrNudAr.Size = New System.Drawing.Size(50, 20) + Me.ucrNudAr.TabIndex = 15 + Me.ucrNudAr.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkArima + ' + Me.ucrChkArima.AutoSize = True + Me.ucrChkArima.Checked = False + Me.ucrChkArima.Location = New System.Drawing.Point(25, 180) + Me.ucrChkArima.Name = "ucrChkArima" + Me.ucrChkArima.Size = New System.Drawing.Size(118, 23) + Me.ucrChkArima.TabIndex = 13 + ' 'ucrInputRngKind ' Me.ucrInputRngKind.AddQuotesIfUnrecognised = True @@ -97,7 +132,7 @@ Partial Class dlgRandomSample 'ucrSaveRandomSample ' Me.ucrSaveRandomSample.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveRandomSample.Location = New System.Drawing.Point(10, 219) + Me.ucrSaveRandomSample.Location = New System.Drawing.Point(10, 232) Me.ucrSaveRandomSample.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveRandomSample.Name = "ucrSaveRandomSample" Me.ucrSaveRandomSample.Size = New System.Drawing.Size(365, 22) @@ -170,7 +205,7 @@ Partial Class dlgRandomSample ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 248) + Me.ucrBase.Location = New System.Drawing.Point(10, 262) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(405, 52) Me.ucrBase.TabIndex = 9 @@ -179,7 +214,10 @@ Partial Class dlgRandomSample ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.ClientSize = New System.Drawing.Size(479, 300) + Me.ClientSize = New System.Drawing.Size(479, 336) + Me.Controls.Add(Me.ucrNudAr) + Me.Controls.Add(Me.lblAutoregressive) + Me.Controls.Add(Me.ucrChkArima) Me.Controls.Add(Me.ucrInputRngKind) Me.Controls.Add(Me.ucrChkRngKind) Me.Controls.Add(Me.ucrSaveRandomSample) @@ -216,4 +254,7 @@ Partial Class dlgRandomSample Friend WithEvents ttRngKind As ToolTip Friend WithEvents ucrChkRngKind As ucrCheck Friend WithEvents ucrInputRngKind As ucrInputComboBox + Friend WithEvents ucrChkArima As ucrCheck + Friend WithEvents lblAutoregressive As Label + Friend WithEvents ucrNudAr As ucrNud End Class diff --git a/instat/dlgRandomSample.vb b/instat/dlgRandomSample.vb index b35d577d709..766d9188cfd 100644 --- a/instat/dlgRandomSample.vb +++ b/instat/dlgRandomSample.vb @@ -22,6 +22,9 @@ Public Class dlgRandomSample Private clsDistributionFunction As New RFunction Private clsSetSeed As New RFunction Private clsRNGKindFunction As New RFunction + Private clsArimaSimFunction As New RFunction + Private clsListFunction As New RFunction + Private clsDummyFunction As New RFunction Private bReset As Boolean = True Private Sub dlgRandomSample_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -77,6 +80,18 @@ Public Class dlgRandomSample ttRngKind.SetToolTip(ucrChkRngKind.chkCheck, "Chooses a different Random Number Generator. Can usually be ignored.") + ucrChkArima.SetText("Arima") + ucrChkArima.SetParameter(New RParameter("check")) + ucrChkArima.SetValuesCheckedAndUnchecked(True, False) + ucrChkArima.AddToLinkedControls(ucrNudAr, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrNudAr.SetParameter(New RParameter("ar", 1)) + ucrNudAr.SetMinMax(0.5, Integer.MaxValue) + ucrNudAr.Increment = 0.1 + ucrNudAr.DecimalPlaces = 1 + + ucrNudAr.SetLinkedDisplayControl(lblAutoregressive) + ucrSaveRandomSample.SetSaveTypeAsColumn() ucrSaveRandomSample.SetDataFrameSelector(ucrSelectorRandomSamples) ucrSaveRandomSample.SetIsComboBox() @@ -87,6 +102,10 @@ Public Class dlgRandomSample clsMultipleSamplesFunction = New RFunction clsDistributionFunction = New RFunction clsRNGKindFunction = New RFunction + clsArimaSimFunction = New RFunction + clsListFunction = New RFunction + clsDummyFunction = New RFunction + ucrBase.clsRsyntax.ClearCodes() ucrSelectorRandomSamples.Reset() ucrSaveRandomSample.Reset() @@ -100,11 +119,18 @@ Public Class dlgRandomSample ucrDistWithParameters.SetParameters() clsMultipleSamplesFunction.SetRCommand("replicate") - clsMultipleSamplesFunction.AddParameter("n", 1) + clsMultipleSamplesFunction.AddParameter("n", 1, iPosition:=0) clsDistributionFunction = ucrDistWithParameters.clsCurrRFunction - clsMultipleSamplesFunction.AddParameter("expr", clsRFunctionParameter:=clsDistributionFunction) + clsMultipleSamplesFunction.AddParameter("expr", clsRFunctionParameter:=clsDistributionFunction, iPosition:=1) + + clsArimaSimFunction.SetRCommand("arima.sim") + clsArimaSimFunction.AddParameter("model", clsRFunctionParameter:=clsListFunction, iPosition:=0) + clsArimaSimFunction.AddParameter("n", ucrSelectorRandomSamples.iDataFrameLength) + + clsListFunction.SetRCommand("list") + clsListFunction.AddParameter("ar", "0.5", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsMultipleSamplesFunction) ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrSaveRandomSample.GetText, strTempDataframe:=ucrSelectorRandomSamples.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveRandomSample.GetText, bAssignToIsPrefix:=True) @@ -118,6 +144,8 @@ Public Class dlgRandomSample ucrSaveRandomSample.SetRCode(clsMultipleSamplesFunction, bReset) ucrNudNumberOfSamples.SetRCode(clsMultipleSamplesFunction, bReset) ucrInputRngKind.SetRCode(clsRNGKindFunction, bReset) + ucrChkArima.SetRCode(clsDummyFunction, bReset) + ucrNudAr.SetRCode(clsListFunction, bReset) ucrChkRngKind.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub @@ -173,7 +201,9 @@ Public Class dlgRandomSample SetNewColumName() End Sub - Private Sub ucrSaveRandomSample_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveRandomSample.ControlContentsChanged, ucrSelectorRandomSamples.ControlContentsChanged, ucrChkSetSeed.ControlContentsChanged, ucrNudSeed.ControlContentsChanged, ucrSampleSize.ControlContentsChanged, ucrInputRngKind.ControlContentsChanged, ucrChkRngKind.ControlContentsChanged + Private Sub ucrSaveRandomSample_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveRandomSample.ControlContentsChanged, ucrSelectorRandomSamples.ControlContentsChanged, + ucrChkSetSeed.ControlContentsChanged, ucrNudSeed.ControlContentsChanged, ucrSampleSize.ControlContentsChanged, ucrInputRngKind.ControlContentsChanged, + ucrChkRngKind.ControlContentsChanged, ucrChkArima.ControlContentsChanged, ucrNudAr.ControlContentsChanged TestOKEnabled() End Sub @@ -200,4 +230,12 @@ Public Class dlgRandomSample ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsRNGKindFunction) End If End Sub + + Private Sub ucrChkArima_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkArima.ControlValueChanged + If ucrChkArima.Checked Then + clsMultipleSamplesFunction.AddParameter("x", clsRFunctionParameter:=clsArimaSimFunction, bIncludeArgumentName:=False, iPosition:=3) + Else + clsMultipleSamplesFunction.RemoveParameterByName("x") + End If + End Sub End Class \ No newline at end of file From 95c95841ac2d3cfca56f5c910933e913155123c1 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 15 Feb 2022 19:56:22 +0300 Subject: [PATCH 30/68] Added comments describing each of the two new packages. --- instat/static/InstatObject/R/install_packages.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/static/InstatObject/R/install_packages.R b/instat/static/InstatObject/R/install_packages.R index b8e6f9f38e1..5818d9896c3 100644 --- a/instat/static/InstatObject/R/install_packages.R +++ b/instat/static/InstatObject/R/install_packages.R @@ -114,7 +114,9 @@ pkgs <- "tidytext", "janitor", "ggwordcloud", + # Has many useful datasets, described in the R-Instat help.They include prime numbers, Fibonacci numbers, names of dinosaurs, and the chemical elements. "rcorpora", + # Includes a set of interesting data sets, designed particularly for machine learning. "mlbench", # For producing periodic and natural splines in Climatic > Compare > Seasonal Plot "splines2", From 33cbda955ee78f56fae7fcc23c34a20e3e042980 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 15 Feb 2022 19:56:58 +0300 Subject: [PATCH 31/68] copy paste menu items --- instat/frmMain.Designer.vb | 26 +++++++++++++------------- instat/frmMain.vb | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 823cf675f30..36128a7ced1 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -2891,7 +2891,7 @@ Partial Class frmMain Me.mnuEditFind.Enabled = False Me.mnuEditFind.Name = "mnuEditFind" Me.mnuEditFind.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.F), System.Windows.Forms.Keys) - Me.mnuEditFind.Size = New System.Drawing.Size(207, 22) + Me.mnuEditFind.Size = New System.Drawing.Size(244, 22) Me.mnuEditFind.Tag = "Find" Me.mnuEditFind.Text = "Find" ' @@ -2899,14 +2899,14 @@ Partial Class frmMain ' Me.mnuEditFindNext.Enabled = False Me.mnuEditFindNext.Name = "mnuEditFindNext" - Me.mnuEditFindNext.Size = New System.Drawing.Size(207, 22) + Me.mnuEditFindNext.Size = New System.Drawing.Size(244, 22) Me.mnuEditFindNext.Text = "Find Next" ' 'mnuEditReplace ' Me.mnuEditReplace.Enabled = False Me.mnuEditReplace.Name = "mnuEditReplace" - Me.mnuEditReplace.Size = New System.Drawing.Size(207, 22) + Me.mnuEditReplace.Size = New System.Drawing.Size(244, 22) Me.mnuEditReplace.Tag = "Replace" Me.mnuEditReplace.Text = "Replace" ' @@ -2915,7 +2915,7 @@ Partial Class frmMain Me.mnuEditCut.Enabled = False Me.mnuEditCut.Name = "mnuEditCut" Me.mnuEditCut.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.X), System.Windows.Forms.Keys) - Me.mnuEditCut.Size = New System.Drawing.Size(207, 22) + Me.mnuEditCut.Size = New System.Drawing.Size(244, 22) Me.mnuEditCut.Tag = "Cut" Me.mnuEditCut.Text = "Cut" ' @@ -2923,7 +2923,7 @@ Partial Class frmMain ' Me.mnuEditCopy.Name = "mnuEditCopy" Me.mnuEditCopy.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys) - Me.mnuEditCopy.Size = New System.Drawing.Size(207, 22) + Me.mnuEditCopy.Size = New System.Drawing.Size(244, 22) Me.mnuEditCopy.Tag = "Copy" Me.mnuEditCopy.Text = "Copy" ' @@ -2932,7 +2932,7 @@ Partial Class frmMain Me.mnuEditCopySpecial.Name = "mnuEditCopySpecial" Me.mnuEditCopySpecial.ShortcutKeys = CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _ Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys) - Me.mnuEditCopySpecial.Size = New System.Drawing.Size(207, 22) + Me.mnuEditCopySpecial.Size = New System.Drawing.Size(244, 22) Me.mnuEditCopySpecial.Tag = "Copy_Special" Me.mnuEditCopySpecial.Text = "Copy Special" ' @@ -2940,7 +2940,7 @@ Partial Class frmMain ' Me.mnuEditPaste.Name = "mnuEditPaste" Me.mnuEditPaste.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.V), System.Windows.Forms.Keys) - Me.mnuEditPaste.Size = New System.Drawing.Size(207, 22) + Me.mnuEditPaste.Size = New System.Drawing.Size(244, 22) Me.mnuEditPaste.Tag = "Paste" Me.mnuEditPaste.Text = "Paste" ' @@ -2949,14 +2949,14 @@ Partial Class frmMain Me.mnuPasteSpecial.Name = "mnuPasteSpecial" Me.mnuPasteSpecial.ShortcutKeys = CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _ Or System.Windows.Forms.Keys.V), System.Windows.Forms.Keys) - Me.mnuPasteSpecial.Size = New System.Drawing.Size(207, 22) + Me.mnuPasteSpecial.Size = New System.Drawing.Size(244, 22) Me.mnuPasteSpecial.Tag = "Paste" - Me.mnuPasteSpecial.Text = "Paste Special" + Me.mnuPasteSpecial.Text = "Paste New Columns" ' 'mnuEditPasteNewDataFrame ' Me.mnuEditPasteNewDataFrame.Name = "mnuEditPasteNewDataFrame" - Me.mnuEditPasteNewDataFrame.Size = New System.Drawing.Size(207, 22) + Me.mnuEditPasteNewDataFrame.Size = New System.Drawing.Size(244, 22) Me.mnuEditPasteNewDataFrame.Tag = "Paste" Me.mnuEditPasteNewDataFrame.Text = "Paste New Data Frame" ' @@ -2964,19 +2964,19 @@ Partial Class frmMain ' Me.mnuEditSelectAll.Name = "mnuEditSelectAll" Me.mnuEditSelectAll.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.A), System.Windows.Forms.Keys) - Me.mnuEditSelectAll.Size = New System.Drawing.Size(207, 22) + Me.mnuEditSelectAll.Size = New System.Drawing.Size(244, 22) Me.mnuEditSelectAll.Tag = "Select_All" Me.mnuEditSelectAll.Text = "Select All " ' 'ToolStripSeparator71 ' Me.ToolStripSeparator71.Name = "ToolStripSeparator71" - Me.ToolStripSeparator71.Size = New System.Drawing.Size(204, 6) + Me.ToolStripSeparator71.Size = New System.Drawing.Size(241, 6) ' 'mnuEditScript ' Me.mnuEditScript.Name = "mnuEditScript" - Me.mnuEditScript.Size = New System.Drawing.Size(207, 22) + Me.mnuEditScript.Size = New System.Drawing.Size(244, 22) Me.mnuEditScript.Text = "Script" ' 'stsStrip diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 3e099b26ff8..40826f9a8c2 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2389,7 +2389,7 @@ Public Class frmMain End Sub Private Sub mnuPasteSpecial_Click(sender As Object, e As EventArgs) Handles mnuPasteSpecial.Click, mnuSubTbPasteSpecial.Click - dlgPasteSpecial.ShowDialog() + dlgPasteNewColumns.ShowDialog() End Sub Private Sub mnuDescribeTwoVariablesPivotTable_Click(sender As Object, e As EventArgs) Handles mnuDescribeTwoVariablesPivotTable.Click From bc331e208fa2516004d2915b09f846bbd265baea Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 15 Feb 2022 21:49:12 +0300 Subject: [PATCH 32/68] Bug fix - Variable label --- instat/dlgSelectColumns.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgSelectColumns.vb b/instat/dlgSelectColumns.vb index 4505169ab65..d44c4894eb7 100644 --- a/instat/dlgSelectColumns.vb +++ b/instat/dlgSelectColumns.vb @@ -209,7 +209,7 @@ Public Class dlgSelectColumns clsParametersList.AddParameter("fn", "is.character", iPosition:=0) ElseIf strValue = "Logical" Then clsParametersList.AddParameter("fn", "is.logical", iPosition:=0) - ElseIf strValue = "Labelled" Then + ElseIf strValue = "Variable label" Then clsParametersList.AddParameter("fn", "is.containlabel", iPosition:=0) ElseIf strValue = "Empty columns" Then clsParametersList.AddParameter("fn", "is.emptyvariable", iPosition:=0) From 96f1ef82d9741ddda0183478c85c46e21acda830 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Wed, 16 Feb 2022 16:31:13 +0300 Subject: [PATCH 33/68] Changes --- instat/dlgRandomSample.designer.vb | 41 ------------------- instat/dlgRandomSample.vb | 37 +---------------- instat/ucrDistributions.vb | 2 +- ...ucrDistributionsWithParameters.Designer.vb | 3 ++ instat/ucrDistributionsWithParameters.resx | 3 ++ instat/ucrDistributionsWithParameters.vb | 30 +++++++------- 6 files changed, 24 insertions(+), 92 deletions(-) diff --git a/instat/dlgRandomSample.designer.vb b/instat/dlgRandomSample.designer.vb index e10a3c6a092..3aef9ee539c 100644 --- a/instat/dlgRandomSample.designer.vb +++ b/instat/dlgRandomSample.designer.vb @@ -42,9 +42,6 @@ Partial Class dlgRandomSample Me.lblSampleSize = New System.Windows.Forms.Label() Me.lblNumberofSamples = New System.Windows.Forms.Label() Me.ttRngKind = New System.Windows.Forms.ToolTip(Me.components) - Me.lblAutoregressive = New System.Windows.Forms.Label() - Me.ucrNudAr = New instat.ucrNud() - Me.ucrChkArima = New instat.ucrCheck() Me.ucrInputRngKind = New instat.ucrInputComboBox() Me.ucrChkRngKind = New instat.ucrCheck() Me.ucrSaveRandomSample = New instat.ucrSave() @@ -77,38 +74,6 @@ Partial Class dlgRandomSample Me.lblNumberofSamples.Tag = "Number_of_Samples:" Me.lblNumberofSamples.Text = "Number of Samples:" ' - 'lblAutoregressive - ' - Me.lblAutoregressive.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblAutoregressive.Location = New System.Drawing.Point(23, 207) - Me.lblAutoregressive.Name = "lblAutoregressive" - Me.lblAutoregressive.Size = New System.Drawing.Size(118, 13) - Me.lblAutoregressive.TabIndex = 14 - Me.lblAutoregressive.Tag = "Number_of_Samples:" - Me.lblAutoregressive.Text = "Autoregressive:" - ' - 'ucrNudAr - ' - Me.ucrNudAr.AutoSize = True - Me.ucrNudAr.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudAr.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudAr.Location = New System.Drawing.Point(151, 203) - Me.ucrNudAr.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudAr.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudAr.Name = "ucrNudAr" - Me.ucrNudAr.Size = New System.Drawing.Size(50, 20) - Me.ucrNudAr.TabIndex = 15 - Me.ucrNudAr.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkArima - ' - Me.ucrChkArima.AutoSize = True - Me.ucrChkArima.Checked = False - Me.ucrChkArima.Location = New System.Drawing.Point(25, 180) - Me.ucrChkArima.Name = "ucrChkArima" - Me.ucrChkArima.Size = New System.Drawing.Size(118, 23) - Me.ucrChkArima.TabIndex = 13 - ' 'ucrInputRngKind ' Me.ucrInputRngKind.AddQuotesIfUnrecognised = True @@ -215,9 +180,6 @@ Partial Class dlgRandomSample Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.ClientSize = New System.Drawing.Size(479, 336) - Me.Controls.Add(Me.ucrNudAr) - Me.Controls.Add(Me.lblAutoregressive) - Me.Controls.Add(Me.ucrChkArima) Me.Controls.Add(Me.ucrInputRngKind) Me.Controls.Add(Me.ucrChkRngKind) Me.Controls.Add(Me.ucrSaveRandomSample) @@ -254,7 +216,4 @@ Partial Class dlgRandomSample Friend WithEvents ttRngKind As ToolTip Friend WithEvents ucrChkRngKind As ucrCheck Friend WithEvents ucrInputRngKind As ucrInputComboBox - Friend WithEvents ucrChkArima As ucrCheck - Friend WithEvents lblAutoregressive As Label - Friend WithEvents ucrNudAr As ucrNud End Class diff --git a/instat/dlgRandomSample.vb b/instat/dlgRandomSample.vb index 766d9188cfd..bd9515c9759 100644 --- a/instat/dlgRandomSample.vb +++ b/instat/dlgRandomSample.vb @@ -22,9 +22,6 @@ Public Class dlgRandomSample Private clsDistributionFunction As New RFunction Private clsSetSeed As New RFunction Private clsRNGKindFunction As New RFunction - Private clsArimaSimFunction As New RFunction - Private clsListFunction As New RFunction - Private clsDummyFunction As New RFunction Private bReset As Boolean = True Private Sub dlgRandomSample_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -80,18 +77,6 @@ Public Class dlgRandomSample ttRngKind.SetToolTip(ucrChkRngKind.chkCheck, "Chooses a different Random Number Generator. Can usually be ignored.") - ucrChkArima.SetText("Arima") - ucrChkArima.SetParameter(New RParameter("check")) - ucrChkArima.SetValuesCheckedAndUnchecked(True, False) - ucrChkArima.AddToLinkedControls(ucrNudAr, {True}, bNewLinkedHideIfParameterMissing:=True) - - ucrNudAr.SetParameter(New RParameter("ar", 1)) - ucrNudAr.SetMinMax(0.5, Integer.MaxValue) - ucrNudAr.Increment = 0.1 - ucrNudAr.DecimalPlaces = 1 - - ucrNudAr.SetLinkedDisplayControl(lblAutoregressive) - ucrSaveRandomSample.SetSaveTypeAsColumn() ucrSaveRandomSample.SetDataFrameSelector(ucrSelectorRandomSamples) ucrSaveRandomSample.SetIsComboBox() @@ -102,9 +87,6 @@ Public Class dlgRandomSample clsMultipleSamplesFunction = New RFunction clsDistributionFunction = New RFunction clsRNGKindFunction = New RFunction - clsArimaSimFunction = New RFunction - clsListFunction = New RFunction - clsDummyFunction = New RFunction ucrBase.clsRsyntax.ClearCodes() ucrSelectorRandomSamples.Reset() @@ -125,13 +107,6 @@ Public Class dlgRandomSample clsMultipleSamplesFunction.AddParameter("expr", clsRFunctionParameter:=clsDistributionFunction, iPosition:=1) - clsArimaSimFunction.SetRCommand("arima.sim") - clsArimaSimFunction.AddParameter("model", clsRFunctionParameter:=clsListFunction, iPosition:=0) - clsArimaSimFunction.AddParameter("n", ucrSelectorRandomSamples.iDataFrameLength) - - clsListFunction.SetRCommand("list") - clsListFunction.AddParameter("ar", "0.5", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsMultipleSamplesFunction) ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrSaveRandomSample.GetText, strTempDataframe:=ucrSelectorRandomSamples.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveRandomSample.GetText, bAssignToIsPrefix:=True) SetDataFrameAndDistributionParameters() @@ -144,8 +119,6 @@ Public Class dlgRandomSample ucrSaveRandomSample.SetRCode(clsMultipleSamplesFunction, bReset) ucrNudNumberOfSamples.SetRCode(clsMultipleSamplesFunction, bReset) ucrInputRngKind.SetRCode(clsRNGKindFunction, bReset) - ucrChkArima.SetRCode(clsDummyFunction, bReset) - ucrNudAr.SetRCode(clsListFunction, bReset) ucrChkRngKind.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub @@ -203,7 +176,7 @@ Public Class dlgRandomSample Private Sub ucrSaveRandomSample_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveRandomSample.ControlContentsChanged, ucrSelectorRandomSamples.ControlContentsChanged, ucrChkSetSeed.ControlContentsChanged, ucrNudSeed.ControlContentsChanged, ucrSampleSize.ControlContentsChanged, ucrInputRngKind.ControlContentsChanged, - ucrChkRngKind.ControlContentsChanged, ucrChkArima.ControlContentsChanged, ucrNudAr.ControlContentsChanged + ucrChkRngKind.ControlContentsChanged TestOKEnabled() End Sub @@ -230,12 +203,4 @@ Public Class dlgRandomSample ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsRNGKindFunction) End If End Sub - - Private Sub ucrChkArima_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkArima.ControlValueChanged - If ucrChkArima.Checked Then - clsMultipleSamplesFunction.AddParameter("x", clsRFunctionParameter:=clsArimaSimFunction, bIncludeArgumentName:=False, iPosition:=3) - Else - clsMultipleSamplesFunction.RemoveParameterByName("x") - End If - End Sub End Class \ No newline at end of file diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb index a4ebde13046..0d42f28fe19 100644 --- a/instat/ucrDistributions.vb +++ b/instat/ucrDistributions.vb @@ -446,7 +446,7 @@ Public Class ucrDistributions clsEmpiricalDist.strRFunctionName = "rempiricalD" clsEmpiricalDist.SetPackageName("mc2d") clsEmpiricalDist.AddParameter("values", "Values", "1:5") - clsEmpiricalDist.AddParameter("prob", "Probability", "c(10, 10, 10, 0, 10)") + clsEmpiricalDist.AddParameter("prob", "Probability", "10, 10, 10, 0, 10") lstAllDistributions.Add(clsEmpiricalDist) 'Triangular distribution diff --git a/instat/ucrDistributionsWithParameters.Designer.vb b/instat/ucrDistributionsWithParameters.Designer.vb index 06d8974f943..111d87234ca 100644 --- a/instat/ucrDistributionsWithParameters.Designer.vb +++ b/instat/ucrDistributionsWithParameters.Designer.vb @@ -38,6 +38,7 @@ Partial Class ucrDistributionsWithParameters 'Do not modify it using the code editor. _ Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Me.lblDistributionParameters = New System.Windows.Forms.Label() Me.lblParameter1 = New System.Windows.Forms.Label() Me.lblParameter2 = New System.Windows.Forms.Label() @@ -47,6 +48,7 @@ Partial Class ucrDistributionsWithParameters Me.ucrInputParameter2 = New instat.ucrInputTextBox() Me.ucrInputParameter3 = New instat.ucrInputTextBox() Me.ucrInputParameter4 = New instat.ucrInputTextBox() + Me.ttEmpirical = New System.Windows.Forms.ToolTip(Me.components) Me.SuspendLayout() ' 'lblDistributionParameters @@ -173,4 +175,5 @@ Partial Class ucrDistributionsWithParameters Friend WithEvents ucrInputParameter2 As ucrInputTextBox Friend WithEvents ucrInputParameter3 As ucrInputTextBox Friend WithEvents ucrInputParameter4 As ucrInputTextBox + Friend WithEvents ttEmpirical As ToolTip End Class diff --git a/instat/ucrDistributionsWithParameters.resx b/instat/ucrDistributionsWithParameters.resx index 29dcb1b3a35..5d8d07c2185 100644 --- a/instat/ucrDistributionsWithParameters.resx +++ b/instat/ucrDistributionsWithParameters.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/instat/ucrDistributionsWithParameters.vb b/instat/ucrDistributionsWithParameters.vb index 2b6284c1602..bc25762fb29 100644 --- a/instat/ucrDistributionsWithParameters.vb +++ b/instat/ucrDistributionsWithParameters.vb @@ -74,9 +74,13 @@ Public Class ucrDistributionsWithParameters For i = 0 To clsCurrDistribution.clsParameters.Count - 1 lstParameterLabels(i).Text = GetTranslation(clsCurrDistribution.clsParameters(i).strNameTag) lstCurrArguments.Add(clsCurrDistribution.clsParameters(i).strArgumentName) - If clsCurrDistribution.clsParameters(i).bHasDefault Then + If clsCurrDistribution.clsParameters(i).bHasDefault Then lstParameterInputTextBoxes(i).SetName(clsCurrDistribution.clsParameters(i).strDefaultValue) - AddParameter(clsCurrDistribution.clsParameters(i).strArgumentName, clsCurrDistribution.clsParameters(i).strDefaultValue) + If clsCurrDistribution.strNameTag = "Discrete_Empirical" Then + AddParameter(clsCurrDistribution.clsParameters(i).strArgumentName, "c(" & clsCurrDistribution.clsParameters(i).strDefaultValue & ")") + Else + AddParameter(clsCurrDistribution.clsParameters(i).strArgumentName, clsCurrDistribution.clsParameters(i).strDefaultValue) + End If Else lstParameterInputTextBoxes(i).Reset() End If @@ -110,21 +114,19 @@ Public Class ucrDistributionsWithParameters OnControlValueChanged() End Sub - Private Sub ucrInputParameter2_ControlValueChanged() Handles ucrInputParameter2.ControlValueChanged + Private Sub ucrInputParameter2_ContentsChanged() Handles ucrInputParameter2.ContentsChanged If lstCurrArguments IsNot Nothing AndAlso lstCurrArguments.Count > 1 Then - AddParameter(lstCurrArguments(1), ucrInputParameter2.GetText) + If clsCurrDistribution.strNameTag = "Discrete_Empirical" Then + ttEmpirical.SetToolTip(ucrInputParameter2.txtInput, "Input relative values separated by commas, For example 3,2,1.") + AddParameter(lstCurrArguments(1), "c(" & ucrInputParameter2.GetText & ")") + ucrInputParameter1.SetName("1:" & ucrInputParameter2.GetText.Split(",").Length) + ucrInputParameter1.IsReadOnly = True + Else + AddParameter(lstCurrArguments(1), ucrInputParameter2.GetText) + ucrInputParameter1.IsReadOnly = False + End If CheckParametersFilled() End If - OnControlValueChanged() - End Sub - - Private Sub ucrInputParameter2_ContentsChanged() Handles ucrInputParameter2.ContentsChanged - If clsCurrDistribution.strNameTag = "Discrete_Empirical" Then - ucrInputParameter1.SetName("1:" & ucrInputParameter2.GetText.Split(",").Length) - ucrInputParameter1.IsReadOnly = True - Else - ucrInputParameter1.IsReadOnly = False - End If OnControlContentsChanged() End Sub From e036e5c83c1a80395f1e2a789ac57853107b0fa1 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Thu, 17 Feb 2022 11:30:50 +0300 Subject: [PATCH 34/68] Adding Logical button in the Numeric panel --- instat/dlgTransform.Designer.vb | 99 +++++++++++++++++++++++---------- instat/dlgTransform.vb | 9 +++ 2 files changed, 80 insertions(+), 28 deletions(-) diff --git a/instat/dlgTransform.Designer.vb b/instat/dlgTransform.Designer.vb index cea3fd272f8..0bac78d50a6 100644 --- a/instat/dlgTransform.Designer.vb +++ b/instat/dlgTransform.Designer.vb @@ -70,7 +70,6 @@ Partial Class dlgTransform Me.lblDiffLag = New System.Windows.Forms.Label() Me.lblDigits = New System.Windows.Forms.Label() Me.lblLagLeadPosition = New System.Windows.Forms.Label() - Me.ucrPnlNumericOptions = New instat.UcrPanel() Me.grpNonNegative = New System.Windows.Forms.GroupBox() Me.ucrInputPower = New instat.ucrInputComboBox() Me.rdoPower = New System.Windows.Forms.RadioButton() @@ -105,6 +104,10 @@ Partial Class dlgTransform Me.ucrSelectorForRank = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrChkMissingLast = New instat.ucrCheck() Me.ucrChkDecreasing = New instat.ucrCheck() + Me.ucrPnlNumericOptions = New instat.UcrPanel() + Me.rdoLogical = New System.Windows.Forms.RadioButton() + Me.ucrInputLogicOperations = New instat.ucrInputComboBox() + Me.ucrInputLogicalValues = New instat.ucrInputTextBox() Me.grpTies.SuspendLayout() Me.grpMissingValues.SuspendLayout() Me.grpNumericOptions.SuspendLayout() @@ -273,7 +276,7 @@ Partial Class dlgTransform ' Me.rdoRoundOf.AutoSize = True Me.rdoRoundOf.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoRoundOf.Location = New System.Drawing.Point(11, 19) + Me.rdoRoundOf.Location = New System.Drawing.Point(11, 18) Me.rdoRoundOf.Name = "rdoRoundOf" Me.rdoRoundOf.Size = New System.Drawing.Size(57, 17) Me.rdoRoundOf.TabIndex = 14 @@ -285,7 +288,7 @@ Partial Class dlgTransform ' Me.rdoSignificantDigits.AutoSize = True Me.rdoSignificantDigits.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSignificantDigits.Location = New System.Drawing.Point(11, 47) + Me.rdoSignificantDigits.Location = New System.Drawing.Point(11, 44) Me.rdoSignificantDigits.Name = "rdoSignificantDigits" Me.rdoSignificantDigits.Size = New System.Drawing.Size(68, 17) Me.rdoSignificantDigits.TabIndex = 15 @@ -297,7 +300,7 @@ Partial Class dlgTransform ' Me.rdoStandardize.AutoSize = True Me.rdoStandardize.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoStandardize.Location = New System.Drawing.Point(11, 75) + Me.rdoStandardize.Location = New System.Drawing.Point(11, 70) Me.rdoStandardize.Name = "rdoStandardize" Me.rdoStandardize.Size = New System.Drawing.Size(81, 17) Me.rdoStandardize.TabIndex = 17 @@ -309,7 +312,7 @@ Partial Class dlgTransform ' Me.rdoDifference.AutoSize = True Me.rdoDifference.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoDifference.Location = New System.Drawing.Point(11, 159) + Me.rdoDifference.Location = New System.Drawing.Point(11, 148) Me.rdoDifference.Name = "rdoDifference" Me.rdoDifference.Size = New System.Drawing.Size(74, 17) Me.rdoDifference.TabIndex = 18 @@ -321,7 +324,7 @@ Partial Class dlgTransform ' Me.rdoLead.AutoSize = True Me.rdoLead.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoLead.Location = New System.Drawing.Point(11, 131) + Me.rdoLead.Location = New System.Drawing.Point(11, 122) Me.rdoLead.Name = "rdoLead" Me.rdoLead.Size = New System.Drawing.Size(49, 17) Me.rdoLead.TabIndex = 19 @@ -333,7 +336,7 @@ Partial Class dlgTransform ' Me.rdoLag.AutoSize = True Me.rdoLag.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoLag.Location = New System.Drawing.Point(11, 103) + Me.rdoLag.Location = New System.Drawing.Point(11, 96) Me.rdoLag.Name = "rdoLag" Me.rdoLag.Size = New System.Drawing.Size(43, 17) Me.rdoLag.TabIndex = 20 @@ -343,6 +346,9 @@ Partial Class dlgTransform ' 'grpNumericOptions ' + Me.grpNumericOptions.Controls.Add(Me.ucrInputLogicalValues) + Me.grpNumericOptions.Controls.Add(Me.ucrInputLogicOperations) + Me.grpNumericOptions.Controls.Add(Me.rdoLogical) Me.grpNumericOptions.Controls.Add(Me.ucrChkOmitNA) Me.grpNumericOptions.Controls.Add(Me.rdoDifference) Me.grpNumericOptions.Controls.Add(Me.ucrNudLagPosition) @@ -372,7 +378,7 @@ Partial Class dlgTransform ' Me.ucrChkOmitNA.AutoSize = True Me.ucrChkOmitNA.Checked = False - Me.ucrChkOmitNA.Location = New System.Drawing.Point(109, 75) + Me.ucrChkOmitNA.Location = New System.Drawing.Point(109, 70) Me.ucrChkOmitNA.Name = "ucrChkOmitNA" Me.ucrChkOmitNA.Size = New System.Drawing.Size(75, 23) Me.ucrChkOmitNA.TabIndex = 33 @@ -382,7 +388,7 @@ Partial Class dlgTransform Me.ucrNudLagPosition.AutoSize = True Me.ucrNudLagPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudLagPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLagPosition.Location = New System.Drawing.Point(138, 101) + Me.ucrNudLagPosition.Location = New System.Drawing.Point(138, 94) Me.ucrNudLagPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudLagPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudLagPosition.Name = "ucrNudLagPosition" @@ -394,7 +400,7 @@ Partial Class dlgTransform ' Me.lblLagPosition.AutoSize = True Me.lblLagPosition.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblLagPosition.Location = New System.Drawing.Point(83, 105) + Me.lblLagPosition.Location = New System.Drawing.Point(83, 98) Me.lblLagPosition.Name = "lblLagPosition" Me.lblLagPosition.Size = New System.Drawing.Size(52, 13) Me.lblLagPosition.TabIndex = 24 @@ -404,7 +410,7 @@ Partial Class dlgTransform ' Me.lblRoundofDigits.AutoSize = True Me.lblRoundofDigits.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblRoundofDigits.Location = New System.Drawing.Point(82, 21) + Me.lblRoundofDigits.Location = New System.Drawing.Point(82, 20) Me.lblRoundofDigits.Name = "lblRoundofDigits" Me.lblRoundofDigits.Size = New System.Drawing.Size(53, 13) Me.lblRoundofDigits.TabIndex = 23 @@ -415,7 +421,7 @@ Partial Class dlgTransform Me.ucrNudRoundOfDigits.AutoSize = True Me.ucrNudRoundOfDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudRoundOfDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Location = New System.Drawing.Point(138, 17) + Me.ucrNudRoundOfDigits.Location = New System.Drawing.Point(138, 16) Me.ucrNudRoundOfDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudRoundOfDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudRoundOfDigits.Name = "ucrNudRoundOfDigits" @@ -428,7 +434,7 @@ Partial Class dlgTransform Me.ucrNudDiffLag.AutoSize = True Me.ucrNudDiffLag.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDiffLag.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDiffLag.Location = New System.Drawing.Point(138, 157) + Me.ucrNudDiffLag.Location = New System.Drawing.Point(138, 146) Me.ucrNudDiffLag.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudDiffLag.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDiffLag.Name = "ucrNudDiffLag" @@ -441,7 +447,7 @@ Partial Class dlgTransform Me.ucrNudLagLeadPosition.AutoSize = True Me.ucrNudLagLeadPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudLagLeadPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Location = New System.Drawing.Point(138, 129) + Me.ucrNudLagLeadPosition.Location = New System.Drawing.Point(138, 120) Me.ucrNudLagLeadPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudLagLeadPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudLagLeadPosition.Name = "ucrNudLagLeadPosition" @@ -454,7 +460,7 @@ Partial Class dlgTransform Me.ucrNudSignifDigits.AutoSize = True Me.ucrNudSignifDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSignifDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSignifDigits.Location = New System.Drawing.Point(138, 45) + Me.ucrNudSignifDigits.Location = New System.Drawing.Point(138, 42) Me.ucrNudSignifDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSignifDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSignifDigits.Name = "ucrNudSignifDigits" @@ -466,7 +472,7 @@ Partial Class dlgTransform ' Me.lblDiffLag.AutoSize = True Me.lblDiffLag.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDiffLag.Location = New System.Drawing.Point(107, 161) + Me.lblDiffLag.Location = New System.Drawing.Point(107, 150) Me.lblDiffLag.Name = "lblDiffLag" Me.lblDiffLag.Size = New System.Drawing.Size(28, 13) Me.lblDiffLag.TabIndex = 18 @@ -476,7 +482,7 @@ Partial Class dlgTransform ' Me.lblDigits.AutoSize = True Me.lblDigits.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDigits.Location = New System.Drawing.Point(99, 48) + Me.lblDigits.Location = New System.Drawing.Point(99, 45) Me.lblDigits.Name = "lblDigits" Me.lblDigits.Size = New System.Drawing.Size(36, 13) Me.lblDigits.TabIndex = 15 @@ -486,20 +492,12 @@ Partial Class dlgTransform ' Me.lblLagLeadPosition.AutoSize = True Me.lblLagLeadPosition.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblLagLeadPosition.Location = New System.Drawing.Point(83, 133) + Me.lblLagLeadPosition.Location = New System.Drawing.Point(83, 124) Me.lblLagLeadPosition.Name = "lblLagLeadPosition" Me.lblLagLeadPosition.Size = New System.Drawing.Size(52, 13) Me.lblLagLeadPosition.TabIndex = 17 Me.lblLagLeadPosition.Text = "Positions:" ' - 'ucrPnlNumericOptions - ' - Me.ucrPnlNumericOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlNumericOptions.Location = New System.Drawing.Point(6, 19) - Me.ucrPnlNumericOptions.Name = "ucrPnlNumericOptions" - Me.ucrPnlNumericOptions.Size = New System.Drawing.Size(79, 174) - Me.ucrPnlNumericOptions.TabIndex = 0 - ' 'grpNonNegative ' Me.grpNonNegative.Controls.Add(Me.ucrInputPower) @@ -887,12 +885,55 @@ Partial Class dlgTransform Me.ucrChkDecreasing.Size = New System.Drawing.Size(100, 23) Me.ucrChkDecreasing.TabIndex = 12 ' + 'ucrPnlNumericOptions + ' + Me.ucrPnlNumericOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlNumericOptions.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlNumericOptions.Name = "ucrPnlNumericOptions" + Me.ucrPnlNumericOptions.Size = New System.Drawing.Size(79, 179) + Me.ucrPnlNumericOptions.TabIndex = 0 + ' + 'rdoLogical + ' + Me.rdoLogical.AutoSize = True + Me.rdoLogical.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoLogical.Location = New System.Drawing.Point(11, 174) + Me.rdoLogical.Name = "rdoLogical" + Me.rdoLogical.Size = New System.Drawing.Size(59, 17) + Me.rdoLogical.TabIndex = 34 + Me.rdoLogical.TabStop = True + Me.rdoLogical.Text = "Logical" + Me.rdoLogical.UseVisualStyleBackColor = True + ' + 'ucrInputLogicOperations + ' + Me.ucrInputLogicOperations.AddQuotesIfUnrecognised = True + Me.ucrInputLogicOperations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLogicOperations.GetSetSelectedIndex = -1 + Me.ucrInputLogicOperations.IsReadOnly = False + Me.ucrInputLogicOperations.Location = New System.Drawing.Point(91, 174) + Me.ucrInputLogicOperations.Name = "ucrInputLogicOperations" + Me.ucrInputLogicOperations.Size = New System.Drawing.Size(44, 21) + Me.ucrInputLogicOperations.TabIndex = 35 + ' + 'ucrInputLogicalValues + ' + Me.ucrInputLogicalValues.AddQuotesIfUnrecognised = True + Me.ucrInputLogicalValues.AutoSize = True + Me.ucrInputLogicalValues.IsMultiline = False + Me.ucrInputLogicalValues.IsReadOnly = False + Me.ucrInputLogicalValues.Location = New System.Drawing.Point(138, 174) + Me.ucrInputLogicalValues.Name = "ucrInputLogicalValues" + Me.ucrInputLogicalValues.Size = New System.Drawing.Size(51, 21) + Me.ucrInputLogicalValues.TabIndex = 36 + ' 'dlgTransform ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(440, 445) + Me.Controls.Add(Me.grpNumericOptions) Me.Controls.Add(Me.cmdUpdatePreview) Me.Controls.Add(Me.grpNonNegative) Me.Controls.Add(Me.ucrChkEditPreview) @@ -920,7 +961,6 @@ Partial Class dlgTransform Me.Controls.Add(Me.ucrSelectorForRank) Me.Controls.Add(Me.ucrChkMissingLast) Me.Controls.Add(Me.ucrChkDecreasing) - Me.Controls.Add(Me.grpNumericOptions) Me.Controls.Add(Me.grpTies) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -963,7 +1003,6 @@ Partial Class dlgTransform Friend WithEvents ucrChkDecreasing As ucrCheck Friend WithEvents rdoSignificantDigits As RadioButton Friend WithEvents rdoRoundOf As RadioButton - Friend WithEvents ucrPnlNumericOptions As UcrPanel Friend WithEvents grpNumericOptions As GroupBox Friend WithEvents rdoLead As RadioButton Friend WithEvents rdoDifference As RadioButton @@ -1007,4 +1046,8 @@ Partial Class dlgTransform Friend WithEvents ucrInputConstant As ucrInputComboBox Friend WithEvents ucrInputPower As ucrInputComboBox Friend WithEvents cmdUpdatePreview As Button + Friend WithEvents ucrInputLogicalValues As ucrInputTextBox + Friend WithEvents ucrInputLogicOperations As ucrInputComboBox + Friend WithEvents rdoLogical As RadioButton + Friend WithEvents ucrPnlNumericOptions As UcrPanel End Class diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index 3d89457ded4..23f6abed88a 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -124,6 +124,7 @@ Public Class dlgTransform ucrPnlNumericOptions.AddRadioButton(rdoLag) ucrPnlNumericOptions.AddRadioButton(rdoLead) ucrPnlNumericOptions.AddRadioButton(rdoDifference) + ucrPnlNumericOptions.AddRadioButton(rdoLogical) ucrPnlNumericOptions.AddParameterValuesCondition(rdoRoundOf, "check", "round") ucrPnlNumericOptions.AddParameterValuesCondition(rdoSignificantDigits, "check", "signif") @@ -131,6 +132,7 @@ Public Class dlgTransform ucrPnlNumericOptions.AddParameterValuesCondition(rdoLag, "check", "lag") ucrPnlNumericOptions.AddParameterValuesCondition(rdoLead, "check", "lead") ucrPnlNumericOptions.AddParameterValuesCondition(rdoDifference, "check", "diff") + 'ucrPnlNumericOptions.AddParameterValuesCondition(rdoLogical, "check", "logic") ucrPnlNonNegative.AddRadioButton(rdoSquareRoot) ucrPnlNonNegative.AddRadioButton(rdoLogToBase10) @@ -148,6 +150,7 @@ Public Class dlgTransform ucrPnlNumericOptions.AddToLinkedControls(ucrNudDiffLag, {rdoDifference}, bNewLinkedHideIfParameterMissing:=True) ucrPnlNumericOptions.AddToLinkedControls(ucrNudLagPosition, {rdoLag}, bNewLinkedHideIfParameterMissing:=True) ucrPnlNumericOptions.AddToLinkedControls(ucrChkOmitNA, {rdoStandardize}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlNumericOptions.AddToLinkedControls({ucrInputLogicalValues, ucrInputLogicOperations}, {rdoLogical}, bNewLinkedHideIfParameterMissing:=True) ucrPnlNonNegative.AddToLinkedControls(ucrInputPower, {rdoPower}, bNewLinkedHideIfParameterMissing:=True) ucrPnlTransformOptions.AddToLinkedControls(ucrPnlMissingValues, {rdoRank}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlTransformOptions.AddToLinkedControls(ucrPnlTies, {rdoRank}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -194,6 +197,12 @@ Public Class dlgTransform ucrNudLagPosition.SetParameter(New RParameter("lag", 1)) ucrNudLagPosition.SetMinMax(iNewMin:=1, iNewMax:=Integer.MaxValue) + ucrInputLogicalValues.SetParameter(New RParameter("x", 1)) + ucrInputLogicalValues.AddQuotesIfUnrecognised = False + + ucrInputLogicOperations.SetItems({"==", "<", "<=", ">", ">=", "!=", "is.na", "!is.na"}) + ucrInputLogicOperations.SetDropDownStyleAsNonEditable() + ucrInputPower.SetParameter(New RParameter("y", 1)) dctPowerValues.Add("1", "1") dctPowerValues.Add("2", "2") From 6588a94efdec3c61eb6771eca57ee033465ec654 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 17 Feb 2022 11:35:00 +0300 Subject: [PATCH 35/68] checking if selection has columns --- instat/static/InstatObject/R/data_object_R6.R | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index deb69b88f06..495db1df2e8 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -1884,6 +1884,7 @@ DataSheet$set("public", "get_current_column_selection", function() { DataSheet$set("public", "set_current_column_selection", function(name = "") { if(!name %in% names(private$column_selections)) stop(name, " not found as a column selection.") + if(length(self$get_column_selection_column_names(name))==0) stop(name, " has no columns selected.") self$current_column_selection <- private$column_selections[[name]] } ) From 492d732e13b73d982e086a290dd0249922d4513f Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 17 Feb 2022 13:03:49 +0300 Subject: [PATCH 36/68] printing error message in the output windows --- instat/dlgSelect.vb | 2 ++ instat/sdgDataOptions.vb | 2 +- instat/static/InstatObject/R/data_object_R6.R | 12 +++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/instat/dlgSelect.vb b/instat/dlgSelect.vb index 740428e07e2..77c24b2d15f 100644 --- a/instat/dlgSelect.vb +++ b/instat/dlgSelect.vb @@ -35,6 +35,8 @@ Public Class dlgSelect Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 597 + ucrBase.clsRsyntax.iCallType = 2 + ucrInputSelectPreview.txtInput.ReadOnly = True ucrReceiverSelect.SetItemType("column_selection") ucrReceiverSelect.strSelectorHeading = "Column selections" diff --git a/instat/sdgDataOptions.vb b/instat/sdgDataOptions.vb index e407efbe31b..831681b7a87 100644 --- a/instat/sdgDataOptions.vb +++ b/instat/sdgDataOptions.vb @@ -108,7 +108,7 @@ Public Class sdgDataOptions clsSetCurrentColumnSelection.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$set_current_column_selection") clsSetCurrentColumnSelection.AddParameter("data_name", Chr(34) & ucrSelectorForSelectColumns.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34)) clsSetCurrentColumnSelection.AddParameter("name", ucrReceiverSelect.GetVariableNames()) - frmMain.clsRLink.RunScript(clsSetCurrentColumnSelection.ToScript(), strComment:="Data Options subdialog: Set the current column selection") + frmMain.clsRLink.RunScript(clsSetCurrentColumnSelection.ToScript(), strComment:="Data Options subdialog: Set the current column selection", iCallType:=2) Else 'TODO: Set Local column selection End If diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 495db1df2e8..221e294dbb9 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -1883,11 +1883,13 @@ DataSheet$set("public", "get_current_column_selection", function() { ) DataSheet$set("public", "set_current_column_selection", function(name = "") { - if(!name %in% names(private$column_selections)) stop(name, " not found as a column selection.") - if(length(self$get_column_selection_column_names(name))==0) stop(name, " has no columns selected.") - self$current_column_selection <- private$column_selections[[name]] -} -) + if (!name %in% names(private$column_selections)) stop(name, " not found as a column selection.") + if (length(self$get_column_selection_column_names(name)) == 0) { + cat(name, " has no columns selected.") + } else { + self$current_column_selection <- private$column_selections[[name]] + } +}) DataSheet$set("public", "get_column_selection_names", function(as_list = FALSE, include = list(), exclude = list(), excluded_items = c()) { out <- names(private$column_selections) From 4fcb8a93a8b1a27c79fcc12e22ce1ecfdc3e8c10 Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Thu, 17 Feb 2022 18:40:00 +0300 Subject: [PATCH 37/68] Renamed View Labels Dialogue in the database --- instat/dlgViewLabelsAndLevels.Designer.vb | 122 ++++++++++----------- instat/frmMain.Designer.vb | 34 +++--- instat/translations/rInstatTranslations.db | Bin 4849664 -> 4849664 bytes 3 files changed, 78 insertions(+), 78 deletions(-) diff --git a/instat/dlgViewLabelsAndLevels.Designer.vb b/instat/dlgViewLabelsAndLevels.Designer.vb index 7a8a629191b..7c70f2d0d38 100644 --- a/instat/dlgViewLabelsAndLevels.Designer.vb +++ b/instat/dlgViewLabelsAndLevels.Designer.vb @@ -40,17 +40,17 @@ Partial Class dlgViewFactorLabels Private Sub InitializeComponent() Me.lblFactorColumns = New System.Windows.Forms.Label() Me.grpSummaryStatistics = New System.Windows.Forms.GroupBox() - Me.ucrChkShowPercentage = New instat.ucrCheck() - Me.ucrChkShowFrequencies = New instat.ucrCheck() - Me.ucrChkShowMissingValues = New instat.ucrCheck() Me.grpDisplayOptions = New System.Windows.Forms.GroupBox() - Me.ucrChkSortByName = New instat.ucrCheck() - Me.ucrChkAlternateColour = New instat.ucrCheck() - Me.ucrChkShowId = New instat.ucrCheck() Me.grpLabels = New System.Windows.Forms.GroupBox() Me.ucrChkShowType = New instat.ucrCheck() Me.ucrChkShowValues = New instat.ucrCheck() Me.ucrChkShowLabels = New instat.ucrCheck() + Me.ucrChkSortByName = New instat.ucrCheck() + Me.ucrChkAlternateColour = New instat.ucrCheck() + Me.ucrChkShowId = New instat.ucrCheck() + Me.ucrChkShowPercentage = New instat.ucrCheck() + Me.ucrChkShowFrequencies = New instat.ucrCheck() + Me.ucrChkShowMissingValues = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverVariables = New instat.ucrReceiverMultiple() Me.ucrSelectorViewLabelsAndLevels = New instat.ucrSelectorByDataFrameAddRemove() @@ -81,33 +81,6 @@ Partial Class dlgViewFactorLabels Me.grpSummaryStatistics.TabStop = False Me.grpSummaryStatistics.Text = "Summary Statistics" ' - 'ucrChkShowPercentage - ' - Me.ucrChkShowPercentage.AutoSize = True - Me.ucrChkShowPercentage.Checked = False - Me.ucrChkShowPercentage.Location = New System.Drawing.Point(7, 41) - Me.ucrChkShowPercentage.Name = "ucrChkShowPercentage" - Me.ucrChkShowPercentage.Size = New System.Drawing.Size(154, 23) - Me.ucrChkShowPercentage.TabIndex = 1 - ' - 'ucrChkShowFrequencies - ' - Me.ucrChkShowFrequencies.AutoSize = True - Me.ucrChkShowFrequencies.Checked = False - Me.ucrChkShowFrequencies.Location = New System.Drawing.Point(7, 17) - Me.ucrChkShowFrequencies.Name = "ucrChkShowFrequencies" - Me.ucrChkShowFrequencies.Size = New System.Drawing.Size(143, 23) - Me.ucrChkShowFrequencies.TabIndex = 0 - ' - 'ucrChkShowMissingValues - ' - Me.ucrChkShowMissingValues.AutoSize = True - Me.ucrChkShowMissingValues.Checked = False - Me.ucrChkShowMissingValues.Location = New System.Drawing.Point(7, 65) - Me.ucrChkShowMissingValues.Name = "ucrChkShowMissingValues" - Me.ucrChkShowMissingValues.Size = New System.Drawing.Size(143, 23) - Me.ucrChkShowMissingValues.TabIndex = 2 - ' 'grpDisplayOptions ' Me.grpDisplayOptions.Controls.Add(Me.ucrChkSortByName) @@ -120,33 +93,6 @@ Partial Class dlgViewFactorLabels Me.grpDisplayOptions.TabStop = False Me.grpDisplayOptions.Text = "Display Options" ' - 'ucrChkSortByName - ' - Me.ucrChkSortByName.AutoSize = True - Me.ucrChkSortByName.Checked = False - Me.ucrChkSortByName.Location = New System.Drawing.Point(4, 42) - Me.ucrChkSortByName.Name = "ucrChkSortByName" - Me.ucrChkSortByName.Size = New System.Drawing.Size(133, 23) - Me.ucrChkSortByName.TabIndex = 1 - ' - 'ucrChkAlternateColour - ' - Me.ucrChkAlternateColour.AutoSize = True - Me.ucrChkAlternateColour.Checked = False - Me.ucrChkAlternateColour.Location = New System.Drawing.Point(4, 66) - Me.ucrChkAlternateColour.Name = "ucrChkAlternateColour" - Me.ucrChkAlternateColour.Size = New System.Drawing.Size(142, 23) - Me.ucrChkAlternateColour.TabIndex = 2 - ' - 'ucrChkShowId - ' - Me.ucrChkShowId.AutoSize = True - Me.ucrChkShowId.Checked = False - Me.ucrChkShowId.Location = New System.Drawing.Point(4, 18) - Me.ucrChkShowId.Name = "ucrChkShowId" - Me.ucrChkShowId.Size = New System.Drawing.Size(133, 23) - Me.ucrChkShowId.TabIndex = 0 - ' 'grpLabels ' Me.grpLabels.Controls.Add(Me.ucrChkShowType) @@ -186,6 +132,60 @@ Partial Class dlgViewFactorLabels Me.ucrChkShowLabels.Size = New System.Drawing.Size(190, 23) Me.ucrChkShowLabels.TabIndex = 1 ' + 'ucrChkSortByName + ' + Me.ucrChkSortByName.AutoSize = True + Me.ucrChkSortByName.Checked = False + Me.ucrChkSortByName.Location = New System.Drawing.Point(4, 42) + Me.ucrChkSortByName.Name = "ucrChkSortByName" + Me.ucrChkSortByName.Size = New System.Drawing.Size(133, 23) + Me.ucrChkSortByName.TabIndex = 1 + ' + 'ucrChkAlternateColour + ' + Me.ucrChkAlternateColour.AutoSize = True + Me.ucrChkAlternateColour.Checked = False + Me.ucrChkAlternateColour.Location = New System.Drawing.Point(4, 66) + Me.ucrChkAlternateColour.Name = "ucrChkAlternateColour" + Me.ucrChkAlternateColour.Size = New System.Drawing.Size(142, 23) + Me.ucrChkAlternateColour.TabIndex = 2 + ' + 'ucrChkShowId + ' + Me.ucrChkShowId.AutoSize = True + Me.ucrChkShowId.Checked = False + Me.ucrChkShowId.Location = New System.Drawing.Point(4, 18) + Me.ucrChkShowId.Name = "ucrChkShowId" + Me.ucrChkShowId.Size = New System.Drawing.Size(133, 23) + Me.ucrChkShowId.TabIndex = 0 + ' + 'ucrChkShowPercentage + ' + Me.ucrChkShowPercentage.AutoSize = True + Me.ucrChkShowPercentage.Checked = False + Me.ucrChkShowPercentage.Location = New System.Drawing.Point(7, 41) + Me.ucrChkShowPercentage.Name = "ucrChkShowPercentage" + Me.ucrChkShowPercentage.Size = New System.Drawing.Size(154, 23) + Me.ucrChkShowPercentage.TabIndex = 1 + ' + 'ucrChkShowFrequencies + ' + Me.ucrChkShowFrequencies.AutoSize = True + Me.ucrChkShowFrequencies.Checked = False + Me.ucrChkShowFrequencies.Location = New System.Drawing.Point(7, 17) + Me.ucrChkShowFrequencies.Name = "ucrChkShowFrequencies" + Me.ucrChkShowFrequencies.Size = New System.Drawing.Size(143, 23) + Me.ucrChkShowFrequencies.TabIndex = 0 + ' + 'ucrChkShowMissingValues + ' + Me.ucrChkShowMissingValues.AutoSize = True + Me.ucrChkShowMissingValues.Checked = False + Me.ucrChkShowMissingValues.Location = New System.Drawing.Point(7, 65) + Me.ucrChkShowMissingValues.Name = "ucrChkShowMissingValues" + Me.ucrChkShowMissingValues.Size = New System.Drawing.Size(143, 23) + Me.ucrChkShowMissingValues.TabIndex = 2 + ' 'ucrBase ' Me.ucrBase.AutoSize = True @@ -238,7 +238,7 @@ Partial Class dlgViewFactorLabels Me.MinimizeBox = False Me.Name = "dlgViewFactorLabels" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "View Labels/Levels" + Me.Text = "View/Delete Labels" Me.grpSummaryStatistics.ResumeLayout(False) Me.grpSummaryStatistics.PerformLayout() Me.grpDisplayOptions.ResumeLayout(False) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 36128a7ced1..fd068f8196e 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -3735,104 +3735,104 @@ Partial Class frmMain 'mnuPrepareColumnFactorConvertToFactor ' Me.mnuPrepareColumnFactorConvertToFactor.Name = "mnuPrepareColumnFactorConvertToFactor" - Me.mnuPrepareColumnFactorConvertToFactor.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorConvertToFactor.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorConvertToFactor.Tag = "Convert_To_Factor" Me.mnuPrepareColumnFactorConvertToFactor.Text = "Convert To Factor..." ' 'mnuPrepareColumnFactorRecodeNumeric ' Me.mnuPrepareColumnFactorRecodeNumeric.Name = "mnuPrepareColumnFactorRecodeNumeric" - Me.mnuPrepareColumnFactorRecodeNumeric.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorRecodeNumeric.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorRecodeNumeric.Tag = "Recode_Numeric..." Me.mnuPrepareColumnFactorRecodeNumeric.Text = "Recode Numeric..." ' 'mnuPrepareColumnFactorCountInFactor ' Me.mnuPrepareColumnFactorCountInFactor.Name = "mnuPrepareColumnFactorCountInFactor" - Me.mnuPrepareColumnFactorCountInFactor.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorCountInFactor.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorCountInFactor.Text = "Count in Factor..." ' 'ToolStripSeparator12 ' Me.ToolStripSeparator12.Name = "ToolStripSeparator12" - Me.ToolStripSeparator12.Size = New System.Drawing.Size(176, 6) + Me.ToolStripSeparator12.Size = New System.Drawing.Size(179, 6) ' 'mnuPrepareColumnFactorRecodeFactor ' Me.mnuPrepareColumnFactorRecodeFactor.Name = "mnuPrepareColumnFactorRecodeFactor" - Me.mnuPrepareColumnFactorRecodeFactor.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorRecodeFactor.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorRecodeFactor.Tag = "Recode_Factor..." Me.mnuPrepareColumnFactorRecodeFactor.Text = "Recode Factor..." ' 'mnuPrepareColumnFactorCombineFactors ' Me.mnuPrepareColumnFactorCombineFactors.Name = "mnuPrepareColumnFactorCombineFactors" - Me.mnuPrepareColumnFactorCombineFactors.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorCombineFactors.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorCombineFactors.Tag = "Combine_Factors..." Me.mnuPrepareColumnFactorCombineFactors.Text = "Combine Factors..." ' 'mnuPrepareColumnFactorDummyVariables ' Me.mnuPrepareColumnFactorDummyVariables.Name = "mnuPrepareColumnFactorDummyVariables" - Me.mnuPrepareColumnFactorDummyVariables.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorDummyVariables.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorDummyVariables.Tag = "Dummy_Variables..." Me.mnuPrepareColumnFactorDummyVariables.Text = "Dummy Variables..." ' 'ToolStripSeparator14 ' Me.ToolStripSeparator14.Name = "ToolStripSeparator14" - Me.ToolStripSeparator14.Size = New System.Drawing.Size(176, 6) + Me.ToolStripSeparator14.Size = New System.Drawing.Size(179, 6) ' 'mnuPrepareColumnFactorLevelsLabels ' Me.mnuPrepareColumnFactorLevelsLabels.Name = "mnuPrepareColumnFactorLevelsLabels" - Me.mnuPrepareColumnFactorLevelsLabels.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorLevelsLabels.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorLevelsLabels.Tag = "Levels/Labels..." Me.mnuPrepareColumnFactorLevelsLabels.Text = "Levels/Labels..." ' 'mnuPrepareFactorViewLabels ' Me.mnuPrepareFactorViewLabels.Name = "mnuPrepareFactorViewLabels" - Me.mnuPrepareFactorViewLabels.Size = New System.Drawing.Size(179, 22) - Me.mnuPrepareFactorViewLabels.Text = "View Labels..." + Me.mnuPrepareFactorViewLabels.Size = New System.Drawing.Size(182, 22) + Me.mnuPrepareFactorViewLabels.Text = "View/Delete Labels..." ' 'mnuPrepareColumnFactorReorderLevels ' Me.mnuPrepareColumnFactorReorderLevels.Name = "mnuPrepareColumnFactorReorderLevels" - Me.mnuPrepareColumnFactorReorderLevels.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorReorderLevels.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorReorderLevels.Tag = "Reorder_Levels..." Me.mnuPrepareColumnFactorReorderLevels.Text = "Reorder Levels..." ' 'mnuPrepareColumnFactorReferenceLevel ' Me.mnuPrepareColumnFactorReferenceLevel.Name = "mnuPrepareColumnFactorReferenceLevel" - Me.mnuPrepareColumnFactorReferenceLevel.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorReferenceLevel.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorReferenceLevel.Tag = "Reference_Level..." Me.mnuPrepareColumnFactorReferenceLevel.Text = "Reference Level..." ' 'mnuPrepareColumnFactorUnusedLevels ' Me.mnuPrepareColumnFactorUnusedLevels.Name = "mnuPrepareColumnFactorUnusedLevels" - Me.mnuPrepareColumnFactorUnusedLevels.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorUnusedLevels.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorUnusedLevels.Tag = "Unused_Levels..." Me.mnuPrepareColumnFactorUnusedLevels.Text = "Unused Levels..." ' 'mnuPrepareColumnFactorContrasts ' Me.mnuPrepareColumnFactorContrasts.Name = "mnuPrepareColumnFactorContrasts" - Me.mnuPrepareColumnFactorContrasts.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorContrasts.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorContrasts.Tag = "Contrasts..." Me.mnuPrepareColumnFactorContrasts.Text = "Contrasts..." ' 'ToolStripSeparator19 ' Me.ToolStripSeparator19.Name = "ToolStripSeparator19" - Me.ToolStripSeparator19.Size = New System.Drawing.Size(176, 6) + Me.ToolStripSeparator19.Size = New System.Drawing.Size(179, 6) ' 'mnuPrepareColumnFactorFactorDataFrame ' Me.mnuPrepareColumnFactorFactorDataFrame.Name = "mnuPrepareColumnFactorFactorDataFrame" - Me.mnuPrepareColumnFactorFactorDataFrame.Size = New System.Drawing.Size(179, 22) + Me.mnuPrepareColumnFactorFactorDataFrame.Size = New System.Drawing.Size(182, 22) Me.mnuPrepareColumnFactorFactorDataFrame.Tag = "Factor_Data_Frame" Me.mnuPrepareColumnFactorFactorDataFrame.Text = "Factor Data Frame..." ' diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index cf0ef3283a4606147ad97a2ebb13f557452feb02..2baf259a89e50c052c75e4b05db5279bb486fba4 100644 GIT binary patch delta 393 zcmY+&H%|fq0ES@>P(e7b_kw3V%VEdfz#0c9oJ>AVZZI)8K;nwS7gimeOq_I5N%RK( zg_EO+f5gwk#o-y=w^)4i7v-kY$li9PjqEiDgYXjpB1lvb)kF;uBEm#15h0?4NyLaa zQAgAh4MZc+L^KmEL@Uuov=bdfC(%W86Fo#Pks$isU_Crr_r9bN3dFtmaqKg8Vt$(? z^T-TG-=n$cNaQPWXB>C~FV>J@+vP&gu1{sp-K)gm>6v?xcO1vf{dO|rUbqGKZ+rPy z>nYsue@4o_%aT*Eq+bSPP=;h!M#Pp;8Iy6D5J!?SDN`~nGcqf4GA}7vkVRRNWm%C` aS(A0ykWJZ=v}9ykc4SxfJg2h%k@*2Rl8rY2 delta 358 zcmWm4J1;{40EXe7y0y+ZEp^wTj;f-1-0!z)DM<%I!zB4gx=9xagQbQqU75rxk=QVB zhW-naQQ}wFe1<3Q@>Z+Q{;J$YjnZ8#XOwP07=)i_AR37#qM2wR0z{B#B}~F1Y$8O2 zi8i90h!7n_C(%W86Fo#P(MR+XQ6feR5QD@J5hsS<;XJ-L1)pmKd|@wq9Qq2K*gtm7 zKD2|@hgGps=C}D^9(jpZCutb&{ck0k_O9NXr(h&rJUuI)U%18crD9(D(zQ(8kr7GA zs3c`fQZglw`z}X_=8(nUi^0kVRRNWm%C`S(A0ykWJZ=ZOO`x Date: Thu, 17 Feb 2022 21:27:20 +0300 Subject: [PATCH 38/68] Minor database change --- instat/translations/rInstatTranslations.db | Bin 4849664 -> 4849664 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 2baf259a89e50c052c75e4b05db5279bb486fba4..70445050345e07ee7dcff0416a426f0464f71336 100644 GIT binary patch delta 570 zcmY+=zfTi!7{~Fu>-T7(*PcgPD?O^^Yzu1P_#qykRuK+u)0j(0)HMEhs=2`g8MLAf zCT;Y|85cDS-#AH3NK6>?B={ZpCm0<~*od>PK5^3FHGDqfyVLokbjVv%ZoV5_kegjV zkP#Gw2m(V;5qc1!2r-0Sgg%5gf`*VlNFwM6hY$>eeuNZ48X<#l7$J*r1YrOnhhQQM zBIFT{A{;{~APnt*_3^V+muxu}(S?3J`8|0nv7ZPMUZPj~rmbot@gMQ`%8n?0vC1-& zKS&jEHMEvwR$Mmj@x8K}kB)zBGskdvE3`8FPH1H#jqM7*-K-6Z{%z}5G;S~YD}LKA zG+K9q)UG8`yT>PA{P%j*V&GLvq)dj%2suGcl2fEYM#&hl$vBxHlVpmVCe!4M@TyMO zQq*TWvf(T%vDf0phBKtH*h|R~&o`aENW6!cbKOpvnez_sZaO9Ihn697#%x0g(pwIh zA+uzToF(VTc~T`8$VD7hDI2WYE?FX% M$rZ6~*B(LiPDadg^feJkl%JEu3`YRl1NRuYiXdustBo0Og#OPpB zqEF5Zn0{fBG%=8L;4ShS_#?#4$&k1@>&i1SeDWQ>)#{;KB|AxJdADs&THXQ#2|-5i zBPa*~gj)y=2tkApLL)*LK}FCIA_zJ{6G9Xrh7da(PvUl)2M@+-2U{n0$Fq=nRT^|jg;z6$S2i=zA3Oi4=r>03oC zotOnlsg$E@{4&M5_>VWU?eVpj?&gaPeD$f*D`IEnzlMlWbf2%k z+OUf2?n1%UMS4je=_hG&pA3*ek|7p(K!(UeGE7ED zmW+y0&OUMF;AigNx65+igLtxUcLtQjgOy)$Qo*&!{ZR_uKS6|dEUNBgWe=*o!#pm-K@l4jK m^HL9M7Goy+ukzm+*1`)GbGU1 Date: Fri, 18 Feb 2022 14:47:50 +0300 Subject: [PATCH 39/68] adding "by" and "pair" radio button --- instat/dlgDescribeTwoVarGraph.Designer.vb | 73 +++++++++++++++++++---- 1 file changed, 62 insertions(+), 11 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.Designer.vb b/instat/dlgDescribeTwoVarGraph.Designer.vb index a6c0a7bb981..01d2f0d8994 100644 --- a/instat/dlgDescribeTwoVarGraph.Designer.vb +++ b/instat/dlgDescribeTwoVarGraph.Designer.vb @@ -65,6 +65,9 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrSelectorTwoVarGraph = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverFirstVars = New instat.ucrVariablesAsFactor() + Me.UcrPanel1 = New instat.UcrPanel() + Me.rdoPairs = New System.Windows.Forms.RadioButton() + Me.rdoBy = New System.Windows.Forms.RadioButton() Me.grpSummaries.SuspendLayout() Me.grpOptions.SuspendLayout() Me.SuspendLayout() @@ -72,7 +75,7 @@ Partial Class dlgDescribeTwoVarGraph 'cmdOptions ' Me.cmdOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOptions.Location = New System.Drawing.Point(10, 197) + Me.cmdOptions.Location = New System.Drawing.Point(10, 243) Me.cmdOptions.Name = "cmdOptions" Me.cmdOptions.Size = New System.Drawing.Size(119, 23) Me.cmdOptions.TabIndex = 5 @@ -84,7 +87,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.lblSecondVariable.AutoSize = True Me.lblSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondVariable.Location = New System.Drawing.Point(268, 165) + Me.lblSecondVariable.Location = New System.Drawing.Point(268, 201) Me.lblSecondVariable.Name = "lblSecondVariable" Me.lblSecondVariable.Size = New System.Drawing.Size(88, 13) Me.lblSecondVariable.TabIndex = 3 @@ -94,7 +97,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.lblFirstVariables.AutoSize = True Me.lblFirstVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstVariables.Location = New System.Drawing.Point(268, 45) + Me.lblFirstVariables.Location = New System.Drawing.Point(268, 65) Me.lblFirstVariables.Name = "lblFirstVariables" Me.lblFirstVariables.Size = New System.Drawing.Size(81, 13) Me.lblFirstVariables.TabIndex = 2 @@ -112,7 +115,7 @@ Partial Class dlgDescribeTwoVarGraph Me.grpSummaries.Controls.Add(Me.lblGraph) Me.grpSummaries.Controls.Add(Me.lblBy) Me.grpSummaries.Controls.Add(Me.lblSecondType) - Me.grpSummaries.Location = New System.Drawing.Point(10, 221) + Me.grpSummaries.Location = New System.Drawing.Point(10, 271) Me.grpSummaries.Name = "grpSummaries" Me.grpSummaries.Size = New System.Drawing.Size(210, 72) Me.grpSummaries.TabIndex = 15 @@ -220,7 +223,7 @@ Partial Class dlgDescribeTwoVarGraph Me.grpOptions.Controls.Add(Me.lblPointJitter) Me.grpOptions.Controls.Add(Me.ucrChkFreeScaleYAxis) Me.grpOptions.Controls.Add(Me.ucrFlipCoordinates) - Me.grpOptions.Location = New System.Drawing.Point(236, 203) + Me.grpOptions.Location = New System.Drawing.Point(226, 252) Me.grpOptions.Name = "grpOptions" Me.grpOptions.Size = New System.Drawing.Size(171, 111) Me.grpOptions.TabIndex = 16 @@ -314,7 +317,7 @@ Partial Class dlgDescribeTwoVarGraph 'ucrSaveGraph ' Me.ucrSaveGraph.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveGraph.Location = New System.Drawing.Point(10, 319) + Me.ucrSaveGraph.Location = New System.Drawing.Point(10, 351) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(339, 24) @@ -324,7 +327,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrReceiverSecondVar.AutoSize = True Me.ucrReceiverSecondVar.frmParent = Me - Me.ucrReceiverSecondVar.Location = New System.Drawing.Point(270, 180) + Me.ucrReceiverSecondVar.Location = New System.Drawing.Point(270, 216) Me.ucrReceiverSecondVar.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondVar.Name = "ucrReceiverSecondVar" Me.ucrReceiverSecondVar.Selector = Nothing @@ -339,7 +342,7 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrSelectorTwoVarGraph.bDropUnusedFilterLevels = False Me.ucrSelectorTwoVarGraph.bShowHiddenColumns = False Me.ucrSelectorTwoVarGraph.bUseCurrentFilter = True - Me.ucrSelectorTwoVarGraph.Location = New System.Drawing.Point(10, 10) + Me.ucrSelectorTwoVarGraph.Location = New System.Drawing.Point(10, 41) Me.ucrSelectorTwoVarGraph.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorTwoVarGraph.Name = "ucrSelectorTwoVarGraph" Me.ucrSelectorTwoVarGraph.Size = New System.Drawing.Size(213, 183) @@ -349,7 +352,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 347) + Me.ucrBase.Location = New System.Drawing.Point(10, 380) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(405, 52) Me.ucrBase.TabIndex = 8 @@ -358,7 +361,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrReceiverFirstVars.AutoSize = True Me.ucrReceiverFirstVars.frmParent = Me - Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(268, 30) + Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(268, 50) Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" Me.ucrReceiverFirstVars.Selector = Nothing Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(120, 138) @@ -367,12 +370,57 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrReceiverFirstVars.ucrSelector = Nothing Me.ucrReceiverFirstVars.ucrVariableSelector = Nothing ' + 'UcrPanel1 + ' + Me.UcrPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.UcrPanel1.Location = New System.Drawing.Point(73, 5) + Me.UcrPanel1.Name = "UcrPanel1" + Me.UcrPanel1.Size = New System.Drawing.Size(270, 31) + Me.UcrPanel1.TabIndex = 17 + ' + 'rdoPairs + ' + Me.rdoPairs.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoPairs.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPairs.FlatAppearance.BorderSize = 2 + Me.rdoPairs.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPairs.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoPairs.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoPairs.Location = New System.Drawing.Point(207, 9) + Me.rdoPairs.Name = "rdoPairs" + Me.rdoPairs.Size = New System.Drawing.Size(129, 27) + Me.rdoPairs.TabIndex = 19 + Me.rdoPairs.TabStop = True + Me.rdoPairs.Text = "Pairs" + Me.rdoPairs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoPairs.UseVisualStyleBackColor = True + ' + 'rdoBy + ' + Me.rdoBy.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoBy.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoBy.FlatAppearance.BorderSize = 2 + Me.rdoBy.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoBy.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoBy.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoBy.Location = New System.Drawing.Point(76, 9) + Me.rdoBy.Name = "rdoBy" + Me.rdoBy.Size = New System.Drawing.Size(133, 27) + Me.rdoBy.TabIndex = 18 + Me.rdoBy.TabStop = True + Me.rdoBy.Text = "By" + Me.rdoBy.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoBy.UseVisualStyleBackColor = True + ' 'dlgDescribeTwoVarGraph ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(419, 401) + Me.ClientSize = New System.Drawing.Size(425, 453) + Me.Controls.Add(Me.rdoPairs) + Me.Controls.Add(Me.rdoBy) + Me.Controls.Add(Me.UcrPanel1) Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.grpSummaries) Me.Controls.Add(Me.ucrSaveGraph) @@ -425,4 +473,7 @@ Partial Class dlgDescribeTwoVarGraph Friend WithEvents ucrNudJitter As ucrNud Friend WithEvents lblPointTransparency As Label Friend WithEvents lblPointJitter As Label + Friend WithEvents UcrPanel1 As UcrPanel + Friend WithEvents rdoPairs As RadioButton + Friend WithEvents rdoBy As RadioButton End Class \ No newline at end of file From 8e7c89c2bc155d05e9dbcf0341ec5060871079b6 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Fri, 18 Feb 2022 15:36:48 +0300 Subject: [PATCH 40/68] Linking of controls --- instat/dlgDescribeTwoVarGraph.Designer.vb | 278 +++++++++++----------- instat/dlgDescribeTwoVarGraph.vb | 23 +- 2 files changed, 157 insertions(+), 144 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.Designer.vb b/instat/dlgDescribeTwoVarGraph.Designer.vb index 01d2f0d8994..bf8f3709204 100644 --- a/instat/dlgDescribeTwoVarGraph.Designer.vb +++ b/instat/dlgDescribeTwoVarGraph.Designer.vb @@ -42,32 +42,32 @@ Partial Class dlgDescribeTwoVarGraph Me.lblSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariables = New System.Windows.Forms.Label() Me.grpSummaries = New System.Windows.Forms.GroupBox() - Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() - Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() - Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() - Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblGraphName = New System.Windows.Forms.Label() Me.lblGraph = New System.Windows.Forms.Label() Me.lblBy = New System.Windows.Forms.Label() Me.lblSecondType = New System.Windows.Forms.Label() Me.grpOptions = New System.Windows.Forms.GroupBox() - Me.ucrInputPosition = New instat.ucrInputComboBox() Me.lblPosition = New System.Windows.Forms.Label() - Me.ucrNudTransparency = New instat.ucrNud() - Me.ucrNudJitter = New instat.ucrNud() Me.lblPointTransparency = New System.Windows.Forms.Label() Me.lblPointJitter = New System.Windows.Forms.Label() + Me.rdoPairs = New System.Windows.Forms.RadioButton() + Me.rdoBy = New System.Windows.Forms.RadioButton() + Me.ucrPnlByPairs = New instat.UcrPanel() + Me.ucrInputPosition = New instat.ucrInputComboBox() + Me.ucrNudTransparency = New instat.ucrNud() + Me.ucrNudJitter = New instat.ucrNud() Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() - Me.ucrFlipCoordinates = New instat.ucrCheck() + Me.ucrChkFlipCoordinates = New instat.ucrCheck() + Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() + Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() + Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() + Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.ucrSaveGraph = New instat.ucrSave() Me.ucrReceiverSecondVar = New instat.ucrReceiverSingle() Me.ucrSelectorTwoVarGraph = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverFirstVars = New instat.ucrVariablesAsFactor() - Me.UcrPanel1 = New instat.UcrPanel() - Me.rdoPairs = New System.Windows.Forms.RadioButton() - Me.rdoBy = New System.Windows.Forms.RadioButton() Me.grpSummaries.SuspendLayout() Me.grpOptions.SuspendLayout() Me.SuspendLayout() @@ -75,7 +75,7 @@ Partial Class dlgDescribeTwoVarGraph 'cmdOptions ' Me.cmdOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOptions.Location = New System.Drawing.Point(10, 243) + Me.cmdOptions.Location = New System.Drawing.Point(10, 227) Me.cmdOptions.Name = "cmdOptions" Me.cmdOptions.Size = New System.Drawing.Size(119, 23) Me.cmdOptions.TabIndex = 5 @@ -115,56 +115,12 @@ Partial Class dlgDescribeTwoVarGraph Me.grpSummaries.Controls.Add(Me.lblGraph) Me.grpSummaries.Controls.Add(Me.lblBy) Me.grpSummaries.Controls.Add(Me.lblSecondType) - Me.grpSummaries.Location = New System.Drawing.Point(10, 271) + Me.grpSummaries.Location = New System.Drawing.Point(10, 253) Me.grpSummaries.Name = "grpSummaries" Me.grpSummaries.Size = New System.Drawing.Size(210, 72) Me.grpSummaries.TabIndex = 15 Me.grpSummaries.TabStop = False ' - 'ucrInputCategoricalByCategorical - ' - Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByCategorical.IsReadOnly = False - Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" - Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByCategorical.TabIndex = 17 - ' - 'ucrInputCategoricalByNumeric - ' - Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByNumeric.IsReadOnly = False - Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" - Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByNumeric.TabIndex = 16 - ' - 'ucrInputNumericByCategorical - ' - Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputNumericByCategorical.IsReadOnly = False - Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" - Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByCategorical.TabIndex = 15 - ' - 'ucrInputNumericByNumeric - ' - Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputNumericByNumeric.IsReadOnly = False - Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" - Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByNumeric.TabIndex = 14 - ' 'lblFirstType ' Me.lblFirstType.ForeColor = System.Drawing.SystemColors.ControlText @@ -222,7 +178,7 @@ Partial Class dlgDescribeTwoVarGraph Me.grpOptions.Controls.Add(Me.lblPointTransparency) Me.grpOptions.Controls.Add(Me.lblPointJitter) Me.grpOptions.Controls.Add(Me.ucrChkFreeScaleYAxis) - Me.grpOptions.Controls.Add(Me.ucrFlipCoordinates) + Me.grpOptions.Controls.Add(Me.ucrChkFlipCoordinates) Me.grpOptions.Location = New System.Drawing.Point(226, 252) Me.grpOptions.Name = "grpOptions" Me.grpOptions.Size = New System.Drawing.Size(171, 111) @@ -230,6 +186,77 @@ Partial Class dlgDescribeTwoVarGraph Me.grpOptions.TabStop = False Me.grpOptions.Text = "Options" ' + 'lblPosition + ' + Me.lblPosition.AutoSize = True + Me.lblPosition.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPosition.Location = New System.Drawing.Point(4, 65) + Me.lblPosition.Name = "lblPosition" + Me.lblPosition.Size = New System.Drawing.Size(47, 13) + Me.lblPosition.TabIndex = 12 + Me.lblPosition.Text = "Position:" + ' + 'lblPointTransparency + ' + Me.lblPointTransparency.AutoSize = True + Me.lblPointTransparency.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPointTransparency.Location = New System.Drawing.Point(4, 90) + Me.lblPointTransparency.Name = "lblPointTransparency" + Me.lblPointTransparency.Size = New System.Drawing.Size(102, 13) + Me.lblPointTransparency.TabIndex = 9 + Me.lblPointTransparency.Text = "Point Transparency:" + ' + 'lblPointJitter + ' + Me.lblPointJitter.AutoSize = True + Me.lblPointJitter.Location = New System.Drawing.Point(4, 65) + Me.lblPointJitter.Name = "lblPointJitter" + Me.lblPointJitter.Size = New System.Drawing.Size(59, 13) + Me.lblPointJitter.TabIndex = 8 + Me.lblPointJitter.Text = "Point Jitter:" + ' + 'rdoPairs + ' + Me.rdoPairs.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoPairs.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPairs.FlatAppearance.BorderSize = 2 + Me.rdoPairs.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPairs.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoPairs.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoPairs.Location = New System.Drawing.Point(207, 9) + Me.rdoPairs.Name = "rdoPairs" + Me.rdoPairs.Size = New System.Drawing.Size(129, 27) + Me.rdoPairs.TabIndex = 19 + Me.rdoPairs.TabStop = True + Me.rdoPairs.Text = "Pairs" + Me.rdoPairs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoPairs.UseVisualStyleBackColor = True + ' + 'rdoBy + ' + Me.rdoBy.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoBy.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoBy.FlatAppearance.BorderSize = 2 + Me.rdoBy.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoBy.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoBy.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoBy.Location = New System.Drawing.Point(76, 9) + Me.rdoBy.Name = "rdoBy" + Me.rdoBy.Size = New System.Drawing.Size(133, 27) + Me.rdoBy.TabIndex = 18 + Me.rdoBy.TabStop = True + Me.rdoBy.Text = "By" + Me.rdoBy.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoBy.UseVisualStyleBackColor = True + ' + 'ucrPnlByPairs + ' + Me.ucrPnlByPairs.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlByPairs.Location = New System.Drawing.Point(73, 5) + Me.ucrPnlByPairs.Name = "ucrPnlByPairs" + Me.ucrPnlByPairs.Size = New System.Drawing.Size(270, 31) + Me.ucrPnlByPairs.TabIndex = 17 + ' 'ucrInputPosition ' Me.ucrInputPosition.AddQuotesIfUnrecognised = True @@ -241,16 +268,6 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) Me.ucrInputPosition.TabIndex = 13 ' - 'lblPosition - ' - Me.lblPosition.AutoSize = True - Me.lblPosition.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPosition.Location = New System.Drawing.Point(4, 65) - Me.lblPosition.Name = "lblPosition" - Me.lblPosition.Size = New System.Drawing.Size(47, 13) - Me.lblPosition.TabIndex = 12 - Me.lblPosition.Text = "Position:" - ' 'ucrNudTransparency ' Me.ucrNudTransparency.AutoSize = True @@ -277,25 +294,6 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrNudJitter.TabIndex = 10 Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblPointTransparency - ' - Me.lblPointTransparency.AutoSize = True - Me.lblPointTransparency.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPointTransparency.Location = New System.Drawing.Point(4, 90) - Me.lblPointTransparency.Name = "lblPointTransparency" - Me.lblPointTransparency.Size = New System.Drawing.Size(102, 13) - Me.lblPointTransparency.TabIndex = 9 - Me.lblPointTransparency.Text = "Point Transparency:" - ' - 'lblPointJitter - ' - Me.lblPointJitter.AutoSize = True - Me.lblPointJitter.Location = New System.Drawing.Point(4, 65) - Me.lblPointJitter.Name = "lblPointJitter" - Me.lblPointJitter.Size = New System.Drawing.Size(59, 13) - Me.lblPointJitter.TabIndex = 8 - Me.lblPointJitter.Text = "Point Jitter:" - ' 'ucrChkFreeScaleYAxis ' Me.ucrChkFreeScaleYAxis.AutoSize = True @@ -305,14 +303,58 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) Me.ucrChkFreeScaleYAxis.TabIndex = 7 ' - 'ucrFlipCoordinates + 'ucrChkFlipCoordinates + ' + Me.ucrChkFlipCoordinates.AutoSize = True + Me.ucrChkFlipCoordinates.Checked = False + Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) + Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" + Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFlipCoordinates.TabIndex = 6 + ' + 'ucrInputCategoricalByCategorical + ' + Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByCategorical.IsReadOnly = False + Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" + Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByCategorical.TabIndex = 17 + ' + 'ucrInputCategoricalByNumeric + ' + Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByNumeric.IsReadOnly = False + Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" + Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByNumeric.TabIndex = 16 + ' + 'ucrInputNumericByCategorical + ' + Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputNumericByCategorical.IsReadOnly = False + Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" + Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByCategorical.TabIndex = 15 + ' + 'ucrInputNumericByNumeric ' - Me.ucrFlipCoordinates.AutoSize = True - Me.ucrFlipCoordinates.Checked = False - Me.ucrFlipCoordinates.Location = New System.Drawing.Point(6, 19) - Me.ucrFlipCoordinates.Name = "ucrFlipCoordinates" - Me.ucrFlipCoordinates.Size = New System.Drawing.Size(159, 23) - Me.ucrFlipCoordinates.TabIndex = 6 + Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputNumericByNumeric.IsReadOnly = False + Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" + Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByNumeric.TabIndex = 14 ' 'ucrSaveGraph ' @@ -370,48 +412,6 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrReceiverFirstVars.ucrSelector = Nothing Me.ucrReceiverFirstVars.ucrVariableSelector = Nothing ' - 'UcrPanel1 - ' - Me.UcrPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.UcrPanel1.Location = New System.Drawing.Point(73, 5) - Me.UcrPanel1.Name = "UcrPanel1" - Me.UcrPanel1.Size = New System.Drawing.Size(270, 31) - Me.UcrPanel1.TabIndex = 17 - ' - 'rdoPairs - ' - Me.rdoPairs.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoPairs.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoPairs.FlatAppearance.BorderSize = 2 - Me.rdoPairs.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoPairs.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoPairs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoPairs.Location = New System.Drawing.Point(207, 9) - Me.rdoPairs.Name = "rdoPairs" - Me.rdoPairs.Size = New System.Drawing.Size(129, 27) - Me.rdoPairs.TabIndex = 19 - Me.rdoPairs.TabStop = True - Me.rdoPairs.Text = "Pairs" - Me.rdoPairs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoPairs.UseVisualStyleBackColor = True - ' - 'rdoBy - ' - Me.rdoBy.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoBy.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoBy.FlatAppearance.BorderSize = 2 - Me.rdoBy.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoBy.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoBy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBy.Location = New System.Drawing.Point(76, 9) - Me.rdoBy.Name = "rdoBy" - Me.rdoBy.Size = New System.Drawing.Size(133, 27) - Me.rdoBy.TabIndex = 18 - Me.rdoBy.TabStop = True - Me.rdoBy.Text = "By" - Me.rdoBy.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoBy.UseVisualStyleBackColor = True - ' 'dlgDescribeTwoVarGraph ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -420,7 +420,7 @@ Partial Class dlgDescribeTwoVarGraph Me.ClientSize = New System.Drawing.Size(425, 453) Me.Controls.Add(Me.rdoPairs) Me.Controls.Add(Me.rdoBy) - Me.Controls.Add(Me.UcrPanel1) + Me.Controls.Add(Me.ucrPnlByPairs) Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.grpSummaries) Me.Controls.Add(Me.ucrSaveGraph) @@ -454,7 +454,7 @@ Partial Class dlgDescribeTwoVarGraph Friend WithEvents ucrReceiverFirstVars As ucrVariablesAsFactor Friend WithEvents lblFirstVariables As Label Friend WithEvents ucrSaveGraph As ucrSave - Friend WithEvents ucrFlipCoordinates As ucrCheck + Friend WithEvents ucrChkFlipCoordinates As ucrCheck Friend WithEvents grpSummaries As GroupBox Friend WithEvents lblFirstType As Label Friend WithEvents lblGraph As Label @@ -473,7 +473,7 @@ Partial Class dlgDescribeTwoVarGraph Friend WithEvents ucrNudJitter As ucrNud Friend WithEvents lblPointTransparency As Label Friend WithEvents lblPointJitter As Label - Friend WithEvents UcrPanel1 As UcrPanel + Friend WithEvents ucrPnlByPairs As UcrPanel Friend WithEvents rdoPairs As RadioButton Friend WithEvents rdoBy As RadioButton End Class \ No newline at end of file diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index 44d72103ee0..1c21623d1cd 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -100,17 +100,27 @@ Public Class dlgDescribeTwoVarGraph ucrBase.clsRsyntax.iCallType = 3 ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False + ucrPnlByPairs.AddRadioButton(rdoBy) + ucrPnlByPairs.AddRadioButton(rdoPairs) + ucrPnlByPairs.AddRSyntaxContainsFunctionNamesCondition(rdoBy, {"ggpairs"}, False) + ucrPnlByPairs.AddRSyntaxContainsFunctionNamesCondition(rdoPairs, {"ggpairs"}) + + ucrPnlByPairs.AddToLinkedControls({ucrReceiverFirstVars, ucrReceiverSecondVar, ucrInputCategoricalByCategorical, + ucrChkFlipCoordinates}, {rdoBy}, bNewLinkedHideIfParameterMissing:=True) + ucrSelectorTwoVarGraph.SetParameter(New RParameter("data", 0)) ucrSelectorTwoVarGraph.SetParameterIsrfunction() ucrReceiverFirstVars.Selector = ucrSelectorTwoVarGraph ucrReceiverFirstVars.SetMultipleOnlyStatus(True) ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + ucrReceiverFirstVars.SetLinkedDisplayControl(lblFirstVariables) ucrReceiverSecondVar.SetParameter(New RParameter("fill", 0)) ucrReceiverSecondVar.Selector = ucrSelectorTwoVarGraph ucrReceiverSecondVar.SetParameterIsString() ucrReceiverSecondVar.bWithQuotes = False + ucrReceiverSecondVar.SetLinkedDisplayControl(lblSecondVariable) ucrInputNumericByNumeric.SetItems({"Scatter plot", "Line plot", "Line plot + points"}) ucrInputNumericByNumeric.SetName("Scatter plot") @@ -125,6 +135,7 @@ Public Class dlgDescribeTwoVarGraph ucrInputCategoricalByNumeric.SetItems(strNumericCategoricalPlots) ucrInputCategoricalByNumeric.SetName("Summary Plot + Points") ucrInputCategoricalByNumeric.SetDropDownStyleAsNonEditable() + ucrInputCategoricalByCategorical.SetLinkedDisplayControl(grpSummaries) ucrInputCategoricalByCategorical.SetItems({"Bar Chart", "Mosaic Plot"}) ucrInputCategoricalByCategorical.SetName("Bar Chart") @@ -134,8 +145,9 @@ Public Class dlgDescribeTwoVarGraph clsCoordFlipFunc.SetRCommand("coord_flip") clsCoordFlipParam.SetArgumentName("coord_flip") clsCoordFlipParam.SetArgument(clsCoordFlipFunc) - ucrFlipCoordinates.SetText("Flip Coordinates") - ucrFlipCoordinates.SetParameter(clsCoordFlipParam, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrChkFlipCoordinates.SetText("Flip Coordinates") + ucrChkFlipCoordinates.SetParameter(clsCoordFlipParam, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrChkFlipCoordinates.SetLinkedDisplayControl(grpOptions) ucrChkFreeScaleYAxis.SetText("Free Scale Y Axis") ucrChkFreeScaleYAxis.SetParameter(New RParameter("scales", iNewPosition:=3), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=False) @@ -356,11 +368,12 @@ Public Class dlgDescribeTwoVarGraph ucrSelectorTwoVarGraph.SetRCode(clsRGGplotFunction, bReset) ucrReceiverSecondVar.SetRCode(clsAesCategoricalByCategoricalBarChart, bReset) ucrSaveGraph.SetRCode(clsBaseOperator, bReset) - ucrFlipCoordinates.SetRCode(clsBaseOperator, bReset) + ucrChkFlipCoordinates.SetRCode(clsBaseOperator, bReset) ucrChkFreeScaleYAxis.SetRCode(clsRFacet, bReset) ucrInputPosition.SetRCode(clsGeomBar, bReset) ucrNudJitter.SetRCode(clsGeomJitter, bReset) ucrNudTransparency.SetRCode(clsGeomJitter, bReset) + ucrPnlByPairs.SetRSyntax(ucrBase.clsRsyntax, bReset) bRCodeSet = True Results() @@ -741,7 +754,7 @@ Public Class dlgDescribeTwoVarGraph Return clsBaseOperator.ContainsParameter("coord_flip") End Function - Private Sub ucrFlipCoordinates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrFlipCoordinates.ControlValueChanged + Private Sub ucrFlipCoordinates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkFlipCoordinates.ControlValueChanged Dim clsScaleParam As RParameter If bRCodeSet Then @@ -755,7 +768,7 @@ Public Class dlgDescribeTwoVarGraph End If ucrChkFreeScaleYAxis.ClearConditions() ucrChkFreeScaleYAxis.AddParameterPresentCondition(True, "scales") - If ucrFlipCoordinates.Checked Then + If ucrChkFlipCoordinates.Checked Then ucrChkFreeScaleYAxis.AddParameterValuesCondition(True, "scales", {Chr(34) & "free" & Chr(34), Chr(34) & "free_x" & Chr(34)}) Else ucrChkFreeScaleYAxis.AddParameterValuesCondition(True, "scales", {Chr(34) & "free" & Chr(34), Chr(34) & "free_y" & Chr(34)}) From e4889f65a69fbdacb2d5950537025791ffe8b7fc Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Fri, 18 Feb 2022 16:00:36 +0300 Subject: [PATCH 41/68] Added the translation change from #7244 --- instat/dlgFromLibrary.Designer.vb | 24 ++++++++++----------- instat/dlgFromLibrary.vb | 7 ++++++ instat/translations/rInstatTranslations.db | Bin 4849664 -> 4849664 bytes 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/instat/dlgFromLibrary.Designer.vb b/instat/dlgFromLibrary.Designer.vb index 0706e4d5a92..49a863ebf1f 100644 --- a/instat/dlgFromLibrary.Designer.vb +++ b/instat/dlgFromLibrary.Designer.vb @@ -46,10 +46,10 @@ Partial Class dlgFromLibrary Me.cmdHelp = New System.Windows.Forms.Button() Me.rdoDefaultDatasets = New System.Windows.Forms.RadioButton() Me.rdoInstatCollection = New System.Windows.Forms.RadioButton() + Me.ucrNewDataFrameName = New instat.ucrSave() Me.ucrInputPackages = New instat.ucrInputComboBox() Me.ucrBase = New instat.ucrButtons() Me.ucrPnlOptions = New instat.UcrPanel() - Me.ucrNewDataFrameName = New instat.ucrSave() Me.SuspendLayout() ' 'cmdLibraryCollection @@ -102,7 +102,7 @@ Partial Class dlgFromLibrary Me.cmdHelp.Name = "cmdHelp" Me.cmdHelp.Size = New System.Drawing.Size(75, 23) Me.cmdHelp.TabIndex = 8 - Me.cmdHelp.Text = "Help" + Me.cmdHelp.Text = "R Help" Me.cmdHelp.UseVisualStyleBackColor = True ' 'rdoDefaultDatasets @@ -141,6 +141,15 @@ Partial Class dlgFromLibrary Me.rdoInstatCollection.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoInstatCollection.UseVisualStyleBackColor = False ' + 'ucrNewDataFrameName + ' + Me.ucrNewDataFrameName.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrNewDataFrameName.Location = New System.Drawing.Point(10, 259) + Me.ucrNewDataFrameName.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrNewDataFrameName.Name = "ucrNewDataFrameName" + Me.ucrNewDataFrameName.Size = New System.Drawing.Size(315, 22) + Me.ucrNewDataFrameName.TabIndex = 7 + ' 'ucrInputPackages ' Me.ucrInputPackages.AddQuotesIfUnrecognised = True @@ -172,15 +181,6 @@ Partial Class dlgFromLibrary Me.ucrPnlOptions.Size = New System.Drawing.Size(316, 44) Me.ucrPnlOptions.TabIndex = 0 ' - 'ucrNewDataFrameName - ' - Me.ucrNewDataFrameName.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrNewDataFrameName.Location = New System.Drawing.Point(10, 259) - Me.ucrNewDataFrameName.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrNewDataFrameName.Name = "ucrNewDataFrameName" - Me.ucrNewDataFrameName.Size = New System.Drawing.Size(315, 22) - Me.ucrNewDataFrameName.TabIndex = 7 - ' 'dlgFromLibrary ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -201,7 +201,7 @@ Partial Class dlgFromLibrary Me.MinimizeBox = False Me.Name = "dlgFromLibrary" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Open Dataset from Library" + Me.Text = "Import From Library" Me.ResumeLayout(False) Me.PerformLayout() diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 1493ae4a817..8f83d98ac39 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -326,4 +326,11 @@ Public Class dlgFromLibrary End If End Sub + Private Sub ucrInputPackages_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPackages.ControlValueChanged + + End Sub + + Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged + + End Sub End Class \ No newline at end of file diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 70445050345e07ee7dcff0416a426f0464f71336..08fa84dd30dd0c40525dcde538fb989efa3ed92f 100644 GIT binary patch delta 464 zcmWm6y=xP39LMq8EgpEMm|eHO2t+b2NAB| zN8_Y|aHG12Ylm_m4*mmOIw(YN&_yUXXY9AbYk3dvIR2u?;%!-LzpKn@?R5|up%VsS z5*A?-if{;*$PzgsPk2OuC=w;2kJv}-Ck_z(!~k)SI7IlwVWLb_h=4dkREZifNDL9f z#0YVeI7S>NMv0I(L7XH`5vPeU;tVlPOl%_hTx`dg;*-L^0=#eDOE1cAZ^LL7FEgqk%{e&J#PK9R;;?YW4<;U#$V&T(bTu~ zr}~h#sWmgn`bQ^FjqY7DZ1pE=_p77Ho8ME88tdLN!%06`Tdt1Sw`&VaE34_VQuN0}>07GSlJ9=xr5!)&8LHl$GsCdH*DFrz!Ro_Dk89UoZ3L01i-tHW q&WZElf|wLj;-a`DE{mqPBBsSvF(YQhoVX_Tp7UZM-3VGY{_Fx7^_h17 delta 501 zcmYkvJxmjE9LDk9_1}B#3l(auZK()YPO8W$)*@1sYKtry9ZYq21{#rIA_FcYSWTX| z`7#}jF2>D?bm>MSiwlFxnV8^UoE=>CHyOXlXZUuzAM~zxo!8oL3JY5M83>Kgi726n z7-0}5VG%ar5H1lX5=4?n5d%b;I7AE*Lqvu+Ok{~8M2wO`0t;V|+E<84rzoY&W*5{-{rCOBJGf(I?TezOQ$5 zN88a_k^RVK=7*!o>A_U6<6cFdd!?<;RH8?3LCCW2Sr zW^JPy-c#OEaFFwdgO@8MH~5&Eb9)0>|AuZ>!duF#WrFq9(wJ&>)*koTIlrRJTG&vY zR}a#iQX!aL8qK}v7kzP7oD(zRyr_x`q9$g=MKLEXiFr{Mm&FxvRV;{xxF)WPrfBv0 I#l^<=zeg{fumAu6 From 67fa4f6008fa16dc30ba660cbb3c3b30c34ba3bd Mon Sep 17 00:00:00 2001 From: ivanluv Date: Fri, 18 Feb 2022 18:23:55 +0300 Subject: [PATCH 42/68] adding code for the ggpair function --- instat/dlgDescribeTwoVarGraph.Designer.vb | 216 +++++++++++----------- instat/dlgDescribeTwoVarGraph.vb | 55 +++++- 2 files changed, 154 insertions(+), 117 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.Designer.vb b/instat/dlgDescribeTwoVarGraph.Designer.vb index bf8f3709204..cbd794a3d3e 100644 --- a/instat/dlgDescribeTwoVarGraph.Designer.vb +++ b/instat/dlgDescribeTwoVarGraph.Designer.vb @@ -42,27 +42,27 @@ Partial Class dlgDescribeTwoVarGraph Me.lblSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariables = New System.Windows.Forms.Label() Me.grpSummaries = New System.Windows.Forms.GroupBox() + Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() + Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() + Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() + Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblGraphName = New System.Windows.Forms.Label() Me.lblGraph = New System.Windows.Forms.Label() Me.lblBy = New System.Windows.Forms.Label() Me.lblSecondType = New System.Windows.Forms.Label() Me.grpOptions = New System.Windows.Forms.GroupBox() + Me.ucrInputPosition = New instat.ucrInputComboBox() Me.lblPosition = New System.Windows.Forms.Label() + Me.ucrNudTransparency = New instat.ucrNud() + Me.ucrNudJitter = New instat.ucrNud() Me.lblPointTransparency = New System.Windows.Forms.Label() Me.lblPointJitter = New System.Windows.Forms.Label() + Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() + Me.ucrChkFlipCoordinates = New instat.ucrCheck() Me.rdoPairs = New System.Windows.Forms.RadioButton() Me.rdoBy = New System.Windows.Forms.RadioButton() Me.ucrPnlByPairs = New instat.UcrPanel() - Me.ucrInputPosition = New instat.ucrInputComboBox() - Me.ucrNudTransparency = New instat.ucrNud() - Me.ucrNudJitter = New instat.ucrNud() - Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() - Me.ucrChkFlipCoordinates = New instat.ucrCheck() - Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() - Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() - Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() - Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.ucrSaveGraph = New instat.ucrSave() Me.ucrReceiverSecondVar = New instat.ucrReceiverSingle() Me.ucrSelectorTwoVarGraph = New instat.ucrSelectorByDataFrameAddRemove() @@ -121,6 +121,50 @@ Partial Class dlgDescribeTwoVarGraph Me.grpSummaries.TabIndex = 15 Me.grpSummaries.TabStop = False ' + 'ucrInputCategoricalByCategorical + ' + Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByCategorical.IsReadOnly = False + Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" + Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByCategorical.TabIndex = 17 + ' + 'ucrInputCategoricalByNumeric + ' + Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByNumeric.IsReadOnly = False + Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" + Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByNumeric.TabIndex = 16 + ' + 'ucrInputNumericByCategorical + ' + Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputNumericByCategorical.IsReadOnly = False + Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" + Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByCategorical.TabIndex = 15 + ' + 'ucrInputNumericByNumeric + ' + Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputNumericByNumeric.IsReadOnly = False + Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" + Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByNumeric.TabIndex = 14 + ' 'lblFirstType ' Me.lblFirstType.ForeColor = System.Drawing.SystemColors.ControlText @@ -186,6 +230,17 @@ Partial Class dlgDescribeTwoVarGraph Me.grpOptions.TabStop = False Me.grpOptions.Text = "Options" ' + 'ucrInputPosition + ' + Me.ucrInputPosition.AddQuotesIfUnrecognised = True + Me.ucrInputPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputPosition.GetSetSelectedIndex = -1 + Me.ucrInputPosition.IsReadOnly = False + Me.ucrInputPosition.Location = New System.Drawing.Point(54, 63) + Me.ucrInputPosition.Name = "ucrInputPosition" + Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) + Me.ucrInputPosition.TabIndex = 13 + ' 'lblPosition ' Me.lblPosition.AutoSize = True @@ -196,6 +251,32 @@ Partial Class dlgDescribeTwoVarGraph Me.lblPosition.TabIndex = 12 Me.lblPosition.Text = "Position:" ' + 'ucrNudTransparency + ' + Me.ucrNudTransparency.AutoSize = True + Me.ucrNudTransparency.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTransparency.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudTransparency.Location = New System.Drawing.Point(112, 87) + Me.ucrNudTransparency.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudTransparency.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTransparency.Name = "ucrNudTransparency" + Me.ucrNudTransparency.Size = New System.Drawing.Size(50, 20) + Me.ucrNudTransparency.TabIndex = 11 + Me.ucrNudTransparency.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudJitter + ' + Me.ucrNudJitter.AutoSize = True + Me.ucrNudJitter.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudJitter.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudJitter.Location = New System.Drawing.Point(112, 62) + Me.ucrNudJitter.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudJitter.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudJitter.Name = "ucrNudJitter" + Me.ucrNudJitter.Size = New System.Drawing.Size(50, 20) + Me.ucrNudJitter.TabIndex = 10 + Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblPointTransparency ' Me.lblPointTransparency.AutoSize = True @@ -215,6 +296,24 @@ Partial Class dlgDescribeTwoVarGraph Me.lblPointJitter.TabIndex = 8 Me.lblPointJitter.Text = "Point Jitter:" ' + 'ucrChkFreeScaleYAxis + ' + Me.ucrChkFreeScaleYAxis.AutoSize = True + Me.ucrChkFreeScaleYAxis.Checked = False + Me.ucrChkFreeScaleYAxis.Location = New System.Drawing.Point(6, 41) + Me.ucrChkFreeScaleYAxis.Name = "ucrChkFreeScaleYAxis" + Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFreeScaleYAxis.TabIndex = 7 + ' + 'ucrChkFlipCoordinates + ' + Me.ucrChkFlipCoordinates.AutoSize = True + Me.ucrChkFlipCoordinates.Checked = False + Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) + Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" + Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFlipCoordinates.TabIndex = 6 + ' 'rdoPairs ' Me.rdoPairs.Appearance = System.Windows.Forms.Appearance.Button @@ -257,105 +356,6 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrPnlByPairs.Size = New System.Drawing.Size(270, 31) Me.ucrPnlByPairs.TabIndex = 17 ' - 'ucrInputPosition - ' - Me.ucrInputPosition.AddQuotesIfUnrecognised = True - Me.ucrInputPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputPosition.GetSetSelectedIndex = -1 - Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Location = New System.Drawing.Point(54, 63) - Me.ucrInputPosition.Name = "ucrInputPosition" - Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) - Me.ucrInputPosition.TabIndex = 13 - ' - 'ucrNudTransparency - ' - Me.ucrNudTransparency.AutoSize = True - Me.ucrNudTransparency.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTransparency.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTransparency.Location = New System.Drawing.Point(112, 87) - Me.ucrNudTransparency.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudTransparency.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTransparency.Name = "ucrNudTransparency" - Me.ucrNudTransparency.Size = New System.Drawing.Size(50, 20) - Me.ucrNudTransparency.TabIndex = 11 - Me.ucrNudTransparency.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudJitter - ' - Me.ucrNudJitter.AutoSize = True - Me.ucrNudJitter.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudJitter.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudJitter.Location = New System.Drawing.Point(112, 62) - Me.ucrNudJitter.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudJitter.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudJitter.Name = "ucrNudJitter" - Me.ucrNudJitter.Size = New System.Drawing.Size(50, 20) - Me.ucrNudJitter.TabIndex = 10 - Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkFreeScaleYAxis - ' - Me.ucrChkFreeScaleYAxis.AutoSize = True - Me.ucrChkFreeScaleYAxis.Checked = False - Me.ucrChkFreeScaleYAxis.Location = New System.Drawing.Point(6, 41) - Me.ucrChkFreeScaleYAxis.Name = "ucrChkFreeScaleYAxis" - Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) - Me.ucrChkFreeScaleYAxis.TabIndex = 7 - ' - 'ucrChkFlipCoordinates - ' - Me.ucrChkFlipCoordinates.AutoSize = True - Me.ucrChkFlipCoordinates.Checked = False - Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) - Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" - Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) - Me.ucrChkFlipCoordinates.TabIndex = 6 - ' - 'ucrInputCategoricalByCategorical - ' - Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByCategorical.IsReadOnly = False - Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" - Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByCategorical.TabIndex = 17 - ' - 'ucrInputCategoricalByNumeric - ' - Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByNumeric.IsReadOnly = False - Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" - Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByNumeric.TabIndex = 16 - ' - 'ucrInputNumericByCategorical - ' - Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputNumericByCategorical.IsReadOnly = False - Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" - Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByCategorical.TabIndex = 15 - ' - 'ucrInputNumericByNumeric - ' - Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputNumericByNumeric.IsReadOnly = False - Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" - Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByNumeric.TabIndex = 14 - ' 'ucrSaveGraph ' Me.ucrSaveGraph.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index 1c21623d1cd..c33d91c629b 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -69,8 +69,9 @@ Public Class dlgDescribeTwoVarGraph Private clsGeomHistogram As New RFunction Private clsGeomDensity As New RFunction Private clsAnnotateFunction As New RFunction + Private clsGGpairsFunction As New RFunction + Private clsDummyFunction As New RFunction Private strGeomParameterNames() As String = {"geom_jitter", "geom_violin", "geom_bar", "geom_mosaic", "geom_boxplot", "geom_point", "geom_line", "stat_summary_hline", "stat_summary_crossline", "geom_freqpoly", "geom_histogram", "geom_density"} - Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private bRCodeSet As Boolean = True @@ -102,10 +103,10 @@ Public Class dlgDescribeTwoVarGraph ucrPnlByPairs.AddRadioButton(rdoBy) ucrPnlByPairs.AddRadioButton(rdoPairs) - ucrPnlByPairs.AddRSyntaxContainsFunctionNamesCondition(rdoBy, {"ggpairs"}, False) - ucrPnlByPairs.AddRSyntaxContainsFunctionNamesCondition(rdoPairs, {"ggpairs"}) + ucrPnlByPairs.AddParameterValuesCondition(rdoBy, "checked", "by") + ucrPnlByPairs.AddParameterValuesCondition(rdoPairs, "checked", "pair") - ucrPnlByPairs.AddToLinkedControls({ucrReceiverFirstVars, ucrReceiverSecondVar, ucrInputCategoricalByCategorical, + ucrPnlByPairs.AddToLinkedControls({ucrReceiverSecondVar, ucrInputCategoricalByCategorical, ucrChkFlipCoordinates}, {rdoBy}, bNewLinkedHideIfParameterMissing:=True) ucrSelectorTwoVarGraph.SetParameter(New RParameter("data", 0)) @@ -114,7 +115,6 @@ Public Class dlgDescribeTwoVarGraph ucrReceiverFirstVars.Selector = ucrSelectorTwoVarGraph ucrReceiverFirstVars.SetMultipleOnlyStatus(True) ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) - ucrReceiverFirstVars.SetLinkedDisplayControl(lblFirstVariables) ucrReceiverSecondVar.SetParameter(New RParameter("fill", 0)) ucrReceiverSecondVar.Selector = ucrSelectorTwoVarGraph @@ -188,7 +188,9 @@ Public Class dlgDescribeTwoVarGraph End Sub Private Sub SetDefaults() + clsGGpairsFunction = New RFunction clsRGGplotFunction = New RFunction + clsDummyFunction = New RFunction clsRFacet = New RFunction clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone() dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) @@ -239,6 +241,11 @@ Public Class dlgDescribeTwoVarGraph ucrReceiverFirstVars.SetMeAsReceiver() + clsDummyFunction.AddParameter("checked", "by", iPosition:=0) + + clsGGpairsFunction.SetPackageName("GGally") + clsGGpairsFunction.SetRCommand("ggpairs") + clsBaseOperator.SetOperation("+") clsRGGplotFunction.SetPackageName("ggplot2") @@ -351,6 +358,7 @@ Public Class dlgDescribeTwoVarGraph clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTwoVarGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + AddDataFrame() ' bResetSubdialog = True End Sub @@ -364,6 +372,7 @@ Public Class dlgDescribeTwoVarGraph ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesNumericByNumeric, New RParameter("x", 0), iAdditionalPairNo:=5) ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsGgmosaicProduct, New RParameter("1", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=6) ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesStatSummaryHlineCategoricalByNumeric, New RParameter("y", 1), iAdditionalPairNo:=7) + ucrSaveGraph.AddAdditionalRCode(clsGGpairsFunction, bReset) ucrSelectorTwoVarGraph.SetRCode(clsRGGplotFunction, bReset) ucrReceiverSecondVar.SetRCode(clsAesCategoricalByCategoricalBarChart, bReset) @@ -373,7 +382,7 @@ Public Class dlgDescribeTwoVarGraph ucrInputPosition.SetRCode(clsGeomBar, bReset) ucrNudJitter.SetRCode(clsGeomJitter, bReset) ucrNudTransparency.SetRCode(clsGeomJitter, bReset) - ucrPnlByPairs.SetRSyntax(ucrBase.clsRsyntax, bReset) + ucrPnlByPairs.SetRCode(clsDummyFunction, bReset) bRCodeSet = True Results() @@ -381,7 +390,9 @@ Public Class dlgDescribeTwoVarGraph End Sub Private Sub TestOkEnabled() - If Not ucrReceiverFirstVars.IsEmpty AndAlso Not ucrReceiverSecondVar.IsEmpty AndAlso ucrSaveGraph.IsComplete Then + If rdoBy.Checked AndAlso Not ucrReceiverFirstVars.IsEmpty AndAlso Not ucrReceiverSecondVar.IsEmpty AndAlso ucrSaveGraph.IsComplete Then + ucrBase.OKEnabled(True) + ElseIf rdoPairs.Checked AndAlso Not ucrReceiverFirstVars.IsEmpty Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -632,6 +643,7 @@ Public Class dlgDescribeTwoVarGraph Private Sub ucrReceiverFirstVars_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged Results() + AddColumnParameter() End Sub Private Sub ucrReceiverSecondVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondVar.ControlValueChanged @@ -640,8 +652,7 @@ Public Class dlgDescribeTwoVarGraph Results() End Sub - - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondVar.ControlContentsChanged, ucrReceiverFirstVars.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondVar.ControlContentsChanged, ucrReceiverFirstVars.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrPnlByPairs.ControlContentsChanged TestOkEnabled() End Sub @@ -775,4 +786,30 @@ Public Class dlgDescribeTwoVarGraph End If End If End Sub + + Private Sub ucrPnlByPairs_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlByPairs.ControlValueChanged + If bRCodeSet Then + If rdoBy.Checked Then + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + clsDummyFunction.AddParameter("checked", "by", iPosition:=0) + Else + ucrBase.clsRsyntax.SetBaseRFunction(clsGGpairsFunction) + clsDummyFunction.AddParameter("checked", "pair", iPosition:=0) + End If + End If + End Sub + + Private Sub ucrSelectorTwoVarGraph_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTwoVarGraph.ControlValueChanged + AddDataFrame() + End Sub + + Private Sub AddColumnParameter() + clsGGpairsFunction.AddParameter("columns", ucrReceiverFirstVars.ucrMultipleVariables.GetVariableNames(), iPosition:=1) + End Sub + + Private Sub AddDataFrame() + Dim clsGetDataFrameFunction As RFunction = ucrSelectorTwoVarGraph.ucrAvailableDataFrames.clsCurrDataFrame.Clone + clsGetDataFrameFunction.RemoveParameterByName("stack_data") + clsGGpairsFunction.AddParameter("data", clsRFunctionParameter:=clsGetDataFrameFunction, iPosition:=0) + End Sub End Class \ No newline at end of file From 8f2016d9765b7387b2c787bc42dc85eff73e5dab Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 21 Feb 2022 16:35:54 +0300 Subject: [PATCH 43/68] Swapping the pair and by radio buttons Removing Restrictions from the multiple receiver Adding the colour receiver for the pair options --- instat/dlgDescribeTwoVarGraph.Designer.vb | 380 +++++++++++++++------- instat/dlgDescribeTwoVarGraph.vb | 94 +++--- 2 files changed, 311 insertions(+), 163 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.Designer.vb b/instat/dlgDescribeTwoVarGraph.Designer.vb index cbd794a3d3e..2acf314ffbd 100644 --- a/instat/dlgDescribeTwoVarGraph.Designer.vb +++ b/instat/dlgDescribeTwoVarGraph.Designer.vb @@ -42,34 +42,45 @@ Partial Class dlgDescribeTwoVarGraph Me.lblSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariables = New System.Windows.Forms.Label() Me.grpSummaries = New System.Windows.Forms.GroupBox() - Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() - Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() - Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() - Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblGraphName = New System.Windows.Forms.Label() Me.lblGraph = New System.Windows.Forms.Label() Me.lblBy = New System.Windows.Forms.Label() Me.lblSecondType = New System.Windows.Forms.Label() Me.grpOptions = New System.Windows.Forms.GroupBox() - Me.ucrInputPosition = New instat.ucrInputComboBox() Me.lblPosition = New System.Windows.Forms.Label() - Me.ucrNudTransparency = New instat.ucrNud() - Me.ucrNudJitter = New instat.ucrNud() Me.lblPointTransparency = New System.Windows.Forms.Label() Me.lblPointJitter = New System.Windows.Forms.Label() - Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() - Me.ucrChkFlipCoordinates = New instat.ucrCheck() Me.rdoPairs = New System.Windows.Forms.RadioButton() Me.rdoBy = New System.Windows.Forms.RadioButton() + Me.lblColour = New System.Windows.Forms.Label() + Me.grpTypeOfDispaly = New System.Windows.Forms.GroupBox() + Me.UcrInputComboBox1 = New instat.ucrInputComboBox() + Me.UcrInputComboBox3 = New instat.ucrInputComboBox() + Me.UcrInputComboBox2 = New instat.ucrInputComboBox() + Me.ucrInputContinous = New instat.ucrInputComboBox() + Me.ucrChkDiagonal = New instat.ucrCheck() + Me.ucrChkLower = New instat.ucrCheck() + Me.ucrChkUpper = New instat.ucrCheck() + Me.ucrReceiverColour = New instat.ucrReceiverSingle() Me.ucrPnlByPairs = New instat.UcrPanel() + Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() + Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() + Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() + Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.ucrSaveGraph = New instat.ucrSave() Me.ucrReceiverSecondVar = New instat.ucrReceiverSingle() Me.ucrSelectorTwoVarGraph = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverFirstVars = New instat.ucrVariablesAsFactor() + Me.ucrNudTransparency = New instat.ucrNud() + Me.ucrNudJitter = New instat.ucrNud() + Me.ucrChkFlipCoordinates = New instat.ucrCheck() + Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() + Me.ucrInputPosition = New instat.ucrInputComboBox() Me.grpSummaries.SuspendLayout() Me.grpOptions.SuspendLayout() + Me.grpTypeOfDispaly.SuspendLayout() Me.SuspendLayout() ' 'cmdOptions @@ -87,7 +98,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.lblSecondVariable.AutoSize = True Me.lblSecondVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondVariable.Location = New System.Drawing.Point(268, 201) + Me.lblSecondVariable.Location = New System.Drawing.Point(285, 201) Me.lblSecondVariable.Name = "lblSecondVariable" Me.lblSecondVariable.Size = New System.Drawing.Size(88, 13) Me.lblSecondVariable.TabIndex = 3 @@ -97,7 +108,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.lblFirstVariables.AutoSize = True Me.lblFirstVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstVariables.Location = New System.Drawing.Point(268, 65) + Me.lblFirstVariables.Location = New System.Drawing.Point(290, 65) Me.lblFirstVariables.Name = "lblFirstVariables" Me.lblFirstVariables.Size = New System.Drawing.Size(81, 13) Me.lblFirstVariables.TabIndex = 2 @@ -121,50 +132,6 @@ Partial Class dlgDescribeTwoVarGraph Me.grpSummaries.TabIndex = 15 Me.grpSummaries.TabStop = False ' - 'ucrInputCategoricalByCategorical - ' - Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByCategorical.IsReadOnly = False - Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" - Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByCategorical.TabIndex = 17 - ' - 'ucrInputCategoricalByNumeric - ' - Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByNumeric.IsReadOnly = False - Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" - Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByNumeric.TabIndex = 16 - ' - 'ucrInputNumericByCategorical - ' - Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputNumericByCategorical.IsReadOnly = False - Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" - Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByCategorical.TabIndex = 15 - ' - 'ucrInputNumericByNumeric - ' - Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputNumericByNumeric.IsReadOnly = False - Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" - Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByNumeric.TabIndex = 14 - ' 'lblFirstType ' Me.lblFirstType.ForeColor = System.Drawing.SystemColors.ControlText @@ -215,14 +182,14 @@ Partial Class dlgDescribeTwoVarGraph ' 'grpOptions ' - Me.grpOptions.Controls.Add(Me.ucrInputPosition) Me.grpOptions.Controls.Add(Me.lblPosition) Me.grpOptions.Controls.Add(Me.ucrNudTransparency) Me.grpOptions.Controls.Add(Me.ucrNudJitter) Me.grpOptions.Controls.Add(Me.lblPointTransparency) Me.grpOptions.Controls.Add(Me.lblPointJitter) - Me.grpOptions.Controls.Add(Me.ucrChkFreeScaleYAxis) Me.grpOptions.Controls.Add(Me.ucrChkFlipCoordinates) + Me.grpOptions.Controls.Add(Me.ucrChkFreeScaleYAxis) + Me.grpOptions.Controls.Add(Me.ucrInputPosition) Me.grpOptions.Location = New System.Drawing.Point(226, 252) Me.grpOptions.Name = "grpOptions" Me.grpOptions.Size = New System.Drawing.Size(171, 111) @@ -230,17 +197,6 @@ Partial Class dlgDescribeTwoVarGraph Me.grpOptions.TabStop = False Me.grpOptions.Text = "Options" ' - 'ucrInputPosition - ' - Me.ucrInputPosition.AddQuotesIfUnrecognised = True - Me.ucrInputPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputPosition.GetSetSelectedIndex = -1 - Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Location = New System.Drawing.Point(54, 63) - Me.ucrInputPosition.Name = "ucrInputPosition" - Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) - Me.ucrInputPosition.TabIndex = 13 - ' 'lblPosition ' Me.lblPosition.AutoSize = True @@ -251,32 +207,6 @@ Partial Class dlgDescribeTwoVarGraph Me.lblPosition.TabIndex = 12 Me.lblPosition.Text = "Position:" ' - 'ucrNudTransparency - ' - Me.ucrNudTransparency.AutoSize = True - Me.ucrNudTransparency.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTransparency.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTransparency.Location = New System.Drawing.Point(112, 87) - Me.ucrNudTransparency.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudTransparency.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTransparency.Name = "ucrNudTransparency" - Me.ucrNudTransparency.Size = New System.Drawing.Size(50, 20) - Me.ucrNudTransparency.TabIndex = 11 - Me.ucrNudTransparency.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudJitter - ' - Me.ucrNudJitter.AutoSize = True - Me.ucrNudJitter.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudJitter.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudJitter.Location = New System.Drawing.Point(112, 62) - Me.ucrNudJitter.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudJitter.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudJitter.Name = "ucrNudJitter" - Me.ucrNudJitter.Size = New System.Drawing.Size(50, 20) - Me.ucrNudJitter.TabIndex = 10 - Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblPointTransparency ' Me.lblPointTransparency.AutoSize = True @@ -296,24 +226,6 @@ Partial Class dlgDescribeTwoVarGraph Me.lblPointJitter.TabIndex = 8 Me.lblPointJitter.Text = "Point Jitter:" ' - 'ucrChkFreeScaleYAxis - ' - Me.ucrChkFreeScaleYAxis.AutoSize = True - Me.ucrChkFreeScaleYAxis.Checked = False - Me.ucrChkFreeScaleYAxis.Location = New System.Drawing.Point(6, 41) - Me.ucrChkFreeScaleYAxis.Name = "ucrChkFreeScaleYAxis" - Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) - Me.ucrChkFreeScaleYAxis.TabIndex = 7 - ' - 'ucrChkFlipCoordinates - ' - Me.ucrChkFlipCoordinates.AutoSize = True - Me.ucrChkFlipCoordinates.Checked = False - Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) - Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" - Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) - Me.ucrChkFlipCoordinates.TabIndex = 6 - ' 'rdoPairs ' Me.rdoPairs.Appearance = System.Windows.Forms.Appearance.Button @@ -322,7 +234,7 @@ Partial Class dlgDescribeTwoVarGraph Me.rdoPairs.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoPairs.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoPairs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoPairs.Location = New System.Drawing.Point(207, 9) + Me.rdoPairs.Location = New System.Drawing.Point(76, 9) Me.rdoPairs.Name = "rdoPairs" Me.rdoPairs.Size = New System.Drawing.Size(129, 27) Me.rdoPairs.TabIndex = 19 @@ -339,27 +251,181 @@ Partial Class dlgDescribeTwoVarGraph Me.rdoBy.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoBy.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoBy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBy.Location = New System.Drawing.Point(76, 9) + Me.rdoBy.Location = New System.Drawing.Point(203, 9) Me.rdoBy.Name = "rdoBy" - Me.rdoBy.Size = New System.Drawing.Size(133, 27) + Me.rdoBy.Size = New System.Drawing.Size(129, 27) Me.rdoBy.TabIndex = 18 Me.rdoBy.TabStop = True Me.rdoBy.Text = "By" Me.rdoBy.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoBy.UseVisualStyleBackColor = True ' + 'lblColour + ' + Me.lblColour.AutoSize = True + Me.lblColour.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColour.Location = New System.Drawing.Point(283, 201) + Me.lblColour.Name = "lblColour" + Me.lblColour.Size = New System.Drawing.Size(88, 13) + Me.lblColour.TabIndex = 20 + Me.lblColour.Text = "Colour (Optional):" + ' + 'grpTypeOfDispaly + ' + Me.grpTypeOfDispaly.Controls.Add(Me.UcrInputComboBox1) + Me.grpTypeOfDispaly.Controls.Add(Me.UcrInputComboBox3) + Me.grpTypeOfDispaly.Controls.Add(Me.UcrInputComboBox2) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputContinous) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrChkDiagonal) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrChkLower) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrChkUpper) + Me.grpTypeOfDispaly.Location = New System.Drawing.Point(10, 252) + Me.grpTypeOfDispaly.Name = "grpTypeOfDispaly" + Me.grpTypeOfDispaly.Size = New System.Drawing.Size(422, 151) + Me.grpTypeOfDispaly.TabIndex = 22 + Me.grpTypeOfDispaly.TabStop = False + Me.grpTypeOfDispaly.Text = "Type Of Dispaly" + ' + 'UcrInputComboBox1 + ' + Me.UcrInputComboBox1.AddQuotesIfUnrecognised = True + Me.UcrInputComboBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.UcrInputComboBox1.GetSetSelectedIndex = -1 + Me.UcrInputComboBox1.IsReadOnly = False + Me.UcrInputComboBox1.Location = New System.Drawing.Point(58, 124) + Me.UcrInputComboBox1.Name = "UcrInputComboBox1" + Me.UcrInputComboBox1.Size = New System.Drawing.Size(61, 21) + Me.UcrInputComboBox1.TabIndex = 22 + ' + 'UcrInputComboBox3 + ' + Me.UcrInputComboBox3.AddQuotesIfUnrecognised = True + Me.UcrInputComboBox3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.UcrInputComboBox3.GetSetSelectedIndex = -1 + Me.UcrInputComboBox3.IsReadOnly = False + Me.UcrInputComboBox3.Location = New System.Drawing.Point(58, 100) + Me.UcrInputComboBox3.Name = "UcrInputComboBox3" + Me.UcrInputComboBox3.Size = New System.Drawing.Size(61, 21) + Me.UcrInputComboBox3.TabIndex = 5 + ' + 'UcrInputComboBox2 + ' + Me.UcrInputComboBox2.AddQuotesIfUnrecognised = True + Me.UcrInputComboBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.UcrInputComboBox2.GetSetSelectedIndex = -1 + Me.UcrInputComboBox2.IsReadOnly = False + Me.UcrInputComboBox2.Location = New System.Drawing.Point(58, 73) + Me.UcrInputComboBox2.Name = "UcrInputComboBox2" + Me.UcrInputComboBox2.Size = New System.Drawing.Size(61, 21) + Me.UcrInputComboBox2.TabIndex = 4 + ' + 'ucrInputContinous + ' + Me.ucrInputContinous.AddQuotesIfUnrecognised = True + Me.ucrInputContinous.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputContinous.GetSetSelectedIndex = -1 + Me.ucrInputContinous.IsReadOnly = False + Me.ucrInputContinous.Location = New System.Drawing.Point(58, 46) + Me.ucrInputContinous.Name = "ucrInputContinous" + Me.ucrInputContinous.Size = New System.Drawing.Size(61, 21) + Me.ucrInputContinous.TabIndex = 3 + ' + 'ucrChkDiagonal + ' + Me.ucrChkDiagonal.AutoSize = True + Me.ucrChkDiagonal.Checked = False + Me.ucrChkDiagonal.Location = New System.Drawing.Point(164, 17) + Me.ucrChkDiagonal.Name = "ucrChkDiagonal" + Me.ucrChkDiagonal.Size = New System.Drawing.Size(100, 23) + Me.ucrChkDiagonal.TabIndex = 2 + ' + 'ucrChkLower + ' + Me.ucrChkLower.AutoSize = True + Me.ucrChkLower.Checked = False + Me.ucrChkLower.Location = New System.Drawing.Point(6, 17) + Me.ucrChkLower.Name = "ucrChkLower" + Me.ucrChkLower.Size = New System.Drawing.Size(100, 23) + Me.ucrChkLower.TabIndex = 1 + ' + 'ucrChkUpper + ' + Me.ucrChkUpper.AutoSize = True + Me.ucrChkUpper.Checked = False + Me.ucrChkUpper.Location = New System.Drawing.Point(316, 17) + Me.ucrChkUpper.Name = "ucrChkUpper" + Me.ucrChkUpper.Size = New System.Drawing.Size(100, 23) + Me.ucrChkUpper.TabIndex = 0 + ' + 'ucrReceiverColour + ' + Me.ucrReceiverColour.AutoSize = True + Me.ucrReceiverColour.frmParent = Me + Me.ucrReceiverColour.Location = New System.Drawing.Point(287, 216) + Me.ucrReceiverColour.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverColour.Name = "ucrReceiverColour" + Me.ucrReceiverColour.Selector = Nothing + Me.ucrReceiverColour.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverColour.strNcFilePath = "" + Me.ucrReceiverColour.TabIndex = 21 + Me.ucrReceiverColour.ucrSelector = Nothing + ' 'ucrPnlByPairs ' Me.ucrPnlByPairs.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlByPairs.Location = New System.Drawing.Point(73, 5) Me.ucrPnlByPairs.Name = "ucrPnlByPairs" - Me.ucrPnlByPairs.Size = New System.Drawing.Size(270, 31) + Me.ucrPnlByPairs.Size = New System.Drawing.Size(276, 31) Me.ucrPnlByPairs.TabIndex = 17 ' + 'ucrInputCategoricalByCategorical + ' + Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByCategorical.IsReadOnly = False + Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" + Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByCategorical.TabIndex = 17 + ' + 'ucrInputCategoricalByNumeric + ' + Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByNumeric.IsReadOnly = False + Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" + Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByNumeric.TabIndex = 16 + ' + 'ucrInputNumericByCategorical + ' + Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputNumericByCategorical.IsReadOnly = False + Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" + Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByCategorical.TabIndex = 15 + ' + 'ucrInputNumericByNumeric + ' + Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputNumericByNumeric.IsReadOnly = False + Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" + Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByNumeric.TabIndex = 14 + ' 'ucrSaveGraph ' Me.ucrSaveGraph.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveGraph.Location = New System.Drawing.Point(10, 351) + Me.ucrSaveGraph.Location = New System.Drawing.Point(10, 405) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(339, 24) @@ -369,7 +435,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrReceiverSecondVar.AutoSize = True Me.ucrReceiverSecondVar.frmParent = Me - Me.ucrReceiverSecondVar.Location = New System.Drawing.Point(270, 216) + Me.ucrReceiverSecondVar.Location = New System.Drawing.Point(287, 216) Me.ucrReceiverSecondVar.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondVar.Name = "ucrReceiverSecondVar" Me.ucrReceiverSecondVar.Selector = Nothing @@ -394,7 +460,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 380) + Me.ucrBase.Location = New System.Drawing.Point(10, 431) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(405, 52) Me.ucrBase.TabIndex = 8 @@ -403,7 +469,7 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrReceiverFirstVars.AutoSize = True Me.ucrReceiverFirstVars.frmParent = Me - Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(268, 50) + Me.ucrReceiverFirstVars.Location = New System.Drawing.Point(290, 50) Me.ucrReceiverFirstVars.Name = "ucrReceiverFirstVars" Me.ucrReceiverFirstVars.Selector = Nothing Me.ucrReceiverFirstVars.Size = New System.Drawing.Size(120, 138) @@ -412,16 +478,73 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrReceiverFirstVars.ucrSelector = Nothing Me.ucrReceiverFirstVars.ucrVariableSelector = Nothing ' + 'ucrNudTransparency + ' + Me.ucrNudTransparency.AutoSize = True + Me.ucrNudTransparency.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTransparency.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudTransparency.Location = New System.Drawing.Point(112, 87) + Me.ucrNudTransparency.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudTransparency.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTransparency.Name = "ucrNudTransparency" + Me.ucrNudTransparency.Size = New System.Drawing.Size(50, 20) + Me.ucrNudTransparency.TabIndex = 11 + Me.ucrNudTransparency.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudJitter + ' + Me.ucrNudJitter.AutoSize = True + Me.ucrNudJitter.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudJitter.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudJitter.Location = New System.Drawing.Point(112, 62) + Me.ucrNudJitter.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudJitter.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudJitter.Name = "ucrNudJitter" + Me.ucrNudJitter.Size = New System.Drawing.Size(50, 20) + Me.ucrNudJitter.TabIndex = 10 + Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkFlipCoordinates + ' + Me.ucrChkFlipCoordinates.AutoSize = True + Me.ucrChkFlipCoordinates.Checked = False + Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) + Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" + Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFlipCoordinates.TabIndex = 6 + ' + 'ucrChkFreeScaleYAxis + ' + Me.ucrChkFreeScaleYAxis.AutoSize = True + Me.ucrChkFreeScaleYAxis.Checked = False + Me.ucrChkFreeScaleYAxis.Location = New System.Drawing.Point(6, 41) + Me.ucrChkFreeScaleYAxis.Name = "ucrChkFreeScaleYAxis" + Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFreeScaleYAxis.TabIndex = 7 + ' + 'ucrInputPosition + ' + Me.ucrInputPosition.AddQuotesIfUnrecognised = True + Me.ucrInputPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputPosition.GetSetSelectedIndex = -1 + Me.ucrInputPosition.IsReadOnly = False + Me.ucrInputPosition.Location = New System.Drawing.Point(54, 63) + Me.ucrInputPosition.Name = "ucrInputPosition" + Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) + Me.ucrInputPosition.TabIndex = 13 + ' 'dlgDescribeTwoVarGraph ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(425, 453) + Me.ClientSize = New System.Drawing.Size(438, 491) + Me.Controls.Add(Me.grpTypeOfDispaly) + Me.Controls.Add(Me.lblColour) + Me.Controls.Add(Me.ucrReceiverColour) Me.Controls.Add(Me.rdoPairs) Me.Controls.Add(Me.rdoBy) Me.Controls.Add(Me.ucrPnlByPairs) - Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.grpSummaries) Me.Controls.Add(Me.ucrSaveGraph) Me.Controls.Add(Me.lblFirstVariables) @@ -431,6 +554,7 @@ Partial Class dlgDescribeTwoVarGraph Me.Controls.Add(Me.ucrSelectorTwoVarGraph) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrReceiverFirstVars) + Me.Controls.Add(Me.grpOptions) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -441,6 +565,8 @@ Partial Class dlgDescribeTwoVarGraph Me.grpSummaries.PerformLayout() Me.grpOptions.ResumeLayout(False) Me.grpOptions.PerformLayout() + Me.grpTypeOfDispaly.ResumeLayout(False) + Me.grpTypeOfDispaly.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -476,4 +602,14 @@ Partial Class dlgDescribeTwoVarGraph Friend WithEvents ucrPnlByPairs As UcrPanel Friend WithEvents rdoPairs As RadioButton Friend WithEvents rdoBy As RadioButton + Friend WithEvents lblColour As Label + Friend WithEvents ucrReceiverColour As ucrReceiverSingle + Friend WithEvents grpTypeOfDispaly As GroupBox + Friend WithEvents ucrChkDiagonal As ucrCheck + Friend WithEvents ucrChkLower As ucrCheck + Friend WithEvents ucrChkUpper As ucrCheck + Friend WithEvents ucrInputContinous As ucrInputComboBox + Friend WithEvents UcrInputComboBox3 As ucrInputComboBox + Friend WithEvents UcrInputComboBox2 As ucrInputComboBox + Friend WithEvents UcrInputComboBox1 As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index c33d91c629b..b181f5ce33c 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -17,25 +17,15 @@ Imports instat.Translations Public Class dlgDescribeTwoVarGraph - Public strFirstVariablesType, strSecondVariableType As String - - Private clsBaseOperator As New ROperator - Private clsRGGplotFunction, clsRFacet As New RFunction - Private clsThemeFunction As New RFunction - Private dctThemeFunctions As Dictionary(Of String, RFunction) - Private clsGlobalAes As RFunction - Private clsLabsFunction As New RFunction - Private clsXlabsFunction As New RFunction - Private clsYlabFunction As New RFunction - Private clsXScaleContinuousFunction As New RFunction - Private clsYScaleContinuousFunction As New RFunction - Private clsCoordPolarFunction As New RFunction - Private clsCoordPolarStartOperator As New ROperator - Private clsXScaleDateFunction As New RFunction - Private clsYScaleDateFunction As New RFunction - Private clsScaleFillViridisFunction As New RFunction - Private clsScaleColourViridisFunction As New RFunction - + Private clsBaseOperator, clsCoordPolarStartOperator As New ROperator + Private clsRGGplotFunction, clsRFacet, clsThemeFunction, clsGlobalAes, clsLabsFunction, clsXlabsFunction, + clsYlabFunction, clsXScaleContinuousFunction, clsYScaleContinuousFunction, clsCoordPolarFunction, + clsXScaleDateFunction, clsYScaleDateFunction, clsScaleFillViridisFunction, clsScaleColourViridisFunction As New RFunction + 'Geoms + Private clsGeomJitter, clsGeomViolin, clsGeomBar, clsGeomMosaic, clsGeomBoxplot, + clsGeomPoint, clsGeomLine, clsStatSummaryHline, clsStatSummaryCrossbar, + clsGeomFreqPoly, clsGeomHistogram, clsGeomDensity, clsAnnotateFunction, clsGGpairsFunction, + clsDummyFunction, clsGGpairAesFunction As New RFunction ' Use this aes for numeric by numeric graphs e.g. scatter and line plots Private clsAesNumericByNumeric As RFunction ' Use this aes for categorical by categorical bar graphs @@ -54,24 +44,10 @@ Public Class dlgDescribeTwoVarGraph Private clsAesStatSummaryHlineNumericByCategorical As RFunction ' Use this aes for categorical by numeric when the x axis is the numeric variable(s) e.g. boxplot, violin, point Private clsAesCategoricalByNumericXNumeric As RFunction - - 'Geoms - Private clsGeomJitter As New RFunction - Private clsGeomViolin As New RFunction - Private clsGeomBar As New RFunction - Private clsGeomMosaic As New RFunction - Private clsGeomBoxplot As New RFunction - Private clsGeomPoint As New RFunction - Private clsGeomLine As New RFunction - Private clsStatSummaryHline As New RFunction - Private clsStatSummaryCrossbar As New RFunction - Private clsGeomFreqPoly As New RFunction - Private clsGeomHistogram As New RFunction - Private clsGeomDensity As New RFunction - Private clsAnnotateFunction As New RFunction - Private clsGGpairsFunction As New RFunction - Private clsDummyFunction As New RFunction Private strGeomParameterNames() As String = {"geom_jitter", "geom_violin", "geom_bar", "geom_mosaic", "geom_boxplot", "geom_point", "geom_line", "stat_summary_hline", "stat_summary_crossline", "geom_freqpoly", "geom_histogram", "geom_density"} + + Public strFirstVariablesType, strSecondVariableType As String + Private dctThemeFunctions As Dictionary(Of String, RFunction) Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private bRCodeSet As Boolean = True @@ -108,13 +84,29 @@ Public Class dlgDescribeTwoVarGraph ucrPnlByPairs.AddToLinkedControls({ucrReceiverSecondVar, ucrInputCategoricalByCategorical, ucrChkFlipCoordinates}, {rdoBy}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlByPairs.AddToLinkedControls({ucrChkLower, ucrReceiverColour}, {rdoPairs}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkLower.SetText("Lower") + ucrChkLower.SetLinkedDisplayControl(grpTypeOfDispaly) + + ucrChkDiagonal.SetText("Diagnol") + + ucrChkUpper.SetText("Upper") ucrSelectorTwoVarGraph.SetParameter(New RParameter("data", 0)) ucrSelectorTwoVarGraph.SetParameterIsrfunction() ucrReceiverFirstVars.Selector = ucrSelectorTwoVarGraph ucrReceiverFirstVars.SetMultipleOnlyStatus(True) - ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(False) + + ucrReceiverColour.SetParameter(New RParameter("colour", iNewPosition:=0)) + ucrReceiverColour.SetParameterIsString() + ucrReceiverColour.SetDataType("factor") + ucrReceiverColour.strSelectorHeading = "Factors" + ucrReceiverColour.Selector = ucrSelectorTwoVarGraph + ucrReceiverColour.SetLinkedDisplayControl(lblColour) + ucrReceiverColour.bWithQuotes = False ucrReceiverSecondVar.SetParameter(New RParameter("fill", 0)) ucrReceiverSecondVar.Selector = ucrSelectorTwoVarGraph @@ -230,6 +222,7 @@ Public Class dlgDescribeTwoVarGraph clsAesCategoricalByNumericXNumeric = New RFunction clsAesStatSummaryHlineCategoricalByNumeric = New RFunction clsAesStatSummaryHlineNumericByCategorical = New RFunction + clsGGpairAesFunction = New RFunction clsBaseOperator = New ROperator @@ -239,9 +232,13 @@ Public Class dlgDescribeTwoVarGraph ucrSaveGraph.Reset() ucrSelectorTwoVarGraph.Reset() + cmdOptions.Enabled = False ucrReceiverFirstVars.SetMeAsReceiver() - clsDummyFunction.AddParameter("checked", "by", iPosition:=0) + clsDummyFunction.AddParameter("checked", "pair", iPosition:=0) + + clsGGpairAesFunction.SetPackageName("ggplot2") + clsGGpairAesFunction.SetRCommand("aes") clsGGpairsFunction.SetPackageName("GGally") clsGGpairsFunction.SetRCommand("ggpairs") @@ -357,14 +354,13 @@ Public Class dlgDescribeTwoVarGraph clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRGGplotFunction, iPosition:=0) clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTwoVarGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + ucrBase.clsRsyntax.SetBaseRFunction(clsGGpairsFunction) AddDataFrame() ' bResetSubdialog = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) bRCodeSet = False - ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesNumericByCategoricalYNumeric, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesNumericByCategoricalXNumeric, New RParameter("colour", 2), iAdditionalPairNo:=2) ucrReceiverSecondVar.AddAdditionalCodeParameterPair(clsAesCategoricalByNumericYNumeric, New RParameter("y", 1), iAdditionalPairNo:=3) @@ -383,7 +379,7 @@ Public Class dlgDescribeTwoVarGraph ucrNudJitter.SetRCode(clsGeomJitter, bReset) ucrNudTransparency.SetRCode(clsGeomJitter, bReset) ucrPnlByPairs.SetRCode(clsDummyFunction, bReset) - + ucrReceiverColour.SetRCode(clsGGpairAesFunction, bReset) bRCodeSet = True Results() SetFreeYAxis() @@ -788,6 +784,14 @@ Public Class dlgDescribeTwoVarGraph End Sub Private Sub ucrPnlByPairs_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlByPairs.ControlValueChanged + ucrReceiverFirstVars.ucrMultipleVariables.Clear() + If rdoBy.Checked Then + cmdOptions.Enabled = True + ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) + Else + cmdOptions.Enabled = False + ucrReceiverFirstVars.ucrMultipleVariables.SetSingleTypeStatus(False) + End If If bRCodeSet Then If rdoBy.Checked Then ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) @@ -812,4 +816,12 @@ Public Class dlgDescribeTwoVarGraph clsGetDataFrameFunction.RemoveParameterByName("stack_data") clsGGpairsFunction.AddParameter("data", clsRFunctionParameter:=clsGetDataFrameFunction, iPosition:=0) End Sub + + Private Sub ucrReceiverColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverColour.ControlValueChanged + If Not ucrReceiverColour.IsEmpty And rdoPairs.Checked Then + clsGGpairsFunction.AddParameter("colour", clsRFunctionParameter:=clsGGpairAesFunction, bIncludeArgumentName:=False, iPosition:=2) + Else + clsGGpairsFunction.RemoveParameterByName("colour") + End If + End Sub End Class \ No newline at end of file From 9882cd055721fe546fc3689f81d7e95c91c2336d Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Tue, 22 Feb 2022 10:14:47 +0300 Subject: [PATCH 44/68] Moving column structure to option by context menu --- instat/frmMain.Designer.vb | 54 ++++++++++++++++++++++---------------- instat/frmMain.vb | 16 +++++------ 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 36128a7ced1..c7549aa30d2 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -450,7 +450,6 @@ Partial Class frmMain Me.mnuPrepareDataFrameProtectColumn = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPrepareDataFrameHideColumns = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPrepareDataFrameFreezeColumns = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuPrepareDataFrameColumnStructure = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPrepareDataframeColourByProperty = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPrepareCheckData = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPrepareCheckDataVisualiseData = New System.Windows.Forms.ToolStripMenuItem() @@ -635,7 +634,6 @@ Partial Class frmMain Me.mnuOptionsByContextCheckDataOneVariableSummarise = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextCheckDataOneVariableGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextCheckDataOneVariableFrequencies = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOptionsByContextDefineOptionsByContexts = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextPrepare = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator48 = New System.Windows.Forms.ToolStripSeparator() @@ -677,6 +675,9 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefineOptionsByContextData = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuDefineOptionsByContextDataDefineOptionsByContext = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3406,7 +3407,7 @@ Partial Class frmMain ' 'mnuPrepareDataFrame ' - Me.mnuPrepareDataFrame.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuPrepareDataFrameViewData, Me.mnuPrepareDataFrameRenameColumn, Me.mnuPrepareDataFrameDuplicateColumn, Me.mnuPrepareDataFrameRowNumbersNames, Me.ToolStripSeparator1, Me.mnuPrepareDataFrameSort, Me.mnuPrepareDataFrameFilter, Me.mnuPrepareDataFrameSelectColumns, Me.mnuPrepareDataFrameReplaceValues, Me.mnuPrepareDataFrameConvertColumns, Me.ToolStripSeparator2, Me.mnuPrepareDataFrameReorderColumns, Me.mnuPrepareDataFrameInsertColumnsRows, Me.mnuPrepareDataFrameDeleteColumnsRows, Me.mnuPrepareDataFrameProtectColumn, Me.mnuPrepareDataFrameHideColumns, Me.mnuPrepareDataFrameFreezeColumns, Me.mnuPrepareDataFrameColumnStructure, Me.mnuPrepareDataframeColourByProperty}) + Me.mnuPrepareDataFrame.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuPrepareDataFrameViewData, Me.mnuPrepareDataFrameRenameColumn, Me.mnuPrepareDataFrameDuplicateColumn, Me.mnuPrepareDataFrameRowNumbersNames, Me.ToolStripSeparator1, Me.mnuPrepareDataFrameSort, Me.mnuPrepareDataFrameFilter, Me.mnuPrepareDataFrameSelectColumns, Me.mnuPrepareDataFrameReplaceValues, Me.mnuPrepareDataFrameConvertColumns, Me.ToolStripSeparator2, Me.mnuPrepareDataFrameReorderColumns, Me.mnuPrepareDataFrameInsertColumnsRows, Me.mnuPrepareDataFrameDeleteColumnsRows, Me.mnuPrepareDataFrameProtectColumn, Me.mnuPrepareDataFrameHideColumns, Me.mnuPrepareDataFrameFreezeColumns, Me.mnuPrepareDataframeColourByProperty}) Me.mnuPrepareDataFrame.Name = "mnuPrepareDataFrame" Me.mnuPrepareDataFrame.Size = New System.Drawing.Size(186, 22) Me.mnuPrepareDataFrame.Tag = "Data_Frame" @@ -3529,13 +3530,6 @@ Partial Class frmMain Me.mnuPrepareDataFrameFreezeColumns.Text = "Freeze Columns..." Me.mnuPrepareDataFrameFreezeColumns.Visible = False ' - 'mnuPrepareDataFrameColumnStructure - ' - Me.mnuPrepareDataFrameColumnStructure.Name = "mnuPrepareDataFrameColumnStructure" - Me.mnuPrepareDataFrameColumnStructure.Size = New System.Drawing.Size(200, 22) - Me.mnuPrepareDataFrameColumnStructure.Tag = "Column_Structure..." - Me.mnuPrepareDataFrameColumnStructure.Text = "Column Structure..." - ' 'mnuPrepareDataframeColourByProperty ' Me.mnuPrepareDataframeColourByProperty.Name = "mnuPrepareDataframeColourByProperty" @@ -4661,7 +4655,7 @@ Partial Class frmMain ' 'mnuOptionsByContext ' - Me.mnuOptionsByContext.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckData, Me.mnuOptionsByContextDefineOptionsByContexts, Me.mnuOptionsByContextPrepare, Me.mnuOptionsByContextDescribe, Me.mnuOptionsByContextModel}) + Me.mnuOptionsByContext.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckData, Me.mnuOptionsByContextDefineOptionsByContextData, Me.mnuOptionsByContextPrepare, Me.mnuOptionsByContextDescribe, Me.mnuOptionsByContextModel}) Me.mnuOptionsByContext.Name = "mnuOptionsByContext" Me.mnuOptionsByContext.Size = New System.Drawing.Size(122, 20) Me.mnuOptionsByContext.Text = "Options by Context" @@ -4670,7 +4664,7 @@ Partial Class frmMain ' Me.mnuOptionsByContextCheckData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckDataDuplicates, Me.mnuOptionsByContextCheckDataCompareColumns, Me.ToolStripSeparator47, Me.mnuOptionsByContextCheckDataOneVariableSummarise, Me.mnuOptionsByContextCheckDataOneVariableGraph, Me.mnuOptionsByContextCheckDataOneVariableFrequencies}) Me.mnuOptionsByContextCheckData.Name = "mnuOptionsByContextCheckData" - Me.mnuOptionsByContextCheckData.Size = New System.Drawing.Size(250, 22) + Me.mnuOptionsByContextCheckData.Size = New System.Drawing.Size(241, 22) Me.mnuOptionsByContextCheckData.Text = "Check Data" ' 'mnuOptionsByContextCheckDataDuplicates @@ -4708,17 +4702,11 @@ Partial Class frmMain Me.mnuOptionsByContextCheckDataOneVariableFrequencies.Size = New System.Drawing.Size(215, 22) Me.mnuOptionsByContextCheckDataOneVariableFrequencies.Text = "One Variable Frequencies..." ' - 'mnuOptionsByContextDefineOptionsByContexts - ' - Me.mnuOptionsByContextDefineOptionsByContexts.Name = "mnuOptionsByContextDefineOptionsByContexts" - Me.mnuOptionsByContextDefineOptionsByContexts.Size = New System.Drawing.Size(250, 22) - Me.mnuOptionsByContextDefineOptionsByContexts.Text = "Define Options by Context Data..." - ' 'mnuOptionsByContextPrepare ' Me.mnuOptionsByContextPrepare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions, Me.ToolStripSeparator48, Me.mnuOptionsByContextMergeAdditionalData, Me.mnuOptionsByContextPrepareStack, Me.mnuOptionsByContextPrepareUnstack}) Me.mnuOptionsByContextPrepare.Name = "mnuOptionsByContextPrepare" - Me.mnuOptionsByContextPrepare.Size = New System.Drawing.Size(250, 22) + Me.mnuOptionsByContextPrepare.Size = New System.Drawing.Size(241, 22) Me.mnuOptionsByContextPrepare.Text = "Prepare" ' 'mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions @@ -4754,7 +4742,7 @@ Partial Class frmMain ' Me.mnuOptionsByContextDescribe.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDescribeCompareTwoTreatments, Me.mnuOptionsByContextDescribeCompareMultipleTreatments, Me.mnuOptionsByContextDescribeBoxplot}) Me.mnuOptionsByContextDescribe.Name = "mnuOptionsByContextDescribe" - Me.mnuOptionsByContextDescribe.Size = New System.Drawing.Size(250, 22) + Me.mnuOptionsByContextDescribe.Size = New System.Drawing.Size(241, 22) Me.mnuOptionsByContextDescribe.Text = "Describe" ' 'mnuOptionsByContextDescribeCompareTwoTreatments @@ -4780,7 +4768,7 @@ Partial Class frmMain ' Me.mnuOptionsByContextModel.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextModelFitModel, Me.mnuOptionsByContextGeneralFitModel}) Me.mnuOptionsByContextModel.Name = "mnuOptionsByContextModel" - Me.mnuOptionsByContextModel.Size = New System.Drawing.Size(250, 22) + Me.mnuOptionsByContextModel.Size = New System.Drawing.Size(241, 22) Me.mnuOptionsByContextModel.Text = "Model" ' 'mnuOptionsByContextModelFitModel @@ -5091,6 +5079,25 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' + 'mnuOptionsByContextDefineOptionsByContextData + ' + Me.mnuOptionsByContextDefineOptionsByContextData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDefineOptionsByContextDataDefineOptionsByContext, Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure}) + Me.mnuOptionsByContextDefineOptionsByContextData.Name = "mnuOptionsByContextDefineOptionsByContextData" + Me.mnuOptionsByContextDefineOptionsByContextData.Size = New System.Drawing.Size(241, 22) + Me.mnuOptionsByContextDefineOptionsByContextData.Text = "Define Options By Context Data" + ' + 'mnuDefineOptionsByContextDataDefineOptionsByContext + ' + Me.mnuDefineOptionsByContextDataDefineOptionsByContext.Name = "mnuDefineOptionsByContextDataDefineOptionsByContext" + Me.mnuDefineOptionsByContextDataDefineOptionsByContext.Size = New System.Drawing.Size(220, 22) + Me.mnuDefineOptionsByContextDataDefineOptionsByContext.Text = "Define Options By Context.." + ' + 'mnuOptionsByContextDefineOptionsByContextDataColumnStructure + ' + Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Name = "mnuOptionsByContextDefineOptionsByContextDataColumnStructure" + Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Size = New System.Drawing.Size(220, 22) + Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Text = "Column Structure..." + ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -5262,7 +5269,6 @@ Partial Class frmMain Friend WithEvents ToolStripSeparator1 As ToolStripSeparator Friend WithEvents mnuPrepareDataFrameReplaceValues As ToolStripMenuItem Friend WithEvents ToolStripSeparator2 As ToolStripSeparator - Friend WithEvents mnuPrepareDataFrameColumnStructure As ToolStripMenuItem Friend WithEvents mnuPrepareDataFrameReorderColumns As ToolStripMenuItem Friend WithEvents mnuPrepareDataFrameInsertColumnsRows As ToolStripMenuItem Friend WithEvents mnuPrepareDataFrameDeleteColumnsRows As ToolStripMenuItem @@ -5575,7 +5581,6 @@ Partial Class frmMain Friend WithEvents mnuClimaticPrepareEvapotranspiration As ToolStripMenuItem Friend WithEvents mnuPrepareCheckDataCompareColumns As ToolStripMenuItem Friend WithEvents mnuOptionsByContext As ToolStripMenuItem - Friend WithEvents mnuOptionsByContextDefineOptionsByContexts As ToolStripMenuItem Friend WithEvents mnuOptionsByContextPrepare As ToolStripMenuItem Friend WithEvents mnuOptionsByContextMergeAdditionalData As ToolStripMenuItem Friend WithEvents mnuOptionsByContextCheckData As ToolStripMenuItem @@ -5783,4 +5788,7 @@ Partial Class frmMain Friend WithEvents ToolStripSeparator72 As ToolStripSeparator Friend WithEvents mnuModelFitModelMachineLearning As ToolStripMenuItem Friend WithEvents mnuDescribeMultivariateClusterAnalysis As ToolStripMenuItem + Friend WithEvents mnuOptionsByContextDefineOptionsByContextData As ToolStripMenuItem + Friend WithEvents mnuDefineOptionsByContextDataDefineOptionsByContext As ToolStripMenuItem + Friend WithEvents mnuOptionsByContextDefineOptionsByContextDataColumnStructure As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 40826f9a8c2..19ed887da48 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1030,10 +1030,6 @@ Public Class frmMain End Using End Sub - Private Sub mnuOrganiseDataFrameColumnStructure_Click(sender As Object, e As EventArgs) Handles mnuPrepareDataFrameColumnStructure.Click - dlgColumnStructure.ShowDialog() - End Sub - Private Sub mnuDescribeTwoVariablesGraph_Click(sender As Object, e As EventArgs) Handles mnuDescribeTwoVariablesGraph.Click dlgDescribeTwoVarGraph.ShowDialog() End Sub @@ -1838,10 +1834,6 @@ Public Class frmMain dlgCompareColumns.ShowDialog() End Sub - Private Sub mnuDefineOptionsByContexts_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOptionsByContexts.Click - dlgDefineOptionsByContext.ShowDialog() - End Sub - Private Sub MergeAdditionalDataToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextMergeAdditionalData.Click dlgMergeAdditionalData.ShowDialog() End Sub @@ -2431,4 +2423,12 @@ Public Class frmMain Private Sub mnuDescribeMultivariateClusterAnalysis_Click(sender As Object, e As EventArgs) Handles mnuDescribeMultivariateClusterAnalysis.Click dlgClusterAnalysis.ShowDialog() End Sub + + Private Sub mnuDefineOptionsByContextDataDefineOptionsByContext_Click(sender As Object, e As EventArgs) Handles mnuDefineOptionsByContextDataDefineOptionsByContext.Click + dlgDefineOptionsByContext.ShowDialog() + End Sub + + Private Sub mnuOptionsByContextDefineOptionsByContextDataColumnStructure_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Click + dlgColumnStructure.ShowDialog() + End Sub End Class From 691bfba50a96bf5e85aa13ba6276225e10c0ed59 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom Date: Tue, 22 Feb 2022 02:04:27 -0800 Subject: [PATCH 45/68] Implementing Delete function for Linux users --- .../DataGrid/Linux/ucrDataViewLinuxGrid.vb | 9 +++------ .../UserControls/DataGrid/Linux/ucrLinuxGrid.vb | 16 ++++++++++++---- instat/ucrDataView.vb | 4 ++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb index 8fc525ef4d2..55e7990183e 100644 --- a/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb @@ -114,6 +114,9 @@ Public Class ucrDataViewLinuxGrid If ctrlV Or shiftIns Then RaiseEvent PasteValuesToDataframe() End If + If e.KeyCode = Keys.Delete OrElse e.KeyCode = Keys.Back Then + RaiseEvent DeleteValueToDataframe() + End If End Sub Private Function GetCurrentDataFrameFocus() As clsDataFrame @@ -143,10 +146,4 @@ Public Class ucrDataViewLinuxGrid Private Sub tcTabs_SelectedIndexChanged(sender As Object, e As EventArgs) Handles tcTabs.SelectedIndexChanged RaiseEvent WorksheetChanged() End Sub - Private Sub DataGridView_BeforeCellKeyDown(sender As Object, e As KeyEventArgs) - If e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Delete OrElse e.KeyCode = unvell.ReoGrid.Interaction.KeyCode.Back Then - RaiseEvent DeleteValueToDataframe() - End If - End Sub - End Class \ No newline at end of file diff --git a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb index 8a43b8edce6..c25addeedfa 100644 --- a/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrLinuxGrid.vb @@ -112,9 +112,13 @@ Public MustInherit Class ucrLinuxGrid Public Function GetSelectedRows() As List(Of String) Implements IGrid.GetSelectedRows Dim lstSelectedRows As New List(Of String) Dim dataGrid = GetGrid(tcTabs.SelectedTab) - For Each row As DataGridViewRow In dataGrid.SelectedRows - lstSelectedRows.Add(row.HeaderCell.Value) + 'For Each row As DataGridViewRow In dataGrid.SelectedRows + ' lstSelectedRows.Add(row.HeaderCell.Value) + 'Next + For i As Integer = 0 To dataGrid.GetCellCount(DataGridViewElementStates.Selected) - 1 + lstSelectedRows.Add(dataGrid.SelectedCells(i).RowIndex.ToString + 1) Next + lstSelectedRows = lstSelectedRows.Distinct.ToList Return lstSelectedRows End Function @@ -122,9 +126,13 @@ Public MustInherit Class ucrLinuxGrid Public Function GetSelectedColumnIndexes() As List(Of String) Implements IGrid.GetSelectedColumnIndexes Dim lstSelectedColumnIndexes As New List(Of String) Dim dataGrid = GetGrid(tcTabs.SelectedTab) - For Each column As DataGridViewColumn In dataGrid.SelectedColumns - lstSelectedColumnIndexes.Add(Column.HeaderCell.Value) + 'For Each column As DataGridViewColumn In dataGrid.SelectedColumns + ' lstSelectedColumnIndexes.Add(column.HeaderCell.Value) + 'Next + For i As Integer = 0 To dataGrid.GetCellCount(DataGridViewElementStates.Selected) - 1 + lstSelectedColumnIndexes.Add(dataGrid.SelectedCells(i).ColumnIndex.ToString + 1) Next + lstSelectedColumnIndexes = lstSelectedColumnIndexes.Distinct.ToList Return lstSelectedColumnIndexes End Function diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 7bb4b26adfc..aaca2052994 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -838,8 +838,8 @@ Public Class ucrDataView StartWait() GetCurrentDataFrameFocus().clsPrepareFunctions.RemoveCurrentColumnSelection() EndWait() - End Sub - + End Sub + Private Sub ucrDataView_Resize(sender As Object, e As EventArgs) Handles TblPanPageDisplay.Resize ResizeLabels() End Sub From f67d5ecea55e6d5a8a61f0e34dce8b7ccb1145ab Mon Sep 17 00:00:00 2001 From: ivanluv Date: Tue, 22 Feb 2022 14:57:52 +0300 Subject: [PATCH 46/68] Adding the Type of Display functionality --- instat/dlgDescribeTwoVarGraph.Designer.vb | 571 +++++++++++++++------- instat/dlgDescribeTwoVarGraph.vb | 120 ++++- 2 files changed, 524 insertions(+), 167 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.Designer.vb b/instat/dlgDescribeTwoVarGraph.Designer.vb index 2acf314ffbd..8a997b99a1e 100644 --- a/instat/dlgDescribeTwoVarGraph.Designer.vb +++ b/instat/dlgDescribeTwoVarGraph.Designer.vb @@ -42,6 +42,10 @@ Partial Class dlgDescribeTwoVarGraph Me.lblSecondVariable = New System.Windows.Forms.Label() Me.lblFirstVariables = New System.Windows.Forms.Label() Me.grpSummaries = New System.Windows.Forms.GroupBox() + Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() + Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() + Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() + Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.lblFirstType = New System.Windows.Forms.Label() Me.lblGraphName = New System.Windows.Forms.Label() Me.lblGraph = New System.Windows.Forms.Label() @@ -49,35 +53,49 @@ Partial Class dlgDescribeTwoVarGraph Me.lblSecondType = New System.Windows.Forms.Label() Me.grpOptions = New System.Windows.Forms.GroupBox() Me.lblPosition = New System.Windows.Forms.Label() + Me.ucrNudTransparency = New instat.ucrNud() + Me.ucrNudJitter = New instat.ucrNud() Me.lblPointTransparency = New System.Windows.Forms.Label() Me.lblPointJitter = New System.Windows.Forms.Label() + Me.ucrChkFlipCoordinates = New instat.ucrCheck() + Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() + Me.ucrInputPosition = New instat.ucrInputComboBox() Me.rdoPairs = New System.Windows.Forms.RadioButton() Me.rdoBy = New System.Windows.Forms.RadioButton() Me.lblColour = New System.Windows.Forms.Label() Me.grpTypeOfDispaly = New System.Windows.Forms.GroupBox() - Me.UcrInputComboBox1 = New instat.ucrInputComboBox() - Me.UcrInputComboBox3 = New instat.ucrInputComboBox() - Me.UcrInputComboBox2 = New instat.ucrInputComboBox() - Me.ucrInputContinous = New instat.ucrInputComboBox() + Me.ucrInputLowerNA = New instat.ucrInputComboBox() + Me.ucrInputLowerDiscrete = New instat.ucrInputComboBox() + Me.ucrInputLowerCombo = New instat.ucrInputComboBox() + Me.ucrInputLowerContinous = New instat.ucrInputComboBox() Me.ucrChkDiagonal = New instat.ucrCheck() Me.ucrChkLower = New instat.ucrCheck() Me.ucrChkUpper = New instat.ucrCheck() Me.ucrReceiverColour = New instat.ucrReceiverSingle() Me.ucrPnlByPairs = New instat.UcrPanel() - Me.ucrInputCategoricalByCategorical = New instat.ucrInputComboBox() - Me.ucrInputCategoricalByNumeric = New instat.ucrInputComboBox() - Me.ucrInputNumericByCategorical = New instat.ucrInputComboBox() - Me.ucrInputNumericByNumeric = New instat.ucrInputComboBox() Me.ucrSaveGraph = New instat.ucrSave() Me.ucrReceiverSecondVar = New instat.ucrReceiverSingle() Me.ucrSelectorTwoVarGraph = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverFirstVars = New instat.ucrVariablesAsFactor() - Me.ucrNudTransparency = New instat.ucrNud() - Me.ucrNudJitter = New instat.ucrNud() - Me.ucrChkFlipCoordinates = New instat.ucrCheck() - Me.ucrChkFreeScaleYAxis = New instat.ucrCheck() - Me.ucrInputPosition = New instat.ucrInputComboBox() + Me.lblLowerContinous = New System.Windows.Forms.Label() + Me.lblLowerCombo = New System.Windows.Forms.Label() + Me.lblLowerDiscrete = New System.Windows.Forms.Label() + Me.lblLowerNA = New System.Windows.Forms.Label() + Me.lblUpperNA = New System.Windows.Forms.Label() + Me.lblUpperDiscrete = New System.Windows.Forms.Label() + Me.lblUpperCombo = New System.Windows.Forms.Label() + Me.lblUpperContinous = New System.Windows.Forms.Label() + Me.ucrInputUpperNA = New instat.ucrInputComboBox() + Me.ucrInputUpperDiscrete = New instat.ucrInputComboBox() + Me.ucrInputUpperCombo = New instat.ucrInputComboBox() + Me.ucrInputUpperContinous = New instat.ucrInputComboBox() + Me.lblDiagonalContinuous = New System.Windows.Forms.Label() + Me.ucrInputDiagonalContinous = New instat.ucrInputComboBox() + Me.lblDiagonalDiscrete = New System.Windows.Forms.Label() + Me.ucrInputDiagonalDiscrete = New instat.ucrInputComboBox() + Me.lblDiagonalNA = New System.Windows.Forms.Label() + Me.ucrInputDiagonalNA = New instat.ucrInputComboBox() Me.grpSummaries.SuspendLayout() Me.grpOptions.SuspendLayout() Me.grpTypeOfDispaly.SuspendLayout() @@ -132,6 +150,50 @@ Partial Class dlgDescribeTwoVarGraph Me.grpSummaries.TabIndex = 15 Me.grpSummaries.TabStop = False ' + 'ucrInputCategoricalByCategorical + ' + Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByCategorical.IsReadOnly = False + Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" + Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByCategorical.TabIndex = 17 + ' + 'ucrInputCategoricalByNumeric + ' + Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputCategoricalByNumeric.IsReadOnly = False + Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" + Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputCategoricalByNumeric.TabIndex = 16 + ' + 'ucrInputNumericByCategorical + ' + Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 + Me.ucrInputNumericByCategorical.IsReadOnly = False + Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" + Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByCategorical.TabIndex = 15 + ' + 'ucrInputNumericByNumeric + ' + Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True + Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 + Me.ucrInputNumericByNumeric.IsReadOnly = False + Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) + Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" + Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) + Me.ucrInputNumericByNumeric.TabIndex = 14 + ' 'lblFirstType ' Me.lblFirstType.ForeColor = System.Drawing.SystemColors.ControlText @@ -207,6 +269,32 @@ Partial Class dlgDescribeTwoVarGraph Me.lblPosition.TabIndex = 12 Me.lblPosition.Text = "Position:" ' + 'ucrNudTransparency + ' + Me.ucrNudTransparency.AutoSize = True + Me.ucrNudTransparency.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTransparency.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudTransparency.Location = New System.Drawing.Point(112, 87) + Me.ucrNudTransparency.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudTransparency.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTransparency.Name = "ucrNudTransparency" + Me.ucrNudTransparency.Size = New System.Drawing.Size(50, 20) + Me.ucrNudTransparency.TabIndex = 11 + Me.ucrNudTransparency.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudJitter + ' + Me.ucrNudJitter.AutoSize = True + Me.ucrNudJitter.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudJitter.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudJitter.Location = New System.Drawing.Point(112, 62) + Me.ucrNudJitter.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudJitter.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudJitter.Name = "ucrNudJitter" + Me.ucrNudJitter.Size = New System.Drawing.Size(50, 20) + Me.ucrNudJitter.TabIndex = 10 + Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblPointTransparency ' Me.lblPointTransparency.AutoSize = True @@ -226,6 +314,35 @@ Partial Class dlgDescribeTwoVarGraph Me.lblPointJitter.TabIndex = 8 Me.lblPointJitter.Text = "Point Jitter:" ' + 'ucrChkFlipCoordinates + ' + Me.ucrChkFlipCoordinates.AutoSize = True + Me.ucrChkFlipCoordinates.Checked = False + Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) + Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" + Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFlipCoordinates.TabIndex = 6 + ' + 'ucrChkFreeScaleYAxis + ' + Me.ucrChkFreeScaleYAxis.AutoSize = True + Me.ucrChkFreeScaleYAxis.Checked = False + Me.ucrChkFreeScaleYAxis.Location = New System.Drawing.Point(6, 41) + Me.ucrChkFreeScaleYAxis.Name = "ucrChkFreeScaleYAxis" + Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) + Me.ucrChkFreeScaleYAxis.TabIndex = 7 + ' + 'ucrInputPosition + ' + Me.ucrInputPosition.AddQuotesIfUnrecognised = True + Me.ucrInputPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputPosition.GetSetSelectedIndex = -1 + Me.ucrInputPosition.IsReadOnly = False + Me.ucrInputPosition.Location = New System.Drawing.Point(54, 63) + Me.ucrInputPosition.Name = "ucrInputPosition" + Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) + Me.ucrInputPosition.TabIndex = 13 + ' 'rdoPairs ' Me.rdoPairs.Appearance = System.Windows.Forms.Appearance.Button @@ -272,10 +389,28 @@ Partial Class dlgDescribeTwoVarGraph ' 'grpTypeOfDispaly ' - Me.grpTypeOfDispaly.Controls.Add(Me.UcrInputComboBox1) - Me.grpTypeOfDispaly.Controls.Add(Me.UcrInputComboBox3) - Me.grpTypeOfDispaly.Controls.Add(Me.UcrInputComboBox2) - Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputContinous) + Me.grpTypeOfDispaly.Controls.Add(Me.lblDiagonalNA) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputDiagonalNA) + Me.grpTypeOfDispaly.Controls.Add(Me.lblDiagonalDiscrete) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputDiagonalDiscrete) + Me.grpTypeOfDispaly.Controls.Add(Me.lblDiagonalContinuous) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputDiagonalContinous) + Me.grpTypeOfDispaly.Controls.Add(Me.lblUpperNA) + Me.grpTypeOfDispaly.Controls.Add(Me.lblUpperDiscrete) + Me.grpTypeOfDispaly.Controls.Add(Me.lblUpperCombo) + Me.grpTypeOfDispaly.Controls.Add(Me.lblUpperContinous) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputUpperNA) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputUpperDiscrete) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputUpperCombo) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputUpperContinous) + Me.grpTypeOfDispaly.Controls.Add(Me.lblLowerNA) + Me.grpTypeOfDispaly.Controls.Add(Me.lblLowerDiscrete) + Me.grpTypeOfDispaly.Controls.Add(Me.lblLowerCombo) + Me.grpTypeOfDispaly.Controls.Add(Me.lblLowerContinous) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputLowerNA) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputLowerDiscrete) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputLowerCombo) + Me.grpTypeOfDispaly.Controls.Add(Me.ucrInputLowerContinous) Me.grpTypeOfDispaly.Controls.Add(Me.ucrChkDiagonal) Me.grpTypeOfDispaly.Controls.Add(Me.ucrChkLower) Me.grpTypeOfDispaly.Controls.Add(Me.ucrChkUpper) @@ -286,55 +421,55 @@ Partial Class dlgDescribeTwoVarGraph Me.grpTypeOfDispaly.TabStop = False Me.grpTypeOfDispaly.Text = "Type Of Dispaly" ' - 'UcrInputComboBox1 - ' - Me.UcrInputComboBox1.AddQuotesIfUnrecognised = True - Me.UcrInputComboBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.UcrInputComboBox1.GetSetSelectedIndex = -1 - Me.UcrInputComboBox1.IsReadOnly = False - Me.UcrInputComboBox1.Location = New System.Drawing.Point(58, 124) - Me.UcrInputComboBox1.Name = "UcrInputComboBox1" - Me.UcrInputComboBox1.Size = New System.Drawing.Size(61, 21) - Me.UcrInputComboBox1.TabIndex = 22 - ' - 'UcrInputComboBox3 - ' - Me.UcrInputComboBox3.AddQuotesIfUnrecognised = True - Me.UcrInputComboBox3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.UcrInputComboBox3.GetSetSelectedIndex = -1 - Me.UcrInputComboBox3.IsReadOnly = False - Me.UcrInputComboBox3.Location = New System.Drawing.Point(58, 100) - Me.UcrInputComboBox3.Name = "UcrInputComboBox3" - Me.UcrInputComboBox3.Size = New System.Drawing.Size(61, 21) - Me.UcrInputComboBox3.TabIndex = 5 - ' - 'UcrInputComboBox2 - ' - Me.UcrInputComboBox2.AddQuotesIfUnrecognised = True - Me.UcrInputComboBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.UcrInputComboBox2.GetSetSelectedIndex = -1 - Me.UcrInputComboBox2.IsReadOnly = False - Me.UcrInputComboBox2.Location = New System.Drawing.Point(58, 73) - Me.UcrInputComboBox2.Name = "UcrInputComboBox2" - Me.UcrInputComboBox2.Size = New System.Drawing.Size(61, 21) - Me.UcrInputComboBox2.TabIndex = 4 - ' - 'ucrInputContinous - ' - Me.ucrInputContinous.AddQuotesIfUnrecognised = True - Me.ucrInputContinous.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputContinous.GetSetSelectedIndex = -1 - Me.ucrInputContinous.IsReadOnly = False - Me.ucrInputContinous.Location = New System.Drawing.Point(58, 46) - Me.ucrInputContinous.Name = "ucrInputContinous" - Me.ucrInputContinous.Size = New System.Drawing.Size(61, 21) - Me.ucrInputContinous.TabIndex = 3 + 'ucrInputLowerNA + ' + Me.ucrInputLowerNA.AddQuotesIfUnrecognised = True + Me.ucrInputLowerNA.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLowerNA.GetSetSelectedIndex = -1 + Me.ucrInputLowerNA.IsReadOnly = False + Me.ucrInputLowerNA.Location = New System.Drawing.Point(68, 127) + Me.ucrInputLowerNA.Name = "ucrInputLowerNA" + Me.ucrInputLowerNA.Size = New System.Drawing.Size(61, 21) + Me.ucrInputLowerNA.TabIndex = 22 + ' + 'ucrInputLowerDiscrete + ' + Me.ucrInputLowerDiscrete.AddQuotesIfUnrecognised = True + Me.ucrInputLowerDiscrete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLowerDiscrete.GetSetSelectedIndex = -1 + Me.ucrInputLowerDiscrete.IsReadOnly = False + Me.ucrInputLowerDiscrete.Location = New System.Drawing.Point(68, 100) + Me.ucrInputLowerDiscrete.Name = "ucrInputLowerDiscrete" + Me.ucrInputLowerDiscrete.Size = New System.Drawing.Size(61, 21) + Me.ucrInputLowerDiscrete.TabIndex = 5 + ' + 'ucrInputLowerCombo + ' + Me.ucrInputLowerCombo.AddQuotesIfUnrecognised = True + Me.ucrInputLowerCombo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLowerCombo.GetSetSelectedIndex = -1 + Me.ucrInputLowerCombo.IsReadOnly = False + Me.ucrInputLowerCombo.Location = New System.Drawing.Point(68, 73) + Me.ucrInputLowerCombo.Name = "ucrInputLowerCombo" + Me.ucrInputLowerCombo.Size = New System.Drawing.Size(61, 21) + Me.ucrInputLowerCombo.TabIndex = 4 + ' + 'ucrInputLowerContinous + ' + Me.ucrInputLowerContinous.AddQuotesIfUnrecognised = True + Me.ucrInputLowerContinous.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLowerContinous.GetSetSelectedIndex = -1 + Me.ucrInputLowerContinous.IsReadOnly = False + Me.ucrInputLowerContinous.Location = New System.Drawing.Point(68, 46) + Me.ucrInputLowerContinous.Name = "ucrInputLowerContinous" + Me.ucrInputLowerContinous.Size = New System.Drawing.Size(61, 21) + Me.ucrInputLowerContinous.TabIndex = 3 ' 'ucrChkDiagonal ' Me.ucrChkDiagonal.AutoSize = True Me.ucrChkDiagonal.Checked = False - Me.ucrChkDiagonal.Location = New System.Drawing.Point(164, 17) + Me.ucrChkDiagonal.Location = New System.Drawing.Point(154, 17) Me.ucrChkDiagonal.Name = "ucrChkDiagonal" Me.ucrChkDiagonal.Size = New System.Drawing.Size(100, 23) Me.ucrChkDiagonal.TabIndex = 2 @@ -352,9 +487,9 @@ Partial Class dlgDescribeTwoVarGraph ' Me.ucrChkUpper.AutoSize = True Me.ucrChkUpper.Checked = False - Me.ucrChkUpper.Location = New System.Drawing.Point(316, 17) + Me.ucrChkUpper.Location = New System.Drawing.Point(296, 17) Me.ucrChkUpper.Name = "ucrChkUpper" - Me.ucrChkUpper.Size = New System.Drawing.Size(100, 23) + Me.ucrChkUpper.Size = New System.Drawing.Size(120, 23) Me.ucrChkUpper.TabIndex = 0 ' 'ucrReceiverColour @@ -378,50 +513,6 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrPnlByPairs.Size = New System.Drawing.Size(276, 31) Me.ucrPnlByPairs.TabIndex = 17 ' - 'ucrInputCategoricalByCategorical - ' - Me.ucrInputCategoricalByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByCategorical.IsReadOnly = False - Me.ucrInputCategoricalByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByCategorical.Name = "ucrInputCategoricalByCategorical" - Me.ucrInputCategoricalByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByCategorical.TabIndex = 17 - ' - 'ucrInputCategoricalByNumeric - ' - Me.ucrInputCategoricalByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputCategoricalByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputCategoricalByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputCategoricalByNumeric.IsReadOnly = False - Me.ucrInputCategoricalByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputCategoricalByNumeric.Name = "ucrInputCategoricalByNumeric" - Me.ucrInputCategoricalByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputCategoricalByNumeric.TabIndex = 16 - ' - 'ucrInputNumericByCategorical - ' - Me.ucrInputNumericByCategorical.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByCategorical.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByCategorical.GetSetSelectedIndex = -1 - Me.ucrInputNumericByCategorical.IsReadOnly = False - Me.ucrInputNumericByCategorical.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByCategorical.Name = "ucrInputNumericByCategorical" - Me.ucrInputNumericByCategorical.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByCategorical.TabIndex = 15 - ' - 'ucrInputNumericByNumeric - ' - Me.ucrInputNumericByNumeric.AddQuotesIfUnrecognised = True - Me.ucrInputNumericByNumeric.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputNumericByNumeric.GetSetSelectedIndex = -1 - Me.ucrInputNumericByNumeric.IsReadOnly = False - Me.ucrInputNumericByNumeric.Location = New System.Drawing.Point(60, 40) - Me.ucrInputNumericByNumeric.Name = "ucrInputNumericByNumeric" - Me.ucrInputNumericByNumeric.Size = New System.Drawing.Size(144, 21) - Me.ucrInputNumericByNumeric.TabIndex = 14 - ' 'ucrSaveGraph ' Me.ucrSaveGraph.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -478,60 +569,192 @@ Partial Class dlgDescribeTwoVarGraph Me.ucrReceiverFirstVars.ucrSelector = Nothing Me.ucrReceiverFirstVars.ucrVariableSelector = Nothing ' - 'ucrNudTransparency - ' - Me.ucrNudTransparency.AutoSize = True - Me.ucrNudTransparency.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTransparency.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTransparency.Location = New System.Drawing.Point(112, 87) - Me.ucrNudTransparency.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudTransparency.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTransparency.Name = "ucrNudTransparency" - Me.ucrNudTransparency.Size = New System.Drawing.Size(50, 20) - Me.ucrNudTransparency.TabIndex = 11 - Me.ucrNudTransparency.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudJitter - ' - Me.ucrNudJitter.AutoSize = True - Me.ucrNudJitter.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudJitter.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudJitter.Location = New System.Drawing.Point(112, 62) - Me.ucrNudJitter.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudJitter.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudJitter.Name = "ucrNudJitter" - Me.ucrNudJitter.Size = New System.Drawing.Size(50, 20) - Me.ucrNudJitter.TabIndex = 10 - Me.ucrNudJitter.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkFlipCoordinates - ' - Me.ucrChkFlipCoordinates.AutoSize = True - Me.ucrChkFlipCoordinates.Checked = False - Me.ucrChkFlipCoordinates.Location = New System.Drawing.Point(6, 19) - Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" - Me.ucrChkFlipCoordinates.Size = New System.Drawing.Size(159, 23) - Me.ucrChkFlipCoordinates.TabIndex = 6 - ' - 'ucrChkFreeScaleYAxis - ' - Me.ucrChkFreeScaleYAxis.AutoSize = True - Me.ucrChkFreeScaleYAxis.Checked = False - Me.ucrChkFreeScaleYAxis.Location = New System.Drawing.Point(6, 41) - Me.ucrChkFreeScaleYAxis.Name = "ucrChkFreeScaleYAxis" - Me.ucrChkFreeScaleYAxis.Size = New System.Drawing.Size(159, 23) - Me.ucrChkFreeScaleYAxis.TabIndex = 7 - ' - 'ucrInputPosition - ' - Me.ucrInputPosition.AddQuotesIfUnrecognised = True - Me.ucrInputPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputPosition.GetSetSelectedIndex = -1 - Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Location = New System.Drawing.Point(54, 63) - Me.ucrInputPosition.Name = "ucrInputPosition" - Me.ucrInputPosition.Size = New System.Drawing.Size(111, 21) - Me.ucrInputPosition.TabIndex = 13 + 'lblLowerContinous + ' + Me.lblLowerContinous.AutoSize = True + Me.lblLowerContinous.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLowerContinous.Location = New System.Drawing.Point(1, 50) + Me.lblLowerContinous.Name = "lblLowerContinous" + Me.lblLowerContinous.Size = New System.Drawing.Size(63, 13) + Me.lblLowerContinous.TabIndex = 23 + Me.lblLowerContinous.Text = "Continuous:" + ' + 'lblLowerCombo + ' + Me.lblLowerCombo.AutoSize = True + Me.lblLowerCombo.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLowerCombo.Location = New System.Drawing.Point(1, 78) + Me.lblLowerCombo.Name = "lblLowerCombo" + Me.lblLowerCombo.Size = New System.Drawing.Size(43, 13) + Me.lblLowerCombo.TabIndex = 24 + Me.lblLowerCombo.Text = "Combo:" + ' + 'lblLowerDiscrete + ' + Me.lblLowerDiscrete.AutoSize = True + Me.lblLowerDiscrete.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLowerDiscrete.Location = New System.Drawing.Point(1, 105) + Me.lblLowerDiscrete.Name = "lblLowerDiscrete" + Me.lblLowerDiscrete.Size = New System.Drawing.Size(49, 13) + Me.lblLowerDiscrete.TabIndex = 25 + Me.lblLowerDiscrete.Text = "Discrete:" + ' + 'lblLowerNA + ' + Me.lblLowerNA.AutoSize = True + Me.lblLowerNA.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLowerNA.Location = New System.Drawing.Point(3, 130) + Me.lblLowerNA.Name = "lblLowerNA" + Me.lblLowerNA.Size = New System.Drawing.Size(25, 13) + Me.lblLowerNA.TabIndex = 26 + Me.lblLowerNA.Text = "NA:" + ' + 'lblUpperNA + ' + Me.lblUpperNA.AutoSize = True + Me.lblUpperNA.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblUpperNA.Location = New System.Drawing.Point(292, 131) + Me.lblUpperNA.Name = "lblUpperNA" + Me.lblUpperNA.Size = New System.Drawing.Size(25, 13) + Me.lblUpperNA.TabIndex = 34 + Me.lblUpperNA.Text = "NA:" + ' + 'lblUpperDiscrete + ' + Me.lblUpperDiscrete.AutoSize = True + Me.lblUpperDiscrete.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblUpperDiscrete.Location = New System.Drawing.Point(290, 104) + Me.lblUpperDiscrete.Name = "lblUpperDiscrete" + Me.lblUpperDiscrete.Size = New System.Drawing.Size(49, 13) + Me.lblUpperDiscrete.TabIndex = 33 + Me.lblUpperDiscrete.Text = "Discrete:" + ' + 'lblUpperCombo + ' + Me.lblUpperCombo.AutoSize = True + Me.lblUpperCombo.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblUpperCombo.Location = New System.Drawing.Point(290, 77) + Me.lblUpperCombo.Name = "lblUpperCombo" + Me.lblUpperCombo.Size = New System.Drawing.Size(43, 13) + Me.lblUpperCombo.TabIndex = 32 + Me.lblUpperCombo.Text = "Combo:" + ' + 'lblUpperContinous + ' + Me.lblUpperContinous.AutoSize = True + Me.lblUpperContinous.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblUpperContinous.Location = New System.Drawing.Point(290, 50) + Me.lblUpperContinous.Name = "lblUpperContinous" + Me.lblUpperContinous.Size = New System.Drawing.Size(63, 13) + Me.lblUpperContinous.TabIndex = 31 + Me.lblUpperContinous.Text = "Continuous:" + ' + 'ucrInputUpperNA + ' + Me.ucrInputUpperNA.AddQuotesIfUnrecognised = True + Me.ucrInputUpperNA.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputUpperNA.GetSetSelectedIndex = -1 + Me.ucrInputUpperNA.IsReadOnly = False + Me.ucrInputUpperNA.Location = New System.Drawing.Point(357, 127) + Me.ucrInputUpperNA.Name = "ucrInputUpperNA" + Me.ucrInputUpperNA.Size = New System.Drawing.Size(61, 21) + Me.ucrInputUpperNA.TabIndex = 30 + ' + 'ucrInputUpperDiscrete + ' + Me.ucrInputUpperDiscrete.AddQuotesIfUnrecognised = True + Me.ucrInputUpperDiscrete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputUpperDiscrete.GetSetSelectedIndex = -1 + Me.ucrInputUpperDiscrete.IsReadOnly = False + Me.ucrInputUpperDiscrete.Location = New System.Drawing.Point(357, 100) + Me.ucrInputUpperDiscrete.Name = "ucrInputUpperDiscrete" + Me.ucrInputUpperDiscrete.Size = New System.Drawing.Size(61, 21) + Me.ucrInputUpperDiscrete.TabIndex = 29 + ' + 'ucrInputUpperCombo + ' + Me.ucrInputUpperCombo.AddQuotesIfUnrecognised = True + Me.ucrInputUpperCombo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputUpperCombo.GetSetSelectedIndex = -1 + Me.ucrInputUpperCombo.IsReadOnly = False + Me.ucrInputUpperCombo.Location = New System.Drawing.Point(357, 73) + Me.ucrInputUpperCombo.Name = "ucrInputUpperCombo" + Me.ucrInputUpperCombo.Size = New System.Drawing.Size(61, 21) + Me.ucrInputUpperCombo.TabIndex = 28 + ' + 'ucrInputUpperContinous + ' + Me.ucrInputUpperContinous.AddQuotesIfUnrecognised = True + Me.ucrInputUpperContinous.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputUpperContinous.GetSetSelectedIndex = -1 + Me.ucrInputUpperContinous.IsReadOnly = False + Me.ucrInputUpperContinous.Location = New System.Drawing.Point(357, 46) + Me.ucrInputUpperContinous.Name = "ucrInputUpperContinous" + Me.ucrInputUpperContinous.Size = New System.Drawing.Size(61, 21) + Me.ucrInputUpperContinous.TabIndex = 27 + ' + 'lblDiagonalContinuous + ' + Me.lblDiagonalContinuous.AutoSize = True + Me.lblDiagonalContinuous.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDiagonalContinuous.Location = New System.Drawing.Point(149, 50) + Me.lblDiagonalContinuous.Name = "lblDiagonalContinuous" + Me.lblDiagonalContinuous.Size = New System.Drawing.Size(63, 13) + Me.lblDiagonalContinuous.TabIndex = 36 + Me.lblDiagonalContinuous.Text = "Continuous:" + ' + 'ucrInputDiagonalContinous + ' + Me.ucrInputDiagonalContinous.AddQuotesIfUnrecognised = True + Me.ucrInputDiagonalContinous.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDiagonalContinous.GetSetSelectedIndex = -1 + Me.ucrInputDiagonalContinous.IsReadOnly = False + Me.ucrInputDiagonalContinous.Location = New System.Drawing.Point(216, 46) + Me.ucrInputDiagonalContinous.Name = "ucrInputDiagonalContinous" + Me.ucrInputDiagonalContinous.Size = New System.Drawing.Size(61, 21) + Me.ucrInputDiagonalContinous.TabIndex = 35 + ' + 'lblDiagonalDiscrete + ' + Me.lblDiagonalDiscrete.AutoSize = True + Me.lblDiagonalDiscrete.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDiagonalDiscrete.Location = New System.Drawing.Point(150, 77) + Me.lblDiagonalDiscrete.Name = "lblDiagonalDiscrete" + Me.lblDiagonalDiscrete.Size = New System.Drawing.Size(49, 13) + Me.lblDiagonalDiscrete.TabIndex = 38 + Me.lblDiagonalDiscrete.Text = "Discrete:" + ' + 'ucrInputDiagonalDiscrete + ' + Me.ucrInputDiagonalDiscrete.AddQuotesIfUnrecognised = True + Me.ucrInputDiagonalDiscrete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDiagonalDiscrete.GetSetSelectedIndex = -1 + Me.ucrInputDiagonalDiscrete.IsReadOnly = False + Me.ucrInputDiagonalDiscrete.Location = New System.Drawing.Point(216, 73) + Me.ucrInputDiagonalDiscrete.Name = "ucrInputDiagonalDiscrete" + Me.ucrInputDiagonalDiscrete.Size = New System.Drawing.Size(61, 21) + Me.ucrInputDiagonalDiscrete.TabIndex = 37 + ' + 'lblDiagonalNA + ' + Me.lblDiagonalNA.AutoSize = True + Me.lblDiagonalNA.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDiagonalNA.Location = New System.Drawing.Point(152, 105) + Me.lblDiagonalNA.Name = "lblDiagonalNA" + Me.lblDiagonalNA.Size = New System.Drawing.Size(25, 13) + Me.lblDiagonalNA.TabIndex = 40 + Me.lblDiagonalNA.Text = "NA:" + ' + 'ucrInputDiagonalNA + ' + Me.ucrInputDiagonalNA.AddQuotesIfUnrecognised = True + Me.ucrInputDiagonalNA.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDiagonalNA.GetSetSelectedIndex = -1 + Me.ucrInputDiagonalNA.IsReadOnly = False + Me.ucrInputDiagonalNA.Location = New System.Drawing.Point(216, 100) + Me.ucrInputDiagonalNA.Name = "ucrInputDiagonalNA" + Me.ucrInputDiagonalNA.Size = New System.Drawing.Size(61, 21) + Me.ucrInputDiagonalNA.TabIndex = 39 ' 'dlgDescribeTwoVarGraph ' @@ -608,8 +831,26 @@ Partial Class dlgDescribeTwoVarGraph Friend WithEvents ucrChkDiagonal As ucrCheck Friend WithEvents ucrChkLower As ucrCheck Friend WithEvents ucrChkUpper As ucrCheck - Friend WithEvents ucrInputContinous As ucrInputComboBox - Friend WithEvents UcrInputComboBox3 As ucrInputComboBox - Friend WithEvents UcrInputComboBox2 As ucrInputComboBox - Friend WithEvents UcrInputComboBox1 As ucrInputComboBox + Friend WithEvents ucrInputLowerContinous As ucrInputComboBox + Friend WithEvents ucrInputLowerDiscrete As ucrInputComboBox + Friend WithEvents ucrInputLowerCombo As ucrInputComboBox + Friend WithEvents ucrInputLowerNA As ucrInputComboBox + Friend WithEvents lblLowerCombo As Label + Friend WithEvents lblLowerContinous As Label + Friend WithEvents lblLowerNA As Label + Friend WithEvents lblLowerDiscrete As Label + Friend WithEvents lblDiagonalNA As Label + Friend WithEvents ucrInputDiagonalNA As ucrInputComboBox + Friend WithEvents lblDiagonalDiscrete As Label + Friend WithEvents ucrInputDiagonalDiscrete As ucrInputComboBox + Friend WithEvents lblDiagonalContinuous As Label + Friend WithEvents ucrInputDiagonalContinous As ucrInputComboBox + Friend WithEvents lblUpperNA As Label + Friend WithEvents lblUpperDiscrete As Label + Friend WithEvents lblUpperCombo As Label + Friend WithEvents lblUpperContinous As Label + Friend WithEvents ucrInputUpperNA As ucrInputComboBox + Friend WithEvents ucrInputUpperDiscrete As ucrInputComboBox + Friend WithEvents ucrInputUpperCombo As ucrInputComboBox + Friend WithEvents ucrInputUpperContinous As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index b181f5ce33c..c1343d65c40 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -25,7 +25,8 @@ Public Class dlgDescribeTwoVarGraph Private clsGeomJitter, clsGeomViolin, clsGeomBar, clsGeomMosaic, clsGeomBoxplot, clsGeomPoint, clsGeomLine, clsStatSummaryHline, clsStatSummaryCrossbar, clsGeomFreqPoly, clsGeomHistogram, clsGeomDensity, clsAnnotateFunction, clsGGpairsFunction, - clsDummyFunction, clsGGpairAesFunction As New RFunction + clsDummyFunction, clsGGpairAesFunction, clsUpperListFunction, clsLowerListFunction, + clsDiagonalListFunction As New RFunction ' Use this aes for numeric by numeric graphs e.g. scatter and line plots Private clsAesNumericByNumeric As RFunction ' Use this aes for categorical by categorical bar graphs @@ -171,6 +172,70 @@ Public Class dlgDescribeTwoVarGraph ucrNudTransparency.SetLinkedDisplayControl(lblPointTransparency) ucrNudTransparency.SetRDefault(1) + ucrChkDiagonal.SetText("Diagonal") + ucrChkDiagonal.AddParameterPresentCondition(True, "diag") + ucrChkDiagonal.AddParameterPresentCondition(False, "diag", False) + ucrChkDiagonal.AddToLinkedControls({ucrInputDiagonalContinous, ucrInputDiagonalDiscrete, + ucrInputDiagonalNA}, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkLower.SetText("Lower") + ucrChkLower.AddParameterPresentCondition(True, "lower") + ucrChkLower.AddParameterPresentCondition(False, "lower", False) + ucrChkLower.AddToLinkedControls({ucrInputLowerContinous, ucrInputLowerDiscrete, ucrInputLowerCombo, + ucrInputLowerNA}, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkUpper.SetText("Upper") + ucrChkUpper.AddParameterPresentCondition(True, "upper") + ucrChkUpper.AddParameterPresentCondition(False, "upper", False) + ucrChkUpper.AddToLinkedControls({ucrInputUpperContinous, ucrInputUpperDiscrete, ucrInputUpperCombo, + ucrInputUpperNA}, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrInputLowerContinous.SetParameter(New RParameter("continuous", iNewPosition:=0)) + ucrInputLowerContinous.SetItems({"point", "smooth", "smooth_loess", "density", "cor", "blank"}, bAddConditions:=True) + ucrInputLowerContinous.SetLinkedDisplayControl(lblLowerContinous) + + ucrInputLowerCombo.SetParameter(New RParameter("combo", iNewPosition:=1)) + ucrInputLowerCombo.SetItems({"box", "box_no_facet", "dot", "dot_no_facet", "facethist", "facetdensity", + "denstrip", "blank"}, bAddConditions:=True) + ucrInputLowerCombo.SetLinkedDisplayControl(lblLowerCombo) + + ucrInputLowerDiscrete.SetParameter(New RParameter("discrete ", iNewPosition:=2)) + ucrInputLowerDiscrete.SetItems({"facetbar", "ratio", "blank"}, bAddConditions:=True) + ucrInputLowerDiscrete.SetLinkedDisplayControl(lblLowerDiscrete) + + ucrInputLowerNA.SetParameter(New RParameter("na ", iNewPosition:=3)) + ucrInputLowerNA.SetItems({"na", "blank"}, bAddConditions:=True) + ucrInputLowerNA.SetLinkedDisplayControl(lblLowerNA) + + ucrInputUpperContinous.SetParameter(New RParameter("continuous", iNewPosition:=0)) + ucrInputUpperContinous.SetItems({"point", "smooth", "smooth_loess", "density", "cor", "blank"}, bAddConditions:=True) + ucrInputUpperContinous.SetLinkedDisplayControl(lblUpperContinous) + + ucrInputUpperCombo.SetParameter(New RParameter("combo", iNewPosition:=1)) + ucrInputUpperCombo.SetItems({"box", "box_no_facet", "dot", "dot_no_facet", "facethist", "facetdensity", + "denstrip", "blank"}, bAddConditions:=True) + ucrInputUpperCombo.SetLinkedDisplayControl(lblUpperCombo) + + ucrInputUpperDiscrete.SetParameter(New RParameter("discrete ", iNewPosition:=2)) + ucrInputUpperDiscrete.SetItems({"facetbar", "count", "ratio", "blank"}, bAddConditions:=True) + ucrInputUpperDiscrete.SetLinkedDisplayControl(lblUpperDiscrete) + + ucrInputUpperNA.SetParameter(New RParameter("na ", iNewPosition:=3)) + ucrInputUpperNA.SetItems({"na", "blank"}, bAddConditions:=True) + ucrInputUpperNA.SetLinkedDisplayControl(lblUpperNA) + + ucrInputDiagonalContinous.SetParameter(New RParameter("continuous", iNewPosition:=0)) + ucrInputDiagonalContinous.SetItems({"densityDiag", "barDiag", "blankDiag"}, bAddConditions:=True) + ucrInputDiagonalContinous.SetLinkedDisplayControl(lblDiagonalContinuous) + + ucrInputDiagonalDiscrete.SetParameter(New RParameter("discrete ", iNewPosition:=1)) + ucrInputDiagonalDiscrete.SetItems({"barDiag", "blankDiag"}, bAddConditions:=True) + ucrInputDiagonalDiscrete.SetLinkedDisplayControl(lblDiagonalDiscrete) + + ucrInputDiagonalNA.SetParameter(New RParameter("na ", iNewPosition:=2)) + ucrInputDiagonalNA.SetItems({"naDiag", "blankDiag"}, bAddConditions:=True) + ucrInputDiagonalNA.SetLinkedDisplayControl(lblDiagonalNA) + ucrSaveGraph.SetPrefix("two_var") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorTwoVarGraph.ucrAvailableDataFrames) @@ -223,7 +288,9 @@ Public Class dlgDescribeTwoVarGraph clsAesStatSummaryHlineCategoricalByNumeric = New RFunction clsAesStatSummaryHlineNumericByCategorical = New RFunction clsGGpairAesFunction = New RFunction - + clsUpperListFunction = New RFunction + clsLowerListFunction = New RFunction + clsDiagonalListFunction = New RFunction clsBaseOperator = New ROperator bResetSubdialog = True @@ -237,6 +304,20 @@ Public Class dlgDescribeTwoVarGraph clsDummyFunction.AddParameter("checked", "pair", iPosition:=0) + clsUpperListFunction.AddParameter("continuous", Chr(34) & "cor" & Chr(34), iPosition:=0) + clsUpperListFunction.AddParameter("combo", Chr(34) & "box_no_facet" & Chr(34), iPosition:=1) + clsUpperListFunction.AddParameter("discrete", Chr(34) & "count" & Chr(34), iPosition:=2) + clsUpperListFunction.AddParameter("na", Chr(34) & "na" & Chr(34), iPosition:=3) + + clsLowerListFunction.AddParameter("continuous", Chr(34) & "points" & Chr(34), iPosition:=0) + clsLowerListFunction.AddParameter("combo", Chr(34) & "facethist" & Chr(34), iPosition:=1) + clsLowerListFunction.AddParameter("discrete", Chr(34) & "facetbar" & Chr(34), iPosition:=2) + clsLowerListFunction.AddParameter("na", Chr(34) & "na" & Chr(34), iPosition:=3) + + clsDiagonalListFunction.AddParameter("continuous", Chr(34) & "densityDiag" & Chr(34), iPosition:=0) + clsDiagonalListFunction.AddParameter("discrete", Chr(34) & "barDiag" & Chr(34), iPosition:=1) + clsDiagonalListFunction.AddParameter("na", Chr(34) & "naDiag" & Chr(34), iPosition:=2) + clsGGpairAesFunction.SetPackageName("ggplot2") clsGGpairAesFunction.SetRCommand("aes") @@ -380,6 +461,21 @@ Public Class dlgDescribeTwoVarGraph ucrNudTransparency.SetRCode(clsGeomJitter, bReset) ucrPnlByPairs.SetRCode(clsDummyFunction, bReset) ucrReceiverColour.SetRCode(clsGGpairAesFunction, bReset) + ucrInputLowerContinous.SetRCode(clsLowerListFunction, bReset) + ucrInputLowerDiscrete.SetRCode(clsLowerListFunction, bReset) + ucrInputLowerCombo.SetRCode(clsLowerListFunction, bReset) + ucrInputLowerNA.SetRCode(clsLowerListFunction, bReset) + ucrInputUpperContinous.SetRCode(clsUpperListFunction, bReset) + ucrInputUpperDiscrete.SetRCode(clsUpperListFunction, bReset) + ucrInputUpperCombo.SetRCode(clsUpperListFunction, bReset) + ucrInputUpperNA.SetRCode(clsUpperListFunction, bReset) + ucrInputDiagonalContinous.SetRCode(clsDiagonalListFunction, bReset) + ucrInputDiagonalDiscrete.SetRCode(clsDiagonalListFunction, bReset) + ucrInputDiagonalNA.SetRCode(clsDiagonalListFunction, bReset) + ucrChkLower.SetRCode(clsGGpairsFunction, bReset) + ucrChkUpper.SetRCode(clsGGpairsFunction, bReset) + ucrChkDiagonal.SetRCode(clsGGpairsFunction, bReset) + bRCodeSet = True Results() SetFreeYAxis() @@ -824,4 +920,24 @@ Public Class dlgDescribeTwoVarGraph clsGGpairsFunction.RemoveParameterByName("colour") End If End Sub + + Private Sub LowerUpperDiagonal_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkLower.ControlValueChanged, ucrChkUpper.ControlValueChanged, ucrChkDiagonal.ControlValueChanged + If bRCodeSet Then + If ucrChkDiagonal.Checked Then + clsGGpairsFunction.AddParameter("diag", clsRFunctionParameter:=clsDiagonalListFunction, iPosition:=3) + Else + clsGGpairsFunction.RemoveParameterByName("diag") + End If + If ucrChkLower.Checked Then + clsGGpairsFunction.AddParameter("lower", clsRFunctionParameter:=clsLowerListFunction, iPosition:=4) + Else + clsGGpairsFunction.RemoveParameterByName("lower") + End If + If ucrChkUpper.Checked Then + clsGGpairsFunction.AddParameter("upper", clsRFunctionParameter:=clsUpperListFunction, iPosition:=5) + Else + clsGGpairsFunction.RemoveParameterByName("upper") + End If + End If + End Sub End Class \ No newline at end of file From b54ef487b1551b5f741323f7f5224733880e8f3c Mon Sep 17 00:00:00 2001 From: ivanluv Date: Tue, 22 Feb 2022 15:34:53 +0300 Subject: [PATCH 47/68] Minor changes --- instat/dlgDescribeTwoVarGraph.vb | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index c1343d65c40..7f3b87277ed 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -191,7 +191,7 @@ Public Class dlgDescribeTwoVarGraph ucrInputUpperNA}, {True}, bNewLinkedHideIfParameterMissing:=True) ucrInputLowerContinous.SetParameter(New RParameter("continuous", iNewPosition:=0)) - ucrInputLowerContinous.SetItems({"point", "smooth", "smooth_loess", "density", "cor", "blank"}, bAddConditions:=True) + ucrInputLowerContinous.SetItems({"points", "smooth", "smooth_loess", "density", "cor", "blank"}, bAddConditions:=True) ucrInputLowerContinous.SetLinkedDisplayControl(lblLowerContinous) ucrInputLowerCombo.SetParameter(New RParameter("combo", iNewPosition:=1)) @@ -199,11 +199,11 @@ Public Class dlgDescribeTwoVarGraph "denstrip", "blank"}, bAddConditions:=True) ucrInputLowerCombo.SetLinkedDisplayControl(lblLowerCombo) - ucrInputLowerDiscrete.SetParameter(New RParameter("discrete ", iNewPosition:=2)) + ucrInputLowerDiscrete.SetParameter(New RParameter("discrete", iNewPosition:=2)) ucrInputLowerDiscrete.SetItems({"facetbar", "ratio", "blank"}, bAddConditions:=True) ucrInputLowerDiscrete.SetLinkedDisplayControl(lblLowerDiscrete) - ucrInputLowerNA.SetParameter(New RParameter("na ", iNewPosition:=3)) + ucrInputLowerNA.SetParameter(New RParameter("na", iNewPosition:=3)) ucrInputLowerNA.SetItems({"na", "blank"}, bAddConditions:=True) ucrInputLowerNA.SetLinkedDisplayControl(lblLowerNA) @@ -216,11 +216,11 @@ Public Class dlgDescribeTwoVarGraph "denstrip", "blank"}, bAddConditions:=True) ucrInputUpperCombo.SetLinkedDisplayControl(lblUpperCombo) - ucrInputUpperDiscrete.SetParameter(New RParameter("discrete ", iNewPosition:=2)) + ucrInputUpperDiscrete.SetParameter(New RParameter("discrete", iNewPosition:=2)) ucrInputUpperDiscrete.SetItems({"facetbar", "count", "ratio", "blank"}, bAddConditions:=True) ucrInputUpperDiscrete.SetLinkedDisplayControl(lblUpperDiscrete) - ucrInputUpperNA.SetParameter(New RParameter("na ", iNewPosition:=3)) + ucrInputUpperNA.SetParameter(New RParameter("na", iNewPosition:=3)) ucrInputUpperNA.SetItems({"na", "blank"}, bAddConditions:=True) ucrInputUpperNA.SetLinkedDisplayControl(lblUpperNA) @@ -228,11 +228,11 @@ Public Class dlgDescribeTwoVarGraph ucrInputDiagonalContinous.SetItems({"densityDiag", "barDiag", "blankDiag"}, bAddConditions:=True) ucrInputDiagonalContinous.SetLinkedDisplayControl(lblDiagonalContinuous) - ucrInputDiagonalDiscrete.SetParameter(New RParameter("discrete ", iNewPosition:=1)) + ucrInputDiagonalDiscrete.SetParameter(New RParameter("discrete", iNewPosition:=1)) ucrInputDiagonalDiscrete.SetItems({"barDiag", "blankDiag"}, bAddConditions:=True) ucrInputDiagonalDiscrete.SetLinkedDisplayControl(lblDiagonalDiscrete) - ucrInputDiagonalNA.SetParameter(New RParameter("na ", iNewPosition:=2)) + ucrInputDiagonalNA.SetParameter(New RParameter("na", iNewPosition:=2)) ucrInputDiagonalNA.SetItems({"naDiag", "blankDiag"}, bAddConditions:=True) ucrInputDiagonalNA.SetLinkedDisplayControl(lblDiagonalNA) @@ -304,16 +304,19 @@ Public Class dlgDescribeTwoVarGraph clsDummyFunction.AddParameter("checked", "pair", iPosition:=0) + clsUpperListFunction.SetRCommand("list") clsUpperListFunction.AddParameter("continuous", Chr(34) & "cor" & Chr(34), iPosition:=0) clsUpperListFunction.AddParameter("combo", Chr(34) & "box_no_facet" & Chr(34), iPosition:=1) clsUpperListFunction.AddParameter("discrete", Chr(34) & "count" & Chr(34), iPosition:=2) clsUpperListFunction.AddParameter("na", Chr(34) & "na" & Chr(34), iPosition:=3) + clsLowerListFunction.SetRCommand("list") clsLowerListFunction.AddParameter("continuous", Chr(34) & "points" & Chr(34), iPosition:=0) clsLowerListFunction.AddParameter("combo", Chr(34) & "facethist" & Chr(34), iPosition:=1) clsLowerListFunction.AddParameter("discrete", Chr(34) & "facetbar" & Chr(34), iPosition:=2) clsLowerListFunction.AddParameter("na", Chr(34) & "na" & Chr(34), iPosition:=3) + clsDiagonalListFunction.SetRCommand("list") clsDiagonalListFunction.AddParameter("continuous", Chr(34) & "densityDiag" & Chr(34), iPosition:=0) clsDiagonalListFunction.AddParameter("discrete", Chr(34) & "barDiag" & Chr(34), iPosition:=1) clsDiagonalListFunction.AddParameter("na", Chr(34) & "naDiag" & Chr(34), iPosition:=2) @@ -897,6 +900,7 @@ Public Class dlgDescribeTwoVarGraph clsDummyFunction.AddParameter("checked", "pair", iPosition:=0) End If End If + AddRemoveColourParameter() End Sub Private Sub ucrSelectorTwoVarGraph_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTwoVarGraph.ControlValueChanged @@ -914,6 +918,10 @@ Public Class dlgDescribeTwoVarGraph End Sub Private Sub ucrReceiverColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverColour.ControlValueChanged + AddRemoveColourParameter() + End Sub + + Private Sub AddRemoveColourParameter() If Not ucrReceiverColour.IsEmpty And rdoPairs.Checked Then clsGGpairsFunction.AddParameter("colour", clsRFunctionParameter:=clsGGpairAesFunction, bIncludeArgumentName:=False, iPosition:=2) Else From 08ef7c7f381119af1cc0860fdc341623ba75fae0 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 22 Feb 2022 16:27:45 +0300 Subject: [PATCH 48/68] Added logical operations --- instat/dlgTransform.Designer.vb | 366 ++++++++++++++++---------------- instat/dlgTransform.vb | 69 +++++- 2 files changed, 243 insertions(+), 192 deletions(-) diff --git a/instat/dlgTransform.Designer.vb b/instat/dlgTransform.Designer.vb index 0bac78d50a6..95ce8c5274d 100644 --- a/instat/dlgTransform.Designer.vb +++ b/instat/dlgTransform.Designer.vb @@ -46,12 +46,10 @@ Partial Class dlgTransform Me.rdoMaximum = New System.Windows.Forms.RadioButton() Me.rdoMinimum = New System.Windows.Forms.RadioButton() Me.rdoAverage = New System.Windows.Forms.RadioButton() - Me.ucrPnlTies = New instat.UcrPanel() Me.grpMissingValues = New System.Windows.Forms.GroupBox() Me.rdoLast = New System.Windows.Forms.RadioButton() Me.rdoFirstMissingValues = New System.Windows.Forms.RadioButton() Me.rdoKeptAsMissing = New System.Windows.Forms.RadioButton() - Me.ucrPnlMissingValues = New instat.UcrPanel() Me.rdoRoundOf = New System.Windows.Forms.RadioButton() Me.rdoSignificantDigits = New System.Windows.Forms.RadioButton() Me.rdoStandardize = New System.Windows.Forms.RadioButton() @@ -59,26 +57,17 @@ Partial Class dlgTransform Me.rdoLead = New System.Windows.Forms.RadioButton() Me.rdoLag = New System.Windows.Forms.RadioButton() Me.grpNumericOptions = New System.Windows.Forms.GroupBox() - Me.ucrChkOmitNA = New instat.ucrCheck() - Me.ucrNudLagPosition = New instat.ucrNud() + Me.rdoLogical = New System.Windows.Forms.RadioButton() Me.lblLagPosition = New System.Windows.Forms.Label() Me.lblRoundofDigits = New System.Windows.Forms.Label() - Me.ucrNudRoundOfDigits = New instat.ucrNud() - Me.ucrNudDiffLag = New instat.ucrNud() - Me.ucrNudLagLeadPosition = New instat.ucrNud() - Me.ucrNudSignifDigits = New instat.ucrNud() Me.lblDiffLag = New System.Windows.Forms.Label() Me.lblDigits = New System.Windows.Forms.Label() Me.lblLagLeadPosition = New System.Windows.Forms.Label() Me.grpNonNegative = New System.Windows.Forms.GroupBox() - Me.ucrInputPower = New instat.ucrInputComboBox() Me.rdoPower = New System.Windows.Forms.RadioButton() - Me.ucrInputConstant = New instat.ucrInputComboBox() Me.rdoSquareRoot = New System.Windows.Forms.RadioButton() Me.rdoNaturalLog = New System.Windows.Forms.RadioButton() Me.rdoLogToBase10 = New System.Windows.Forms.RadioButton() - Me.ucrChkAddConstant = New instat.ucrCheck() - Me.ucrPnlNonNegative = New instat.UcrPanel() Me.rdoNumeric = New System.Windows.Forms.RadioButton() Me.rdoNonNegative = New System.Windows.Forms.RadioButton() Me.rdoRank = New System.Windows.Forms.RadioButton() @@ -86,6 +75,19 @@ Partial Class dlgTransform Me.rdoScale = New System.Windows.Forms.RadioButton() Me.ttEditPreview = New System.Windows.Forms.ToolTip(Me.components) Me.cmdUpdatePreview = New System.Windows.Forms.Button() + Me.ucrInputLogicalValues = New instat.ucrInputTextBox() + Me.ucrInputLogicOperations = New instat.ucrInputComboBox() + Me.ucrChkOmitNA = New instat.ucrCheck() + Me.ucrNudLagPosition = New instat.ucrNud() + Me.ucrNudRoundOfDigits = New instat.ucrNud() + Me.ucrNudDiffLag = New instat.ucrNud() + Me.ucrNudLagLeadPosition = New instat.ucrNud() + Me.ucrNudSignifDigits = New instat.ucrNud() + Me.ucrPnlNumericOptions = New instat.UcrPanel() + Me.ucrInputPower = New instat.ucrInputComboBox() + Me.ucrInputConstant = New instat.ucrInputComboBox() + Me.ucrChkAddConstant = New instat.ucrCheck() + Me.ucrPnlNonNegative = New instat.UcrPanel() Me.ucrChkEditPreview = New instat.ucrCheck() Me.ucrChkPreview = New instat.ucrCheck() Me.ucrInputPreview = New instat.ucrInputTextBox() @@ -97,6 +99,7 @@ Partial Class dlgTransform Me.ucrChkDivide = New instat.ucrCheck() Me.ucrChkMultiply = New instat.ucrCheck() Me.ucrChkSubtract = New instat.ucrCheck() + Me.ucrPnlMissingValues = New instat.UcrPanel() Me.ucrPnlTransformOptions = New instat.UcrPanel() Me.ucrSaveNew = New instat.ucrSave() Me.ucrReceiverRank = New instat.ucrReceiverSingle() @@ -104,10 +107,7 @@ Partial Class dlgTransform Me.ucrSelectorForRank = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrChkMissingLast = New instat.ucrCheck() Me.ucrChkDecreasing = New instat.ucrCheck() - Me.ucrPnlNumericOptions = New instat.UcrPanel() - Me.rdoLogical = New System.Windows.Forms.RadioButton() - Me.ucrInputLogicOperations = New instat.ucrInputComboBox() - Me.ucrInputLogicalValues = New instat.ucrInputTextBox() + Me.ucrPnlTies = New instat.UcrPanel() Me.grpTies.SuspendLayout() Me.grpMissingValues.SuspendLayout() Me.grpNumericOptions.SuspendLayout() @@ -206,14 +206,6 @@ Partial Class dlgTransform Me.rdoAverage.Text = "Average" Me.rdoAverage.UseVisualStyleBackColor = True ' - 'ucrPnlTies - ' - Me.ucrPnlTies.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlTies.Location = New System.Drawing.Point(7, 14) - Me.ucrPnlTies.Name = "ucrPnlTies" - Me.ucrPnlTies.Size = New System.Drawing.Size(96, 114) - Me.ucrPnlTies.TabIndex = 0 - ' 'grpMissingValues ' Me.grpMissingValues.Controls.Add(Me.rdoLast) @@ -264,14 +256,6 @@ Partial Class dlgTransform Me.rdoKeptAsMissing.Text = "Keep as Missing" Me.rdoKeptAsMissing.UseVisualStyleBackColor = True ' - 'ucrPnlMissingValues - ' - Me.ucrPnlMissingValues.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMissingValues.Location = New System.Drawing.Point(6, 18) - Me.ucrPnlMissingValues.Name = "ucrPnlMissingValues" - Me.ucrPnlMissingValues.Size = New System.Drawing.Size(143, 64) - Me.ucrPnlMissingValues.TabIndex = 0 - ' 'rdoRoundOf ' Me.rdoRoundOf.AutoSize = True @@ -374,27 +358,17 @@ Partial Class dlgTransform Me.grpNumericOptions.TabStop = False Me.grpNumericOptions.Text = "Options" ' - 'ucrChkOmitNA - ' - Me.ucrChkOmitNA.AutoSize = True - Me.ucrChkOmitNA.Checked = False - Me.ucrChkOmitNA.Location = New System.Drawing.Point(109, 70) - Me.ucrChkOmitNA.Name = "ucrChkOmitNA" - Me.ucrChkOmitNA.Size = New System.Drawing.Size(75, 23) - Me.ucrChkOmitNA.TabIndex = 33 - ' - 'ucrNudLagPosition + 'rdoLogical ' - Me.ucrNudLagPosition.AutoSize = True - Me.ucrNudLagPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLagPosition.Location = New System.Drawing.Point(138, 94) - Me.ucrNudLagPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudLagPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagPosition.Name = "ucrNudLagPosition" - Me.ucrNudLagPosition.Size = New System.Drawing.Size(50, 20) - Me.ucrNudLagPosition.TabIndex = 25 - Me.ucrNudLagPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.rdoLogical.AutoSize = True + Me.rdoLogical.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoLogical.Location = New System.Drawing.Point(11, 174) + Me.rdoLogical.Name = "rdoLogical" + Me.rdoLogical.Size = New System.Drawing.Size(59, 17) + Me.rdoLogical.TabIndex = 34 + Me.rdoLogical.TabStop = True + Me.rdoLogical.Text = "Logical" + Me.rdoLogical.UseVisualStyleBackColor = True ' 'lblLagPosition ' @@ -416,58 +390,6 @@ Partial Class dlgTransform Me.lblRoundofDigits.TabIndex = 23 Me.lblRoundofDigits.Text = "Decimals:" ' - 'ucrNudRoundOfDigits - ' - Me.ucrNudRoundOfDigits.AutoSize = True - Me.ucrNudRoundOfDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Location = New System.Drawing.Point(138, 16) - Me.ucrNudRoundOfDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Name = "ucrNudRoundOfDigits" - Me.ucrNudRoundOfDigits.Size = New System.Drawing.Size(50, 20) - Me.ucrNudRoundOfDigits.TabIndex = 22 - Me.ucrNudRoundOfDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudDiffLag - ' - Me.ucrNudDiffLag.AutoSize = True - Me.ucrNudDiffLag.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDiffLag.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDiffLag.Location = New System.Drawing.Point(138, 146) - Me.ucrNudDiffLag.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDiffLag.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDiffLag.Name = "ucrNudDiffLag" - Me.ucrNudDiffLag.Size = New System.Drawing.Size(50, 20) - Me.ucrNudDiffLag.TabIndex = 19 - Me.ucrNudDiffLag.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudLagLeadPosition - ' - Me.ucrNudLagLeadPosition.AutoSize = True - Me.ucrNudLagLeadPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Location = New System.Drawing.Point(138, 120) - Me.ucrNudLagLeadPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Name = "ucrNudLagLeadPosition" - Me.ucrNudLagLeadPosition.Size = New System.Drawing.Size(50, 20) - Me.ucrNudLagLeadPosition.TabIndex = 16 - Me.ucrNudLagLeadPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudSignifDigits - ' - Me.ucrNudSignifDigits.AutoSize = True - Me.ucrNudSignifDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSignifDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSignifDigits.Location = New System.Drawing.Point(138, 42) - Me.ucrNudSignifDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSignifDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSignifDigits.Name = "ucrNudSignifDigits" - Me.ucrNudSignifDigits.Size = New System.Drawing.Size(50, 20) - Me.ucrNudSignifDigits.TabIndex = 14 - Me.ucrNudSignifDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblDiffLag ' Me.lblDiffLag.AutoSize = True @@ -515,17 +437,6 @@ Partial Class dlgTransform Me.grpNonNegative.TabStop = False Me.grpNonNegative.Text = "Options" ' - 'ucrInputPower - ' - Me.ucrInputPower.AddQuotesIfUnrecognised = True - Me.ucrInputPower.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputPower.GetSetSelectedIndex = -1 - Me.ucrInputPower.IsReadOnly = False - Me.ucrInputPower.Location = New System.Drawing.Point(126, 86) - Me.ucrInputPower.Name = "ucrInputPower" - Me.ucrInputPower.Size = New System.Drawing.Size(57, 21) - Me.ucrInputPower.TabIndex = 29 - ' 'rdoPower ' Me.rdoPower.AutoSize = True @@ -538,17 +449,6 @@ Partial Class dlgTransform Me.rdoPower.Text = "Power" Me.rdoPower.UseVisualStyleBackColor = True ' - 'ucrInputConstant - ' - Me.ucrInputConstant.AddQuotesIfUnrecognised = True - Me.ucrInputConstant.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputConstant.GetSetSelectedIndex = -1 - Me.ucrInputConstant.IsReadOnly = False - Me.ucrInputConstant.Location = New System.Drawing.Point(126, 114) - Me.ucrInputConstant.Name = "ucrInputConstant" - Me.ucrInputConstant.Size = New System.Drawing.Size(58, 21) - Me.ucrInputConstant.TabIndex = 34 - ' 'rdoSquareRoot ' Me.rdoSquareRoot.AutoSize = True @@ -585,23 +485,6 @@ Partial Class dlgTransform Me.rdoLogToBase10.Text = "Log (Base 10)" Me.rdoLogToBase10.UseVisualStyleBackColor = True ' - 'ucrChkAddConstant - ' - Me.ucrChkAddConstant.AutoSize = True - Me.ucrChkAddConstant.Checked = False - Me.ucrChkAddConstant.Location = New System.Drawing.Point(13, 116) - Me.ucrChkAddConstant.Name = "ucrChkAddConstant" - Me.ucrChkAddConstant.Size = New System.Drawing.Size(107, 23) - Me.ucrChkAddConstant.TabIndex = 30 - ' - 'ucrPnlNonNegative - ' - Me.ucrPnlNonNegative.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlNonNegative.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlNonNegative.Name = "ucrPnlNonNegative" - Me.ucrPnlNonNegative.Size = New System.Drawing.Size(92, 100) - Me.ucrPnlNonNegative.TabIndex = 19 - ' 'rdoNumeric ' Me.rdoNumeric.Appearance = System.Windows.Forms.Appearance.Button @@ -707,6 +590,149 @@ Partial Class dlgTransform Me.cmdUpdatePreview.Text = "Update" Me.cmdUpdatePreview.UseVisualStyleBackColor = True ' + 'ucrInputLogicalValues + ' + Me.ucrInputLogicalValues.AddQuotesIfUnrecognised = True + Me.ucrInputLogicalValues.AutoSize = True + Me.ucrInputLogicalValues.IsMultiline = False + Me.ucrInputLogicalValues.IsReadOnly = False + Me.ucrInputLogicalValues.Location = New System.Drawing.Point(138, 174) + Me.ucrInputLogicalValues.Name = "ucrInputLogicalValues" + Me.ucrInputLogicalValues.Size = New System.Drawing.Size(51, 21) + Me.ucrInputLogicalValues.TabIndex = 36 + ' + 'ucrInputLogicOperations + ' + Me.ucrInputLogicOperations.AddQuotesIfUnrecognised = True + Me.ucrInputLogicOperations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLogicOperations.GetSetSelectedIndex = -1 + Me.ucrInputLogicOperations.IsReadOnly = False + Me.ucrInputLogicOperations.Location = New System.Drawing.Point(76, 174) + Me.ucrInputLogicOperations.Name = "ucrInputLogicOperations" + Me.ucrInputLogicOperations.Size = New System.Drawing.Size(59, 21) + Me.ucrInputLogicOperations.TabIndex = 35 + ' + 'ucrChkOmitNA + ' + Me.ucrChkOmitNA.AutoSize = True + Me.ucrChkOmitNA.Checked = False + Me.ucrChkOmitNA.Location = New System.Drawing.Point(109, 70) + Me.ucrChkOmitNA.Name = "ucrChkOmitNA" + Me.ucrChkOmitNA.Size = New System.Drawing.Size(75, 23) + Me.ucrChkOmitNA.TabIndex = 33 + ' + 'ucrNudLagPosition + ' + Me.ucrNudLagPosition.AutoSize = True + Me.ucrNudLagPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudLagPosition.Location = New System.Drawing.Point(138, 94) + Me.ucrNudLagPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudLagPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagPosition.Name = "ucrNudLagPosition" + Me.ucrNudLagPosition.Size = New System.Drawing.Size(50, 20) + Me.ucrNudLagPosition.TabIndex = 25 + Me.ucrNudLagPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudRoundOfDigits + ' + Me.ucrNudRoundOfDigits.AutoSize = True + Me.ucrNudRoundOfDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Location = New System.Drawing.Point(138, 16) + Me.ucrNudRoundOfDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Name = "ucrNudRoundOfDigits" + Me.ucrNudRoundOfDigits.Size = New System.Drawing.Size(50, 20) + Me.ucrNudRoundOfDigits.TabIndex = 22 + Me.ucrNudRoundOfDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudDiffLag + ' + Me.ucrNudDiffLag.AutoSize = True + Me.ucrNudDiffLag.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDiffLag.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDiffLag.Location = New System.Drawing.Point(138, 146) + Me.ucrNudDiffLag.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDiffLag.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDiffLag.Name = "ucrNudDiffLag" + Me.ucrNudDiffLag.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDiffLag.TabIndex = 19 + Me.ucrNudDiffLag.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudLagLeadPosition + ' + Me.ucrNudLagLeadPosition.AutoSize = True + Me.ucrNudLagLeadPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Location = New System.Drawing.Point(138, 120) + Me.ucrNudLagLeadPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Name = "ucrNudLagLeadPosition" + Me.ucrNudLagLeadPosition.Size = New System.Drawing.Size(50, 20) + Me.ucrNudLagLeadPosition.TabIndex = 16 + Me.ucrNudLagLeadPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudSignifDigits + ' + Me.ucrNudSignifDigits.AutoSize = True + Me.ucrNudSignifDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSignifDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSignifDigits.Location = New System.Drawing.Point(138, 42) + Me.ucrNudSignifDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSignifDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSignifDigits.Name = "ucrNudSignifDigits" + Me.ucrNudSignifDigits.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSignifDigits.TabIndex = 14 + Me.ucrNudSignifDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrPnlNumericOptions + ' + Me.ucrPnlNumericOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlNumericOptions.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlNumericOptions.Name = "ucrPnlNumericOptions" + Me.ucrPnlNumericOptions.Size = New System.Drawing.Size(79, 179) + Me.ucrPnlNumericOptions.TabIndex = 0 + ' + 'ucrInputPower + ' + Me.ucrInputPower.AddQuotesIfUnrecognised = True + Me.ucrInputPower.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputPower.GetSetSelectedIndex = -1 + Me.ucrInputPower.IsReadOnly = False + Me.ucrInputPower.Location = New System.Drawing.Point(126, 86) + Me.ucrInputPower.Name = "ucrInputPower" + Me.ucrInputPower.Size = New System.Drawing.Size(57, 21) + Me.ucrInputPower.TabIndex = 29 + ' + 'ucrInputConstant + ' + Me.ucrInputConstant.AddQuotesIfUnrecognised = True + Me.ucrInputConstant.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputConstant.GetSetSelectedIndex = -1 + Me.ucrInputConstant.IsReadOnly = False + Me.ucrInputConstant.Location = New System.Drawing.Point(126, 114) + Me.ucrInputConstant.Name = "ucrInputConstant" + Me.ucrInputConstant.Size = New System.Drawing.Size(58, 21) + Me.ucrInputConstant.TabIndex = 34 + ' + 'ucrChkAddConstant + ' + Me.ucrChkAddConstant.AutoSize = True + Me.ucrChkAddConstant.Checked = False + Me.ucrChkAddConstant.Location = New System.Drawing.Point(13, 116) + Me.ucrChkAddConstant.Name = "ucrChkAddConstant" + Me.ucrChkAddConstant.Size = New System.Drawing.Size(107, 23) + Me.ucrChkAddConstant.TabIndex = 30 + ' + 'ucrPnlNonNegative + ' + Me.ucrPnlNonNegative.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlNonNegative.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlNonNegative.Name = "ucrPnlNonNegative" + Me.ucrPnlNonNegative.Size = New System.Drawing.Size(92, 100) + Me.ucrPnlNonNegative.TabIndex = 19 + ' 'ucrChkEditPreview ' Me.ucrChkEditPreview.AutoSize = True @@ -816,6 +842,14 @@ Partial Class dlgTransform Me.ucrChkSubtract.Size = New System.Drawing.Size(79, 23) Me.ucrChkSubtract.TabIndex = 21 ' + 'ucrPnlMissingValues + ' + Me.ucrPnlMissingValues.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMissingValues.Location = New System.Drawing.Point(6, 18) + Me.ucrPnlMissingValues.Name = "ucrPnlMissingValues" + Me.ucrPnlMissingValues.Size = New System.Drawing.Size(143, 64) + Me.ucrPnlMissingValues.TabIndex = 0 + ' 'ucrPnlTransformOptions ' Me.ucrPnlTransformOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -885,47 +919,13 @@ Partial Class dlgTransform Me.ucrChkDecreasing.Size = New System.Drawing.Size(100, 23) Me.ucrChkDecreasing.TabIndex = 12 ' - 'ucrPnlNumericOptions - ' - Me.ucrPnlNumericOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlNumericOptions.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlNumericOptions.Name = "ucrPnlNumericOptions" - Me.ucrPnlNumericOptions.Size = New System.Drawing.Size(79, 179) - Me.ucrPnlNumericOptions.TabIndex = 0 - ' - 'rdoLogical - ' - Me.rdoLogical.AutoSize = True - Me.rdoLogical.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoLogical.Location = New System.Drawing.Point(11, 174) - Me.rdoLogical.Name = "rdoLogical" - Me.rdoLogical.Size = New System.Drawing.Size(59, 17) - Me.rdoLogical.TabIndex = 34 - Me.rdoLogical.TabStop = True - Me.rdoLogical.Text = "Logical" - Me.rdoLogical.UseVisualStyleBackColor = True - ' - 'ucrInputLogicOperations - ' - Me.ucrInputLogicOperations.AddQuotesIfUnrecognised = True - Me.ucrInputLogicOperations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputLogicOperations.GetSetSelectedIndex = -1 - Me.ucrInputLogicOperations.IsReadOnly = False - Me.ucrInputLogicOperations.Location = New System.Drawing.Point(91, 174) - Me.ucrInputLogicOperations.Name = "ucrInputLogicOperations" - Me.ucrInputLogicOperations.Size = New System.Drawing.Size(44, 21) - Me.ucrInputLogicOperations.TabIndex = 35 - ' - 'ucrInputLogicalValues + 'ucrPnlTies ' - Me.ucrInputLogicalValues.AddQuotesIfUnrecognised = True - Me.ucrInputLogicalValues.AutoSize = True - Me.ucrInputLogicalValues.IsMultiline = False - Me.ucrInputLogicalValues.IsReadOnly = False - Me.ucrInputLogicalValues.Location = New System.Drawing.Point(138, 174) - Me.ucrInputLogicalValues.Name = "ucrInputLogicalValues" - Me.ucrInputLogicalValues.Size = New System.Drawing.Size(51, 21) - Me.ucrInputLogicalValues.TabIndex = 36 + Me.ucrPnlTies.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlTies.Location = New System.Drawing.Point(7, 14) + Me.ucrPnlTies.Name = "ucrPnlTies" + Me.ucrPnlTies.Size = New System.Drawing.Size(96, 114) + Me.ucrPnlTies.TabIndex = 0 ' 'dlgTransform ' diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index 23f6abed88a..e3c123418cd 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -49,6 +49,8 @@ Public Class dlgTransform Private clsNumericDummyFunction As RFunction Private clsNonNegativeDummyFunction As RFunction Private clsPreviewTextFunction As New RCodeStructure + Private clsBooleanOperator As New ROperator + Private clsIsNAFunction As New RFunction Private bResetRCode As Boolean = True Private Sub dlgRank_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -132,7 +134,7 @@ Public Class dlgTransform ucrPnlNumericOptions.AddParameterValuesCondition(rdoLag, "check", "lag") ucrPnlNumericOptions.AddParameterValuesCondition(rdoLead, "check", "lead") ucrPnlNumericOptions.AddParameterValuesCondition(rdoDifference, "check", "diff") - 'ucrPnlNumericOptions.AddParameterValuesCondition(rdoLogical, "check", "logic") + ucrPnlNumericOptions.AddParameterValuesCondition(rdoLogical, "check", "logical") ucrPnlNonNegative.AddRadioButton(rdoSquareRoot) ucrPnlNonNegative.AddRadioButton(rdoLogToBase10) @@ -150,7 +152,7 @@ Public Class dlgTransform ucrPnlNumericOptions.AddToLinkedControls(ucrNudDiffLag, {rdoDifference}, bNewLinkedHideIfParameterMissing:=True) ucrPnlNumericOptions.AddToLinkedControls(ucrNudLagPosition, {rdoLag}, bNewLinkedHideIfParameterMissing:=True) ucrPnlNumericOptions.AddToLinkedControls(ucrChkOmitNA, {rdoStandardize}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlNumericOptions.AddToLinkedControls({ucrInputLogicalValues, ucrInputLogicOperations}, {rdoLogical}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlNumericOptions.AddToLinkedControls({ucrInputLogicOperations}, {rdoLogical}, bNewLinkedHideIfParameterMissing:=True) ucrPnlNonNegative.AddToLinkedControls(ucrInputPower, {rdoPower}, bNewLinkedHideIfParameterMissing:=True) ucrPnlTransformOptions.AddToLinkedControls(ucrPnlMissingValues, {rdoRank}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlTransformOptions.AddToLinkedControls(ucrPnlTies, {rdoRank}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -165,6 +167,7 @@ Public Class dlgTransform ucrChkDivide.AddToLinkedControls(ucrInputDivide, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="1") ucrChkAdd.AddToLinkedControls(ucrInputAdd, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="0") ucrChkPreview.AddToLinkedControls({ucrInputPreview, ucrChkEditPreview}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputLogicOperations.AddToLinkedControls({ucrInputLogicalValues}, {"==", "<", "<=", ">", ">=", "!=", "%in%"}, bNewLinkedHideIfParameterMissing:=True) ucrNudSignifDigits.SetLinkedDisplayControl(lblDigits) ucrNudRoundOfDigits.SetLinkedDisplayControl(lblRoundofDigits) @@ -199,8 +202,9 @@ Public Class dlgTransform ucrInputLogicalValues.SetParameter(New RParameter("x", 1)) ucrInputLogicalValues.AddQuotesIfUnrecognised = False + ucrInputLogicalValues.SetValidationTypeAsNumeric() - ucrInputLogicOperations.SetItems({"==", "<", "<=", ">", ">=", "!=", "is.na", "!is.na"}) + ucrInputLogicOperations.SetItems({"==", "<", "<=", ">", ">=", "!=", "%in%", "is.na", "!is.na"}) ucrInputLogicOperations.SetDropDownStyleAsNonEditable() ucrInputPower.SetParameter(New RParameter("y", 1)) @@ -325,10 +329,13 @@ Public Class dlgTransform clsNumericDummyFunction = New RFunction clsNonNegativeDummyFunction = New RFunction clsPreviewTextFunction = New RCodeStructure + clsBooleanOperator = New ROperator + clsIsNAFunction = New RFunction ucrSelectorForRank.Reset() ucrReceiverRank.SetMeAsReceiver() ucrSaveNew.Reset() + ucrInputLogicOperations.SetText("==") clsConstantDummyFunction.AddParameter("checked", "FALSE", iPosition:=0) clsConstantDummyFunction.AddParameter("preview", "TRUE", iPosition:=1) @@ -413,6 +420,9 @@ Public Class dlgTransform clsPreviewOperator.bBrackets = False clsPreviewOperator.bToScriptAsRString = False + clsBooleanOperator.SetOperation("==") + clsIsNAFunction.SetRCommand("is.na") + clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0) clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0) clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0) @@ -436,6 +446,8 @@ Public Class dlgTransform ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleSubtractOperator, New RParameter("x", 0), iAdditionalPairNo:=11) ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleMeanFunction, New RParameter("x", 0), iAdditionalPairNo:=12) ucrReceiverRank.AddAdditionalCodeParameterPair(clsScaleMinFunction, New RParameter("x", 0), iAdditionalPairNo:=13) + ucrReceiverRank.AddAdditionalCodeParameterPair(clsBooleanOperator, New RParameter("x", 0), iAdditionalPairNo:=14) + ucrReceiverRank.AddAdditionalCodeParameterPair(clsIsNAFunction, New RParameter("x", 0), iAdditionalPairNo:=15) ucrChkOmitNA.AddAdditionalCodeParameterPair(clsStandardDevFunction, ucrChkOmitNA.GetParameter(), iAdditionalPairNo:=1) ucrSaveNew.AddAdditionalRCode(clsLeadFunction, iAdditionalPairNo:=1) @@ -451,6 +463,8 @@ Public Class dlgTransform ucrSaveNew.AddAdditionalRCode(clsPowerOperator, iAdditionalPairNo:=11) ucrSaveNew.AddAdditionalRCode(clsScaleAddOperator, iAdditionalPairNo:=12) ucrSaveNew.AddAdditionalRCode(clsPreviewOperator, iAdditionalPairNo:=13) + ucrSaveNew.AddAdditionalRCode(clsBooleanOperator, iAdditionalPairNo:=14) + ucrSaveNew.AddAdditionalRCode(clsIsNAFunction, iAdditionalPairNo:=15) ucrPnlTransformOptions.SetRCode(clsDummyTransformFunction, bReset) ucrReceiverRank.SetRCode(clsRankFunction, bReset) @@ -500,7 +514,8 @@ Public Class dlgTransform ucrNudLagLeadPosition.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, ucrChkAddConstant.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputAdd.ControlValueChanged, ucrInputDivide.ControlValueChanged, ucrInputMultiply.ControlValueChanged, ucrInputSubtract.ControlValueChanged, ucrChkAdd.ControlValueChanged, - ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrChkPreview.ControlValueChanged + ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrChkPreview.ControlValueChanged, + ucrInputLogicOperations.ControlValueChanged, ucrInputLogicalValues.ControlValueChanged, ucrReceiverRank.ControlValueChanged ucrBase.clsRsyntax.ClearCodes() If rdoRank.Checked Then clsPreviewTextFunction = clsRankFunction.Clone @@ -536,6 +551,34 @@ Public Class dlgTransform clsPreviewTextFunction = clsDivisionOperator.Clone clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsDivisionOperator) + ElseIf rdoLogical.Checked Then + clsNumericDummyFunction.AddParameter("check", "logical", iPosition:=0) + clsPreviewTextFunction = clsBooleanOperator.Clone + ucrBase.clsRsyntax.SetBaseROperator(clsBooleanOperator) + Select Case ucrInputLogicOperations.GetText + Case "==" + clsBooleanOperator.SetOperation("==") + Case "<" + clsBooleanOperator.SetOperation("<") + Case "<=" + clsBooleanOperator.SetOperation("<=") + Case ">" + clsBooleanOperator.SetOperation(">") + Case ">=" + clsBooleanOperator.SetOperation(">=") + Case "!=" + clsBooleanOperator.SetOperation("!=") + Case "%in%" + clsBooleanOperator.SetOperation("%in%") + Case "is.na" + clsIsNAFunction.SetRCommand("is.na") + clsPreviewTextFunction = clsIsNAFunction.Clone + ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction) + Case "!is.na" + clsIsNAFunction.SetRCommand("!is.na") + clsPreviewTextFunction = clsIsNAFunction.Clone + ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction) + End Select End If ElseIf rdoNonNegative.Checked Then UpdateConstantParameter() @@ -606,11 +649,6 @@ Public Class dlgTransform UpdateConstantParameter() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, - ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged - TestOKEnabled() - End Sub - Private Sub ResetPreview() If Not bResetRCode Then Exit Sub @@ -639,4 +677,17 @@ Public Class dlgTransform ucrBase.clsRsyntax.RemoveFromAfterCodes(clsPreviewOperator) End If End Sub + + Private Sub ucrInputLogicalValues_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputLogicalValues.ControlValueChanged + If Not ucrInputLogicalValues.IsEmpty Then + clsBooleanOperator.AddParameter("right", ucrInputLogicalValues.GetText, iPosition:=1) + Else + clsBooleanOperator.RemoveParameterByName("right") + End If + End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, + ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged + TestOKEnabled() + End Sub End Class From b84b00ce11f00c79716de710bfdef961b274f3ea Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 22 Feb 2022 17:02:55 +0300 Subject: [PATCH 49/68] conflict resolution --- instat/dlgTransform.vb | 86 ++++-------------------------------------- 1 file changed, 7 insertions(+), 79 deletions(-) diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index f6319ff6cbb..9a05156d8de 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -508,7 +508,7 @@ Public Class dlgTransform TestOKEnabled() ucrChkEditPreview.Checked = False End Sub - + Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, ucrPnlNonNegative.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrNudLagPosition.ControlValueChanged, ucrNudLagLeadPosition.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, @@ -599,70 +599,11 @@ Public Class dlgTransform clsPreviewTextFunction = clsNaturalLogFunction.Clone clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsNaturalLogFunction) - - Private Sub BaseFunctions() - If bResetRCode Then - ucrBase.clsRsyntax.ClearCodes() - If rdoRank.Checked Then - clsPreviewTextFunction = clsRankFunction.Clone - clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRankFunction) - ElseIf rdoSort.Checked Then - clsPreviewTextFunction = clsSortFunction.Clone - clsDummyTransformFunction.AddParameter("check", "sort", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsSortFunction) - ElseIf rdoNumeric.Checked Then - clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0) - If rdoRoundOf.Checked Then - clsPreviewTextFunction = clsRoundFunction.Clone - clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRoundFunction) - ElseIf rdoSignificantDigits.Checked Then - clsPreviewTextFunction = clsSignifFunction.Clone - clsNumericDummyFunction.AddParameter("check", "signif", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsSignifFunction) - ElseIf rdoLag.Checked Then - clsPreviewTextFunction = clsLagFunction.Clone - clsNumericDummyFunction.AddParameter("check", "lag", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLagFunction) - ElseIf rdoLead.Checked Then - clsPreviewTextFunction = clsLeadFunction.Clone - clsNumericDummyFunction.AddParameter("check", "lead", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLeadFunction) - ElseIf rdoDifference.Checked Then - clsPreviewTextFunction = clsConcDiffFunction.Clone - clsNumericDummyFunction.AddParameter("check", "diff", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsConcDiffFunction) - ElseIf rdoStandardize.Checked Then - clsPreviewTextFunction = clsDivisionOperator.Clone - clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsDivisionOperator) - End If - ElseIf rdoNonNegative.Checked Then - UpdateConstantParameter() - clsDummyTransformFunction.AddParameter("check", "non-negative", iPosition:=0) - If rdoSquareRoot.Checked Then - clsPreviewTextFunction = clsSquarerootFunction.Clone - ucrBase.clsRsyntax.SetBaseRFunction(clsSquarerootFunction) - clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0) - ElseIf rdoPower.Checked Then - clsPreviewTextFunction = clsPowerOperator.Clone - clsNonNegativeDummyFunction.AddParameter("check", "power", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsPowerOperator) - ElseIf rdoLogToBase10.Checked Then - clsPreviewTextFunction = clsLogBase10Function.Clone - clsNonNegativeDummyFunction.AddParameter("check", "log10", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLogBase10Function) - ElseIf rdoNaturalLog.Checked Then - clsPreviewTextFunction = clsNaturalLogFunction.Clone - clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsNaturalLogFunction) - End If - ElseIf rdoScale.Checked Then - clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0) - clsPreviewTextFunction = clsScaleAddOperator.Clone - ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If + ElseIf rdoScale.Checked Then + clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0) + clsPreviewTextFunction = clsScaleAddOperator.Clone + ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If clsPreviewTextFunction.RemoveAssignTo() If Not ucrReceiverRank.IsEmpty Then @@ -670,12 +611,8 @@ Public Class dlgTransform Else ucrInputPreview.SetText("") End If - End Sub - Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, - ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged NewDefaultName() ResetPreview() - BaseFunctions() End Sub Private Sub ucrReceiverRank_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlValueChanged @@ -690,7 +627,6 @@ Public Class dlgTransform clsLogBase10Function.RemoveParameterByName("x") clsPowerOperator.RemoveParameterByName("x") End If - NewDefaultName() End Sub Private Sub UpdateConstantParameter() @@ -709,17 +645,9 @@ Public Class dlgTransform End If End Sub - Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged + Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrPnlNonNegative.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged UpdateConstantParameter() End Sub - - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, - ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, - ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, ucrChkMultiply.ControlContentsChanged, - ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, - ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged - TestOKEnabled() - End Sub Private Sub ResetPreview() If Not bResetRCode Then @@ -762,4 +690,4 @@ Public Class dlgTransform ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged TestOKEnabled() End Sub -End Class +End Class \ No newline at end of file From 5470eca8fabbbe201bebc4190c07f6b7af9cac57 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 23 Feb 2022 10:33:29 +0300 Subject: [PATCH 50/68] Fixing reset issue --- instat/dlgTransform.vb | 194 ++++++++++++++++++++--------------------- 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index 9a05156d8de..1cf820b6c2e 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -510,100 +510,97 @@ Public Class dlgTransform End Sub Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, - ucrPnlNonNegative.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrNudLagPosition.ControlValueChanged, - ucrNudLagLeadPosition.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, - ucrChkAddConstant.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputConstant.ControlValueChanged, - ucrInputAdd.ControlValueChanged, ucrInputDivide.ControlValueChanged, ucrInputMultiply.ControlValueChanged, ucrInputSubtract.ControlValueChanged, ucrChkAdd.ControlValueChanged, - ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrChkPreview.ControlValueChanged, - ucrInputLogicOperations.ControlValueChanged, ucrInputLogicalValues.ControlValueChanged, ucrReceiverRank.ControlValueChanged - ucrBase.clsRsyntax.ClearCodes() - If rdoRank.Checked Then - clsPreviewTextFunction = clsRankFunction.Clone - clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRankFunction) - ElseIf rdoSort.Checked Then - clsPreviewTextFunction = clsSortFunction.Clone - clsDummyTransformFunction.AddParameter("check", "sort", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsSortFunction) - ElseIf rdoNumeric.Checked Then - clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0) - If rdoRoundOf.Checked Then - clsPreviewTextFunction = clsRoundFunction.Clone - clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsRoundFunction) - ElseIf rdoSignificantDigits.Checked Then - clsPreviewTextFunction = clsSignifFunction.Clone - clsNumericDummyFunction.AddParameter("check", "signif", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsSignifFunction) - ElseIf rdoLag.Checked Then - clsPreviewTextFunction = clsLagFunction.Clone - clsNumericDummyFunction.AddParameter("check", "lag", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLagFunction) - ElseIf rdoLead.Checked Then - clsPreviewTextFunction = clsLeadFunction.Clone - clsNumericDummyFunction.AddParameter("check", "lead", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLeadFunction) - ElseIf rdoDifference.Checked Then - clsPreviewTextFunction = clsConcDiffFunction.Clone - clsNumericDummyFunction.AddParameter("check", "diff", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsConcDiffFunction) - ElseIf rdoStandardize.Checked Then - clsPreviewTextFunction = clsDivisionOperator.Clone - clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsDivisionOperator) - ElseIf rdoLogical.Checked Then - clsNumericDummyFunction.AddParameter("check", "logical", iPosition:=0) - clsPreviewTextFunction = clsBooleanOperator.Clone - ucrBase.clsRsyntax.SetBaseROperator(clsBooleanOperator) - Select Case ucrInputLogicOperations.GetText - Case "==" - clsBooleanOperator.SetOperation("==") - Case "<" - clsBooleanOperator.SetOperation("<") - Case "<=" - clsBooleanOperator.SetOperation("<=") - Case ">" - clsBooleanOperator.SetOperation(">") - Case ">=" - clsBooleanOperator.SetOperation(">=") - Case "!=" - clsBooleanOperator.SetOperation("!=") - Case "%in%" - clsBooleanOperator.SetOperation("%in%") - Case "is.na" - clsIsNAFunction.SetRCommand("is.na") - clsPreviewTextFunction = clsIsNAFunction.Clone - ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction) - Case "!is.na" - clsIsNAFunction.SetRCommand("!is.na") - clsPreviewTextFunction = clsIsNAFunction.Clone - ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction) - End Select - End If - ElseIf rdoNonNegative.Checked Then - UpdateConstantParameter() - clsDummyTransformFunction.AddParameter("check", "non-negative", iPosition:=0) - If rdoSquareRoot.Checked Then - clsPreviewTextFunction = clsSquarerootFunction.Clone - ucrBase.clsRsyntax.SetBaseRFunction(clsSquarerootFunction) - clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0) - ElseIf rdoPower.Checked Then - clsPreviewTextFunction = clsPowerOperator.Clone - clsNonNegativeDummyFunction.AddParameter("check", "power", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsPowerOperator) - ElseIf rdoLogToBase10.Checked Then - clsPreviewTextFunction = clsLogBase10Function.Clone - clsNonNegativeDummyFunction.AddParameter("check", "log10", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsLogBase10Function) - ElseIf rdoNaturalLog.Checked Then - clsPreviewTextFunction = clsNaturalLogFunction.Clone - clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsNaturalLogFunction) + ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged, ucrReceiverRank.ControlValueChanged + If bResetRCode Then + ucrBase.clsRsyntax.ClearCodes() + If rdoRank.Checked Then + clsPreviewTextFunction = clsRankFunction.Clone + clsDummyTransformFunction.AddParameter("check", "rank", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsRankFunction) + ElseIf rdoSort.Checked Then + clsPreviewTextFunction = clsSortFunction.Clone + clsDummyTransformFunction.AddParameter("check", "sort", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsSortFunction) + ElseIf rdoNumeric.Checked Then + clsDummyTransformFunction.AddParameter("check", "numeric", iPosition:=0) + If rdoRoundOf.Checked Then + clsPreviewTextFunction = clsRoundFunction.Clone + clsNumericDummyFunction.AddParameter("check", "round", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsRoundFunction) + ElseIf rdoSignificantDigits.Checked Then + clsPreviewTextFunction = clsSignifFunction.Clone + clsNumericDummyFunction.AddParameter("check", "signif", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsSignifFunction) + ElseIf rdoLag.Checked Then + clsPreviewTextFunction = clsLagFunction.Clone + clsNumericDummyFunction.AddParameter("check", "lag", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsLagFunction) + ElseIf rdoLead.Checked Then + clsPreviewTextFunction = clsLeadFunction.Clone + clsNumericDummyFunction.AddParameter("check", "lead", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsLeadFunction) + ElseIf rdoDifference.Checked Then + clsPreviewTextFunction = clsConcDiffFunction.Clone + clsNumericDummyFunction.AddParameter("check", "diff", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsConcDiffFunction) + ElseIf rdoStandardize.Checked Then + clsPreviewTextFunction = clsDivisionOperator.Clone + clsNumericDummyFunction.AddParameter("check", "standardise", iPosition:=0) + ucrBase.clsRsyntax.SetBaseROperator(clsDivisionOperator) + ElseIf rdoLogical.Checked Then + clsNumericDummyFunction.AddParameter("check", "logical", iPosition:=0) + clsPreviewTextFunction = clsBooleanOperator.Clone + ucrBase.clsRsyntax.SetBaseROperator(clsBooleanOperator) + Select Case ucrInputLogicOperations.GetText + Case "==" + clsBooleanOperator.SetOperation("==") + Case "<" + clsBooleanOperator.SetOperation("<") + Case "<=" + clsBooleanOperator.SetOperation("<=") + Case ">" + clsBooleanOperator.SetOperation(">") + Case ">=" + clsBooleanOperator.SetOperation(">=") + Case "!=" + clsBooleanOperator.SetOperation("!=") + Case "%in%" + clsBooleanOperator.SetOperation("%in%") + Case "is.na" + clsIsNAFunction.SetRCommand("is.na") + clsPreviewTextFunction = clsIsNAFunction.Clone + ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction) + Case "!is.na" + clsIsNAFunction.SetRCommand("!is.na") + clsPreviewTextFunction = clsIsNAFunction.Clone + ucrBase.clsRsyntax.SetBaseRFunction(clsIsNAFunction) + End Select + End If + ElseIf rdoNonNegative.Checked Then + UpdateConstantParameter() + clsDummyTransformFunction.AddParameter("check", "non-negative", iPosition:=0) + If rdoSquareRoot.Checked Then + clsPreviewTextFunction = clsSquarerootFunction.Clone + ucrBase.clsRsyntax.SetBaseRFunction(clsSquarerootFunction) + clsNonNegativeDummyFunction.AddParameter("check", "sqrt", iPosition:=0) + ElseIf rdoPower.Checked Then + clsPreviewTextFunction = clsPowerOperator.Clone + clsNonNegativeDummyFunction.AddParameter("check", "power", iPosition:=0) + ucrBase.clsRsyntax.SetBaseROperator(clsPowerOperator) + ElseIf rdoLogToBase10.Checked Then + clsPreviewTextFunction = clsLogBase10Function.Clone + clsNonNegativeDummyFunction.AddParameter("check", "log10", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsLogBase10Function) + ElseIf rdoNaturalLog.Checked Then + clsPreviewTextFunction = clsNaturalLogFunction.Clone + clsNonNegativeDummyFunction.AddParameter("check", "log", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsNaturalLogFunction) + End If + ElseIf rdoScale.Checked Then + clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0) + clsPreviewTextFunction = clsScaleAddOperator.Clone + ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If - ElseIf rdoScale.Checked Then - clsDummyTransformFunction.AddParameter("check", "scale", iPosition:=0) - clsPreviewTextFunction = clsScaleAddOperator.Clone - ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If clsPreviewTextFunction.RemoveAssignTo() If Not ucrReceiverRank.IsEmpty Then @@ -611,11 +608,12 @@ Public Class dlgTransform Else ucrInputPreview.SetText("") End If + UpdateNonNegativeParameters() NewDefaultName() ResetPreview() End Sub - Private Sub ucrReceiverRank_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlValueChanged + Private Sub UpdateNonNegativeParameters() If Not ucrReceiverRank.IsEmpty Then clsSquarerootFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverRank.GetVariables, iPosition:=0) clsNaturalLogFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverRank.GetVariables, iPosition:=0) @@ -645,7 +643,7 @@ Public Class dlgTransform End If End Sub - Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrPnlNonNegative.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged + Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged UpdateConstantParameter() End Sub @@ -686,8 +684,10 @@ Public Class dlgTransform End If End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, - ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, + ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, + ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, + ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged TestOKEnabled() End Sub End Class \ No newline at end of file From 7485c97daf1f3ac3a14a9e9c0e7ec78caf42ba6e Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 23 Feb 2022 15:46:28 +0300 Subject: [PATCH 51/68] Minor changes to the Test OK. --- instat/dlgTransform.vb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index 1cf820b6c2e..e50d2501033 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -493,7 +493,15 @@ Public Class dlgTransform End Sub Private Sub TestOKEnabled() - ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty() AndAlso ucrSaveNew.IsComplete) + If rdoNumeric.Checked AndAlso rdoLogical.Checked Then + If Not ucrInputLogicOperations.GetText = "is.na" AndAlso Not ucrInputLogicOperations.GetText = "!is.na" Then + ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty() AndAlso ucrSaveNew.IsComplete AndAlso Not ucrInputLogicalValues.IsEmpty) + Else + ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty() AndAlso ucrSaveNew.IsComplete) + End If + Else + ucrBase.OKEnabled(Not ucrReceiverRank.IsEmpty() AndAlso ucrSaveNew.IsComplete) + End If End Sub Private Sub NewDefaultName() @@ -687,7 +695,7 @@ Public Class dlgTransform Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, - ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged + ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged, ucrInputLogicalValues.ControlContentsChanged, ucrInputLogicOperations.ControlContentsChanged TestOKEnabled() End Sub End Class \ No newline at end of file From 97b11588b5ea844d828d839f410d6ea82e6d4b28 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 24 Feb 2022 15:00:56 +0300 Subject: [PATCH 52/68] changes --- instat/frmMain.Designer.vb | 40 +++++++++++++++++++------------------- instat/frmMain.vb | 8 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index c7549aa30d2..e9c2674fd93 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -634,6 +634,7 @@ Partial Class frmMain Me.mnuOptionsByContextCheckDataOneVariableSummarise = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextCheckDataOneVariableGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextCheckDataOneVariableFrequencies = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefineOptionsByContextData = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextPrepare = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator48 = New System.Windows.Forms.ToolStripSeparator() @@ -675,9 +676,8 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOptionsByContextDefineOptionsByContextData = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuDefineOptionsByContextDataDefineOptionsByContext = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefineOptionsByContextDataOnStation = New System.Windows.Forms.ToolStripMenuItem() + Me.OptionsByContextDefineOptionsByContextDataOnFarm = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -4702,6 +4702,13 @@ Partial Class frmMain Me.mnuOptionsByContextCheckDataOneVariableFrequencies.Size = New System.Drawing.Size(215, 22) Me.mnuOptionsByContextCheckDataOneVariableFrequencies.Text = "One Variable Frequencies..." ' + 'mnuOptionsByContextDefineOptionsByContextData + ' + Me.mnuOptionsByContextDefineOptionsByContextData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDefineOptionsByContextDataOnStation, Me.OptionsByContextDefineOptionsByContextDataOnFarm}) + Me.mnuOptionsByContextDefineOptionsByContextData.Name = "mnuOptionsByContextDefineOptionsByContextData" + Me.mnuOptionsByContextDefineOptionsByContextData.Size = New System.Drawing.Size(241, 22) + Me.mnuOptionsByContextDefineOptionsByContextData.Text = "Define Options By Context Data" + ' 'mnuOptionsByContextPrepare ' Me.mnuOptionsByContextPrepare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions, Me.ToolStripSeparator48, Me.mnuOptionsByContextMergeAdditionalData, Me.mnuOptionsByContextPrepareStack, Me.mnuOptionsByContextPrepareUnstack}) @@ -5079,24 +5086,17 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' - 'mnuOptionsByContextDefineOptionsByContextData - ' - Me.mnuOptionsByContextDefineOptionsByContextData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDefineOptionsByContextDataDefineOptionsByContext, Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure}) - Me.mnuOptionsByContextDefineOptionsByContextData.Name = "mnuOptionsByContextDefineOptionsByContextData" - Me.mnuOptionsByContextDefineOptionsByContextData.Size = New System.Drawing.Size(241, 22) - Me.mnuOptionsByContextDefineOptionsByContextData.Text = "Define Options By Context Data" - ' - 'mnuDefineOptionsByContextDataDefineOptionsByContext + 'mnuOptionsByContextDefineOptionsByContextDataOnStation ' - Me.mnuDefineOptionsByContextDataDefineOptionsByContext.Name = "mnuDefineOptionsByContextDataDefineOptionsByContext" - Me.mnuDefineOptionsByContextDataDefineOptionsByContext.Size = New System.Drawing.Size(220, 22) - Me.mnuDefineOptionsByContextDataDefineOptionsByContext.Text = "Define Options By Context.." + Me.mnuOptionsByContextDefineOptionsByContextDataOnStation.Name = "mnuOptionsByContextDefineOptionsByContextDataOnStation" + Me.mnuOptionsByContextDefineOptionsByContextDataOnStation.Size = New System.Drawing.Size(180, 22) + Me.mnuOptionsByContextDefineOptionsByContextDataOnStation.Text = "On - Station..." ' - 'mnuOptionsByContextDefineOptionsByContextDataColumnStructure + 'OptionsByContextDefineOptionsByContextDataOnFarm ' - Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Name = "mnuOptionsByContextDefineOptionsByContextDataColumnStructure" - Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Size = New System.Drawing.Size(220, 22) - Me.mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Text = "Column Structure..." + Me.OptionsByContextDefineOptionsByContextDataOnFarm.Name = "OptionsByContextDefineOptionsByContextDataOnFarm" + Me.OptionsByContextDefineOptionsByContextDataOnFarm.Size = New System.Drawing.Size(180, 22) + Me.OptionsByContextDefineOptionsByContextDataOnFarm.Text = "On - Farm..." ' 'frmMain ' @@ -5789,6 +5789,6 @@ Partial Class frmMain Friend WithEvents mnuModelFitModelMachineLearning As ToolStripMenuItem Friend WithEvents mnuDescribeMultivariateClusterAnalysis As ToolStripMenuItem Friend WithEvents mnuOptionsByContextDefineOptionsByContextData As ToolStripMenuItem - Friend WithEvents mnuDefineOptionsByContextDataDefineOptionsByContext As ToolStripMenuItem - Friend WithEvents mnuOptionsByContextDefineOptionsByContextDataColumnStructure As ToolStripMenuItem + Friend WithEvents mnuOptionsByContextDefineOptionsByContextDataOnStation As ToolStripMenuItem + Friend WithEvents OptionsByContextDefineOptionsByContextDataOnFarm As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 19ed887da48..0571dc08c39 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2424,11 +2424,11 @@ Public Class frmMain dlgClusterAnalysis.ShowDialog() End Sub - Private Sub mnuDefineOptionsByContextDataDefineOptionsByContext_Click(sender As Object, e As EventArgs) Handles mnuDefineOptionsByContextDataDefineOptionsByContext.Click - dlgDefineOptionsByContext.ShowDialog() + Private Sub mnuOptionsByContextDefineOptionsByContextDataOnStation_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOptionsByContextDataOnStation.Click + dlgColumnStructure.ShowDialog() End Sub - Private Sub mnuOptionsByContextDefineOptionsByContextDataColumnStructure_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOptionsByContextDataColumnStructure.Click - dlgColumnStructure.ShowDialog() + Private Sub OptionsByContextDefineOptionsByContextDataOnFarm_Click(sender As Object, e As EventArgs) Handles OptionsByContextDefineOptionsByContextDataOnFarm.Click + dlgDefineOptionsByContext.ShowDialog() End Sub End Class From 93708a76c1eed014153dac00a31dfc9bcf0db0de Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 24 Feb 2022 15:20:50 +0300 Subject: [PATCH 53/68] changes --- instat/frmMain.Designer.vb | 52 +++++++++++++++++++------------------- instat/frmMain.vb | 4 +-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index e9c2674fd93..1d7e4b9e2e2 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -634,7 +634,6 @@ Partial Class frmMain Me.mnuOptionsByContextCheckDataOneVariableSummarise = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextCheckDataOneVariableGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextCheckDataOneVariableFrequencies = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOptionsByContextDefineOptionsByContextData = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextPrepare = New System.Windows.Forms.ToolStripMenuItem() Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator48 = New System.Windows.Forms.ToolStripSeparator() @@ -676,8 +675,9 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOptionsByContextDefineOptionsByContextDataOnStation = New System.Windows.Forms.ToolStripMenuItem() - Me.OptionsByContextDefineOptionsByContextDataOnFarm = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefine = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefineOnStation = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOptionsByContextDefineOnFarm = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -4655,7 +4655,7 @@ Partial Class frmMain ' 'mnuOptionsByContext ' - Me.mnuOptionsByContext.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckData, Me.mnuOptionsByContextDefineOptionsByContextData, Me.mnuOptionsByContextPrepare, Me.mnuOptionsByContextDescribe, Me.mnuOptionsByContextModel}) + Me.mnuOptionsByContext.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckData, Me.mnuOptionsByContextDefine, Me.mnuOptionsByContextPrepare, Me.mnuOptionsByContextDescribe, Me.mnuOptionsByContextModel}) Me.mnuOptionsByContext.Name = "mnuOptionsByContext" Me.mnuOptionsByContext.Size = New System.Drawing.Size(122, 20) Me.mnuOptionsByContext.Text = "Options by Context" @@ -4664,7 +4664,7 @@ Partial Class frmMain ' Me.mnuOptionsByContextCheckData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextCheckDataDuplicates, Me.mnuOptionsByContextCheckDataCompareColumns, Me.ToolStripSeparator47, Me.mnuOptionsByContextCheckDataOneVariableSummarise, Me.mnuOptionsByContextCheckDataOneVariableGraph, Me.mnuOptionsByContextCheckDataOneVariableFrequencies}) Me.mnuOptionsByContextCheckData.Name = "mnuOptionsByContextCheckData" - Me.mnuOptionsByContextCheckData.Size = New System.Drawing.Size(241, 22) + Me.mnuOptionsByContextCheckData.Size = New System.Drawing.Size(180, 22) Me.mnuOptionsByContextCheckData.Text = "Check Data" ' 'mnuOptionsByContextCheckDataDuplicates @@ -4702,18 +4702,11 @@ Partial Class frmMain Me.mnuOptionsByContextCheckDataOneVariableFrequencies.Size = New System.Drawing.Size(215, 22) Me.mnuOptionsByContextCheckDataOneVariableFrequencies.Text = "One Variable Frequencies..." ' - 'mnuOptionsByContextDefineOptionsByContextData - ' - Me.mnuOptionsByContextDefineOptionsByContextData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDefineOptionsByContextDataOnStation, Me.OptionsByContextDefineOptionsByContextDataOnFarm}) - Me.mnuOptionsByContextDefineOptionsByContextData.Name = "mnuOptionsByContextDefineOptionsByContextData" - Me.mnuOptionsByContextDefineOptionsByContextData.Size = New System.Drawing.Size(241, 22) - Me.mnuOptionsByContextDefineOptionsByContextData.Text = "Define Options By Context Data" - ' 'mnuOptionsByContextPrepare ' Me.mnuOptionsByContextPrepare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions, Me.ToolStripSeparator48, Me.mnuOptionsByContextMergeAdditionalData, Me.mnuOptionsByContextPrepareStack, Me.mnuOptionsByContextPrepareUnstack}) Me.mnuOptionsByContextPrepare.Name = "mnuOptionsByContextPrepare" - Me.mnuOptionsByContextPrepare.Size = New System.Drawing.Size(241, 22) + Me.mnuOptionsByContextPrepare.Size = New System.Drawing.Size(180, 22) Me.mnuOptionsByContextPrepare.Text = "Prepare" ' 'mnuOptionsByContextPrepareCalculateDIfferenceBetweenOptions @@ -4749,7 +4742,7 @@ Partial Class frmMain ' Me.mnuOptionsByContextDescribe.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDescribeCompareTwoTreatments, Me.mnuOptionsByContextDescribeCompareMultipleTreatments, Me.mnuOptionsByContextDescribeBoxplot}) Me.mnuOptionsByContextDescribe.Name = "mnuOptionsByContextDescribe" - Me.mnuOptionsByContextDescribe.Size = New System.Drawing.Size(241, 22) + Me.mnuOptionsByContextDescribe.Size = New System.Drawing.Size(180, 22) Me.mnuOptionsByContextDescribe.Text = "Describe" ' 'mnuOptionsByContextDescribeCompareTwoTreatments @@ -4775,7 +4768,7 @@ Partial Class frmMain ' Me.mnuOptionsByContextModel.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextModelFitModel, Me.mnuOptionsByContextGeneralFitModel}) Me.mnuOptionsByContextModel.Name = "mnuOptionsByContextModel" - Me.mnuOptionsByContextModel.Size = New System.Drawing.Size(241, 22) + Me.mnuOptionsByContextModel.Size = New System.Drawing.Size(180, 22) Me.mnuOptionsByContextModel.Text = "Model" ' 'mnuOptionsByContextModelFitModel @@ -5086,17 +5079,24 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' - 'mnuOptionsByContextDefineOptionsByContextDataOnStation + 'mnuOptionsByContextDefine + ' + Me.mnuOptionsByContextDefine.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuOptionsByContextDefineOnStation, Me.mnuOptionsByContextDefineOnFarm}) + Me.mnuOptionsByContextDefine.Name = "mnuOptionsByContextDefine" + Me.mnuOptionsByContextDefine.Size = New System.Drawing.Size(180, 22) + Me.mnuOptionsByContextDefine.Text = "Define" + ' + 'mnuOptionsByContextDefineOnStation ' - Me.mnuOptionsByContextDefineOptionsByContextDataOnStation.Name = "mnuOptionsByContextDefineOptionsByContextDataOnStation" - Me.mnuOptionsByContextDefineOptionsByContextDataOnStation.Size = New System.Drawing.Size(180, 22) - Me.mnuOptionsByContextDefineOptionsByContextDataOnStation.Text = "On - Station..." + Me.mnuOptionsByContextDefineOnStation.Name = "mnuOptionsByContextDefineOnStation" + Me.mnuOptionsByContextDefineOnStation.Size = New System.Drawing.Size(180, 22) + Me.mnuOptionsByContextDefineOnStation.Text = "On - Station..." ' - 'OptionsByContextDefineOptionsByContextDataOnFarm + 'mnuOptionsByContextDefineOnFarm ' - Me.OptionsByContextDefineOptionsByContextDataOnFarm.Name = "OptionsByContextDefineOptionsByContextDataOnFarm" - Me.OptionsByContextDefineOptionsByContextDataOnFarm.Size = New System.Drawing.Size(180, 22) - Me.OptionsByContextDefineOptionsByContextDataOnFarm.Text = "On - Farm..." + Me.mnuOptionsByContextDefineOnFarm.Name = "mnuOptionsByContextDefineOnFarm" + Me.mnuOptionsByContextDefineOnFarm.Size = New System.Drawing.Size(180, 22) + Me.mnuOptionsByContextDefineOnFarm.Text = "On - Farm..." ' 'frmMain ' @@ -5788,7 +5788,7 @@ Partial Class frmMain Friend WithEvents ToolStripSeparator72 As ToolStripSeparator Friend WithEvents mnuModelFitModelMachineLearning As ToolStripMenuItem Friend WithEvents mnuDescribeMultivariateClusterAnalysis As ToolStripMenuItem - Friend WithEvents mnuOptionsByContextDefineOptionsByContextData As ToolStripMenuItem - Friend WithEvents mnuOptionsByContextDefineOptionsByContextDataOnStation As ToolStripMenuItem - Friend WithEvents OptionsByContextDefineOptionsByContextDataOnFarm As ToolStripMenuItem + Friend WithEvents mnuOptionsByContextDefine As ToolStripMenuItem + Friend WithEvents mnuOptionsByContextDefineOnStation As ToolStripMenuItem + Friend WithEvents mnuOptionsByContextDefineOnFarm As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 0571dc08c39..bc81ce1a85f 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2424,11 +2424,11 @@ Public Class frmMain dlgClusterAnalysis.ShowDialog() End Sub - Private Sub mnuOptionsByContextDefineOptionsByContextDataOnStation_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOptionsByContextDataOnStation.Click + Private Sub mnuOptionsByContextDefineOnStation_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOnStation.Click dlgColumnStructure.ShowDialog() End Sub - Private Sub OptionsByContextDefineOptionsByContextDataOnFarm_Click(sender As Object, e As EventArgs) Handles OptionsByContextDefineOptionsByContextDataOnFarm.Click + Private Sub mnuOptionsByContextDefineOnFarm_Click(sender As Object, e As EventArgs) Handles mnuOptionsByContextDefineOnFarm.Click dlgDefineOptionsByContext.ShowDialog() End Sub End Class From 838d93fbe640556032ec98bacdc70ba1b051f38d Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 28 Feb 2022 14:22:36 +0300 Subject: [PATCH 54/68] minor changes --- instat/dlgDescribeTwoVarGraph.vb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index 7f3b87277ed..01fb712e258 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -47,7 +47,7 @@ Public Class dlgDescribeTwoVarGraph Private clsAesCategoricalByNumericXNumeric As RFunction Private strGeomParameterNames() As String = {"geom_jitter", "geom_violin", "geom_bar", "geom_mosaic", "geom_boxplot", "geom_point", "geom_line", "stat_summary_hline", "stat_summary_crossline", "geom_freqpoly", "geom_histogram", "geom_density"} - Public strFirstVariablesType, strSecondVariableType As String + Private strFirstVariablesType, strSecondVariableType As String Private dctThemeFunctions As Dictionary(Of String, RFunction) Private bFirstLoad As Boolean = True Private bReset As Boolean = True @@ -87,13 +87,8 @@ Public Class dlgDescribeTwoVarGraph ucrChkFlipCoordinates}, {rdoBy}, bNewLinkedHideIfParameterMissing:=True) ucrPnlByPairs.AddToLinkedControls({ucrChkLower, ucrReceiverColour}, {rdoPairs}, bNewLinkedHideIfParameterMissing:=True) - ucrChkLower.SetText("Lower") ucrChkLower.SetLinkedDisplayControl(grpTypeOfDispaly) - ucrChkDiagonal.SetText("Diagnol") - - ucrChkUpper.SetText("Upper") - ucrSelectorTwoVarGraph.SetParameter(New RParameter("data", 0)) ucrSelectorTwoVarGraph.SetParameterIsrfunction() @@ -738,7 +733,7 @@ Public Class dlgDescribeTwoVarGraph Private Sub ucrReceiverFirstVars_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged Results() - AddColumnParameter() + clsGGpairsFunction.AddParameter("columns", ucrReceiverFirstVars.ucrMultipleVariables.GetVariableNames(), iPosition:=1) End Sub Private Sub ucrReceiverSecondVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSecondVar.ControlValueChanged @@ -907,10 +902,6 @@ Public Class dlgDescribeTwoVarGraph AddDataFrame() End Sub - Private Sub AddColumnParameter() - clsGGpairsFunction.AddParameter("columns", ucrReceiverFirstVars.ucrMultipleVariables.GetVariableNames(), iPosition:=1) - End Sub - Private Sub AddDataFrame() Dim clsGetDataFrameFunction As RFunction = ucrSelectorTwoVarGraph.ucrAvailableDataFrames.clsCurrDataFrame.Clone clsGetDataFrameFunction.RemoveParameterByName("stack_data") From 082ac5ce762cc1ffd1c4d50e7ecdbd068803238e Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Mon, 28 Feb 2022 16:19:51 +0300 Subject: [PATCH 55/68] Removed unnecessary lines --- instat/dlgFromLibrary.vb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 8f83d98ac39..6e49e9a4026 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -325,12 +325,4 @@ Public Class dlgFromLibrary clsImportFunction.AddParameter("data_tables", clsRFunctionParameter:=clsListFunction) End If End Sub - - Private Sub ucrInputPackages_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPackages.ControlValueChanged - - End Sub - - Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged - - End Sub End Class \ No newline at end of file From fc70439797fdfdaba3470887eebe432d8ccf1809 Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Mon, 28 Feb 2022 17:27:08 +0300 Subject: [PATCH 56/68] Updating changes in preview --- instat/dlgTransform.Designer.vb | 354 ++++++++++++++++---------------- instat/dlgTransform.vb | 88 ++++---- 2 files changed, 228 insertions(+), 214 deletions(-) diff --git a/instat/dlgTransform.Designer.vb b/instat/dlgTransform.Designer.vb index 95ce8c5274d..c3df268c5ff 100644 --- a/instat/dlgTransform.Designer.vb +++ b/instat/dlgTransform.Designer.vb @@ -46,10 +46,12 @@ Partial Class dlgTransform Me.rdoMaximum = New System.Windows.Forms.RadioButton() Me.rdoMinimum = New System.Windows.Forms.RadioButton() Me.rdoAverage = New System.Windows.Forms.RadioButton() + Me.ucrPnlTies = New instat.UcrPanel() Me.grpMissingValues = New System.Windows.Forms.GroupBox() Me.rdoLast = New System.Windows.Forms.RadioButton() Me.rdoFirstMissingValues = New System.Windows.Forms.RadioButton() Me.rdoKeptAsMissing = New System.Windows.Forms.RadioButton() + Me.ucrPnlMissingValues = New instat.UcrPanel() Me.rdoRoundOf = New System.Windows.Forms.RadioButton() Me.rdoSignificantDigits = New System.Windows.Forms.RadioButton() Me.rdoStandardize = New System.Windows.Forms.RadioButton() @@ -57,17 +59,30 @@ Partial Class dlgTransform Me.rdoLead = New System.Windows.Forms.RadioButton() Me.rdoLag = New System.Windows.Forms.RadioButton() Me.grpNumericOptions = New System.Windows.Forms.GroupBox() + Me.ucrInputLogicalValues = New instat.ucrInputTextBox() + Me.ucrInputLogicOperations = New instat.ucrInputComboBox() Me.rdoLogical = New System.Windows.Forms.RadioButton() + Me.ucrChkOmitNA = New instat.ucrCheck() + Me.ucrNudLagPosition = New instat.ucrNud() Me.lblLagPosition = New System.Windows.Forms.Label() Me.lblRoundofDigits = New System.Windows.Forms.Label() + Me.ucrNudRoundOfDigits = New instat.ucrNud() + Me.ucrNudDiffLag = New instat.ucrNud() + Me.ucrNudLagLeadPosition = New instat.ucrNud() + Me.ucrNudSignifDigits = New instat.ucrNud() Me.lblDiffLag = New System.Windows.Forms.Label() Me.lblDigits = New System.Windows.Forms.Label() Me.lblLagLeadPosition = New System.Windows.Forms.Label() + Me.ucrPnlNumericOptions = New instat.UcrPanel() Me.grpNonNegative = New System.Windows.Forms.GroupBox() + Me.ucrInputPower = New instat.ucrInputComboBox() Me.rdoPower = New System.Windows.Forms.RadioButton() + Me.ucrInputConstant = New instat.ucrInputComboBox() Me.rdoSquareRoot = New System.Windows.Forms.RadioButton() Me.rdoNaturalLog = New System.Windows.Forms.RadioButton() Me.rdoLogToBase10 = New System.Windows.Forms.RadioButton() + Me.ucrChkAddConstant = New instat.ucrCheck() + Me.ucrPnlNonNegative = New instat.UcrPanel() Me.rdoNumeric = New System.Windows.Forms.RadioButton() Me.rdoNonNegative = New System.Windows.Forms.RadioButton() Me.rdoRank = New System.Windows.Forms.RadioButton() @@ -75,19 +90,6 @@ Partial Class dlgTransform Me.rdoScale = New System.Windows.Forms.RadioButton() Me.ttEditPreview = New System.Windows.Forms.ToolTip(Me.components) Me.cmdUpdatePreview = New System.Windows.Forms.Button() - Me.ucrInputLogicalValues = New instat.ucrInputTextBox() - Me.ucrInputLogicOperations = New instat.ucrInputComboBox() - Me.ucrChkOmitNA = New instat.ucrCheck() - Me.ucrNudLagPosition = New instat.ucrNud() - Me.ucrNudRoundOfDigits = New instat.ucrNud() - Me.ucrNudDiffLag = New instat.ucrNud() - Me.ucrNudLagLeadPosition = New instat.ucrNud() - Me.ucrNudSignifDigits = New instat.ucrNud() - Me.ucrPnlNumericOptions = New instat.UcrPanel() - Me.ucrInputPower = New instat.ucrInputComboBox() - Me.ucrInputConstant = New instat.ucrInputComboBox() - Me.ucrChkAddConstant = New instat.ucrCheck() - Me.ucrPnlNonNegative = New instat.UcrPanel() Me.ucrChkEditPreview = New instat.ucrCheck() Me.ucrChkPreview = New instat.ucrCheck() Me.ucrInputPreview = New instat.ucrInputTextBox() @@ -99,7 +101,6 @@ Partial Class dlgTransform Me.ucrChkDivide = New instat.ucrCheck() Me.ucrChkMultiply = New instat.ucrCheck() Me.ucrChkSubtract = New instat.ucrCheck() - Me.ucrPnlMissingValues = New instat.UcrPanel() Me.ucrPnlTransformOptions = New instat.UcrPanel() Me.ucrSaveNew = New instat.ucrSave() Me.ucrReceiverRank = New instat.ucrReceiverSingle() @@ -107,7 +108,6 @@ Partial Class dlgTransform Me.ucrSelectorForRank = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrChkMissingLast = New instat.ucrCheck() Me.ucrChkDecreasing = New instat.ucrCheck() - Me.ucrPnlTies = New instat.UcrPanel() Me.grpTies.SuspendLayout() Me.grpMissingValues.SuspendLayout() Me.grpNumericOptions.SuspendLayout() @@ -206,6 +206,14 @@ Partial Class dlgTransform Me.rdoAverage.Text = "Average" Me.rdoAverage.UseVisualStyleBackColor = True ' + 'ucrPnlTies + ' + Me.ucrPnlTies.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlTies.Location = New System.Drawing.Point(7, 14) + Me.ucrPnlTies.Name = "ucrPnlTies" + Me.ucrPnlTies.Size = New System.Drawing.Size(96, 114) + Me.ucrPnlTies.TabIndex = 0 + ' 'grpMissingValues ' Me.grpMissingValues.Controls.Add(Me.rdoLast) @@ -256,6 +264,14 @@ Partial Class dlgTransform Me.rdoKeptAsMissing.Text = "Keep as Missing" Me.rdoKeptAsMissing.UseVisualStyleBackColor = True ' + 'ucrPnlMissingValues + ' + Me.ucrPnlMissingValues.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMissingValues.Location = New System.Drawing.Point(6, 18) + Me.ucrPnlMissingValues.Name = "ucrPnlMissingValues" + Me.ucrPnlMissingValues.Size = New System.Drawing.Size(143, 64) + Me.ucrPnlMissingValues.TabIndex = 0 + ' 'rdoRoundOf ' Me.rdoRoundOf.AutoSize = True @@ -358,6 +374,28 @@ Partial Class dlgTransform Me.grpNumericOptions.TabStop = False Me.grpNumericOptions.Text = "Options" ' + 'ucrInputLogicalValues + ' + Me.ucrInputLogicalValues.AddQuotesIfUnrecognised = True + Me.ucrInputLogicalValues.AutoSize = True + Me.ucrInputLogicalValues.IsMultiline = False + Me.ucrInputLogicalValues.IsReadOnly = False + Me.ucrInputLogicalValues.Location = New System.Drawing.Point(138, 174) + Me.ucrInputLogicalValues.Name = "ucrInputLogicalValues" + Me.ucrInputLogicalValues.Size = New System.Drawing.Size(51, 21) + Me.ucrInputLogicalValues.TabIndex = 36 + ' + 'ucrInputLogicOperations + ' + Me.ucrInputLogicOperations.AddQuotesIfUnrecognised = True + Me.ucrInputLogicOperations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLogicOperations.GetSetSelectedIndex = -1 + Me.ucrInputLogicOperations.IsReadOnly = False + Me.ucrInputLogicOperations.Location = New System.Drawing.Point(76, 174) + Me.ucrInputLogicOperations.Name = "ucrInputLogicOperations" + Me.ucrInputLogicOperations.Size = New System.Drawing.Size(59, 21) + Me.ucrInputLogicOperations.TabIndex = 35 + ' 'rdoLogical ' Me.rdoLogical.AutoSize = True @@ -370,6 +408,28 @@ Partial Class dlgTransform Me.rdoLogical.Text = "Logical" Me.rdoLogical.UseVisualStyleBackColor = True ' + 'ucrChkOmitNA + ' + Me.ucrChkOmitNA.AutoSize = True + Me.ucrChkOmitNA.Checked = False + Me.ucrChkOmitNA.Location = New System.Drawing.Point(109, 70) + Me.ucrChkOmitNA.Name = "ucrChkOmitNA" + Me.ucrChkOmitNA.Size = New System.Drawing.Size(75, 23) + Me.ucrChkOmitNA.TabIndex = 33 + ' + 'ucrNudLagPosition + ' + Me.ucrNudLagPosition.AutoSize = True + Me.ucrNudLagPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudLagPosition.Location = New System.Drawing.Point(138, 94) + Me.ucrNudLagPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudLagPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagPosition.Name = "ucrNudLagPosition" + Me.ucrNudLagPosition.Size = New System.Drawing.Size(50, 20) + Me.ucrNudLagPosition.TabIndex = 25 + Me.ucrNudLagPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblLagPosition ' Me.lblLagPosition.AutoSize = True @@ -390,6 +450,58 @@ Partial Class dlgTransform Me.lblRoundofDigits.TabIndex = 23 Me.lblRoundofDigits.Text = "Decimals:" ' + 'ucrNudRoundOfDigits + ' + Me.ucrNudRoundOfDigits.AutoSize = True + Me.ucrNudRoundOfDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Location = New System.Drawing.Point(138, 16) + Me.ucrNudRoundOfDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudRoundOfDigits.Name = "ucrNudRoundOfDigits" + Me.ucrNudRoundOfDigits.Size = New System.Drawing.Size(50, 20) + Me.ucrNudRoundOfDigits.TabIndex = 22 + Me.ucrNudRoundOfDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudDiffLag + ' + Me.ucrNudDiffLag.AutoSize = True + Me.ucrNudDiffLag.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDiffLag.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDiffLag.Location = New System.Drawing.Point(138, 146) + Me.ucrNudDiffLag.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDiffLag.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDiffLag.Name = "ucrNudDiffLag" + Me.ucrNudDiffLag.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDiffLag.TabIndex = 19 + Me.ucrNudDiffLag.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudLagLeadPosition + ' + Me.ucrNudLagLeadPosition.AutoSize = True + Me.ucrNudLagLeadPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Location = New System.Drawing.Point(138, 120) + Me.ucrNudLagLeadPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLagLeadPosition.Name = "ucrNudLagLeadPosition" + Me.ucrNudLagLeadPosition.Size = New System.Drawing.Size(50, 20) + Me.ucrNudLagLeadPosition.TabIndex = 16 + Me.ucrNudLagLeadPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudSignifDigits + ' + Me.ucrNudSignifDigits.AutoSize = True + Me.ucrNudSignifDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSignifDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSignifDigits.Location = New System.Drawing.Point(138, 42) + Me.ucrNudSignifDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSignifDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSignifDigits.Name = "ucrNudSignifDigits" + Me.ucrNudSignifDigits.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSignifDigits.TabIndex = 14 + Me.ucrNudSignifDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblDiffLag ' Me.lblDiffLag.AutoSize = True @@ -420,6 +532,14 @@ Partial Class dlgTransform Me.lblLagLeadPosition.TabIndex = 17 Me.lblLagLeadPosition.Text = "Positions:" ' + 'ucrPnlNumericOptions + ' + Me.ucrPnlNumericOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlNumericOptions.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlNumericOptions.Name = "ucrPnlNumericOptions" + Me.ucrPnlNumericOptions.Size = New System.Drawing.Size(79, 179) + Me.ucrPnlNumericOptions.TabIndex = 0 + ' 'grpNonNegative ' Me.grpNonNegative.Controls.Add(Me.ucrInputPower) @@ -430,13 +550,24 @@ Partial Class dlgTransform Me.grpNonNegative.Controls.Add(Me.rdoLogToBase10) Me.grpNonNegative.Controls.Add(Me.ucrChkAddConstant) Me.grpNonNegative.Controls.Add(Me.ucrPnlNonNegative) - Me.grpNonNegative.Location = New System.Drawing.Point(238, 128) + Me.grpNonNegative.Location = New System.Drawing.Point(233, 126) Me.grpNonNegative.Name = "grpNonNegative" Me.grpNonNegative.Size = New System.Drawing.Size(195, 149) Me.grpNonNegative.TabIndex = 9 Me.grpNonNegative.TabStop = False Me.grpNonNegative.Text = "Options" ' + 'ucrInputPower + ' + Me.ucrInputPower.AddQuotesIfUnrecognised = True + Me.ucrInputPower.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputPower.GetSetSelectedIndex = -1 + Me.ucrInputPower.IsReadOnly = False + Me.ucrInputPower.Location = New System.Drawing.Point(126, 86) + Me.ucrInputPower.Name = "ucrInputPower" + Me.ucrInputPower.Size = New System.Drawing.Size(57, 21) + Me.ucrInputPower.TabIndex = 29 + ' 'rdoPower ' Me.rdoPower.AutoSize = True @@ -449,6 +580,17 @@ Partial Class dlgTransform Me.rdoPower.Text = "Power" Me.rdoPower.UseVisualStyleBackColor = True ' + 'ucrInputConstant + ' + Me.ucrInputConstant.AddQuotesIfUnrecognised = True + Me.ucrInputConstant.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputConstant.GetSetSelectedIndex = -1 + Me.ucrInputConstant.IsReadOnly = False + Me.ucrInputConstant.Location = New System.Drawing.Point(126, 114) + Me.ucrInputConstant.Name = "ucrInputConstant" + Me.ucrInputConstant.Size = New System.Drawing.Size(58, 21) + Me.ucrInputConstant.TabIndex = 34 + ' 'rdoSquareRoot ' Me.rdoSquareRoot.AutoSize = True @@ -485,6 +627,23 @@ Partial Class dlgTransform Me.rdoLogToBase10.Text = "Log (Base 10)" Me.rdoLogToBase10.UseVisualStyleBackColor = True ' + 'ucrChkAddConstant + ' + Me.ucrChkAddConstant.AutoSize = True + Me.ucrChkAddConstant.Checked = False + Me.ucrChkAddConstant.Location = New System.Drawing.Point(13, 116) + Me.ucrChkAddConstant.Name = "ucrChkAddConstant" + Me.ucrChkAddConstant.Size = New System.Drawing.Size(107, 23) + Me.ucrChkAddConstant.TabIndex = 30 + ' + 'ucrPnlNonNegative + ' + Me.ucrPnlNonNegative.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlNonNegative.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlNonNegative.Name = "ucrPnlNonNegative" + Me.ucrPnlNonNegative.Size = New System.Drawing.Size(92, 100) + Me.ucrPnlNonNegative.TabIndex = 19 + ' 'rdoNumeric ' Me.rdoNumeric.Appearance = System.Windows.Forms.Appearance.Button @@ -590,149 +749,6 @@ Partial Class dlgTransform Me.cmdUpdatePreview.Text = "Update" Me.cmdUpdatePreview.UseVisualStyleBackColor = True ' - 'ucrInputLogicalValues - ' - Me.ucrInputLogicalValues.AddQuotesIfUnrecognised = True - Me.ucrInputLogicalValues.AutoSize = True - Me.ucrInputLogicalValues.IsMultiline = False - Me.ucrInputLogicalValues.IsReadOnly = False - Me.ucrInputLogicalValues.Location = New System.Drawing.Point(138, 174) - Me.ucrInputLogicalValues.Name = "ucrInputLogicalValues" - Me.ucrInputLogicalValues.Size = New System.Drawing.Size(51, 21) - Me.ucrInputLogicalValues.TabIndex = 36 - ' - 'ucrInputLogicOperations - ' - Me.ucrInputLogicOperations.AddQuotesIfUnrecognised = True - Me.ucrInputLogicOperations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputLogicOperations.GetSetSelectedIndex = -1 - Me.ucrInputLogicOperations.IsReadOnly = False - Me.ucrInputLogicOperations.Location = New System.Drawing.Point(76, 174) - Me.ucrInputLogicOperations.Name = "ucrInputLogicOperations" - Me.ucrInputLogicOperations.Size = New System.Drawing.Size(59, 21) - Me.ucrInputLogicOperations.TabIndex = 35 - ' - 'ucrChkOmitNA - ' - Me.ucrChkOmitNA.AutoSize = True - Me.ucrChkOmitNA.Checked = False - Me.ucrChkOmitNA.Location = New System.Drawing.Point(109, 70) - Me.ucrChkOmitNA.Name = "ucrChkOmitNA" - Me.ucrChkOmitNA.Size = New System.Drawing.Size(75, 23) - Me.ucrChkOmitNA.TabIndex = 33 - ' - 'ucrNudLagPosition - ' - Me.ucrNudLagPosition.AutoSize = True - Me.ucrNudLagPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLagPosition.Location = New System.Drawing.Point(138, 94) - Me.ucrNudLagPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudLagPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagPosition.Name = "ucrNudLagPosition" - Me.ucrNudLagPosition.Size = New System.Drawing.Size(50, 20) - Me.ucrNudLagPosition.TabIndex = 25 - Me.ucrNudLagPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudRoundOfDigits - ' - Me.ucrNudRoundOfDigits.AutoSize = True - Me.ucrNudRoundOfDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Location = New System.Drawing.Point(138, 16) - Me.ucrNudRoundOfDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudRoundOfDigits.Name = "ucrNudRoundOfDigits" - Me.ucrNudRoundOfDigits.Size = New System.Drawing.Size(50, 20) - Me.ucrNudRoundOfDigits.TabIndex = 22 - Me.ucrNudRoundOfDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudDiffLag - ' - Me.ucrNudDiffLag.AutoSize = True - Me.ucrNudDiffLag.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDiffLag.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDiffLag.Location = New System.Drawing.Point(138, 146) - Me.ucrNudDiffLag.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDiffLag.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDiffLag.Name = "ucrNudDiffLag" - Me.ucrNudDiffLag.Size = New System.Drawing.Size(50, 20) - Me.ucrNudDiffLag.TabIndex = 19 - Me.ucrNudDiffLag.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudLagLeadPosition - ' - Me.ucrNudLagLeadPosition.AutoSize = True - Me.ucrNudLagLeadPosition.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Location = New System.Drawing.Point(138, 120) - Me.ucrNudLagLeadPosition.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLagLeadPosition.Name = "ucrNudLagLeadPosition" - Me.ucrNudLagLeadPosition.Size = New System.Drawing.Size(50, 20) - Me.ucrNudLagLeadPosition.TabIndex = 16 - Me.ucrNudLagLeadPosition.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudSignifDigits - ' - Me.ucrNudSignifDigits.AutoSize = True - Me.ucrNudSignifDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSignifDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSignifDigits.Location = New System.Drawing.Point(138, 42) - Me.ucrNudSignifDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSignifDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSignifDigits.Name = "ucrNudSignifDigits" - Me.ucrNudSignifDigits.Size = New System.Drawing.Size(50, 20) - Me.ucrNudSignifDigits.TabIndex = 14 - Me.ucrNudSignifDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrPnlNumericOptions - ' - Me.ucrPnlNumericOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlNumericOptions.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlNumericOptions.Name = "ucrPnlNumericOptions" - Me.ucrPnlNumericOptions.Size = New System.Drawing.Size(79, 179) - Me.ucrPnlNumericOptions.TabIndex = 0 - ' - 'ucrInputPower - ' - Me.ucrInputPower.AddQuotesIfUnrecognised = True - Me.ucrInputPower.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputPower.GetSetSelectedIndex = -1 - Me.ucrInputPower.IsReadOnly = False - Me.ucrInputPower.Location = New System.Drawing.Point(126, 86) - Me.ucrInputPower.Name = "ucrInputPower" - Me.ucrInputPower.Size = New System.Drawing.Size(57, 21) - Me.ucrInputPower.TabIndex = 29 - ' - 'ucrInputConstant - ' - Me.ucrInputConstant.AddQuotesIfUnrecognised = True - Me.ucrInputConstant.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputConstant.GetSetSelectedIndex = -1 - Me.ucrInputConstant.IsReadOnly = False - Me.ucrInputConstant.Location = New System.Drawing.Point(126, 114) - Me.ucrInputConstant.Name = "ucrInputConstant" - Me.ucrInputConstant.Size = New System.Drawing.Size(58, 21) - Me.ucrInputConstant.TabIndex = 34 - ' - 'ucrChkAddConstant - ' - Me.ucrChkAddConstant.AutoSize = True - Me.ucrChkAddConstant.Checked = False - Me.ucrChkAddConstant.Location = New System.Drawing.Point(13, 116) - Me.ucrChkAddConstant.Name = "ucrChkAddConstant" - Me.ucrChkAddConstant.Size = New System.Drawing.Size(107, 23) - Me.ucrChkAddConstant.TabIndex = 30 - ' - 'ucrPnlNonNegative - ' - Me.ucrPnlNonNegative.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlNonNegative.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlNonNegative.Name = "ucrPnlNonNegative" - Me.ucrPnlNonNegative.Size = New System.Drawing.Size(92, 100) - Me.ucrPnlNonNegative.TabIndex = 19 - ' 'ucrChkEditPreview ' Me.ucrChkEditPreview.AutoSize = True @@ -842,14 +858,6 @@ Partial Class dlgTransform Me.ucrChkSubtract.Size = New System.Drawing.Size(79, 23) Me.ucrChkSubtract.TabIndex = 21 ' - 'ucrPnlMissingValues - ' - Me.ucrPnlMissingValues.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMissingValues.Location = New System.Drawing.Point(6, 18) - Me.ucrPnlMissingValues.Name = "ucrPnlMissingValues" - Me.ucrPnlMissingValues.Size = New System.Drawing.Size(143, 64) - Me.ucrPnlMissingValues.TabIndex = 0 - ' 'ucrPnlTransformOptions ' Me.ucrPnlTransformOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -919,14 +927,6 @@ Partial Class dlgTransform Me.ucrChkDecreasing.Size = New System.Drawing.Size(100, 23) Me.ucrChkDecreasing.TabIndex = 12 ' - 'ucrPnlTies - ' - Me.ucrPnlTies.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlTies.Location = New System.Drawing.Point(7, 14) - Me.ucrPnlTies.Name = "ucrPnlTies" - Me.ucrPnlTies.Size = New System.Drawing.Size(96, 114) - Me.ucrPnlTies.TabIndex = 0 - ' 'dlgTransform ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -934,8 +934,9 @@ Partial Class dlgTransform Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(440, 445) Me.Controls.Add(Me.grpNumericOptions) - Me.Controls.Add(Me.cmdUpdatePreview) Me.Controls.Add(Me.grpNonNegative) + Me.Controls.Add(Me.grpTies) + Me.Controls.Add(Me.cmdUpdatePreview) Me.Controls.Add(Me.ucrChkEditPreview) Me.Controls.Add(Me.ucrChkPreview) Me.Controls.Add(Me.ucrInputPreview) @@ -961,7 +962,6 @@ Partial Class dlgTransform Me.Controls.Add(Me.ucrSelectorForRank) Me.Controls.Add(Me.ucrChkMissingLast) Me.Controls.Add(Me.ucrChkDecreasing) - Me.Controls.Add(Me.grpTies) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index e50d2501033..2489584935b 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -19,35 +19,35 @@ Imports instat.Translations Public Class dlgTransform Public bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsRankFunction As RFunction - Private clsSortFunction As RFunction - Private clsRoundFunction As RFunction - Private clsSignifFunction As RFunction - Private clsLagFunction As RFunction - Private clsLeadFunction As RFunction - Private clsDiffFunction As RFunction - Private clsConcDiffFunction As RFunction - Private clsReplicateFunction As RFunction - Private clsMeanFunction As RFunction - Private clsStandardDevFunction As RFunction - Private clsSubtractOperator As ROperator - Private clsDivisionOperator As ROperator - Private clsSquarerootFunction As RFunction - Private clsAddConstantOperator As ROperator - Private clsNaturalLogFunction As RFunction - Private clsLogBase10Function As RFunction - Private clsPowerOperator As ROperator - Private clsScaleSubtractOperator As ROperator - Private clsScaleMultiplyOperator As ROperator - Private clsScaleDivideOperator As ROperator - Private clsScaleAddOperator As ROperator - Private clsScaleMeanFunction As RFunction - Private clsScaleMinFunction As RFunction - Private clsPreviewOperator As ROperator - Private clsDummyTransformFunction As RFunction + Private clsRankFunction As New RFunction + Private clsSortFunction As New RFunction + Private clsRoundFunction As New RFunction + Private clsSignifFunction As New RFunction + Private clsLagFunction As New RFunction + Private clsLeadFunction As New RFunction + Private clsDiffFunction As New RFunction + Private clsConcDiffFunction As New RFunction + Private clsReplicateFunction As New RFunction + Private clsMeanFunction As New RFunction + Private clsStandardDevFunction As New RFunction + Private clsSubtractOperator As New ROperator + Private clsDivisionOperator As New ROperator + Private clsSquarerootFunction As New RFunction + Private clsAddConstantOperator As New ROperator + Private clsNaturalLogFunction As New RFunction + Private clsLogBase10Function As New RFunction + Private clsPowerOperator As New ROperator + Private clsScaleSubtractOperator As New ROperator + Private clsScaleMultiplyOperator As New ROperator + Private clsScaleDivideOperator As New ROperator + Private clsScaleAddOperator As New ROperator + Private clsScaleMeanFunction As New RFunction + Private clsScaleMinFunction As New RFunction + Private clsPreviewOperator As New ROperator + Private clsDummyTransformFunction As New RFunction Private clsConstantDummyFunction As New RFunction - Private clsNumericDummyFunction As RFunction - Private clsNonNegativeDummyFunction As RFunction + Private clsNumericDummyFunction As New RFunction + Private clsNonNegativeDummyFunction As New RFunction Private clsPreviewTextFunction As New RCodeStructure Private clsBooleanOperator As New ROperator Private clsIsNAFunction As New RFunction @@ -489,6 +489,7 @@ Public Class dlgTransform ucrPnlNonNegative.SetRCode(clsNonNegativeDummyFunction, bReset) ucrChkOmitNA.SetRCode(clsMeanFunction, bReset) ucrChkPreview.SetRCode(clsConstantDummyFunction, bReset) + ucrInputPreview.SetRCode(clsPreviewOperator, bReset) bResetRCode = True End Sub @@ -517,8 +518,11 @@ Public Class dlgTransform ucrChkEditPreview.Checked = False End Sub - Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, - ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged, ucrReceiverRank.ControlValueChanged + Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, ucrInputLogicalValues.ControlValueChanged, + ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrNudLagLeadPosition.ControlValueChanged, + ucrNudLagPosition.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputMultiply.ControlValueChanged, + ucrInputDivide.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputAdd.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrInputLogicOperations.ControlValueChanged, ucrInputPreview.ControlValueChanged, + ucrChkMissingLast.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkAdd.ControlValueChanged, ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged If bResetRCode Then ucrBase.clsRsyntax.ClearCodes() If rdoRank.Checked Then @@ -610,15 +614,20 @@ Public Class dlgTransform ucrBase.clsRsyntax.SetBaseROperator(clsScaleAddOperator) End If End If + SetPreviewText() + UpdateNonNegativeParameters() + NewDefaultName() + ResetPreview() + EditPreviewText() + End Sub + + Private Sub SetPreviewText() clsPreviewTextFunction.RemoveAssignTo() If Not ucrReceiverRank.IsEmpty Then - ucrInputPreview.SetText(clsPreviewTextFunction.ToScript) + ucrInputPreview.SetText(clsPreviewTextFunction.ToScript()) Else ucrInputPreview.SetText("") End If - UpdateNonNegativeParameters() - NewDefaultName() - ResetPreview() End Sub Private Sub UpdateNonNegativeParameters() @@ -669,9 +678,10 @@ Public Class dlgTransform Private Sub ucrChkEditPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEditPreview.ControlValueChanged ResetPreview() + EditPreviewText() End Sub - Private Sub ucrInputPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPreview.ControlValueChanged + Private Sub EditPreviewText() Dim clsGetVariablesFunc As RFunction = ucrReceiverRank.GetVariables If ucrChkEditPreview.Checked Then clsPreviewOperator.AddParameter("left", ucrInputPreview.GetValue, iPosition:=0) @@ -684,6 +694,10 @@ Public Class dlgTransform End If End Sub + Private Sub ucrInputLogicalValues_TextChanged(sender As Object, e As EventArgs) Handles ucrInputLogicalValues.TextChanged + SetPreviewText() + End Sub + Private Sub ucrInputLogicalValues_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputLogicalValues.ControlValueChanged If Not ucrInputLogicalValues.IsEmpty Then clsBooleanOperator.AddParameter("right", ucrInputLogicalValues.GetText, iPosition:=1) @@ -694,8 +708,8 @@ Public Class dlgTransform Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRank.ControlContentsChanged, ucrSaveNew.ControlContentsChanged, ucrPnlTransformOptions.ControlContentsChanged, ucrPnlNumericOptions.ControlContentsChanged, ucrPnlNonNegative.ControlContentsChanged, ucrChkDivide.ControlContentsChanged, - ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, - ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged, ucrInputLogicalValues.ControlContentsChanged, ucrInputLogicOperations.ControlContentsChanged + ucrChkMultiply.ControlContentsChanged, ucrChkSubtract.ControlContentsChanged, ucrChkAdd.ControlContentsChanged, ucrChkPreview.ControlContentsChanged, + ucrChkAddConstant.ControlContentsChanged, ucrInputPower.ControlContentsChanged, ucrInputPreview.ControlContentsChanged, ucrInputLogicalValues.ControlContentsChanged, ucrInputLogicOperations.ControlContentsChanged TestOKEnabled() End Sub End Class \ No newline at end of file From 469f0f427376dbda91e78952c62bde7d38e1a124 Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Mon, 28 Feb 2022 18:15:40 +0300 Subject: [PATCH 57/68] Changed the column header colour when the selection is made --- .../UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb index a12c8a3e5b1..3fbb02deb66 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb @@ -33,11 +33,18 @@ Public Class ucrDataViewReoGrid Public Event WorksheetRemoved(worksheet As clsWorksheetAdapter) Implements IDataViewGrid.WorksheetRemoved Public Sub AddColumns(visiblePage As clsDataFramePage) Implements IDataViewGrid.AddColumns Dim workSheetColumnHeader As ColumnHeader + Dim textColour As Color grdData.CurrentWorksheet.Columns = visiblePage.lstColumns.Count + + If GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied Then + textColour = Color.Red + Else + textColour = Color.DarkBlue + End If For i = 0 To visiblePage.lstColumns.Count - 1 workSheetColumnHeader = grdData.CurrentWorksheet.ColumnHeaders(i) workSheetColumnHeader.Text = visiblePage.lstColumns(i).strDisplayName - workSheetColumnHeader.TextColor = visiblePage.lstColumns(i).clsColour + workSheetColumnHeader.TextColor = textColour workSheetColumnHeader.Style.BackColor = visiblePage.lstColumns(i).clsBackGroundColour Next End Sub From 4cb1165eb7f386a3b353b2772e46b35985f5204d Mon Sep 17 00:00:00 2001 From: anastasia-mbithe Date: Wed, 2 Mar 2022 09:44:30 +0300 Subject: [PATCH 58/68] Minor fix --- instat/static/InstatObject/R/instat_object_R6.R | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 658dff9805b..3e1b8b07376 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2717,6 +2717,7 @@ DataBook$set("public", "add_flag_fields", function(data_name, col_names, key_col DataBook$set("public", "remove_empty", function(data_name, which = c("rows","cols")) { self$get_data_objects(data_name)$remove_empty(which = which) +}) DataBook$set("public", "replace_values_with_NA", function(data_name, row_index, column_index) { self$get_data_objects(data_name)$replace_values_with_NA(row_index = row_index, column_index = column_index) From 554560755e1cfe208eb1f1c4980a782f801e2086 Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Wed, 2 Mar 2022 10:37:37 +0300 Subject: [PATCH 59/68] minor code change --- instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb index 3fbb02deb66..875b6207d17 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb @@ -34,6 +34,7 @@ Public Class ucrDataViewReoGrid Public Sub AddColumns(visiblePage As clsDataFramePage) Implements IDataViewGrid.AddColumns Dim workSheetColumnHeader As ColumnHeader Dim textColour As Color + grdData.CurrentWorksheet.Columns = visiblePage.lstColumns.Count If GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied Then From f8eff72c6ae564e54625d0b8a65f940e5d496d22 Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Wed, 2 Mar 2022 11:03:10 +0300 Subject: [PATCH 60/68] Added some texts change --- instat/translations/rInstatTranslations.db | Bin 4849664 -> 4849664 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 08fa84dd30dd0c40525dcde538fb989efa3ed92f..f7d828dae2e497ed19c6ceedca05ba16f80a989d 100644 GIT binary patch delta 599 zcmXBKy=xO;0LSrrF3;U_iPgSbT3_1Oi%qJhCb4O>dNtN2+9>hu+bK3JoiRt_=Z zVj&%lK!p+^_8A0ei$kD;UF0?=adW6R`VY8Op>Be|=k=~JZrjn z^Iwy1)MjY;hjd50?^Yen@v2RSmY<2A53)s(c}bc0zCn;cZ^g$$6ILH zN_kOfuT%Agt^xxM!VrO7&;h$)4|GBobVCp55QSdogT1g1_QL__hXIJeK^O!B;&2Ft zAOT4jhQn|qXz1qiD})G*n@KVnq`67MOe(ZE&0iN=zw*6e)uM)Y?3!WCy4sqh`P)Nc za*U4DH(e8s!ZA1wDM&*GPC)y~!YJh6B%FdVI1OilP1mxAb>*uR4=qdVGn)(jQCCCD z%I_fBus$k`DN-U;dL*`p8e@g+0!@`N?MR4)Pq}dPnrGa1=PSn3%6w(6TDh0LyIm5s zce$i6-dGVaqp5x3%Uf%(zP@6?IGlw%oP!BC50g-UB3yurFa;&J6s)gYo^k&I*Ywex delta 499 zcmW;BJx>#10KoBku6NJ1yvR!tk@8lcV9}z~B5;TZ1qy)$0&${wfPqw_EF>(FpKbGV)JW9R&17(r-Y|WPlY^X zdCLBwI0z$x8q}f=^>}~=G@=R3h@u4#(TYcC!(+4~ zh7NS13*G2J9KGm6KN1+gAf5z%H2HZ&7&@$y36TzlRnm&+-oddi Date: Wed, 2 Mar 2022 11:10:03 +0300 Subject: [PATCH 61/68] Minor fixes on the Preview and Edit preview --- instat/dlgTransform.vb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/instat/dlgTransform.vb b/instat/dlgTransform.vb index 2489584935b..d70d5efca1a 100644 --- a/instat/dlgTransform.vb +++ b/instat/dlgTransform.vb @@ -489,7 +489,6 @@ Public Class dlgTransform ucrPnlNonNegative.SetRCode(clsNonNegativeDummyFunction, bReset) ucrChkOmitNA.SetRCode(clsMeanFunction, bReset) ucrChkPreview.SetRCode(clsConstantDummyFunction, bReset) - ucrInputPreview.SetRCode(clsPreviewOperator, bReset) bResetRCode = True End Sub @@ -521,7 +520,7 @@ Public Class dlgTransform Private Sub ucrPnlTransformOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlTransformOptions.ControlValueChanged, ucrPnlNumericOptions.ControlValueChanged, ucrInputLogicalValues.ControlValueChanged, ucrPnlNonNegative.ControlValueChanged, ucrPnlMissingValues.ControlValueChanged, ucrPnlTies.ControlValueChanged, ucrChkPreview.ControlValueChanged, ucrReceiverRank.ControlValueChanged, ucrNudDiffLag.ControlValueChanged, ucrNudLagLeadPosition.ControlValueChanged, ucrNudLagPosition.ControlValueChanged, ucrNudRoundOfDigits.ControlValueChanged, ucrNudSignifDigits.ControlValueChanged, ucrInputPower.ControlValueChanged, ucrInputMultiply.ControlValueChanged, - ucrInputDivide.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputAdd.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrInputLogicOperations.ControlValueChanged, ucrInputPreview.ControlValueChanged, + ucrInputDivide.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputAdd.ControlValueChanged, ucrChkOmitNA.ControlValueChanged, ucrInputLogicOperations.ControlValueChanged, ucrChkAddConstant.ControlValueChanged, ucrChkMissingLast.ControlValueChanged, ucrChkDecreasing.ControlValueChanged, ucrChkDivide.ControlValueChanged, ucrChkAdd.ControlValueChanged, ucrChkMultiply.ControlValueChanged, ucrChkSubtract.ControlValueChanged If bResetRCode Then ucrBase.clsRsyntax.ClearCodes() @@ -618,7 +617,6 @@ Public Class dlgTransform UpdateNonNegativeParameters() NewDefaultName() ResetPreview() - EditPreviewText() End Sub Private Sub SetPreviewText() @@ -660,10 +658,6 @@ Public Class dlgTransform End If End Sub - Private Sub ucrChkAddConstant_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddConstant.ControlValueChanged, ucrInputConstant.ControlValueChanged, ucrInputPreview.ControlValueChanged - UpdateConstantParameter() - End Sub - Private Sub ResetPreview() If Not bResetRCode Then Exit Sub @@ -678,10 +672,9 @@ Public Class dlgTransform Private Sub ucrChkEditPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEditPreview.ControlValueChanged ResetPreview() - EditPreviewText() End Sub - Private Sub EditPreviewText() + Private Sub ucrInputPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPreview.ControlValueChanged Dim clsGetVariablesFunc As RFunction = ucrReceiverRank.GetVariables If ucrChkEditPreview.Checked Then clsPreviewOperator.AddParameter("left", ucrInputPreview.GetValue, iPosition:=0) From da2fd5287f10c11bacf0c93b06da538acaa9e73e Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Wed, 2 Mar 2022 09:40:43 +0100 Subject: [PATCH 62/68] Update instat/dlgFromLibrary.vb --- instat/dlgFromLibrary.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 6e49e9a4026..1493ae4a817 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -325,4 +325,5 @@ Public Class dlgFromLibrary clsImportFunction.AddParameter("data_tables", clsRFunctionParameter:=clsListFunction) End If End Sub + End Class \ No newline at end of file From fda798b715cf009b2e5790997c9fc6980f074e9a Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Wed, 2 Mar 2022 12:38:49 +0300 Subject: [PATCH 63/68] Reverting the change on the preview text in the database --- instat/translations/rInstatTranslations.db | Bin 4849664 -> 4849664 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index f7d828dae2e497ed19c6ceedca05ba16f80a989d..a6c12710d0ad6740850651dd96ce899b9da1880c 100644 GIT binary patch delta 314 zcmWN=yDmck9LMpT-c;SGy0o-t-RoM^ac^;WiRN3Icm~Na{9;r~&mb{02D?aSiPd29 z7<~l)PxA5o_mFQJX{Y|2sXFxsgd;*CEFvN*VxmjLMYl+Z9?>iMM86migJMVwixH6& zqar27#JHFclOioLVoFSltjLKOF)QXoUKGT7LTQZ npI0~g*lN1=z#iHodu&hasXen5Teau*!d_a>UbS1z>)P!fN2HOVOfrZ|hRGPyNFq0 zHTWi-%>IUFc&gP`Pt~Z!EFK067PkmXctn%%3ZL+cfC!3^2#aRXB3eb8Xcrx#Q*?=L z5fMEiDtbkq=obSbCI-cj7#4An5F=t#jESU3iE%L@CdHJP7Bga2q(w$##hjQI3t~~^ z#FAJRD`Hiwy<@-KTfZNXn*HhXCezM^`(ycs0{KSXn|8AQNxC;*xlrWzGI3t6loD5^ zO6l~vbe1`3IBxYNmvR%2cGxWj{ZaS($&TMW*KK3n*f2JYEo0l*F?Nl-Q84z5edEAz MjKh!T`cbj`2l}XfBLDyZ From b149d924839bb7d963702f2ccaf5348887c26ac9 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Mar 2022 12:50:12 +0300 Subject: [PATCH 64/68] Code refactor --- instat/Model/DataFrame/clsDataFrame.vb | 18 +++++++++--------- instat/Model/DataFrame/clsDataFrameFilter.vb | 2 +- .../RCommand/clsPrepareFunctionsForGrids.vb | 4 ++-- .../DataGrid/Linux/ucrDataViewLinuxGrid.vb | 2 +- .../DataGrid/ReoGrid/ucrDataViewReoGrid.vb | 13 +++++++------ instat/ucrColumnMetadata.vb | 4 ++-- instat/ucrDataView.vb | 18 +++++++++--------- instat/ucrSave.vb | 4 +--- 8 files changed, 32 insertions(+), 33 deletions(-) diff --git a/instat/Model/DataFrame/clsDataFrame.vb b/instat/Model/DataFrame/clsDataFrame.vb index 89c2c4c6773..cbc133de0be 100644 --- a/instat/Model/DataFrame/clsDataFrame.vb +++ b/instat/Model/DataFrame/clsDataFrame.vb @@ -24,19 +24,19 @@ Public Class clsDataFrame Private _clsPrepareFunctions As clsPrepareFunctionsForGrids Private _clsVisiblePage As clsDataFramePage Private _clsColumnMetaData As clsColumnMetaData - Private _clsFilter As clsDataFrameFilter + Private _clsFilterOrColumnSelection As clsDataFrameFilterOrColumnSelection Private _strName As String Private _RLink As RLink Private _iTotalRowCount As Integer Private _iTotalColumnCount As Integer ''' - ''' Filter information + ''' Filter or column selection information ''' ''' - Public ReadOnly Property clsFilter() As clsDataFrameFilter + Public ReadOnly Property clsFilterOrColumnSelection() As clsDataFrameFilterOrColumnSelection Get - Return _clsFilter + Return _clsFilterOrColumnSelection End Get End Property @@ -51,7 +51,7 @@ Public Class clsDataFrame End Property ''' - ''' Column meta data for the dataframe + ''' Column metadata for the dataframe ''' ''' Public ReadOnly Property clsColumnMetaData As clsColumnMetaData @@ -142,7 +142,7 @@ Public Class clsDataFrame _strName = strName _clsPrepareFunctions = New clsPrepareFunctionsForGrids(rLink, strName) _clsVisiblePage = New clsDataFramePage(rLink, strName) - _clsFilter = New clsDataFrameFilter(rLink, strName) + _clsFilterOrColumnSelection = New clsDataFrameFilterOrColumnSelection(rLink, strName) _clsColumnMetaData = New clsColumnMetaData(rLink, strName) End Sub @@ -168,9 +168,9 @@ Public Class clsDataFrame If _clsVisiblePage.RefreshData() Then _iTotalRowCount = _RLink.GetDataFrameLength(_strName, False) _iTotalColumnCount = _RLink.GetDataFrameColumnCount(_strName) - _clsFilter.RefreshData() - If _clsFilter.bFilterApplied Then - _clsVisiblePage.SetTotalRowAndColumnCounts(_iTotalColumnCount, _clsFilter.iFilteredRowCount) + _clsFilterOrColumnSelection.RefreshData() + If _clsFilterOrColumnSelection.bFilterApplied Then + _clsVisiblePage.SetTotalRowAndColumnCounts(_iTotalColumnCount, _clsFilterOrColumnSelection.iFilteredRowCount) Else _clsVisiblePage.SetTotalRowAndColumnCounts(_iTotalColumnCount, _iTotalRowCount) End If diff --git a/instat/Model/DataFrame/clsDataFrameFilter.vb b/instat/Model/DataFrame/clsDataFrameFilter.vb index 831477257b9..999b059c04d 100644 --- a/instat/Model/DataFrame/clsDataFrameFilter.vb +++ b/instat/Model/DataFrame/clsDataFrameFilter.vb @@ -19,7 +19,7 @@ Imports RDotNet ''' ''' Holds filter information for the dataframe ''' -Public Class clsDataFrameFilter +Public Class clsDataFrameFilterOrColumnSelection Protected _strDataFrameName As String Protected _RLink As RLink diff --git a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb index 7ccbf7f5e27..3b34230761e 100644 --- a/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb +++ b/instat/Model/RCommand/clsPrepareFunctionsForGrids.vb @@ -322,11 +322,11 @@ Public Class clsPrepareFunctionsForGrids Return _RLink.GetColumnType(_strDataFrame, strColumnName) End Function - '' + ''' ''' Description: To Delete one or many cells ''' the delete cell function is to be used to Replace selected values with NA ''' in the dataframe. - ''' + ''' ''' ''' Public Sub DeleteCells(lstRowNames As List(Of String), lstColumnNames As List(Of String)) diff --git a/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb b/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb index 8fc525ef4d2..b33c4754e18 100644 --- a/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb +++ b/instat/UserControls/DataGrid/Linux/ucrDataViewLinuxGrid.vb @@ -48,7 +48,7 @@ Public Class ucrDataViewLinuxGrid Public Sub AddRowData(dataFrame As clsDataFrame) Implements IDataViewGrid.AddRowData Dim dataGrid = GetDataGridFromSelectedTab() - If dataFrame.clsFilter.bFilterApplied Then + If dataFrame.clsFilterOrColumnSelection.bFilterApplied Then dataGrid.RowHeadersDefaultCellStyle.ForeColor = Color.Red Else dataGrid.RowHeadersDefaultCellStyle.ForeColor = Color.DarkBlue diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb index 875b6207d17..8458b084c2f 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrDataViewReoGrid.vb @@ -31,21 +31,22 @@ Public Class ucrDataViewReoGrid Public Event WorksheetChanged() Implements IDataViewGrid.WorksheetChanged Public Event WorksheetRemoved(worksheet As clsWorksheetAdapter) Implements IDataViewGrid.WorksheetRemoved + Public Sub AddColumns(visiblePage As clsDataFramePage) Implements IDataViewGrid.AddColumns Dim workSheetColumnHeader As ColumnHeader - Dim textColour As Color + Dim variableTextColour As Color grdData.CurrentWorksheet.Columns = visiblePage.lstColumns.Count - If GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied Then - textColour = Color.Red + If GetCurrentDataFrameFocus.clsFilterOrColumnSelection.bColumnSelectionApplied Then + variableTextColour = Color.Red Else - textColour = Color.DarkBlue + variableTextColour = Color.DarkBlue End If For i = 0 To visiblePage.lstColumns.Count - 1 workSheetColumnHeader = grdData.CurrentWorksheet.ColumnHeaders(i) workSheetColumnHeader.Text = visiblePage.lstColumns(i).strDisplayName - workSheetColumnHeader.TextColor = textColour + workSheetColumnHeader.TextColor = variableTextColour workSheetColumnHeader.Style.BackColor = visiblePage.lstColumns(i).clsBackGroundColour Next End Sub @@ -61,7 +62,7 @@ Public Class ucrDataViewReoGrid grdData.CurrentWorksheet.Rows = dataFrame.iDisplayedRowCount UpdateWorksheetSettings(grdData.CurrentWorksheet) - If dataFrame.clsFilter.bFilterApplied Then + If dataFrame.clsFilterOrColumnSelection.bFilterApplied Then textColour = Color.Red Else textColour = Color.DarkBlue diff --git a/instat/ucrColumnMetadata.vb b/instat/ucrColumnMetadata.vb index 299aa21bf0b..77f18c86993 100644 --- a/instat/ucrColumnMetadata.vb +++ b/instat/ucrColumnMetadata.vb @@ -352,8 +352,8 @@ Public Class ucrColumnMetadata mnuInsertColsBefore.Text = "Insert " & _grid.GetSelectedColumns.Count & " Columns Before" mnuInsertColsAfter.Text = "Insert " & _grid.GetSelectedColumns.Count & " Columns After" End If - mnuClearColumnFilter.Enabled = GetCurrentDataFrameFocus().clsFilter.bFilterApplied - mnuColumnContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied + mnuClearColumnFilter.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bFilterApplied + mnuColumnContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bColumnSelectionApplied End Sub Private Sub mnuReorderColumns_Click(sender As Object, e As EventArgs) Handles mnuReorderColumns.Click diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 7bb4b26adfc..c6fc78c73c8 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -284,9 +284,9 @@ Public Class ucrDataView Private Sub SetDisplayLabels() lblRowDisplay.Text = "Showing rows " & GetCurrentDataFrameFocus().clsVisiblePage.intStartRow & " to " & GetCurrentDataFrameFocus().clsVisiblePage.intEndRow & " of " - If GetCurrentDataFrameFocus().clsFilter.bFilterApplied Then - lblRowDisplay.Text &= GetCurrentDataFrameFocus().clsFilter.iFilteredRowCount & - " (" & GetCurrentDataFrameFocus().iTotalRowCount & ")" & " | Active filter: " & GetCurrentDataFrameFocus().clsFilter.strName + If GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bFilterApplied Then + lblRowDisplay.Text &= GetCurrentDataFrameFocus().clsFilterOrColumnSelection.iFilteredRowCount & + " (" & GetCurrentDataFrameFocus().iTotalRowCount & ")" & " | Active filter: " & GetCurrentDataFrameFocus().clsFilterOrColumnSelection.strName Else lblRowDisplay.Text &= GetCurrentDataFrameFocus().iTotalRowCount End If @@ -515,8 +515,8 @@ Public Class ucrDataView mnuInsertColsBefore.Text = "Insert " & GetSelectedColumns.Count & " Columns Before" mnuInsertColsAfter.Text = "Insert " & GetSelectedColumns.Count & " Columns After" End If - mnuClearColumnFilter.Enabled = GetCurrentDataFrameFocus().clsFilter.bFilterApplied - mnuColumnContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied + mnuClearColumnFilter.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bFilterApplied + mnuColumnContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bColumnSelectionApplied End Sub Private Sub HideSheet_Click(sender As Object, e As EventArgs) Handles HideSheet.Click @@ -712,14 +712,14 @@ Public Class ucrDataView End Sub Private Sub rowContextMenuStrip_Opening(sender As Object, e As CancelEventArgs) Handles rowContextMenuStrip.Opening - mnuRemoveCurrentFilter.Enabled = GetCurrentDataFrameFocus().clsFilter.bFilterApplied - mnuRowContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied + mnuRemoveCurrentFilter.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bFilterApplied + mnuRowContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bColumnSelectionApplied End Sub Private Sub cellContextMenuStrip_Opening(sender As Object, e As CancelEventArgs) Handles cellContextMenuStrip.Opening mnuLabelsLevel.Enabled = IsOnlyOneColumnSelected() AndAlso IsOnlyOneColumnSelected() - mnuRemoveCurrentFilters.Enabled = GetCurrentDataFrameFocus().clsFilter.bFilterApplied - mnuCellContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilter.bColumnSelectionApplied + mnuRemoveCurrentFilters.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bFilterApplied + mnuCellContextRemoveCurrentColumnSelection.Enabled = GetCurrentDataFrameFocus().clsFilterOrColumnSelection.bColumnSelectionApplied End Sub Private Sub mnuColumnAddComment_Click(sender As Object, e As EventArgs) Handles mnuColumnAddComment.Click diff --git a/instat/ucrSave.vb b/instat/ucrSave.vb index bf4a8b20c77..2e584e1d0ab 100644 --- a/instat/ucrSave.vb +++ b/instat/ucrSave.vb @@ -111,9 +111,7 @@ Public Class ucrSave ''' Only used when this control is saving a column. Private ucrLinkedReceiver As ucrReceiver ''' If true then set the R "before" parameter to TRUE, else set it to FALSE. - - ''' Only used when this control is saving a column. - ''' + ''' Only used when this control is saving a column. Private bInsertColumnBefore As Boolean = False Private strAdjacentColumn As String = "" 'todo. not used yet. From 81cb05f7f9a5b7f023a20bc31ad667173ec1a2f0 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Wed, 2 Mar 2022 15:32:49 +0300 Subject: [PATCH 65/68] changes --- instat/ucrDistributions.vb | 2 -- instat/ucrDistributionsWithParameters.vb | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/instat/ucrDistributions.vb b/instat/ucrDistributions.vb index 0d42f28fe19..4d41331cf6b 100644 --- a/instat/ucrDistributions.vb +++ b/instat/ucrDistributions.vb @@ -29,7 +29,6 @@ Public Class ucrDistributions Private bParameterIsDistFunction As Boolean = False Private bFunctionIsDistFunction As Boolean = False Private bParameterIsDistName As Boolean = False - Private intNumber As Integer Public Sub New() @@ -229,7 +228,6 @@ Public Class ucrDistributions Dim clsNoDist As New Distribution Dim clsEmpiricalDist As New Distribution Dim clsTriangularDist As New Distribution - Dim clsBirthDist As New Distribution ' Normal distribution clsNormalDist.strNameTag = "Normal" diff --git a/instat/ucrDistributionsWithParameters.vb b/instat/ucrDistributionsWithParameters.vb index bc25762fb29..78897d48862 100644 --- a/instat/ucrDistributionsWithParameters.vb +++ b/instat/ucrDistributionsWithParameters.vb @@ -25,7 +25,7 @@ Public Class ucrDistributionsWithParameters Private Sub ucrDistributionsWithParameters_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'temp disabled ucrInputParameter4.Visible = False - lblParameter4.Visible = False + lblParameter4.Visible = False End Sub Public Sub SetParameters() @@ -75,9 +75,10 @@ Public Class ucrDistributionsWithParameters lstParameterLabels(i).Text = GetTranslation(clsCurrDistribution.clsParameters(i).strNameTag) lstCurrArguments.Add(clsCurrDistribution.clsParameters(i).strArgumentName) If clsCurrDistribution.clsParameters(i).bHasDefault Then - lstParameterInputTextBoxes(i).SetName(clsCurrDistribution.clsParameters(i).strDefaultValue) + lstParameterInputTextBoxes(i).SetName(clsCurrDistribution.clsParameters(i).strDefaultValue) If clsCurrDistribution.strNameTag = "Discrete_Empirical" Then AddParameter(clsCurrDistribution.clsParameters(i).strArgumentName, "c(" & clsCurrDistribution.clsParameters(i).strDefaultValue & ")") + ttEmpirical.SetToolTip(ucrInputParameter2.txtInput, "Input relative values separated by commas, For example 3,2,1.") Else AddParameter(clsCurrDistribution.clsParameters(i).strArgumentName, clsCurrDistribution.clsParameters(i).strDefaultValue) End If @@ -117,7 +118,6 @@ Public Class ucrDistributionsWithParameters Private Sub ucrInputParameter2_ContentsChanged() Handles ucrInputParameter2.ContentsChanged If lstCurrArguments IsNot Nothing AndAlso lstCurrArguments.Count > 1 Then If clsCurrDistribution.strNameTag = "Discrete_Empirical" Then - ttEmpirical.SetToolTip(ucrInputParameter2.txtInput, "Input relative values separated by commas, For example 3,2,1.") AddParameter(lstCurrArguments(1), "c(" & ucrInputParameter2.GetText & ")") ucrInputParameter1.SetName("1:" & ucrInputParameter2.GetText.Split(",").Length) ucrInputParameter1.IsReadOnly = True From 5c29ad1d553653c2a282cfc19a1b600d3bcdedbf Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 3 Mar 2022 08:28:29 +0300 Subject: [PATCH 66/68] modified delete & renaming of objects methods to include column selection --- instat/static/InstatObject/R/data_object_R6.R | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index c40eb1449ed..f851b64b654 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -2057,7 +2057,7 @@ DataSheet$set("public", "get_last_graph", function() { ) DataSheet$set("public", "rename_object", function(object_name, new_name, object_type = "object") { - if(!object_type %in% c("object", "filter", "calculation", "graph", "table","model")) stop(object_type, " must be either object (graph, table or model), filter or a calculation.") + if(!object_type %in% c("object", "filter", "calculation", "graph", "table","model", "column_selection")) stop(object_type, " must be either object (graph, table or model), filter, column_selection or a calculation.") #Temp fix:: added graph, table and model so as to distinguish this when implementing it in the dialog. Otherwise they remain as objects if (object_type %in% c("object", "graph", "table","model")){ if(!object_name %in% names(private$objects)) stop(object_name, " not found in objects list") @@ -2076,12 +2076,19 @@ DataSheet$set("public", "rename_object", function(object_name, new_name, object_ if(new_name %in% names(private$calculations)) stop(new_name, " is already a calculation name. Cannot rename ", object_name, " to ", new_name) names(private$calculations)[names(private$calculations) == object_name] <- new_name } + else if (object_type == "column_selection"){ + if(!object_name %in% names(private$column_selections)) stop(object_name, " not found in column selections list") + if(new_name %in% names(private$column_selections)) stop(new_name, " is already a column selection name. Cannot rename ", object_name, " to ", new_name) + if(".everything" == object_name) stop("Renaming .everything is not allowed.") + names(private$column_selections)[names(private$column_selections) == object_name] <- new_name + if(private$.current_column_selection$name == object_name){private$.current_column_selection$name <- new_name} + } } ) DataSheet$set("public", "delete_objects", function(data_name, object_names, object_type = "object") { - if(!object_type %in% c("object", "graph", "table","model","filter", "calculation")) stop(object_type, " must be either object (graph, table or model), filter or a calculation.") - if(any(object_type == c("object", "graph", "table","model"))){ + if(!object_type %in% c("object", "graph", "table","model","filter", "calculation", "column_selection")) stop(object_type, " must be either object (graph, table or model), filter, column selection or a calculation.") + if(any(object_type %in% c("object", "graph", "table","model"))){ if(!all(object_names %in% names(private$objects))) stop("Not all object_names found in overall objects list.") private$objects[names(private$objects) %in% object_names] <- NULL }else if(object_type == "filter"){ @@ -2092,6 +2099,11 @@ DataSheet$set("public", "delete_objects", function(data_name, object_names, obje }else if(object_type == "calculation"){ if(!object_names %in% names(private$calculations)) stop(object_names, " not found in calculations list.") private$calculations[names(private$calculations) %in% object_names] <- NULL + }else if(object_type == "column_selection"){ + if(!all(object_names %in% names(private$column_selections))) stop(object_names, " not found in column selections list.") + if(".everything" %in% object_names) stop(".everything cannot be deleted.") + if(any(private$.current_column_selection$name %in% object_names))stop(private$.current_column_selection$name, " is currently in use and cannot be deleted.") + private$column_selections[names(private$column_selections) %in% object_names] <- NULL } if(!is.null(private$.last_graph) && length(private$.last_graph) == 2 && private$.last_graph[1] == data_name && private$.last_graph[2] %in% object_names) { private$.last_graph <- NULL From 849e1cca54dfe3587693f23ddb05d6d71cd4eaa8 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 3 Mar 2022 08:55:21 +0300 Subject: [PATCH 67/68] some designer fixes - adjusted type combobox --- instat/dlgDeleteObjects.Designer.vb | 44 ++++++++++++++--------------- instat/dlgRenameObjects.Designer.vb | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/instat/dlgDeleteObjects.Designer.vb b/instat/dlgDeleteObjects.Designer.vb index bb74dc161ec..1373bbcd2ee 100644 --- a/instat/dlgDeleteObjects.Designer.vb +++ b/instat/dlgDeleteObjects.Designer.vb @@ -39,11 +39,11 @@ Partial Class dlgDeleteObjects Private Sub InitializeComponent() Me.lblObjectsToDelete = New System.Windows.Forms.Label() + Me.lblType = New System.Windows.Forms.Label() + Me.ucrInputComboType = New instat.ucrInputComboBox() Me.ucrReceiverObjectsToDelete = New instat.ucrReceiverMultiple() Me.ucrSelectorDeleteObject = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputComboType = New instat.ucrInputComboBox() - Me.lblType = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'lblObjectsToDelete @@ -56,6 +56,26 @@ Partial Class dlgDeleteObjects Me.lblObjectsToDelete.Tag = "Objects_to_Delete" Me.lblObjectsToDelete.Text = "Objects to Delete:" ' + 'lblType + ' + Me.lblType.AutoSize = True + Me.lblType.Location = New System.Drawing.Point(251, 149) + Me.lblType.Name = "lblType" + Me.lblType.Size = New System.Drawing.Size(34, 13) + Me.lblType.TabIndex = 3 + Me.lblType.Text = "Type:" + ' + 'ucrInputComboType + ' + Me.ucrInputComboType.AddQuotesIfUnrecognised = True + Me.ucrInputComboType.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboType.GetSetSelectedIndex = -1 + Me.ucrInputComboType.IsReadOnly = False + Me.ucrInputComboType.Location = New System.Drawing.Point(254, 165) + Me.ucrInputComboType.Name = "ucrInputComboType" + Me.ucrInputComboType.Size = New System.Drawing.Size(120, 21) + Me.ucrInputComboType.TabIndex = 4 + ' 'ucrReceiverObjectsToDelete ' Me.ucrReceiverObjectsToDelete.AutoSize = True @@ -90,26 +110,6 @@ Partial Class dlgDeleteObjects Me.ucrBase.Size = New System.Drawing.Size(405, 52) Me.ucrBase.TabIndex = 5 ' - 'ucrInputComboType - ' - Me.ucrInputComboType.AddQuotesIfUnrecognised = True - Me.ucrInputComboType.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboType.GetSetSelectedIndex = -1 - Me.ucrInputComboType.IsReadOnly = False - Me.ucrInputComboType.Location = New System.Drawing.Point(254, 165) - Me.ucrInputComboType.Name = "ucrInputComboType" - Me.ucrInputComboType.Size = New System.Drawing.Size(92, 21) - Me.ucrInputComboType.TabIndex = 4 - ' - 'lblType - ' - Me.lblType.AutoSize = True - Me.lblType.Location = New System.Drawing.Point(251, 149) - Me.lblType.Name = "lblType" - Me.lblType.Size = New System.Drawing.Size(34, 13) - Me.lblType.TabIndex = 3 - Me.lblType.Text = "Type:" - ' 'dlgDeleteObjects ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) diff --git a/instat/dlgRenameObjects.Designer.vb b/instat/dlgRenameObjects.Designer.vb index 09454c6dc28..fd37c9950c1 100644 --- a/instat/dlgRenameObjects.Designer.vb +++ b/instat/dlgRenameObjects.Designer.vb @@ -119,7 +119,7 @@ Partial Class dlgRenameObjects Me.ucrInputType.IsReadOnly = False Me.ucrInputType.Location = New System.Drawing.Point(262, 153) Me.ucrInputType.Name = "ucrInputType" - Me.ucrInputType.Size = New System.Drawing.Size(82, 21) + Me.ucrInputType.Size = New System.Drawing.Size(120, 21) Me.ucrInputType.TabIndex = 6 ' 'lblType From c8e366ca6edbdb2cbdd59e90515dfc9c2de0479b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 3 Mar 2022 08:56:20 +0300 Subject: [PATCH 68/68] implemented delete and renaming of column selections --- instat/dlgDeleteObjects.vb | 2 +- instat/dlgRenameObjects.vb | 44 ++++++++++++++------------------------ 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/instat/dlgDeleteObjects.vb b/instat/dlgDeleteObjects.vb index 05fd504c3a4..018bf8b2ee3 100644 --- a/instat/dlgDeleteObjects.vb +++ b/instat/dlgDeleteObjects.vb @@ -53,13 +53,13 @@ Public Class dlgDeleteObjects ucrInputComboType.SetParameter(New RParameter("object_type", 2)) dctTypes.Add("Objects", Chr(34) & "object" & Chr(34)) dctTypes.Add("Filters", Chr(34) & "filter" & Chr(34)) + dctTypes.Add("Column selections", Chr(34) & "column_selection" & Chr(34)) dctTypes.Add("Calculations", Chr(34) & "calculation" & Chr(34)) dctTypes.Add("Tables", Chr(34) & "table" & Chr(34)) dctTypes.Add("Graphs", Chr(34) & "graph" & Chr(34)) dctTypes.Add("Models", Chr(34) & "model" & Chr(34)) ucrInputComboType.SetItems(dctTypes) ucrInputComboType.SetDropDownStyleAsNonEditable() - End Sub Private Sub SetDefaults() diff --git a/instat/dlgRenameObjects.vb b/instat/dlgRenameObjects.vb index d700babc012..3b8b65f260d 100644 --- a/instat/dlgRenameObjects.vb +++ b/instat/dlgRenameObjects.vb @@ -22,6 +22,7 @@ Public Class dlgRenameObjects Dim strSelectedColumn As String = "" Dim strSelectedDataFrame As String = "" Private clsDefaultFunction As New RFunction + Private dctTypes As New Dictionary(Of String, String) Private Sub dlgRenameObjects_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -49,7 +50,6 @@ Public Class dlgRenameObjects End Sub Private Sub InitialiseDialog() - Dim dctType As New Dictionary(Of String, String) ucrBase.iHelpTopicID = 350 'ucrSelector @@ -67,13 +67,14 @@ Public Class dlgRenameObjects ucrInputNewName.SetValidationTypeAsRVariable() ucrInputType.SetParameter(New RParameter("object_type", 3)) - dctType.Add("Objects", Chr(34) & "object" & Chr(34)) - dctType.Add("Filters", Chr(34) & "filter" & Chr(34)) - dctType.Add("Calculations", Chr(34) & "calculation" & Chr(34)) - dctType.Add("Tables", Chr(34) & "table" & Chr(34)) - dctType.Add("Graphs", Chr(34) & "graph" & Chr(34)) - dctType.Add("Models", Chr(34) & "model" & Chr(34)) - ucrInputType.SetItems(dctType) + dctTypes.Add("Objects", Chr(34) & "object" & Chr(34)) + dctTypes.Add("Filters", Chr(34) & "filter" & Chr(34)) + dctTypes.Add("Column selections", Chr(34) & "column_selection" & Chr(34)) + dctTypes.Add("Calculations", Chr(34) & "calculation" & Chr(34)) + dctTypes.Add("Tables", Chr(34) & "table" & Chr(34)) + dctTypes.Add("Graphs", Chr(34) & "graph" & Chr(34)) + dctTypes.Add("Models", Chr(34) & "model" & Chr(34)) + ucrInputType.SetItems(dctTypes) ucrInputType.SetDropDownStyleAsNonEditable() End Sub @@ -124,26 +125,13 @@ Public Class dlgRenameObjects End Sub Private Sub ucrInputType_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputType.ControlValueChanged - Select Case ucrInputType.GetValue() - Case "Objects" - ucrReceiverCurrentName.SetItemType("object") - ucrReceiverCurrentName.strSelectorHeading = "Objects" - Case "Filters" - ucrReceiverCurrentName.SetItemType("filter") - ucrReceiverCurrentName.strSelectorHeading = "Filters" - Case "Calculations" - ucrReceiverCurrentName.SetItemType("calculation") - ucrReceiverCurrentName.strSelectorHeading = "Calculations" - Case "Tables" - ucrReceiverCurrentName.SetItemType("table") - ucrReceiverCurrentName.strSelectorHeading = "Tables" - Case "Graphs" - ucrReceiverCurrentName.SetItemType("graph") - ucrReceiverCurrentName.strSelectorHeading = "Graphs" - Case "Models" - ucrReceiverCurrentName.SetItemType("model") - ucrReceiverCurrentName.strSelectorHeading = "Models" - End Select + Dim key As String = dctTypes.Keys(ucrInputType.cboInput.SelectedIndex) + Dim value As String = "" + + If key IsNot Nothing AndAlso dctTypes.TryGetValue(key, value) Then + ucrReceiverCurrentName.strSelectorHeading = key + ucrReceiverCurrentName.SetItemType(value.Replace(Chr(34), "")) + End If End Sub Private Sub CoreControls_ContentsChanged() Handles ucrInputNewName.ControlContentsChanged, ucrSelectorForRenameObject.ControlContentsChanged, ucrReceiverCurrentName.ControlContentsChanged