From 4bda1c4c6015e1de11996492d9d45bd5a9bc45f0 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Wed, 8 Jun 2016 17:40:04 +0300 Subject: [PATCH 01/10] Slight changes on graphics --- instat/UcrGeomListWithAes.vb | 22 ++++++++++++++++++++-- instat/dlgBoxPlot.vb | 8 ++++---- instat/dlgGeneralForGraphics.Designer.vb | 2 +- instat/dlgGeneralForGraphics.vb | 21 ++++++++++++++++----- instat/sdgLayerOptions.vb | 13 ++++++++++--- instat/ucrGeom.vb | 8 ++++---- 6 files changed, 55 insertions(+), 19 deletions(-) diff --git a/instat/UcrGeomListWithAes.vb b/instat/UcrGeomListWithAes.vb index fd1f1ad74ca..084a4093a51 100644 --- a/instat/UcrGeomListWithAes.vb +++ b/instat/UcrGeomListWithAes.vb @@ -21,6 +21,7 @@ Public Class UcrGeomListWithParameters Public lstCurrArguments As New List(Of String) Public bFirstLoad As Boolean = True Public ucrLayersControl As ucrLayerParameters + Public bCheckEnabled As Boolean = True Public Event DataFrameChanged() Private Sub UcrGeomListWithParameters_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -164,7 +165,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(0)) End If - dlgGeneralForGraphics.TestOkEnabled() + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam2_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam2.SelectionChanged @@ -173,6 +174,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(1)) End If + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam3_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam3.SelectionChanged If Not ucrReceiverParam3.IsEmpty Then @@ -180,6 +182,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(2)) End If + TestOkEnabledForgraphics() End Sub @@ -189,7 +192,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(3)) End If - + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam5_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam5.SelectionChanged If Not ucrReceiverParam5.IsEmpty Then @@ -197,6 +200,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(4)) End If + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam6_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam6.SelectionChanged @@ -205,6 +209,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(5)) End If + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam7_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam7.SelectionChanged, ucrReceiverParam9.SelectionChanged, ucrReceiverParam8.SelectionChanged @@ -213,6 +218,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(6)) End If + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam8_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam8.SelectionChanged, ucrReceiverParam9.SelectionChanged, ucrReceiverParam8.SelectionChanged If Not ucrReceiverParam8.IsEmpty Then @@ -220,6 +226,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(7)) End If + TestOkEnabledForgraphics() End Sub Private Sub ucrReceiverParam9_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam9.SelectionChanged, ucrReceiverParam9.SelectionChanged, ucrReceiverParam8.SelectionChanged @@ -228,10 +235,21 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(8)) End If + TestOkEnabledForgraphics End Sub Private Sub UcrSelector_DataFrameChanged() Handles UcrSelector.DataFrameChanged clsGeomFunction.AddParameter("data", clsRFunctionParameter:=UcrSelector.ucrAvailableDataFrames.clsCurrDataFrame) ' RaiseEvent DataFrameChanged() do we need this? End Sub + Public Sub TestOkEnabledForgraphics() + Dim i As Integer = 0 + + For i = 0 To (clsCurrGeom.clsAesParameters.Count - 1) + If (clsCurrGeom.clsAesParameters(i).bIsMandatory = True) AndAlso (lstAesParameterUcr(i).IsEmpty()) Then + 'this should have okay disabled + bCheckEnabled = False + End If + Next + End Sub End Class diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb index 31b05b18e55..7470dd1a84d 100644 --- a/instat/dlgBoxPlot.vb +++ b/instat/dlgBoxPlot.vb @@ -71,8 +71,9 @@ Public Class dlgBoxplot ucrSecondFactorReceiver.SetIncludedDataTypes({"factor"}) - sdgPlots.SetRSyntax(ucrBase.clsRsyntax) - sdgBoxPlot.SetBoxPlotFunction(clsRgeom_boxplotFunction) + + sdgLayerOptions.SetRSyntax(ucrBase.clsRsyntax) + sdgLayerOptions.SetGeomFunction(clsRgeom_boxplotFunction) ucrVariablesAsFactorForBoxplot.SetFactorReceiver(ucrByFactorsReceiver) ucrVariablesAsFactorForBoxplot.SetSelector(ucrSelectorBoxPlot) @@ -94,7 +95,6 @@ Public Class dlgBoxplot clsRggplotFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorBoxPlot.ucrAvailableDataFrames.clsCurrDataFrame) End Sub - Private Sub ucrByFactorsReceiver_SelectionChanged(sender As Object, e As EventArgs) Handles ucrByFactorsReceiver.SelectionChanged If Not ucrByFactorsReceiver.IsEmpty Then clsRaesFunction.AddParameter("x", ucrByFactorsReceiver.GetVariableNames(False)) @@ -115,7 +115,7 @@ Public Class dlgBoxplot End Sub Private Sub cmdBoxPlotOptions_Click(sender As Object, e As EventArgs) Handles cmdBoxPlotOptions.Click - sdgBoxPlot.ShowDialog() + sdgLayerOptions.ShowDialog() End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset diff --git a/instat/dlgGeneralForGraphics.Designer.vb b/instat/dlgGeneralForGraphics.Designer.vb index eb5fb623f73..694b3dc15a6 100644 --- a/instat/dlgGeneralForGraphics.Designer.vb +++ b/instat/dlgGeneralForGraphics.Designer.vb @@ -42,7 +42,7 @@ Partial Class dlgGeneralForGraphics ' Me.lstLayers.Location = New System.Drawing.Point(12, 39) Me.lstLayers.Name = "lstLayers" - Me.lstLayers.Size = New System.Drawing.Size(98, 149) + Me.lstLayers.Size = New System.Drawing.Size(125, 149) Me.lstLayers.TabIndex = 1 Me.lstLayers.UseCompatibleStateImageBehavior = False ' diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index b15184b1b9b..7ed02cf444f 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -17,6 +17,8 @@ Imports instat.Translations Public Class dlgGeneralForGraphics Private clsRggplotFunction As New RFunction Private bFirstLoad As Boolean = True + Public lstLayer As String + Public ucrGeomAes As UcrGeomListWithParameters Private Sub dlgGeneralForGraphics_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -28,8 +30,7 @@ Public Class dlgGeneralForGraphics End If autoTranslate(Me) - - TestOkEnabled() + ucrBase.OKEnabled(False) End Sub Private Sub InitialiseDialog() @@ -42,16 +43,21 @@ Public Class dlgGeneralForGraphics Private Sub SetDefaults() cmdDelete.Enabled = False cmdEdit.Enabled = False - TestOkEnabled() + lstLayers.Clear() End Sub - Private Sub ReopenDialog() End Sub Public Sub TestOkEnabled() + 'thinking this would be useful to check if all receivers for mandatory are filled + 'If Not sdgLayerOptions.ucrGeomWithAes.ucrReceiverParam1.IsEmpty Then + ' ucrBase.OKEnabled(ucrGeomAes.bEnabled) + 'Else + ' ucrBase.OKEnabled(ucrGeomAes.bEnabled) + 'End If + ''create a loop for mandatory receivers End Sub - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() End Sub @@ -59,5 +65,10 @@ Public Class dlgGeneralForGraphics Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click sdgLayerOptions.ShowDialog() ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction) + FillLayers() + End Sub + Public Sub FillLayers() + lstLayer = sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem + lstLayers.Items.Add(lstLayer) End Sub End Class diff --git a/instat/sdgLayerOptions.vb b/instat/sdgLayerOptions.vb index e15b26d4029..ce39f43068f 100644 --- a/instat/sdgLayerOptions.vb +++ b/instat/sdgLayerOptions.vb @@ -15,9 +15,11 @@ ' along with this program. If not, see . Imports instat.Translations Public Class sdgLayerOptions + Public clsRsyntax As RSyntax Public clsGeomFunction As New RFunction Private bFirstLoad As Boolean = True + Public Sub New() ' This call is required by the designer. @@ -28,10 +30,8 @@ Public Class sdgLayerOptions ucrLayerParameter.SetGeomFunction(clsGeomFunction) End Sub - - - Private Sub sdgLayers_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then InitialiseDialog() SetDefaults() @@ -56,4 +56,11 @@ Public Class sdgLayerOptions Private Sub ReopenDialog() End Sub + + Public Sub SetRSyntax(clsRSyntaxIn As RSyntax) + clsRsyntax = clsRSyntaxIn + End Sub + Public Sub SetGeomFunction(clsTempGeomFunc As RFunction) + clsGeomFunction = clsTempGeomFunc + End Sub End Class diff --git a/instat/ucrGeom.vb b/instat/ucrGeom.vb index 74ec3b5c218..988c003052f 100644 --- a/instat/ucrGeom.vb +++ b/instat/ucrGeom.vb @@ -35,8 +35,8 @@ Public Class ucrGeom End If End Sub Private Sub InitialiseControl() - ' clsRaesFunction.SetRCommand("aes") - ' clsGeomFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaesFunction) + clsRaesFunction.SetRCommand("aes") + clsGeomFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaesFunction) End Sub Public Sub SetGeoms() @@ -168,7 +168,7 @@ Public Class ucrGeom clsgeom_boxplot.SetGeomName("geom_boxplot") clsgeom_boxplot.AddAesParameter("x", strIncludedDataTypes:={"factor", "numeric"}, bIsMandatory:=True) clsgeom_boxplot.AddAesParameter("y", strIncludedDataTypes:={"numeric"}, bIsMandatory:=True) - clsgeom_boxplot.AddAesParameter("fill", bIsMandatory:=True, strIncludedDataTypes:={"factor"}) + clsgeom_boxplot.AddAesParameter("fill", strIncludedDataTypes:={"factor"}, bIsMandatory:=True) clsgeom_boxplot.AddAesParameter("colour",, strIncludedDataTypes:={"factor"}) clsgeom_boxplot.AddAesParameter("linetype", strIncludedDataTypes:={"factor"}) clsgeom_boxplot.AddAesParameter("size", strIncludedDataTypes:={"factor"}) @@ -228,7 +228,7 @@ Public Class ucrGeom 'clsgeom_curve.AddAesParameter("xend", bIsMandatory:=True) 'clsgeom_curve.AddAesParameter("y", bIsMandatory:=True) 'clsgeom_curve.AddAesParameter("yend", bIsMandatory:=True) - '''Optional + 'Optional 'clsgeom_curve.AddAesParameter("alpha") 'clsgeom_curve.AddAesParameter("colour") 'clsgeom_curve.AddAesParameter("linetype") From e2f8cfe782bba15338bcd024037b9c90ef9dca1f Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Thu, 9 Jun 2016 10:33:03 +0300 Subject: [PATCH 02/10] Adding the TestForOkEnabled --- instat/UcrGeomListWithAes.vb | 33 ++++++++++++++++++++++++--------- instat/dlgGeneralForGraphics.vb | 2 +- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/instat/UcrGeomListWithAes.vb b/instat/UcrGeomListWithAes.vb index 084a4093a51..abe771ca869 100644 --- a/instat/UcrGeomListWithAes.vb +++ b/instat/UcrGeomListWithAes.vb @@ -165,7 +165,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(0)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam2_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam2.SelectionChanged @@ -174,7 +174,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(1)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam3_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam3.SelectionChanged If Not ucrReceiverParam3.IsEmpty Then @@ -182,7 +182,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(2)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub @@ -192,7 +192,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(3)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam5_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam5.SelectionChanged If Not ucrReceiverParam5.IsEmpty Then @@ -200,7 +200,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(4)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam6_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam6.SelectionChanged @@ -209,7 +209,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(5)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam7_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam7.SelectionChanged, ucrReceiverParam9.SelectionChanged, ucrReceiverParam8.SelectionChanged @@ -218,7 +218,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(6)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam8_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam8.SelectionChanged, ucrReceiverParam9.SelectionChanged, ucrReceiverParam8.SelectionChanged If Not ucrReceiverParam8.IsEmpty Then @@ -226,7 +226,7 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(7)) End If - TestOkEnabledForgraphics() + TestForOkEnabled() End Sub Private Sub ucrReceiverParam9_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam9.SelectionChanged, ucrReceiverParam9.SelectionChanged, ucrReceiverParam8.SelectionChanged @@ -235,16 +235,18 @@ Public Class UcrGeomListWithParameters Else clsRaesFunction.RemoveParameterByName(lstCurrArguments(8)) End If - TestOkEnabledForgraphics + TestForOkEnabled() End Sub Private Sub UcrSelector_DataFrameChanged() Handles UcrSelector.DataFrameChanged clsGeomFunction.AddParameter("data", clsRFunctionParameter:=UcrSelector.ucrAvailableDataFrames.clsCurrDataFrame) ' RaiseEvent DataFrameChanged() do we need this? End Sub + Public Sub TestOkEnabledForgraphics() Dim i As Integer = 0 + bCheckEnabled = True For i = 0 To (clsCurrGeom.clsAesParameters.Count - 1) If (clsCurrGeom.clsAesParameters(i).bIsMandatory = True) AndAlso (lstAesParameterUcr(i).IsEmpty()) Then 'this should have okay disabled @@ -252,4 +254,17 @@ Public Class UcrGeomListWithParameters End If Next End Sub + + Public Function TestForOkEnabled() As Boolean + Dim i As Integer = 0 + + For i = 0 To (clsCurrGeom.clsAesParameters.Count - 1) + If (clsCurrGeom.clsAesParameters(i).bIsMandatory = True) AndAlso (lstAesParameterUcr(i).IsEmpty()) Then + 'this should have okay disabled + Return False + End If + Next + Return True + End Function + End Class diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 7ed02cf444f..5ef3afdd7fe 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -18,7 +18,6 @@ Public Class dlgGeneralForGraphics Private clsRggplotFunction As New RFunction Private bFirstLoad As Boolean = True Public lstLayer As String - Public ucrGeomAes As UcrGeomListWithParameters Private Sub dlgGeneralForGraphics_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -66,6 +65,7 @@ Public Class dlgGeneralForGraphics sdgLayerOptions.ShowDialog() ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction) FillLayers() + ucrBase.OKEnabled(sdgLayerOptions.ucrGeomWithAes.TestForOkEnabled()) End Sub Public Sub FillLayers() lstLayer = sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem From 69f7ed023fc4623b292d0c92bc720eabe172e975 Mon Sep 17 00:00:00 2001 From: John Lunalo Date: Thu, 9 Jun 2016 11:11:36 +0300 Subject: [PATCH 03/10] Editing View R objects dialog --- instat/dlgViewDescriptives.Designer.vb | 34 ++++------------------ instat/dlgViewDescriptives.vb | 39 ++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/instat/dlgViewDescriptives.Designer.vb b/instat/dlgViewDescriptives.Designer.vb index bc55d4d9f7a..6d101016c08 100644 --- a/instat/dlgViewDescriptives.Designer.vb +++ b/instat/dlgViewDescriptives.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgViewDescriptives 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 @@ -20,7 +20,7 @@ Partial Class dlgViewDescriptives '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.ucrBase = New instat.ucrButtons() Me.ucrSelectorForViewObject = New instat.ucrSelectorByDataFrameAddRemove() @@ -29,8 +29,6 @@ Partial Class dlgViewDescriptives Me.rdoStructure = New System.Windows.Forms.RadioButton() Me.rdoAllContents = New System.Windows.Forms.RadioButton() Me.rdoComponent = New System.Windows.Forms.RadioButton() - Me.ucrComponent = New instat.ucrReorder() - Me.lblComponent = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'ucrBase @@ -69,6 +67,7 @@ Partial Class dlgViewDescriptives 'rdoStructure ' Me.rdoStructure.AutoSize = True + Me.rdoStructure.Enabled = False Me.rdoStructure.Location = New System.Drawing.Point(12, 228) Me.rdoStructure.Name = "rdoStructure" Me.rdoStructure.Size = New System.Drawing.Size(68, 17) @@ -81,6 +80,7 @@ Partial Class dlgViewDescriptives 'rdoAllContents ' Me.rdoAllContents.AutoSize = True + Me.rdoAllContents.Enabled = False Me.rdoAllContents.Location = New System.Drawing.Point(86, 228) Me.rdoAllContents.Name = "rdoAllContents" Me.rdoAllContents.Size = New System.Drawing.Size(81, 17) @@ -93,6 +93,7 @@ Partial Class dlgViewDescriptives 'rdoComponent ' Me.rdoComponent.AutoSize = True + Me.rdoComponent.Enabled = False Me.rdoComponent.Location = New System.Drawing.Point(173, 228) Me.rdoComponent.Name = "rdoComponent" Me.rdoComponent.Size = New System.Drawing.Size(79, 17) @@ -102,32 +103,11 @@ Partial Class dlgViewDescriptives Me.rdoComponent.Text = "Component" Me.rdoComponent.UseVisualStyleBackColor = True ' - 'ucrComponent - ' - Me.ucrComponent.Location = New System.Drawing.Point(225, 83) - Me.ucrComponent.Name = "ucrComponent" - Me.ucrComponent.Size = New System.Drawing.Size(154, 139) - Me.ucrComponent.TabIndex = 7 - Me.ucrComponent.ucrDataFrameList = Nothing - Me.ucrComponent.ucrReceiver = Nothing - ' - 'lblComponent - ' - Me.lblComponent.AutoSize = True - Me.lblComponent.Location = New System.Drawing.Point(225, 66) - Me.lblComponent.Name = "lblComponent" - Me.lblComponent.Size = New System.Drawing.Size(61, 13) - Me.lblComponent.TabIndex = 8 - Me.lblComponent.Tag = "Component" - Me.lblComponent.Text = "Component" - ' 'dlgViewDescriptives ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(427, 326) - Me.Controls.Add(Me.lblComponent) - Me.Controls.Add(Me.ucrComponent) Me.Controls.Add(Me.rdoComponent) Me.Controls.Add(Me.rdoAllContents) Me.Controls.Add(Me.rdoStructure) @@ -152,6 +132,4 @@ Partial Class dlgViewDescriptives Friend WithEvents rdoStructure As RadioButton Friend WithEvents rdoAllContents As RadioButton Friend WithEvents rdoComponent As RadioButton - Friend WithEvents ucrComponent As ucrReorder - Friend WithEvents lblComponent As Label End Class diff --git a/instat/dlgViewDescriptives.vb b/instat/dlgViewDescriptives.vb index e035d52e133..968271e410c 100644 --- a/instat/dlgViewDescriptives.vb +++ b/instat/dlgViewDescriptives.vb @@ -22,14 +22,33 @@ Public Class dlgViewDescriptives If bFirstLoad Then InitialiseDialog() SetDefaults() - bFirstLoad = False + bFirstLoad = False + Else + ReopenDialog End If + TestOKEnabled + End Sub + + Private Sub ReopenDialog() End Sub - Private Sub InitialiseDialog() + Private Sub TestOKEnabled() + If Not ucrReceiverSelectedObject.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If + + End Sub + Private Sub InitialiseDialog() + ucrReceiverSelectedObject.Selector = ucrSelectorForViewObject + ucrReceiverSelectedObject.SetMeAsReceiver() + ucrSelectorForViewObject.SetItemType("object") + ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$get_from_object") End Sub + Private Sub SetDefaults() rdoStructure.Checked = True rdoAllContents.Enabled = False @@ -38,6 +57,7 @@ Public Class dlgViewDescriptives Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() + TestOKEnabled() End Sub Private Sub StructureComponentsAndAllContents_CheckedChanged(sender As Object, e As EventArgs) Handles rdoStructure.CheckedChanged, rdoAllContents.CheckedChanged, rdoComponent.CheckedChanged @@ -50,7 +70,20 @@ Public Class dlgViewDescriptives ElseIf rdoAllContents.Checked Then Else - ucrComponent.Enabled = True + + End If + End Sub + + Private Sub ucrSelectorForViewObject_DataFrameChaned() Handles ucrSelectorForViewObject.DataFrameChanged + ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorForViewObject.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) + End Sub + + Private Sub ucrReceiverSelectedObject_SelectionChnged(sender As Object, e As EventArgs) Handles ucrReceiverSelectedObject.SelectionChanged + If Not ucrReceiverSelectedObject.IsEmpty Then + ucrBase.clsRsyntax.AddParameter("object_name", ucrReceiverSelectedObject.GetVariableNames()) + Else + ucrBase.clsRsyntax.RemoveParameter("object_name") End If + TestOKEnabled() End Sub End Class \ No newline at end of file From 3150d12b4574f3eb2edc598a6df609f302055a6c Mon Sep 17 00:00:00 2001 From: John Lunalo Date: Thu, 9 Jun 2016 13:12:39 +0300 Subject: [PATCH 04/10] Editing Rename Objects Dialog --- instat/dlgRenameDescriptive.Designer.vb | 1 + instat/dlgRenameDescriptive.vb | 49 ++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/instat/dlgRenameDescriptive.Designer.vb b/instat/dlgRenameDescriptive.Designer.vb index 1ca7895b7b2..a569dd10270 100644 --- a/instat/dlgRenameDescriptive.Designer.vb +++ b/instat/dlgRenameDescriptive.Designer.vb @@ -76,6 +76,7 @@ Partial Class dlgRenameDescriptive ' 'ucrInputNewName ' + Me.ucrInputNewName.IsReadOnly = False Me.ucrInputNewName.Location = New System.Drawing.Point(279, 164) Me.ucrInputNewName.Name = "ucrInputNewName" Me.ucrInputNewName.Size = New System.Drawing.Size(137, 21) diff --git a/instat/dlgRenameDescriptive.vb b/instat/dlgRenameDescriptive.vb index 1e542e11529..0ca4dc7e135 100644 --- a/instat/dlgRenameDescriptive.vb +++ b/instat/dlgRenameDescriptive.vb @@ -16,6 +16,9 @@ Imports instat.Translations Public Class dlgRenameDescriptive Public bFirstLoad As Boolean = True + Dim bUseSelectedObject As Boolean = False + Dim strSelectedOject As String = "" + Dim strSelectedDataFrame As String = "" Private Sub dlgRenameDescriptive_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -24,16 +27,58 @@ Public Class dlgRenameDescriptive SetDefaults() bFirstLoad = False End If + TestOKEnabled() End Sub + Private Sub TestOKEnabled() + If Not ucrReceiverCurrentName.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If + End Sub Private Sub InitialiseDialog() + ucrReceiverCurrentName.Selector = ucrSelectorForRenameObject + ucrReceiverCurrentName.SetMeAsReceiver() + ucrSelectorForRenameObject.SetItemType("object") + ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$rename_object") + End Sub + Private Sub SetDefaults() + ucrReceiverCurrentName.ResetText() + ucrInputNewName.Reset() End Sub - Private Sub SetDefaults() - + Public Sub SetCurrentObject(strColumn As String, strDataFrame As String) + strSelectedOject = strColumn + strSelectedDataFrame = strDataFrame + bUseSelectedObject = True End Sub + Private Sub SetDefaultOject() + ucrSelectorForRenameObject.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem = strSelectedDataFrame + ucrReceiverCurrentName.SetSelected(strSelectedOject, strSelectedDataFrame) + bUseSelectedObject = False + End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() + TestOKEnabled() + End Sub + + Private Sub ucrSelectorForRenameObject_DataFrameChanged() Handles ucrSelectorForRenameObject.DataFrameChanged + ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorForRenameObject.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) + End Sub + + Private Sub ucrReceiverCurrentName_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverCurrentName.SelectionChanged + If Not ucrReceiverCurrentName.IsEmpty Then + ucrBase.clsRsyntax.AddParameter("object_name", ucrReceiverCurrentName.GetVariableNames) + ucrInputNewName.SetName(ucrReceiverCurrentName.GetVariableNames(bWithQuotes:=False)) + Else + ucrBase.clsRsyntax.RemoveParameter("object_name") + End If + TestOKEnabled() + End Sub + + Private Sub ucrInputNewName_NameChanged() Handles ucrInputNewName.NameChanged + ucrBase.clsRsyntax.AddParameter("new_name", Chr(34) & ucrInputNewName.GetText & Chr(34)) End Sub End Class \ No newline at end of file From 8e04ca5b1b03044500acc2eb59a988a5d6b3df75 Mon Sep 17 00:00:00 2001 From: John Lunalo Date: Fri, 10 Jun 2016 10:06:23 +0300 Subject: [PATCH 05/10] Editing reoder objects dialog --- instat/dlgReoderDescriptives.Designer.vb | 20 +++++++++--------- instat/dlgReoderDescriptives.vb | 26 +++++++++++++++++++++--- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/instat/dlgReoderDescriptives.Designer.vb b/instat/dlgReoderDescriptives.Designer.vb index a0f1558ebd7..af673e2299c 100644 --- a/instat/dlgReoderDescriptives.Designer.vb +++ b/instat/dlgReoderDescriptives.Designer.vb @@ -23,9 +23,9 @@ Partial Class dlgReoderDescriptives _ Private Sub InitializeComponent() Me.ucrBase = New instat.ucrButtons() - Me.ucrDataFrameReoder = New instat.ucrDataFrame() Me.lblObjectsToReoder = New System.Windows.Forms.Label() Me.ucrReorderObjects = New instat.ucrReorder() + Me.ucrDataFrameReoder = New instat.ucrDataFrame() Me.SuspendLayout() ' 'ucrBase @@ -35,14 +35,6 @@ Partial Class dlgReoderDescriptives Me.ucrBase.Size = New System.Drawing.Size(410, 53) Me.ucrBase.TabIndex = 0 ' - 'ucrDataFrameReoder - ' - Me.ucrDataFrameReoder.Location = New System.Drawing.Point(13, 13) - Me.ucrDataFrameReoder.Margin = New System.Windows.Forms.Padding(0) - Me.ucrDataFrameReoder.Name = "ucrDataFrameReoder" - Me.ucrDataFrameReoder.Size = New System.Drawing.Size(120, 40) - Me.ucrDataFrameReoder.TabIndex = 1 - ' 'lblObjectsToReoder ' Me.lblObjectsToReoder.AutoSize = True @@ -62,6 +54,14 @@ Partial Class dlgReoderDescriptives Me.ucrReorderObjects.ucrDataFrameList = Nothing Me.ucrReorderObjects.ucrReceiver = Nothing ' + 'ucrDataFrameReoder + ' + Me.ucrDataFrameReoder.Location = New System.Drawing.Point(13, 13) + Me.ucrDataFrameReoder.Margin = New System.Windows.Forms.Padding(0) + Me.ucrDataFrameReoder.Name = "ucrDataFrameReoder" + Me.ucrDataFrameReoder.Size = New System.Drawing.Size(120, 40) + Me.ucrDataFrameReoder.TabIndex = 1 + ' 'dlgReoderDescriptives ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -82,7 +82,7 @@ Partial Class dlgReoderDescriptives End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrDataFrameReoder As ucrDataFrame Friend WithEvents lblObjectsToReoder As Label Friend WithEvents ucrReorderObjects As ucrReorder + Friend WithEvents ucrDataFrameReoder As ucrDataFrame End Class diff --git a/instat/dlgReoderDescriptives.vb b/instat/dlgReoderDescriptives.vb index 55a7a8317cd..df081bb666b 100644 --- a/instat/dlgReoderDescriptives.vb +++ b/instat/dlgReoderDescriptives.vb @@ -30,19 +30,39 @@ Public Class dlgReoderDescriptives End Sub Private Sub InitialiseDialog() - + ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$reorder_objects") + ucrReorderObjects.setDataType("object") + ucrReorderObjects.setDataframes(ucrDataFrameReoder) End Sub Private Sub ReopenDialog() End Sub Private Sub TestOKEnabled() - + If Not ucrReorderObjects.isEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End Sub Private Sub SetDefaults() - + ucrDataFrameReoder.Reset() End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() + TestOKEnabled() + End Sub + + Private Sub ucrReorderObjects_OrderChanged() Handles ucrReorderObjects.OrderChanged + If Not ucrReorderObjects.isEmpty Then + ucrBase.clsRsyntax.AddParameter("new_order", ucrReorderObjects.GetVariableNames) + Else + ucrBase.clsRsyntax.RemoveParameter("new_order") + End If + TestOKEnabled() + End Sub + + Private Sub ucrDataFrameReoder_DataFrameChanged() Handles ucrDataFrameReoder.DataFrameChanged + ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrDataFrameReoder.cboAvailableDataFrames.SelectedItem & Chr(34)) End Sub End Class \ No newline at end of file From 0bb33e712296a8484c22104ba8e860d7b7cd8ef1 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Fri, 10 Jun 2016 15:32:08 +0300 Subject: [PATCH 06/10] More additions to work on graphics --- instat/UcrGeomListWithAes.designer.vb | 16 ++++++++++- instat/UcrGeomListWithAes.vb | 32 +++++++++++---------- instat/dlgBoxPlot.designer.vb | 2 +- instat/dlgBoxPlot.vb | 19 +++++++++---- instat/dlgGeneralForGraphics.vb | 6 ++++ instat/dlgUseGraph.vb | 16 ++++++++++- instat/frmMain.Designer.vb | 41 +++++++++++++-------------- instat/sdgLayerOptions.vb | 23 ++++++++++----- instat/sdgPlots.vb | 4 --- instat/ucrDataFrame.vb | 13 ++++++++- instat/ucrSelectorByDataFrame.vb | 8 +++++- 11 files changed, 123 insertions(+), 57 deletions(-) diff --git a/instat/UcrGeomListWithAes.designer.vb b/instat/UcrGeomListWithAes.designer.vb index 6e87923f666..93230107e5e 100644 --- a/instat/UcrGeomListWithAes.designer.vb +++ b/instat/UcrGeomListWithAes.designer.vb @@ -40,12 +40,13 @@ Partial Class UcrGeomListWithParameters Me.ucrReceiverParam8 = New instat.ucrReceiverSingle() Me.ucrReceiverParam7 = New instat.ucrReceiverSingle() Me.ucrReceiverParam6 = New instat.ucrReceiverSingle() + Me.chkChangeAes = New System.Windows.Forms.CheckBox() Me.grpAesList.SuspendLayout() Me.SuspendLayout() ' 'UcrSelector ' - Me.UcrSelector.Location = New System.Drawing.Point(7, 69) + Me.UcrSelector.Location = New System.Drawing.Point(3, 56) Me.UcrSelector.Margin = New System.Windows.Forms.Padding(0) Me.UcrSelector.Name = "UcrSelector" Me.UcrSelector.Size = New System.Drawing.Size(232, 192) @@ -248,9 +249,20 @@ Partial Class UcrGeomListWithParameters Me.ucrReceiverParam6.Size = New System.Drawing.Size(106, 26) Me.ucrReceiverParam6.TabIndex = 8 ' + 'chkChangeAes + ' + Me.chkChangeAes.AutoSize = True + Me.chkChangeAes.Location = New System.Drawing.Point(3, 252) + Me.chkChangeAes.Name = "chkChangeAes" + Me.chkChangeAes.Size = New System.Drawing.Size(121, 17) + Me.chkChangeAes.TabIndex = 10 + Me.chkChangeAes.Text = "Aesthetics on Geom" + Me.chkChangeAes.UseVisualStyleBackColor = True + ' 'UcrGeomListWithParameters ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.Controls.Add(Me.chkChangeAes) Me.Controls.Add(Me.grpAesList) Me.Controls.Add(Me.lblAesList) Me.Controls.Add(Me.UcrSelector) @@ -259,6 +271,7 @@ Partial Class UcrGeomListWithParameters Me.Controls.SetChildIndex(Me.UcrSelector, 0) Me.Controls.SetChildIndex(Me.lblAesList, 0) Me.Controls.SetChildIndex(Me.grpAesList, 0) + Me.Controls.SetChildIndex(Me.chkChangeAes, 0) Me.grpAesList.ResumeLayout(False) Me.grpAesList.PerformLayout() Me.ResumeLayout(False) @@ -286,4 +299,5 @@ Partial Class UcrGeomListWithParameters Friend WithEvents lblGgParam8 As Label Friend WithEvents ucrReceiverParam9 As ucrReceiverSingle Friend WithEvents ucrReceiverParam8 As ucrReceiverSingle + Friend WithEvents chkChangeAes As CheckBox End Class diff --git a/instat/UcrGeomListWithAes.vb b/instat/UcrGeomListWithAes.vb index abe771ca869..520e3575c92 100644 --- a/instat/UcrGeomListWithAes.vb +++ b/instat/UcrGeomListWithAes.vb @@ -23,6 +23,7 @@ Public Class UcrGeomListWithParameters Public ucrLayersControl As ucrLayerParameters Public bCheckEnabled As Boolean = True Public Event DataFrameChanged() + Public clsAesFunction As RFunction Private Sub UcrGeomListWithParameters_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -32,6 +33,7 @@ Public Class UcrGeomListWithParameters bFirstLoad = False End If End Sub + Private Sub InitialiseControl() ucrReceiverParam1.Selector = UcrSelector ucrReceiverParam2.Selector = UcrSelector @@ -50,8 +52,12 @@ Public Class UcrGeomListWithParameters UcrSelector.Reset() End Sub - Public Sub SetGeomFunction(clsAesGeomFunc As RFunction) - clsGeomFunction = clsAesGeomFunc + Public Sub SetGeomFunction(clsGeomFunc As RFunction) + clsGeomFunction = clsGeomFunc + End Sub + + Public Sub SetAesFunction(clsAesFunc As RFunction) + clsAesFunction = clsAesFunc End Sub Public Sub SetParameters() 'this will set function or aes parameters @@ -159,6 +165,7 @@ Public Class UcrGeomListWithParameters End If SetParameters() End Sub + Private Sub ucrReceiverParam1_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverParam1.SelectionChanged If Not ucrReceiverParam1.IsEmpty Then clsRaesFunction.AddParameter(lstCurrArguments(0), ucrReceiverParam1.GetVariableNames(False)) @@ -238,22 +245,14 @@ Public Class UcrGeomListWithParameters TestForOkEnabled() End Sub + Public Sub SetDataframe(strDataframe As String, Optional bEnableDataframe As Boolean = True) + UcrSelector.SetDataframe(strDataframe, bEnableDataframe) + End Sub + Private Sub UcrSelector_DataFrameChanged() Handles UcrSelector.DataFrameChanged clsGeomFunction.AddParameter("data", clsRFunctionParameter:=UcrSelector.ucrAvailableDataFrames.clsCurrDataFrame) ' RaiseEvent DataFrameChanged() do we need this? End Sub - - Public Sub TestOkEnabledForgraphics() - Dim i As Integer = 0 - - bCheckEnabled = True - For i = 0 To (clsCurrGeom.clsAesParameters.Count - 1) - If (clsCurrGeom.clsAesParameters(i).bIsMandatory = True) AndAlso (lstAesParameterUcr(i).IsEmpty()) Then - 'this should have okay disabled - bCheckEnabled = False - End If - Next - End Sub Public Function TestForOkEnabled() As Boolean Dim i As Integer = 0 @@ -266,5 +265,8 @@ Public Class UcrGeomListWithParameters Next Return True End Function - + + Private Sub chkChangeAes_CheckedChanged(sender As Object, e As EventArgs) Handles chkChangeAes.CheckedChanged + + End Sub End Class diff --git a/instat/dlgBoxPlot.designer.vb b/instat/dlgBoxPlot.designer.vb index 6cb19a94e33..4033cf87a09 100644 --- a/instat/dlgBoxPlot.designer.vb +++ b/instat/dlgBoxPlot.designer.vb @@ -131,7 +131,7 @@ Partial Class dlgBoxplot ' Me.ucrSaveBoxplot.Location = New System.Drawing.Point(10, 262) Me.ucrSaveBoxplot.Name = "ucrSaveBoxplot" - Me.ucrSaveBoxplot.Size = New System.Drawing.Size(265, 20) + Me.ucrSaveBoxplot.Size = New System.Drawing.Size(268, 23) Me.ucrSaveBoxplot.TabIndex = 10 ' 'dlgBoxplot diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb index 7470dd1a84d..820c3b04880 100644 --- a/instat/dlgBoxPlot.vb +++ b/instat/dlgBoxPlot.vb @@ -29,9 +29,7 @@ Public Class dlgBoxplot Else ReopenDialog() End If - End Sub - Public Sub SetOperator() Dim clsTempRFunc As New RFunction If chkHorizontalBoxplot.Checked Then @@ -70,15 +68,17 @@ Public Class dlgBoxplot ucrSecondFactorReceiver.Selector = ucrSelectorBoxPlot ucrSecondFactorReceiver.SetIncludedDataTypes({"factor"}) - - sdgLayerOptions.SetRSyntax(ucrBase.clsRsyntax) - sdgLayerOptions.SetGeomFunction(clsRgeom_boxplotFunction) + 'sdgLayerOptions.SetGeomFunction(clsRgeom_boxplotFunction) + 'sdgLayerOptions.SetAesFunction(clsRaesFunction + sdgLayerOptions.SetupLayer(clsRgeom_boxplotFunction, clsRaesFunction, True, True, strDataframe:=ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem) ucrVariablesAsFactorForBoxplot.SetFactorReceiver(ucrByFactorsReceiver) ucrVariablesAsFactorForBoxplot.SetSelector(ucrSelectorBoxPlot) ucrVariablesAsFactorForBoxplot.SetIncludedDataType({"numeric"}) + ucrSaveBoxplot.strPrefix = "graph" + End Sub Private Sub TestOkEnabled() @@ -88,9 +88,11 @@ Public Class dlgBoxplot ucrBase.OKEnabled(False) End If End Sub + Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click sdgPlots.ShowDialog() End Sub + Private Sub ucrSelectorBoxPlot_DataFrameChanged() Handles ucrSelectorBoxPlot.DataFrameChanged clsRggplotFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorBoxPlot.ucrAvailableDataFrames.clsCurrDataFrame) End Sub @@ -111,6 +113,7 @@ Public Class dlgBoxplot clsRaesFunction.RemoveParameterByName("fill") End If End Sub + Private Sub ReopenDialog() End Sub @@ -134,4 +137,10 @@ Public Class dlgBoxplot End If TestOkEnabled() End Sub + + Private Sub ucrSaveBoxplot_GraphNameChanged() Handles ucrSaveBoxplot.GraphNameChanged + ucrBase.clsRsyntax.SetAssignTo(ucrSaveBoxplot.strGraphName, strTempDataframe:=ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:=ucrSaveBoxplot.strGraphName) + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = True + End Sub + End Class \ No newline at end of file diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 5ef3afdd7fe..729e2a565ba 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -38,6 +38,8 @@ Public Class dlgGeneralForGraphics clsRggplotFunction.SetRCommand("ggplot") ucrBase.clsRsyntax.SetOperatorParameter(True, clsRFunc:=clsRggplotFunction) ucrBase.iHelpTopicID = 356 + + End Sub Private Sub SetDefaults() cmdDelete.Enabled = False @@ -62,6 +64,10 @@ Public Class dlgGeneralForGraphics End Sub Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click + Dim clsNewGeomFunction As New RFunction + Dim clsNewAesFunction As New RFunction + + sdgLayerOptions.SetupLayer(clsNewGeomFunction, clsNewAesFunction, False, False) sdgLayerOptions.ShowDialog() ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction) FillLayers() diff --git a/instat/dlgUseGraph.vb b/instat/dlgUseGraph.vb index 71ea19e1039..e762d50796f 100644 --- a/instat/dlgUseGraph.vb +++ b/instat/dlgUseGraph.vb @@ -25,13 +25,17 @@ Public Class dlgUseGraph Else ReOpenDialog() End If + TestOkEnabled() End Sub Private Sub SetDefaults() - + ucrGraphsSelector.Reset() + TestOkEnabled() End Sub Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 358 + ucrGraphsSelector.SetItemType("graph") + ucrGraphReceiver.Selector = ucrGraphsSelector End Sub Private Sub ReOpenDialog() @@ -40,4 +44,14 @@ Public Class dlgUseGraph Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() End Sub + Private Sub TestOkEnabled() + If Not ucrGraphReceiver.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If + End Sub + Private Sub ucrGraphReceiver_SelectionChanged(sender As Object, e As EventArgs) Handles ucrGraphReceiver.SelectionChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 243bf833da6..5d88c583558 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -474,7 +474,6 @@ Partial Class frmMain ' 'mnuDescribeUseObjectsUseGraph ' - Me.mnuDescribeUseObjectsUseGraph.Enabled = False Me.mnuDescribeUseObjectsUseGraph.Name = "mnuDescribeUseObjectsUseGraph" Me.mnuDescribeUseObjectsUseGraph.Size = New System.Drawing.Size(172, 22) Me.mnuDescribeUseObjectsUseGraph.Tag = "UseGraph" @@ -865,28 +864,28 @@ Partial Class frmMain 'mnuModelOtherTwoVariablesTwoSamples ' Me.mnuModelOtherTwoVariablesTwoSamples.Name = "mnuModelOtherTwoVariablesTwoSamples" - Me.mnuModelOtherTwoVariablesTwoSamples.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesTwoSamples.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesTwoSamples.Tag = "Two_Samples..." Me.mnuModelOtherTwoVariablesTwoSamples.Text = "Two Samples..." ' 'mnuModelOtherTwoVariablesSummaryData ' Me.mnuModelOtherTwoVariablesSummaryData.Name = "mnuModelOtherTwoVariablesSummaryData" - Me.mnuModelOtherTwoVariablesSummaryData.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesSummaryData.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesSummaryData.Tag = "Summary_Data" Me.mnuModelOtherTwoVariablesSummaryData.Text = "Summary Data..." ' 'mnuModelOtherTwoVariablesSimpleRegression ' Me.mnuModelOtherTwoVariablesSimpleRegression.Name = "mnuModelOtherTwoVariablesSimpleRegression" - Me.mnuModelOtherTwoVariablesSimpleRegression.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesSimpleRegression.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesSimpleRegression.Tag = "Simple_Regression" Me.mnuModelOtherTwoVariablesSimpleRegression.Text = "Simple Regression..." ' 'mnuModelOtherTwoVariablesOneWayANOVA ' Me.mnuModelOtherTwoVariablesOneWayANOVA.Name = "mnuModelOtherTwoVariablesOneWayANOVA" - Me.mnuModelOtherTwoVariablesOneWayANOVA.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesOneWayANOVA.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesOneWayANOVA.Tag = "One_Way_ANOVA" Me.mnuModelOtherTwoVariablesOneWayANOVA.Text = "One Way ANOVA..." ' @@ -894,14 +893,14 @@ Partial Class frmMain ' Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Enabled = False Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Name = "mnuModelOtherTwoVariablesNonParametricTwoSamples" - Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Tag = "Non_Parameteric_Two_Samples" Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Text = "Non Parametric Two Samples..." ' 'mnuModelOtherTwoVariablesNonParametricOneWayANOVA ' Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Name = "mnuModelOtherTwoVariablesNonParametricOneWayANOVA" - Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Tag = "Non_Parameteric_One_Way_ANOVA..." Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Text = "Non Parameteric One Way ANOVA..." ' @@ -917,21 +916,21 @@ Partial Class frmMain ' Me.mnuModelOtherThreeVariablesSimpleWithGroups.Enabled = False Me.mnuModelOtherThreeVariablesSimpleWithGroups.Name = "mnuModelOtherThreeVariablesSimpleWithGroups" - Me.mnuModelOtherThreeVariablesSimpleWithGroups.Size = New System.Drawing.Size(262, 22) + Me.mnuModelOtherThreeVariablesSimpleWithGroups.Size = New System.Drawing.Size(260, 22) Me.mnuModelOtherThreeVariablesSimpleWithGroups.Tag = "Simple_with_groups" Me.mnuModelOtherThreeVariablesSimpleWithGroups.Text = "Simple With Groups..." ' 'mnuModelOtherThreeVariablesNonParametricTwoWayANOVA ' Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Name = "mnuModelOtherThreeVariablesNonParametricTwoWayANOVA" - Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Size = New System.Drawing.Size(262, 22) + Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Size = New System.Drawing.Size(260, 22) Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Tag = "Non_Parametric_Two_Way_ANOVA..." Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Text = "Non Parametric Two Way ANOVA..." ' 'mnuModelOtherThreeVariablesChisquareTest ' Me.mnuModelOtherThreeVariablesChisquareTest.Name = "mnuModelOtherThreeVariablesChisquareTest" - Me.mnuModelOtherThreeVariablesChisquareTest.Size = New System.Drawing.Size(262, 22) + Me.mnuModelOtherThreeVariablesChisquareTest.Size = New System.Drawing.Size(260, 22) Me.mnuModelOtherThreeVariablesChisquareTest.Tag = "Chi-square_Test" Me.mnuModelOtherThreeVariablesChisquareTest.Text = "Chi-square Test..." ' @@ -946,21 +945,21 @@ Partial Class frmMain 'mnuModelOtherGeneralANOVAGeneral ' Me.mnuModelOtherGeneralANOVAGeneral.Name = "mnuModelOtherGeneralANOVAGeneral" - Me.mnuModelOtherGeneralANOVAGeneral.Size = New System.Drawing.Size(167, 22) + Me.mnuModelOtherGeneralANOVAGeneral.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherGeneralANOVAGeneral.Tag = "ANOVA_General..." Me.mnuModelOtherGeneralANOVAGeneral.Text = "ANOVA General..." ' 'mnuModelOtherGeneralRegression ' Me.mnuModelOtherGeneralRegression.Name = "mnuModelOtherGeneralRegression" - Me.mnuModelOtherGeneralRegression.Size = New System.Drawing.Size(167, 22) + Me.mnuModelOtherGeneralRegression.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherGeneralRegression.Tag = "Regression" Me.mnuModelOtherGeneralRegression.Text = "Regression..." ' 'mnuModelOtherGeneralLogLinear ' Me.mnuModelOtherGeneralLogLinear.Name = "mnuModelOtherGeneralLogLinear" - Me.mnuModelOtherGeneralLogLinear.Size = New System.Drawing.Size(167, 22) + Me.mnuModelOtherGeneralLogLinear.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherGeneralLogLinear.Tag = "Log_Linear" Me.mnuModelOtherGeneralLogLinear.Text = "Log Linear..." ' @@ -1213,7 +1212,7 @@ Partial Class frmMain 'mnuHelpHelp ' Me.mnuHelpHelp.Name = "mnuHelpHelp" - Me.mnuHelpHelp.Size = New System.Drawing.Size(152, 22) + Me.mnuHelpHelp.Size = New System.Drawing.Size(151, 22) Me.mnuHelpHelp.Tag = "Help" Me.mnuHelpHelp.Text = "Help" ' @@ -1221,7 +1220,7 @@ Partial Class frmMain ' Me.mnuHelpLicence.Enabled = False Me.mnuHelpLicence.Name = "mnuHelpLicence" - Me.mnuHelpLicence.Size = New System.Drawing.Size(152, 22) + Me.mnuHelpLicence.Size = New System.Drawing.Size(151, 22) Me.mnuHelpLicence.Tag = "Licence..." Me.mnuHelpLicence.Text = "Licence..." ' @@ -1229,7 +1228,7 @@ Partial Class frmMain ' Me.mnuHelpAboutRInstat.Enabled = False Me.mnuHelpAboutRInstat.Name = "mnuHelpAboutRInstat" - Me.mnuHelpAboutRInstat.Size = New System.Drawing.Size(152, 22) + Me.mnuHelpAboutRInstat.Size = New System.Drawing.Size(151, 22) Me.mnuHelpAboutRInstat.Tag = "About_R-Instat" Me.mnuHelpAboutRInstat.Text = "About R-Instat" ' @@ -2264,7 +2263,7 @@ Partial Class frmMain ' Me.mnuOrganiseRObjectsView.Enabled = False Me.mnuOrganiseRObjectsView.Name = "mnuOrganiseRObjectsView" - Me.mnuOrganiseRObjectsView.Size = New System.Drawing.Size(126, 22) + Me.mnuOrganiseRObjectsView.Size = New System.Drawing.Size(152, 22) Me.mnuOrganiseRObjectsView.Tag = "View..." Me.mnuOrganiseRObjectsView.Text = "View..." ' @@ -2272,7 +2271,7 @@ Partial Class frmMain ' Me.mnuOrganiseRObjectsRename.Enabled = False Me.mnuOrganiseRObjectsRename.Name = "mnuOrganiseRObjectsRename" - Me.mnuOrganiseRObjectsRename.Size = New System.Drawing.Size(126, 22) + Me.mnuOrganiseRObjectsRename.Size = New System.Drawing.Size(152, 22) Me.mnuOrganiseRObjectsRename.Tag = "Rename..." Me.mnuOrganiseRObjectsRename.Text = "Rename..." ' @@ -2280,7 +2279,7 @@ Partial Class frmMain ' Me.mnuOrganiseRObjectsReorder.Enabled = False Me.mnuOrganiseRObjectsReorder.Name = "mnuOrganiseRObjectsReorder" - Me.mnuOrganiseRObjectsReorder.Size = New System.Drawing.Size(126, 22) + Me.mnuOrganiseRObjectsReorder.Size = New System.Drawing.Size(152, 22) Me.mnuOrganiseRObjectsReorder.Tag = "Reorder" Me.mnuOrganiseRObjectsReorder.Text = "Reorder..." ' @@ -2288,7 +2287,7 @@ Partial Class frmMain ' Me.mnuOrganiseRObjectsDelete.Enabled = False Me.mnuOrganiseRObjectsDelete.Name = "mnuOrganiseRObjectsDelete" - Me.mnuOrganiseRObjectsDelete.Size = New System.Drawing.Size(126, 22) + Me.mnuOrganiseRObjectsDelete.Size = New System.Drawing.Size(152, 22) Me.mnuOrganiseRObjectsDelete.Tag = "Delete..." Me.mnuOrganiseRObjectsDelete.Text = "Delete..." ' @@ -2608,7 +2607,7 @@ Partial Class frmMain ' Me.mnuTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolsRunRCode, Me.mnuToolsRestartR, Me.mnuToolsCheckForUpdates, Me.mnuToolsClearOutputWindow, Me.ToolStripSeparator5, Me.mnuToolsSaveCurrentOptions, Me.mnuToolsLoadOptions, Me.mnuToolsOptions}) Me.mnuTools.Name = "mnuTools" - Me.mnuTools.Size = New System.Drawing.Size(48, 20) + Me.mnuTools.Size = New System.Drawing.Size(47, 20) Me.mnuTools.Text = "Tools" ' 'mnuToolsRunRCode diff --git a/instat/sdgLayerOptions.vb b/instat/sdgLayerOptions.vb index ce39f43068f..ab9fbe2df38 100644 --- a/instat/sdgLayerOptions.vb +++ b/instat/sdgLayerOptions.vb @@ -17,19 +17,20 @@ Imports instat.Translations Public Class sdgLayerOptions Public clsRsyntax As RSyntax Public clsGeomFunction As New RFunction + Public clsAesFunction As New RFunction Private bFirstLoad As Boolean = True - + Public bAesInGeom As Boolean Public Sub New() - ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. ucrGeomWithAes.SetGeomFunction(clsGeomFunction) + ucrGeomWithAes.SetAesFunction(clsAesFunction) ucrLayerParameter.SetGeomFunction(clsGeomFunction) - End Sub + Private Sub sdgLayers_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -45,14 +46,12 @@ Public Class sdgLayerOptions Private Sub InitialiseDialog() ucrLayerParameter.ucrGeomWithAes = ucrGeomWithAes ucrGeomWithAes.ucrLayersControl = ucrLayerParameter - - ucrGeomWithAes.SetGeomFunction(clsGeomFunction) - ucrLayerParameter.SetGeomFunction(clsGeomFunction) End Sub Private Sub SetDefaults() ucrGeomWithAes.UcrSelector.Reset() End Sub + Private Sub ReopenDialog() End Sub @@ -60,7 +59,17 @@ Public Class sdgLayerOptions Public Sub SetRSyntax(clsRSyntaxIn As RSyntax) clsRsyntax = clsRSyntaxIn End Sub - Public Sub SetGeomFunction(clsTempGeomFunc As RFunction) + + Public Sub SetupLayer(clsTempGeomFunc As RFunction, clsTempAesFunc As RFunction, Optional bFixAes As Boolean = False, Optional bFixGeom As Boolean = False, Optional strDataframe As String = "") clsGeomFunction = clsTempGeomFunc + clsAesFunction = clsTempAesFunc + + If bFixAes Then + bAesInGeom = False + 'disable check boxs + End If + If strDataframe <> "" Then + ucrGeomWithAes.SetDataframe(strDataframe, Not bFixAes) + End If End Sub End Class diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index e2f1fd744d2..3fd6c300e86 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -239,8 +239,4 @@ Public Class sdgPlots Private Sub txtYTitle_Leave(sender As Object, e As EventArgs) Handles txtYTitle.Leave clsYLabFunction.AddParameter("label", Chr(34) & txtYTitle.Text & Chr(34)) End Sub - - Private Sub chkFreeScalesY_CheckedChanged(sender As Object, e As EventArgs) Handles chkFreeScalesY.CheckedChanged - - End Sub End Class diff --git a/instat/ucrDataFrame.vb b/instat/ucrDataFrame.vb index e5fbcec760d..faa28ccfa23 100644 --- a/instat/ucrDataFrame.vb +++ b/instat/ucrDataFrame.vb @@ -70,7 +70,18 @@ Public Class ucrDataFrame clsCurrDataFrame.AddParameter(clsParam) clsCurrDataFrame.SetAssignTo(cboAvailableDataFrames.Text & "_temp") End If - End Sub + End Sub + + Public Sub SetDataframe(strDataframe As String, Optional bEnableDataframe As Boolean = True) + Dim Index As Integer + + Index = cboAvailableDataFrames.Items.IndexOf(strDataframe) + If Index >= 0 Then + cboAvailableDataFrames.SelectedIndex = Index + cboAvailableDataFrames.Enabled = bEnableDataframe + End If + + End Sub Public Sub SetIncludeOverall(bInclude As Boolean) bIncludeOverall = bInclude diff --git a/instat/ucrSelectorByDataFrame.vb b/instat/ucrSelectorByDataFrame.vb index 6501f399b98..537d626f3c8 100644 --- a/instat/ucrSelectorByDataFrame.vb +++ b/instat/ucrSelectorByDataFrame.vb @@ -39,5 +39,11 @@ Public Class ucrSelectorByDataFrame MyBase.SetIncludeOverall(bInclude) ucrAvailableDataFrames.SetIncludeOverall(bIncludeOverall) LoadList() - End Sub + End Sub + + Public Sub SetDataframe(strDataframe As String, Optional bEnableDataframe As Boolean = True) + ucrAvailableDataFrames.SetDataframe(strDataframe, bEnableDataframe) + End Sub + + End Class From 53b502cc07e9ebe92cafa094b3c5115a0a7b6f44 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Sat, 11 Jun 2016 10:30:00 +0300 Subject: [PATCH 07/10] Adding Cloning functions --- instat/clsRFunction.vb | 24 +++++++++++++++++++++++- instat/clsROperator.vb | 32 +++++++++++++++++++++++++++++++- instat/clsRParameter.vb | 15 +++++++++++++++ instat/dlgGeneralForGraphics.vb | 6 ++++-- instat/sdgLayerOptions.vb | 7 ++----- 5 files changed, 75 insertions(+), 9 deletions(-) diff --git a/instat/clsRFunction.vb b/instat/clsRFunction.vb index d1912ea0912..962cb5c77ec 100644 --- a/instat/clsRFunction.vb +++ b/instat/clsRFunction.vb @@ -24,7 +24,7 @@ Public Class RFunction Public strAssignToGraph As String Public bToBeAssigned As Boolean = False Public bIsAssigned As Boolean = False - Private bAssignToIsPrefix As Boolean = False + Public bAssignToIsPrefix As Boolean = False Public Sub SetRCommand(strTemp As String) strRCommand = strTemp @@ -218,4 +218,26 @@ Public Class RFunction bIsAssigned = False End Sub + Public Function Clone() As RFunction + + Dim clsRFunction As New RFunction + Dim clsRParam As New RParameter + clsRFunction.strRCommand = strRCommand + clsRFunction.strAssignTo = strAssignTo + clsRFunction.strAssignToDataFrame = strAssignToDataFrame + clsRFunction.strAssignToColumn = strAssignToColumn + clsRFunction.strAssignToModel = strAssignToModel + clsRFunction.strAssignToGraph = strAssignToGraph + clsRFunction.bToBeAssigned = bToBeAssigned + clsRFunction.bIsAssigned = bIsAssigned + clsRFunction.bAssignToIsPrefix = bAssignToIsPrefix + + For Each clsRParam In clsParameters + clsRFunction.AddParameter(clsRParam.Clone) + Next + + Return clsRFunction + + End Function + End Class \ No newline at end of file diff --git a/instat/clsROperator.vb b/instat/clsROperator.vb index 7c01d78a299..9d0cfe88ff8 100644 --- a/instat/clsROperator.vb +++ b/instat/clsROperator.vb @@ -296,5 +296,35 @@ Public Class ROperator RemoveParameter(True) 'RemoveParameter(False) RemoveAllAdditionalParameters() - End Sub + End Sub + + Public Function Clone() As ROperator + Dim clsTempROperator As New ROperator + Dim clsLeftFunction As New RFunction + Dim clsLeftOperator As New ROperator + Dim clsLeftParameter As New RParameter + Dim clsAdditionalParams As New RParameter + + clsTempROperator.strOperation = strOperation + clsTempROperator.bBrackets = bBrackets + clsTempROperator.strAssignTo = strAssignTo + clsTempROperator.strAssignToDataFrame = strAssignToDataFrame + clsTempROperator.strAssignToColumn = strAssignToColumn + clsTempROperator.strAssignToModel = strAssignToModel + clsTempROperator.strAssignToGraph = strAssignToGraph + clsTempROperator.bToBeAssigned = bToBeAssigned + clsTempROperator.bIsAssigned = bIsAssigned + clsTempROperator.bForceIncludeOperation = bForceIncludeOperation + clsTempROperator.bAssignToIsPrefix = bAssignToIsPrefix + clsTempROperator.clsLeftFunction = clsLeftFunction.Clone + clsTempROperator.clsLeftOperator = clsLeftOperator.Clone + clsTempROperator.clsLeftParameter = clsLeftParameter.Clone + + For Each clsAdditionalParams In clsAdditionalParameters + clsTempROperator.AddAdditionalParameter(clsAdditionalParams.Clone) + Next + + Return clsTempROperator + + End Function End Class \ No newline at end of file diff --git a/instat/clsRParameter.vb b/instat/clsRParameter.vb index 7f94b7ef288..fffe068346d 100644 --- a/instat/clsRParameter.vb +++ b/instat/clsRParameter.vb @@ -58,4 +58,19 @@ Public Class RParameter End If Return strRet End Function + + Public Function Clone() As RParameter + Dim clsTempRParam As New RParameter + Dim clsArgumentOperator As New ROperator + + clsTempRParam.strArgumentName = strArgumentName + clsTempRParam.strArgumentValue = strArgumentValue + clsTempRParam.bIsFunction = bIsFunction + clsTempRParam.bIsOperator = bIsOperator + clsTempRParam.clsArgumentFunction = clsArgumentFunction.Clone + clsTempRParam.clsArgumentOperator = clsArgumentOperator.Clone + + + Return clsTempRParam + End Function End Class \ No newline at end of file diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 729e2a565ba..2f174bafc0f 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -69,12 +69,14 @@ Public Class dlgGeneralForGraphics sdgLayerOptions.SetupLayer(clsNewGeomFunction, clsNewAesFunction, False, False) sdgLayerOptions.ShowDialog() - ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction) - FillLayers() ucrBase.OKEnabled(sdgLayerOptions.ucrGeomWithAes.TestForOkEnabled()) + FillLayers() + ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction.Clone) End Sub + Public Sub FillLayers() lstLayer = sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem lstLayers.Items.Add(lstLayer) + End Sub End Class diff --git a/instat/sdgLayerOptions.vb b/instat/sdgLayerOptions.vb index ab9fbe2df38..c575b4eee83 100644 --- a/instat/sdgLayerOptions.vb +++ b/instat/sdgLayerOptions.vb @@ -18,7 +18,7 @@ Public Class sdgLayerOptions Public clsRsyntax As RSyntax Public clsGeomFunction As New RFunction Public clsAesFunction As New RFunction - Private bFirstLoad As Boolean = True + Public bFirstLoad As Boolean = True Public bAesInGeom As Boolean Public Sub New() @@ -32,22 +32,19 @@ Public Class sdgLayerOptions End Sub Private Sub sdgLayers_Load(sender As Object, e As EventArgs) Handles MyBase.Load - If bFirstLoad Then InitialiseDialog() SetDefaults() - bFirstLoad = False + 'bFirstLoad = False Else ReopenDialog() End If autoTranslate(Me) End Sub - Private Sub InitialiseDialog() ucrLayerParameter.ucrGeomWithAes = ucrGeomWithAes ucrGeomWithAes.ucrLayersControl = ucrLayerParameter End Sub - Private Sub SetDefaults() ucrGeomWithAes.UcrSelector.Reset() End Sub From a9667a45cd3dbe47c32e20efdedcb066a7dd8ff0 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Sat, 11 Jun 2016 13:19:49 +0300 Subject: [PATCH 08/10] Adding code to add layers to layerlistview and enabling okay on the general grapphics dialog --- instat/clsROperator.vb | 1 + instat/dlgGeneralForGraphics.vb | 48 ++++++++++++++++++++++----------- instat/sdgLayerOptions.vb | 4 +++ 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/instat/clsROperator.vb b/instat/clsROperator.vb index 9d0cfe88ff8..349d4d661a3 100644 --- a/instat/clsROperator.vb +++ b/instat/clsROperator.vb @@ -316,6 +316,7 @@ Public Class ROperator clsTempROperator.bIsAssigned = bIsAssigned clsTempROperator.bForceIncludeOperation = bForceIncludeOperation clsTempROperator.bAssignToIsPrefix = bAssignToIsPrefix + clsTempROperator.clsLeftFunction = clsLeftFunction.Clone clsTempROperator.clsLeftOperator = clsLeftOperator.Clone clsTempROperator.clsLeftParameter = clsLeftParameter.Clone diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 2f174bafc0f..f15953b2b1d 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -17,7 +17,7 @@ Imports instat.Translations Public Class dlgGeneralForGraphics Private clsRggplotFunction As New RFunction Private bFirstLoad As Boolean = True - Public lstLayer As String + Private lstLayerComplete As New List(Of Boolean) Private Sub dlgGeneralForGraphics_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -39,26 +39,18 @@ Public Class dlgGeneralForGraphics ucrBase.clsRsyntax.SetOperatorParameter(True, clsRFunc:=clsRggplotFunction) ucrBase.iHelpTopicID = 356 - End Sub + Private Sub SetDefaults() cmdDelete.Enabled = False cmdEdit.Enabled = False lstLayers.Clear() End Sub + Private Sub ReopenDialog() End Sub - Public Sub TestOkEnabled() - 'thinking this would be useful to check if all receivers for mandatory are filled - 'If Not sdgLayerOptions.ucrGeomWithAes.ucrReceiverParam1.IsEmpty Then - ' ucrBase.OKEnabled(ucrGeomAes.bEnabled) - 'Else - ' ucrBase.OKEnabled(ucrGeomAes.bEnabled) - 'End If - - ''create a loop for mandatory receivers - End Sub + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() End Sub @@ -69,14 +61,38 @@ Public Class dlgGeneralForGraphics sdgLayerOptions.SetupLayer(clsNewGeomFunction, clsNewAesFunction, False, False) sdgLayerOptions.ShowDialog() - ucrBase.OKEnabled(sdgLayerOptions.ucrGeomWithAes.TestForOkEnabled()) + ' ucrBase.OKEnabled(sdgLayerOptions.ucrGeomWithAes.TestForOkEnabled()) FillLayers() - ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction.Clone) End Sub Public Sub FillLayers() - lstLayer = sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem - lstLayers.Items.Add(lstLayer) + Dim strLayer As String + + strLayer = sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem + If lstLayers.Items.ContainsKey(strLayer) Then + lstLayerComplete(lstLayers.Items.IndexOfKey(strLayer)) = sdgLayerOptions.TestForOKEnabled() + Else + lstLayers.Items.Add(strLayer) + lstLayerComplete.Add(sdgLayerOptions.TestForOKEnabled()) + End If + + If sdgLayerOptions.TestForOKEnabled() Then + lstLayers.Items(lstLayers.Items.IndexOfKey(strLayer)).ForeColor = Color.Green + + Else + lstLayers.Items(lstLayers.Items.IndexOfKey(strLayer)).ForeColor = Color.Red + End If + ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=sdgLayerOptions.clsGeomFunction.Clone) + + End Sub + Private Sub TestOKEnabled() + Dim bTemp As Boolean + For Each bTemp In lstLayerComplete + If Not bTemp Then + Exit For + End If + Next + ucrBase.OKEnabled(bTemp) End Sub End Class diff --git a/instat/sdgLayerOptions.vb b/instat/sdgLayerOptions.vb index c575b4eee83..f1b380b2c6d 100644 --- a/instat/sdgLayerOptions.vb +++ b/instat/sdgLayerOptions.vb @@ -69,4 +69,8 @@ Public Class sdgLayerOptions ucrGeomWithAes.SetDataframe(strDataframe, Not bFixAes) End If End Sub + + Public Function TestForOKEnabled() As Boolean + Return ucrGeomWithAes.TestForOkEnabled() + End Function End Class From ead4bc4ea4976b621957492fc87fc214cbedcc02 Mon Sep 17 00:00:00 2001 From: dannyparsons Date: Wed, 15 Jun 2016 13:24:09 +0100 Subject: [PATCH 09/10] fixed bugs due to changes in ROperatore code --- instat/dlgUnstack.vb | 6 +-- instat/frmEditor.Designer.vb | 39 +++++++++---------- instat/frmEditor.vb | 8 ++++ instat/static/InstatObject/R/data_object_R6.R | 2 +- instat/ucrFilter.vb | 6 +-- 5 files changed, 34 insertions(+), 27 deletions(-) diff --git a/instat/dlgUnstack.vb b/instat/dlgUnstack.vb index 89f2785c9f9..1b9347ebda5 100644 --- a/instat/dlgUnstack.vb +++ b/instat/dlgUnstack.vb @@ -83,7 +83,7 @@ Public Class dlgUnstack Private Sub ucrFactorToUnstackReceiver_SelectionChanged() Handles ucrFactorToUnstackReceiver.SelectionChanged If Not ucrFactorToUnstackReceiver.IsEmpty Then - clsFormula.SetParameter(False, ucrFactorToUnstackReceiver.GetVariableNames(False)) + clsFormula.SetParameter(False, strValue:=ucrFactorToUnstackReceiver.GetVariableNames(False)) Else clsFormula.RemoveParameter(False) End If @@ -138,9 +138,9 @@ Public Class dlgUnstack lstColumns = ucrIDColumns.GetVariableNamesAsList() For i = 0 To lstColumns.Count - 1 If i = 0 Then - clsIDColumns.SetParameter(True, lstColumns(i)) + clsIDColumns.SetParameter(True, strValue:=lstColumns(i)) ElseIf i = 1 Then - clsIDColumns.SetParameter(False, lstColumns(i)) + clsIDColumns.SetParameter(False, strValue:=lstColumns(i)) Else clsIDColumns.AddAdditionalParameter("X" & i, lstColumns(i)) End If diff --git a/instat/frmEditor.Designer.vb b/instat/frmEditor.Designer.vb index 38d4532eef5..1c366f05839 100644 --- a/instat/frmEditor.Designer.vb +++ b/instat/frmEditor.Designer.vb @@ -40,7 +40,6 @@ Partial Class frmEditor Me.toolStripMenuItem21 = New System.Windows.Forms.ToolStripSeparator() Me.columnFilterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.clearColumnFilterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.toolStripMenuItem35 = New System.Windows.Forms.ToolStripSeparator() Me.cellContextMenuStrip = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cutRangeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.copyRangeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -61,6 +60,7 @@ Partial Class frmEditor Me.HideSheet = New System.Windows.Forms.ToolStripMenuItem() Me.unhideSheet = New System.Windows.Forms.ToolStripMenuItem() Me.lblNoData = New System.Windows.Forms.Label() + Me.SortToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.columnContextMenuStrip.SuspendLayout() Me.cellContextMenuStrip.SuspendLayout() Me.rowContextMenuStrip.SuspendLayout() @@ -87,9 +87,9 @@ Partial Class frmEditor ' 'columnContextMenuStrip ' - Me.columnContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuColumnRename, Me.mnuInsertColsBefore, Me.mnuInsertColsAfter, Me.mnuDeleteCol, Me.toolStripMenuItem2, Me.mnuConvertToFactor, Me.mnuConvertText, Me.mnuConvertVariate, Me.ToolStripSeparator1, Me.mnuHideColumns, Me.mnuUnhideColumns, Me.mnuUnhideAllColumns, Me.toolStripMenuItem21, Me.columnFilterToolStripMenuItem, Me.clearColumnFilterToolStripMenuItem, Me.toolStripMenuItem35}) + Me.columnContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuColumnRename, Me.mnuInsertColsBefore, Me.mnuInsertColsAfter, Me.mnuDeleteCol, Me.toolStripMenuItem2, Me.mnuConvertToFactor, Me.mnuConvertText, Me.mnuConvertVariate, Me.ToolStripSeparator1, Me.mnuHideColumns, Me.mnuUnhideColumns, Me.mnuUnhideAllColumns, Me.toolStripMenuItem21, Me.SortToolStripMenuItem, Me.columnFilterToolStripMenuItem, Me.clearColumnFilterToolStripMenuItem}) Me.columnContextMenuStrip.Name = "columnContextMenuStrip" - Me.columnContextMenuStrip.Size = New System.Drawing.Size(200, 292) + Me.columnContextMenuStrip.Size = New System.Drawing.Size(200, 330) ' 'mnuColumnRename ' @@ -169,22 +169,15 @@ Partial Class frmEditor ' 'columnFilterToolStripMenuItem ' - Me.columnFilterToolStripMenuItem.Enabled = False Me.columnFilterToolStripMenuItem.Name = "columnFilterToolStripMenuItem" Me.columnFilterToolStripMenuItem.Size = New System.Drawing.Size(199, 22) Me.columnFilterToolStripMenuItem.Text = "Filter..." ' 'clearColumnFilterToolStripMenuItem ' - Me.clearColumnFilterToolStripMenuItem.Enabled = False Me.clearColumnFilterToolStripMenuItem.Name = "clearColumnFilterToolStripMenuItem" Me.clearColumnFilterToolStripMenuItem.Size = New System.Drawing.Size(199, 22) - Me.clearColumnFilterToolStripMenuItem.Text = "Clear Filters" - ' - 'toolStripMenuItem35 - ' - Me.toolStripMenuItem35.Name = "toolStripMenuItem35" - Me.toolStripMenuItem35.Size = New System.Drawing.Size(196, 6) + Me.clearColumnFilterToolStripMenuItem.Text = "Remove Current Filter" ' 'cellContextMenuStrip ' @@ -259,54 +252,54 @@ Partial Class frmEditor ' Me.statusColumnMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.insertSheet, Me.deleteSheet, Me.renameSheet, Me.reorderSheet, Me.CopySheet, Me.HideSheet, Me.unhideSheet}) Me.statusColumnMenu.Name = "statusColumnMenu" - Me.statusColumnMenu.Size = New System.Drawing.Size(153, 180) + Me.statusColumnMenu.Size = New System.Drawing.Size(127, 158) ' 'insertSheet ' Me.insertSheet.Name = "insertSheet" - Me.insertSheet.Size = New System.Drawing.Size(152, 22) + Me.insertSheet.Size = New System.Drawing.Size(126, 22) Me.insertSheet.Text = "Insert..." ' 'deleteSheet ' Me.deleteSheet.Enabled = False Me.deleteSheet.Name = "deleteSheet" - Me.deleteSheet.Size = New System.Drawing.Size(152, 22) + Me.deleteSheet.Size = New System.Drawing.Size(126, 22) Me.deleteSheet.Text = "Delete" ' 'renameSheet ' Me.renameSheet.Enabled = False Me.renameSheet.Name = "renameSheet" - Me.renameSheet.Size = New System.Drawing.Size(152, 22) + Me.renameSheet.Size = New System.Drawing.Size(126, 22) Me.renameSheet.Text = "Rename..." ' 'reorderSheet ' Me.reorderSheet.Enabled = False Me.reorderSheet.Name = "reorderSheet" - Me.reorderSheet.Size = New System.Drawing.Size(152, 22) + Me.reorderSheet.Size = New System.Drawing.Size(126, 22) Me.reorderSheet.Text = "Reorder..." ' 'CopySheet ' Me.CopySheet.Enabled = False Me.CopySheet.Name = "CopySheet" - Me.CopySheet.Size = New System.Drawing.Size(152, 22) + Me.CopySheet.Size = New System.Drawing.Size(126, 22) Me.CopySheet.Text = "Copy..." ' 'HideSheet ' Me.HideSheet.Enabled = False Me.HideSheet.Name = "HideSheet" - Me.HideSheet.Size = New System.Drawing.Size(152, 22) + Me.HideSheet.Size = New System.Drawing.Size(126, 22) Me.HideSheet.Text = "Hide" ' 'unhideSheet ' Me.unhideSheet.Enabled = False Me.unhideSheet.Name = "unhideSheet" - Me.unhideSheet.Size = New System.Drawing.Size(152, 22) + Me.unhideSheet.Size = New System.Drawing.Size(126, 22) Me.unhideSheet.Text = "Unhide" ' 'lblNoData @@ -320,6 +313,12 @@ Partial Class frmEditor Me.lblNoData.Tag = "no_data_loaded" Me.lblNoData.Text = "No Data Loaded" ' + 'SortToolStripMenuItem + ' + Me.SortToolStripMenuItem.Name = "SortToolStripMenuItem" + Me.SortToolStripMenuItem.Size = New System.Drawing.Size(199, 22) + Me.SortToolStripMenuItem.Text = "Sort..." + ' 'frmEditor ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -351,7 +350,6 @@ Partial Class frmEditor Private WithEvents toolStripMenuItem21 As ToolStripSeparator Private WithEvents columnFilterToolStripMenuItem As ToolStripMenuItem Private WithEvents clearColumnFilterToolStripMenuItem As ToolStripMenuItem - Private WithEvents toolStripMenuItem35 As ToolStripSeparator Private WithEvents cellContextMenuStrip As ContextMenuStrip Private WithEvents cutRangeToolStripMenuItem As ToolStripMenuItem Private WithEvents copyRangeToolStripMenuItem As ToolStripMenuItem @@ -378,4 +376,5 @@ Partial Class frmEditor Friend WithEvents ToolStripSeparator2 As ToolStripSeparator Friend WithEvents mnuFilter As ToolStripMenuItem Friend WithEvents mnuRemoveCurrentFilter As ToolStripMenuItem + Friend WithEvents SortToolStripMenuItem As ToolStripMenuItem End Class diff --git a/instat/frmEditor.vb b/instat/frmEditor.vb index cf447a28d07..e38e2a6605c 100644 --- a/instat/frmEditor.vb +++ b/instat/frmEditor.vb @@ -466,4 +466,12 @@ Public Class frmEditor Private Sub frmEditor_VisibleChanged(sender As Object, e As EventArgs) Handles Me.VisibleChanged frmMain.mnuViewDataView.Checked = Me.Visible End Sub + + Private Sub clearColumnFilterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles clearColumnFilterToolStripMenuItem.Click + frmMain.clsRLink.RunScript(clsRemoveFilter.ToScript(), strComment:="Right click menu: Remove Current Filter") + End Sub + + Private Sub SortToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SortToolStripMenuItem.Click + dlgSort.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 08f17ae7df2..6c6a4909b8e 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -672,7 +672,7 @@ data_object$set("public", "get_factor_data_frame", function(col_name = "") { } counts <- as.data.frame(table(private$data[,c(col_name)])) - counts <- rename(counts, replace = c("Var1" = "Levels", "Freq" = "Counts")) + counts <- plyr::rename(counts, replace = c("Var1" = "Levels", "Freq" = "Counts")) return(counts) } ) diff --git a/instat/ucrFilter.vb b/instat/ucrFilter.vb index 6d719863707..be30bd08f20 100644 --- a/instat/ucrFilter.vb +++ b/instat/ucrFilter.vb @@ -113,7 +113,7 @@ Public Class ucrFilter Dim strCondition As String clsCurrentConditionList.SetRCommand("list") - clsCurrentConditionView.SetParameter(True, ucrFilterByReceiver.GetVariableNames()) + clsCurrentConditionView.SetParameter(True, strValue:=ucrFilterByReceiver.GetVariableNames()) clsCurrentConditionList.AddParameter("column", ucrFilterByReceiver.GetVariableNames()) If ucrFilterByReceiver.strCurrDataType = "factor" Then clsCurrentConditionView.SetOperation("%in%") @@ -124,7 +124,7 @@ Public Class ucrFilter clsCurrentConditionList.AddParameter("operation", Chr(34) & ucrFilterOperation.GetText() & Chr(34)) strCondition = ucrValueForFilter.GetText() End If - clsCurrentConditionView.SetParameter(False, strCondition) + clsCurrentConditionView.SetParameter(False, strValue:=strCondition) clsCurrentConditionList.AddParameter("value", strCondition) clsConditionsList.AddParameter("C" & clsConditionsList.clsParameters.Count, clsRFunctionParameter:=(clsCurrentConditionList)) lviCondition = New ListViewItem({ucrFilterByReceiver.GetVariableNames(), clsCurrentConditionView.strOperation & " " & strCondition}) @@ -132,7 +132,7 @@ Public Class ucrFilter If clsFilterView.clsLeftOperator Is Nothing Then clsFilterView.SetParameter(True, clsOp:=(clsCurrentConditionView)) Else - clsFilterView.SetParameter(False, "Condition" & clsFilterView.clsAdditionalParameters.Count, clsOp:=(clsCurrentConditionView)) + clsFilterView.SetParameter(False, strParameterName:="Condition" & clsFilterView.clsAdditionalParameters.Count, clsOp:=(clsCurrentConditionView)) End If lstFilters.Columns(0).Width = -2 lstFilters.Columns(1).Width = -2 From 5a226c682e7ee594bcfc0ec904d5dc1af35f4a7c Mon Sep 17 00:00:00 2001 From: John Lunalo Date: Thu, 16 Jun 2016 11:23:20 +0300 Subject: [PATCH 10/10] editing column summaries dialog and renameDescriptives dialog --- instat/dlgColumnStats.Designer.vb | 558 ++++++++++++------------------ instat/dlgColumnStats.fr-FR.resx | 28 +- instat/dlgColumnStats.resx | 238 ++++++------- instat/dlgColumnStats.sw-KE.resx | 28 +- instat/dlgColumnStats.vb | 139 ++++++-- instat/dlgRenameDescriptive.vb | 8 +- instat/instat.vbproj | 9 + 7 files changed, 499 insertions(+), 509 deletions(-) diff --git a/instat/dlgColumnStats.Designer.vb b/instat/dlgColumnStats.Designer.vb index bbc32940eed..6b68e1eed04 100644 --- a/instat/dlgColumnStats.Designer.vb +++ b/instat/dlgColumnStats.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgColumnStats 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 @@ -20,179 +20,128 @@ Partial Class dlgColumnStats '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.tabColumnStatistics = New System.Windows.Forms.TabControl() - Me.tabGeneral = New System.Windows.Forms.TabPage() Me.lblSelectedVariables = New System.Windows.Forms.Label() - Me.ucrReceiverMultiple = New instat.ucrReceiverMultiple() - Me.ucrAddRemove = New instat.ucrSelectorAddRemove() - Me.grpStatistcsRequired = New System.Windows.Forms.GroupBox() - Me.chkMedian = New System.Windows.Forms.CheckBox() - Me.chkMissing = New System.Windows.Forms.CheckBox() + Me.lblByFactors = New System.Windows.Forms.Label() + Me.grpSummaries = New System.Windows.Forms.GroupBox() Me.chkSum = New System.Windows.Forms.CheckBox() Me.chkStDev = New System.Windows.Forms.CheckBox() + Me.chkMedian = New System.Windows.Forms.CheckBox() + Me.chkMissingValues = New System.Windows.Forms.CheckBox() Me.chkMaximum = New System.Windows.Forms.CheckBox() Me.chkMinimum = New System.Windows.Forms.CheckBox() Me.chkMean = New System.Windows.Forms.CheckBox() Me.chkCount = New System.Windows.Forms.CheckBox() - Me.grpForByFactors = New System.Windows.Forms.GroupBox() - Me.chkByFactor = New System.Windows.Forms.CheckBox() - Me.chkForFactor = New System.Windows.Forms.CheckBox() - Me.tabSave = New System.Windows.Forms.TabPage() - Me.chkSaveFittedValuesAndDeviations = New System.Windows.Forms.CheckBox() - Me.chkSaveStatistics = New System.Windows.Forms.CheckBox() - Me.tabOptions = New System.Windows.Forms.TabPage() - Me.chkRestrictDataValues = New System.Windows.Forms.CheckBox() - Me.grpMissingValues = New System.Windows.Forms.GroupBox() - Me.chkFeb29th = New System.Windows.Forms.CheckBox() - Me.chkTrace = New System.Windows.Forms.CheckBox() - Me.chkMissingData = New System.Windows.Forms.CheckBox() - Me.chkSetSummaryToMissingIfOver = New System.Windows.Forms.CheckBox() - Me.chkIgnoreMissingValues = New System.Windows.Forms.CheckBox() + Me.grpOptions = New System.Windows.Forms.GroupBox() + Me.chkdropUnusedLevels = New System.Windows.Forms.CheckBox() + Me.chkReturnOutput = New System.Windows.Forms.CheckBox() + Me.chkStoreResults = New System.Windows.Forms.CheckBox() + Me.ucrInputStoreResults = New instat.ucrInputComboBox() + Me.ucrReceiverByFactor = New instat.ucrReceiverMultiple() + Me.ucrReceiverSelectedVariables = New instat.ucrReceiverMultiple() + Me.ucrSelectorForColumnStatistics = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.tabColumnStatistics.SuspendLayout() - Me.tabGeneral.SuspendLayout() - Me.grpStatistcsRequired.SuspendLayout() - Me.grpForByFactors.SuspendLayout() - Me.tabSave.SuspendLayout() - Me.tabOptions.SuspendLayout() - Me.grpMissingValues.SuspendLayout() + Me.chkRange = New System.Windows.Forms.CheckBox() + Me.chkMode = New System.Windows.Forms.CheckBox() + Me.grpSummaries.SuspendLayout() + Me.grpOptions.SuspendLayout() Me.SuspendLayout() ' - 'tabColumnStatistics - ' - Me.tabColumnStatistics.Controls.Add(Me.tabGeneral) - Me.tabColumnStatistics.Controls.Add(Me.tabSave) - Me.tabColumnStatistics.Controls.Add(Me.tabOptions) - Me.tabColumnStatistics.Location = New System.Drawing.Point(1, 3) - Me.tabColumnStatistics.Name = "tabColumnStatistics" - Me.tabColumnStatistics.SelectedIndex = 0 - Me.tabColumnStatistics.Size = New System.Drawing.Size(554, 269) - Me.tabColumnStatistics.TabIndex = 8 - Me.tabColumnStatistics.Tag = "Column_Statistics" - ' - 'tabGeneral - ' - Me.tabGeneral.Controls.Add(Me.lblSelectedVariables) - Me.tabGeneral.Controls.Add(Me.ucrReceiverMultiple) - Me.tabGeneral.Controls.Add(Me.ucrAddRemove) - Me.tabGeneral.Controls.Add(Me.grpStatistcsRequired) - Me.tabGeneral.Controls.Add(Me.grpForByFactors) - Me.tabGeneral.Location = New System.Drawing.Point(4, 22) - Me.tabGeneral.Name = "tabGeneral" - Me.tabGeneral.Padding = New System.Windows.Forms.Padding(3) - Me.tabGeneral.Size = New System.Drawing.Size(546, 243) - Me.tabGeneral.TabIndex = 0 - Me.tabGeneral.Tag = "General" - Me.tabGeneral.Text = "General" - Me.tabGeneral.UseVisualStyleBackColor = True - ' 'lblSelectedVariables ' Me.lblSelectedVariables.AutoSize = True - Me.lblSelectedVariables.Location = New System.Drawing.Point(236, 6) + Me.lblSelectedVariables.Location = New System.Drawing.Point(243, 13) Me.lblSelectedVariables.Name = "lblSelectedVariables" - Me.lblSelectedVariables.Size = New System.Drawing.Size(95, 13) - Me.lblSelectedVariables.TabIndex = 12 - Me.lblSelectedVariables.Tag = "Selected_Variables" - Me.lblSelectedVariables.Text = "Selected Variables" - ' - 'ucrReceiverMultiple - ' - Me.ucrReceiverMultiple.Location = New System.Drawing.Point(225, 22) - Me.ucrReceiverMultiple.Name = "ucrReceiverMultiple" - Me.ucrReceiverMultiple.Size = New System.Drawing.Size(134, 135) - Me.ucrReceiverMultiple.TabIndex = 11 - ' - 'ucrAddRemove - ' - Me.ucrAddRemove.Location = New System.Drawing.Point(0, 19) - Me.ucrAddRemove.Name = "ucrAddRemove" - Me.ucrAddRemove.Size = New System.Drawing.Size(208, 140) - Me.ucrAddRemove.TabIndex = 10 - ' - 'grpStatistcsRequired - ' - Me.grpStatistcsRequired.Controls.Add(Me.chkMedian) - Me.grpStatistcsRequired.Controls.Add(Me.chkMissing) - Me.grpStatistcsRequired.Controls.Add(Me.chkSum) - Me.grpStatistcsRequired.Controls.Add(Me.chkStDev) - Me.grpStatistcsRequired.Controls.Add(Me.chkMaximum) - Me.grpStatistcsRequired.Controls.Add(Me.chkMinimum) - Me.grpStatistcsRequired.Controls.Add(Me.chkMean) - Me.grpStatistcsRequired.Controls.Add(Me.chkCount) - Me.grpStatistcsRequired.Location = New System.Drawing.Point(381, 19) - Me.grpStatistcsRequired.Name = "grpStatistcsRequired" - Me.grpStatistcsRequired.Size = New System.Drawing.Size(159, 117) - Me.grpStatistcsRequired.TabIndex = 9 - Me.grpStatistcsRequired.TabStop = False - Me.grpStatistcsRequired.Tag = "Statistcs_Required" - Me.grpStatistcsRequired.Text = "StatistcsRequired" - ' - 'chkMedian - ' - Me.chkMedian.AutoSize = True - Me.chkMedian.Location = New System.Drawing.Point(87, 43) - Me.chkMedian.Name = "chkMedian" - Me.chkMedian.Size = New System.Drawing.Size(61, 17) - Me.chkMedian.TabIndex = 0 - Me.chkMedian.Tag = "Median" - Me.chkMedian.Text = "Median" - Me.chkMedian.UseVisualStyleBackColor = True - ' - 'chkMissing - ' - Me.chkMissing.AutoSize = True - Me.chkMissing.Location = New System.Drawing.Point(87, 20) - Me.chkMissing.Name = "chkMissing" - Me.chkMissing.Size = New System.Drawing.Size(64, 17) - Me.chkMissing.TabIndex = 0 - Me.chkMissing.Tag = "Missing" - Me.chkMissing.Text = "Missing " - Me.chkMissing.UseVisualStyleBackColor = True + Me.lblSelectedVariables.Size = New System.Drawing.Size(99, 13) + Me.lblSelectedVariables.TabIndex = 4 + Me.lblSelectedVariables.Text = "Selected Varable(s)" + ' + 'lblByFactors + ' + Me.lblByFactors.AutoSize = True + Me.lblByFactors.Location = New System.Drawing.Point(243, 141) + Me.lblByFactors.Name = "lblByFactors" + Me.lblByFactors.Size = New System.Drawing.Size(63, 13) + Me.lblByFactors.TabIndex = 5 + Me.lblByFactors.Text = "By Factor(s)" + ' + 'grpSummaries + ' + Me.grpSummaries.Controls.Add(Me.chkMode) + Me.grpSummaries.Controls.Add(Me.chkRange) + Me.grpSummaries.Controls.Add(Me.chkSum) + Me.grpSummaries.Controls.Add(Me.chkStDev) + Me.grpSummaries.Controls.Add(Me.chkMedian) + Me.grpSummaries.Controls.Add(Me.chkMissingValues) + Me.grpSummaries.Controls.Add(Me.chkMaximum) + Me.grpSummaries.Controls.Add(Me.chkMinimum) + Me.grpSummaries.Controls.Add(Me.chkMean) + Me.grpSummaries.Controls.Add(Me.chkCount) + Me.grpSummaries.Location = New System.Drawing.Point(13, 197) + Me.grpSummaries.Name = "grpSummaries" + Me.grpSummaries.Size = New System.Drawing.Size(200, 148) + Me.grpSummaries.TabIndex = 8 + Me.grpSummaries.TabStop = False + Me.grpSummaries.Text = "Summaries" ' 'chkSum ' Me.chkSum.AutoSize = True - Me.chkSum.Location = New System.Drawing.Point(87, 89) + Me.chkSum.Location = New System.Drawing.Point(96, 91) Me.chkSum.Name = "chkSum" Me.chkSum.Size = New System.Drawing.Size(47, 17) - Me.chkSum.TabIndex = 0 - Me.chkSum.Tag = "Sum" + Me.chkSum.TabIndex = 7 Me.chkSum.Text = "Sum" Me.chkSum.UseVisualStyleBackColor = True ' 'chkStDev ' Me.chkStDev.AutoSize = True - Me.chkStDev.Location = New System.Drawing.Point(87, 66) + Me.chkStDev.Location = New System.Drawing.Point(96, 67) Me.chkStDev.Name = "chkStDev" - Me.chkStDev.Size = New System.Drawing.Size(62, 17) - Me.chkStDev.TabIndex = 0 - Me.chkStDev.Tag = "St_Dev" - Me.chkStDev.Text = "St. Dev" + Me.chkStDev.Size = New System.Drawing.Size(59, 17) + Me.chkStDev.TabIndex = 6 + Me.chkStDev.Text = "St.Dev" Me.chkStDev.UseVisualStyleBackColor = True ' + 'chkMedian + ' + Me.chkMedian.AutoSize = True + Me.chkMedian.Location = New System.Drawing.Point(96, 43) + Me.chkMedian.Name = "chkMedian" + Me.chkMedian.Size = New System.Drawing.Size(61, 17) + Me.chkMedian.TabIndex = 5 + Me.chkMedian.Text = "Median" + Me.chkMedian.UseVisualStyleBackColor = True + ' + 'chkMissingValues + ' + Me.chkMissingValues.AutoSize = True + Me.chkMissingValues.Location = New System.Drawing.Point(96, 20) + Me.chkMissingValues.Name = "chkMissingValues" + Me.chkMissingValues.Size = New System.Drawing.Size(97, 17) + Me.chkMissingValues.TabIndex = 4 + Me.chkMissingValues.Text = "MIssing Values" + Me.chkMissingValues.UseVisualStyleBackColor = True + ' 'chkMaximum ' Me.chkMaximum.AutoSize = True - Me.chkMaximum.Location = New System.Drawing.Point(6, 89) + Me.chkMaximum.Location = New System.Drawing.Point(7, 91) Me.chkMaximum.Name = "chkMaximum" - Me.chkMaximum.Size = New System.Drawing.Size(73, 17) - Me.chkMaximum.TabIndex = 0 - Me.chkMaximum.Tag = "Maximum" - Me.chkMaximum.Text = "Maximum " + Me.chkMaximum.Size = New System.Drawing.Size(70, 17) + Me.chkMaximum.TabIndex = 3 + Me.chkMaximum.Text = "Maximum" Me.chkMaximum.UseVisualStyleBackColor = True ' 'chkMinimum ' Me.chkMinimum.AutoSize = True - Me.chkMinimum.Location = New System.Drawing.Point(7, 66) + Me.chkMinimum.Location = New System.Drawing.Point(7, 67) Me.chkMinimum.Name = "chkMinimum" Me.chkMinimum.Size = New System.Drawing.Size(67, 17) - Me.chkMinimum.TabIndex = 0 - Me.chkMinimum.Tag = "Minimum" + Me.chkMinimum.TabIndex = 2 Me.chkMinimum.Text = "Minimum" Me.chkMinimum.UseVisualStyleBackColor = True ' @@ -202,8 +151,7 @@ Partial Class dlgColumnStats Me.chkMean.Location = New System.Drawing.Point(7, 43) Me.chkMean.Name = "chkMean" Me.chkMean.Size = New System.Drawing.Size(53, 17) - Me.chkMean.TabIndex = 0 - Me.chkMean.Tag = "Mean" + Me.chkMean.TabIndex = 1 Me.chkMean.Text = "Mean" Me.chkMean.UseVisualStyleBackColor = True ' @@ -212,230 +160,162 @@ Partial Class dlgColumnStats Me.chkCount.AutoSize = True Me.chkCount.Location = New System.Drawing.Point(7, 20) Me.chkCount.Name = "chkCount" - Me.chkCount.Size = New System.Drawing.Size(57, 17) + Me.chkCount.Size = New System.Drawing.Size(54, 17) Me.chkCount.TabIndex = 0 - Me.chkCount.Tag = "Count" - Me.chkCount.Text = "Count " + Me.chkCount.Text = "Count" Me.chkCount.UseVisualStyleBackColor = True ' - 'grpForByFactors - ' - Me.grpForByFactors.Controls.Add(Me.chkByFactor) - Me.grpForByFactors.Controls.Add(Me.chkForFactor) - Me.grpForByFactors.Location = New System.Drawing.Point(6, 161) - Me.grpForByFactors.Name = "grpForByFactors" - Me.grpForByFactors.Size = New System.Drawing.Size(262, 66) - Me.grpForByFactors.TabIndex = 8 - Me.grpForByFactors.TabStop = False - ' - 'chkByFactor - ' - Me.chkByFactor.AutoSize = True - Me.chkByFactor.Location = New System.Drawing.Point(7, 43) - Me.chkByFactor.Name = "chkByFactor" - Me.chkByFactor.Size = New System.Drawing.Size(74, 17) - Me.chkByFactor.TabIndex = 1 - Me.chkByFactor.Tag = "By_Factor" - Me.chkByFactor.Text = "By Factor " - Me.chkByFactor.UseVisualStyleBackColor = True - ' - 'chkForFactor - ' - Me.chkForFactor.AutoSize = True - Me.chkForFactor.Location = New System.Drawing.Point(7, 12) - Me.chkForFactor.Name = "chkForFactor" - Me.chkForFactor.Size = New System.Drawing.Size(74, 17) - Me.chkForFactor.TabIndex = 0 - Me.chkForFactor.Tag = "For_Factor" - Me.chkForFactor.Text = "For Factor" - Me.chkForFactor.UseVisualStyleBackColor = True - ' - 'tabSave - ' - Me.tabSave.Controls.Add(Me.chkSaveFittedValuesAndDeviations) - Me.tabSave.Controls.Add(Me.chkSaveStatistics) - Me.tabSave.Location = New System.Drawing.Point(4, 22) - Me.tabSave.Name = "tabSave" - Me.tabSave.Padding = New System.Windows.Forms.Padding(3) - Me.tabSave.Size = New System.Drawing.Size(546, 243) - Me.tabSave.TabIndex = 1 - Me.tabSave.Tag = "Save" - Me.tabSave.Text = "Save" - Me.tabSave.UseVisualStyleBackColor = True - ' - 'chkSaveFittedValuesAndDeviations - ' - Me.chkSaveFittedValuesAndDeviations.AutoSize = True - Me.chkSaveFittedValuesAndDeviations.Location = New System.Drawing.Point(9, 57) - Me.chkSaveFittedValuesAndDeviations.Name = "chkSaveFittedValuesAndDeviations" - Me.chkSaveFittedValuesAndDeviations.Size = New System.Drawing.Size(183, 17) - Me.chkSaveFittedValuesAndDeviations.TabIndex = 1 - Me.chkSaveFittedValuesAndDeviations.Tag = "Save_fitted_values_and_deviations" - Me.chkSaveFittedValuesAndDeviations.Text = "Save fitted values and deviations" - Me.chkSaveFittedValuesAndDeviations.UseVisualStyleBackColor = True - ' - 'chkSaveStatistics - ' - Me.chkSaveStatistics.AutoSize = True - Me.chkSaveStatistics.Location = New System.Drawing.Point(9, 18) - Me.chkSaveStatistics.Name = "chkSaveStatistics" - Me.chkSaveStatistics.Size = New System.Drawing.Size(99, 17) - Me.chkSaveStatistics.TabIndex = 2 - Me.chkSaveStatistics.Tag = "Save_Statistics" - Me.chkSaveStatistics.Text = "Save Statistics " - Me.chkSaveStatistics.UseVisualStyleBackColor = True - ' - 'tabOptions - ' - Me.tabOptions.Controls.Add(Me.chkRestrictDataValues) - Me.tabOptions.Controls.Add(Me.grpMissingValues) - Me.tabOptions.Location = New System.Drawing.Point(4, 22) - Me.tabOptions.Name = "tabOptions" - Me.tabOptions.Padding = New System.Windows.Forms.Padding(3) - Me.tabOptions.Size = New System.Drawing.Size(546, 243) - Me.tabOptions.TabIndex = 2 - Me.tabOptions.Tag = "Options" - Me.tabOptions.Text = "Options" - Me.tabOptions.UseVisualStyleBackColor = True - ' - 'chkRestrictDataValues - ' - Me.chkRestrictDataValues.AutoSize = True - Me.chkRestrictDataValues.Location = New System.Drawing.Point(7, 6) - Me.chkRestrictDataValues.Name = "chkRestrictDataValues" - Me.chkRestrictDataValues.Size = New System.Drawing.Size(123, 17) - Me.chkRestrictDataValues.TabIndex = 2 - Me.chkRestrictDataValues.Tag = "Restrict_data_values" - Me.chkRestrictDataValues.Text = "Restrict data values " - Me.chkRestrictDataValues.UseVisualStyleBackColor = True - ' - 'grpMissingValues - ' - Me.grpMissingValues.Controls.Add(Me.chkFeb29th) - Me.grpMissingValues.Controls.Add(Me.chkTrace) - Me.grpMissingValues.Controls.Add(Me.chkMissingData) - Me.grpMissingValues.Controls.Add(Me.chkSetSummaryToMissingIfOver) - Me.grpMissingValues.Controls.Add(Me.chkIgnoreMissingValues) - Me.grpMissingValues.Location = New System.Drawing.Point(7, 46) - Me.grpMissingValues.Name = "grpMissingValues" - Me.grpMissingValues.Size = New System.Drawing.Size(303, 100) - Me.grpMissingValues.TabIndex = 3 - Me.grpMissingValues.TabStop = False - ' - 'chkFeb29th - ' - Me.chkFeb29th.AutoSize = True - Me.chkFeb29th.Location = New System.Drawing.Point(232, 14) - Me.chkFeb29th.Name = "chkFeb29th" - Me.chkFeb29th.Size = New System.Drawing.Size(44, 17) - Me.chkFeb29th.TabIndex = 0 - Me.chkFeb29th.Text = "* * *" - Me.chkFeb29th.UseVisualStyleBackColor = True - ' - 'chkTrace - ' - Me.chkTrace.AutoSize = True - Me.chkTrace.Location = New System.Drawing.Point(191, 14) - Me.chkTrace.Name = "chkTrace" - Me.chkTrace.Size = New System.Drawing.Size(37, 17) - Me.chkTrace.TabIndex = 0 - Me.chkTrace.Text = "* *" - Me.chkTrace.UseVisualStyleBackColor = True - ' - 'chkMissingData - ' - Me.chkMissingData.AutoSize = True - Me.chkMissingData.Location = New System.Drawing.Point(142, 14) - Me.chkMissingData.Name = "chkMissingData" - Me.chkMissingData.Size = New System.Drawing.Size(30, 17) - Me.chkMissingData.TabIndex = 0 - Me.chkMissingData.Text = "*" - Me.chkMissingData.UseVisualStyleBackColor = True - ' - 'chkSetSummaryToMissingIfOver - ' - Me.chkSetSummaryToMissingIfOver.AutoSize = True - Me.chkSetSummaryToMissingIfOver.Location = New System.Drawing.Point(6, 57) - Me.chkSetSummaryToMissingIfOver.Name = "chkSetSummaryToMissingIfOver" - Me.chkSetSummaryToMissingIfOver.Size = New System.Drawing.Size(211, 17) - Me.chkSetSummaryToMissingIfOver.TabIndex = 0 - Me.chkSetSummaryToMissingIfOver.Tag = "Set_summary_if_they_are_over" - Me.chkSetSummaryToMissingIfOver.Text = "Set summary to missing if they are over" - Me.chkSetSummaryToMissingIfOver.UseVisualStyleBackColor = True - ' - 'chkIgnoreMissingValues - ' - Me.chkIgnoreMissingValues.AutoSize = True - Me.chkIgnoreMissingValues.Location = New System.Drawing.Point(5, 14) - Me.chkIgnoreMissingValues.Name = "chkIgnoreMissingValues" - Me.chkIgnoreMissingValues.Size = New System.Drawing.Size(131, 17) - Me.chkIgnoreMissingValues.TabIndex = 0 - Me.chkIgnoreMissingValues.Tag = "Ignore_missing_values" - Me.chkIgnoreMissingValues.Text = "Ignore missing Values " - Me.chkIgnoreMissingValues.UseVisualStyleBackColor = True + 'grpOptions + ' + Me.grpOptions.Controls.Add(Me.chkdropUnusedLevels) + Me.grpOptions.Controls.Add(Me.chkReturnOutput) + Me.grpOptions.Location = New System.Drawing.Point(246, 264) + Me.grpOptions.Name = "grpOptions" + Me.grpOptions.Size = New System.Drawing.Size(164, 81) + Me.grpOptions.TabIndex = 9 + Me.grpOptions.TabStop = False + Me.grpOptions.Text = "Options" + ' + 'chkdropUnusedLevels + ' + Me.chkdropUnusedLevels.AutoSize = True + Me.chkdropUnusedLevels.Location = New System.Drawing.Point(7, 40) + Me.chkdropUnusedLevels.Name = "chkdropUnusedLevels" + Me.chkdropUnusedLevels.Size = New System.Drawing.Size(89, 30) + Me.chkdropUnusedLevels.TabIndex = 1 + Me.chkdropUnusedLevels.Text = "Drop Unused" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " Levels" + Me.chkdropUnusedLevels.UseVisualStyleBackColor = True + ' + 'chkReturnOutput + ' + Me.chkReturnOutput.AutoSize = True + Me.chkReturnOutput.Location = New System.Drawing.Point(7, 20) + Me.chkReturnOutput.Name = "chkReturnOutput" + Me.chkReturnOutput.Size = New System.Drawing.Size(93, 17) + Me.chkReturnOutput.TabIndex = 0 + Me.chkReturnOutput.Text = "Return Output" + Me.chkReturnOutput.UseVisualStyleBackColor = True + ' + 'chkStoreResults + ' + Me.chkStoreResults.AutoSize = True + Me.chkStoreResults.Location = New System.Drawing.Point(11, 356) + Me.chkStoreResults.Name = "chkStoreResults" + Me.chkStoreResults.Size = New System.Drawing.Size(89, 17) + Me.chkStoreResults.TabIndex = 10 + Me.chkStoreResults.Text = "Store Results" + Me.chkStoreResults.UseVisualStyleBackColor = True + ' + 'ucrInputStoreResults + ' + Me.ucrInputStoreResults.IsReadOnly = False + Me.ucrInputStoreResults.Location = New System.Drawing.Point(109, 352) + Me.ucrInputStoreResults.Name = "ucrInputStoreResults" + Me.ucrInputStoreResults.Size = New System.Drawing.Size(104, 21) + Me.ucrInputStoreResults.TabIndex = 11 + ' + 'ucrReceiverByFactor + ' + Me.ucrReceiverByFactor.Location = New System.Drawing.Point(246, 158) + Me.ucrReceiverByFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverByFactor.Name = "ucrReceiverByFactor" + Me.ucrReceiverByFactor.Selector = Nothing + Me.ucrReceiverByFactor.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverByFactor.TabIndex = 7 + ' + 'ucrReceiverSelectedVariables + ' + Me.ucrReceiverSelectedVariables.Location = New System.Drawing.Point(246, 32) + Me.ucrReceiverSelectedVariables.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSelectedVariables.Name = "ucrReceiverSelectedVariables" + Me.ucrReceiverSelectedVariables.Selector = Nothing + Me.ucrReceiverSelectedVariables.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverSelectedVariables.TabIndex = 6 + ' + 'ucrSelectorForColumnStatistics + ' + Me.ucrSelectorForColumnStatistics.Location = New System.Drawing.Point(13, 13) + Me.ucrSelectorForColumnStatistics.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorForColumnStatistics.Name = "ucrSelectorForColumnStatistics" + Me.ucrSelectorForColumnStatistics.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorForColumnStatistics.TabIndex = 3 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(72, 279) + Me.ucrBase.Location = New System.Drawing.Point(11, 379) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 53) Me.ucrBase.TabIndex = 2 ' + 'chkRange + ' + Me.chkRange.AutoSize = True + Me.chkRange.Location = New System.Drawing.Point(7, 115) + Me.chkRange.Name = "chkRange" + Me.chkRange.Size = New System.Drawing.Size(58, 17) + Me.chkRange.TabIndex = 8 + Me.chkRange.Text = "Range" + Me.chkRange.UseVisualStyleBackColor = True + ' + 'chkMode + ' + Me.chkMode.AutoSize = True + Me.chkMode.Location = New System.Drawing.Point(96, 115) + Me.chkMode.Name = "chkMode" + Me.chkMode.Size = New System.Drawing.Size(53, 17) + Me.chkMode.TabIndex = 9 + Me.chkMode.Text = "Mode" + Me.chkMode.UseVisualStyleBackColor = True + ' 'dlgColumnStats ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(557, 332) - Me.Controls.Add(Me.tabColumnStatistics) + Me.ClientSize = New System.Drawing.Size(433, 444) + Me.Controls.Add(Me.ucrInputStoreResults) + Me.Controls.Add(Me.chkStoreResults) + Me.Controls.Add(Me.grpOptions) + Me.Controls.Add(Me.grpSummaries) + Me.Controls.Add(Me.ucrReceiverByFactor) + Me.Controls.Add(Me.ucrReceiverSelectedVariables) + Me.Controls.Add(Me.lblByFactors) + Me.Controls.Add(Me.lblSelectedVariables) + Me.Controls.Add(Me.ucrSelectorForColumnStatistics) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgColumnStats" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Column_Statistics" Me.Text = "Column Statistics" - Me.tabColumnStatistics.ResumeLayout(False) - Me.tabGeneral.ResumeLayout(False) - Me.tabGeneral.PerformLayout() - Me.grpStatistcsRequired.ResumeLayout(False) - Me.grpStatistcsRequired.PerformLayout() - Me.grpForByFactors.ResumeLayout(False) - Me.grpForByFactors.PerformLayout() - Me.tabSave.ResumeLayout(False) - Me.tabSave.PerformLayout() - Me.tabOptions.ResumeLayout(False) - Me.tabOptions.PerformLayout() - Me.grpMissingValues.ResumeLayout(False) - Me.grpMissingValues.PerformLayout() + Me.grpSummaries.ResumeLayout(False) + Me.grpSummaries.PerformLayout() + Me.grpOptions.ResumeLayout(False) + Me.grpOptions.PerformLayout() Me.ResumeLayout(False) + Me.PerformLayout() End Sub - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents tabColumnStatistics As TabControl - Friend WithEvents tabGeneral As TabPage - Friend WithEvents grpStatistcsRequired As GroupBox - Friend WithEvents chkMedian As CheckBox - Friend WithEvents chkMissing As CheckBox - Friend WithEvents chkSum As CheckBox - Friend WithEvents chkStDev As CheckBox - Friend WithEvents chkMaximum As CheckBox - Friend WithEvents chkMinimum As CheckBox - Friend WithEvents chkMean As CheckBox - Friend WithEvents chkCount As CheckBox - Friend WithEvents grpForByFactors As GroupBox - Friend WithEvents chkByFactor As CheckBox - Friend WithEvents chkForFactor As CheckBox - Friend WithEvents tabSave As TabPage - Friend WithEvents lblSelectedVariables As Label - Friend WithEvents ucrReceiverMultiple As ucrReceiverMultiple - Friend WithEvents ucrAddRemove As ucrSelectorAddRemove - Friend WithEvents chkSaveFittedValuesAndDeviations As CheckBox - Friend WithEvents chkSaveStatistics As CheckBox - Friend WithEvents tabOptions As TabPage - Friend WithEvents chkRestrictDataValues As CheckBox - Friend WithEvents grpMissingValues As GroupBox - Friend WithEvents chkFeb29th As CheckBox - Friend WithEvents chkTrace As CheckBox - Friend WithEvents chkMissingData As CheckBox - Friend WithEvents chkSetSummaryToMissingIfOver As CheckBox - Friend WithEvents chkIgnoreMissingValues As CheckBox + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrSelectorForColumnStatistics As ucrSelectorByDataFrameAddRemove + Friend WithEvents lblSelectedVariables As Label + Friend WithEvents lblByFactors As Label + Friend WithEvents ucrReceiverSelectedVariables As ucrReceiverMultiple + Friend WithEvents ucrReceiverByFactor As ucrReceiverMultiple + Friend WithEvents grpSummaries As GroupBox + Friend WithEvents chkMedian As CheckBox + Friend WithEvents chkMissingValues As CheckBox + Friend WithEvents chkMaximum As CheckBox + Friend WithEvents chkMinimum As CheckBox + Friend WithEvents chkMean As CheckBox + Friend WithEvents chkCount As CheckBox + Friend WithEvents chkSum As CheckBox + Friend WithEvents chkStDev As CheckBox + Friend WithEvents grpOptions As GroupBox + Friend WithEvents chkdropUnusedLevels As CheckBox + Friend WithEvents chkReturnOutput As CheckBox + Friend WithEvents chkStoreResults As CheckBox + Friend WithEvents ucrInputStoreResults As ucrInputComboBox + Friend WithEvents chkMode As CheckBox + Friend WithEvents chkRange As CheckBox End Class diff --git a/instat/dlgColumnStats.fr-FR.resx b/instat/dlgColumnStats.fr-FR.resx index a3df4f013d3..9c9f69d752c 100644 --- a/instat/dlgColumnStats.fr-FR.resx +++ b/instat/dlgColumnStats.fr-FR.resx @@ -1,15 +1,15 @@ - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/instat/dlgColumnStats.resx b/instat/dlgColumnStats.resx index 1af7de150c9..29dcb1b3a35 100644 --- a/instat/dlgColumnStats.resx +++ b/instat/dlgColumnStats.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/instat/dlgColumnStats.sw-KE.resx b/instat/dlgColumnStats.sw-KE.resx index a3df4f013d3..9c9f69d752c 100644 --- a/instat/dlgColumnStats.sw-KE.resx +++ b/instat/dlgColumnStats.sw-KE.resx @@ -1,15 +1,15 @@ - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 655133fbcfd..d8a9fa8b5fc 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -20,8 +20,6 @@ Public Class dlgColumnStats Public bFirstLoad As Boolean = True Private Sub dlgColumnStats_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) - ucrBase.clsRsyntax.iCallType = 2 - If bFirstLoad Then SetDefaults() InitialiseDialog() @@ -33,7 +31,11 @@ Public Class dlgColumnStats End Sub Private Sub TestOKEnabled() - + If (chkCount.Checked Or chkMaximum.Checked Or chkMean.Checked Or chkMedian.Checked Or chkMinimum.Checked Or chkMode.Checked Or chkStDev.Checked Or chkSum.Checked Or chkRange.Checked) And Not ucrReceiverSelectedVariables.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End Sub Private Sub ReopenDialog() @@ -41,33 +43,128 @@ Public Class dlgColumnStats End Sub Private Sub SetDefaults() - ucrReceiverMultiple.Selector = ucrAddRemove - ucrReceiverMultiple.SetMeAsReceiver() - ucrBase.clsRsyntax.SetFunction("colStats") - ucrBase.iHelpTopicID = 64 + ucrInputStoreResults.SetName("Summary_name") + chkStoreResults.Checked = True + chkReturnOutput.Checked = True + chkdropUnusedLevels.Checked = True + ucrSelectorForColumnStatistics.Reset() End Sub Private Sub InitialiseDialog() + ucrBase.clsRsyntax.iCallType = 2 + ucrReceiverSelectedVariables.Selector = ucrSelectorForColumnStatistics + ucrReceiverByFactor.Selector = ucrSelectorForColumnStatistics + ucrReceiverSelectedVariables.SetMeAsReceiver() + ucrReceiverSelectedVariables.SetIncludedDataTypes({"numeric"}) + ucrReceiverByFactor.SetIncludedDataTypes({"factor"}) ucrBase.iHelpTopicID = 64 + ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() - End Sub - - Private Sub ucrReceiverMultiple_Leave(sender As Object, e As EventArgs) Handles ucrReceiverMultiple.Leave - Dim objItem As Object - 'TODO fix this - Dim temp_obj As New Object - 'Dim temp_obj As ListBox.ObjectCollection = ucrReceiverMultiple.lstSelectedVariables.Items - If ucrReceiverMultiple.lstSelectedVariables.Items.Count > 0 Then - For Each objItem In temp_obj - ucrBase.clsRsyntax.AddParameter("data_temp$" & objItem & "", "x") - Next - End If - - + TestOKEnabled() + End Sub + + Private Sub grpSummaries_CheckedChanged(sender As Object, e As EventArgs) Handles chkCount.CheckedChanged, chkMean.CheckedChanged, chkMedian.CheckedChanged, chkMinimum.CheckedChanged, chkMaximum.CheckedChanged, chkStDev.CheckedChanged, chkMode.CheckedChanged, chkSum.CheckedChanged, chkRange.CheckedChanged + SummariesParameters() + TestOKEnabled() End Sub + Private Sub SummariesParameters() + Dim lstCheckboxes As New List(Of CheckBox) + Dim i As Integer = 0 + If lstCheckboxes.Count = 0 Then + lstCheckboxes.AddRange({chkMean, chkMedian, chkCount, chkMinimum, chkMaximum, chkStDev, chkMode, chkSum, chkRange}) + End If + + If chkCount.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_count" & Chr(34)) + + ElseIf chkMean.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_mean" & Chr(34)) + + ElseIf chkMinimum.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_min" & Chr(34)) + + ElseIf chkMaximum.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_max" & Chr(34)) + + ElseIf chkMedian.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_median" & Chr(34)) + + ElseIf chkSum.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_sum" & Chr(34)) + + ElseIf chkStDev.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summary_sd" & Chr(34)) + ElseIf chkMode.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summmary_mode" & Chr(34)) + + ElseIf chkRange.Checked Then + ucrBase.clsRsyntax.AddParameter("summaries", Chr(34) & "summmary_range" & Chr(34)) + Else + End If + End Sub + + Private Sub grpOptions_CheckedChanged(sender As Object, e As EventArgs) Handles chkdropUnusedLevels.CheckedChanged, chkReturnOutput.CheckedChanged + OptionParameters() + End Sub + + Private Sub OptionParameters() + If chkReturnOutput.Checked Then + ucrBase.clsRsyntax.AddParameter("return_output", "TRUE") + Else + ucrBase.clsRsyntax.AddParameter("return_output", "FALSE") + End If + If chkdropUnusedLevels.Checked Then + ucrBase.clsRsyntax.AddParameter("drop", "TRUE") + Else + ucrBase.clsRsyntax.AddParameter("drop", "FALSE") + End If + End Sub + + Private Sub ucrSelectorForColumnStatistics_DataFrameChanged() Handles ucrSelectorForColumnStatistics.DataFrameChanged + ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorForColumnStatistics.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) + End Sub + + Private Sub ucrReceiverSelectedVariables_SelectionChanged() Handles ucrReceiverSelectedVariables.SelectionChanged + If Not ucrReceiverSelectedVariables.IsEmpty Then + ucrBase.clsRsyntax.AddParameter("columns_to_summarise", ucrReceiverSelectedVariables.GetVariableNames) + Else + ucrBase.clsRsyntax.RemoveParameter("columns_to_summarise") + End If + End Sub + + Private Sub chkStoreResults_CheckedChanged(sender As Object, e As EventArgs) Handles chkStoreResults.CheckedChanged + StoreResultsParamenter() + End Sub + + Private Sub StoreResultsParamenter() + If chkStoreResults.Checked Then + ucrBase.clsRsyntax.AddParameter("store_results", "TRUE") + Else + ucrBase.clsRsyntax.AddParameter("store_results", "FALSE") + End If + End Sub + Private Sub ucrInputStoreResults_Namechanged() Handles ucrInputStoreResults.NameChanged + SummarynameParameter() + End Sub + + Private Sub SummarynameParameter() + If chkStoreResults.Checked Then + ucrBase.clsRsyntax.AddParameter("summary_name", Chr(34) & ucrInputStoreResults.GetText & Chr(34)) + Else + ucrBase.clsRsyntax.RemoveParameter("summary_name") + End If + End Sub + + Private Sub ucrReceiverByFactor_SelectionChanged() Handles ucrReceiverByFactor.SelectionChanged + If Not ucrReceiverByFactor.IsEmpty Then + ucrBase.clsRsyntax.AddParameter("factors", ucrReceiverByFactor.GetVariableNames) + Else + ucrBase.clsRsyntax.RemoveParameter("factors") + End If + End Sub End Class \ No newline at end of file diff --git a/instat/dlgRenameDescriptive.vb b/instat/dlgRenameDescriptive.vb index 0ca4dc7e135..abbb8f2adc8 100644 --- a/instat/dlgRenameDescriptive.vb +++ b/instat/dlgRenameDescriptive.vb @@ -31,7 +31,7 @@ Public Class dlgRenameDescriptive End Sub Private Sub TestOKEnabled() - If Not ucrReceiverCurrentName.IsEmpty Then + If ((Not ucrReceiverCurrentName.IsEmpty) And (Not ucrInputNewName.IsEmpty)) Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -79,6 +79,10 @@ Public Class dlgRenameDescriptive End Sub Private Sub ucrInputNewName_NameChanged() Handles ucrInputNewName.NameChanged - ucrBase.clsRsyntax.AddParameter("new_name", Chr(34) & ucrInputNewName.GetText & Chr(34)) + If Not ucrInputNewName.IsEmpty Then + ucrBase.clsRsyntax.AddParameter("new_name", Chr(34) & ucrInputNewName.GetText & Chr(34)) + Else + ucrBase.clsRsyntax.RemoveParameter("new_name") + End If End Sub End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index dec5eaf7d4f..d594e3d06ba 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -1842,6 +1842,15 @@ dlgColumnMetadata.vb + + dlgColumnStats.vb + + + dlgColumnStats.vb + + + dlgColumnStats.vb + dlgCombineText.vb