From 299eb2ca3c2be50d6cb748e11624002912c4a5fe Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 31 Mar 2022 11:19:14 +0300 Subject: [PATCH 1/3] Control changes --- instat/dlgCorrelation.designer.vb | 589 ++++++++++++++++++++---------- instat/dlgCorrelation.vb | 16 +- 2 files changed, 396 insertions(+), 209 deletions(-) diff --git a/instat/dlgCorrelation.designer.vb b/instat/dlgCorrelation.designer.vb index 004f97eb00f..88263e8270c 100644 --- a/instat/dlgCorrelation.designer.vb +++ b/instat/dlgCorrelation.designer.vb @@ -38,56 +38,235 @@ Partial Class dlgCorrelation 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.lblFirstColumn = New System.Windows.Forms.Label() - Me.lblSecondColumn = New System.Windows.Forms.Label() + Me.ucrChkDisplayOptions = New instat.ucrCheck() + Me.ucrChkAbsolute = New instat.ucrCheck() + Me.ucrChkShave = New instat.ucrCheck() + Me.rdoCompleteRowsOnly = New System.Windows.Forms.RadioButton() + Me.rdoPairwise = New System.Windows.Forms.RadioButton() + Me.ucrPnlCompletePairwise = New instat.UcrPanel() + Me.lblMethod = New System.Windows.Forms.Label() + Me.ucrInputRearrange = New instat.ucrInputComboBox() + Me.ucrChkRearrange = New instat.ucrCheck() + Me.ucrInputDisplayNas = New instat.ucrInputComboBox() + Me.lblDisplayNas = New System.Windows.Forms.Label() + Me.ucrChkLeadingZeros = New instat.ucrCheck() + Me.lblDecimalPlaces = New System.Windows.Forms.Label() + Me.ucrNudDecimalPlaces = New instat.ucrNud() + Me.rdoTwoColumns = New System.Windows.Forms.RadioButton() + Me.rdoMultipleColumns = New System.Windows.Forms.RadioButton() + Me.ucrPnlColumns = New instat.UcrPanel() Me.grpMethod = New System.Windows.Forms.GroupBox() Me.rdoKendall = New System.Windows.Forms.RadioButton() Me.rdoPearson = New System.Windows.Forms.RadioButton() Me.rdoSpearman = New System.Windows.Forms.RadioButton() Me.ucrPnlMethod = New instat.UcrPanel() - Me.cmdOptions = New System.Windows.Forms.Button() Me.grpMissing = New System.Windows.Forms.GroupBox() - Me.rdoCompleteRowsOnly = New System.Windows.Forms.RadioButton() - Me.rdoPairwise = New System.Windows.Forms.RadioButton() - Me.ucrPnlCompletePairwise = New instat.UcrPanel() - Me.lblConfInterval = New System.Windows.Forms.Label() - Me.rdoTwoColumns = New System.Windows.Forms.RadioButton() - Me.rdoMultipleColumns = New System.Windows.Forms.RadioButton() - Me.lblSelectedVariables = New System.Windows.Forms.Label() + Me.cmdOptions = New System.Windows.Forms.Button() + Me.ucrSelectorCorrelation = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() + Me.grpDisplayOptions = New System.Windows.Forms.GroupBox() + Me.ucrSaveDataFrame = New instat.ucrSave() Me.ucrSaveModel = New instat.ucrSave() + Me.ucrInputDiagonal = New instat.ucrInputComboBox() Me.ucrNudConfidenceInterval = New instat.ucrNud() - Me.ucrChkCorrelationMatrix = New instat.ucrCheck() - Me.ucrPnlColumns = New instat.UcrPanel() + Me.lblDisplayOnDiagonal = New System.Windows.Forms.Label() + Me.lblConfInterval = New System.Windows.Forms.Label() Me.ucrReceiverMultipleColumns = New instat.ucrReceiverMultiple() Me.ucrReceiverSecondColumn = New instat.ucrReceiverSingle() + Me.lblSecondColumn = New System.Windows.Forms.Label() + Me.lblSelectedVariables = New System.Windows.Forms.Label() Me.ucrReceiverFirstColumn = New instat.ucrReceiverSingle() - Me.ucrSelectorCorrelation = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrBase = New instat.ucrButtons() + Me.lblFirstColumn = New System.Windows.Forms.Label() Me.grpMethod.SuspendLayout() Me.grpMissing.SuspendLayout() + Me.grpDisplayOptions.SuspendLayout() Me.SuspendLayout() ' - 'lblFirstColumn + 'ucrChkDisplayOptions ' - Me.lblFirstColumn.AutoSize = True - Me.lblFirstColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstColumn.Location = New System.Drawing.Point(258, 75) - Me.lblFirstColumn.Name = "lblFirstColumn" - Me.lblFirstColumn.Size = New System.Drawing.Size(67, 13) - Me.lblFirstColumn.TabIndex = 5 - Me.lblFirstColumn.Tag = "First_column" - Me.lblFirstColumn.Text = "First Column:" + Me.ucrChkDisplayOptions.AutoSize = True + Me.ucrChkDisplayOptions.Checked = False + Me.ucrChkDisplayOptions.Location = New System.Drawing.Point(14, 312) + Me.ucrChkDisplayOptions.Name = "ucrChkDisplayOptions" + Me.ucrChkDisplayOptions.Size = New System.Drawing.Size(192, 23) + Me.ucrChkDisplayOptions.TabIndex = 64 ' - 'lblSecondColumn + 'ucrChkAbsolute ' - Me.lblSecondColumn.AutoSize = True - Me.lblSecondColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondColumn.Location = New System.Drawing.Point(258, 127) - Me.lblSecondColumn.Name = "lblSecondColumn" - Me.lblSecondColumn.Size = New System.Drawing.Size(85, 13) - Me.lblSecondColumn.TabIndex = 8 - Me.lblSecondColumn.Tag = "Second_column" - Me.lblSecondColumn.Text = "Second Column:" + Me.ucrChkAbsolute.AutoSize = True + Me.ucrChkAbsolute.Checked = False + Me.ucrChkAbsolute.Location = New System.Drawing.Point(270, 439) + Me.ucrChkAbsolute.Name = "ucrChkAbsolute" + Me.ucrChkAbsolute.Size = New System.Drawing.Size(117, 23) + Me.ucrChkAbsolute.TabIndex = 62 + ' + 'ucrChkShave + ' + Me.ucrChkShave.AutoSize = True + Me.ucrChkShave.Checked = False + Me.ucrChkShave.Location = New System.Drawing.Point(8, 124) + Me.ucrChkShave.Name = "ucrChkShave" + Me.ucrChkShave.Size = New System.Drawing.Size(192, 23) + Me.ucrChkShave.TabIndex = 26 + ' + 'rdoCompleteRowsOnly + ' + Me.rdoCompleteRowsOnly.AutoSize = True + Me.rdoCompleteRowsOnly.Checked = True + Me.rdoCompleteRowsOnly.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoCompleteRowsOnly.Location = New System.Drawing.Point(6, 17) + Me.rdoCompleteRowsOnly.Name = "rdoCompleteRowsOnly" + Me.rdoCompleteRowsOnly.Size = New System.Drawing.Size(116, 17) + Me.rdoCompleteRowsOnly.TabIndex = 1 + Me.rdoCompleteRowsOnly.TabStop = True + Me.rdoCompleteRowsOnly.Tag = "Complete_rows_only" + Me.rdoCompleteRowsOnly.Text = "Complete rows only" + Me.rdoCompleteRowsOnly.UseVisualStyleBackColor = True + ' + 'rdoPairwise + ' + Me.rdoPairwise.AutoSize = True + Me.rdoPairwise.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoPairwise.Location = New System.Drawing.Point(6, 43) + Me.rdoPairwise.Name = "rdoPairwise" + Me.rdoPairwise.Size = New System.Drawing.Size(64, 17) + Me.rdoPairwise.TabIndex = 2 + Me.rdoPairwise.Tag = "Pairwise" + Me.rdoPairwise.Text = "Pairwise" + Me.rdoPairwise.UseVisualStyleBackColor = True + ' + 'ucrPnlCompletePairwise + ' + Me.ucrPnlCompletePairwise.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlCompletePairwise.Location = New System.Drawing.Point(6, 13) + Me.ucrPnlCompletePairwise.Name = "ucrPnlCompletePairwise" + Me.ucrPnlCompletePairwise.Size = New System.Drawing.Size(146, 49) + Me.ucrPnlCompletePairwise.TabIndex = 0 + ' + 'lblMethod + ' + Me.lblMethod.AutoSize = True + Me.lblMethod.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMethod.Location = New System.Drawing.Point(129, 441) + Me.lblMethod.Name = "lblMethod" + Me.lblMethod.Size = New System.Drawing.Size(46, 13) + Me.lblMethod.TabIndex = 61 + Me.lblMethod.Text = "Method:" + ' + 'ucrInputRearrange + ' + Me.ucrInputRearrange.AddQuotesIfUnrecognised = True + Me.ucrInputRearrange.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputRearrange.GetSetSelectedIndex = -1 + Me.ucrInputRearrange.IsReadOnly = False + Me.ucrInputRearrange.Location = New System.Drawing.Point(179, 438) + Me.ucrInputRearrange.Name = "ucrInputRearrange" + Me.ucrInputRearrange.Size = New System.Drawing.Size(79, 21) + Me.ucrInputRearrange.TabIndex = 60 + ' + 'ucrChkRearrange + ' + Me.ucrChkRearrange.AutoSize = True + Me.ucrChkRearrange.Checked = False + Me.ucrChkRearrange.Location = New System.Drawing.Point(21, 440) + Me.ucrChkRearrange.Name = "ucrChkRearrange" + Me.ucrChkRearrange.Size = New System.Drawing.Size(96, 23) + Me.ucrChkRearrange.TabIndex = 59 + ' + 'ucrInputDisplayNas + ' + Me.ucrInputDisplayNas.AddQuotesIfUnrecognised = True + Me.ucrInputDisplayNas.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDisplayNas.GetSetSelectedIndex = -1 + Me.ucrInputDisplayNas.IsReadOnly = False + Me.ucrInputDisplayNas.Location = New System.Drawing.Point(131, 385) + Me.ucrInputDisplayNas.Name = "ucrInputDisplayNas" + Me.ucrInputDisplayNas.Size = New System.Drawing.Size(51, 21) + Me.ucrInputDisplayNas.TabIndex = 57 + ' + 'lblDisplayNas + ' + Me.lblDisplayNas.AutoSize = True + Me.lblDisplayNas.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDisplayNas.Location = New System.Drawing.Point(21, 388) + Me.lblDisplayNas.Name = "lblDisplayNas" + Me.lblDisplayNas.Size = New System.Drawing.Size(67, 13) + Me.lblDisplayNas.TabIndex = 56 + Me.lblDisplayNas.Text = "Display NAs:" + ' + 'ucrChkLeadingZeros + ' + Me.ucrChkLeadingZeros.AutoSize = True + Me.ucrChkLeadingZeros.Checked = False + Me.ucrChkLeadingZeros.Location = New System.Drawing.Point(21, 412) + Me.ucrChkLeadingZeros.Name = "ucrChkLeadingZeros" + Me.ucrChkLeadingZeros.Size = New System.Drawing.Size(115, 23) + Me.ucrChkLeadingZeros.TabIndex = 55 + ' + 'lblDecimalPlaces + ' + Me.lblDecimalPlaces.AutoSize = True + Me.lblDecimalPlaces.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDecimalPlaces.Location = New System.Drawing.Point(21, 364) + Me.lblDecimalPlaces.Name = "lblDecimalPlaces" + Me.lblDecimalPlaces.Size = New System.Drawing.Size(83, 13) + Me.lblDecimalPlaces.TabIndex = 53 + Me.lblDecimalPlaces.Text = "Decimal Places:" + ' + 'ucrNudDecimalPlaces + ' + Me.ucrNudDecimalPlaces.AutoSize = True + Me.ucrNudDecimalPlaces.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Location = New System.Drawing.Point(131, 360) + Me.ucrNudDecimalPlaces.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Name = "ucrNudDecimalPlaces" + Me.ucrNudDecimalPlaces.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDecimalPlaces.TabIndex = 52 + Me.ucrNudDecimalPlaces.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'rdoTwoColumns + ' + Me.rdoTwoColumns.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoTwoColumns.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTwoColumns.FlatAppearance.BorderSize = 2 + Me.rdoTwoColumns.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTwoColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoTwoColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoTwoColumns.Location = New System.Drawing.Point(231, 5) + Me.rdoTwoColumns.Name = "rdoTwoColumns" + Me.rdoTwoColumns.Size = New System.Drawing.Size(127, 27) + Me.rdoTwoColumns.TabIndex = 35 + Me.rdoTwoColumns.TabStop = True + Me.rdoTwoColumns.Text = "Two Variables" + Me.rdoTwoColumns.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoTwoColumns.UseVisualStyleBackColor = True + ' + 'rdoMultipleColumns + ' + Me.rdoMultipleColumns.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoMultipleColumns.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMultipleColumns.FlatAppearance.BorderSize = 2 + Me.rdoMultipleColumns.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMultipleColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoMultipleColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoMultipleColumns.Location = New System.Drawing.Point(100, 5) + Me.rdoMultipleColumns.Name = "rdoMultipleColumns" + Me.rdoMultipleColumns.Size = New System.Drawing.Size(132, 27) + Me.rdoMultipleColumns.TabIndex = 36 + Me.rdoMultipleColumns.TabStop = True + Me.rdoMultipleColumns.Text = "Multiple Variables" + Me.rdoMultipleColumns.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoMultipleColumns.UseVisualStyleBackColor = True + ' + 'ucrPnlColumns + ' + Me.ucrPnlColumns.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlColumns.Location = New System.Drawing.Point(88, 1) + Me.ucrPnlColumns.Name = "ucrPnlColumns" + Me.ucrPnlColumns.Size = New System.Drawing.Size(280, 36) + Me.ucrPnlColumns.TabIndex = 34 ' 'grpMethod ' @@ -95,10 +274,10 @@ Partial Class dlgCorrelation Me.grpMethod.Controls.Add(Me.rdoPearson) Me.grpMethod.Controls.Add(Me.rdoSpearman) Me.grpMethod.Controls.Add(Me.ucrPnlMethod) - Me.grpMethod.Location = New System.Drawing.Point(9, 232) + Me.grpMethod.Location = New System.Drawing.Point(13, 236) Me.grpMethod.Name = "grpMethod" Me.grpMethod.Size = New System.Drawing.Size(246, 45) - Me.grpMethod.TabIndex = 10 + Me.grpMethod.TabIndex = 44 Me.grpMethod.TabStop = False Me.grpMethod.Tag = "Method" Me.grpMethod.Text = "Method" @@ -107,7 +286,7 @@ Partial Class dlgCorrelation ' Me.rdoKendall.AutoSize = True Me.rdoKendall.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoKendall.Location = New System.Drawing.Point(91, 18) + Me.rdoKendall.Location = New System.Drawing.Point(91, 15) Me.rdoKendall.Name = "rdoKendall" Me.rdoKendall.Size = New System.Drawing.Size(60, 17) Me.rdoKendall.TabIndex = 2 @@ -120,7 +299,7 @@ Partial Class dlgCorrelation Me.rdoPearson.AutoSize = True Me.rdoPearson.Checked = True Me.rdoPearson.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoPearson.Location = New System.Drawing.Point(15, 18) + Me.rdoPearson.Location = New System.Drawing.Point(15, 15) Me.rdoPearson.Name = "rdoPearson" Me.rdoPearson.Size = New System.Drawing.Size(64, 17) Me.rdoPearson.TabIndex = 1 @@ -133,7 +312,7 @@ Partial Class dlgCorrelation ' Me.rdoSpearman.AutoSize = True Me.rdoSpearman.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSpearman.Location = New System.Drawing.Point(164, 18) + Me.rdoSpearman.Location = New System.Drawing.Point(164, 15) Me.rdoSpearman.Name = "rdoSpearman" Me.rdoSpearman.Size = New System.Drawing.Size(73, 17) Me.rdoSpearman.TabIndex = 3 @@ -144,247 +323,238 @@ Partial Class dlgCorrelation 'ucrPnlMethod ' Me.ucrPnlMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMethod.Location = New System.Drawing.Point(8, 16) + Me.ucrPnlMethod.Location = New System.Drawing.Point(8, 13) Me.ucrPnlMethod.Name = "ucrPnlMethod" Me.ucrPnlMethod.Size = New System.Drawing.Size(229, 24) Me.ucrPnlMethod.TabIndex = 0 ' - 'cmdOptions - ' - Me.cmdOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOptions.Location = New System.Drawing.Point(299, 334) - Me.cmdOptions.Name = "cmdOptions" - Me.cmdOptions.Size = New System.Drawing.Size(114, 25) - Me.cmdOptions.TabIndex = 16 - Me.cmdOptions.Tag = "Options" - Me.cmdOptions.Text = "Options" - Me.cmdOptions.UseVisualStyleBackColor = True - ' 'grpMissing ' Me.grpMissing.Controls.Add(Me.rdoCompleteRowsOnly) Me.grpMissing.Controls.Add(Me.rdoPairwise) Me.grpMissing.Controls.Add(Me.ucrPnlCompletePairwise) - Me.grpMissing.Location = New System.Drawing.Point(261, 232) + Me.grpMissing.Location = New System.Drawing.Point(265, 236) Me.grpMissing.Name = "grpMissing" - Me.grpMissing.Size = New System.Drawing.Size(167, 71) - Me.grpMissing.TabIndex = 11 + Me.grpMissing.Size = New System.Drawing.Size(158, 71) + Me.grpMissing.TabIndex = 45 Me.grpMissing.TabStop = False Me.grpMissing.Tag = "Missing" Me.grpMissing.Text = "Missing" ' - 'rdoCompleteRowsOnly - ' - Me.rdoCompleteRowsOnly.AutoSize = True - Me.rdoCompleteRowsOnly.Checked = True - Me.rdoCompleteRowsOnly.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoCompleteRowsOnly.Location = New System.Drawing.Point(6, 23) - Me.rdoCompleteRowsOnly.Name = "rdoCompleteRowsOnly" - Me.rdoCompleteRowsOnly.Size = New System.Drawing.Size(116, 17) - Me.rdoCompleteRowsOnly.TabIndex = 1 - Me.rdoCompleteRowsOnly.TabStop = True - Me.rdoCompleteRowsOnly.Tag = "Complete_rows_only" - Me.rdoCompleteRowsOnly.Text = "Complete rows only" - Me.rdoCompleteRowsOnly.UseVisualStyleBackColor = True - ' - 'rdoPairwise - ' - Me.rdoPairwise.AutoSize = True - Me.rdoPairwise.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoPairwise.Location = New System.Drawing.Point(6, 46) - Me.rdoPairwise.Name = "rdoPairwise" - Me.rdoPairwise.Size = New System.Drawing.Size(64, 17) - Me.rdoPairwise.TabIndex = 2 - Me.rdoPairwise.Tag = "Pairwise" - Me.rdoPairwise.Text = "Pairwise" - Me.rdoPairwise.UseVisualStyleBackColor = True - ' - 'ucrPnlCompletePairwise + 'cmdOptions ' - Me.ucrPnlCompletePairwise.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlCompletePairwise.Location = New System.Drawing.Point(6, 16) - Me.ucrPnlCompletePairwise.Name = "ucrPnlCompletePairwise" - Me.ucrPnlCompletePairwise.Size = New System.Drawing.Size(152, 49) - Me.ucrPnlCompletePairwise.TabIndex = 0 + Me.cmdOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdOptions.Location = New System.Drawing.Point(303, 504) + Me.cmdOptions.Name = "cmdOptions" + Me.cmdOptions.Size = New System.Drawing.Size(114, 25) + Me.cmdOptions.TabIndex = 49 + Me.cmdOptions.Tag = "Options" + Me.cmdOptions.Text = "Options" + Me.cmdOptions.UseVisualStyleBackColor = True ' - 'lblConfInterval + 'ucrSelectorCorrelation ' - Me.lblConfInterval.AutoSize = True - Me.lblConfInterval.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblConfInterval.Location = New System.Drawing.Point(15, 286) - Me.lblConfInterval.Name = "lblConfInterval" - Me.lblConfInterval.Size = New System.Drawing.Size(102, 13) - Me.lblConfInterval.TabIndex = 12 - Me.lblConfInterval.Text = "Confidence Interval:" + Me.ucrSelectorCorrelation.AutoSize = True + Me.ucrSelectorCorrelation.bDropUnusedFilterLevels = False + Me.ucrSelectorCorrelation.bShowHiddenColumns = False + Me.ucrSelectorCorrelation.bUseCurrentFilter = True + Me.ucrSelectorCorrelation.Location = New System.Drawing.Point(13, 47) + Me.ucrSelectorCorrelation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorCorrelation.Name = "ucrSelectorCorrelation" + Me.ucrSelectorCorrelation.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorCorrelation.TabIndex = 37 ' - 'rdoTwoColumns + 'ucrBase ' - Me.rdoTwoColumns.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoTwoColumns.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoTwoColumns.FlatAppearance.BorderSize = 2 - Me.rdoTwoColumns.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoTwoColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTwoColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoTwoColumns.Location = New System.Drawing.Point(119, 10) - Me.rdoTwoColumns.Name = "rdoTwoColumns" - Me.rdoTwoColumns.Size = New System.Drawing.Size(127, 27) - Me.rdoTwoColumns.TabIndex = 1 - Me.rdoTwoColumns.TabStop = True - Me.rdoTwoColumns.Text = "Two Columns" - Me.rdoTwoColumns.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoTwoColumns.UseVisualStyleBackColor = True + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(13, 536) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(405, 52) + Me.ucrBase.TabIndex = 50 ' - 'rdoMultipleColumns + 'grpDisplayOptions ' - Me.rdoMultipleColumns.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoMultipleColumns.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultipleColumns.FlatAppearance.BorderSize = 2 - Me.rdoMultipleColumns.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultipleColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoMultipleColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleColumns.Location = New System.Drawing.Point(243, 10) - Me.rdoMultipleColumns.Name = "rdoMultipleColumns" - Me.rdoMultipleColumns.Size = New System.Drawing.Size(127, 27) - Me.rdoMultipleColumns.TabIndex = 2 - Me.rdoMultipleColumns.TabStop = True - Me.rdoMultipleColumns.Text = "Multiple Columns" - Me.rdoMultipleColumns.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoMultipleColumns.UseVisualStyleBackColor = True + Me.grpDisplayOptions.Controls.Add(Me.ucrChkShave) + Me.grpDisplayOptions.Location = New System.Drawing.Point(13, 341) + Me.grpDisplayOptions.Name = "grpDisplayOptions" + Me.grpDisplayOptions.Size = New System.Drawing.Size(410, 156) + Me.grpDisplayOptions.TabIndex = 63 + Me.grpDisplayOptions.TabStop = False + Me.grpDisplayOptions.Tag = "Display Options" + Me.grpDisplayOptions.Text = "Display Options" ' - 'lblSelectedVariables + 'ucrSaveDataFrame ' - Me.lblSelectedVariables.AutoSize = True - Me.lblSelectedVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSelectedVariables.Location = New System.Drawing.Point(255, 75) - Me.lblSelectedVariables.Name = "lblSelectedVariables" - Me.lblSelectedVariables.Size = New System.Drawing.Size(53, 13) - Me.lblSelectedVariables.TabIndex = 4 - Me.lblSelectedVariables.Tag = "" - Me.lblSelectedVariables.Text = "Variables:" + Me.ucrSaveDataFrame.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveDataFrame.Location = New System.Drawing.Point(14, 505) + Me.ucrSaveDataFrame.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveDataFrame.Name = "ucrSaveDataFrame" + Me.ucrSaveDataFrame.Size = New System.Drawing.Size(266, 24) + Me.ucrSaveDataFrame.TabIndex = 54 ' 'ucrSaveModel ' Me.ucrSaveModel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveModel.Location = New System.Drawing.Point(14, 335) + Me.ucrSaveModel.Location = New System.Drawing.Point(17, 505) Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" Me.ucrSaveModel.Size = New System.Drawing.Size(266, 24) - Me.ucrSaveModel.TabIndex = 15 + Me.ucrSaveModel.TabIndex = 48 + ' + 'ucrInputDiagonal + ' + Me.ucrInputDiagonal.AddQuotesIfUnrecognised = True + Me.ucrInputDiagonal.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDiagonal.GetSetSelectedIndex = -1 + Me.ucrInputDiagonal.IsReadOnly = False + Me.ucrInputDiagonal.Location = New System.Drawing.Point(131, 287) + Me.ucrInputDiagonal.Name = "ucrInputDiagonal" + Me.ucrInputDiagonal.Size = New System.Drawing.Size(51, 21) + Me.ucrInputDiagonal.TabIndex = 58 ' 'ucrNudConfidenceInterval ' Me.ucrNudConfidenceInterval.AutoSize = True Me.ucrNudConfidenceInterval.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceInterval.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceInterval.Location = New System.Drawing.Point(130, 283) + Me.ucrNudConfidenceInterval.Location = New System.Drawing.Point(131, 288) Me.ucrNudConfidenceInterval.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceInterval.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceInterval.Name = "ucrNudConfidenceInterval" Me.ucrNudConfidenceInterval.Size = New System.Drawing.Size(50, 20) - Me.ucrNudConfidenceInterval.TabIndex = 13 + Me.ucrNudConfidenceInterval.TabIndex = 47 Me.ucrNudConfidenceInterval.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrChkCorrelationMatrix + 'lblDisplayOnDiagonal ' - Me.ucrChkCorrelationMatrix.AutoSize = True - Me.ucrChkCorrelationMatrix.Checked = False - Me.ucrChkCorrelationMatrix.Location = New System.Drawing.Point(14, 309) - Me.ucrChkCorrelationMatrix.Name = "ucrChkCorrelationMatrix" - Me.ucrChkCorrelationMatrix.Size = New System.Drawing.Size(283, 23) - Me.ucrChkCorrelationMatrix.TabIndex = 14 + Me.lblDisplayOnDiagonal.AutoSize = True + Me.lblDisplayOnDiagonal.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDisplayOnDiagonal.Location = New System.Drawing.Point(13, 289) + Me.lblDisplayOnDiagonal.Name = "lblDisplayOnDiagonal" + Me.lblDisplayOnDiagonal.Size = New System.Drawing.Size(106, 13) + Me.lblDisplayOnDiagonal.TabIndex = 51 + Me.lblDisplayOnDiagonal.Text = "Display On Diagonal:" ' - 'ucrPnlColumns + 'lblConfInterval ' - Me.ucrPnlColumns.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumns.Location = New System.Drawing.Point(86, 6) - Me.ucrPnlColumns.Name = "ucrPnlColumns" - Me.ucrPnlColumns.Size = New System.Drawing.Size(284, 36) - Me.ucrPnlColumns.TabIndex = 0 + Me.lblConfInterval.AutoSize = True + Me.lblConfInterval.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblConfInterval.Location = New System.Drawing.Point(14, 289) + Me.lblConfInterval.Name = "lblConfInterval" + Me.lblConfInterval.Size = New System.Drawing.Size(102, 13) + Me.lblConfInterval.TabIndex = 46 + Me.lblConfInterval.Text = "Confidence Interval:" ' 'ucrReceiverMultipleColumns ' Me.ucrReceiverMultipleColumns.AutoSize = True Me.ucrReceiverMultipleColumns.frmParent = Me - Me.ucrReceiverMultipleColumns.Location = New System.Drawing.Point(258, 90) + Me.ucrReceiverMultipleColumns.Location = New System.Drawing.Point(262, 85) Me.ucrReceiverMultipleColumns.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMultipleColumns.Name = "ucrReceiverMultipleColumns" Me.ucrReceiverMultipleColumns.Selector = Nothing Me.ucrReceiverMultipleColumns.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverMultipleColumns.strNcFilePath = "" - Me.ucrReceiverMultipleColumns.TabIndex = 7 + Me.ucrReceiverMultipleColumns.TabIndex = 41 Me.ucrReceiverMultipleColumns.ucrSelector = Nothing ' 'ucrReceiverSecondColumn ' Me.ucrReceiverSecondColumn.AutoSize = True Me.ucrReceiverSecondColumn.frmParent = Me - Me.ucrReceiverSecondColumn.Location = New System.Drawing.Point(258, 142) + Me.ucrReceiverSecondColumn.Location = New System.Drawing.Point(262, 137) Me.ucrReceiverSecondColumn.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondColumn.Name = "ucrReceiverSecondColumn" Me.ucrReceiverSecondColumn.Selector = Nothing Me.ucrReceiverSecondColumn.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverSecondColumn.strNcFilePath = "" - Me.ucrReceiverSecondColumn.TabIndex = 9 + Me.ucrReceiverSecondColumn.TabIndex = 43 Me.ucrReceiverSecondColumn.ucrSelector = Nothing ' + 'lblSecondColumn + ' + Me.lblSecondColumn.AutoSize = True + Me.lblSecondColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSecondColumn.Location = New System.Drawing.Point(262, 122) + Me.lblSecondColumn.Name = "lblSecondColumn" + Me.lblSecondColumn.Size = New System.Drawing.Size(88, 13) + Me.lblSecondColumn.TabIndex = 42 + Me.lblSecondColumn.Tag = "Second_column" + Me.lblSecondColumn.Text = "Second Variable:" + ' + 'lblSelectedVariables + ' + Me.lblSelectedVariables.AutoSize = True + Me.lblSelectedVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectedVariables.Location = New System.Drawing.Point(264, 68) + Me.lblSelectedVariables.Name = "lblSelectedVariables" + Me.lblSelectedVariables.Size = New System.Drawing.Size(53, 13) + Me.lblSelectedVariables.TabIndex = 38 + Me.lblSelectedVariables.Tag = "" + Me.lblSelectedVariables.Text = "Variables:" + ' 'ucrReceiverFirstColumn ' Me.ucrReceiverFirstColumn.AutoSize = True Me.ucrReceiverFirstColumn.frmParent = Me - Me.ucrReceiverFirstColumn.Location = New System.Drawing.Point(258, 90) + Me.ucrReceiverFirstColumn.Location = New System.Drawing.Point(262, 85) Me.ucrReceiverFirstColumn.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFirstColumn.Name = "ucrReceiverFirstColumn" Me.ucrReceiverFirstColumn.Selector = Nothing Me.ucrReceiverFirstColumn.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverFirstColumn.strNcFilePath = "" - Me.ucrReceiverFirstColumn.TabIndex = 6 + Me.ucrReceiverFirstColumn.TabIndex = 40 Me.ucrReceiverFirstColumn.ucrSelector = Nothing ' - 'ucrSelectorCorrelation - ' - Me.ucrSelectorCorrelation.AutoSize = True - Me.ucrSelectorCorrelation.bDropUnusedFilterLevels = False - Me.ucrSelectorCorrelation.bShowHiddenColumns = False - Me.ucrSelectorCorrelation.bUseCurrentFilter = True - Me.ucrSelectorCorrelation.Location = New System.Drawing.Point(10, 40) - Me.ucrSelectorCorrelation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorCorrelation.Name = "ucrSelectorCorrelation" - Me.ucrSelectorCorrelation.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorCorrelation.TabIndex = 3 - ' - 'ucrBase + 'lblFirstColumn ' - Me.ucrBase.AutoSize = True - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(14, 361) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(405, 52) - Me.ucrBase.TabIndex = 17 + Me.lblFirstColumn.AutoSize = True + Me.lblFirstColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFirstColumn.Location = New System.Drawing.Point(267, 68) + Me.lblFirstColumn.Name = "lblFirstColumn" + Me.lblFirstColumn.Size = New System.Drawing.Size(70, 13) + Me.lblFirstColumn.TabIndex = 39 + Me.lblFirstColumn.Tag = "First_column" + Me.lblFirstColumn.Text = "First Variable:" ' 'dlgCorrelation ' 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(436, 416) - Me.Controls.Add(Me.lblSelectedVariables) - Me.Controls.Add(Me.ucrNudConfidenceInterval) - Me.Controls.Add(Me.ucrChkCorrelationMatrix) + Me.ClientSize = New System.Drawing.Size(438, 596) + Me.Controls.Add(Me.ucrChkDisplayOptions) + Me.Controls.Add(Me.ucrChkAbsolute) + Me.Controls.Add(Me.lblMethod) + Me.Controls.Add(Me.ucrInputRearrange) + Me.Controls.Add(Me.ucrChkRearrange) + Me.Controls.Add(Me.ucrInputDisplayNas) + Me.Controls.Add(Me.lblDisplayNas) + Me.Controls.Add(Me.ucrChkLeadingZeros) + Me.Controls.Add(Me.lblDecimalPlaces) + Me.Controls.Add(Me.ucrNudDecimalPlaces) Me.Controls.Add(Me.rdoTwoColumns) Me.Controls.Add(Me.rdoMultipleColumns) Me.Controls.Add(Me.ucrPnlColumns) Me.Controls.Add(Me.grpMethod) - Me.Controls.Add(Me.ucrReceiverMultipleColumns) - Me.Controls.Add(Me.lblConfInterval) Me.Controls.Add(Me.grpMissing) Me.Controls.Add(Me.cmdOptions) - Me.Controls.Add(Me.lblSecondColumn) - Me.Controls.Add(Me.lblFirstColumn) - Me.Controls.Add(Me.ucrReceiverSecondColumn) - Me.Controls.Add(Me.ucrReceiverFirstColumn) Me.Controls.Add(Me.ucrSelectorCorrelation) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.grpDisplayOptions) + Me.Controls.Add(Me.ucrSaveDataFrame) Me.Controls.Add(Me.ucrSaveModel) + Me.Controls.Add(Me.ucrInputDiagonal) + Me.Controls.Add(Me.ucrNudConfidenceInterval) + Me.Controls.Add(Me.lblDisplayOnDiagonal) + Me.Controls.Add(Me.lblConfInterval) + Me.Controls.Add(Me.ucrReceiverMultipleColumns) + Me.Controls.Add(Me.ucrReceiverSecondColumn) + Me.Controls.Add(Me.lblSecondColumn) + Me.Controls.Add(Me.lblSelectedVariables) + Me.Controls.Add(Me.ucrReceiverFirstColumn) + Me.Controls.Add(Me.lblFirstColumn) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -396,33 +566,50 @@ Partial Class dlgCorrelation Me.grpMethod.PerformLayout() Me.grpMissing.ResumeLayout(False) Me.grpMissing.PerformLayout() + Me.grpDisplayOptions.ResumeLayout(False) + Me.grpDisplayOptions.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrSelectorCorrelation As ucrSelectorByDataFrameAddRemove - Friend WithEvents ucrReceiverFirstColumn As ucrReceiverSingle - Friend WithEvents ucrReceiverSecondColumn As ucrReceiverSingle - Friend WithEvents lblFirstColumn As Label - Friend WithEvents lblSecondColumn As Label - Friend WithEvents grpMethod As GroupBox - Friend WithEvents rdoSpearman As RadioButton - Friend WithEvents rdoKendall As RadioButton - Friend WithEvents rdoPearson As RadioButton - Friend WithEvents cmdOptions As Button - Friend WithEvents grpMissing As GroupBox - Friend WithEvents rdoPairwise As RadioButton + + Friend WithEvents ucrChkDisplayOptions As ucrCheck + Friend WithEvents ucrChkAbsolute As ucrCheck + Friend WithEvents ucrChkShave As ucrCheck Friend WithEvents rdoCompleteRowsOnly As RadioButton - Friend WithEvents lblConfInterval As Label - Friend WithEvents ucrReceiverMultipleColumns As ucrReceiverMultiple + Friend WithEvents rdoPairwise As RadioButton + Friend WithEvents ucrPnlCompletePairwise As UcrPanel + Friend WithEvents lblMethod As Label + Friend WithEvents ucrInputRearrange As ucrInputComboBox + Friend WithEvents ucrChkRearrange As ucrCheck + Friend WithEvents ucrInputDisplayNas As ucrInputComboBox + Friend WithEvents lblDisplayNas As Label + Friend WithEvents ucrChkLeadingZeros As ucrCheck + Friend WithEvents lblDecimalPlaces As Label + Friend WithEvents ucrNudDecimalPlaces As ucrNud Friend WithEvents rdoTwoColumns As RadioButton Friend WithEvents rdoMultipleColumns As RadioButton Friend WithEvents ucrPnlColumns As UcrPanel - Friend WithEvents ucrChkCorrelationMatrix As ucrCheck + Friend WithEvents grpMethod As GroupBox + Friend WithEvents rdoKendall As RadioButton + Friend WithEvents rdoPearson As RadioButton + Friend WithEvents rdoSpearman As RadioButton Friend WithEvents ucrPnlMethod As UcrPanel - Friend WithEvents ucrPnlCompletePairwise As UcrPanel - Friend WithEvents ucrNudConfidenceInterval As ucrNud + Friend WithEvents grpMissing As GroupBox + Friend WithEvents cmdOptions As Button + Friend WithEvents ucrSelectorCorrelation As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents grpDisplayOptions As GroupBox + Friend WithEvents ucrSaveDataFrame As ucrSave Friend WithEvents ucrSaveModel As ucrSave + Friend WithEvents ucrInputDiagonal As ucrInputComboBox + Friend WithEvents ucrNudConfidenceInterval As ucrNud + Friend WithEvents lblDisplayOnDiagonal As Label + Friend WithEvents lblConfInterval As Label + Friend WithEvents ucrReceiverMultipleColumns As ucrReceiverMultiple + Friend WithEvents ucrReceiverSecondColumn As ucrReceiverSingle + Friend WithEvents lblSecondColumn As Label Friend WithEvents lblSelectedVariables As Label + Friend WithEvents ucrReceiverFirstColumn As ucrReceiverSingle + Friend WithEvents lblFirstColumn As Label End Class \ No newline at end of file diff --git a/instat/dlgCorrelation.vb b/instat/dlgCorrelation.vb index 7e63813ce77..fae7e817679 100644 --- a/instat/dlgCorrelation.vb +++ b/instat/dlgCorrelation.vb @@ -240,13 +240,13 @@ Public Class dlgCorrelation End If End Sub - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) SetDefaults() SetRCodeForControls(True) TestOKEnabled() End Sub - Private Sub cmdPlots_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + Private Sub cmdPlots_Click(sender As Object, e As EventArgs) sdgCorrPlot.SetRCode(clsNewRSyntax:=ucrBase.clsRsyntax, clsNewcorrelationFunction:=clsCorrelationFunction, clsNewcorrelationTestFunction:=clsCorrelationTestFunction, clsNewRGGcorrGraphicsFunction:=clsRGGcorrGraphicsFunction, clsNewRGraphicsFuction:=clsRGraphicsFuction, clsNewRGGscatmatrixFunction:=clsRGGscatMatrixFunction, strNewColFunction:=strColFunction, clsNewRGGscatMatrixReverseOperator:=clsRGGscatMatricReverseOperator, ucrNewBaseSelector:=ucrSelectorCorrelation, @@ -255,7 +255,7 @@ Public Class dlgCorrelation bResetSubdialog = False End Sub - Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) Handles ucrBase.BeforeClickOk + Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) If rdoTwoColumns.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsCorrelationTestFunction) ElseIf rdoMultipleColumns.Checked Then @@ -264,7 +264,7 @@ Public Class dlgCorrelation End Sub ' This is here because otherwise the panel cannot be set up correctly if you reopen the dialog when on the 2-variable rdo button - Private Sub ucrPnlCompletePairwise_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlCompletePairwise.ControlValueChanged + Private Sub ucrPnlCompletePairwise_ControlValueChanged(ucrChangedControl As ucrCore) If rdoPairwise.Checked Then clsCorrelationFunction.AddParameter("use", Chr(34) & "pairwise.complete.obs" & Chr(34)) ElseIf rdoCompleteRowsOnly.Checked Then @@ -272,7 +272,7 @@ Public Class dlgCorrelation End If End Sub - Private Sub ucrPnlColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumns.ControlValueChanged + Private Sub ucrPnlColumns_ControlValueChanged(ucrChangedControl As ucrCore) If rdoTwoColumns.Checked Then ucrReceiverFirstColumn.SetMeAsReceiver() ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRGGcorrGraphicsFunction) @@ -282,15 +282,15 @@ Public Class dlgCorrelation ReceiverColumns() End Sub - Private Sub ucrReceiverMultipleColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleColumns.ControlValueChanged, ucrReceiverFirstColumn.ControlValueChanged, ucrReceiverSecondColumn.ControlValueChanged + Private Sub ucrReceiverMultipleColumns_ControlValueChanged(ucrChangedControl As ucrCore) ReceiverColumns() End Sub - Private Sub ucrReceiverFirstColumn_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstColumn.ControlContentsChanged, ucrReceiverSecondColumn.ControlContentsChanged, ucrReceiverMultipleColumns.ControlContentsChanged, ucrPnlColumns.ControlContentsChanged, ucrPnlCompletePairwise.ControlContentsChanged, ucrPnlMethod.ControlContentsChanged + Private Sub ucrReceiverFirstColumn_ControlContentsChanged(ucrChangedControl As ucrCore) TestOKEnabled() End Sub - Private Sub ucrSelectorCorrelation_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorCorrelation.ControlContentsChanged + Private Sub ucrSelectorCorrelation_ControlContentsChanged(ucrChangedControl As ucrCore) clsCurrentDataFrameFunction = ucrSelectorCorrelation.ucrAvailableDataFrames.clsCurrDataFrame End Sub From a7368cd8b7fc5de8b4e5a4bbf545b0d6a30f44dd Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 31 Mar 2022 12:08:34 +0300 Subject: [PATCH 2/3] Changes --- instat/dlgCorrelation.designer.vb | 410 +++++++++++++++--------------- instat/dlgCorrelation.vb | 190 +++++++++++--- 2 files changed, 360 insertions(+), 240 deletions(-) diff --git a/instat/dlgCorrelation.designer.vb b/instat/dlgCorrelation.designer.vb index 88263e8270c..5f25cb1a3e6 100644 --- a/instat/dlgCorrelation.designer.vb +++ b/instat/dlgCorrelation.designer.vb @@ -38,77 +38,50 @@ Partial Class dlgCorrelation 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.ucrChkDisplayOptions = New instat.ucrCheck() - Me.ucrChkAbsolute = New instat.ucrCheck() - Me.ucrChkShave = New instat.ucrCheck() Me.rdoCompleteRowsOnly = New System.Windows.Forms.RadioButton() Me.rdoPairwise = New System.Windows.Forms.RadioButton() - Me.ucrPnlCompletePairwise = New instat.UcrPanel() Me.lblMethod = New System.Windows.Forms.Label() - Me.ucrInputRearrange = New instat.ucrInputComboBox() - Me.ucrChkRearrange = New instat.ucrCheck() - Me.ucrInputDisplayNas = New instat.ucrInputComboBox() Me.lblDisplayNas = New System.Windows.Forms.Label() - Me.ucrChkLeadingZeros = New instat.ucrCheck() Me.lblDecimalPlaces = New System.Windows.Forms.Label() - Me.ucrNudDecimalPlaces = New instat.ucrNud() Me.rdoTwoColumns = New System.Windows.Forms.RadioButton() Me.rdoMultipleColumns = New System.Windows.Forms.RadioButton() - Me.ucrPnlColumns = New instat.UcrPanel() Me.grpMethod = New System.Windows.Forms.GroupBox() Me.rdoKendall = New System.Windows.Forms.RadioButton() Me.rdoPearson = New System.Windows.Forms.RadioButton() Me.rdoSpearman = New System.Windows.Forms.RadioButton() - Me.ucrPnlMethod = New instat.UcrPanel() Me.grpMissing = New System.Windows.Forms.GroupBox() Me.cmdOptions = New System.Windows.Forms.Button() + Me.grpDisplayOptions = New System.Windows.Forms.GroupBox() + Me.lblDisplayOnDiagonal = New System.Windows.Forms.Label() + Me.lblConfInterval = New System.Windows.Forms.Label() + Me.lblSecondColumn = New System.Windows.Forms.Label() + Me.lblSelectedVariables = New System.Windows.Forms.Label() + Me.lblFirstColumn = New System.Windows.Forms.Label() + Me.ucrChkDisplayOptions = New instat.ucrCheck() + Me.ucrChkAbsolute = New instat.ucrCheck() + Me.ucrInputRearrange = New instat.ucrInputComboBox() + Me.ucrChkRearrange = New instat.ucrCheck() + Me.ucrInputDisplayNas = New instat.ucrInputComboBox() + Me.ucrChkLeadingZeros = New instat.ucrCheck() + Me.ucrNudDecimalPlaces = New instat.ucrNud() + Me.ucrPnlColumns = New instat.UcrPanel() + Me.ucrPnlMethod = New instat.UcrPanel() + Me.ucrPnlCompletePairwise = New instat.UcrPanel() Me.ucrSelectorCorrelation = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.grpDisplayOptions = New System.Windows.Forms.GroupBox() + Me.ucrChkShave = New instat.ucrCheck() Me.ucrSaveDataFrame = New instat.ucrSave() Me.ucrSaveModel = New instat.ucrSave() Me.ucrInputDiagonal = New instat.ucrInputComboBox() Me.ucrNudConfidenceInterval = New instat.ucrNud() - Me.lblDisplayOnDiagonal = New System.Windows.Forms.Label() - Me.lblConfInterval = New System.Windows.Forms.Label() Me.ucrReceiverMultipleColumns = New instat.ucrReceiverMultiple() Me.ucrReceiverSecondColumn = New instat.ucrReceiverSingle() - Me.lblSecondColumn = New System.Windows.Forms.Label() - Me.lblSelectedVariables = New System.Windows.Forms.Label() Me.ucrReceiverFirstColumn = New instat.ucrReceiverSingle() - Me.lblFirstColumn = New System.Windows.Forms.Label() Me.grpMethod.SuspendLayout() Me.grpMissing.SuspendLayout() Me.grpDisplayOptions.SuspendLayout() Me.SuspendLayout() ' - 'ucrChkDisplayOptions - ' - Me.ucrChkDisplayOptions.AutoSize = True - Me.ucrChkDisplayOptions.Checked = False - Me.ucrChkDisplayOptions.Location = New System.Drawing.Point(14, 312) - Me.ucrChkDisplayOptions.Name = "ucrChkDisplayOptions" - Me.ucrChkDisplayOptions.Size = New System.Drawing.Size(192, 23) - Me.ucrChkDisplayOptions.TabIndex = 64 - ' - 'ucrChkAbsolute - ' - Me.ucrChkAbsolute.AutoSize = True - Me.ucrChkAbsolute.Checked = False - Me.ucrChkAbsolute.Location = New System.Drawing.Point(270, 439) - Me.ucrChkAbsolute.Name = "ucrChkAbsolute" - Me.ucrChkAbsolute.Size = New System.Drawing.Size(117, 23) - Me.ucrChkAbsolute.TabIndex = 62 - ' - 'ucrChkShave - ' - Me.ucrChkShave.AutoSize = True - Me.ucrChkShave.Checked = False - Me.ucrChkShave.Location = New System.Drawing.Point(8, 124) - Me.ucrChkShave.Name = "ucrChkShave" - Me.ucrChkShave.Size = New System.Drawing.Size(192, 23) - Me.ucrChkShave.TabIndex = 26 - ' 'rdoCompleteRowsOnly ' Me.rdoCompleteRowsOnly.AutoSize = True @@ -135,97 +108,36 @@ Partial Class dlgCorrelation Me.rdoPairwise.Text = "Pairwise" Me.rdoPairwise.UseVisualStyleBackColor = True ' - 'ucrPnlCompletePairwise - ' - Me.ucrPnlCompletePairwise.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlCompletePairwise.Location = New System.Drawing.Point(6, 13) - Me.ucrPnlCompletePairwise.Name = "ucrPnlCompletePairwise" - Me.ucrPnlCompletePairwise.Size = New System.Drawing.Size(146, 49) - Me.ucrPnlCompletePairwise.TabIndex = 0 - ' 'lblMethod ' Me.lblMethod.AutoSize = True Me.lblMethod.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMethod.Location = New System.Drawing.Point(129, 441) + Me.lblMethod.Location = New System.Drawing.Point(125, 446) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(46, 13) Me.lblMethod.TabIndex = 61 Me.lblMethod.Text = "Method:" ' - 'ucrInputRearrange - ' - Me.ucrInputRearrange.AddQuotesIfUnrecognised = True - Me.ucrInputRearrange.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputRearrange.GetSetSelectedIndex = -1 - Me.ucrInputRearrange.IsReadOnly = False - Me.ucrInputRearrange.Location = New System.Drawing.Point(179, 438) - Me.ucrInputRearrange.Name = "ucrInputRearrange" - Me.ucrInputRearrange.Size = New System.Drawing.Size(79, 21) - Me.ucrInputRearrange.TabIndex = 60 - ' - 'ucrChkRearrange - ' - Me.ucrChkRearrange.AutoSize = True - Me.ucrChkRearrange.Checked = False - Me.ucrChkRearrange.Location = New System.Drawing.Point(21, 440) - Me.ucrChkRearrange.Name = "ucrChkRearrange" - Me.ucrChkRearrange.Size = New System.Drawing.Size(96, 23) - Me.ucrChkRearrange.TabIndex = 59 - ' - 'ucrInputDisplayNas - ' - Me.ucrInputDisplayNas.AddQuotesIfUnrecognised = True - Me.ucrInputDisplayNas.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputDisplayNas.GetSetSelectedIndex = -1 - Me.ucrInputDisplayNas.IsReadOnly = False - Me.ucrInputDisplayNas.Location = New System.Drawing.Point(131, 385) - Me.ucrInputDisplayNas.Name = "ucrInputDisplayNas" - Me.ucrInputDisplayNas.Size = New System.Drawing.Size(51, 21) - Me.ucrInputDisplayNas.TabIndex = 57 - ' 'lblDisplayNas ' Me.lblDisplayNas.AutoSize = True Me.lblDisplayNas.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDisplayNas.Location = New System.Drawing.Point(21, 388) + Me.lblDisplayNas.Location = New System.Drawing.Point(17, 393) Me.lblDisplayNas.Name = "lblDisplayNas" Me.lblDisplayNas.Size = New System.Drawing.Size(67, 13) Me.lblDisplayNas.TabIndex = 56 Me.lblDisplayNas.Text = "Display NAs:" ' - 'ucrChkLeadingZeros - ' - Me.ucrChkLeadingZeros.AutoSize = True - Me.ucrChkLeadingZeros.Checked = False - Me.ucrChkLeadingZeros.Location = New System.Drawing.Point(21, 412) - Me.ucrChkLeadingZeros.Name = "ucrChkLeadingZeros" - Me.ucrChkLeadingZeros.Size = New System.Drawing.Size(115, 23) - Me.ucrChkLeadingZeros.TabIndex = 55 - ' 'lblDecimalPlaces ' Me.lblDecimalPlaces.AutoSize = True Me.lblDecimalPlaces.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDecimalPlaces.Location = New System.Drawing.Point(21, 364) + Me.lblDecimalPlaces.Location = New System.Drawing.Point(17, 369) Me.lblDecimalPlaces.Name = "lblDecimalPlaces" Me.lblDecimalPlaces.Size = New System.Drawing.Size(83, 13) Me.lblDecimalPlaces.TabIndex = 53 Me.lblDecimalPlaces.Text = "Decimal Places:" ' - 'ucrNudDecimalPlaces - ' - Me.ucrNudDecimalPlaces.AutoSize = True - Me.ucrNudDecimalPlaces.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Location = New System.Drawing.Point(131, 360) - Me.ucrNudDecimalPlaces.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Name = "ucrNudDecimalPlaces" - Me.ucrNudDecimalPlaces.Size = New System.Drawing.Size(50, 20) - Me.ucrNudDecimalPlaces.TabIndex = 52 - Me.ucrNudDecimalPlaces.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'rdoTwoColumns ' Me.rdoTwoColumns.Appearance = System.Windows.Forms.Appearance.Button @@ -234,7 +146,7 @@ Partial Class dlgCorrelation Me.rdoTwoColumns.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTwoColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTwoColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoTwoColumns.Location = New System.Drawing.Point(231, 5) + Me.rdoTwoColumns.Location = New System.Drawing.Point(230, 7) Me.rdoTwoColumns.Name = "rdoTwoColumns" Me.rdoTwoColumns.Size = New System.Drawing.Size(127, 27) Me.rdoTwoColumns.TabIndex = 35 @@ -251,7 +163,7 @@ Partial Class dlgCorrelation Me.rdoMultipleColumns.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultipleColumns.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultipleColumns.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultipleColumns.Location = New System.Drawing.Point(100, 5) + Me.rdoMultipleColumns.Location = New System.Drawing.Point(100, 7) Me.rdoMultipleColumns.Name = "rdoMultipleColumns" Me.rdoMultipleColumns.Size = New System.Drawing.Size(132, 27) Me.rdoMultipleColumns.TabIndex = 36 @@ -260,21 +172,13 @@ Partial Class dlgCorrelation Me.rdoMultipleColumns.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoMultipleColumns.UseVisualStyleBackColor = True ' - 'ucrPnlColumns - ' - Me.ucrPnlColumns.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlColumns.Location = New System.Drawing.Point(88, 1) - Me.ucrPnlColumns.Name = "ucrPnlColumns" - Me.ucrPnlColumns.Size = New System.Drawing.Size(280, 36) - Me.ucrPnlColumns.TabIndex = 34 - ' 'grpMethod ' Me.grpMethod.Controls.Add(Me.rdoKendall) Me.grpMethod.Controls.Add(Me.rdoPearson) Me.grpMethod.Controls.Add(Me.rdoSpearman) Me.grpMethod.Controls.Add(Me.ucrPnlMethod) - Me.grpMethod.Location = New System.Drawing.Point(13, 236) + Me.grpMethod.Location = New System.Drawing.Point(9, 241) Me.grpMethod.Name = "grpMethod" Me.grpMethod.Size = New System.Drawing.Size(246, 45) Me.grpMethod.TabIndex = 44 @@ -320,20 +224,12 @@ Partial Class dlgCorrelation Me.rdoSpearman.Text = "Spearman" Me.rdoSpearman.UseVisualStyleBackColor = True ' - 'ucrPnlMethod - ' - Me.ucrPnlMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMethod.Location = New System.Drawing.Point(8, 13) - Me.ucrPnlMethod.Name = "ucrPnlMethod" - Me.ucrPnlMethod.Size = New System.Drawing.Size(229, 24) - Me.ucrPnlMethod.TabIndex = 0 - ' 'grpMissing ' Me.grpMissing.Controls.Add(Me.rdoCompleteRowsOnly) Me.grpMissing.Controls.Add(Me.rdoPairwise) Me.grpMissing.Controls.Add(Me.ucrPnlCompletePairwise) - Me.grpMissing.Location = New System.Drawing.Point(265, 236) + Me.grpMissing.Location = New System.Drawing.Point(261, 241) Me.grpMissing.Name = "grpMissing" Me.grpMissing.Size = New System.Drawing.Size(158, 71) Me.grpMissing.TabIndex = 45 @@ -344,7 +240,7 @@ Partial Class dlgCorrelation 'cmdOptions ' Me.cmdOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOptions.Location = New System.Drawing.Point(303, 504) + Me.cmdOptions.Location = New System.Drawing.Point(301, 514) Me.cmdOptions.Name = "cmdOptions" Me.cmdOptions.Size = New System.Drawing.Size(114, 25) Me.cmdOptions.TabIndex = 49 @@ -352,13 +248,172 @@ Partial Class dlgCorrelation Me.cmdOptions.Text = "Options" Me.cmdOptions.UseVisualStyleBackColor = True ' + 'grpDisplayOptions + ' + Me.grpDisplayOptions.Controls.Add(Me.ucrChkShave) + Me.grpDisplayOptions.Location = New System.Drawing.Point(9, 346) + Me.grpDisplayOptions.Name = "grpDisplayOptions" + Me.grpDisplayOptions.Size = New System.Drawing.Size(410, 156) + Me.grpDisplayOptions.TabIndex = 63 + Me.grpDisplayOptions.TabStop = False + Me.grpDisplayOptions.Tag = "Display Options" + Me.grpDisplayOptions.Text = "Display Options" + ' + 'lblDisplayOnDiagonal + ' + Me.lblDisplayOnDiagonal.AutoSize = True + Me.lblDisplayOnDiagonal.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDisplayOnDiagonal.Location = New System.Drawing.Point(9, 294) + Me.lblDisplayOnDiagonal.Name = "lblDisplayOnDiagonal" + Me.lblDisplayOnDiagonal.Size = New System.Drawing.Size(106, 13) + Me.lblDisplayOnDiagonal.TabIndex = 51 + Me.lblDisplayOnDiagonal.Text = "Display On Diagonal:" + ' + 'lblConfInterval + ' + Me.lblConfInterval.AutoSize = True + Me.lblConfInterval.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblConfInterval.Location = New System.Drawing.Point(9, 294) + Me.lblConfInterval.Name = "lblConfInterval" + Me.lblConfInterval.Size = New System.Drawing.Size(102, 13) + Me.lblConfInterval.TabIndex = 46 + Me.lblConfInterval.Text = "Confidence Interval:" + ' + 'lblSecondColumn + ' + Me.lblSecondColumn.AutoSize = True + Me.lblSecondColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSecondColumn.Location = New System.Drawing.Point(260, 122) + Me.lblSecondColumn.Name = "lblSecondColumn" + Me.lblSecondColumn.Size = New System.Drawing.Size(88, 13) + Me.lblSecondColumn.TabIndex = 42 + Me.lblSecondColumn.Tag = "Second_column" + Me.lblSecondColumn.Text = "Second Variable:" + ' + 'lblSelectedVariables + ' + Me.lblSelectedVariables.AutoSize = True + Me.lblSelectedVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectedVariables.Location = New System.Drawing.Point(260, 73) + Me.lblSelectedVariables.Name = "lblSelectedVariables" + Me.lblSelectedVariables.Size = New System.Drawing.Size(53, 13) + Me.lblSelectedVariables.TabIndex = 38 + Me.lblSelectedVariables.Tag = "" + Me.lblSelectedVariables.Text = "Variables:" + ' + 'lblFirstColumn + ' + Me.lblFirstColumn.AutoSize = True + Me.lblFirstColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFirstColumn.Location = New System.Drawing.Point(260, 73) + Me.lblFirstColumn.Name = "lblFirstColumn" + Me.lblFirstColumn.Size = New System.Drawing.Size(70, 13) + Me.lblFirstColumn.TabIndex = 39 + Me.lblFirstColumn.Tag = "First_column" + Me.lblFirstColumn.Text = "First Variable:" + ' + 'ucrChkDisplayOptions + ' + Me.ucrChkDisplayOptions.AutoSize = True + Me.ucrChkDisplayOptions.Checked = False + Me.ucrChkDisplayOptions.Location = New System.Drawing.Point(10, 317) + Me.ucrChkDisplayOptions.Name = "ucrChkDisplayOptions" + Me.ucrChkDisplayOptions.Size = New System.Drawing.Size(192, 23) + Me.ucrChkDisplayOptions.TabIndex = 64 + ' + 'ucrChkAbsolute + ' + Me.ucrChkAbsolute.AutoSize = True + Me.ucrChkAbsolute.Checked = False + Me.ucrChkAbsolute.Location = New System.Drawing.Point(266, 444) + Me.ucrChkAbsolute.Name = "ucrChkAbsolute" + Me.ucrChkAbsolute.Size = New System.Drawing.Size(117, 23) + Me.ucrChkAbsolute.TabIndex = 62 + ' + 'ucrInputRearrange + ' + Me.ucrInputRearrange.AddQuotesIfUnrecognised = True + Me.ucrInputRearrange.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputRearrange.GetSetSelectedIndex = -1 + Me.ucrInputRearrange.IsReadOnly = False + Me.ucrInputRearrange.Location = New System.Drawing.Point(175, 443) + Me.ucrInputRearrange.Name = "ucrInputRearrange" + Me.ucrInputRearrange.Size = New System.Drawing.Size(79, 21) + Me.ucrInputRearrange.TabIndex = 60 + ' + 'ucrChkRearrange + ' + Me.ucrChkRearrange.AutoSize = True + Me.ucrChkRearrange.Checked = False + Me.ucrChkRearrange.Location = New System.Drawing.Point(17, 445) + Me.ucrChkRearrange.Name = "ucrChkRearrange" + Me.ucrChkRearrange.Size = New System.Drawing.Size(96, 23) + Me.ucrChkRearrange.TabIndex = 59 + ' + 'ucrInputDisplayNas + ' + Me.ucrInputDisplayNas.AddQuotesIfUnrecognised = True + Me.ucrInputDisplayNas.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDisplayNas.GetSetSelectedIndex = -1 + Me.ucrInputDisplayNas.IsReadOnly = False + Me.ucrInputDisplayNas.Location = New System.Drawing.Point(127, 390) + Me.ucrInputDisplayNas.Name = "ucrInputDisplayNas" + Me.ucrInputDisplayNas.Size = New System.Drawing.Size(51, 21) + Me.ucrInputDisplayNas.TabIndex = 57 + ' + 'ucrChkLeadingZeros + ' + Me.ucrChkLeadingZeros.AutoSize = True + Me.ucrChkLeadingZeros.Checked = False + Me.ucrChkLeadingZeros.Location = New System.Drawing.Point(17, 417) + Me.ucrChkLeadingZeros.Name = "ucrChkLeadingZeros" + Me.ucrChkLeadingZeros.Size = New System.Drawing.Size(115, 23) + Me.ucrChkLeadingZeros.TabIndex = 55 + ' + 'ucrNudDecimalPlaces + ' + Me.ucrNudDecimalPlaces.AutoSize = True + Me.ucrNudDecimalPlaces.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Location = New System.Drawing.Point(127, 365) + Me.ucrNudDecimalPlaces.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimalPlaces.Name = "ucrNudDecimalPlaces" + Me.ucrNudDecimalPlaces.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDecimalPlaces.TabIndex = 52 + Me.ucrNudDecimalPlaces.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrPnlColumns + ' + Me.ucrPnlColumns.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlColumns.Location = New System.Drawing.Point(88, 4) + Me.ucrPnlColumns.Name = "ucrPnlColumns" + Me.ucrPnlColumns.Size = New System.Drawing.Size(280, 36) + Me.ucrPnlColumns.TabIndex = 34 + ' + 'ucrPnlMethod + ' + Me.ucrPnlMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMethod.Location = New System.Drawing.Point(8, 13) + Me.ucrPnlMethod.Name = "ucrPnlMethod" + Me.ucrPnlMethod.Size = New System.Drawing.Size(229, 24) + Me.ucrPnlMethod.TabIndex = 0 + ' + 'ucrPnlCompletePairwise + ' + Me.ucrPnlCompletePairwise.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlCompletePairwise.Location = New System.Drawing.Point(6, 13) + Me.ucrPnlCompletePairwise.Name = "ucrPnlCompletePairwise" + Me.ucrPnlCompletePairwise.Size = New System.Drawing.Size(146, 49) + Me.ucrPnlCompletePairwise.TabIndex = 0 + ' 'ucrSelectorCorrelation ' Me.ucrSelectorCorrelation.AutoSize = True Me.ucrSelectorCorrelation.bDropUnusedFilterLevels = False Me.ucrSelectorCorrelation.bShowHiddenColumns = False Me.ucrSelectorCorrelation.bUseCurrentFilter = True - Me.ucrSelectorCorrelation.Location = New System.Drawing.Point(13, 47) + Me.ucrSelectorCorrelation.Location = New System.Drawing.Point(9, 52) Me.ucrSelectorCorrelation.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorCorrelation.Name = "ucrSelectorCorrelation" Me.ucrSelectorCorrelation.Size = New System.Drawing.Size(213, 183) @@ -368,26 +423,24 @@ Partial Class dlgCorrelation ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(13, 536) + Me.ucrBase.Location = New System.Drawing.Point(11, 540) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(405, 52) Me.ucrBase.TabIndex = 50 ' - 'grpDisplayOptions + 'ucrChkShave ' - Me.grpDisplayOptions.Controls.Add(Me.ucrChkShave) - Me.grpDisplayOptions.Location = New System.Drawing.Point(13, 341) - Me.grpDisplayOptions.Name = "grpDisplayOptions" - Me.grpDisplayOptions.Size = New System.Drawing.Size(410, 156) - Me.grpDisplayOptions.TabIndex = 63 - Me.grpDisplayOptions.TabStop = False - Me.grpDisplayOptions.Tag = "Display Options" - Me.grpDisplayOptions.Text = "Display Options" + Me.ucrChkShave.AutoSize = True + Me.ucrChkShave.Checked = False + Me.ucrChkShave.Location = New System.Drawing.Point(8, 128) + Me.ucrChkShave.Name = "ucrChkShave" + Me.ucrChkShave.Size = New System.Drawing.Size(192, 23) + Me.ucrChkShave.TabIndex = 26 ' 'ucrSaveDataFrame ' Me.ucrSaveDataFrame.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveDataFrame.Location = New System.Drawing.Point(14, 505) + Me.ucrSaveDataFrame.Location = New System.Drawing.Point(10, 510) Me.ucrSaveDataFrame.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveDataFrame.Name = "ucrSaveDataFrame" Me.ucrSaveDataFrame.Size = New System.Drawing.Size(266, 24) @@ -396,7 +449,7 @@ Partial Class dlgCorrelation 'ucrSaveModel ' Me.ucrSaveModel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveModel.Location = New System.Drawing.Point(17, 505) + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 510) Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" Me.ucrSaveModel.Size = New System.Drawing.Size(266, 24) @@ -408,7 +461,7 @@ Partial Class dlgCorrelation Me.ucrInputDiagonal.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputDiagonal.GetSetSelectedIndex = -1 Me.ucrInputDiagonal.IsReadOnly = False - Me.ucrInputDiagonal.Location = New System.Drawing.Point(131, 287) + Me.ucrInputDiagonal.Location = New System.Drawing.Point(127, 292) Me.ucrInputDiagonal.Name = "ucrInputDiagonal" Me.ucrInputDiagonal.Size = New System.Drawing.Size(51, 21) Me.ucrInputDiagonal.TabIndex = 58 @@ -418,7 +471,7 @@ Partial Class dlgCorrelation Me.ucrNudConfidenceInterval.AutoSize = True Me.ucrNudConfidenceInterval.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceInterval.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceInterval.Location = New System.Drawing.Point(131, 288) + Me.ucrNudConfidenceInterval.Location = New System.Drawing.Point(127, 292) Me.ucrNudConfidenceInterval.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceInterval.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceInterval.Name = "ucrNudConfidenceInterval" @@ -426,31 +479,11 @@ Partial Class dlgCorrelation Me.ucrNudConfidenceInterval.TabIndex = 47 Me.ucrNudConfidenceInterval.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblDisplayOnDiagonal - ' - Me.lblDisplayOnDiagonal.AutoSize = True - Me.lblDisplayOnDiagonal.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDisplayOnDiagonal.Location = New System.Drawing.Point(13, 289) - Me.lblDisplayOnDiagonal.Name = "lblDisplayOnDiagonal" - Me.lblDisplayOnDiagonal.Size = New System.Drawing.Size(106, 13) - Me.lblDisplayOnDiagonal.TabIndex = 51 - Me.lblDisplayOnDiagonal.Text = "Display On Diagonal:" - ' - 'lblConfInterval - ' - Me.lblConfInterval.AutoSize = True - Me.lblConfInterval.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblConfInterval.Location = New System.Drawing.Point(14, 289) - Me.lblConfInterval.Name = "lblConfInterval" - Me.lblConfInterval.Size = New System.Drawing.Size(102, 13) - Me.lblConfInterval.TabIndex = 46 - Me.lblConfInterval.Text = "Confidence Interval:" - ' 'ucrReceiverMultipleColumns ' Me.ucrReceiverMultipleColumns.AutoSize = True Me.ucrReceiverMultipleColumns.frmParent = Me - Me.ucrReceiverMultipleColumns.Location = New System.Drawing.Point(262, 85) + Me.ucrReceiverMultipleColumns.Location = New System.Drawing.Point(258, 90) Me.ucrReceiverMultipleColumns.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMultipleColumns.Name = "ucrReceiverMultipleColumns" Me.ucrReceiverMultipleColumns.Selector = Nothing @@ -463,7 +496,7 @@ Partial Class dlgCorrelation ' Me.ucrReceiverSecondColumn.AutoSize = True Me.ucrReceiverSecondColumn.frmParent = Me - Me.ucrReceiverSecondColumn.Location = New System.Drawing.Point(262, 137) + Me.ucrReceiverSecondColumn.Location = New System.Drawing.Point(258, 137) Me.ucrReceiverSecondColumn.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSecondColumn.Name = "ucrReceiverSecondColumn" Me.ucrReceiverSecondColumn.Selector = Nothing @@ -472,33 +505,11 @@ Partial Class dlgCorrelation Me.ucrReceiverSecondColumn.TabIndex = 43 Me.ucrReceiverSecondColumn.ucrSelector = Nothing ' - 'lblSecondColumn - ' - Me.lblSecondColumn.AutoSize = True - Me.lblSecondColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSecondColumn.Location = New System.Drawing.Point(262, 122) - Me.lblSecondColumn.Name = "lblSecondColumn" - Me.lblSecondColumn.Size = New System.Drawing.Size(88, 13) - Me.lblSecondColumn.TabIndex = 42 - Me.lblSecondColumn.Tag = "Second_column" - Me.lblSecondColumn.Text = "Second Variable:" - ' - 'lblSelectedVariables - ' - Me.lblSelectedVariables.AutoSize = True - Me.lblSelectedVariables.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSelectedVariables.Location = New System.Drawing.Point(264, 68) - Me.lblSelectedVariables.Name = "lblSelectedVariables" - Me.lblSelectedVariables.Size = New System.Drawing.Size(53, 13) - Me.lblSelectedVariables.TabIndex = 38 - Me.lblSelectedVariables.Tag = "" - Me.lblSelectedVariables.Text = "Variables:" - ' 'ucrReceiverFirstColumn ' Me.ucrReceiverFirstColumn.AutoSize = True Me.ucrReceiverFirstColumn.frmParent = Me - Me.ucrReceiverFirstColumn.Location = New System.Drawing.Point(262, 85) + Me.ucrReceiverFirstColumn.Location = New System.Drawing.Point(258, 90) Me.ucrReceiverFirstColumn.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFirstColumn.Name = "ucrReceiverFirstColumn" Me.ucrReceiverFirstColumn.Selector = Nothing @@ -507,17 +518,6 @@ Partial Class dlgCorrelation Me.ucrReceiverFirstColumn.TabIndex = 40 Me.ucrReceiverFirstColumn.ucrSelector = Nothing ' - 'lblFirstColumn - ' - Me.lblFirstColumn.AutoSize = True - Me.lblFirstColumn.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFirstColumn.Location = New System.Drawing.Point(267, 68) - Me.lblFirstColumn.Name = "lblFirstColumn" - Me.lblFirstColumn.Size = New System.Drawing.Size(70, 13) - Me.lblFirstColumn.TabIndex = 39 - Me.lblFirstColumn.Tag = "First_column" - Me.lblFirstColumn.Text = "First Variable:" - ' 'dlgCorrelation ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -545,16 +545,16 @@ Partial Class dlgCorrelation Me.Controls.Add(Me.grpDisplayOptions) Me.Controls.Add(Me.ucrSaveDataFrame) Me.Controls.Add(Me.ucrSaveModel) - Me.Controls.Add(Me.ucrInputDiagonal) - Me.Controls.Add(Me.ucrNudConfidenceInterval) Me.Controls.Add(Me.lblDisplayOnDiagonal) Me.Controls.Add(Me.lblConfInterval) + Me.Controls.Add(Me.lblSelectedVariables) + Me.Controls.Add(Me.lblFirstColumn) Me.Controls.Add(Me.ucrReceiverMultipleColumns) Me.Controls.Add(Me.ucrReceiverSecondColumn) - Me.Controls.Add(Me.lblSecondColumn) - Me.Controls.Add(Me.lblSelectedVariables) Me.Controls.Add(Me.ucrReceiverFirstColumn) - Me.Controls.Add(Me.lblFirstColumn) + Me.Controls.Add(Me.lblSecondColumn) + Me.Controls.Add(Me.ucrInputDiagonal) + Me.Controls.Add(Me.ucrNudConfidenceInterval) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False diff --git a/instat/dlgCorrelation.vb b/instat/dlgCorrelation.vb index fae7e817679..22618cc95f7 100644 --- a/instat/dlgCorrelation.vb +++ b/instat/dlgCorrelation.vb @@ -20,8 +20,9 @@ Public Class dlgCorrelation Private bReset As Boolean = True Private clsCorrelationTestFunction, clsRGGcorrGraphicsFunction, clsRGGscatMatrixFunction, clsCorrelationFunction, clsCurrentDataFrameFunction, - clsGuidesFunction, clsGuideLegendFunction, clsDummyFunction As New RFunction + clsGuidesFunction, clsGuideLegendFunction, clsDummyFunction, clsFashionFunction, clsShaveFunction, clsRearrangeFunction As New RFunction Private clsRGraphicsFuction, clsListFunction, clsWrapFunction As New RFunction + Private clsDummyShave As New RFunction Private clsRGGscatMatricReverseOperator As New ROperator Private strColFunction As String Private bResetSubdialog As Boolean = False @@ -44,8 +45,11 @@ Public Class dlgCorrelation End Sub Private Sub InitialiseDialog() + Dim dctNaPrint As New Dictionary(Of String, String) + Dim dctDiagonal As New Dictionary(Of String, String) + Dim dctMethod As New Dictionary(Of String, String) + ucrBase.iHelpTopicID = 421 - ucrBase.clsRsyntax.iCallType = 2 ucrReceiverFirstColumn.SetParameter(New RParameter("x", 0)) ucrReceiverFirstColumn.SetParameterIsRFunction() @@ -76,10 +80,36 @@ Public Class dlgCorrelation ucrNudConfidenceInterval.Increment = 0.05 ucrNudConfidenceInterval.SetRDefault(0.95) + ucrNudDecimalPlaces.SetParameter(New RParameter("decimals", 1)) + ucrNudDecimalPlaces.SetMinMax(0, 5) + ucrNudDecimalPlaces.Increment = 1 + ucrNudDecimalPlaces.SetRDefault(2) + + ucrChkLeadingZeros.SetParameter(New RParameter("leading_zeros", 2)) + ucrChkLeadingZeros.SetText("Leading Zeros") + ucrChkLeadingZeros.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + + ucrChkShave.SetText("Shave") + ucrChkShave.SetParameter(New RParameter("checked", 0)) + ucrChkShave.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + + ucrInputDisplayNas.SetParameter(New RParameter("na_print", 3)) + dctNaPrint.Add("blank", Chr(34) & " " & Chr(34)) + dctNaPrint.Add("NA", "NA") + dctNaPrint.Add("1", Chr(34) & 1 & Chr(34)) + ucrInputDisplayNas.SetItems(dctNaPrint) + ucrInputDisplayNas.AddQuotesIfUnrecognised = False + + ucrInputDiagonal.SetParameter(New RParameter("diagonal", 6)) + dctDiagonal.Add("NA", "NA") + dctDiagonal.Add("1", "1") + ucrInputDiagonal.SetItems(dctDiagonal) + ucrInputDiagonal.AddQuotesIfUnrecognised = False + ucrPnlColumns.AddRadioButton(rdoTwoColumns) ucrPnlColumns.AddRadioButton(rdoMultipleColumns) ucrPnlColumns.AddFunctionNamesCondition(rdoTwoColumns, "cor.test") - ucrPnlColumns.AddFunctionNamesCondition(rdoMultipleColumns, "cor") + ucrPnlColumns.AddFunctionNamesCondition(rdoMultipleColumns, {"fashion", "shave", "rearrange", "correlate"}) ucrPnlMethod.SetParameter(New RParameter("method", 4)) ucrPnlMethod.AddRadioButton(rdoPearson, Chr(34) & "pearson" & Chr(34)) @@ -92,26 +122,63 @@ Public Class dlgCorrelation ucrPnlCompletePairwise.AddParameterValuesCondition(rdoCompleteRowsOnly, "use", Chr(34) & "complete.obs" & Chr(34)) ucrPnlCompletePairwise.AddParameterValuesCondition(rdoPairwise, "use", Chr(34) & "pairwise.complete.obs" & Chr(34)) - 'ucrChk - ucrChkCorrelationMatrix.SetText("Correlation Matrix") - ucrChkCorrelationMatrix.Enabled = False - - ucrPnlColumns.AddToLinkedControls({ucrReceiverFirstColumn, ucrNudConfidenceInterval, ucrReceiverSecondColumn}, {rdoTwoColumns}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkRearrange.SetText("Rearrange") + ucrChkRearrange.SetParameter(New RParameter("check", 0)) + ucrChkRearrange.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkRearrange.AddToLinkedControls(ucrInputRearrange, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="PCA") + ucrChkRearrange.AddToLinkedControls(ucrChkAbsolute, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkDisplayOptions.SetText("Display Options") + ucrChkDisplayOptions.SetParameter(New RParameter("display", 0)) + ucrChkDisplayOptions.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkDisplayOptions.AddToLinkedControls({ucrChkLeadingZeros, ucrChkRearrange, ucrChkShave, ucrNudDecimalPlaces}, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkDisplayOptions.AddToLinkedControls(ucrInputDisplayNas, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="blank") + + ucrInputRearrange.SetParameter(New RParameter("method", 1)) + dctMethod.Add("PCA", Chr(34) & "PCA" & Chr(34)) + dctMethod.Add("HC", Chr(34) & "HC" & Chr(34)) + dctMethod.Add("Identity", Chr(34) & "Identity" & Chr(34)) + dctMethod.Add("Random", Chr(34) & "Random" & Chr(34)) + dctMethod.Add("MDS", Chr(34) & "MDS" & Chr(34)) + dctMethod.Add("R2E", Chr(34) & "R2E" & Chr(34)) + dctMethod.Add("Spectral", Chr(34) & "Spectral" & Chr(34)) + ucrInputRearrange.SetItems(dctMethod) + + ucrChkAbsolute.SetText("Absolute") + ucrChkAbsolute.SetParameter(New RParameter("absolute", 2)) + ucrChkAbsolute.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + + ucrPnlColumns.AddToLinkedControls({ucrReceiverFirstColumn, ucrNudConfidenceInterval, ucrSaveModel, ucrReceiverSecondColumn}, {rdoTwoColumns}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrReceiverFirstColumn.SetLinkedDisplayControl(lblFirstColumn) ucrReceiverSecondColumn.SetLinkedDisplayControl(lblSecondColumn) ucrPnlColumns.AddToLinkedControls({ucrReceiverMultipleColumns}, {rdoMultipleColumns}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrReceiverMultipleColumns.SetLinkedDisplayControl(lblSelectedVariables) ucrNudConfidenceInterval.SetLinkedDisplayControl(lblConfInterval) + ucrInputDiagonal.SetLinkedDisplayControl(lblDisplayOnDiagonal) + ucrInputDisplayNas.SetLinkedDisplayControl(lblDisplayNas) + ucrInputRearrange.SetLinkedDisplayControl(lblMethod) + ucrNudDecimalPlaces.SetLinkedDisplayControl(lblDecimalPlaces) ucrPnlColumns.AddToLinkedControls(ucrPnlCompletePairwise, {rdoMultipleColumns}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoCompleteRowsOnly) + ucrPnlColumns.AddToLinkedControls(ucrInputDiagonal, {rdoMultipleColumns}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="NA") + ucrPnlColumns.AddToLinkedControls(ucrNudDecimalPlaces, {rdoMultipleColumns}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlColumns.AddToLinkedControls(ucrSaveDataFrame, {rdoMultipleColumns}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlColumns.AddToLinkedControls({ucrChkDisplayOptions}, {rdoMultipleColumns}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlCompletePairwise.SetLinkedDisplayControl(grpMissing) - ucrSaveModel.SetPrefix("cor") + ucrSaveModel.SetPrefix("model") ucrSaveModel.SetSaveTypeAsModel() ucrSaveModel.SetDataFrameSelector(ucrSelectorCorrelation.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Result Name") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") - ucrSaveModel.Reset() + + ucrSaveDataFrame.SetPrefix("corr") + ucrSaveDataFrame.SetSaveTypeAsDataFrame() + ucrSaveDataFrame.SetDataFrameSelector(ucrSelectorCorrelation.ucrAvailableDataFrames) + ucrSaveDataFrame.SetCheckBoxText("Result Name") + ucrSaveDataFrame.SetIsComboBox() + ucrSaveDataFrame.SetAssignToIfUncheckedValue("last_correlation") End Sub Private Sub SetDefaults() @@ -127,14 +194,20 @@ Public Class dlgCorrelation clsGuideLegendFunction = New RFunction clsDummyFunction = New RFunction clsCurrentDataFrameFunction = New RFunction + clsFashionFunction = New RFunction + clsShaveFunction = New RFunction + clsDummyShave = New RFunction + clsRearrangeFunction = New RFunction bResetSubdialog = True ucrSelectorCorrelation.Reset() ucrSaveModel.Reset() + ucrSaveDataFrame.Reset() ucrReceiverFirstColumn.SetMeAsReceiver() + ucrReceiverMultipleColumns.SetMeAsReceiver() clsDummyFunction.AddParameter("checked", "none", iPosition:=0) - + 'cls clsRGGscatMatricReverseOperator.SetOperation("+") clsRGGscatMatricReverseOperator.AddParameter("matrix", clsRFunctionParameter:=clsRGGscatMatrixFunction, iPosition:=0) clsRGGscatMatricReverseOperator.iCallType = 3 @@ -169,16 +242,32 @@ Public Class dlgCorrelation clsRGGscatMatrixFunction.AddParameter("data", clsRFunctionParameter:=clsCurrentDataFrameFunction, iPosition:=0) clsCorrelationTestFunction.SetRCommand("cor.test") - clsCorrelationTestFunction.iCallType = 2 clsCorrelationTestFunction.AddParameter("alternative", Chr(34) & "two.sided" & Chr(34)) clsCorrelationTestFunction.AddParameter("exact", "NULL") clsCorrelationTestFunction.AddParameter("conf.level", "0.95") clsCorrelationTestFunction.AddParameter("method", Chr(34) & "pearson" & Chr(34)) - clsCorrelationFunction.SetRCommand("cor") - clsCorrelationFunction.iCallType = 2 + clsCorrelationFunction.SetPackageName("corrr") + clsCorrelationFunction.SetRCommand("correlate ") clsCorrelationFunction.AddParameter("use", Chr(34) & "complete.obs" & Chr(34)) + clsRearrangeFunction.SetPackageName("corrr") + clsRearrangeFunction.SetRCommand("rearrange") + clsRearrangeFunction.AddParameter("x", clsRFunctionParameter:=clsCorrelationFunction, iPosition:=0) + clsRearrangeFunction.AddParameter("method", "PCA", iPosition:=1) + clsRearrangeFunction.AddParameter("absolute", "FALSE", iPosition:=3) + + clsFashionFunction.SetPackageName("corrr") + clsFashionFunction.SetRCommand("fashion") + clsFashionFunction.AddParameter("x", clsRFunctionParameter:=clsCorrelationFunction, iPosition:=0) + clsFashionFunction.AddParameter("decimals", "2", iPosition:=1) + clsFashionFunction.AddParameter("leading_zeros", "FALSE", iPosition:=2) + clsFashionFunction.AddParameter("na_print", Chr(34) & " " & Chr(34), iPosition:=3) + + clsShaveFunction.SetPackageName("corrr") + clsShaveFunction.SetRCommand("shave") + clsShaveFunction.AddParameter("x", clsRFunctionParameter:=clsCorrelationFunction, iPosition:=0) + clsRGGcorrGraphicsFunction.SetPackageName("GGally") clsRGGcorrGraphicsFunction.SetRCommand("ggcorr") clsRGGcorrGraphicsFunction.iCallType = 3 @@ -187,7 +276,8 @@ Public Class dlgCorrelation clsRGGcorrGraphicsFunction.AddParameter("data", "NULL") clsCorrelationTestFunction.SetAssignTo("last_model", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model") - clsCorrelationFunction.SetAssignTo("last_model", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model") + clsFashionFunction.SetAssignTo("last_fashion", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strDataFrameNames:="last_fashion") + clsCorrelationFunction.SetAssignTo("last_correlation", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strDataFrameNames:="last_correlation") clsRGGcorrGraphicsFunction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") clsRGraphicsFuction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.ClearCodes() @@ -200,16 +290,26 @@ Public Class dlgCorrelation ucrPnlMethod.AddAdditionalCodeParameterPair(clsRGGcorrGraphicsFunction, New RParameter("method", 2), iAdditionalPairNo:=3) ucrPnlMethod.AddAdditionalCodeParameterPair(clsRGGscatMatrixFunction, New RParameter("corMethod", 4), iAdditionalPairNo:=4) ucrReceiverMultipleColumns.SetRCode(clsCorrelationFunction, bReset) + ucrInputDiagonal.SetRCode(clsCorrelationFunction, bReset) ucrNudConfidenceInterval.SetRCode(clsCorrelationTestFunction, bReset) ucrReceiverFirstColumn.SetRCode(clsCorrelationTestFunction, bReset) ucrReceiverSecondColumn.SetRCode(clsCorrelationTestFunction, bReset) + ucrNudDecimalPlaces.SetRCode(clsFashionFunction, bReset) + ucrChkLeadingZeros.SetRCode(clsFashionFunction, bReset) + ucrInputDisplayNas.SetRCode(clsFashionFunction, bReset) + ucrInputRearrange.SetRCode(clsRearrangeFunction, bReset) + ucrChkRearrange.SetRCode(clsDummyShave, bReset) + ucrChkAbsolute.SetRCode(clsRearrangeFunction, bReset) + ucrChkShave.SetRCode(clsDummyShave, bReset) + ucrChkDisplayOptions.SetRCode(clsDummyShave, bReset) If bReset Then - ucrPnlColumns.SetRCode(clsCorrelationTestFunction, bReset) + ucrPnlColumns.SetRCode(clsFashionFunction, bReset) End If ucrPnlMethod.SetRCode(clsCorrelationTestFunction, bReset) ucrPnlCompletePairwise.SetRCode(clsCorrelationFunction, bReset) - ucrSaveModel.AddAdditionalRCode(clsCorrelationTestFunction, 1) - ucrSaveModel.SetRCode(clsCorrelationFunction, bReset) + ucrSaveModel.SetRCode(clsCorrelationTestFunction, bReset) + ucrSaveDataFrame.SetRCode(clsFashionFunction, bReset) + ucrSaveDataFrame.AddAdditionalRCode(clsCorrelationFunction, bReset) End Sub Private Sub SetDefaultColumn() @@ -240,13 +340,13 @@ Public Class dlgCorrelation End If End Sub - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() SetRCodeForControls(True) TestOKEnabled() End Sub - Private Sub cmdPlots_Click(sender As Object, e As EventArgs) + Private Sub cmdPlots_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click sdgCorrPlot.SetRCode(clsNewRSyntax:=ucrBase.clsRsyntax, clsNewcorrelationFunction:=clsCorrelationFunction, clsNewcorrelationTestFunction:=clsCorrelationTestFunction, clsNewRGGcorrGraphicsFunction:=clsRGGcorrGraphicsFunction, clsNewRGraphicsFuction:=clsRGraphicsFuction, clsNewRGGscatmatrixFunction:=clsRGGscatMatrixFunction, strNewColFunction:=strColFunction, clsNewRGGscatMatrixReverseOperator:=clsRGGscatMatricReverseOperator, ucrNewBaseSelector:=ucrSelectorCorrelation, @@ -255,16 +355,8 @@ Public Class dlgCorrelation bResetSubdialog = False End Sub - Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) - If rdoTwoColumns.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsCorrelationTestFunction) - ElseIf rdoMultipleColumns.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsCorrelationFunction) - End If - End Sub - ' This is here because otherwise the panel cannot be set up correctly if you reopen the dialog when on the 2-variable rdo button - Private Sub ucrPnlCompletePairwise_ControlValueChanged(ucrChangedControl As ucrCore) + Private Sub ucrPnlCompletePairwise_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlCompletePairwise.ControlValueChanged If rdoPairwise.Checked Then clsCorrelationFunction.AddParameter("use", Chr(34) & "pairwise.complete.obs" & Chr(34)) ElseIf rdoCompleteRowsOnly.Checked Then @@ -272,31 +364,59 @@ Public Class dlgCorrelation End If End Sub - Private Sub ucrPnlColumns_ControlValueChanged(ucrChangedControl As ucrCore) + Private Sub ucrPnlColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumns.ControlValueChanged, ucrChkDisplayOptions.ControlValueChanged, ucrChkRearrange.ControlValueChanged, ucrChkShave.ControlValueChanged If rdoTwoColumns.Checked Then ucrReceiverFirstColumn.SetMeAsReceiver() ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRGGcorrGraphicsFunction) + ucrBase.clsRsyntax.SetBaseRFunction(clsCorrelationTestFunction) + grpDisplayOptions.Hide() + ucrBase.clsRsyntax.iCallType = 2 ElseIf rdoMultipleColumns.Checked Then - ucrReceiverMultipleColumns.SetMeAsReceiver() + If ucrChkDisplayOptions.Checked Then + If ucrChkShave.Checked Then + clsFashionFunction.AddParameter("x", clsRFunctionParameter:=clsShaveFunction, iPosition:=0) + ElseIf ucrChkRearrange.Checked Then + clsRearrangeFunction.AddParameter("x", clsRFunctionParameter:=clsCorrelationFunction, iPosition:=0) + clsFashionFunction.AddParameter("x", clsRFunctionParameter:=clsRearrangeFunction, iPosition:=0) + Else + clsFashionFunction.AddParameter("x", clsRFunctionParameter:=clsCorrelationFunction, iPosition:=0) + End If + If ucrChkShave.Checked AndAlso ucrChkRearrange.Checked Then + clsShaveFunction.AddParameter("x", clsRFunctionParameter:=clsRearrangeFunction, iPosition:=0) + clsFashionFunction.AddParameter("x", clsRFunctionParameter:=clsShaveFunction, iPosition:=0) + Else + clsShaveFunction.AddParameter("x", clsRFunctionParameter:=clsCorrelationFunction, iPosition:=0) + End If + clsCorrelationFunction.RemoveAssignTo() + ucrBase.clsRsyntax.SetBaseRFunction(clsFashionFunction) + grpDisplayOptions.Show() + Else + clsCorrelationFunction.SetAssignTo("last_correlation", strTempDataframe:=ucrSelectorCorrelation.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strDataFrameNames:="last_correlation") + ucrBase.clsRsyntax.SetBaseRFunction(clsCorrelationFunction) + ucrReceiverMultipleColumns.SetMeAsReceiver() + grpDisplayOptions.Hide() + End If + ucrBase.clsRsyntax.iCallType = 0 End If ReceiverColumns() End Sub - Private Sub ucrReceiverMultipleColumns_ControlValueChanged(ucrChangedControl As ucrCore) + Private Sub ucrReceiverMultipleColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleColumns.ControlValueChanged, ucrReceiverFirstColumn.ControlValueChanged, ucrReceiverSecondColumn.ControlValueChanged ReceiverColumns() End Sub - Private Sub ucrReceiverFirstColumn_ControlContentsChanged(ucrChangedControl As ucrCore) + Private Sub ucrReceiverFirstColumn_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstColumn.ControlContentsChanged, + ucrReceiverSecondColumn.ControlContentsChanged, ucrReceiverMultipleColumns.ControlContentsChanged, ucrPnlColumns.ControlContentsChanged, ucrSaveDataFrame.ControlContentsChanged, + ucrPnlCompletePairwise.ControlContentsChanged, ucrPnlMethod.ControlContentsChanged, ucrChkShave.ControlContentsChanged, ucrInputDiagonal.ControlContentsChanged TestOKEnabled() End Sub - Private Sub ucrSelectorCorrelation_ControlContentsChanged(ucrChangedControl As ucrCore) + Private Sub ucrSelectorCorrelation_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorCorrelation.ControlContentsChanged clsCurrentDataFrameFunction = ucrSelectorCorrelation.ucrAvailableDataFrames.clsCurrDataFrame End Sub Private Sub ReceiverColumns() Dim strTwoColumns As String - If rdoTwoColumns.Checked Then strTwoColumns = "c(" & ucrReceiverFirstColumn.GetVariableNames() & ", " & ucrReceiverSecondColumn.GetVariableNames() & ")" clsRGraphicsFuction.AddParameter("columns", strTwoColumns, iPosition:=1) From e70c2576e82efc741aef174864288b17355dd345 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 31 Mar 2022 16:30:42 +0300 Subject: [PATCH 3/3] Minor changes --- instat/dlgCorrelation.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgCorrelation.vb b/instat/dlgCorrelation.vb index 22618cc95f7..e46698789ea 100644 --- a/instat/dlgCorrelation.vb +++ b/instat/dlgCorrelation.vb @@ -364,7 +364,7 @@ Public Class dlgCorrelation End If End Sub - Private Sub ucrPnlColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumns.ControlValueChanged, ucrChkDisplayOptions.ControlValueChanged, ucrChkRearrange.ControlValueChanged, ucrChkShave.ControlValueChanged + Private Sub ucrPnlColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlColumns.ControlValueChanged, ucrChkDisplayOptions.ControlValueChanged, ucrChkRearrange.ControlValueChanged, ucrChkShave.ControlValueChanged, ucrChkAbsolute.ControlValueChanged, ucrChkLeadingZeros.ControlValueChanged If rdoTwoColumns.Checked Then ucrReceiverFirstColumn.SetMeAsReceiver() ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRGGcorrGraphicsFunction)