From e8b47216e4996fc731fbf378e6db8bc35f9fd252 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Sun, 29 Sep 2024 01:44:08 +0300 Subject: [PATCH 01/77] design changes --- instat/dlgView.Designer.vb | 28 +++++++++++++--------------- instat/dlgView.vb | 24 ++++++++++++++++++++---- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 08105f3c44f..741bc55fdc1 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -44,7 +44,6 @@ Partial Class dlgView Me.rdoBottom = New System.Windows.Forms.RadioButton() Me.rdoTop = New System.Windows.Forms.RadioButton() Me.lblDisplayFrom = New System.Windows.Forms.Label() - Me.lblNumberofRows = New System.Windows.Forms.Label() Me.rdoHTMLOutputWindow = New System.Windows.Forms.RadioButton() Me.rdoViewAll = New System.Windows.Forms.RadioButton() Me.rdoViewSelectedColumnsRows = New System.Windows.Forms.RadioButton() @@ -59,6 +58,7 @@ Partial Class dlgView Me.ucrReceiverView = New instat.ucrReceiverMultiple() Me.ucrSelectorForView = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrChkRowNumbers = New instat.ucrCheck() Me.SuspendLayout() ' 'lblSelected @@ -129,17 +129,6 @@ Partial Class dlgView Me.lblDisplayFrom.Tag = "" Me.lblDisplayFrom.Text = "Display From:" ' - 'lblNumberofRows - ' - Me.lblNumberofRows.AutoSize = True - Me.lblNumberofRows.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblNumberofRows.Location = New System.Drawing.Point(248, 258) - Me.lblNumberofRows.Name = "lblNumberofRows" - Me.lblNumberofRows.Size = New System.Drawing.Size(89, 13) - Me.lblNumberofRows.TabIndex = 10 - Me.lblNumberofRows.Tag = "Number_of_rows" - Me.lblNumberofRows.Text = "Number of Rows:" - ' 'rdoHTMLOutputWindow ' Me.rdoHTMLOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -227,7 +216,7 @@ Partial Class dlgView Me.ucrNudNumberRows.AutoSize = True Me.ucrNudNumberRows.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudNumberRows.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 256) + Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 208) Me.ucrNudNumberRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudNumberRows.Name = "ucrNudNumberRows" @@ -294,12 +283,22 @@ Partial Class dlgView Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 17 ' + 'ucrChkRowNumbers + ' + Me.ucrChkRowNumbers.AutoSize = True + Me.ucrChkRowNumbers.Checked = False + Me.ucrChkRowNumbers.Location = New System.Drawing.Point(248, 206) + Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" + Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) + Me.ucrChkRowNumbers.TabIndex = 19 + ' 'dlgView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(416, 393) + Me.Controls.Add(Me.ucrChkRowNumbers) Me.Controls.Add(Me.ucrSaveData) Me.Controls.Add(Me.rdoViewAll) Me.Controls.Add(Me.rdoViewSelectedColumnsRows) @@ -313,7 +312,6 @@ Partial Class dlgView Me.Controls.Add(Me.ucrPnlDisplayFrom) Me.Controls.Add(Me.ucrChkSpecifyRows) Me.Controls.Add(Me.lblDisplayFrom) - Me.Controls.Add(Me.lblNumberofRows) Me.Controls.Add(Me.rdoDispOutputWindow) Me.Controls.Add(Me.rdoDispSepOutputWindow) Me.Controls.Add(Me.ucrPnlDisplayWindow) @@ -345,7 +343,6 @@ Partial Class dlgView Friend WithEvents ucrPnlDisplayFrom As UcrPanel Friend WithEvents ucrChkSpecifyRows As ucrCheck Friend WithEvents lblDisplayFrom As Label - Friend WithEvents lblNumberofRows As Label Friend WithEvents ucrChkSortColumn As ucrCheck Friend WithEvents rdoHTMLOutputWindow As RadioButton Friend WithEvents ucrReceiverSortCol As ucrReceiverSingle @@ -353,4 +350,5 @@ Partial Class dlgView Friend WithEvents rdoViewSelectedColumnsRows As RadioButton Friend WithEvents ucrPnlViewData As UcrPanel Friend WithEvents ucrSaveData As ucrSave + Friend WithEvents ucrChkRowNumbers As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgView.vb b/instat/dlgView.vb index c326c69f397..f97ea881ed5 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -54,6 +54,8 @@ Public Class dlgView ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer") ucrPnlDisplayWindow.AddToLinkedControls(ucrChkSpecifyRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayFrom.AddRadioButton(rdoBottom) ucrPnlDisplayFrom.AddRadioButton(rdoTop) @@ -64,8 +66,11 @@ Public Class dlgView ' This linking only applies if rdoDispOutputWindow is checked ucrChkSpecifyRows.SetText("Specify Rows") ucrChkSpecifyRows.AddToLinkedControls(ucrPnlDisplayFrom, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoTop) - ucrChkSpecifyRows.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) - ucrChkSpecifyRows.AddFunctionNamesCondition(True, {"head", "tail"}) + ' ucrChkSpecifyRows.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) + ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) + + + ucrChkRowNumbers.AddFunctionNamesCondition(True, {"head", "tail"}) ucrChkSpecifyRows.AddFunctionNamesCondition(False, {frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data"}) ' ucrChkSpecifyRows.bAllowNonConditionValues = True @@ -97,9 +102,9 @@ Public Class dlgView ucrSelectorForView.SetParameter(New RParameter("title", 1)) ucrSelectorForView.SetParameterIsString() - ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ucrNudNumberRows.Minimum = 1 - ucrNudNumberRows.SetLinkedDisplayControl(lblNumberofRows) + ' ucrNudNumberRows.SetLinkedDisplayControl(ucrChkNumbersRows) ucrSaveData.SetCheckBoxText("Store Data") ucrSaveData.SetPrefix("last_table") @@ -300,6 +305,17 @@ Public Class dlgView SetSelectorParameterType() End Sub + Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load + If ucrChkRowNumbers.Checked Then + ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ucrNudNumberRows.Visible = True + Else + 'ucrNudNumberRows.Remove("n") + 'ucrNudNumberRows.UnSetParameter(New RParameter("n", 1)) + ucrNudNumberRows.Visible = False + End If + End Sub + Private Sub VariablesVisible() If rdoViewAll.Checked Then ucrSelectorForView.SetVariablesVisible(False) From 88bf3e3b13fb0d8867d4878f99dbfd67a9996f12 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:22:11 +0300 Subject: [PATCH 02/77] code --- instat/dlgView.Designer.vb | 130 +++++++-------------------------- instat/dlgView.vb | 145 +++++++++++++++++++------------------ 2 files changed, 100 insertions(+), 175 deletions(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 741bc55fdc1..0c81ff8889a 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -41,24 +41,19 @@ Partial Class dlgView Me.lblSelected = New System.Windows.Forms.Label() Me.rdoDispSepOutputWindow = New System.Windows.Forms.RadioButton() Me.rdoDispOutputWindow = New System.Windows.Forms.RadioButton() - Me.rdoBottom = New System.Windows.Forms.RadioButton() - Me.rdoTop = New System.Windows.Forms.RadioButton() - Me.lblDisplayFrom = New System.Windows.Forms.Label() Me.rdoHTMLOutputWindow = New System.Windows.Forms.RadioButton() - Me.rdoViewAll = New System.Windows.Forms.RadioButton() - Me.rdoViewSelectedColumnsRows = New System.Windows.Forms.RadioButton() Me.ucrSaveData = New instat.ucrSave() - Me.ucrPnlViewData = New instat.UcrPanel() Me.ucrReceiverSortCol = New instat.ucrReceiverSingle() Me.ucrChkSortColumn = New instat.ucrCheck() Me.ucrNudNumberRows = New instat.ucrNud() - Me.ucrPnlDisplayFrom = New instat.UcrPanel() Me.ucrChkSpecifyRows = New instat.ucrCheck() Me.ucrPnlDisplayWindow = New instat.UcrPanel() Me.ucrReceiverView = New instat.ucrReceiverMultiple() Me.ucrSelectorForView = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrChkRowNumbers = New instat.ucrCheck() + Me.ucrChkDisplayFromTop = New instat.ucrCheck() + Me.cmdTableOptions = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lblSelected @@ -94,41 +89,6 @@ Partial Class dlgView Me.rdoDispOutputWindow.Text = "Display in Output Window" Me.rdoDispOutputWindow.UseVisualStyleBackColor = True ' - 'rdoBottom - ' - Me.rdoBottom.AutoSize = True - Me.rdoBottom.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBottom.Location = New System.Drawing.Point(325, 301) - Me.rdoBottom.Name = "rdoBottom" - Me.rdoBottom.Size = New System.Drawing.Size(58, 17) - Me.rdoBottom.TabIndex = 16 - Me.rdoBottom.TabStop = True - Me.rdoBottom.Text = "Bottom" - Me.rdoBottom.UseVisualStyleBackColor = True - ' - 'rdoTop - ' - Me.rdoTop.AutoSize = True - Me.rdoTop.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoTop.Location = New System.Drawing.Point(325, 278) - Me.rdoTop.Name = "rdoTop" - Me.rdoTop.Size = New System.Drawing.Size(44, 17) - Me.rdoTop.TabIndex = 15 - Me.rdoTop.TabStop = True - Me.rdoTop.Text = "Top" - Me.rdoTop.UseVisualStyleBackColor = True - ' - 'lblDisplayFrom - ' - Me.lblDisplayFrom.AutoSize = True - Me.lblDisplayFrom.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDisplayFrom.Location = New System.Drawing.Point(248, 279) - Me.lblDisplayFrom.Name = "lblDisplayFrom" - Me.lblDisplayFrom.Size = New System.Drawing.Size(70, 13) - Me.lblDisplayFrom.TabIndex = 14 - Me.lblDisplayFrom.Tag = "" - Me.lblDisplayFrom.Text = "Display From:" - ' 'rdoHTMLOutputWindow ' Me.rdoHTMLOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -140,38 +100,6 @@ Partial Class dlgView Me.rdoHTMLOutputWindow.Text = "Display HTML in Output Window" Me.rdoHTMLOutputWindow.UseVisualStyleBackColor = True ' - 'rdoViewAll - ' - Me.rdoViewAll.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoViewAll.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoViewAll.FlatAppearance.BorderSize = 2 - Me.rdoViewAll.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoViewAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoViewAll.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoViewAll.Location = New System.Drawing.Point(67, 6) - Me.rdoViewAll.Name = "rdoViewAll" - Me.rdoViewAll.Size = New System.Drawing.Size(140, 34) - Me.rdoViewAll.TabIndex = 1 - Me.rdoViewAll.Text = "All Columns" - Me.rdoViewAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoViewAll.UseVisualStyleBackColor = True - ' - 'rdoViewSelectedColumnsRows - ' - Me.rdoViewSelectedColumnsRows.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoViewSelectedColumnsRows.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoViewSelectedColumnsRows.FlatAppearance.BorderSize = 2 - Me.rdoViewSelectedColumnsRows.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoViewSelectedColumnsRows.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoViewSelectedColumnsRows.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoViewSelectedColumnsRows.Location = New System.Drawing.Point(207, 6) - Me.rdoViewSelectedColumnsRows.Name = "rdoViewSelectedColumnsRows" - Me.rdoViewSelectedColumnsRows.Size = New System.Drawing.Size(143, 34) - Me.rdoViewSelectedColumnsRows.TabIndex = 2 - Me.rdoViewSelectedColumnsRows.Text = "Choose Columns" - Me.rdoViewSelectedColumnsRows.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoViewSelectedColumnsRows.UseVisualStyleBackColor = True - ' 'ucrSaveData ' Me.ucrSaveData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -181,14 +109,6 @@ Partial Class dlgView Me.ucrSaveData.Size = New System.Drawing.Size(308, 27) Me.ucrSaveData.TabIndex = 18 ' - 'ucrPnlViewData - ' - Me.ucrPnlViewData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlViewData.Location = New System.Drawing.Point(56, 5) - Me.ucrPnlViewData.Name = "ucrPnlViewData" - Me.ucrPnlViewData.Size = New System.Drawing.Size(298, 35) - Me.ucrPnlViewData.TabIndex = 0 - ' 'ucrReceiverSortCol ' Me.ucrReceiverSortCol.AutoSize = True @@ -216,7 +136,7 @@ Partial Class dlgView Me.ucrNudNumberRows.AutoSize = True Me.ucrNudNumberRows.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudNumberRows.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 208) + Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 206) Me.ucrNudNumberRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudNumberRows.Name = "ucrNudNumberRows" @@ -224,14 +144,6 @@ Partial Class dlgView Me.ucrNudNumberRows.TabIndex = 13 Me.ucrNudNumberRows.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrPnlDisplayFrom - ' - Me.ucrPnlDisplayFrom.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlDisplayFrom.Location = New System.Drawing.Point(325, 278) - Me.ucrPnlDisplayFrom.Name = "ucrPnlDisplayFrom" - Me.ucrPnlDisplayFrom.Size = New System.Drawing.Size(66, 40) - Me.ucrPnlDisplayFrom.TabIndex = 14 - ' 'ucrChkSpecifyRows ' Me.ucrChkSpecifyRows.AutoSize = True @@ -292,26 +204,39 @@ Partial Class dlgView Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) Me.ucrChkRowNumbers.TabIndex = 19 ' + 'ucrChkDisplayFromTop + ' + Me.ucrChkDisplayFromTop.AutoSize = True + Me.ucrChkDisplayFromTop.Checked = False + Me.ucrChkDisplayFromTop.Location = New System.Drawing.Point(248, 261) + Me.ucrChkDisplayFromTop.Name = "ucrChkDisplayFromTop" + Me.ucrChkDisplayFromTop.Size = New System.Drawing.Size(130, 23) + Me.ucrChkDisplayFromTop.TabIndex = 20 + ' + 'cmdTableOptions + ' + Me.cmdTableOptions.Location = New System.Drawing.Point(248, 238) + Me.cmdTableOptions.Name = "cmdTableOptions" + Me.cmdTableOptions.Size = New System.Drawing.Size(141, 23) + Me.cmdTableOptions.TabIndex = 26 + Me.cmdTableOptions.Text = "Table Options" + Me.cmdTableOptions.UseVisualStyleBackColor = True + ' 'dlgView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(416, 393) + Me.Controls.Add(Me.cmdTableOptions) + Me.Controls.Add(Me.ucrChkDisplayFromTop) Me.Controls.Add(Me.ucrChkRowNumbers) Me.Controls.Add(Me.ucrSaveData) - Me.Controls.Add(Me.rdoViewAll) - Me.Controls.Add(Me.rdoViewSelectedColumnsRows) - Me.Controls.Add(Me.ucrPnlViewData) Me.Controls.Add(Me.ucrReceiverSortCol) Me.Controls.Add(Me.ucrChkSortColumn) Me.Controls.Add(Me.rdoHTMLOutputWindow) Me.Controls.Add(Me.ucrNudNumberRows) - Me.Controls.Add(Me.rdoBottom) - Me.Controls.Add(Me.rdoTop) - Me.Controls.Add(Me.ucrPnlDisplayFrom) Me.Controls.Add(Me.ucrChkSpecifyRows) - Me.Controls.Add(Me.lblDisplayFrom) Me.Controls.Add(Me.rdoDispOutputWindow) Me.Controls.Add(Me.rdoDispSepOutputWindow) Me.Controls.Add(Me.ucrPnlDisplayWindow) @@ -338,17 +263,12 @@ Partial Class dlgView Friend WithEvents rdoDispOutputWindow As RadioButton Friend WithEvents ucrPnlDisplayWindow As UcrPanel Friend WithEvents ucrNudNumberRows As ucrNud - Friend WithEvents rdoBottom As RadioButton - Friend WithEvents rdoTop As RadioButton - Friend WithEvents ucrPnlDisplayFrom As UcrPanel Friend WithEvents ucrChkSpecifyRows As ucrCheck - Friend WithEvents lblDisplayFrom As Label Friend WithEvents ucrChkSortColumn As ucrCheck Friend WithEvents rdoHTMLOutputWindow As RadioButton Friend WithEvents ucrReceiverSortCol As ucrReceiverSingle - Friend WithEvents rdoViewAll As RadioButton - Friend WithEvents rdoViewSelectedColumnsRows As RadioButton - Friend WithEvents ucrPnlViewData As UcrPanel Friend WithEvents ucrSaveData As ucrSave Friend WithEvents ucrChkRowNumbers As ucrCheck + Friend WithEvents ucrChkDisplayFromTop As ucrCheck + Friend WithEvents cmdTableOptions As Button End Class \ No newline at end of file diff --git a/instat/dlgView.vb b/instat/dlgView.vb index f97ea881ed5..135c5669ba0 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -53,36 +53,35 @@ Public Class dlgView ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispOutputWindow, "checked", "window") ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer") - ucrPnlDisplayWindow.AddToLinkedControls(ucrChkSpecifyRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - - - ucrPnlDisplayFrom.AddRadioButton(rdoBottom) - ucrPnlDisplayFrom.AddRadioButton(rdoTop) - ucrPnlDisplayFrom.SetLinkedDisplayControl(lblDisplayFrom) - ucrPnlDisplayFrom.AddFunctionNamesCondition(rdoTop, "head") - ucrPnlDisplayFrom.AddFunctionNamesCondition(rdoBottom, "tail") + ucrPnlDisplayWindow.AddToLinkedControls(ucrChkDisplayFromTop, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow, rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + 'ucrPnlDisplayFrom.AddRadioButton(rdoBottom) + 'ucrPnlDisplayFrom.AddRadioButton(rdoTop) + 'ucrPnlDisplayFrom.SetLinkedDisplayControl(lblDisplayFrom) + 'ucrChkDisplayFromTop.AddFunctionNamesCondition("head") + 'ucrChkDisplayFromTop.AddFunctionNamesCondition(rdoBottom, "tail") ' This linking only applies if rdoDispOutputWindow is checked - ucrChkSpecifyRows.SetText("Specify Rows") - ucrChkSpecifyRows.AddToLinkedControls(ucrPnlDisplayFrom, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoTop) + + ' ucrChkSpecifyRows.AddToLinkedControls(ucrChkDisplayFromTop, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True) ' ucrChkSpecifyRows.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) + ucrChkRowNumbers.SetText("Rows") ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) - - ucrChkRowNumbers.AddFunctionNamesCondition(True, {"head", "tail"}) - ucrChkSpecifyRows.AddFunctionNamesCondition(False, {frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data"}) + ucrChkDisplayFromTop.SetText("Display From Top") + ucrChkDisplayFromTop.AddFunctionNamesCondition(True, {"head", "tail"}) + ucrChkDisplayFromTop.AddFunctionNamesCondition(False, {frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data"}) ' ucrChkSpecifyRows.bAllowNonConditionValues = True - ucrPnlViewData.AddRadioButton(rdoViewAll) - ucrPnlViewData.AddRadioButton(rdoViewSelectedColumnsRows) + ' ucrPnlViewData.AddRadioButton(rdoViewAll) + ' ucrPnlViewData.AddRadioButton(rdoViewSelectedColumnsRows) - ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewAll, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame") - ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewSelectedColumnsRows, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame", bNewIsPositive:=False) + ' ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewAll, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame") + ' ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewSelectedColumnsRows, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame", bNewIsPositive:=False) - ucrPnlViewData.AddToLinkedControls(ucrReceiverView, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) + ' ucrPnlViewData.AddToLinkedControls(ucrReceiverView, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) ucrReceiverView.SetLinkedDisplayControl(lblSelected) - ucrPnlViewData.AddToLinkedControls(ucrPnlDisplayWindow, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) + ' ucrPnlViewData.AddToLinkedControls(ucrPnlDisplayWindow, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) ucrChkSortColumn.Visible = False 'ucrPnlDisplayWindow.AddToLinkedControls(ucrChkSortColumn, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) @@ -113,7 +112,6 @@ Public Class dlgView ucrSaveData.SetIsComboBox() ucrSaveData.SetAssignToIfUncheckedValue("last_table") - End Sub Private Sub SetDefaults() @@ -184,11 +182,11 @@ Public Class dlgView ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) - ucrPnlDisplayFrom.SetRCode(clsOutputWindowFunction, bReset) + ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) - ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) + ' ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) - ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ' ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) DataFrameLength() @@ -201,16 +199,16 @@ Public Class dlgView End Sub Private Sub TestOKEnabled() - If rdoViewSelectedColumnsRows.Checked Then - If Not ucrReceiverView.IsEmpty Then + ' If rdoViewSelectedColumnsRows.Checked Then + If Not ucrReceiverView.IsEmpty Then If rdoDispSepOutputWindow.Checked Then ucrBase.OKEnabled(True) ElseIf rdoDispOutputWindow.Checked Then - If ucrChkSpecifyRows.Checked Then - If ucrNudNumberRows.GetText <> "" AndAlso (rdoTop.Checked OrElse rdoBottom.Checked) Then - ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) + ' If ucrChkSpecifyRows.Checked Then + If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) End If Else ucrBase.OKEnabled(True) @@ -220,16 +218,16 @@ Public Class dlgView Else ucrBase.OKEnabled(False) End If - Else - ucrBase.OKEnabled(False) - End If - Else - If ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then - ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) - End If - End If + 'Else + ' ucrBase.OKEnabled(False) + 'End If + 'Else + ' If ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then + ' ucrBase.OKEnabled(True) + ' Else + ' ucrBase.OKEnabled(False) + ' End If + 'End If End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -239,24 +237,24 @@ Public Class dlgView End Sub Private Sub ChangeFunctionParameters() - If rdoViewSelectedColumnsRows.Checked Then - If rdoDispOutputWindow.Checked Then + 'If rdoViewSelectedColumnsRows.Checked Then + If rdoDispOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "window", iPosition:=0) ucrSaveData.Visible = True ucrBase.clsRsyntax.iCallType = 2 - If ucrChkSpecifyRows.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + If ucrChkRowNumbers.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - If rdoTop.Checked Then - clsOutputWindowFunction.SetRCommand("head") - Else - clsOutputWindowFunction.SetRCommand("tail") - End If + If ucrChkDisplayFromTop.Checked Then + clsOutputWindowFunction.SetRCommand("head") Else - ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) + clsOutputWindowFunction.SetRCommand("tail") + End If + Else + ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) End If ElseIf rdoDispSepOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) @@ -273,18 +271,18 @@ Public Class dlgView ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) End If - Else - ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ucrSaveData.Visible = False - End If + 'Else + ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) + ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ' ucrSaveData.Visible = False + 'End If End Sub Private Sub DataFrameLength() ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength End Sub - Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDisplayFrom.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrChkSpecifyRows.ControlValueChanged, ucrReceiverView.ControlValueChanged + Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrChkSpecifyRows.ControlValueChanged, ucrReceiverView.ControlValueChanged If bControlsUpdated Then ChangeFunctionParameters() End If @@ -305,6 +303,11 @@ Public Class dlgView SetSelectorParameterType() End Sub + Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click + 'sdgTableOptions.Setup(ucrSelectorForView.strCurrentDataFrame, ) + sdgTableOptions.ShowDialog(Me) + End Sub + Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load If ucrChkRowNumbers.Checked Then ucrNudNumberRows.SetParameter(New RParameter("n", 1)) @@ -316,24 +319,18 @@ Public Class dlgView End If End Sub - Private Sub VariablesVisible() - If rdoViewAll.Checked Then - ucrSelectorForView.SetVariablesVisible(False) - Else - ucrSelectorForView.SetVariablesVisible(True) - End If - End Sub - - Private Sub ucrPnlViewData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlViewData.ControlValueChanged + Private Sub ucrPnlViewData_ControlValueChanged(ucrChangedControl As ucrCore) + TableOptions() ChangeFunctionParameters() - VariablesVisible() End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrChkSpecifyRows.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrPnlDisplayFrom.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged, ucrPnlViewData.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrChkSpecifyRows.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged + TableOptions() TestOKEnabled() End Sub Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged + TableOptions() GetObjectName() End Sub @@ -347,6 +344,14 @@ Public Class dlgView End If End Sub + Private Sub TableOptions() + If rdoHTMLOutputWindow.Checked Then + cmdTableOptions.Visible = True + Else + cmdTableOptions.Visible = False + End If + End Sub + Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) End Sub From 71aa7478dc2d75c9ab896e0e5f66a603258f8973 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:47:59 +0300 Subject: [PATCH 03/77] code2 --- instat/dlgView.vb | 64 +++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 135c5669ba0..1d46305ffb1 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -201,23 +201,23 @@ Public Class dlgView Private Sub TestOKEnabled() ' If rdoViewSelectedColumnsRows.Checked Then If Not ucrReceiverView.IsEmpty Then - If rdoDispSepOutputWindow.Checked Then - ucrBase.OKEnabled(True) - ElseIf rdoDispOutputWindow.Checked Then + If rdoDispSepOutputWindow.Checked Then + ucrBase.OKEnabled(True) + ElseIf rdoDispOutputWindow.Checked Then ' If ucrChkSpecifyRows.Checked Then If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then - ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) - End If - Else - ucrBase.OKEnabled(True) - End If - ElseIf rdoHTMLOutputWindow.Checked AndAlso ((ucrChkSortColumn.Checked AndAlso Not ucrReceiverSortCol.IsEmpty) OrElse Not ucrChkSortColumn.Checked) Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) End If + Else + ucrBase.OKEnabled(True) + End If + ElseIf rdoHTMLOutputWindow.Checked AndAlso ((ucrChkSortColumn.Checked AndAlso Not ucrReceiverSortCol.IsEmpty) OrElse Not ucrChkSortColumn.Checked) Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If 'Else ' ucrBase.OKEnabled(False) 'End If @@ -239,11 +239,13 @@ Public Class dlgView Private Sub ChangeFunctionParameters() 'If rdoViewSelectedColumnsRows.Checked Then If rdoDispOutputWindow.Checked Then - clsDummyFunction.AddParameter("checked", "window", iPosition:=0) + clsDummyFunction.AddParameter("checked", "window", iPosition:=0) + + ucrSaveData.Visible = True + ucrBase.clsRsyntax.iCallType = 2 - ucrSaveData.Visible = True - ucrBase.clsRsyntax.iCallType = 2 - If ucrChkRowNumbers.Checked Then + ' If ucrNudNumberRows.GetText <> "" Then + If ucrChkRowNumbers.Checked AndAlso ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) @@ -254,23 +256,25 @@ Public Class dlgView clsOutputWindowFunction.SetRCommand("tail") End If Else - ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) - End If - ElseIf rdoDispSepOutputWindow.Checked Then - clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) - - ucrBase.clsRsyntax.iCallType = 0 - ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ucrSaveData.Visible = False - Else - clsDummyFunction.AddParameter("checked", "html", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - ucrSaveData.Visible = True - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - + ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) End If + ElseIf rdoDispSepOutputWindow.Checked Then + clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) + + ucrBase.clsRsyntax.iCallType = 0 + ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) + ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ucrSaveData.Visible = False + Else + clsDummyFunction.AddParameter("checked", "html", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + ucrSaveData.Visible = True + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + + End If 'Else ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) From 432caebf5a2a28eb37e5059a80af18b8600d12a1 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 2 Oct 2024 06:01:52 +0300 Subject: [PATCH 04/77] code3 --- instat/dlgView.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 1d46305ffb1..c2528071ab3 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -245,7 +245,7 @@ Public Class dlgView ucrBase.clsRsyntax.iCallType = 2 ' If ucrNudNumberRows.GetText <> "" Then - If ucrChkRowNumbers.Checked AndAlso ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then + If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) @@ -256,7 +256,7 @@ Public Class dlgView clsOutputWindowFunction.SetRCommand("tail") End If Else - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) End If ElseIf rdoDispSepOutputWindow.Checked Then From 167a5cd6d0d8900c4fa6f195a4d6cfedcbdbd5fa Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:38:53 +0200 Subject: [PATCH 05/77] Changes to the Use Table Dialog --- instat/dlgUseTable.Designer.vb | 163 +++++++++++++++++---------------- instat/dlgUseTable.vb | 15 ++- 2 files changed, 88 insertions(+), 90 deletions(-) diff --git a/instat/dlgUseTable.Designer.vb b/instat/dlgUseTable.Designer.vb index 31ab547960e..1d0b504ec92 100644 --- a/instat/dlgUseTable.Designer.vb +++ b/instat/dlgUseTable.Designer.vb @@ -22,72 +22,24 @@ Partial Class dlgUseTable 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.ucrTablesReceiver = New instat.ucrReceiverSingle() - Me.lblTablesToUse = New System.Windows.Forms.Label() - Me.ucrSaveTable = New instat.ucrSave() - Me.ucrPnlExportOptions = New instat.UcrPanel() Me.rdoAsHTML = New System.Windows.Forms.RadioButton() Me.rdoAsRTF = New System.Windows.Forms.RadioButton() Me.rdoAsWord = New System.Windows.Forms.RadioButton() Me.rdoAsLaTex = New System.Windows.Forms.RadioButton() - Me.cmdFormatOptions = New System.Windows.Forms.Button() - Me.lblExportTable = New System.Windows.Forms.Label() + Me.cmdTableOptions = New System.Windows.Forms.Button() + Me.ucrPnlExportOptions = New instat.UcrPanel() + Me.ucrSaveTable = New instat.ucrSave() + Me.ucrTablesReceiver = New instat.ucrReceiverSingle() Me.ucrTablesSelector = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() + Me.lblTable = New System.Windows.Forms.Label() + Me.lblExportTables = New System.Windows.Forms.Label() Me.SuspendLayout() ' - 'ucrBase - ' - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(2, 397) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(407, 52) - Me.ucrBase.TabIndex = 0 - ' - 'ucrTablesReceiver - ' - Me.ucrTablesReceiver.AutoSize = True - Me.ucrTablesReceiver.frmParent = Me - Me.ucrTablesReceiver.Location = New System.Drawing.Point(256, 59) - Me.ucrTablesReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucrTablesReceiver.Name = "ucrTablesReceiver" - Me.ucrTablesReceiver.Selector = Nothing - Me.ucrTablesReceiver.Size = New System.Drawing.Size(135, 20) - Me.ucrTablesReceiver.strNcFilePath = "" - Me.ucrTablesReceiver.TabIndex = 2 - Me.ucrTablesReceiver.ucrSelector = Nothing - ' - 'lblTablesToUse - ' - Me.lblTablesToUse.AutoSize = True - Me.lblTablesToUse.Location = New System.Drawing.Point(255, 43) - Me.lblTablesToUse.Name = "lblTablesToUse" - Me.lblTablesToUse.Size = New System.Drawing.Size(75, 13) - Me.lblTablesToUse.TabIndex = 3 - Me.lblTablesToUse.Text = "Table To Use:" - ' - 'ucrSaveTable - ' - Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(10, 360) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(390, 34) - Me.ucrSaveTable.TabIndex = 4 - ' - 'ucrPnlExportOptions - ' - Me.ucrPnlExportOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlExportOptions.Enabled = False - Me.ucrPnlExportOptions.Location = New System.Drawing.Point(8, 243) - Me.ucrPnlExportOptions.Name = "ucrPnlExportOptions" - Me.ucrPnlExportOptions.Size = New System.Drawing.Size(105, 110) - Me.ucrPnlExportOptions.TabIndex = 5 - ' 'rdoAsHTML ' Me.rdoAsHTML.AutoSize = True - Me.rdoAsHTML.Location = New System.Drawing.Point(14, 250) + Me.rdoAsHTML.Location = New System.Drawing.Point(14, 269) Me.rdoAsHTML.Name = "rdoAsHTML" Me.rdoAsHTML.Size = New System.Drawing.Size(55, 17) Me.rdoAsHTML.TabIndex = 6 @@ -98,7 +50,7 @@ Partial Class dlgUseTable 'rdoAsRTF ' Me.rdoAsRTF.AutoSize = True - Me.rdoAsRTF.Location = New System.Drawing.Point(14, 275) + Me.rdoAsRTF.Location = New System.Drawing.Point(14, 294) Me.rdoAsRTF.Name = "rdoAsRTF" Me.rdoAsRTF.Size = New System.Drawing.Size(46, 17) Me.rdoAsRTF.TabIndex = 7 @@ -109,7 +61,7 @@ Partial Class dlgUseTable 'rdoAsWord ' Me.rdoAsWord.AutoSize = True - Me.rdoAsWord.Location = New System.Drawing.Point(14, 300) + Me.rdoAsWord.Location = New System.Drawing.Point(14, 319) Me.rdoAsWord.Name = "rdoAsWord" Me.rdoAsWord.Size = New System.Drawing.Size(51, 17) Me.rdoAsWord.TabIndex = 8 @@ -120,7 +72,7 @@ Partial Class dlgUseTable 'rdoAsLaTex ' Me.rdoAsLaTex.AutoSize = True - Me.rdoAsLaTex.Location = New System.Drawing.Point(14, 325) + Me.rdoAsLaTex.Location = New System.Drawing.Point(14, 344) Me.rdoAsLaTex.Name = "rdoAsLaTex" Me.rdoAsLaTex.Size = New System.Drawing.Size(55, 17) Me.rdoAsLaTex.TabIndex = 9 @@ -128,24 +80,45 @@ Partial Class dlgUseTable Me.rdoAsLaTex.Text = "LaTex" Me.rdoAsLaTex.UseVisualStyleBackColor = True ' - 'cmdFormatOptions + 'cmdTableOptions + ' + Me.cmdTableOptions.Location = New System.Drawing.Point(8, 214) + Me.cmdTableOptions.Name = "cmdTableOptions" + Me.cmdTableOptions.Size = New System.Drawing.Size(135, 23) + Me.cmdTableOptions.TabIndex = 11 + Me.cmdTableOptions.Text = "Table Options" + Me.cmdTableOptions.UseVisualStyleBackColor = True ' - Me.cmdFormatOptions.Location = New System.Drawing.Point(256, 183) - Me.cmdFormatOptions.Name = "cmdFormatOptions" - Me.cmdFormatOptions.Size = New System.Drawing.Size(135, 23) - Me.cmdFormatOptions.TabIndex = 11 - Me.cmdFormatOptions.Text = "Format Options" - Me.cmdFormatOptions.UseVisualStyleBackColor = True + 'ucrPnlExportOptions ' - 'lblExportTable + Me.ucrPnlExportOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlExportOptions.Enabled = False + Me.ucrPnlExportOptions.Location = New System.Drawing.Point(8, 264) + Me.ucrPnlExportOptions.Name = "ucrPnlExportOptions" + Me.ucrPnlExportOptions.Size = New System.Drawing.Size(105, 110) + Me.ucrPnlExportOptions.TabIndex = 5 + ' + 'ucrSaveTable + ' + Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveTable.Location = New System.Drawing.Point(10, 379) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Name = "ucrSaveTable" + Me.ucrSaveTable.Size = New System.Drawing.Size(390, 34) + Me.ucrSaveTable.TabIndex = 4 + ' + 'ucrTablesReceiver ' - Me.lblExportTable.AutoSize = True - Me.lblExportTable.Enabled = False - Me.lblExportTable.Location = New System.Drawing.Point(5, 227) - Me.lblExportTable.Name = "lblExportTable" - Me.lblExportTable.Size = New System.Drawing.Size(119, 13) - Me.lblExportTable.TabIndex = 12 - Me.lblExportTable.Text = "Export Table Object As:" + Me.ucrTablesReceiver.AutoSize = True + Me.ucrTablesReceiver.frmParent = Me + Me.ucrTablesReceiver.Location = New System.Drawing.Point(256, 59) + Me.ucrTablesReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucrTablesReceiver.Name = "ucrTablesReceiver" + Me.ucrTablesReceiver.Selector = Nothing + Me.ucrTablesReceiver.Size = New System.Drawing.Size(135, 20) + Me.ucrTablesReceiver.strNcFilePath = "" + Me.ucrTablesReceiver.TabIndex = 2 + Me.ucrTablesReceiver.ucrSelector = Nothing ' 'ucrTablesSelector ' @@ -159,20 +132,48 @@ Partial Class dlgUseTable Me.ucrTablesSelector.Size = New System.Drawing.Size(213, 183) Me.ucrTablesSelector.TabIndex = 1 ' + 'ucrBase + ' + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(2, 417) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(407, 52) + Me.ucrBase.TabIndex = 0 + ' + 'lblTable + ' + Me.lblTable.AutoSize = True + Me.lblTable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblTable.Location = New System.Drawing.Point(258, 43) + Me.lblTable.Name = "lblTable" + Me.lblTable.Size = New System.Drawing.Size(37, 13) + Me.lblTable.TabIndex = 25 + Me.lblTable.Text = "Table:" + ' + 'lblExportTables + ' + Me.lblExportTables.AutoSize = True + Me.lblExportTables.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblExportTables.Location = New System.Drawing.Point(12, 248) + Me.lblExportTables.Name = "lblExportTables" + Me.lblExportTables.Size = New System.Drawing.Size(118, 13) + Me.lblExportTables.TabIndex = 26 + Me.lblExportTables.Text = "Export Table Object as:" + ' 'dlgUseTable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(411, 450) - Me.Controls.Add(Me.lblExportTable) - Me.Controls.Add(Me.cmdFormatOptions) + Me.ClientSize = New System.Drawing.Size(411, 478) + Me.Controls.Add(Me.lblExportTables) + Me.Controls.Add(Me.lblTable) + Me.Controls.Add(Me.cmdTableOptions) Me.Controls.Add(Me.rdoAsLaTex) Me.Controls.Add(Me.rdoAsWord) Me.Controls.Add(Me.rdoAsRTF) Me.Controls.Add(Me.rdoAsHTML) Me.Controls.Add(Me.ucrPnlExportOptions) Me.Controls.Add(Me.ucrSaveTable) - Me.Controls.Add(Me.lblTablesToUse) Me.Controls.Add(Me.ucrTablesReceiver) Me.Controls.Add(Me.ucrTablesSelector) Me.Controls.Add(Me.ucrBase) @@ -190,13 +191,13 @@ Partial Class dlgUseTable Friend WithEvents ucrBase As ucrButtons Friend WithEvents ucrTablesSelector As ucrSelectorByDataFrameAddRemove Friend WithEvents ucrTablesReceiver As ucrReceiverSingle - Friend WithEvents lblTablesToUse As Label Friend WithEvents ucrPnlExportOptions As UcrPanel Friend WithEvents ucrSaveTable As ucrSave Friend WithEvents rdoAsWord As RadioButton Friend WithEvents rdoAsRTF As RadioButton Friend WithEvents rdoAsHTML As RadioButton - Friend WithEvents cmdFormatOptions As Button + Friend WithEvents cmdTableOptions As Button Friend WithEvents rdoAsLaTex As RadioButton - Friend WithEvents lblExportTable As Label + Friend WithEvents lblTable As Label + Friend WithEvents lblExportTables As Label End Class diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 1757a270ecf..20975602be6 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -70,6 +70,8 @@ Public Class dlgUseTable 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsWord, "as_word") 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsLaTex, "as_word") + cmdTableOptions.Enabled = False + ucrSaveTable.SetPrefix("use_table") ucrSaveTable.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetDataFrameSelector(ucrTablesSelector.ucrAvailableDataFrames) @@ -185,6 +187,7 @@ Public Class dlgUseTable clsUseTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") clsPipeOperator.SetOperation("%>%") + clsPipeOperator.bBrackets = False ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) End Sub @@ -209,15 +212,9 @@ Public Class dlgUseTable TestOKEnabled() End Sub - Private Sub cmdFormatOptions_Click(sender As Object, e As EventArgs) Handles cmdFormatOptions.Click - sdgFormatSummaryTables.SetRCode(clsNewTableTitleFunction:=clsTableTitleFunction, clsNewTabFootnoteTitleFunction:=clsTabFootnoteTitleFunction, clsNewTableSourcenoteFunction:=clsTableSourcenoteFunction, clsNewDummyFunction:=clsDummyFunction, - clsNewFootnoteCellFunction:=clsFootnoteCellFunction, clsNewSecondFootnoteCellBodyFunction:=clsSecondFootnoteCellBodyFunction, - clsNewPipeOperator:=clsPipeOperator, clsNewFootnoteTitleLocationFunction:=clsFootnoteTitleLocationFunction, clsNewFootnoteCellBodyFunction:=clsFootnoteCellBodyFunction, - clsNewFootnoteSubtitleLocationFunction:=clsFootnoteSubtitleLocationFunction, clsNewTabFootnoteSubtitleFunction:=clsTabFootnoteSubtitleFunction, clsNewJoiningOperator:=clsJoiningPipeOperator, - clsNewMutableOPerator:=clsSummaryOperator, clsNewSecondFootnoteCellFunction:=clsSecondFootnoteCellFunction, - clsNewTabStyleCellTextFunction:=clsTabStyleCellTextFunction, clsNewTabStyleFunction:=clsTabStyleFunction, clsNewTabStylePxFunction:=clsTabStylePxFunction, - clsNewgtExtraThemesFunction:=clsgtExtraThemesFunction, clsNewThemesTabOptionFunction:=clsThemesTabOptionsFunction, bReset:=bReset) - sdgFormatSummaryTables.ShowDialog() + Private Sub cmdFormatOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click + sdgTableOptions.Setup(ucrTablesSelector.strCurrentDataFrame, clsPipeOperator) + sdgTableOptions.ShowDialog(Me) End Sub Private Sub ucrCoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrTablesReceiver.ControlContentsChanged, ucrSaveTable.ControlContentsChanged From aa6781baa41e50a8786348dc33de55a33832caee Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:41:46 +0200 Subject: [PATCH 06/77] Minor Changes --- instat/dlgUseTable.Designer.vb | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/instat/dlgUseTable.Designer.vb b/instat/dlgUseTable.Designer.vb index 1d0b504ec92..eb87767cd21 100644 --- a/instat/dlgUseTable.Designer.vb +++ b/instat/dlgUseTable.Designer.vb @@ -27,13 +27,13 @@ Partial Class dlgUseTable Me.rdoAsWord = New System.Windows.Forms.RadioButton() Me.rdoAsLaTex = New System.Windows.Forms.RadioButton() Me.cmdTableOptions = New System.Windows.Forms.Button() + Me.lblTable = New System.Windows.Forms.Label() + Me.lblExportTables = New System.Windows.Forms.Label() Me.ucrPnlExportOptions = New instat.UcrPanel() Me.ucrSaveTable = New instat.ucrSave() Me.ucrTablesReceiver = New instat.ucrReceiverSingle() Me.ucrTablesSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblTable = New System.Windows.Forms.Label() - Me.lblExportTables = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'rdoAsHTML @@ -89,6 +89,26 @@ Partial Class dlgUseTable Me.cmdTableOptions.Text = "Table Options" Me.cmdTableOptions.UseVisualStyleBackColor = True ' + 'lblTable + ' + Me.lblTable.AutoSize = True + Me.lblTable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblTable.Location = New System.Drawing.Point(258, 43) + Me.lblTable.Name = "lblTable" + Me.lblTable.Size = New System.Drawing.Size(37, 13) + Me.lblTable.TabIndex = 25 + Me.lblTable.Text = "Table:" + ' + 'lblExportTables + ' + Me.lblExportTables.AutoSize = True + Me.lblExportTables.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblExportTables.Location = New System.Drawing.Point(12, 248) + Me.lblExportTables.Name = "lblExportTables" + Me.lblExportTables.Size = New System.Drawing.Size(84, 13) + Me.lblExportTables.TabIndex = 26 + Me.lblExportTables.Text = "Export Table as:" + ' 'ucrPnlExportOptions ' Me.ucrPnlExportOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -140,26 +160,6 @@ Partial Class dlgUseTable Me.ucrBase.Size = New System.Drawing.Size(407, 52) Me.ucrBase.TabIndex = 0 ' - 'lblTable - ' - Me.lblTable.AutoSize = True - Me.lblTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblTable.Location = New System.Drawing.Point(258, 43) - Me.lblTable.Name = "lblTable" - Me.lblTable.Size = New System.Drawing.Size(37, 13) - Me.lblTable.TabIndex = 25 - Me.lblTable.Text = "Table:" - ' - 'lblExportTables - ' - Me.lblExportTables.AutoSize = True - Me.lblExportTables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblExportTables.Location = New System.Drawing.Point(12, 248) - Me.lblExportTables.Name = "lblExportTables" - Me.lblExportTables.Size = New System.Drawing.Size(118, 13) - Me.lblExportTables.TabIndex = 26 - Me.lblExportTables.Text = "Export Table Object as:" - ' 'dlgUseTable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) From 4734879f13a068419b6a8b1f9e2419ca6436faef Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:43:42 +0200 Subject: [PATCH 07/77] Minor Change --- instat/dlgUseTable.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 20975602be6..1593d547fa5 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -212,7 +212,7 @@ Public Class dlgUseTable TestOKEnabled() End Sub - Private Sub cmdFormatOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click + Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click sdgTableOptions.Setup(ucrTablesSelector.strCurrentDataFrame, clsPipeOperator) sdgTableOptions.ShowDialog(Me) End Sub From 130ff7854a6b5b837ed048d1e1b29fec8a654ee5 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:06:42 +0300 Subject: [PATCH 08/77] code 4 --- instat/dlgView.Designer.vb | 98 +++++++++++-------------- instat/dlgView.vb | 143 +++++++++++++++++++++++++++---------- 2 files changed, 147 insertions(+), 94 deletions(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 0c81ff8889a..6c26c582303 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -42,25 +42,24 @@ Partial Class dlgView Me.rdoDispSepOutputWindow = New System.Windows.Forms.RadioButton() Me.rdoDispOutputWindow = New System.Windows.Forms.RadioButton() Me.rdoHTMLOutputWindow = New System.Windows.Forms.RadioButton() + Me.cmdTableOptions = New System.Windows.Forms.Button() + Me.ucrChkDisplayFromTop = New instat.ucrCheck() + Me.ucrChkRowNumbers = New instat.ucrCheck() Me.ucrSaveData = New instat.ucrSave() Me.ucrReceiverSortCol = New instat.ucrReceiverSingle() Me.ucrChkSortColumn = New instat.ucrCheck() Me.ucrNudNumberRows = New instat.ucrNud() - Me.ucrChkSpecifyRows = New instat.ucrCheck() Me.ucrPnlDisplayWindow = New instat.UcrPanel() Me.ucrReceiverView = New instat.ucrReceiverMultiple() Me.ucrSelectorForView = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrChkRowNumbers = New instat.ucrCheck() - Me.ucrChkDisplayFromTop = New instat.ucrCheck() - Me.cmdTableOptions = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lblSelected ' Me.lblSelected.AutoSize = True Me.lblSelected.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSelected.Location = New System.Drawing.Point(248, 80) + Me.lblSelected.Location = New System.Drawing.Point(248, 41) Me.lblSelected.Name = "lblSelected" Me.lblSelected.Size = New System.Drawing.Size(97, 13) Me.lblSelected.TabIndex = 4 @@ -70,7 +69,7 @@ Partial Class dlgView 'rdoDispSepOutputWindow ' Me.rdoDispSepOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoDispSepOutputWindow.Location = New System.Drawing.Point(10, 284) + Me.rdoDispSepOutputWindow.Location = New System.Drawing.Point(10, 245) Me.rdoDispSepOutputWindow.Name = "rdoDispSepOutputWindow" Me.rdoDispSepOutputWindow.Size = New System.Drawing.Size(210, 17) Me.rdoDispSepOutputWindow.TabIndex = 6 @@ -81,7 +80,7 @@ Partial Class dlgView 'rdoDispOutputWindow ' Me.rdoDispOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoDispOutputWindow.Location = New System.Drawing.Point(10, 261) + Me.rdoDispOutputWindow.Location = New System.Drawing.Point(10, 222) Me.rdoDispOutputWindow.Name = "rdoDispOutputWindow" Me.rdoDispOutputWindow.Size = New System.Drawing.Size(210, 17) Me.rdoDispOutputWindow.TabIndex = 7 @@ -92,7 +91,7 @@ Partial Class dlgView 'rdoHTMLOutputWindow ' Me.rdoHTMLOutputWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoHTMLOutputWindow.Location = New System.Drawing.Point(10, 238) + Me.rdoHTMLOutputWindow.Location = New System.Drawing.Point(10, 199) Me.rdoHTMLOutputWindow.Name = "rdoHTMLOutputWindow" Me.rdoHTMLOutputWindow.Size = New System.Drawing.Size(210, 17) Me.rdoHTMLOutputWindow.TabIndex = 8 @@ -100,10 +99,37 @@ Partial Class dlgView Me.rdoHTMLOutputWindow.Text = "Display HTML in Output Window" Me.rdoHTMLOutputWindow.UseVisualStyleBackColor = True ' + 'cmdTableOptions + ' + Me.cmdTableOptions.Location = New System.Drawing.Point(248, 199) + Me.cmdTableOptions.Name = "cmdTableOptions" + Me.cmdTableOptions.Size = New System.Drawing.Size(141, 23) + Me.cmdTableOptions.TabIndex = 26 + Me.cmdTableOptions.Text = "Table Options" + Me.cmdTableOptions.UseVisualStyleBackColor = True + ' + 'ucrChkDisplayFromTop + ' + Me.ucrChkDisplayFromTop.AutoSize = True + Me.ucrChkDisplayFromTop.Checked = False + Me.ucrChkDisplayFromTop.Location = New System.Drawing.Point(248, 222) + Me.ucrChkDisplayFromTop.Name = "ucrChkDisplayFromTop" + Me.ucrChkDisplayFromTop.Size = New System.Drawing.Size(130, 23) + Me.ucrChkDisplayFromTop.TabIndex = 20 + ' + 'ucrChkRowNumbers + ' + Me.ucrChkRowNumbers.AutoSize = True + Me.ucrChkRowNumbers.Checked = False + Me.ucrChkRowNumbers.Location = New System.Drawing.Point(248, 167) + Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" + Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) + Me.ucrChkRowNumbers.TabIndex = 19 + ' 'ucrSaveData ' Me.ucrSaveData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveData.Location = New System.Drawing.Point(10, 309) + Me.ucrSaveData.Location = New System.Drawing.Point(10, 270) Me.ucrSaveData.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveData.Name = "ucrSaveData" Me.ucrSaveData.Size = New System.Drawing.Size(308, 27) @@ -113,7 +139,7 @@ Partial Class dlgView ' Me.ucrReceiverSortCol.AutoSize = True Me.ucrReceiverSortCol.frmParent = Me - Me.ucrReceiverSortCol.Location = New System.Drawing.Point(274, 256) + Me.ucrReceiverSortCol.Location = New System.Drawing.Point(274, 217) Me.ucrReceiverSortCol.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSortCol.Name = "ucrReceiverSortCol" Me.ucrReceiverSortCol.Selector = Nothing @@ -126,7 +152,7 @@ Partial Class dlgView ' Me.ucrChkSortColumn.AutoSize = True Me.ucrChkSortColumn.Checked = False - Me.ucrChkSortColumn.Location = New System.Drawing.Point(248, 235) + Me.ucrChkSortColumn.Location = New System.Drawing.Point(248, 203) Me.ucrChkSortColumn.Name = "ucrChkSortColumn" Me.ucrChkSortColumn.Size = New System.Drawing.Size(100, 23) Me.ucrChkSortColumn.TabIndex = 9 @@ -136,7 +162,7 @@ Partial Class dlgView Me.ucrNudNumberRows.AutoSize = True Me.ucrNudNumberRows.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudNumberRows.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 206) + Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 167) Me.ucrNudNumberRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudNumberRows.Name = "ucrNudNumberRows" @@ -144,19 +170,10 @@ Partial Class dlgView Me.ucrNudNumberRows.TabIndex = 13 Me.ucrNudNumberRows.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrChkSpecifyRows - ' - Me.ucrChkSpecifyRows.AutoSize = True - Me.ucrChkSpecifyRows.Checked = False - Me.ucrChkSpecifyRows.Location = New System.Drawing.Point(248, 235) - Me.ucrChkSpecifyRows.Name = "ucrChkSpecifyRows" - Me.ucrChkSpecifyRows.Size = New System.Drawing.Size(100, 23) - Me.ucrChkSpecifyRows.TabIndex = 5 - ' 'ucrPnlDisplayWindow ' Me.ucrPnlDisplayWindow.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlDisplayWindow.Location = New System.Drawing.Point(10, 235) + Me.ucrPnlDisplayWindow.Location = New System.Drawing.Point(10, 192) Me.ucrPnlDisplayWindow.Name = "ucrPnlDisplayWindow" Me.ucrPnlDisplayWindow.Size = New System.Drawing.Size(221, 83) Me.ucrPnlDisplayWindow.TabIndex = 7 @@ -165,7 +182,7 @@ Partial Class dlgView ' Me.ucrReceiverView.AutoSize = True Me.ucrReceiverView.frmParent = Me - Me.ucrReceiverView.Location = New System.Drawing.Point(248, 95) + Me.ucrReceiverView.Location = New System.Drawing.Point(248, 56) Me.ucrReceiverView.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverView.Name = "ucrReceiverView" Me.ucrReceiverView.Selector = Nothing @@ -180,7 +197,7 @@ Partial Class dlgView Me.ucrSelectorForView.bDropUnusedFilterLevels = False Me.ucrSelectorForView.bShowHiddenColumns = False Me.ucrSelectorForView.bUseCurrentFilter = True - Me.ucrSelectorForView.Location = New System.Drawing.Point(10, 45) + Me.ucrSelectorForView.Location = New System.Drawing.Point(10, 6) Me.ucrSelectorForView.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForView.Name = "ucrSelectorForView" Me.ucrSelectorForView.Size = New System.Drawing.Size(213, 183) @@ -190,44 +207,17 @@ Partial Class dlgView ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 343) + Me.ucrBase.Location = New System.Drawing.Point(10, 304) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 17 ' - 'ucrChkRowNumbers - ' - Me.ucrChkRowNumbers.AutoSize = True - Me.ucrChkRowNumbers.Checked = False - Me.ucrChkRowNumbers.Location = New System.Drawing.Point(248, 206) - Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" - Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) - Me.ucrChkRowNumbers.TabIndex = 19 - ' - 'ucrChkDisplayFromTop - ' - Me.ucrChkDisplayFromTop.AutoSize = True - Me.ucrChkDisplayFromTop.Checked = False - Me.ucrChkDisplayFromTop.Location = New System.Drawing.Point(248, 261) - Me.ucrChkDisplayFromTop.Name = "ucrChkDisplayFromTop" - Me.ucrChkDisplayFromTop.Size = New System.Drawing.Size(130, 23) - Me.ucrChkDisplayFromTop.TabIndex = 20 - ' - 'cmdTableOptions - ' - Me.cmdTableOptions.Location = New System.Drawing.Point(248, 238) - Me.cmdTableOptions.Name = "cmdTableOptions" - Me.cmdTableOptions.Size = New System.Drawing.Size(141, 23) - Me.cmdTableOptions.TabIndex = 26 - Me.cmdTableOptions.Text = "Table Options" - Me.cmdTableOptions.UseVisualStyleBackColor = True - ' 'dlgView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(416, 393) + Me.ClientSize = New System.Drawing.Size(416, 357) Me.Controls.Add(Me.cmdTableOptions) Me.Controls.Add(Me.ucrChkDisplayFromTop) Me.Controls.Add(Me.ucrChkRowNumbers) @@ -236,7 +226,6 @@ Partial Class dlgView Me.Controls.Add(Me.ucrChkSortColumn) Me.Controls.Add(Me.rdoHTMLOutputWindow) Me.Controls.Add(Me.ucrNudNumberRows) - Me.Controls.Add(Me.ucrChkSpecifyRows) Me.Controls.Add(Me.rdoDispOutputWindow) Me.Controls.Add(Me.rdoDispSepOutputWindow) Me.Controls.Add(Me.ucrPnlDisplayWindow) @@ -263,7 +252,6 @@ Partial Class dlgView Friend WithEvents rdoDispOutputWindow As RadioButton Friend WithEvents ucrPnlDisplayWindow As UcrPanel Friend WithEvents ucrNudNumberRows As ucrNud - Friend WithEvents ucrChkSpecifyRows As ucrCheck Friend WithEvents ucrChkSortColumn As ucrCheck Friend WithEvents rdoHTMLOutputWindow As RadioButton Friend WithEvents ucrReceiverSortCol As ucrReceiverSingle diff --git a/instat/dlgView.vb b/instat/dlgView.vb index c2528071ab3..efae507929b 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -17,9 +17,11 @@ Imports instat.Translations Public Class dlgView + Private clsBaseOperator As New ROperator + Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsOutputWindowFunction, clsHTMLFunction, clsAsHtmlWidgetFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction, clsViewAllFunction As New RFunction + Private clsHeadRFunction, clsGtRFunction, clsOutputWindowFunction, clsHTMLFunction, clsAsHtmlWidgetFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction, clsViewAllFunction As New RFunction Private bControlsUpdated As Boolean = False Private Sub dlgView_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -65,6 +67,8 @@ Public Class dlgView ' ucrChkSpecifyRows.AddToLinkedControls(ucrChkDisplayFromTop, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True) ' ucrChkSpecifyRows.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) + + ucrNudNumberRows.SetParameter(New RParameter("n", 1)) ucrChkRowNumbers.SetText("Rows") ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) @@ -115,11 +119,14 @@ Public Class dlgView End Sub Private Sub SetDefaults() + clsBaseOperator = New ROperator clsOutputWindowFunction = New RFunction clsViewColumnsFunction = New RFunction clsHTMLFunction = New RFunction clsViewAllFunction = New RFunction clsGetObjectDataFunction = New RFunction + clsHeadRFunction = New RFunction + clsGtRFunction = New RFunction clsDummyFunction = New RFunction clsAsHtmlWidgetFunction = New RFunction @@ -155,6 +162,17 @@ Public Class dlgView strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, strObjectName:="last_table") + clsBaseOperator.SetOperation("%>%") + clsBaseOperator.bBrackets = False + + clsHeadRFunction.SetPackageName("utils") + clsHeadRFunction.SetRCommand("head") + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=0, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + + clsGtRFunction.SetPackageName("gt") + clsGtRFunction.SetRCommand("gt") + clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) clsViewColumnsFunction.SetPackageName("utils") clsViewColumnsFunction.SetRCommand("View") @@ -184,6 +202,7 @@ Public Class dlgView ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) + ucrChkRowNumbers.SetRCode(clsHeadRFunction, bReset) ' ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) ' ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) @@ -241,39 +260,65 @@ Public Class dlgView If rdoDispOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "window", iPosition:=0) + cmdTableOptions.Visible = False ucrSaveData.Visible = True ucrBase.clsRsyntax.iCallType = 2 + 'If ucrChkDisplayFromTop.Checked Then + ' clsOutputWindowFunction.SetRCommand("head") + 'Else + ' clsOutputWindowFunction.SetRCommand("tail") + 'End If ' If ucrNudNumberRows.GetText <> "" Then - If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + 'If ucrNudNumberRows.GetText <> "" AndAlso rdoDispOutputWindow.Checked Then 'OrElse ucrChkDisplayFromTop.Checked Then + ' ' clsOutputWindowFunction.SetRCommand("head") + ' ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) + ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) + ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - If ucrChkDisplayFromTop.Checked Then - clsOutputWindowFunction.SetRCommand("head") - Else - clsOutputWindowFunction.SetRCommand("tail") - End If - Else - ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) - End If + 'Else + ' ' clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + + ' ' clsOutputWindowFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.iColumnCount, iPosition:=0) + + ' ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ' ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) + 'End If ElseIf rdoDispSepOutputWindow.Checked Then + clsOutputWindowFunction.SetRCommand("head") clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) ucrBase.clsRsyntax.iCallType = 0 ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + cmdTableOptions.Visible = False ucrSaveData.Visible = False Else + 'ucrNudNumberRows.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) + 'ucrNudNumberRows.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) + 'If ucrNudNumberRows.GetText <> "" Then + ' ' clsOutputWindowFunction.RemoveParameterByName("x") + ' ' clsOutputWindowFunction.SetRCommand("head") + ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + 'Else + ' clsBaseOperator.RemoveParameterByName("head") + 'End If + 'ucrChkRowNumbers.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) + 'ucrChkRowNumbers.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) + 'If ucrChkRowNumbers.Checked AndAlso ucrNudNumberRows.GetText <> "" Then + ' clsOutputWindowFunction.RemoveParameterByName("x") + ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + 'Else + + ' clsBaseOperator.RemoveParameterByName("head") + 'End If clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + cmdTableOptions.Visible = True ucrSaveData.Visible = True ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - End If 'Else ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) @@ -286,13 +331,42 @@ Public Class dlgView ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength End Sub - Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrChkSpecifyRows.ControlValueChanged, ucrReceiverView.ControlValueChanged + Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged If bControlsUpdated Then ChangeFunctionParameters() End If GetObjectName() End Sub + Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load + If ucrChkRowNumbers.Checked Then + If rdoDispOutputWindow.Checked Then + If ucrChkDisplayFromTop.Checked Then + clsOutputWindowFunction.SetRCommand("head") + Else + clsOutputWindowFunction.SetRCommand("tail") + End If + If ucrNudNumberRows.GetText <> "" Then + clsOutputWindowFunction.SetRCommand("head") + ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + Else + ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) + End If + ElseIf rdoHTMLOutputWindow.Checked Then + ucrChkRowNumbers.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) + ucrChkRowNumbers.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) + If ucrNudNumberRows.GetText <> "" Then + ' clsOutputWindowFunction.RemoveParameterByName("x") + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + Else + clsBaseOperator.RemoveParameterByName("head") + End If + End If + End If + End Sub + Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged 'Not yet implemented 'If rdoHTMLOutputWindow.Checked AndAlso ucrChkSortColumn.Checked Then @@ -308,33 +382,32 @@ Public Class dlgView End Sub Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click - 'sdgTableOptions.Setup(ucrSelectorForView.strCurrentDataFrame, ) + sdgTableOptions.Setup(ucrSelectorForView.strCurrentDataFrame, clsBaseOperator) sdgTableOptions.ShowDialog(Me) End Sub - Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load - If ucrChkRowNumbers.Checked Then - ucrNudNumberRows.SetParameter(New RParameter("n", 1)) - ucrNudNumberRows.Visible = True - Else - 'ucrNudNumberRows.Remove("n") - 'ucrNudNumberRows.UnSetParameter(New RParameter("n", 1)) - ucrNudNumberRows.Visible = False - End If - End Sub + 'Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load + ' If ucrChkRowNumbers.Checked Then + ' ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ' ucrNudNumberRows.Visible = True + ' Else + ' 'ucrNudNumberRows.Remove("n") + ' 'ucrNudNumberRows.UnSetParameter(New RParameter("n", 1)) + ' ucrNudNumberRows.Visible = False + ' End If + 'End Sub Private Sub ucrPnlViewData_ControlValueChanged(ucrChangedControl As ucrCore) - TableOptions() ChangeFunctionParameters() End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrChkSpecifyRows.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged - TableOptions() + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged + ' TableOptions() TestOKEnabled() End Sub Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged - TableOptions() + ' TableOptions() GetObjectName() End Sub @@ -348,14 +421,6 @@ Public Class dlgView End If End Sub - Private Sub TableOptions() - If rdoHTMLOutputWindow.Checked Then - cmdTableOptions.Visible = True - Else - cmdTableOptions.Visible = False - End If - End Sub - Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) End Sub From 968544e4d7637befc3f6f206e0b520d2cd3168a7 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:41:11 +0300 Subject: [PATCH 09/77] code5 --- instat/dlgView.Designer.vb | 32 +++++++++- instat/dlgView.vb | 127 ++++++++++++------------------------- 2 files changed, 73 insertions(+), 86 deletions(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 6c26c582303..701924ad824 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -43,6 +43,8 @@ Partial Class dlgView Me.rdoDispOutputWindow = New System.Windows.Forms.RadioButton() Me.rdoHTMLOutputWindow = New System.Windows.Forms.RadioButton() Me.cmdTableOptions = New System.Windows.Forms.Button() + Me.ucrViewNudPreview = New instat.ucrNud() + Me.ucrViewChkPreview = New instat.ucrCheck() Me.ucrChkDisplayFromTop = New instat.ucrCheck() Me.ucrChkRowNumbers = New instat.ucrCheck() Me.ucrSaveData = New instat.ucrSave() @@ -108,6 +110,30 @@ Partial Class dlgView Me.cmdTableOptions.Text = "Table Options" Me.cmdTableOptions.UseVisualStyleBackColor = True ' + 'ucrViewNudPreview + ' + Me.ucrViewNudPreview.AutoSize = True + Me.ucrViewNudPreview.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrViewNudPreview.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrViewNudPreview.Location = New System.Drawing.Point(343, 167) + Me.ucrViewNudPreview.Margin = New System.Windows.Forms.Padding(6) + Me.ucrViewNudPreview.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrViewNudPreview.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrViewNudPreview.Name = "ucrViewNudPreview" + Me.ucrViewNudPreview.Size = New System.Drawing.Size(50, 20) + Me.ucrViewNudPreview.TabIndex = 33 + Me.ucrViewNudPreview.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrViewChkPreview + ' + Me.ucrViewChkPreview.AutoSize = True + Me.ucrViewChkPreview.Checked = False + Me.ucrViewChkPreview.Location = New System.Drawing.Point(248, 167) + Me.ucrViewChkPreview.Margin = New System.Windows.Forms.Padding(6) + Me.ucrViewChkPreview.Name = "ucrViewChkPreview" + Me.ucrViewChkPreview.Size = New System.Drawing.Size(89, 23) + Me.ucrViewChkPreview.TabIndex = 32 + ' 'ucrChkDisplayFromTop ' Me.ucrChkDisplayFromTop.AutoSize = True @@ -218,9 +244,9 @@ Partial Class dlgView Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(416, 357) + Me.Controls.Add(Me.ucrViewNudPreview) Me.Controls.Add(Me.cmdTableOptions) Me.Controls.Add(Me.ucrChkDisplayFromTop) - Me.Controls.Add(Me.ucrChkRowNumbers) Me.Controls.Add(Me.ucrSaveData) Me.Controls.Add(Me.ucrReceiverSortCol) Me.Controls.Add(Me.ucrChkSortColumn) @@ -233,6 +259,8 @@ Partial Class dlgView Me.Controls.Add(Me.ucrReceiverView) Me.Controls.Add(Me.ucrSelectorForView) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.ucrViewChkPreview) + Me.Controls.Add(Me.ucrChkRowNumbers) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -259,4 +287,6 @@ Partial Class dlgView Friend WithEvents ucrChkRowNumbers As ucrCheck Friend WithEvents ucrChkDisplayFromTop As ucrCheck Friend WithEvents cmdTableOptions As Button + Friend WithEvents ucrViewNudPreview As ucrNud + Friend WithEvents ucrViewChkPreview As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgView.vb b/instat/dlgView.vb index efae507929b..0961ccc23f9 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -56,7 +56,10 @@ Public Class dlgView ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer") ucrPnlDisplayWindow.AddToLinkedControls(ucrChkDisplayFromTop, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow, rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + + 'ucrPnlDisplayFrom.AddRadioButton(rdoBottom) 'ucrPnlDisplayFrom.AddRadioButton(rdoTop) 'ucrPnlDisplayFrom.SetLinkedDisplayControl(lblDisplayFrom) @@ -75,6 +78,16 @@ Public Class dlgView ucrChkDisplayFromTop.SetText("Display From Top") ucrChkDisplayFromTop.AddFunctionNamesCondition(True, {"head", "tail"}) ucrChkDisplayFromTop.AddFunctionNamesCondition(False, {frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data"}) + + ucrViewChkPreview.SetText("Rows") + ucrViewChkPreview.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) + ucrViewChkPreview.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) + ucrViewChkPreview.AddToLinkedControls(ucrViewNudPreview, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrViewNudPreview.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) + ucrViewNudPreview.Minimum = 6 + ucrViewNudPreview.Maximum = Decimal.MaxValue + ucrViewNudPreview.SetRDefault(6) ' ucrChkSpecifyRows.bAllowNonConditionValues = True ' ucrPnlViewData.AddRadioButton(rdoViewAll) @@ -130,6 +143,8 @@ Public Class dlgView clsDummyFunction = New RFunction clsAsHtmlWidgetFunction = New RFunction + ucrViewChkPreview.Checked = True + ucrSelectorForView.Reset() ucrReceiverView.SetMeAsReceiver() @@ -167,7 +182,7 @@ Public Class dlgView clsHeadRFunction.SetPackageName("utils") clsHeadRFunction.SetRCommand("head") - clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=0, bIncludeArgumentName:=False) + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=100, iPosition:=0, bIncludeArgumentName:=False) clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) clsGtRFunction.SetPackageName("gt") @@ -190,6 +205,7 @@ Public Class dlgView 'Correct maximum is then set in DataFrameLength() ucrNudNumberRows.Maximum = Decimal.MaxValue + ucrViewChkPreview.SetRCode(clsBaseOperator, bReset) 'ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("mydf"), iAdditionalPairNo:=1) ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1) @@ -202,7 +218,7 @@ Public Class dlgView ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) - ucrChkRowNumbers.SetRCode(clsHeadRFunction, bReset) + ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) ' ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) ' ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) @@ -264,26 +280,18 @@ Public Class dlgView ucrSaveData.Visible = True ucrBase.clsRsyntax.iCallType = 2 - 'If ucrChkDisplayFromTop.Checked Then - ' clsOutputWindowFunction.SetRCommand("head") - 'Else - ' clsOutputWindowFunction.SetRCommand("tail") - 'End If - ' If ucrNudNumberRows.GetText <> "" Then - 'If ucrNudNumberRows.GetText <> "" AndAlso rdoDispOutputWindow.Checked Then 'OrElse ucrChkDisplayFromTop.Checked Then - ' ' clsOutputWindowFunction.SetRCommand("head") - ' ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) - ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - - 'Else - ' ' clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - - ' ' clsOutputWindowFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.iColumnCount, iPosition:=0) - - ' ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ' ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) - 'End If + If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + If ucrChkDisplayFromTop.Checked Then + clsOutputWindowFunction.SetRCommand("head") + Else + clsOutputWindowFunction.SetRCommand("tail") + End If + Else + ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) + End If ElseIf rdoDispSepOutputWindow.Checked Then clsOutputWindowFunction.SetRCommand("head") clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) @@ -295,24 +303,7 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else - 'ucrNudNumberRows.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) - 'ucrNudNumberRows.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) - 'If ucrNudNumberRows.GetText <> "" Then - ' ' clsOutputWindowFunction.RemoveParameterByName("x") - ' ' clsOutputWindowFunction.SetRCommand("head") - ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - 'Else - ' clsBaseOperator.RemoveParameterByName("head") - 'End If - 'ucrChkRowNumbers.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) - 'ucrChkRowNumbers.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) - 'If ucrChkRowNumbers.Checked AndAlso ucrNudNumberRows.GetText <> "" Then - ' clsOutputWindowFunction.RemoveParameterByName("x") - ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - 'Else - - ' clsBaseOperator.RemoveParameterByName("head") - 'End If + clsOutputWindowFunction.SetRCommand("head") clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) @@ -320,53 +311,29 @@ Public Class dlgView ucrSaveData.Visible = True ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) End If - 'Else - ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) - ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ' ucrSaveData.Visible = False - 'End If End Sub Private Sub DataFrameLength() ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength End Sub - Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged + Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged, ucrViewNudPreview.ControlValueChanged, ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged If bControlsUpdated Then ChangeFunctionParameters() End If GetObjectName() End Sub - Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load - If ucrChkRowNumbers.Checked Then - If rdoDispOutputWindow.Checked Then - If ucrChkDisplayFromTop.Checked Then - clsOutputWindowFunction.SetRCommand("head") - Else - clsOutputWindowFunction.SetRCommand("tail") - End If - If ucrNudNumberRows.GetText <> "" Then - clsOutputWindowFunction.SetRCommand("head") - ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - Else - ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) - End If - ElseIf rdoHTMLOutputWindow.Checked Then - ucrChkRowNumbers.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) - ucrChkRowNumbers.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) - If ucrNudNumberRows.GetText <> "" Then - ' clsOutputWindowFunction.RemoveParameterByName("x") - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - Else - clsBaseOperator.RemoveParameterByName("head") - End If - End If + Private Sub ucrViewChkPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged + ' clsOutputWindowFunction.SetRCommand("head") + If ucrViewChkPreview.Checked Then + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + Else + clsBaseOperator.RemoveParameterByName("head") End If End Sub + Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged 'Not yet implemented 'If rdoHTMLOutputWindow.Checked AndAlso ucrChkSortColumn.Checked Then @@ -386,22 +353,11 @@ Public Class dlgView sdgTableOptions.ShowDialog(Me) End Sub - 'Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load - ' If ucrChkRowNumbers.Checked Then - ' ucrNudNumberRows.SetParameter(New RParameter("n", 1)) - ' ucrNudNumberRows.Visible = True - ' Else - ' 'ucrNudNumberRows.Remove("n") - ' 'ucrNudNumberRows.UnSetParameter(New RParameter("n", 1)) - ' ucrNudNumberRows.Visible = False - ' End If - 'End Sub - Private Sub ucrPnlViewData_ControlValueChanged(ucrChangedControl As ucrCore) ChangeFunctionParameters() End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrViewNudPreview.ControlContentsChanged, ucrViewChkPreview.ControlContentsChanged, ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged ' TableOptions() TestOKEnabled() End Sub @@ -416,6 +372,7 @@ Public Class dlgView Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) ElseIf rdoHTMLOutputWindow.Checked Then + clsOutputWindowFunction.SetRCommand("head") Dim strPrefix As String = clsAsHtmlWidgetFunction.GetRObjectToAssignTo clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) End If From fdc509bc68f22d255333eb8d7677c793e3b066a1 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:09:21 +0300 Subject: [PATCH 10/77] Final changes --- instat/dlgView.vb | 49 +---------------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 0961ccc23f9..5f07adbabc6 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -59,19 +59,8 @@ Public Class dlgView ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - - 'ucrPnlDisplayFrom.AddRadioButton(rdoBottom) - 'ucrPnlDisplayFrom.AddRadioButton(rdoTop) - 'ucrPnlDisplayFrom.SetLinkedDisplayControl(lblDisplayFrom) - 'ucrChkDisplayFromTop.AddFunctionNamesCondition("head") - 'ucrChkDisplayFromTop.AddFunctionNamesCondition(rdoBottom, "tail") - - ' This linking only applies if rdoDispOutputWindow is checked - - ' ucrChkSpecifyRows.AddToLinkedControls(ucrChkDisplayFromTop, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True) - ' ucrChkSpecifyRows.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) - ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ucrNudNumberRows.Minimum = 1 ucrChkRowNumbers.SetText("Rows") ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) @@ -88,17 +77,8 @@ Public Class dlgView ucrViewNudPreview.Minimum = 6 ucrViewNudPreview.Maximum = Decimal.MaxValue ucrViewNudPreview.SetRDefault(6) - ' ucrChkSpecifyRows.bAllowNonConditionValues = True - ' ucrPnlViewData.AddRadioButton(rdoViewAll) - ' ucrPnlViewData.AddRadioButton(rdoViewSelectedColumnsRows) - - ' ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewAll, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame") - ' ucrPnlViewData.AddParameterValueFunctionNamesCondition(rdoViewSelectedColumnsRows, "x", frmMain.clsRLink.strInstatDataObject & "$get_data_frame", bNewIsPositive:=False) - - ' ucrPnlViewData.AddToLinkedControls(ucrReceiverView, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) ucrReceiverView.SetLinkedDisplayControl(lblSelected) - ' ucrPnlViewData.AddToLinkedControls(ucrPnlDisplayWindow, {rdoViewSelectedColumnsRows}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) ucrChkSortColumn.Visible = False 'ucrPnlDisplayWindow.AddToLinkedControls(ucrChkSortColumn, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) @@ -118,10 +98,6 @@ Public Class dlgView ucrSelectorForView.SetParameter(New RParameter("title", 1)) ucrSelectorForView.SetParameterIsString() - - ucrNudNumberRows.Minimum = 1 - ' ucrNudNumberRows.SetLinkedDisplayControl(ucrChkNumbersRows) - ucrSaveData.SetCheckBoxText("Store Data") ucrSaveData.SetPrefix("last_table") ucrSaveData.SetDataFrameSelector(ucrSelectorForView.ucrAvailableDataFrames) @@ -219,9 +195,7 @@ Public Class dlgView ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) - ' ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) - ' ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) DataFrameLength() @@ -234,12 +208,10 @@ Public Class dlgView End Sub Private Sub TestOKEnabled() - ' If rdoViewSelectedColumnsRows.Checked Then If Not ucrReceiverView.IsEmpty Then If rdoDispSepOutputWindow.Checked Then ucrBase.OKEnabled(True) ElseIf rdoDispOutputWindow.Checked Then - ' If ucrChkSpecifyRows.Checked Then If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.OKEnabled(True) Else @@ -253,16 +225,6 @@ Public Class dlgView Else ucrBase.OKEnabled(False) End If - 'Else - ' ucrBase.OKEnabled(False) - 'End If - 'Else - ' If ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then - ' ucrBase.OKEnabled(True) - ' Else - ' ucrBase.OKEnabled(False) - ' End If - 'End If End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -272,7 +234,6 @@ Public Class dlgView End Sub Private Sub ChangeFunctionParameters() - 'If rdoViewSelectedColumnsRows.Checked Then If rdoDispOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "window", iPosition:=0) @@ -293,17 +254,13 @@ Public Class dlgView ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) End If ElseIf rdoDispSepOutputWindow.Checked Then - clsOutputWindowFunction.SetRCommand("head") clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) - ucrBase.clsRsyntax.iCallType = 0 ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) - ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) cmdTableOptions.Visible = False ucrSaveData.Visible = False Else - clsOutputWindowFunction.SetRCommand("head") clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) @@ -325,7 +282,6 @@ Public Class dlgView End Sub Private Sub ucrViewChkPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged - ' clsOutputWindowFunction.SetRCommand("head") If ucrViewChkPreview.Checked Then clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) Else @@ -358,12 +314,10 @@ Public Class dlgView End Sub Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrViewNudPreview.ControlContentsChanged, ucrViewChkPreview.ControlContentsChanged, ucrReceiverView.ControlContentsChanged, ucrPnlDisplayWindow.ControlContentsChanged, ucrNudNumberRows.ControlContentsChanged, ucrChkDisplayFromTop.ControlContentsChanged, ucrChkSortColumn.ControlContentsChanged, ucrReceiverSortCol.ControlContentsChanged - ' TableOptions() TestOKEnabled() End Sub Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged - ' TableOptions() GetObjectName() End Sub @@ -381,5 +335,4 @@ Public Class dlgView Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) End Sub - End Class \ No newline at end of file From f3d857126a47e4920187bc1542ef4c8ccfec5edf Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:44:29 +0200 Subject: [PATCH 11/77] Changing the as_raw_html command to fmt_markdown for html results --- instat/dlgUseTable.vb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 1593d547fa5..61eb67a3f11 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -57,18 +57,18 @@ Public Class dlgUseTable ucrTablesReceiver.SetItemType(RObjectTypeLabel.Table) ''To Be enabled later when the formats are supported. - rdoAsHTML.Enabled = False - rdoAsLaTex.Enabled = False - rdoAsRTF.Enabled = False - rdoAsWord.Enabled = False - 'ucrPnlExportOptions.AddRadioButton(rdoAsHTML) - 'ucrPnlExportOptions.AddRadioButton(rdoAsRTF) - 'ucrPnlExportOptions.AddRadioButton(rdoAsWord) - 'ucrPnlExportOptions.AddRadioButton(rdoAsLaTex) - 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsHTML, "as_raw_html") - 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsRTF, "as_rtf") - 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsWord, "as_word") - 'ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsLaTex, "as_word") + 'rdoAsHTML.Enabled = False + 'rdoAsLaTex.Enabled = False + 'rdoAsRTF.Enabled = False + 'rdoAsWord.Enabled = False + ucrPnlExportOptions.AddRadioButton(rdoAsHTML) + ucrPnlExportOptions.AddRadioButton(rdoAsRTF) + ucrPnlExportOptions.AddRadioButton(rdoAsWord) + ucrPnlExportOptions.AddRadioButton(rdoAsLaTex) + ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsHTML, "fmt_markdown") + ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsRTF, "as_rtf") + ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsWord, "as_word") + ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsLaTex, "as_word") cmdTableOptions.Enabled = False @@ -108,7 +108,7 @@ Public Class dlgUseTable clsJoiningPipeOperator = New ROperator clsgtExtraThemesFunction = New RFunction - 'rdoAsHTML.Checked = True + rdoAsHTML.Checked = True ucrTablesReceiver.SetMeAsReceiver() ucrTablesSelector.Reset() ucrSaveTable.Reset() @@ -173,7 +173,7 @@ Public Class dlgUseTable clsThemesTabOptionsFunction.SetRCommand("tab_options") clsRFunctionAsHTML.SetPackageName("gt") - clsRFunctionAsHTML.SetRCommand("as_raw_html") + clsRFunctionAsHTML.SetRCommand("fmt_markdown") clsRFunctionAsRTF.SetPackageName("gt") clsRFunctionAsRTF.SetRCommand("as_rtf") From 0fb53baa4e2d63fd8055da9e33262ab0c3c24c8f Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:06:28 +0200 Subject: [PATCH 12/77] Code Changes --- instat/dlgUseTable.Designer.vb | 24 ++++++++++++------------ instat/dlgUseTable.vb | 34 ++++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/instat/dlgUseTable.Designer.vb b/instat/dlgUseTable.Designer.vb index eb87767cd21..2c8c4e25718 100644 --- a/instat/dlgUseTable.Designer.vb +++ b/instat/dlgUseTable.Designer.vb @@ -29,11 +29,11 @@ Partial Class dlgUseTable Me.cmdTableOptions = New System.Windows.Forms.Button() Me.lblTable = New System.Windows.Forms.Label() Me.lblExportTables = New System.Windows.Forms.Label() - Me.ucrPnlExportOptions = New instat.UcrPanel() Me.ucrSaveTable = New instat.ucrSave() Me.ucrTablesReceiver = New instat.ucrReceiverSingle() Me.ucrTablesSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrPnlOptions = New instat.UcrPanel() Me.SuspendLayout() ' 'rdoAsHTML @@ -109,15 +109,6 @@ Partial Class dlgUseTable Me.lblExportTables.TabIndex = 26 Me.lblExportTables.Text = "Export Table as:" ' - 'ucrPnlExportOptions - ' - Me.ucrPnlExportOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlExportOptions.Enabled = False - Me.ucrPnlExportOptions.Location = New System.Drawing.Point(8, 264) - Me.ucrPnlExportOptions.Name = "ucrPnlExportOptions" - Me.ucrPnlExportOptions.Size = New System.Drawing.Size(105, 110) - Me.ucrPnlExportOptions.TabIndex = 5 - ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -160,6 +151,15 @@ Partial Class dlgUseTable Me.ucrBase.Size = New System.Drawing.Size(407, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrPnlOptions + ' + Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlOptions.Location = New System.Drawing.Point(8, 263) + Me.ucrPnlOptions.Margin = New System.Windows.Forms.Padding(5) + Me.ucrPnlOptions.Name = "ucrPnlOptions" + Me.ucrPnlOptions.Size = New System.Drawing.Size(158, 106) + Me.ucrPnlOptions.TabIndex = 27 + ' 'dlgUseTable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -172,11 +172,11 @@ Partial Class dlgUseTable Me.Controls.Add(Me.rdoAsWord) Me.Controls.Add(Me.rdoAsRTF) Me.Controls.Add(Me.rdoAsHTML) - Me.Controls.Add(Me.ucrPnlExportOptions) Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.ucrTablesReceiver) Me.Controls.Add(Me.ucrTablesSelector) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.ucrPnlOptions) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False Me.MinimizeBox = False @@ -191,7 +191,6 @@ Partial Class dlgUseTable Friend WithEvents ucrBase As ucrButtons Friend WithEvents ucrTablesSelector As ucrSelectorByDataFrameAddRemove Friend WithEvents ucrTablesReceiver As ucrReceiverSingle - Friend WithEvents ucrPnlExportOptions As UcrPanel Friend WithEvents ucrSaveTable As ucrSave Friend WithEvents rdoAsWord As RadioButton Friend WithEvents rdoAsRTF As RadioButton @@ -200,4 +199,5 @@ Partial Class dlgUseTable Friend WithEvents rdoAsLaTex As RadioButton Friend WithEvents lblTable As Label Friend WithEvents lblExportTables As Label + Friend WithEvents ucrPnlOptions As UcrPanel End Class diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 61eb67a3f11..3201cb26cb2 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -13,7 +13,7 @@ ' ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . - +Imports System.IO Imports instat.Translations Public Class dlgUseTable Private bFirstLoad As Boolean = True @@ -61,14 +61,14 @@ Public Class dlgUseTable 'rdoAsLaTex.Enabled = False 'rdoAsRTF.Enabled = False 'rdoAsWord.Enabled = False - ucrPnlExportOptions.AddRadioButton(rdoAsHTML) - ucrPnlExportOptions.AddRadioButton(rdoAsRTF) - ucrPnlExportOptions.AddRadioButton(rdoAsWord) - ucrPnlExportOptions.AddRadioButton(rdoAsLaTex) - ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsHTML, "fmt_markdown") - ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsRTF, "as_rtf") - ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsWord, "as_word") - ucrPnlExportOptions.AddFunctionNamesCondition(rdoAsLaTex, "as_word") + ucrPnlOptions.AddRadioButton(rdoAsHTML) + ucrPnlOptions.AddRadioButton(rdoAsRTF) + ucrPnlOptions.AddRadioButton(rdoAsWord) + ucrPnlOptions.AddRadioButton(rdoAsLaTex) + ucrPnlOptions.AddFunctionNamesCondition(rdoAsHTML, "gtsave") + ucrPnlOptions.AddFunctionNamesCondition(rdoAsRTF, "gtsave") + ucrPnlOptions.AddFunctionNamesCondition(rdoAsWord, "gtsave") + ucrPnlOptions.AddFunctionNamesCondition(rdoAsLaTex, "gtsave") cmdTableOptions.Enabled = False @@ -108,7 +108,7 @@ Public Class dlgUseTable clsJoiningPipeOperator = New ROperator clsgtExtraThemesFunction = New RFunction - rdoAsHTML.Checked = True + 'rdoAsHTML.Checked = True ucrTablesReceiver.SetMeAsReceiver() ucrTablesSelector.Reset() ucrSaveTable.Reset() @@ -173,7 +173,7 @@ Public Class dlgUseTable clsThemesTabOptionsFunction.SetRCommand("tab_options") clsRFunctionAsHTML.SetPackageName("gt") - clsRFunctionAsHTML.SetRCommand("fmt_markdown") + clsRFunctionAsHTML.SetRCommand("gtsave") clsRFunctionAsRTF.SetPackageName("gt") clsRFunctionAsRTF.SetRCommand("as_rtf") @@ -221,15 +221,25 @@ Public Class dlgUseTable TestOKEnabled() End Sub - Private Sub ucrPnlExportOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlExportOptions.ControlValueChanged + Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoAsHTML.Checked Then clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsHTML) + clsRFunctionAsHTML.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".html" & Chr(34), iPosition:=1) + clsRFunctionAsHTML.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) ElseIf rdoAsRTF.Checked Then clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsRTF) + clsRFunctionAsRTF.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".rtf" & Chr(34), iPosition:=1) + clsRFunctionAsRTF.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) ElseIf rdoAsWord.Checked Then clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsWord) + clsRFunctionAsWord.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".docx" & Chr(34), iPosition:=1) + clsRFunctionAsWord.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) Else clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsLaTex) + clsRFunctionAsLaTex.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".tex" & Chr(34), iPosition:=1) + clsRFunctionAsLaTex.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) + End If End Sub + End Class \ No newline at end of file From 300731f6f33d79e55f52c67357d30d8d54274ac5 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:28:14 +0200 Subject: [PATCH 13/77] More Changes --- instat/dlgUseTable.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 3201cb26cb2..8131c0abc98 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -176,13 +176,13 @@ Public Class dlgUseTable clsRFunctionAsHTML.SetRCommand("gtsave") clsRFunctionAsRTF.SetPackageName("gt") - clsRFunctionAsRTF.SetRCommand("as_rtf") + clsRFunctionAsRTF.SetRCommand("gtsave") clsRFunctionAsWord.SetPackageName("gt") - clsRFunctionAsWord.SetRCommand("as_word") + clsRFunctionAsWord.SetRCommand("gtsave") clsRFunctionAsLaTex.SetPackageName("gt") - clsRFunctionAsLaTex.SetRCommand("as_word") + clsRFunctionAsLaTex.SetRCommand("gtsave") clsUseTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") @@ -225,19 +225,19 @@ Public Class dlgUseTable If rdoAsHTML.Checked Then clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsHTML) clsRFunctionAsHTML.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".html" & Chr(34), iPosition:=1) - clsRFunctionAsHTML.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) + clsRFunctionAsHTML.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) ElseIf rdoAsRTF.Checked Then clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsRTF) clsRFunctionAsRTF.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".rtf" & Chr(34), iPosition:=1) - clsRFunctionAsRTF.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) + clsRFunctionAsRTF.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) ElseIf rdoAsWord.Checked Then clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsWord) clsRFunctionAsWord.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".docx" & Chr(34), iPosition:=1) - clsRFunctionAsWord.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) + clsRFunctionAsWord.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) Else clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsLaTex) clsRFunctionAsLaTex.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".tex" & Chr(34), iPosition:=1) - clsRFunctionAsLaTex.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments & Chr(34), iPosition:=2) + clsRFunctionAsLaTex.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) End If End Sub From e33cc90a5c8d584584aeff7d1c36cde26b9d642b Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:07:36 +0200 Subject: [PATCH 14/77] changes --- instat/dlgUseTable.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 8131c0abc98..50efa0d102c 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -238,7 +238,6 @@ Public Class dlgUseTable clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsLaTex) clsRFunctionAsLaTex.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".tex" & Chr(34), iPosition:=1) clsRFunctionAsLaTex.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) - End If End Sub From 7fa9981e9f101887b6bbe7fe7e73c0c8c5ae0b6a Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:31:27 +0200 Subject: [PATCH 15/77] Final Changes --- instat/dlgUseTable.vb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 50efa0d102c..738a980e0aa 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -65,10 +65,10 @@ Public Class dlgUseTable ucrPnlOptions.AddRadioButton(rdoAsRTF) ucrPnlOptions.AddRadioButton(rdoAsWord) ucrPnlOptions.AddRadioButton(rdoAsLaTex) - ucrPnlOptions.AddFunctionNamesCondition(rdoAsHTML, "gtsave") - ucrPnlOptions.AddFunctionNamesCondition(rdoAsRTF, "gtsave") - ucrPnlOptions.AddFunctionNamesCondition(rdoAsWord, "gtsave") - ucrPnlOptions.AddFunctionNamesCondition(rdoAsLaTex, "gtsave") + ucrPnlOptions.AddParameterValuesCondition(rdoAsHTML, "gtsave", "html") + ucrPnlOptions.AddParameterValuesCondition(rdoAsRTF, "gtsave", "rtf") + ucrPnlOptions.AddParameterValuesCondition(rdoAsWord, "gtsave", "docx") + ucrPnlOptions.AddParameterValuesCondition(rdoAsLaTex, "gtsave", "tex") cmdTableOptions.Enabled = False @@ -113,7 +113,8 @@ Public Class dlgUseTable ucrTablesSelector.Reset() ucrSaveTable.Reset() - clsDummyFunction.AddParameter("theme", "select", iPosition:=11) + clsDummyFunction.AddParameter("theme", "select", iPosition:=0) + clsDummyFunction.AddParameter("gtsave", "html", iPosition:=1) clsgtExtraThemesFunction.SetPackageName("gtExtras") @@ -196,6 +197,9 @@ Public Class dlgUseTable ucrTablesSelector.SetRCode(clsUseTableFunction, bReset) ucrTablesReceiver.SetRCode(clsUseTableFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) + If bReset Then + ucrPnlOptions.SetRCode(clsDummyFunction, bReset) + End If End Sub Private Sub TestOKEnabled() From 5599d942d72728279bc451ddddfce7406931517e Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 14 Oct 2024 00:51:49 +0300 Subject: [PATCH 16/77] changes --- instat/dlgView.vb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 5f07adbabc6..5d6005cf690 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -261,6 +261,11 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else + If ucrViewChkPreview.Checked Then + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + Else + clsBaseOperator.RemoveParameterByName("head") + End If clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) @@ -281,13 +286,13 @@ Public Class dlgView GetObjectName() End Sub - Private Sub ucrViewChkPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged - If ucrViewChkPreview.Checked Then - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - Else - clsBaseOperator.RemoveParameterByName("head") - End If - End Sub + 'Private Sub ucrViewChkPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged + ' If ucrViewChkPreview.Checked Then + ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + ' Else + ' clsBaseOperator.RemoveParameterByName("head") + ' End If + 'End Sub Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged From 54d4e322f6d57196be1f6dc95481e26e2cf52ed8 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:12:39 +0300 Subject: [PATCH 17/77] sub dialog changes --- instat/UserTables/dlgGeneralTable.vb | 2 +- instat/dlgView.vb | 71 ++++++++++++++++++---------- 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index fefc401eee2..d27ad3d3acd 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -1,7 +1,7 @@ Imports instat.Translations Public Class dlgGeneralTable - Private clsBaseOperator As New ROperator + Public clsBaseOperator As New ROperator Private clsHeadRFunction, clsGtRFunction As New RFunction Private bFirstload As Boolean = True diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 5d6005cf690..788ebc4e394 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -17,7 +17,7 @@ Imports instat.Translations Public Class dlgView - Private clsBaseOperator As New ROperator + Private clsBaseOperator, clsBaseOperatorView As New ROperator Private bFirstLoad As Boolean = True Private bReset As Boolean = True @@ -109,6 +109,7 @@ Public Class dlgView Private Sub SetDefaults() clsBaseOperator = New ROperator + clsBaseOperatorView = New ROperator clsOutputWindowFunction = New RFunction clsViewColumnsFunction = New RFunction clsHTMLFunction = New RFunction @@ -124,12 +125,34 @@ Public Class dlgView ucrSelectorForView.Reset() ucrReceiverView.SetMeAsReceiver() + clsHeadRFunction.SetPackageName("utils") + clsHeadRFunction.SetRCommand("head") + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=100, iPosition:=0, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + + clsGtRFunction.SetPackageName("gt") + clsGtRFunction.SetRCommand("gt") + clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) + + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, + strObjectName:="last_table") + + clsDummyFunction.AddParameter("checked", "window", iPosition:=0) clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) + clsBaseOperator.SetOperation("%>%") + clsBaseOperator.bBrackets = False + + clsBaseOperatorView.SetOperation("%>%") + + clsOutputWindowFunction.SetPackageName("utils") clsOutputWindowFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", @@ -153,18 +176,6 @@ Public Class dlgView strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, strObjectName:="last_table") - clsBaseOperator.SetOperation("%>%") - clsBaseOperator.bBrackets = False - - clsHeadRFunction.SetPackageName("utils") - clsHeadRFunction.SetRCommand("head") - clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=100, iPosition:=0, bIncludeArgumentName:=False) - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - - clsGtRFunction.SetPackageName("gt") - clsGtRFunction.SetRCommand("gt") - clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) - clsViewColumnsFunction.SetPackageName("utils") clsViewColumnsFunction.SetRCommand("View") @@ -172,7 +183,9 @@ Public Class dlgView clsViewAllFunction.SetRCommand("View") clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -181,17 +194,18 @@ Public Class dlgView 'Correct maximum is then set in DataFrameLength() ucrNudNumberRows.Maximum = Decimal.MaxValue - ucrViewChkPreview.SetRCode(clsBaseOperator, bReset) + 'ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("mydf"), iAdditionalPairNo:=1) ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1) + ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=2) - ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=2) + ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=3) ucrSelectorForView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) ucrSaveData.AddAdditionalRCode(clsOutputWindowFunction, iAdditionalPairNo:=1) ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) - + ucrViewChkPreview.SetRCode(clsBaseOperator, bReset) ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) @@ -262,16 +276,17 @@ Public Class dlgView ucrSaveData.Visible = False Else If ucrViewChkPreview.Checked Then - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) Else - clsBaseOperator.RemoveParameterByName("head") + clsDummyFunction.AddParameter("checked", "html", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) + ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + cmdTableOptions.Visible = True + ucrSaveData.Visible = True + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) End If - clsDummyFunction.AddParameter("checked", "html", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - cmdTableOptions.Visible = True - ucrSaveData.Visible = True - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) End If End Sub @@ -279,6 +294,14 @@ Public Class dlgView ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength End Sub + Private Sub ucrViewChkPreview_Load(sender As Object, e As EventArgs) Handles ucrViewChkPreview.Load + If ucrViewChkPreview.Checked Then + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + Else + clsBaseOperator.RemoveParameterByName("head") + End If + End Sub + Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged, ucrViewNudPreview.ControlValueChanged, ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged If bControlsUpdated Then ChangeFunctionParameters() From 558a895454f822d846fde2da7f887ab3a1b45d89 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:10:58 +0300 Subject: [PATCH 18/77] rows --- instat/dlgView.vb | 146 ++++++++++++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 58 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 788ebc4e394..47d17a40b4f 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -14,6 +14,7 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . +Imports System.Windows Imports instat.Translations Public Class dlgView @@ -21,7 +22,7 @@ Public Class dlgView Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsHeadRFunction, clsGtRFunction, clsOutputWindowFunction, clsHTMLFunction, clsAsHtmlWidgetFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction, clsViewAllFunction As New RFunction + Private clsHeadRFunction, clsGtRFunction, clsOutputWindowFunction, clsHTMLFunction, clsAsHtmlWidgetFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction As New RFunction Private bControlsUpdated As Boolean = False Private Sub dlgView_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -43,7 +44,10 @@ Public Class dlgView 'Needed because window may pop up window which will disappear in a separate thread ucrBase.clsRsyntax.bSeparateThread = False - ucrReceiverView.SetParameter(New RParameter("x", 0)) + ' ucrReceiverView.SetParameter(New RParameter("x", 0)) + ucrReceiverView.SetParameter(New RParameter("df_columns_to_use_param", 0, bNewIncludeArgumentName:=False)) + + ucrReceiverView.SetParameterIsRFunction() ucrReceiverView.Selector = ucrSelectorForView ucrReceiverView.bForceAsDataFrame = True @@ -60,9 +64,16 @@ Public Class dlgView ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) ucrNudNumberRows.SetParameter(New RParameter("n", 1)) - ucrNudNumberRows.Minimum = 1 + ' ucrNudNumberRows.Minimum = 1 ucrChkRowNumbers.SetText("Rows") - ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) + ' ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + + ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True) + + ' ucrViewNudPreview.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) + ' ucrViewNudPreview.Minimum = 6 + 'ucrViewNudPreview.Maximum = Decimal.MaxValue + ucrNudNumberRows.SetRDefault(6) ucrChkDisplayFromTop.SetText("Display From Top") ucrChkDisplayFromTop.AddFunctionNamesCondition(True, {"head", "tail"}) @@ -109,11 +120,11 @@ Public Class dlgView Private Sub SetDefaults() clsBaseOperator = New ROperator - clsBaseOperatorView = New ROperator + 'clsBaseOperatorView = New ROperator clsOutputWindowFunction = New RFunction clsViewColumnsFunction = New RFunction clsHTMLFunction = New RFunction - clsViewAllFunction = New RFunction + ' clsViewAllFunction = New RFunction clsGetObjectDataFunction = New RFunction clsHeadRFunction = New RFunction clsGtRFunction = New RFunction @@ -125,34 +136,12 @@ Public Class dlgView ucrSelectorForView.Reset() ucrReceiverView.SetMeAsReceiver() - clsHeadRFunction.SetPackageName("utils") - clsHeadRFunction.SetRCommand("head") - clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=100, iPosition:=0, bIncludeArgumentName:=False) - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - - clsGtRFunction.SetPackageName("gt") - clsGtRFunction.SetRCommand("gt") - clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) - - clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - strRObjectFormatToAssignTo:=RObjectFormat.Html, - strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, - strObjectName:="last_table") - - clsDummyFunction.AddParameter("checked", "window", iPosition:=0) clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) - clsBaseOperator.SetOperation("%>%") - clsBaseOperator.bBrackets = False - - clsBaseOperatorView.SetOperation("%>%") - - clsOutputWindowFunction.SetPackageName("utils") clsOutputWindowFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", @@ -179,12 +168,30 @@ Public Class dlgView clsViewColumnsFunction.SetPackageName("utils") clsViewColumnsFunction.SetRCommand("View") - clsViewAllFunction.SetPackageName("utils") - clsViewAllFunction.SetRCommand("View") - clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'clsViewAllFunction.SetPackageName("utils") + 'clsViewAllFunction.SetRCommand("View") + 'clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + + clsBaseOperator.SetOperation("%>%") + clsBaseOperator.bBrackets = False + clsHeadRFunction.SetPackageName("utils") + clsHeadRFunction.SetRCommand("head") + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=1, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) - ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) + clsGtRFunction.SetPackageName("gt") + clsGtRFunction.SetRCommand("gt") + clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=3, bIncludeArgumentName:=False) + + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, + strObjectName:="last_table") + + + ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub @@ -197,9 +204,9 @@ Public Class dlgView 'ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("mydf"), iAdditionalPairNo:=1) ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1) - ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=2) + ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=2) + ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=3) - ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=3) ucrSelectorForView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) ucrSaveData.AddAdditionalRCode(clsOutputWindowFunction, iAdditionalPairNo:=1) @@ -209,7 +216,7 @@ Public Class dlgView ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) - ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) + 'ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) DataFrameLength() @@ -217,28 +224,33 @@ Public Class dlgView bControlsUpdated = True End Sub - Private Sub SetSelectorParameterType() - clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - End Sub + 'Private Sub SetSelectorParameterType() + ' clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'End Sub Private Sub TestOKEnabled() If Not ucrReceiverView.IsEmpty Then If rdoDispSepOutputWindow.Checked Then ucrBase.OKEnabled(True) ElseIf rdoDispOutputWindow.Checked Then - If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then - ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) - End If + ucrBase.OKEnabled(True) + 'If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then + ' ucrBase.OKEnabled(True) + ' Else + ' ucrBase.OKEnabled(False) + ' End If Else ucrBase.OKEnabled(True) + 'If rdoHTMLOutputWindow.Checked AndAlso ((ucrChkSortColumn.Checked AndAlso Not ucrReceiverSortCol.IsEmpty) OrElse Not ucrChkSortColumn.Checked) Then + ' ucrBase.OKEnabled(True) + 'Else + ' ucrBase.OKEnabled(False) + 'End If End If - ElseIf rdoHTMLOutputWindow.Checked AndAlso ((ucrChkSortColumn.Checked AndAlso Not ucrReceiverSortCol.IsEmpty) OrElse Not ucrChkSortColumn.Checked) Then - ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) End If + End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -259,13 +271,16 @@ Public Class dlgView ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - If ucrChkDisplayFromTop.Checked Then + If Not ucrChkRowNumbers.Checked Then + cmdTableOptions.Visible = True + ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength + ElseIf ucrChkDisplayFromTop.Checked Then clsOutputWindowFunction.SetRCommand("head") Else clsOutputWindowFunction.SetRCommand("tail") - End If - Else - ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) + End If + Else + ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) End If ElseIf rdoDispSepOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) @@ -275,17 +290,19 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else + clsDummyFunction.AddParameter("checked", "html", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) + ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + cmdTableOptions.Visible = True + ucrSaveData.Visible = True + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) If ucrViewChkPreview.Checked Then + ucrReceiverView.bForceAsDataFrame = False ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - Else - clsDummyFunction.AddParameter("checked", "html", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) - ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - cmdTableOptions.Visible = True - ucrSaveData.Visible = True ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) End If End If End Sub @@ -296,12 +313,21 @@ Public Class dlgView Private Sub ucrViewChkPreview_Load(sender As Object, e As EventArgs) Handles ucrViewChkPreview.Load If ucrViewChkPreview.Checked Then - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) Else clsBaseOperator.RemoveParameterByName("head") End If End Sub + 'Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load + ' If ucrViewChkPreview.Checked Then + ' ucrNudNumberRows.AddParameter("n", iPosition:=1, bIncludeArgumentName:=False) + ' Else + ' ucr.RemoveParameterByName("n") + ' ' clsAsHtmlWidgetFunctionlsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + ' End If + 'End Sub + Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged, ucrViewNudPreview.ControlValueChanged, ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged If bControlsUpdated Then ChangeFunctionParameters() @@ -329,7 +355,7 @@ Public Class dlgView Private Sub ucrSelectorForView_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForView.ControlValueChanged DataFrameLength() - SetSelectorParameterType() + 'SetSelectorParameterType() End Sub Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click @@ -357,6 +383,10 @@ Public Class dlgView clsOutputWindowFunction.SetRCommand("head") Dim strPrefix As String = clsAsHtmlWidgetFunction.GetRObjectToAssignTo clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + If ucrViewChkPreview.Checked Then + strPrefix = clsBaseOperator.GetRObjectToAssignTo + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + End If End If End Sub From a38697c774dfe988d16a1ce7c1f5c40c197d7d98 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 24 Oct 2024 12:38:56 +0300 Subject: [PATCH 19/77] changes to the code --- instat/dlgSummaryTables.Designer.vb | 258 ++++++++++++++++++---------- instat/dlgSummaryTables.vb | 87 +++++++--- 2 files changed, 227 insertions(+), 118 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index cc8ebfa2823..b43504a6db6 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -85,6 +85,8 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrNudSigFigs = New instat.ucrNud() Me.lblSigFigs = New System.Windows.Forms.Label() + Me.ucrNudColFactors = New instat.ucrNud() + Me.lblColumnFactors = New System.Windows.Forms.Label() Me.grpDisplay.SuspendLayout() Me.grpMargin.SuspendLayout() Me.grpPercentages.SuspendLayout() @@ -94,9 +96,10 @@ Partial Class dlgSummaryTables ' Me.lblFactors.AutoSize = True Me.lblFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactors.Location = New System.Drawing.Point(286, 43) + Me.lblFactors.Location = New System.Drawing.Point(429, 64) + Me.lblFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactors.Name = "lblFactors" - Me.lblFactors.Size = New System.Drawing.Size(48, 13) + Me.lblFactors.Size = New System.Drawing.Size(71, 20) Me.lblFactors.TabIndex = 1 Me.lblFactors.Tag = "Factors:" Me.lblFactors.Text = "Factors :" @@ -104,9 +107,10 @@ Partial Class dlgSummaryTables 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(286, 280) + Me.cmdSummaries.Location = New System.Drawing.Point(429, 420) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(104, 23) + Me.cmdSummaries.Size = New System.Drawing.Size(156, 34) Me.cmdSummaries.TabIndex = 13 Me.cmdSummaries.Text = "Summaries..." Me.cmdSummaries.UseVisualStyleBackColor = True @@ -119,9 +123,11 @@ Partial Class dlgSummaryTables Me.grpDisplay.Controls.Add(Me.rdoFactorVariable) Me.grpDisplay.Controls.Add(Me.rdoNoColumnFactor) Me.grpDisplay.Controls.Add(Me.ucrPnlColumnFactor) - Me.grpDisplay.Location = New System.Drawing.Point(10, 379) + Me.grpDisplay.Location = New System.Drawing.Point(15, 568) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Size = New System.Drawing.Size(270, 103) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4) + Me.grpDisplay.Size = New System.Drawing.Size(405, 154) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Display Column Factors" @@ -130,11 +136,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverColumnFactor.AutoSize = True Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(140, 35) + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(210, 52) Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" Me.ucrReceiverColumnFactor.Selector = Nothing - Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverColumnFactor.strNcFilePath = "" Me.ucrReceiverColumnFactor.TabIndex = 34 Me.ucrReceiverColumnFactor.ucrSelector = Nothing @@ -142,9 +148,10 @@ Partial Class dlgSummaryTables 'rdoVariable ' Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(14, 74) + Me.rdoVariable.Location = New System.Drawing.Point(21, 111) + Me.rdoVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoVariable.Name = "rdoVariable" - Me.rdoVariable.Size = New System.Drawing.Size(63, 17) + Me.rdoVariable.Size = New System.Drawing.Size(92, 24) Me.rdoVariable.TabIndex = 32 Me.rdoVariable.TabStop = True Me.rdoVariable.Text = "Variable" @@ -153,9 +160,10 @@ Partial Class dlgSummaryTables 'rdoSummaryVariable ' Me.rdoSummaryVariable.AutoSize = True - Me.rdoSummaryVariable.Location = New System.Drawing.Point(14, 55) + Me.rdoSummaryVariable.Location = New System.Drawing.Point(21, 82) + Me.rdoSummaryVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoSummaryVariable.Name = "rdoSummaryVariable" - Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17) + Me.rdoSummaryVariable.Size = New System.Drawing.Size(164, 24) Me.rdoSummaryVariable.TabIndex = 31 Me.rdoSummaryVariable.TabStop = True Me.rdoSummaryVariable.Text = "Summary-Variable" @@ -165,9 +173,10 @@ Partial Class dlgSummaryTables ' Me.rdoFactorVariable.AutoSize = True Me.rdoFactorVariable.Checked = True - Me.rdoFactorVariable.Location = New System.Drawing.Point(14, 36) + Me.rdoFactorVariable.Location = New System.Drawing.Point(21, 54) + Me.rdoFactorVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoFactorVariable.Name = "rdoFactorVariable" - Me.rdoFactorVariable.Size = New System.Drawing.Size(96, 17) + Me.rdoFactorVariable.Size = New System.Drawing.Size(142, 24) Me.rdoFactorVariable.TabIndex = 30 Me.rdoFactorVariable.TabStop = True Me.rdoFactorVariable.Text = "Factor Variable" @@ -176,9 +185,10 @@ Partial Class dlgSummaryTables 'rdoNoColumnFactor ' Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(14, 17) + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(21, 26) + Me.rdoNoColumnFactor.Margin = New System.Windows.Forms.Padding(4) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" - Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) + Me.rdoNoColumnFactor.Size = New System.Drawing.Size(162, 24) Me.rdoNoColumnFactor.TabIndex = 29 Me.rdoNoColumnFactor.Text = "No Column Factor" Me.rdoNoColumnFactor.UseVisualStyleBackColor = True @@ -186,9 +196,10 @@ Partial Class dlgSummaryTables 'ucrPnlColumnFactor ' Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(11, 17) + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(16, 26) + Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9) Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(124, 80) + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(186, 120) Me.ucrPnlColumnFactor.TabIndex = 29 ' 'grpMargin @@ -197,9 +208,11 @@ Partial Class dlgSummaryTables Me.grpMargin.Controls.Add(Me.rdoSummary) Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) - Me.grpMargin.Location = New System.Drawing.Point(10, 313) + Me.grpMargin.Location = New System.Drawing.Point(15, 470) + Me.grpMargin.Margin = New System.Windows.Forms.Padding(4) Me.grpMargin.Name = "grpMargin" - Me.grpMargin.Size = New System.Drawing.Size(213, 40) + Me.grpMargin.Padding = New System.Windows.Forms.Padding(4) + Me.grpMargin.Size = New System.Drawing.Size(320, 60) Me.grpMargin.TabIndex = 13 Me.grpMargin.TabStop = False ' @@ -207,9 +220,10 @@ Partial Class dlgSummaryTables ' Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBoth.Location = New System.Drawing.Point(140, 17) + Me.rdoBoth.Location = New System.Drawing.Point(210, 26) + Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4) Me.rdoBoth.Name = "rdoBoth" - Me.rdoBoth.Size = New System.Drawing.Size(47, 17) + Me.rdoBoth.Size = New System.Drawing.Size(68, 24) Me.rdoBoth.TabIndex = 16 Me.rdoBoth.TabStop = True Me.rdoBoth.Text = "Both" @@ -219,9 +233,10 @@ Partial Class dlgSummaryTables ' Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummary.Location = New System.Drawing.Point(67, 17) + Me.rdoSummary.Location = New System.Drawing.Point(100, 26) + Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4) Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.Size = New System.Drawing.Size(68, 17) + Me.rdoSummary.Size = New System.Drawing.Size(101, 24) Me.rdoSummary.TabIndex = 16 Me.rdoSummary.TabStop = True Me.rdoSummary.Text = "Summary" @@ -231,9 +246,10 @@ Partial Class dlgSummaryTables ' Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoOuter.Location = New System.Drawing.Point(10, 17) + Me.rdoOuter.Location = New System.Drawing.Point(15, 26) + Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4) Me.rdoOuter.Name = "rdoOuter" - Me.rdoOuter.Size = New System.Drawing.Size(51, 17) + Me.rdoOuter.Size = New System.Drawing.Size(74, 24) Me.rdoOuter.TabIndex = 15 Me.rdoOuter.TabStop = True Me.rdoOuter.Text = "Outer" @@ -243,7 +259,8 @@ Partial Class dlgSummaryTables ' Me.ucrPnlMargin.AutoSize = True Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9) Me.ucrPnlMargin.Name = "ucrPnlMargin" Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) Me.ucrPnlMargin.TabIndex = 13 @@ -252,9 +269,10 @@ Partial Class dlgSummaryTables ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(159, 288) + Me.lblMarginName.Location = New System.Drawing.Point(238, 432) + Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(41, 13) + Me.lblMarginName.Size = New System.Drawing.Size(59, 20) Me.lblMarginName.TabIndex = 15 Me.lblMarginName.Text = "Name :" ' @@ -262,9 +280,10 @@ Partial Class dlgSummaryTables ' Me.lblVariables.AutoSize = True Me.lblVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblVariables.Location = New System.Drawing.Point(285, 162) + Me.lblVariables.Location = New System.Drawing.Point(428, 243) + Me.lblVariables.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblVariables.Name = "lblVariables" - Me.lblVariables.Size = New System.Drawing.Size(56, 13) + Me.lblVariables.Size = New System.Drawing.Size(83, 20) Me.lblVariables.TabIndex = 17 Me.lblVariables.Tag = "" Me.lblVariables.Text = "Variables :" @@ -272,9 +291,10 @@ Partial Class dlgSummaryTables 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(286, 464) + Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4) Me.cmdFormatTable.Name = "cmdFormatTable" - Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) + Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) Me.cmdFormatTable.TabIndex = 19 Me.cmdFormatTable.Text = "Format Table..." Me.cmdFormatTable.UseVisualStyleBackColor = True @@ -288,9 +308,10 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 7) + Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 10) + Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" - Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27) + Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40) Me.rdoFrequencyTable.TabIndex = 22 Me.rdoFrequencyTable.TabStop = True Me.rdoFrequencyTable.Text = "Frequency" @@ -305,9 +326,10 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 7) + Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 10) + Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4) Me.rdoSummaryTable.Name = "rdoSummaryTable" - Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27) + Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40) Me.rdoSummaryTable.TabIndex = 21 Me.rdoSummaryTable.TabStop = True Me.rdoSummaryTable.Text = "Summary" @@ -320,9 +342,11 @@ Partial Class dlgSummaryTables Me.grpPercentages.Controls.Add(Me.lblFactorsAsPercentage) Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpPercentages.Location = New System.Drawing.Point(286, 178) + Me.grpPercentages.Location = New System.Drawing.Point(429, 267) + Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4) Me.grpPercentages.Name = "grpPercentages" - Me.grpPercentages.Size = New System.Drawing.Size(174, 89) + Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4) + Me.grpPercentages.Size = New System.Drawing.Size(261, 134) Me.grpPercentages.TabIndex = 23 Me.grpPercentages.TabStop = False Me.grpPercentages.Text = "Percentages" @@ -331,11 +355,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverPercentages.AutoSize = True Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60) + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverPercentages.strNcFilePath = "" Me.ucrReceiverPercentages.TabIndex = 4 Me.ucrReceiverPercentages.ucrSelector = Nothing @@ -344,9 +368,10 @@ Partial Class dlgSummaryTables ' Me.lblFactorsAsPercentage.AutoSize = True Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44) + Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(27, 66) + Me.lblFactorsAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" - Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(100, 13) + Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(150, 20) Me.lblFactorsAsPercentage.TabIndex = 1 Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" Me.lblFactorsAsPercentage.Text = "of Factor (Optional):" @@ -355,36 +380,40 @@ Partial Class dlgSummaryTables ' Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171) + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 23) + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) Me.ucrChkPercentageProportion.TabIndex = 3 ' 'ucrChkDisplayAsPercentage ' Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 23) + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) Me.ucrChkDisplayAsPercentage.TabIndex = 0 ' 'lblFrequencyMarginName ' Me.lblFrequencyMarginName.AutoSize = True Me.lblFrequencyMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFrequencyMarginName.Location = New System.Drawing.Point(7, 275) + Me.lblFrequencyMarginName.Location = New System.Drawing.Point(10, 412) + Me.lblFrequencyMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFrequencyMarginName.Name = "lblFrequencyMarginName" - Me.lblFrequencyMarginName.Size = New System.Drawing.Size(76, 13) + Me.lblFrequencyMarginName.Size = New System.Drawing.Size(111, 20) Me.lblFrequencyMarginName.TabIndex = 25 Me.lblFrequencyMarginName.Text = "Margin Name :" ' 'cmdMissingOptions ' Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 261) + Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 392) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23) + Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34) Me.cmdMissingOptions.TabIndex = 27 Me.cmdMissingOptions.Text = "Options" Me.cmdMissingOptions.UseVisualStyleBackColor = True @@ -393,17 +422,19 @@ Partial Class dlgSummaryTables ' Me.ucrChkFrequencyDisplayMargins.AutoSize = True Me.ucrChkFrequencyDisplayMargins.Checked = False - Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 245) + Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(15, 368) + Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" - Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23) + Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34) Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 ' 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, 3) + Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(66, 4) + Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(9) Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables" - Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33) + Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(610, 50) Me.ucrPnlSummaryFrequencyTables.TabIndex = 20 ' 'ucrInputMarginName @@ -412,74 +443,80 @@ Partial Class dlgSummaryTables Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 285) + Me.ucrInputMarginName.Location = New System.Drawing.Point(309, 428) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) + Me.ucrInputMarginName.Size = New System.Drawing.Size(111, 32) Me.ucrInputMarginName.TabIndex = 16 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(10, 490) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Location = New System.Drawing.Point(15, 735) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24) + Me.ucrSaveTable.Size = New System.Drawing.Size(478, 36) Me.ucrSaveTable.TabIndex = 12 ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 266) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(15, 399) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(228, 34) Me.ucrChkOmitMissing.TabIndex = 9 ' 'ucrChkStoreResults ' Me.ucrChkStoreResults.AutoSize = True Me.ucrChkStoreResults.Checked = False - Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 219) + Me.ucrChkStoreResults.Location = New System.Drawing.Point(15, 328) + Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkStoreResults.Name = "ucrChkStoreResults" - Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23) + Me.ucrChkStoreResults.Size = New System.Drawing.Size(345, 34) Me.ucrChkStoreResults.TabIndex = 8 ' 'ucrChkDisplayMargins ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 287) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(15, 430) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23) + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) Me.ucrChkDisplayMargins.TabIndex = 10 ' 'ucrChkSummaries ' Me.ucrChkSummaries.AutoSize = True Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 244) + Me.ucrChkSummaries.Location = New System.Drawing.Point(15, 366) + Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkSummaries.Name = "ucrChkSummaries" - Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23) + Me.ucrChkSummaries.Size = New System.Drawing.Size(363, 34) Me.ucrChkSummaries.TabIndex = 7 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 517) + Me.ucrBase.Location = New System.Drawing.Point(15, 776) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.Size = New System.Drawing.Size(611, 77) Me.ucrBase.TabIndex = 14 ' 'ucrReceiverSummaryCols ' Me.ucrReceiverSummaryCols.AutoSize = True Me.ucrReceiverSummaryCols.frmParent = Me - Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(286, 178) + Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(429, 267) Me.ucrReceiverSummaryCols.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSummaryCols.Name = "ucrReceiverSummaryCols" Me.ucrReceiverSummaryCols.Selector = Nothing - Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(180, 150) Me.ucrReceiverSummaryCols.strNcFilePath = "" Me.ucrReceiverSummaryCols.TabIndex = 4 Me.ucrReceiverSummaryCols.ucrSelector = Nothing @@ -488,11 +525,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverFactors.AutoSize = True Me.ucrReceiverFactors.frmParent = Me - Me.ucrReceiverFactors.Location = New System.Drawing.Point(286, 59) + Me.ucrReceiverFactors.Location = New System.Drawing.Point(429, 88) Me.ucrReceiverFactors.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFactors.Name = "ucrReceiverFactors" Me.ucrReceiverFactors.Selector = Nothing - Me.ucrReceiverFactors.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverFactors.Size = New System.Drawing.Size(180, 150) Me.ucrReceiverFactors.strNcFilePath = "" Me.ucrReceiverFactors.TabIndex = 2 Me.ucrReceiverFactors.ucrSelector = Nothing @@ -501,11 +538,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverWeights.AutoSize = True Me.ucrReceiverWeights.frmParent = Me - Me.ucrReceiverWeights.Location = New System.Drawing.Point(109, 222) + Me.ucrReceiverWeights.Location = New System.Drawing.Point(164, 333) Me.ucrReceiverWeights.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWeights.Name = "ucrReceiverWeights" Me.ucrReceiverWeights.Selector = Nothing - Me.ucrReceiverWeights.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverWeights.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverWeights.strNcFilePath = "" Me.ucrReceiverWeights.TabIndex = 6 Me.ucrReceiverWeights.ucrSelector = Nothing @@ -514,9 +551,10 @@ Partial Class dlgSummaryTables ' Me.ucrChkWeight.AutoSize = True Me.ucrChkWeight.Checked = False - Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222) + Me.ucrChkWeight.Location = New System.Drawing.Point(15, 333) + Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkWeight.Name = "ucrChkWeight" - Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23) + Me.ucrChkWeight.Size = New System.Drawing.Size(126, 34) Me.ucrChkWeight.TabIndex = 5 ' 'ucrInputFrequencyMarginName @@ -525,9 +563,10 @@ Partial Class dlgSummaryTables Me.ucrInputFrequencyMarginName.AutoSize = True Me.ucrInputFrequencyMarginName.IsMultiline = False Me.ucrInputFrequencyMarginName.IsReadOnly = False - Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 271) + Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(138, 406) + Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(14) Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" - Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21) + Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(105, 32) Me.ucrInputFrequencyMarginName.TabIndex = 26 ' 'rdoMultipleResponse @@ -539,9 +578,10 @@ Partial Class dlgSummaryTables Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 7) + Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 10) + Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4) Me.rdoMultipleResponse.Name = "rdoMultipleResponse" - Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27) + Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40) Me.rdoMultipleResponse.TabIndex = 28 Me.rdoMultipleResponse.TabStop = True Me.rdoMultipleResponse.Text = "Multiple Response" @@ -552,9 +592,10 @@ Partial Class dlgSummaryTables 'ucrReorderSummary ' Me.ucrReorderSummary.AutoSize = True - Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305) + Me.ucrReorderSummary.Location = New System.Drawing.Point(429, 458) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9) Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156) + Me.ucrReorderSummary.Size = New System.Drawing.Size(300, 234) Me.ucrReorderSummary.TabIndex = 18 Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing @@ -565,10 +606,10 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False Me.ucrSelectorSummaryTables.bShowHiddenColumns = False Me.ucrSelectorSummaryTables.bUseCurrentFilter = True - Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 30) + Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(15, 45) Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables" - Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274) Me.ucrSelectorSummaryTables.TabIndex = 0 ' 'ucrNudSigFigs @@ -576,11 +617,12 @@ Partial Class dlgSummaryTables Me.ucrNudSigFigs.AutoSize = True Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356) + Me.ucrNudSigFigs.Location = New System.Drawing.Point(177, 534) + Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(9) Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Name = "ucrNudSigFigs" - Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSigFigs.Size = New System.Drawing.Size(75, 30) Me.ucrNudSigFigs.TabIndex = 30 Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -588,19 +630,48 @@ Partial Class dlgSummaryTables ' Me.lblSigFigs.AutoSize = True Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSigFigs.Location = New System.Drawing.Point(15, 359) + Me.lblSigFigs.Location = New System.Drawing.Point(22, 538) + Me.lblSigFigs.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSigFigs.Name = "lblSigFigs" - Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) + Me.lblSigFigs.Size = New System.Drawing.Size(144, 20) Me.lblSigFigs.TabIndex = 29 Me.lblSigFigs.Tag = "Significant_Figures:" Me.lblSigFigs.Text = "Significant Figures:" ' + 'ucrNudColFactors + ' + Me.ucrNudColFactors.AutoSize = True + Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudColFactors.Location = New System.Drawing.Point(178, 570) + Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColFactors.Name = "ucrNudColFactors" + Me.ucrNudColFactors.Size = New System.Drawing.Size(75, 30) + Me.ucrNudColFactors.TabIndex = 31 + Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblColumnFactors + ' + Me.lblColumnFactors.AutoSize = True + Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColumnFactors.Location = New System.Drawing.Point(35, 570) + Me.lblColumnFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblColumnFactors.Name = "lblColumnFactors" + Me.lblColumnFactors.Size = New System.Drawing.Size(125, 20) + Me.lblColumnFactors.TabIndex = 32 + Me.lblColumnFactors.Tag = "Significant_Figures:" + Me.lblColumnFactors.Text = "Column Factors:" + ' 'dlgSummaryTables ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(489, 571) + Me.ClientSize = New System.Drawing.Size(734, 856) + Me.Controls.Add(Me.lblColumnFactors) + Me.Controls.Add(Me.ucrNudColFactors) Me.Controls.Add(Me.ucrNudSigFigs) Me.Controls.Add(Me.lblSigFigs) Me.Controls.Add(Me.rdoMultipleResponse) @@ -633,6 +704,7 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.lblFrequencyMarginName) Me.Controls.Add(Me.ucrInputFrequencyMarginName) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSummaryTables" @@ -695,4 +767,6 @@ Partial Class dlgSummaryTables Friend WithEvents ucrPnlColumnFactor As UcrPanel Friend WithEvents ucrNudSigFigs As ucrNud Friend WithEvents lblSigFigs As Label + Friend WithEvents lblColumnFactors As Label + Friend WithEvents ucrNudColFactors As ucrNud End Class \ No newline at end of file diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index f69bfc8f878..07b45aeaca0 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -125,6 +125,10 @@ Public Class dlgSummaryTables ucrNudSigFigs.SetMinMax(0, 22) ucrNudSigFigs.SetRDefault(2) + ucrNudColFactors.SetLinkedDisplayControl(lblColumnFactors) + ucrNudColFactors.SetMinMax(iNewMin:=0) + ucrNudColFactors.Increment = 1 + ucrChkWeight.SetText("Weights") ucrChkWeight.SetParameter(ucrReceiverWeights.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) ucrChkWeight.AddToLinkedControls(ucrReceiverWeights, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -141,7 +145,7 @@ Public Class dlgSummaryTables ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayAsPercentage}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkSummaries}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayMargins}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins, ucrNudColFactors}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkOmitMissing}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrPnlColumnFactor}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) @@ -198,6 +202,7 @@ Public Class dlgSummaryTables ucrReceiverFactors.SetMeAsReceiver() ucrSelectorSummaryTables.Reset() ucrSaveTable.Reset() + ucrNudColFactors.SetText(1) ucrBase.clsRsyntax.GetBeforeCodes().Clear() @@ -259,6 +264,7 @@ Public Class dlgSummaryTables ucrChkStoreResults.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrChkStoreResults.GetParameter, iAdditionalPairNo:=1) ucrNudSigFigs.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) ucrReceiverFactors.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrReceiverFactors.GetParameter, iAdditionalPairNo:=1) + ucrNudColFactors.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrNudColFactors.GetParameter, iAdditionalPairNo:=1) ucrSelectorSummaryTables.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkOmitMissing.SetRCode(clsSummaryDefaultFunction, bReset) @@ -354,7 +360,7 @@ Public Class dlgSummaryTables TestOKEnabled() End Sub - Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged, + Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged, ucrNudColFactors.ControlValueChanged, ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, ucrReceiverColumnFactor.ControlValueChanged, ucrReceiverFactors.ControlValueChanged cmdSummaries.Visible = rdoSummaryTable.Checked @@ -380,32 +386,37 @@ Public Class dlgSummaryTables End If End If If bRCodeSet Then - If rdoNoColumnFactor.Checked Then - clsSummaryOperator.RemoveParameterByName("col_factor") - clsFrequencyOperator.RemoveParameterByName("col_factor") - clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) - Else - clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - If rdoFactorVariable.Checked Then - ucrReceiverColumnFactor.SetMeAsReceiver() - clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) - clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) - ElseIf rdoSummaryVariable.Checked Then - clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) - If rdoFrequencyTable.Checked Then - clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) - Else - If ucrChkSummaries.Checked Then - clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) + If rdoSummaryTable.Checked Then + If rdoNoColumnFactor.Checked Then + clsSummaryOperator.RemoveParameterByName("col_factor") + clsFrequencyOperator.RemoveParameterByName("col_factor") + clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) + Else + clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If rdoFactorVariable.Checked Then + ucrReceiverColumnFactor.SetMeAsReceiver() + clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) + clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) + ElseIf rdoSummaryVariable.Checked Then + clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) + If rdoFrequencyTable.Checked Then + varsString() + 'clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) Else - clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) + If ucrChkSummaries.Checked Then + clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) + Else + clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) + End If End If + ElseIf rdoVariable.Checked Then + clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) + clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) End If - ElseIf rdoVariable.Checked Then - clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) - clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) End If + Else + varsString() End If End If @@ -462,8 +473,8 @@ Public Class dlgSummaryTables Private Sub DialogueSize() If rdoFrequencyTable.Checked Then Me.Size = New Size(505, iDialogueXsize * 0.75) - Me.ucrNudSigFigs.Location = New Point(119, 304) - Me.lblSigFigs.Location = New Point(7, 307) + Me.ucrNudSigFigs.Location = New Point(119, 329) + Me.lblSigFigs.Location = New Point(7, 297) Me.ucrSaveTable.Location = New Point(10, 340) Me.ucrBase.Location = New Point(iUcrBaseXLocation, 370) Else @@ -475,6 +486,30 @@ Public Class dlgSummaryTables End If End Sub + Private Sub varsString() + ' Assuming ucrNud.Value gives the numeric value for how many variables to use + Dim numVars As Integer = ucrNudColFactors.Value + + ' Create a new list to store the selected variables + + ' Loop through the ucrReceiverFactors and get the first numVars items + Dim selectedVars As New List(Of String) + + Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() ' Get the list of variable names + + For i As Integer = 0 To varNames.Count - 1 + Dim varName As String = varNames(i) ' Access each variable name by index + selectedVars.Add(varName) ' Add it to the selectedVars list + Next + + ' Set the names_from argument in clsPivotWiderFunction using the selected variables + 'clsPivotWiderFunction.names_from = selectedVars + Dim varsString As String = String.Join(",", selectedVars) + + clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) + + End Sub + Private Sub AddingColumnFactor() Dim lstVariables As New List(Of String) Dim iXVarCount As Integer From 5693b2f2124c2b27c90953b40ade95478f88f0e4 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 24 Oct 2024 15:09:01 +0300 Subject: [PATCH 20/77] changes to the code --- instat/dlgSummaryTables.Designer.vb | 253 +++++++++++++--------------- instat/dlgSummaryTables.vb | 77 +++++---- 2 files changed, 155 insertions(+), 175 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index b43504a6db6..1a4e07e6d69 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -96,10 +96,9 @@ Partial Class dlgSummaryTables ' Me.lblFactors.AutoSize = True Me.lblFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactors.Location = New System.Drawing.Point(429, 64) - Me.lblFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFactors.Location = New System.Drawing.Point(286, 43) Me.lblFactors.Name = "lblFactors" - Me.lblFactors.Size = New System.Drawing.Size(71, 20) + Me.lblFactors.Size = New System.Drawing.Size(48, 13) Me.lblFactors.TabIndex = 1 Me.lblFactors.Tag = "Factors:" Me.lblFactors.Text = "Factors :" @@ -107,10 +106,9 @@ Partial Class dlgSummaryTables 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(429, 420) - Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4) + Me.cmdSummaries.Location = New System.Drawing.Point(286, 280) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(156, 34) + Me.cmdSummaries.Size = New System.Drawing.Size(104, 23) Me.cmdSummaries.TabIndex = 13 Me.cmdSummaries.Text = "Summaries..." Me.cmdSummaries.UseVisualStyleBackColor = True @@ -123,11 +121,9 @@ Partial Class dlgSummaryTables Me.grpDisplay.Controls.Add(Me.rdoFactorVariable) Me.grpDisplay.Controls.Add(Me.rdoNoColumnFactor) Me.grpDisplay.Controls.Add(Me.ucrPnlColumnFactor) - Me.grpDisplay.Location = New System.Drawing.Point(15, 568) - Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4) + Me.grpDisplay.Location = New System.Drawing.Point(10, 379) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4) - Me.grpDisplay.Size = New System.Drawing.Size(405, 154) + Me.grpDisplay.Size = New System.Drawing.Size(270, 103) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Display Column Factors" @@ -136,11 +132,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverColumnFactor.AutoSize = True Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(210, 52) + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(140, 35) Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" Me.ucrReceiverColumnFactor.Selector = Nothing - Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverColumnFactor.strNcFilePath = "" Me.ucrReceiverColumnFactor.TabIndex = 34 Me.ucrReceiverColumnFactor.ucrSelector = Nothing @@ -148,10 +144,9 @@ Partial Class dlgSummaryTables 'rdoVariable ' Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(21, 111) - Me.rdoVariable.Margin = New System.Windows.Forms.Padding(4) + Me.rdoVariable.Location = New System.Drawing.Point(14, 74) Me.rdoVariable.Name = "rdoVariable" - Me.rdoVariable.Size = New System.Drawing.Size(92, 24) + Me.rdoVariable.Size = New System.Drawing.Size(63, 17) Me.rdoVariable.TabIndex = 32 Me.rdoVariable.TabStop = True Me.rdoVariable.Text = "Variable" @@ -160,10 +155,9 @@ Partial Class dlgSummaryTables 'rdoSummaryVariable ' Me.rdoSummaryVariable.AutoSize = True - Me.rdoSummaryVariable.Location = New System.Drawing.Point(21, 82) - Me.rdoSummaryVariable.Margin = New System.Windows.Forms.Padding(4) + Me.rdoSummaryVariable.Location = New System.Drawing.Point(14, 55) Me.rdoSummaryVariable.Name = "rdoSummaryVariable" - Me.rdoSummaryVariable.Size = New System.Drawing.Size(164, 24) + Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17) Me.rdoSummaryVariable.TabIndex = 31 Me.rdoSummaryVariable.TabStop = True Me.rdoSummaryVariable.Text = "Summary-Variable" @@ -173,10 +167,9 @@ Partial Class dlgSummaryTables ' Me.rdoFactorVariable.AutoSize = True Me.rdoFactorVariable.Checked = True - Me.rdoFactorVariable.Location = New System.Drawing.Point(21, 54) - Me.rdoFactorVariable.Margin = New System.Windows.Forms.Padding(4) + Me.rdoFactorVariable.Location = New System.Drawing.Point(14, 36) Me.rdoFactorVariable.Name = "rdoFactorVariable" - Me.rdoFactorVariable.Size = New System.Drawing.Size(142, 24) + Me.rdoFactorVariable.Size = New System.Drawing.Size(96, 17) Me.rdoFactorVariable.TabIndex = 30 Me.rdoFactorVariable.TabStop = True Me.rdoFactorVariable.Text = "Factor Variable" @@ -185,10 +178,9 @@ Partial Class dlgSummaryTables 'rdoNoColumnFactor ' Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(21, 26) - Me.rdoNoColumnFactor.Margin = New System.Windows.Forms.Padding(4) + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(14, 17) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" - Me.rdoNoColumnFactor.Size = New System.Drawing.Size(162, 24) + Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) Me.rdoNoColumnFactor.TabIndex = 29 Me.rdoNoColumnFactor.Text = "No Column Factor" Me.rdoNoColumnFactor.UseVisualStyleBackColor = True @@ -196,10 +188,10 @@ Partial Class dlgSummaryTables 'ucrPnlColumnFactor ' Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(16, 26) - Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(11, 17) + Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(186, 120) + Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(124, 80) Me.ucrPnlColumnFactor.TabIndex = 29 ' 'grpMargin @@ -208,11 +200,9 @@ Partial Class dlgSummaryTables Me.grpMargin.Controls.Add(Me.rdoSummary) Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) - Me.grpMargin.Location = New System.Drawing.Point(15, 470) - Me.grpMargin.Margin = New System.Windows.Forms.Padding(4) + Me.grpMargin.Location = New System.Drawing.Point(10, 313) Me.grpMargin.Name = "grpMargin" - Me.grpMargin.Padding = New System.Windows.Forms.Padding(4) - Me.grpMargin.Size = New System.Drawing.Size(320, 60) + Me.grpMargin.Size = New System.Drawing.Size(213, 40) Me.grpMargin.TabIndex = 13 Me.grpMargin.TabStop = False ' @@ -220,10 +210,9 @@ Partial Class dlgSummaryTables ' Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBoth.Location = New System.Drawing.Point(210, 26) - Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4) + Me.rdoBoth.Location = New System.Drawing.Point(140, 17) Me.rdoBoth.Name = "rdoBoth" - Me.rdoBoth.Size = New System.Drawing.Size(68, 24) + Me.rdoBoth.Size = New System.Drawing.Size(47, 17) Me.rdoBoth.TabIndex = 16 Me.rdoBoth.TabStop = True Me.rdoBoth.Text = "Both" @@ -233,10 +222,9 @@ Partial Class dlgSummaryTables ' Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummary.Location = New System.Drawing.Point(100, 26) - Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4) + Me.rdoSummary.Location = New System.Drawing.Point(67, 17) Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.Size = New System.Drawing.Size(101, 24) + Me.rdoSummary.Size = New System.Drawing.Size(68, 17) Me.rdoSummary.TabIndex = 16 Me.rdoSummary.TabStop = True Me.rdoSummary.Text = "Summary" @@ -246,10 +234,9 @@ Partial Class dlgSummaryTables ' Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoOuter.Location = New System.Drawing.Point(15, 26) - Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4) + Me.rdoOuter.Location = New System.Drawing.Point(10, 17) Me.rdoOuter.Name = "rdoOuter" - Me.rdoOuter.Size = New System.Drawing.Size(74, 24) + Me.rdoOuter.Size = New System.Drawing.Size(51, 17) Me.rdoOuter.TabIndex = 15 Me.rdoOuter.TabStop = True Me.rdoOuter.Text = "Outer" @@ -259,8 +246,8 @@ Partial Class dlgSummaryTables ' Me.ucrPnlMargin.AutoSize = True Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) - Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrPnlMargin.Name = "ucrPnlMargin" Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) Me.ucrPnlMargin.TabIndex = 13 @@ -269,10 +256,9 @@ Partial Class dlgSummaryTables ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(238, 432) - Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblMarginName.Location = New System.Drawing.Point(159, 288) Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(59, 20) + Me.lblMarginName.Size = New System.Drawing.Size(41, 13) Me.lblMarginName.TabIndex = 15 Me.lblMarginName.Text = "Name :" ' @@ -280,10 +266,9 @@ Partial Class dlgSummaryTables ' Me.lblVariables.AutoSize = True Me.lblVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblVariables.Location = New System.Drawing.Point(428, 243) - Me.lblVariables.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblVariables.Location = New System.Drawing.Point(285, 162) Me.lblVariables.Name = "lblVariables" - Me.lblVariables.Size = New System.Drawing.Size(83, 20) + Me.lblVariables.Size = New System.Drawing.Size(56, 13) Me.lblVariables.TabIndex = 17 Me.lblVariables.Tag = "" Me.lblVariables.Text = "Variables :" @@ -291,10 +276,9 @@ Partial Class dlgSummaryTables 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696) - Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4) + Me.cmdFormatTable.Location = New System.Drawing.Point(286, 464) Me.cmdFormatTable.Name = "cmdFormatTable" - Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) + Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) Me.cmdFormatTable.TabIndex = 19 Me.cmdFormatTable.Text = "Format Table..." Me.cmdFormatTable.UseVisualStyleBackColor = True @@ -308,10 +292,9 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 10) - Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4) + Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 7) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" - Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40) + Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27) Me.rdoFrequencyTable.TabIndex = 22 Me.rdoFrequencyTable.TabStop = True Me.rdoFrequencyTable.Text = "Frequency" @@ -326,10 +309,9 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 10) - Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4) + Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 7) Me.rdoSummaryTable.Name = "rdoSummaryTable" - Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40) + Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27) Me.rdoSummaryTable.TabIndex = 21 Me.rdoSummaryTable.TabStop = True Me.rdoSummaryTable.Text = "Summary" @@ -342,11 +324,9 @@ Partial Class dlgSummaryTables Me.grpPercentages.Controls.Add(Me.lblFactorsAsPercentage) Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpPercentages.Location = New System.Drawing.Point(429, 267) - Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4) + Me.grpPercentages.Location = New System.Drawing.Point(286, 178) Me.grpPercentages.Name = "grpPercentages" - Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4) - Me.grpPercentages.Size = New System.Drawing.Size(261, 134) + Me.grpPercentages.Size = New System.Drawing.Size(174, 89) Me.grpPercentages.TabIndex = 23 Me.grpPercentages.TabStop = False Me.grpPercentages.Text = "Percentages" @@ -355,11 +335,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverPercentages.AutoSize = True Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60) Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverPercentages.strNcFilePath = "" Me.ucrReceiverPercentages.TabIndex = 4 Me.ucrReceiverPercentages.ucrSelector = Nothing @@ -368,10 +348,9 @@ Partial Class dlgSummaryTables ' Me.lblFactorsAsPercentage.AutoSize = True Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(27, 66) - Me.lblFactorsAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44) Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" - Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(150, 20) + Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(100, 13) Me.lblFactorsAsPercentage.TabIndex = 1 Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" Me.lblFactorsAsPercentage.Text = "of Factor (Optional):" @@ -380,40 +359,38 @@ Partial Class dlgSummaryTables ' Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 34) Me.ucrChkPercentageProportion.TabIndex = 3 ' 'ucrChkDisplayAsPercentage ' Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 34) Me.ucrChkDisplayAsPercentage.TabIndex = 0 ' 'lblFrequencyMarginName ' Me.lblFrequencyMarginName.AutoSize = True Me.lblFrequencyMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFrequencyMarginName.Location = New System.Drawing.Point(10, 412) - Me.lblFrequencyMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFrequencyMarginName.Location = New System.Drawing.Point(7, 275) Me.lblFrequencyMarginName.Name = "lblFrequencyMarginName" - Me.lblFrequencyMarginName.Size = New System.Drawing.Size(111, 20) + Me.lblFrequencyMarginName.Size = New System.Drawing.Size(76, 13) Me.lblFrequencyMarginName.TabIndex = 25 Me.lblFrequencyMarginName.Text = "Margin Name :" ' 'cmdMissingOptions ' Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 392) - Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 261) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34) + Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23) Me.cmdMissingOptions.TabIndex = 27 Me.cmdMissingOptions.Text = "Options" Me.cmdMissingOptions.UseVisualStyleBackColor = True @@ -422,19 +399,19 @@ Partial Class dlgSummaryTables ' Me.ucrChkFrequencyDisplayMargins.AutoSize = True Me.ucrChkFrequencyDisplayMargins.Checked = False - Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(15, 368) - Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 245) + Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" - Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34) + Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23) Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 ' 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(66, 4) - Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, 3) + Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables" - Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(610, 50) + Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33) Me.ucrPnlSummaryFrequencyTables.TabIndex = 20 ' 'ucrInputMarginName @@ -443,80 +420,80 @@ Partial Class dlgSummaryTables Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(309, 428) - Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 285) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(111, 32) + Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) Me.ucrInputMarginName.TabIndex = 16 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(15, 735) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrSaveTable.Location = New System.Drawing.Point(10, 490) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(478, 36) + Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24) Me.ucrSaveTable.TabIndex = 12 ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(15, 399) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 266) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(228, 34) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23) Me.ucrChkOmitMissing.TabIndex = 9 ' 'ucrChkStoreResults ' Me.ucrChkStoreResults.AutoSize = True Me.ucrChkStoreResults.Checked = False - Me.ucrChkStoreResults.Location = New System.Drawing.Point(15, 328) - Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 219) + Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkStoreResults.Name = "ucrChkStoreResults" - Me.ucrChkStoreResults.Size = New System.Drawing.Size(345, 34) + Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23) Me.ucrChkStoreResults.TabIndex = 8 ' 'ucrChkDisplayMargins ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(15, 430) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 287) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23) Me.ucrChkDisplayMargins.TabIndex = 10 ' 'ucrChkSummaries ' Me.ucrChkSummaries.AutoSize = True Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(15, 366) - Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 244) + Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkSummaries.Name = "ucrChkSummaries" - Me.ucrChkSummaries.Size = New System.Drawing.Size(363, 34) + Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23) Me.ucrChkSummaries.TabIndex = 7 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(15, 776) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) + Me.ucrBase.Location = New System.Drawing.Point(10, 517) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(611, 77) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 14 ' 'ucrReceiverSummaryCols ' Me.ucrReceiverSummaryCols.AutoSize = True Me.ucrReceiverSummaryCols.frmParent = Me - Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(429, 267) + Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(286, 178) Me.ucrReceiverSummaryCols.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSummaryCols.Name = "ucrReceiverSummaryCols" Me.ucrReceiverSummaryCols.Selector = Nothing - Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(180, 150) + Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverSummaryCols.strNcFilePath = "" Me.ucrReceiverSummaryCols.TabIndex = 4 Me.ucrReceiverSummaryCols.ucrSelector = Nothing @@ -525,11 +502,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverFactors.AutoSize = True Me.ucrReceiverFactors.frmParent = Me - Me.ucrReceiverFactors.Location = New System.Drawing.Point(429, 88) + Me.ucrReceiverFactors.Location = New System.Drawing.Point(286, 59) Me.ucrReceiverFactors.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFactors.Name = "ucrReceiverFactors" Me.ucrReceiverFactors.Selector = Nothing - Me.ucrReceiverFactors.Size = New System.Drawing.Size(180, 150) + Me.ucrReceiverFactors.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverFactors.strNcFilePath = "" Me.ucrReceiverFactors.TabIndex = 2 Me.ucrReceiverFactors.ucrSelector = Nothing @@ -538,11 +515,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverWeights.AutoSize = True Me.ucrReceiverWeights.frmParent = Me - Me.ucrReceiverWeights.Location = New System.Drawing.Point(164, 333) + Me.ucrReceiverWeights.Location = New System.Drawing.Point(109, 222) Me.ucrReceiverWeights.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWeights.Name = "ucrReceiverWeights" Me.ucrReceiverWeights.Selector = Nothing - Me.ucrReceiverWeights.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverWeights.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverWeights.strNcFilePath = "" Me.ucrReceiverWeights.TabIndex = 6 Me.ucrReceiverWeights.ucrSelector = Nothing @@ -551,10 +528,10 @@ Partial Class dlgSummaryTables ' Me.ucrChkWeight.AutoSize = True Me.ucrChkWeight.Checked = False - Me.ucrChkWeight.Location = New System.Drawing.Point(15, 333) - Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222) + Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkWeight.Name = "ucrChkWeight" - Me.ucrChkWeight.Size = New System.Drawing.Size(126, 34) + Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23) Me.ucrChkWeight.TabIndex = 5 ' 'ucrInputFrequencyMarginName @@ -563,10 +540,10 @@ Partial Class dlgSummaryTables Me.ucrInputFrequencyMarginName.AutoSize = True Me.ucrInputFrequencyMarginName.IsMultiline = False Me.ucrInputFrequencyMarginName.IsReadOnly = False - Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(138, 406) - Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 271) + Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" - Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(105, 32) + Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21) Me.ucrInputFrequencyMarginName.TabIndex = 26 ' 'rdoMultipleResponse @@ -578,10 +555,9 @@ Partial Class dlgSummaryTables Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 10) - Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4) + Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 7) Me.rdoMultipleResponse.Name = "rdoMultipleResponse" - Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40) + Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27) Me.rdoMultipleResponse.TabIndex = 28 Me.rdoMultipleResponse.TabStop = True Me.rdoMultipleResponse.Text = "Multiple Response" @@ -592,10 +568,10 @@ Partial Class dlgSummaryTables 'ucrReorderSummary ' Me.ucrReorderSummary.AutoSize = True - Me.ucrReorderSummary.Location = New System.Drawing.Point(429, 458) - Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9) + Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(300, 234) + Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156) Me.ucrReorderSummary.TabIndex = 18 Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing @@ -606,10 +582,10 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False Me.ucrSelectorSummaryTables.bShowHiddenColumns = False Me.ucrSelectorSummaryTables.bUseCurrentFilter = True - Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(15, 45) + Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 30) Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables" - Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274) + Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorSummaryTables.TabIndex = 0 ' 'ucrNudSigFigs @@ -617,12 +593,12 @@ Partial Class dlgSummaryTables Me.ucrNudSigFigs.AutoSize = True Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSigFigs.Location = New System.Drawing.Point(177, 534) - Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356) + Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Name = "ucrNudSigFigs" - Me.ucrNudSigFigs.Size = New System.Drawing.Size(75, 30) + Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20) Me.ucrNudSigFigs.TabIndex = 30 Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -630,10 +606,9 @@ Partial Class dlgSummaryTables ' Me.lblSigFigs.AutoSize = True Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSigFigs.Location = New System.Drawing.Point(22, 538) - Me.lblSigFigs.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSigFigs.Location = New System.Drawing.Point(15, 359) Me.lblSigFigs.Name = "lblSigFigs" - Me.lblSigFigs.Size = New System.Drawing.Size(144, 20) + Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) Me.lblSigFigs.TabIndex = 29 Me.lblSigFigs.Tag = "Significant_Figures:" Me.lblSigFigs.Text = "Significant Figures:" @@ -643,12 +618,12 @@ Partial Class dlgSummaryTables Me.ucrNudColFactors.AutoSize = True Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColFactors.Location = New System.Drawing.Point(178, 570) - Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudColFactors.Location = New System.Drawing.Point(119, 304) + Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Name = "ucrNudColFactors" - Me.ucrNudColFactors.Size = New System.Drawing.Size(75, 30) + Me.ucrNudColFactors.Size = New System.Drawing.Size(50, 20) Me.ucrNudColFactors.TabIndex = 31 Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -656,20 +631,19 @@ Partial Class dlgSummaryTables ' Me.lblColumnFactors.AutoSize = True Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(35, 570) - Me.lblColumnFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblColumnFactors.Location = New System.Drawing.Point(23, 307) Me.lblColumnFactors.Name = "lblColumnFactors" - Me.lblColumnFactors.Size = New System.Drawing.Size(125, 20) + Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) Me.lblColumnFactors.TabIndex = 32 Me.lblColumnFactors.Tag = "Significant_Figures:" Me.lblColumnFactors.Text = "Column Factors:" ' 'dlgSummaryTables ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(734, 856) + Me.ClientSize = New System.Drawing.Size(489, 467) Me.Controls.Add(Me.lblColumnFactors) Me.Controls.Add(Me.ucrNudColFactors) Me.Controls.Add(Me.ucrNudSigFigs) @@ -704,7 +678,6 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.lblFrequencyMarginName) Me.Controls.Add(Me.ucrInputFrequencyMarginName) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSummaryTables" diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 07b45aeaca0..9d858dc6f12 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -25,11 +25,12 @@ Public Class dlgSummaryTables Private clsSummaryDefaultFunction, clsFrequencyDefaultFunction As New RFunction Private bRCodeSet As Boolean = True Private clsPivotWiderFunction As New RFunction + Private ClsTabSpannerDelimFunction As New RFunction Private iUcrBaseXLocation, iDialogueXsize As Integer Private clsDummyFunction As New RFunction - Private clsSummaryOperator, clsFrequencyOperator, clsJoiningPipeOperator As New ROperator + Private clsSummaryOperator, clsFrequencyOperator, clsJoiningPipeOperator, clsSpannerOperator As New ROperator Private Sub dlgNewSummaryTables_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then @@ -194,10 +195,12 @@ Public Class dlgSummaryTables clsSummariesList = New RFunction clsDummyFunction = New RFunction clsPivotWiderFunction = New RFunction + ClsTabSpannerDelimFunction = New RFunction clsJoiningPipeOperator = New ROperator clsSummaryOperator = New ROperator clsFrequencyOperator = New ROperator + clsSpannerOperator = New ROperator ucrReceiverFactors.SetMeAsReceiver() ucrSelectorSummaryTables.Reset() @@ -233,15 +236,23 @@ Public Class dlgSummaryTables clsGtFunction.SetPackageName("gt") clsGtFunction.SetRCommand("gt") + ClsTabSpannerDelimFunction.SetPackageName("gt") + ClsTabSpannerDelimFunction.SetRCommand("tab_spanner_delim") + ClsTabSpannerDelimFunction.AddParameter("delim", Chr(34) & "_" & Chr(34)) + clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.bBrackets = False clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryDefaultFunction, iPosition:=0) clsSummaryOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=2) + clsSpannerOperator.SetOperation("%>%") + clsSpannerOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=0) + clsSpannerOperator.AddParameter("tableFun", clsRFunctionParameter:=ClsTabSpannerDelimFunction, iPosition:=2) + clsFrequencyOperator.SetOperation("%>%") clsFrequencyOperator.bBrackets = False clsFrequencyOperator.AddParameter("tableFun", clsRFunctionParameter:=clsFrequencyDefaultFunction, iPosition:=0) - clsFrequencyOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=2) + clsFrequencyOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=2) clsJoiningPipeOperator.SetOperation("%>%") clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) @@ -386,13 +397,12 @@ Public Class dlgSummaryTables End If End If If bRCodeSet Then - If rdoSummaryTable.Checked Then - If rdoNoColumnFactor.Checked Then - clsSummaryOperator.RemoveParameterByName("col_factor") - clsFrequencyOperator.RemoveParameterByName("col_factor") - clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) - Else - clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If rdoNoColumnFactor.Checked Then + clsSummaryOperator.RemoveParameterByName("col_factor") + clsFrequencyOperator.RemoveParameterByName("col_factor") + clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) + Else + clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) If rdoFactorVariable.Checked Then ucrReceiverColumnFactor.SetMeAsReceiver() @@ -400,11 +410,10 @@ Public Class dlgSummaryTables clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) ElseIf rdoSummaryVariable.Checked Then clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) - If rdoFrequencyTable.Checked Then - varsString() - 'clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) - Else - If ucrChkSummaries.Checked Then + If rdoFrequencyTable.Checked Then + varsString() + Else + If ucrChkSummaries.Checked Then clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) Else clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) @@ -415,10 +424,7 @@ Public Class dlgSummaryTables clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) End If End If - Else - varsString() End If - End If If rdoVariable.Checked Then If Not ucrChkSummaries.Checked Then @@ -429,6 +435,7 @@ Public Class dlgSummaryTables End If AddingColumnFactor() DialogueSize() + varsString() End Sub Private Sub FillListView() @@ -473,8 +480,8 @@ Public Class dlgSummaryTables Private Sub DialogueSize() If rdoFrequencyTable.Checked Then Me.Size = New Size(505, iDialogueXsize * 0.75) - Me.ucrNudSigFigs.Location = New Point(119, 329) - Me.lblSigFigs.Location = New Point(7, 297) + Me.ucrNudSigFigs.Location = New Point(119, 274) + Me.lblSigFigs.Location = New Point(7, 277) Me.ucrSaveTable.Location = New Point(10, 340) Me.ucrBase.Location = New Point(iUcrBaseXLocation, 370) Else @@ -487,27 +494,27 @@ Public Class dlgSummaryTables End Sub Private Sub varsString() - ' Assuming ucrNud.Value gives the numeric value for how many variables to use - Dim numVars As Integer = ucrNudColFactors.Value - - ' Create a new list to store the selected variables - - ' Loop through the ucrReceiverFactors and get the first numVars items - Dim selectedVars As New List(Of String) + If rdoFrequencyTable.Checked Then + ' Get the number of variables to use from ucrNudColFactors + Dim numVars As Integer = ucrNudColFactors.Value - Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() ' Get the list of variable names + ' Get the list of selected variable names from ucrReceiverFactors + Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() - For i As Integer = 0 To varNames.Count - 1 - Dim varName As String = varNames(i) ' Access each variable name by index - selectedVars.Add(varName) ' Add it to the selectedVars list - Next + ' Create a new list to store the selected variables + Dim selectedVars As New List(Of String) - ' Set the names_from argument in clsPivotWiderFunction using the selected variables - 'clsPivotWiderFunction.names_from = selectedVars - Dim varsString As String = String.Join(",", selectedVars) + ' Loop through the ucrReceiverFactors and get only the first numVars items + For i As Integer = 0 To Math.Min(numVars, varNames.Count) - 1 + selectedVars.Add(varNames(i)) ' Add the variable name to selectedVars + Next - clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) + ' Create a comma-separated string from the selected variables + Dim varsString As String = "c(" & String.Join(",", selectedVars) & ")" + ' Pass the selected variables to the clsPivotWiderFunction's names_from parameter + clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) + End If End Sub Private Sub AddingColumnFactor() From 4c0de1299a519626169c04d10d6e6710cd981f8e Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 25 Oct 2024 17:22:38 +0300 Subject: [PATCH 21/77] changes --- instat/dlgSummaryTables.Designer.vb | 102 ++++++++++++++++------------ instat/dlgSummaryTables.resx | 3 + instat/dlgSummaryTables.vb | 85 +++++++++++++++-------- 3 files changed, 117 insertions(+), 73 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index 1a4e07e6d69..cf34c2a82fd 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -87,6 +87,7 @@ Partial Class dlgSummaryTables Me.lblSigFigs = New System.Windows.Forms.Label() Me.ucrNudColFactors = New instat.ucrNud() Me.lblColumnFactors = New System.Windows.Forms.Label() + Me.btnMoreOptions = New System.Windows.Forms.Button() Me.grpDisplay.SuspendLayout() Me.grpMargin.SuspendLayout() Me.grpPercentages.SuspendLayout() @@ -121,7 +122,7 @@ Partial Class dlgSummaryTables Me.grpDisplay.Controls.Add(Me.rdoFactorVariable) Me.grpDisplay.Controls.Add(Me.rdoNoColumnFactor) Me.grpDisplay.Controls.Add(Me.ucrPnlColumnFactor) - Me.grpDisplay.Location = New System.Drawing.Point(10, 379) + Me.grpDisplay.Location = New System.Drawing.Point(10, 398) Me.grpDisplay.Name = "grpDisplay" Me.grpDisplay.Size = New System.Drawing.Size(270, 103) Me.grpDisplay.TabIndex = 11 @@ -132,7 +133,7 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverColumnFactor.AutoSize = True Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(140, 35) + Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(140, 54) Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" Me.ucrReceiverColumnFactor.Selector = Nothing @@ -144,7 +145,7 @@ Partial Class dlgSummaryTables 'rdoVariable ' Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(14, 74) + Me.rdoVariable.Location = New System.Drawing.Point(14, 93) Me.rdoVariable.Name = "rdoVariable" Me.rdoVariable.Size = New System.Drawing.Size(63, 17) Me.rdoVariable.TabIndex = 32 @@ -155,7 +156,7 @@ Partial Class dlgSummaryTables 'rdoSummaryVariable ' Me.rdoSummaryVariable.AutoSize = True - Me.rdoSummaryVariable.Location = New System.Drawing.Point(14, 55) + Me.rdoSummaryVariable.Location = New System.Drawing.Point(14, 74) Me.rdoSummaryVariable.Name = "rdoSummaryVariable" Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17) Me.rdoSummaryVariable.TabIndex = 31 @@ -167,7 +168,7 @@ Partial Class dlgSummaryTables ' Me.rdoFactorVariable.AutoSize = True Me.rdoFactorVariable.Checked = True - Me.rdoFactorVariable.Location = New System.Drawing.Point(14, 36) + Me.rdoFactorVariable.Location = New System.Drawing.Point(14, 55) Me.rdoFactorVariable.Name = "rdoFactorVariable" Me.rdoFactorVariable.Size = New System.Drawing.Size(96, 17) Me.rdoFactorVariable.TabIndex = 30 @@ -178,7 +179,7 @@ Partial Class dlgSummaryTables 'rdoNoColumnFactor ' Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(14, 17) + Me.rdoNoColumnFactor.Location = New System.Drawing.Point(14, 36) Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) Me.rdoNoColumnFactor.TabIndex = 29 @@ -189,7 +190,7 @@ Partial Class dlgSummaryTables ' Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(11, 17) - Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(124, 80) Me.ucrPnlColumnFactor.TabIndex = 29 @@ -200,7 +201,7 @@ Partial Class dlgSummaryTables Me.grpMargin.Controls.Add(Me.rdoSummary) Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) - Me.grpMargin.Location = New System.Drawing.Point(10, 313) + Me.grpMargin.Location = New System.Drawing.Point(10, 320) Me.grpMargin.Name = "grpMargin" Me.grpMargin.Size = New System.Drawing.Size(213, 40) Me.grpMargin.TabIndex = 13 @@ -210,7 +211,7 @@ Partial Class dlgSummaryTables ' Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBoth.Location = New System.Drawing.Point(140, 17) + Me.rdoBoth.Location = New System.Drawing.Point(140, 24) Me.rdoBoth.Name = "rdoBoth" Me.rdoBoth.Size = New System.Drawing.Size(47, 17) Me.rdoBoth.TabIndex = 16 @@ -222,7 +223,7 @@ Partial Class dlgSummaryTables ' Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummary.Location = New System.Drawing.Point(67, 17) + Me.rdoSummary.Location = New System.Drawing.Point(67, 24) Me.rdoSummary.Name = "rdoSummary" Me.rdoSummary.Size = New System.Drawing.Size(68, 17) Me.rdoSummary.TabIndex = 16 @@ -234,7 +235,7 @@ Partial Class dlgSummaryTables ' Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoOuter.Location = New System.Drawing.Point(10, 17) + Me.rdoOuter.Location = New System.Drawing.Point(10, 24) Me.rdoOuter.Name = "rdoOuter" Me.rdoOuter.Size = New System.Drawing.Size(51, 17) Me.rdoOuter.TabIndex = 15 @@ -247,7 +248,7 @@ Partial Class dlgSummaryTables Me.ucrPnlMargin.AutoSize = True Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlMargin.Name = "ucrPnlMargin" Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) Me.ucrPnlMargin.TabIndex = 13 @@ -256,7 +257,7 @@ Partial Class dlgSummaryTables ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(159, 288) + Me.lblMarginName.Location = New System.Drawing.Point(159, 301) Me.lblMarginName.Name = "lblMarginName" Me.lblMarginName.Size = New System.Drawing.Size(41, 13) Me.lblMarginName.TabIndex = 15 @@ -292,7 +293,7 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 7) + Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 0) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27) Me.rdoFrequencyTable.TabIndex = 22 @@ -309,7 +310,7 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 7) + Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 0) Me.rdoSummaryTable.Name = "rdoSummaryTable" Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27) Me.rdoSummaryTable.TabIndex = 21 @@ -360,7 +361,7 @@ Partial Class dlgSummaryTables Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 34) Me.ucrChkPercentageProportion.TabIndex = 3 @@ -370,7 +371,7 @@ Partial Class dlgSummaryTables Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 34) Me.ucrChkDisplayAsPercentage.TabIndex = 0 @@ -388,7 +389,7 @@ Partial Class dlgSummaryTables 'cmdMissingOptions ' Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 261) + Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 271) Me.cmdMissingOptions.Name = "cmdMissingOptions" Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23) Me.cmdMissingOptions.TabIndex = 27 @@ -399,8 +400,8 @@ Partial Class dlgSummaryTables ' Me.ucrChkFrequencyDisplayMargins.AutoSize = True Me.ucrChkFrequencyDisplayMargins.Checked = False - Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 245) - Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 255) + Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23) Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 @@ -408,8 +409,8 @@ Partial Class dlgSummaryTables 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, 3) - Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, -4) + Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables" Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33) Me.ucrPnlSummaryFrequencyTables.TabIndex = 20 @@ -420,8 +421,8 @@ Partial Class dlgSummaryTables Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 285) - Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 298) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputMarginName.Name = "ucrInputMarginName" Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) Me.ucrInputMarginName.TabIndex = 16 @@ -439,8 +440,8 @@ Partial Class dlgSummaryTables ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 266) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 276) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23) Me.ucrChkOmitMissing.TabIndex = 9 @@ -449,8 +450,8 @@ Partial Class dlgSummaryTables ' Me.ucrChkStoreResults.AutoSize = True Me.ucrChkStoreResults.Checked = False - Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 219) - Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 233) + Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkStoreResults.Name = "ucrChkStoreResults" Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23) Me.ucrChkStoreResults.TabIndex = 8 @@ -459,8 +460,8 @@ Partial Class dlgSummaryTables ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 287) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 300) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23) Me.ucrChkDisplayMargins.TabIndex = 10 @@ -469,8 +470,8 @@ Partial Class dlgSummaryTables ' Me.ucrChkSummaries.AutoSize = True Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 244) - Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 254) + Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkSummaries.Name = "ucrChkSummaries" Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23) Me.ucrChkSummaries.TabIndex = 7 @@ -480,7 +481,7 @@ Partial Class dlgSummaryTables Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrBase.Location = New System.Drawing.Point(10, 517) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 14 @@ -529,7 +530,7 @@ Partial Class dlgSummaryTables Me.ucrChkWeight.AutoSize = True Me.ucrChkWeight.Checked = False Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222) - Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkWeight.Name = "ucrChkWeight" Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23) Me.ucrChkWeight.TabIndex = 5 @@ -540,8 +541,8 @@ Partial Class dlgSummaryTables Me.ucrInputFrequencyMarginName.AutoSize = True Me.ucrInputFrequencyMarginName.IsMultiline = False Me.ucrInputFrequencyMarginName.IsReadOnly = False - Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 271) - Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 281) + Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21) Me.ucrInputFrequencyMarginName.TabIndex = 26 @@ -555,7 +556,7 @@ Partial Class dlgSummaryTables Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 7) + Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 0) Me.rdoMultipleResponse.Name = "rdoMultipleResponse" Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27) Me.rdoMultipleResponse.TabIndex = 28 @@ -569,7 +570,7 @@ Partial Class dlgSummaryTables ' Me.ucrReorderSummary.AutoSize = True Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305) - Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(6) Me.ucrReorderSummary.Name = "ucrReorderSummary" Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156) Me.ucrReorderSummary.TabIndex = 18 @@ -582,7 +583,7 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False Me.ucrSelectorSummaryTables.bShowHiddenColumns = False Me.ucrSelectorSummaryTables.bUseCurrentFilter = True - Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 30) + Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 24) Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables" Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183) @@ -594,7 +595,7 @@ Partial Class dlgSummaryTables Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356) - Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Name = "ucrNudSigFigs" @@ -618,8 +619,8 @@ Partial Class dlgSummaryTables Me.ucrNudColFactors.AutoSize = True Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColFactors.Location = New System.Drawing.Point(119, 304) - Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudColFactors.Location = New System.Drawing.Point(119, 334) + Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Name = "ucrNudColFactors" @@ -631,26 +632,35 @@ Partial Class dlgSummaryTables ' Me.lblColumnFactors.AutoSize = True Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(23, 307) + Me.lblColumnFactors.Location = New System.Drawing.Point(23, 337) Me.lblColumnFactors.Name = "lblColumnFactors" Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) Me.lblColumnFactors.TabIndex = 32 Me.lblColumnFactors.Tag = "Significant_Figures:" Me.lblColumnFactors.Text = "Column Factors:" ' + 'btnMoreOptions + ' + Me.btnMoreOptions.Location = New System.Drawing.Point(10, 207) + Me.btnMoreOptions.Name = "btnMoreOptions" + Me.btnMoreOptions.Size = New System.Drawing.Size(141, 21) + Me.btnMoreOptions.TabIndex = 33 + Me.btnMoreOptions.Text = "Table Options" + Me.btnMoreOptions.UseVisualStyleBackColor = True + ' 'dlgSummaryTables ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(489, 467) + Me.ClientSize = New System.Drawing.Size(489, 487) + Me.Controls.Add(Me.btnMoreOptions) Me.Controls.Add(Me.lblColumnFactors) Me.Controls.Add(Me.ucrNudColFactors) Me.Controls.Add(Me.ucrNudSigFigs) Me.Controls.Add(Me.lblSigFigs) Me.Controls.Add(Me.rdoMultipleResponse) Me.Controls.Add(Me.cmdMissingOptions) - Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins) Me.Controls.Add(Me.grpPercentages) Me.Controls.Add(Me.rdoFrequencyTable) Me.Controls.Add(Me.rdoSummaryTable) @@ -677,6 +687,7 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.grpMargin) Me.Controls.Add(Me.lblFrequencyMarginName) Me.Controls.Add(Me.ucrInputFrequencyMarginName) + Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -742,4 +753,5 @@ Partial Class dlgSummaryTables Friend WithEvents lblSigFigs As Label Friend WithEvents lblColumnFactors As Label Friend WithEvents ucrNudColFactors As ucrNud + Friend WithEvents btnMoreOptions As Button End Class \ No newline at end of file diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx index c838926ad7f..c776d802beb 100644 --- a/instat/dlgSummaryTables.resx +++ b/instat/dlgSummaryTables.resx @@ -123,4 +123,7 @@ 17, 17 + + 17, 17 + \ No newline at end of file diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 9d858dc6f12..c8c80e91c8c 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -48,6 +48,8 @@ Public Class dlgSummaryTables End Sub Private Sub InitialiseDialog() + 'Dim Maxval As Integer = ucrReceiverFactors.GetVariableNames().Count() + ucrBase.clsRsyntax.iCallType = 2 ucrBase.iHelpTopicID = 426 ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False @@ -127,8 +129,6 @@ Public Class dlgSummaryTables ucrNudSigFigs.SetRDefault(2) ucrNudColFactors.SetLinkedDisplayControl(lblColumnFactors) - ucrNudColFactors.SetMinMax(iNewMin:=0) - ucrNudColFactors.Increment = 1 ucrChkWeight.SetText("Weights") ucrChkWeight.SetParameter(ucrReceiverWeights.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) @@ -205,7 +205,7 @@ Public Class dlgSummaryTables ucrReceiverFactors.SetMeAsReceiver() ucrSelectorSummaryTables.Reset() ucrSaveTable.Reset() - ucrNudColFactors.SetText(1) + 'ucrNudColFactors.SetText(1) ucrBase.clsRsyntax.GetBeforeCodes().Clear() @@ -258,6 +258,7 @@ Public Class dlgSummaryTables clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, @@ -275,7 +276,6 @@ Public Class dlgSummaryTables ucrChkStoreResults.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrChkStoreResults.GetParameter, iAdditionalPairNo:=1) ucrNudSigFigs.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) ucrReceiverFactors.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrReceiverFactors.GetParameter, iAdditionalPairNo:=1) - ucrNudColFactors.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrNudColFactors.GetParameter, iAdditionalPairNo:=1) ucrSelectorSummaryTables.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkOmitMissing.SetRCode(clsSummaryDefaultFunction, bReset) @@ -293,6 +293,7 @@ Public Class dlgSummaryTables If bReset Then ucrReceiverSummaryCols.SetRCode(clsSummaryDefaultFunction, bReset) ucrReceiverFactors.SetRCode(clsSummaryDefaultFunction, bReset) + ucrNudColFactors.SetRCode(clsFrequencyDefaultFunction, bReset) End If bRCodeSet = True FillListView() @@ -316,7 +317,11 @@ Public Class dlgSummaryTables End If End Sub + Private Sub btnMoreOptions_Click(sender As Object, e As EventArgs) Handles btnMoreOptions.Click + sdgTableOptions.Setup(ucrSelectorSummaryTables.strCurrentDataFrame, clsJoiningPipeOperator) + sdgTableOptions.ShowDialog(Me) + End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() SetRCodeForControls(True) @@ -403,28 +408,28 @@ Public Class dlgSummaryTables clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) Else clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - If rdoFactorVariable.Checked Then - ucrReceiverColumnFactor.SetMeAsReceiver() - clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) - clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) - ElseIf rdoSummaryVariable.Checked Then - clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) + clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If rdoFactorVariable.Checked Then + ucrReceiverColumnFactor.SetMeAsReceiver() + clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) + clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) + ElseIf rdoSummaryVariable.Checked Then + clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) If rdoFrequencyTable.Checked Then varsString() Else If ucrChkSummaries.Checked Then - clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) - Else - clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) - End If + clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) + Else + clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) End If - ElseIf rdoVariable.Checked Then - clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) - clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) End If + ElseIf rdoVariable.Checked Then + clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) + clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) End If End If + End If If rdoVariable.Checked Then If Not ucrChkSummaries.Checked Then @@ -479,17 +484,17 @@ Public Class dlgSummaryTables Private Sub DialogueSize() If rdoFrequencyTable.Checked Then - Me.Size = New Size(505, iDialogueXsize * 0.75) - Me.ucrNudSigFigs.Location = New Point(119, 274) - Me.lblSigFigs.Location = New Point(7, 277) - Me.ucrSaveTable.Location = New Point(10, 340) - Me.ucrBase.Location = New Point(iUcrBaseXLocation, 370) + Me.Size = New Size(505, iDialogueXsize * 0.6) + Me.ucrNudSigFigs.Location = New Point(119, 309) + Me.lblSigFigs.Location = New Point(7, 312) + Me.ucrSaveTable.Location = New Point(10, 360) + Me.ucrBase.Location = New Point(iUcrBaseXLocation, 390) Else Me.Size = New Size(505, iDialogueXsize) - Me.ucrNudSigFigs.Location = New Point(119, 356) - Me.lblSigFigs.Location = New Point(7, 359) - Me.ucrSaveTable.Location = New Point(10, 495) - Me.ucrBase.Location = New Point(iUcrBaseXLocation, 524) + Me.ucrNudSigFigs.Location = New Point(119, 376) + Me.lblSigFigs.Location = New Point(7, 379) + Me.ucrSaveTable.Location = New Point(10, 520) + Me.ucrBase.Location = New Point(iUcrBaseXLocation, 544) End If End Sub @@ -517,6 +522,31 @@ Public Class dlgSummaryTables End If End Sub + Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged + ' Get the total count of selected variables in the ucrReceiverFactors + Dim selectedVariables As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control + Dim selectedCount As Integer = selectedVariables.Count + ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables + If selectedCount > 0 Then + ' Set Maximum based on the number of variables in the receiver + ucrNudColFactors.Maximum = selectedCount + + ' Ensure the current Value does not exceed the Maximum + If ucrNudColFactors.Value > selectedCount Then + ucrNudColFactors.Value = selectedCount ' Adjust value to the max if it exceeds + End If + + ' Set Minimum (if applicable) + ucrNudColFactors.Minimum = 1 + + Else + ' If no variables are selected, set Minimum, Maximum, and Value to 1 + ucrNudColFactors.Minimum = 1 + ucrNudColFactors.Maximum = 1 + ucrNudColFactors.Value = 1 + End If + End Sub + Private Sub AddingColumnFactor() Dim lstVariables As New List(Of String) Dim iXVarCount As Integer @@ -543,5 +573,4 @@ Public Class dlgSummaryTables End If End If End Sub - End Class From 087a423f1c6d50997009c6d283510342680760d0 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 28 Oct 2024 09:08:14 +0300 Subject: [PATCH 22/77] changes --- instat/dlgSummaryTables.Designer.vb | 2 +- instat/dlgSummaryTables.resx | 5 +---- instat/dlgSummaryTables.vb | 5 +++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index cf34c2a82fd..8be3219286d 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -127,7 +127,7 @@ Partial Class dlgSummaryTables Me.grpDisplay.Size = New System.Drawing.Size(270, 103) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False - Me.grpDisplay.Text = "Display Column Factors" + Me.grpDisplay.Text = "Layout" ' 'ucrReceiverColumnFactor ' diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx index c776d802beb..b97a603004a 100644 --- a/instat/dlgSummaryTables.resx +++ b/instat/dlgSummaryTables.resx @@ -118,10 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 52 - - - 17, 17 + 25 17, 17 diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index c8c80e91c8c..0af996a49fa 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -83,7 +83,7 @@ Public Class dlgSummaryTables ucrReceiverPercentages.SetDataType("factor") ' TODO data this accepts must be in the other receiver too ucrReceiverPercentages.SetLinkedDisplayControl(lblFactorsAsPercentage) - ucrChkStoreResults.SetText("Store Output") + ucrChkStoreResults.SetText("Store Summaries") ucrChkStoreResults.SetParameter(New RParameter("store_table", 4)) ucrChkStoreResults.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkStoreResults.SetRDefault("FALSE") @@ -122,7 +122,8 @@ Public Class dlgSummaryTables ucrChkSummaries.SetParameter(New RParameter("treat_columns_as_factor", 8)) ucrChkSummaries.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkSummaries.SetText("Treat Summaries as a Further Factor") + ucrChkSummaries.SetText("Drop Unused Levels") + ucrChkSummaries.Enabled = False ucrNudSigFigs.SetParameter(New RParameter("signif_fig", 9)) ucrNudSigFigs.SetMinMax(0, 22) From 294df81967e46a4b647cd2b915eb662822be3a14 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 28 Oct 2024 09:48:05 +0300 Subject: [PATCH 23/77] changes --- instat/dlgSummaryTables.Designer.vb | 70 ----------------------------- instat/dlgSummaryTables.vb | 20 ++++----- 2 files changed, 10 insertions(+), 80 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index 8be3219286d..e48a0496e4d 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -42,12 +42,7 @@ Partial Class dlgSummaryTables Me.lblFactors = New System.Windows.Forms.Label() Me.cmdSummaries = New System.Windows.Forms.Button() Me.grpDisplay = New System.Windows.Forms.GroupBox() - Me.ucrReceiverColumnFactor = New instat.ucrReceiverSingle() Me.rdoVariable = New System.Windows.Forms.RadioButton() - Me.rdoSummaryVariable = New System.Windows.Forms.RadioButton() - Me.rdoFactorVariable = New System.Windows.Forms.RadioButton() - Me.rdoNoColumnFactor = New System.Windows.Forms.RadioButton() - Me.ucrPnlColumnFactor = New instat.UcrPanel() Me.grpMargin = New System.Windows.Forms.GroupBox() Me.rdoBoth = New System.Windows.Forms.RadioButton() Me.rdoSummary = New System.Windows.Forms.RadioButton() @@ -116,12 +111,7 @@ Partial Class dlgSummaryTables ' 'grpDisplay ' - Me.grpDisplay.Controls.Add(Me.ucrReceiverColumnFactor) Me.grpDisplay.Controls.Add(Me.rdoVariable) - Me.grpDisplay.Controls.Add(Me.rdoSummaryVariable) - Me.grpDisplay.Controls.Add(Me.rdoFactorVariable) - Me.grpDisplay.Controls.Add(Me.rdoNoColumnFactor) - Me.grpDisplay.Controls.Add(Me.ucrPnlColumnFactor) Me.grpDisplay.Location = New System.Drawing.Point(10, 398) Me.grpDisplay.Name = "grpDisplay" Me.grpDisplay.Size = New System.Drawing.Size(270, 103) @@ -129,19 +119,6 @@ Partial Class dlgSummaryTables Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Layout" ' - 'ucrReceiverColumnFactor - ' - Me.ucrReceiverColumnFactor.AutoSize = True - Me.ucrReceiverColumnFactor.frmParent = Me - Me.ucrReceiverColumnFactor.Location = New System.Drawing.Point(140, 54) - Me.ucrReceiverColumnFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverColumnFactor.Name = "ucrReceiverColumnFactor" - Me.ucrReceiverColumnFactor.Selector = Nothing - Me.ucrReceiverColumnFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverColumnFactor.strNcFilePath = "" - Me.ucrReceiverColumnFactor.TabIndex = 34 - Me.ucrReceiverColumnFactor.ucrSelector = Nothing - ' 'rdoVariable ' Me.rdoVariable.AutoSize = True @@ -153,48 +130,6 @@ Partial Class dlgSummaryTables Me.rdoVariable.Text = "Variable" Me.rdoVariable.UseVisualStyleBackColor = True ' - 'rdoSummaryVariable - ' - Me.rdoSummaryVariable.AutoSize = True - Me.rdoSummaryVariable.Location = New System.Drawing.Point(14, 74) - Me.rdoSummaryVariable.Name = "rdoSummaryVariable" - Me.rdoSummaryVariable.Size = New System.Drawing.Size(109, 17) - Me.rdoSummaryVariable.TabIndex = 31 - Me.rdoSummaryVariable.TabStop = True - Me.rdoSummaryVariable.Text = "Summary-Variable" - Me.rdoSummaryVariable.UseVisualStyleBackColor = True - ' - 'rdoFactorVariable - ' - Me.rdoFactorVariable.AutoSize = True - Me.rdoFactorVariable.Checked = True - Me.rdoFactorVariable.Location = New System.Drawing.Point(14, 55) - Me.rdoFactorVariable.Name = "rdoFactorVariable" - Me.rdoFactorVariable.Size = New System.Drawing.Size(96, 17) - Me.rdoFactorVariable.TabIndex = 30 - Me.rdoFactorVariable.TabStop = True - Me.rdoFactorVariable.Text = "Factor Variable" - Me.rdoFactorVariable.UseVisualStyleBackColor = True - ' - 'rdoNoColumnFactor - ' - Me.rdoNoColumnFactor.AutoSize = True - Me.rdoNoColumnFactor.Location = New System.Drawing.Point(14, 36) - Me.rdoNoColumnFactor.Name = "rdoNoColumnFactor" - Me.rdoNoColumnFactor.Size = New System.Drawing.Size(110, 17) - Me.rdoNoColumnFactor.TabIndex = 29 - Me.rdoNoColumnFactor.Text = "No Column Factor" - Me.rdoNoColumnFactor.UseVisualStyleBackColor = True - ' - 'ucrPnlColumnFactor - ' - Me.ucrPnlColumnFactor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumnFactor.Location = New System.Drawing.Point(11, 17) - Me.ucrPnlColumnFactor.Margin = New System.Windows.Forms.Padding(6) - Me.ucrPnlColumnFactor.Name = "ucrPnlColumnFactor" - Me.ucrPnlColumnFactor.Size = New System.Drawing.Size(124, 80) - Me.ucrPnlColumnFactor.TabIndex = 29 - ' 'grpMargin ' Me.grpMargin.Controls.Add(Me.rdoBoth) @@ -743,12 +678,7 @@ Partial Class dlgSummaryTables Friend WithEvents cmdMissingOptions As Button Friend WithEvents rdoMultipleResponse As RadioButton Friend WithEvents ttMultipleResponse As ToolTip - Friend WithEvents ucrReceiverColumnFactor As ucrReceiverSingle Friend WithEvents rdoVariable As RadioButton - Friend WithEvents rdoSummaryVariable As RadioButton - Friend WithEvents rdoFactorVariable As RadioButton - Friend WithEvents rdoNoColumnFactor As RadioButton - Friend WithEvents ucrPnlColumnFactor As UcrPanel Friend WithEvents ucrNudSigFigs As ucrNud Friend WithEvents lblSigFigs As Label Friend WithEvents lblColumnFactors As Label diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 0af996a49fa..f5e88b86750 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -168,11 +168,11 @@ Public Class dlgSummaryTables ucrPnlColumnFactor.AddRadioButton(rdoNoColumnFactor) ucrPnlColumnFactor.AddRadioButton(rdoFactorVariable) - ucrPnlColumnFactor.AddRadioButton(rdoSummaryVariable) + ucrPnlColumnFactor.AddRadioButton(rdoColumnFactors) ucrPnlColumnFactor.AddRadioButton(rdoVariable) ucrPnlColumnFactor.AddParameterValuesCondition(rdoNoColumnFactor, "factor_cols", "NoColFactor") ucrPnlColumnFactor.AddParameterValuesCondition(rdoFactorVariable, "factor_cols", "FactorVar") - ucrPnlColumnFactor.AddParameterValuesCondition(rdoSummaryVariable, "factor_cols", "SumVar") + ucrPnlColumnFactor.AddParameterValuesCondition(rdoColumnFactors, "factor_cols", "SumVar") ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariable, "factor_cols", "Var") ucrPnlColumnFactor.AddToLinkedControls(ucrReceiverColumnFactor, {rdoFactorVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -373,12 +373,12 @@ Public Class dlgSummaryTables Private Sub ucrCoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFactors.ControlContentsChanged, ucrSaveTable.ControlContentsChanged, ucrChkWeight.ControlContentsChanged, ucrReceiverWeights.ControlContentsChanged, ucrReceiverSummaryCols.ControlContentsChanged, - ucrPnlSummaryFrequencyTables.ControlContentsChanged, ucrPnlColumnFactor.ControlContentsChanged, ucrReceiverColumnFactor.ControlContentsChanged + ucrPnlSummaryFrequencyTables.ControlContentsChanged TestOKEnabled() End Sub - Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumnFactor.ControlValueChanged, ucrNudColFactors.ControlValueChanged, - ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, ucrReceiverColumnFactor.ControlValueChanged, + Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, + ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, ucrReceiverFactors.ControlValueChanged cmdSummaries.Visible = rdoSummaryTable.Checked cmdFormatTable.Location = New Point(286, If(rdoSummaryTable.Checked, 464, 273)) @@ -388,17 +388,17 @@ Public Class dlgSummaryTables clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0) clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=1) ucrSaveTable.SetPrefix("frequency_table") - rdoSummaryVariable.Text = "Summary-Variable" + rdoColumnFactors.Text = "Summary-Variable" Else grpDisplay.Visible = True clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) clsDummyFunction.AddParameter("rdo_checked", "rdoSummary", iPosition:=1) ucrSaveTable.SetPrefix("summary_table") If ucrChkSummaries.Checked Then - rdoSummaryVariable.Text = "Summary" + rdoColumnFactors.Text = "Summary" rdoVariable.Visible = True Else - rdoSummaryVariable.Text = "Summary-Variable" + rdoColumnFactors.Text = "Summary-Variable" rdoVariable.Visible = False End If End If @@ -414,7 +414,7 @@ Public Class dlgSummaryTables ucrReceiverColumnFactor.SetMeAsReceiver() clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) - ElseIf rdoSummaryVariable.Checked Then + ElseIf rdoColumnFactors.Checked Then clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) If rdoFrequencyTable.Checked Then varsString() @@ -434,7 +434,7 @@ Public Class dlgSummaryTables If rdoVariable.Checked Then If Not ucrChkSummaries.Checked Then - rdoSummaryVariable.Checked = True + rdoColumnFactors.Checked = True Else rdoVariable.Checked = True End If From be7650b1e680e7653aa4e6d2d83812e81c6b22ff Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 28 Oct 2024 09:58:21 +0300 Subject: [PATCH 24/77] changes --- instat/dlgSummaryTables.Designer.vb | 297 ++++++++++++++++++---------- 1 file changed, 193 insertions(+), 104 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index e48a0496e4d..0f260ab430d 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -83,6 +83,10 @@ Partial Class dlgSummaryTables Me.ucrNudColFactors = New instat.ucrNud() Me.lblColumnFactors = New System.Windows.Forms.Label() Me.btnMoreOptions = New System.Windows.Forms.Button() + Me.ucrNudPositionSum = New instat.ucrNud() + Me.ucrNudPositionVar = New instat.ucrNud() + Me.lblPositionVar = New System.Windows.Forms.Label() + Me.lblPositionSum = New System.Windows.Forms.Label() Me.grpDisplay.SuspendLayout() Me.grpMargin.SuspendLayout() Me.grpPercentages.SuspendLayout() @@ -92,9 +96,10 @@ Partial Class dlgSummaryTables ' Me.lblFactors.AutoSize = True Me.lblFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactors.Location = New System.Drawing.Point(286, 43) + Me.lblFactors.Location = New System.Drawing.Point(429, 64) + Me.lblFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactors.Name = "lblFactors" - Me.lblFactors.Size = New System.Drawing.Size(48, 13) + Me.lblFactors.Size = New System.Drawing.Size(71, 20) Me.lblFactors.TabIndex = 1 Me.lblFactors.Tag = "Factors:" Me.lblFactors.Text = "Factors :" @@ -102,19 +107,26 @@ Partial Class dlgSummaryTables 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(286, 280) + Me.cmdSummaries.Location = New System.Drawing.Point(429, 420) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(104, 23) + Me.cmdSummaries.Size = New System.Drawing.Size(156, 34) Me.cmdSummaries.TabIndex = 13 Me.cmdSummaries.Text = "Summaries..." Me.cmdSummaries.UseVisualStyleBackColor = True ' 'grpDisplay ' + Me.grpDisplay.Controls.Add(Me.lblPositionSum) + Me.grpDisplay.Controls.Add(Me.lblPositionVar) + Me.grpDisplay.Controls.Add(Me.ucrNudPositionVar) + Me.grpDisplay.Controls.Add(Me.ucrNudPositionSum) Me.grpDisplay.Controls.Add(Me.rdoVariable) - Me.grpDisplay.Location = New System.Drawing.Point(10, 398) + Me.grpDisplay.Location = New System.Drawing.Point(15, 597) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Size = New System.Drawing.Size(270, 103) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Size = New System.Drawing.Size(405, 154) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Layout" @@ -122,9 +134,10 @@ Partial Class dlgSummaryTables 'rdoVariable ' Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(14, 93) + Me.rdoVariable.Location = New System.Drawing.Point(21, 140) + Me.rdoVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoVariable.Name = "rdoVariable" - Me.rdoVariable.Size = New System.Drawing.Size(63, 17) + Me.rdoVariable.Size = New System.Drawing.Size(92, 24) Me.rdoVariable.TabIndex = 32 Me.rdoVariable.TabStop = True Me.rdoVariable.Text = "Variable" @@ -136,9 +149,11 @@ Partial Class dlgSummaryTables Me.grpMargin.Controls.Add(Me.rdoSummary) Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) - Me.grpMargin.Location = New System.Drawing.Point(10, 320) + Me.grpMargin.Location = New System.Drawing.Point(15, 480) + Me.grpMargin.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpMargin.Name = "grpMargin" - Me.grpMargin.Size = New System.Drawing.Size(213, 40) + Me.grpMargin.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpMargin.Size = New System.Drawing.Size(320, 60) Me.grpMargin.TabIndex = 13 Me.grpMargin.TabStop = False ' @@ -146,9 +161,10 @@ Partial Class dlgSummaryTables ' Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBoth.Location = New System.Drawing.Point(140, 24) + Me.rdoBoth.Location = New System.Drawing.Point(210, 36) + Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoBoth.Name = "rdoBoth" - Me.rdoBoth.Size = New System.Drawing.Size(47, 17) + Me.rdoBoth.Size = New System.Drawing.Size(68, 24) Me.rdoBoth.TabIndex = 16 Me.rdoBoth.TabStop = True Me.rdoBoth.Text = "Both" @@ -158,9 +174,10 @@ Partial Class dlgSummaryTables ' Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummary.Location = New System.Drawing.Point(67, 24) + Me.rdoSummary.Location = New System.Drawing.Point(100, 36) + Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.Size = New System.Drawing.Size(68, 17) + Me.rdoSummary.Size = New System.Drawing.Size(101, 24) Me.rdoSummary.TabIndex = 16 Me.rdoSummary.TabStop = True Me.rdoSummary.Text = "Summary" @@ -170,9 +187,10 @@ Partial Class dlgSummaryTables ' Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoOuter.Location = New System.Drawing.Point(10, 24) + Me.rdoOuter.Location = New System.Drawing.Point(15, 36) + Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoOuter.Name = "rdoOuter" - Me.rdoOuter.Size = New System.Drawing.Size(51, 17) + Me.rdoOuter.Size = New System.Drawing.Size(74, 24) Me.rdoOuter.TabIndex = 15 Me.rdoOuter.TabStop = True Me.rdoOuter.Text = "Outer" @@ -182,8 +200,8 @@ Partial Class dlgSummaryTables ' Me.ucrPnlMargin.AutoSize = True Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrPnlMargin.Name = "ucrPnlMargin" Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) Me.ucrPnlMargin.TabIndex = 13 @@ -192,9 +210,10 @@ Partial Class dlgSummaryTables ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(159, 301) + Me.lblMarginName.Location = New System.Drawing.Point(238, 452) + Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(41, 13) + Me.lblMarginName.Size = New System.Drawing.Size(59, 20) Me.lblMarginName.TabIndex = 15 Me.lblMarginName.Text = "Name :" ' @@ -202,9 +221,10 @@ Partial Class dlgSummaryTables ' Me.lblVariables.AutoSize = True Me.lblVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblVariables.Location = New System.Drawing.Point(285, 162) + Me.lblVariables.Location = New System.Drawing.Point(428, 243) + Me.lblVariables.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblVariables.Name = "lblVariables" - Me.lblVariables.Size = New System.Drawing.Size(56, 13) + Me.lblVariables.Size = New System.Drawing.Size(83, 20) Me.lblVariables.TabIndex = 17 Me.lblVariables.Tag = "" Me.lblVariables.Text = "Variables :" @@ -212,9 +232,10 @@ Partial Class dlgSummaryTables 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(286, 464) + Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdFormatTable.Name = "cmdFormatTable" - Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) + Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) Me.cmdFormatTable.TabIndex = 19 Me.cmdFormatTable.Text = "Format Table..." Me.cmdFormatTable.UseVisualStyleBackColor = True @@ -228,9 +249,10 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 0) + Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 0) + Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" - Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27) + Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40) Me.rdoFrequencyTable.TabIndex = 22 Me.rdoFrequencyTable.TabStop = True Me.rdoFrequencyTable.Text = "Frequency" @@ -245,9 +267,10 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 0) + Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 0) + Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoSummaryTable.Name = "rdoSummaryTable" - Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27) + Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40) Me.rdoSummaryTable.TabIndex = 21 Me.rdoSummaryTable.TabStop = True Me.rdoSummaryTable.Text = "Summary" @@ -260,9 +283,11 @@ Partial Class dlgSummaryTables Me.grpPercentages.Controls.Add(Me.lblFactorsAsPercentage) Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpPercentages.Location = New System.Drawing.Point(286, 178) + Me.grpPercentages.Location = New System.Drawing.Point(429, 267) + Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpPercentages.Name = "grpPercentages" - Me.grpPercentages.Size = New System.Drawing.Size(174, 89) + Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpPercentages.Size = New System.Drawing.Size(261, 134) Me.grpPercentages.TabIndex = 23 Me.grpPercentages.TabStop = False Me.grpPercentages.Text = "Percentages" @@ -271,11 +296,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverPercentages.AutoSize = True Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60) + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverPercentages.strNcFilePath = "" Me.ucrReceiverPercentages.TabIndex = 4 Me.ucrReceiverPercentages.ucrSelector = Nothing @@ -284,9 +309,10 @@ Partial Class dlgSummaryTables ' Me.lblFactorsAsPercentage.AutoSize = True Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44) + Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(27, 66) + Me.lblFactorsAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" - Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(100, 13) + Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(150, 20) Me.lblFactorsAsPercentage.TabIndex = 1 Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" Me.lblFactorsAsPercentage.Text = "of Factor (Optional):" @@ -295,38 +321,40 @@ Partial Class dlgSummaryTables ' Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 34) + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) Me.ucrChkPercentageProportion.TabIndex = 3 ' 'ucrChkDisplayAsPercentage ' Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 34) + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) Me.ucrChkDisplayAsPercentage.TabIndex = 0 ' 'lblFrequencyMarginName ' Me.lblFrequencyMarginName.AutoSize = True Me.lblFrequencyMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFrequencyMarginName.Location = New System.Drawing.Point(7, 275) + Me.lblFrequencyMarginName.Location = New System.Drawing.Point(10, 412) + Me.lblFrequencyMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFrequencyMarginName.Name = "lblFrequencyMarginName" - Me.lblFrequencyMarginName.Size = New System.Drawing.Size(76, 13) + Me.lblFrequencyMarginName.Size = New System.Drawing.Size(111, 20) Me.lblFrequencyMarginName.TabIndex = 25 Me.lblFrequencyMarginName.Text = "Margin Name :" ' 'cmdMissingOptions ' Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 271) + Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 406) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23) + Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34) Me.cmdMissingOptions.TabIndex = 27 Me.cmdMissingOptions.Text = "Options" Me.cmdMissingOptions.UseVisualStyleBackColor = True @@ -335,19 +363,19 @@ Partial Class dlgSummaryTables ' Me.ucrChkFrequencyDisplayMargins.AutoSize = True Me.ucrChkFrequencyDisplayMargins.Checked = False - Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 255) - Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(15, 382) + Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" - Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23) + Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34) Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 ' 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, -4) - Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(66, -6) + Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables" - Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33) + Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(610, 50) Me.ucrPnlSummaryFrequencyTables.TabIndex = 20 ' 'ucrInputMarginName @@ -356,80 +384,80 @@ Partial Class dlgSummaryTables Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 298) - Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputMarginName.Location = New System.Drawing.Point(309, 447) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) + Me.ucrInputMarginName.Size = New System.Drawing.Size(111, 32) Me.ucrInputMarginName.TabIndex = 16 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(10, 490) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Location = New System.Drawing.Point(15, 735) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24) + Me.ucrSaveTable.Size = New System.Drawing.Size(478, 36) Me.ucrSaveTable.TabIndex = 12 ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 276) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(15, 414) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(228, 34) Me.ucrChkOmitMissing.TabIndex = 9 ' 'ucrChkStoreResults ' Me.ucrChkStoreResults.AutoSize = True Me.ucrChkStoreResults.Checked = False - Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 233) - Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkStoreResults.Location = New System.Drawing.Point(15, 350) + Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkStoreResults.Name = "ucrChkStoreResults" - Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23) + Me.ucrChkStoreResults.Size = New System.Drawing.Size(345, 34) Me.ucrChkStoreResults.TabIndex = 8 ' 'ucrChkDisplayMargins ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 300) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(15, 450) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23) + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) Me.ucrChkDisplayMargins.TabIndex = 10 ' 'ucrChkSummaries ' Me.ucrChkSummaries.AutoSize = True Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 254) - Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkSummaries.Location = New System.Drawing.Point(15, 381) + Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkSummaries.Name = "ucrChkSummaries" - Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23) + Me.ucrChkSummaries.Size = New System.Drawing.Size(363, 34) Me.ucrChkSummaries.TabIndex = 7 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 517) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Location = New System.Drawing.Point(15, 776) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.Size = New System.Drawing.Size(611, 77) Me.ucrBase.TabIndex = 14 ' 'ucrReceiverSummaryCols ' Me.ucrReceiverSummaryCols.AutoSize = True Me.ucrReceiverSummaryCols.frmParent = Me - Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(286, 178) + Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(429, 267) Me.ucrReceiverSummaryCols.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSummaryCols.Name = "ucrReceiverSummaryCols" Me.ucrReceiverSummaryCols.Selector = Nothing - Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(180, 150) Me.ucrReceiverSummaryCols.strNcFilePath = "" Me.ucrReceiverSummaryCols.TabIndex = 4 Me.ucrReceiverSummaryCols.ucrSelector = Nothing @@ -438,11 +466,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverFactors.AutoSize = True Me.ucrReceiverFactors.frmParent = Me - Me.ucrReceiverFactors.Location = New System.Drawing.Point(286, 59) + Me.ucrReceiverFactors.Location = New System.Drawing.Point(429, 88) Me.ucrReceiverFactors.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFactors.Name = "ucrReceiverFactors" Me.ucrReceiverFactors.Selector = Nothing - Me.ucrReceiverFactors.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverFactors.Size = New System.Drawing.Size(180, 150) Me.ucrReceiverFactors.strNcFilePath = "" Me.ucrReceiverFactors.TabIndex = 2 Me.ucrReceiverFactors.ucrSelector = Nothing @@ -451,11 +479,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverWeights.AutoSize = True Me.ucrReceiverWeights.frmParent = Me - Me.ucrReceiverWeights.Location = New System.Drawing.Point(109, 222) + Me.ucrReceiverWeights.Location = New System.Drawing.Point(164, 333) Me.ucrReceiverWeights.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWeights.Name = "ucrReceiverWeights" Me.ucrReceiverWeights.Selector = Nothing - Me.ucrReceiverWeights.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverWeights.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverWeights.strNcFilePath = "" Me.ucrReceiverWeights.TabIndex = 6 Me.ucrReceiverWeights.ucrSelector = Nothing @@ -464,10 +492,10 @@ Partial Class dlgSummaryTables ' Me.ucrChkWeight.AutoSize = True Me.ucrChkWeight.Checked = False - Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222) - Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkWeight.Location = New System.Drawing.Point(15, 333) + Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrChkWeight.Name = "ucrChkWeight" - Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23) + Me.ucrChkWeight.Size = New System.Drawing.Size(126, 34) Me.ucrChkWeight.TabIndex = 5 ' 'ucrInputFrequencyMarginName @@ -476,10 +504,10 @@ Partial Class dlgSummaryTables Me.ucrInputFrequencyMarginName.AutoSize = True Me.ucrInputFrequencyMarginName.IsMultiline = False Me.ucrInputFrequencyMarginName.IsReadOnly = False - Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 281) - Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(138, 422) + Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" - Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21) + Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(105, 32) Me.ucrInputFrequencyMarginName.TabIndex = 26 ' 'rdoMultipleResponse @@ -491,9 +519,10 @@ Partial Class dlgSummaryTables Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 0) + Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 0) + Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoMultipleResponse.Name = "rdoMultipleResponse" - Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27) + Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40) Me.rdoMultipleResponse.TabIndex = 28 Me.rdoMultipleResponse.TabStop = True Me.rdoMultipleResponse.Text = "Multiple Response" @@ -504,10 +533,10 @@ Partial Class dlgSummaryTables 'ucrReorderSummary ' Me.ucrReorderSummary.AutoSize = True - Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305) - Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(6) + Me.ucrReorderSummary.Location = New System.Drawing.Point(429, 458) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156) + Me.ucrReorderSummary.Size = New System.Drawing.Size(300, 234) Me.ucrReorderSummary.TabIndex = 18 Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing @@ -518,10 +547,10 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False Me.ucrSelectorSummaryTables.bShowHiddenColumns = False Me.ucrSelectorSummaryTables.bUseCurrentFilter = True - Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 24) + Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(15, 36) Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables" - Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274) Me.ucrSelectorSummaryTables.TabIndex = 0 ' 'ucrNudSigFigs @@ -529,12 +558,12 @@ Partial Class dlgSummaryTables Me.ucrNudSigFigs.AutoSize = True Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356) - Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(6) + Me.ucrNudSigFigs.Location = New System.Drawing.Point(177, 534) + Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Name = "ucrNudSigFigs" - Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSigFigs.Size = New System.Drawing.Size(75, 30) Me.ucrNudSigFigs.TabIndex = 30 Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -542,9 +571,10 @@ Partial Class dlgSummaryTables ' Me.lblSigFigs.AutoSize = True Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSigFigs.Location = New System.Drawing.Point(15, 359) + Me.lblSigFigs.Location = New System.Drawing.Point(22, 538) + Me.lblSigFigs.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSigFigs.Name = "lblSigFigs" - Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) + Me.lblSigFigs.Size = New System.Drawing.Size(144, 20) Me.lblSigFigs.TabIndex = 29 Me.lblSigFigs.Tag = "Significant_Figures:" Me.lblSigFigs.Text = "Significant Figures:" @@ -554,12 +584,12 @@ Partial Class dlgSummaryTables Me.ucrNudColFactors.AutoSize = True Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColFactors.Location = New System.Drawing.Point(119, 334) - Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(6) + Me.ucrNudColFactors.Location = New System.Drawing.Point(178, 501) + Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Name = "ucrNudColFactors" - Me.ucrNudColFactors.Size = New System.Drawing.Size(50, 20) + Me.ucrNudColFactors.Size = New System.Drawing.Size(75, 30) Me.ucrNudColFactors.TabIndex = 31 Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -567,28 +597,82 @@ Partial Class dlgSummaryTables ' Me.lblColumnFactors.AutoSize = True Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(23, 337) + Me.lblColumnFactors.Location = New System.Drawing.Point(34, 506) + Me.lblColumnFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblColumnFactors.Name = "lblColumnFactors" - Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) + Me.lblColumnFactors.Size = New System.Drawing.Size(125, 20) Me.lblColumnFactors.TabIndex = 32 Me.lblColumnFactors.Tag = "Significant_Figures:" Me.lblColumnFactors.Text = "Column Factors:" ' 'btnMoreOptions ' - Me.btnMoreOptions.Location = New System.Drawing.Point(10, 207) + Me.btnMoreOptions.Location = New System.Drawing.Point(15, 310) + Me.btnMoreOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.btnMoreOptions.Name = "btnMoreOptions" - Me.btnMoreOptions.Size = New System.Drawing.Size(141, 21) + Me.btnMoreOptions.Size = New System.Drawing.Size(212, 32) Me.btnMoreOptions.TabIndex = 33 Me.btnMoreOptions.Text = "Table Options" Me.btnMoreOptions.UseVisualStyleBackColor = True ' + 'ucrNudPositionSum + ' + Me.ucrNudPositionSum.AutoSize = True + Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionSum.Location = New System.Drawing.Point(185, 88) + Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Name = "ucrNudPositionSum" + Me.ucrNudPositionSum.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPositionSum.TabIndex = 33 + Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudPositionVar + ' + Me.ucrNudPositionVar.AutoSize = True + Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionVar.Location = New System.Drawing.Point(183, 52) + Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Name = "ucrNudPositionVar" + Me.ucrNudPositionVar.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPositionVar.TabIndex = 34 + Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblPositionVar + ' + Me.lblPositionVar.AutoSize = True + Me.lblPositionVar.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPositionVar.Location = New System.Drawing.Point(10, 57) + Me.lblPositionVar.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblPositionVar.Name = "lblPositionVar" + Me.lblPositionVar.Size = New System.Drawing.Size(157, 20) + Me.lblPositionVar.TabIndex = 35 + Me.lblPositionVar.Tag = "Significant_Figures:" + Me.lblPositionVar.Text = "Position of Variables:" + ' + 'lblPositionSum + ' + Me.lblPositionSum.AutoSize = True + Me.lblPositionSum.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPositionSum.Location = New System.Drawing.Point(4, 91) + Me.lblPositionSum.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblPositionSum.Name = "lblPositionSum" + Me.lblPositionSum.Size = New System.Drawing.Size(171, 20) + Me.lblPositionSum.TabIndex = 36 + Me.lblPositionSum.Tag = "Significant_Figures:" + Me.lblPositionSum.Text = "Position of Summaries:" + ' 'dlgSummaryTables ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(489, 487) + Me.ClientSize = New System.Drawing.Size(734, 730) Me.Controls.Add(Me.btnMoreOptions) Me.Controls.Add(Me.lblColumnFactors) Me.Controls.Add(Me.ucrNudColFactors) @@ -624,6 +708,7 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.ucrInputFrequencyMarginName) Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSummaryTables" @@ -684,4 +769,8 @@ Partial Class dlgSummaryTables Friend WithEvents lblColumnFactors As Label Friend WithEvents ucrNudColFactors As ucrNud Friend WithEvents btnMoreOptions As Button + Friend WithEvents lblPositionSum As Label + Friend WithEvents lblPositionVar As Label + Friend WithEvents ucrNudPositionVar As ucrNud + Friend WithEvents ucrNudPositionSum As ucrNud End Class \ No newline at end of file From 61a6bf9512e35343fe7a4226d0b3f7d4668fa102 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:09:08 +0100 Subject: [PATCH 25/77] Code changes --- instat/dlgUseTable.vb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 738a980e0aa..240d76a48eb 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -26,7 +26,7 @@ Public Class dlgUseTable clsFootnoteSubtitleLocationFunction, clsTabFootnoteSubtitleFunction, clsSecondFootnoteCellFunction, clsTabStyleCellTitleFunction, clsTabStyleCellTextFunction, clsTabStyleFunction, clsTabStylePxFunction, - clsgtExtraThemesFunction As New RFunction + clsgtExtraThemesFunction, clsGtRFunction As New RFunction Private clsPipeOperator, clsSummaryOperator, clsJoiningPipeOperator As ROperator @@ -60,7 +60,7 @@ Public Class dlgUseTable 'rdoAsHTML.Enabled = False 'rdoAsLaTex.Enabled = False 'rdoAsRTF.Enabled = False - 'rdoAsWord.Enabled = False + rdoAsWord.Enabled = False ucrPnlOptions.AddRadioButton(rdoAsHTML) ucrPnlOptions.AddRadioButton(rdoAsRTF) ucrPnlOptions.AddRadioButton(rdoAsWord) @@ -70,7 +70,7 @@ Public Class dlgUseTable ucrPnlOptions.AddParameterValuesCondition(rdoAsWord, "gtsave", "docx") ucrPnlOptions.AddParameterValuesCondition(rdoAsLaTex, "gtsave", "tex") - cmdTableOptions.Enabled = False + cmdTableOptions.Enabled = True ucrSaveTable.SetPrefix("use_table") ucrSaveTable.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) @@ -107,6 +107,7 @@ Public Class dlgUseTable clsSummaryOperator = New ROperator clsJoiningPipeOperator = New ROperator clsgtExtraThemesFunction = New RFunction + clsGtRFunction = New RFunction 'rdoAsHTML.Checked = True ucrTablesReceiver.SetMeAsReceiver() @@ -190,6 +191,11 @@ Public Class dlgUseTable clsPipeOperator.SetOperation("%>%") clsPipeOperator.bBrackets = False + clsGtRFunction.SetPackageName("gt") + clsGtRFunction.SetRCommand("gt") + clsPipeOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) + + ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) End Sub From 24a712b00bca3040a7ba185a1db459a88139651d Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 28 Oct 2024 11:22:01 +0300 Subject: [PATCH 26/77] changes --- instat/dlgSummaryTables.Designer.vb | 372 ++++++++++++++-------------- instat/dlgSummaryTables.vb | 244 ++++++++++-------- 2 files changed, 324 insertions(+), 292 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index 0f260ab430d..314acf7fe43 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -42,6 +42,10 @@ Partial Class dlgSummaryTables Me.lblFactors = New System.Windows.Forms.Label() Me.cmdSummaries = New System.Windows.Forms.Button() Me.grpDisplay = New System.Windows.Forms.GroupBox() + Me.lblPositionSum = New System.Windows.Forms.Label() + Me.lblPositionVar = New System.Windows.Forms.Label() + Me.ucrNudPositionVar = New instat.ucrNud() + Me.ucrNudPositionSum = New instat.ucrNud() Me.rdoVariable = New System.Windows.Forms.RadioButton() Me.grpMargin = New System.Windows.Forms.GroupBox() Me.rdoBoth = New System.Windows.Forms.RadioButton() @@ -83,10 +87,8 @@ Partial Class dlgSummaryTables Me.ucrNudColFactors = New instat.ucrNud() Me.lblColumnFactors = New System.Windows.Forms.Label() Me.btnMoreOptions = New System.Windows.Forms.Button() - Me.ucrNudPositionSum = New instat.ucrNud() - Me.ucrNudPositionVar = New instat.ucrNud() - Me.lblPositionVar = New System.Windows.Forms.Label() - Me.lblPositionSum = New System.Windows.Forms.Label() + Me.UcrNudColumnSumFactors = New instat.ucrNud() + Me.lblColumnSummariesFactors = New System.Windows.Forms.Label() Me.grpDisplay.SuspendLayout() Me.grpMargin.SuspendLayout() Me.grpPercentages.SuspendLayout() @@ -96,10 +98,9 @@ Partial Class dlgSummaryTables ' Me.lblFactors.AutoSize = True Me.lblFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactors.Location = New System.Drawing.Point(429, 64) - Me.lblFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFactors.Location = New System.Drawing.Point(286, 43) Me.lblFactors.Name = "lblFactors" - Me.lblFactors.Size = New System.Drawing.Size(71, 20) + Me.lblFactors.Size = New System.Drawing.Size(48, 13) Me.lblFactors.TabIndex = 1 Me.lblFactors.Tag = "Factors:" Me.lblFactors.Text = "Factors :" @@ -107,37 +108,85 @@ Partial Class dlgSummaryTables 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(429, 420) - Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdSummaries.Location = New System.Drawing.Point(286, 280) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(156, 34) + Me.cmdSummaries.Size = New System.Drawing.Size(104, 23) Me.cmdSummaries.TabIndex = 13 Me.cmdSummaries.Text = "Summaries..." Me.cmdSummaries.UseVisualStyleBackColor = True ' 'grpDisplay ' + Me.grpDisplay.Controls.Add(Me.lblColumnSummariesFactors) + Me.grpDisplay.Controls.Add(Me.UcrNudColumnSumFactors) Me.grpDisplay.Controls.Add(Me.lblPositionSum) Me.grpDisplay.Controls.Add(Me.lblPositionVar) Me.grpDisplay.Controls.Add(Me.ucrNudPositionVar) Me.grpDisplay.Controls.Add(Me.ucrNudPositionSum) Me.grpDisplay.Controls.Add(Me.rdoVariable) - Me.grpDisplay.Location = New System.Drawing.Point(15, 597) - Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Location = New System.Drawing.Point(10, 398) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.grpDisplay.Size = New System.Drawing.Size(405, 154) + Me.grpDisplay.Size = New System.Drawing.Size(270, 103) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Layout" ' + 'lblPositionSum + ' + Me.lblPositionSum.AutoSize = True + Me.lblPositionSum.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPositionSum.Location = New System.Drawing.Point(3, 61) + Me.lblPositionSum.Name = "lblPositionSum" + Me.lblPositionSum.Size = New System.Drawing.Size(113, 13) + Me.lblPositionSum.TabIndex = 36 + Me.lblPositionSum.Tag = "Significant_Figures:" + Me.lblPositionSum.Text = "Position of Summaries:" + ' + 'lblPositionVar + ' + Me.lblPositionVar.AutoSize = True + Me.lblPositionVar.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPositionVar.Location = New System.Drawing.Point(7, 38) + Me.lblPositionVar.Name = "lblPositionVar" + Me.lblPositionVar.Size = New System.Drawing.Size(105, 13) + Me.lblPositionVar.TabIndex = 35 + Me.lblPositionVar.Tag = "Significant_Figures:" + Me.lblPositionVar.Text = "Position of Variables:" + ' + 'ucrNudPositionVar + ' + Me.ucrNudPositionVar.AutoSize = True + Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionVar.Location = New System.Drawing.Point(122, 35) + Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(6) + Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Name = "ucrNudPositionVar" + Me.ucrNudPositionVar.Size = New System.Drawing.Size(50, 20) + Me.ucrNudPositionVar.TabIndex = 34 + Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudPositionSum + ' + Me.ucrNudPositionSum.AutoSize = True + Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionSum.Location = New System.Drawing.Point(123, 59) + Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(6) + Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Name = "ucrNudPositionSum" + Me.ucrNudPositionSum.Size = New System.Drawing.Size(50, 20) + Me.ucrNudPositionSum.TabIndex = 33 + Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'rdoVariable ' Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(21, 140) - Me.rdoVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoVariable.Location = New System.Drawing.Point(14, 93) Me.rdoVariable.Name = "rdoVariable" - Me.rdoVariable.Size = New System.Drawing.Size(92, 24) + Me.rdoVariable.Size = New System.Drawing.Size(63, 17) Me.rdoVariable.TabIndex = 32 Me.rdoVariable.TabStop = True Me.rdoVariable.Text = "Variable" @@ -149,11 +198,9 @@ Partial Class dlgSummaryTables Me.grpMargin.Controls.Add(Me.rdoSummary) Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) - Me.grpMargin.Location = New System.Drawing.Point(15, 480) - Me.grpMargin.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpMargin.Location = New System.Drawing.Point(10, 320) Me.grpMargin.Name = "grpMargin" - Me.grpMargin.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.grpMargin.Size = New System.Drawing.Size(320, 60) + Me.grpMargin.Size = New System.Drawing.Size(213, 40) Me.grpMargin.TabIndex = 13 Me.grpMargin.TabStop = False ' @@ -161,10 +208,9 @@ Partial Class dlgSummaryTables ' Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBoth.Location = New System.Drawing.Point(210, 36) - Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoBoth.Location = New System.Drawing.Point(140, 24) Me.rdoBoth.Name = "rdoBoth" - Me.rdoBoth.Size = New System.Drawing.Size(68, 24) + Me.rdoBoth.Size = New System.Drawing.Size(47, 17) Me.rdoBoth.TabIndex = 16 Me.rdoBoth.TabStop = True Me.rdoBoth.Text = "Both" @@ -174,10 +220,9 @@ Partial Class dlgSummaryTables ' Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummary.Location = New System.Drawing.Point(100, 36) - Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSummary.Location = New System.Drawing.Point(67, 24) Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.Size = New System.Drawing.Size(101, 24) + Me.rdoSummary.Size = New System.Drawing.Size(68, 17) Me.rdoSummary.TabIndex = 16 Me.rdoSummary.TabStop = True Me.rdoSummary.Text = "Summary" @@ -187,10 +232,9 @@ Partial Class dlgSummaryTables ' Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoOuter.Location = New System.Drawing.Point(15, 36) - Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoOuter.Location = New System.Drawing.Point(10, 24) Me.rdoOuter.Name = "rdoOuter" - Me.rdoOuter.Size = New System.Drawing.Size(74, 24) + Me.rdoOuter.Size = New System.Drawing.Size(51, 17) Me.rdoOuter.TabIndex = 15 Me.rdoOuter.TabStop = True Me.rdoOuter.Text = "Outer" @@ -200,8 +244,8 @@ Partial Class dlgSummaryTables ' Me.ucrPnlMargin.AutoSize = True Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) - Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlMargin.Name = "ucrPnlMargin" Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) Me.ucrPnlMargin.TabIndex = 13 @@ -210,10 +254,9 @@ Partial Class dlgSummaryTables ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(238, 452) - Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblMarginName.Location = New System.Drawing.Point(159, 301) Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(59, 20) + Me.lblMarginName.Size = New System.Drawing.Size(41, 13) Me.lblMarginName.TabIndex = 15 Me.lblMarginName.Text = "Name :" ' @@ -221,10 +264,9 @@ Partial Class dlgSummaryTables ' Me.lblVariables.AutoSize = True Me.lblVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblVariables.Location = New System.Drawing.Point(428, 243) - Me.lblVariables.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblVariables.Location = New System.Drawing.Point(285, 162) Me.lblVariables.Name = "lblVariables" - Me.lblVariables.Size = New System.Drawing.Size(83, 20) + Me.lblVariables.Size = New System.Drawing.Size(56, 13) Me.lblVariables.TabIndex = 17 Me.lblVariables.Tag = "" Me.lblVariables.Text = "Variables :" @@ -232,10 +274,9 @@ Partial Class dlgSummaryTables 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696) - Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFormatTable.Location = New System.Drawing.Point(286, 464) Me.cmdFormatTable.Name = "cmdFormatTable" - Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) + Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) Me.cmdFormatTable.TabIndex = 19 Me.cmdFormatTable.Text = "Format Table..." Me.cmdFormatTable.UseVisualStyleBackColor = True @@ -249,10 +290,9 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 0) - Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 0) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" - Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40) + Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27) Me.rdoFrequencyTable.TabIndex = 22 Me.rdoFrequencyTable.TabStop = True Me.rdoFrequencyTable.Text = "Frequency" @@ -267,10 +307,9 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 0) - Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 0) Me.rdoSummaryTable.Name = "rdoSummaryTable" - Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40) + Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27) Me.rdoSummaryTable.TabIndex = 21 Me.rdoSummaryTable.TabStop = True Me.rdoSummaryTable.Text = "Summary" @@ -283,11 +322,9 @@ Partial Class dlgSummaryTables Me.grpPercentages.Controls.Add(Me.lblFactorsAsPercentage) Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpPercentages.Location = New System.Drawing.Point(429, 267) - Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpPercentages.Location = New System.Drawing.Point(286, 178) Me.grpPercentages.Name = "grpPercentages" - Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.grpPercentages.Size = New System.Drawing.Size(261, 134) + Me.grpPercentages.Size = New System.Drawing.Size(174, 89) Me.grpPercentages.TabIndex = 23 Me.grpPercentages.TabStop = False Me.grpPercentages.Text = "Percentages" @@ -296,11 +333,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverPercentages.AutoSize = True Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60) Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverPercentages.strNcFilePath = "" Me.ucrReceiverPercentages.TabIndex = 4 Me.ucrReceiverPercentages.ucrSelector = Nothing @@ -309,10 +346,9 @@ Partial Class dlgSummaryTables ' Me.lblFactorsAsPercentage.AutoSize = True Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(27, 66) - Me.lblFactorsAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44) Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" - Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(150, 20) + Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(100, 13) Me.lblFactorsAsPercentage.TabIndex = 1 Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" Me.lblFactorsAsPercentage.Text = "of Factor (Optional):" @@ -321,40 +357,38 @@ Partial Class dlgSummaryTables ' Me.ucrChkPercentageProportion.AutoSize = True Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 34) Me.ucrChkPercentageProportion.TabIndex = 3 ' 'ucrChkDisplayAsPercentage ' Me.ucrChkDisplayAsPercentage.AutoSize = True Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 34) Me.ucrChkDisplayAsPercentage.TabIndex = 0 ' 'lblFrequencyMarginName ' Me.lblFrequencyMarginName.AutoSize = True Me.lblFrequencyMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFrequencyMarginName.Location = New System.Drawing.Point(10, 412) - Me.lblFrequencyMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFrequencyMarginName.Location = New System.Drawing.Point(7, 275) Me.lblFrequencyMarginName.Name = "lblFrequencyMarginName" - Me.lblFrequencyMarginName.Size = New System.Drawing.Size(111, 20) + Me.lblFrequencyMarginName.Size = New System.Drawing.Size(76, 13) Me.lblFrequencyMarginName.TabIndex = 25 Me.lblFrequencyMarginName.Text = "Margin Name :" ' 'cmdMissingOptions ' Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 406) - Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 271) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34) + Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23) Me.cmdMissingOptions.TabIndex = 27 Me.cmdMissingOptions.Text = "Options" Me.cmdMissingOptions.UseVisualStyleBackColor = True @@ -363,19 +397,19 @@ Partial Class dlgSummaryTables ' Me.ucrChkFrequencyDisplayMargins.AutoSize = True Me.ucrChkFrequencyDisplayMargins.Checked = False - Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(15, 382) - Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 255) + Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" - Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34) + Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23) Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 ' 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(66, -6) - Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, -4) + Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables" - Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(610, 50) + Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33) Me.ucrPnlSummaryFrequencyTables.TabIndex = 20 ' 'ucrInputMarginName @@ -384,80 +418,80 @@ Partial Class dlgSummaryTables Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(309, 447) - Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) + Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 298) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(111, 32) + Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) Me.ucrInputMarginName.TabIndex = 16 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(15, 735) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrSaveTable.Location = New System.Drawing.Point(10, 490) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(478, 36) + Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24) Me.ucrSaveTable.TabIndex = 12 ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(15, 414) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 276) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(228, 34) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23) Me.ucrChkOmitMissing.TabIndex = 9 ' 'ucrChkStoreResults ' Me.ucrChkStoreResults.AutoSize = True Me.ucrChkStoreResults.Checked = False - Me.ucrChkStoreResults.Location = New System.Drawing.Point(15, 350) - Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 233) + Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkStoreResults.Name = "ucrChkStoreResults" - Me.ucrChkStoreResults.Size = New System.Drawing.Size(345, 34) + Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23) Me.ucrChkStoreResults.TabIndex = 8 ' 'ucrChkDisplayMargins ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(15, 450) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 300) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23) Me.ucrChkDisplayMargins.TabIndex = 10 ' 'ucrChkSummaries ' Me.ucrChkSummaries.AutoSize = True Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(15, 381) - Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 254) + Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkSummaries.Name = "ucrChkSummaries" - Me.ucrChkSummaries.Size = New System.Drawing.Size(363, 34) + Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23) Me.ucrChkSummaries.TabIndex = 7 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(15, 776) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrBase.Location = New System.Drawing.Point(10, 517) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(611, 77) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 14 ' 'ucrReceiverSummaryCols ' Me.ucrReceiverSummaryCols.AutoSize = True Me.ucrReceiverSummaryCols.frmParent = Me - Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(429, 267) + Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(286, 178) Me.ucrReceiverSummaryCols.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSummaryCols.Name = "ucrReceiverSummaryCols" Me.ucrReceiverSummaryCols.Selector = Nothing - Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(180, 150) + Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverSummaryCols.strNcFilePath = "" Me.ucrReceiverSummaryCols.TabIndex = 4 Me.ucrReceiverSummaryCols.ucrSelector = Nothing @@ -466,11 +500,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverFactors.AutoSize = True Me.ucrReceiverFactors.frmParent = Me - Me.ucrReceiverFactors.Location = New System.Drawing.Point(429, 88) + Me.ucrReceiverFactors.Location = New System.Drawing.Point(286, 59) Me.ucrReceiverFactors.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFactors.Name = "ucrReceiverFactors" Me.ucrReceiverFactors.Selector = Nothing - Me.ucrReceiverFactors.Size = New System.Drawing.Size(180, 150) + Me.ucrReceiverFactors.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverFactors.strNcFilePath = "" Me.ucrReceiverFactors.TabIndex = 2 Me.ucrReceiverFactors.ucrSelector = Nothing @@ -479,11 +513,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverWeights.AutoSize = True Me.ucrReceiverWeights.frmParent = Me - Me.ucrReceiverWeights.Location = New System.Drawing.Point(164, 333) + Me.ucrReceiverWeights.Location = New System.Drawing.Point(109, 222) Me.ucrReceiverWeights.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWeights.Name = "ucrReceiverWeights" Me.ucrReceiverWeights.Selector = Nothing - Me.ucrReceiverWeights.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverWeights.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverWeights.strNcFilePath = "" Me.ucrReceiverWeights.TabIndex = 6 Me.ucrReceiverWeights.ucrSelector = Nothing @@ -492,10 +526,10 @@ Partial Class dlgSummaryTables ' Me.ucrChkWeight.AutoSize = True Me.ucrChkWeight.Checked = False - Me.ucrChkWeight.Location = New System.Drawing.Point(15, 333) - Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222) + Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkWeight.Name = "ucrChkWeight" - Me.ucrChkWeight.Size = New System.Drawing.Size(126, 34) + Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23) Me.ucrChkWeight.TabIndex = 5 ' 'ucrInputFrequencyMarginName @@ -504,10 +538,10 @@ Partial Class dlgSummaryTables Me.ucrInputFrequencyMarginName.AutoSize = True Me.ucrInputFrequencyMarginName.IsMultiline = False Me.ucrInputFrequencyMarginName.IsReadOnly = False - Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(138, 422) - Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) + Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 281) + Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" - Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(105, 32) + Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21) Me.ucrInputFrequencyMarginName.TabIndex = 26 ' 'rdoMultipleResponse @@ -519,10 +553,9 @@ Partial Class dlgSummaryTables Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 0) - Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 0) Me.rdoMultipleResponse.Name = "rdoMultipleResponse" - Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40) + Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27) Me.rdoMultipleResponse.TabIndex = 28 Me.rdoMultipleResponse.TabStop = True Me.rdoMultipleResponse.Text = "Multiple Response" @@ -533,10 +566,10 @@ Partial Class dlgSummaryTables 'ucrReorderSummary ' Me.ucrReorderSummary.AutoSize = True - Me.ucrReorderSummary.Location = New System.Drawing.Point(429, 458) - Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(6) Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(300, 234) + Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156) Me.ucrReorderSummary.TabIndex = 18 Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing @@ -547,10 +580,10 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False Me.ucrSelectorSummaryTables.bShowHiddenColumns = False Me.ucrSelectorSummaryTables.bUseCurrentFilter = True - Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(15, 36) + Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 24) Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables" - Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274) + Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorSummaryTables.TabIndex = 0 ' 'ucrNudSigFigs @@ -558,12 +591,12 @@ Partial Class dlgSummaryTables Me.ucrNudSigFigs.AutoSize = True Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSigFigs.Location = New System.Drawing.Point(177, 534) - Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356) + Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSigFigs.Name = "ucrNudSigFigs" - Me.ucrNudSigFigs.Size = New System.Drawing.Size(75, 30) + Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20) Me.ucrNudSigFigs.TabIndex = 30 Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -571,10 +604,9 @@ Partial Class dlgSummaryTables ' Me.lblSigFigs.AutoSize = True Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSigFigs.Location = New System.Drawing.Point(22, 538) - Me.lblSigFigs.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSigFigs.Location = New System.Drawing.Point(15, 359) Me.lblSigFigs.Name = "lblSigFigs" - Me.lblSigFigs.Size = New System.Drawing.Size(144, 20) + Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) Me.lblSigFigs.TabIndex = 29 Me.lblSigFigs.Tag = "Significant_Figures:" Me.lblSigFigs.Text = "Significant Figures:" @@ -584,12 +616,12 @@ Partial Class dlgSummaryTables Me.ucrNudColFactors.AutoSize = True Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColFactors.Location = New System.Drawing.Point(178, 501) - Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrNudColFactors.Location = New System.Drawing.Point(119, 334) + Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudColFactors.Name = "ucrNudColFactors" - Me.ucrNudColFactors.Size = New System.Drawing.Size(75, 30) + Me.ucrNudColFactors.Size = New System.Drawing.Size(50, 20) Me.ucrNudColFactors.TabIndex = 31 Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -597,82 +629,53 @@ Partial Class dlgSummaryTables ' Me.lblColumnFactors.AutoSize = True Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(34, 506) - Me.lblColumnFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblColumnFactors.Location = New System.Drawing.Point(23, 337) Me.lblColumnFactors.Name = "lblColumnFactors" - Me.lblColumnFactors.Size = New System.Drawing.Size(125, 20) + Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) Me.lblColumnFactors.TabIndex = 32 Me.lblColumnFactors.Tag = "Significant_Figures:" Me.lblColumnFactors.Text = "Column Factors:" ' 'btnMoreOptions ' - Me.btnMoreOptions.Location = New System.Drawing.Point(15, 310) - Me.btnMoreOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.btnMoreOptions.Location = New System.Drawing.Point(10, 207) Me.btnMoreOptions.Name = "btnMoreOptions" - Me.btnMoreOptions.Size = New System.Drawing.Size(212, 32) + Me.btnMoreOptions.Size = New System.Drawing.Size(141, 21) Me.btnMoreOptions.TabIndex = 33 Me.btnMoreOptions.Text = "Table Options" Me.btnMoreOptions.UseVisualStyleBackColor = True ' - 'ucrNudPositionSum - ' - Me.ucrNudPositionSum.AutoSize = True - Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPositionSum.Location = New System.Drawing.Point(185, 88) - Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(9) - Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionSum.Name = "ucrNudPositionSum" - Me.ucrNudPositionSum.Size = New System.Drawing.Size(75, 30) - Me.ucrNudPositionSum.TabIndex = 33 - Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudPositionVar - ' - Me.ucrNudPositionVar.AutoSize = True - Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPositionVar.Location = New System.Drawing.Point(183, 52) - Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(9) - Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionVar.Name = "ucrNudPositionVar" - Me.ucrNudPositionVar.Size = New System.Drawing.Size(75, 30) - Me.ucrNudPositionVar.TabIndex = 34 - Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblPositionVar - ' - Me.lblPositionVar.AutoSize = True - Me.lblPositionVar.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPositionVar.Location = New System.Drawing.Point(10, 57) - Me.lblPositionVar.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblPositionVar.Name = "lblPositionVar" - Me.lblPositionVar.Size = New System.Drawing.Size(157, 20) - Me.lblPositionVar.TabIndex = 35 - Me.lblPositionVar.Tag = "Significant_Figures:" - Me.lblPositionVar.Text = "Position of Variables:" - ' - 'lblPositionSum - ' - Me.lblPositionSum.AutoSize = True - Me.lblPositionSum.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPositionSum.Location = New System.Drawing.Point(4, 91) - Me.lblPositionSum.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblPositionSum.Name = "lblPositionSum" - Me.lblPositionSum.Size = New System.Drawing.Size(171, 20) - Me.lblPositionSum.TabIndex = 36 - Me.lblPositionSum.Tag = "Significant_Figures:" - Me.lblPositionSum.Text = "Position of Summaries:" + 'UcrNudColumnSumFactors + ' + Me.UcrNudColumnSumFactors.AutoSize = True + Me.UcrNudColumnSumFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Location = New System.Drawing.Point(122, 12) + Me.UcrNudColumnSumFactors.Margin = New System.Windows.Forms.Padding(6) + Me.UcrNudColumnSumFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Name = "UcrNudColumnSumFactors" + Me.UcrNudColumnSumFactors.Size = New System.Drawing.Size(50, 20) + Me.UcrNudColumnSumFactors.TabIndex = 37 + Me.UcrNudColumnSumFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblColumnSummariesFactors + ' + Me.lblColumnSummariesFactors.AutoSize = True + Me.lblColumnSummariesFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColumnSummariesFactors.Location = New System.Drawing.Point(6, 16) + Me.lblColumnSummariesFactors.Name = "lblColumnSummariesFactors" + Me.lblColumnSummariesFactors.Size = New System.Drawing.Size(93, 13) + Me.lblColumnSummariesFactors.TabIndex = 38 + Me.lblColumnSummariesFactors.Tag = "Significant_Figures:" + Me.lblColumnSummariesFactors.Text = "Column ""Factors"":" ' 'dlgSummaryTables ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(734, 730) + Me.ClientSize = New System.Drawing.Size(489, 467) Me.Controls.Add(Me.btnMoreOptions) Me.Controls.Add(Me.lblColumnFactors) Me.Controls.Add(Me.ucrNudColFactors) @@ -708,7 +711,6 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.ucrInputFrequencyMarginName) Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSummaryTables" @@ -773,4 +775,6 @@ Partial Class dlgSummaryTables Friend WithEvents lblPositionVar As Label Friend WithEvents ucrNudPositionVar As ucrNud Friend WithEvents ucrNudPositionSum As ucrNud + Friend WithEvents lblColumnSummariesFactors As Label + Friend WithEvents UcrNudColumnSumFactors As ucrNud End Class \ No newline at end of file diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index f5e88b86750..d88d6cb5892 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -130,6 +130,9 @@ Public Class dlgSummaryTables ucrNudSigFigs.SetRDefault(2) ucrNudColFactors.SetLinkedDisplayControl(lblColumnFactors) + ucrNudPositionSum.SetLinkedDisplayControl(lblPositionSum) + ucrNudPositionVar.SetLinkedDisplayControl(lblPositionVar) + UcrNudColumnSumFactors.SetLinkedDisplayControl(lblColumnSummariesFactors) ucrChkWeight.SetText("Weights") ucrChkWeight.SetParameter(ucrReceiverWeights.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) @@ -149,7 +152,7 @@ Public Class dlgSummaryTables ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayMargins}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins, ucrNudColFactors}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkOmitMissing}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrPnlColumnFactor}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) + 'ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrPnlColumnFactor}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 2)) ucrChkDisplayAsPercentage.SetText("As Percentages") @@ -166,20 +169,6 @@ Public Class dlgSummaryTables ucrChkPercentageProportion.SetText("Display as Decimal") ucrChkPercentageProportion.SetRDefault("FALSE") - ucrPnlColumnFactor.AddRadioButton(rdoNoColumnFactor) - ucrPnlColumnFactor.AddRadioButton(rdoFactorVariable) - ucrPnlColumnFactor.AddRadioButton(rdoColumnFactors) - ucrPnlColumnFactor.AddRadioButton(rdoVariable) - ucrPnlColumnFactor.AddParameterValuesCondition(rdoNoColumnFactor, "factor_cols", "NoColFactor") - ucrPnlColumnFactor.AddParameterValuesCondition(rdoFactorVariable, "factor_cols", "FactorVar") - ucrPnlColumnFactor.AddParameterValuesCondition(rdoColumnFactors, "factor_cols", "SumVar") - ucrPnlColumnFactor.AddParameterValuesCondition(rdoVariable, "factor_cols", "Var") - ucrPnlColumnFactor.AddToLinkedControls(ucrReceiverColumnFactor, {rdoFactorVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - ucrReceiverColumnFactor.SetParameter(New RParameter("names_from", 0)) - ucrReceiverColumnFactor.Selector = ucrSelectorSummaryTables - ucrReceiverColumnFactor.SetDataType("factor") - ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetDataFrameSelector(ucrSelectorSummaryTables.ucrAvailableDataFrames) @@ -269,6 +258,7 @@ Public Class dlgSummaryTables bResetSubdialog = True bResetFormatSubdialog = True TestOKEnabled() + SetDefaultValues() End Sub Public Sub SetRCodeForControls(bReset As Boolean) @@ -289,7 +279,9 @@ Public Class dlgSummaryTables ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset) ucrChkStoreResults.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsFrequencyDefaultFunction, bReset) - ucrPnlColumnFactor.SetRCode(clsDummyFunction, bReset) + UcrNudColumnSumFactors.SetRCode(clsSummaryDefaultFunction, bReset) + ucrNudPositionSum.SetRCode(clsSummaryDefaultFunction, bReset) + ucrNudPositionVar.SetRCode(clsSummaryDefaultFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) If bReset Then ucrReceiverSummaryCols.SetRCode(clsSummaryDefaultFunction, bReset) @@ -298,6 +290,7 @@ Public Class dlgSummaryTables End If bRCodeSet = True FillListView() + SetDefaultValues() End Sub Private Sub TestOKEnabled() @@ -379,69 +372,70 @@ Public Class dlgSummaryTables Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, - ucrReceiverFactors.ControlValueChanged + ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged cmdSummaries.Visible = rdoSummaryTable.Checked cmdFormatTable.Location = New Point(286, If(rdoSummaryTable.Checked, 464, 273)) If rdoFrequencyTable.Checked Then grpDisplay.Visible = False - rdoVariable.Visible = False - clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0) - clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=1) - ucrSaveTable.SetPrefix("frequency_table") - rdoColumnFactors.Text = "Summary-Variable" + ' rdoVariable.Visible = False + ' clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0) + ' clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=1) + ' ucrSaveTable.SetPrefix("frequency_table") + ' rdoColumnFactors.Text = "Summary-Variable" Else grpDisplay.Visible = True - clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) - clsDummyFunction.AddParameter("rdo_checked", "rdoSummary", iPosition:=1) - ucrSaveTable.SetPrefix("summary_table") - If ucrChkSummaries.Checked Then - rdoColumnFactors.Text = "Summary" - rdoVariable.Visible = True - Else - rdoColumnFactors.Text = "Summary-Variable" - rdoVariable.Visible = False - End If - End If - If bRCodeSet Then - If rdoNoColumnFactor.Checked Then - clsSummaryOperator.RemoveParameterByName("col_factor") - clsFrequencyOperator.RemoveParameterByName("col_factor") - clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) - Else - clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - If rdoFactorVariable.Checked Then - ucrReceiverColumnFactor.SetMeAsReceiver() - clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) - clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) - ElseIf rdoColumnFactors.Checked Then - clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) - If rdoFrequencyTable.Checked Then - varsString() - Else - If ucrChkSummaries.Checked Then - clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) - Else - clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) - End If - End If - ElseIf rdoVariable.Checked Then - clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) - clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) - End If - End If - End If - - If rdoVariable.Checked Then - If Not ucrChkSummaries.Checked Then - rdoColumnFactors.Checked = True - Else - rdoVariable.Checked = True - End If + ' clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) + ' clsDummyFunction.AddParameter("rdo_checked", "rdoSummary", iPosition:=1) + ' ucrSaveTable.SetPrefix("summary_table") + ' If ucrChkSummaries.Checked Then + ' rdoColumnFactors.Text = "Summary" + ' rdoVariable.Visible = True + ' Else + ' rdoColumnFactors.Text = "Summary-Variable" + ' rdoVariable.Visible = False + ' End If End If + 'If bRCodeSet Then + ' If rdoNoColumnFactor.Checked Then + ' clsSummaryOperator.RemoveParameterByName("col_factor") + ' clsFrequencyOperator.RemoveParameterByName("col_factor") + ' clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) + ' Else + ' clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + ' clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + ' If rdoFactorVariable.Checked Then + ' ucrReceiverColumnFactor.SetMeAsReceiver() + ' clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) + ' clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) + ' ElseIf rdoColumnFactors.Checked Then + ' clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) + ' If rdoFrequencyTable.Checked Then + ' varsString() + ' Else + ' If ucrChkSummaries.Checked Then + ' clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) + ' Else + ' clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) + ' End If + ' End If + ' ElseIf rdoVariable.Checked Then + ' clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) + ' clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) + ' End If + ' End If + 'End If + + 'If rdoVariable.Checked Then + ' If Not ucrChkSummaries.Checked Then + ' rdoColumnFactors.Checked = True + ' Else + ' rdoVariable.Checked = True + ' End If + 'End If AddingColumnFactor() DialogueSize() varsString() + SetDefaultValues() End Sub Private Sub FillListView() @@ -523,29 +517,63 @@ Public Class dlgSummaryTables End If End Sub - Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged - ' Get the total count of selected variables in the ucrReceiverFactors - Dim selectedVariables As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control - Dim selectedCount As Integer = selectedVariables.Count - ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables - If selectedCount > 0 Then - ' Set Maximum based on the number of variables in the receiver - ucrNudColFactors.Maximum = selectedCount - - ' Ensure the current Value does not exceed the Maximum - If ucrNudColFactors.Value > selectedCount Then - ucrNudColFactors.Value = selectedCount ' Adjust value to the max if it exceeds - End If + Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged, ucrReceiverSummaryCols.SelectionChanged, ucrReorderSummary.SelectedIndexChanged + SetDefaultValues() + End Sub + + Private Sub SetDefaultValues() + ' Count variables in each relevant receiver + If rdoSummaryTable.Checked Then + Dim selectedColumns As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control - ' Set Minimum (if applicable) - ucrNudColFactors.Minimum = 1 + Dim countFactors As Integer = selectedColumns.Count + Dim countSummaryCols As Integer = ucrReceiverSummaryCols.Count + Dim countSummaries As Integer = ucrReorderSummary.Count + ' Set default for ucrNudVariables + If countSummaryCols > 1 Then + ucrNudPositionVar.Value = countFactors + 1 + Else + ucrNudPositionVar.Value = countFactors + End If + + ' Set default for ucrNudSummaries + ucrNudPositionSum.Value = countFactors + If countSummaryCols > 1 Then ucrNudPositionSum.Value += 1 + If countSummaries > 1 Then ucrNudPositionSum.Value += 1 + + ' Set minimum and maximum for ucrNudColFactors + UcrNudColumnSumFactors.Minimum = 0 + UcrNudColumnSumFactors.Maximum = countFactors + If countSummaryCols > 1 And countSummaries > 1 Then + UcrNudColumnSumFactors.Maximum += 2 + ElseIf countSummaryCols > 1 Or countSummaries > 1 Then + UcrNudColumnSumFactors.Maximum += 1 + End If Else - ' If no variables are selected, set Minimum, Maximum, and Value to 1 - ucrNudColFactors.Minimum = 1 - ucrNudColFactors.Maximum = 1 - ucrNudColFactors.Value = 1 + Dim selectedVariables As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control + Dim selectedCount As Integer = selectedVariables.Count + ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables + If selectedCount > 0 Then + ' Set Maximum based on the number of variables in the receiver + ucrNudColFactors.Maximum = selectedCount + + ' Ensure the current Value does not exceed the Maximum + If ucrNudColFactors.Value > selectedCount Then + ucrNudColFactors.Value = selectedCount ' Adjust value to the max if it exceeds + End If + + ' Set Minimum (if applicable) + ucrNudColFactors.Minimum = 1 + + Else + ' If no variables are selected, set Minimum, Maximum, and Value to 1 + ucrNudColFactors.Minimum = 1 + ucrNudColFactors.Maximum = 1 + ucrNudColFactors.Value = 1 + End If End If + End Sub Private Sub AddingColumnFactor() @@ -553,25 +581,25 @@ Public Class dlgSummaryTables Dim iXVarCount As Integer iXVarCount = lstVariables.Count - If bRCodeSet Then - If lstVariables.Contains(ucrReceiverColumnFactor.GetVariableNames(False)) OrElse - Not ucrReceiverFactors.GetVariableNamesAsList().Contains(ucrReceiverColumnFactor.GetVariableNames(False)) Then - ucrReceiverColumnFactor.Clear() - ucrReceiverFactors.SetMeAsReceiver() - End If - If iXVarCount = 0 AndAlso ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 AndAlso - ucrReceiverColumnFactor.IsEmpty() Then - ucrReceiverColumnFactor.Add(ucrReceiverFactors.lstSelectedVariables.Items(0).Text) - ucrReceiverFactors.SetMeAsReceiver() - ElseIf ucrReceiverFactors.IsEmpty Then - ucrReceiverColumnFactor.Clear() - End If - lstVariables = ucrReceiverFactors.GetVariableNamesAsList() - If ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 Then - Dim iIndex = ucrReceiverFactors.lstSelectedVariables.Items.Count - 1 - ucrReceiverPercentages.Add(ucrReceiverFactors.lstSelectedVariables.Items(iIndex).Text) - ucrReceiverFactors.SetMeAsReceiver() - End If - End If + ' If bRCodeSet Then + ' If lstVariables.Contains(ucrReceiverColumnFactor.GetVariableNames(False)) OrElse + ' Not ucrReceiverFactors.GetVariableNamesAsList().Contains(ucrReceiverColumnFactor.GetVariableNames(False)) Then + ' ucrReceiverColumnFactor.Clear() + ' ucrReceiverFactors.SetMeAsReceiver() + ' End If + ' If iXVarCount = 0 AndAlso ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 AndAlso + ' ucrReceiverColumnFactor.IsEmpty() Then + ' ucrReceiverColumnFactor.Add(ucrReceiverFactors.lstSelectedVariables.Items(0).Text) + ' ucrReceiverFactors.SetMeAsReceiver() + ' ElseIf ucrReceiverFactors.IsEmpty Then + ' ucrReceiverColumnFactor.Clear() + ' End If + ' lstVariables = ucrReceiverFactors.GetVariableNamesAsList() + ' If ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 Then + ' Dim iIndex = ucrReceiverFactors.lstSelectedVariables.Items.Count - 1 + ' ucrReceiverPercentages.Add(ucrReceiverFactors.lstSelectedVariables.Items(iIndex).Text) + ' ucrReceiverFactors.SetMeAsReceiver() + ' End If + ' End If End Sub End Class From 925839d87792ce61e2fe44f6be5cc6fd9e39eb42 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:08:41 +0300 Subject: [PATCH 27/77] changesv --- instat/dlgView.vb | 192 ++++++++++++++++++++++++++++------------------ 1 file changed, 116 insertions(+), 76 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 47d17a40b4f..b5a8c77071d 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -18,7 +18,7 @@ Imports System.Windows Imports instat.Translations Public Class dlgView - Private clsBaseOperator, clsBaseOperatorView As New ROperator + Private clsBaseOperator As New ROperator Private bFirstLoad As Boolean = True Private bReset As Boolean = True @@ -45,7 +45,7 @@ Public Class dlgView ucrBase.clsRsyntax.bSeparateThread = False ' ucrReceiverView.SetParameter(New RParameter("x", 0)) - ucrReceiverView.SetParameter(New RParameter("df_columns_to_use_param", 0, bNewIncludeArgumentName:=False)) + ' ucrReceiverView.SetParameter(New RParameter("df_columns_to_use_param", 0, bNewIncludeArgumentName:=False)) ucrReceiverView.SetParameterIsRFunction() @@ -63,7 +63,9 @@ Public Class dlgView ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ' ucrNudNumberRows.Minimum = 1 ucrChkRowNumbers.SetText("Rows") ' ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) @@ -106,7 +108,7 @@ Public Class dlgView 'The sort column checkbox and receiver set to be invisible since the method for allowing variables in receiver1 to be strictly the same variables in receiver2 is yet to be implemented. 'ucrChkSortColumn.SetParameter(ucrReceiverSortCol.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - ucrSelectorForView.SetParameter(New RParameter("title", 1)) + ' ucrSelectorForView.SetParameter(New RParameter("title", 1)) ucrSelectorForView.SetParameterIsString() ucrSaveData.SetCheckBoxText("Store Data") @@ -116,6 +118,7 @@ Public Class dlgView ucrSaveData.SetIsComboBox() ucrSaveData.SetAssignToIfUncheckedValue("last_table") + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False End Sub Private Sub SetDefaults() @@ -123,7 +126,7 @@ Public Class dlgView 'clsBaseOperatorView = New ROperator clsOutputWindowFunction = New RFunction clsViewColumnsFunction = New RFunction - clsHTMLFunction = New RFunction + ' clsHTMLFunction = New RFunction ' clsViewAllFunction = New RFunction clsGetObjectDataFunction = New RFunction clsHeadRFunction = New RFunction @@ -150,49 +153,29 @@ Public Class dlgView strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, strObjectName:="last_table") - - clsHTMLFunction.SetPackageName("formattable") - clsHTMLFunction.SetRCommand("formattable") - clsHTMLFunction.AddParameter("align", Chr(34) & "l" & Chr(34), iPosition:=1) - - - clsAsHtmlWidgetFunction.SetPackageName("formattable") - clsAsHtmlWidgetFunction.SetRCommand("as.htmlwidget") - clsAsHtmlWidgetFunction.AddParameter("x", clsRFunctionParameter:=clsHTMLFunction, iPosition:=0) - clsAsHtmlWidgetFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - strRObjectFormatToAssignTo:=RObjectFormat.Html, - strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, - strObjectName:="last_table") - - clsViewColumnsFunction.SetPackageName("utils") - clsViewColumnsFunction.SetRCommand("View") - 'clsViewAllFunction.SetPackageName("utils") 'clsViewAllFunction.SetRCommand("View") 'clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + 'ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=1) + 'ucrSelectorForView.AddAdditionalCodeParameterPair(clsBaseOperator, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) + 'ucrSaveData.AddAdditionalRCode(clsBaseOperator, iAdditionalPairNo:=1) + 'clsBaseOperator.SetOperation("%>%") + 'clsBaseOperator.bBrackets = False - clsBaseOperator.SetOperation("%>%") - clsBaseOperator.bBrackets = False - - clsHeadRFunction.SetPackageName("utils") - clsHeadRFunction.SetRCommand("head") - clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=1, bIncludeArgumentName:=False) - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) + 'clsHeadRFunction.SetPackageName("utils") + 'clsHeadRFunction.SetRCommand("head") + 'clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=3, bIncludeArgumentName:=False) + 'clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=4, bIncludeArgumentName:=False) - clsGtRFunction.SetPackageName("gt") - clsGtRFunction.SetRCommand("gt") - clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=3, bIncludeArgumentName:=False) + 'clsGtRFunction.SetPackageName("gt") + 'clsGtRFunction.SetRCommand("gt") + 'clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=5, bIncludeArgumentName:=False) - clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - strRObjectFormatToAssignTo:=RObjectFormat.Html, - strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, - strObjectName:="last_table") - - ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) - ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + clsViewColumnsFunction.SetPackageName("utils") + clsViewColumnsFunction.SetRCommand("View") + ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) + ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -203,20 +186,24 @@ Public Class dlgView 'ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("mydf"), iAdditionalPairNo:=1) - ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1) - ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=2) - ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=3) + ' ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1) - ucrSelectorForView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) + ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=1) + ucrSelectorForView.AddAdditionalCodeParameterPair( clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) ucrSaveData.AddAdditionalRCode(clsOutputWindowFunction, iAdditionalPairNo:=1) + 'ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("operation"), iAdditionalPairNo:=1) + ' ucrSelectorForView.AddAdditionalCodeParameterPair(clsBaseOperator, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=2) + ' ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=2) + 'ucrSaveData.AddAdditionalRCode(clsBaseOperator, iAdditionalPairNo:=2) + ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) ucrViewChkPreview.SetRCode(clsBaseOperator, bReset) ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) - 'ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) + ucrSelectorForView.SetRCode(clsBaseOperator, bReset) ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) DataFrameLength() @@ -271,16 +258,13 @@ Public Class dlgView ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - If Not ucrChkRowNumbers.Checked Then - cmdTableOptions.Visible = True - ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength - ElseIf ucrChkDisplayFromTop.Checked Then + If ucrChkDisplayFromTop.Checked Then clsOutputWindowFunction.SetRCommand("head") Else clsOutputWindowFunction.SetRCommand("tail") - End If - Else - ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) + End If + Else + ucrBase.clsRsyntax.SetBaseRFunction(ucrReceiverView.GetVariables(True)) End If ElseIf rdoDispSepOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) @@ -290,34 +274,90 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else + 'ucrReceiverView.SetParameter(New RParameter("x", 0)) clsDummyFunction.AddParameter("checked", "html", iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) - ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + ' ucrReceiverView.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) + 'ucrReceiverView.ClearAdditionalCodeParameterPairs() + ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("operation"), iAdditionalPairNo:=1) + ' ucrReceiverView.AddAdditionalCodeParameterPair(New RParameter("x"), iAdditionalPairNo:=2) + 'ucrReceiverView.AddAdditionalCodeParameterPair("x", +2) + clsBaseOperator.SetOperation("%>%") + clsBaseOperator.bBrackets = False + + clsHeadRFunction.SetPackageName("utils") + clsHeadRFunction.SetRCommand("head") + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=0, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + + clsGtRFunction.SetPackageName("gt") + clsGtRFunction.SetRCommand("gt") + clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, + strObjectName:="last_table") + + + 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + + 'ucrReceiverView.SetParameter(New RParameter("df_columns_to_use_param", 0, bNewIncludeArgumentName:=False)) + ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + 'clsBaseOperator.SetOperation("%>%") + ' clsBaseOperator.bBrackets = False + + ' clsHeadRFunction.SetPackageName("utils") + ' clsHeadRFunction.SetRCommand("head") + 'clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=4, bIncludeArgumentName:=False) + 'clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=5, bIncludeArgumentName:=False) + + 'clsGtRFunction.SetPackageName("gt") + ' clsGtRFunction.SetRCommand("gt") + 'clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=6, bIncludeArgumentName:=False) + 'clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + ' strRObjectFormatToAssignTo:=RObjectFormat.Html, + ' strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, + ' strObjectName:="last_table") + cmdTableOptions.Visible = True ucrSaveData.Visible = True - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - If ucrViewChkPreview.Checked Then - ucrReceiverView.bForceAsDataFrame = False - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - End If + + + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + 'If ucrViewChkPreview.Checked Then + ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + 'Else + ' clsBaseOperator.RemoveParameterByName("head") + 'End If End If + + ' ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) + ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + + + 'If ucrViewChkPreview.Checked Then + ' ucrReceiverView.bForceAsDataFrame = False + ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + ' ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + 'End If + End Sub Private Sub DataFrameLength() ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength End Sub - Private Sub ucrViewChkPreview_Load(sender As Object, e As EventArgs) Handles ucrViewChkPreview.Load - If ucrViewChkPreview.Checked Then - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) - Else - clsBaseOperator.RemoveParameterByName("head") - End If - End Sub + 'Private Sub ucrViewChkPreview_Load(sender As Object, e As EventArgs) Handles ucrViewChkPreview.Load + ' If ucrViewChkPreview.Checked Then + ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) + ' Else + ' clsBaseOperator.RemoveParameterByName("head") + ' End If + 'End Sub 'Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load ' If ucrViewChkPreview.Checked Then @@ -380,13 +420,13 @@ Public Class dlgView Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) ElseIf rdoHTMLOutputWindow.Checked Then - clsOutputWindowFunction.SetRCommand("head") - Dim strPrefix As String = clsAsHtmlWidgetFunction.GetRObjectToAssignTo + ' clsOutputWindowFunction.SetRCommand("head") + Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - If ucrViewChkPreview.Checked Then - strPrefix = clsBaseOperator.GetRObjectToAssignTo - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - End If + 'If ucrViewChkPreview.Checked Then + ' strPrefix = clsBaseOperator.GetRObjectToAssignTo + ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + 'End If End If End Sub From d2698bb7780a2b328ea45b59f8698101ef08d648 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 28 Oct 2024 15:16:34 +0300 Subject: [PATCH 28/77] changes to the code --- instat/dlgSummaryTables.Designer.vb | 621 ++++++++++++++-------------- instat/dlgSummaryTables.resx | 6 +- instat/dlgSummaryTables.vb | 208 ++++------ 3 files changed, 402 insertions(+), 433 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index 314acf7fe43..55724acb1b2 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -42,53 +42,52 @@ Partial Class dlgSummaryTables Me.lblFactors = New System.Windows.Forms.Label() Me.cmdSummaries = New System.Windows.Forms.Button() Me.grpDisplay = New System.Windows.Forms.GroupBox() + Me.lblColumnSummariesFactors = New System.Windows.Forms.Label() Me.lblPositionSum = New System.Windows.Forms.Label() Me.lblPositionVar = New System.Windows.Forms.Label() - Me.ucrNudPositionVar = New instat.ucrNud() - Me.ucrNudPositionSum = New instat.ucrNud() - Me.rdoVariable = New System.Windows.Forms.RadioButton() Me.grpMargin = New System.Windows.Forms.GroupBox() Me.rdoBoth = New System.Windows.Forms.RadioButton() Me.rdoSummary = New System.Windows.Forms.RadioButton() Me.rdoOuter = New System.Windows.Forms.RadioButton() - Me.ucrPnlMargin = New instat.UcrPanel() Me.lblMarginName = New System.Windows.Forms.Label() Me.lblVariables = New System.Windows.Forms.Label() Me.cmdFormatTable = New System.Windows.Forms.Button() Me.rdoFrequencyTable = New System.Windows.Forms.RadioButton() Me.rdoSummaryTable = New System.Windows.Forms.RadioButton() Me.grpPercentages = New System.Windows.Forms.GroupBox() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() Me.lblFactorsAsPercentage = New System.Windows.Forms.Label() - Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.lblFrequencyMarginName = New System.Windows.Forms.Label() Me.cmdMissingOptions = New System.Windows.Forms.Button() - Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck() + Me.rdoMultipleResponse = New System.Windows.Forms.RadioButton() + Me.ttMultipleResponse = New System.Windows.Forms.ToolTip(Me.components) + Me.lblSigFigs = New System.Windows.Forms.Label() + Me.lblColumnFactors = New System.Windows.Forms.Label() + Me.btnMoreOptions = New System.Windows.Forms.Button() + Me.ucrNudColFactors = New instat.ucrNud() + Me.ucrNudSigFigs = New instat.ucrNud() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() + Me.ucrChkPercentageProportion = New instat.ucrCheck() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.ucrPnlSummaryFrequencyTables = New instat.UcrPanel() + Me.ucrReorderSummary = New instat.ucrReorder() Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.ucrSaveTable = New instat.ucrSave() Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkStoreResults = New instat.ucrCheck() Me.ucrChkDisplayMargins = New instat.ucrCheck() + Me.UcrNudColumnSumFactors = New instat.ucrNud() + Me.ucrNudPositionVar = New instat.ucrNud() + Me.ucrNudPositionSum = New instat.ucrNud() Me.ucrChkSummaries = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverSummaryCols = New instat.ucrReceiverMultiple() Me.ucrReceiverFactors = New instat.ucrReceiverMultiple() Me.ucrReceiverWeights = New instat.ucrReceiverSingle() Me.ucrChkWeight = New instat.ucrCheck() - Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox() - Me.rdoMultipleResponse = New System.Windows.Forms.RadioButton() - Me.ttMultipleResponse = New System.Windows.Forms.ToolTip(Me.components) - Me.ucrReorderSummary = New instat.ucrReorder() Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrNudSigFigs = New instat.ucrNud() - Me.lblSigFigs = New System.Windows.Forms.Label() - Me.ucrNudColFactors = New instat.ucrNud() - Me.lblColumnFactors = New System.Windows.Forms.Label() - Me.btnMoreOptions = New System.Windows.Forms.Button() - Me.UcrNudColumnSumFactors = New instat.ucrNud() - Me.lblColumnSummariesFactors = New System.Windows.Forms.Label() + Me.ucrPnlMargin = New instat.UcrPanel() + Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox() + Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck() Me.grpDisplay.SuspendLayout() Me.grpMargin.SuspendLayout() Me.grpPercentages.SuspendLayout() @@ -98,9 +97,10 @@ Partial Class dlgSummaryTables ' Me.lblFactors.AutoSize = True Me.lblFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactors.Location = New System.Drawing.Point(286, 43) + Me.lblFactors.Location = New System.Drawing.Point(429, 64) + Me.lblFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactors.Name = "lblFactors" - Me.lblFactors.Size = New System.Drawing.Size(48, 13) + Me.lblFactors.Size = New System.Drawing.Size(71, 20) Me.lblFactors.TabIndex = 1 Me.lblFactors.Tag = "Factors:" Me.lblFactors.Text = "Factors :" @@ -108,9 +108,10 @@ Partial Class dlgSummaryTables 'cmdSummaries ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSummaries.Location = New System.Drawing.Point(286, 280) + Me.cmdSummaries.Location = New System.Drawing.Point(429, 420) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(104, 23) + Me.cmdSummaries.Size = New System.Drawing.Size(156, 34) Me.cmdSummaries.TabIndex = 13 Me.cmdSummaries.Text = "Summaries..." Me.cmdSummaries.UseVisualStyleBackColor = True @@ -123,21 +124,35 @@ Partial Class dlgSummaryTables Me.grpDisplay.Controls.Add(Me.lblPositionVar) Me.grpDisplay.Controls.Add(Me.ucrNudPositionVar) Me.grpDisplay.Controls.Add(Me.ucrNudPositionSum) - Me.grpDisplay.Controls.Add(Me.rdoVariable) - Me.grpDisplay.Location = New System.Drawing.Point(10, 398) + Me.grpDisplay.Location = New System.Drawing.Point(15, 597) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Size = New System.Drawing.Size(270, 103) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Size = New System.Drawing.Size(405, 133) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Layout" ' + 'lblColumnSummariesFactors + ' + Me.lblColumnSummariesFactors.AutoSize = True + Me.lblColumnSummariesFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColumnSummariesFactors.Location = New System.Drawing.Point(9, 24) + Me.lblColumnSummariesFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblColumnSummariesFactors.Name = "lblColumnSummariesFactors" + Me.lblColumnSummariesFactors.Size = New System.Drawing.Size(137, 20) + Me.lblColumnSummariesFactors.TabIndex = 38 + Me.lblColumnSummariesFactors.Tag = "Significant_Figures:" + Me.lblColumnSummariesFactors.Text = "Column ""Factors"":" + ' 'lblPositionSum ' Me.lblPositionSum.AutoSize = True Me.lblPositionSum.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPositionSum.Location = New System.Drawing.Point(3, 61) + Me.lblPositionSum.Location = New System.Drawing.Point(4, 92) + Me.lblPositionSum.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblPositionSum.Name = "lblPositionSum" - Me.lblPositionSum.Size = New System.Drawing.Size(113, 13) + Me.lblPositionSum.Size = New System.Drawing.Size(171, 20) Me.lblPositionSum.TabIndex = 36 Me.lblPositionSum.Tag = "Significant_Figures:" Me.lblPositionSum.Text = "Position of Summaries:" @@ -146,61 +161,25 @@ Partial Class dlgSummaryTables ' Me.lblPositionVar.AutoSize = True Me.lblPositionVar.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPositionVar.Location = New System.Drawing.Point(7, 38) + Me.lblPositionVar.Location = New System.Drawing.Point(10, 57) + Me.lblPositionVar.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblPositionVar.Name = "lblPositionVar" - Me.lblPositionVar.Size = New System.Drawing.Size(105, 13) + Me.lblPositionVar.Size = New System.Drawing.Size(157, 20) Me.lblPositionVar.TabIndex = 35 Me.lblPositionVar.Tag = "Significant_Figures:" Me.lblPositionVar.Text = "Position of Variables:" ' - 'ucrNudPositionVar - ' - Me.ucrNudPositionVar.AutoSize = True - Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPositionVar.Location = New System.Drawing.Point(122, 35) - Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(6) - Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionVar.Name = "ucrNudPositionVar" - Me.ucrNudPositionVar.Size = New System.Drawing.Size(50, 20) - Me.ucrNudPositionVar.TabIndex = 34 - Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudPositionSum - ' - Me.ucrNudPositionSum.AutoSize = True - Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPositionSum.Location = New System.Drawing.Point(123, 59) - Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(6) - Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionSum.Name = "ucrNudPositionSum" - Me.ucrNudPositionSum.Size = New System.Drawing.Size(50, 20) - Me.ucrNudPositionSum.TabIndex = 33 - Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'rdoVariable - ' - Me.rdoVariable.AutoSize = True - Me.rdoVariable.Location = New System.Drawing.Point(14, 93) - Me.rdoVariable.Name = "rdoVariable" - Me.rdoVariable.Size = New System.Drawing.Size(63, 17) - Me.rdoVariable.TabIndex = 32 - Me.rdoVariable.TabStop = True - Me.rdoVariable.Text = "Variable" - Me.rdoVariable.UseVisualStyleBackColor = True - ' 'grpMargin ' Me.grpMargin.Controls.Add(Me.rdoBoth) Me.grpMargin.Controls.Add(Me.rdoSummary) Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) - Me.grpMargin.Location = New System.Drawing.Point(10, 320) + Me.grpMargin.Location = New System.Drawing.Point(15, 480) + Me.grpMargin.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpMargin.Name = "grpMargin" - Me.grpMargin.Size = New System.Drawing.Size(213, 40) + Me.grpMargin.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpMargin.Size = New System.Drawing.Size(320, 60) Me.grpMargin.TabIndex = 13 Me.grpMargin.TabStop = False ' @@ -208,9 +187,10 @@ Partial Class dlgSummaryTables ' Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoBoth.Location = New System.Drawing.Point(140, 24) + Me.rdoBoth.Location = New System.Drawing.Point(210, 36) + Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoBoth.Name = "rdoBoth" - Me.rdoBoth.Size = New System.Drawing.Size(47, 17) + Me.rdoBoth.Size = New System.Drawing.Size(68, 24) Me.rdoBoth.TabIndex = 16 Me.rdoBoth.TabStop = True Me.rdoBoth.Text = "Both" @@ -220,9 +200,10 @@ Partial Class dlgSummaryTables ' Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummary.Location = New System.Drawing.Point(67, 24) + Me.rdoSummary.Location = New System.Drawing.Point(100, 36) + Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.Size = New System.Drawing.Size(68, 17) + Me.rdoSummary.Size = New System.Drawing.Size(101, 24) Me.rdoSummary.TabIndex = 16 Me.rdoSummary.TabStop = True Me.rdoSummary.Text = "Summary" @@ -232,31 +213,23 @@ Partial Class dlgSummaryTables ' Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoOuter.Location = New System.Drawing.Point(10, 24) + Me.rdoOuter.Location = New System.Drawing.Point(15, 36) + Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoOuter.Name = "rdoOuter" - Me.rdoOuter.Size = New System.Drawing.Size(51, 17) + Me.rdoOuter.Size = New System.Drawing.Size(74, 24) Me.rdoOuter.TabIndex = 15 Me.rdoOuter.TabStop = True Me.rdoOuter.Text = "Outer" Me.rdoOuter.UseVisualStyleBackColor = True ' - 'ucrPnlMargin - ' - Me.ucrPnlMargin.AutoSize = True - Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMargin.Location = New System.Drawing.Point(6, 14) - Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(6) - Me.ucrPnlMargin.Name = "ucrPnlMargin" - Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) - Me.ucrPnlMargin.TabIndex = 13 - ' 'lblMarginName ' Me.lblMarginName.AutoSize = True Me.lblMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMarginName.Location = New System.Drawing.Point(159, 301) + Me.lblMarginName.Location = New System.Drawing.Point(238, 452) + Me.lblMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblMarginName.Name = "lblMarginName" - Me.lblMarginName.Size = New System.Drawing.Size(41, 13) + Me.lblMarginName.Size = New System.Drawing.Size(59, 20) Me.lblMarginName.TabIndex = 15 Me.lblMarginName.Text = "Name :" ' @@ -264,9 +237,10 @@ Partial Class dlgSummaryTables ' Me.lblVariables.AutoSize = True Me.lblVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblVariables.Location = New System.Drawing.Point(285, 162) + Me.lblVariables.Location = New System.Drawing.Point(428, 243) + Me.lblVariables.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblVariables.Name = "lblVariables" - Me.lblVariables.Size = New System.Drawing.Size(56, 13) + Me.lblVariables.Size = New System.Drawing.Size(83, 20) Me.lblVariables.TabIndex = 17 Me.lblVariables.Tag = "" Me.lblVariables.Text = "Variables :" @@ -274,9 +248,10 @@ Partial Class dlgSummaryTables 'cmdFormatTable ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFormatTable.Location = New System.Drawing.Point(286, 464) + Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdFormatTable.Name = "cmdFormatTable" - Me.cmdFormatTable.Size = New System.Drawing.Size(104, 23) + Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) Me.cmdFormatTable.TabIndex = 19 Me.cmdFormatTable.Text = "Format Table..." Me.cmdFormatTable.UseVisualStyleBackColor = True @@ -290,9 +265,10 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFrequencyTable.Location = New System.Drawing.Point(51, 0) + Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 0) + Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" - Me.rdoFrequencyTable.Size = New System.Drawing.Size(129, 27) + Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40) Me.rdoFrequencyTable.TabIndex = 22 Me.rdoFrequencyTable.TabStop = True Me.rdoFrequencyTable.Text = "Frequency" @@ -307,9 +283,10 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSummaryTable.Location = New System.Drawing.Point(178, 0) + Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 0) + Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoSummaryTable.Name = "rdoSummaryTable" - Me.rdoSummaryTable.Size = New System.Drawing.Size(133, 27) + Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40) Me.rdoSummaryTable.TabIndex = 21 Me.rdoSummaryTable.TabStop = True Me.rdoSummaryTable.Text = "Summary" @@ -322,176 +299,306 @@ Partial Class dlgSummaryTables Me.grpPercentages.Controls.Add(Me.lblFactorsAsPercentage) Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpPercentages.Location = New System.Drawing.Point(286, 178) + Me.grpPercentages.Location = New System.Drawing.Point(429, 267) + Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.grpPercentages.Name = "grpPercentages" - Me.grpPercentages.Size = New System.Drawing.Size(174, 89) + Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpPercentages.Size = New System.Drawing.Size(261, 134) Me.grpPercentages.TabIndex = 23 Me.grpPercentages.TabStop = False Me.grpPercentages.Text = "Percentages" ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Me - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(16, 60) - Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" - Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverPercentages.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 4 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' 'lblFactorsAsPercentage ' Me.lblFactorsAsPercentage.AutoSize = True Me.lblFactorsAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(18, 44) + Me.lblFactorsAsPercentage.Location = New System.Drawing.Point(27, 66) + Me.lblFactorsAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFactorsAsPercentage.Name = "lblFactorsAsPercentage" - Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(100, 13) + Me.lblFactorsAsPercentage.Size = New System.Drawing.Size(150, 20) Me.lblFactorsAsPercentage.TabIndex = 1 Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" Me.lblFactorsAsPercentage.Text = "of Factor (Optional):" ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(5, 171) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(6) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(160, 34) - Me.ucrChkPercentageProportion.TabIndex = 3 - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 19) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(135, 34) - Me.ucrChkDisplayAsPercentage.TabIndex = 0 - ' 'lblFrequencyMarginName ' Me.lblFrequencyMarginName.AutoSize = True Me.lblFrequencyMarginName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFrequencyMarginName.Location = New System.Drawing.Point(7, 275) + Me.lblFrequencyMarginName.Location = New System.Drawing.Point(10, 412) + Me.lblFrequencyMarginName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblFrequencyMarginName.Name = "lblFrequencyMarginName" - Me.lblFrequencyMarginName.Size = New System.Drawing.Size(76, 13) + Me.lblFrequencyMarginName.Size = New System.Drawing.Size(111, 20) Me.lblFrequencyMarginName.TabIndex = 25 Me.lblFrequencyMarginName.Text = "Margin Name :" ' 'cmdMissingOptions ' Me.cmdMissingOptions.Enabled = False - Me.cmdMissingOptions.Location = New System.Drawing.Point(205, 271) + Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 406) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdMissingOptions.Name = "cmdMissingOptions" - Me.cmdMissingOptions.Size = New System.Drawing.Size(75, 23) + Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34) Me.cmdMissingOptions.TabIndex = 27 Me.cmdMissingOptions.Text = "Options" Me.cmdMissingOptions.UseVisualStyleBackColor = True ' - 'ucrChkFrequencyDisplayMargins + 'rdoMultipleResponse ' - Me.ucrChkFrequencyDisplayMargins.AutoSize = True - Me.ucrChkFrequencyDisplayMargins.Checked = False - Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(10, 255) - Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(6) - Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" - Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(213, 23) - Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 + Me.rdoMultipleResponse.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoMultipleResponse.Enabled = False + Me.rdoMultipleResponse.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMultipleResponse.FlatAppearance.BorderSize = 2 + Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 0) + Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoMultipleResponse.Name = "rdoMultipleResponse" + Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40) + Me.rdoMultipleResponse.TabIndex = 28 + Me.rdoMultipleResponse.TabStop = True + Me.rdoMultipleResponse.Text = "Multiple Response" + Me.rdoMultipleResponse.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.ttMultipleResponse.SetToolTip(Me.rdoMultipleResponse, "Not Yet Available") + Me.rdoMultipleResponse.UseVisualStyleBackColor = True + ' + 'lblSigFigs + ' + Me.lblSigFigs.AutoSize = True + Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSigFigs.Location = New System.Drawing.Point(22, 538) + Me.lblSigFigs.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSigFigs.Name = "lblSigFigs" + Me.lblSigFigs.Size = New System.Drawing.Size(144, 20) + Me.lblSigFigs.TabIndex = 29 + Me.lblSigFigs.Tag = "Significant_Figures:" + Me.lblSigFigs.Text = "Significant Figures:" + ' + 'lblColumnFactors + ' + Me.lblColumnFactors.AutoSize = True + Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColumnFactors.Location = New System.Drawing.Point(34, 506) + Me.lblColumnFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblColumnFactors.Name = "lblColumnFactors" + Me.lblColumnFactors.Size = New System.Drawing.Size(125, 20) + Me.lblColumnFactors.TabIndex = 32 + Me.lblColumnFactors.Tag = "Significant_Figures:" + Me.lblColumnFactors.Text = "Column Factors:" + ' + 'btnMoreOptions + ' + Me.btnMoreOptions.Location = New System.Drawing.Point(15, 310) + Me.btnMoreOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.btnMoreOptions.Name = "btnMoreOptions" + Me.btnMoreOptions.Size = New System.Drawing.Size(212, 32) + Me.btnMoreOptions.TabIndex = 33 + Me.btnMoreOptions.Text = "Table Options" + Me.btnMoreOptions.UseVisualStyleBackColor = True + ' + 'ucrNudColFactors + ' + Me.ucrNudColFactors.AutoSize = True + Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudColFactors.Location = New System.Drawing.Point(178, 501) + Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudColFactors.Name = "ucrNudColFactors" + Me.ucrNudColFactors.Size = New System.Drawing.Size(75, 30) + Me.ucrNudColFactors.TabIndex = 31 + Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudSigFigs + ' + Me.ucrNudSigFigs.AutoSize = True + Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSigFigs.Location = New System.Drawing.Point(177, 534) + Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSigFigs.Name = "ucrNudSigFigs" + Me.ucrNudSigFigs.Size = New System.Drawing.Size(75, 30) + Me.ucrNudSigFigs.TabIndex = 30 + Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrReceiverPercentages + ' + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Nothing + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) + Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" + Me.ucrReceiverPercentages.Selector = Nothing + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverPercentages.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 4 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) + Me.ucrChkPercentageProportion.TabIndex = 3 + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) + Me.ucrChkDisplayAsPercentage.TabIndex = 0 ' 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(44, -4) - Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlSummaryFrequencyTables.Location = New System.Drawing.Point(66, -6) + Me.ucrPnlSummaryFrequencyTables.Margin = New System.Windows.Forms.Padding(9) Me.ucrPnlSummaryFrequencyTables.Name = "ucrPnlSummaryFrequencyTables" - Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(407, 33) + Me.ucrPnlSummaryFrequencyTables.Size = New System.Drawing.Size(610, 50) Me.ucrPnlSummaryFrequencyTables.TabIndex = 20 ' + 'ucrReorderSummary + ' + Me.ucrReorderSummary.AutoSize = True + Me.ucrReorderSummary.Location = New System.Drawing.Point(429, 458) + Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(9) + Me.ucrReorderSummary.Name = "ucrReorderSummary" + Me.ucrReorderSummary.Size = New System.Drawing.Size(300, 234) + Me.ucrReorderSummary.TabIndex = 18 + Me.ucrReorderSummary.ucrDataFrameList = Nothing + Me.ucrReorderSummary.ucrReceiver = Nothing + ' 'ucrInputMarginName ' Me.ucrInputMarginName.AddQuotesIfUnrecognised = True Me.ucrInputMarginName.AutoSize = True Me.ucrInputMarginName.IsMultiline = False Me.ucrInputMarginName.IsReadOnly = False - Me.ucrInputMarginName.Location = New System.Drawing.Point(206, 298) - Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputMarginName.Location = New System.Drawing.Point(309, 447) + Me.ucrInputMarginName.Margin = New System.Windows.Forms.Padding(14) Me.ucrInputMarginName.Name = "ucrInputMarginName" - Me.ucrInputMarginName.Size = New System.Drawing.Size(74, 21) + Me.ucrInputMarginName.Size = New System.Drawing.Size(111, 32) Me.ucrInputMarginName.TabIndex = 16 ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(10, 490) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveTable.Location = New System.Drawing.Point(15, 735) + Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24) + Me.ucrSaveTable.Size = New System.Drawing.Size(478, 36) Me.ucrSaveTable.TabIndex = 12 ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.AutoSize = True Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 276) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(15, 414) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(152, 23) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(228, 34) Me.ucrChkOmitMissing.TabIndex = 9 ' 'ucrChkStoreResults ' Me.ucrChkStoreResults.AutoSize = True Me.ucrChkStoreResults.Checked = False - Me.ucrChkStoreResults.Location = New System.Drawing.Point(10, 233) - Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkStoreResults.Location = New System.Drawing.Point(15, 350) + Me.ucrChkStoreResults.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkStoreResults.Name = "ucrChkStoreResults" - Me.ucrChkStoreResults.Size = New System.Drawing.Size(230, 23) + Me.ucrChkStoreResults.Size = New System.Drawing.Size(345, 34) Me.ucrChkStoreResults.TabIndex = 8 ' 'ucrChkDisplayMargins ' Me.ucrChkDisplayMargins.AutoSize = True Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(10, 300) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(15, 450) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(150, 23) + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) Me.ucrChkDisplayMargins.TabIndex = 10 ' + 'UcrNudColumnSumFactors + ' + Me.UcrNudColumnSumFactors.AutoSize = True + Me.UcrNudColumnSumFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Location = New System.Drawing.Point(183, 18) + Me.UcrNudColumnSumFactors.Margin = New System.Windows.Forms.Padding(9) + Me.UcrNudColumnSumFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Name = "UcrNudColumnSumFactors" + Me.UcrNudColumnSumFactors.Size = New System.Drawing.Size(75, 30) + Me.UcrNudColumnSumFactors.TabIndex = 37 + Me.UcrNudColumnSumFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudPositionVar + ' + Me.ucrNudPositionVar.AutoSize = True + Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionVar.Location = New System.Drawing.Point(183, 52) + Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Name = "ucrNudPositionVar" + Me.ucrNudPositionVar.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPositionVar.TabIndex = 34 + Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudPositionSum + ' + Me.ucrNudPositionSum.AutoSize = True + Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionSum.Location = New System.Drawing.Point(184, 88) + Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Name = "ucrNudPositionSum" + Me.ucrNudPositionSum.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPositionSum.TabIndex = 33 + Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'ucrChkSummaries ' Me.ucrChkSummaries.AutoSize = True Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(10, 254) - Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkSummaries.Location = New System.Drawing.Point(15, 381) + Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkSummaries.Name = "ucrChkSummaries" - Me.ucrChkSummaries.Size = New System.Drawing.Size(242, 23) + Me.ucrChkSummaries.Size = New System.Drawing.Size(363, 34) Me.ucrChkSummaries.TabIndex = 7 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 517) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Location = New System.Drawing.Point(15, 776) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.Size = New System.Drawing.Size(611, 77) Me.ucrBase.TabIndex = 14 ' 'ucrReceiverSummaryCols ' Me.ucrReceiverSummaryCols.AutoSize = True Me.ucrReceiverSummaryCols.frmParent = Me - Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(286, 178) + Me.ucrReceiverSummaryCols.Location = New System.Drawing.Point(429, 267) Me.ucrReceiverSummaryCols.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSummaryCols.Name = "ucrReceiverSummaryCols" Me.ucrReceiverSummaryCols.Selector = Nothing - Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverSummaryCols.Size = New System.Drawing.Size(180, 150) Me.ucrReceiverSummaryCols.strNcFilePath = "" Me.ucrReceiverSummaryCols.TabIndex = 4 Me.ucrReceiverSummaryCols.ucrSelector = Nothing @@ -500,11 +607,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverFactors.AutoSize = True Me.ucrReceiverFactors.frmParent = Me - Me.ucrReceiverFactors.Location = New System.Drawing.Point(286, 59) + Me.ucrReceiverFactors.Location = New System.Drawing.Point(429, 88) Me.ucrReceiverFactors.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFactors.Name = "ucrReceiverFactors" Me.ucrReceiverFactors.Selector = Nothing - Me.ucrReceiverFactors.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverFactors.Size = New System.Drawing.Size(180, 150) Me.ucrReceiverFactors.strNcFilePath = "" Me.ucrReceiverFactors.TabIndex = 2 Me.ucrReceiverFactors.ucrSelector = Nothing @@ -513,11 +620,11 @@ Partial Class dlgSummaryTables ' Me.ucrReceiverWeights.AutoSize = True Me.ucrReceiverWeights.frmParent = Me - Me.ucrReceiverWeights.Location = New System.Drawing.Point(109, 222) + Me.ucrReceiverWeights.Location = New System.Drawing.Point(164, 333) Me.ucrReceiverWeights.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWeights.Name = "ucrReceiverWeights" Me.ucrReceiverWeights.Selector = Nothing - Me.ucrReceiverWeights.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverWeights.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverWeights.strNcFilePath = "" Me.ucrReceiverWeights.TabIndex = 6 Me.ucrReceiverWeights.ucrSelector = Nothing @@ -526,156 +633,62 @@ Partial Class dlgSummaryTables ' Me.ucrChkWeight.AutoSize = True Me.ucrChkWeight.Checked = False - Me.ucrChkWeight.Location = New System.Drawing.Point(10, 222) - Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkWeight.Location = New System.Drawing.Point(15, 333) + Me.ucrChkWeight.Margin = New System.Windows.Forms.Padding(9) Me.ucrChkWeight.Name = "ucrChkWeight" - Me.ucrChkWeight.Size = New System.Drawing.Size(84, 23) + Me.ucrChkWeight.Size = New System.Drawing.Size(126, 34) Me.ucrChkWeight.TabIndex = 5 ' - 'ucrInputFrequencyMarginName - ' - Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True - Me.ucrInputFrequencyMarginName.AutoSize = True - Me.ucrInputFrequencyMarginName.IsMultiline = False - Me.ucrInputFrequencyMarginName.IsReadOnly = False - Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(92, 281) - Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(9) - Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" - Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(70, 21) - Me.ucrInputFrequencyMarginName.TabIndex = 26 - ' - 'rdoMultipleResponse - ' - Me.rdoMultipleResponse.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoMultipleResponse.Enabled = False - Me.rdoMultipleResponse.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultipleResponse.FlatAppearance.BorderSize = 2 - Me.rdoMultipleResponse.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleResponse.Location = New System.Drawing.Point(309, 0) - Me.rdoMultipleResponse.Name = "rdoMultipleResponse" - Me.rdoMultipleResponse.Size = New System.Drawing.Size(133, 27) - Me.rdoMultipleResponse.TabIndex = 28 - Me.rdoMultipleResponse.TabStop = True - Me.rdoMultipleResponse.Text = "Multiple Response" - Me.rdoMultipleResponse.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.ttMultipleResponse.SetToolTip(Me.rdoMultipleResponse, "Not Yet Available") - Me.rdoMultipleResponse.UseVisualStyleBackColor = True - ' - 'ucrReorderSummary - ' - Me.ucrReorderSummary.AutoSize = True - Me.ucrReorderSummary.Location = New System.Drawing.Point(286, 305) - Me.ucrReorderSummary.Margin = New System.Windows.Forms.Padding(6) - Me.ucrReorderSummary.Name = "ucrReorderSummary" - Me.ucrReorderSummary.Size = New System.Drawing.Size(200, 156) - Me.ucrReorderSummary.TabIndex = 18 - Me.ucrReorderSummary.ucrDataFrameList = Nothing - Me.ucrReorderSummary.ucrReceiver = Nothing - ' 'ucrSelectorSummaryTables ' Me.ucrSelectorSummaryTables.AutoSize = True Me.ucrSelectorSummaryTables.bDropUnusedFilterLevels = False Me.ucrSelectorSummaryTables.bShowHiddenColumns = False Me.ucrSelectorSummaryTables.bUseCurrentFilter = True - Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(10, 24) + Me.ucrSelectorSummaryTables.Location = New System.Drawing.Point(15, 36) Me.ucrSelectorSummaryTables.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSummaryTables.Name = "ucrSelectorSummaryTables" - Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274) Me.ucrSelectorSummaryTables.TabIndex = 0 ' - 'ucrNudSigFigs - ' - Me.ucrNudSigFigs.AutoSize = True - Me.ucrNudSigFigs.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSigFigs.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSigFigs.Location = New System.Drawing.Point(118, 356) - Me.ucrNudSigFigs.Margin = New System.Windows.Forms.Padding(6) - Me.ucrNudSigFigs.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSigFigs.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSigFigs.Name = "ucrNudSigFigs" - Me.ucrNudSigFigs.Size = New System.Drawing.Size(50, 20) - Me.ucrNudSigFigs.TabIndex = 30 - Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblSigFigs - ' - Me.lblSigFigs.AutoSize = True - Me.lblSigFigs.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSigFigs.Location = New System.Drawing.Point(15, 359) - Me.lblSigFigs.Name = "lblSigFigs" - Me.lblSigFigs.Size = New System.Drawing.Size(96, 13) - Me.lblSigFigs.TabIndex = 29 - Me.lblSigFigs.Tag = "Significant_Figures:" - Me.lblSigFigs.Text = "Significant Figures:" - ' - 'ucrNudColFactors - ' - Me.ucrNudColFactors.AutoSize = True - Me.ucrNudColFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudColFactors.Location = New System.Drawing.Point(119, 334) - Me.ucrNudColFactors.Margin = New System.Windows.Forms.Padding(6) - Me.ucrNudColFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudColFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudColFactors.Name = "ucrNudColFactors" - Me.ucrNudColFactors.Size = New System.Drawing.Size(50, 20) - Me.ucrNudColFactors.TabIndex = 31 - Me.ucrNudColFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblColumnFactors - ' - Me.lblColumnFactors.AutoSize = True - Me.lblColumnFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnFactors.Location = New System.Drawing.Point(23, 337) - Me.lblColumnFactors.Name = "lblColumnFactors" - Me.lblColumnFactors.Size = New System.Drawing.Size(83, 13) - Me.lblColumnFactors.TabIndex = 32 - Me.lblColumnFactors.Tag = "Significant_Figures:" - Me.lblColumnFactors.Text = "Column Factors:" - ' - 'btnMoreOptions + 'ucrPnlMargin ' - Me.btnMoreOptions.Location = New System.Drawing.Point(10, 207) - Me.btnMoreOptions.Name = "btnMoreOptions" - Me.btnMoreOptions.Size = New System.Drawing.Size(141, 21) - Me.btnMoreOptions.TabIndex = 33 - Me.btnMoreOptions.Text = "Table Options" - Me.btnMoreOptions.UseVisualStyleBackColor = True + Me.ucrPnlMargin.AutoSize = True + Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlMargin.Name = "ucrPnlMargin" + Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) + Me.ucrPnlMargin.TabIndex = 13 ' - 'UcrNudColumnSumFactors + 'ucrInputFrequencyMarginName ' - Me.UcrNudColumnSumFactors.AutoSize = True - Me.UcrNudColumnSumFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Location = New System.Drawing.Point(122, 12) - Me.UcrNudColumnSumFactors.Margin = New System.Windows.Forms.Padding(6) - Me.UcrNudColumnSumFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Name = "UcrNudColumnSumFactors" - Me.UcrNudColumnSumFactors.Size = New System.Drawing.Size(50, 20) - Me.UcrNudColumnSumFactors.TabIndex = 37 - Me.UcrNudColumnSumFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True + Me.ucrInputFrequencyMarginName.AutoSize = True + Me.ucrInputFrequencyMarginName.IsMultiline = False + Me.ucrInputFrequencyMarginName.IsReadOnly = False + Me.ucrInputFrequencyMarginName.Location = New System.Drawing.Point(138, 422) + Me.ucrInputFrequencyMarginName.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputFrequencyMarginName.Name = "ucrInputFrequencyMarginName" + Me.ucrInputFrequencyMarginName.Size = New System.Drawing.Size(105, 32) + Me.ucrInputFrequencyMarginName.TabIndex = 26 ' - 'lblColumnSummariesFactors + 'ucrChkFrequencyDisplayMargins ' - Me.lblColumnSummariesFactors.AutoSize = True - Me.lblColumnSummariesFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnSummariesFactors.Location = New System.Drawing.Point(6, 16) - Me.lblColumnSummariesFactors.Name = "lblColumnSummariesFactors" - Me.lblColumnSummariesFactors.Size = New System.Drawing.Size(93, 13) - Me.lblColumnSummariesFactors.TabIndex = 38 - Me.lblColumnSummariesFactors.Tag = "Significant_Figures:" - Me.lblColumnSummariesFactors.Text = "Column ""Factors"":" + Me.ucrChkFrequencyDisplayMargins.AutoSize = True + Me.ucrChkFrequencyDisplayMargins.Checked = False + Me.ucrChkFrequencyDisplayMargins.Location = New System.Drawing.Point(15, 382) + Me.ucrChkFrequencyDisplayMargins.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkFrequencyDisplayMargins.Name = "ucrChkFrequencyDisplayMargins" + Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34) + Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 ' 'dlgSummaryTables ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(489, 467) + Me.ClientSize = New System.Drawing.Size(734, 860) Me.Controls.Add(Me.btnMoreOptions) Me.Controls.Add(Me.lblColumnFactors) Me.Controls.Add(Me.ucrNudColFactors) @@ -711,6 +724,7 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.ucrInputFrequencyMarginName) Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSummaryTables" @@ -765,7 +779,6 @@ Partial Class dlgSummaryTables Friend WithEvents cmdMissingOptions As Button Friend WithEvents rdoMultipleResponse As RadioButton Friend WithEvents ttMultipleResponse As ToolTip - Friend WithEvents rdoVariable As RadioButton Friend WithEvents ucrNudSigFigs As ucrNud Friend WithEvents lblSigFigs As Label Friend WithEvents lblColumnFactors As Label diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx index b97a603004a..91af2377f09 100644 --- a/instat/dlgSummaryTables.resx +++ b/instat/dlgSummaryTables.resx @@ -117,10 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 25 - 17, 17 + + 25 + \ No newline at end of file diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index d88d6cb5892..14cbfba9006 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -177,6 +177,7 @@ Public Class dlgSummaryTables ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrReorderSummary.bDataIsSummaries = True + DialogueSize() End Sub Private Sub SetDefaults() @@ -259,6 +260,8 @@ Public Class dlgSummaryTables bResetFormatSubdialog = True TestOKEnabled() SetDefaultValues() + SetSummariesDefaults() + SetVariableDefaults() End Sub Public Sub SetRCodeForControls(bReset As Boolean) @@ -276,7 +279,6 @@ Public Class dlgSummaryTables ucrReceiverWeights.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkSummaries.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkWeight.SetRCode(clsSummaryDefaultFunction, bReset) - ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset) ucrChkStoreResults.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsFrequencyDefaultFunction, bReset) UcrNudColumnSumFactors.SetRCode(clsSummaryDefaultFunction, bReset) @@ -287,10 +289,14 @@ Public Class dlgSummaryTables ucrReceiverSummaryCols.SetRCode(clsSummaryDefaultFunction, bReset) ucrReceiverFactors.SetRCode(clsSummaryDefaultFunction, bReset) ucrNudColFactors.SetRCode(clsFrequencyDefaultFunction, bReset) + ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset) End If bRCodeSet = True FillListView() SetDefaultValues() + SetSummariesDefaults() + SetVariableDefaults() + SetColFactorDefaults() End Sub Private Sub TestOKEnabled() @@ -331,6 +337,7 @@ Public Class dlgSummaryTables sdgSummaries.ShowDialog() sdgSummaries.bEnable2VariableTab = True FillListView() + SetSummariesDefaults() TestOKEnabled() End Sub @@ -371,71 +378,32 @@ Public Class dlgSummaryTables End Sub Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, - ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, + ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged, ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged cmdSummaries.Visible = rdoSummaryTable.Checked cmdFormatTable.Location = New Point(286, If(rdoSummaryTable.Checked, 464, 273)) If rdoFrequencyTable.Checked Then grpDisplay.Visible = False - ' rdoVariable.Visible = False - ' clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0) - ' clsDummyFunction.AddParameter("rdo_checked", "rdoFrequency", iPosition:=1) - ' ucrSaveTable.SetPrefix("frequency_table") - ' rdoColumnFactors.Text = "Summary-Variable" + clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0) + ucrSaveTable.SetPrefix("frequency_table") Else grpDisplay.Visible = True - ' clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) - ' clsDummyFunction.AddParameter("rdo_checked", "rdoSummary", iPosition:=1) - ' ucrSaveTable.SetPrefix("summary_table") - ' If ucrChkSummaries.Checked Then - ' rdoColumnFactors.Text = "Summary" - ' rdoVariable.Visible = True - ' Else - ' rdoColumnFactors.Text = "Summary-Variable" - ' rdoVariable.Visible = False - ' End If + clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) + ucrSaveTable.SetPrefix("summary_table") + + End If + If bRCodeSet Then + If rdoFrequencyTable.Checked Then + AddPivotWiderVariables() + clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + End If + End If - 'If bRCodeSet Then - ' If rdoNoColumnFactor.Checked Then - ' clsSummaryOperator.RemoveParameterByName("col_factor") - ' clsFrequencyOperator.RemoveParameterByName("col_factor") - ' clsDummyFunction.AddParameter("factor_cols", "NoColFactor", iPosition:=2) - ' Else - ' clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - ' clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) - ' If rdoFactorVariable.Checked Then - ' ucrReceiverColumnFactor.SetMeAsReceiver() - ' clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=2) - ' clsPivotWiderFunction.AddParameter("names_from", ucrReceiverColumnFactor.GetVariableNames(False), iPosition:=0) - ' ElseIf rdoColumnFactors.Checked Then - ' clsDummyFunction.AddParameter("factor_cols", "SumVar", iPosition:=2) - ' If rdoFrequencyTable.Checked Then - ' varsString() - ' Else - ' If ucrChkSummaries.Checked Then - ' clsPivotWiderFunction.AddParameter("names_from", "summary", iPosition:=0) - ' Else - ' clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) - ' End If - ' End If - ' ElseIf rdoVariable.Checked Then - ' clsDummyFunction.AddParameter("factor_cols", "Var", iPosition:=2) - ' clsPivotWiderFunction.AddParameter("names_from", "variable", iPosition:=0) - ' End If - ' End If - 'End If - - 'If rdoVariable.Checked Then - ' If Not ucrChkSummaries.Checked Then - ' rdoColumnFactors.Checked = True - ' Else - ' rdoVariable.Checked = True - ' End If - 'End If - AddingColumnFactor() DialogueSize() - varsString() SetDefaultValues() + SetVariableDefaults() + SetSummariesDefaults() + SetColFactorDefaults() End Sub Private Sub FillListView() @@ -466,6 +434,8 @@ Public Class dlgSummaryTables clsSummariesList.AddParameter(clsParameter) iPosition += 1 Next + SetSummariesDefaults() + SetColFactorDefaults() End Sub Private Sub ucrChkDisplayAsPercentage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlValueChanged @@ -493,7 +463,7 @@ Public Class dlgSummaryTables End If End Sub - Private Sub varsString() + Private Sub AddPivotWiderVariables() If rdoFrequencyTable.Checked Then ' Get the number of variables to use from ucrNudColFactors Dim numVars As Integer = ucrNudColFactors.Value @@ -519,87 +489,73 @@ Public Class dlgSummaryTables Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged, ucrReceiverSummaryCols.SelectionChanged, ucrReorderSummary.SelectedIndexChanged SetDefaultValues() + SetSummariesDefaults() + SetVariableDefaults() + SetColFactorDefaults() End Sub Private Sub SetDefaultValues() - ' Count variables in each relevant receiver - If rdoSummaryTable.Checked Then - Dim selectedColumns As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control - - Dim countFactors As Integer = selectedColumns.Count - Dim countSummaryCols As Integer = ucrReceiverSummaryCols.Count - Dim countSummaries As Integer = ucrReorderSummary.Count - - ' Set default for ucrNudVariables - If countSummaryCols > 1 Then - ucrNudPositionVar.Value = countFactors + 1 - Else - ucrNudPositionVar.Value = countFactors + Dim selectedVariables As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control + Dim selectedCount As Integer = selectedVariables.Count + ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables + If selectedCount > 0 Then + ' Set Maximum based on the number of variables in the receiver + ucrNudColFactors.Maximum = selectedCount + + ' Ensure the current Value does not exceed the Maximum + If ucrNudColFactors.Value > selectedCount Then + ucrNudColFactors.Value = selectedCount ' Adjust value to the max if it exceeds End If - ' Set default for ucrNudSummaries - ucrNudPositionSum.Value = countFactors - If countSummaryCols > 1 Then ucrNudPositionSum.Value += 1 - If countSummaries > 1 Then ucrNudPositionSum.Value += 1 - - ' Set minimum and maximum for ucrNudColFactors - UcrNudColumnSumFactors.Minimum = 0 - UcrNudColumnSumFactors.Maximum = countFactors - If countSummaryCols > 1 And countSummaries > 1 Then - UcrNudColumnSumFactors.Maximum += 2 - ElseIf countSummaryCols > 1 Or countSummaries > 1 Then - UcrNudColumnSumFactors.Maximum += 1 - End If + ' Set Minimum (if applicable) + ucrNudColFactors.Minimum = 1 + Else - Dim selectedVariables As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control - Dim selectedCount As Integer = selectedVariables.Count - ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables - If selectedCount > 0 Then - ' Set Maximum based on the number of variables in the receiver - ucrNudColFactors.Maximum = selectedCount + ' If no variables are selected, set Minimum, Maximum, and Value to 1 + ucrNudColFactors.Minimum = 1 + ucrNudColFactors.Maximum = 1 + ucrNudColFactors.Value = 1 + End If - ' Ensure the current Value does not exceed the Maximum - If ucrNudColFactors.Value > selectedCount Then - ucrNudColFactors.Value = selectedCount ' Adjust value to the max if it exceeds - End If + End Sub - ' Set Minimum (if applicable) - ucrNudColFactors.Minimum = 1 + Private Sub SetVariableDefaults() + Dim selectedColumns As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() ' Example, adjust based on your control + Dim defaultVariables As Integer = selectedColumns.Count - Else - ' If no variables are selected, set Minimum, Maximum, and Value to 1 - ucrNudColFactors.Minimum = 1 - ucrNudColFactors.Maximum = 1 - ucrNudColFactors.Value = 1 - End If + If ucrReceiverSummaryCols.Count > 1 Then + ucrNudPositionVar.Value = defaultVariables + 1 + Else + ucrNudPositionVar.Value = 0 End If End Sub - Private Sub AddingColumnFactor() - Dim lstVariables As New List(Of String) - Dim iXVarCount As Integer - - iXVarCount = lstVariables.Count - ' If bRCodeSet Then - ' If lstVariables.Contains(ucrReceiverColumnFactor.GetVariableNames(False)) OrElse - ' Not ucrReceiverFactors.GetVariableNamesAsList().Contains(ucrReceiverColumnFactor.GetVariableNames(False)) Then - ' ucrReceiverColumnFactor.Clear() - ' ucrReceiverFactors.SetMeAsReceiver() - ' End If - ' If iXVarCount = 0 AndAlso ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 AndAlso - ' ucrReceiverColumnFactor.IsEmpty() Then - ' ucrReceiverColumnFactor.Add(ucrReceiverFactors.lstSelectedVariables.Items(0).Text) - ' ucrReceiverFactors.SetMeAsReceiver() - ' ElseIf ucrReceiverFactors.IsEmpty Then - ' ucrReceiverColumnFactor.Clear() - ' End If - ' lstVariables = ucrReceiverFactors.GetVariableNamesAsList() - ' If ucrReceiverFactors.lstSelectedVariables.Items.Count >= 1 Then - ' Dim iIndex = ucrReceiverFactors.lstSelectedVariables.Items.Count - 1 - ' ucrReceiverPercentages.Add(ucrReceiverFactors.lstSelectedVariables.Items(iIndex).Text) - ' ucrReceiverFactors.SetMeAsReceiver() - ' End If - ' End If + Private Sub SetSummariesDefaults() + Dim selectedSummaries As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList ' Example, adjust based on your control + Dim defaultSummaries As Integer = selectedSummaries.Count + + If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then + ucrNudPositionSum.Value = defaultSummaries + 1 + Else + ucrNudPositionSum.Value = 0 + End If + End Sub + + Private Sub SetColFactorDefaults() + ' Retrieve the list of selected column factors from ucrReceiverFactors + Dim selectedColFactors As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() + Dim defaultColFactors As Integer = selectedColFactors.Count ' Initialize with minimum of 0 + + ' Adjust defaultColFactors based on conditions involving ucrReceiverSummaryCols and ucrReorderSummary + If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then + UcrNudColumnSumFactors.Maximum = defaultColFactors + 2 + ElseIf ucrReceiverSummaryCols.Count > 1 OrElse ucrReorderSummary.Count > 1 Then + UcrNudColumnSumFactors.Maximum = defaultColFactors + 1 + Else + UcrNudColumnSumFactors.Maximum = defaultColFactors + End If + UcrNudColumnSumFactors.Minimum = 0 End Sub + End Class From b9b5b8053a43ad5760f3a3f2953640ed48e2015f Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 28 Oct 2024 18:04:00 +0300 Subject: [PATCH 29/77] changes --- instat/dlgSummaryTables.Designer.vb | 226 ++++++++++++++-------------- instat/dlgSummaryTables.resx | 7 +- instat/dlgSummaryTables.vb | 8 +- 3 files changed, 122 insertions(+), 119 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index 55724acb1b2..9af123b5747 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -43,19 +43,26 @@ Partial Class dlgSummaryTables Me.cmdSummaries = New System.Windows.Forms.Button() Me.grpDisplay = New System.Windows.Forms.GroupBox() Me.lblColumnSummariesFactors = New System.Windows.Forms.Label() + Me.UcrNudColumnSumFactors = New instat.ucrNud() Me.lblPositionSum = New System.Windows.Forms.Label() Me.lblPositionVar = New System.Windows.Forms.Label() + Me.ucrNudPositionVar = New instat.ucrNud() + Me.ucrNudPositionSum = New instat.ucrNud() Me.grpMargin = New System.Windows.Forms.GroupBox() Me.rdoBoth = New System.Windows.Forms.RadioButton() Me.rdoSummary = New System.Windows.Forms.RadioButton() Me.rdoOuter = New System.Windows.Forms.RadioButton() + Me.ucrPnlMargin = New instat.UcrPanel() Me.lblMarginName = New System.Windows.Forms.Label() Me.lblVariables = New System.Windows.Forms.Label() Me.cmdFormatTable = New System.Windows.Forms.Button() Me.rdoFrequencyTable = New System.Windows.Forms.RadioButton() Me.rdoSummaryTable = New System.Windows.Forms.RadioButton() Me.grpPercentages = New System.Windows.Forms.GroupBox() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() Me.lblFactorsAsPercentage = New System.Windows.Forms.Label() + Me.ucrChkPercentageProportion = New instat.ucrCheck() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.lblFrequencyMarginName = New System.Windows.Forms.Label() Me.cmdMissingOptions = New System.Windows.Forms.Button() Me.rdoMultipleResponse = New System.Windows.Forms.RadioButton() @@ -65,9 +72,6 @@ Partial Class dlgSummaryTables Me.btnMoreOptions = New System.Windows.Forms.Button() Me.ucrNudColFactors = New instat.ucrNud() Me.ucrNudSigFigs = New instat.ucrNud() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() - Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.ucrPnlSummaryFrequencyTables = New instat.UcrPanel() Me.ucrReorderSummary = New instat.ucrReorder() Me.ucrInputMarginName = New instat.ucrInputTextBox() @@ -75,9 +79,6 @@ Partial Class dlgSummaryTables Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkStoreResults = New instat.ucrCheck() Me.ucrChkDisplayMargins = New instat.ucrCheck() - Me.UcrNudColumnSumFactors = New instat.ucrNud() - Me.ucrNudPositionVar = New instat.ucrNud() - Me.ucrNudPositionSum = New instat.ucrNud() Me.ucrChkSummaries = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverSummaryCols = New instat.ucrReceiverMultiple() @@ -85,7 +86,6 @@ Partial Class dlgSummaryTables Me.ucrReceiverWeights = New instat.ucrReceiverSingle() Me.ucrChkWeight = New instat.ucrCheck() Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrPnlMargin = New instat.UcrPanel() Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox() Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck() Me.grpDisplay.SuspendLayout() @@ -109,7 +109,7 @@ Partial Class dlgSummaryTables ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdSummaries.Location = New System.Drawing.Point(429, 420) - Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4) Me.cmdSummaries.Name = "cmdSummaries" Me.cmdSummaries.Size = New System.Drawing.Size(156, 34) Me.cmdSummaries.TabIndex = 13 @@ -125,10 +125,10 @@ Partial Class dlgSummaryTables Me.grpDisplay.Controls.Add(Me.ucrNudPositionVar) Me.grpDisplay.Controls.Add(Me.ucrNudPositionSum) Me.grpDisplay.Location = New System.Drawing.Point(15, 597) - Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.grpDisplay.Size = New System.Drawing.Size(405, 133) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4) + Me.grpDisplay.Size = New System.Drawing.Size(368, 133) Me.grpDisplay.TabIndex = 11 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Layout" @@ -137,7 +137,7 @@ Partial Class dlgSummaryTables ' Me.lblColumnSummariesFactors.AutoSize = True Me.lblColumnSummariesFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblColumnSummariesFactors.Location = New System.Drawing.Point(9, 24) + Me.lblColumnSummariesFactors.Location = New System.Drawing.Point(39, 23) Me.lblColumnSummariesFactors.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblColumnSummariesFactors.Name = "lblColumnSummariesFactors" Me.lblColumnSummariesFactors.Size = New System.Drawing.Size(137, 20) @@ -145,11 +145,25 @@ Partial Class dlgSummaryTables Me.lblColumnSummariesFactors.Tag = "Significant_Figures:" Me.lblColumnSummariesFactors.Text = "Column ""Factors"":" ' + 'UcrNudColumnSumFactors + ' + Me.UcrNudColumnSumFactors.AutoSize = True + Me.UcrNudColumnSumFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Location = New System.Drawing.Point(245, 18) + Me.UcrNudColumnSumFactors.Margin = New System.Windows.Forms.Padding(9) + Me.UcrNudColumnSumFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudColumnSumFactors.Name = "UcrNudColumnSumFactors" + Me.UcrNudColumnSumFactors.Size = New System.Drawing.Size(75, 30) + Me.UcrNudColumnSumFactors.TabIndex = 37 + Me.UcrNudColumnSumFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblPositionSum ' Me.lblPositionSum.AutoSize = True Me.lblPositionSum.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPositionSum.Location = New System.Drawing.Point(4, 92) + Me.lblPositionSum.Location = New System.Drawing.Point(8, 98) Me.lblPositionSum.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblPositionSum.Name = "lblPositionSum" Me.lblPositionSum.Size = New System.Drawing.Size(171, 20) @@ -161,7 +175,7 @@ Partial Class dlgSummaryTables ' Me.lblPositionVar.AutoSize = True Me.lblPositionVar.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPositionVar.Location = New System.Drawing.Point(10, 57) + Me.lblPositionVar.Location = New System.Drawing.Point(19, 62) Me.lblPositionVar.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblPositionVar.Name = "lblPositionVar" Me.lblPositionVar.Size = New System.Drawing.Size(157, 20) @@ -169,6 +183,34 @@ Partial Class dlgSummaryTables Me.lblPositionVar.Tag = "Significant_Figures:" Me.lblPositionVar.Text = "Position of Variables:" ' + 'ucrNudPositionVar + ' + Me.ucrNudPositionVar.AutoSize = True + Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionVar.Location = New System.Drawing.Point(245, 57) + Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionVar.Name = "ucrNudPositionVar" + Me.ucrNudPositionVar.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPositionVar.TabIndex = 34 + Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudPositionSum + ' + Me.ucrNudPositionSum.AutoSize = True + Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPositionSum.Location = New System.Drawing.Point(245, 95) + Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPositionSum.Name = "ucrNudPositionSum" + Me.ucrNudPositionSum.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPositionSum.TabIndex = 33 + Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'grpMargin ' Me.grpMargin.Controls.Add(Me.rdoBoth) @@ -176,9 +218,9 @@ Partial Class dlgSummaryTables Me.grpMargin.Controls.Add(Me.rdoOuter) Me.grpMargin.Controls.Add(Me.ucrPnlMargin) Me.grpMargin.Location = New System.Drawing.Point(15, 480) - Me.grpMargin.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpMargin.Margin = New System.Windows.Forms.Padding(4) Me.grpMargin.Name = "grpMargin" - Me.grpMargin.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpMargin.Padding = New System.Windows.Forms.Padding(4) Me.grpMargin.Size = New System.Drawing.Size(320, 60) Me.grpMargin.TabIndex = 13 Me.grpMargin.TabStop = False @@ -188,7 +230,7 @@ Partial Class dlgSummaryTables Me.rdoBoth.AutoSize = True Me.rdoBoth.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoBoth.Location = New System.Drawing.Point(210, 36) - Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoBoth.Margin = New System.Windows.Forms.Padding(4) Me.rdoBoth.Name = "rdoBoth" Me.rdoBoth.Size = New System.Drawing.Size(68, 24) Me.rdoBoth.TabIndex = 16 @@ -201,7 +243,7 @@ Partial Class dlgSummaryTables Me.rdoSummary.AutoSize = True Me.rdoSummary.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoSummary.Location = New System.Drawing.Point(100, 36) - Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSummary.Margin = New System.Windows.Forms.Padding(4) Me.rdoSummary.Name = "rdoSummary" Me.rdoSummary.Size = New System.Drawing.Size(101, 24) Me.rdoSummary.TabIndex = 16 @@ -214,7 +256,7 @@ Partial Class dlgSummaryTables Me.rdoOuter.AutoSize = True Me.rdoOuter.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoOuter.Location = New System.Drawing.Point(15, 36) - Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoOuter.Margin = New System.Windows.Forms.Padding(4) Me.rdoOuter.Name = "rdoOuter" Me.rdoOuter.Size = New System.Drawing.Size(74, 24) Me.rdoOuter.TabIndex = 15 @@ -222,6 +264,16 @@ Partial Class dlgSummaryTables Me.rdoOuter.Text = "Outer" Me.rdoOuter.UseVisualStyleBackColor = True ' + 'ucrPnlMargin + ' + Me.ucrPnlMargin.AutoSize = True + Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) + Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlMargin.Name = "ucrPnlMargin" + Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) + Me.ucrPnlMargin.TabIndex = 13 + ' 'lblMarginName ' Me.lblMarginName.AutoSize = True @@ -249,7 +301,7 @@ Partial Class dlgSummaryTables ' Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdFormatTable.Location = New System.Drawing.Point(429, 696) - Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) Me.cmdFormatTable.TabIndex = 19 @@ -266,7 +318,7 @@ Partial Class dlgSummaryTables Me.rdoFrequencyTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoFrequencyTable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoFrequencyTable.Location = New System.Drawing.Point(76, 0) - Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoFrequencyTable.Margin = New System.Windows.Forms.Padding(4) Me.rdoFrequencyTable.Name = "rdoFrequencyTable" Me.rdoFrequencyTable.Size = New System.Drawing.Size(194, 40) Me.rdoFrequencyTable.TabIndex = 22 @@ -284,7 +336,7 @@ Partial Class dlgSummaryTables Me.rdoSummaryTable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSummaryTable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoSummaryTable.Location = New System.Drawing.Point(267, 0) - Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSummaryTable.Margin = New System.Windows.Forms.Padding(4) Me.rdoSummaryTable.Name = "rdoSummaryTable" Me.rdoSummaryTable.Size = New System.Drawing.Size(200, 40) Me.rdoSummaryTable.TabIndex = 21 @@ -300,14 +352,27 @@ Partial Class dlgSummaryTables Me.grpPercentages.Controls.Add(Me.ucrChkPercentageProportion) Me.grpPercentages.Controls.Add(Me.ucrChkDisplayAsPercentage) Me.grpPercentages.Location = New System.Drawing.Point(429, 267) - Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpPercentages.Margin = New System.Windows.Forms.Padding(4) Me.grpPercentages.Name = "grpPercentages" - Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpPercentages.Padding = New System.Windows.Forms.Padding(4) Me.grpPercentages.Size = New System.Drawing.Size(261, 134) Me.grpPercentages.TabIndex = 23 Me.grpPercentages.TabStop = False Me.grpPercentages.Text = "Percentages" ' + 'ucrReceiverPercentages + ' + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Me + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) + Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" + Me.ucrReceiverPercentages.Selector = Nothing + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverPercentages.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 4 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' 'lblFactorsAsPercentage ' Me.lblFactorsAsPercentage.AutoSize = True @@ -320,6 +385,26 @@ Partial Class dlgSummaryTables Me.lblFactorsAsPercentage.Tag = "Factors as Percentage:" Me.lblFactorsAsPercentage.Text = "of Factor (Optional):" ' + 'ucrChkPercentageProportion + ' + Me.ucrChkPercentageProportion.AutoSize = True + Me.ucrChkPercentageProportion.Checked = False + Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) + Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" + Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) + Me.ucrChkPercentageProportion.TabIndex = 3 + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) + Me.ucrChkDisplayAsPercentage.TabIndex = 0 + ' 'lblFrequencyMarginName ' Me.lblFrequencyMarginName.AutoSize = True @@ -335,7 +420,7 @@ Partial Class dlgSummaryTables ' Me.cmdMissingOptions.Enabled = False Me.cmdMissingOptions.Location = New System.Drawing.Point(308, 406) - Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdMissingOptions.Name = "cmdMissingOptions" Me.cmdMissingOptions.Size = New System.Drawing.Size(112, 34) Me.cmdMissingOptions.TabIndex = 27 @@ -352,7 +437,7 @@ Partial Class dlgSummaryTables Me.rdoMultipleResponse.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleResponse.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoMultipleResponse.Location = New System.Drawing.Point(464, 0) - Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoMultipleResponse.Margin = New System.Windows.Forms.Padding(4) Me.rdoMultipleResponse.Name = "rdoMultipleResponse" Me.rdoMultipleResponse.Size = New System.Drawing.Size(200, 40) Me.rdoMultipleResponse.TabIndex = 28 @@ -389,7 +474,7 @@ Partial Class dlgSummaryTables 'btnMoreOptions ' Me.btnMoreOptions.Location = New System.Drawing.Point(15, 310) - Me.btnMoreOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.btnMoreOptions.Margin = New System.Windows.Forms.Padding(4) Me.btnMoreOptions.Name = "btnMoreOptions" Me.btnMoreOptions.Size = New System.Drawing.Size(212, 32) Me.btnMoreOptions.TabIndex = 33 @@ -424,39 +509,6 @@ Partial Class dlgSummaryTables Me.ucrNudSigFigs.TabIndex = 30 Me.ucrNudSigFigs.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Nothing - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(24, 90) - Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" - Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) - Me.ucrReceiverPercentages.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 4 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(8, 256) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(240, 51) - Me.ucrChkPercentageProportion.TabIndex = 3 - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(21, 28) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(202, 51) - Me.ucrChkDisplayAsPercentage.TabIndex = 0 - ' 'ucrPnlSummaryFrequencyTables ' Me.ucrPnlSummaryFrequencyTables.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -528,48 +580,6 @@ Partial Class dlgSummaryTables Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) Me.ucrChkDisplayMargins.TabIndex = 10 ' - 'UcrNudColumnSumFactors - ' - Me.UcrNudColumnSumFactors.AutoSize = True - Me.UcrNudColumnSumFactors.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Location = New System.Drawing.Point(183, 18) - Me.UcrNudColumnSumFactors.Margin = New System.Windows.Forms.Padding(9) - Me.UcrNudColumnSumFactors.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.UcrNudColumnSumFactors.Name = "UcrNudColumnSumFactors" - Me.UcrNudColumnSumFactors.Size = New System.Drawing.Size(75, 30) - Me.UcrNudColumnSumFactors.TabIndex = 37 - Me.UcrNudColumnSumFactors.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudPositionVar - ' - Me.ucrNudPositionVar.AutoSize = True - Me.ucrNudPositionVar.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionVar.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPositionVar.Location = New System.Drawing.Point(183, 52) - Me.ucrNudPositionVar.Margin = New System.Windows.Forms.Padding(9) - Me.ucrNudPositionVar.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPositionVar.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionVar.Name = "ucrNudPositionVar" - Me.ucrNudPositionVar.Size = New System.Drawing.Size(75, 30) - Me.ucrNudPositionVar.TabIndex = 34 - Me.ucrNudPositionVar.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudPositionSum - ' - Me.ucrNudPositionSum.AutoSize = True - Me.ucrNudPositionSum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionSum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPositionSum.Location = New System.Drawing.Point(184, 88) - Me.ucrNudPositionSum.Margin = New System.Windows.Forms.Padding(9) - Me.ucrNudPositionSum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPositionSum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPositionSum.Name = "ucrNudPositionSum" - Me.ucrNudPositionSum.Size = New System.Drawing.Size(75, 30) - Me.ucrNudPositionSum.TabIndex = 33 - Me.ucrNudPositionSum.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrChkSummaries ' Me.ucrChkSummaries.AutoSize = True @@ -651,16 +661,6 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables.Size = New System.Drawing.Size(320, 274) Me.ucrSelectorSummaryTables.TabIndex = 0 ' - 'ucrPnlMargin - ' - Me.ucrPnlMargin.AutoSize = True - Me.ucrPnlMargin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMargin.Location = New System.Drawing.Point(9, 21) - Me.ucrPnlMargin.Margin = New System.Windows.Forms.Padding(9) - Me.ucrPnlMargin.Name = "ucrPnlMargin" - Me.ucrPnlMargin.Size = New System.Drawing.Size(0, 0) - Me.ucrPnlMargin.TabIndex = 13 - ' 'ucrInputFrequencyMarginName ' Me.ucrInputFrequencyMarginName.AddQuotesIfUnrecognised = True @@ -724,7 +724,7 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.ucrInputFrequencyMarginName) Me.Controls.Add(Me.ucrChkFrequencyDisplayMargins) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSummaryTables" diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx index 91af2377f09..9aff421cfe9 100644 --- a/instat/dlgSummaryTables.resx +++ b/instat/dlgSummaryTables.resx @@ -117,10 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 25 + 17, 17 - - 25 + + 17, 17 \ No newline at end of file diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 14cbfba9006..e0612542be2 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -281,7 +281,6 @@ Public Class dlgSummaryTables ucrChkWeight.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkStoreResults.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsFrequencyDefaultFunction, bReset) - UcrNudColumnSumFactors.SetRCode(clsSummaryDefaultFunction, bReset) ucrNudPositionSum.SetRCode(clsSummaryDefaultFunction, bReset) ucrNudPositionVar.SetRCode(clsSummaryDefaultFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) @@ -290,6 +289,7 @@ Public Class dlgSummaryTables ucrReceiverFactors.SetRCode(clsSummaryDefaultFunction, bReset) ucrNudColFactors.SetRCode(clsFrequencyDefaultFunction, bReset) ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset) + UcrNudColumnSumFactors.SetRCode(clsSummaryDefaultFunction, bReset) End If bRCodeSet = True FillListView() @@ -508,11 +508,11 @@ Public Class dlgSummaryTables End If ' Set Minimum (if applicable) - ucrNudColFactors.Minimum = 1 + ucrNudColFactors.Minimum = 0 Else ' If no variables are selected, set Minimum, Maximum, and Value to 1 - ucrNudColFactors.Minimum = 1 + ucrNudColFactors.Minimum = 0 ucrNudColFactors.Maximum = 1 ucrNudColFactors.Value = 1 End If @@ -536,7 +536,7 @@ Public Class dlgSummaryTables Dim defaultSummaries As Integer = selectedSummaries.Count If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then - ucrNudPositionSum.Value = defaultSummaries + 1 + ucrNudPositionSum.Value = defaultSummaries + 2 Else ucrNudPositionSum.Value = 0 End If From f8102f431a943dc95794a2d31f6561788793838d Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:46:07 +0300 Subject: [PATCH 30/77] changes --- instat/dlgView.Designer.vb | 80 ++++++++--------- instat/dlgView.vb | 180 ++++++------------------------------- 2 files changed, 66 insertions(+), 194 deletions(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 701924ad824..33a1f42d8ad 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -43,10 +43,7 @@ Partial Class dlgView Me.rdoDispOutputWindow = New System.Windows.Forms.RadioButton() Me.rdoHTMLOutputWindow = New System.Windows.Forms.RadioButton() Me.cmdTableOptions = New System.Windows.Forms.Button() - Me.ucrViewNudPreview = New instat.ucrNud() - Me.ucrViewChkPreview = New instat.ucrCheck() Me.ucrChkDisplayFromTop = New instat.ucrCheck() - Me.ucrChkRowNumbers = New instat.ucrCheck() Me.ucrSaveData = New instat.ucrSave() Me.ucrReceiverSortCol = New instat.ucrReceiverSingle() Me.ucrChkSortColumn = New instat.ucrCheck() @@ -55,6 +52,9 @@ Partial Class dlgView Me.ucrReceiverView = New instat.ucrReceiverMultiple() Me.ucrSelectorForView = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrViewChkPreview = New instat.ucrCheck() + Me.ucrChkRowNumbers = New instat.ucrCheck() + Me.ucrViewNudPreview = New instat.ucrNud() Me.SuspendLayout() ' 'lblSelected @@ -110,30 +110,6 @@ Partial Class dlgView Me.cmdTableOptions.Text = "Table Options" Me.cmdTableOptions.UseVisualStyleBackColor = True ' - 'ucrViewNudPreview - ' - Me.ucrViewNudPreview.AutoSize = True - Me.ucrViewNudPreview.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrViewNudPreview.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrViewNudPreview.Location = New System.Drawing.Point(343, 167) - Me.ucrViewNudPreview.Margin = New System.Windows.Forms.Padding(6) - Me.ucrViewNudPreview.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrViewNudPreview.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrViewNudPreview.Name = "ucrViewNudPreview" - Me.ucrViewNudPreview.Size = New System.Drawing.Size(50, 20) - Me.ucrViewNudPreview.TabIndex = 33 - Me.ucrViewNudPreview.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrViewChkPreview - ' - Me.ucrViewChkPreview.AutoSize = True - Me.ucrViewChkPreview.Checked = False - Me.ucrViewChkPreview.Location = New System.Drawing.Point(248, 167) - Me.ucrViewChkPreview.Margin = New System.Windows.Forms.Padding(6) - Me.ucrViewChkPreview.Name = "ucrViewChkPreview" - Me.ucrViewChkPreview.Size = New System.Drawing.Size(89, 23) - Me.ucrViewChkPreview.TabIndex = 32 - ' 'ucrChkDisplayFromTop ' Me.ucrChkDisplayFromTop.AutoSize = True @@ -143,15 +119,6 @@ Partial Class dlgView Me.ucrChkDisplayFromTop.Size = New System.Drawing.Size(130, 23) Me.ucrChkDisplayFromTop.TabIndex = 20 ' - 'ucrChkRowNumbers - ' - Me.ucrChkRowNumbers.AutoSize = True - Me.ucrChkRowNumbers.Checked = False - Me.ucrChkRowNumbers.Location = New System.Drawing.Point(248, 167) - Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" - Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) - Me.ucrChkRowNumbers.TabIndex = 19 - ' 'ucrSaveData ' Me.ucrSaveData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -190,11 +157,11 @@ Partial Class dlgView Me.ucrNudNumberRows.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudNumberRows.Location = New System.Drawing.Point(343, 167) Me.ucrNudNumberRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberRows.Minimum = New Decimal(New Integer() {100, 0, 0, -2147483648}) Me.ucrNudNumberRows.Name = "ucrNudNumberRows" Me.ucrNudNumberRows.Size = New System.Drawing.Size(50, 20) Me.ucrNudNumberRows.TabIndex = 13 - Me.ucrNudNumberRows.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberRows.Value = New Decimal(New Integer() {6, 0, 0, 0}) ' 'ucrPnlDisplayWindow ' @@ -238,20 +205,51 @@ Partial Class dlgView Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 17 ' + 'ucrViewChkPreview + ' + Me.ucrViewChkPreview.AutoSize = True + Me.ucrViewChkPreview.Checked = False + Me.ucrViewChkPreview.Location = New System.Drawing.Point(248, 167) + Me.ucrViewChkPreview.Margin = New System.Windows.Forms.Padding(6) + Me.ucrViewChkPreview.Name = "ucrViewChkPreview" + Me.ucrViewChkPreview.Size = New System.Drawing.Size(89, 23) + Me.ucrViewChkPreview.TabIndex = 32 + ' + 'ucrChkRowNumbers + ' + Me.ucrChkRowNumbers.AutoSize = True + Me.ucrChkRowNumbers.Checked = False + Me.ucrChkRowNumbers.Location = New System.Drawing.Point(248, 167) + Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" + Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) + Me.ucrChkRowNumbers.TabIndex = 19 + ' + 'ucrViewNudPreview + ' + Me.ucrViewNudPreview.AutoSize = True + Me.ucrViewNudPreview.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrViewNudPreview.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrViewNudPreview.Location = New System.Drawing.Point(343, 167) + Me.ucrViewNudPreview.Margin = New System.Windows.Forms.Padding(6) + Me.ucrViewNudPreview.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrViewNudPreview.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrViewNudPreview.Name = "ucrViewNudPreview" + Me.ucrViewNudPreview.Size = New System.Drawing.Size(50, 20) + Me.ucrViewNudPreview.TabIndex = 33 + Me.ucrViewNudPreview.Value = New Decimal(New Integer() {1, 0, 0, 0}) + ' 'dlgView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(416, 357) - Me.Controls.Add(Me.ucrViewNudPreview) Me.Controls.Add(Me.cmdTableOptions) Me.Controls.Add(Me.ucrChkDisplayFromTop) Me.Controls.Add(Me.ucrSaveData) Me.Controls.Add(Me.ucrReceiverSortCol) Me.Controls.Add(Me.ucrChkSortColumn) Me.Controls.Add(Me.rdoHTMLOutputWindow) - Me.Controls.Add(Me.ucrNudNumberRows) Me.Controls.Add(Me.rdoDispOutputWindow) Me.Controls.Add(Me.rdoDispSepOutputWindow) Me.Controls.Add(Me.ucrPnlDisplayWindow) @@ -261,6 +259,8 @@ Partial Class dlgView Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrViewChkPreview) Me.Controls.Add(Me.ucrChkRowNumbers) + Me.Controls.Add(Me.ucrViewNudPreview) + Me.Controls.Add(Me.ucrNudNumberRows) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False diff --git a/instat/dlgView.vb b/instat/dlgView.vb index b5a8c77071d..02e121d08b9 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -65,21 +65,14 @@ Public Class dlgView ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ucrReceiverView.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) - ' ucrNudNumberRows.Minimum = 1 ucrChkRowNumbers.SetText("Rows") - ' ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True) - - ' ucrViewNudPreview.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) - ' ucrViewNudPreview.Minimum = 6 - 'ucrViewNudPreview.Maximum = Decimal.MaxValue ucrNudNumberRows.SetRDefault(6) ucrChkDisplayFromTop.SetText("Display From Top") ucrChkDisplayFromTop.AddFunctionNamesCondition(True, {"head", "tail"}) - ucrChkDisplayFromTop.AddFunctionNamesCondition(False, {frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data"}) ucrViewChkPreview.SetText("Rows") ucrViewChkPreview.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) @@ -108,7 +101,6 @@ Public Class dlgView 'The sort column checkbox and receiver set to be invisible since the method for allowing variables in receiver1 to be strictly the same variables in receiver2 is yet to be implemented. 'ucrChkSortColumn.SetParameter(ucrReceiverSortCol.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - ' ucrSelectorForView.SetParameter(New RParameter("title", 1)) ucrSelectorForView.SetParameterIsString() ucrSaveData.SetCheckBoxText("Store Data") @@ -123,11 +115,8 @@ Public Class dlgView Private Sub SetDefaults() clsBaseOperator = New ROperator - 'clsBaseOperatorView = New ROperator clsOutputWindowFunction = New RFunction clsViewColumnsFunction = New RFunction - ' clsHTMLFunction = New RFunction - ' clsViewAllFunction = New RFunction clsGetObjectDataFunction = New RFunction clsHeadRFunction = New RFunction clsGtRFunction = New RFunction @@ -135,7 +124,6 @@ Public Class dlgView clsAsHtmlWidgetFunction = New RFunction ucrViewChkPreview.Checked = True - ucrSelectorForView.Reset() ucrReceiverView.SetMeAsReceiver() @@ -153,29 +141,25 @@ Public Class dlgView strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, strObjectName:="last_table") - 'clsViewAllFunction.SetPackageName("utils") - 'clsViewAllFunction.SetRCommand("View") - 'clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=1) - 'ucrSelectorForView.AddAdditionalCodeParameterPair(clsBaseOperator, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) - 'ucrSaveData.AddAdditionalRCode(clsBaseOperator, iAdditionalPairNo:=1) - 'clsBaseOperator.SetOperation("%>%") - 'clsBaseOperator.bBrackets = False + clsBaseOperator.SetOperation("%>%") + clsBaseOperator.bBrackets = False + clsHeadRFunction.SetPackageName("utils") + clsHeadRFunction.SetRCommand("head") + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=2, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=3, bIncludeArgumentName:=False) - 'clsHeadRFunction.SetPackageName("utils") - 'clsHeadRFunction.SetRCommand("head") - 'clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=3, bIncludeArgumentName:=False) - 'clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=4, bIncludeArgumentName:=False) - - 'clsGtRFunction.SetPackageName("gt") - 'clsGtRFunction.SetRCommand("gt") - 'clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=5, bIncludeArgumentName:=False) + clsGtRFunction.SetPackageName("gt") + clsGtRFunction.SetRCommand("gt") + clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=4, bIncludeArgumentName:=False) + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, + strObjectName:="last_table") clsViewColumnsFunction.SetPackageName("utils") clsViewColumnsFunction.SetRCommand("View") - ' ucrBase.clsRsyntax.SetBaseRFunction(clsViewAllFunction) - ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -184,55 +168,32 @@ Public Class dlgView 'Correct maximum is then set in DataFrameLength() ucrNudNumberRows.Maximum = Decimal.MaxValue - - 'ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("mydf"), iAdditionalPairNo:=1) - ' ucrReceiverView.AddAdditionalCodeParameterPair(clsHTMLFunction, New RParameter("x"), iAdditionalPairNo:=1) - ucrReceiverView.AddAdditionalCodeParameterPair(clsOutputWindowFunction, New RParameter("x"), iAdditionalPairNo:=1) - ucrSelectorForView.AddAdditionalCodeParameterPair( clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) + ucrSelectorForView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) ucrSaveData.AddAdditionalRCode(clsOutputWindowFunction, iAdditionalPairNo:=1) - 'ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("operation"), iAdditionalPairNo:=1) - ' ucrSelectorForView.AddAdditionalCodeParameterPair(clsBaseOperator, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=2) - ' ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("x"), iAdditionalPairNo:=2) - 'ucrSaveData.AddAdditionalRCode(clsBaseOperator, iAdditionalPairNo:=2) - - ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) + ucrReceiverView.SetRCode(clsBaseOperator, bReset) ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) ucrViewChkPreview.SetRCode(clsBaseOperator, bReset) ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) ucrSelectorForView.SetRCode(clsBaseOperator, bReset) - ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) + ucrSaveData.SetRCode(clsBaseOperator, bReset) DataFrameLength() ChangeFunctionParameters() bControlsUpdated = True End Sub - 'Private Sub SetSelectorParameterType() - ' clsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'End Sub - Private Sub TestOKEnabled() If Not ucrReceiverView.IsEmpty Then If rdoDispSepOutputWindow.Checked Then ucrBase.OKEnabled(True) ElseIf rdoDispOutputWindow.Checked Then ucrBase.OKEnabled(True) - 'If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then - ' ucrBase.OKEnabled(True) - ' Else - ' ucrBase.OKEnabled(False) - ' End If Else ucrBase.OKEnabled(True) - 'If rdoHTMLOutputWindow.Checked AndAlso ((ucrChkSortColumn.Checked AndAlso Not ucrReceiverSortCol.IsEmpty) OrElse Not ucrChkSortColumn.Checked) Then - ' ucrBase.OKEnabled(True) - 'Else - ' ucrBase.OKEnabled(False) - 'End If End If Else ucrBase.OKEnabled(False) @@ -274,99 +235,24 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else - 'ucrReceiverView.SetParameter(New RParameter("x", 0)) clsDummyFunction.AddParameter("checked", "html", iPosition:=0) - ' ucrReceiverView.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) - 'ucrReceiverView.ClearAdditionalCodeParameterPairs() - ucrReceiverView.AddAdditionalCodeParameterPair(clsBaseOperator, New RParameter("operation"), iAdditionalPairNo:=1) - ' ucrReceiverView.AddAdditionalCodeParameterPair(New RParameter("x"), iAdditionalPairNo:=2) - 'ucrReceiverView.AddAdditionalCodeParameterPair("x", -2) - clsBaseOperator.SetOperation("%>%") - clsBaseOperator.bBrackets = False - - clsHeadRFunction.SetPackageName("utils") - clsHeadRFunction.SetRCommand("head") - clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=0, bIncludeArgumentName:=False) - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - - clsGtRFunction.SetPackageName("gt") - clsGtRFunction.SetRCommand("gt") - clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) - clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - strRObjectFormatToAssignTo:=RObjectFormat.Html, - strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, - strObjectName:="last_table") - - - 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - - 'ucrReceiverView.SetParameter(New RParameter("df_columns_to_use_param", 0, bNewIncludeArgumentName:=False)) - ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - 'clsBaseOperator.SetOperation("%>%") - ' clsBaseOperator.bBrackets = False - - ' clsHeadRFunction.SetPackageName("utils") - ' clsHeadRFunction.SetRCommand("head") - 'clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=6, iPosition:=4, bIncludeArgumentName:=False) - 'clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=5, bIncludeArgumentName:=False) - - 'clsGtRFunction.SetPackageName("gt") - ' clsGtRFunction.SetRCommand("gt") - 'clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=6, bIncludeArgumentName:=False) - 'clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - ' strRObjectFormatToAssignTo:=RObjectFormat.Html, - ' strRDataFrameNameToAddObjectTo:=ucrSelectorForView.strCurrentDataFrame, - ' strObjectName:="last_table") + + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) cmdTableOptions.Visible = True ucrSaveData.Visible = True - - - ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - 'If ucrViewChkPreview.Checked Then - ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - 'Else - ' clsBaseOperator.RemoveParameterByName("head") - 'End If + If ucrViewChkPreview.Checked Then + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + Else + clsBaseOperator.RemoveParameterByName("head") + End If End If - - ' ucrBase.clsRsyntax.SetBaseRFunction(clsAsHtmlWidgetFunction) - ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - - - 'If ucrViewChkPreview.Checked Then - ' ucrReceiverView.bForceAsDataFrame = False - ' ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) - ' ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - ' ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) - ' ' ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) - 'End If - End Sub Private Sub DataFrameLength() ucrNudNumberRows.Maximum = ucrSelectorForView.ucrAvailableDataFrames.iDataFrameLength End Sub - 'Private Sub ucrViewChkPreview_Load(sender As Object, e As EventArgs) Handles ucrViewChkPreview.Load - ' If ucrViewChkPreview.Checked Then - ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) - ' Else - ' clsBaseOperator.RemoveParameterByName("head") - ' End If - 'End Sub - - 'Private Sub ucrChkRowNumbers_Load(sender As Object, e As EventArgs) Handles ucrChkRowNumbers.Load - ' If ucrViewChkPreview.Checked Then - ' ucrNudNumberRows.AddParameter("n", iPosition:=1, bIncludeArgumentName:=False) - ' Else - ' ucr.RemoveParameterByName("n") - ' ' clsAsHtmlWidgetFunctionlsViewAllFunction.AddParameter("x", clsRFunctionParameter:=ucrSelectorForView.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - ' End If - 'End Sub Private Sub FunctionControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged, ucrViewNudPreview.ControlValueChanged, ucrChkDisplayFromTop.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged, ucrReceiverView.ControlValueChanged If bControlsUpdated Then @@ -375,15 +261,6 @@ Public Class dlgView GetObjectName() End Sub - 'Private Sub ucrViewChkPreview_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrViewChkPreview.ControlValueChanged - ' If ucrViewChkPreview.Checked Then - ' clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) - ' Else - ' clsBaseOperator.RemoveParameterByName("head") - ' End If - 'End Sub - - Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged 'Not yet implemented 'If rdoHTMLOutputWindow.Checked AndAlso ucrChkSortColumn.Checked Then @@ -393,9 +270,9 @@ Public Class dlgView 'End If End Sub + Private Sub ucrSelectorForView_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForView.ControlValueChanged DataFrameLength() - 'SetSelectorParameterType() End Sub Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click @@ -420,13 +297,8 @@ Public Class dlgView Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) ElseIf rdoHTMLOutputWindow.Checked Then - ' clsOutputWindowFunction.SetRCommand("head") Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - 'If ucrViewChkPreview.Checked Then - ' strPrefix = clsBaseOperator.GetRObjectToAssignTo - ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - 'End If End If End Sub From 328e2861c8209e226933d26928d0a721859abe24 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:47:17 +0300 Subject: [PATCH 31/77] changes --- instat/dlgView.vb | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 02e121d08b9..2e6c1fba30c 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -160,6 +160,8 @@ Public Class dlgView clsViewColumnsFunction.SetPackageName("utils") clsViewColumnsFunction.SetRCommand("View") + + ' ChangeFunctionParameters() End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -178,9 +180,19 @@ Public Class dlgView ucrChkDisplayFromTop.SetRCode(clsOutputWindowFunction, bReset) ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) ucrViewNudPreview.SetRCode(clsHeadRFunction, bReset) - ucrSelectorForView.SetRCode(clsBaseOperator, bReset) + ucrSelectorForView.SetRCode(clsViewColumnsFunction, bReset) ucrSaveData.SetRCode(clsBaseOperator, bReset) + 'ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) + 'ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) + + 'ucrPnlDisplayFrom.SetRCode(clsOutputWindowFunction, bReset) + 'ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) + '' ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) + ' ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) + ' ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ' ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) + DataFrameLength() ChangeFunctionParameters() bControlsUpdated = True @@ -230,19 +242,18 @@ Public Class dlgView ElseIf rdoDispSepOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) ucrBase.clsRsyntax.iCallType = 0 + ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) cmdTableOptions.Visible = False ucrSaveData.Visible = False Else clsDummyFunction.AddParameter("checked", "html", iPosition:=0) - ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) - cmdTableOptions.Visible = True ucrSaveData.Visible = True If ucrViewChkPreview.Checked Then - clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=1, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="head", clsRFunctionParameter:=clsHeadRFunction, iPosition:=2, bIncludeArgumentName:=False) Else clsBaseOperator.RemoveParameterByName("head") End If @@ -270,7 +281,6 @@ Public Class dlgView 'End If End Sub - Private Sub ucrSelectorForView_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForView.ControlValueChanged DataFrameLength() End Sub @@ -295,10 +305,10 @@ Public Class dlgView Private Sub GetObjectName() If rdoDispOutputWindow.Checked Then Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) ElseIf rdoHTMLOutputWindow.Checked Then Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) End If End Sub From ad93859b8b6e90e4ac129fea08ec8458a83ef716 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:17:29 +0300 Subject: [PATCH 32/77] tables --- instat/dlgView.vb | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 2e6c1fba30c..c4a2faaa61d 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -130,8 +130,8 @@ Public Class dlgView clsDummyFunction.AddParameter("checked", "window", iPosition:=0) clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") - clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) + ' clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + ' clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) clsOutputWindowFunction.SetPackageName("utils") @@ -174,6 +174,8 @@ Public Class dlgView ucrSelectorForView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, ucrSelectorForView.GetParameter(), iAdditionalPairNo:=1) ucrSaveData.AddAdditionalRCode(clsOutputWindowFunction, iAdditionalPairNo:=1) + ucrReceiverView.AddAdditionalCodeParameterPair(clsViewColumnsFunction, New RParameter("x"), iAdditionalPairNo:=2) + ucrReceiverView.SetRCode(clsBaseOperator, bReset) ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) ucrViewChkPreview.SetRCode(clsBaseOperator, bReset) @@ -229,8 +231,8 @@ Public Class dlgView If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) - ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + 'ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) If ucrChkDisplayFromTop.Checked Then clsOutputWindowFunction.SetRCommand("head") Else @@ -241,13 +243,15 @@ Public Class dlgView End If ElseIf rdoDispSepOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) + ucrBase.clsRsyntax.iCallType = 0 - ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ucrSaveData.Visible = False cmdTableOptions.Visible = False ucrSaveData.Visible = False Else + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) cmdTableOptions.Visible = True @@ -269,7 +273,7 @@ Public Class dlgView If bControlsUpdated Then ChangeFunctionParameters() End If - GetObjectName() + ' GetObjectName() End Sub Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged @@ -299,18 +303,18 @@ Public Class dlgView End Sub Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged - GetObjectName() + 'GetObjectName() End Sub - Private Sub GetObjectName() - If rdoDispOutputWindow.Checked Then - Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) - ElseIf rdoHTMLOutputWindow.Checked Then - Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) - End If - End Sub + 'Private Sub GetObjectName() + ' If rdoDispOutputWindow.Checked Then + ' Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") + ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) + ' ElseIf rdoHTMLOutputWindow.Checked Then + ' Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo + ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) + ' End If + 'End Sub Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) From 6f0def8daac7d6d41625867aef523a27029a9d85 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:30:27 +0300 Subject: [PATCH 33/77] objectname --- instat/dlgView.vb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index c4a2faaa61d..e37587895ed 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -273,7 +273,7 @@ Public Class dlgView If bControlsUpdated Then ChangeFunctionParameters() End If - ' GetObjectName() + GetObjectName() End Sub Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged @@ -303,18 +303,18 @@ Public Class dlgView End Sub Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged - 'GetObjectName() + GetObjectName() End Sub - 'Private Sub GetObjectName() - ' If rdoDispOutputWindow.Checked Then - ' Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") - ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) - ' ElseIf rdoHTMLOutputWindow.Checked Then - ' Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo - ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) - ' End If - 'End Sub + Private Sub GetObjectName() + If rdoDispOutputWindow.Checked Then + Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) + ElseIf rdoHTMLOutputWindow.Checked Then + Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) + End If + End Sub Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) From a920bce96401ab3ac1f556356c526825a46e657e Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Tue, 29 Oct 2024 08:19:23 +0300 Subject: [PATCH 34/77] final --- instat/dlgView.vb | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index e37587895ed..72be08db817 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -44,10 +44,6 @@ Public Class dlgView 'Needed because window may pop up window which will disappear in a separate thread ucrBase.clsRsyntax.bSeparateThread = False - ' ucrReceiverView.SetParameter(New RParameter("x", 0)) - ' ucrReceiverView.SetParameter(New RParameter("df_columns_to_use_param", 0, bNewIncludeArgumentName:=False)) - - ucrReceiverView.SetParameterIsRFunction() ucrReceiverView.Selector = ucrSelectorForView ucrReceiverView.bForceAsDataFrame = True @@ -130,8 +126,8 @@ Public Class dlgView clsDummyFunction.AddParameter("checked", "window", iPosition:=0) clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") - ' clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - ' clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) + clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) clsOutputWindowFunction.SetPackageName("utils") @@ -160,8 +156,6 @@ Public Class dlgView clsViewColumnsFunction.SetPackageName("utils") clsViewColumnsFunction.SetRCommand("View") - - ' ChangeFunctionParameters() End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -185,16 +179,6 @@ Public Class dlgView ucrSelectorForView.SetRCode(clsViewColumnsFunction, bReset) ucrSaveData.SetRCode(clsBaseOperator, bReset) - 'ucrReceiverView.SetRCode(clsViewColumnsFunction, bReset) - 'ucrPnlDisplayWindow.SetRCode(clsDummyFunction, bReset) - - 'ucrPnlDisplayFrom.SetRCode(clsOutputWindowFunction, bReset) - 'ucrNudNumberRows.SetRCode(clsOutputWindowFunction, bReset) - '' ucrChkSpecifyRows.SetRCode(clsOutputWindowFunction, bReset) - ' ucrSelectorForView.SetRCode(clsViewAllFunction, bReset) - ' ucrPnlViewData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ' ucrSaveData.SetRCode(clsAsHtmlWidgetFunction, bReset) - DataFrameLength() ChangeFunctionParameters() bControlsUpdated = True @@ -228,11 +212,11 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = True ucrBase.clsRsyntax.iCallType = 2 - + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) - 'ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + If ucrChkDisplayFromTop.Checked Then clsOutputWindowFunction.SetRCommand("head") Else @@ -243,15 +227,14 @@ Public Class dlgView End If ElseIf rdoDispSepOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "viewer", iPosition:=0) - + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) ucrBase.clsRsyntax.iCallType = 0 ucrBase.clsRsyntax.SetBaseRFunction(clsViewColumnsFunction) - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) ucrSaveData.Visible = False cmdTableOptions.Visible = False ucrSaveData.Visible = False Else - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) cmdTableOptions.Visible = True @@ -309,10 +292,10 @@ Public Class dlgView Private Sub GetObjectName() If rdoDispOutputWindow.Checked Then Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) ElseIf rdoHTMLOutputWindow.Checked Then Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=0) + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) End If End Sub From 9323682dc51f35c89ba65b817ee13cc26b43a5ae Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Tue, 29 Oct 2024 08:48:41 +0300 Subject: [PATCH 35/77] changes to the code --- instat/dlgSummaryTables.vb | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index e0612542be2..86bb6bc4714 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -152,7 +152,6 @@ Public Class dlgSummaryTables ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayMargins}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins, ucrNudColFactors}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkOmitMissing}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) - 'ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrPnlColumnFactor}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 2)) ucrChkDisplayAsPercentage.SetText("As Percentages") @@ -196,7 +195,6 @@ Public Class dlgSummaryTables ucrReceiverFactors.SetMeAsReceiver() ucrSelectorSummaryTables.Reset() ucrSaveTable.Reset() - 'ucrNudColFactors.SetText(1) ucrBase.clsRsyntax.GetBeforeCodes().Clear() @@ -378,10 +376,29 @@ Public Class dlgSummaryTables End Sub Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, - ucrChkSummaries.ControlValueChanged, ucrPnlSummaryFrequencyTables.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged, + ucrChkSummaries.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged, ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged + + SetDefaultValues() + SetVariableDefaults() + SetSummariesDefaults() + SetColFactorDefaults() + SettingParameters() + End Sub + + Private Sub ucrPnlSummaryFrequencyTables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSummaryFrequencyTables.ControlValueChanged cmdSummaries.Visible = rdoSummaryTable.Checked cmdFormatTable.Location = New Point(286, If(rdoSummaryTable.Checked, 464, 273)) + + DialogueSize() + SettingParameters() + SetDefaultValues() + SetVariableDefaults() + SetSummariesDefaults() + SetColFactorDefaults() + End Sub + + Private Sub SettingParameters() If rdoFrequencyTable.Checked Then grpDisplay.Visible = False clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsFrequencyOperator, iPosition:=0) @@ -397,13 +414,8 @@ Public Class dlgSummaryTables AddPivotWiderVariables() clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) End If - End If - DialogueSize() - SetDefaultValues() - SetVariableDefaults() - SetSummariesDefaults() - SetColFactorDefaults() + End Sub Private Sub FillListView() @@ -557,5 +569,4 @@ Public Class dlgSummaryTables End If UcrNudColumnSumFactors.Minimum = 0 End Sub - End Class From 698aa0f53786733ab9954ae4776fb6884918bfae Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 30 Oct 2024 16:38:26 +0300 Subject: [PATCH 36/77] changes --- instat/dlgSummaryTables.vb | 45 ++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 86bb6bc4714..455080a8640 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -209,7 +209,7 @@ Public Class dlgSummaryTables clsSummariesList.AddParameter("summary_mean", Chr(34) & "summary_mean" & Chr(34), bIncludeArgumentName:=False) ' TODO decide which default(s) to use? clsSummaryDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") - clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=8) + clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=8) clsSummaryDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList, iPosition:=12) clsSummaryDefaultFunction.SetAssignToObject("summary_table") @@ -232,7 +232,7 @@ Public Class dlgSummaryTables clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.bBrackets = False clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryDefaultFunction, iPosition:=0) - clsSummaryOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=2) + clsSummaryOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=2) clsSpannerOperator.SetOperation("%>%") clsSpannerOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=0) @@ -384,6 +384,7 @@ Public Class dlgSummaryTables SetSummariesDefaults() SetColFactorDefaults() SettingParameters() + AddPivotWiderVariables() End Sub Private Sub ucrPnlSummaryFrequencyTables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSummaryFrequencyTables.ControlValueChanged @@ -396,6 +397,7 @@ Public Class dlgSummaryTables SetVariableDefaults() SetSummariesDefaults() SetColFactorDefaults() + AddPivotWiderVariables() End Sub Private Sub SettingParameters() @@ -411,11 +413,12 @@ Public Class dlgSummaryTables End If If bRCodeSet Then If rdoFrequencyTable.Checked Then - AddPivotWiderVariables() clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + Else + clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) End If End If - + AddPivotWiderVariables() End Sub Private Sub FillListView() @@ -496,9 +499,43 @@ Public Class dlgSummaryTables ' Pass the selected variables to the clsPivotWiderFunction's names_from parameter clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) + Else + Dim numSumm As Integer = UcrNudColumnSumFactors.Value + + ' Get the list of selected variable names from ucrReceiverFactors + Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() + + ' Create a new list to store the selected summary variables + Dim selectedSumm As New List(Of String) + + ' Loop through the ucrReceiverFactors and get only the first numSumm items + For i As Integer = 0 To Math.Min(numSumm, varNames.Count) - 1 + selectedSumm.Add(varNames(i)) + Next + + ' Start creating the names_from argument + Dim namesFromList As New List(Of String) From {String.Join(",", selectedSumm)} + + ' Add "variable" if ucrReceiverSummaryCols has more than one item and numSumm exceeds varNames.Count + If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > varNames.Count Then + namesFromList.Add("variable") + End If + + ' Add "summary" if both ucrReceiverSummaryCols and ucrReorderSummary have more than one item and numSumm exceeds the total count + If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm > varNames.Count + 1 Then + namesFromList.Add("summary") + End If + + ' Join names_from components with commas and wrap in c() + Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" + + ' Pass the constructed names_from argument to clsPivotWiderFunction + clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) End If End Sub + + Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged, ucrReceiverSummaryCols.SelectionChanged, ucrReorderSummary.SelectedIndexChanged SetDefaultValues() SetSummariesDefaults() From 24c60d3d5cc2e89ac87bc3ffc31773d6b3d11ca2 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 31 Oct 2024 08:24:18 +0300 Subject: [PATCH 37/77] changes to the code --- instat/dlgSummaryTables.vb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 455080a8640..ffb473bb87e 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -573,7 +573,10 @@ Public Class dlgSummaryTables Dim defaultVariables As Integer = selectedColumns.Count If ucrReceiverSummaryCols.Count > 1 Then - ucrNudPositionVar.Value = defaultVariables + 1 + 'ucrNudPositionVar.Value = defaultVariables + 1 + ucrNudPositionVar.Maximum = defaultVariables + 1 + ucrNudPositionVar.Minimum = 0 + Else ucrNudPositionVar.Value = 0 End If @@ -585,7 +588,9 @@ Public Class dlgSummaryTables Dim defaultSummaries As Integer = selectedSummaries.Count If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then - ucrNudPositionSum.Value = defaultSummaries + 2 + 'ucrNudPositionSum.Value = defaultSummaries + 2 + ucrNudPositionSum.Maximum = defaultSummaries + 2 + ucrNudPositionSum.Minimum = 0 Else ucrNudPositionSum.Value = 0 End If From 0a5390808c107fa072dc22dd7ca2b89f33108535 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 31 Oct 2024 11:49:32 +0300 Subject: [PATCH 38/77] changes --- instat/dlgSummaryTables.vb | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index ffb473bb87e..d15512dadd0 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -279,8 +279,6 @@ Public Class dlgSummaryTables ucrChkWeight.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkStoreResults.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsFrequencyDefaultFunction, bReset) - ucrNudPositionSum.SetRCode(clsSummaryDefaultFunction, bReset) - ucrNudPositionVar.SetRCode(clsSummaryDefaultFunction, bReset) ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) If bReset Then ucrReceiverSummaryCols.SetRCode(clsSummaryDefaultFunction, bReset) @@ -288,6 +286,8 @@ Public Class dlgSummaryTables ucrNudColFactors.SetRCode(clsFrequencyDefaultFunction, bReset) ucrPnlSummaryFrequencyTables.SetRCode(clsDummyFunction, bReset) UcrNudColumnSumFactors.SetRCode(clsSummaryDefaultFunction, bReset) + ucrNudPositionSum.SetRCode(clsSummaryDefaultFunction, bReset) + ucrNudPositionVar.SetRCode(clsSummaryDefaultFunction, bReset) End If bRCodeSet = True FillListView() @@ -415,7 +415,11 @@ Public Class dlgSummaryTables If rdoFrequencyTable.Checked Then clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) Else - clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If UcrNudColumnSumFactors.Value = 0 Then + clsSummaryOperator.RemoveParameterByName("col_factor") + Else + clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + End If End If End If AddPivotWiderVariables() @@ -513,24 +517,41 @@ Public Class dlgSummaryTables selectedSumm.Add(varNames(i)) Next - ' Start creating the names_from argument - Dim namesFromList As New List(Of String) From {String.Join(",", selectedSumm)} + ' Initialize namesFromList with the selected summary variables + Dim namesFromList As New List(Of String)(selectedSumm) ' Add "variable" if ucrReceiverSummaryCols has more than one item and numSumm exceeds varNames.Count If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > varNames.Count Then namesFromList.Add("variable") End If - ' Add "summary" if both ucrReceiverSummaryCols and ucrReorderSummary have more than one item and numSumm exceeds the total count + ' Add "summary" if there is more than one item in ucrReceiverSummaryCols, ucrReorderSummary has more than one item, + ' and numSumm exceeds the total count of varNames If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm > varNames.Count + 1 Then namesFromList.Add("summary") End If + ' Reorder only if "variable" and/or "summary" are already present in namesFromList + If namesFromList.Contains("variable") Then + ' Get the desired position for "variable" and move it to that position + Dim variableIndex As Integer = Math.Min(ucrNudPositionVar.Value, namesFromList.Count) + namesFromList.Remove("variable") + namesFromList.Insert(variableIndex, "variable") + End If + + If namesFromList.Contains("summary") Then + ' Get the desired position for "summary" and move it to that position + Dim summaryIndex As Integer = Math.Min(ucrNudPositionSum.Value, namesFromList.Count) + namesFromList.Remove("summary") + namesFromList.Insert(summaryIndex, "summary") + End If + ' Join names_from components with commas and wrap in c() Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" ' Pass the constructed names_from argument to clsPivotWiderFunction clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) + End If End Sub @@ -576,9 +597,10 @@ Public Class dlgSummaryTables 'ucrNudPositionVar.Value = defaultVariables + 1 ucrNudPositionVar.Maximum = defaultVariables + 1 ucrNudPositionVar.Minimum = 0 - + ucrNudPositionVar.Enabled = True Else ucrNudPositionVar.Value = 0 + ucrNudPositionVar.Enabled = False End If End Sub @@ -591,8 +613,10 @@ Public Class dlgSummaryTables 'ucrNudPositionSum.Value = defaultSummaries + 2 ucrNudPositionSum.Maximum = defaultSummaries + 2 ucrNudPositionSum.Minimum = 0 + ucrNudPositionSum.Enabled = True Else ucrNudPositionSum.Value = 0 + ucrNudPositionSum.Enabled = False End If End Sub From caf7c10a8f7a57a307215ffd9209c32906192667 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 1 Nov 2024 13:59:36 +0300 Subject: [PATCH 39/77] changes --- instat/dlgSummaryTables.vb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index d15512dadd0..f191c99d6c5 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -258,8 +258,8 @@ Public Class dlgSummaryTables bResetFormatSubdialog = True TestOKEnabled() SetDefaultValues() - SetSummariesDefaults() - SetVariableDefaults() + 'SetSummariesDefaults() + 'SetVariableDefaults() End Sub Public Sub SetRCodeForControls(bReset As Boolean) @@ -292,8 +292,8 @@ Public Class dlgSummaryTables bRCodeSet = True FillListView() SetDefaultValues() - SetSummariesDefaults() - SetVariableDefaults() + 'SetSummariesDefaults() + 'SetVariableDefaults() SetColFactorDefaults() End Sub @@ -380,8 +380,8 @@ Public Class dlgSummaryTables ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged SetDefaultValues() - SetVariableDefaults() - SetSummariesDefaults() + 'SetVariableDefaults() + 'SetSummariesDefaults() SetColFactorDefaults() SettingParameters() AddPivotWiderVariables() @@ -494,7 +494,7 @@ Public Class dlgSummaryTables Dim selectedVars As New List(Of String) ' Loop through the ucrReceiverFactors and get only the first numVars items - For i As Integer = 0 To Math.Min(numVars, varNames.Count) - 1 + For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numVars, 0) Step -1 selectedVars.Add(varNames(i)) ' Add the variable name to selectedVars Next @@ -534,14 +534,14 @@ Public Class dlgSummaryTables ' Reorder only if "variable" and/or "summary" are already present in namesFromList If namesFromList.Contains("variable") Then ' Get the desired position for "variable" and move it to that position - Dim variableIndex As Integer = Math.Min(ucrNudPositionVar.Value, namesFromList.Count) + Dim variableIndex As Integer = Math.Min(ucrNudPositionVar.Value, namesFromList.Count - 1) namesFromList.Remove("variable") namesFromList.Insert(variableIndex, "variable") End If If namesFromList.Contains("summary") Then ' Get the desired position for "summary" and move it to that position - Dim summaryIndex As Integer = Math.Min(ucrNudPositionSum.Value, namesFromList.Count) + Dim summaryIndex As Integer = Math.Min(ucrNudPositionSum.Value, namesFromList.Count - 1) namesFromList.Remove("summary") namesFromList.Insert(summaryIndex, "summary") End If @@ -594,9 +594,9 @@ Public Class dlgSummaryTables Dim defaultVariables As Integer = selectedColumns.Count If ucrReceiverSummaryCols.Count > 1 Then - 'ucrNudPositionVar.Value = defaultVariables + 1 + ucrNudPositionVar.Value = defaultVariables + 1 ucrNudPositionVar.Maximum = defaultVariables + 1 - ucrNudPositionVar.Minimum = 0 + ucrNudPositionVar.Minimum = 1 ucrNudPositionVar.Enabled = True Else ucrNudPositionVar.Value = 0 @@ -610,9 +610,9 @@ Public Class dlgSummaryTables Dim defaultSummaries As Integer = selectedSummaries.Count If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then - 'ucrNudPositionSum.Value = defaultSummaries + 2 + ucrNudPositionSum.Value = defaultSummaries + 2 ucrNudPositionSum.Maximum = defaultSummaries + 2 - ucrNudPositionSum.Minimum = 0 + ucrNudPositionSum.Minimum = 1 ucrNudPositionSum.Enabled = True Else ucrNudPositionSum.Value = 0 From 4c781ff222c42231d295e1502f5c799856631daf Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 1 Nov 2024 14:25:23 +0300 Subject: [PATCH 40/77] changes --- instat/dlgSummaryTables.vb | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index f191c99d6c5..37632a1a131 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -258,8 +258,6 @@ Public Class dlgSummaryTables bResetFormatSubdialog = True TestOKEnabled() SetDefaultValues() - 'SetSummariesDefaults() - 'SetVariableDefaults() End Sub Public Sub SetRCodeForControls(bReset As Boolean) @@ -292,8 +290,6 @@ Public Class dlgSummaryTables bRCodeSet = True FillListView() SetDefaultValues() - 'SetSummariesDefaults() - 'SetVariableDefaults() SetColFactorDefaults() End Sub @@ -380,8 +376,6 @@ Public Class dlgSummaryTables ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged SetDefaultValues() - 'SetVariableDefaults() - 'SetSummariesDefaults() SetColFactorDefaults() SettingParameters() AddPivotWiderVariables() @@ -531,17 +525,18 @@ Public Class dlgSummaryTables namesFromList.Add("summary") End If + ' Reorder only if "variable" and/or "summary" are already present in namesFromList ' Reorder only if "variable" and/or "summary" are already present in namesFromList If namesFromList.Contains("variable") Then - ' Get the desired position for "variable" and move it to that position - Dim variableIndex As Integer = Math.Min(ucrNudPositionVar.Value, namesFromList.Count - 1) + ' Adjust for 1-based indexing by subtracting 1 + Dim variableIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionVar.Value - 1, namesFromList.Count - 1)) namesFromList.Remove("variable") namesFromList.Insert(variableIndex, "variable") End If If namesFromList.Contains("summary") Then - ' Get the desired position for "summary" and move it to that position - Dim summaryIndex As Integer = Math.Min(ucrNudPositionSum.Value, namesFromList.Count - 1) + ' Adjust for 1-based indexing by subtracting 1 + Dim summaryIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionSum.Value - 1, namesFromList.Count - 1)) namesFromList.Remove("summary") namesFromList.Insert(summaryIndex, "summary") End If @@ -555,8 +550,6 @@ Public Class dlgSummaryTables End If End Sub - - Private Sub ucrReceiverFactors_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactors.SelectionChanged, ucrReceiverSummaryCols.SelectionChanged, ucrReorderSummary.SelectedIndexChanged SetDefaultValues() SetSummariesDefaults() From bbb4be6705f5295bf8369f58755e4b967bed54de Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 4 Nov 2024 10:14:06 +0300 Subject: [PATCH 41/77] changes to the code --- instat/dlgSummaryTables.Designer.vb | 26 +++++++++++++------------- instat/dlgSummaryTables.resx | 3 --- instat/dlgSummaryTables.vb | 17 +++++++++-------- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/instat/dlgSummaryTables.Designer.vb b/instat/dlgSummaryTables.Designer.vb index 9af123b5747..dc580406db6 100644 --- a/instat/dlgSummaryTables.Designer.vb +++ b/instat/dlgSummaryTables.Designer.vb @@ -79,7 +79,6 @@ Partial Class dlgSummaryTables Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkStoreResults = New instat.ucrCheck() Me.ucrChkDisplayMargins = New instat.ucrCheck() - Me.ucrChkSummaries = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverSummaryCols = New instat.ucrReceiverMultiple() Me.ucrReceiverFactors = New instat.ucrReceiverMultiple() @@ -88,6 +87,7 @@ Partial Class dlgSummaryTables Me.ucrSelectorSummaryTables = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrInputFrequencyMarginName = New instat.ucrInputTextBox() Me.ucrChkFrequencyDisplayMargins = New instat.ucrCheck() + Me.ucrChkDropLevels = New instat.ucrCheck() Me.grpDisplay.SuspendLayout() Me.grpMargin.SuspendLayout() Me.grpPercentages.SuspendLayout() @@ -580,16 +580,6 @@ Partial Class dlgSummaryTables Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(225, 34) Me.ucrChkDisplayMargins.TabIndex = 10 ' - 'ucrChkSummaries - ' - Me.ucrChkSummaries.AutoSize = True - Me.ucrChkSummaries.Checked = False - Me.ucrChkSummaries.Location = New System.Drawing.Point(15, 381) - Me.ucrChkSummaries.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkSummaries.Name = "ucrChkSummaries" - Me.ucrChkSummaries.Size = New System.Drawing.Size(363, 34) - Me.ucrChkSummaries.TabIndex = 7 - ' 'ucrBase ' Me.ucrBase.AutoSize = True @@ -683,12 +673,23 @@ Partial Class dlgSummaryTables Me.ucrChkFrequencyDisplayMargins.Size = New System.Drawing.Size(320, 34) Me.ucrChkFrequencyDisplayMargins.TabIndex = 24 ' + 'ucrChkDropLevels + ' + Me.ucrChkDropLevels.AutoSize = True + Me.ucrChkDropLevels.Checked = False + Me.ucrChkDropLevels.Location = New System.Drawing.Point(15, 381) + Me.ucrChkDropLevels.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkDropLevels.Name = "ucrChkDropLevels" + Me.ucrChkDropLevels.Size = New System.Drawing.Size(225, 34) + Me.ucrChkDropLevels.TabIndex = 34 + ' 'dlgSummaryTables ' Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(734, 860) + Me.Controls.Add(Me.ucrChkDropLevels) Me.Controls.Add(Me.btnMoreOptions) Me.Controls.Add(Me.lblColumnFactors) Me.Controls.Add(Me.ucrNudColFactors) @@ -711,7 +712,6 @@ Partial Class dlgSummaryTables Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrChkDisplayMargins) Me.Controls.Add(Me.grpDisplay) - Me.Controls.Add(Me.ucrChkSummaries) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrReceiverSummaryCols) Me.Controls.Add(Me.ucrReceiverFactors) @@ -748,7 +748,6 @@ Partial Class dlgSummaryTables Friend WithEvents ucrReceiverFactors As ucrReceiverMultiple Friend WithEvents ucrReceiverSummaryCols As ucrReceiverMultiple Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrChkSummaries As ucrCheck Friend WithEvents cmdSummaries As Button Friend WithEvents ucrChkDisplayMargins As ucrCheck Friend WithEvents ucrChkOmitMissing As ucrCheck @@ -790,4 +789,5 @@ Partial Class dlgSummaryTables Friend WithEvents ucrNudPositionSum As ucrNud Friend WithEvents lblColumnSummariesFactors As Label Friend WithEvents UcrNudColumnSumFactors As ucrNud + Friend WithEvents ucrChkDropLevels As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgSummaryTables.resx b/instat/dlgSummaryTables.resx index 9aff421cfe9..b97a603004a 100644 --- a/instat/dlgSummaryTables.resx +++ b/instat/dlgSummaryTables.resx @@ -123,7 +123,4 @@ 17, 17 - - 17, 17 - \ No newline at end of file diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 37632a1a131..de9650be2de 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -120,10 +120,9 @@ Public Class dlgSummaryTables ucrInputMarginName.SetParameter(New RParameter("margin_name", iNewPosition:=5)) ucrInputMarginName.SetLinkedDisplayControl(lblMarginName) - ucrChkSummaries.SetParameter(New RParameter("treat_columns_as_factor", 8)) - ucrChkSummaries.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkSummaries.SetText("Drop Unused Levels") - ucrChkSummaries.Enabled = False + ucrChkDropLevels.SetParameter(New RParameter("drop", 9)) + ucrChkDropLevels.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkDropLevels.SetText("Drop Unused Levels") ucrNudSigFigs.SetParameter(New RParameter("signif_fig", 9)) ucrNudSigFigs.SetMinMax(0, 22) @@ -148,7 +147,7 @@ Public Class dlgSummaryTables ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReceiverSummaryCols}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReorderSummary}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayAsPercentage}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkSummaries}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) + 'ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkSummaries}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayMargins}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins, ucrNudColFactors}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkOmitMissing}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) @@ -210,12 +209,14 @@ Public Class dlgSummaryTables clsSummaryDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=8) + clsSummaryDefaultFunction.AddParameter("drop", "FALSE", iPosition:=9) clsSummaryDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList, iPosition:=12) clsSummaryDefaultFunction.SetAssignToObject("summary_table") clsFrequencyDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") clsFrequencyDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=8) clsFrequencyDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=10) + clsFrequencyDefaultFunction.AddParameter("drop", "FALSE", iPosition:=9) clsFrequencyDefaultFunction.AddParameter("summaries", "count_label", iPosition:=11) clsFrequencyDefaultFunction.SetAssignToObject("frequency_table") @@ -266,6 +267,7 @@ Public Class dlgSummaryTables ucrChkStoreResults.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrChkStoreResults.GetParameter, iAdditionalPairNo:=1) ucrNudSigFigs.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrNudSigFigs.GetParameter, iAdditionalPairNo:=1) ucrReceiverFactors.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrReceiverFactors.GetParameter, iAdditionalPairNo:=1) + ucrChkDropLevels.AddAdditionalCodeParameterPair(clsFrequencyDefaultFunction, ucrChkDropLevels.GetParameter, iAdditionalPairNo:=1) ucrSelectorSummaryTables.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkOmitMissing.SetRCode(clsSummaryDefaultFunction, bReset) @@ -273,7 +275,7 @@ Public Class dlgSummaryTables ucrChkFrequencyDisplayMargins.SetRCode(clsFrequencyDefaultFunction, bReset) ucrNudSigFigs.SetRCode(clsSummaryDefaultFunction, bReset) ucrReceiverWeights.SetRCode(clsSummaryDefaultFunction, bReset) - ucrChkSummaries.SetRCode(clsSummaryDefaultFunction, bReset) + ucrChkDropLevels.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkWeight.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkStoreResults.SetRCode(clsSummaryDefaultFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsFrequencyDefaultFunction, bReset) @@ -371,8 +373,7 @@ Public Class dlgSummaryTables TestOKEnabled() End Sub - Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, - ucrChkSummaries.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged, + Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged, ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged SetDefaultValues() From b5b7db9dec7ca0aafc1f60a473a44045a380980a Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 4 Nov 2024 10:54:07 +0300 Subject: [PATCH 42/77] code change --- instat/dlgSummaryTables.vb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index de9650be2de..ede9d8f0661 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -209,14 +209,14 @@ Public Class dlgSummaryTables clsSummaryDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") clsSummaryDefaultFunction.AddParameter("treat_columns_as_factor", "TRUE", iPosition:=8) - clsSummaryDefaultFunction.AddParameter("drop", "FALSE", iPosition:=9) + clsSummaryDefaultFunction.AddParameter("drop", "TRUE", iPosition:=9) clsSummaryDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList, iPosition:=12) clsSummaryDefaultFunction.SetAssignToObject("summary_table") clsFrequencyDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") clsFrequencyDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=8) clsFrequencyDefaultFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=10) - clsFrequencyDefaultFunction.AddParameter("drop", "FALSE", iPosition:=9) + clsFrequencyDefaultFunction.AddParameter("drop", "TRUE", iPosition:=9) clsFrequencyDefaultFunction.AddParameter("summaries", "count_label", iPosition:=11) clsFrequencyDefaultFunction.SetAssignToObject("frequency_table") @@ -408,7 +408,11 @@ Public Class dlgSummaryTables End If If bRCodeSet Then If rdoFrequencyTable.Checked Then - clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If ucrNudColFactors.Value = 0 Then + clsFrequencyOperator.RemoveParameterByName("col_factor") + Else + clsFrequencyOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + End If Else If UcrNudColumnSumFactors.Value = 0 Then clsSummaryOperator.RemoveParameterByName("col_factor") From fef54dd08d4b9d055e5af18c617e71ab72c27366 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Tue, 5 Nov 2024 20:47:53 +0300 Subject: [PATCH 43/77] changes --- instat/dlgSummaryTables.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index ede9d8f0661..489edb3642c 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -374,7 +374,7 @@ Public Class dlgSummaryTables End Sub Private Sub Display_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudColFactors.ControlValueChanged, UcrNudColumnSumFactors.ControlValueChanged, - ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged + ucrReceiverFactors.ControlValueChanged, ucrNudPositionSum.ControlValueChanged, ucrNudPositionVar.ControlValueChanged, ucrReceiverSummaryCols.ControlValueChanged SetDefaultValues() SetColFactorDefaults() @@ -512,7 +512,7 @@ Public Class dlgSummaryTables Dim selectedSumm As New List(Of String) ' Loop through the ucrReceiverFactors and get only the first numSumm items - For i As Integer = 0 To Math.Min(numSumm, varNames.Count) - 1 + For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numSumm, 0) Step -1 selectedSumm.Add(varNames(i)) Next @@ -581,8 +581,8 @@ Public Class dlgSummaryTables Else ' If no variables are selected, set Minimum, Maximum, and Value to 1 ucrNudColFactors.Minimum = 0 - ucrNudColFactors.Maximum = 1 - ucrNudColFactors.Value = 1 + 'ucrNudColFactors.Maximum = 1 + 'ucrNudColFactors.Value = 1 End If End Sub @@ -593,8 +593,8 @@ Public Class dlgSummaryTables If ucrReceiverSummaryCols.Count > 1 Then ucrNudPositionVar.Value = defaultVariables + 1 - ucrNudPositionVar.Maximum = defaultVariables + 1 - ucrNudPositionVar.Minimum = 1 + ucrNudPositionVar.Maximum = defaultVariables + 2 + ucrNudPositionVar.Minimum = 0 ucrNudPositionVar.Enabled = True Else ucrNudPositionVar.Value = 0 @@ -610,7 +610,7 @@ Public Class dlgSummaryTables If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then ucrNudPositionSum.Value = defaultSummaries + 2 ucrNudPositionSum.Maximum = defaultSummaries + 2 - ucrNudPositionSum.Minimum = 1 + ucrNudPositionSum.Minimum = 0 ucrNudPositionSum.Enabled = True Else ucrNudPositionSum.Value = 0 From 361d76d13efdc08246f963ea6e8cfcf454a784c4 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 6 Nov 2024 10:43:49 +0300 Subject: [PATCH 44/77] changes --- instat/dlgSummaryTables.vb | 65 ++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 489edb3642c..cc176e976ba 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -503,55 +503,50 @@ Public Class dlgSummaryTables ' Pass the selected variables to the clsPivotWiderFunction's names_from parameter clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) Else + ' Step 1: Define the number of items to add based on UcrNudColumnSumFactors Dim numSumm As Integer = UcrNudColumnSumFactors.Value - ' Get the list of selected variable names from ucrReceiverFactors + ' Step 2: Get the list of variables in ucrReceiverFactors Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() - ' Create a new list to store the selected summary variables - Dim selectedSumm As New List(Of String) - - ' Loop through the ucrReceiverFactors and get only the first numSumm items - For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numSumm, 0) Step -1 - selectedSumm.Add(varNames(i)) - Next - - ' Initialize namesFromList with the selected summary variables - Dim namesFromList As New List(Of String)(selectedSumm) - - ' Add "variable" if ucrReceiverSummaryCols has more than one item and numSumm exceeds varNames.Count - If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > varNames.Count Then - namesFromList.Add("variable") + ' Step 3: Add "variable" if condition is met and place it at ucrNudPositionVar + If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > 0 Then + Dim variableIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionVar.Value - 1, varNames.Count)) + If variableIndex < varNames.Count Then + varNames.Insert(variableIndex, "variable") + Else + varNames.Add("variable") + End If End If - ' Add "summary" if there is more than one item in ucrReceiverSummaryCols, ucrReorderSummary has more than one item, - ' and numSumm exceeds the total count of varNames - If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm > varNames.Count + 1 Then - namesFromList.Add("summary") + ' Step 4: Add "summary" if condition is met and place it at ucrNudPositionSum + If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm > 1 Then + Dim summaryIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionSum.Value - 1, varNames.Count)) + If summaryIndex < varNames.Count Then + varNames.Insert(summaryIndex, "summary") + Else + varNames.Add("summary") + End If End If - ' Reorder only if "variable" and/or "summary" are already present in namesFromList - ' Reorder only if "variable" and/or "summary" are already present in namesFromList - If namesFromList.Contains("variable") Then - ' Adjust for 1-based indexing by subtracting 1 - Dim variableIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionVar.Value - 1, namesFromList.Count - 1)) - namesFromList.Remove("variable") - namesFromList.Insert(variableIndex, "variable") - End If + ' Step 5: Trim the list to include only the highest-positioned items, up to numSumm + ' Start from the end to get the highest-positioned elements + Dim namesFromList As New List(Of String) + For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numSumm, 0) Step -1 + namesFromList.Add(varNames(i)) + Next - If namesFromList.Contains("summary") Then - ' Adjust for 1-based indexing by subtracting 1 - Dim summaryIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionSum.Value - 1, namesFromList.Count - 1)) - namesFromList.Remove("summary") - namesFromList.Insert(summaryIndex, "summary") - End If + ' Step 6: Reverse the list to maintain descending order from highest position + 'namesFromList.Reverse() - ' Join names_from components with commas and wrap in c() + ' Step 7: Join names_from components with commas and wrap in c() Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" - ' Pass the constructed names_from argument to clsPivotWiderFunction + ' Step 8: Pass the constructed names_from argument to clsPivotWiderFunction clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) + + End If End Sub From 387b333537a44a85f07161ec4e4dba74495603e6 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 6 Nov 2024 13:21:51 +0300 Subject: [PATCH 45/77] changes to the code --- instat/dlgSummaryTables.vb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index cc176e976ba..20cfc58d327 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -520,7 +520,7 @@ Public Class dlgSummaryTables End If ' Step 4: Add "summary" if condition is met and place it at ucrNudPositionSum - If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm > 1 Then + If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then Dim summaryIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionSum.Value - 1, varNames.Count)) If summaryIndex < varNames.Count Then varNames.Insert(summaryIndex, "summary") @@ -536,17 +536,13 @@ Public Class dlgSummaryTables namesFromList.Add(varNames(i)) Next - ' Step 6: Reverse the list to maintain descending order from highest position - 'namesFromList.Reverse() - ' Step 7: Join names_from components with commas and wrap in c() + + ' Step 6: Join names_from components with commas and wrap in c() Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" - ' Step 8: Pass the constructed names_from argument to clsPivotWiderFunction + ' Step 7: Pass the constructed names_from argument to clsPivotWiderFunction clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) - - - End If End Sub From d51d692a2784a3b76cdb4e47a83ac556fc3d5926 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:55:05 +0300 Subject: [PATCH 46/77] sub changes --- instat/UserTables/dlgGeneralTable.vb | 2 +- instat/dlgView.vb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index d27ad3d3acd..fefc401eee2 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -1,7 +1,7 @@ Imports instat.Translations Public Class dlgGeneralTable - Public clsBaseOperator As New ROperator + Private clsBaseOperator As New ROperator Private clsHeadRFunction, clsGtRFunction As New RFunction Private bFirstload As Boolean = True diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 72be08db817..ff3f2aa8c81 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -22,7 +22,7 @@ Public Class dlgView Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsHeadRFunction, clsGtRFunction, clsOutputWindowFunction, clsHTMLFunction, clsAsHtmlWidgetFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction As New RFunction + Private clsHeadRFunction, clsGtRFunction, clsOutputWindowFunction, clsViewColumnsFunction, clsDummyFunction, clsGetObjectDataFunction As New RFunction Private bControlsUpdated As Boolean = False Private Sub dlgView_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -117,7 +117,6 @@ Public Class dlgView clsHeadRFunction = New RFunction clsGtRFunction = New RFunction clsDummyFunction = New RFunction - clsAsHtmlWidgetFunction = New RFunction ucrViewChkPreview.Checked = True ucrSelectorForView.Reset() From ae0e0efda3c83093f45445bc29a95aee053a35d1 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 6 Nov 2024 17:38:43 +0300 Subject: [PATCH 47/77] changes to the code --- instat/dlgSummaryTables.vb | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 20cfc58d327..c89d18e4c9a 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -509,9 +509,24 @@ Public Class dlgSummaryTables ' Step 2: Get the list of variables in ucrReceiverFactors Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() - ' Step 3: Add "variable" if condition is met and place it at ucrNudPositionVar + ' Step 3: Set up local variables to represent the adjusted positions without changing control values + Dim positionVar As Integer = ucrNudPositionVar.Value + Dim positionSum As Integer = ucrNudPositionSum.Value + + ' Step 4: Adjust positions if ucrNudPositionVar equals ucrNudPositionSum + If positionVar = positionSum Then + ' If both are at their maximum values, position "variable" one step lower than positionVar + If positionVar = ucrNudPositionVar.Maximum Then + positionVar = Math.Max(1, positionVar - 1) + Else + ' If not at maximum, position "summary" one step higher than positionSum + positionSum = Math.Min(ucrNudPositionSum.Maximum, positionSum + 1) + End If + End If + + ' Step 5: Add "variable" if condition is met and place it at adjusted positionVar If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > 0 Then - Dim variableIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionVar.Value - 1, varNames.Count)) + Dim variableIndex As Integer = Math.Max(0, Math.Min(positionVar - 1, varNames.Count)) If variableIndex < varNames.Count Then varNames.Insert(variableIndex, "variable") Else @@ -519,9 +534,9 @@ Public Class dlgSummaryTables End If End If - ' Step 4: Add "summary" if condition is met and place it at ucrNudPositionSum + ' Step 6: Add "summary" if condition is met and place it at adjusted positionSum If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then - Dim summaryIndex As Integer = Math.Max(0, Math.Min(ucrNudPositionSum.Value - 1, varNames.Count)) + Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum - 1, varNames.Count)) If summaryIndex < varNames.Count Then varNames.Insert(summaryIndex, "summary") Else @@ -529,20 +544,18 @@ Public Class dlgSummaryTables End If End If - ' Step 5: Trim the list to include only the highest-positioned items, up to numSumm - ' Start from the end to get the highest-positioned elements + ' Step 7: Trim the list to include only the highest-positioned items, up to numSumm Dim namesFromList As New List(Of String) For i As Integer = varNames.Count - 1 To Math.Max(varNames.Count - numSumm, 0) Step -1 namesFromList.Add(varNames(i)) Next - - - ' Step 6: Join names_from components with commas and wrap in c() + ' Step 8: Join names_from components with commas and wrap in c() Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" - ' Step 7: Pass the constructed names_from argument to clsPivotWiderFunction + ' Step 9: Pass the constructed names_from argument to clsPivotWiderFunction clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) + End If End Sub From 1277910ea40fc398e3aa1866877dd9c086631a4b Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 6 Nov 2024 17:39:49 +0300 Subject: [PATCH 48/77] changes --- instat/dlgSummaryTables.vb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index c89d18e4c9a..fcfc23d238d 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -550,10 +550,8 @@ Public Class dlgSummaryTables namesFromList.Add(varNames(i)) Next - ' Step 8: Join names_from components with commas and wrap in c() Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" - ' Step 9: Pass the constructed names_from argument to clsPivotWiderFunction clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) End If @@ -574,19 +572,14 @@ Public Class dlgSummaryTables ' Set Maximum based on the number of variables in the receiver ucrNudColFactors.Maximum = selectedCount - ' Ensure the current Value does not exceed the Maximum If ucrNudColFactors.Value > selectedCount Then - ucrNudColFactors.Value = selectedCount ' Adjust value to the max if it exceeds + ucrNudColFactors.Value = selectedCount End If - ' Set Minimum (if applicable) ucrNudColFactors.Minimum = 0 Else - ' If no variables are selected, set Minimum, Maximum, and Value to 1 ucrNudColFactors.Minimum = 0 - 'ucrNudColFactors.Maximum = 1 - 'ucrNudColFactors.Value = 1 End If End Sub From 9b1b58fca5998776b69cad4c89e15ce2b8de6a11 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 7 Nov 2024 09:18:31 +0300 Subject: [PATCH 49/77] changes to the code --- instat/dlgSummaryTables.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index fcfc23d238d..e57d29fe09f 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -203,6 +203,7 @@ Public Class dlgSummaryTables clsPivotWiderFunction.SetRCommand("pivot_wider") clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=1) + clsPivotWiderFunction.AddParameter("names_sort", "TRUE", iPosition:=2) clsSummariesList.SetRCommand("c") clsSummariesList.AddParameter("summary_mean", Chr(34) & "summary_mean" & Chr(34), bIncludeArgumentName:=False) ' TODO decide which default(s) to use? From 1fbd7f91d23b402512e4fadcb6cced8fa12346ee Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 7 Nov 2024 10:09:34 +0300 Subject: [PATCH 50/77] changes to the code --- instat/dlgSummaryTables.vb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index e57d29fe09f..768a352a8b7 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -48,8 +48,6 @@ Public Class dlgSummaryTables End Sub Private Sub InitialiseDialog() - 'Dim Maxval As Integer = ucrReceiverFactors.GetVariableNames().Count() - ucrBase.clsRsyntax.iCallType = 2 ucrBase.iHelpTopicID = 426 ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False @@ -147,7 +145,6 @@ Public Class dlgSummaryTables ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReceiverSummaryCols}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrReorderSummary}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayAsPercentage}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) - 'ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkSummaries}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkDisplayMargins}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkFrequencyDisplayMargins, ucrNudColFactors}, {rdoFrequencyTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlSummaryFrequencyTables.AddToLinkedControls({ucrChkOmitMissing}, {rdoSummaryTable}, bNewLinkedHideIfParameterMissing:=True) @@ -221,7 +218,6 @@ Public Class dlgSummaryTables clsFrequencyDefaultFunction.AddParameter("summaries", "count_label", iPosition:=11) clsFrequencyDefaultFunction.SetAssignToObject("frequency_table") - ' Gt function Dim clsGtFunction As New RFunction clsGtFunction.SetPackageName("gt") @@ -518,7 +514,7 @@ Public Class dlgSummaryTables If positionVar = positionSum Then ' If both are at their maximum values, position "variable" one step lower than positionVar If positionVar = ucrNudPositionVar.Maximum Then - positionVar = Math.Max(1, positionVar - 1) + positionVar = Math.Max(0, positionVar - 1) Else ' If not at maximum, position "summary" one step higher than positionSum positionSum = Math.Min(ucrNudPositionSum.Maximum, positionSum + 1) @@ -527,7 +523,7 @@ Public Class dlgSummaryTables ' Step 5: Add "variable" if condition is met and place it at adjusted positionVar If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > 0 Then - Dim variableIndex As Integer = Math.Max(0, Math.Min(positionVar - 1, varNames.Count)) + Dim variableIndex As Integer = Math.Max(0, Math.Min(positionVar, varNames.Count)) If variableIndex < varNames.Count Then varNames.Insert(variableIndex, "variable") Else @@ -537,7 +533,7 @@ Public Class dlgSummaryTables ' Step 6: Add "summary" if condition is met and place it at adjusted positionSum If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then - Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum - 1, varNames.Count)) + Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum, varNames.Count)) If summaryIndex < varNames.Count Then varNames.Insert(summaryIndex, "summary") Else @@ -570,7 +566,6 @@ Public Class dlgSummaryTables Dim selectedCount As Integer = selectedVariables.Count ' Ensure ucrNudColFactors.Maximum does not exceed the number of selected variables If selectedCount > 0 Then - ' Set Maximum based on the number of variables in the receiver ucrNudColFactors.Maximum = selectedCount If ucrNudColFactors.Value > selectedCount Then @@ -617,11 +612,9 @@ Public Class dlgSummaryTables End Sub Private Sub SetColFactorDefaults() - ' Retrieve the list of selected column factors from ucrReceiverFactors Dim selectedColFactors As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() - Dim defaultColFactors As Integer = selectedColFactors.Count ' Initialize with minimum of 0 + Dim defaultColFactors As Integer = selectedColFactors.Count - ' Adjust defaultColFactors based on conditions involving ucrReceiverSummaryCols and ucrReorderSummary If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then UcrNudColumnSumFactors.Maximum = defaultColFactors + 2 ElseIf ucrReceiverSummaryCols.Count > 1 OrElse ucrReorderSummary.Count > 1 Then @@ -631,4 +624,5 @@ Public Class dlgSummaryTables End If UcrNudColumnSumFactors.Minimum = 0 End Sub + End Class From 74987ead418987bdcb67a35dea55881a55e8e05d Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 7 Nov 2024 13:52:49 +0300 Subject: [PATCH 51/77] changes --- instat/dlgSummaryTables.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 768a352a8b7..d5e9c69623c 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -514,7 +514,7 @@ Public Class dlgSummaryTables If positionVar = positionSum Then ' If both are at their maximum values, position "variable" one step lower than positionVar If positionVar = ucrNudPositionVar.Maximum Then - positionVar = Math.Max(0, positionVar - 1) + positionVar = Math.Max(1, positionVar - 1) Else ' If not at maximum, position "summary" one step higher than positionSum positionSum = Math.Min(ucrNudPositionSum.Maximum, positionSum + 1) @@ -523,7 +523,7 @@ Public Class dlgSummaryTables ' Step 5: Add "variable" if condition is met and place it at adjusted positionVar If ucrReceiverSummaryCols.Count > 1 AndAlso numSumm > 0 Then - Dim variableIndex As Integer = Math.Max(0, Math.Min(positionVar, varNames.Count)) + Dim variableIndex As Integer = Math.Max(0, Math.Min(positionVar - 1, varNames.Count)) If variableIndex < varNames.Count Then varNames.Insert(variableIndex, "variable") Else @@ -533,7 +533,7 @@ Public Class dlgSummaryTables ' Step 6: Add "summary" if condition is met and place it at adjusted positionSum If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then - Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum, varNames.Count)) + Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum - 1, varNames.Count)) If summaryIndex < varNames.Count Then varNames.Insert(summaryIndex, "summary") Else @@ -587,10 +587,10 @@ Public Class dlgSummaryTables If ucrReceiverSummaryCols.Count > 1 Then ucrNudPositionVar.Value = defaultVariables + 1 ucrNudPositionVar.Maximum = defaultVariables + 2 - ucrNudPositionVar.Minimum = 0 + ucrNudPositionVar.Minimum = 1 ucrNudPositionVar.Enabled = True Else - ucrNudPositionVar.Value = 0 + ucrNudPositionVar.Value = 1 ucrNudPositionVar.Enabled = False End If @@ -603,10 +603,10 @@ Public Class dlgSummaryTables If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then ucrNudPositionSum.Value = defaultSummaries + 2 ucrNudPositionSum.Maximum = defaultSummaries + 2 - ucrNudPositionSum.Minimum = 0 + ucrNudPositionSum.Minimum = 1 ucrNudPositionSum.Enabled = True Else - ucrNudPositionSum.Value = 0 + ucrNudPositionSum.Value = 1 ucrNudPositionSum.Enabled = False End If End Sub From 5abd10e43f149262304d270dc0dc51adcd1a6490 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 7 Nov 2024 20:15:44 +0300 Subject: [PATCH 52/77] changes to the code --- instat/dlgSummaryTables.vb | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index d5e9c69623c..b5ef594e1e8 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -22,7 +22,7 @@ Public Class dlgSummaryTables Private clsSummariesList As New RFunction Private bResetSubdialog As Boolean = False Private bResetFormatSubdialog As Boolean = False - Private clsSummaryDefaultFunction, clsFrequencyDefaultFunction As New RFunction + Private clsSummaryDefaultFunction, clsArrangeFunction, clsFrequencyDefaultFunction As New RFunction Private bRCodeSet As Boolean = True Private clsPivotWiderFunction As New RFunction Private ClsTabSpannerDelimFunction As New RFunction @@ -182,6 +182,7 @@ Public Class dlgSummaryTables clsDummyFunction = New RFunction clsPivotWiderFunction = New RFunction ClsTabSpannerDelimFunction = New RFunction + clsArrangeFunction = New RFunction clsJoiningPipeOperator = New ROperator clsSummaryOperator = New ROperator @@ -227,9 +228,12 @@ Public Class dlgSummaryTables ClsTabSpannerDelimFunction.SetRCommand("tab_spanner_delim") ClsTabSpannerDelimFunction.AddParameter("delim", Chr(34) & "_" & Chr(34)) + clsArrangeFunction.SetRCommand("arrange") + clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.bBrackets = False clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryDefaultFunction, iPosition:=0) + clsSummaryOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=1) clsSummaryOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=2) clsSpannerOperator.SetOperation("%>%") @@ -239,6 +243,7 @@ Public Class dlgSummaryTables clsFrequencyOperator.SetOperation("%>%") clsFrequencyOperator.bBrackets = False clsFrequencyOperator.AddParameter("tableFun", clsRFunctionParameter:=clsFrequencyDefaultFunction, iPosition:=0) + clsFrequencyOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=1) clsFrequencyOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=2) clsJoiningPipeOperator.SetOperation("%>%") @@ -486,7 +491,7 @@ Public Class dlgSummaryTables ' Get the list of selected variable names from ucrReceiverFactors Dim varNames As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() - ' Create a new list to store the selected variables + ' Create a new list to store the selected variables for names_from Dim selectedVars As New List(Of String) ' Loop through the ucrReceiverFactors and get only the first numVars items @@ -494,11 +499,25 @@ Public Class dlgSummaryTables selectedVars.Add(varNames(i)) ' Add the variable name to selectedVars Next - ' Create a comma-separated string from the selected variables + ' Create a comma-separated string from the selected variables for names_from Dim varsString As String = "c(" & String.Join(",", selectedVars) & ")" ' Pass the selected variables to the clsPivotWiderFunction's names_from parameter clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) + + ' Get the remaining variables that were not added to names_from + Dim remainingVars As New List(Of String) + + For i As Integer = 0 To varNames.Count - numVars - 1 + remainingVars.Add(varNames(i)) ' Add the remaining variables to arrange + Next + + ' Create a comma-separated string for the remaining variables + Dim arrangeString As String = String.Join(",", remainingVars) + + ' Pass the remaining variables to the arrange parameter in clsArrangeFunction + clsArrangeFunction.AddParameter("arrange", arrangeString, iPosition:=0, bIncludeArgumentName:=False) + Else ' Step 1: Define the number of items to add based on UcrNudColumnSumFactors Dim numSumm As Integer = UcrNudColumnSumFactors.Value @@ -547,10 +566,17 @@ Public Class dlgSummaryTables namesFromList.Add(varNames(i)) Next + ' Convert namesFromList to a comma-separated string for names_from parameter Dim varsSummary As String = "c(" & String.Join(",", namesFromList) & ")" - clsPivotWiderFunction.AddParameter("names_from", varsSummary, iPosition:=0) + ' Step 8: Identify remaining variables that were not added to names_from + Dim remainingVars As List(Of String) = varNames.Except(namesFromList).ToList() + + ' Convert remaining variables to a comma-separated string for arrange parameter + Dim arrangeVars As String = String.Join(",", remainingVars) + clsArrangeFunction.AddParameter("arrange", arrangeVars, iPosition:=0) + End If End Sub From c45e50e200df1ddc84d590276521fb08a327b54f Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 8 Nov 2024 13:55:49 +0300 Subject: [PATCH 53/77] changes --- instat/dlgSummaryTables.vb | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index b5ef594e1e8..06ccb294f64 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -336,6 +336,7 @@ Public Class dlgSummaryTables sdgSummaries.bEnable2VariableTab = True FillListView() SetSummariesDefaults() + SetVariableDefaults() TestOKEnabled() End Sub @@ -456,6 +457,7 @@ Public Class dlgSummaryTables Next SetSummariesDefaults() SetColFactorDefaults() + SetVariableDefaults() End Sub Private Sub ucrChkDisplayAsPercentage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDisplayAsPercentage.ControlValueChanged @@ -551,7 +553,7 @@ Public Class dlgSummaryTables End If ' Step 6: Add "summary" if condition is met and place it at adjusted positionSum - If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then + If ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum - 1, varNames.Count)) If summaryIndex < varNames.Count Then varNames.Insert(summaryIndex, "summary") @@ -610,10 +612,15 @@ Public Class dlgSummaryTables Dim selectedColumns As List(Of String) = ucrReceiverFactors.GetVariableNamesAsList() ' Example, adjust based on your control Dim defaultVariables As Integer = selectedColumns.Count - If ucrReceiverSummaryCols.Count > 1 Then + If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count = 1 Then + ucrNudPositionVar.Maximum = defaultVariables + 1 + ucrNudPositionVar.Minimum = 1 ucrNudPositionVar.Value = defaultVariables + 1 + ucrNudPositionVar.Enabled = True + ElseIf ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then ucrNudPositionVar.Maximum = defaultVariables + 2 ucrNudPositionVar.Minimum = 1 + ucrNudPositionVar.Value = defaultVariables + 1 ucrNudPositionVar.Enabled = True Else ucrNudPositionVar.Value = 1 @@ -627,14 +634,22 @@ Public Class dlgSummaryTables Dim defaultSummaries As Integer = selectedSummaries.Count If ucrReceiverSummaryCols.Count > 1 AndAlso ucrReorderSummary.Count > 1 Then - ucrNudPositionSum.Value = defaultSummaries + 2 ucrNudPositionSum.Maximum = defaultSummaries + 2 ucrNudPositionSum.Minimum = 1 + ucrNudPositionSum.Value = defaultSummaries + 2 + ucrNudPositionSum.Enabled = True + ElseIf ucrReceiverSummaryCols.Count = 1 AndAlso ucrReorderSummary.Count > 1 Then + ucrNudPositionSum.Maximum = defaultSummaries + 1 + ucrNudPositionSum.Minimum = 1 + ucrNudPositionSum.Value = defaultSummaries + 1 ucrNudPositionSum.Enabled = True Else + ucrNudPositionSum.Maximum = 1 + ucrNudPositionSum.Minimum = 1 ucrNudPositionSum.Value = 1 ucrNudPositionSum.Enabled = False End If + End Sub Private Sub SetColFactorDefaults() From dab1a631a115fd27c3dbfd04fc843fec90f44b78 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 8 Nov 2024 15:10:47 +0300 Subject: [PATCH 54/77] code changes --- instat/dlgSummaryTables.vb | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 06ccb294f64..909a040bf87 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -233,8 +233,7 @@ Public Class dlgSummaryTables clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.bBrackets = False clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsSummaryDefaultFunction, iPosition:=0) - clsSummaryOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=1) - clsSummaryOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=2) + clsSummaryOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=3) clsSpannerOperator.SetOperation("%>%") clsSpannerOperator.AddParameter("gt", clsRFunctionParameter:=clsGtFunction.Clone, iPosition:=0) @@ -243,8 +242,7 @@ Public Class dlgSummaryTables clsFrequencyOperator.SetOperation("%>%") clsFrequencyOperator.bBrackets = False clsFrequencyOperator.AddParameter("tableFun", clsRFunctionParameter:=clsFrequencyDefaultFunction, iPosition:=0) - clsFrequencyOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=1) - clsFrequencyOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=2) + clsFrequencyOperator.AddParameter("right", clsROperatorParameter:=clsSpannerOperator, iPosition:=3) clsJoiningPipeOperator.SetOperation("%>%") clsJoiningPipeOperator.AddParameter("mutable", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) @@ -507,6 +505,14 @@ Public Class dlgSummaryTables ' Pass the selected variables to the clsPivotWiderFunction's names_from parameter clsPivotWiderFunction.AddParameter("names_from", varsString, iPosition:=0) + ' Check if all variables are added to names_from + If selectedVars.Count = varNames.Count Then + ' If all variables are added to names_from, remove the arrange parameter + clsFrequencyOperator.RemoveParameterByName("arrange") + Else + clsFrequencyOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=2) + End If + ' Get the remaining variables that were not added to names_from Dim remainingVars As New List(Of String) @@ -520,6 +526,7 @@ Public Class dlgSummaryTables ' Pass the remaining variables to the arrange parameter in clsArrangeFunction clsArrangeFunction.AddParameter("arrange", arrangeString, iPosition:=0, bIncludeArgumentName:=False) + Else ' Step 1: Define the number of items to add based on UcrNudColumnSumFactors Dim numSumm As Integer = UcrNudColumnSumFactors.Value @@ -553,7 +560,7 @@ Public Class dlgSummaryTables End If ' Step 6: Add "summary" if condition is met and place it at adjusted positionSum - If ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then + If ucrReorderSummary.Count > 1 AndAlso numSumm >= 1 Then Dim summaryIndex As Integer = Math.Max(0, Math.Min(positionSum - 1, varNames.Count)) If summaryIndex < varNames.Count Then varNames.Insert(summaryIndex, "summary") @@ -575,9 +582,16 @@ Public Class dlgSummaryTables ' Step 8: Identify remaining variables that were not added to names_from Dim remainingVars As List(Of String) = varNames.Except(namesFromList).ToList() - ' Convert remaining variables to a comma-separated string for arrange parameter - Dim arrangeVars As String = String.Join(",", remainingVars) - clsArrangeFunction.AddParameter("arrange", arrangeVars, iPosition:=0) + ' Check if all variables are added to names_from + If remainingVars.Count = 0 Then + ' If all variables are added to names_from, remove the arrange parameter + clsSummaryOperator.RemoveParameterByName("arrange") + Else + ' Convert remaining variables to a comma-separated string for arrange parameter + Dim arrangeVars As String = String.Join(",", remainingVars) + clsArrangeFunction.AddParameter("arrange", arrangeVars, iPosition:=0) + clsSummaryOperator.AddParameter("arrange", clsRFunctionParameter:=clsArrangeFunction, iPosition:=2) + End If End If End Sub From 6b6fa8af9280848ef875cb66bbbc77b1b86a5bc0 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:59:20 +0300 Subject: [PATCH 55/77] adding help context --- instat/dlgDistances.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgDistances.vb b/instat/dlgDistances.vb index 0e3ccc3a91f..763ca781446 100644 --- a/instat/dlgDistances.vb +++ b/instat/dlgDistances.vb @@ -37,6 +37,7 @@ Public Class dlgDistances autoTranslate(Me) End Sub Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 145 ucrSelectorDistance.SetParameter(New RParameter("df", 0)) ucrSelectorDistance.SetParameterIsrfunction() From a6781b73abe979e3d7226729aa0140eda690081a Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:36:44 +0100 Subject: [PATCH 56/77] Added a drop down and implemented the file option to the Help menu Icon --- instat/frmMain.Designer.vb | 74 ++++++++++++++++++++++++++++---------- instat/frmMain.vb | 16 +++++++-- 2 files changed, 69 insertions(+), 21 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index daae5be1236..51e2ae14d7c 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -426,7 +426,6 @@ Partial Class frmMain Me.ToolStripSeparator76 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbResetLayout = New System.Windows.Forms.ToolStripButton() Me.separator3 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuTbHelp = New System.Windows.Forms.ToolStripButton() Me.ToolStripSeparator77 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbLan = New System.Windows.Forms.ToolStripButton() Me.separator1 = New System.Windows.Forms.ToolStripSeparator() @@ -704,6 +703,11 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuTbHelp = New System.Windows.Forms.ToolStripSplitButton() + Me.mnuToolBarHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuDataWindowHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOutputHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuLogScriptHelp = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3032,14 +3036,14 @@ Partial Class frmMain ' Me.mnuUndo.Name = "mnuUndo" Me.mnuUndo.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Z), System.Windows.Forms.Keys) - Me.mnuUndo.Size = New System.Drawing.Size(180, 22) + Me.mnuUndo.Size = New System.Drawing.Size(167, 22) Me.mnuUndo.Text = "Undo" ' 'mnuEditFind ' Me.mnuEditFind.Name = "mnuEditFind" Me.mnuEditFind.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.F), System.Windows.Forms.Keys) - Me.mnuEditFind.Size = New System.Drawing.Size(180, 22) + Me.mnuEditFind.Size = New System.Drawing.Size(167, 22) Me.mnuEditFind.Tag = "Find" Me.mnuEditFind.Text = "Find" ' @@ -3047,7 +3051,7 @@ Partial Class frmMain ' Me.mnuEditCopy.Name = "mnuEditCopy" Me.mnuEditCopy.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys) - Me.mnuEditCopy.Size = New System.Drawing.Size(180, 22) + Me.mnuEditCopy.Size = New System.Drawing.Size(167, 22) Me.mnuEditCopy.Tag = "Copy" Me.mnuEditCopy.Text = "Copy" ' @@ -3055,27 +3059,27 @@ Partial Class frmMain ' Me.mnuEditPaste.Name = "mnuEditPaste" Me.mnuEditPaste.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.V), System.Windows.Forms.Keys) - Me.mnuEditPaste.Size = New System.Drawing.Size(180, 22) + Me.mnuEditPaste.Size = New System.Drawing.Size(167, 22) Me.mnuEditPaste.Tag = "Paste" Me.mnuEditPaste.Text = "Paste" ' 'mnuEditPasteNew ' Me.mnuEditPasteNew.Name = "mnuEditPasteNew" - Me.mnuEditPasteNew.Size = New System.Drawing.Size(180, 22) + Me.mnuEditPasteNew.Size = New System.Drawing.Size(167, 22) Me.mnuEditPasteNew.Text = "Paste New..." ' 'mnuEditWordwrap ' Me.mnuEditWordwrap.Name = "mnuEditWordwrap" - Me.mnuEditWordwrap.Size = New System.Drawing.Size(180, 22) + Me.mnuEditWordwrap.Size = New System.Drawing.Size(167, 22) Me.mnuEditWordwrap.Text = "Wordwrap..." ' 'mnuEditSelectAll ' Me.mnuEditSelectAll.Name = "mnuEditSelectAll" Me.mnuEditSelectAll.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.A), System.Windows.Forms.Keys) - Me.mnuEditSelectAll.Size = New System.Drawing.Size(180, 22) + Me.mnuEditSelectAll.Size = New System.Drawing.Size(167, 22) Me.mnuEditSelectAll.Tag = "Select_All" Me.mnuEditSelectAll.Text = "Select All " ' @@ -3356,16 +3360,6 @@ Partial Class frmMain Me.separator3.Name = "separator3" Me.separator3.Size = New System.Drawing.Size(6, 37) ' - 'mnuTbHelp - ' - Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2 - Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta - Me.mnuTbHelp.Margin = New System.Windows.Forms.Padding(2, 1, 2, 2) - Me.mnuTbHelp.Name = "mnuTbHelp" - Me.mnuTbHelp.Size = New System.Drawing.Size(34, 34) - Me.mnuTbHelp.Text = "He&lp" - ' 'ToolStripSeparator77 ' Me.ToolStripSeparator77.Name = "ToolStripSeparator77" @@ -5256,6 +5250,44 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' + 'mnuTbHelp + ' + Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.mnuTbHelp.DropDownButtonWidth = 18 + Me.mnuTbHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolBarHelp, Me.mnuDataWindowHelp, Me.mnuOutputHelp, Me.mnuLogScriptHelp}) + Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2 + Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta + Me.mnuTbHelp.Name = "mnuTbHelp" + Me.mnuTbHelp.Size = New System.Drawing.Size(53, 34) + Me.mnuTbHelp.Text = "LogScript" + Me.mnuTbHelp.ToolTipText = "Help Window" + ' + 'mnuToolBarHelp + ' + Me.mnuToolBarHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuToolBarHelp.Name = "mnuToolBarHelp" + Me.mnuToolBarHelp.Size = New System.Drawing.Size(180, 22) + Me.mnuToolBarHelp.Text = "Toolbar Help" + ' + 'mnuDataWindowHelp + ' + Me.mnuDataWindowHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuDataWindowHelp.Name = "mnuDataWindowHelp" + Me.mnuDataWindowHelp.Size = New System.Drawing.Size(180, 22) + Me.mnuDataWindowHelp.Text = "Data Window Help" + ' + 'mnuOutputHelp + ' + Me.mnuOutputHelp.Name = "mnuOutputHelp" + Me.mnuOutputHelp.Size = New System.Drawing.Size(180, 22) + Me.mnuOutputHelp.Text = "Output Help" + ' + 'mnuLogScriptHelp + ' + Me.mnuLogScriptHelp.Name = "mnuLogScriptHelp" + Me.mnuLogScriptHelp.Size = New System.Drawing.Size(180, 22) + Me.mnuLogScriptHelp.Text = "Log Script Help" + ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -5343,7 +5375,6 @@ Partial Class frmMain Friend WithEvents toolStripSeparator As ToolStripSeparator Friend WithEvents separator1 As ToolStripSeparator Friend WithEvents separator2 As ToolStripSeparator - Friend WithEvents mnuTbHelp As ToolStripButton Private WithEvents mnuBar As MenuStrip Friend WithEvents mnuFile As ToolStripMenuItem Friend WithEvents mnuFileNewDataFrame As ToolStripMenuItem @@ -5981,4 +6012,9 @@ Partial Class frmMain Friend WithEvents ToolStripSeparator15 As ToolStripSeparator Friend WithEvents mnuClimaticCheckDataDistances As ToolStripMenuItem Friend WithEvents mnuUndo As ToolStripMenuItem + Friend WithEvents mnuTbHelp As ToolStripSplitButton + Friend WithEvents mnuToolBarHelp As ToolStripMenuItem + Friend WithEvents mnuDataWindowHelp As ToolStripMenuItem + Friend WithEvents mnuOutputHelp As ToolStripMenuItem + Friend WithEvents mnuLogScriptHelp As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index de20ca54564..2d2a84e1ab8 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -852,13 +852,25 @@ Public Class frmMain End Sub Private Sub mnuHelpHelp_Click(sender As Object, e As EventArgs) - Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TableOfContents, "") + Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "135") End Sub - Private Sub mnuTbHelp_Click(sender As Object, e As EventArgs) Handles mnuTbHelp.Click + Private Sub mnuTbHelp_Click(sender As Object, e As EventArgs) Handles mnuTbHelp.ButtonClick, mnuToolBarHelp.Click mnuHelpHelp_Click(sender, e) End Sub + Private Sub mnuDataWindowHelp_Click(sender As Object, e As EventArgs) Handles mnuDataWindowHelp.Click + Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "134") + End Sub + + Private Sub mnuOutputHelp_Click(sender As Object, e As EventArgs) Handles mnuOutputHelp.Click + Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "540") + End Sub + + Private Sub mnuLogScriptHelp_Click(sender As Object, e As EventArgs) Handles mnuLogScriptHelp.Click + Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "542") + End Sub + Private Sub mnuPrepareFactorRecode_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnFactorRecodeFactor.Click dlgRecodeFactor.ShowDialog() End Sub From 1e18fdfe2398bb6fb0c4ef8f988749db575a75ae Mon Sep 17 00:00:00 2001 From: Ntalumeso Date: Tue, 12 Nov 2024 09:47:49 +0300 Subject: [PATCH 57/77] minor correction in the column summary dialogue --- instat/dlgColumnStats.vb | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 4a2e6621f6f..681a1e401f6 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -220,18 +220,26 @@ Public Class dlgColumnStats sdgMissingOptions.ShowDialog() End Sub - Private Sub ucrReceiverByFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverByFactor.ControlValueChanged, ucrChkStoreResults.ControlValueChanged, ucrChkPrintOutput.ControlValueChanged - If ucrReceiverByFactor.IsEmpty Then - clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3) - clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4) - ucrBase.clsRsyntax.iCallType = 2 - Else - clsDefaultFunction.RemoveParameterByName("return_output") - If ucrChkStoreResults.Checked Then - clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3) + Private Sub ucrReceiverByFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverByFactor.ControlValueChanged, ucrChkStoreResults.ControlValueChanged, ucrChkPrintOutput.ControlValueChanged, ucrReceiverSelectedVariables.ControlValueChanged, ucrChkOriginalLevel.ControlValueChanged + If Not ucrChkOriginalLevel.Checked Then + If ucrReceiverByFactor.IsEmpty AndAlso Not ucrReceiverSelectedVariables.IsEmpty Then + clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3) + clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4) + ucrBase.clsRsyntax.iCallType = 2 + Else + clsDefaultFunction.RemoveParameterByName("return_output") + If ucrChkStoreResults.Checked Then + clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3) + End If + If ucrChkPrintOutput.Checked Then + clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4) + End If End If + Else If ucrChkPrintOutput.Checked Then clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4) + Else + clsDefaultFunction.RemoveParameterByName("return_output") End If End If End Sub From 0d703819733d22761ff717b761f70e2daa8b866e Mon Sep 17 00:00:00 2001 From: Ntalumeso Date: Tue, 12 Nov 2024 12:29:13 +0300 Subject: [PATCH 58/77] Set No loaded data text correctly after auto saving --- instat/frmMain.vb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/instat/frmMain.vb b/instat/frmMain.vb index de20ca54564..43b8517d4d1 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1150,7 +1150,7 @@ Public Class frmMain strCurrentStatus = tstatus.Text If clsRLink.bInstatObjectExists Then - tstatus.Text = "Auto saving data..." + tstatus.Text = GetTranslation("Auto saving data...") Cursor = Cursors.WaitCursor If Not Directory.Exists(strAutoSaveDataFolderPath) Then Directory.CreateDirectory(strAutoSaveDataFolderPath) @@ -1168,11 +1168,16 @@ Public Class frmMain clsSaveRDS.AddParameter("object", clsRLink.strInstatDataObject) clsSaveRDS.AddParameter("file", Chr(34) & strCurrentAutoSaveDataFilePath.Replace("\", "/") & Chr(34)) clsRLink.RunInternalScript(clsSaveRDS.ToScript(), bSilent:=True, bShowWaitDialogOverride:=False) - tstatus.Text = strCurrentStatus + + If strCurrentStatus.Equals("No data loaded") Then + tstatus.Text = GetTranslation(strCurrentStatus) + Else + tstatus.Text = strCurrentStatus + End If + Cursor = Cursors.Default bFirstBackupDone = True End If - autoTranslate(Me) End Sub Public Sub DeleteAutoSaveFiles() From 0b2b2f90e72e29b506119861303ff8473c6f1711 Mon Sep 17 00:00:00 2001 From: Ntalumeso Date: Tue, 12 Nov 2024 12:48:48 +0300 Subject: [PATCH 59/77] minor code change --- instat/dlgColumnStats.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 681a1e401f6..7769627a284 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -230,9 +230,13 @@ Public Class dlgColumnStats clsDefaultFunction.RemoveParameterByName("return_output") If ucrChkStoreResults.Checked Then clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3) + Else + clsDefaultFunction.AddParameter("store_results", "FALSE", iPosition:=3) End If If ucrChkPrintOutput.Checked Then clsDefaultFunction.AddParameter("return_output", "TRUE", iPosition:=4) + Else + clsDefaultFunction.AddParameter("return_output", "FALSE", iPosition:=4) End If End If Else @@ -241,6 +245,7 @@ Public Class dlgColumnStats Else clsDefaultFunction.RemoveParameterByName("return_output") End If + clsDefaultFunction.AddParameter("store_results", "TRUE", iPosition:=3) End If End Sub From 5cb82f8458d555d967572ec5e374349c4a5ca1d9 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 12 Nov 2024 14:31:05 +0300 Subject: [PATCH 60/77] Initial changes --- instat/UserTables/sdgTableOptions.vb | 12 +- instat/dlgUseTable.Designer.vb | 155 ++++++++-------- instat/dlgUseTable.resx | 3 + instat/dlgUseTable.vb | 257 +++++++++++---------------- 4 files changed, 178 insertions(+), 249 deletions(-) diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index 53386ef1e0b..7140bb5b89d 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -41,16 +41,12 @@ Public Class sdgTableOptions End Sub ''' - ''' An R operateor that has a parameter named "gt" set up. - ''' The parameter should be an R Function that generates script "gt:gt()" as part of the last script statement. + ''' Sets up the sub dialog. + ''' Expected to be called before showing the dialog. ''' - ''' + ''' Name of the data frame contained in the data book + ''' R operator that has a 'gt' parameter that produces a 'gt' object. Public Sub Setup(strDataFrameName As String, clsNewOperator As ROperator) - If clsTablesUtils.FindRFunctionsParamsWithRCommand({"gt"}, clsNewOperator).Count = 0 Then - MsgBox("Developer Error: Parameter with 'gt' as name MUST be set up before using this subdialog") - Exit Sub - End If - clsOperator = clsNewOperator ucrHeader.Setup(clsOperator) diff --git a/instat/dlgUseTable.Designer.vb b/instat/dlgUseTable.Designer.vb index 2c8c4e25718..6b0aaf480b9 100644 --- a/instat/dlgUseTable.Designer.vb +++ b/instat/dlgUseTable.Designer.vb @@ -22,72 +22,28 @@ Partial Class dlgUseTable 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.rdoAsHTML = New System.Windows.Forms.RadioButton() - Me.rdoAsRTF = New System.Windows.Forms.RadioButton() - Me.rdoAsWord = New System.Windows.Forms.RadioButton() - Me.rdoAsLaTex = New System.Windows.Forms.RadioButton() - Me.cmdTableOptions = New System.Windows.Forms.Button() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgUseTable)) + Me.btnTableOptions = New System.Windows.Forms.Button() Me.lblTable = New System.Windows.Forms.Label() - Me.lblExportTables = New System.Windows.Forms.Label() Me.ucrSaveTable = New instat.ucrSave() Me.ucrTablesReceiver = New instat.ucrReceiverSingle() Me.ucrTablesSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrPnlOptions = New instat.UcrPanel() + Me.ucrFilePath = New instat.ucrFilePath() + Me.lblFileType = New System.Windows.Forms.Label() + Me.ucrChkExport = New instat.ucrCheck() + Me.cboFileType = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' - 'rdoAsHTML - ' - Me.rdoAsHTML.AutoSize = True - Me.rdoAsHTML.Location = New System.Drawing.Point(14, 269) - Me.rdoAsHTML.Name = "rdoAsHTML" - Me.rdoAsHTML.Size = New System.Drawing.Size(55, 17) - Me.rdoAsHTML.TabIndex = 6 - Me.rdoAsHTML.TabStop = True - Me.rdoAsHTML.Text = "HTML" - Me.rdoAsHTML.UseVisualStyleBackColor = True - ' - 'rdoAsRTF - ' - Me.rdoAsRTF.AutoSize = True - Me.rdoAsRTF.Location = New System.Drawing.Point(14, 294) - Me.rdoAsRTF.Name = "rdoAsRTF" - Me.rdoAsRTF.Size = New System.Drawing.Size(46, 17) - Me.rdoAsRTF.TabIndex = 7 - Me.rdoAsRTF.TabStop = True - Me.rdoAsRTF.Text = "RTF" - Me.rdoAsRTF.UseVisualStyleBackColor = True - ' - 'rdoAsWord - ' - Me.rdoAsWord.AutoSize = True - Me.rdoAsWord.Location = New System.Drawing.Point(14, 319) - Me.rdoAsWord.Name = "rdoAsWord" - Me.rdoAsWord.Size = New System.Drawing.Size(51, 17) - Me.rdoAsWord.TabIndex = 8 - Me.rdoAsWord.TabStop = True - Me.rdoAsWord.Text = "Word" - Me.rdoAsWord.UseVisualStyleBackColor = True - ' - 'rdoAsLaTex - ' - Me.rdoAsLaTex.AutoSize = True - Me.rdoAsLaTex.Location = New System.Drawing.Point(14, 344) - Me.rdoAsLaTex.Name = "rdoAsLaTex" - Me.rdoAsLaTex.Size = New System.Drawing.Size(55, 17) - Me.rdoAsLaTex.TabIndex = 9 - Me.rdoAsLaTex.TabStop = True - Me.rdoAsLaTex.Text = "LaTex" - Me.rdoAsLaTex.UseVisualStyleBackColor = True - ' - 'cmdTableOptions - ' - Me.cmdTableOptions.Location = New System.Drawing.Point(8, 214) - Me.cmdTableOptions.Name = "cmdTableOptions" - Me.cmdTableOptions.Size = New System.Drawing.Size(135, 23) - Me.cmdTableOptions.TabIndex = 11 - Me.cmdTableOptions.Text = "Table Options" - Me.cmdTableOptions.UseVisualStyleBackColor = True + 'btnTableOptions + ' + Me.btnTableOptions.Location = New System.Drawing.Point(8, 214) + Me.btnTableOptions.Name = "btnTableOptions" + Me.btnTableOptions.Size = New System.Drawing.Size(135, 23) + Me.btnTableOptions.TabIndex = 11 + Me.btnTableOptions.Text = "Table Options" + Me.btnTableOptions.UseVisualStyleBackColor = True ' 'lblTable ' @@ -99,20 +55,10 @@ Partial Class dlgUseTable Me.lblTable.TabIndex = 25 Me.lblTable.Text = "Table:" ' - 'lblExportTables - ' - Me.lblExportTables.AutoSize = True - Me.lblExportTables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblExportTables.Location = New System.Drawing.Point(12, 248) - Me.lblExportTables.Name = "lblExportTables" - Me.lblExportTables.Size = New System.Drawing.Size(84, 13) - Me.lblExportTables.TabIndex = 26 - Me.lblExportTables.Text = "Export Table as:" - ' 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(10, 379) + Me.ucrSaveTable.Location = New System.Drawing.Point(11, 251) Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveTable.Name = "ucrSaveTable" Me.ucrSaveTable.Size = New System.Drawing.Size(390, 34) @@ -146,7 +92,7 @@ Partial Class dlgUseTable 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(2, 417) + Me.ucrBase.Location = New System.Drawing.Point(2, 397) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(407, 52) Me.ucrBase.TabIndex = 0 @@ -160,18 +106,62 @@ Partial Class dlgUseTable Me.ucrPnlOptions.Size = New System.Drawing.Size(158, 106) Me.ucrPnlOptions.TabIndex = 27 ' + 'ucrFilePath + ' + Me.ucrFilePath.AutoSize = True + Me.ucrFilePath.DefaultFileSuggestionName = "" + Me.ucrFilePath.FilePath = "" + Me.ucrFilePath.FilePathBrowseText = "Browse" + Me.ucrFilePath.FilePathDialogFilter = resources.GetString("ucrFilePath.FilePathDialogFilter") + Me.ucrFilePath.FilePathDialogTitle = "Export Data File" + Me.ucrFilePath.FilePathLabel = "Save As:" + Me.ucrFilePath.FolderBrowse = False + Me.ucrFilePath.Location = New System.Drawing.Point(30, 346) + Me.ucrFilePath.Name = "ucrFilePath" + Me.ucrFilePath.SelectedFileFilterIndex = 1 + Me.ucrFilePath.Size = New System.Drawing.Size(365, 34) + Me.ucrFilePath.TabIndex = 28 + ' + 'lblFileType + ' + Me.lblFileType.AutoSize = True + Me.lblFileType.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFileType.Location = New System.Drawing.Point(31, 320) + Me.lblFileType.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblFileType.Name = "lblFileType" + Me.lblFileType.Size = New System.Drawing.Size(86, 13) + Me.lblFileType.TabIndex = 30 + Me.lblFileType.Text = "Select File Type:" + ' + 'ucrChkExport + ' + Me.ucrChkExport.AutoSize = True + Me.ucrChkExport.Checked = False + Me.ucrChkExport.Location = New System.Drawing.Point(12, 290) + Me.ucrChkExport.Name = "ucrChkExport" + Me.ucrChkExport.Size = New System.Drawing.Size(253, 23) + Me.ucrChkExport.TabIndex = 31 + ' + 'cboFileType + ' + Me.cboFileType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.cboFileType.FormattingEnabled = True + Me.cboFileType.Location = New System.Drawing.Point(164, 313) + Me.cboFileType.Name = "cboFileType" + Me.cboFileType.Size = New System.Drawing.Size(170, 21) + Me.cboFileType.TabIndex = 32 + ' 'dlgUseTable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(411, 478) - Me.Controls.Add(Me.lblExportTables) + Me.ClientSize = New System.Drawing.Size(411, 452) + Me.Controls.Add(Me.cboFileType) + Me.Controls.Add(Me.ucrChkExport) + Me.Controls.Add(Me.lblFileType) + Me.Controls.Add(Me.ucrFilePath) Me.Controls.Add(Me.lblTable) - Me.Controls.Add(Me.cmdTableOptions) - Me.Controls.Add(Me.rdoAsLaTex) - Me.Controls.Add(Me.rdoAsWord) - Me.Controls.Add(Me.rdoAsRTF) - Me.Controls.Add(Me.rdoAsHTML) + Me.Controls.Add(Me.btnTableOptions) Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.ucrTablesReceiver) Me.Controls.Add(Me.ucrTablesSelector) @@ -192,12 +182,11 @@ Partial Class dlgUseTable Friend WithEvents ucrTablesSelector As ucrSelectorByDataFrameAddRemove Friend WithEvents ucrTablesReceiver As ucrReceiverSingle Friend WithEvents ucrSaveTable As ucrSave - Friend WithEvents rdoAsWord As RadioButton - Friend WithEvents rdoAsRTF As RadioButton - Friend WithEvents rdoAsHTML As RadioButton - Friend WithEvents cmdTableOptions As Button - Friend WithEvents rdoAsLaTex As RadioButton + Friend WithEvents btnTableOptions As Button Friend WithEvents lblTable As Label - Friend WithEvents lblExportTables As Label Friend WithEvents ucrPnlOptions As UcrPanel + Friend WithEvents ucrFilePath As ucrFilePath + Friend WithEvents lblFileType As Label + Friend WithEvents ucrChkExport As ucrCheck + Friend WithEvents cboFileType As ComboBox End Class diff --git a/instat/dlgUseTable.resx b/instat/dlgUseTable.resx index 1af7de150c9..e280411fe39 100644 --- a/instat/dlgUseTable.resx +++ b/instat/dlgUseTable.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Comma separated file (*.csv)|*.csv|Excel files (*.xlsx)|*.xlsx|TAB-separated data (*.tsv)|*.tsv|Pipe-separated data (*.psv)|*.psv|Feather r / Python interchange format (*.feather)|*.feather|Fixed-Width format data (*.fwf)|*.fwf|Serialized r objects (*.rds)|*.rds|Saved r objects (*.RData)|*.RData|JSON(*.json)|*.json|YAML(*.yml)|*.yml|Stata(*.dta)|*.dta|SPSS(*.sav)|*.sav|XBASE database files (*.dbf)|*.dbf| Weka Attribute - Relation File Format (*.arff)|*.arff|r syntax object (*.R)|*.R|Xml(*.xml)|*.xml|HTML(*.html)|*.html + \ No newline at end of file diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 240d76a48eb..e7abd4f55d4 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -18,17 +18,8 @@ Imports instat.Translations Public Class dlgUseTable Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsRFunctionAsHTML, clsRFunctionAsRTF, clsRFunctionAsWord, clsRFunctionAsLaTex, clsUseTableFunction As New RFunction - - Private clsTableTitleFunction, clsTabFootnoteTitleFunction, clsTableSourcenoteFunction, clsDummyFunction, - clsThemesTabOptionsFunction, clsFootnoteCellFunction, clsSecondFootnoteCellBodyFunction, - clsFootnoteTitleLocationFunction, clsFootnoteCellBodyFunction, - clsFootnoteSubtitleLocationFunction, clsTabFootnoteSubtitleFunction, - clsSecondFootnoteCellFunction, clsTabStyleCellTitleFunction, - clsTabStyleCellTextFunction, clsTabStyleFunction, clsTabStylePxFunction, - clsgtExtraThemesFunction, clsGtRFunction As New RFunction - - Private clsPipeOperator, clsSummaryOperator, clsJoiningPipeOperator As ROperator + Private clsUseTableFunction, clsGtSaveRFunction As New RFunction + Private clsBaseOperator, clsGtTableROperator, clsExportGtROperator As New ROperator Private Sub dlgUseTable_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -56,163 +47,83 @@ Public Class dlgUseTable ucrTablesReceiver.strSelectorHeading = "Tables" ucrTablesReceiver.SetItemType(RObjectTypeLabel.Table) - ''To Be enabled later when the formats are supported. - 'rdoAsHTML.Enabled = False - 'rdoAsLaTex.Enabled = False - 'rdoAsRTF.Enabled = False - rdoAsWord.Enabled = False - ucrPnlOptions.AddRadioButton(rdoAsHTML) - ucrPnlOptions.AddRadioButton(rdoAsRTF) - ucrPnlOptions.AddRadioButton(rdoAsWord) - ucrPnlOptions.AddRadioButton(rdoAsLaTex) - ucrPnlOptions.AddParameterValuesCondition(rdoAsHTML, "gtsave", "html") - ucrPnlOptions.AddParameterValuesCondition(rdoAsRTF, "gtsave", "rtf") - ucrPnlOptions.AddParameterValuesCondition(rdoAsWord, "gtsave", "docx") - ucrPnlOptions.AddParameterValuesCondition(rdoAsLaTex, "gtsave", "tex") - - cmdTableOptions.Enabled = True - ucrSaveTable.SetPrefix("use_table") ucrSaveTable.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetDataFrameSelector(ucrTablesSelector.ucrAvailableDataFrames) ucrSaveTable.SetCheckBoxText("Store New Table") ucrSaveTable.SetIsComboBox() - ucrSaveTable.SetAssignToIfUncheckedValue("table") + ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + + ucrChkExport.SetText("Export Table") + cboFileType.Items.AddRange({"HTML (*.html)", "PDF (*.pdf)", "PNG (*.png)", "LaTeX (*.tex)", "RTF (*.rtf)", "Word (*.docx)"}) End Sub Private Sub SetDefaults() - clsRFunctionAsHTML = New RFunction - clsRFunctionAsRTF = New RFunction - clsRFunctionAsWord = New RFunction - clsRFunctionAsLaTex = New RFunction + clsBaseOperator = New ROperator + clsGtTableROperator = New ROperator + clsExportGtROperator = New ROperator clsUseTableFunction = New RFunction - clsPipeOperator = New ROperator - - clsTableTitleFunction = New RFunction - clsTabFootnoteTitleFunction = New RFunction - clsTableSourcenoteFunction = New RFunction - clsDummyFunction = New RFunction - clsThemesTabOptionsFunction = New RFunction - clsFootnoteCellFunction = New RFunction - clsSecondFootnoteCellBodyFunction = New RFunction - clsFootnoteTitleLocationFunction = New RFunction - clsFootnoteCellBodyFunction = New RFunction - clsFootnoteSubtitleLocationFunction = New RFunction - clsTabFootnoteSubtitleFunction = New RFunction - clsSecondFootnoteCellFunction = New RFunction - clsTabStyleCellTextFunction = New RFunction - clsTabStyleFunction = New RFunction - clsTabStylePxFunction = New RFunction - clsTabStyleCellTitleFunction = New RFunction - clsSummaryOperator = New ROperator - clsJoiningPipeOperator = New ROperator - clsgtExtraThemesFunction = New RFunction - clsGtRFunction = New RFunction - - 'rdoAsHTML.Checked = True - ucrTablesReceiver.SetMeAsReceiver() + clsGtSaveRFunction = New RFunction + ucrTablesSelector.Reset() + ucrTablesReceiver.SetMeAsReceiver() ucrSaveTable.Reset() + ucrChkExport.Checked = False + cboFileType.SelectedIndex = 0 + ucrFilePath.ResetPathControl() - clsDummyFunction.AddParameter("theme", "select", iPosition:=0) - clsDummyFunction.AddParameter("gtsave", "html", iPosition:=1) - - clsgtExtraThemesFunction.SetPackageName("gtExtras") - - clsJoiningPipeOperator.SetOperation("%>%") - clsJoiningPipeOperator.AddParameter("object", clsRFunctionParameter:=clsUseTableFunction, iPosition:=0) - - clsSummaryOperator.SetOperation("+") - - clsTabStyleFunction.SetRCommand("tab_style") - clsTabStyleFunction.SetPackageName("gt") - clsTabStyleFunction.AddParameter("style", clsRFunctionParameter:=clsTabStyleCellTextFunction, iPosition:=0) - clsTabStyleFunction.AddParameter("location", clsRFunctionParameter:=clsTabStyleCellTitleFunction, iPosition:=1) - - clsTabStyleCellTitleFunction.SetPackageName("gt") - clsTabStyleCellTitleFunction.SetRCommand("cells_title") - clsTabStyleCellTitleFunction.AddParameter("groups", Chr(34) & "title" & Chr(34), iPosition:=0) - - clsTabStyleCellTextFunction.SetPackageName("gt") - clsTabStyleCellTextFunction.SetRCommand("cell_text") - clsTabStyleCellTextFunction.AddParameter("size", clsRFunctionParameter:=clsTabStylePxFunction, iPosition:=0) - - clsTabStylePxFunction.SetPackageName("gt") - clsTabStylePxFunction.SetRCommand("px") - clsTabStylePxFunction.AddParameter("size", "18", bIncludeArgumentName:=False, iPosition:=0) - - clsTableTitleFunction.SetPackageName("gt") - clsTableTitleFunction.SetRCommand("tab_header") - - clsTabFootnoteTitleFunction.SetPackageName("gt") - clsTabFootnoteTitleFunction.SetRCommand("tab_footnote") - - clsTabFootnoteSubtitleFunction.SetPackageName("gt") - clsTabFootnoteSubtitleFunction.SetRCommand("tab_footnote") - - clsFootnoteCellFunction.SetPackageName("gt") - clsFootnoteCellFunction.SetRCommand("tab_footnote") - - clsSecondFootnoteCellFunction.SetPackageName("gt") - clsSecondFootnoteCellFunction.SetRCommand("tab_footnote") - - clsFootnoteTitleLocationFunction.SetPackageName("gt") - clsFootnoteTitleLocationFunction.SetRCommand("cells_title") - - clsFootnoteSubtitleLocationFunction.SetPackageName("gt") - clsFootnoteSubtitleLocationFunction.SetRCommand("cells_title") - - clsTableSourcenoteFunction.SetPackageName("gt") - clsTableSourcenoteFunction.SetRCommand("tab_source_note") - - clsFootnoteCellBodyFunction.SetPackageName("gt") - clsFootnoteCellBodyFunction.SetRCommand("cells_body") - - clsSecondFootnoteCellBodyFunction.SetPackageName("gt") - clsSecondFootnoteCellBodyFunction.SetRCommand("cells_body") - - clsThemesTabOptionsFunction.SetPackageName("gt") - clsThemesTabOptionsFunction.SetRCommand("tab_options") - - clsRFunctionAsHTML.SetPackageName("gt") - clsRFunctionAsHTML.SetRCommand("gtsave") + clsGtSaveRFunction.SetPackageName("gt") + clsGtSaveRFunction.SetRCommand("gtsave") - clsRFunctionAsRTF.SetPackageName("gt") - clsRFunctionAsRTF.SetRCommand("gtsave") + clsUseTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") - clsRFunctionAsWord.SetPackageName("gt") - clsRFunctionAsWord.SetRCommand("gtsave") + clsGtTableROperator.SetOperation("%>%") + clsGtTableROperator.bBrackets = False + clsGtTableROperator.AddParameter(strParameterName:="gt_tbl", clsRFunctionParameter:=clsUseTableFunction, iPosition:=0, bIncludeArgumentName:=False) - clsRFunctionAsLaTex.SetPackageName("gt") - clsRFunctionAsLaTex.SetRCommand("gtsave") - clsUseTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") - clsPipeOperator.SetOperation("%>%") - clsPipeOperator.bBrackets = False + ' For export operations which is an after code + clsExportGtROperator.SetOperation("%>%") + clsExportGtROperator.bBrackets = False + ' Operator needed instead of the RFUnction because of the formatting which has to be done on a 'gt' operator + clsExportGtROperator.AddParameter(strParameterName:="gt_export_tbl_operator", clsROperatorParameter:=clsGtTableROperator, iPosition:=0, bIncludeArgumentName:=False) + clsExportGtROperator.AddParameter(strParameterName:="gt_export_r_function", clsRFunctionParameter:=clsGtSaveRFunction, iPosition:=1, bIncludeArgumentName:=False) - clsGtRFunction.SetPackageName("gt") - clsGtRFunction.SetRCommand("gt") - clsPipeOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) + ' Set base operator + clsBaseOperator.SetOperation("%>%") + clsBaseOperator.bBrackets = False + clsBaseOperator.AddParameter(strParameterName:="gt_view_tbl_operator", clsROperatorParameter:=clsGtTableROperator, iPosition:=0, bIncludeArgumentName:=False) + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrTablesSelector.strCurrentDataFrame, + strObjectName:="last_table") - ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrTablesSelector.SetRCode(clsUseTableFunction, bReset) ucrTablesReceiver.SetRCode(clsUseTableFunction, bReset) - ucrSaveTable.SetRCode(clsJoiningPipeOperator, bReset) - If bReset Then - ucrPnlOptions.SetRCode(clsDummyFunction, bReset) - End If + + ucrSaveTable.SetRCode(clsBaseOperator, bReset) End Sub Private Sub TestOKEnabled() - If Not ucrTablesReceiver.IsEmpty Then + ucrBase.OKEnabled(False) + + If ucrTablesReceiver.IsEmpty Then + Exit Sub + End If + + If ucrSaveTable.IsComplete Then ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) + End If + + If ucrChkExport.Checked Then + ucrBase.OKEnabled(Not ucrFilePath.IsEmpty) End If End Sub @@ -222,8 +133,8 @@ Public Class dlgUseTable TestOKEnabled() End Sub - Private Sub cmdTableOptions_Click(sender As Object, e As EventArgs) Handles cmdTableOptions.Click - sdgTableOptions.Setup(ucrTablesSelector.strCurrentDataFrame, clsPipeOperator) + Private Sub btnTableOptions_Click(sender As Object, e As EventArgs) Handles btnTableOptions.Click + sdgTableOptions.Setup(ucrTablesSelector.strCurrentDataFrame, clsGtTableROperator) sdgTableOptions.ShowDialog(Me) End Sub @@ -231,24 +142,54 @@ Public Class dlgUseTable TestOKEnabled() End Sub - Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged - If rdoAsHTML.Checked Then - clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsHTML) - clsRFunctionAsHTML.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".html" & Chr(34), iPosition:=1) - clsRFunctionAsHTML.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) - ElseIf rdoAsRTF.Checked Then - clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsRTF) - clsRFunctionAsRTF.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".rtf" & Chr(34), iPosition:=1) - clsRFunctionAsRTF.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) - ElseIf rdoAsWord.Checked Then - clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsWord) - clsRFunctionAsWord.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".docx" & Chr(34), iPosition:=1) - clsRFunctionAsWord.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) - Else - clsJoiningPipeOperator.AddParameter("y", clsRFunctionParameter:=clsRFunctionAsLaTex) - clsRFunctionAsLaTex.AddParameter("filename", Chr(34) & ucrTablesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".tex" & Chr(34), iPosition:=1) - clsRFunctionAsLaTex.AddParameter("path", Chr(34) & FileIO.SpecialDirectories.MyDocuments.Replace("\", "/") & Chr(34), iPosition:=2) + Private Sub ucrChkExport_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkExport.ControlContentsChanged + lblFileType.Visible = False + cboFileType.Visible = False + ucrFilePath.Visible = False + + ucrBase.clsRsyntax.GetAfterCodes().Clear() + + If ucrChkExport.Checked Then + lblFileType.Visible = True + cboFileType.Visible = True + ucrFilePath.Visible = True + + ucrBase.clsRsyntax.AddToAfterCodes(clsExportGtROperator) End If + + TestOKEnabled() + End Sub + + Private Sub cboFileType_SelectedValueChanged(sender As Object, e As EventArgs) Handles cboFileType.SelectedValueChanged + ucrFilePath.Clear() + ucrFilePath.FilePathDialogFilter = GetFilePathDialogFilterText(cboFileType.SelectedItem) + End Sub + + Private Sub ucrFilePath_FilePathChanged() Handles ucrFilePath.FilePathChanged + If Not ucrFilePath.IsEmpty Then + Dim strFileName As String = Path.GetFileName(ucrFilePath.FilePath) + Dim strFilePath As String = Path.GetDirectoryName(ucrFilePath.FilePath).Replace("\", "/") + + clsGtSaveRFunction.AddParameter("filename", Chr(34) & strFileName & Chr(34), iPosition:=1) + clsGtSaveRFunction.AddParameter("path", Chr(34) & strFilePath & Chr(34), iPosition:=2) + End If + TestOKEnabled() End Sub + ''' + ''' TODO. Later push this functionality to ucrFilePath control. It's also needed by dlgExportDataset + ''' Expected string format: "filetype (*.ext)" + ''' + ''' + ''' + Private Function GetFilePathDialogFilterText(strText As String) As String + If String.IsNullOrEmpty(strText) Then + Return "" + End If + + 'example of filter string format returned: Excel files|*.xlsx + Dim arrStr() As String = strText.Split({"(", ")"}, StringSplitOptions.RemoveEmptyEntries) + Return arrStr(0) & "|" & arrStr(1) + End Function + End Class \ No newline at end of file From 9c2c419800283be5322b4cbf9164f8b983274861 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 12 Nov 2024 14:50:46 +0300 Subject: [PATCH 61/77] Final changes --- instat/dlgUseTable.vb | 63 +++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index e7abd4f55d4..17178393c00 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -18,8 +18,8 @@ Imports instat.Translations Public Class dlgUseTable Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsUseTableFunction, clsGtSaveRFunction As New RFunction - Private clsBaseOperator, clsGtTableROperator, clsExportGtROperator As New ROperator + Private clsGetGtTableFunction, clsSaveGtRFunction As New RFunction + Private clsGtTableROperator, clsBaseOperator As New ROperator Private Sub dlgUseTable_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -55,15 +55,15 @@ Public Class dlgUseTable ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrChkExport.SetText("Export Table") + ucrChkExport.Checked = True ' Forces the controls to be hidden cboFileType.Items.AddRange({"HTML (*.html)", "PDF (*.pdf)", "PNG (*.png)", "LaTeX (*.tex)", "RTF (*.rtf)", "Word (*.docx)"}) End Sub Private Sub SetDefaults() - clsBaseOperator = New ROperator clsGtTableROperator = New ROperator - clsExportGtROperator = New ROperator - clsUseTableFunction = New RFunction - clsGtSaveRFunction = New RFunction + clsBaseOperator = New ROperator + clsGetGtTableFunction = New RFunction + clsSaveGtRFunction = New RFunction ucrTablesSelector.Reset() ucrTablesReceiver.SetMeAsReceiver() @@ -72,29 +72,19 @@ Public Class dlgUseTable cboFileType.SelectedIndex = 0 ucrFilePath.ResetPathControl() - clsGtSaveRFunction.SetPackageName("gt") - clsGtSaveRFunction.SetRCommand("gtsave") - clsUseTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") + + clsGetGtTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") clsGtTableROperator.SetOperation("%>%") clsGtTableROperator.bBrackets = False - clsGtTableROperator.AddParameter(strParameterName:="gt_tbl", clsRFunctionParameter:=clsUseTableFunction, iPosition:=0, bIncludeArgumentName:=False) - - - - ' For export operations which is an after code - clsExportGtROperator.SetOperation("%>%") - clsExportGtROperator.bBrackets = False - ' Operator needed instead of the RFUnction because of the formatting which has to be done on a 'gt' operator - clsExportGtROperator.AddParameter(strParameterName:="gt_export_tbl_operator", clsROperatorParameter:=clsGtTableROperator, iPosition:=0, bIncludeArgumentName:=False) - clsExportGtROperator.AddParameter(strParameterName:="gt_export_r_function", clsRFunctionParameter:=clsGtSaveRFunction, iPosition:=1, bIncludeArgumentName:=False) + clsGtTableROperator.AddParameter(strParameterName:="gt_tbl", clsRFunctionParameter:=clsGetGtTableFunction, iPosition:=0, bIncludeArgumentName:=False) ' Set base operator clsBaseOperator.SetOperation("%>%") clsBaseOperator.bBrackets = False - clsBaseOperator.AddParameter(strParameterName:="gt_view_tbl_operator", clsROperatorParameter:=clsGtTableROperator, iPosition:=0, bIncludeArgumentName:=False) + clsBaseOperator.AddParameter(strParameterName:="gt_tbl_operator", clsROperatorParameter:=clsGtTableROperator, iPosition:=0, bIncludeArgumentName:=False) clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, @@ -102,11 +92,17 @@ Public Class dlgUseTable strObjectName:="last_table") ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + + ' For export operations which is an after code + clsSaveGtRFunction.SetPackageName("gt") + clsSaveGtRFunction.SetRCommand("gtsave") + clsSaveGtRFunction.AddParameter(strParameterName:="data", clsROperatorParameter:=clsGtTableROperator, iPosition:=1) + End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrTablesSelector.SetRCode(clsUseTableFunction, bReset) - ucrTablesReceiver.SetRCode(clsUseTableFunction, bReset) + ucrTablesSelector.SetRCode(clsGetGtTableFunction, bReset) + ucrTablesReceiver.SetRCode(clsGetGtTableFunction, bReset) ucrSaveTable.SetRCode(clsBaseOperator, bReset) End Sub @@ -114,16 +110,14 @@ Public Class dlgUseTable Private Sub TestOKEnabled() ucrBase.OKEnabled(False) - If ucrTablesReceiver.IsEmpty Then - Exit Sub - End If + If Not ucrTablesReceiver.IsEmpty Then + If ucrSaveTable.IsComplete Then + ucrBase.OKEnabled(True) + End If - If ucrSaveTable.IsComplete Then - ucrBase.OKEnabled(True) - End If - - If ucrChkExport.Checked Then - ucrBase.OKEnabled(Not ucrFilePath.IsEmpty) + If ucrChkExport.Checked AndAlso Not ucrFilePath.IsEmpty Then + ucrBase.OKEnabled(True) + End If End If End Sub @@ -154,7 +148,7 @@ Public Class dlgUseTable cboFileType.Visible = True ucrFilePath.Visible = True - ucrBase.clsRsyntax.AddToAfterCodes(clsExportGtROperator) + ucrBase.clsRsyntax.AddToAfterCodes(clsSaveGtRFunction) End If TestOKEnabled() @@ -170,8 +164,8 @@ Public Class dlgUseTable Dim strFileName As String = Path.GetFileName(ucrFilePath.FilePath) Dim strFilePath As String = Path.GetDirectoryName(ucrFilePath.FilePath).Replace("\", "/") - clsGtSaveRFunction.AddParameter("filename", Chr(34) & strFileName & Chr(34), iPosition:=1) - clsGtSaveRFunction.AddParameter("path", Chr(34) & strFilePath & Chr(34), iPosition:=2) + clsSaveGtRFunction.AddParameter("filename", Chr(34) & strFileName & Chr(34), iPosition:=1) + clsSaveGtRFunction.AddParameter("path", Chr(34) & strFilePath & Chr(34), iPosition:=2) End If TestOKEnabled() End Sub @@ -191,5 +185,4 @@ Public Class dlgUseTable Dim arrStr() As String = strText.Split({"(", ")"}, StringSplitOptions.RemoveEmptyEntries) Return arrStr(0) & "|" & arrStr(1) End Function - End Class \ No newline at end of file From 2965d1f33e9ef148572ebc685963a5bad897d39f Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:56:31 +0100 Subject: [PATCH 62/77] Changes in the Summary dialogs --- instat/dlgClimaticSummary.vb | 3 +-- instat/dlgColumnStats.vb | 2 +- instat/dlgDisplayDailyData.vb | 2 +- instat/dlgExtremesClimatic.vb | 2 +- instat/dlgOneVariableSummarise.vb | 4 ++-- instat/sdgSummaries.vb | 6 +++--- .../R/BackendComponents/summary_functions.R | 2 +- .../R/Backend_Components/DisplayDaily.R | 6 +++--- .../R/Backend_Components/calculations.R | 4 ++-- .../R/Backend_Components/summary_functions.R | 20 +++++++++---------- instat/static/InstatObject/R/data_object_R6.R | 4 ++-- 11 files changed, 27 insertions(+), 28 deletions(-) diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index b91b6e66159..75753509a25 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -194,8 +194,7 @@ Public Class dlgClimaticSummary 'TODO: what defaults do we want? clsSummariesList.SetRCommand("c") - clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) - clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=3) + clsSummariesList.AddParameter("summary_count_name", Chr(34) & "summary_count_name" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False, iPosition:=11) clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 4a2e6621f6f..7cf6ebacad2 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -109,7 +109,7 @@ Public Class dlgColumnStats clsConcFunction.SetRCommand("c") clsSummariesList.SetRCommand("c") - clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) + clsSummariesList.AddParameter("summary_count_name", Chr(34) & "summary_count_name" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False, iPosition:=11) clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index c4cb6d97038..93808123a65 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -156,7 +156,7 @@ Public Class dlgDisplayDailyData ucrChkIQR.SetParameter(New RParameter("IQR", 5), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "IQR" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkIQR.SetText("IQR") - ucrChkSumMissing.SetParameter(New RParameter("summary_count_missing", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkSumMissing.SetParameter(New RParameter("summary_count_miss", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_miss" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkSumMissing.SetText("N Missing") ucrNudNumberOfColumns.SetParameter(New RParameter("ncol", 1)) diff --git a/instat/dlgExtremesClimatic.vb b/instat/dlgExtremesClimatic.vb index 6c6052c193c..06d745e640b 100644 --- a/instat/dlgExtremesClimatic.vb +++ b/instat/dlgExtremesClimatic.vb @@ -447,7 +447,7 @@ Public Class dlgExtremesClimatic clsNSummary.AddParameter("save", "2", iPosition:=4) clsNSummary.SetAssignTo("n_dates_summary") - clsNFunction.SetRCommand("summary_count") + clsNFunction.SetRCommand("summary_count_all") clsNFunction.bToScriptAsRString = True clsFilterExtremeCalc.SetRCommand("instat_calculation$new") diff --git a/instat/dlgOneVariableSummarise.vb b/instat/dlgOneVariableSummarise.vb index 1726ec12348..c5f90662291 100644 --- a/instat/dlgOneVariableSummarise.vb +++ b/instat/dlgOneVariableSummarise.vb @@ -248,8 +248,8 @@ Public Class dlgOneVariableSummarise strObjectName:="last_table") clsSummariesList.SetRCommand("c") - clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False) - clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False) + clsSummariesList.AddParameter("summary_count_name", Chr(34) & "summary_count_name" & Chr(34), bIncludeArgumentName:=False) + clsSummariesList.AddParameter("summary_count_all", Chr(34) & "summary_count_all" & Chr(34), bIncludeArgumentName:=False) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False) clsSummaryFunction.SetRCommand("summary") diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index 2398fc81117..d5b7fc37b6b 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -45,13 +45,13 @@ Public Class sdgSummaries ucrPnlPosition.AddToLinkedControls({ucrChkFirst, ucrSelectorOrderBy, ucrReceiverOrderBy, ucrChkOrderBy, ucrChkLast, ucrChknth, ucrChkSample}, {rdoUsePositions}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlPosition.AddToLinkedControls({ucrChkWhichmin, ucrChkWhereMax, ucrChkWhereMin, ucrReceiverInclude, ucrSelectorInclude, ucrChkWhichmax}, {rdoDisplay}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkNonMissing.SetParameter(New RParameter("summary_count_non_missing", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_non_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkNonMissing.SetParameter(New RParameter("summary_count_name", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_name" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkNonMissing.SetText("N Non Missing") - ucrChkNMissing.SetParameter(New RParameter("summary_count_missing", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkNMissing.SetParameter(New RParameter("summary_count_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_miss" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkNMissing.SetText("N Missing") - ucrChkNTotal.SetParameter(New RParameter("summary_count", 3), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkNTotal.SetParameter(New RParameter("summary_count_all", 3), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_all" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkNTotal.SetText("N Total") ucrChkMean.SetParameter(New RParameter("summary_mean", 4), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_mean" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) diff --git a/instat/static/ClimateObject/R/BackendComponents/summary_functions.R b/instat/static/ClimateObject/R/BackendComponents/summary_functions.R index dda6d823766..892a6f0f6e1 100644 --- a/instat/static/ClimateObject/R/BackendComponents/summary_functions.R +++ b/instat/static/ClimateObject/R/BackendComponents/summary_functions.R @@ -1,7 +1,7 @@ # summary function labels sum_label="summary_sum" mode_label="summary_mode" -count_label="summary_count" +count_label="summary_count_all" count_over_threshold_label="summary_count_over_threshold" sd_label = "summary_sd" median_label = "summary_median" diff --git a/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R b/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R index 58a1eb73504..7d35d107093 100644 --- a/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R +++ b/instat/static/InstatObject/R/Backend_Components/DisplayDaily.R @@ -221,9 +221,9 @@ DisplayDaily <- function(Datain,Stations,Variables,option=1,Years,Misscode,Trace outstats[st,(m+1)] <- gsub("\\s+","",outstats[st,(m+1)]) } } - # If all the data is NA, set the stats to NA (except summary_count_missing) + # If all the data is NA, set the stats to NA (except summary_count_miss) if(length(dat[,loc])==length(which(is.na(dat[,loc]==TRUE)))){ - outstats[which(monstats != "summary_count_missing"),(m+1)] <- "NA" + outstats[which(monstats != "summary_count_miss"),(m+1)] <- "NA" } # If there's no data, set all the stats to NA if(length(dat[,loc]) == 0) outstats[,(m+1)] <- "NA" @@ -278,7 +278,7 @@ DisplayDaily <- function(Datain,Stations,Variables,option=1,Years,Misscode,Trace out[dim(out)[1]+1,] <- "____" out[dim(out)[1],1] <- "STATS" # temp fix to shorten display name of summary function - outstats[,1][outstats[,1] == "summary_count_missing"] <- "n_miss" + outstats[,1][outstats[,1] == "summary_count_miss"] <- "n_miss" out <- rbind(out,outstats) #----------------------------------------------------------# diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R index 2f3191c2142..3b19592bbd1 100644 --- a/instat/static/InstatObject/R/Backend_Components/calculations.R +++ b/instat/static/InstatObject/R/Backend_Components/calculations.R @@ -494,7 +494,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # if it is a ordered factor... if (any(stringr::str_detect("ordered", col_data_type))){ # put in here the ones that DO work for ordered factor - if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ + if (any(grepl("summary_count_name|summary_count_miss|summary_count_all|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) } else { @@ -505,7 +505,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # if it is a factor or character, do not work for anything except... } else if (any(stringr::str_detect("factor | character", col_data_type))){ # put in here the ones that DO work for factor or character - if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count", formula_fn_exp))){ + if (any(grepl("summary_count_name|summary_count_miss|summary_count_all", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) } else { diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R index 397a72b2614..7d15eb6a65b 100644 --- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R +++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R @@ -281,7 +281,7 @@ DataBook$set("public", "summary", function(data_name, columns_to_summarise, summ calculated_from[[1]] <- list(data_name = data_name, columns = columns_to_summarise) summaries <- unique(summaries) summaries <- summaries[order(match(summaries, all_summaries))] - summaries_count <- summaries[startsWith(summaries, "summary_count")] + summaries_count <- summaries[startsWith(summaries, "summary_count_all")] summaries_other <- setdiff(summaries, summaries_count) summaries <- c(summaries_count, summaries_other) count_summaries_max <- length(summaries_count) @@ -444,9 +444,9 @@ missing_values_check <- function(x) { # summary function labels sum_label <- "summary_sum" mode_label <- "summary_mode" -count_label <- "summary_count" -count_missing_label <- "summary_count_missing" -count_non_missing_label <- "summary_count_non_missing" +count_label <- "summary_count_all" +count_missing_label <- "summary_count_miss" +count_non_missing_label <- "summary_count_name" sd_label <- "summary_sd" var_label <- "summary_var" median_label <- "summary_median" @@ -575,13 +575,13 @@ na_check <- function(x, na_type = c(), na_consecutive_n = NULL, na_max_n = NULL, for (i in seq_along(na_type)) { type <- na_type[i] if (type %in% c("n","'n'")) { - res[i] <- summary_count_missing(x) <= na_max_n + res[i] <- summary_count_miss(x) <= na_max_n } else if (type %in% c("prop","'prop'")) { - res[i] <- (summary_count_missing(x) / summary_count(x)) <= na_max_prop / 100 + res[i] <- (summary_count_miss(x) / summary_count(x)) <= na_max_prop / 100 } else if (type %in% c("n_non_miss","'n_non_miss'")) { - res[i] <- summary_count_non_missing(x) >= na_min_n + res[i] <- summary_count_name(x) >= na_min_n } else if (type %in% c("FUN","'FUN'")) { res[i] <- na_FUN(x, ...) @@ -719,16 +719,16 @@ summary_sum <- function (x, weights = NULL, na.rm = FALSE, na_type = "", ...) { } -summary_count <- function(x, ...) { +summary_count_all <- function(x, ...) { return(length(x)) } -summary_count_missing <- function(x, ...) { +summary_count_miss <- function(x, ...) { return(sum(is.na(x))) } -summary_count_non_missing <- function(x, ...) { +summary_count_name <- function(x, ...) { return(sum(!is.na(x))) } diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 14171b6a9fd..05d230eb34b 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -4458,8 +4458,8 @@ DataSheet$set("public", "patch_climate_element", function(date_col_name = "", va } if (length(col) == dim(curr_data)[[1]]) { self$add_columns_to_data(col_name = column_name, col_data = col) - gaps_remaining <- summary_count_missing(col) - gaps_filled <- (summary_count_missing(curr_data[, var]) - gaps_remaining) + gaps_remaining <- summary_count_miss(col) + gaps_filled <- (summary_count_miss(curr_data[, var]) - gaps_remaining) cat(gaps_filled, " gaps filled", gaps_remaining, " remaining.", "\n") } else if (gaps != 0) { cat(gaps, " rows for date gaps are missing, fill date gaps before proceeding.", "\n") From 963db5e169bd4443816fc20bec8e6c85464079a6 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 12 Nov 2024 15:05:49 +0300 Subject: [PATCH 63/77] comments added --- instat/dlgUseTable.vb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 17178393c00..c768ad88fad 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -72,15 +72,12 @@ Public Class dlgUseTable cboFileType.SelectedIndex = 0 ucrFilePath.ResetPathControl() - - clsGetGtTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") clsGtTableROperator.SetOperation("%>%") clsGtTableROperator.bBrackets = False clsGtTableROperator.AddParameter(strParameterName:="gt_tbl", clsRFunctionParameter:=clsGetGtTableFunction, iPosition:=0, bIncludeArgumentName:=False) - ' Set base operator clsBaseOperator.SetOperation("%>%") clsBaseOperator.bBrackets = False @@ -96,8 +93,7 @@ Public Class dlgUseTable ' For export operations which is an after code clsSaveGtRFunction.SetPackageName("gt") clsSaveGtRFunction.SetRCommand("gtsave") - clsSaveGtRFunction.AddParameter(strParameterName:="data", clsROperatorParameter:=clsGtTableROperator, iPosition:=1) - + clsSaveGtRFunction.AddParameter(strParameterName:="data", clsROperatorParameter:=clsGtTableROperator, iPosition:=0) End Sub Private Sub SetRCodeForControls(bReset As Boolean) From 45657aa6fe57e4b72c546f3b048cda68fae023d6 Mon Sep 17 00:00:00 2001 From: lilyclements Date: Tue, 12 Nov 2024 12:14:36 +0000 Subject: [PATCH 64/77] Getting n_distinct working for summaries --- .../InstatObject/R/Backend_Components/summary_functions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R index 397a72b2614..4371ef75567 100644 --- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R +++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R @@ -1113,7 +1113,7 @@ summary_nth <- function(x, nth_value, order_by = NULL, ...) { # n_distinct function summary_n_distinct<- function(x, na.rm = FALSE, ...) { - return(dplyr::n_distinct(x = x, na.rm = na.rm)) + return(dplyr::n_distinct(x, na.rm = na.rm)) } # sample function From 36c517b5f1881435b8dc84154968e834a697f1a4 Mon Sep 17 00:00:00 2001 From: lilyclements Date: Tue, 12 Nov 2024 12:38:11 +0000 Subject: [PATCH 65/77] Allowing summary_n_distinct to work for factors --- .../static/InstatObject/R/Backend_Components/calculations.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R index 2f3191c2142..6f1b349524e 100644 --- a/instat/static/InstatObject/R/Backend_Components/calculations.R +++ b/instat/static/InstatObject/R/Backend_Components/calculations.R @@ -494,7 +494,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # if it is a ordered factor... if (any(stringr::str_detect("ordered", col_data_type))){ # put in here the ones that DO work for ordered factor - if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ + if (any(grepl("summary_count_non_missing|summary_count_missing|summary_n_distinct|summary_count|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) } else { @@ -505,7 +505,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # if it is a factor or character, do not work for anything except... } else if (any(stringr::str_detect("factor | character", col_data_type))){ # put in here the ones that DO work for factor or character - if (any(grepl("summary_count_non_missing|summary_count_missing|summary_count", formula_fn_exp))){ + if (any(grepl("summary_count_non_missing|summary_count_missing|summary_n_distinct|summary_count", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) } else { @@ -846,4 +846,4 @@ find_df_from_calc_from <- function(x, column) { if(column %in% x[[i]]) return(names(x)[i]) } return("") -} \ No newline at end of file +} From e3cf805a94664715193809765ae8ee55bc589341 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:11:46 +0100 Subject: [PATCH 66/77] Code changes --- instat/dlgClimaticSummary.vb | 2 +- instat/dlgColumnStats.vb | 2 +- instat/dlgOneVariableSummarise.vb | 2 +- instat/sdgSummaries.vb | 2 +- .../static/InstatObject/R/Backend_Components/calculations.R | 4 ++-- .../InstatObject/R/Backend_Components/summary_functions.R | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index 75753509a25..122ed4dfdcd 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -194,7 +194,7 @@ Public Class dlgClimaticSummary 'TODO: what defaults do we want? clsSummariesList.SetRCommand("c") - clsSummariesList.AddParameter("summary_count_name", Chr(34) & "summary_count_name" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) + clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False, iPosition:=11) clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 7cf6ebacad2..b67645c332a 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -109,7 +109,7 @@ Public Class dlgColumnStats clsConcFunction.SetRCommand("c") clsSummariesList.SetRCommand("c") - clsSummariesList.AddParameter("summary_count_name", Chr(34) & "summary_count_name" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) + clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False, iPosition:=11) clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") diff --git a/instat/dlgOneVariableSummarise.vb b/instat/dlgOneVariableSummarise.vb index c5f90662291..c973af6015f 100644 --- a/instat/dlgOneVariableSummarise.vb +++ b/instat/dlgOneVariableSummarise.vb @@ -248,7 +248,7 @@ Public Class dlgOneVariableSummarise strObjectName:="last_table") clsSummariesList.SetRCommand("c") - clsSummariesList.AddParameter("summary_count_name", Chr(34) & "summary_count_name" & Chr(34), bIncludeArgumentName:=False) + clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False) clsSummariesList.AddParameter("summary_count_all", Chr(34) & "summary_count_all" & Chr(34), bIncludeArgumentName:=False) clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False) diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index d5b7fc37b6b..f9dadb93332 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -45,7 +45,7 @@ Public Class sdgSummaries ucrPnlPosition.AddToLinkedControls({ucrChkFirst, ucrSelectorOrderBy, ucrReceiverOrderBy, ucrChkOrderBy, ucrChkLast, ucrChknth, ucrChkSample}, {rdoUsePositions}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlPosition.AddToLinkedControls({ucrChkWhichmin, ucrChkWhereMax, ucrChkWhereMin, ucrReceiverInclude, ucrSelectorInclude, ucrChkWhichmax}, {rdoDisplay}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkNonMissing.SetParameter(New RParameter("summary_count_name", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_name" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkNonMissing.SetParameter(New RParameter("summary_count", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkNonMissing.SetText("N Non Missing") ucrChkNMissing.SetParameter(New RParameter("summary_count_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_miss" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R index 3b19592bbd1..62022de9be5 100644 --- a/instat/static/InstatObject/R/Backend_Components/calculations.R +++ b/instat/static/InstatObject/R/Backend_Components/calculations.R @@ -494,7 +494,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # if it is a ordered factor... if (any(stringr::str_detect("ordered", col_data_type))){ # put in here the ones that DO work for ordered factor - if (any(grepl("summary_count_name|summary_count_miss|summary_count_all|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ + if (any(grepl("summary_count|summary_count_miss|summary_count_all|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) } else { @@ -505,7 +505,7 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list # if it is a factor or character, do not work for anything except... } else if (any(stringr::str_detect("factor | character", col_data_type))){ # put in here the ones that DO work for factor or character - if (any(grepl("summary_count_name|summary_count_miss|summary_count_all", formula_fn_exp))){ + if (any(grepl("summary_count|summary_count_miss|summary_count_all", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) } else { diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R index 7d15eb6a65b..e38e202c86d 100644 --- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R +++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R @@ -446,7 +446,7 @@ sum_label <- "summary_sum" mode_label <- "summary_mode" count_label <- "summary_count_all" count_missing_label <- "summary_count_miss" -count_non_missing_label <- "summary_count_name" +count_non_missing_label <- "summary_count" sd_label <- "summary_sd" var_label <- "summary_var" median_label <- "summary_median" @@ -581,7 +581,7 @@ na_check <- function(x, na_type = c(), na_consecutive_n = NULL, na_max_n = NULL, res[i] <- (summary_count_miss(x) / summary_count(x)) <= na_max_prop / 100 } else if (type %in% c("n_non_miss","'n_non_miss'")) { - res[i] <- summary_count_name(x) >= na_min_n + res[i] <- summary_count(x) >= na_min_n } else if (type %in% c("FUN","'FUN'")) { res[i] <- na_FUN(x, ...) @@ -728,7 +728,7 @@ summary_count_miss <- function(x, ...) { return(sum(is.na(x))) } -summary_count_name <- function(x, ...) { +summary_count <- function(x, ...) { return(sum(!is.na(x))) } From 1097c5ffa33723250ca9f35e5763e47c6c5ed312 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 13 Nov 2024 10:46:27 +0300 Subject: [PATCH 67/77] removed pdf, png and word options --- instat/dlgUseTable.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index c768ad88fad..0d2060ed1a5 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -56,7 +56,8 @@ Public Class dlgUseTable ucrChkExport.SetText("Export Table") ucrChkExport.Checked = True ' Forces the controls to be hidden - cboFileType.Items.AddRange({"HTML (*.html)", "PDF (*.pdf)", "PNG (*.png)", "LaTeX (*.tex)", "RTF (*.rtf)", "Word (*.docx)"}) + 'cboFileType.Items.AddRange({"HTML (*.html)", "PDF (*.pdf)", "PNG (*.png)", "LaTeX (*.tex)", "RTF (*.rtf)", "Word (*.docx)"}) + cboFileType.Items.AddRange({"HTML (*.html)", "LaTeX (*.tex)", "RTF (*.rtf)"}) End Sub Private Sub SetDefaults() From 09fad502cb7b4c75e6249c789a80cc793b227765 Mon Sep 17 00:00:00 2001 From: Ntalumeso Date: Wed, 13 Nov 2024 11:52:34 +0300 Subject: [PATCH 68/77] minor code change --- instat/frmMain.vb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 43b8517d4d1..6dffab81db1 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1169,12 +1169,7 @@ Public Class frmMain clsSaveRDS.AddParameter("file", Chr(34) & strCurrentAutoSaveDataFilePath.Replace("\", "/") & Chr(34)) clsRLink.RunInternalScript(clsSaveRDS.ToScript(), bSilent:=True, bShowWaitDialogOverride:=False) - If strCurrentStatus.Equals("No data loaded") Then - tstatus.Text = GetTranslation(strCurrentStatus) - Else - tstatus.Text = strCurrentStatus - End If - + tstatus.Text = strCurrentStatus Cursor = Cursors.Default bFirstBackupDone = True End If From f5d8872cec501e1b175ae8b4ae9e42e9d3441694 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 13 Nov 2024 12:17:47 +0300 Subject: [PATCH 69/77] changed if block as requested --- instat/dlgUseTable.vb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 0d2060ed1a5..5cdd08a8585 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -134,20 +134,17 @@ Public Class dlgUseTable End Sub Private Sub ucrChkExport_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkExport.ControlContentsChanged - lblFileType.Visible = False - cboFileType.Visible = False - ucrFilePath.Visible = False - - ucrBase.clsRsyntax.GetAfterCodes().Clear() - If ucrChkExport.Checked Then lblFileType.Visible = True cboFileType.Visible = True ucrFilePath.Visible = True - ucrBase.clsRsyntax.AddToAfterCodes(clsSaveGtRFunction) + Else + lblFileType.Visible = False + cboFileType.Visible = False + ucrFilePath.Visible = False + ucrBase.clsRsyntax.GetAfterCodes().Clear() End If - TestOKEnabled() End Sub From f9ae18bc83df1cdf28f56c35e742608ca4eb7506 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:06:56 +0100 Subject: [PATCH 70/77] Code changes --- instat/frmMain.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 2d2a84e1ab8..c65a21370f2 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -852,7 +852,7 @@ Public Class frmMain End Sub Private Sub mnuHelpHelp_Click(sender As Object, e As EventArgs) - Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "135") + Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "135") End Sub Private Sub mnuTbHelp_Click(sender As Object, e As EventArgs) Handles mnuTbHelp.ButtonClick, mnuToolBarHelp.Click @@ -860,15 +860,15 @@ Public Class frmMain End Sub Private Sub mnuDataWindowHelp_Click(sender As Object, e As EventArgs) Handles mnuDataWindowHelp.Click - Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "134") + Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "134") End Sub Private Sub mnuOutputHelp_Click(sender As Object, e As EventArgs) Handles mnuOutputHelp.Click - Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "540") + Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "540") End Sub Private Sub mnuLogScriptHelp_Click(sender As Object, e As EventArgs) Handles mnuLogScriptHelp.Click - Help.ShowHelp(Me, Me.strStaticPath & "/" & Me.strHelpFilePath, HelpNavigator.TopicId, "542") + Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "542") End Sub Private Sub mnuPrepareFactorRecode_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnFactorRecodeFactor.Click From 76523adada34034d1a0a4a1f12cecec51a0c7817 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:10:23 +0100 Subject: [PATCH 71/77] Created a dropdown for the Dataview button --- instat/frmMain.Designer.vb | 114 ++++++++++++++++++++++--------------- instat/frmMain.vb | 7 ++- 2 files changed, 71 insertions(+), 50 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 51e2ae14d7c..1ace18cf469 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -405,7 +405,9 @@ Partial Class frmMain Me.toolStripSeparator = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbLast10Dialogs = New System.Windows.Forms.ToolStripSplitButton() Me.separator2 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuTbDataView = New System.Windows.Forms.ToolStripButton() + Me.mnuTbDataView = New System.Windows.Forms.ToolStripSplitButton() + Me.mnuDataViewWindow = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuRDataViewerWindow = New System.Windows.Forms.ToolStripMenuItem() Me.mnuTbOutput = New System.Windows.Forms.ToolStripSplitButton() Me.mnuOutputWindow = New System.Windows.Forms.ToolStripMenuItem() Me.mnuShowRCommand = New System.Windows.Forms.ToolStripMenuItem() @@ -426,6 +428,11 @@ Partial Class frmMain Me.ToolStripSeparator76 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbResetLayout = New System.Windows.Forms.ToolStripButton() Me.separator3 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuTbHelp = New System.Windows.Forms.ToolStripSplitButton() + Me.mnuToolBarHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuDataWindowHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuOutputHelp = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuLogScriptHelp = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator77 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbLan = New System.Windows.Forms.ToolStripButton() Me.separator1 = New System.Windows.Forms.ToolStripSeparator() @@ -703,11 +710,6 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuTbHelp = New System.Windows.Forms.ToolStripSplitButton() - Me.mnuToolBarHelp = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuDataWindowHelp = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuOutputHelp = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuLogScriptHelp = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3199,15 +3201,31 @@ Partial Class frmMain ' 'mnuTbDataView ' - Me.mnuTbDataView.CheckOnClick = True Me.mnuTbDataView.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.mnuTbDataView.DropDownButtonWidth = 18 + Me.mnuTbDataView.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuDataViewWindow, Me.mnuRDataViewerWindow}) Me.mnuTbDataView.Image = Global.instat.My.Resources.Resources.dataframe2 Me.mnuTbDataView.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnuTbDataView.Margin = New System.Windows.Forms.Padding(2, 1, 2, 2) Me.mnuTbDataView.Name = "mnuTbDataView" - Me.mnuTbDataView.Size = New System.Drawing.Size(34, 34) + Me.mnuTbDataView.Size = New System.Drawing.Size(53, 34) Me.mnuTbDataView.ToolTipText = "Toggle Data view open and closed" ' + 'mnuDataViewWindow + ' + Me.mnuDataViewWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuDataViewWindow.Name = "mnuDataViewWindow" + Me.mnuDataViewWindow.Size = New System.Drawing.Size(180, 22) + Me.mnuDataViewWindow.Text = "Data View" + ' + 'mnuRDataViewerWindow + ' + Me.mnuRDataViewerWindow.Enabled = False + Me.mnuRDataViewerWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuRDataViewerWindow.Name = "mnuRDataViewerWindow" + Me.mnuRDataViewerWindow.Size = New System.Drawing.Size(180, 22) + Me.mnuRDataViewerWindow.Text = "R-Data Viewer" + ' 'mnuTbOutput ' Me.mnuTbOutput.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image @@ -3360,6 +3378,44 @@ Partial Class frmMain Me.separator3.Name = "separator3" Me.separator3.Size = New System.Drawing.Size(6, 37) ' + 'mnuTbHelp + ' + Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.mnuTbHelp.DropDownButtonWidth = 18 + Me.mnuTbHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolBarHelp, Me.mnuDataWindowHelp, Me.mnuOutputHelp, Me.mnuLogScriptHelp}) + Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2 + Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta + Me.mnuTbHelp.Name = "mnuTbHelp" + Me.mnuTbHelp.Size = New System.Drawing.Size(53, 34) + Me.mnuTbHelp.Text = "LogScript" + Me.mnuTbHelp.ToolTipText = "Help Window" + ' + 'mnuToolBarHelp + ' + Me.mnuToolBarHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuToolBarHelp.Name = "mnuToolBarHelp" + Me.mnuToolBarHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuToolBarHelp.Text = "Toolbar Help" + ' + 'mnuDataWindowHelp + ' + Me.mnuDataWindowHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuDataWindowHelp.Name = "mnuDataWindowHelp" + Me.mnuDataWindowHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuDataWindowHelp.Text = "Data Window Help" + ' + 'mnuOutputHelp + ' + Me.mnuOutputHelp.Name = "mnuOutputHelp" + Me.mnuOutputHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuOutputHelp.Text = "Output Help" + ' + 'mnuLogScriptHelp + ' + Me.mnuLogScriptHelp.Name = "mnuLogScriptHelp" + Me.mnuLogScriptHelp.Size = New System.Drawing.Size(173, 22) + Me.mnuLogScriptHelp.Text = "Log Script Help" + ' 'ToolStripSeparator77 ' Me.ToolStripSeparator77.Name = "ToolStripSeparator77" @@ -5250,44 +5306,6 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' - 'mnuTbHelp - ' - Me.mnuTbHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.mnuTbHelp.DropDownButtonWidth = 18 - Me.mnuTbHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolBarHelp, Me.mnuDataWindowHelp, Me.mnuOutputHelp, Me.mnuLogScriptHelp}) - Me.mnuTbHelp.Image = Global.instat.My.Resources.Resources.help2 - Me.mnuTbHelp.ImageTransparentColor = System.Drawing.Color.Magenta - Me.mnuTbHelp.Name = "mnuTbHelp" - Me.mnuTbHelp.Size = New System.Drawing.Size(53, 34) - Me.mnuTbHelp.Text = "LogScript" - Me.mnuTbHelp.ToolTipText = "Help Window" - ' - 'mnuToolBarHelp - ' - Me.mnuToolBarHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None - Me.mnuToolBarHelp.Name = "mnuToolBarHelp" - Me.mnuToolBarHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuToolBarHelp.Text = "Toolbar Help" - ' - 'mnuDataWindowHelp - ' - Me.mnuDataWindowHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None - Me.mnuDataWindowHelp.Name = "mnuDataWindowHelp" - Me.mnuDataWindowHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuDataWindowHelp.Text = "Data Window Help" - ' - 'mnuOutputHelp - ' - Me.mnuOutputHelp.Name = "mnuOutputHelp" - Me.mnuOutputHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuOutputHelp.Text = "Output Help" - ' - 'mnuLogScriptHelp - ' - Me.mnuLogScriptHelp.Name = "mnuLogScriptHelp" - Me.mnuLogScriptHelp.Size = New System.Drawing.Size(180, 22) - Me.mnuLogScriptHelp.Text = "Log Script Help" - ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -5687,7 +5705,6 @@ Partial Class frmMain Friend WithEvents mnuClimaticCMSAFPlotRegion As ToolStripMenuItem Friend WithEvents mnuPrepareColumnDateInfillMissingDates As ToolStripMenuItem Friend WithEvents mnuTbOpenFromLibrary As ToolStripButton - Friend WithEvents mnuTbDataView As ToolStripButton Friend WithEvents separator3 As ToolStripSeparator Friend WithEvents mnuTbResetLayout As ToolStripButton Friend WithEvents mnuTbOpen As ToolStripSplitButton @@ -6017,4 +6034,7 @@ Partial Class frmMain Friend WithEvents mnuDataWindowHelp As ToolStripMenuItem Friend WithEvents mnuOutputHelp As ToolStripMenuItem Friend WithEvents mnuLogScriptHelp As ToolStripMenuItem + Friend WithEvents mnuTbDataView As ToolStripSplitButton + Friend WithEvents mnuDataViewWindow As ToolStripMenuItem + Friend WithEvents mnuRDataViewerWindow As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index c65a21370f2..968b5814c49 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -303,7 +303,7 @@ Public Class frmMain mnuDataFrameMetadat.Checked = False mnuSwapDataLogScript.Checked = False mnuSwapDataMetadata.Checked = False - mnuTbDataView.Checked = True + mnuDataViewWindow.Checked = True mnuOutputWindow.Checked = True mnuLogScript.Checked = False UpdateLayout() @@ -364,7 +364,7 @@ Public Class frmMain MsgBox(ex.Message) End Try - mnuTbDataView.Checked = mnuViewDataView.Checked + mnuDataViewWindow.Checked = mnuViewDataView.Checked mnuOutputWindow.Checked = mnuViewOutput.Checked mnuLogScript.Checked = mnuViewLogScript.Checked End Sub @@ -1832,8 +1832,9 @@ Public Class frmMain dlgInfill.ShowDialog() End Sub - Private Sub mnuDataView_Click(sender As Object, e As EventArgs) Handles mnuTbDataView.Click + Private Sub mnuDataView_Click(sender As Object, e As EventArgs) Handles mnuTbDataView.ButtonClick, mnuDataViewWindow.Click mnuViewDataView.Checked = Not mnuViewDataView.Checked + mnuDataViewWindow.Checked = mnuViewDataView.Checked UpdateLayout() End Sub From 8e7efa2945585e900d652b5f98c8b2db92820e9c Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:41:46 +0300 Subject: [PATCH 72/77] table changes --- instat/dlgView.vb | 48 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index ff3f2aa8c81..6b2d2aed01e 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -124,9 +124,9 @@ Public Class dlgView clsDummyFunction.AddParameter("checked", "window", iPosition:=0) - clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") - clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) + 'clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") + 'clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + 'clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) clsOutputWindowFunction.SetPackageName("utils") @@ -211,8 +211,9 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = True ucrBase.clsRsyntax.iCallType = 2 + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) @@ -233,7 +234,8 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else - ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) + ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) cmdTableOptions.Visible = True @@ -255,7 +257,7 @@ Public Class dlgView If bControlsUpdated Then ChangeFunctionParameters() End If - GetObjectName() + ' GetObjectName() End Sub Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged @@ -284,21 +286,21 @@ Public Class dlgView TestOKEnabled() End Sub - Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged - GetObjectName() - End Sub - - Private Sub GetObjectName() - If rdoDispOutputWindow.Checked Then - Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - ElseIf rdoHTMLOutputWindow.Checked Then - Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo - clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - End If - End Sub - - Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged - clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - End Sub + 'Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged + ' GetObjectName() + 'End Sub + + 'Private Sub GetObjectName() + ' If rdoDispOutputWindow.Checked Then + ' Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") + ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + ' ElseIf rdoHTMLOutputWindow.Checked Then + ' Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo + ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + ' End If + 'End Sub + + 'Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged + ' clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + 'End Sub End Class \ No newline at end of file From 064d434d9170919a47a0724ade9ba6a1da878e3d Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:46:59 +0300 Subject: [PATCH 73/77] design for number of rowa --- instat/dlgView.Designer.vb | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 33a1f42d8ad..0b2371e1776 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -53,8 +53,8 @@ Partial Class dlgView Me.ucrSelectorForView = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrViewChkPreview = New instat.ucrCheck() - Me.ucrChkRowNumbers = New instat.ucrCheck() Me.ucrViewNudPreview = New instat.ucrNud() + Me.lblNumberofRows = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'lblSelected @@ -215,15 +215,6 @@ Partial Class dlgView Me.ucrViewChkPreview.Size = New System.Drawing.Size(89, 23) Me.ucrViewChkPreview.TabIndex = 32 ' - 'ucrChkRowNumbers - ' - Me.ucrChkRowNumbers.AutoSize = True - Me.ucrChkRowNumbers.Checked = False - Me.ucrChkRowNumbers.Location = New System.Drawing.Point(248, 167) - Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" - Me.ucrChkRowNumbers.Size = New System.Drawing.Size(89, 23) - Me.ucrChkRowNumbers.TabIndex = 19 - ' 'ucrViewNudPreview ' Me.ucrViewNudPreview.AutoSize = True @@ -238,12 +229,24 @@ Partial Class dlgView Me.ucrViewNudPreview.TabIndex = 33 Me.ucrViewNudPreview.Value = New Decimal(New Integer() {1, 0, 0, 0}) ' + 'lblNumberofRows + ' + Me.lblNumberofRows.AutoSize = True + Me.lblNumberofRows.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblNumberofRows.Location = New System.Drawing.Point(248, 167) + Me.lblNumberofRows.Name = "lblNumberofRows" + Me.lblNumberofRows.Size = New System.Drawing.Size(89, 13) + Me.lblNumberofRows.TabIndex = 34 + Me.lblNumberofRows.Tag = "Number_of_rows" + Me.lblNumberofRows.Text = "Number of Rows:" + ' 'dlgView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(416, 357) + Me.Controls.Add(Me.lblNumberofRows) Me.Controls.Add(Me.cmdTableOptions) Me.Controls.Add(Me.ucrChkDisplayFromTop) Me.Controls.Add(Me.ucrSaveData) @@ -257,10 +260,9 @@ Partial Class dlgView Me.Controls.Add(Me.ucrReceiverView) Me.Controls.Add(Me.ucrSelectorForView) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.ucrNudNumberRows) Me.Controls.Add(Me.ucrViewChkPreview) - Me.Controls.Add(Me.ucrChkRowNumbers) Me.Controls.Add(Me.ucrViewNudPreview) - Me.Controls.Add(Me.ucrNudNumberRows) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -284,9 +286,9 @@ Partial Class dlgView Friend WithEvents rdoHTMLOutputWindow As RadioButton Friend WithEvents ucrReceiverSortCol As ucrReceiverSingle Friend WithEvents ucrSaveData As ucrSave - Friend WithEvents ucrChkRowNumbers As ucrCheck Friend WithEvents ucrChkDisplayFromTop As ucrCheck Friend WithEvents cmdTableOptions As Button Friend WithEvents ucrViewNudPreview As ucrNud Friend WithEvents ucrViewChkPreview As ucrCheck + Friend WithEvents lblNumberofRows As Label End Class \ No newline at end of file From 39b99de03eab08277222facdc89a40fb7401cbe9 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:15:17 +0300 Subject: [PATCH 74/77] Rows_Options --- instat/dlgView.vb | 52 +++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 6b2d2aed01e..8ed7890b902 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -56,16 +56,13 @@ Public Class dlgView ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer") ucrPnlDisplayWindow.AddToLinkedControls(ucrChkDisplayFromTop, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayWindow.AddToLinkedControls(ucrNudNumberRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrNudNumberRows.SetParameter(New RParameter("n", 1)) ucrReceiverView.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) - - ucrChkRowNumbers.SetText("Rows") - ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True) ucrNudNumberRows.SetRDefault(6) + ucrNudNumberRows.SetLinkedDisplayControl(lblNumberofRows) ucrChkDisplayFromTop.SetText("Display From Top") ucrChkDisplayFromTop.AddFunctionNamesCondition(True, {"head", "tail"}) @@ -124,9 +121,9 @@ Public Class dlgView clsDummyFunction.AddParameter("checked", "window", iPosition:=0) - 'clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") - 'clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - 'clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) + clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") + clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) clsOutputWindowFunction.SetPackageName("utils") @@ -207,13 +204,11 @@ Public Class dlgView Private Sub ChangeFunctionParameters() If rdoDispOutputWindow.Checked Then clsDummyFunction.AddParameter("checked", "window", iPosition:=0) - cmdTableOptions.Visible = False ucrSaveData.Visible = True ucrBase.clsRsyntax.iCallType = 2 ucrBase.clsRsyntax.RemoveFromAfterCodes(clsGetObjectDataFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) If ucrNudNumberRows.GetText <> "" OrElse ucrChkDisplayFromTop.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsOutputWindowFunction) @@ -234,7 +229,6 @@ Public Class dlgView cmdTableOptions.Visible = False ucrSaveData.Visible = False Else - 'ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction) ucrSaveData.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) clsDummyFunction.AddParameter("checked", "html", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) @@ -257,7 +251,7 @@ Public Class dlgView If bControlsUpdated Then ChangeFunctionParameters() End If - ' GetObjectName() + GetObjectName() End Sub Private Sub ucrChkSortColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSortColumn.ControlValueChanged, ucrPnlDisplayWindow.ControlValueChanged @@ -286,21 +280,21 @@ Public Class dlgView TestOKEnabled() End Sub - 'Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged - ' GetObjectName() - 'End Sub - - 'Private Sub GetObjectName() - ' If rdoDispOutputWindow.Checked Then - ' Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") - ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - ' ElseIf rdoHTMLOutputWindow.Checked Then - ' Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo - ' clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) - ' End If - 'End Sub - - 'Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged - ' clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) - 'End Sub + Private Sub ucrSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveData.ControlValueChanged + GetObjectName() + End Sub + + Private Sub GetObjectName() + If rdoDispOutputWindow.Checked Then + Dim strPrefix As String = clsOutputWindowFunction.GetRObjectToAssignTo 'If(ucrSaveData.GetText <> "", ucrSaveData.GetText, "last_table") + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + ElseIf rdoHTMLOutputWindow.Checked Then + Dim strPrefix As String = clsBaseOperator.GetRObjectToAssignTo + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & strPrefix & Chr(34), iPosition:=1) + End If + End Sub + + Private Sub ucrSelectorForView_DataFrameChanged() Handles ucrSelectorForView.DataFrameChanged + clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForView.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + End Sub End Class \ No newline at end of file From ecfde9184a6a63c0a57516b9f4e69c78c45d577f Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:58:28 +0300 Subject: [PATCH 75/77] change --- instat/dlgView.vb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 8ed7890b902..8440aafb5d2 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -56,11 +56,14 @@ Public Class dlgView ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer") ucrPnlDisplayWindow.AddToLinkedControls(ucrChkDisplayFromTop, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrPnlDisplayWindow.AddToLinkedControls(ucrNudNumberRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ' ucrPnlDisplayWindow.AddToLinkedControls(lblNumberofRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + ucrNudNumberRows.Visible = rdoDispOutputWindow.Checked ucrReceiverView.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) + + ucrNudNumberRows.SetParameter(New RParameter("n", 1)) + 'ucrNudNumberRows.Minimum = 1 ucrNudNumberRows.SetRDefault(6) ucrNudNumberRows.SetLinkedDisplayControl(lblNumberofRows) From 0199a5078ffd08e45b96283b000b7c0905570125 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:14:06 +0300 Subject: [PATCH 76/77] final changes --- instat/dlgView.Designer.vb | 13 +++++++++++++ instat/dlgView.vb | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/instat/dlgView.Designer.vb b/instat/dlgView.Designer.vb index 0b2371e1776..0c941632055 100644 --- a/instat/dlgView.Designer.vb +++ b/instat/dlgView.Designer.vb @@ -55,6 +55,7 @@ Partial Class dlgView Me.ucrViewChkPreview = New instat.ucrCheck() Me.ucrViewNudPreview = New instat.ucrNud() Me.lblNumberofRows = New System.Windows.Forms.Label() + Me.ucrChkRowNumbers = New instat.ucrCheck() Me.SuspendLayout() ' 'lblSelected @@ -240,6 +241,16 @@ Partial Class dlgView Me.lblNumberofRows.Tag = "Number_of_rows" Me.lblNumberofRows.Text = "Number of Rows:" ' + 'ucrChkRowNumbers + ' + Me.ucrChkRowNumbers.AutoSize = True + Me.ucrChkRowNumbers.Checked = True + Me.ucrChkRowNumbers.Location = New System.Drawing.Point(249, 165) + Me.ucrChkRowNumbers.Name = "ucrChkRowNumbers" + Me.ucrChkRowNumbers.Size = New System.Drawing.Size(130, 23) + Me.ucrChkRowNumbers.TabIndex = 35 + Me.ucrChkRowNumbers.Visible = False + ' 'dlgView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -263,6 +274,7 @@ Partial Class dlgView Me.Controls.Add(Me.ucrNudNumberRows) Me.Controls.Add(Me.ucrViewChkPreview) Me.Controls.Add(Me.ucrViewNudPreview) + Me.Controls.Add(Me.ucrChkRowNumbers) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -291,4 +303,5 @@ Partial Class dlgView Friend WithEvents ucrViewNudPreview As ucrNud Friend WithEvents ucrViewChkPreview As ucrCheck Friend WithEvents lblNumberofRows As Label + Friend WithEvents ucrChkRowNumbers As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgView.vb b/instat/dlgView.vb index 8440aafb5d2..2da68d9390f 100644 --- a/instat/dlgView.vb +++ b/instat/dlgView.vb @@ -56,9 +56,12 @@ Public Class dlgView ucrPnlDisplayWindow.AddParameterValuesCondition(rdoDispSepOutputWindow, "checked", "viewer") ucrPnlDisplayWindow.AddToLinkedControls(ucrChkDisplayFromTop, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) - ' ucrPnlDisplayWindow.AddToLinkedControls(lblNumberofRows, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrPnlDisplayWindow.AddToLinkedControls(ucrChkRowNumbers, {rdoDispOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) ucrPnlDisplayWindow.AddToLinkedControls(ucrViewChkPreview, {rdoHTMLOutputWindow}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=True) + ucrChkRowNumbers.AddToLinkedControls(ucrNudNumberRows, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=6) + + ucrNudNumberRows.Visible = rdoDispOutputWindow.Checked ucrReceiverView.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) From 9e1d534d813530fb196a3001f8fbb5be236a8b33 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:36:35 +0100 Subject: [PATCH 77/77] Changes in the calculations.R --- .../InstatObject/R/Backend_Components/calculations.R | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/instat/static/InstatObject/R/Backend_Components/calculations.R b/instat/static/InstatObject/R/Backend_Components/calculations.R index 7ade797128c..ebb95254ec6 100644 --- a/instat/static/InstatObject/R/Backend_Components/calculations.R +++ b/instat/static/InstatObject/R/Backend_Components/calculations.R @@ -495,9 +495,8 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list if (any(stringr::str_detect("ordered", col_data_type))){ # put in here the ones that DO work for ordered factor - if (any(grepl("summary_count|summary_count_miss|summary_count_all|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ - if (any(grepl("summary_count_non_missing|summary_count_missing|summary_n_distinct|summary_count|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ + if (any(grepl("summary_count|summary_count_miss|summary_n_distinct|summary_count_all|summary_min|summary_max|summary_range|summary_median|summary_quantile|p10|p20|p25|p30|p33|p40|p60|p67|p70|p75|p80|p90", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp)) @@ -510,9 +509,8 @@ DataBook$set("public", "apply_instat_calculation", function(calc, curr_data_list } else if (any(stringr::str_detect("factor | character", col_data_type))){ # put in here the ones that DO work for factor or character - if (any(grepl("summary_count|summary_count_miss|summary_count_all", formula_fn_exp))){ - - if (any(grepl("summary_count_non_missing|summary_count_missing|summary_n_distinct|summary_count", formula_fn_exp))){ + + if (any(grepl("summary_count|summary_count_miss|summary_n_distinct|summary_count_all", formula_fn_exp))){ curr_data_list[[c_data_label]] <- curr_data_list[[c_data_label]] %>% dplyr::summarise(!!calc$result_name := !!rlang::parse_expr(calc$function_exp))