diff --git a/instat/dlgGeneralForGraphics.Designer.vb b/instat/dlgGeneralForGraphics.Designer.vb index 83f97eba464..7b585b8bc6c 100644 --- a/instat/dlgGeneralForGraphics.Designer.vb +++ b/instat/dlgGeneralForGraphics.Designer.vb @@ -90,6 +90,7 @@ Partial Class dlgGeneralForGraphics Me.ucrGraphicsSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrAdditionalLayers = New instat.ucrAdditionalLayers() Me.ucrBase = New instat.ucrButtons() + Me.cmdColour = New System.Windows.Forms.Button() Me.grpAethetics.SuspendLayout() Me.ContextMenuPackagesList.SuspendLayout() Me.SuspendLayout() @@ -99,18 +100,18 @@ Partial Class dlgGeneralForGraphics Me.cmdOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdOptions.Location = New System.Drawing.Point(6, 401) Me.cmdOptions.Name = "cmdOptions" - Me.cmdOptions.Size = New System.Drawing.Size(135, 25) + Me.cmdOptions.Size = New System.Drawing.Size(60, 25) Me.cmdOptions.TabIndex = 7 Me.cmdOptions.Tag = "Options" - Me.cmdOptions.Text = "Plot Options" + Me.cmdOptions.Text = "Options" Me.cmdOptions.UseVisualStyleBackColor = True ' 'cmdFacets ' Me.cmdFacets.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFacets.Location = New System.Drawing.Point(139, 401) + Me.cmdFacets.Location = New System.Drawing.Point(65, 401) Me.cmdFacets.Name = "cmdFacets" - Me.cmdFacets.Size = New System.Drawing.Size(64, 25) + Me.cmdFacets.Size = New System.Drawing.Size(57, 25) Me.cmdFacets.TabIndex = 17 Me.cmdFacets.Tag = "Facets" Me.cmdFacets.Text = "Facets" @@ -119,20 +120,20 @@ Partial Class dlgGeneralForGraphics 'cmdTheme ' Me.cmdTheme.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdTheme.Location = New System.Drawing.Point(401, 401) + Me.cmdTheme.Location = New System.Drawing.Point(303, 401) Me.cmdTheme.Name = "cmdTheme" Me.cmdTheme.Size = New System.Drawing.Size(65, 25) Me.cmdTheme.TabIndex = 21 Me.cmdTheme.Tag = "Theme" - Me.cmdTheme.Text = "Theme" + Me.cmdTheme.Text = "Themes" Me.cmdTheme.UseVisualStyleBackColor = True ' 'cmdYAxis ' Me.cmdYAxis.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdYAxis.Location = New System.Drawing.Point(334, 401) + Me.cmdYAxis.Location = New System.Drawing.Point(240, 401) Me.cmdYAxis.Name = "cmdYAxis" - Me.cmdYAxis.Size = New System.Drawing.Size(69, 25) + Me.cmdYAxis.Size = New System.Drawing.Size(64, 25) Me.cmdYAxis.TabIndex = 20 Me.cmdYAxis.Tag = "" Me.cmdYAxis.Text = "Y-Axis" @@ -141,9 +142,9 @@ Partial Class dlgGeneralForGraphics 'cmdXAxis ' Me.cmdXAxis.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdXAxis.Location = New System.Drawing.Point(266, 401) + Me.cmdXAxis.Location = New System.Drawing.Point(180, 401) Me.cmdXAxis.Name = "cmdXAxis" - Me.cmdXAxis.Size = New System.Drawing.Size(71, 25) + Me.cmdXAxis.Size = New System.Drawing.Size(61, 25) Me.cmdXAxis.TabIndex = 19 Me.cmdXAxis.Tag = "" Me.cmdXAxis.Text = "X-Axis" @@ -152,9 +153,9 @@ Partial Class dlgGeneralForGraphics 'cmdTitles ' Me.cmdTitles.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdTitles.Location = New System.Drawing.Point(201, 401) + Me.cmdTitles.Location = New System.Drawing.Point(121, 401) Me.cmdTitles.Name = "cmdTitles" - Me.cmdTitles.Size = New System.Drawing.Size(67, 25) + Me.cmdTitles.Size = New System.Drawing.Size(60, 25) Me.cmdTitles.TabIndex = 18 Me.cmdTitles.Tag = "" Me.cmdTitles.Text = "Titles" @@ -539,12 +540,24 @@ Partial Class dlgGeneralForGraphics Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 9 ' + 'cmdColour + ' + Me.cmdColour.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdColour.Location = New System.Drawing.Point(367, 401) + Me.cmdColour.Name = "cmdColour" + Me.cmdColour.Size = New System.Drawing.Size(65, 25) + Me.cmdColour.TabIndex = 214 + Me.cmdColour.Tag = "Colour" + Me.cmdColour.Text = "Colour" + Me.cmdColour.UseVisualStyleBackColor = True + ' 'dlgGeneralForGraphics ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(478, 547) + Me.Controls.Add(Me.cmdColour) Me.Controls.Add(Me.cmdRHelp) Me.Controls.Add(Me.grpAethetics) Me.Controls.Add(Me.ucrInputLegendPosition) @@ -626,4 +639,5 @@ Partial Class dlgGeneralForGraphics Friend WithEvents lblYVariable As Label Friend WithEvents lblXVariable As Label Friend WithEvents ucrReceiverX As ucrReceiverSingle + Friend WithEvents cmdColour As Button End Class diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 0cbfcf389c5..eec9155014b 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -245,14 +245,12 @@ Public Class dlgGeneralForGraphics End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click - sdgPlots.DisableLayersTab() sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewLabsFunction:=clsLabsFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabsFunction, clsNewFacetFunction:=clsFacetsFunction, clsNewScaleFillViridisFunction:=clsScaleFillViridisFunction, clsNewScaleColourViridisFunction:=clsScaleColourViridisFunction, clsNewGlobalAesFunction:=clsGlobalAesFunction, clsNewXScaleDateFunction:=clsXScaleDateFunction, clsNewYScaleDateFunction:=clsYScaleDateFunction, ucrNewBaseSelector:=sdgLayerOptions.ucrGeomWithAes.ucrGeomWithAesSelector, clsNewAnnotateFunction:=clsAnnotateFunction, clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, bReset:=bResetSubdialog) sdgPlots.ShowDialog() - sdgPlots.EnableLayersTab() bResetSubdialog = False End Sub @@ -328,6 +326,18 @@ Public Class dlgGeneralForGraphics sdgPlots.EnableLayersTab() End Sub + Private Sub cmdColour_Click(sender As Object, e As EventArgs) Handles cmdColour.Click + sdgPlots.DisableLayersTab() + sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, + clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewLabsFunction:=clsLabsFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabsFunction, + clsNewFacetFunction:=clsFacetsFunction, clsNewScaleFillViridisFunction:=clsScaleFillViridisFunction, clsNewScaleColourViridisFunction:=clsScaleColourViridisFunction, clsNewGlobalAesFunction:=clsGlobalAesFunction, + clsNewXScaleDateFunction:=clsXScaleDateFunction, clsNewYScaleDateFunction:=clsYScaleDateFunction, ucrNewBaseSelector:=sdgLayerOptions.ucrGeomWithAes.ucrGeomWithAesSelector, clsNewAnnotateFunction:=clsAnnotateFunction, + clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, bReset:=bResetOptionsSubdialog) + sdgPlots.tbpPlotsOptions.SelectedIndex = 7 + sdgPlots.ShowDialog() + bResetOptionsSubdialog = False + sdgPlots.EnableLayersTab() + End Sub Private Sub ucrReceiverY_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverY.ControlValueChanged, ucrReceiverX.ControlValueChanged If Not ucrReceiverY.IsEmpty Then clsGlobalAesFunction.AddParameter("y", ucrReceiverY.GetVariableNames(False), iPosition:=1) diff --git a/instat/dlgScript.Designer.vb b/instat/dlgScript.Designer.vb index 816fa51eeb5..87f9545cc1c 100644 --- a/instat/dlgScript.Designer.vb +++ b/instat/dlgScript.Designer.vb @@ -22,278 +22,181 @@ Partial Class dlgScript 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.TabControl1 = New System.Windows.Forms.TabControl() - Me.TabPage1 = New System.Windows.Forms.TabPage() - Me.lblGetPackage = New System.Windows.Forms.Label() - Me.TabPage5 = New System.Windows.Forms.TabPage() - Me.lblDataFrame = New System.Windows.Forms.Label() - Me.TabPage2 = New System.Windows.Forms.TabPage() - Me.rdoGetObject = New System.Windows.Forms.RadioButton() - Me.Label1 = New System.Windows.Forms.Label() - Me.txtScript = New System.Windows.Forms.TextBox() - Me.lblGet = New System.Windows.Forms.Label() - Me.rdoGetDataFrame = New System.Windows.Forms.RadioButton() - Me.rdoGetColumn = New System.Windows.Forms.RadioButton() - Me.TabPage3 = New System.Windows.Forms.TabPage() + Me.tbFeatures = New System.Windows.Forms.TabControl() + Me.tbPageSaveData = New System.Windows.Forms.TabPage() + Me.ucrChkSaveDataFrameSingle = New instat.ucrCheck() Me.lblSaveDataFrame = New System.Windows.Forms.Label() - Me.rdoSaveObject = New System.Windows.Forms.RadioButton() + Me.ucrInputSaveDataFrame = New instat.ucrInputTextBox() + Me.lblSaveObjectFormat = New System.Windows.Forms.Label() + Me.ucrCboSaveOutputObjectFormat = New instat.ucrInputComboBox() + Me.lblSaveObjectType = New System.Windows.Forms.Label() + Me.ucrCboSaveOutputObjectType = New instat.ucrInputComboBox() + Me.rdoSaveOutputObject = New System.Windows.Forms.RadioButton() Me.rdoSaveDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSaveColumn = New System.Windows.Forms.RadioButton() - Me.TabPage4 = New System.Windows.Forms.TabPage() - Me.Label2 = New System.Windows.Forms.Label() - Me.TabPage6 = New System.Windows.Forms.TabPage() - Me.rdoFunction = New System.Windows.Forms.RadioButton() - Me.rdoData = New System.Windows.Forms.RadioButton() - Me.lstCollection = New System.Windows.Forms.ListView() + Me.ucrSaveObject = New instat.ucrSave() + Me.ucrDataFrameSaveOutputSelect = New instat.ucrDataFrame() + Me.ucrPnlSaveData = New instat.UcrPanel() + Me.tbPageGetData = New System.Windows.Forms.TabPage() + Me.ucrReceiverGetOutputObject = New instat.ucrReceiverSingle() + Me.ucrReceiverGetColumns = New instat.ucrReceiverMultiple() + Me.lblGetColumn = New System.Windows.Forms.Label() + Me.lblGetObjectType = New System.Windows.Forms.Label() + Me.rdoGetOutputObject = New System.Windows.Forms.RadioButton() + Me.lblGetOutputObject = New System.Windows.Forms.Label() + Me.rdoGetDataFrame = New System.Windows.Forms.RadioButton() + Me.rdoGetColumn = New System.Windows.Forms.RadioButton() + Me.ucrDataFrameGetDF = New instat.ucrDataFrame() + Me.ucrCboGetOutputObjectType = New instat.ucrInputComboBox() + Me.ucrPnlGetData = New instat.UcrPanel() + Me.ucrSelectorGetObject = New instat.ucrSelectorByDataFrameAddRemove() + Me.tbPageCommand = New System.Windows.Forms.TabPage() + Me.ucrInputRemoveObjects = New instat.ucrInputTextBox() + Me.rdoCommandPackage = New System.Windows.Forms.RadioButton() + Me.rdoCommandObject = New System.Windows.Forms.RadioButton() + Me.ucrCboCommandPackage = New instat.ucrInputComboBox() + Me.ucrPnlCommands = New instat.UcrPanel() + Me.tbPageExamples = New System.Windows.Forms.TabPage() + Me.rdoExampleData = New System.Windows.Forms.RadioButton() + Me.rdoExampleFunction = New System.Windows.Forms.RadioButton() + Me.ucrPnlExample = New instat.UcrPanel() + Me.lstExampleCollection = New System.Windows.Forms.ListView() Me.clmDatasets = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.clmDesc = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.Label3 = New System.Windows.Forms.Label() + Me.ucrCboExamplePackages = New instat.ucrInputComboBox() + Me.lblPreview = New System.Windows.Forms.Label() + Me.txtScript = New System.Windows.Forms.TextBox() Me.ucrBase = New instat.ucrButtons() - Me.ucrComboGetPackage = New instat.ucrInputComboBox() - Me.ucrInputDataFrame = New instat.ucrInputTextBox() - Me.ucrReceiverGet = New instat.ucrReceiverSingle() - Me.ucrPnlGetData = New instat.UcrPanel() - Me.ucrDataFrameGet = New instat.ucrDataFrame() - Me.ucrSelectorGet = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrInputSaveDataFrame = New instat.ucrInputTextBox() - Me.ucrSaveModel = New instat.ucrSave() - Me.ucrSaveTable = New instat.ucrSave() - Me.ucrSaveColumn = New instat.ucrSave() - Me.ucrSaveGraph = New instat.ucrSave() - Me.ucrPnlSaveData = New instat.UcrPanel() - Me.ucrDataFrameSave = New instat.ucrDataFrame() - Me.ucrInputRemoveObject = New instat.ucrInputTextBox() - Me.ucrPnlExample = New instat.UcrPanel() - Me.ucrComboGetPackages = New instat.ucrInputComboBox() - Me.ucrChkEditLibrary = New instat.ucrCheck() - Me.ucrInputPreviewLibrary = New instat.ucrInputTextBox() - Me.TabControl1.SuspendLayout() - Me.TabPage1.SuspendLayout() - Me.TabPage5.SuspendLayout() - Me.TabPage2.SuspendLayout() - Me.TabPage3.SuspendLayout() - Me.TabPage4.SuspendLayout() - Me.TabPage6.SuspendLayout() + Me.tbFeatures.SuspendLayout() + Me.tbPageSaveData.SuspendLayout() + Me.tbPageGetData.SuspendLayout() + Me.tbPageCommand.SuspendLayout() + Me.tbPageExamples.SuspendLayout() Me.SuspendLayout() ' - 'TabControl1 - ' - Me.TabControl1.Controls.Add(Me.TabPage1) - Me.TabControl1.Controls.Add(Me.TabPage5) - Me.TabControl1.Controls.Add(Me.TabPage2) - Me.TabControl1.Controls.Add(Me.TabPage3) - Me.TabControl1.Controls.Add(Me.TabPage4) - Me.TabControl1.Controls.Add(Me.TabPage6) - Me.TabControl1.Location = New System.Drawing.Point(8, 10) - Me.TabControl1.Margin = New System.Windows.Forms.Padding(4) - Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(698, 393) - Me.TabControl1.TabIndex = 31 - ' - 'TabPage1 - ' - Me.TabPage1.Controls.Add(Me.lblGetPackage) - Me.TabPage1.Controls.Add(Me.ucrComboGetPackage) - Me.TabPage1.Location = New System.Drawing.Point(4, 29) - Me.TabPage1.Name = "TabPage1" - Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage1.Size = New System.Drawing.Size(690, 360) - Me.TabPage1.TabIndex = 4 - Me.TabPage1.Text = "Library" - Me.TabPage1.UseVisualStyleBackColor = True - ' - 'lblGetPackage - ' - Me.lblGetPackage.AutoSize = True - Me.lblGetPackage.Location = New System.Drawing.Point(11, 35) - Me.lblGetPackage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblGetPackage.Name = "lblGetPackage" - Me.lblGetPackage.Size = New System.Drawing.Size(106, 20) - Me.lblGetPackage.TabIndex = 42 - Me.lblGetPackage.Text = "Get Package:" - ' - 'TabPage5 - ' - Me.TabPage5.Controls.Add(Me.lblDataFrame) - Me.TabPage5.Controls.Add(Me.ucrInputDataFrame) - Me.TabPage5.Location = New System.Drawing.Point(4, 29) - Me.TabPage5.Name = "TabPage5" - Me.TabPage5.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage5.Size = New System.Drawing.Size(690, 360) - Me.TabPage5.TabIndex = 5 - Me.TabPage5.Text = "Dataframe" - Me.TabPage5.UseVisualStyleBackColor = True - ' - 'lblDataFrame - ' - Me.lblDataFrame.AutoSize = True - Me.lblDataFrame.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDataFrame.Location = New System.Drawing.Point(7, 33) - Me.lblDataFrame.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblDataFrame.Name = "lblDataFrame" - Me.lblDataFrame.Size = New System.Drawing.Size(144, 20) - Me.lblDataFrame.TabIndex = 53 - Me.lblDataFrame.Tag = "" - Me.lblDataFrame.Text = "Data Frame Name:" - ' - 'TabPage2 - ' - Me.TabPage2.Controls.Add(Me.rdoGetObject) - Me.TabPage2.Controls.Add(Me.Label1) - Me.TabPage2.Controls.Add(Me.txtScript) - Me.TabPage2.Controls.Add(Me.lblGet) - Me.TabPage2.Controls.Add(Me.rdoGetDataFrame) - Me.TabPage2.Controls.Add(Me.rdoGetColumn) - Me.TabPage2.Controls.Add(Me.ucrReceiverGet) - Me.TabPage2.Controls.Add(Me.ucrPnlGetData) - Me.TabPage2.Controls.Add(Me.ucrDataFrameGet) - Me.TabPage2.Controls.Add(Me.ucrSelectorGet) - Me.TabPage2.Location = New System.Drawing.Point(4, 29) - Me.TabPage2.Margin = New System.Windows.Forms.Padding(4) - Me.TabPage2.Name = "TabPage2" - Me.TabPage2.Padding = New System.Windows.Forms.Padding(4) - Me.TabPage2.Size = New System.Drawing.Size(690, 360) - Me.TabPage2.TabIndex = 1 - Me.TabPage2.Text = "Get Data" - Me.TabPage2.UseVisualStyleBackColor = True - ' - 'rdoGetObject - ' - Me.rdoGetObject.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoGetObject.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGetObject.FlatAppearance.BorderSize = 2 - Me.rdoGetObject.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGetObject.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGetObject.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoGetObject.Location = New System.Drawing.Point(400, 18) - Me.rdoGetObject.Margin = New System.Windows.Forms.Padding(4) - Me.rdoGetObject.Name = "rdoGetObject" - Me.rdoGetObject.Size = New System.Drawing.Size(120, 45) - Me.rdoGetObject.TabIndex = 46 - Me.rdoGetObject.TabStop = True - Me.rdoGetObject.Text = "Object" - Me.rdoGetObject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoGetObject.UseVisualStyleBackColor = True - ' - 'Label1 - ' - Me.Label1.AutoSize = True - Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label1.Location = New System.Drawing.Point(8, 365) - Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(54, 20) - Me.Label1.TabIndex = 30 - Me.Label1.Text = "Script:" - ' - 'txtScript - ' - Me.txtScript.Location = New System.Drawing.Point(9, 389) - Me.txtScript.Margin = New System.Windows.Forms.Padding(4) - Me.txtScript.Multiline = True - Me.txtScript.Name = "txtScript" - Me.txtScript.ScrollBars = System.Windows.Forms.ScrollBars.Both - Me.txtScript.Size = New System.Drawing.Size(644, 184) - Me.txtScript.TabIndex = 32 - ' - 'lblGet - ' - Me.lblGet.AutoSize = True - Me.lblGet.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblGet.Location = New System.Drawing.Point(389, 162) - Me.lblGet.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblGet.Name = "lblGet" - Me.lblGet.Size = New System.Drawing.Size(126, 20) - Me.lblGet.TabIndex = 26 - Me.lblGet.Text = "Selected Object:" - ' - 'rdoGetDataFrame - ' - Me.rdoGetDataFrame.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoGetDataFrame.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGetDataFrame.FlatAppearance.BorderSize = 2 - Me.rdoGetDataFrame.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGetDataFrame.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGetDataFrame.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoGetDataFrame.Location = New System.Drawing.Point(166, 18) - Me.rdoGetDataFrame.Margin = New System.Windows.Forms.Padding(4) - Me.rdoGetDataFrame.Name = "rdoGetDataFrame" - Me.rdoGetDataFrame.Size = New System.Drawing.Size(120, 45) - Me.rdoGetDataFrame.TabIndex = 44 - Me.rdoGetDataFrame.TabStop = True - Me.rdoGetDataFrame.Text = "Data Frame" - Me.rdoGetDataFrame.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoGetDataFrame.UseVisualStyleBackColor = True - ' - 'rdoGetColumn - ' - Me.rdoGetColumn.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoGetColumn.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGetColumn.FlatAppearance.BorderSize = 2 - Me.rdoGetColumn.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGetColumn.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGetColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoGetColumn.Location = New System.Drawing.Point(284, 18) - Me.rdoGetColumn.Margin = New System.Windows.Forms.Padding(4) - Me.rdoGetColumn.Name = "rdoGetColumn" - Me.rdoGetColumn.Size = New System.Drawing.Size(120, 45) - Me.rdoGetColumn.TabIndex = 45 - Me.rdoGetColumn.TabStop = True - Me.rdoGetColumn.Text = "Column" - Me.rdoGetColumn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoGetColumn.UseVisualStyleBackColor = True - ' - 'TabPage3 - ' - Me.TabPage3.Controls.Add(Me.lblSaveDataFrame) - Me.TabPage3.Controls.Add(Me.rdoSaveObject) - Me.TabPage3.Controls.Add(Me.rdoSaveDataFrame) - Me.TabPage3.Controls.Add(Me.rdoSaveColumn) - Me.TabPage3.Controls.Add(Me.ucrInputSaveDataFrame) - Me.TabPage3.Controls.Add(Me.ucrSaveModel) - Me.TabPage3.Controls.Add(Me.ucrSaveTable) - Me.TabPage3.Controls.Add(Me.ucrSaveColumn) - Me.TabPage3.Controls.Add(Me.ucrSaveGraph) - Me.TabPage3.Controls.Add(Me.ucrPnlSaveData) - Me.TabPage3.Controls.Add(Me.ucrDataFrameSave) - Me.TabPage3.Location = New System.Drawing.Point(4, 29) - Me.TabPage3.Margin = New System.Windows.Forms.Padding(4) - Me.TabPage3.Name = "TabPage3" - Me.TabPage3.Size = New System.Drawing.Size(690, 360) - Me.TabPage3.TabIndex = 2 - Me.TabPage3.Text = "Save Results" - Me.TabPage3.UseVisualStyleBackColor = True + 'tbFeatures + ' + Me.tbFeatures.Controls.Add(Me.tbPageSaveData) + Me.tbFeatures.Controls.Add(Me.tbPageGetData) + Me.tbFeatures.Controls.Add(Me.tbPageCommand) + Me.tbFeatures.Controls.Add(Me.tbPageExamples) + Me.tbFeatures.Location = New System.Drawing.Point(8, 7) + Me.tbFeatures.Name = "tbFeatures" + Me.tbFeatures.SelectedIndex = 0 + Me.tbFeatures.Size = New System.Drawing.Size(446, 271) + Me.tbFeatures.TabIndex = 31 + ' + 'tbPageSaveData + ' + Me.tbPageSaveData.Controls.Add(Me.ucrChkSaveDataFrameSingle) + Me.tbPageSaveData.Controls.Add(Me.lblSaveDataFrame) + Me.tbPageSaveData.Controls.Add(Me.ucrInputSaveDataFrame) + Me.tbPageSaveData.Controls.Add(Me.lblSaveObjectFormat) + Me.tbPageSaveData.Controls.Add(Me.ucrCboSaveOutputObjectFormat) + Me.tbPageSaveData.Controls.Add(Me.lblSaveObjectType) + Me.tbPageSaveData.Controls.Add(Me.ucrCboSaveOutputObjectType) + Me.tbPageSaveData.Controls.Add(Me.rdoSaveOutputObject) + Me.tbPageSaveData.Controls.Add(Me.rdoSaveDataFrame) + Me.tbPageSaveData.Controls.Add(Me.rdoSaveColumn) + Me.tbPageSaveData.Controls.Add(Me.ucrSaveObject) + Me.tbPageSaveData.Controls.Add(Me.ucrDataFrameSaveOutputSelect) + Me.tbPageSaveData.Controls.Add(Me.ucrPnlSaveData) + Me.tbPageSaveData.Location = New System.Drawing.Point(4, 22) + Me.tbPageSaveData.Name = "tbPageSaveData" + Me.tbPageSaveData.Size = New System.Drawing.Size(438, 245) + Me.tbPageSaveData.TabIndex = 2 + Me.tbPageSaveData.Text = "Save Data" + Me.tbPageSaveData.UseVisualStyleBackColor = True + ' + 'ucrChkSaveDataFrameSingle + ' + Me.ucrChkSaveDataFrameSingle.AutoSize = True + Me.ucrChkSaveDataFrameSingle.Checked = False + Me.ucrChkSaveDataFrameSingle.Location = New System.Drawing.Point(91, 101) + Me.ucrChkSaveDataFrameSingle.Name = "ucrChkSaveDataFrameSingle" + Me.ucrChkSaveDataFrameSingle.Size = New System.Drawing.Size(146, 23) + Me.ucrChkSaveDataFrameSingle.TabIndex = 59 ' 'lblSaveDataFrame ' Me.lblSaveDataFrame.AutoSize = True - Me.lblSaveDataFrame.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSaveDataFrame.Location = New System.Drawing.Point(22, 88) - Me.lblSaveDataFrame.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSaveDataFrame.Location = New System.Drawing.Point(89, 52) Me.lblSaveDataFrame.Name = "lblSaveDataFrame" - Me.lblSaveDataFrame.Size = New System.Drawing.Size(144, 20) - Me.lblSaveDataFrame.TabIndex = 56 - Me.lblSaveDataFrame.Tag = "" - Me.lblSaveDataFrame.Text = "Data Frame Name:" - ' - 'rdoSaveObject - ' - Me.rdoSaveObject.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoSaveObject.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoSaveObject.FlatAppearance.BorderSize = 2 - Me.rdoSaveObject.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoSaveObject.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoSaveObject.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSaveObject.Location = New System.Drawing.Point(352, 21) - Me.rdoSaveObject.Margin = New System.Windows.Forms.Padding(4) - Me.rdoSaveObject.Name = "rdoSaveObject" - Me.rdoSaveObject.Size = New System.Drawing.Size(120, 45) - Me.rdoSaveObject.TabIndex = 51 - Me.rdoSaveObject.TabStop = True - Me.rdoSaveObject.Text = "Object" - Me.rdoSaveObject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoSaveObject.UseVisualStyleBackColor = True + Me.lblSaveDataFrame.Size = New System.Drawing.Size(65, 13) + Me.lblSaveDataFrame.TabIndex = 58 + Me.lblSaveDataFrame.Text = "Data Frame:" + ' + 'ucrInputSaveDataFrame + ' + Me.ucrInputSaveDataFrame.AddQuotesIfUnrecognised = True + Me.ucrInputSaveDataFrame.AutoSize = True + Me.ucrInputSaveDataFrame.IsMultiline = False + Me.ucrInputSaveDataFrame.IsReadOnly = False + Me.ucrInputSaveDataFrame.Location = New System.Drawing.Point(92, 70) + Me.ucrInputSaveDataFrame.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSaveDataFrame.Name = "ucrInputSaveDataFrame" + Me.ucrInputSaveDataFrame.Size = New System.Drawing.Size(145, 21) + Me.ucrInputSaveDataFrame.TabIndex = 57 + ' + 'lblSaveObjectFormat + ' + Me.lblSaveObjectFormat.AutoSize = True + Me.lblSaveObjectFormat.Location = New System.Drawing.Point(87, 145) + Me.lblSaveObjectFormat.Name = "lblSaveObjectFormat" + Me.lblSaveObjectFormat.Size = New System.Drawing.Size(42, 13) + Me.lblSaveObjectFormat.TabIndex = 56 + Me.lblSaveObjectFormat.Text = "Format:" + ' + 'ucrCboSaveOutputObjectFormat + ' + Me.ucrCboSaveOutputObjectFormat.AddQuotesIfUnrecognised = True + Me.ucrCboSaveOutputObjectFormat.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboSaveOutputObjectFormat.GetSetSelectedIndex = -1 + Me.ucrCboSaveOutputObjectFormat.IsReadOnly = False + Me.ucrCboSaveOutputObjectFormat.Location = New System.Drawing.Point(88, 160) + Me.ucrCboSaveOutputObjectFormat.Margin = New System.Windows.Forms.Padding(9) + Me.ucrCboSaveOutputObjectFormat.Name = "ucrCboSaveOutputObjectFormat" + Me.ucrCboSaveOutputObjectFormat.Size = New System.Drawing.Size(141, 21) + Me.ucrCboSaveOutputObjectFormat.TabIndex = 55 + ' + 'lblSaveObjectType + ' + Me.lblSaveObjectType.AutoSize = True + Me.lblSaveObjectType.Location = New System.Drawing.Point(85, 101) + Me.lblSaveObjectType.Name = "lblSaveObjectType" + Me.lblSaveObjectType.Size = New System.Drawing.Size(34, 13) + Me.lblSaveObjectType.TabIndex = 54 + Me.lblSaveObjectType.Text = "Type:" + ' + 'ucrCboSaveOutputObjectType + ' + Me.ucrCboSaveOutputObjectType.AddQuotesIfUnrecognised = True + Me.ucrCboSaveOutputObjectType.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboSaveOutputObjectType.GetSetSelectedIndex = -1 + Me.ucrCboSaveOutputObjectType.IsReadOnly = False + Me.ucrCboSaveOutputObjectType.Location = New System.Drawing.Point(87, 116) + Me.ucrCboSaveOutputObjectType.Margin = New System.Windows.Forms.Padding(9) + Me.ucrCboSaveOutputObjectType.Name = "ucrCboSaveOutputObjectType" + Me.ucrCboSaveOutputObjectType.Size = New System.Drawing.Size(144, 21) + Me.ucrCboSaveOutputObjectType.TabIndex = 53 + ' + 'rdoSaveOutputObject + ' + Me.rdoSaveOutputObject.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoSaveOutputObject.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoSaveOutputObject.FlatAppearance.BorderSize = 2 + Me.rdoSaveOutputObject.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoSaveOutputObject.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoSaveOutputObject.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoSaveOutputObject.Location = New System.Drawing.Point(235, 14) + Me.rdoSaveOutputObject.Name = "rdoSaveOutputObject" + Me.rdoSaveOutputObject.Size = New System.Drawing.Size(86, 30) + Me.rdoSaveOutputObject.TabIndex = 51 + Me.rdoSaveOutputObject.TabStop = True + Me.rdoSaveOutputObject.Text = "Output Object" + Me.rdoSaveOutputObject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoSaveOutputObject.UseVisualStyleBackColor = True ' 'rdoSaveDataFrame ' @@ -303,10 +206,9 @@ Partial Class dlgScript Me.rdoSaveDataFrame.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSaveDataFrame.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSaveDataFrame.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSaveDataFrame.Location = New System.Drawing.Point(118, 21) - Me.rdoSaveDataFrame.Margin = New System.Windows.Forms.Padding(4) + Me.rdoSaveDataFrame.Location = New System.Drawing.Point(79, 14) Me.rdoSaveDataFrame.Name = "rdoSaveDataFrame" - Me.rdoSaveDataFrame.Size = New System.Drawing.Size(120, 45) + Me.rdoSaveDataFrame.Size = New System.Drawing.Size(80, 30) Me.rdoSaveDataFrame.TabIndex = 49 Me.rdoSaveDataFrame.TabStop = True Me.rdoSaveDataFrame.Text = "Data Frame" @@ -321,396 +223,496 @@ Partial Class dlgScript Me.rdoSaveColumn.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSaveColumn.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSaveColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSaveColumn.Location = New System.Drawing.Point(236, 21) - Me.rdoSaveColumn.Margin = New System.Windows.Forms.Padding(4) + Me.rdoSaveColumn.Location = New System.Drawing.Point(157, 14) Me.rdoSaveColumn.Name = "rdoSaveColumn" - Me.rdoSaveColumn.Size = New System.Drawing.Size(120, 45) + Me.rdoSaveColumn.Size = New System.Drawing.Size(80, 30) Me.rdoSaveColumn.TabIndex = 50 Me.rdoSaveColumn.TabStop = True Me.rdoSaveColumn.Text = "Column" Me.rdoSaveColumn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoSaveColumn.UseVisualStyleBackColor = True ' - 'TabPage4 - ' - Me.TabPage4.Controls.Add(Me.Label2) - Me.TabPage4.Controls.Add(Me.ucrInputRemoveObject) - Me.TabPage4.Location = New System.Drawing.Point(4, 29) - Me.TabPage4.Margin = New System.Windows.Forms.Padding(4) - Me.TabPage4.Name = "TabPage4" - Me.TabPage4.Size = New System.Drawing.Size(690, 360) - Me.TabPage4.TabIndex = 3 - Me.TabPage4.Text = "Remove" - Me.TabPage4.UseVisualStyleBackColor = True - ' - 'Label2 - ' - Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(21, 48) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(59, 20) - Me.Label2.TabIndex = 35 - Me.Label2.Text = "Object:" - ' - 'TabPage6 - ' - Me.TabPage6.Controls.Add(Me.rdoFunction) - Me.TabPage6.Controls.Add(Me.rdoData) - Me.TabPage6.Controls.Add(Me.ucrPnlExample) - Me.TabPage6.Controls.Add(Me.lstCollection) - Me.TabPage6.Controls.Add(Me.Label3) - Me.TabPage6.Controls.Add(Me.ucrComboGetPackages) - Me.TabPage6.Location = New System.Drawing.Point(4, 29) - Me.TabPage6.Name = "TabPage6" - Me.TabPage6.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage6.Size = New System.Drawing.Size(690, 360) - Me.TabPage6.TabIndex = 6 - Me.TabPage6.Text = "Get Example" - Me.TabPage6.UseVisualStyleBackColor = True - ' - 'rdoFunction - ' - Me.rdoFunction.AutoSize = True - Me.rdoFunction.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoFunction.Location = New System.Drawing.Point(221, 55) - Me.rdoFunction.Margin = New System.Windows.Forms.Padding(4) - Me.rdoFunction.Name = "rdoFunction" - Me.rdoFunction.Size = New System.Drawing.Size(96, 24) - Me.rdoFunction.TabIndex = 50 - Me.rdoFunction.TabStop = True - Me.rdoFunction.Text = "Function" - Me.rdoFunction.UseVisualStyleBackColor = True - ' - 'rdoData - ' - Me.rdoData.AutoSize = True - Me.rdoData.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoData.Location = New System.Drawing.Point(41, 55) - Me.rdoData.Margin = New System.Windows.Forms.Padding(4) - Me.rdoData.Name = "rdoData" - Me.rdoData.Size = New System.Drawing.Size(69, 24) - Me.rdoData.TabIndex = 49 - Me.rdoData.TabStop = True - Me.rdoData.Text = "Data" - Me.rdoData.UseVisualStyleBackColor = True - ' - 'lstCollection - ' - Me.lstCollection.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.clmDatasets, Me.clmDesc}) - Me.lstCollection.FullRowSelect = True - Me.lstCollection.HideSelection = False - Me.lstCollection.Location = New System.Drawing.Point(17, 95) - Me.lstCollection.Margin = New System.Windows.Forms.Padding(4) - Me.lstCollection.MultiSelect = False - Me.lstCollection.Name = "lstCollection" - Me.lstCollection.ShowGroups = False - Me.lstCollection.ShowItemToolTips = True - Me.lstCollection.Size = New System.Drawing.Size(594, 258) - Me.lstCollection.Sorting = System.Windows.Forms.SortOrder.Ascending - Me.lstCollection.TabIndex = 44 - Me.lstCollection.UseCompatibleStateImageBehavior = False - Me.lstCollection.View = System.Windows.Forms.View.Details + 'ucrSaveObject ' - 'clmDatasets + Me.ucrSaveObject.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveObject.Location = New System.Drawing.Point(88, 193) + Me.ucrSaveObject.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveObject.Name = "ucrSaveObject" + Me.ucrSaveObject.Size = New System.Drawing.Size(258, 22) + Me.ucrSaveObject.TabIndex = 35 ' - Me.clmDatasets.Text = "Data" - Me.clmDatasets.Width = 142 + 'ucrDataFrameSaveOutputSelect ' - 'clmDesc + Me.ucrDataFrameSaveOutputSelect.AutoSize = True + Me.ucrDataFrameSaveOutputSelect.bDropUnusedFilterLevels = False + Me.ucrDataFrameSaveOutputSelect.bUseCurrentFilter = True + Me.ucrDataFrameSaveOutputSelect.Location = New System.Drawing.Point(86, 54) + Me.ucrDataFrameSaveOutputSelect.Margin = New System.Windows.Forms.Padding(0) + Me.ucrDataFrameSaveOutputSelect.Name = "ucrDataFrameSaveOutputSelect" + Me.ucrDataFrameSaveOutputSelect.Size = New System.Drawing.Size(224, 59) + Me.ucrDataFrameSaveOutputSelect.TabIndex = 29 ' - Me.clmDesc.Text = "Description" - Me.clmDesc.Width = 266 + 'ucrPnlSaveData ' - 'Label3 + Me.ucrPnlSaveData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlSaveData.Location = New System.Drawing.Point(13, 12) + Me.ucrPnlSaveData.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlSaveData.Name = "ucrPnlSaveData" + Me.ucrPnlSaveData.Size = New System.Drawing.Size(402, 36) + Me.ucrPnlSaveData.TabIndex = 47 ' - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(17, 23) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(71, 20) - Me.Label3.TabIndex = 43 - Me.Label3.Text = "Package" + 'tbPageGetData + ' + Me.tbPageGetData.Controls.Add(Me.ucrReceiverGetOutputObject) + Me.tbPageGetData.Controls.Add(Me.ucrReceiverGetColumns) + Me.tbPageGetData.Controls.Add(Me.lblGetColumn) + Me.tbPageGetData.Controls.Add(Me.lblGetObjectType) + Me.tbPageGetData.Controls.Add(Me.rdoGetOutputObject) + Me.tbPageGetData.Controls.Add(Me.lblGetOutputObject) + Me.tbPageGetData.Controls.Add(Me.rdoGetDataFrame) + Me.tbPageGetData.Controls.Add(Me.rdoGetColumn) + Me.tbPageGetData.Controls.Add(Me.ucrDataFrameGetDF) + Me.tbPageGetData.Controls.Add(Me.ucrCboGetOutputObjectType) + Me.tbPageGetData.Controls.Add(Me.ucrPnlGetData) + Me.tbPageGetData.Controls.Add(Me.ucrSelectorGetObject) + Me.tbPageGetData.Location = New System.Drawing.Point(4, 22) + Me.tbPageGetData.Name = "tbPageGetData" + Me.tbPageGetData.Padding = New System.Windows.Forms.Padding(3) + Me.tbPageGetData.Size = New System.Drawing.Size(438, 245) + Me.tbPageGetData.TabIndex = 1 + Me.tbPageGetData.Text = "Get Data" + Me.tbPageGetData.UseVisualStyleBackColor = True + ' + 'ucrReceiverGetOutputObject + ' + Me.ucrReceiverGetOutputObject.AutoSize = True + Me.ucrReceiverGetOutputObject.frmParent = Nothing + Me.ucrReceiverGetOutputObject.Location = New System.Drawing.Point(240, 117) + Me.ucrReceiverGetOutputObject.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverGetOutputObject.Name = "ucrReceiverGetOutputObject" + Me.ucrReceiverGetOutputObject.Selector = Nothing + Me.ucrReceiverGetOutputObject.Size = New System.Drawing.Size(138, 20) + Me.ucrReceiverGetOutputObject.strNcFilePath = "" + Me.ucrReceiverGetOutputObject.TabIndex = 27 + Me.ucrReceiverGetOutputObject.ucrSelector = Nothing + ' + 'ucrReceiverGetColumns + ' + Me.ucrReceiverGetColumns.AutoSize = True + Me.ucrReceiverGetColumns.frmParent = Nothing + Me.ucrReceiverGetColumns.Location = New System.Drawing.Point(243, 104) + Me.ucrReceiverGetColumns.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverGetColumns.Name = "ucrReceiverGetColumns" + Me.ucrReceiverGetColumns.Selector = Nothing + Me.ucrReceiverGetColumns.Size = New System.Drawing.Size(137, 105) + Me.ucrReceiverGetColumns.strNcFilePath = "" + Me.ucrReceiverGetColumns.TabIndex = 49 + Me.ucrReceiverGetColumns.ucrSelector = Nothing + ' + 'lblGetColumn + ' + Me.lblGetColumn.AutoSize = True + Me.lblGetColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblGetColumn.Location = New System.Drawing.Point(252, 88) + Me.lblGetColumn.Name = "lblGetColumn" + Me.lblGetColumn.Size = New System.Drawing.Size(45, 13) + Me.lblGetColumn.TabIndex = 50 + Me.lblGetColumn.Text = "Column:" + ' + 'lblGetObjectType + ' + Me.lblGetObjectType.AutoSize = True + Me.lblGetObjectType.Location = New System.Drawing.Point(239, 57) + Me.lblGetObjectType.Name = "lblGetObjectType" + Me.lblGetObjectType.Size = New System.Drawing.Size(34, 13) + Me.lblGetObjectType.TabIndex = 48 + Me.lblGetObjectType.Text = "Type:" + ' + 'rdoGetOutputObject + ' + Me.rdoGetOutputObject.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoGetOutputObject.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGetOutputObject.FlatAppearance.BorderSize = 2 + Me.rdoGetOutputObject.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGetOutputObject.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoGetOutputObject.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoGetOutputObject.Location = New System.Drawing.Point(235, 12) + Me.rdoGetOutputObject.Name = "rdoGetOutputObject" + Me.rdoGetOutputObject.Size = New System.Drawing.Size(85, 30) + Me.rdoGetOutputObject.TabIndex = 46 + Me.rdoGetOutputObject.TabStop = True + Me.rdoGetOutputObject.Text = "Output Object" + Me.rdoGetOutputObject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoGetOutputObject.UseVisualStyleBackColor = True + ' + 'lblGetOutputObject + ' + Me.lblGetOutputObject.AutoSize = True + Me.lblGetOutputObject.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblGetOutputObject.Location = New System.Drawing.Point(242, 101) + Me.lblGetOutputObject.Name = "lblGetOutputObject" + Me.lblGetOutputObject.Size = New System.Drawing.Size(41, 13) + Me.lblGetOutputObject.TabIndex = 26 + Me.lblGetOutputObject.Text = "Object:" ' - 'ucrBase + 'rdoGetDataFrame ' - Me.ucrBase.AutoSize = True - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(20, 503) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(611, 77) - Me.ucrBase.TabIndex = 49 - ' - 'ucrComboGetPackage - ' - Me.ucrComboGetPackage.AddQuotesIfUnrecognised = True - Me.ucrComboGetPackage.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrComboGetPackage.GetSetSelectedIndex = -1 - Me.ucrComboGetPackage.IsReadOnly = False - Me.ucrComboGetPackage.Location = New System.Drawing.Point(11, 60) - Me.ucrComboGetPackage.Margin = New System.Windows.Forms.Padding(14) - Me.ucrComboGetPackage.Name = "ucrComboGetPackage" - Me.ucrComboGetPackage.Size = New System.Drawing.Size(206, 32) - Me.ucrComboGetPackage.TabIndex = 41 - ' - 'ucrInputDataFrame - ' - Me.ucrInputDataFrame.AddQuotesIfUnrecognised = True - Me.ucrInputDataFrame.AutoSize = True - Me.ucrInputDataFrame.IsMultiline = False - Me.ucrInputDataFrame.IsReadOnly = False - Me.ucrInputDataFrame.Location = New System.Drawing.Point(205, 29) - Me.ucrInputDataFrame.Margin = New System.Windows.Forms.Padding(14) - Me.ucrInputDataFrame.Name = "ucrInputDataFrame" - Me.ucrInputDataFrame.Size = New System.Drawing.Size(206, 32) - Me.ucrInputDataFrame.TabIndex = 33 - ' - 'ucrReceiverGet - ' - Me.ucrReceiverGet.AutoSize = True - Me.ucrReceiverGet.frmParent = Me - Me.ucrReceiverGet.Location = New System.Drawing.Point(385, 186) - Me.ucrReceiverGet.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverGet.Name = "ucrReceiverGet" - Me.ucrReceiverGet.Selector = Nothing - Me.ucrReceiverGet.Size = New System.Drawing.Size(237, 30) - Me.ucrReceiverGet.strNcFilePath = "" - Me.ucrReceiverGet.TabIndex = 27 - Me.ucrReceiverGet.ucrSelector = Nothing + Me.rdoGetDataFrame.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoGetDataFrame.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGetDataFrame.FlatAppearance.BorderSize = 2 + Me.rdoGetDataFrame.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGetDataFrame.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoGetDataFrame.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoGetDataFrame.Location = New System.Drawing.Point(79, 12) + Me.rdoGetDataFrame.Name = "rdoGetDataFrame" + Me.rdoGetDataFrame.Size = New System.Drawing.Size(80, 30) + Me.rdoGetDataFrame.TabIndex = 44 + Me.rdoGetDataFrame.TabStop = True + Me.rdoGetDataFrame.Text = "Data Frame" + Me.rdoGetDataFrame.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoGetDataFrame.UseVisualStyleBackColor = True + ' + 'rdoGetColumn + ' + Me.rdoGetColumn.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoGetColumn.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGetColumn.FlatAppearance.BorderSize = 2 + Me.rdoGetColumn.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGetColumn.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoGetColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoGetColumn.Location = New System.Drawing.Point(157, 12) + Me.rdoGetColumn.Name = "rdoGetColumn" + Me.rdoGetColumn.Size = New System.Drawing.Size(80, 30) + Me.rdoGetColumn.TabIndex = 45 + Me.rdoGetColumn.TabStop = True + Me.rdoGetColumn.Text = "Column" + Me.rdoGetColumn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoGetColumn.UseVisualStyleBackColor = True + ' + 'ucrDataFrameGetDF + ' + Me.ucrDataFrameGetDF.AutoSize = True + Me.ucrDataFrameGetDF.bDropUnusedFilterLevels = False + Me.ucrDataFrameGetDF.bUseCurrentFilter = True + Me.ucrDataFrameGetDF.Location = New System.Drawing.Point(81, 55) + Me.ucrDataFrameGetDF.Margin = New System.Windows.Forms.Padding(0) + Me.ucrDataFrameGetDF.Name = "ucrDataFrameGetDF" + Me.ucrDataFrameGetDF.Size = New System.Drawing.Size(224, 59) + Me.ucrDataFrameGetDF.TabIndex = 31 + ' + 'ucrCboGetOutputObjectType + ' + Me.ucrCboGetOutputObjectType.AddQuotesIfUnrecognised = True + Me.ucrCboGetOutputObjectType.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboGetOutputObjectType.GetSetSelectedIndex = -1 + Me.ucrCboGetOutputObjectType.IsReadOnly = False + Me.ucrCboGetOutputObjectType.Location = New System.Drawing.Point(241, 72) + Me.ucrCboGetOutputObjectType.Margin = New System.Windows.Forms.Padding(9) + Me.ucrCboGetOutputObjectType.Name = "ucrCboGetOutputObjectType" + Me.ucrCboGetOutputObjectType.Size = New System.Drawing.Size(137, 21) + Me.ucrCboGetOutputObjectType.TabIndex = 47 ' 'ucrPnlGetData ' Me.ucrPnlGetData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlGetData.Location = New System.Drawing.Point(115, 15) - Me.ucrPnlGetData.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlGetData.Location = New System.Drawing.Point(5, 10) + Me.ucrPnlGetData.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlGetData.Name = "ucrPnlGetData" - Me.ucrPnlGetData.Size = New System.Drawing.Size(497, 54) + Me.ucrPnlGetData.Size = New System.Drawing.Size(402, 36) Me.ucrPnlGetData.TabIndex = 42 ' - 'ucrDataFrameGet - ' - Me.ucrDataFrameGet.AutoSize = True - Me.ucrDataFrameGet.bDropUnusedFilterLevels = False - Me.ucrDataFrameGet.bUseCurrentFilter = True - Me.ucrDataFrameGet.Location = New System.Drawing.Point(13, 76) - Me.ucrDataFrameGet.Margin = New System.Windows.Forms.Padding(0) - Me.ucrDataFrameGet.Name = "ucrDataFrameGet" - Me.ucrDataFrameGet.Size = New System.Drawing.Size(238, 70) - Me.ucrDataFrameGet.TabIndex = 31 - ' - 'ucrSelectorGet - ' - Me.ucrSelectorGet.AutoSize = True - Me.ucrSelectorGet.bDropUnusedFilterLevels = False - Me.ucrSelectorGet.bShowHiddenColumns = False - Me.ucrSelectorGet.bUseCurrentFilter = True - Me.ucrSelectorGet.Location = New System.Drawing.Point(13, 82) - Me.ucrSelectorGet.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorGet.Name = "ucrSelectorGet" - Me.ucrSelectorGet.Size = New System.Drawing.Size(480, 308) - Me.ucrSelectorGet.TabIndex = 34 + 'ucrSelectorGetObject + ' + Me.ucrSelectorGetObject.AutoSize = True + Me.ucrSelectorGetObject.bDropUnusedFilterLevels = False + Me.ucrSelectorGetObject.bShowHiddenColumns = False + Me.ucrSelectorGetObject.bUseCurrentFilter = True + Me.ucrSelectorGetObject.Location = New System.Drawing.Point(9, 52) + Me.ucrSelectorGetObject.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorGetObject.Name = "ucrSelectorGetObject" + Me.ucrSelectorGetObject.Size = New System.Drawing.Size(320, 274) + Me.ucrSelectorGetObject.TabIndex = 34 + ' + 'tbPageCommand + ' + Me.tbPageCommand.Controls.Add(Me.ucrInputRemoveObjects) + Me.tbPageCommand.Controls.Add(Me.rdoCommandPackage) + Me.tbPageCommand.Controls.Add(Me.rdoCommandObject) + Me.tbPageCommand.Controls.Add(Me.ucrCboCommandPackage) + Me.tbPageCommand.Controls.Add(Me.ucrPnlCommands) + Me.tbPageCommand.Location = New System.Drawing.Point(4, 22) + Me.tbPageCommand.Name = "tbPageCommand" + Me.tbPageCommand.Size = New System.Drawing.Size(438, 245) + Me.tbPageCommand.TabIndex = 3 + Me.tbPageCommand.Text = "Commands" + Me.tbPageCommand.UseVisualStyleBackColor = True + ' + 'ucrInputRemoveObjects + ' + Me.ucrInputRemoveObjects.AddQuotesIfUnrecognised = True + Me.ucrInputRemoveObjects.AutoSize = True + Me.ucrInputRemoveObjects.IsMultiline = False + Me.ucrInputRemoveObjects.IsReadOnly = False + Me.ucrInputRemoveObjects.Location = New System.Drawing.Point(156, 56) + Me.ucrInputRemoveObjects.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputRemoveObjects.Name = "ucrInputRemoveObjects" + Me.ucrInputRemoveObjects.Size = New System.Drawing.Size(145, 21) + Me.ucrInputRemoveObjects.TabIndex = 2 + ' + 'rdoCommandPackage + ' + Me.rdoCommandPackage.AutoSize = True + Me.rdoCommandPackage.Location = New System.Drawing.Point(25, 23) + Me.rdoCommandPackage.Margin = New System.Windows.Forms.Padding(2) + Me.rdoCommandPackage.Name = "rdoCommandPackage" + Me.rdoCommandPackage.Size = New System.Drawing.Size(91, 17) + Me.rdoCommandPackage.TabIndex = 46 + Me.rdoCommandPackage.TabStop = True + Me.rdoCommandPackage.Text = "Get Package:" + Me.rdoCommandPackage.UseVisualStyleBackColor = True + ' + 'rdoCommandObject + ' + Me.rdoCommandObject.AutoSize = True + Me.rdoCommandObject.Location = New System.Drawing.Point(25, 60) + Me.rdoCommandObject.Margin = New System.Windows.Forms.Padding(2) + Me.rdoCommandObject.Name = "rdoCommandObject" + Me.rdoCommandObject.Size = New System.Drawing.Size(113, 17) + Me.rdoCommandObject.TabIndex = 48 + Me.rdoCommandObject.TabStop = True + Me.rdoCommandObject.Text = "Remove Object(s):" + Me.rdoCommandObject.UseVisualStyleBackColor = True + ' + 'ucrCboCommandPackage + ' + Me.ucrCboCommandPackage.AddQuotesIfUnrecognised = True + Me.ucrCboCommandPackage.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboCommandPackage.GetSetSelectedIndex = -1 + Me.ucrCboCommandPackage.IsReadOnly = False + Me.ucrCboCommandPackage.Location = New System.Drawing.Point(156, 19) + Me.ucrCboCommandPackage.Margin = New System.Windows.Forms.Padding(9) + Me.ucrCboCommandPackage.Name = "ucrCboCommandPackage" + Me.ucrCboCommandPackage.Size = New System.Drawing.Size(137, 21) + Me.ucrCboCommandPackage.TabIndex = 44 + ' + 'ucrPnlCommands + ' + Me.ucrPnlCommands.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlCommands.Location = New System.Drawing.Point(9, 8) + Me.ucrPnlCommands.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlCommands.Name = "ucrPnlCommands" + Me.ucrPnlCommands.Size = New System.Drawing.Size(333, 143) + Me.ucrPnlCommands.TabIndex = 47 + ' + 'tbPageExamples + ' + Me.tbPageExamples.Controls.Add(Me.rdoExampleData) + Me.tbPageExamples.Controls.Add(Me.rdoExampleFunction) + Me.tbPageExamples.Controls.Add(Me.ucrPnlExample) + Me.tbPageExamples.Controls.Add(Me.lstExampleCollection) + Me.tbPageExamples.Controls.Add(Me.Label3) + Me.tbPageExamples.Controls.Add(Me.ucrCboExamplePackages) + Me.tbPageExamples.Location = New System.Drawing.Point(4, 22) + Me.tbPageExamples.Name = "tbPageExamples" + Me.tbPageExamples.Size = New System.Drawing.Size(438, 245) + Me.tbPageExamples.TabIndex = 4 + Me.tbPageExamples.Text = "Examples" + Me.tbPageExamples.UseVisualStyleBackColor = True + ' + 'rdoExampleData + ' + Me.rdoExampleData.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoExampleData.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoExampleData.FlatAppearance.BorderSize = 2 + Me.rdoExampleData.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoExampleData.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoExampleData.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoExampleData.Location = New System.Drawing.Point(14, 54) + Me.rdoExampleData.Name = "rdoExampleData" + Me.rdoExampleData.Size = New System.Drawing.Size(80, 30) + Me.rdoExampleData.TabIndex = 57 + Me.rdoExampleData.TabStop = True + Me.rdoExampleData.Text = "Data" + Me.rdoExampleData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoExampleData.UseVisualStyleBackColor = True + ' + 'rdoExampleFunction + ' + Me.rdoExampleFunction.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoExampleFunction.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoExampleFunction.FlatAppearance.BorderSize = 2 + Me.rdoExampleFunction.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoExampleFunction.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoExampleFunction.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoExampleFunction.Location = New System.Drawing.Point(92, 54) + Me.rdoExampleFunction.Name = "rdoExampleFunction" + Me.rdoExampleFunction.Size = New System.Drawing.Size(80, 30) + Me.rdoExampleFunction.TabIndex = 58 + Me.rdoExampleFunction.TabStop = True + Me.rdoExampleFunction.Text = "Function" + Me.rdoExampleFunction.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoExampleFunction.UseVisualStyleBackColor = True ' - 'ucrInputSaveDataFrame + 'ucrPnlExample ' - Me.ucrInputSaveDataFrame.AddQuotesIfUnrecognised = True - Me.ucrInputSaveDataFrame.AutoSize = True - Me.ucrInputSaveDataFrame.IsMultiline = False - Me.ucrInputSaveDataFrame.IsReadOnly = False - Me.ucrInputSaveDataFrame.Location = New System.Drawing.Point(220, 84) - Me.ucrInputSaveDataFrame.Margin = New System.Windows.Forms.Padding(14) - Me.ucrInputSaveDataFrame.Name = "ucrInputSaveDataFrame" - Me.ucrInputSaveDataFrame.Size = New System.Drawing.Size(206, 32) - Me.ucrInputSaveDataFrame.TabIndex = 54 + Me.ucrPnlExample.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlExample.Location = New System.Drawing.Point(7, 51) + Me.ucrPnlExample.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlExample.Name = "ucrPnlExample" + Me.ucrPnlExample.Size = New System.Drawing.Size(402, 34) + Me.ucrPnlExample.TabIndex = 56 + ' + 'lstExampleCollection + ' + Me.lstExampleCollection.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.clmDatasets, Me.clmDesc}) + Me.lstExampleCollection.FullRowSelect = True + Me.lstExampleCollection.HideSelection = False + Me.lstExampleCollection.Location = New System.Drawing.Point(3, 93) + Me.lstExampleCollection.MultiSelect = False + Me.lstExampleCollection.Name = "lstExampleCollection" + Me.lstExampleCollection.ShowGroups = False + Me.lstExampleCollection.ShowItemToolTips = True + Me.lstExampleCollection.Size = New System.Drawing.Size(415, 146) + Me.lstExampleCollection.Sorting = System.Windows.Forms.SortOrder.Ascending + Me.lstExampleCollection.TabIndex = 53 + Me.lstExampleCollection.UseCompatibleStateImageBehavior = False + Me.lstExampleCollection.View = System.Windows.Forms.View.Details ' - 'ucrSaveModel + 'clmDatasets ' - Me.ucrSaveModel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveModel.Location = New System.Drawing.Point(20, 254) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(406, 33) - Me.ucrSaveModel.TabIndex = 32 + Me.clmDatasets.Text = "Data" + Me.clmDatasets.Width = 142 ' - 'ucrSaveTable + 'clmDesc ' - Me.ucrSaveTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveTable.Location = New System.Drawing.Point(18, 202) - Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(408, 33) - Me.ucrSaveTable.TabIndex = 30 + Me.clmDesc.Text = "Description" + Me.clmDesc.Width = 266 ' - 'ucrSaveColumn + 'Label3 ' - Me.ucrSaveColumn.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveColumn.Location = New System.Drawing.Point(18, 153) - Me.ucrSaveColumn.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrSaveColumn.Name = "ucrSaveColumn" - Me.ucrSaveColumn.Size = New System.Drawing.Size(411, 33) - Me.ucrSaveColumn.TabIndex = 35 + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(13, 5) + Me.Label3.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(50, 13) + Me.Label3.TabIndex = 52 + Me.Label3.Text = "Package" ' - 'ucrSaveGraph + 'ucrCboExamplePackages ' - Me.ucrSaveGraph.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveGraph.Location = New System.Drawing.Point(20, 152) - Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrSaveGraph.Name = "ucrSaveGraph" - Me.ucrSaveGraph.Size = New System.Drawing.Size(406, 33) - Me.ucrSaveGraph.TabIndex = 26 + Me.ucrCboExamplePackages.AddQuotesIfUnrecognised = True + Me.ucrCboExamplePackages.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboExamplePackages.GetSetSelectedIndex = -1 + Me.ucrCboExamplePackages.IsReadOnly = False + Me.ucrCboExamplePackages.Location = New System.Drawing.Point(14, 22) + Me.ucrCboExamplePackages.Margin = New System.Windows.Forms.Padding(9) + Me.ucrCboExamplePackages.Name = "ucrCboExamplePackages" + Me.ucrCboExamplePackages.Size = New System.Drawing.Size(137, 21) + Me.ucrCboExamplePackages.TabIndex = 51 ' - 'ucrPnlSaveData + 'lblPreview ' - Me.ucrPnlSaveData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlSaveData.Location = New System.Drawing.Point(20, 18) - Me.ucrPnlSaveData.Margin = New System.Windows.Forms.Padding(9) - Me.ucrPnlSaveData.Name = "ucrPnlSaveData" - Me.ucrPnlSaveData.Size = New System.Drawing.Size(603, 54) - Me.ucrPnlSaveData.TabIndex = 47 + Me.lblPreview.AutoSize = True + Me.lblPreview.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblPreview.Location = New System.Drawing.Point(9, 281) + Me.lblPreview.Name = "lblPreview" + Me.lblPreview.Size = New System.Drawing.Size(48, 13) + Me.lblPreview.TabIndex = 30 + Me.lblPreview.Text = "Preview:" ' - 'ucrDataFrameSave - ' - Me.ucrDataFrameSave.AutoSize = True - Me.ucrDataFrameSave.bDropUnusedFilterLevels = False - Me.ucrDataFrameSave.bUseCurrentFilter = True - Me.ucrDataFrameSave.Location = New System.Drawing.Point(20, 74) - Me.ucrDataFrameSave.Margin = New System.Windows.Forms.Padding(0) - Me.ucrDataFrameSave.Name = "ucrDataFrameSave" - Me.ucrDataFrameSave.Size = New System.Drawing.Size(252, 59) - Me.ucrDataFrameSave.TabIndex = 29 - ' - 'ucrInputRemoveObject - ' - Me.ucrInputRemoveObject.AddQuotesIfUnrecognised = True - Me.ucrInputRemoveObject.AutoSize = True - Me.ucrInputRemoveObject.IsMultiline = False - Me.ucrInputRemoveObject.IsReadOnly = False - Me.ucrInputRemoveObject.Location = New System.Drawing.Point(97, 45) - Me.ucrInputRemoveObject.Margin = New System.Windows.Forms.Padding(14) - Me.ucrInputRemoveObject.Name = "ucrInputRemoveObject" - Me.ucrInputRemoveObject.Size = New System.Drawing.Size(454, 32) - Me.ucrInputRemoveObject.TabIndex = 34 + 'txtScript ' - 'ucrPnlExample + Me.txtScript.Location = New System.Drawing.Point(5, 299) + Me.txtScript.Multiline = True + Me.txtScript.Name = "txtScript" + Me.txtScript.ScrollBars = System.Windows.Forms.ScrollBars.Both + Me.txtScript.Size = New System.Drawing.Size(445, 96) + Me.txtScript.TabIndex = 32 ' - Me.ucrPnlExample.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlExample.Location = New System.Drawing.Point(21, 52) - Me.ucrPnlExample.Margin = New System.Windows.Forms.Padding(9) - Me.ucrPnlExample.Name = "ucrPnlExample" - Me.ucrPnlExample.Size = New System.Drawing.Size(376, 30) - Me.ucrPnlExample.TabIndex = 48 - ' - 'ucrComboGetPackages - ' - Me.ucrComboGetPackages.AddQuotesIfUnrecognised = True - Me.ucrComboGetPackages.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrComboGetPackages.GetSetSelectedIndex = -1 - Me.ucrComboGetPackages.IsReadOnly = False - Me.ucrComboGetPackages.Location = New System.Drawing.Point(115, 17) - Me.ucrComboGetPackages.Margin = New System.Windows.Forms.Padding(14) - Me.ucrComboGetPackages.Name = "ucrComboGetPackages" - Me.ucrComboGetPackages.Size = New System.Drawing.Size(206, 32) - Me.ucrComboGetPackages.TabIndex = 42 - ' - 'ucrChkEditLibrary - ' - Me.ucrChkEditLibrary.AutoSize = True - Me.ucrChkEditLibrary.Checked = False - Me.ucrChkEditLibrary.Location = New System.Drawing.Point(13, 414) - Me.ucrChkEditLibrary.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) - Me.ucrChkEditLibrary.Name = "ucrChkEditLibrary" - Me.ucrChkEditLibrary.Size = New System.Drawing.Size(130, 58) - Me.ucrChkEditLibrary.TabIndex = 48 - ' - 'ucrInputPreviewLibrary - ' - Me.ucrInputPreviewLibrary.AddQuotesIfUnrecognised = True - Me.ucrInputPreviewLibrary.AutoScroll = True - Me.ucrInputPreviewLibrary.AutoSize = True - Me.ucrInputPreviewLibrary.IsMultiline = True - Me.ucrInputPreviewLibrary.IsReadOnly = True - Me.ucrInputPreviewLibrary.Location = New System.Drawing.Point(149, 408) - Me.ucrInputPreviewLibrary.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) - Me.ucrInputPreviewLibrary.Name = "ucrInputPreviewLibrary" - Me.ucrInputPreviewLibrary.Size = New System.Drawing.Size(548, 90) - Me.ucrInputPreviewLibrary.TabIndex = 47 + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(6, 399) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 16 ' 'dlgScript ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(714, 583) + Me.ClientSize = New System.Drawing.Size(458, 458) + Me.Controls.Add(Me.txtScript) + Me.Controls.Add(Me.lblPreview) + Me.Controls.Add(Me.tbFeatures) Me.Controls.Add(Me.ucrBase) - Me.Controls.Add(Me.TabControl1) - Me.Controls.Add(Me.ucrChkEditLibrary) - Me.Controls.Add(Me.ucrInputPreviewLibrary) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgScript" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Insert Line" - Me.TabControl1.ResumeLayout(False) - Me.TabPage1.ResumeLayout(False) - Me.TabPage1.PerformLayout() - Me.TabPage5.ResumeLayout(False) - Me.TabPage5.PerformLayout() - Me.TabPage2.ResumeLayout(False) - Me.TabPage2.PerformLayout() - Me.TabPage3.ResumeLayout(False) - Me.TabPage3.PerformLayout() - Me.TabPage4.ResumeLayout(False) - Me.TabPage4.PerformLayout() - Me.TabPage6.ResumeLayout(False) - Me.TabPage6.PerformLayout() + Me.Text = "Script" + Me.tbFeatures.ResumeLayout(False) + Me.tbPageSaveData.ResumeLayout(False) + Me.tbPageSaveData.PerformLayout() + Me.tbPageGetData.ResumeLayout(False) + Me.tbPageGetData.PerformLayout() + Me.tbPageCommand.ResumeLayout(False) + Me.tbPageCommand.PerformLayout() + Me.tbPageExamples.ResumeLayout(False) + Me.tbPageExamples.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents ucrDataFrameGet As ucrDataFrame - Friend WithEvents TabControl1 As TabControl - Friend WithEvents TabPage2 As TabPage - Friend WithEvents TabPage3 As TabPage - Friend WithEvents Label1 As Label - Friend WithEvents ucrSaveColumn As ucrSave - Friend WithEvents TabPage4 As TabPage - Friend WithEvents ucrDataFrameSave As ucrDataFrame - Friend WithEvents ucrSaveGraph As ucrSave - Friend WithEvents ucrSaveModel As ucrSave - Friend WithEvents ucrSaveTable As ucrSave - Friend WithEvents ucrSelectorGet As ucrSelectorByDataFrameAddRemove + + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrDataFrameGetDF As ucrDataFrame + Friend WithEvents tbFeatures As TabControl + Friend WithEvents tbPageGetData As TabPage + Friend WithEvents tbPageSaveData As TabPage + Friend WithEvents lblPreview As Label + Friend WithEvents ucrSaveObject As ucrSave + Friend WithEvents tbPageCommand As TabPage + Friend WithEvents ucrDataFrameSaveOutputSelect As ucrDataFrame Friend WithEvents ucrSelectorGetObject As ucrSelectorByDataFrameAddRemove - Friend WithEvents lblGet As Label - Friend WithEvents ucrReceiverGet As ucrReceiverSingle + Friend WithEvents lblGetOutputObject As Label + Friend WithEvents ucrReceiverGetOutputObject As ucrReceiverSingle Friend WithEvents ucrPnlGetData As UcrPanel Friend WithEvents rdoGetDataFrame As RadioButton Friend WithEvents rdoGetColumn As RadioButton - Friend WithEvents rdoGetObject As RadioButton - Friend WithEvents rdoSaveObject As RadioButton + Friend WithEvents rdoGetOutputObject As RadioButton + Friend WithEvents rdoSaveOutputObject As RadioButton Friend WithEvents rdoSaveDataFrame As RadioButton Friend WithEvents rdoSaveColumn As RadioButton Friend WithEvents ucrPnlSaveData As UcrPanel Friend WithEvents txtScript As TextBox - Friend WithEvents TabPage1 As TabPage - Friend WithEvents TabPage5 As TabPage - Friend WithEvents lblGetPackage As Label - Friend WithEvents ucrComboGetPackage As ucrInputComboBox - Friend WithEvents ucrInputPreviewLibrary As ucrInputTextBox - Friend WithEvents ucrChkEditLibrary As ucrCheck - Friend WithEvents ucrInputDataFrame As ucrInputTextBox - Friend WithEvents lblDataFrame As Label - Friend WithEvents lblSaveDataFrame As Label - Friend WithEvents ucrInputSaveDataFrame As ucrInputTextBox - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents Label2 As Label - Friend WithEvents ucrInputRemoveObject As ucrInputTextBox - Friend WithEvents TabPage6 As TabPage - Friend WithEvents Label3 As Label - Friend WithEvents ucrComboGetPackages As ucrInputComboBox - Friend WithEvents lstCollection As ListView + Friend WithEvents lblGetObjectType As Label + Friend WithEvents ucrCboGetOutputObjectType As ucrInputComboBox + Friend WithEvents tbPageExamples As TabPage + Friend WithEvents lblSaveObjectType As Label + Friend WithEvents ucrCboSaveOutputObjectType As ucrInputComboBox + Friend WithEvents lblSaveObjectFormat As Label + Friend WithEvents ucrCboSaveOutputObjectFormat As ucrInputComboBox + Friend WithEvents ucrInputRemoveObjects As ucrInputTextBox + Friend WithEvents ucrCboCommandPackage As ucrInputComboBox + Friend WithEvents ucrReceiverGetColumns As ucrReceiverMultiple + Friend WithEvents lblGetColumn As Label + Friend WithEvents lstExampleCollection As ListView Friend WithEvents clmDatasets As ColumnHeader Friend WithEvents clmDesc As ColumnHeader + Friend WithEvents Label3 As Label + Friend WithEvents ucrCboExamplePackages As ucrInputComboBox + Friend WithEvents rdoExampleData As RadioButton + Friend WithEvents rdoExampleFunction As RadioButton Friend WithEvents ucrPnlExample As UcrPanel - Friend WithEvents rdoFunction As RadioButton - Friend WithEvents rdoData As RadioButton + Friend WithEvents ucrPnlCommands As UcrPanel + Friend WithEvents rdoCommandPackage As RadioButton + Friend WithEvents rdoCommandObject As RadioButton + Friend WithEvents lblSaveDataFrame As Label + Friend WithEvents ucrInputSaveDataFrame As ucrInputTextBox + Friend WithEvents ucrChkSaveDataFrameSingle As ucrCheck End Class diff --git a/instat/dlgScript.vb b/instat/dlgScript.vb index 7d76ba84368..92a0c4b4ca8 100644 --- a/instat/dlgScript.vb +++ b/instat/dlgScript.vb @@ -19,102 +19,104 @@ Imports instat.Translations Public Class dlgScript Private strComment As String = "Code generated by the dialog, Script" Private bFirstload As Boolean = True - Private bReset As Boolean = True - Private clsLibraryFunction, clsLibraryExampleFunction, clsGetDataFrameFunction, clsSaveColumnFunction, clsConstantDummyFunction, clsGetColumnFunction, - clsSaveGraphFunction, clsTempPreviewFunction, clsLibraryExpFunction, clsImportNewDataFrame, clsRFunctionList, clsSaveTableFunction, clsSaveModelFunction As New RFunction - Private lstAssignToStrings As New List(Of String) - Public iCurrentPos As Integer - Private strSelectedPackage As String = "" + Private clsSaveDataFunction As New RFunction + Private dctOutputObjectTypes As New Dictionary(Of String, String) + Private dctOutputObjectFormats As New Dictionary(Of String, String) Private Sub dlgScript_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then InitialiseDialog() - bFirstload = False - End If - If bReset Then SetDefaults() + bFirstload = False End If - SetRCodeForControls(bReset) - bReset = False autoTranslate(Me) End Sub Private Sub InitialiseDialog() - 'todo. the iCallType will probably be dynamic - 'ucrBase.clsRsyntax.iCallType = 2 - 'ucrBase.clsRsyntax.bSeparateThread = False + ' Supported output object types and formats + dctOutputObjectTypes.Add("Summary", RObjectTypeLabel.Summary) + dctOutputObjectTypes.Add("Table", RObjectTypeLabel.Table) + dctOutputObjectTypes.Add("Graph", RObjectTypeLabel.Graph) + dctOutputObjectTypes.Add("Model", RObjectTypeLabel.Model) + dctOutputObjectTypes.Add("Structure", RObjectTypeLabel.StructureLabel) + dctOutputObjectFormats.Add("Image", RObjectFormat.Image) + dctOutputObjectFormats.Add("Text", RObjectFormat.Text) + dctOutputObjectFormats.Add("Html", RObjectFormat.Html) '-------------------------------- - 'get data controls - ucrPnlGetData.AddRadioButton(rdoGetDataFrame) - ucrPnlGetData.AddRadioButton(rdoGetColumn) - ucrPnlGetData.AddRadioButton(rdoGetObject) + 'save controls + ucrPnlSaveData.AddRadioButton(rdoSaveDataFrame) + ucrPnlSaveData.AddRadioButton(rdoSaveColumn) + ucrPnlSaveData.AddRadioButton(rdoSaveOutputObject) - ucrPnlExample.AddRadioButton(rdoData) - ucrPnlExample.AddRadioButton(rdoFunction) + ucrCboSaveOutputObjectType.SetItems(dctOutputObjectTypes, bSetConditions:=False) + ucrCboSaveOutputObjectType.SetDropDownStyleAsNonEditable() + ucrCboSaveOutputObjectType.SetLinkedDisplayControl(lblSaveObjectType) + ucrCboSaveOutputObjectType.GetSetSelectedIndex = 0 - 'todo. this combobox can be a custom package control in future. Its also needed in dlgHelpVignettes - ucrComboGetPackage.SetParameter(New RParameter("package", 0)) - ucrComboGetPackage.SetItems(GetPackages(), bAddConditions:=True) - ucrComboGetPackage.SetDropDownStyleAsNonEditable() + ucrCboSaveOutputObjectFormat.SetItems(dctOutputObjectFormats, bSetConditions:=False) + ucrCboSaveOutputObjectFormat.SetDropDownStyleAsNonEditable() + ucrCboSaveOutputObjectFormat.SetLinkedDisplayControl(lblSaveObjectFormat) + ucrCboSaveOutputObjectFormat.GetSetSelectedIndex = 0 - ucrComboGetPackages.SetParameter(New RParameter("package", 0)) - ucrComboGetPackages.SetItems(GetPackages(), bAddConditions:=True) - ucrComboGetPackages.SetDropDownStyleAsNonEditable() + ucrSaveObject.SetLabelText("Save Graph") + ucrSaveObject.SetIsComboBox() + ucrSaveObject.SetDataFrameSelector(ucrDataFrameSaveOutputSelect) - ucrDataFrameGet.SetLabelText("Get Data Frame:") - ucrDataFrameGet.SetParameter(New RParameter("data_name", 0)) - ucrDataFrameGet.SetParameterIsString() + ucrInputSaveDataFrame.SetLinkedDisplayControl(lblSaveDataFrame) + ucrChkSaveDataFrameSingle.SetText("Single") - ucrSelectorGet.SetParameterIsString() + '-------------------------------- + 'Get data controls - ucrReceiverGet.SetParameter(New RParameter("string", 0)) - ucrReceiverGet.SetParameterIsString() - ucrReceiverGet.Selector = ucrSelectorGet - ucrReceiverGet.bUseFilteredData = False - ucrReceiverGet.SetItemType("column") - ucrReceiverGet.SetMeAsReceiver() - ucrReceiverGet.SetLinkedDisplayControl(New List(Of Control)({lblGet})) + ucrPnlGetData.AddRadioButton(rdoGetDataFrame) + ucrPnlGetData.AddRadioButton(rdoGetColumn) + ucrPnlGetData.AddRadioButton(rdoGetOutputObject) + ucrDataFrameGetDF.SetLabelText("Get Data Frame:") - '--------------------------------------------------- - 'save controls - ucrPnlSaveData.AddRadioButton(rdoSaveDataFrame) - ucrPnlSaveData.AddRadioButton(rdoSaveColumn) - ucrPnlSaveData.AddRadioButton(rdoSaveObject) + ucrReceiverGetColumns.Selector = ucrSelectorGetObject + ucrReceiverGetColumns.SetLinkedDisplayControl(lblGetColumn) + + ucrCboGetOutputObjectType.SetItems(dctOutputObjectTypes, bSetConditions:=False) + ucrCboGetOutputObjectType.SetDropDownStyleAsNonEditable() + ucrCboGetOutputObjectType.SetLinkedDisplayControl(lblGetObjectType) + ucrCboGetOutputObjectType.GetSetSelectedIndex = 0 + + ucrReceiverGetOutputObject.Selector = ucrSelectorGetObject + ucrReceiverGetOutputObject.SetLinkedDisplayControl(lblGetOutputObject) - ucrInputSaveDataFrame.SetValidationTypeAsRVariable() - ucrInputSaveDataFrame.SetLinkedDisplayControl(New List(Of Control)({lblSaveDataFrame})) + '-------------------------------- + ' Command controls - ucrChkEditLibrary.SetText("Edit") + 'todo. this combo box can be a custom package control in future. Its also needed in dlgHelpVignettes + ucrCboCommandPackage.SetParameter(New RParameter("package", 0)) + ucrCboCommandPackage.SetItems(GetPackages(), bAddConditions:=True) + ucrCboCommandPackage.SetDropDownStyleAsNonEditable() - ucrSaveColumn.SetSaveTypeAsColumn() - ucrSaveColumn.SetDataFrameSelector(ucrDataFrameSave) - ucrSaveColumn.SetIsComboBox() - ucrSaveColumn.SetLabelText("Column Name:") - ucrSaveGraph.SetSaveTypeAsGraph() - ucrSaveGraph.SetDataFrameSelector(ucrDataFrameSave) - ucrSaveGraph.SetIsComboBox() - ucrSaveGraph.SetLabelText("Graph Name:") + ucrPnlCommands.AddRadioButton(rdoCommandPackage) + ucrPnlCommands.AddRadioButton(rdoCommandObject) - ucrSaveTable.SetSaveTypeAsTable() - ucrSaveTable.SetDataFrameSelector(ucrDataFrameSave) - ucrSaveTable.SetIsComboBox() - ucrSaveTable.SetLabelText("Table Name:") + '-------------------------------- + 'Get example controls + ucrPnlExample.AddRadioButton(rdoExampleData) + ucrPnlExample.AddRadioButton(rdoExampleFunction) - ucrSaveModel.SetSaveTypeAsModel() - ucrSaveModel.SetDataFrameSelector(ucrDataFrameSave) - ucrSaveModel.SetIsComboBox() - ucrSaveModel.SetLabelText("Model Name:") + ucrCboExamplePackages.SetItems(GetPackages(), bAddConditions:=False) + ucrCboExamplePackages.SetDropDownStyleAsNonEditable() - ucrInputPreviewLibrary.txtInput.ScrollBars = ScrollBars.Vertical + '------------------------------- + ' base buttons controls not supported in this dialog + ucrBase.bAppendScriptsAtCurrentScriptWindowCursorPosition = True - 'hide base button comment controls + ' hide controls not supported in this dialog ucrBase.chkComment.Checked = False - ucrBase.chkComment.Enabled = False + ucrBase.chkComment.Visible = False + ucrBase.txtComment.Visible = False + ucrBase.bAddScriptToScriptWindowOnClickOk = False End Sub @@ -133,410 +135,367 @@ Public Class dlgScript End Function Private Sub SetDefaults() - clsLibraryFunction = New RFunction - clsGetDataFrameFunction = New RFunction - clsSaveColumnFunction = New RFunction - clsSaveGraphFunction = New RFunction - clsSaveTableFunction = New RFunction - clsSaveModelFunction = New RFunction - clsConstantDummyFunction = New RFunction - clsImportNewDataFrame = New RFunction - clsRFunctionList = New RFunction - clsGetColumnFunction = New RFunction - clsLibraryExampleFunction = New RFunction - clsLibraryExpFunction = New RFunction - clsTempPreviewFunction = New RFunction - - lstAssignToStrings.Clear() - - 'get controls reset - rdoGetDataFrame.Checked = True - rdoData.Checked = True - ucrComboGetPackage.Reset() - ucrComboGetPackages.Reset() - ucrDataFrameGet.Reset() - ucrSelectorGet.Reset() - 'ucrReceiverGetCol.SetMeAsReceiver() - 'ucrReceiverGetObject.SetItemType("graph") - - 'save controls reset - rdoSaveDataFrame.Checked = True - ucrInputDataFrame.SetName("") - ucrDataFrameSave.Reset() - ucrSaveColumn.Reset() - ucrSaveGraph.Reset() - ucrSaveTable.Reset() - ucrSaveModel.Reset() - - 'script text control reset - txtScript.Text = "# Code generated by the dialog, Script" - - clsRFunctionList.SetRCommand("list") - clsImportNewDataFrame.SetRCommand("data_book$import_data") - 'global function resets - clsLibraryFunction.SetRCommand("library") - clsLibraryFunction.AddParameter("package", Chr(34) & "datasets" & Chr(34)) + ' Examples controls + rdoExampleData.Checked = True - clsLibraryExampleFunction.SetRCommand("library") - clsLibraryExampleFunction.AddParameter("package", Chr(34) & "datasets" & Chr(34)) + ' Command controls + rdoCommandPackage.Checked = True + ucrCboCommandPackage.GetSetSelectedIndex = -1 + ucrInputRemoveObjects.Reset() - clsLibraryExpFunction.SetRCommand("getExample") + ' Save controls reset + ucrSaveObject.SetRCode(clsSaveDataFunction, True) + ucrSaveObject.Reset() + rdoSaveDataFrame.Checked = True + ucrChkSaveDataFrameSingle.Checked = True + ucrDataFrameSaveOutputSelect.Reset() - clsConstantDummyFunction.AddParameter("preview", "FALSE", iPosition:=0) - clsConstantDummyFunction.AddParameter("edit", "FALSE", iPosition:=1) + ' Get controls reset + ucrSelectorGetObject.Reset() + ucrCboGetOutputObjectType.GetSetSelectedIndex = 0 + ucrDataFrameGetDF.Reset() + rdoGetDataFrame.Checked = True - clsGetDataFrameFunction.SetRCommand("data_book$get_data_frame") - clsGetDataFrameFunction.AddParameter("data_name", Chr(34) & ucrDataFrameGet.strCurrDataFrame & Chr(34)) - End Sub - Private Sub SetRCodeForControls(bReset As Boolean) - ucrComboGetPackage.SetRCode(clsLibraryFunction, bReset) - ucrComboGetPackages.SetRCode(clsLibraryExampleFunction, bReset) - ucrDataFrameGet.SetRCode(clsGetDataFrameFunction, bReset) + 'activate the selected tab to library tab + tbFeatures.SelectedIndex = -1 + tbFeatures.SelectedTab = tbPageSaveData - 'saving results - ucrSaveColumn.SetRCode(clsSaveColumnFunction, bReset) - ucrSaveGraph.SetRCode(clsSaveGraphFunction, bReset) - ucrSaveTable.SetRCode(clsSaveTableFunction, bReset) - ucrSaveModel.SetRCode(clsSaveModelFunction, bReset) End Sub - Private Sub SetData() - ucrDataFrameGet.SetVisible(False) - ucrSelectorGet.SetVisible(False) - ucrReceiverGet.SetVisible(False) - If rdoGetDataFrame.Checked Then - ucrDataFrameGet.SetVisible(True) - Dim strAssignTo = ucrDataFrameGet.strCurrDataFrame - SetPreviewScript(clsGetDataFrameFunction, strAssignTo) - Else - ucrSelectorGet.SetVisible(True) - ucrReceiverGet.SetVisible(True) - SetGetReceiverItemType() - Dim strAssignTo = ucrReceiverGet.GetVariableNames(False) - If Not String.IsNullOrEmpty(strAssignTo) Then - Dim clsGetColumnFunction As RFunction = ucrReceiverGet.GetVariables - SetPreviewScript(clsGetColumnFunction, strAssignTo) - Else - ucrInputPreviewLibrary.txtInput.Clear() - End If + Private Sub ucrPnlSaveData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSaveData.ControlValueChanged + ucrDataFrameSaveOutputSelect.SetVisible(False) + ucrCboSaveOutputObjectType.SetVisible(False) + ucrCboSaveOutputObjectFormat.SetVisible(False) + ucrSaveObject.SetVisible(False) + ucrInputSaveDataFrame.SetVisible(False) + ucrChkSaveDataFrameSingle.SetVisible(False) + If rdoSaveDataFrame.Checked Then + ucrInputSaveDataFrame.SetVisible(True) + ucrChkSaveDataFrameSingle.SetVisible(True) + ucrInputSaveDataFrame.SetName("") + ElseIf rdoSaveColumn.Checked Then + ucrSaveObject.Location = New Point(ucrSaveObject.Location.X, ucrCboSaveOutputObjectType.Location.Y) + ucrSaveObject.SetVisible(True) + ucrDataFrameSaveOutputSelect.SetVisible(True) + SetupSaveDataControl("Column", RObjectTypeLabel.Column, "") + ElseIf rdoSaveOutputObject.Checked Then + ucrSaveObject.Location = New Point(ucrSaveObject.Location.X, ucrCboSaveOutputObjectFormat.Location.Y + 33) + ucrSaveObject.SetVisible(True) + ucrDataFrameSaveOutputSelect.SetVisible(True) + ucrCboSaveOutputObjectType.SetVisible(True) + ucrCboSaveOutputObjectFormat.SetVisible(True) + SetupSaveDataControl(ucrCboSaveOutputObjectType.GetText(), dctOutputObjectTypes.Item(ucrCboSaveOutputObjectType.GetText()), dctOutputObjectFormats.Item(ucrCboSaveOutputObjectFormat.GetText())) End If End Sub - Private Sub FillListViewWithDatasets(dfDataframe As DataFrame) - Dim lstItem As ListViewItem - - lstCollection.Items.Clear() - If dfDataframe IsNot Nothing Then - For i As Integer = 0 To dfDataframe.RowCount - 1 - lstItem = lstCollection.Items.Add(dfDataframe(i, 0)) - If dfDataframe.ColumnCount > 1 Then - lstItem.SubItems.Add(dfDataframe(i, 1)) - Else - lstItem.SubItems.Add("") - End If - Next - lstCollection.Select() - lstCollection.Columns(0).Text = "Data" + Private Sub ucrCboSaveOutputObjectType_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboSaveOutputObjectType.ControlValueChanged, ucrCboSaveOutputObjectFormat.ControlValueChanged + If Not ucrCboSaveOutputObjectType.IsEmpty() AndAlso Not ucrCboSaveOutputObjectFormat.IsEmpty() Then + SetupSaveDataControl(ucrCboSaveOutputObjectType.GetText(), dctOutputObjectTypes.Item(ucrCboSaveOutputObjectType.GetText()), dctOutputObjectFormats.Item(ucrCboSaveOutputObjectFormat.GetText())) End If End Sub - Private Sub FillListViewWithFunctions(lstFunctions As List(Of String)) - Dim lstItem As ListViewItem - lstCollection.Items.Clear() - If lstFunctions IsNot Nothing Then - For i As Integer = 0 To lstFunctions.Count - 1 - lstItem = lstCollection.Items.Add(lstFunctions(i)) - lstItem.SubItems.Add("") - Next - lstCollection.Select() - lstCollection.Columns(0).Text = "Functions" - End If + Private Sub SetupSaveDataControl(strLabel As String, strDataType As String, strFormat As String) + ucrSaveObject.SetSaveType(strDataType, strFormat) + ucrSaveObject.SetLabelText(strLabel) + ucrSaveObject.SetName("") End Sub - Private Sub LoadFunctions(strPackage As String) - Dim expTemp As SymbolicExpression - Dim lstFunction As New List(Of String) - If strPackage IsNot Nothing Then - expTemp = frmMain.clsRLink.RunInternalScriptGetValue("ls(pos = asNamespace(" & Chr(34) & strPackage & Chr(34) & "))", bSilent:=True) - If expTemp IsNot Nothing Then - For i = 0 To expTemp.AsList.Length - 1 - lstFunction.Add(expTemp.AsList.AsCharacter(i)) - Next + Private Sub ucrSaveDataFrameControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSaveDataFrame.ControlContentsChanged, ucrChkSaveDataFrameSingle.ControlContentsChanged + Dim strScript As String = "" + + If Not ucrInputSaveDataFrame.IsEmpty() Then + Dim strDataFrameName As String = ucrInputSaveDataFrame.GetText() + Dim clsImportRFunction As New RFunction + + clsImportRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_data") + + If ucrChkSaveDataFrameSingle.Checked Then + ' If it's a single data frame then wrap it into a list + Dim clsDataListRFunction As New RFunction + clsDataListRFunction.SetRCommand("list") + clsDataListRFunction.AddParameter(strParameterName:=strDataFrameName, strParameterValue:=strDataFrameName) + clsImportRFunction.AddParameter(strParameterName:="data_tables", clsRFunctionParameter:=clsDataListRFunction) + Else + ' If it's already a list of data frames, then add the name directly + clsImportRFunction.AddParameter(strParameterName:="data_tables", strParameterValue:=strDataFrameName) End If - FillListViewWithFunctions(lstFunction) + + strScript = "# Save data frame(s) """ & strDataFrameName & """" & Environment.NewLine & clsImportRFunction.ToScript() End If + + PreviewScript(strScript) End Sub - Private Sub LoadDatasets(strPackage As String) - Dim expTemp As SymbolicExpression - Dim dfPackage As DataFrame = Nothing + Private Sub ucrSaveData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveObject.ControlContentsChanged + Dim strScript As String = "" + + If ucrSaveObject.IsComplete Then + ' R code is not automatiucally updated by save control when control contents changed event is raised by the control + ucrSaveObject.UpdateRCode() - If strPackage IsNot Nothing Then - expTemp = frmMain.clsRLink.RunInternalScriptGetValue("data.frame(data(package =" & Chr(34) & strPackage & Chr(34) & ")$results)[ ,3:4]", bSilent:=True) - If expTemp IsNot Nothing Then - dfPackage = expTemp.AsDataFrame + Dim strDataType As String = "" + If rdoSaveColumn.Checked Then + strDataType = "column" + ElseIf rdoSaveOutputObject.Checked Then + strDataType = ucrCboSaveOutputObjectType.GetText().ToLower() + End If + Dim strTemp As String = "" + clsSaveDataFunction.Clone.ToScript(strTemp) + Dim arrtemp() As String = strTemp.Trim().Split(Environment.NewLine) + If arrtemp.Length > 1 Then + 'ignore the first line of the script because it is an "empty" assignment + strTemp = arrtemp(1) + strScript = "# Save " & strDataType & " """ & ucrSaveObject.GetText() & """" & Environment.NewLine & strTemp End If End If - FillListViewWithDatasets(dfDataframe:=dfPackage) - End Sub - Private Sub ucrPnlGetData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGetData.ControlValueChanged, ucrDataFrameGet.ControlValueChanged - SetData() + PreviewScript(strScript) End Sub - Private Sub SetGetReceiverItemType() - ucrReceiverGet.Clear() - If rdoGetColumn.Checked Then - lblGet.Text = "Selected Column:" - ucrReceiverGet.SetItemType("column") - ucrReceiverGet.strSelectorHeading = "Variables" - ElseIf rdoGetObject.Checked Then - lblGet.Text = "Selected Object:" - ucrReceiverGet.SetItemType("object") - ucrReceiverGet.strSelectorHeading = "Objects" + Private Sub ucrPnlGetData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGetData.ControlValueChanged + ucrDataFrameGetDF.SetVisible(False) + ucrCboGetOutputObjectType.SetVisible(False) + ucrSelectorGetObject.SetVisible(False) + ucrReceiverGetColumns.SetVisible(False) + ucrReceiverGetOutputObject.SetVisible(False) + PreviewScript("") + If rdoGetDataFrame.Checked Then + ucrDataFrameGetDF.SetVisible(True) + ucrReceiverGetOutputObject.SetVisible(False) + ucrDataFrameGetDF.Reset() + ElseIf rdoGetColumn.Checked Then + ucrSelectorGetObject.SetVisible(True) + ucrReceiverGetColumns.SetVisible(True) + ucrReceiverGetColumns.SetMeAsReceiver() + ucrReceiverGetColumns.Clear() + ElseIf rdoGetOutputObject.Checked Then + ucrSelectorGetObject.SetVisible(True) + ucrCboGetOutputObjectType.SetVisible(True) + ucrReceiverGetOutputObject.SetVisible(True) + SetupReceiverForGetOutputObject(ucrCboGetOutputObjectType.GetText(), dctOutputObjectTypes.Item(ucrCboGetOutputObjectType.GetText())) + ucrReceiverGetOutputObject.SetMeAsReceiver() End If End Sub - Function RemoveDoubleHashD(strText As String) As String - ' Replace all occurrences of "##D" with an empty string - Dim result As String = strText.Replace("##D", String.Empty) + Private Sub SetupReceiverForGetOutputObject(strLabel As String, strDataType As String) + ucrReceiverGetOutputObject.Clear() + lblGetOutputObject.Text = strLabel & ":" + ucrReceiverGetOutputObject.SetSelectorHeading(strLabel) + ucrReceiverGetOutputObject.SetItemType(strDataType) + End Sub - Return result - End Function + Private Sub ucrDataFrameGet_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDataFrameGetDF.ControlContentsChanged + Dim strScript As String = "" - Private Sub lstCollection_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstCollection.SelectedIndexChanged - If lstCollection.SelectedItems.Count > 0 Then - Dim strTopic = lstCollection.SelectedItems(0).SubItems(0).Text - GetExample(strTopic) + If Not String.IsNullOrEmpty(ucrDataFrameGetDF.strCurrDataFrame) Then + Dim strAssignedScript As String = "" + ucrDataFrameGetDF.clsCurrDataFrame.Clone().ToScript(strAssignedScript) + strScript = "# Get data frame """ & ucrDataFrameGetDF.strCurrDataFrame & """" & Environment.NewLine & strAssignedScript End If - End Sub - Private Sub GetExample(strTopic As String) - Try - If Not String.IsNullOrEmpty(strTopic) Then - clsLibraryExpFunction.AddParameter("topic", Chr(34) & strTopic & Chr(34), iPosition:=0) - If clsLibraryExpFunction IsNot Nothing Then - Dim strExampe = frmMain.clsRLink.RunInternalScriptGetValue(clsLibraryExpFunction.ToScript(), bSilent:=True).AsCharacter(0) - Dim strResult = RemoveDoubleHashD(strExampe) - ucrInputPreviewLibrary.SetText(strResult) - End If - End If - Catch ex As Exception - MsgBox(strTopic & " has a help file but no examples.") - End Try + PreviewScript(strScript) End Sub - Private Function GetPreviewText(clsTempFunction As RFunction) As String - Dim strScript As String = clsTempFunction.Clone.ToScript - Return strScript - End Function + Private Sub ucrReceiverGetColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverGetColumns.ControlContentsChanged + Dim strScript As String = "" - Private Sub ucrChkEditLibrary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEditLibrary.ControlValueChanged - ucrInputPreviewLibrary.IsReadOnly = Not ucrChkEditLibrary.Checked - End Sub + If Not ucrReceiverGetColumns.IsEmpty() Then + Dim clsRFunction As RFunction = ucrReceiverGetColumns.GetVariables() + Dim strAssignedScript As String = "" + clsRFunction.SetAssignTo(ucrSelectorGetObject.strCurrentDataFrame & "_cols") + clsRFunction.ToScript(strScript:=strAssignedScript) + strScript = "# Get column(s) " & String.Join(",", ucrReceiverGetColumns.GetVariableNamesList(bWithQuotes:=True)) & Environment.NewLine & strAssignedScript + End If - Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged - Select Case TabControl1.SelectedTab.Name - Case "TabPage1" - SetPackage(ucrComboGetPackage.GetText) - Case "TabPage2" - SetData() - Case "TabPage3" - SetSaveData() - Case "TabPage4" - RemoveObject() - Case "TabPage5" - Dim strData = ucrInputDataFrame.GetText() - SetDataFrameScript(strData) - End Select + PreviewScript(strScript) End Sub - Private Sub RemoveObject() - Dim lstObject As List(Of String) = ucrInputRemoveObject.GetText.Split(","c).Select(Function(s) s.Trim()).ToList() - Dim strPreview = "rm(list=" & frmMain.clsRLink.GetListAsRString(lstObject) & ")" - ucrInputPreviewLibrary.SetText(strPreview) + Private Sub ucrInputGetObjectType_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboGetOutputObjectType.ControlValueChanged + If Not ucrCboGetOutputObjectType.IsEmpty() Then + SetupReceiverForGetOutputObject(ucrCboGetOutputObjectType.GetText(), dctOutputObjectTypes.Item(ucrCboGetOutputObjectType.GetText())) + End If End Sub - Private Sub ucrInputRemoveObject_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputRemoveObject.ControlContentsChanged - RemoveObject() - End Sub + Private Sub ucrReceiverGetOutputObject_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverGetOutputObject.ControlContentsChanged + Dim strScript As String = "" - Private Sub AddAssignToString(strObjectName As String) - If Not lstAssignToStrings.Contains(strObjectName) Then - lstAssignToStrings.Add(strObjectName) + If Not ucrReceiverGetOutputObject.IsEmpty() Then + Dim clsRFunction As RFunction = ucrReceiverGetOutputObject.GetVariables() + Dim strAssignedScript As String = "" + clsRFunction.ToScript(strScript:=strAssignedScript) + strScript = "# Get " & ucrCboGetOutputObjectType.GetText().ToLower() & " " & ucrReceiverGetOutputObject.GetVariableNames(bWithQuotes:=True) & Environment.NewLine & strAssignedScript End If - End Sub - - Private Sub SetPackage(strPackage As String) - Dim strPreview = GetPreviewText(clsLibraryFunction) - ucrInputPreviewLibrary.SetText(strPreview) + PreviewScript(strScript) End Sub - Private Sub ucrComboGetPackage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrComboGetPackage.ControlValueChanged - If TabControl1.SelectedTab Is TabPage1 Then - SetPackage(ucrComboGetPackage.GetText) + Private Sub ucrPnlCommands_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlCommands.ControlValueChanged + ucrCboCommandPackage.SetVisible(False) + ucrInputRemoveObjects.SetVisible(False) + If rdoCommandPackage.Checked Then + ucrCboCommandPackage.SetVisible(True) + ucrCboCommandPackage.OnControlValueChanged() + ElseIf rdoCommandObject.Checked Then + ucrInputRemoveObjects.SetVisible(True) + ucrInputRemoveObjects.OnControlValueChanged() End If End Sub - Private Sub ucrReceiverGet_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverGet.ControlValueChanged - If TabControl1.SelectedTab Is TabPage2 Then - Dim clsGetColumnFunction As RFunction = ucrReceiverGet.GetVariables - Dim strAssignTo = ucrReceiverGet.GetVariableNames(False) - SetPreviewScript(clsGetColumnFunction, strAssignTo) - End If - End Sub + Private Sub ucrCboLibPackage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboCommandPackage.ControlValueChanged + Dim strScript As String = "" - Private Sub SetDataFrameScript(strData As String) - If String.IsNullOrEmpty(strData) Then - ucrInputPreviewLibrary.txtInput.Clear() + If Not ucrCboCommandPackage.IsEmpty() Then + Dim clsLibraryFunction As New RFunction + clsLibraryFunction.SetRCommand("library") + clsLibraryFunction.AddParameter("package", Chr(34) & ucrCboCommandPackage.GetText() & Chr(34)) + strScript = "# Load library """ & ucrCboCommandPackage.GetText() & """" & Environment.NewLine & clsLibraryFunction.ToScript End If - clsRFunctionList.ClearParameters() - clsRFunctionList.AddParameter(strData, strData) - clsImportNewDataFrame.AddParameter("data_tables", clsRFunctionList.ToScript) - SetPreviewScript(clsImportNewDataFrame, strData) + + PreviewScript(strScript) End Sub - Private Sub ucrComboGetPackages_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrComboGetPackages.ControlValueChanged, ucrPnlExample.ControlValueChanged - If strSelectedPackage <> ucrComboGetPackages.GetText() Then - strSelectedPackage = ucrComboGetPackages.GetText() - If strSelectedPackage <> "datasets" Then - clsLibraryExpFunction.AddParameter("package", Chr(34) & strSelectedPackage & Chr(34), iPosition:=1) - Else - clsLibraryExpFunction.RemoveParameterByName("package") - End If - TestOkEnabled() - End If - ucrInputPreviewLibrary.txtInput.Clear() + Private Sub ucrInputRemoveObject_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputRemoveObjects.ControlContentsChanged + Dim strScript As String = "" + + If Not ucrInputRemoveObjects.IsEmpty() Then + ' Create function to remove the objects added in the script + Dim lstAssignToStrings As String() = ucrInputRemoveObjects.GetText().Split(",") + Dim clsRemoveFunc As New RFunction + Dim clsRemoveListFun As New RFunction + clsRemoveFunc.SetRCommand("rm") + clsRemoveListFun.SetRCommand("c") - If rdoData.Checked Then - LoadDatasets(strSelectedPackage) - Else - LoadFunctions(strSelectedPackage) + For i As Integer = 0 To lstAssignToStrings.Count - 1 + lstAssignToStrings.SetValue(Chr(34) & lstAssignToStrings(i) & Chr(34), i) + clsRemoveListFun.AddParameter(i, lstAssignToStrings(i), bIncludeArgumentName:=False) + Next + clsRemoveFunc.AddParameter("list", clsRFunctionParameter:=clsRemoveListFun) + strScript = "# Remove object(s) " & String.Join(",", lstAssignToStrings) & Environment.NewLine & clsRemoveFunc.ToScript() End If + + PreviewScript(strScript) End Sub - Private Sub ucrInputDataFrame_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputDataFrame.ControlContentsChanged - If TabControl1.SelectedTab Is TabPage5 Then - Dim strData = ucrInputDataFrame.GetText() - SetDataFrameScript(strData) + Private Sub ucrComboGetPackages_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboExamplePackages.ControlValueChanged, ucrPnlExample.ControlValueChanged + PreviewScript("") + lstExampleCollection.Items.Clear() + + If ucrCboExamplePackages.IsEmpty Then + Exit Sub End If - End Sub - Private Sub ucrInputSaveDataFrame_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputSaveDataFrame.ControlContentsChanged - If TabControl1.SelectedTab Is TabPage3 Then - Dim strData As String = ucrInputSaveDataFrame.GetText() - SetDataFrameScript(strData) + Dim strSelectedPackage As String = ucrCboExamplePackages.GetText() + + If rdoExampleData.Checked Then + lstExampleCollection.Columns(0).Text = "Data" + lstExampleCollection.Items.AddRange(GetDatasets(strSelectedPackage)) + ElseIf rdoExampleFunction.Checked Then + lstExampleCollection.Columns(0).Text = "Functions" + lstExampleCollection.Items.AddRange(GetFunctions(strSelectedPackage)) End If - End Sub + lstExampleCollection.Select() - Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk - frmMain.InsertTextToScriptWindow(iCurrentPos, ucrInputPreviewLibrary.GetText) End Sub - Private Sub ucrInputPreviewLibrary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPreviewLibrary.ControlContentsChanged - If ucrInputPreviewLibrary.GetText <> "" Then - clsTempPreviewFunction.AddParameter("text", ucrInputPreviewLibrary.GetText, iPosition:=0) + Private Function GetDatasets(strPackage As String) As ListViewItem() + + Dim dfDataframe As DataFrame = frmMain.clsRLink.RunInternalScriptGetValue( + "data.frame(data(package =" & Chr(34) & strPackage & Chr(34) & ")$results)[ ,3:4]", bSilent:=True)?.AsDataFrame() + + If dfDataframe Is Nothing Then + Return {} End If - TestOkEnabled() - End Sub - Private Sub ucrDataFrameGet_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrDataFrameGet.ControlContentsChanged - If TabControl1.SelectedTab Is TabPage2 Then - Dim strAssignTo = ucrDataFrameGet.strCurrDataFrame - SetPreviewScript(clsGetDataFrameFunction, strAssignTo) + Dim lstViewItems(dfDataframe.RowCount - 1) As ListViewItem + For i As Integer = 0 To dfDataframe.RowCount - 1 + Dim lstViewItem As New ListViewItem With { + .Text = dfDataframe(i, 0) + } + + 'lstViewItem.SubItems.Add(dfDataframe(i, 0)) + lstViewItem.SubItems.Add(If(dfDataframe.ColumnCount > 1, dfDataframe(i, 1), "")) + lstViewItems(i) = lstViewItem + Next + Return lstViewItems + + End Function + + Private Function GetFunctions(strPackage As String) As ListViewItem() + + Dim expTemp As GenericVector = frmMain.clsRLink.RunInternalScriptGetValue("ls(pos = asNamespace(" & Chr(34) & strPackage & Chr(34) & "))", bSilent:=True)?.AsList() + + If expTemp Is Nothing Then + Return {} End If - End Sub - Private Sub SetPreviewScript(clsTempFunction As RFunction, strAssignTo As String) - clsTempFunction.SetAssignTo(strAssignTo) - Dim strAssignedScript = "" - Dim strAssignedTo As String = clsTempFunction.ToScript(strScript:=strAssignedScript) - ucrInputPreviewLibrary.SetText(strAssignedScript) - End Sub + Dim lstViewItems(expTemp.Length - 1) As ListViewItem + For i = 0 To expTemp.Length - 1 + Dim lstViewItem As New ListViewItem With { + .Text = expTemp.AsCharacter(i) + } + lstViewItem.SubItems.Add("") + lstViewItems(i) = lstViewItem + Next + Return lstViewItems - Private Sub ucrSaveColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveColumn.ControlContentsChanged, ucrSaveModel.ControlContentsChanged, ucrSaveTable.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrPnlSaveData.ControlContentsChanged - If TabControl1.SelectedTab IsNot TabPage3 Then + End Function + + Private Sub lstExampleCollection_Click(sender As Object, e As EventArgs) Handles lstExampleCollection.Click + If lstExampleCollection.SelectedItems.Count = 0 Then Exit Sub End If - SetSaveData() - End Sub - Private Sub SetSaveData() - ucrInputSaveDataFrame.SetVisible(False) - ucrDataFrameSave.SetVisible(False) - ucrSaveColumn.SetVisible(False) - ucrSaveGraph.SetVisible(False) - ucrSaveTable.SetVisible(False) - ucrSaveModel.SetVisible(False) - Dim clsTempFunction As New RFunction - Dim strAssign As String = "" + Dim strTopic As String = lstExampleCollection.SelectedItems(0).SubItems(0).Text Try - If rdoSaveDataFrame.Checked Then - ucrInputSaveDataFrame.SetVisible(True) - Dim strData As String = ucrInputSaveDataFrame.GetText() - SetDataFrameScript(strData) - Else - If rdoSaveColumn.Checked Then - ucrDataFrameSave.SetVisible(True) - ucrSaveColumn.SetVisible(True) - If ucrSaveColumn.IsComplete AndAlso Not String.IsNullOrEmpty(ucrSaveColumn.GetText) _ - AndAlso Not String.IsNullOrEmpty(ucrDataFrameSave.strCurrDataFrame) Then - - clsTempFunction = clsSaveColumnFunction - strAssign = ucrSaveColumn.GetText - End If - ElseIf rdoSaveObject.Checked Then - ucrDataFrameSave.SetVisible(True) - ucrSaveGraph.SetVisible(True) - ucrSaveTable.SetVisible(True) - ucrSaveModel.SetVisible(True) - If ucrSaveGraph.IsComplete AndAlso Not String.IsNullOrEmpty(ucrSaveGraph.GetText) Then - clsTempFunction = clsSaveGraphFunction - strAssign = ucrSaveGraph.GetText - ucrSaveModel.ucrInputComboSave.SetText("") - ucrSaveTable.ucrInputComboSave.SetText("") - ElseIf ucrSaveModel.IsComplete AndAlso Not String.IsNullOrEmpty(ucrSaveModel.GetText) Then - clsTempFunction = clsSaveModelFunction - strAssign = ucrSaveModel.GetText - ucrSaveGraph.ucrInputComboSave.SetText("") - ucrSaveTable.ucrInputComboSave.SetText("") - ElseIf ucrSaveTable.IsComplete AndAlso Not String.IsNullOrEmpty(ucrSaveTable.GetText) Then - clsTempFunction = clsSaveTableFunction - strAssign = ucrSaveTable.GetText - ucrSaveGraph.ucrInputComboSave.SetText("") - ucrSaveModel.ucrInputComboSave.SetText("") - End If - End If - If clsTempFunction.clsParameters.Count > 0 AndAlso Not String.IsNullOrEmpty(strAssign) Then - Dim strAssignedScript As String = "" - 'clone the function first because the ToScript function modifies the contents of the function. - Dim strAssignedTo As String = clsTempFunction.Clone.ToScript(strScript:=strAssignedScript) - Dim strScript = strAssign & " <- " & strAssignedTo - strScript = strScript.Trim & Environment.NewLine & strAssignedScript.Split(vbCrLf)(1).Trim - ucrInputPreviewLibrary.SetText(strScript) - AddAssignToString(strAssignedTo) - Else - ucrInputPreviewLibrary.txtInput.Clear() - End If - End If + Dim clsLibraryExpFunction As New RFunction + clsLibraryExpFunction.SetRCommand("getExample") + clsLibraryExpFunction.AddParameter("package", Chr(34) & ucrCboExamplePackages.GetText() & Chr(34), iPosition:=1) + clsLibraryExpFunction.AddParameter("topic", Chr(34) & strTopic & Chr(34), iPosition:=0) + + Dim strExample As String = frmMain.clsRLink.RunInternalScriptGetValue(clsLibraryExpFunction.Clone.ToScript(), bSilent:=True).AsCharacter(0) + strExample = strExample.Replace("##D", String.Empty) + PreviewScript(strExample) Catch ex As Exception - MsgBox(ex.Message) + MsgBox(strTopic & " has a help file but no examples.") End Try End Sub - Private Sub TestOkEnabled() - ucrBase.OKEnabled(Not ucrInputPreviewLibrary.IsEmpty) + Private Sub txtScript_TextChanged(sender As Object, e As EventArgs) Handles txtScript.TextChanged + ucrBase.clsRsyntax.SetCommandString(txtScript.Text) + ucrBase.OKEnabled(txtScript.Text.Length > 0) End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - TabControl1.SelectedIndex = 0 - ucrChkEditLibrary.Checked = False SetDefaults() - SetRCodeForControls(True) - TestOkEnabled() End Sub + + Private Sub tbFeatures_Selected(sender As Object, e As TabControlEventArgs) Handles tbFeatures.Selected + If e.TabPage Is tbPageGetData Then + rdoGetDataFrame.Checked = True + ucrPnlGetData.OnControlValueChanged() + ElseIf e.TabPage Is tbPageSaveData Then + rdoSaveDataFrame.Checked = True + ucrPnlSaveData.OnControlValueChanged() + ElseIf e.TabPage Is tbPageCommand Then + 'alwys reset the common controls to be blank. + 'the controls functionalities are not related + ucrCboCommandPackage.GetSetSelectedIndex = -1 + ucrInputRemoveObjects.SetName("") + PreviewScript("") + ElseIf e.TabPage Is tbPageExamples Then + ucrCboExamplePackages.OnControlValueChanged() + End If + End Sub + + Private Sub PreviewScript(strNewScript As String) + txtScript.Text = strNewScript & Environment.NewLine + txtScript.SelectionStart = txtScript.Text.Length + txtScript.ScrollToCaret() + txtScript.Refresh() + End Sub + + End Class \ No newline at end of file diff --git a/instat/frmMain.vb b/instat/frmMain.vb index f0e8b145088..f9e59234716 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -553,10 +553,6 @@ Public Class frmMain Tool_strip.Enabled = bEnabled End Sub - Public Sub InsertTextToScriptWindow(iCurrentPos As Integer, strText As String) - ucrScriptWindow.InsertText(iCurrentPos, strText) - End Sub - Private Sub Application_Idle(sender As Object, e As EventArgs) If clsInstatOptions.bAutoSaveData AndAlso Not timer.Enabled AndAlso (ActiveForm Is Nothing OrElse ActiveForm.Equals(Me)) AndAlso Not clsRLink.bRCodeRunning Then AutoSaveData() @@ -606,8 +602,8 @@ Public Class frmMain End Try End Sub - Public Sub AddToScriptWindow(strText As String, Optional bMakeVisible As Boolean = True) - ucrScriptWindow.AppendText(strText) + Public Sub AddToScriptWindow(strText As String, Optional bMakeVisible As Boolean = True, Optional bAppendAtCurrentCursorPosition As Boolean = False) + ucrScriptWindow.AppendText(strText, bAppendAtCurrentCursorPosition:=bAppendAtCurrentCursorPosition) If bMakeVisible Then mnuViewLogScript.Checked = True UpdateLayout() diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index 5dd726c3388..53975f24814 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -694,26 +694,11 @@ Public Class sdgPlots dctThemeFunctions.TryGetValue("axis.text.x", clsXElementText) dctThemeFunctions.TryGetValue("axis.title.x", clsXElementTitle) dctThemeFunctions.TryGetValue("axis.text.y", clsYElemetText) - dctThemeFunctions.TryGetValue("title", clsPlotElementTitleFunction) - dctThemeFunctions.TryGetValue("sub.title", clsPlotElementSubTitleFunction) - dctThemeFunctions.TryGetValue("caption", clsPlotElementCaptionFunction) dctThemeFunctions.TryGetValue("tag", clsPlotElementTagFunction) dctThemeFunctions.TryGetValue("colour", clsPlotLegendTitleFunction) dctNewThemeFunctions.TryGetValue("axis.title.y", clsYElemetTitle) - If dctThemeFunctions.TryGetValue("caption", clsPlotElementCaptionFunction) Then - clsThemeFunction.AddParameter("plot.caption", clsRFunctionParameter:=clsPlotElementCaptionFunction) - End If - - If dctThemeFunctions.TryGetValue("title", clsPlotElementTitleFunction) Then - clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementTitleFunction) - End If - - If dctThemeFunctions.TryGetValue("sub.title", clsPlotElementSubTitleFunction) Then - clsThemeFunction.AddParameter("plot.subtitle", clsRFunctionParameter:=clsPlotElementSubTitleFunction) - End If - If clsFacetFunction.ContainsParameter("facets") Then clsTempParam = clsFacetFunction.GetParameter("facets") If clsTempParam.bIsOperator AndAlso clsTempParam.clsArgumentCodeStructure IsNot Nothing Then @@ -757,9 +742,11 @@ Public Class sdgPlots ucrChkMargin.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) ucrChkFreeSpace.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) ucrChkFreeScalesX.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) - ucrChkFreeScalesY.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) + If bReset Then + ucrChkFreeScalesY.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) + End If ucrNudNumberofRows.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) - ucrChkLabeler.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) + ucrChkLabeler.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) ucrChkDrop.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True) ucrChkIncludeFacets.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True) @@ -1208,8 +1195,8 @@ Public Class sdgPlots ucrChkYaxisSize.SetRCode(clsYElemetTitle, bReset, bCloneIfNeeded:=True) ucrNudYSize.SetRCode(clsYElemetTitle, bReset, bCloneIfNeeded:=True) - ucrNudXaxisMarkSize.SetRCode(clsXElementText, bReset, bCloneIfNeeded:=True) ucrChkXaxisTickMarkLabelSize.SetRCode(clsXElementText, bReset, bCloneIfNeeded:=True) + ucrNudXaxisMarkSize.SetRCode(clsXElementText, bReset, bCloneIfNeeded:=True) End Sub Private Sub cmdSimpleOptions_Click(sender As Object, e As EventArgs) Handles cmdSimpleOptions.Click @@ -1331,15 +1318,30 @@ Public Class sdgPlots End Sub Private Sub ucrNudCaptionSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudCaptionSize.ControlValueChanged - clsPlotElementCaptionFunction.AddParameter("size", ucrNudCaptionSize.GetText) + If clsPlotElementCaptionFunction.clsParameters.Count > 0 Then + clsThemeFunction.AddParameter("plot.caption", clsRFunctionParameter:=clsPlotElementCaptionFunction) + Else + clsThemeFunction.RemoveParameterByName("plot.caption") + End If + AddRemoveTheme() End Sub Private Sub ucrNudTitleSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudTitleSize.ControlValueChanged - clsPlotElementTitleFunction.AddParameter("size", ucrNudTitleSize.GetText) + If clsPlotElementTitleFunction.clsParameters.Count > 0 Then + clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementTitleFunction) + Else + clsThemeFunction.RemoveParameterByName("plot.title") + End If + AddRemoveTheme() End Sub Private Sub ucrNudSubTitleSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudSubTitleSize.ControlValueChanged - clsPlotElementSubTitleFunction.AddParameter("size", ucrNudSubTitleSize.GetText) + If clsPlotElementSubTitleFunction.clsParameters.Count > 0 Then + clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementSubTitleFunction) + Else + clsThemeFunction.RemoveParameterByName("plot.title") + End If + AddRemoveTheme() End Sub Private Sub ucrNudTagSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudTagSize.ControlValueChanged diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 2d8d33a1844..54df330d431 100644 Binary files a/instat/translations/rInstatTranslations.db and b/instat/translations/rInstatTranslations.db differ diff --git a/instat/ucrAdditionalLayers.Designer.vb b/instat/ucrAdditionalLayers.Designer.vb index 5588aabaaf2..5498932ab25 100644 --- a/instat/ucrAdditionalLayers.Designer.vb +++ b/instat/ucrAdditionalLayers.Designer.vb @@ -45,27 +45,27 @@ Partial Class ucrAdditionalLayers Me.cmdDelete = New System.Windows.Forms.Button() Me.cmdAdd = New instat.ucrSplitButton() Me.contextMenuStripAdd = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.toolStripMenuItemGeomBoxPlot = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomBar = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomBoxPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomcategoricalmodel = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomCol = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomcontour = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomCount = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomDensity = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomDensityRidges = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomhistogram = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomJitter = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomLabel = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomLabelRepel = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomLine = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomparallelslopes = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomPoint = New System.Windows.Forms.ToolStripMenuItem() - Me.toolStripMenuItemGeomRugSmooth = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomRug = New System.Windows.Forms.ToolStripMenuItem() + Me.toolStripMenuItemGeomsmooth = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomText = New System.Windows.Forms.ToolStripMenuItem() Me.toolStripMenuItemGeomTextRepel = New System.Windows.Forms.ToolStripMenuItem() - Me.cmdEdit = New System.Windows.Forms.Button() Me.toolStripMenuItemGeomtile = New System.Windows.Forms.ToolStripMenuItem() - Me.toolStripMenuItemGeomparallelslopes = New System.Windows.Forms.ToolStripMenuItem() - Me.toolStripMenuItemGeomcategoricalmodel = New System.Windows.Forms.ToolStripMenuItem() - Me.toolStripMenuItemGeomhistogram = New System.Windows.Forms.ToolStripMenuItem() - Me.toolStripMenuItemGeomcontour = New System.Windows.Forms.ToolStripMenuItem() - Me.GeomsmoothToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.cmdEdit = New System.Windows.Forms.Button() Me.grpGeoms.SuspendLayout() Me.contextMenuStripAdd.SuspendLayout() Me.SuspendLayout() @@ -127,21 +127,27 @@ Partial Class ucrAdditionalLayers 'contextMenuStripAdd ' Me.contextMenuStripAdd.ImageScalingSize = New System.Drawing.Size(24, 24) - Me.contextMenuStripAdd.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripMenuItemGeomBar, Me.toolStripMenuItemGeomBoxPlot, Me.toolStripMenuItemGeomcategoricalmodel, Me.toolStripMenuItemGeomCol, Me.toolStripMenuItemGeomcontour, Me.toolStripMenuItemGeomCount, Me.toolStripMenuItemGeomDensity, Me.toolStripMenuItemGeomDensityRidges, Me.toolStripMenuItemGeomhistogram, Me.toolStripMenuItemGeomJitter, Me.toolStripMenuItemGeomLabel, Me.toolStripMenuItemGeomLabelRepel, Me.toolStripMenuItemGeomLine, Me.toolStripMenuItemGeomparallelslopes, Me.toolStripMenuItemGeomPoint, Me.toolStripMenuItemGeomRugSmooth, Me.GeomsmoothToolStripMenuItem, Me.toolStripMenuItemGeomText, Me.toolStripMenuItemGeomTextRepel, Me.toolStripMenuItemGeomtile}) + Me.contextMenuStripAdd.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripMenuItemGeomBar, Me.toolStripMenuItemGeomBoxPlot, Me.toolStripMenuItemGeomcategoricalmodel, Me.toolStripMenuItemGeomCol, Me.toolStripMenuItemGeomcontour, Me.toolStripMenuItemGeomCount, Me.toolStripMenuItemGeomDensity, Me.toolStripMenuItemGeomDensityRidges, Me.toolStripMenuItemGeomhistogram, Me.toolStripMenuItemGeomJitter, Me.toolStripMenuItemGeomLabel, Me.toolStripMenuItemGeomLabelRepel, Me.toolStripMenuItemGeomLine, Me.toolStripMenuItemGeomparallelslopes, Me.toolStripMenuItemGeomPoint, Me.toolStripMenuItemGeomRug, Me.toolStripMenuItemGeomsmooth, Me.toolStripMenuItemGeomText, Me.toolStripMenuItemGeomTextRepel, Me.toolStripMenuItemGeomtile}) Me.contextMenuStripAdd.Name = "contextMenuStripOk" Me.contextMenuStripAdd.Size = New System.Drawing.Size(208, 466) ' + 'toolStripMenuItemGeomBar + ' + Me.toolStripMenuItemGeomBar.Name = "toolStripMenuItemGeomBar" + Me.toolStripMenuItemGeomBar.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomBar.Text = "geom_bar" + ' 'toolStripMenuItemGeomBoxPlot ' Me.toolStripMenuItemGeomBoxPlot.Name = "toolStripMenuItemGeomBoxPlot" Me.toolStripMenuItemGeomBoxPlot.Size = New System.Drawing.Size(207, 22) Me.toolStripMenuItemGeomBoxPlot.Text = "geom_boxplot" ' - 'toolStripMenuItemGeomBar + 'toolStripMenuItemGeomcategoricalmodel ' - Me.toolStripMenuItemGeomBar.Name = "toolStripMenuItemGeomBar" - Me.toolStripMenuItemGeomBar.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomBar.Text = "geom_bar" + Me.toolStripMenuItemGeomcategoricalmodel.Name = "toolStripMenuItemGeomcategoricalmodel" + Me.toolStripMenuItemGeomcategoricalmodel.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomcategoricalmodel.Text = "geom_categorical_model" ' 'toolStripMenuItemGeomCol ' @@ -149,6 +155,12 @@ Partial Class ucrAdditionalLayers Me.toolStripMenuItemGeomCol.Size = New System.Drawing.Size(207, 22) Me.toolStripMenuItemGeomCol.Text = "geom_col" ' + 'toolStripMenuItemGeomcontour + ' + Me.toolStripMenuItemGeomcontour.Name = "toolStripMenuItemGeomcontour" + Me.toolStripMenuItemGeomcontour.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomcontour.Text = "geom_contour" + ' 'toolStripMenuItemGeomCount ' Me.toolStripMenuItemGeomCount.Name = "toolStripMenuItemGeomCount" @@ -167,6 +179,12 @@ Partial Class ucrAdditionalLayers Me.toolStripMenuItemGeomDensityRidges.Size = New System.Drawing.Size(207, 22) Me.toolStripMenuItemGeomDensityRidges.Text = "geom_density_ridges" ' + 'toolStripMenuItemGeomhistogram + ' + Me.toolStripMenuItemGeomhistogram.Name = "toolStripMenuItemGeomhistogram" + Me.toolStripMenuItemGeomhistogram.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomhistogram.Text = "geom_histogram " + ' 'toolStripMenuItemGeomJitter ' Me.toolStripMenuItemGeomJitter.Name = "toolStripMenuItemGeomJitter" @@ -191,17 +209,29 @@ Partial Class ucrAdditionalLayers Me.toolStripMenuItemGeomLine.Size = New System.Drawing.Size(207, 22) Me.toolStripMenuItemGeomLine.Text = "geom_line" ' + 'toolStripMenuItemGeomparallelslopes + ' + Me.toolStripMenuItemGeomparallelslopes.Name = "toolStripMenuItemGeomparallelslopes" + Me.toolStripMenuItemGeomparallelslopes.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomparallelslopes.Text = "geom_parallel_slopes" + ' 'toolStripMenuItemGeomPoint ' Me.toolStripMenuItemGeomPoint.Name = "toolStripMenuItemGeomPoint" Me.toolStripMenuItemGeomPoint.Size = New System.Drawing.Size(207, 22) Me.toolStripMenuItemGeomPoint.Text = "geom_point" ' - 'toolStripMenuItemGeomRugSmooth + 'toolStripMenuItemGeomRug + ' + Me.toolStripMenuItemGeomRug.Name = "toolStripMenuItemGeomRug" + Me.toolStripMenuItemGeomRug.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomRug.Text = "geom_rug" ' - Me.toolStripMenuItemGeomRugSmooth.Name = "toolStripMenuItemGeomRugSmooth" - Me.toolStripMenuItemGeomRugSmooth.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomRugSmooth.Text = "geom_rug" + 'toolStripMenuItemGeomsmooth + ' + Me.toolStripMenuItemGeomsmooth.Name = "toolStripMenuItemGeomsmooth" + Me.toolStripMenuItemGeomsmooth.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomsmooth.Text = "geom_smooth" ' 'toolStripMenuItemGeomText ' @@ -215,6 +245,12 @@ Partial Class ucrAdditionalLayers Me.toolStripMenuItemGeomTextRepel.Size = New System.Drawing.Size(207, 22) Me.toolStripMenuItemGeomTextRepel.Text = "geom_text_repel" ' + 'toolStripMenuItemGeomtile + ' + Me.toolStripMenuItemGeomtile.Name = "toolStripMenuItemGeomtile" + Me.toolStripMenuItemGeomtile.Size = New System.Drawing.Size(207, 22) + Me.toolStripMenuItemGeomtile.Text = "geom_tile" + ' 'cmdEdit ' Me.cmdEdit.Location = New System.Drawing.Point(16, 43) @@ -224,42 +260,6 @@ Partial Class ucrAdditionalLayers Me.cmdEdit.Text = "Edit" Me.cmdEdit.UseVisualStyleBackColor = True ' - 'toolStripMenuItemGeomtile - ' - Me.toolStripMenuItemGeomtile.Name = "toolStripMenuItemGeomtile" - Me.toolStripMenuItemGeomtile.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomtile.Text = "geom_tile" - ' - 'toolStripMenuItemGeomparallelslopes - ' - Me.toolStripMenuItemGeomparallelslopes.Name = "toolStripMenuItemGeomparallelslopes" - Me.toolStripMenuItemGeomparallelslopes.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomparallelslopes.Text = "geom_parallel_slopes" - ' - 'toolStripMenuItemGeomcategoricalmodel - ' - Me.toolStripMenuItemGeomcategoricalmodel.Name = "toolStripMenuItemGeomcategoricalmodel" - Me.toolStripMenuItemGeomcategoricalmodel.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomcategoricalmodel.Text = "geom_categorical_model" - ' - 'toolStripMenuItemGeomhistogram - ' - Me.toolStripMenuItemGeomhistogram.Name = "toolStripMenuItemGeomhistogram" - Me.toolStripMenuItemGeomhistogram.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomhistogram.Text = "geom_histogram " - ' - 'toolStripMenuItemGeomcontour - ' - Me.toolStripMenuItemGeomcontour.Name = "toolStripMenuItemGeomcontour" - Me.toolStripMenuItemGeomcontour.Size = New System.Drawing.Size(207, 22) - Me.toolStripMenuItemGeomcontour.Text = "geom_contour" - ' - 'GeomsmoothToolStripMenuItem - ' - Me.GeomsmoothToolStripMenuItem.Name = "GeomsmoothToolStripMenuItem" - Me.GeomsmoothToolStripMenuItem.Size = New System.Drawing.Size(207, 22) - Me.GeomsmoothToolStripMenuItem.Text = "geom_smooth" - ' 'ucrAdditionalLayers ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -295,13 +295,13 @@ Partial Class ucrAdditionalLayers Friend WithEvents toolStripMenuItemGeomLabelRepel As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomLine As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomPoint As ToolStripMenuItem - Friend WithEvents toolStripMenuItemGeomRugSmooth As ToolStripMenuItem + Friend WithEvents toolStripMenuItemGeomRug As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomText As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomTextRepel As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomcategoricalmodel As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomcontour As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomhistogram As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomparallelslopes As ToolStripMenuItem - Friend WithEvents GeomsmoothToolStripMenuItem As ToolStripMenuItem + Friend WithEvents toolStripMenuItemGeomsmooth As ToolStripMenuItem Friend WithEvents toolStripMenuItemGeomtile As ToolStripMenuItem End Class diff --git a/instat/ucrAdditionalLayers.vb b/instat/ucrAdditionalLayers.vb index a5431af837e..eda967b1579 100644 --- a/instat/ucrAdditionalLayers.vb +++ b/instat/ucrAdditionalLayers.vb @@ -92,7 +92,7 @@ Public Class ucrAdditionalLayers Private Sub cmdAdd_Click(sender As Object, e As EventArgs) Handles cmdAdd.Click, toolStripMenuItemGeomBar.Click, toolStripMenuItemGeomBoxPlot.Click, toolStripMenuItemGeomCol.Click, toolStripMenuItemGeomCount.Click, toolStripMenuItemGeomcategoricalmodel.Click, toolStripMenuItemGeomDensity.Click, toolStripMenuItemGeomJitter.Click, toolStripMenuItemGeomLabel.Click, toolStripMenuItemGeomparallelslopes.Click, toolStripMenuItemGeomtile.Click, toolStripMenuItemGeomcontour.Click, toolStripMenuItemGeomhistogram.Click, - toolStripMenuItemGeomLabelRepel.Click, toolStripMenuItemGeomLine.Click, toolStripMenuItemGeomPoint.Click, toolStripMenuItemGeomRugSmooth.Click, toolStripMenuItemGeomText.Click, toolStripMenuItemGeomTextRepel.Click, toolStripMenuItemGeomDensityRidges.Click + toolStripMenuItemGeomLabelRepel.Click, toolStripMenuItemGeomLine.Click, toolStripMenuItemGeomsmooth.Click, toolStripMenuItemGeomPoint.Click, toolStripMenuItemGeomRug.Click, toolStripMenuItemGeomText.Click, toolStripMenuItemGeomTextRepel.Click, toolStripMenuItemGeomDensityRidges.Click 'setup the geom function to use Dim clsNewGeomFunction As New RFunction @@ -130,8 +130,10 @@ Public Class ucrAdditionalLayers strGeomRCommand = "geom_line" ElseIf sender Is toolStripMenuItemGeomPoint Then strGeomRCommand = "geom_point" - ElseIf sender Is toolStripMenuItemGeomRugSmooth Then - strGeomRCommand = "geom_rug_smooth" + ElseIf sender Is toolStripMenuItemGeomRug Then + strGeomRCommand = "geom_rug" + ElseIf sender Is toolStripMenuItemGeomsmooth Then + strGeomRCommand = "geom_smooth" ElseIf sender Is toolStripMenuItemGeomText Then strGeomRCommand = "geom_text" ElseIf sender Is toolStripMenuItemGeomTextRepel Then diff --git a/instat/ucrButtons.vb b/instat/ucrButtons.vb index 3b2d8845bdd..90a1302b5ef 100644 --- a/instat/ucrButtons.vb +++ b/instat/ucrButtons.vb @@ -20,6 +20,14 @@ Public Class ucrButtons Public clsRsyntax As RSyntax Public iHelpTopicID As Integer Public bFirstLoad As Boolean + + ''' + ''' When set to true, scripts will be appended at the current cursor position of the script window + ''' When set to false, scripts will appended at the below the last script in the script window + ''' + Public bAppendScriptsAtCurrentScriptWindowCursorPosition As Boolean = False + Public bAddScriptToScriptWindowOnClickOk As Boolean = True + Public Event BeforeClickOk(sender As Object, e As EventArgs) Public Event ClickOk(sender As Object, e As EventArgs) Public Event ClickReset(sender As Object, e As EventArgs) @@ -49,7 +57,7 @@ Public Class ucrButtons '"Ok", "Ok and Close" and "Ok and Keep" Click event Private Sub Ok_Click(sender As Object, e As EventArgs) Handles cmdOk.Click, toolStripMenuItemOkClose.Click, toolStripMenuItemOkKeep.Click - OnScriptButtonsClick(sender, e, True, Not sender Is toolStripMenuItemOkKeep) + OnScriptButtonsClick(sender, e, bAddScriptToScriptWindowOnClickOk, Not sender Is toolStripMenuItemOkKeep) End Sub '"To Script", "To Script and Close" and "To Script and Keep" Click event @@ -128,7 +136,7 @@ Public Class ucrButtons strComments = "" End If If Not bRun AndAlso strComments <> "" Then - frmMain.AddToScriptWindow(frmMain.clsRLink.GetFormattedComment(strComments) & Environment.NewLine) + frmMain.AddToScriptWindow(frmMain.clsRLink.GetFormattedComment(strComments) & Environment.NewLine, bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition) End If 'Get this list before doing ToScript then no need for global variable name @@ -147,7 +155,7 @@ Public Class ucrButtons If bRun Then frmMain.clsRLink.RunScript(lstBeforeScripts(i), iCallType:=lstBeforeCodes(i).iCallType, strComment:=strComment, bSeparateThread:=clsRsyntax.bSeparateThread) Else - frmMain.AddToScriptWindow(lstBeforeScripts(i)) + frmMain.AddToScriptWindow(lstBeforeScripts(i), bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition) End If Next @@ -161,7 +169,7 @@ Public Class ucrButtons End If frmMain.clsRLink.RunScript(clsRsyntax.GetScript(), clsRsyntax.iCallType, strComment:=strComment, bSeparateThread:=clsRsyntax.bSeparateThread) Else - frmMain.AddToScriptWindow(clsRsyntax.GetScript()) + frmMain.AddToScriptWindow(clsRsyntax.GetScript(), bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition) End If 'This clears the script after it has been run, but leave the function and parameters in the base function @@ -181,7 +189,7 @@ Public Class ucrButtons End If frmMain.clsRLink.RunScript(lstAfterScripts(i), iCallType:=lstAfterCodes(i).iCallType, strComment:=strComment, bSeparateThread:=clsRsyntax.bSeparateThread, bShowWaitDialogOverride:=clsRsyntax.bShowWaitDialogOverride) Else - frmMain.AddToScriptWindow(lstAfterScripts(i)) + frmMain.AddToScriptWindow(lstAfterScripts(i), bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition) End If Next @@ -206,7 +214,7 @@ Public Class ucrButtons If bRun Then frmMain.clsRLink.RunScript(clsRemoveFunc.ToScript(), iCallType:=0) Else - frmMain.AddToScriptWindow(clsRemoveFunc.ToScript()) + frmMain.AddToScriptWindow(clsRemoveFunc.ToScript(), bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition) End If End If End Sub diff --git a/instat/ucrScript.vb b/instat/ucrScript.vb index 5feee07316d..b61537e146f 100644 --- a/instat/ucrScript.vb +++ b/instat/ucrScript.vb @@ -99,9 +99,22 @@ Public Class ucrScript ''' Appends to the end of the text in the active tab. ''' ''' The text to append to the contents of the active tab. - Public Sub AppendText(strText As String) - clsScriptActive.AppendText(Environment.NewLine & strText) - clsScriptActive.GotoPosition(clsScriptActive.TextLength) + Public Sub AppendText(strText As String, Optional bAppendAtCurrentCursorPosition As Boolean = False) + If String.IsNullOrEmpty(strText) Then + Exit Sub + End If + + If bAppendAtCurrentCursorPosition Then + clsScriptActive.InsertText(clsScriptActive.CurrentPosition, strText & Environment.NewLine) + ' Todo. find a way of going to the last position of the inserted "group of text". + ' Currently this just goes to the last position of the first line of inserted text + clsScriptActive.GotoPosition(clsScriptActive.Lines(clsScriptActive.CurrentLine).EndPosition) + Else + clsScriptActive.AppendText(Environment.NewLine & strText) + clsScriptActive.GotoPosition(clsScriptActive.TextLength) + End If + + EnableDisableButtons() End Sub @@ -765,6 +778,10 @@ Public Class ucrScript LoadScript() End Sub + Private Sub mnuInsertScript_Click(sender As Object, e As EventArgs) Handles mnuInsertScript.Click, cmdInsertScript.Click + dlgScript.ShowDialog() + End Sub + Private Sub cmdRemoveTab_Click(sender As Object, e As EventArgs) Handles cmdRemoveTab.Click 'never remove last script tab If TabControl.TabCount < 2 Then @@ -960,7 +977,6 @@ Public Class ucrScript End If End Sub - Private Sub TabControl_DoubleClick(sender As Object, e As EventArgs) Handles TabControl.DoubleClick Dim rectangle = TabControl.GetTabRect(TabControl.SelectedIndex()) rectangle = TabControl.RectangleToScreen(rectangle) @@ -988,22 +1004,4 @@ Public Class ucrScript sender.Dispose() End Sub - ''' - ''' Insert to the current cursor position in the active tab. - ''' - ''' The current cursor position in the active tab. - ''' The text to insert to the contents of the active tab. - Public Sub InsertText(iCurrentPosition As Integer, strText As String) - strText = strText & Environment.NewLine - clsScriptActive.InsertText(iCurrentPosition, strText) - Dim iNextLinePos As Integer = clsScriptActive.Lines(clsScriptActive.CurrentLine).EndPosition - clsScriptActive.GotoPosition(iNextLinePos) - End Sub - - Private Sub mnuInsertScript_Click(sender As Object, e As EventArgs) Handles mnuInsertScript.Click, cmdInsertScript.Click - dlgScript.iCurrentPos = clsScriptActive.CurrentPosition - dlgScript.ShowDialog() - End Sub - - End Class diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index 879349ac503..eadd554619a 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -119,13 +119,12 @@ Public Class ucrSelector 'set the type of 'elements' to show. If current receiver is set to a particular 'element' type then use it strCurrentType = If(CurrentReceiver.bTypeSet, CurrentReceiver.GetItemType(), strType) + 'holds the selector's list view 'fill conditions' + 'used as a 'cache' to check if there is need to clear and refill list view based on supplied parameters + Static _strCurrentSelectorFillCondition As String = "" 'if selector contains columns check if fill conditions are just the same If strCurrentType = "column" Then - 'holds the selector's list view 'fill conditions' - 'used as a 'cache' to check if there is need to clear and refill list view based on supplied parameters - Static _strCurrentSelectorFillCondition As String = "" - 'check if the fill condition is the same, if it is then no need to refill the listview with the same data. 'LoadList is called several times by different events raised in different places(e.g by linked receivers clearing and setting their contents ). 'this makes refilling of the listview unnecessarily slow, especially for wide data sets (see comments in issue #7162) @@ -142,6 +141,9 @@ Public Class ucrSelector End If _strCurrentSelectorFillCondition = strNewSelectorFillCondition + Else + 'reset selector fill conditions + _strCurrentSelectorFillCondition = "" End If 'todo, for columns, the list view should be field with variables from the .Net metadata object