From 06a1c4e0cf15e8a26c2ee472210156e1816959fd Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Mon, 4 Jul 2016 13:22:31 +0300 Subject: [PATCH 1/9] Adding initial ggplot themes --- instat/sdgPlots.Designer.vb | 86 ++++++++++++++++++++++++------------- instat/sdgPlots.vb | 14 +++++- 2 files changed, 69 insertions(+), 31 deletions(-) diff --git a/instat/sdgPlots.Designer.vb b/instat/sdgPlots.Designer.vb index 521f0d41f0d..7d1e00e7c08 100644 --- a/instat/sdgPlots.Designer.vb +++ b/instat/sdgPlots.Designer.vb @@ -43,9 +43,6 @@ Partial Class sdgPlots Me.rdoVertical = New System.Windows.Forms.RadioButton() Me.lblFactor2 = New System.Windows.Forms.Label() Me.lblFactor1 = New System.Windows.Forms.Label() - Me.ucr2ndFactorReceiver = New instat.ucrReceiverSingle() - Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() - Me.ucrAddRemove = New instat.ucrSelectorAddRemove() Me.tabLayers = New System.Windows.Forms.TabPage() Me.chkConnect = New System.Windows.Forms.CheckBox() Me.chkDotPlot = New System.Windows.Forms.CheckBox() @@ -87,8 +84,14 @@ Partial Class sdgPlots Me.txtYLowerLimit = New System.Windows.Forms.TextBox() Me.chkYUpperLimit = New System.Windows.Forms.CheckBox() Me.chkYLowerLimit = New System.Windows.Forms.CheckBox() + Me.lblTheme = New System.Windows.Forms.Label() Me.ucrBaseSubdialog = New instat.ucrButtonsSubdialogue() + Me.ucrInputThemes = New instat.ucrInputComboBox() + Me.ucr2ndFactorReceiver = New instat.ucrReceiverSingle() + Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() + Me.ucrAddRemove = New instat.ucrSelectorAddRemove() Me.tabctrlBoxSubdialog.SuspendLayout() + Me.tabTheme.SuspendLayout() Me.tabLegend.SuspendLayout() Me.grpLabels.SuspendLayout() Me.grpTitle.SuspendLayout() @@ -123,6 +126,8 @@ Partial Class sdgPlots ' 'tabTheme ' + Me.tabTheme.Controls.Add(Me.ucrInputThemes) + Me.tabTheme.Controls.Add(Me.lblTheme) Me.tabTheme.Location = New System.Drawing.Point(4, 22) Me.tabTheme.Name = "tabTheme" Me.tabTheme.Padding = New System.Windows.Forms.Padding(3) @@ -342,33 +347,6 @@ Partial Class sdgPlots Me.lblFactor1.Tag = "" Me.lblFactor1.Text = "1st Factor" ' - 'ucr2ndFactorReceiver - ' - Me.ucr2ndFactorReceiver.Location = New System.Drawing.Point(252, 114) - Me.ucr2ndFactorReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucr2ndFactorReceiver.Name = "ucr2ndFactorReceiver" - Me.ucr2ndFactorReceiver.Selector = Nothing - Me.ucr2ndFactorReceiver.Size = New System.Drawing.Size(106, 26) - Me.ucr2ndFactorReceiver.TabIndex = 2 - ' - 'ucr1stFactorReceiver - ' - Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(252, 40) - Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" - Me.ucr1stFactorReceiver.Selector = Nothing - Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(106, 26) - Me.ucr1stFactorReceiver.TabIndex = 1 - ' - 'ucrAddRemove - ' - Me.ucrAddRemove.bShowHiddenColumns = False - Me.ucrAddRemove.Location = New System.Drawing.Point(10, 24) - Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) - Me.ucrAddRemove.Name = "ucrAddRemove" - Me.ucrAddRemove.Size = New System.Drawing.Size(228, 127) - Me.ucrAddRemove.TabIndex = 0 - ' 'tabLayers ' Me.tabLayers.Controls.Add(Me.chkConnect) @@ -780,6 +758,15 @@ Partial Class sdgPlots Me.chkYLowerLimit.Text = "Lower Limit" Me.chkYLowerLimit.UseVisualStyleBackColor = True ' + 'lblTheme + ' + Me.lblTheme.AutoSize = True + Me.lblTheme.Location = New System.Drawing.Point(4, 17) + Me.lblTheme.Name = "lblTheme" + Me.lblTheme.Size = New System.Drawing.Size(73, 13) + Me.lblTheme.TabIndex = 0 + Me.lblTheme.Text = "Select Theme" + ' 'ucrBaseSubdialog ' Me.ucrBaseSubdialog.Location = New System.Drawing.Point(113, 284) @@ -787,6 +774,41 @@ Partial Class sdgPlots Me.ucrBaseSubdialog.Size = New System.Drawing.Size(160, 41) Me.ucrBaseSubdialog.TabIndex = 1 ' + 'ucrInputThemes + ' + Me.ucrInputThemes.IsReadOnly = False + Me.ucrInputThemes.Location = New System.Drawing.Point(108, 17) + Me.ucrInputThemes.Name = "ucrInputThemes" + Me.ucrInputThemes.Size = New System.Drawing.Size(171, 21) + Me.ucrInputThemes.TabIndex = 1 + ' + 'ucr2ndFactorReceiver + ' + Me.ucr2ndFactorReceiver.Location = New System.Drawing.Point(252, 114) + Me.ucr2ndFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr2ndFactorReceiver.Name = "ucr2ndFactorReceiver" + Me.ucr2ndFactorReceiver.Selector = Nothing + Me.ucr2ndFactorReceiver.Size = New System.Drawing.Size(106, 26) + Me.ucr2ndFactorReceiver.TabIndex = 2 + ' + 'ucr1stFactorReceiver + ' + Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(252, 40) + Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" + Me.ucr1stFactorReceiver.Selector = Nothing + Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(106, 26) + Me.ucr1stFactorReceiver.TabIndex = 1 + ' + 'ucrAddRemove + ' + Me.ucrAddRemove.bShowHiddenColumns = False + Me.ucrAddRemove.Location = New System.Drawing.Point(10, 24) + Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) + Me.ucrAddRemove.Name = "ucrAddRemove" + Me.ucrAddRemove.Size = New System.Drawing.Size(228, 127) + Me.ucrAddRemove.TabIndex = 0 + ' 'sdgPlots ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -801,6 +823,8 @@ Partial Class sdgPlots Me.Text = "Plot Options" Me.TopMost = True Me.tabctrlBoxSubdialog.ResumeLayout(False) + Me.tabTheme.ResumeLayout(False) + Me.tabTheme.PerformLayout() Me.tabLegend.ResumeLayout(False) Me.tabLegend.PerformLayout() Me.grpLabels.ResumeLayout(False) @@ -900,6 +924,8 @@ Partial Class sdgPlots Friend WithEvents chkYLowerLimit As CheckBox Friend WithEvents nudNoOfRowsOrColumns As NumericUpDown Friend WithEvents chkNoOfRowsOrColumns As CheckBox + Friend WithEvents ucrInputThemes As ucrInputComboBox + Friend WithEvents lblTheme As Label End Class diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index 5345a4e58f1..f41815d50b5 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -19,6 +19,7 @@ Public Class sdgPlots Public clsRFacetFunction As New RFunction Public clsXLabFunction As New RFunction Public clsYLabFunction As New RFunction + Public clsRThemeFunction As New RFunction Public bFirstLoad As Boolean = True Private Sub sdgPlots_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -42,6 +43,8 @@ Public Class sdgPlots ucr1stFactorReceiver.SetIncludedDataTypes({"factor"}) ucr2ndFactorReceiver.Selector = ucrAddRemove ucr2ndFactorReceiver.SetIncludedDataTypes({"factor"}) + + ucrInputThemes.cboInput.Items.AddRange({"theme_bw", "theme_linedraw", "theme_light", "theme_minimal", "theme_classic", "theme_dark", "theme_void"}) End Sub Private Sub IncludeFacets() @@ -264,5 +267,14 @@ Public Class sdgPlots clsYLabFunction.AddParameter("label", Chr(34) & txtYTitle.Text & Chr(34)) End Sub - + Private Sub ucrInputThemes_NameChanged() Handles ucrInputThemes.TextChanged + If Not ucrInputThemes.IsEmpty Then + clsRThemeFunction.SetRCommand(ucrInputThemes.cboInput.SelectedItem) + clsRsyntax.AddOperatorParameter("theme", clsRFunc:=clsRThemeFunction) + clsRThemeFunction.AddParameter("base_size", 12) + clsRThemeFunction.AddParameter("base_family", Chr(34) & Chr(34)) + Else + clsRsyntax.RemoveOperatorParameter("theme") + End If + End Sub End Class From e0f1095160ab517c3b73d6ad5a216bbdb4307142 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Mon, 4 Jul 2016 14:54:05 +0300 Subject: [PATCH 2/9] ading create new tem and overide theme --- instat/sdgPlots.Designer.vb | 134 +++++++++++++++++++++++++----------- instat/sdgPlots.vb | 15 ++++ 2 files changed, 108 insertions(+), 41 deletions(-) diff --git a/instat/sdgPlots.Designer.vb b/instat/sdgPlots.Designer.vb index 7d1e00e7c08..63baa8c42d7 100644 --- a/instat/sdgPlots.Designer.vb +++ b/instat/sdgPlots.Designer.vb @@ -24,6 +24,8 @@ Partial Class sdgPlots Private Sub InitializeComponent() Me.tabctrlBoxSubdialog = New System.Windows.Forms.TabControl() Me.tabTheme = New System.Windows.Forms.TabPage() + Me.ucrInputThemes = New instat.ucrInputComboBox() + Me.lblTheme = New System.Windows.Forms.Label() Me.tabLegend = New System.Windows.Forms.TabPage() Me.grpLabels = New System.Windows.Forms.GroupBox() Me.chkReorderLabels = New System.Windows.Forms.CheckBox() @@ -43,6 +45,9 @@ Partial Class sdgPlots Me.rdoVertical = New System.Windows.Forms.RadioButton() Me.lblFactor2 = New System.Windows.Forms.Label() Me.lblFactor1 = New System.Windows.Forms.Label() + Me.ucr2ndFactorReceiver = New instat.ucrReceiverSingle() + Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() + Me.ucrAddRemove = New instat.ucrSelectorAddRemove() Me.tabLayers = New System.Windows.Forms.TabPage() Me.chkConnect = New System.Windows.Forms.CheckBox() Me.chkDotPlot = New System.Windows.Forms.CheckBox() @@ -84,12 +89,11 @@ Partial Class sdgPlots Me.txtYLowerLimit = New System.Windows.Forms.TextBox() Me.chkYUpperLimit = New System.Windows.Forms.CheckBox() Me.chkYLowerLimit = New System.Windows.Forms.CheckBox() - Me.lblTheme = New System.Windows.Forms.Label() Me.ucrBaseSubdialog = New instat.ucrButtonsSubdialogue() - Me.ucrInputThemes = New instat.ucrInputComboBox() - Me.ucr2ndFactorReceiver = New instat.ucrReceiverSingle() - Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() - Me.ucrAddRemove = New instat.ucrSelectorAddRemove() + Me.cmdCreateTheme = New System.Windows.Forms.Button() + Me.chkOverideTheme = New System.Windows.Forms.CheckBox() + Me.lbFont = New System.Windows.Forms.Label() + Me.nudFont = New System.Windows.Forms.NumericUpDown() Me.tabctrlBoxSubdialog.SuspendLayout() Me.tabTheme.SuspendLayout() Me.tabLegend.SuspendLayout() @@ -108,6 +112,7 @@ Partial Class sdgPlots Me.grpYTitle.SuspendLayout() Me.grpYTich.SuspendLayout() Me.grpYScale.SuspendLayout() + CType(Me.nudFont, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'tabctrlBoxSubdialog @@ -126,6 +131,10 @@ Partial Class sdgPlots ' 'tabTheme ' + Me.tabTheme.Controls.Add(Me.nudFont) + Me.tabTheme.Controls.Add(Me.lbFont) + Me.tabTheme.Controls.Add(Me.chkOverideTheme) + Me.tabTheme.Controls.Add(Me.cmdCreateTheme) Me.tabTheme.Controls.Add(Me.ucrInputThemes) Me.tabTheme.Controls.Add(Me.lblTheme) Me.tabTheme.Location = New System.Drawing.Point(4, 22) @@ -137,6 +146,23 @@ Partial Class sdgPlots Me.tabTheme.Text = "Theme" Me.tabTheme.UseVisualStyleBackColor = True ' + 'ucrInputThemes + ' + Me.ucrInputThemes.IsReadOnly = False + Me.ucrInputThemes.Location = New System.Drawing.Point(75, 17) + Me.ucrInputThemes.Name = "ucrInputThemes" + Me.ucrInputThemes.Size = New System.Drawing.Size(171, 21) + Me.ucrInputThemes.TabIndex = 1 + ' + 'lblTheme + ' + Me.lblTheme.AutoSize = True + Me.lblTheme.Location = New System.Drawing.Point(-1, 17) + Me.lblTheme.Name = "lblTheme" + Me.lblTheme.Size = New System.Drawing.Size(73, 13) + Me.lblTheme.TabIndex = 0 + Me.lblTheme.Text = "Select Theme" + ' 'tabLegend ' Me.tabLegend.Controls.Add(Me.grpLabels) @@ -347,6 +373,33 @@ Partial Class sdgPlots Me.lblFactor1.Tag = "" Me.lblFactor1.Text = "1st Factor" ' + 'ucr2ndFactorReceiver + ' + Me.ucr2ndFactorReceiver.Location = New System.Drawing.Point(252, 114) + Me.ucr2ndFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr2ndFactorReceiver.Name = "ucr2ndFactorReceiver" + Me.ucr2ndFactorReceiver.Selector = Nothing + Me.ucr2ndFactorReceiver.Size = New System.Drawing.Size(106, 26) + Me.ucr2ndFactorReceiver.TabIndex = 2 + ' + 'ucr1stFactorReceiver + ' + Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(252, 40) + Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" + Me.ucr1stFactorReceiver.Selector = Nothing + Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(106, 26) + Me.ucr1stFactorReceiver.TabIndex = 1 + ' + 'ucrAddRemove + ' + Me.ucrAddRemove.bShowHiddenColumns = False + Me.ucrAddRemove.Location = New System.Drawing.Point(10, 24) + Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) + Me.ucrAddRemove.Name = "ucrAddRemove" + Me.ucrAddRemove.Size = New System.Drawing.Size(228, 127) + Me.ucrAddRemove.TabIndex = 0 + ' 'tabLayers ' Me.tabLayers.Controls.Add(Me.chkConnect) @@ -758,15 +811,6 @@ Partial Class sdgPlots Me.chkYLowerLimit.Text = "Lower Limit" Me.chkYLowerLimit.UseVisualStyleBackColor = True ' - 'lblTheme - ' - Me.lblTheme.AutoSize = True - Me.lblTheme.Location = New System.Drawing.Point(4, 17) - Me.lblTheme.Name = "lblTheme" - Me.lblTheme.Size = New System.Drawing.Size(73, 13) - Me.lblTheme.TabIndex = 0 - Me.lblTheme.Text = "Select Theme" - ' 'ucrBaseSubdialog ' Me.ucrBaseSubdialog.Location = New System.Drawing.Point(113, 284) @@ -774,40 +818,43 @@ Partial Class sdgPlots Me.ucrBaseSubdialog.Size = New System.Drawing.Size(160, 41) Me.ucrBaseSubdialog.TabIndex = 1 ' - 'ucrInputThemes + 'cmdCreateTheme ' - Me.ucrInputThemes.IsReadOnly = False - Me.ucrInputThemes.Location = New System.Drawing.Point(108, 17) - Me.ucrInputThemes.Name = "ucrInputThemes" - Me.ucrInputThemes.Size = New System.Drawing.Size(171, 21) - Me.ucrInputThemes.TabIndex = 1 + Me.cmdCreateTheme.Location = New System.Drawing.Point(251, 16) + Me.cmdCreateTheme.Name = "cmdCreateTheme" + Me.cmdCreateTheme.Size = New System.Drawing.Size(110, 23) + Me.cmdCreateTheme.TabIndex = 2 + Me.cmdCreateTheme.Text = "Create New Theme" + Me.cmdCreateTheme.UseVisualStyleBackColor = True ' - 'ucr2ndFactorReceiver + 'chkOverideTheme ' - Me.ucr2ndFactorReceiver.Location = New System.Drawing.Point(252, 114) - Me.ucr2ndFactorReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucr2ndFactorReceiver.Name = "ucr2ndFactorReceiver" - Me.ucr2ndFactorReceiver.Selector = Nothing - Me.ucr2ndFactorReceiver.Size = New System.Drawing.Size(106, 26) - Me.ucr2ndFactorReceiver.TabIndex = 2 + Me.chkOverideTheme.AutoSize = True + Me.chkOverideTheme.Location = New System.Drawing.Point(7, 48) + Me.chkOverideTheme.Name = "chkOverideTheme" + Me.chkOverideTheme.Size = New System.Drawing.Size(136, 17) + Me.chkOverideTheme.TabIndex = 3 + Me.chkOverideTheme.Text = "Overide Theme Default" + Me.chkOverideTheme.UseVisualStyleBackColor = True ' - 'ucr1stFactorReceiver + 'lbFont ' - Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(252, 40) - Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" - Me.ucr1stFactorReceiver.Selector = Nothing - Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(106, 26) - Me.ucr1stFactorReceiver.TabIndex = 1 + Me.lbFont.AutoSize = True + Me.lbFont.Location = New System.Drawing.Point(8, 76) + Me.lbFont.Name = "lbFont" + Me.lbFont.Size = New System.Drawing.Size(51, 13) + Me.lbFont.TabIndex = 4 + Me.lbFont.Text = "Font Size" ' - 'ucrAddRemove + 'nudFont ' - Me.ucrAddRemove.bShowHiddenColumns = False - Me.ucrAddRemove.Location = New System.Drawing.Point(10, 24) - Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) - Me.ucrAddRemove.Name = "ucrAddRemove" - Me.ucrAddRemove.Size = New System.Drawing.Size(228, 127) - Me.ucrAddRemove.TabIndex = 0 + Me.nudFont.Location = New System.Drawing.Point(75, 72) + Me.nudFont.Maximum = New Decimal(New Integer() {45, 0, 0, 0}) + Me.nudFont.Minimum = New Decimal(New Integer() {12, 0, 0, 0}) + Me.nudFont.Name = "nudFont" + Me.nudFont.Size = New System.Drawing.Size(85, 20) + Me.nudFont.TabIndex = 5 + Me.nudFont.Value = New Decimal(New Integer() {12, 0, 0, 0}) ' 'sdgPlots ' @@ -854,6 +901,7 @@ Partial Class sdgPlots Me.grpYTich.PerformLayout() Me.grpYScale.ResumeLayout(False) Me.grpYScale.PerformLayout() + CType(Me.nudFont, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) End Sub @@ -926,6 +974,10 @@ Partial Class sdgPlots Friend WithEvents chkNoOfRowsOrColumns As CheckBox Friend WithEvents ucrInputThemes As ucrInputComboBox Friend WithEvents lblTheme As Label + Friend WithEvents cmdCreateTheme As Button + Friend WithEvents chkOverideTheme As CheckBox + Friend WithEvents nudFont As NumericUpDown + Friend WithEvents lbFont As Label End Class diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index f41815d50b5..c191363f79b 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -35,6 +35,11 @@ Public Class sdgPlots chkIncludeFacets.Checked = False IncludeFacets() ucr1stFactorReceiver.SetMeAsReceiver() + + cmdCreateTheme.Enabled = False + chkOverideTheme.Enabled = False + lblTheme.Visible = False + nudFont.Visible = False End Sub Private Sub InitialiseDialog() @@ -277,4 +282,14 @@ Public Class sdgPlots clsRsyntax.RemoveOperatorParameter("theme") End If End Sub + + Private Sub chkOverideTheme_CheckedChanged(sender As Object, e As EventArgs) Handles chkOverideTheme.CheckedChanged + If chkOverideTheme.Checked Then + lblTheme.Visible = True + nudFont.Visible = True + Else + lblTheme.Visible = False + nudFont.Visible = False + End If + End Sub End Class From 04f295ced682af918e5a5d9e3678a8a5565e164b Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Tue, 5 Jul 2016 10:11:16 +0300 Subject: [PATCH 3/9] Added more themes for the ggthemes package and library ggthemes on rsetup --- instat/sdgPlots.Designer.vb | 150 +++++++++++++------------- instat/sdgPlots.vb | 14 +-- instat/static/InstatObject/R/Rsetup.R | 1 + 3 files changed, 84 insertions(+), 81 deletions(-) diff --git a/instat/sdgPlots.Designer.vb b/instat/sdgPlots.Designer.vb index 63baa8c42d7..c0ee5533c95 100644 --- a/instat/sdgPlots.Designer.vb +++ b/instat/sdgPlots.Designer.vb @@ -24,7 +24,10 @@ Partial Class sdgPlots Private Sub InitializeComponent() Me.tabctrlBoxSubdialog = New System.Windows.Forms.TabControl() Me.tabTheme = New System.Windows.Forms.TabPage() - Me.ucrInputThemes = New instat.ucrInputComboBox() + Me.nudFont = New System.Windows.Forms.NumericUpDown() + Me.lblFont = New System.Windows.Forms.Label() + Me.chkOverideTheme = New System.Windows.Forms.CheckBox() + Me.cmdCreateTheme = New System.Windows.Forms.Button() Me.lblTheme = New System.Windows.Forms.Label() Me.tabLegend = New System.Windows.Forms.TabPage() Me.grpLabels = New System.Windows.Forms.GroupBox() @@ -45,9 +48,6 @@ Partial Class sdgPlots Me.rdoVertical = New System.Windows.Forms.RadioButton() Me.lblFactor2 = New System.Windows.Forms.Label() Me.lblFactor1 = New System.Windows.Forms.Label() - Me.ucr2ndFactorReceiver = New instat.ucrReceiverSingle() - Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() - Me.ucrAddRemove = New instat.ucrSelectorAddRemove() Me.tabLayers = New System.Windows.Forms.TabPage() Me.chkConnect = New System.Windows.Forms.CheckBox() Me.chkDotPlot = New System.Windows.Forms.CheckBox() @@ -90,12 +90,13 @@ Partial Class sdgPlots Me.chkYUpperLimit = New System.Windows.Forms.CheckBox() Me.chkYLowerLimit = New System.Windows.Forms.CheckBox() Me.ucrBaseSubdialog = New instat.ucrButtonsSubdialogue() - Me.cmdCreateTheme = New System.Windows.Forms.Button() - Me.chkOverideTheme = New System.Windows.Forms.CheckBox() - Me.lbFont = New System.Windows.Forms.Label() - Me.nudFont = New System.Windows.Forms.NumericUpDown() + Me.ucrInputThemes = New instat.ucrInputComboBox() + Me.ucr2ndFactorReceiver = New instat.ucrReceiverSingle() + Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() + Me.ucrAddRemove = New instat.ucrSelectorAddRemove() Me.tabctrlBoxSubdialog.SuspendLayout() Me.tabTheme.SuspendLayout() + CType(Me.nudFont, System.ComponentModel.ISupportInitialize).BeginInit() Me.tabLegend.SuspendLayout() Me.grpLabels.SuspendLayout() Me.grpTitle.SuspendLayout() @@ -112,7 +113,6 @@ Partial Class sdgPlots Me.grpYTitle.SuspendLayout() Me.grpYTich.SuspendLayout() Me.grpYScale.SuspendLayout() - CType(Me.nudFont, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'tabctrlBoxSubdialog @@ -132,7 +132,7 @@ Partial Class sdgPlots 'tabTheme ' Me.tabTheme.Controls.Add(Me.nudFont) - Me.tabTheme.Controls.Add(Me.lbFont) + Me.tabTheme.Controls.Add(Me.lblFont) Me.tabTheme.Controls.Add(Me.chkOverideTheme) Me.tabTheme.Controls.Add(Me.cmdCreateTheme) Me.tabTheme.Controls.Add(Me.ucrInputThemes) @@ -146,13 +146,43 @@ Partial Class sdgPlots Me.tabTheme.Text = "Theme" Me.tabTheme.UseVisualStyleBackColor = True ' - 'ucrInputThemes + 'nudFont ' - Me.ucrInputThemes.IsReadOnly = False - Me.ucrInputThemes.Location = New System.Drawing.Point(75, 17) - Me.ucrInputThemes.Name = "ucrInputThemes" - Me.ucrInputThemes.Size = New System.Drawing.Size(171, 21) - Me.ucrInputThemes.TabIndex = 1 + Me.nudFont.Location = New System.Drawing.Point(300, 45) + Me.nudFont.Maximum = New Decimal(New Integer() {45, 0, 0, 0}) + Me.nudFont.Minimum = New Decimal(New Integer() {12, 0, 0, 0}) + Me.nudFont.Name = "nudFont" + Me.nudFont.Size = New System.Drawing.Size(57, 20) + Me.nudFont.TabIndex = 5 + Me.nudFont.Value = New Decimal(New Integer() {12, 0, 0, 0}) + ' + 'lblFont + ' + Me.lblFont.AutoSize = True + Me.lblFont.Location = New System.Drawing.Point(233, 49) + Me.lblFont.Name = "lblFont" + Me.lblFont.Size = New System.Drawing.Size(51, 13) + Me.lblFont.TabIndex = 4 + Me.lblFont.Text = "Font Size" + ' + 'chkOverideTheme + ' + Me.chkOverideTheme.AutoSize = True + Me.chkOverideTheme.Location = New System.Drawing.Point(75, 45) + Me.chkOverideTheme.Name = "chkOverideTheme" + Me.chkOverideTheme.Size = New System.Drawing.Size(136, 17) + Me.chkOverideTheme.TabIndex = 3 + Me.chkOverideTheme.Text = "Overide Theme Default" + Me.chkOverideTheme.UseVisualStyleBackColor = True + ' + 'cmdCreateTheme + ' + Me.cmdCreateTheme.Location = New System.Drawing.Point(251, 16) + Me.cmdCreateTheme.Name = "cmdCreateTheme" + Me.cmdCreateTheme.Size = New System.Drawing.Size(110, 23) + Me.cmdCreateTheme.TabIndex = 2 + Me.cmdCreateTheme.Text = "Create New Theme" + Me.cmdCreateTheme.UseVisualStyleBackColor = True ' 'lblTheme ' @@ -373,33 +403,6 @@ Partial Class sdgPlots Me.lblFactor1.Tag = "" Me.lblFactor1.Text = "1st Factor" ' - 'ucr2ndFactorReceiver - ' - Me.ucr2ndFactorReceiver.Location = New System.Drawing.Point(252, 114) - Me.ucr2ndFactorReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucr2ndFactorReceiver.Name = "ucr2ndFactorReceiver" - Me.ucr2ndFactorReceiver.Selector = Nothing - Me.ucr2ndFactorReceiver.Size = New System.Drawing.Size(106, 26) - Me.ucr2ndFactorReceiver.TabIndex = 2 - ' - 'ucr1stFactorReceiver - ' - Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(252, 40) - Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" - Me.ucr1stFactorReceiver.Selector = Nothing - Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(106, 26) - Me.ucr1stFactorReceiver.TabIndex = 1 - ' - 'ucrAddRemove - ' - Me.ucrAddRemove.bShowHiddenColumns = False - Me.ucrAddRemove.Location = New System.Drawing.Point(10, 24) - Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) - Me.ucrAddRemove.Name = "ucrAddRemove" - Me.ucrAddRemove.Size = New System.Drawing.Size(228, 127) - Me.ucrAddRemove.TabIndex = 0 - ' 'tabLayers ' Me.tabLayers.Controls.Add(Me.chkConnect) @@ -818,43 +821,40 @@ Partial Class sdgPlots Me.ucrBaseSubdialog.Size = New System.Drawing.Size(160, 41) Me.ucrBaseSubdialog.TabIndex = 1 ' - 'cmdCreateTheme + 'ucrInputThemes ' - Me.cmdCreateTheme.Location = New System.Drawing.Point(251, 16) - Me.cmdCreateTheme.Name = "cmdCreateTheme" - Me.cmdCreateTheme.Size = New System.Drawing.Size(110, 23) - Me.cmdCreateTheme.TabIndex = 2 - Me.cmdCreateTheme.Text = "Create New Theme" - Me.cmdCreateTheme.UseVisualStyleBackColor = True + Me.ucrInputThemes.IsReadOnly = False + Me.ucrInputThemes.Location = New System.Drawing.Point(75, 17) + Me.ucrInputThemes.Name = "ucrInputThemes" + Me.ucrInputThemes.Size = New System.Drawing.Size(171, 21) + Me.ucrInputThemes.TabIndex = 1 ' - 'chkOverideTheme + 'ucr2ndFactorReceiver ' - Me.chkOverideTheme.AutoSize = True - Me.chkOverideTheme.Location = New System.Drawing.Point(7, 48) - Me.chkOverideTheme.Name = "chkOverideTheme" - Me.chkOverideTheme.Size = New System.Drawing.Size(136, 17) - Me.chkOverideTheme.TabIndex = 3 - Me.chkOverideTheme.Text = "Overide Theme Default" - Me.chkOverideTheme.UseVisualStyleBackColor = True + Me.ucr2ndFactorReceiver.Location = New System.Drawing.Point(252, 114) + Me.ucr2ndFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr2ndFactorReceiver.Name = "ucr2ndFactorReceiver" + Me.ucr2ndFactorReceiver.Selector = Nothing + Me.ucr2ndFactorReceiver.Size = New System.Drawing.Size(106, 26) + Me.ucr2ndFactorReceiver.TabIndex = 2 ' - 'lbFont + 'ucr1stFactorReceiver ' - Me.lbFont.AutoSize = True - Me.lbFont.Location = New System.Drawing.Point(8, 76) - Me.lbFont.Name = "lbFont" - Me.lbFont.Size = New System.Drawing.Size(51, 13) - Me.lbFont.TabIndex = 4 - Me.lbFont.Text = "Font Size" + Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(252, 40) + Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" + Me.ucr1stFactorReceiver.Selector = Nothing + Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(106, 26) + Me.ucr1stFactorReceiver.TabIndex = 1 ' - 'nudFont + 'ucrAddRemove ' - Me.nudFont.Location = New System.Drawing.Point(75, 72) - Me.nudFont.Maximum = New Decimal(New Integer() {45, 0, 0, 0}) - Me.nudFont.Minimum = New Decimal(New Integer() {12, 0, 0, 0}) - Me.nudFont.Name = "nudFont" - Me.nudFont.Size = New System.Drawing.Size(85, 20) - Me.nudFont.TabIndex = 5 - Me.nudFont.Value = New Decimal(New Integer() {12, 0, 0, 0}) + Me.ucrAddRemove.bShowHiddenColumns = False + Me.ucrAddRemove.Location = New System.Drawing.Point(10, 24) + Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) + Me.ucrAddRemove.Name = "ucrAddRemove" + Me.ucrAddRemove.Size = New System.Drawing.Size(228, 127) + Me.ucrAddRemove.TabIndex = 0 ' 'sdgPlots ' @@ -872,6 +872,7 @@ Partial Class sdgPlots Me.tabctrlBoxSubdialog.ResumeLayout(False) Me.tabTheme.ResumeLayout(False) Me.tabTheme.PerformLayout() + CType(Me.nudFont, System.ComponentModel.ISupportInitialize).EndInit() Me.tabLegend.ResumeLayout(False) Me.tabLegend.PerformLayout() Me.grpLabels.ResumeLayout(False) @@ -901,7 +902,6 @@ Partial Class sdgPlots Me.grpYTich.PerformLayout() Me.grpYScale.ResumeLayout(False) Me.grpYScale.PerformLayout() - CType(Me.nudFont, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) End Sub @@ -977,7 +977,7 @@ Partial Class sdgPlots Friend WithEvents cmdCreateTheme As Button Friend WithEvents chkOverideTheme As CheckBox Friend WithEvents nudFont As NumericUpDown - Friend WithEvents lbFont As Label + Friend WithEvents lblFont As Label End Class diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index c191363f79b..2cc7d076dbf 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -35,11 +35,7 @@ Public Class sdgPlots chkIncludeFacets.Checked = False IncludeFacets() ucr1stFactorReceiver.SetMeAsReceiver() - - cmdCreateTheme.Enabled = False - chkOverideTheme.Enabled = False - lblTheme.Visible = False - nudFont.Visible = False + ThemesControls() End Sub Private Sub InitialiseDialog() @@ -49,7 +45,7 @@ Public Class sdgPlots ucr2ndFactorReceiver.Selector = ucrAddRemove ucr2ndFactorReceiver.SetIncludedDataTypes({"factor"}) - ucrInputThemes.cboInput.Items.AddRange({"theme_bw", "theme_linedraw", "theme_light", "theme_minimal", "theme_classic", "theme_dark", "theme_void"}) + ucrInputThemes.cboInput.Items.AddRange({"theme_bw", "theme_linedraw", "theme_light", "theme_minimal", "theme_classic", "theme_dark", "theme_void", "theme_base", "theme_calc", "theme_economist", "theme_few", "theme_fivethirtyeight", "theme_foundation", "theme_gdocs", "theme_igray", "theme_map", "theme_par", "theme_solarized"}) End Sub Private Sub IncludeFacets() @@ -292,4 +288,10 @@ Public Class sdgPlots nudFont.Visible = False End If End Sub + Private Sub ThemesControls() + cmdCreateTheme.Enabled = False + chkOverideTheme.Enabled = False + nudFont.Visible = False + lblFont.Visible = False + End Sub End Class diff --git a/instat/static/InstatObject/R/Rsetup.R b/instat/static/InstatObject/R/Rsetup.R index b7c0d9581a8..1a3d9af5eed 100644 --- a/instat/static/InstatObject/R/Rsetup.R +++ b/instat/static/InstatObject/R/Rsetup.R @@ -37,6 +37,7 @@ library(rio) library(readxl) library(lme4) library(dummies) +library(ggthemes) setwd(dirname(parent.frame(2)$ofile)) From c56ba1a6f033dc3aff2412bdafae00c25e58b475 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Tue, 5 Jul 2016 10:20:32 +0300 Subject: [PATCH 4/9] added more ggthemes --- instat/sdgPlots.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index 2cc7d076dbf..f3fb0b51ade 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -45,7 +45,7 @@ Public Class sdgPlots ucr2ndFactorReceiver.Selector = ucrAddRemove ucr2ndFactorReceiver.SetIncludedDataTypes({"factor"}) - ucrInputThemes.cboInput.Items.AddRange({"theme_bw", "theme_linedraw", "theme_light", "theme_minimal", "theme_classic", "theme_dark", "theme_void", "theme_base", "theme_calc", "theme_economist", "theme_few", "theme_fivethirtyeight", "theme_foundation", "theme_gdocs", "theme_igray", "theme_map", "theme_par", "theme_solarized"}) + ucrInputThemes.cboInput.Items.AddRange({"theme_bw", "theme_linedraw", "theme_light", "theme_minimal", "theme_classic", "theme_dark", "theme_void", "theme_base", "theme_calc", "theme_economist", "theme_few", "theme_fivethirtyeight", "theme_foundation", "theme_gdocs", "theme_igray", "theme_map", "theme_par", "theme_solarized", "theme_hc", "theme_pander", "theme_solid", "theme_stata", "theme_tufte", "theme_wsj"}) End Sub Private Sub IncludeFacets() From f99ec82f261948be2bc58ae51440a1c03c35333e Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Tue, 5 Jul 2016 11:29:24 +0300 Subject: [PATCH 5/9] Creating new Usercontrol for layers --- instat/instat.vbproj | 15 ++++ instat/ucrAdditionalLayers.Designer.vb | 98 ++++++++++++++++++++ instat/ucrAdditionalLayers.fr-FR.resx | 15 ++++ instat/ucrAdditionalLayers.resx | 120 +++++++++++++++++++++++++ instat/ucrAdditionalLayers.sw-KE.resx | 15 ++++ instat/ucrAdditionalLayers.vb | 46 ++++++++++ 6 files changed, 309 insertions(+) create mode 100644 instat/ucrAdditionalLayers.Designer.vb create mode 100644 instat/ucrAdditionalLayers.fr-FR.resx create mode 100644 instat/ucrAdditionalLayers.resx create mode 100644 instat/ucrAdditionalLayers.sw-KE.resx create mode 100644 instat/ucrAdditionalLayers.vb diff --git a/instat/instat.vbproj b/instat/instat.vbproj index a2e6cbd524e..5013baaf592 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -717,6 +717,12 @@ Form + + ucrAdditionalLayers.vb + + + UserControl + ucrColors.vb @@ -3707,6 +3713,15 @@ sdgVariableTransformations.vb + + ucrAdditionalLayers.vb + + + ucrAdditionalLayers.vb + + + ucrAdditionalLayers.vb + ucrButtons.vb diff --git a/instat/ucrAdditionalLayers.Designer.vb b/instat/ucrAdditionalLayers.Designer.vb new file mode 100644 index 00000000000..33b6900a00f --- /dev/null +++ b/instat/ucrAdditionalLayers.Designer.vb @@ -0,0 +1,98 @@ + _ +Partial Class ucrAdditionalLayers + Inherits System.Windows.Forms.UserControl + + 'UserControl overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.cmdDelete = New System.Windows.Forms.Button() + Me.cmdEdit = New System.Windows.Forms.Button() + Me.cmdAdd = New System.Windows.Forms.Button() + Me.lblLayers = New System.Windows.Forms.Label() + Me.lstLayers = New System.Windows.Forms.ListView() + Me.SuspendLayout() + ' + 'cmdDelete + ' + Me.cmdDelete.Location = New System.Drawing.Point(139, 91) + Me.cmdDelete.Name = "cmdDelete" + Me.cmdDelete.Size = New System.Drawing.Size(75, 23) + Me.cmdDelete.TabIndex = 6 + Me.cmdDelete.Text = "Delete" + Me.cmdDelete.UseVisualStyleBackColor = True + ' + 'cmdEdit + ' + Me.cmdEdit.Location = New System.Drawing.Point(139, 62) + Me.cmdEdit.Name = "cmdEdit" + Me.cmdEdit.Size = New System.Drawing.Size(75, 23) + Me.cmdEdit.TabIndex = 7 + Me.cmdEdit.Text = "Edit" + Me.cmdEdit.UseVisualStyleBackColor = True + ' + 'cmdAdd + ' + Me.cmdAdd.Location = New System.Drawing.Point(139, 33) + Me.cmdAdd.Name = "cmdAdd" + Me.cmdAdd.Size = New System.Drawing.Size(75, 23) + Me.cmdAdd.TabIndex = 8 + Me.cmdAdd.Text = "Add" + Me.cmdAdd.UseVisualStyleBackColor = True + ' + 'lblLayers + ' + Me.lblLayers.AutoSize = True + Me.lblLayers.Location = New System.Drawing.Point(9, 7) + Me.lblLayers.Name = "lblLayers" + Me.lblLayers.Size = New System.Drawing.Size(38, 13) + Me.lblLayers.TabIndex = 5 + Me.lblLayers.Text = "Layers" + ' + 'lstLayers + ' + Me.lstLayers.Location = New System.Drawing.Point(8, 33) + Me.lstLayers.Name = "lstLayers" + Me.lstLayers.Size = New System.Drawing.Size(125, 149) + Me.lstLayers.TabIndex = 4 + Me.lstLayers.UseCompatibleStateImageBehavior = False + Me.lstLayers.View = System.Windows.Forms.View.List + ' + 'ucrAdditionalLayers + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.cmdDelete) + Me.Controls.Add(Me.cmdEdit) + Me.Controls.Add(Me.cmdAdd) + Me.Controls.Add(Me.lblLayers) + Me.Controls.Add(Me.lstLayers) + Me.Name = "ucrAdditionalLayers" + Me.Size = New System.Drawing.Size(218, 194) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents cmdDelete As Button + Friend WithEvents cmdEdit As Button + Friend WithEvents cmdAdd As Button + Friend WithEvents lblLayers As Label + Friend WithEvents lstLayers As ListView +End Class diff --git a/instat/ucrAdditionalLayers.fr-FR.resx b/instat/ucrAdditionalLayers.fr-FR.resx new file mode 100644 index 00000000000..9c9f69d752c --- /dev/null +++ b/instat/ucrAdditionalLayers.fr-FR.resx @@ -0,0 +1,15 @@ + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/ucrAdditionalLayers.resx b/instat/ucrAdditionalLayers.resx new file mode 100644 index 00000000000..29dcb1b3a35 --- /dev/null +++ b/instat/ucrAdditionalLayers.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/ucrAdditionalLayers.sw-KE.resx b/instat/ucrAdditionalLayers.sw-KE.resx new file mode 100644 index 00000000000..9c9f69d752c --- /dev/null +++ b/instat/ucrAdditionalLayers.sw-KE.resx @@ -0,0 +1,15 @@ + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/ucrAdditionalLayers.vb b/instat/ucrAdditionalLayers.vb new file mode 100644 index 00000000000..b16ee1cb51c --- /dev/null +++ b/instat/ucrAdditionalLayers.vb @@ -0,0 +1,46 @@ + +' Instat-R +' Copyright (C) 2015 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License k +' along with this program. If not, see . + +Public Class ucrAdditionalLayers + Public bFirstLoad As Boolean = True + + Public Sub New() + + ' This call is required by the designer. + InitializeComponent() + + ' Add any initialization after the InitializeComponent() call. + + End Sub + + Private Sub ucrAdditionalLayers_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then + SetDefaults() + bFirstLoad = False + End If + End Sub + Private Sub SetDefaults() + + End Sub + Private Sub InitialiseControl() + + End Sub + + Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click + sdgLayerOptions.ShowDialog() + End Sub +End Class From 3627f500d0515fabbc3a6ec7606fed26ac000d8f Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Tue, 5 Jul 2016 16:14:15 +0300 Subject: [PATCH 6/9] ucrAdditionallayers and changes on general graphics dialog --- instat/dlgGeneralForGraphics.Designer.vb | 26 +++++--- instat/dlgGeneralForGraphics.vb | 11 ++-- instat/ucrAdditionalLayers.Designer.vb | 6 +- instat/ucrAdditionalLayers.vb | 77 +++++++++++++++++++++++- 4 files changed, 104 insertions(+), 16 deletions(-) diff --git a/instat/dlgGeneralForGraphics.Designer.vb b/instat/dlgGeneralForGraphics.Designer.vb index 93262221832..9f7b2ac7971 100644 --- a/instat/dlgGeneralForGraphics.Designer.vb +++ b/instat/dlgGeneralForGraphics.Designer.vb @@ -22,22 +22,16 @@ Partial Class dlgGeneralForGraphics 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() Me.lstLayers = New System.Windows.Forms.ListView() Me.lblLayers = New System.Windows.Forms.Label() Me.cmdAdd = New System.Windows.Forms.Button() Me.cmdEdit = New System.Windows.Forms.Button() Me.cmdDelete = New System.Windows.Forms.Button() + Me.UcrAdditionalLayers1 = New instat.ucrAdditionalLayers() Me.ucrSaveGraph = New instat.ucrSaveGraph() + Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() ' - 'ucrBase - ' - Me.ucrBase.Location = New System.Drawing.Point(12, 248) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 53) - Me.ucrBase.TabIndex = 0 - ' 'lstLayers ' Me.lstLayers.Location = New System.Drawing.Point(12, 39) @@ -83,6 +77,13 @@ Partial Class dlgGeneralForGraphics Me.cmdDelete.Text = "Delete" Me.cmdDelete.UseVisualStyleBackColor = True ' + 'UcrAdditionalLayers1 + ' + Me.UcrAdditionalLayers1.Location = New System.Drawing.Point(212, 12) + Me.UcrAdditionalLayers1.Name = "UcrAdditionalLayers1" + Me.UcrAdditionalLayers1.Size = New System.Drawing.Size(198, 175) + Me.UcrAdditionalLayers1.TabIndex = 5 + ' 'ucrSaveGraph ' Me.ucrSaveGraph.Location = New System.Drawing.Point(12, 212) @@ -90,11 +91,19 @@ Partial Class dlgGeneralForGraphics Me.ucrSaveGraph.Size = New System.Drawing.Size(265, 20) Me.ucrSaveGraph.TabIndex = 4 ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(12, 248) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 53) + Me.ucrBase.TabIndex = 0 + ' 'dlgGeneralForGraphics ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(422, 303) + Me.Controls.Add(Me.UcrAdditionalLayers1) Me.Controls.Add(Me.ucrSaveGraph) Me.Controls.Add(Me.cmdDelete) Me.Controls.Add(Me.cmdEdit) @@ -119,4 +128,5 @@ Partial Class dlgGeneralForGraphics Friend WithEvents cmdEdit As Button Friend WithEvents cmdDelete As Button Friend WithEvents ucrSaveGraph As ucrSaveGraph + Friend WithEvents UcrAdditionalLayers1 As ucrAdditionalLayers End Class diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index d3cef07d90e..e2a6d77a80b 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -15,11 +15,11 @@ ' along with this program. If not, see . Imports instat.Translations Public Class dlgGeneralForGraphics - Private clsRggplotFunction As New RFunction + Public clsRggplotFunction As New RFunction Private bFirstLoad As Boolean = True Private lstLayerComplete As New List(Of Boolean) Private iLayerIndex As Integer - Private WithEvents clsGgplotAesFunction As New RFunction + Public WithEvents clsGgplotAesFunction As New RFunction Private strGlobalDataFrame As String = "" Public bDataFrameSet As Boolean = False @@ -47,6 +47,9 @@ Public Class dlgGeneralForGraphics ucrSaveGraph.strPrefix = "Graph" ucrSaveGraph.ucrInputGraphName.SetItemsTypeAsGraphs() ucrSaveGraph.ucrInputGraphName.SetDefaultTypeAsGraph() + + UcrAdditionalLayers1.SetRSyntax(ucrBase.clsRsyntax) + End Sub Private Sub SetDefaults() @@ -102,9 +105,9 @@ Public Class dlgGeneralForGraphics TestOKEnabled() End Sub - Private Sub TestOKEnabled() + Public Sub TestOKEnabled() Dim bTemp As Boolean = False - For Each bTemp In lstLayerComplete + For Each bTemp In UcrAdditionalLayers1.lstLayerComplete If Not bTemp Then Exit For End If diff --git a/instat/ucrAdditionalLayers.Designer.vb b/instat/ucrAdditionalLayers.Designer.vb index 33b6900a00f..f40b6eb52a9 100644 --- a/instat/ucrAdditionalLayers.Designer.vb +++ b/instat/ucrAdditionalLayers.Designer.vb @@ -61,9 +61,9 @@ Partial Class ucrAdditionalLayers Me.lblLayers.AutoSize = True Me.lblLayers.Location = New System.Drawing.Point(9, 7) Me.lblLayers.Name = "lblLayers" - Me.lblLayers.Size = New System.Drawing.Size(38, 13) + Me.lblLayers.Size = New System.Drawing.Size(87, 13) Me.lblLayers.TabIndex = 5 - Me.lblLayers.Text = "Layers" + Me.lblLayers.Text = "Additional Layers" ' 'lstLayers ' @@ -84,7 +84,7 @@ Partial Class ucrAdditionalLayers Me.Controls.Add(Me.lblLayers) Me.Controls.Add(Me.lstLayers) Me.Name = "ucrAdditionalLayers" - Me.Size = New System.Drawing.Size(218, 194) + Me.Size = New System.Drawing.Size(218, 191) Me.ResumeLayout(False) Me.PerformLayout() diff --git a/instat/ucrAdditionalLayers.vb b/instat/ucrAdditionalLayers.vb index b16ee1cb51c..a4918c6ea24 100644 --- a/instat/ucrAdditionalLayers.vb +++ b/instat/ucrAdditionalLayers.vb @@ -16,7 +16,11 @@ ' along with this program. If not, see . Public Class ucrAdditionalLayers + Public clsRSyntax As RSyntax Public bFirstLoad As Boolean = True + Public lstLayerComplete As New List(Of Boolean) + Public iLayerIndex As Integer + Private strGlobalDataFrame As String = "" Public Sub New() @@ -27,6 +31,10 @@ Public Class ucrAdditionalLayers End Sub + Public Sub SetRSyntax(clsRSyntaxIn As RSyntax) + clsRSyntax = clsRSyntaxIn + End Sub + Private Sub ucrAdditionalLayers_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then SetDefaults() @@ -34,13 +42,80 @@ Public Class ucrAdditionalLayers End If End Sub Private Sub SetDefaults() - + iLayerIndex = 0 + lstLayers.Clear() + lstLayerComplete.Clear() + SetEditDeleteEnabled() End Sub Private Sub InitialiseControl() End Sub Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click + sdgLayerOptions.SetupLayer(clsTempGgPlot:=dlgGeneralForGraphics.clsRggplotFunction, clsTempGeomFunc:=Nothing, clsTempAesFunc:=dlgGeneralForGraphics.clsGgplotAesFunction, bFixAes:=False, bFixGeom:=False, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=lstLayers.Items.Count = 0) + sdgLayerOptions.ShowDialog() + strGlobalDataFrame = sdgLayerOptions.strGlobalDataFrame + AddLayers() + End Sub + Private Sub SetEditDeleteEnabled() + If lstLayers.SelectedItems.Count = 1 Then + cmdDelete.Enabled = True + cmdEdit.Enabled = True + Else + cmdDelete.Enabled = False + cmdEdit.Enabled = False + End If + End Sub + Private Sub lstLayers_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstLayers.SelectedIndexChanged + SetEditDeleteEnabled() + End Sub + Public Sub AddLayers(Optional lviCurrentItem As ListViewItem = Nothing) + Dim lviLayer As ListViewItem + Dim strLayerName As String + + If lviCurrentItem Is Nothing Then + iLayerIndex = iLayerIndex + 1 + strLayerName = iLayerIndex & "." & sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem + lviLayer = New ListViewItem(text:=strLayerName) + lstLayers.Items.Add(lviLayer) + lstLayerComplete.Add(sdgLayerOptions.TestForOKEnabled()) + Else + lviLayer = lviCurrentItem + lstLayerComplete(lstLayers.Items.IndexOf(lviLayer)) = sdgLayerOptions.TestForOKEnabled() + strLayerName = lviCurrentItem.Text + End If + + If sdgLayerOptions.TestForOKEnabled() Then + lstLayers.Items(lstLayers.Items.IndexOf(lviLayer)).ForeColor = Color.Green + Else + lstLayers.Items(lstLayers.Items.IndexOf(lviLayer)).ForeColor = Color.Red + End If + + clsRSyntax.SetOperatorParameter(False, strParameterName:=strLayerName, clsRFunc:=sdgLayerOptions.clsGeomFunction.Clone()) + + dlgGeneralForGraphics.TestOKEnabled() + End Sub + + Private Sub cmdDelete_Click(sender As Object, e As EventArgs) Handles cmdDelete.Click + If lstLayers.SelectedItems.Count = 1 Then + clsRSyntax.RemoveOperatorParameter(lstLayers.SelectedItems(0).Text) + lstLayerComplete.RemoveAt(lstLayers.SelectedIndices(0)) + lstLayers.Items.Remove(lstLayers.SelectedItems(0)) + End If + End Sub + + Private Sub cmdEdit_Click(sender As Object, e As EventArgs) Handles cmdEdit.Click + Dim clsSelectedGeom As RFunction + Dim clsLocalAes As RFunction + + clsSelectedGeom = clsRSyntax.GetParameter(lstLayers.SelectedItems(0).Text).clsArgumentFunction + If clsSelectedGeom.GetParameter("mapping") IsNot Nothing Then + clsLocalAes = clsSelectedGeom.GetParameter("mapping").clsArgumentFunction + Else + clsLocalAes = Nothing + End If + sdgLayerOptions.SetupLayer(clsTempGgPlot:=dlgGeneralForGraphics.clsRggplotFunction, clsTempGeomFunc:=clsSelectedGeom, clsTempAesFunc:=dlgGeneralForGraphics.clsGgplotAesFunction, bFixAes:=False, bFixGeom:=True, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=False, clsTempLocalAes:=clsLocalAes) sdgLayerOptions.ShowDialog() + AddLayers(lstLayers.SelectedItems(0)) End Sub End Class From 3e0482614481846697e731a1c7d76cd0e4a1b2ab Mon Sep 17 00:00:00 2001 From: Bethan Clarke Date: Tue, 5 Jul 2016 16:12:19 +0100 Subject: [PATCH 7/9] Help ID and making dialogs modal --- instat/dlgCombine.vb | 1 + ...er.vb => dlgDataFrameMetadata.Designer.vb} | 8 +- ...R.resx => dlgDataFrameMetadata.fr-FR.resx} | 0 ...eSheets.resx => dlgDataFrameMetadata.resx} | 0 ...E.resx => dlgDataFrameMetadata.sw-KE.resx} | 0 ...eetMetadata.vb => dlgDataFrameMetadata.vb} | 7 +- instat/dlgDeleteMetadata.vb | 1 + ...gner.vb => dlgFactorDataFrame.Designer.vb} | 14 +- ...-FR.resx => dlgFactorDataFrame.fr-FR.resx} | 0 ...tMetadata.resx => dlgFactorDataFrame.resx} | 0 ...-KE.resx => dlgFactorDataFrame.sw-KE.resx} | 0 ...dlgMakeSheets.vb => dlgFactorDataFrame.vb} | 6 +- instat/dlgFind.Designer.vb | 12 +- instat/dlgFind.vb | 4 + instat/dlgFreezeColumns.vb | 2 +- instat/dlgJitter.vb | 1 + instat/dlgLabels.Designer.vb | 4 +- instat/dlgMerge.resx | 120 +++++++++ instat/dlgMetadata.vb | 1 + instat/dlgProtect.vb | 5 + instat/dlgRandomSubsets.vb | 2 +- instat/dlgRank.Designer.vb | 3 + instat/dlgRecodeFactor.Designer.vb | 179 ++++++------- instat/dlgRecodeFactor.resx | 238 +++++++++--------- instat/dlgReferenceLevel.Designer.vb | 2 + instat/dlgRenameDescriptive.vb | 1 + instat/dlgRenameMetadata.vb | 1 + instat/dlgReoderDescriptives.vb | 1 + instat/dlgReoderMetadata.vb | 1 + instat/dlgReplace.Designer.vb | 12 +- instat/dlgReplace.vb | 4 + instat/dlgRestrict.vb | 1 + instat/dlgRownamesOrNumbers.vb | 1 + instat/dlgViewDescriptives.vb | 1 + instat/frmMain.vb | 4 +- instat/instat.vbproj | 41 +-- 36 files changed, 431 insertions(+), 247 deletions(-) rename instat/{dlgSheetMetadata.Designer.vb => dlgDataFrameMetadata.Designer.vb} (89%) rename instat/{dlgMakeSheets.fr-FR.resx => dlgDataFrameMetadata.fr-FR.resx} (100%) rename instat/{dlgMakeSheets.resx => dlgDataFrameMetadata.resx} (100%) rename instat/{dlgMakeSheets.sw-KE.resx => dlgDataFrameMetadata.sw-KE.resx} (100%) rename instat/{dlgSheetMetadata.vb => dlgDataFrameMetadata.vb} (85%) rename instat/{dlgMakeSheets.Designer.vb => dlgFactorDataFrame.Designer.vb} (84%) rename instat/{dlgSheetMetadata.fr-FR.resx => dlgFactorDataFrame.fr-FR.resx} (100%) rename instat/{dlgSheetMetadata.resx => dlgFactorDataFrame.resx} (100%) rename instat/{dlgSheetMetadata.sw-KE.resx => dlgFactorDataFrame.sw-KE.resx} (100%) rename instat/{dlgMakeSheets.vb => dlgFactorDataFrame.vb} (85%) create mode 100644 instat/dlgMerge.resx diff --git a/instat/dlgCombine.vb b/instat/dlgCombine.vb index a741ba7fe8e..9c56f541a21 100644 --- a/instat/dlgCombine.vb +++ b/instat/dlgCombine.vb @@ -43,6 +43,7 @@ Public Class dlgCombine ucrInputColName.SetItemsTypeAsColumns() ucrInputColName.SetDefaultTypeAsColumn() ucrInputColName.SetDataFrameSelector(ucrSelectorCombineFactors.ucrAvailableDataFrames) + ucrBase.iHelpTopicID = 39 End Sub Private Sub ReOpenDialog() diff --git a/instat/dlgSheetMetadata.Designer.vb b/instat/dlgDataFrameMetadata.Designer.vb similarity index 89% rename from instat/dlgSheetMetadata.Designer.vb rename to instat/dlgDataFrameMetadata.Designer.vb index 128e7b0ee22..484fb2a1a97 100644 --- a/instat/dlgSheetMetadata.Designer.vb +++ b/instat/dlgDataFrameMetadata.Designer.vb @@ -1,5 +1,5 @@  _ -Partial Class dlgSheetMetadata +Partial Class dlgDataFrameMetaData Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. @@ -32,17 +32,17 @@ Partial Class dlgSheetMetadata Me.ucrBase.Size = New System.Drawing.Size(410, 53) Me.ucrBase.TabIndex = 0 ' - 'dlgSheetMetadata + 'dlgDataFrameMetaData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(433, 261) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Name = "dlgSheetMetadata" + Me.Name = "dlgDataFrameMetaData" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Sheet_Metadata" - Me.Text = "Sheet Metadata" + Me.Text = "Data Frame Metadata" Me.ResumeLayout(False) End Sub diff --git a/instat/dlgMakeSheets.fr-FR.resx b/instat/dlgDataFrameMetadata.fr-FR.resx similarity index 100% rename from instat/dlgMakeSheets.fr-FR.resx rename to instat/dlgDataFrameMetadata.fr-FR.resx diff --git a/instat/dlgMakeSheets.resx b/instat/dlgDataFrameMetadata.resx similarity index 100% rename from instat/dlgMakeSheets.resx rename to instat/dlgDataFrameMetadata.resx diff --git a/instat/dlgMakeSheets.sw-KE.resx b/instat/dlgDataFrameMetadata.sw-KE.resx similarity index 100% rename from instat/dlgMakeSheets.sw-KE.resx rename to instat/dlgDataFrameMetadata.sw-KE.resx diff --git a/instat/dlgSheetMetadata.vb b/instat/dlgDataFrameMetadata.vb similarity index 85% rename from instat/dlgSheetMetadata.vb rename to instat/dlgDataFrameMetadata.vb index b2f41355573..0de310e0913 100644 --- a/instat/dlgSheetMetadata.vb +++ b/instat/dlgDataFrameMetadata.vb @@ -14,8 +14,13 @@ ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . Imports instat.Translations -Public Class dlgSheetMetadata +Public Class dlgDataFrameMetaData Private Sub dlgSheetMetadata_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) End Sub + + Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 288 + + End Sub End Class \ No newline at end of file diff --git a/instat/dlgDeleteMetadata.vb b/instat/dlgDeleteMetadata.vb index 38e92596dcc..44a9bc40bd1 100644 --- a/instat/dlgDeleteMetadata.vb +++ b/instat/dlgDeleteMetadata.vb @@ -38,6 +38,7 @@ Public Class dlgDeleteMetadata ucrReceiverMetadataToDelete.Selector = ucrSelectorForDeleteMetadata ucrReceiverMetadataToDelete.SetMeAsReceiver() ucrSelectorForDeleteMetadata.SetItemType("metadata") + ucrBase.iHelpTopicID = 170 End Sub Private Sub setDefaults() diff --git a/instat/dlgMakeSheets.Designer.vb b/instat/dlgFactorDataFrame.Designer.vb similarity index 84% rename from instat/dlgMakeSheets.Designer.vb rename to instat/dlgFactorDataFrame.Designer.vb index 649540a2e5c..d68591b840b 100644 --- a/instat/dlgMakeSheets.Designer.vb +++ b/instat/dlgFactorDataFrame.Designer.vb @@ -1,9 +1,9 @@ - _ -Partial Class dlgMakeSheets + +Partial Class dlgFactorDataFrame Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,7 +20,7 @@ Partial Class dlgMakeSheets 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() @@ -39,10 +39,10 @@ Partial Class dlgMakeSheets Me.ClientSize = New System.Drawing.Size(435, 261) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Name = "dlgMakeSheets" + Me.Name = "dlgFactorDataFrame" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Tag = "Make_Sheets" - Me.Text = "Make Sheets" + Me.Tag = "Factor_Data_Frame" + Me.Text = "Factor Data Frame" Me.ResumeLayout(False) End Sub diff --git a/instat/dlgSheetMetadata.fr-FR.resx b/instat/dlgFactorDataFrame.fr-FR.resx similarity index 100% rename from instat/dlgSheetMetadata.fr-FR.resx rename to instat/dlgFactorDataFrame.fr-FR.resx diff --git a/instat/dlgSheetMetadata.resx b/instat/dlgFactorDataFrame.resx similarity index 100% rename from instat/dlgSheetMetadata.resx rename to instat/dlgFactorDataFrame.resx diff --git a/instat/dlgSheetMetadata.sw-KE.resx b/instat/dlgFactorDataFrame.sw-KE.resx similarity index 100% rename from instat/dlgSheetMetadata.sw-KE.resx rename to instat/dlgFactorDataFrame.sw-KE.resx diff --git a/instat/dlgMakeSheets.vb b/instat/dlgFactorDataFrame.vb similarity index 85% rename from instat/dlgMakeSheets.vb rename to instat/dlgFactorDataFrame.vb index 0c7dc7282c2..3457ca2051f 100644 --- a/instat/dlgMakeSheets.vb +++ b/instat/dlgFactorDataFrame.vb @@ -15,9 +15,10 @@ ' along with this program. If not, see . Imports instat.Translations -Public Class dlgMakeSheets +Public Class dlgFactorDataFrame Public bFirstLoad As Boolean = True - Private Sub dlgMakeSheets_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + Private Sub dlgFactorDataFrame_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then @@ -28,6 +29,7 @@ Public Class dlgMakeSheets End Sub Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 162 End Sub Private Sub SetDefaults() diff --git a/instat/dlgFind.Designer.vb b/instat/dlgFind.Designer.vb index 88ea17654ff..ab37b00a7df 100644 --- a/instat/dlgFind.Designer.vb +++ b/instat/dlgFind.Designer.vb @@ -31,6 +31,7 @@ Partial Class dlgFind Me.lblFindWhat = New System.Windows.Forms.Label() Me.txtFindWhat = New System.Windows.Forms.TextBox() Me.cmdFindAll = New System.Windows.Forms.Button() + Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() ' 'cmdFindNext @@ -129,11 +130,19 @@ Partial Class dlgFind Me.cmdFindAll.Text = "Find all" Me.cmdFindAll.UseVisualStyleBackColor = True ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(12, 234) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 9 + ' 'dlgFind ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(355, 190) + Me.ClientSize = New System.Drawing.Size(420, 287) + Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.cmdFindAll) Me.Controls.Add(Me.txtFindWhat) Me.Controls.Add(Me.lblFindWhat) @@ -162,4 +171,5 @@ Partial Class dlgFind Friend WithEvents lblFindWhat As Label Friend WithEvents txtFindWhat As TextBox Friend WithEvents cmdFindAll As Button + Friend WithEvents ucrBase As ucrButtons End Class diff --git a/instat/dlgFind.vb b/instat/dlgFind.vb index fb7f4a78dfd..9e02b5854d1 100644 --- a/instat/dlgFind.vb +++ b/instat/dlgFind.vb @@ -17,6 +17,10 @@ Imports instat.Translations Public Class dlgFind Public currWindow As Form Dim targetPos As Integer = 0 + + Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 406 + End Sub Private Sub cmdFindNext_Click(sender As Object, e As EventArgs) Handles cmdFindNext.Click Select Case currWindow.Name diff --git a/instat/dlgFreezeColumns.vb b/instat/dlgFreezeColumns.vb index 1a403b657d7..b791df21ea7 100644 --- a/instat/dlgFreezeColumns.vb +++ b/instat/dlgFreezeColumns.vb @@ -35,7 +35,7 @@ Public Class dlgFreezeColumns End Sub Private Sub InitialiseDialog() - 'ucrBaseforFreezeColumns.iHelpTopicID = 165 + ucrBaseforFreezeColumns.iHelpTopicID = 444 ucrReceiverMultipleforFreezeColumns.Selector = ucrSelectorByDataFrameAddRemoveforFreezeColumns ucrReceiverMultipleforFreezeColumns.SetMeAsReceiver() ucrBaseforFreezeColumns.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$set_freeze_columns") diff --git a/instat/dlgJitter.vb b/instat/dlgJitter.vb index aa40f7a771f..abb14068416 100644 --- a/instat/dlgJitter.vb +++ b/instat/dlgJitter.vb @@ -43,6 +43,7 @@ Public Class dlgJitter ucrInputMaximum.SetValidationTypeAsNumeric() ucrInputMinimum.SetValidationTypeAsNumeric() ucrInputMaximumDistanceFromZero.SetValidationTypeAsNumeric() + ucrBase.iHelpTopicID = 396 End Sub diff --git a/instat/dlgLabels.Designer.vb b/instat/dlgLabels.Designer.vb index f7e9a92c481..d2efbdbf716 100644 --- a/instat/dlgLabels.Designer.vb +++ b/instat/dlgLabels.Designer.vb @@ -62,6 +62,7 @@ Partial Class dlgLabels ' 'ucrSelectorForLabels ' + Me.ucrSelectorForLabels.bShowHiddenColumns = False Me.ucrSelectorForLabels.Location = New System.Drawing.Point(12, 12) Me.ucrSelectorForLabels.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForLabels.Name = "ucrSelectorForLabels" @@ -97,8 +98,9 @@ Partial Class dlgLabels Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgLabels" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Labels" - Me.Text = "Labels" + Me.Text = "Labels/Levels" Me.ResumeLayout(False) Me.PerformLayout() diff --git a/instat/dlgMerge.resx b/instat/dlgMerge.resx new file mode 100644 index 00000000000..29dcb1b3a35 --- /dev/null +++ b/instat/dlgMerge.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgMetadata.vb b/instat/dlgMetadata.vb index 1c0c81f5f6d..ac628ad9e7d 100644 --- a/instat/dlgMetadata.vb +++ b/instat/dlgMetadata.vb @@ -43,6 +43,7 @@ Public Class dlgMetadata Private Sub InitialiseDialog() ucrSelectByMetadata.SetItemType("metadata") ucrInputViewDataBy.Selector = ucrSelectByMetadata + ucrBase.iHelpTopicID = 391 End Sub Private Sub setDefaults() diff --git a/instat/dlgProtect.vb b/instat/dlgProtect.vb index 378cd2a8887..572acdcb7be 100644 --- a/instat/dlgProtect.vb +++ b/instat/dlgProtect.vb @@ -19,4 +19,9 @@ Public Class dlgProtect Private Sub dlgProtect_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) End Sub + + Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 166 + End Sub + End Class \ No newline at end of file diff --git a/instat/dlgRandomSubsets.vb b/instat/dlgRandomSubsets.vb index 36c0f2a455d..679d2590314 100644 --- a/instat/dlgRandomSubsets.vb +++ b/instat/dlgRandomSubsets.vb @@ -44,7 +44,7 @@ Public Class dlgRandomSubsets clsSetSeed.SetRCommand("set.seed") clsReplicateFunc.AddParameter("expr", clsRFunctionParameter:=clsSampleFunc) clsSampleFunc.SetRCommand("sample") - ucrBase.iHelpTopicID = 65 + ucrBase.iHelpTopicID = 59 End Sub diff --git a/instat/dlgRank.Designer.vb b/instat/dlgRank.Designer.vb index bddb0f0e7b2..54e2c3a20bb 100644 --- a/instat/dlgRank.Designer.vb +++ b/instat/dlgRank.Designer.vb @@ -188,6 +188,7 @@ Partial Class dlgRank ' 'ucrInputColName ' + Me.ucrInputColName.IsReadOnly = False Me.ucrInputColName.Location = New System.Drawing.Point(117, 268) Me.ucrInputColName.Name = "ucrInputColName" Me.ucrInputColName.Size = New System.Drawing.Size(145, 21) @@ -195,6 +196,7 @@ Partial Class dlgRank ' 'ucrSelectorForRank ' + Me.ucrSelectorForRank.bShowHiddenColumns = False Me.ucrSelectorForRank.Location = New System.Drawing.Point(10, 10) Me.ucrSelectorForRank.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForRank.Name = "ucrSelectorForRank" @@ -232,6 +234,7 @@ Partial Class dlgRank Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgRank" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Rank" Me.Text = "Rank" Me.grpTies.ResumeLayout(False) diff --git a/instat/dlgRecodeFactor.Designer.vb b/instat/dlgRecodeFactor.Designer.vb index 396697f6bf8..1896c041d98 100644 --- a/instat/dlgRecodeFactor.Designer.vb +++ b/instat/dlgRecodeFactor.Designer.vb @@ -22,95 +22,96 @@ Partial Class dlgRecodeFactor 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.ucrSelectorForRecode = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrReceiverFactor = New instat.ucrReceiverSingle() - Me.lblFactor = New System.Windows.Forms.Label() - Me.ucrFactorGrid = New instat.ucrFactor() - Me.ucrInputColumnName = New instat.ucrInputComboBox() - Me.lblNewColumnName = New System.Windows.Forms.Label() - Me.SuspendLayout() - ' - 'ucrBase - ' - Me.ucrBase.Location = New System.Drawing.Point(10, 354) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 0 - ' - 'ucrSelectorForRecode - ' - Me.ucrSelectorForRecode.bShowHiddenColumns = False - Me.ucrSelectorForRecode.Location = New System.Drawing.Point(10, 10) - Me.ucrSelectorForRecode.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorForRecode.Name = "ucrSelectorForRecode" - Me.ucrSelectorForRecode.Size = New System.Drawing.Size(210, 180) - Me.ucrSelectorForRecode.TabIndex = 1 - ' - 'ucrReceiverFactor - ' - Me.ucrReceiverFactor.Location = New System.Drawing.Point(255, 50) - Me.ucrReceiverFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverFactor.Name = "ucrReceiverFactor" - Me.ucrReceiverFactor.Selector = Nothing - Me.ucrReceiverFactor.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverFactor.TabIndex = 2 - ' - 'lblFactor - ' - Me.lblFactor.AutoSize = True - Me.lblFactor.Location = New System.Drawing.Point(255, 31) - Me.lblFactor.Name = "lblFactor" - Me.lblFactor.Size = New System.Drawing.Size(37, 13) - Me.lblFactor.TabIndex = 3 - Me.lblFactor.Text = "Factor" - ' - 'ucrFactorGrid - ' - Me.ucrFactorGrid.AutoSize = True - Me.ucrFactorGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.ucrFactorGrid.clsReceiver = Nothing - Me.ucrFactorGrid.Location = New System.Drawing.Point(255, 83) - Me.ucrFactorGrid.Name = "ucrFactorGrid" - Me.ucrFactorGrid.shtCurrSheet = Nothing - Me.ucrFactorGrid.Size = New System.Drawing.Size(288, 221) - Me.ucrFactorGrid.TabIndex = 4 - ' - 'ucrInputColumnName - ' - Me.ucrInputColumnName.IsReadOnly = False - Me.ucrInputColumnName.Location = New System.Drawing.Point(114, 322) - Me.ucrInputColumnName.Name = "ucrInputColumnName" - Me.ucrInputColumnName.Size = New System.Drawing.Size(178, 21) - Me.ucrInputColumnName.TabIndex = 5 - ' - 'lblNewColumnName - ' - Me.lblNewColumnName.AutoSize = True - Me.lblNewColumnName.Location = New System.Drawing.Point(10, 325) - Me.lblNewColumnName.Name = "lblNewColumnName" - Me.lblNewColumnName.Size = New System.Drawing.Size(98, 13) - Me.lblNewColumnName.TabIndex = 7 - Me.lblNewColumnName.Text = "New Column Name" - ' - 'dlgRecodeFactor - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(555, 410) - Me.Controls.Add(Me.lblNewColumnName) - Me.Controls.Add(Me.ucrInputColumnName) - Me.Controls.Add(Me.ucrFactorGrid) - Me.Controls.Add(Me.lblFactor) - Me.Controls.Add(Me.ucrReceiverFactor) - Me.Controls.Add(Me.ucrSelectorForRecode) - Me.Controls.Add(Me.ucrBase) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Name = "dlgRecodeFactor" - Me.Text = "Recode Factor" - Me.ResumeLayout(False) - Me.PerformLayout() - + Me.ucrBase = New instat.ucrButtons() + Me.ucrSelectorForRecode = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverFactor = New instat.ucrReceiverSingle() + Me.lblFactor = New System.Windows.Forms.Label() + Me.ucrFactorGrid = New instat.ucrFactor() + Me.ucrInputColumnName = New instat.ucrInputComboBox() + Me.lblNewColumnName = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(10, 354) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'ucrSelectorForRecode + ' + Me.ucrSelectorForRecode.bShowHiddenColumns = False + Me.ucrSelectorForRecode.Location = New System.Drawing.Point(10, 10) + Me.ucrSelectorForRecode.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorForRecode.Name = "ucrSelectorForRecode" + Me.ucrSelectorForRecode.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorForRecode.TabIndex = 1 + ' + 'ucrReceiverFactor + ' + Me.ucrReceiverFactor.Location = New System.Drawing.Point(255, 50) + Me.ucrReceiverFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverFactor.Name = "ucrReceiverFactor" + Me.ucrReceiverFactor.Selector = Nothing + Me.ucrReceiverFactor.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverFactor.TabIndex = 2 + ' + 'lblFactor + ' + Me.lblFactor.AutoSize = True + Me.lblFactor.Location = New System.Drawing.Point(255, 31) + Me.lblFactor.Name = "lblFactor" + Me.lblFactor.Size = New System.Drawing.Size(37, 13) + Me.lblFactor.TabIndex = 3 + Me.lblFactor.Text = "Factor" + ' + 'ucrFactorGrid + ' + Me.ucrFactorGrid.AutoSize = True + Me.ucrFactorGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.ucrFactorGrid.clsReceiver = Nothing + Me.ucrFactorGrid.Location = New System.Drawing.Point(255, 83) + Me.ucrFactorGrid.Name = "ucrFactorGrid" + Me.ucrFactorGrid.shtCurrSheet = Nothing + Me.ucrFactorGrid.Size = New System.Drawing.Size(288, 221) + Me.ucrFactorGrid.TabIndex = 4 + ' + 'ucrInputColumnName + ' + Me.ucrInputColumnName.IsReadOnly = False + Me.ucrInputColumnName.Location = New System.Drawing.Point(114, 322) + Me.ucrInputColumnName.Name = "ucrInputColumnName" + Me.ucrInputColumnName.Size = New System.Drawing.Size(178, 21) + Me.ucrInputColumnName.TabIndex = 5 + ' + 'lblNewColumnName + ' + Me.lblNewColumnName.AutoSize = True + Me.lblNewColumnName.Location = New System.Drawing.Point(10, 325) + Me.lblNewColumnName.Name = "lblNewColumnName" + Me.lblNewColumnName.Size = New System.Drawing.Size(98, 13) + Me.lblNewColumnName.TabIndex = 7 + Me.lblNewColumnName.Text = "New Column Name" + ' + 'dlgRecodeFactor + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(555, 410) + Me.Controls.Add(Me.lblNewColumnName) + Me.Controls.Add(Me.ucrInputColumnName) + Me.Controls.Add(Me.ucrFactorGrid) + Me.Controls.Add(Me.lblFactor) + Me.Controls.Add(Me.ucrReceiverFactor) + Me.Controls.Add(Me.ucrSelectorForRecode) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "dlgRecodeFactor" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Recode Factor" + Me.ResumeLayout(False) + Me.PerformLayout() + End Sub Friend WithEvents ucrBase As ucrButtons diff --git a/instat/dlgRecodeFactor.resx b/instat/dlgRecodeFactor.resx index 1af7de150c9..29dcb1b3a35 100644 --- a/instat/dlgRecodeFactor.resx +++ b/instat/dlgRecodeFactor.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/instat/dlgReferenceLevel.Designer.vb b/instat/dlgReferenceLevel.Designer.vb index ec968e9fc8d..643c7dc1f65 100644 --- a/instat/dlgReferenceLevel.Designer.vb +++ b/instat/dlgReferenceLevel.Designer.vb @@ -48,6 +48,7 @@ Partial Class dlgReferenceLevel ' 'ucrSelectorForReferenceLevels ' + Me.ucrSelectorForReferenceLevels.bShowHiddenColumns = False Me.ucrSelectorForReferenceLevels.Location = New System.Drawing.Point(13, 13) Me.ucrSelectorForReferenceLevels.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForReferenceLevels.Name = "ucrSelectorForReferenceLevels" @@ -86,6 +87,7 @@ Partial Class dlgReferenceLevel Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgReferenceLevel" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Reference_Level" Me.Text = "Reference Level" Me.ResumeLayout(False) diff --git a/instat/dlgRenameDescriptive.vb b/instat/dlgRenameDescriptive.vb index abbb8f2adc8..01ff9493b85 100644 --- a/instat/dlgRenameDescriptive.vb +++ b/instat/dlgRenameDescriptive.vb @@ -42,6 +42,7 @@ Public Class dlgRenameDescriptive ucrReceiverCurrentName.SetMeAsReceiver() ucrSelectorForRenameObject.SetItemType("object") ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$rename_object") + ucrBase.iHelpTopicID = 350 End Sub Private Sub SetDefaults() ucrReceiverCurrentName.ResetText() diff --git a/instat/dlgRenameMetadata.vb b/instat/dlgRenameMetadata.vb index 656a4e18a1f..2ab88f7d02d 100644 --- a/instat/dlgRenameMetadata.vb +++ b/instat/dlgRenameMetadata.vb @@ -38,6 +38,7 @@ Public Class dlgRenameMetadata ucrReceiverSelectedMetadata.Selector = ucrSelectorForDeleTeMetadata ucrReceiverSelectedMetadata.SetMeAsReceiver() ucrSelectorForDeleTeMetadata.SetItemType("metadata") + ucrBase.iHelpTopicID = 55 End Sub Private Sub setDefaults() diff --git a/instat/dlgReoderDescriptives.vb b/instat/dlgReoderDescriptives.vb index df081bb666b..36794cdfa34 100644 --- a/instat/dlgReoderDescriptives.vb +++ b/instat/dlgReoderDescriptives.vb @@ -33,6 +33,7 @@ Public Class dlgReoderDescriptives ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$reorder_objects") ucrReorderObjects.setDataType("object") ucrReorderObjects.setDataframes(ucrDataFrameReoder) + ucrBase.iHelpTopicID = 351 End Sub Private Sub ReopenDialog() diff --git a/instat/dlgReoderMetadata.vb b/instat/dlgReoderMetadata.vb index 55966810324..6facf60794e 100644 --- a/instat/dlgReoderMetadata.vb +++ b/instat/dlgReoderMetadata.vb @@ -37,6 +37,7 @@ Public Class dlgReoderMetadata Private Sub InitialiseDialog() ucrReorderMetadata.setDataframes(ucrDataFrameReoderMetadata) ucrReorderMetadata.setDataType("metadata") + ucrBase.iHelpTopicID = 56 End Sub Private Sub setDefaults() diff --git a/instat/dlgReplace.Designer.vb b/instat/dlgReplace.Designer.vb index 54512ad2d39..591f98e204a 100644 --- a/instat/dlgReplace.Designer.vb +++ b/instat/dlgReplace.Designer.vb @@ -33,6 +33,7 @@ Partial Class dlgReplace Me.chkFindWholeWordOnly = New System.Windows.Forms.CheckBox() Me.chkMatchCase = New System.Windows.Forms.CheckBox() Me.chkSearchToEndOnly = New System.Windows.Forms.CheckBox() + Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() ' 'lblFindWhat @@ -143,11 +144,19 @@ Partial Class dlgReplace Me.chkSearchToEndOnly.Text = "Search to end only" Me.chkSearchToEndOnly.UseVisualStyleBackColor = True ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(4, 222) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 8 + ' 'dlgReplace ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(345, 194) + Me.ClientSize = New System.Drawing.Size(407, 275) + Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.chkSearchToEndOnly) Me.Controls.Add(Me.chkMatchCase) Me.Controls.Add(Me.chkFindWholeWordOnly) @@ -180,4 +189,5 @@ Partial Class dlgReplace Friend WithEvents chkFindWholeWordOnly As CheckBox Friend WithEvents chkMatchCase As CheckBox Friend WithEvents chkSearchToEndOnly As CheckBox + Friend WithEvents ucrBase As ucrButtons End Class diff --git a/instat/dlgReplace.vb b/instat/dlgReplace.vb index cee5ac7b2ac..75e6ffb24d8 100644 --- a/instat/dlgReplace.vb +++ b/instat/dlgReplace.vb @@ -18,4 +18,8 @@ Public Class dlgReplace Private Sub dlgReplace_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) End Sub + + Private Sub InitilaiseDialogue() + ucrBase.iHelpTopicID = 47 + End Sub End Class \ No newline at end of file diff --git a/instat/dlgRestrict.vb b/instat/dlgRestrict.vb index 0024a224fc0..207430641c1 100644 --- a/instat/dlgRestrict.vb +++ b/instat/dlgRestrict.vb @@ -59,6 +59,7 @@ Public Class dlgRestrict ucrReceiverFilter.Selector = ucrSelectorFilter ucrReceiverFilter.SetMeAsReceiver() ucrNewDataFrameName.SetValidationTypeAsRVariable() + ucrBase.iHelpTopicID = 340 End Sub Private Sub SetDefaults() diff --git a/instat/dlgRownamesOrNumbers.vb b/instat/dlgRownamesOrNumbers.vb index d0d91105c99..9c42f2fee9a 100644 --- a/instat/dlgRownamesOrNumbers.vb +++ b/instat/dlgRownamesOrNumbers.vb @@ -36,6 +36,7 @@ Public Class dlgRowNamesOrNumbers ucrReceiverSingleRownamesOrNumbers.Selector = ucrSelectorByDataFrameAddRemoveforRownamesOrNumbers ucrReceiverSingleRownamesOrNumbers.SetMeAsReceiver() txtNewColumnforRowNameOrNumber.Visible = False + ucrBaseRownamesorNumbers.iHelpTopicID = 178 End Sub diff --git a/instat/dlgViewDescriptives.vb b/instat/dlgViewDescriptives.vb index e1f3c1a84b4..c5b0bce3836 100644 --- a/instat/dlgViewDescriptives.vb +++ b/instat/dlgViewDescriptives.vb @@ -48,6 +48,7 @@ Public Class dlgViewDescriptives ucrSelectorForViewObject.SetItemType("object") ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$get_from_object") ucrBase.clsRsyntax.iCallType = 2 + ucrBase.iHelpTopicID = 349 End Sub Private Sub SetDefaults() diff --git a/instat/frmMain.vb b/instat/frmMain.vb index b51d5f72e96..96dc3850cc2 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -562,7 +562,7 @@ Public Class frmMain End Sub Private Sub mnuManageDataFileSheetMetadata_Click(sender As Object, e As EventArgs) Handles mnuOrganiseDataObjectDataFrameMetadata.Click - dlgSheetMetadata.ShowDialog() + dlgDataFrameMetaData.ShowDialog() End Sub Private Sub mnuManageSheetColumnMetadata_Click(sender As Object, e As EventArgs) Handles mnuOrganiseDataFrameColumnMetadata.Click @@ -722,7 +722,7 @@ Public Class frmMain End Sub Private Sub mnuManageFactorSheet_Click(sender As Object, e As EventArgs) Handles mnuOrganiseColumnFactorFactorDataFrame.Click - dlgMakeSheets.ShowDialog() + dlgFactorDataFrame.ShowDialog() End Sub Private Sub mnuGraphicsUseGraph_Click(sender As Object, e As EventArgs) Handles mnuDescribeUseObjectsUseGraph.Click diff --git a/instat/instat.vbproj b/instat/instat.vbproj index a2e6cbd524e..4dd57b6d36a 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -375,10 +375,10 @@ Form - - dlgMakeSheets.vb + + dlgFactorDataFrame.vb - + Form @@ -537,10 +537,10 @@ Form - - dlgSheetMetadata.vb + + dlgDataFrameMetadata.vb - + Form @@ -2062,14 +2062,14 @@ dlgJitter.vb - - dlgMakeSheets.vb + + dlgFactorDataFrame.vb - - dlgMakeSheets.vb + + dlgFactorDataFrame.vb - - dlgMakeSheets.vb + + dlgFactorDataFrame.vb dlgMatchText.vb @@ -2080,6 +2080,9 @@ dlgMatchText.vb + + dlgMerge.vb + dlgMetadata.vb @@ -2293,14 +2296,14 @@ dlgScatterPlot.vb - - dlgSheetMetadata.vb + + dlgDataFrameMetadata.vb - - dlgSheetMetadata.vb + + dlgDataFrameMetadata.vb - - dlgSheetMetadata.vb + + dlgDataFrameMetadata.vb dlgSplitText.vb @@ -3989,6 +3992,8 @@ + + MyApplicationCodeGenerator Application.Designer.vb From b7d537a027a59785a81f66008700103c3a45358f Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Tue, 5 Jul 2016 20:36:11 +0300 Subject: [PATCH 8/9] Repacing old controls with the new user control --- instat/dlgGeneralForGraphics.Designer.vb | 77 ++---------- instat/dlgGeneralForGraphics.vb | 144 +++++++++++------------ 2 files changed, 80 insertions(+), 141 deletions(-) diff --git a/instat/dlgGeneralForGraphics.Designer.vb b/instat/dlgGeneralForGraphics.Designer.vb index 9f7b2ac7971..0d9836a09d0 100644 --- a/instat/dlgGeneralForGraphics.Designer.vb +++ b/instat/dlgGeneralForGraphics.Designer.vb @@ -22,67 +22,17 @@ Partial Class dlgGeneralForGraphics 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.lstLayers = New System.Windows.Forms.ListView() - Me.lblLayers = New System.Windows.Forms.Label() - Me.cmdAdd = New System.Windows.Forms.Button() - Me.cmdEdit = New System.Windows.Forms.Button() - Me.cmdDelete = New System.Windows.Forms.Button() - Me.UcrAdditionalLayers1 = New instat.ucrAdditionalLayers() + Me.ucrAdditionalLayers = New instat.ucrAdditionalLayers() Me.ucrSaveGraph = New instat.ucrSaveGraph() Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() ' - 'lstLayers + 'ucrAdditionalLayers ' - Me.lstLayers.Location = New System.Drawing.Point(12, 39) - Me.lstLayers.Name = "lstLayers" - Me.lstLayers.Size = New System.Drawing.Size(125, 149) - Me.lstLayers.TabIndex = 1 - Me.lstLayers.UseCompatibleStateImageBehavior = False - Me.lstLayers.View = System.Windows.Forms.View.List - ' - 'lblLayers - ' - Me.lblLayers.AutoSize = True - Me.lblLayers.Location = New System.Drawing.Point(13, 13) - Me.lblLayers.Name = "lblLayers" - Me.lblLayers.Size = New System.Drawing.Size(38, 13) - Me.lblLayers.TabIndex = 2 - Me.lblLayers.Text = "Layers" - ' - 'cmdAdd - ' - Me.cmdAdd.Location = New System.Drawing.Point(143, 39) - Me.cmdAdd.Name = "cmdAdd" - Me.cmdAdd.Size = New System.Drawing.Size(75, 23) - Me.cmdAdd.TabIndex = 3 - Me.cmdAdd.Text = "Add" - Me.cmdAdd.UseVisualStyleBackColor = True - ' - 'cmdEdit - ' - Me.cmdEdit.Location = New System.Drawing.Point(143, 68) - Me.cmdEdit.Name = "cmdEdit" - Me.cmdEdit.Size = New System.Drawing.Size(75, 23) - Me.cmdEdit.TabIndex = 3 - Me.cmdEdit.Text = "Edit" - Me.cmdEdit.UseVisualStyleBackColor = True - ' - 'cmdDelete - ' - Me.cmdDelete.Location = New System.Drawing.Point(143, 97) - Me.cmdDelete.Name = "cmdDelete" - Me.cmdDelete.Size = New System.Drawing.Size(75, 23) - Me.cmdDelete.TabIndex = 3 - Me.cmdDelete.Text = "Delete" - Me.cmdDelete.UseVisualStyleBackColor = True - ' - 'UcrAdditionalLayers1 - ' - Me.UcrAdditionalLayers1.Location = New System.Drawing.Point(212, 12) - Me.UcrAdditionalLayers1.Name = "UcrAdditionalLayers1" - Me.UcrAdditionalLayers1.Size = New System.Drawing.Size(198, 175) - Me.UcrAdditionalLayers1.TabIndex = 5 + Me.ucrAdditionalLayers.Location = New System.Drawing.Point(12, 12) + Me.ucrAdditionalLayers.Name = "ucrAdditionalLayers" + Me.ucrAdditionalLayers.Size = New System.Drawing.Size(222, 194) + Me.ucrAdditionalLayers.TabIndex = 5 ' 'ucrSaveGraph ' @@ -103,13 +53,8 @@ Partial Class dlgGeneralForGraphics Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(422, 303) - Me.Controls.Add(Me.UcrAdditionalLayers1) + Me.Controls.Add(Me.ucrAdditionalLayers) Me.Controls.Add(Me.ucrSaveGraph) - Me.Controls.Add(Me.cmdDelete) - Me.Controls.Add(Me.cmdEdit) - Me.Controls.Add(Me.cmdAdd) - Me.Controls.Add(Me.lblLayers) - Me.Controls.Add(Me.lstLayers) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgGeneralForGraphics" @@ -117,16 +62,10 @@ Partial Class dlgGeneralForGraphics Me.Tag = "General " Me.Text = "General " Me.ResumeLayout(False) - Me.PerformLayout() End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents lstLayers As ListView - Friend WithEvents lblLayers As Label - Friend WithEvents cmdAdd As Button - Friend WithEvents cmdEdit As Button - Friend WithEvents cmdDelete As Button Friend WithEvents ucrSaveGraph As ucrSaveGraph - Friend WithEvents UcrAdditionalLayers1 As ucrAdditionalLayers + Friend WithEvents ucrAdditionalLayers As ucrAdditionalLayers End Class diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index e2a6d77a80b..03ada9f8563 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -48,15 +48,15 @@ Public Class dlgGeneralForGraphics ucrSaveGraph.ucrInputGraphName.SetItemsTypeAsGraphs() ucrSaveGraph.ucrInputGraphName.SetDefaultTypeAsGraph() - UcrAdditionalLayers1.SetRSyntax(ucrBase.clsRsyntax) + ucrAdditionalLayers.SetRSyntax(ucrBase.clsRsyntax) End Sub Private Sub SetDefaults() iLayerIndex = 0 - lstLayers.Clear() + 'lstLayers.Clear() lstLayerComplete.Clear() - SetEditDeleteEnabled() + 'SetEditDeleteEnabled() strGlobalDataFrame = "" clsRggplotFunction.ClearParameters() clsGgplotAesFunction.ClearParameters() @@ -73,41 +73,41 @@ Public Class dlgGeneralForGraphics SetDefaults() End Sub - Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click - sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=Nothing, clsTempAesFunc:=clsGgplotAesFunction, bFixAes:=False, bFixGeom:=False, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=lstLayers.Items.Count = 0) - sdgLayerOptions.ShowDialog() - strGlobalDataFrame = sdgLayerOptions.strGlobalDataFrame - AddLayers() - End Sub - - Public Sub AddLayers(Optional lviCurrentItem As ListViewItem = Nothing) - Dim lviLayer As ListViewItem - Dim strLayerName As String - - If lviCurrentItem Is Nothing Then - iLayerIndex = iLayerIndex + 1 - strLayerName = iLayerIndex & "." & sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem - lviLayer = New ListViewItem(text:=strLayerName) - lstLayers.Items.Add(lviLayer) - lstLayerComplete.Add(sdgLayerOptions.TestForOKEnabled()) - Else - lviLayer = lviCurrentItem - lstLayerComplete(lstLayers.Items.IndexOf(lviLayer)) = sdgLayerOptions.TestForOKEnabled() - strLayerName = lviCurrentItem.Text - End If - - If sdgLayerOptions.TestForOKEnabled() Then - lstLayers.Items(lstLayers.Items.IndexOf(lviLayer)).ForeColor = Color.Green - Else - lstLayers.Items(lstLayers.Items.IndexOf(lviLayer)).ForeColor = Color.Red - End If - ucrBase.clsRsyntax.SetOperatorParameter(False, strParameterName:=strLayerName, clsRFunc:=sdgLayerOptions.clsGeomFunction.Clone()) - TestOKEnabled() - End Sub + 'Private Sub cmdAdd_Click(sender As Object, e As EventArgs) + ' sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=Nothing, clsTempAesFunc:=clsGgplotAesFunction, bFixAes:=False, bFixGeom:=False, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=lstLayers.Items.Count = 0) + ' sdgLayerOptions.ShowDialog() + ' strGlobalDataFrame = sdgLayerOptions.strGlobalDataFrame + ' AddLayers() + 'End Sub + + 'Public Sub AddLayers(Optional lviCurrentItem As ListViewItem = Nothing) + ' Dim lviLayer As ListViewItem + ' Dim strLayerName As String + + ' If lviCurrentItem Is Nothing Then + ' iLayerIndex = iLayerIndex + 1 + ' strLayerName = iLayerIndex & "." & sdgLayerOptions.ucrGeomWithAes.cboGeomList.SelectedItem + ' lviLayer = New ListViewItem(text:=strLayerName) + ' lstLayers.Items.Add(lviLayer) + ' lstLayerComplete.Add(sdgLayerOptions.TestForOKEnabled()) + ' Else + ' lviLayer = lviCurrentItem + ' lstLayerComplete(lstLayers.Items.IndexOf(lviLayer)) = sdgLayerOptions.TestForOKEnabled() + ' strLayerName = lviCurrentItem.Text + ' End If + + ' If sdgLayerOptions.TestForOKEnabled() Then + ' lstLayers.Items(lstLayers.Items.IndexOf(lviLayer)).ForeColor = Color.Green + ' Else + ' lstLayers.Items(lstLayers.Items.IndexOf(lviLayer)).ForeColor = Color.Red + ' End If + ' ucrBase.clsRsyntax.SetOperatorParameter(False, strParameterName:=strLayerName, clsRFunc:=sdgLayerOptions.clsGeomFunction.Clone()) + ' TestOKEnabled() + 'End Sub Public Sub TestOKEnabled() Dim bTemp As Boolean = False - For Each bTemp In UcrAdditionalLayers1.lstLayerComplete + For Each bTemp In ucrAdditionalLayers.lstLayerComplete If Not bTemp Then Exit For End If @@ -115,43 +115,43 @@ Public Class dlgGeneralForGraphics ucrBase.OKEnabled(bTemp) End Sub - Private Sub cmdDelete_Click(sender As Object, e As EventArgs) Handles cmdDelete.Click - If lstLayers.SelectedItems.Count = 1 Then - ucrBase.clsRsyntax.RemoveOperatorParameter(lstLayers.SelectedItems(0).Text) - lstLayerComplete.RemoveAt(lstLayers.SelectedIndices(0)) - lstLayers.Items.Remove(lstLayers.SelectedItems(0)) - End If - TestOKEnabled() - End Sub - - Private Sub lstLayers_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstLayers.SelectedIndexChanged - SetEditDeleteEnabled() - End Sub - - Private Sub SetEditDeleteEnabled() - If lstLayers.SelectedItems.Count = 1 Then - cmdDelete.Enabled = True - cmdEdit.Enabled = True - Else - cmdDelete.Enabled = False - cmdEdit.Enabled = False - End If - End Sub - - Private Sub cmdEdit_Click(sender As Object, e As EventArgs) Handles cmdEdit.Click - Dim clsSelectedGeom As RFunction - Dim clsLocalAes As RFunction - - clsSelectedGeom = ucrBase.clsRsyntax.GetParameter(lstLayers.SelectedItems(0).Text).clsArgumentFunction - If clsSelectedGeom.GetParameter("mapping") IsNot Nothing Then - clsLocalAes = clsSelectedGeom.GetParameter("mapping").clsArgumentFunction - Else - clsLocalAes = Nothing - End If - sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=clsSelectedGeom, clsTempAesFunc:=clsGgplotAesFunction, bFixAes:=False, bFixGeom:=True, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=False, clsTempLocalAes:=clsLocalAes) - sdgLayerOptions.ShowDialog() - AddLayers(lstLayers.SelectedItems(0)) - End Sub + 'Private Sub cmdDelete_Click(sender As Object, e As EventArgs) + ' If lstLayers.SelectedItems.Count = 1 Then + ' ucrBase.clsRsyntax.RemoveOperatorParameter(lstLayers.SelectedItems(0).Text) + ' lstLayerComplete.RemoveAt(lstLayers.SelectedIndices(0)) + ' lstLayers.Items.Remove(lstLayers.SelectedItems(0)) + ' End If + ' TestOKEnabled() + 'End Sub + + 'Private Sub lstLayers_SelectedIndexChanged(sender As Object, e As EventArgs) + ' SetEditDeleteEnabled() + 'End Sub + + 'Private Sub SetEditDeleteEnabled() + ' If lstLayers.SelectedItems.Count = 1 Then + ' cmdDelete.Enabled = True + ' cmdEdit.Enabled = True + ' Else + ' cmdDelete.Enabled = False + ' cmdEdit.Enabled = False + ' End If + 'End Sub + + 'Private Sub cmdEdit_Click(sender As Object, e As EventArgs) + ' Dim clsSelectedGeom As RFunction + ' Dim clsLocalAes As RFunction + + ' clsSelectedGeom = ucrBase.clsRsyntax.GetParameter(lstLayers.SelectedItems(0).Text).clsArgumentFunction + ' If clsSelectedGeom.GetParameter("mapping") IsNot Nothing Then + ' clsLocalAes = clsSelectedGeom.GetParameter("mapping").clsArgumentFunction + ' Else + ' clsLocalAes = Nothing + ' End If + ' sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=clsSelectedGeom, clsTempAesFunc:=clsGgplotAesFunction, bFixAes:=False, bFixGeom:=True, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=False, clsTempLocalAes:=clsLocalAes) + ' sdgLayerOptions.ShowDialog() + ' AddLayers(lstLayers.SelectedItems(0)) + 'End Sub Private Sub ucrSaveGraph_GraphNameChanged() Handles ucrSaveGraph.GraphNameChanged, ucrSaveGraph.SaveGraphCheckedChanged If ucrSaveGraph.bSaveGraph Then From 512d2f4b79e3166844f073c6adee1197323fc5f9 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Wed, 6 Jul 2016 11:04:05 +0300 Subject: [PATCH 9/9] Adding sub to set ggplot and aes function --- instat/dlgGeneralForGraphics.vb | 2 ++ instat/ucrAdditionalLayers.vb | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 03ada9f8563..736cb89ee39 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -49,6 +49,8 @@ Public Class dlgGeneralForGraphics ucrSaveGraph.ucrInputGraphName.SetDefaultTypeAsGraph() ucrAdditionalLayers.SetRSyntax(ucrBase.clsRsyntax) + ucrAdditionalLayers.SetGGplotFunction(clsRggplotFunction) + ucrAdditionalLayers.SetAesFunction(clsGgplotAesFunction) End Sub diff --git a/instat/ucrAdditionalLayers.vb b/instat/ucrAdditionalLayers.vb index a4918c6ea24..8f469b72f1f 100644 --- a/instat/ucrAdditionalLayers.vb +++ b/instat/ucrAdditionalLayers.vb @@ -17,6 +17,8 @@ Public Class ucrAdditionalLayers Public clsRSyntax As RSyntax + Public clsRggplotFunction As New RFunction + Public clsGgplotAesFunction As New RFunction Public bFirstLoad As Boolean = True Public lstLayerComplete As New List(Of Boolean) Public iLayerIndex As Integer @@ -35,6 +37,14 @@ Public Class ucrAdditionalLayers clsRSyntax = clsRSyntaxIn End Sub + Public Sub SetGGplotFunction(clsRggplotFunc As RFunction) + clsRggplotFunction = clsRggplotFunc + End Sub + + Public Sub SetAesFunction(clsAesFunc As RFunction) + clsGgplotAesFunction = clsAesFunc + End Sub + Private Sub ucrAdditionalLayers_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then SetDefaults() @@ -51,8 +61,9 @@ Public Class ucrAdditionalLayers End Sub + Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click - sdgLayerOptions.SetupLayer(clsTempGgPlot:=dlgGeneralForGraphics.clsRggplotFunction, clsTempGeomFunc:=Nothing, clsTempAesFunc:=dlgGeneralForGraphics.clsGgplotAesFunction, bFixAes:=False, bFixGeom:=False, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=lstLayers.Items.Count = 0) + sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=Nothing, clsTempAesFunc:=clsGgplotAesFunction, bFixAes:=False, bFixGeom:=False, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=lstLayers.Items.Count = 0) sdgLayerOptions.ShowDialog() strGlobalDataFrame = sdgLayerOptions.strGlobalDataFrame AddLayers()