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 1/8] 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 2/8] 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 3/8] 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 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 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] 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()