From cabbdfc86a670ef5aabfae4cf29aea6700015a9b Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Thu, 2 Jan 2025 23:36:33 +0300 Subject: [PATCH 01/13] Adding the checkboxes for themes in subdialog --- instat/UserTables/sdgTableOptions.Designer.vb | 68 +++++++------------ instat/UserTables/sdgTableOptions.vb | 36 +++++++--- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/instat/UserTables/sdgTableOptions.Designer.vb b/instat/UserTables/sdgTableOptions.Designer.vb index 5f4be438d6..6963448c18 100644 --- a/instat/UserTables/sdgTableOptions.Designer.vb +++ b/instat/UserTables/sdgTableOptions.Designer.vb @@ -36,11 +36,10 @@ Partial Class sdgTableOptions Me.tbpSourceNotes = New System.Windows.Forms.TabPage() Me.ucrSourceNotes = New instat.ucrSourceNotes() Me.tbpThemes = New System.Windows.Forms.TabPage() + Me.ucrChkSelectTheme = New instat.ucrCheck() + Me.ucrChkManualTheme = New instat.ucrCheck() Me.ucrCboSelectThemes = New instat.ucrInputComboBox() Me.btnManualTheme = New System.Windows.Forms.Button() - Me.rdoSelectTheme = New System.Windows.Forms.RadioButton() - Me.rdoManualTheme = New System.Windows.Forms.RadioButton() - Me.ucrPnlThemesPanel = New instat.UcrPanel() Me.tbpOtherStyles = New System.Windows.Forms.TabPage() Me.ucrOtherStyles = New instat.ucrOtherStyles() Me.ucrSdgBaseButtons = New instat.ucrButtonsSubdialogue() @@ -182,11 +181,10 @@ Partial Class sdgTableOptions ' 'tbpThemes ' + Me.tbpThemes.Controls.Add(Me.ucrChkSelectTheme) + Me.tbpThemes.Controls.Add(Me.ucrChkManualTheme) Me.tbpThemes.Controls.Add(Me.ucrCboSelectThemes) Me.tbpThemes.Controls.Add(Me.btnManualTheme) - Me.tbpThemes.Controls.Add(Me.rdoSelectTheme) - Me.tbpThemes.Controls.Add(Me.rdoManualTheme) - Me.tbpThemes.Controls.Add(Me.ucrPnlThemesPanel) Me.tbpThemes.Location = New System.Drawing.Point(4, 22) Me.tbpThemes.Name = "tbpThemes" Me.tbpThemes.Size = New System.Drawing.Size(648, 431) @@ -194,13 +192,31 @@ Partial Class sdgTableOptions Me.tbpThemes.Text = "Themes" Me.tbpThemes.UseVisualStyleBackColor = True ' + 'ucrChkSelectTheme + ' + Me.ucrChkSelectTheme.AutoSize = True + Me.ucrChkSelectTheme.Checked = False + Me.ucrChkSelectTheme.Location = New System.Drawing.Point(25, 29) + Me.ucrChkSelectTheme.Name = "ucrChkSelectTheme" + Me.ucrChkSelectTheme.Size = New System.Drawing.Size(182, 23) + Me.ucrChkSelectTheme.TabIndex = 29 + ' + 'ucrChkManualTheme + ' + Me.ucrChkManualTheme.AutoSize = True + Me.ucrChkManualTheme.Checked = False + Me.ucrChkManualTheme.Location = New System.Drawing.Point(25, 57) + Me.ucrChkManualTheme.Name = "ucrChkManualTheme" + Me.ucrChkManualTheme.Size = New System.Drawing.Size(182, 23) + Me.ucrChkManualTheme.TabIndex = 28 + ' 'ucrCboSelectThemes ' Me.ucrCboSelectThemes.AddQuotesIfUnrecognised = True Me.ucrCboSelectThemes.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrCboSelectThemes.GetSetSelectedIndex = -1 Me.ucrCboSelectThemes.IsReadOnly = False - Me.ucrCboSelectThemes.Location = New System.Drawing.Point(157, 29) + Me.ucrCboSelectThemes.Location = New System.Drawing.Point(230, 29) Me.ucrCboSelectThemes.Margin = New System.Windows.Forms.Padding(9) Me.ucrCboSelectThemes.Name = "ucrCboSelectThemes" Me.ucrCboSelectThemes.Size = New System.Drawing.Size(168, 21) @@ -208,44 +224,13 @@ Partial Class sdgTableOptions ' 'btnManualTheme ' - Me.btnManualTheme.Location = New System.Drawing.Point(157, 59) + Me.btnManualTheme.Location = New System.Drawing.Point(231, 59) Me.btnManualTheme.Name = "btnManualTheme" Me.btnManualTheme.Size = New System.Drawing.Size(168, 21) Me.btnManualTheme.TabIndex = 2 Me.btnManualTheme.Text = "Custom Theme" Me.btnManualTheme.UseVisualStyleBackColor = True ' - 'rdoSelectTheme - ' - Me.rdoSelectTheme.AutoSize = True - Me.rdoSelectTheme.Checked = True - Me.rdoSelectTheme.Location = New System.Drawing.Point(22, 31) - Me.rdoSelectTheme.Name = "rdoSelectTheme" - Me.rdoSelectTheme.Size = New System.Drawing.Size(91, 17) - Me.rdoSelectTheme.TabIndex = 0 - Me.rdoSelectTheme.TabStop = True - Me.rdoSelectTheme.Text = "Select Theme" - Me.rdoSelectTheme.UseVisualStyleBackColor = True - ' - 'rdoManualTheme - ' - Me.rdoManualTheme.AutoSize = True - Me.rdoManualTheme.Location = New System.Drawing.Point(22, 61) - Me.rdoManualTheme.Name = "rdoManualTheme" - Me.rdoManualTheme.Size = New System.Drawing.Size(96, 17) - Me.rdoManualTheme.TabIndex = 1 - Me.rdoManualTheme.Text = "Manual Theme" - Me.rdoManualTheme.UseVisualStyleBackColor = True - ' - 'ucrPnlThemesPanel - ' - Me.ucrPnlThemesPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlThemesPanel.Location = New System.Drawing.Point(12, 16) - Me.ucrPnlThemesPanel.Margin = New System.Windows.Forms.Padding(6) - Me.ucrPnlThemesPanel.Name = "ucrPnlThemesPanel" - Me.ucrPnlThemesPanel.Size = New System.Drawing.Size(349, 70) - Me.ucrPnlThemesPanel.TabIndex = 4 - ' 'tbpOtherStyles ' Me.tbpOtherStyles.Controls.Add(Me.ucrOtherStyles) @@ -306,9 +291,6 @@ Partial Class sdgTableOptions Friend WithEvents tbpThemes As TabPage Friend WithEvents ucrCboSelectThemes As ucrInputComboBox Friend WithEvents btnManualTheme As Button - Friend WithEvents rdoSelectTheme As RadioButton - Friend WithEvents rdoManualTheme As RadioButton - Friend WithEvents ucrPnlThemesPanel As UcrPanel Friend WithEvents ucrSourceNotes As ucrSourceNotes Friend WithEvents tbpRows As TabPage Friend WithEvents ucrHeader As ucrHeader @@ -321,4 +303,6 @@ Partial Class sdgTableOptions Friend WithEvents ucrSdgBaseButtons As ucrButtonsSubdialogue Friend WithEvents tbpOtherStyles As TabPage Friend WithEvents ucrOtherStyles As ucrOtherStyles + Friend WithEvents ucrChkSelectTheme As ucrCheck + Friend WithEvents ucrChkManualTheme As ucrCheck End Class diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index d7fa2263d4..72fba30924 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -32,9 +32,10 @@ Public Class sdgTableOptions Private Sub InitialiseDialog() ucrSdgBaseButtons.iHelpTopicID = 146 - - ucrPnlThemesPanel.AddRadioButton(rdoSelectTheme) - ucrPnlThemesPanel.AddRadioButton(rdoManualTheme) + ucrChkSelectTheme.Checked = True + ucrChkManualTheme.Checked = False + ucrChkSelectTheme.SetText("Select Theme") + ucrChkManualTheme.SetText("Manual Theme") ucrCboSelectThemes.SetItems({"None", "Dark Theme", "538 Theme", "Dot Matrix Theme", "Espn Theme", "Excel Theme", "Guardian Theme", "NY Times Theme", "PFF Theme"}) ucrCboSelectThemes.SetDropDownStyleAsNonEditable() @@ -84,20 +85,29 @@ Public Class sdgTableOptions End If End Sub - Private Sub ucrPnlThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlThemesPanel.ControlValueChanged - ucrCboSelectThemes.Visible = False - btnManualTheme.Visible = False + Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged + ucrChkManualTheme.Checked = Not ucrChkSelectTheme.Checked - If rdoSelectTheme.Checked Then + If ucrChkSelectTheme.Checked Then + btnManualTheme.Visible = False ucrCboSelectThemes.Visible = True clsThemeRFunction.SetPackageName("gtExtras") clsThemeRFunction.ClearParameters() - ElseIf rdoManualTheme.Checked Then + Else + ucrCboSelectThemes.Visible = False + End If + End Sub + + Private Sub ucrChkManualTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkManualTheme.ControlValueChanged + ucrChkSelectTheme.Checked = Not ucrChkManualTheme.Checked + + If ucrChkManualTheme.Checked Then btnManualTheme.Visible = True clsThemeRFunction.SetPackageName("gt") clsThemeRFunction.SetRCommand("tab_options") + Else + btnManualTheme.Visible = False End If - End Sub Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged @@ -142,6 +152,14 @@ Public Class sdgTableOptions clsOperator.RemoveParameterByName("theme_format") End If End Sub + + Private Sub ucrPnlThemes_ControlValueChanged(ucrChangedControl As ucrCore) + + End Sub + + Private Sub ucrChkSelectTheme_Load(sender As Object, e As EventArgs) + + End Sub '----------------------------------------- From 6fd5c05472e98d6192d195fb5b08d28063c19b4e Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Fri, 3 Jan 2025 01:55:07 +0300 Subject: [PATCH 02/13] presentation table design changes --- instat/UserTables/dlgGeneralTable.Designer.vb | 116 +++++++++++++++++- instat/UserTables/dlgGeneralTable.vb | 82 ++++++++++++- instat/UserTables/sdgTableOptions.vb | 8 -- 3 files changed, 194 insertions(+), 12 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.Designer.vb b/instat/UserTables/dlgGeneralTable.Designer.vb index 481a6fbbd4..b4eee8c5bb 100644 --- a/instat/UserTables/dlgGeneralTable.Designer.vb +++ b/instat/UserTables/dlgGeneralTable.Designer.vb @@ -24,12 +24,21 @@ Partial Class dlgGeneralTable Private Sub InitializeComponent() Me.lblColumns = New System.Windows.Forms.Label() Me.btnMoreOptions = New System.Windows.Forms.Button() + Me.ucrChkSelectTheme = New instat.ucrCheck() + Me.ucrCboSelectThemes = New instat.ucrInputComboBox() Me.ucrNudPreview = New instat.ucrNud() Me.ucrChkPreview = New instat.ucrCheck() Me.ucrSaveTable = New instat.ucrSave() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverMultipleCols = New instat.ucrReceiverMultiple() Me.ucrSelectorCols = New instat.ucrSelectorByDataFrameAddRemove() + Me.grpBoxTitle = New System.Windows.Forms.GroupBox() + Me.lblTitle = New System.Windows.Forms.Label() + Me.ucrInputTitle = New instat.ucrInputTextBox() + Me.btnTitleStyle = New System.Windows.Forms.Button() + Me.lblHeaderTitle = New System.Windows.Forms.Label() + Me.ucrInputTitleFooter = New instat.ucrInputTextBox() + Me.grpBoxTitle.SuspendLayout() Me.SuspendLayout() ' 'lblColumns @@ -51,6 +60,27 @@ Partial Class dlgGeneralTable Me.btnMoreOptions.Text = "Table Options" Me.btnMoreOptions.UseVisualStyleBackColor = True ' + 'ucrChkSelectTheme + ' + Me.ucrChkSelectTheme.AutoSize = True + Me.ucrChkSelectTheme.Checked = False + Me.ucrChkSelectTheme.Location = New System.Drawing.Point(9, 233) + Me.ucrChkSelectTheme.Name = "ucrChkSelectTheme" + Me.ucrChkSelectTheme.Size = New System.Drawing.Size(182, 23) + Me.ucrChkSelectTheme.TabIndex = 33 + ' + 'ucrCboSelectThemes + ' + Me.ucrCboSelectThemes.AddQuotesIfUnrecognised = True + Me.ucrCboSelectThemes.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboSelectThemes.GetSetSelectedIndex = -1 + Me.ucrCboSelectThemes.IsReadOnly = False + Me.ucrCboSelectThemes.Location = New System.Drawing.Point(214, 233) + Me.ucrCboSelectThemes.Margin = New System.Windows.Forms.Padding(9) + Me.ucrCboSelectThemes.Name = "ucrCboSelectThemes" + Me.ucrCboSelectThemes.Size = New System.Drawing.Size(168, 21) + Me.ucrCboSelectThemes.TabIndex = 32 + ' 'ucrNudPreview ' Me.ucrNudPreview.AutoSize = True @@ -78,7 +108,7 @@ Partial Class dlgGeneralTable 'ucrSaveTable ' Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(9, 242) + Me.ucrSaveTable.Location = New System.Drawing.Point(9, 392) Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveTable.Name = "ucrSaveTable" Me.ucrSaveTable.Size = New System.Drawing.Size(319, 24) @@ -87,7 +117,7 @@ Partial Class dlgGeneralTable 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(9, 276) + Me.ucrBase.Location = New System.Drawing.Point(9, 427) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) @@ -118,11 +148,81 @@ Partial Class dlgGeneralTable Me.ucrSelectorCols.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorCols.TabIndex = 22 ' + 'grpBoxTitle + ' + Me.grpBoxTitle.Controls.Add(Me.lblTitle) + Me.grpBoxTitle.Controls.Add(Me.ucrInputTitle) + Me.grpBoxTitle.Controls.Add(Me.btnTitleStyle) + Me.grpBoxTitle.Controls.Add(Me.lblHeaderTitle) + Me.grpBoxTitle.Controls.Add(Me.ucrInputTitleFooter) + Me.grpBoxTitle.Location = New System.Drawing.Point(7, 265) + Me.grpBoxTitle.Name = "grpBoxTitle" + Me.grpBoxTitle.Size = New System.Drawing.Size(463, 115) + Me.grpBoxTitle.TabIndex = 34 + Me.grpBoxTitle.TabStop = False + Me.grpBoxTitle.Text = "Title" + ' + 'lblTitle + ' + Me.lblTitle.AutoSize = True + Me.lblTitle.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblTitle.Location = New System.Drawing.Point(8, 22) + Me.lblTitle.Name = "lblTitle" + Me.lblTitle.Size = New System.Drawing.Size(59, 13) + Me.lblTitle.TabIndex = 26 + Me.lblTitle.Text = "Title Label:" + ' + 'ucrInputTitle + ' + Me.ucrInputTitle.AddQuotesIfUnrecognised = True + Me.ucrInputTitle.AutoSize = True + Me.ucrInputTitle.IsMultiline = False + Me.ucrInputTitle.IsReadOnly = False + Me.ucrInputTitle.Location = New System.Drawing.Point(11, 42) + Me.ucrInputTitle.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputTitle.Name = "ucrInputTitle" + Me.ucrInputTitle.Size = New System.Drawing.Size(359, 21) + Me.ucrInputTitle.TabIndex = 28 + ' + 'btnTitleStyle + ' + Me.btnTitleStyle.Location = New System.Drawing.Point(374, 42) + Me.btnTitleStyle.Name = "btnTitleStyle" + Me.btnTitleStyle.Size = New System.Drawing.Size(79, 23) + Me.btnTitleStyle.TabIndex = 30 + Me.btnTitleStyle.Text = "Style" + Me.btnTitleStyle.UseVisualStyleBackColor = True + ' + 'lblHeaderTitle + ' + Me.lblHeaderTitle.AutoSize = True + Me.lblHeaderTitle.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblHeaderTitle.Location = New System.Drawing.Point(8, 72) + Me.lblHeaderTitle.Name = "lblHeaderTitle" + Me.lblHeaderTitle.Size = New System.Drawing.Size(63, 13) + Me.lblHeaderTitle.TabIndex = 20 + Me.lblHeaderTitle.Text = "Title Footer:" + ' + 'ucrInputTitleFooter + ' + Me.ucrInputTitleFooter.AddQuotesIfUnrecognised = True + Me.ucrInputTitleFooter.AutoSize = True + Me.ucrInputTitleFooter.IsMultiline = False + Me.ucrInputTitleFooter.IsReadOnly = False + Me.ucrInputTitleFooter.Location = New System.Drawing.Point(11, 89) + Me.ucrInputTitleFooter.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputTitleFooter.Name = "ucrInputTitleFooter" + Me.ucrInputTitleFooter.Size = New System.Drawing.Size(359, 21) + Me.ucrInputTitleFooter.TabIndex = 22 + ' 'dlgGeneralTable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(476, 338) + Me.ClientSize = New System.Drawing.Size(476, 479) + Me.Controls.Add(Me.grpBoxTitle) + Me.Controls.Add(Me.ucrChkSelectTheme) + Me.Controls.Add(Me.ucrCboSelectThemes) Me.Controls.Add(Me.ucrNudPreview) Me.Controls.Add(Me.ucrChkPreview) Me.Controls.Add(Me.ucrSaveTable) @@ -135,6 +235,8 @@ Partial Class dlgGeneralTable Me.Name = "dlgGeneralTable" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Presentation Table" + Me.grpBoxTitle.ResumeLayout(False) + Me.grpBoxTitle.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -147,4 +249,12 @@ Partial Class dlgGeneralTable Friend WithEvents ucrSaveTable As ucrSave Friend WithEvents ucrNudPreview As ucrNud Friend WithEvents ucrChkPreview As ucrCheck + Friend WithEvents ucrChkSelectTheme As ucrCheck + Friend WithEvents ucrCboSelectThemes As ucrInputComboBox + Friend WithEvents grpBoxTitle As GroupBox + Friend WithEvents lblTitle As Label + Friend WithEvents ucrInputTitle As ucrInputTextBox + Friend WithEvents btnTitleStyle As Button + Friend WithEvents lblHeaderTitle As Label + Friend WithEvents ucrInputTitleFooter As ucrInputTextBox End Class diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index fefc401eee..67be7a40f4 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -2,7 +2,7 @@ Public Class dlgGeneralTable Private clsBaseOperator As New ROperator - Private clsHeadRFunction, clsGtRFunction As New RFunction + Private clsHeadRFunction, clsGtRFunction, clsThemeRFunction As New RFunction Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -61,12 +61,18 @@ Public Class dlgGeneralTable ucrSaveTable.SetCheckBoxText("Store Table") ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + ucrChkSelectTheme.Checked = True + ucrChkSelectTheme.SetText("Select Theme") + ucrCboSelectThemes.SetItems({"None", "Dark Theme", "538 Theme", "Dot Matrix Theme", "Espn Theme", "Excel Theme", "Guardian Theme", "NY Times Theme", "PFF Theme"}) + ucrCboSelectThemes.SetDropDownStyleAsNonEditable() + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False End Sub Private Sub SetDefaults() clsBaseOperator = New ROperator + ' clsOperator = New ROperator clsHeadRFunction = New RFunction clsGtRFunction = New RFunction @@ -87,12 +93,24 @@ Public Class dlgGeneralTable clsGtRFunction.SetRCommand("gt") clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) + Dim strCommand As String = "" + clsThemeRFunction.SetPackageName("gtExtras") + clsThemeRFunction.SetRCommand(strCommand) + clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, strRDataFrameNameToAddObjectTo:=ucrSelectorCols.strCurrentDataFrame, strObjectName:="last_table") + 'clsOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + ' strRObjectFormatToAssignTo:=RObjectFormat.Html, + ' strRDataFrameNameToAddObjectTo:=ucrSelectorCols.strCurrentDataFrame, + ' strObjectName:="last_table") + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub @@ -105,6 +123,15 @@ Public Class dlgGeneralTable ucrNudPreview.SetRCode(clsHeadRFunction, bReset) End Sub + Private Sub SetupTheme() '(clsOperator As ROperator) + If clsBaseOperator.ContainsParameter("theme_format") Then + clsThemeRFunction = clsBaseOperator.GetParameter("theme_format").clsArgumentCodeStructure + Else + clsThemeRFunction = New RFunction + clsThemeRFunction.SetPackageName("gtExtras") + End If + End Sub + Private Sub TestOKEnabled() ucrBase.OKEnabled(Not ucrReceiverMultipleCols.IsEmpty AndAlso ucrSaveTable.IsComplete) End Sub @@ -116,4 +143,57 @@ Public Class dlgGeneralTable clsBaseOperator.RemoveParameterByName("head") End If End Sub + + Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged + If ucrChkSelectTheme.Checked Then + ucrCboSelectThemes.Visible = True + clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + 'clsThemeRFunction.SetPackageName("gtExtras") + 'clsThemeRFunction.ClearParameters() + Else + clsBaseOperator.RemoveParameterByName("theme_format") + + ucrCboSelectThemes.Visible = False + clsThemeRFunction.ClearParameters() + End If + End Sub + + Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged + + If clsThemeRFunction Is Nothing Then + Exit Sub + End If + + Dim strCommand As String = "" + Select Case ucrCboSelectThemes.GetText + Case "Dark Theme" + strCommand = "gt_theme_dark" + Case "538 Theme" + strCommand = "gt_theme_538" + Case "Dot Matrix Theme" + strCommand = "gt_theme_dot_matrix" + Case "Espn Theme" + strCommand = "gt_theme_espn" + Case "Excel Theme" + strCommand = "gt_theme_excel" + Case "Guardian Theme" + strCommand = "gt_theme_guardian" + Case "NY Times Theme" + strCommand = "gt_theme_nytimes" + Case "PFF Theme" + strCommand = "gt_theme_pff" + End Select + + clsThemeRFunction.SetRCommand(strCommand) + End Sub + + Private Sub SetThemeValuesOnReturn() '(clsOperator As ROperator) + ' Set the themes parameter if there was a theme selected + If clsThemeRFunction IsNot Nothing AndAlso Not String.IsNullOrEmpty(clsThemeRFunction.strRCommand) Then + clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + Else + clsBaseOperator.RemoveParameterByName("theme_format") + End If + End Sub + End Class \ No newline at end of file diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index 72fba30924..c69c33ea87 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -152,14 +152,6 @@ Public Class sdgTableOptions clsOperator.RemoveParameterByName("theme_format") End If End Sub - - Private Sub ucrPnlThemes_ControlValueChanged(ucrChangedControl As ucrCore) - - End Sub - - Private Sub ucrChkSelectTheme_Load(sender As Object, e As EventArgs) - - End Sub '----------------------------------------- From 12fcb7ffb7a6fe5e0dc8920af58e1debd790e8ca Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:41:25 +0100 Subject: [PATCH 03/13] Added Headers --- instat/UserTables/dlgGeneralTable.vb | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 67be7a40f4..8777a05f48 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -2,7 +2,7 @@ Public Class dlgGeneralTable Private clsBaseOperator As New ROperator - Private clsHeadRFunction, clsGtRFunction, clsThemeRFunction As New RFunction + Private clsHeadRFunction, clsHeaderRFunction, clsGtRFunction, clsThemeRFunction As New RFunction Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -28,6 +28,7 @@ Public Class dlgGeneralTable Private Sub ucrControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleCols.ControlContentsChanged TestOKEnabled() + 'Header() End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -44,6 +45,9 @@ Public Class dlgGeneralTable ucrReceiverMultipleCols.Selector = ucrSelectorCols ucrReceiverMultipleCols.SetLinkedDisplayControl(lblColumns) + ucrInputTitle.SetParameter(New RParameter("title", iNewPosition:=0)) + ucrInputTitleFooter.SetParameter(New RParameter("footnote", iNewPosition:=0)) + ucrChkPreview.SetText("Preview") ucrChkPreview.AddParameterPresentCondition(True, "head", bNewIsPositive:=True) ucrChkPreview.AddParameterPresentCondition(False, "head", bNewIsPositive:=False) @@ -75,7 +79,7 @@ Public Class dlgGeneralTable ' clsOperator = New ROperator clsHeadRFunction = New RFunction clsGtRFunction = New RFunction - + clsHeaderRFunction = New RFunction ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() ucrSaveTable.Reset() @@ -89,6 +93,7 @@ Public Class dlgGeneralTable 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) @@ -99,6 +104,13 @@ Public Class dlgGeneralTable clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + clsHeaderRFunction.SetPackageName("gt") + clsHeaderRFunction.SetRCommand("tab_header") + clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) + 'clsHeaderRFunction.AddParameter("subtitle", "", iPosition:=2) + clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) + + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, @@ -118,7 +130,7 @@ Public Class dlgGeneralTable Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverMultipleCols.SetRCode(clsBaseOperator, bReset) ucrSaveTable.SetRCode(clsBaseOperator, bReset) - + ucrInputTitle.SetRCode(clsHeaderRFunction, True, bCloneIfNeeded:=True) ucrChkPreview.SetRCode(clsBaseOperator, bReset) ucrNudPreview.SetRCode(clsHeadRFunction, bReset) End Sub @@ -156,6 +168,7 @@ Public Class dlgGeneralTable ucrCboSelectThemes.Visible = False clsThemeRFunction.ClearParameters() End If + 'Header() End Sub Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged @@ -196,4 +209,12 @@ Public Class dlgGeneralTable End If End Sub + 'Private Sub Header() + ' If Not ucrInputTitle.IsEmpty Then + ' clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText) + ' Else + ' clsHeaderRFunction.RemoveParameterByName("title") + ' End If + 'End Sub + End Class \ No newline at end of file From 4f6f6dcbde4ed996b07e0d3366d8a3f435b597a7 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:18:28 +0100 Subject: [PATCH 04/13] Added Footer to Presentation dialog --- instat/UserTables/dlgGeneralTable.vb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 8777a05f48..2dc8ea8c0d 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -2,7 +2,7 @@ Public Class dlgGeneralTable Private clsBaseOperator As New ROperator - Private clsHeadRFunction, clsHeaderRFunction, clsGtRFunction, clsThemeRFunction As New RFunction + Private clsHeadRFunction, clsHeaderRFunction, clsTitleFooterRFunction, clsGtRFunction, clsThemeRFunction As New RFunction Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -28,7 +28,6 @@ Public Class dlgGeneralTable Private Sub ucrControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleCols.ControlContentsChanged TestOKEnabled() - 'Header() End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -80,6 +79,7 @@ Public Class dlgGeneralTable clsHeadRFunction = New RFunction clsGtRFunction = New RFunction clsHeaderRFunction = New RFunction + clsTitleFooterRFunction = New RFunction ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() ucrSaveTable.Reset() @@ -107,9 +107,12 @@ Public Class dlgGeneralTable clsHeaderRFunction.SetPackageName("gt") clsHeaderRFunction.SetRCommand("tab_header") clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) - 'clsHeaderRFunction.AddParameter("subtitle", "", iPosition:=2) clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) + clsTitleFooterRFunction.SetPackageName("gt") + clsTitleFooterRFunction.SetRCommand("tab_footnote") + clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) + clsBaseOperator.AddParameter("theme_footer", clsRFunctionParameter:=clsTitleFooterRFunction) clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, @@ -131,6 +134,7 @@ Public Class dlgGeneralTable ucrReceiverMultipleCols.SetRCode(clsBaseOperator, bReset) ucrSaveTable.SetRCode(clsBaseOperator, bReset) ucrInputTitle.SetRCode(clsHeaderRFunction, True, bCloneIfNeeded:=True) + ucrInputTitleFooter.SetRCode(clsTitleFooterRFunction, True, bCloneIfNeeded:=True) ucrChkPreview.SetRCode(clsBaseOperator, bReset) ucrNudPreview.SetRCode(clsHeadRFunction, bReset) End Sub @@ -168,7 +172,6 @@ Public Class dlgGeneralTable ucrCboSelectThemes.Visible = False clsThemeRFunction.ClearParameters() End If - 'Header() End Sub Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged @@ -209,12 +212,4 @@ Public Class dlgGeneralTable End If End Sub - 'Private Sub Header() - ' If Not ucrInputTitle.IsEmpty Then - ' clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText) - ' Else - ' clsHeaderRFunction.RemoveParameterByName("title") - ' End If - 'End Sub - End Class \ No newline at end of file From b09122fa7e5be71a96ed8705e058be5b87f89e9e Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:32:59 +0100 Subject: [PATCH 05/13] Design Changes --- instat/UserTables/dlgGeneralTable.Designer.vb | 1 + instat/UserTables/dlgGeneralTable.vb | 23 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.Designer.vb b/instat/UserTables/dlgGeneralTable.Designer.vb index b4eee8c5bb..d281094b26 100644 --- a/instat/UserTables/dlgGeneralTable.Designer.vb +++ b/instat/UserTables/dlgGeneralTable.Designer.vb @@ -186,6 +186,7 @@ Partial Class dlgGeneralTable ' 'btnTitleStyle ' + Me.btnTitleStyle.Enabled = False Me.btnTitleStyle.Location = New System.Drawing.Point(374, 42) Me.btnTitleStyle.Name = "btnTitleStyle" Me.btnTitleStyle.Size = New System.Drawing.Size(79, 23) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 2dc8ea8c0d..16db3b1659 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -120,12 +120,6 @@ Public Class dlgGeneralTable strRDataFrameNameToAddObjectTo:=ucrSelectorCols.strCurrentDataFrame, strObjectName:="last_table") - 'clsOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", - ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, - ' strRObjectFormatToAssignTo:=RObjectFormat.Html, - ' strRDataFrameNameToAddObjectTo:=ucrSelectorCols.strCurrentDataFrame, - ' strObjectName:="last_table") - ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub @@ -139,15 +133,6 @@ Public Class dlgGeneralTable ucrNudPreview.SetRCode(clsHeadRFunction, bReset) End Sub - Private Sub SetupTheme() '(clsOperator As ROperator) - If clsBaseOperator.ContainsParameter("theme_format") Then - clsThemeRFunction = clsBaseOperator.GetParameter("theme_format").clsArgumentCodeStructure - Else - clsThemeRFunction = New RFunction - clsThemeRFunction.SetPackageName("gtExtras") - End If - End Sub - Private Sub TestOKEnabled() ucrBase.OKEnabled(Not ucrReceiverMultipleCols.IsEmpty AndAlso ucrSaveTable.IsComplete) End Sub @@ -203,13 +188,5 @@ Public Class dlgGeneralTable clsThemeRFunction.SetRCommand(strCommand) End Sub - Private Sub SetThemeValuesOnReturn() '(clsOperator As ROperator) - ' Set the themes parameter if there was a theme selected - If clsThemeRFunction IsNot Nothing AndAlso Not String.IsNullOrEmpty(clsThemeRFunction.strRCommand) Then - clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) - Else - clsBaseOperator.RemoveParameterByName("theme_format") - End If - End Sub End Class \ No newline at end of file From fa4571615ebd73f958b4ffe3611410d5ed4848b2 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:28:31 +0100 Subject: [PATCH 06/13] Fixed Item b --- instat/UserTables/dlgGeneralTable.vb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 16db3b1659..e45f8a2d3a 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -2,7 +2,7 @@ Public Class dlgGeneralTable Private clsBaseOperator As New ROperator - Private clsHeadRFunction, clsHeaderRFunction, clsTitleFooterRFunction, clsGtRFunction, clsThemeRFunction As New RFunction + Private clsHeadRFunction, clsHeaderRFunction, clsCellsTitleRFunction, clsTitleFooterRFunction, clsGtRFunction, clsThemeRFunction As New RFunction Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -64,7 +64,8 @@ Public Class dlgGeneralTable ucrSaveTable.SetCheckBoxText("Store Table") ucrSaveTable.SetAssignToIfUncheckedValue("last_table") - ucrChkSelectTheme.Checked = True + ucrChkSelectTheme.Checked = False + ucrCboSelectThemes.Visible = False ucrChkSelectTheme.SetText("Select Theme") ucrCboSelectThemes.SetItems({"None", "Dark Theme", "538 Theme", "Dot Matrix Theme", "Espn Theme", "Excel Theme", "Guardian Theme", "NY Times Theme", "PFF Theme"}) ucrCboSelectThemes.SetDropDownStyleAsNonEditable() @@ -79,6 +80,7 @@ Public Class dlgGeneralTable clsHeadRFunction = New RFunction clsGtRFunction = New RFunction clsHeaderRFunction = New RFunction + clsCellsTitleRFunction = New RFunction clsTitleFooterRFunction = New RFunction ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() @@ -112,8 +114,14 @@ Public Class dlgGeneralTable clsTitleFooterRFunction.SetPackageName("gt") clsTitleFooterRFunction.SetRCommand("tab_footnote") clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) + clsTitleFooterRFunction.AddParameter("locations", clsRFunctionParameter:=clsCellsTitleRFunction, iPosition:=2) clsBaseOperator.AddParameter("theme_footer", clsRFunctionParameter:=clsTitleFooterRFunction) + Dim strGroupParamValue As String = "title" + clsCellsTitleRFunction.SetPackageName("gt") + clsCellsTitleRFunction.SetRCommand("cells_title") + clsCellsTitleRFunction.AddParameter(strParameterName:="groups", strParameterValue:=Chr(34) & strGroupParamValue & Chr(34), iPosition:=0) + clsBaseOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, @@ -145,6 +153,10 @@ Public Class dlgGeneralTable End If End Sub + Private Sub ucrInputControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputTitle.ControlContentsChanged, ucrInputTitleFooter.ControlContentsChanged + ucrInputTitleFooter.Enabled = Not ucrInputTitle.IsEmpty() + End Sub + Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged If ucrChkSelectTheme.Checked Then ucrCboSelectThemes.Visible = True From 3464c2fa93c3b430b9039a28f110babe897652de Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 5 Feb 2025 12:13:54 +0100 Subject: [PATCH 07/13] Enabled Item a --- instat/UserTables/dlgGeneralTable.Designer.vb | 1 - instat/UserTables/dlgGeneralTable.vb | 23 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.Designer.vb b/instat/UserTables/dlgGeneralTable.Designer.vb index d281094b26..b4eee8c5bb 100644 --- a/instat/UserTables/dlgGeneralTable.Designer.vb +++ b/instat/UserTables/dlgGeneralTable.Designer.vb @@ -186,7 +186,6 @@ Partial Class dlgGeneralTable ' 'btnTitleStyle ' - Me.btnTitleStyle.Enabled = False Me.btnTitleStyle.Location = New System.Drawing.Point(374, 42) Me.btnTitleStyle.Name = "btnTitleStyle" Me.btnTitleStyle.Size = New System.Drawing.Size(79, 23) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index e45f8a2d3a..4256a29201 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -2,7 +2,7 @@ Public Class dlgGeneralTable Private clsBaseOperator As New ROperator - Private clsHeadRFunction, clsHeaderRFunction, clsCellsTitleRFunction, clsTitleFooterRFunction, clsGtRFunction, clsThemeRFunction As New RFunction + Private clsHeadRFunction, clsHeaderRFunction, clsCellsTitleRFunction, clsTitleStyleRFunction, clsTitleFooterRFunction, clsGtRFunction, clsThemeRFunction As New RFunction Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -64,8 +64,7 @@ Public Class dlgGeneralTable ucrSaveTable.SetCheckBoxText("Store Table") ucrSaveTable.SetAssignToIfUncheckedValue("last_table") - ucrChkSelectTheme.Checked = False - ucrCboSelectThemes.Visible = False + ucrChkSelectTheme.Checked = True ucrChkSelectTheme.SetText("Select Theme") ucrCboSelectThemes.SetItems({"None", "Dark Theme", "538 Theme", "Dot Matrix Theme", "Espn Theme", "Excel Theme", "Guardian Theme", "NY Times Theme", "PFF Theme"}) ucrCboSelectThemes.SetDropDownStyleAsNonEditable() @@ -82,6 +81,7 @@ Public Class dlgGeneralTable clsHeaderRFunction = New RFunction clsCellsTitleRFunction = New RFunction clsTitleFooterRFunction = New RFunction + clsTitleStyleRFunction = New RFunction ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() ucrSaveTable.Reset() @@ -92,10 +92,9 @@ Public Class dlgGeneralTable clsHeadRFunction.SetPackageName("utils") clsHeadRFunction.SetRCommand("head") - clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=100, iPosition:=0, bIncludeArgumentName:=False) + clsHeadRFunction.AddParameter(strParameterName:="x", strParameterValue:=10, 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) @@ -105,7 +104,6 @@ Public Class dlgGeneralTable clsThemeRFunction.SetRCommand(strCommand) clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) - clsHeaderRFunction.SetPackageName("gt") clsHeaderRFunction.SetRCommand("tab_header") clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) @@ -153,6 +151,18 @@ Public Class dlgGeneralTable End If End Sub + Private Sub btnTitleFormat_Click(sender As Object, e As EventArgs) Handles btnTitleStyle.Click + Dim clsListStyleRFunction As RFunction = clsTablesUtils.ShowStyleSubDialog(Me.ParentForm, clsTitleStyleRFunction) + If clsListStyleRFunction Is Nothing Then + Exit Sub + End If + + clsTitleStyleRFunction = clsTablesUtils.GetNewStyleRFunction(clsListStyleRFunction, clsCellsTitleRFunction) + If clsTitleStyleRFunction IsNot Nothing Then + clsBaseOperator.AddParameter(strParameterName:="tab_style_for_title_param", clsRFunctionParameter:=clsTitleStyleRFunction) + End If + End Sub + Private Sub ucrInputControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputTitle.ControlContentsChanged, ucrInputTitleFooter.ControlContentsChanged ucrInputTitleFooter.Enabled = Not ucrInputTitle.IsEmpty() End Sub @@ -160,6 +170,7 @@ Public Class dlgGeneralTable Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged If ucrChkSelectTheme.Checked Then ucrCboSelectThemes.Visible = True + clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) 'clsThemeRFunction.SetPackageName("gtExtras") 'clsThemeRFunction.ClearParameters() From e611edf9fb5ace27cbbc8b942cee4a87eb03fb16 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:34:48 +0300 Subject: [PATCH 08/13] more changes --- instat/UserTables/dlgGeneralTable.Designer.vb | 6 +-- instat/UserTables/dlgGeneralTable.vb | 42 +++++++++++++------ instat/UserTables/sdgTableOptions.vb | 7 ++++ 3 files changed, 40 insertions(+), 15 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.Designer.vb b/instat/UserTables/dlgGeneralTable.Designer.vb index b4eee8c5bb..6d262a17ce 100644 --- a/instat/UserTables/dlgGeneralTable.Designer.vb +++ b/instat/UserTables/dlgGeneralTable.Designer.vb @@ -64,7 +64,7 @@ Partial Class dlgGeneralTable ' Me.ucrChkSelectTheme.AutoSize = True Me.ucrChkSelectTheme.Checked = False - Me.ucrChkSelectTheme.Location = New System.Drawing.Point(9, 233) + Me.ucrChkSelectTheme.Location = New System.Drawing.Point(9, 361) Me.ucrChkSelectTheme.Name = "ucrChkSelectTheme" Me.ucrChkSelectTheme.Size = New System.Drawing.Size(182, 23) Me.ucrChkSelectTheme.TabIndex = 33 @@ -75,7 +75,7 @@ Partial Class dlgGeneralTable Me.ucrCboSelectThemes.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrCboSelectThemes.GetSetSelectedIndex = -1 Me.ucrCboSelectThemes.IsReadOnly = False - Me.ucrCboSelectThemes.Location = New System.Drawing.Point(214, 233) + Me.ucrCboSelectThemes.Location = New System.Drawing.Point(214, 361) Me.ucrCboSelectThemes.Margin = New System.Windows.Forms.Padding(9) Me.ucrCboSelectThemes.Name = "ucrCboSelectThemes" Me.ucrCboSelectThemes.Size = New System.Drawing.Size(168, 21) @@ -155,7 +155,7 @@ Partial Class dlgGeneralTable Me.grpBoxTitle.Controls.Add(Me.btnTitleStyle) Me.grpBoxTitle.Controls.Add(Me.lblHeaderTitle) Me.grpBoxTitle.Controls.Add(Me.ucrInputTitleFooter) - Me.grpBoxTitle.Location = New System.Drawing.Point(7, 265) + Me.grpBoxTitle.Location = New System.Drawing.Point(7, 233) Me.grpBoxTitle.Name = "grpBoxTitle" Me.grpBoxTitle.Size = New System.Drawing.Size(463, 115) Me.grpBoxTitle.TabIndex = 34 diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 4256a29201..963968b5ac 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -6,6 +6,7 @@ Public Class dlgGeneralTable Private bFirstload As Boolean = True Private bReset As Boolean = True + Private strCommand As String Private Sub dlgGeneralTable_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then @@ -24,6 +25,11 @@ Public Class dlgGeneralTable Private Sub btnMoreOptions_Click(sender As Object, e As EventArgs) Handles btnMoreOptions.Click sdgTableOptions.Setup(ucrSelectorCols.strCurrentDataFrame, clsBaseOperator) sdgTableOptions.ShowDialog(Me) + ucrInputTitle.SetText(sdgTableOptions.ucrHeader.ucrInputTitle.GetText) + ucrInputTitleFooter.SetText(sdgTableOptions.ucrHeader.ucrInputTitleFooter.GetText) + ucrCboSelectThemes.SetText(sdgTableOptions.ucrCboSelectThemes.GetText) + ucrChkSelectTheme.Checked = sdgTableOptions.ucrChkSelectTheme.Checked + sdgTableStyles.GetNewUserInputAsRFunction() End Sub Private Sub ucrControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleCols.ControlContentsChanged @@ -82,6 +88,7 @@ Public Class dlgGeneralTable clsCellsTitleRFunction = New RFunction clsTitleFooterRFunction = New RFunction clsTitleStyleRFunction = New RFunction + ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() ucrSaveTable.Reset() @@ -99,20 +106,23 @@ Public Class dlgGeneralTable clsGtRFunction.SetRCommand("gt") clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) - Dim strCommand As String = "" + ' Dim strCommand As String = "" clsThemeRFunction.SetPackageName("gtExtras") clsThemeRFunction.SetRCommand(strCommand) clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + clsHeaderRFunction.SetPackageName("gt") - clsHeaderRFunction.SetRCommand("tab_header") - clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) - clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) + clsHeaderRFunction.SetRCommand("tab_header") + clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) + clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) + + clsTitleFooterRFunction.SetPackageName("gt") - clsTitleFooterRFunction.SetRCommand("tab_footnote") - clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) - clsTitleFooterRFunction.AddParameter("locations", clsRFunctionParameter:=clsCellsTitleRFunction, iPosition:=2) + clsTitleFooterRFunction.SetRCommand("tab_footnote") + clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) + clsTitleFooterRFunction.AddParameter("locations", clsRFunctionParameter:=clsCellsTitleRFunction, iPosition:=2) clsBaseOperator.AddParameter("theme_footer", clsRFunctionParameter:=clsTitleFooterRFunction) Dim strGroupParamValue As String = "title" @@ -151,6 +161,8 @@ Public Class dlgGeneralTable End If End Sub + + Private Sub btnTitleFormat_Click(sender As Object, e As EventArgs) Handles btnTitleStyle.Click Dim clsListStyleRFunction As RFunction = clsTablesUtils.ShowStyleSubDialog(Me.ParentForm, clsTitleStyleRFunction) If clsListStyleRFunction Is Nothing Then @@ -165,6 +177,16 @@ Public Class dlgGeneralTable Private Sub ucrInputControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputTitle.ControlContentsChanged, ucrInputTitleFooter.ControlContentsChanged ucrInputTitleFooter.Enabled = Not ucrInputTitle.IsEmpty() + If Not ucrInputTitle.IsEmpty Then + clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) + Else + clsBaseOperator.RemoveParameterByName("theme_Header") + End If + If Not ucrInputTitleFooter.IsEmpty Then + clsBaseOperator.AddParameter("theme_footer", clsRFunctionParameter:=clsTitleFooterRFunction) + Else + clsBaseOperator.RemoveParameterByName("theme_footer") + End If End Sub Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged @@ -172,11 +194,9 @@ Public Class dlgGeneralTable ucrCboSelectThemes.Visible = True clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) - 'clsThemeRFunction.SetPackageName("gtExtras") - 'clsThemeRFunction.ClearParameters() + Else clsBaseOperator.RemoveParameterByName("theme_format") - ucrCboSelectThemes.Visible = False clsThemeRFunction.ClearParameters() End If @@ -187,8 +207,6 @@ Public Class dlgGeneralTable If clsThemeRFunction Is Nothing Then Exit Sub End If - - Dim strCommand As String = "" Select Case ucrCboSelectThemes.GetText Case "Dark Theme" strCommand = "gt_theme_dark" diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index c69c33ea87..be4c0bb1b5 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -26,6 +26,8 @@ Public Class sdgTableOptions If bFirstload Then InitialiseDialog() bFirstload = False + 'adding these because it's ignored on first load + ucrCboSelectThemes.SetText(dlgGeneralTable.ucrCboSelectThemes.GetText) End If autoTranslate(Me) End Sub @@ -58,6 +60,11 @@ Public Class sdgTableOptions ucrSourceNotes.Setup(clsOperator) ucrOtherStyles.Setup(clsOperator) + ucrHeader.ucrInputTitle.SetText(dlgGeneralTable.ucrInputTitle.GetText) + ucrHeader.ucrInputTitleFooter.SetText(dlgGeneralTable.ucrInputTitleFooter.GetText) + ucrCboSelectThemes.SetText(dlgGeneralTable.ucrCboSelectThemes.GetText) + ucrChkSelectTheme.Checked = dlgGeneralTable.ucrChkSelectTheme.Checked + sdgTableStyles.GetNewUserInputAsRFunction() SetupTheme(clsOperator) End Sub From ef88fea6357b1ad4cd078f49a5034eb32960f5a8 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Sat, 8 Feb 2025 00:03:03 +0300 Subject: [PATCH 09/13] table changes --- instat/UserTables/sdgTableOptions.vb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index be4c0bb1b5..bad8d967e1 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -35,7 +35,7 @@ Public Class sdgTableOptions Private Sub InitialiseDialog() ucrSdgBaseButtons.iHelpTopicID = 146 ucrChkSelectTheme.Checked = True - ucrChkManualTheme.Checked = False + 'ucrChkManualTheme.Checked = False ucrChkSelectTheme.SetText("Select Theme") ucrChkManualTheme.SetText("Manual Theme") @@ -93,23 +93,23 @@ Public Class sdgTableOptions End Sub Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged - ucrChkManualTheme.Checked = Not ucrChkSelectTheme.Checked If ucrChkSelectTheme.Checked Then btnManualTheme.Visible = False ucrCboSelectThemes.Visible = True - clsThemeRFunction.SetPackageName("gtExtras") - clsThemeRFunction.ClearParameters() + ucrChkManualTheme.Checked = Not ucrChkSelectTheme.Checked + ' clsThemeRFunction.SetPackageName("gtExtras") + ' clsThemeRFunction.ClearParameters() Else ucrCboSelectThemes.Visible = False End If End Sub Private Sub ucrChkManualTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkManualTheme.ControlValueChanged - ucrChkSelectTheme.Checked = Not ucrChkManualTheme.Checked If ucrChkManualTheme.Checked Then btnManualTheme.Visible = True + ucrChkSelectTheme.Checked = Not ucrChkManualTheme.Checked clsThemeRFunction.SetPackageName("gt") clsThemeRFunction.SetRCommand("tab_options") Else @@ -117,6 +117,11 @@ Public Class sdgTableOptions End If End Sub + Private Sub btnManualTheme_Click(sender As Object, e As EventArgs) Handles btnManualTheme.Click + sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) + sdgSummaryThemes.ShowDialog(Me) + End Sub + Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged If clsThemeRFunction Is Nothing Then @@ -146,11 +151,6 @@ Public Class sdgTableOptions clsThemeRFunction.SetRCommand(strCommand) End Sub - Private Sub btnManualTheme_Click(sender As Object, e As EventArgs) Handles btnManualTheme.Click - sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) - sdgSummaryThemes.ShowDialog(Me) - End Sub - Private Sub SetThemeValuesOnReturn(clsOperator As ROperator) ' Set the themes parameter if there was a theme selected If clsThemeRFunction IsNot Nothing AndAlso Not String.IsNullOrEmpty(clsThemeRFunction.strRCommand) Then From 6ad05f8b65579fcadacab73b12dfa00f46da8f10 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Sun, 9 Feb 2025 05:27:01 +0300 Subject: [PATCH 10/13] table style changes --- instat/UserTables/sdgTableStyles.vb | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/instat/UserTables/sdgTableStyles.vb b/instat/UserTables/sdgTableStyles.vb index d6c1c720bd..b7bfcb1154 100644 --- a/instat/UserTables/sdgTableStyles.vb +++ b/instat/UserTables/sdgTableStyles.vb @@ -87,15 +87,15 @@ Public Class sdgTableStyles '----------------- Dim dctFontWeight As New Dictionary(Of String, String) From { - {"Default", "NULL"}, - {"Normal", Chr(34) & "normal" & Chr(34)}, - {"Bold", Chr(34) & "bold" & Chr(34)}, - {"Lighter", Chr(34) & "lighter" & Chr(34)}, - {"Bolder", Chr(34) & "bold" & Chr(34)} - } + {"Default", "NULL"}, + {"Normal", Chr(34) & "normal" & Chr(34)}, + {"Bold", Chr(34) & "bold" & Chr(34)}, + {"Lighter", Chr(34) & "lighter" & Chr(34)}, + {"Bolder", Chr(34) & "bolder" & Chr(34)} +} ucrCboFontWeight.SetDropDownStyleAsNonEditable() - ucrCboFontWeight.SetParameter(New RParameter("weight", iNewPosition:=7)) + ucrCboFontWeight.SetParameter(New RParameter("font_weight", iNewPosition:=7)) ' Corrected parameter name ucrCboFontWeight.SetItems(dctFontWeight) ucrCboFontWeight.SetRDefault("NULL") '----------------- @@ -133,6 +133,7 @@ Public Class sdgTableStyles '----------------- '----------------- + ' Transform Dim dctTransform As New Dictionary(Of String, String) From { {"Default", "NULL"}, {"Uppercase", Chr(34) & "uppercase" & Chr(34)}, @@ -140,7 +141,7 @@ Public Class sdgTableStyles {"Capitalize", Chr(34) & "capitalize" & Chr(34)} } ucrCboTransform.SetDropDownStyleAsNonEditable() - ucrCboTransform.SetParameter(New RParameter("transform", iNewPosition:=9)) + ucrCboTransform.SetParameter(New RParameter("text_transform", iNewPosition:=9)) ' Corrected parameter name ucrCboTransform.SetItems(dctTransform) ucrCboTransform.SetRDefault("NULL") '----------------- @@ -169,18 +170,18 @@ Public Class sdgTableStyles ucrNudIndent.SetRDefault(0) '----------------- - '----------------- + ' White Space Dim dctWhiteSpace As New Dictionary(Of String, String) From { {"Default", "NULL"}, {"Normal", Chr(34) & "normal" & Chr(34)}, - {"No wrap", Chr(34) & "nowrap" & Chr(34)}, + {"No Wrap", Chr(34) & "nowrap" & Chr(34)}, ' Corrected key {"Pre", Chr(34) & "pre" & Chr(34)}, - {"Pre-wrap", Chr(34) & "pre-wrap" & Chr(34)}, - {"Pre-line", Chr(34) & "pre-line" & Chr(34)}, - {"Break-spaces", Chr(34) & "break-spaces" & Chr(34)} + {"Pre-Wrap", Chr(34) & "pre-wrap" & Chr(34)}, ' Corrected key + {"Pre-Line", Chr(34) & "pre-line" & Chr(34)}, ' Corrected key + {"Break Spaces", Chr(34) & "break-spaces" & Chr(34)} ' Corrected key } ucrCboWhiteSpace.SetDropDownStyleAsNonEditable() - ucrCboWhiteSpace.SetParameter(New RParameter("transform", iNewPosition:=11)) + ucrCboWhiteSpace.SetParameter(New RParameter("white_space", iNewPosition:=12)) ' Corrected parameter name and position ucrCboWhiteSpace.SetItems(dctWhiteSpace) ucrCboWhiteSpace.SetRDefault("NULL") '----------------- From 4a7804abfe2ebb703471244788f9f1ef27bd9ce0 Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Sun, 9 Feb 2025 06:50:29 +0300 Subject: [PATCH 11/13] more chanegs --- instat/UserTables/dlgGeneralTable.vb | 20 ++++++++++++++++---- instat/UserTables/sdgTableOptions.vb | 15 +++++++++------ instat/UserTables/sdgTableStyles.vb | 6 +++--- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 963968b5ac..4fc9839612 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -6,7 +6,7 @@ Public Class dlgGeneralTable Private bFirstload As Boolean = True Private bReset As Boolean = True - Private strCommand As String + ' Private strCommand As String Private Sub dlgGeneralTable_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then @@ -89,6 +89,7 @@ Public Class dlgGeneralTable clsTitleFooterRFunction = New RFunction clsTitleStyleRFunction = New RFunction + SetupTheme(clsBaseOperator) ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() ucrSaveTable.Reset() @@ -106,7 +107,7 @@ Public Class dlgGeneralTable clsGtRFunction.SetRCommand("gt") clsBaseOperator.AddParameter(strParameterName:="gt", clsRFunctionParameter:=clsGtRFunction, iPosition:=2, bIncludeArgumentName:=False) - ' Dim strCommand As String = "" + Dim strCommand As String = "" clsThemeRFunction.SetPackageName("gtExtras") clsThemeRFunction.SetRCommand(strCommand) clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) @@ -193,20 +194,31 @@ Public Class dlgGeneralTable If ucrChkSelectTheme.Checked Then ucrCboSelectThemes.Visible = True - clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + ' clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) Else - clsBaseOperator.RemoveParameterByName("theme_format") + ' ucrCboSelectThemes.clearparameters + ' clsBaseOperator.RemoveParameterByName("theme_format") ucrCboSelectThemes.Visible = False clsThemeRFunction.ClearParameters() End If End Sub + Private Sub SetupTheme(clsBaseOperator As ROperator) + If clsBaseOperator.ContainsParameter("theme_format") Then + clsThemeRFunction = clsBaseOperator.GetParameter("theme_format").clsArgumentCodeStructure + Else + clsThemeRFunction = New RFunction + clsThemeRFunction.SetPackageName("gtExtras") + End If + End Sub + Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged If clsThemeRFunction Is Nothing Then Exit Sub End If + Dim strCommand As String = "" Select Case ucrCboSelectThemes.GetText Case "Dark Theme" strCommand = "gt_theme_dark" diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index bad8d967e1..469a6d1fd2 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -19,7 +19,7 @@ Imports instat.Translations Public Class sdgTableOptions Private clsOperator As ROperator - Private clsThemeRFunction As RFunction + Private clsThemeRFunction, clsThemeRFunction2 As RFunction Private bFirstload As Boolean = True Private Sub sdgTableOptions_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -99,26 +99,29 @@ Public Class sdgTableOptions ucrCboSelectThemes.Visible = True ucrChkManualTheme.Checked = Not ucrChkSelectTheme.Checked ' clsThemeRFunction.SetPackageName("gtExtras") - ' clsThemeRFunction.ClearParameters() + ' clsThemeRFunction.ClearParameters() Else ucrCboSelectThemes.Visible = False End If End Sub Private Sub ucrChkManualTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkManualTheme.ControlValueChanged - + ' Dim clsThemeRFunction2 As New RFunction If ucrChkManualTheme.Checked Then btnManualTheme.Visible = True ucrChkSelectTheme.Checked = Not ucrChkManualTheme.Checked - clsThemeRFunction.SetPackageName("gt") - clsThemeRFunction.SetRCommand("tab_options") + 'clsThemeRFunction2.SetPackageName("gt") + clsThemeRFunction2.SetRCommand("tab_options") + Else + clsThemeRFunction.ClearParameters() + btnManualTheme.Visible = False End If End Sub Private Sub btnManualTheme_Click(sender As Object, e As EventArgs) Handles btnManualTheme.Click - sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) + sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction2) sdgSummaryThemes.ShowDialog(Me) End Sub diff --git a/instat/UserTables/sdgTableStyles.vb b/instat/UserTables/sdgTableStyles.vb index b7bfcb1154..787a166aa5 100644 --- a/instat/UserTables/sdgTableStyles.vb +++ b/instat/UserTables/sdgTableStyles.vb @@ -95,7 +95,7 @@ Public Class sdgTableStyles } ucrCboFontWeight.SetDropDownStyleAsNonEditable() - ucrCboFontWeight.SetParameter(New RParameter("font_weight", iNewPosition:=7)) ' Corrected parameter name + ucrCboFontWeight.SetParameter(New RParameter("weight", iNewPosition:=7)) ' Corrected parameter name ucrCboFontWeight.SetItems(dctFontWeight) ucrCboFontWeight.SetRDefault("NULL") '----------------- @@ -141,7 +141,7 @@ Public Class sdgTableStyles {"Capitalize", Chr(34) & "capitalize" & Chr(34)} } ucrCboTransform.SetDropDownStyleAsNonEditable() - ucrCboTransform.SetParameter(New RParameter("text_transform", iNewPosition:=9)) ' Corrected parameter name + ucrCboTransform.SetParameter(New RParameter("transform", iNewPosition:=9)) ' Corrected parameter name ucrCboTransform.SetItems(dctTransform) ucrCboTransform.SetRDefault("NULL") '----------------- @@ -181,7 +181,7 @@ Public Class sdgTableStyles {"Break Spaces", Chr(34) & "break-spaces" & Chr(34)} ' Corrected key } ucrCboWhiteSpace.SetDropDownStyleAsNonEditable() - ucrCboWhiteSpace.SetParameter(New RParameter("white_space", iNewPosition:=12)) ' Corrected parameter name and position + ucrCboWhiteSpace.SetParameter(New RParameter("whitespace", iNewPosition:=12)) ' Corrected parameter name and position ucrCboWhiteSpace.SetItems(dctWhiteSpace) ucrCboWhiteSpace.SetRDefault("NULL") '----------------- From c4beae198fe94c03d30e965ee8e10bc71acdb8fb Mon Sep 17 00:00:00 2001 From: Fidel365 <107605960+Fidel365@users.noreply.github.com> Date: Sun, 9 Feb 2025 21:08:23 +0300 Subject: [PATCH 12/13] manual theme --- instat/UserTables/dlgGeneralTable.vb | 31 +++++++++------------------- instat/UserTables/sdgTableOptions.vb | 21 +++++++++++++------ instat/sdgSummaryThemes.vb | 1 + 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index 4fc9839612..f8d468c341 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -6,7 +6,6 @@ Public Class dlgGeneralTable Private bFirstload As Boolean = True Private bReset As Boolean = True - ' Private strCommand As String Private Sub dlgGeneralTable_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then @@ -81,7 +80,7 @@ Public Class dlgGeneralTable Private Sub SetDefaults() clsBaseOperator = New ROperator - ' clsOperator = New ROperator + clsHeadRFunction = New RFunction clsGtRFunction = New RFunction clsHeaderRFunction = New RFunction @@ -89,7 +88,6 @@ Public Class dlgGeneralTable clsTitleFooterRFunction = New RFunction clsTitleStyleRFunction = New RFunction - SetupTheme(clsBaseOperator) ucrSelectorCols.Reset() ucrReceiverMultipleCols.SetMeAsReceiver() ucrSaveTable.Reset() @@ -114,16 +112,16 @@ Public Class dlgGeneralTable clsHeaderRFunction.SetPackageName("gt") - clsHeaderRFunction.SetRCommand("tab_header") - clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) - clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) + clsHeaderRFunction.SetRCommand("tab_header") + clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) + clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) clsTitleFooterRFunction.SetPackageName("gt") - clsTitleFooterRFunction.SetRCommand("tab_footnote") - clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) - clsTitleFooterRFunction.AddParameter("locations", clsRFunctionParameter:=clsCellsTitleRFunction, iPosition:=2) + clsTitleFooterRFunction.SetRCommand("tab_footnote") + clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) + clsTitleFooterRFunction.AddParameter("locations", clsRFunctionParameter:=clsCellsTitleRFunction, iPosition:=2) clsBaseOperator.AddParameter("theme_footer", clsRFunctionParameter:=clsTitleFooterRFunction) Dim strGroupParamValue As String = "title" @@ -194,25 +192,16 @@ Public Class dlgGeneralTable If ucrChkSelectTheme.Checked Then ucrCboSelectThemes.Visible = True - ' clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) + clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) Else - ' ucrCboSelectThemes.clearparameters - ' clsBaseOperator.RemoveParameterByName("theme_format") + + clsBaseOperator.RemoveParameterByName("theme_format") ucrCboSelectThemes.Visible = False clsThemeRFunction.ClearParameters() End If End Sub - Private Sub SetupTheme(clsBaseOperator As ROperator) - If clsBaseOperator.ContainsParameter("theme_format") Then - clsThemeRFunction = clsBaseOperator.GetParameter("theme_format").clsArgumentCodeStructure - Else - clsThemeRFunction = New RFunction - clsThemeRFunction.SetPackageName("gtExtras") - End If - End Sub - Private Sub ucrCboSelectThemes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSelectThemes.ControlValueChanged If clsThemeRFunction Is Nothing Then diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index 469a6d1fd2..0543a9c14d 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -19,7 +19,7 @@ Imports instat.Translations Public Class sdgTableOptions Private clsOperator As ROperator - Private clsThemeRFunction, clsThemeRFunction2 As RFunction + Private clsThemeRFunction As RFunction Private bFirstload As Boolean = True Private Sub sdgTableOptions_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -90,6 +90,11 @@ Public Class sdgTableOptions clsThemeRFunction = New RFunction clsThemeRFunction.SetPackageName("gtExtras") End If + If ucrChkManualTheme.Checked Then + sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) + Else + + End If End Sub Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged @@ -106,22 +111,21 @@ Public Class sdgTableOptions End Sub Private Sub ucrChkManualTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkManualTheme.ControlValueChanged - ' Dim clsThemeRFunction2 As New RFunction + If ucrChkManualTheme.Checked Then btnManualTheme.Visible = True ucrChkSelectTheme.Checked = Not ucrChkManualTheme.Checked - 'clsThemeRFunction2.SetPackageName("gt") - clsThemeRFunction2.SetRCommand("tab_options") Else - clsThemeRFunction.ClearParameters() btnManualTheme.Visible = False End If End Sub Private Sub btnManualTheme_Click(sender As Object, e As EventArgs) Handles btnManualTheme.Click - sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction2) + clsThemeRFunction.SetPackageName("gt") + clsThemeRFunction.SetRCommand("tab_options") + sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) sdgSummaryThemes.ShowDialog(Me) End Sub @@ -156,6 +160,11 @@ Public Class sdgTableOptions Private Sub SetThemeValuesOnReturn(clsOperator As ROperator) ' Set the themes parameter if there was a theme selected + If ucrChkManualTheme.Checked Then + sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) + Else + + End If If clsThemeRFunction IsNot Nothing AndAlso Not String.IsNullOrEmpty(clsThemeRFunction.strRCommand) Then clsOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) Else diff --git a/instat/sdgSummaryThemes.vb b/instat/sdgSummaryThemes.vb index 8b1f5ab8f0..2c4d1fc2e8 100644 --- a/instat/sdgSummaryThemes.vb +++ b/instat/sdgSummaryThemes.vb @@ -18,6 +18,7 @@ Imports instat.Translations Public Class sdgSummaryThemes Private clsThemesTabOptionsFunction As New RFunction + Private bRCodeSet As Boolean = False Private bControlsInitialised As Boolean = False From 19a6114f4af4df9b6739c67f0907fbb225023d1c Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 10 Feb 2025 10:26:02 +0100 Subject: [PATCH 13/13] Making final corrections --- instat/UserTables/dlgGeneralTable.vb | 11 ----------- instat/UserTables/sdgTableOptions.vb | 16 +++------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/instat/UserTables/dlgGeneralTable.vb b/instat/UserTables/dlgGeneralTable.vb index f8d468c341..cb8210bf1c 100644 --- a/instat/UserTables/dlgGeneralTable.vb +++ b/instat/UserTables/dlgGeneralTable.vb @@ -77,7 +77,6 @@ Public Class dlgGeneralTable ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False End Sub - Private Sub SetDefaults() clsBaseOperator = New ROperator @@ -110,14 +109,11 @@ Public Class dlgGeneralTable clsThemeRFunction.SetRCommand(strCommand) clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) - clsHeaderRFunction.SetPackageName("gt") clsHeaderRFunction.SetRCommand("tab_header") clsHeaderRFunction.AddParameter("title", ucrInputTitle.GetText, iPosition:=1) clsBaseOperator.AddParameter("theme_Header", clsRFunctionParameter:=clsHeaderRFunction) - - clsTitleFooterRFunction.SetPackageName("gt") clsTitleFooterRFunction.SetRCommand("tab_footnote") clsTitleFooterRFunction.AddParameter("footnote", ucrInputTitleFooter.GetText, iPosition:=1) @@ -138,7 +134,6 @@ Public Class dlgGeneralTable ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) End Sub - Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverMultipleCols.SetRCode(clsBaseOperator, bReset) ucrSaveTable.SetRCode(clsBaseOperator, bReset) @@ -160,8 +155,6 @@ Public Class dlgGeneralTable End If End Sub - - Private Sub btnTitleFormat_Click(sender As Object, e As EventArgs) Handles btnTitleStyle.Click Dim clsListStyleRFunction As RFunction = clsTablesUtils.ShowStyleSubDialog(Me.ParentForm, clsTitleStyleRFunction) If clsListStyleRFunction Is Nothing Then @@ -191,11 +184,8 @@ Public Class dlgGeneralTable Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged If ucrChkSelectTheme.Checked Then ucrCboSelectThemes.Visible = True - clsBaseOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction) - Else - clsBaseOperator.RemoveParameterByName("theme_format") ucrCboSelectThemes.Visible = False clsThemeRFunction.ClearParameters() @@ -230,5 +220,4 @@ Public Class dlgGeneralTable clsThemeRFunction.SetRCommand(strCommand) End Sub - End Class \ No newline at end of file diff --git a/instat/UserTables/sdgTableOptions.vb b/instat/UserTables/sdgTableOptions.vb index 0543a9c14d..f18bba956f 100644 --- a/instat/UserTables/sdgTableOptions.vb +++ b/instat/UserTables/sdgTableOptions.vb @@ -35,7 +35,6 @@ Public Class sdgTableOptions Private Sub InitialiseDialog() ucrSdgBaseButtons.iHelpTopicID = 146 ucrChkSelectTheme.Checked = True - 'ucrChkManualTheme.Checked = False ucrChkSelectTheme.SetText("Select Theme") ucrChkManualTheme.SetText("Manual Theme") @@ -92,19 +91,15 @@ Public Class sdgTableOptions End If If ucrChkManualTheme.Checked Then sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) - Else - End If End Sub Private Sub ucrChkSelectTheme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectTheme.ControlValueChanged - If ucrChkSelectTheme.Checked Then btnManualTheme.Visible = False ucrCboSelectThemes.Visible = True - ucrChkManualTheme.Checked = Not ucrChkSelectTheme.Checked - ' clsThemeRFunction.SetPackageName("gtExtras") - ' clsThemeRFunction.ClearParameters() + ElseIf ucrChkSelectTheme.Checked Then + ucrChkManualTheme.Checked = True Else ucrCboSelectThemes.Visible = False End If @@ -115,10 +110,7 @@ Public Class sdgTableOptions If ucrChkManualTheme.Checked Then btnManualTheme.Visible = True ucrChkSelectTheme.Checked = Not ucrChkManualTheme.Checked - - Else - - btnManualTheme.Visible = False + btnManualTheme.Visible = ucrChkManualTheme.Checked End If End Sub @@ -162,8 +154,6 @@ Public Class sdgTableOptions ' Set the themes parameter if there was a theme selected If ucrChkManualTheme.Checked Then sdgSummaryThemes.SetRCode(bReset:=True, clsNewThemesTabOption:=clsThemeRFunction) - Else - End If If clsThemeRFunction IsNot Nothing AndAlso Not String.IsNullOrEmpty(clsThemeRFunction.strRCommand) Then clsOperator.AddParameter("theme_format", clsRFunctionParameter:=clsThemeRFunction)