diff --git a/instat/dlgBarAndPieChart.vb b/instat/dlgBarAndPieChart.vb index 011f33a91c3..4f7f6cc316e 100644 --- a/instat/dlgBarAndPieChart.vb +++ b/instat/dlgBarAndPieChart.vb @@ -224,7 +224,7 @@ Public Class dlgBarAndPieChart ucrReceiverWordcloudAngle.Selector = ucrBarChartSelector ucrSaveBar.SetIsComboBox() - ucrSaveBar.SetCheckBoxText("Save Graph") + ucrSaveBar.SetCheckBoxText("Store Graph") ucrSaveBar.SetDataFrameSelector(ucrBarChartSelector.ucrAvailableDataFrames) ucrSaveBar.SetSaveTypeAsGraph() ucrSaveBar.SetPrefix("bar_plot") diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index d56f7fac738..52822e1cdf7 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -262,7 +262,6 @@ Public Class dlgCalculator Private Sub SetHelpOptions() Select Case enumCalculatorMode Case CalculatorMode.Prepare - ucrCalc.ucrInputCalOptions.SetName("Basic") ucrBase.iHelpTopicID = 14 Case CalculatorMode.Structured ucrCalc.ucrInputCalOptions.SetName("Circular") diff --git a/instat/dlgCanonicalCorrelationAnalysis.vb b/instat/dlgCanonicalCorrelationAnalysis.vb index af5bbb0335c..f7dab3ff36a 100644 --- a/instat/dlgCanonicalCorrelationAnalysis.vb +++ b/instat/dlgCanonicalCorrelationAnalysis.vb @@ -66,7 +66,7 @@ Public Class dlgCanonicalCorrelationAnalysis ucrSaveResult.SetSaveType(RObjectTypeLabel.Model, strRObjectFormat:=RObjectFormat.Text) ucrSaveResult.SetDataFrameSelector(ucrSelectorCCA.ucrAvailableDataFrames) ucrSaveResult.SetIsComboBox() - ucrSaveResult.SetCheckBoxText("Save Model") + ucrSaveResult.SetCheckBoxText("Store Model") ucrSaveResult.SetAssignToIfUncheckedValue("last_model") End Sub diff --git a/instat/dlgCircularDensityPlot.vb b/instat/dlgCircularDensityPlot.vb index 7861799a9ab..33561bf1c09 100644 --- a/instat/dlgCircularDensityPlot.vb +++ b/instat/dlgCircularDensityPlot.vb @@ -103,7 +103,7 @@ Public Class dlgCircularDensityPlot ucrSaveDensity.SetPrefix("circular_density") ucrSaveDensity.SetDataFrameSelector(ucrSelectorDataFrame.ucrAvailableDataFrames) ucrSaveDensity.SetIsComboBox() - ucrSaveDensity.SetCheckBoxText("Save Graph") + ucrSaveDensity.SetCheckBoxText("Store Graph") ucrSaveDensity.SetSaveTypeAsGraph() ucrSaveDensity.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgClimSoft.Designer.vb b/instat/dlgClimSoft.Designer.vb index aa14f7e0879..1c5b32afda8 100644 --- a/instat/dlgClimSoft.Designer.vb +++ b/instat/dlgClimSoft.Designer.vb @@ -39,202 +39,311 @@ Partial Class dlgClimSoft Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Me.cmdEstablishConnection = New System.Windows.Forms.Button() - Me.lblElements = New System.Windows.Forms.Label() - Me.lblStations = New System.Windows.Forms.Label() - Me.lblStartDate = New System.Windows.Forms.Label() - Me.lblEndDate = New System.Windows.Forms.Label() + Me.btnConnection = New System.Windows.Forms.Button() + Me.lblSelectElements = New System.Windows.Forms.Label() + Me.lblSelectStations = New System.Windows.Forms.Label() Me.ttClimsoft = New System.Windows.Forms.ToolTip(Me.components) - Me.ucrChkUnstackData = New instat.ucrCheck() - Me.ucrChkFlagsData = New instat.ucrCheck() - Me.ucrChkElements = New instat.ucrCheck() - Me.ucrChkDateRange = New instat.ucrCheck() - Me.ucrDtpEndDate = New instat.ucrDateTimePicker() - Me.ucrDtpStartdate = New instat.ucrDateTimePicker() - Me.ucrChkObservationData = New instat.ucrCheck() + Me.ucrChkImportElementsMetadata = New instat.ucrCheck() + Me.ucrChkImportStationsMetadata = New instat.ucrCheck() + Me.ucrChkDataDate = New instat.ucrCheck() + Me.ucrDtpEndDataDate = New instat.ucrDateTimePicker() + Me.ucrDtpStartDataDate = New instat.ucrDateTimePicker() + Me.ucrChkImportFlagsMetadata = New instat.ucrCheck() Me.lblConnection = New System.Windows.Forms.Label() - Me.ucrComboBoxElements = New instat.ucrInputComboBox() - Me.ucrComboBoxStations = New instat.ucrInputComboBox() + Me.lblToDataDate = New System.Windows.Forms.Label() + Me.lblSelectTable = New System.Windows.Forms.Label() + Me.lblSelectQCStatus = New System.Windows.Forms.Label() + Me.btnCheckRecords = New System.Windows.Forms.Button() + Me.lblRecordsNum = New System.Windows.Forms.Label() + Me.btnMoreOptions = New System.Windows.Forms.Button() + Me.rdoMetadata = New System.Windows.Forms.RadioButton() + Me.rdoData = New System.Windows.Forms.RadioButton() + Me.ucrPnlOptions = New instat.UcrPanel() + Me.ucrCboQCStatus = New instat.ucrInputComboBox() + Me.ucrCboTable = New instat.ucrInputComboBox() + Me.ucrCboElements = New instat.ucrInputComboBox() + Me.ucrCboStations = New instat.ucrInputComboBox() Me.ucrSelectorForClimSoft = New instat.ucrSelectorAddRemove() Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() Me.ucrReceiverMultipleStations = New instat.ucrReceiverMultiple() Me.ucrBase = New instat.ucrButtons() + Me.ucrChKUnstackData = New instat.ucrCheck() Me.SuspendLayout() ' - 'cmdEstablishConnection - ' - Me.cmdEstablishConnection.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdEstablishConnection.Location = New System.Drawing.Point(8, 8) - Me.cmdEstablishConnection.Name = "cmdEstablishConnection" - Me.cmdEstablishConnection.Size = New System.Drawing.Size(142, 23) - Me.cmdEstablishConnection.TabIndex = 1 - Me.cmdEstablishConnection.Text = "Establish Connection..." - Me.cmdEstablishConnection.UseVisualStyleBackColor = True - ' - 'lblElements - ' - Me.lblElements.AutoSize = True - Me.lblElements.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblElements.Location = New System.Drawing.Point(256, 194) - Me.lblElements.Name = "lblElements" - Me.lblElements.Size = New System.Drawing.Size(98, 13) - Me.lblElements.TabIndex = 4 - Me.lblElements.Text = "Selected Elements:" - ' - 'lblStations - ' - Me.lblStations.AutoSize = True - Me.lblStations.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblStations.Location = New System.Drawing.Point(256, 38) - Me.lblStations.Name = "lblStations" - Me.lblStations.Size = New System.Drawing.Size(93, 13) - Me.lblStations.TabIndex = 2 - Me.lblStations.Text = "Selected Stations:" - Me.lblStations.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - ' - 'lblStartDate - ' - Me.lblStartDate.AutoSize = True - Me.lblStartDate.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblStartDate.Location = New System.Drawing.Point(32, 307) - Me.lblStartDate.Name = "lblStartDate" - Me.lblStartDate.Size = New System.Drawing.Size(58, 13) - Me.lblStartDate.TabIndex = 7 - Me.lblStartDate.Text = "Start Date:" - ' - 'lblEndDate - ' - Me.lblEndDate.AutoSize = True - Me.lblEndDate.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblEndDate.Location = New System.Drawing.Point(34, 349) - Me.lblEndDate.Name = "lblEndDate" - Me.lblEndDate.Size = New System.Drawing.Size(55, 13) - Me.lblEndDate.TabIndex = 9 - Me.lblEndDate.Text = "End Date:" - ' - 'ucrChkUnstackData - ' - Me.ucrChkUnstackData.AutoSize = True - Me.ucrChkUnstackData.Checked = True - Me.ucrChkUnstackData.Location = New System.Drawing.Point(8, 235) - Me.ucrChkUnstackData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkUnstackData.Name = "ucrChkUnstackData" - Me.ucrChkUnstackData.Size = New System.Drawing.Size(178, 23) - Me.ucrChkUnstackData.TabIndex = 9 - Me.ttClimsoft.SetToolTip(Me.ucrChkUnstackData, "Select Observation Data Date Range") - ' - 'ucrChkFlagsData - ' - Me.ucrChkFlagsData.AutoSize = True - Me.ucrChkFlagsData.Checked = False - Me.ucrChkFlagsData.Location = New System.Drawing.Point(8, 212) - Me.ucrChkFlagsData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkFlagsData.Name = "ucrChkFlagsData" - Me.ucrChkFlagsData.Size = New System.Drawing.Size(213, 23) - Me.ucrChkFlagsData.TabIndex = 8 - Me.ttClimsoft.SetToolTip(Me.ucrChkFlagsData, "Select Observation Data Date Range") - ' - 'ucrChkElements - ' - Me.ucrChkElements.AutoSize = True - Me.ucrChkElements.Checked = False - Me.ucrChkElements.Location = New System.Drawing.Point(8, 258) - Me.ucrChkElements.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkElements.Name = "ucrChkElements" - Me.ucrChkElements.Size = New System.Drawing.Size(230, 23) - Me.ucrChkElements.TabIndex = 10 - Me.ttClimsoft.SetToolTip(Me.ucrChkElements, "Select Observation Data Date Range") - ' - 'ucrChkDateRange - ' - Me.ucrChkDateRange.AutoSize = True - Me.ucrChkDateRange.Checked = False - Me.ucrChkDateRange.Location = New System.Drawing.Point(8, 283) - Me.ucrChkDateRange.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkDateRange.Name = "ucrChkDateRange" - Me.ucrChkDateRange.Size = New System.Drawing.Size(178, 23) - Me.ucrChkDateRange.TabIndex = 11 - Me.ttClimsoft.SetToolTip(Me.ucrChkDateRange, "Select Observation Data Date Range") - ' - 'ucrDtpEndDate - ' - Me.ucrDtpEndDate.AutoSize = True - Me.ucrDtpEndDate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 379) - Me.ucrDtpEndDate.Format = "dd MMM yyyy" - Me.ucrDtpEndDate.Location = New System.Drawing.Point(36, 367) - Me.ucrDtpEndDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrDtpEndDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.ucrDtpEndDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.ucrDtpEndDate.Name = "ucrDtpEndDate" - Me.ucrDtpEndDate.Size = New System.Drawing.Size(163, 20) - Me.ucrDtpEndDate.TabIndex = 13 - Me.ttClimsoft.SetToolTip(Me.ucrDtpEndDate, "End Date (To)") - ' - 'ucrDtpStartdate - ' - Me.ucrDtpStartdate.AutoSize = True - Me.ucrDtpStartdate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 408) - Me.ucrDtpStartdate.Format = "dd MMM yyyy" - Me.ucrDtpStartdate.Location = New System.Drawing.Point(35, 322) - Me.ucrDtpStartdate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrDtpStartdate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.ucrDtpStartdate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.ucrDtpStartdate.Name = "ucrDtpStartdate" - Me.ucrDtpStartdate.Size = New System.Drawing.Size(163, 20) - Me.ucrDtpStartdate.TabIndex = 12 - Me.ttClimsoft.SetToolTip(Me.ucrDtpStartdate, "Start Date (From)") - ' - 'ucrChkObservationData - ' - Me.ucrChkObservationData.AutoSize = True - Me.ucrChkObservationData.Checked = False - Me.ucrChkObservationData.Location = New System.Drawing.Point(8, 188) - Me.ucrChkObservationData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkObservationData.Name = "ucrChkObservationData" - Me.ucrChkObservationData.Size = New System.Drawing.Size(202, 23) - Me.ucrChkObservationData.TabIndex = 7 - Me.ttClimsoft.SetToolTip(Me.ucrChkObservationData, "Select Observation Data Date Range") + 'btnConnection + ' + Me.btnConnection.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.btnConnection.Location = New System.Drawing.Point(7, 45) + Me.btnConnection.Name = "btnConnection" + Me.btnConnection.Size = New System.Drawing.Size(147, 23) + Me.btnConnection.TabIndex = 1 + Me.btnConnection.Text = "Connect to Database" + Me.btnConnection.UseVisualStyleBackColor = True + ' + 'lblSelectElements + ' + Me.lblSelectElements.AutoSize = True + Me.lblSelectElements.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectElements.Location = New System.Drawing.Point(285, 226) + Me.lblSelectElements.Name = "lblSelectElements" + Me.lblSelectElements.Size = New System.Drawing.Size(86, 13) + Me.lblSelectElements.TabIndex = 4 + Me.lblSelectElements.Text = "Select Elements:" + ' + 'lblSelectStations + ' + Me.lblSelectStations.AutoSize = True + Me.lblSelectStations.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectStations.Location = New System.Drawing.Point(285, 70) + Me.lblSelectStations.Name = "lblSelectStations" + Me.lblSelectStations.Size = New System.Drawing.Size(81, 13) + Me.lblSelectStations.TabIndex = 2 + Me.lblSelectStations.Text = "Select Stations:" + Me.lblSelectStations.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'ucrChkImportElementsMetadata + ' + Me.ucrChkImportElementsMetadata.AutoSize = True + Me.ucrChkImportElementsMetadata.Checked = True + Me.ucrChkImportElementsMetadata.Location = New System.Drawing.Point(10, 110) + Me.ucrChkImportElementsMetadata.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkImportElementsMetadata.Name = "ucrChkImportElementsMetadata" + Me.ucrChkImportElementsMetadata.Size = New System.Drawing.Size(213, 23) + Me.ucrChkImportElementsMetadata.TabIndex = 36 + Me.ttClimsoft.SetToolTip(Me.ucrChkImportElementsMetadata, "Unstack elements") + ' + 'ucrChkImportStationsMetadata + ' + Me.ucrChkImportStationsMetadata.AutoSize = True + Me.ucrChkImportStationsMetadata.Checked = True + Me.ucrChkImportStationsMetadata.Location = New System.Drawing.Point(10, 85) + Me.ucrChkImportStationsMetadata.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkImportStationsMetadata.Name = "ucrChkImportStationsMetadata" + Me.ucrChkImportStationsMetadata.Size = New System.Drawing.Size(213, 23) + Me.ucrChkImportStationsMetadata.TabIndex = 35 + Me.ttClimsoft.SetToolTip(Me.ucrChkImportStationsMetadata, "Unstack elements") + ' + 'ucrChkDataDate + ' + Me.ucrChkDataDate.AutoSize = True + Me.ucrChkDataDate.Checked = False + Me.ucrChkDataDate.Location = New System.Drawing.Point(9, 317) + Me.ucrChkDataDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkDataDate.Name = "ucrChkDataDate" + Me.ucrChkDataDate.Size = New System.Drawing.Size(169, 23) + Me.ucrChkDataDate.TabIndex = 21 + Me.ttClimsoft.SetToolTip(Me.ucrChkDataDate, "Select Observation Data Date Range") + ' + 'ucrDtpEndDataDate + ' + Me.ucrDtpEndDataDate.AutoSize = True + Me.ucrDtpEndDataDate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 379) + Me.ucrDtpEndDataDate.Format = "dd MMM yyyy" + Me.ucrDtpEndDataDate.Location = New System.Drawing.Point(156, 340) + Me.ucrDtpEndDataDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrDtpEndDataDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpEndDataDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpEndDataDate.Name = "ucrDtpEndDataDate" + Me.ucrDtpEndDataDate.Size = New System.Drawing.Size(102, 20) + Me.ucrDtpEndDataDate.TabIndex = 23 + Me.ttClimsoft.SetToolTip(Me.ucrDtpEndDataDate, "End Date (To)") + ' + 'ucrDtpStartDataDate + ' + Me.ucrDtpStartDataDate.AutoSize = True + Me.ucrDtpStartDataDate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 408) + Me.ucrDtpStartDataDate.Format = "dd MMM yyyy" + Me.ucrDtpStartDataDate.Location = New System.Drawing.Point(23, 341) + Me.ucrDtpStartDataDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrDtpStartDataDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpStartDataDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpStartDataDate.Name = "ucrDtpStartDataDate" + Me.ucrDtpStartDataDate.Size = New System.Drawing.Size(102, 20) + Me.ucrDtpStartDataDate.TabIndex = 22 + Me.ttClimsoft.SetToolTip(Me.ucrDtpStartDataDate, "Start Date (From)") + ' + 'ucrChkImportFlagsMetadata + ' + Me.ucrChkImportFlagsMetadata.AutoSize = True + Me.ucrChkImportFlagsMetadata.Checked = True + Me.ucrChkImportFlagsMetadata.Location = New System.Drawing.Point(10, 135) + Me.ucrChkImportFlagsMetadata.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkImportFlagsMetadata.Name = "ucrChkImportFlagsMetadata" + Me.ucrChkImportFlagsMetadata.Size = New System.Drawing.Size(213, 23) + Me.ucrChkImportFlagsMetadata.TabIndex = 37 + Me.ttClimsoft.SetToolTip(Me.ucrChkImportFlagsMetadata, "Unstack elements") ' 'lblConnection ' Me.lblConnection.AutoSize = True Me.lblConnection.ForeColor = System.Drawing.Color.Red Me.lblConnection.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblConnection.Location = New System.Drawing.Point(153, 14) + Me.lblConnection.Location = New System.Drawing.Point(164, 51) Me.lblConnection.Name = "lblConnection" Me.lblConnection.Size = New System.Drawing.Size(78, 13) Me.lblConnection.TabIndex = 16 Me.lblConnection.Text = "No Connection" ' - 'ucrComboBoxElements - ' - Me.ucrComboBoxElements.AddQuotesIfUnrecognised = True - Me.ucrComboBoxElements.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrComboBoxElements.GetSetSelectedIndex = -1 - Me.ucrComboBoxElements.IsReadOnly = False - Me.ucrComboBoxElements.Location = New System.Drawing.Point(259, 210) - Me.ucrComboBoxElements.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) - Me.ucrComboBoxElements.Name = "ucrComboBoxElements" - Me.ucrComboBoxElements.Size = New System.Drawing.Size(137, 21) - Me.ucrComboBoxElements.TabIndex = 5 - ' - 'ucrComboBoxStations - ' - Me.ucrComboBoxStations.AddQuotesIfUnrecognised = True - Me.ucrComboBoxStations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrComboBoxStations.GetSetSelectedIndex = -1 - Me.ucrComboBoxStations.IsReadOnly = False - Me.ucrComboBoxStations.Location = New System.Drawing.Point(256, 53) - Me.ucrComboBoxStations.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) - Me.ucrComboBoxStations.Name = "ucrComboBoxStations" - Me.ucrComboBoxStations.Size = New System.Drawing.Size(137, 21) - Me.ucrComboBoxStations.TabIndex = 3 + 'lblToDataDate + ' + Me.lblToDataDate.AutoSize = True + Me.lblToDataDate.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblToDataDate.Location = New System.Drawing.Point(130, 345) + Me.lblToDataDate.Name = "lblToDataDate" + Me.lblToDataDate.Size = New System.Drawing.Size(20, 13) + Me.lblToDataDate.TabIndex = 20 + Me.lblToDataDate.Text = "To" + ' + 'lblSelectTable + ' + Me.lblSelectTable.AutoSize = True + Me.lblSelectTable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectTable.Location = New System.Drawing.Point(5, 238) + Me.lblSelectTable.Name = "lblSelectTable" + Me.lblSelectTable.Size = New System.Drawing.Size(96, 13) + Me.lblSelectTable.TabIndex = 24 + Me.lblSelectTable.Text = "Select Data Table:" + Me.lblSelectTable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'lblSelectQCStatus + ' + Me.lblSelectQCStatus.AutoSize = True + Me.lblSelectQCStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectQCStatus.Location = New System.Drawing.Point(5, 265) + Me.lblSelectQCStatus.Name = "lblSelectQCStatus" + Me.lblSelectQCStatus.Size = New System.Drawing.Size(117, 13) + Me.lblSelectQCStatus.TabIndex = 26 + Me.lblSelectQCStatus.Text = "Select Data QC Status:" + Me.lblSelectQCStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'btnCheckRecords + ' + Me.btnCheckRecords.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.btnCheckRecords.Location = New System.Drawing.Point(6, 404) + Me.btnCheckRecords.Name = "btnCheckRecords" + Me.btnCheckRecords.Size = New System.Drawing.Size(139, 23) + Me.btnCheckRecords.TabIndex = 28 + Me.btnCheckRecords.Text = "Check Records" + Me.btnCheckRecords.UseVisualStyleBackColor = True + ' + 'lblRecordsNum + ' + Me.lblRecordsNum.AutoSize = True + Me.lblRecordsNum.ForeColor = System.Drawing.Color.Red + Me.lblRecordsNum.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblRecordsNum.Location = New System.Drawing.Point(156, 408) + Me.lblRecordsNum.Name = "lblRecordsNum" + Me.lblRecordsNum.Size = New System.Drawing.Size(64, 13) + Me.lblRecordsNum.TabIndex = 29 + Me.lblRecordsNum.Text = "No Records" + ' + 'btnMoreOptions + ' + Me.btnMoreOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.btnMoreOptions.Location = New System.Drawing.Point(5, 373) + Me.btnMoreOptions.Name = "btnMoreOptions" + Me.btnMoreOptions.Size = New System.Drawing.Size(139, 23) + Me.btnMoreOptions.TabIndex = 31 + Me.btnMoreOptions.Text = "Options" + Me.btnMoreOptions.UseVisualStyleBackColor = True + ' + 'rdoMetadata + ' + Me.rdoMetadata.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoMetadata.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMetadata.FlatAppearance.BorderSize = 2 + Me.rdoMetadata.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMetadata.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoMetadata.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoMetadata.Location = New System.Drawing.Point(197, 5) + Me.rdoMetadata.Name = "rdoMetadata" + Me.rdoMetadata.Size = New System.Drawing.Size(145, 28) + Me.rdoMetadata.TabIndex = 34 + Me.rdoMetadata.TabStop = True + Me.rdoMetadata.Tag = "" + Me.rdoMetadata.Text = "Metadata" + Me.rdoMetadata.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoMetadata.UseVisualStyleBackColor = True + ' + 'rdoData + ' + Me.rdoData.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoData.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoData.FlatAppearance.BorderSize = 2 + Me.rdoData.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoData.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoData.Location = New System.Drawing.Point(55, 5) + Me.rdoData.Name = "rdoData" + Me.rdoData.Size = New System.Drawing.Size(145, 28) + Me.rdoData.TabIndex = 33 + Me.rdoData.TabStop = True + Me.rdoData.Tag = "" + Me.rdoData.Text = "Observation Data" + Me.rdoData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoData.UseVisualStyleBackColor = True + ' + 'ucrPnlOptions + ' + Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlOptions.Location = New System.Drawing.Point(6, 4) + Me.ucrPnlOptions.Margin = New System.Windows.Forms.Padding(5) + Me.ucrPnlOptions.Name = "ucrPnlOptions" + Me.ucrPnlOptions.Size = New System.Drawing.Size(428, 30) + Me.ucrPnlOptions.TabIndex = 32 + ' + 'ucrCboQCStatus + ' + Me.ucrCboQCStatus.AddQuotesIfUnrecognised = True + Me.ucrCboQCStatus.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboQCStatus.GetSetSelectedIndex = -1 + Me.ucrCboQCStatus.IsReadOnly = False + Me.ucrCboQCStatus.Location = New System.Drawing.Point(154, 259) + Me.ucrCboQCStatus.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboQCStatus.Name = "ucrCboQCStatus" + Me.ucrCboQCStatus.Size = New System.Drawing.Size(104, 21) + Me.ucrCboQCStatus.TabIndex = 27 + ' + 'ucrCboTable + ' + Me.ucrCboTable.AddQuotesIfUnrecognised = True + Me.ucrCboTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboTable.GetSetSelectedIndex = -1 + Me.ucrCboTable.IsReadOnly = False + Me.ucrCboTable.Location = New System.Drawing.Point(154, 233) + Me.ucrCboTable.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboTable.Name = "ucrCboTable" + Me.ucrCboTable.Size = New System.Drawing.Size(104, 21) + Me.ucrCboTable.TabIndex = 25 + ' + 'ucrCboElements + ' + Me.ucrCboElements.AddQuotesIfUnrecognised = True + Me.ucrCboElements.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboElements.GetSetSelectedIndex = -1 + Me.ucrCboElements.IsReadOnly = False + Me.ucrCboElements.Location = New System.Drawing.Point(288, 242) + Me.ucrCboElements.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboElements.Name = "ucrCboElements" + Me.ucrCboElements.Size = New System.Drawing.Size(137, 21) + Me.ucrCboElements.TabIndex = 5 + ' + 'ucrCboStations + ' + Me.ucrCboStations.AddQuotesIfUnrecognised = True + Me.ucrCboStations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboStations.GetSetSelectedIndex = -1 + Me.ucrCboStations.IsReadOnly = False + Me.ucrCboStations.Location = New System.Drawing.Point(285, 85) + Me.ucrCboStations.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboStations.Name = "ucrCboStations" + Me.ucrCboStations.Size = New System.Drawing.Size(137, 21) + Me.ucrCboStations.TabIndex = 3 ' 'ucrSelectorForClimSoft ' Me.ucrSelectorForClimSoft.AutoSize = True Me.ucrSelectorForClimSoft.bShowHiddenColumns = False - Me.ucrSelectorForClimSoft.Location = New System.Drawing.Point(8, 43) + Me.ucrSelectorForClimSoft.Location = New System.Drawing.Point(7, 84) Me.ucrSelectorForClimSoft.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForClimSoft.Name = "ucrSelectorForClimSoft" Me.ucrSelectorForClimSoft.Size = New System.Drawing.Size(216, 147) @@ -244,7 +353,7 @@ Partial Class dlgClimSoft ' Me.ucrReceiverMultipleElements.AutoSize = True Me.ucrReceiverMultipleElements.frmParent = Me - Me.ucrReceiverMultipleElements.Location = New System.Drawing.Point(259, 234) + Me.ucrReceiverMultipleElements.Location = New System.Drawing.Point(288, 266) Me.ucrReceiverMultipleElements.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMultipleElements.Name = "ucrReceiverMultipleElements" Me.ucrReceiverMultipleElements.Selector = Nothing @@ -257,7 +366,7 @@ Partial Class dlgClimSoft ' Me.ucrReceiverMultipleStations.AutoSize = True Me.ucrReceiverMultipleStations.frmParent = Me - Me.ucrReceiverMultipleStations.Location = New System.Drawing.Point(256, 77) + Me.ucrReceiverMultipleStations.Location = New System.Drawing.Point(285, 109) Me.ucrReceiverMultipleStations.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMultipleStations.Name = "ucrReceiverMultipleStations" Me.ucrReceiverMultipleStations.Selector = Nothing @@ -270,36 +379,56 @@ Partial Class dlgClimSoft ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(8, 402) + Me.ucrBase.Location = New System.Drawing.Point(9, 444) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(405, 52) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 14 ' + 'ucrChKUnstackData + ' + Me.ucrChKUnstackData.AutoSize = True + Me.ucrChKUnstackData.Checked = False + Me.ucrChKUnstackData.Location = New System.Drawing.Point(8, 289) + Me.ucrChKUnstackData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChKUnstackData.Name = "ucrChKUnstackData" + Me.ucrChKUnstackData.Size = New System.Drawing.Size(169, 23) + Me.ucrChKUnstackData.TabIndex = 38 + Me.ttClimsoft.SetToolTip(Me.ucrChKUnstackData, "Select Observation Data Date Range") + ' 'dlgClimSoft ' 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(408, 459) - Me.Controls.Add(Me.ucrChkUnstackData) - Me.Controls.Add(Me.ucrChkFlagsData) + Me.ClientSize = New System.Drawing.Size(438, 505) + Me.Controls.Add(Me.ucrChKUnstackData) + Me.Controls.Add(Me.ucrChkImportFlagsMetadata) + Me.Controls.Add(Me.ucrChkImportElementsMetadata) + Me.Controls.Add(Me.ucrChkImportStationsMetadata) + Me.Controls.Add(Me.rdoMetadata) + Me.Controls.Add(Me.rdoData) + Me.Controls.Add(Me.ucrPnlOptions) + Me.Controls.Add(Me.btnMoreOptions) + Me.Controls.Add(Me.lblRecordsNum) + Me.Controls.Add(Me.btnCheckRecords) + Me.Controls.Add(Me.ucrCboQCStatus) + Me.Controls.Add(Me.lblSelectQCStatus) + Me.Controls.Add(Me.ucrCboTable) + Me.Controls.Add(Me.lblSelectTable) + Me.Controls.Add(Me.ucrChkDataDate) + Me.Controls.Add(Me.ucrDtpEndDataDate) + Me.Controls.Add(Me.ucrDtpStartDataDate) + Me.Controls.Add(Me.lblToDataDate) Me.Controls.Add(Me.lblConnection) - Me.Controls.Add(Me.ucrChkElements) - Me.Controls.Add(Me.ucrComboBoxElements) - Me.Controls.Add(Me.ucrComboBoxStations) - Me.Controls.Add(Me.ucrChkDateRange) - Me.Controls.Add(Me.ucrDtpEndDate) - Me.Controls.Add(Me.ucrDtpStartdate) - Me.Controls.Add(Me.ucrChkObservationData) - Me.Controls.Add(Me.lblEndDate) + Me.Controls.Add(Me.ucrCboElements) + Me.Controls.Add(Me.ucrCboStations) Me.Controls.Add(Me.ucrSelectorForClimSoft) - Me.Controls.Add(Me.lblStartDate) Me.Controls.Add(Me.ucrReceiverMultipleElements) - Me.Controls.Add(Me.lblStations) - Me.Controls.Add(Me.lblElements) + Me.Controls.Add(Me.lblSelectStations) + Me.Controls.Add(Me.lblSelectElements) Me.Controls.Add(Me.ucrReceiverMultipleStations) - Me.Controls.Add(Me.cmdEstablishConnection) + Me.Controls.Add(Me.btnConnection) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -313,23 +442,32 @@ Partial Class dlgClimSoft End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents cmdEstablishConnection As Button + Friend WithEvents btnConnection As Button Friend WithEvents ucrReceiverMultipleStations As ucrReceiverMultiple Friend WithEvents ucrReceiverMultipleElements As ucrReceiverMultiple - Friend WithEvents lblStations As Label - Friend WithEvents lblElements As Label - Friend WithEvents lblStartDate As Label + Friend WithEvents lblSelectStations As Label + Friend WithEvents lblSelectElements As Label Friend WithEvents ucrSelectorForClimSoft As ucrSelectorAddRemove - Friend WithEvents lblEndDate As Label Friend WithEvents ttClimsoft As ToolTip - Friend WithEvents ucrDtpEndDate As ucrDateTimePicker - Friend WithEvents ucrDtpStartdate As ucrDateTimePicker - Friend WithEvents ucrChkObservationData As ucrCheck - Friend WithEvents ucrChkDateRange As ucrCheck - Friend WithEvents ucrComboBoxStations As ucrInputComboBox - Friend WithEvents ucrComboBoxElements As ucrInputComboBox - Friend WithEvents ucrChkElements As ucrCheck + Friend WithEvents ucrCboStations As ucrInputComboBox + Friend WithEvents ucrCboElements As ucrInputComboBox Friend WithEvents lblConnection As Label - Friend WithEvents ucrChkFlagsData As ucrCheck - Friend WithEvents ucrChkUnstackData As ucrCheck -End Class + Friend WithEvents ucrChkDataDate As ucrCheck + Friend WithEvents ucrDtpEndDataDate As ucrDateTimePicker + Friend WithEvents ucrDtpStartDataDate As ucrDateTimePicker + Friend WithEvents lblToDataDate As Label + Friend WithEvents ucrCboTable As ucrInputComboBox + Friend WithEvents lblSelectTable As Label + Friend WithEvents ucrCboQCStatus As ucrInputComboBox + Friend WithEvents lblSelectQCStatus As Label + Friend WithEvents lblRecordsNum As Label + Friend WithEvents btnCheckRecords As Button + Friend WithEvents btnMoreOptions As Button + Friend WithEvents rdoMetadata As RadioButton + Friend WithEvents rdoData As RadioButton + Friend WithEvents ucrPnlOptions As UcrPanel + Friend WithEvents ucrChkImportElementsMetadata As ucrCheck + Friend WithEvents ucrChkImportStationsMetadata As ucrCheck + Friend WithEvents ucrChkImportFlagsMetadata As ucrCheck + Friend WithEvents ucrChKUnstackData As ucrCheck +End Class \ No newline at end of file diff --git a/instat/dlgClimSoft.vb b/instat/dlgClimSoft.vb index fd5aeac8f7a..b448a049de6 100644 --- a/instat/dlgClimSoft.vb +++ b/instat/dlgClimSoft.vb @@ -14,28 +14,22 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports instat + Imports instat.Translations +Imports RDotNet Public Class dlgClimSoft Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsRImportFromClimsoft As New RFunction + Private clsRImportClimsoftData, clsRImportClimsoftMetaData As New RFunction - 'the 2 dictionaries hold data for the station and elements comboboxes + 'the 4 dictionaries hold data for the station, elements, tables and QC comboboxes 'As of 28th August 2020, there is no direct way of getting the selected value from the custom combobox 'these are declared here to be used in getting the selected value - Private dctStationColumns As New Dictionary(Of String, String) - Private dctElementsColumns As New Dictionary(Of String, String) - - 'flag used by elements receiver to determine when not to clear itself and change its sql query - 'useful when form is reloaded, to let the elements reciever retain the elements selected - Private bIgnoreReceiverChanges As Boolean = False + Private dctStationCols, dctElementsCols, dctTables, dctQCStatuses As New Dictionary(Of String, String) Private Sub dlgClimSoft_Load(sender As Object, e As EventArgs) Handles MyBase.Load - bIgnoreReceiverChanges = True If bFirstLoad Then - bIgnoreReceiverChanges = False InitialiseDialog() bFirstLoad = False End If @@ -44,7 +38,6 @@ Public Class dlgClimSoft End If SetRCodeForControls(bReset) bReset = False - bIgnoreReceiverChanges = False CheckAndUpdateConnectionStatus() 'autoTranslate(Me) ' temporary commented, affects the connected text by overwriting it with wrong text End Sub @@ -52,221 +45,296 @@ Public Class dlgClimSoft Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 329 - 'stations combobox - dctStationColumns.Add("Station IDs", Chr(34) & "stationId" & Chr(34)) - dctStationColumns.Add("Station Names", Chr(34) & "stationName" & Chr(34)) - dctStationColumns.Add("Station Qualifiers", Chr(34) & "qualifier" & Chr(34)) - ucrComboBoxStations.SetParameter(New RParameter("stationfiltercolumn", 0)) - ucrComboBoxStations.SetItems(dctStationColumns) - ucrComboBoxStations.SetRDefault(Chr(34) & "stationId" & Chr(34)) - ucrComboBoxStations.bAllowNonConditionValues = False - ucrComboBoxStations.SetDropDownStyleAsNonEditable() - - 'stations receiver - ucrReceiverMultipleStations.SetParameter(New RParameter("stations", 1)) + '--------------------------------------- + 'tables + dctTables.Add("Initial", Chr(34) & "observationinitial" & Chr(34)) + dctTables.Add("Final", Chr(34) & "observationfinal" & Chr(34)) + ucrCboTable.SetParameter(New RParameter("table", 0)) + ucrCboTable.SetItems(dctTables) + ucrCboTable.bAllowNonConditionValues = False + ucrCboTable.SetDropDownStyleAsNonEditable() + ucrCboTable.SetLinkedDisplayControl(lblSelectTable) + '--------------------------------------- + + 'stations + '--------------------------------------- + dctStationCols.Add("Station IDs", Chr(34) & "stationId" & Chr(34)) + dctStationCols.Add("Station Names", Chr(34) & "stationName" & Chr(34)) + dctStationCols.Add("Station Qualifiers", Chr(34) & "qualifier" & Chr(34)) + ucrCboStations.SetParameter(New RParameter("station_filter_column", 1)) + ucrCboStations.SetItems(dctStationCols) + ucrCboStations.bAllowNonConditionValues = False + ucrCboStations.SetDropDownStyleAsNonEditable() + ucrCboElements.SetLinkedDisplayControl(lblSelectElements) + + ucrReceiverMultipleStations.SetParameter(New RParameter("stations", 2)) ucrReceiverMultipleStations.SetParameterIsString() ucrReceiverMultipleStations.Selector = ucrSelectorForClimSoft ucrReceiverMultipleStations.SetItemType("database_variables") ucrReceiverMultipleStations.strSelectorHeading = "Stations" - ucrReceiverMultipleStations.SetLinkedDisplayControl(lblStations) - - 'elements combobox - dctElementsColumns.Add("Element IDs", Chr(34) & "elementId" & Chr(34)) - dctElementsColumns.Add("Element Names", Chr(34) & "elementName" & Chr(34)) - dctElementsColumns.Add("Element Abbreviation", Chr(34) & "abbreviation" & Chr(34)) - dctElementsColumns.Add("Element Types", Chr(34) & "elementtype" & Chr(34)) - ucrComboBoxElements.SetParameter(New RParameter("elementfiltercolumn", 2)) - ucrComboBoxElements.SetItems(dctElementsColumns) - ucrComboBoxElements.SetRDefault(Chr(34) & "elementId" & Chr(34)) - ucrComboBoxElements.bAllowNonConditionValues = False - ucrComboBoxElements.SetDropDownStyleAsNonEditable() - - 'elements receiver - ucrReceiverMultipleElements.SetParameter(New RParameter("elements", 3)) + ucrReceiverMultipleStations.SetLinkedDisplayControl(lblSelectStations) + '--------------------------------------- + + 'elements + '--------------------------------------- + dctElementsCols.Add("Element IDs", Chr(34) & "elementId" & Chr(34)) + dctElementsCols.Add("Element Names", Chr(34) & "elementName" & Chr(34)) + dctElementsCols.Add("Element Abbreviation", Chr(34) & "abbreviation" & Chr(34)) + dctElementsCols.Add("Element Types", Chr(34) & "elementtype" & Chr(34)) + ucrCboElements.SetParameter(New RParameter("element_filter_column", 3)) + ucrCboElements.SetItems(dctElementsCols) + ucrCboElements.bAllowNonConditionValues = False + ucrCboElements.SetDropDownStyleAsNonEditable() + ucrCboElements.SetLinkedDisplayControl(lblSelectElements) + + ucrReceiverMultipleElements.SetParameter(New RParameter("elements", 4)) ucrReceiverMultipleElements.SetParameterIsString() ucrReceiverMultipleElements.Selector = ucrSelectorForClimSoft ucrReceiverMultipleElements.SetItemType("database_variables") ucrReceiverMultipleElements.strSelectorHeading = "Elements" - ucrReceiverMultipleElements.SetLinkedDisplayControl(lblElements) - - 'include observation data checkbox - ucrChkObservationData.SetText("Include Observation Data") - ucrChkObservationData.SetParameter(New RParameter("include_observation_data", 4)) - ucrChkObservationData.SetRDefault("FALSE") - - 'include flags data checkbox - ucrChkFlagsData.SetText("Include Observation Flags") - ucrChkFlagsData.SetParameter(New RParameter("include_observation_flags", 5)) - ucrChkFlagsData.SetRDefault("FALSE") - - 'include Unstack data checkbox. - 'parameter attached to it is determined by elements receiver no. of contents. Thus not directly set by the control - ucrChkUnstackData.SetText("Unstack Data") - 'ucrChkUnstackData.Checked = True - - 'include elements info checkbox - ucrChkElements.SetText("Include Elements Information") - ucrChkElements.SetParameter(New RParameter("include_elements_info", 7)) - ucrChkElements.SetRDefault("FALSE") - - 'date range checkbox - ucrChkDateRange.SetText("Select Date Range") - - 'start date datepicker - ucrDtpStartdate.SetParameter(New RParameter("start_date", 8)) - ucrDtpStartdate.SetParameterIsRDate() - ucrDtpStartdate.SetLinkedDisplayControl(lblStartDate) - - 'end date datepicker - ucrDtpEndDate.SetParameter(New RParameter("end_date", 9)) - ucrDtpEndDate.SetParameterIsRDate() - ucrDtpEndDate.SetLinkedDisplayControl(lblEndDate) - - 'linking observation data related controls to include observation data checkbox - ucrChkObservationData.AddToLinkedControls({ucrChkFlagsData, ucrChkUnstackData, ucrChkElements, ucrComboBoxElements, ucrReceiverMultipleElements}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'link date range checkbox - ucrChkObservationData.AddToLinkedControls({ucrChkDateRange}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'linking date pickers to date range checkbox - ucrChkDateRange.AddToLinkedControls({ucrDtpStartdate, ucrDtpEndDate}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrReceiverMultipleElements.SetLinkedDisplayControl(lblSelectElements) + '--------------------------------------- + + 'qc status + '--------------------------------------- + dctQCStatuses.Add("All", "-1") + dctQCStatuses.Add("Zero", "0") + dctQCStatuses.Add("One", "1") + dctQCStatuses.Add("Two", "2") + ucrCboQCStatus.SetParameter(New RParameter("qc_status", 5)) + ucrCboQCStatus.SetItems(dctQCStatuses) + ucrCboQCStatus.SetRDefault("-1") + ucrCboQCStatus.bAllowNonConditionValues = False + ucrCboQCStatus.SetDropDownStyleAsNonEditable() + ucrCboQCStatus.SetLinkedDisplayControl(lblSelectQCStatus) + '--------------------------------------- + + 'Unstack data + '--------------------------------------- + ucrChKUnstackData.SetText("Unstack Data") + ucrChKUnstackData.SetParameter(New RParameter("unstack_data", 13)) + ucrChKUnstackData.SetRDefault("FALSE") + '--------------------------------------- + + 'date range + '--------------------------------------- + ucrChkDataDate.SetText("Select Dates") + + ucrDtpStartDataDate.SetParameter(New RParameter("start_date", 6)) + ucrDtpStartDataDate.SetParameterIsRDate() + ucrDtpStartDataDate.SetLinkedDisplayControl(lblToDataDate) + + ucrDtpEndDataDate.SetParameter(New RParameter("end_date", 7)) + ucrDtpEndDataDate.SetParameterIsRDate() + + ucrChkDataDate.AddToLinkedControls({ucrDtpStartDataDate, ucrDtpEndDataDate}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + '--------------------------------------- + + 'metadata controls + '--------------------------------------- + ucrChkImportStationsMetadata.SetText("Import All Stations Metadata") + ucrChkImportStationsMetadata.SetParameter(New RParameter("import_stations", 0)) + ucrChkImportStationsMetadata.SetRDefault("FALSE") + + ucrChkImportElementsMetadata.SetText("Import All Elements Metadata") + ucrChkImportElementsMetadata.SetParameter(New RParameter("import_elements", 2)) + ucrChkImportElementsMetadata.SetRDefault("FALSE") + + ucrChkImportFlagsMetadata.SetText("Import All Flags Metadata") + ucrChkImportFlagsMetadata.SetParameter(New RParameter("import_flags", 3)) + ucrChkImportFlagsMetadata.SetRDefault("FALSE") + '--------------------------------------- + + 'dialog options + '--------------------------------------- + ucrPnlOptions.AddRadioButton(rdoData) + ucrPnlOptions.AddRadioButton(rdoMetadata) + + ucrPnlOptions.AddFunctionNamesCondition(rdoData, frmMain.clsRLink.strInstatDataObject & "$import_climsoft_data") + ucrPnlOptions.AddFunctionNamesCondition(rdoMetadata, frmMain.clsRLink.strInstatDataObject & "$import_climsoft_metadata") + + + ucrPnlOptions.AddToLinkedControls({ucrCboTable, ucrCboQCStatus, ucrSelectorForClimSoft, ucrReceiverMultipleStations, ucrReceiverMultipleElements, ucrCboStations, ucrCboElements, ucrChkDataDate, ucrChKUnstackData}, + {rdoData}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrChkImportStationsMetadata, ucrChkImportElementsMetadata, ucrChkImportFlagsMetadata}, + {rdoMetadata}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + + '--------------------------------------- End Sub Private Sub SetDefaults() - clsRImportFromClimsoft = New RFunction - clsRImportFromClimsoft.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_from_climsoft") - ucrBase.clsRsyntax.SetBaseRFunction(clsRImportFromClimsoft) + clsRImportClimsoftData = New RFunction + clsRImportClimsoftMetaData = New RFunction + + 'data command + '--------------------------------------- + clsRImportClimsoftData.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_climsoft_data") + clsRImportClimsoftData.AddParameter(strParameterName:="table", strParameterValue:=Chr(34) & "observationfinal" & Chr(34), iPosition:=0) + clsRImportClimsoftData.AddParameter(strParameterName:="station_filter_column", strParameterValue:=Chr(34) & "stationId" & Chr(34), iPosition:=1) + clsRImportClimsoftData.AddParameter(strParameterName:="element_filter_column", strParameterValue:=Chr(34) & "elementId" & Chr(34), iPosition:=3) + '--------------------------------------- + + 'metadata command + '--------------------------------------- + clsRImportClimsoftMetaData.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_climsoft_metadata") + '--------------------------------------- + + ucrBase.clsRsyntax.SetBaseRFunction(clsRImportClimsoftData) - ucrReceiverMultipleStations.SetMeAsReceiver() ucrSelectorForClimSoft.Reset() - ucrChkUnstackData.Checked = True - ucrChkDateRange.Checked = False + ucrReceiverMultipleStations.SetMeAsReceiver() + ucrChkDataDate.Checked = False + rdoData.Checked = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrComboBoxStations.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrReceiverMultipleStations.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrComboBoxElements.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrReceiverMultipleElements.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrChkObservationData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrChkFlagsData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrChkElements.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrDtpStartdate.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrDtpEndDate.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - End Sub - Private Sub TestOKEnabled() - ucrBase.OKEnabled((Not ucrReceiverMultipleStations.IsEmpty() AndAlso Not ucrChkObservationData.Checked) OrElse (Not ucrReceiverMultipleElements.IsEmpty() AndAlso ucrChkObservationData.Checked)) - End Sub + 'data option + '--------------------------------------- + ucrCboStations.SetRCode(clsRImportClimsoftData, bReset) + ucrReceiverMultipleStations.SetRCode(clsRImportClimsoftData, bReset) - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaults() - SetRCodeForControls(True) - sdgImportFromClimSoft.Reset() - CheckAndUpdateConnectionStatus() - TestOKEnabled() + ucrCboElements.SetRCode(clsRImportClimsoftData, bReset) + ucrReceiverMultipleElements.SetRCode(clsRImportClimsoftData, bReset) + + ucrCboTable.SetRCode(clsRImportClimsoftData, bReset) + + ucrChKUnstackData.SetRCode(clsRImportClimsoftData, bReset) + + ucrCboQCStatus.SetRCode(clsRImportClimsoftData, bReset) + + ucrDtpStartDataDate.SetRCode(clsRImportClimsoftData, bReset) + ucrDtpEndDataDate.SetRCode(clsRImportClimsoftData, bReset) + + 'data sub dialog + sdgClimsoft.SetRCode(clsRImportClimsoftData, bReset) + '--------------------------------------- + + 'metadata option + '--------------------------------------- + ucrChkImportStationsMetadata.SetRCode(clsRImportClimsoftMetaData, bReset) + ucrChkImportElementsMetadata.SetRCode(clsRImportClimsoftMetaData, bReset) + ucrChkImportFlagsMetadata.SetRCode(clsRImportClimsoftMetaData, bReset) + '--------------------------------------- End Sub - Private Sub btnEstablishConnection_Click(sender As Object, e As EventArgs) Handles cmdEstablishConnection.Click + Private Sub btnConnection_Click(sender As Object, e As EventArgs) Handles btnConnection.Click 'shows the database connect sub dialog and checks if connection has been established sdgImportFromClimSoft.ShowDialog() CheckAndUpdateConnectionStatus() ucrReceiverMultipleStations.Clear() + ucrReceiverMultipleElements.Clear() ucrReceiverMultipleStations.SetMeAsReceiver() End Sub - ''' - ''' constructs and sets the stations reciver SQL query - ''' - ''' returns true if receivers query was changed - Private Function SetStationsReceiverQuery() As Boolean - If dctStationColumns.Count < 1 Then - Return False - End If - - 'sql query to get station values of the selected column from station table - Dim strQuery As String - Dim strSelectedColumn As String = dctStationColumns.Item(ucrComboBoxStations.GetText).Trim("""") - - strQuery = "SELECT DISTINCT " & strSelectedColumn & " FROM station WHERE " & strSelectedColumn & " IS NOT NULL AND " & strSelectedColumn & " <> '';" - If ucrReceiverMultipleStations.strDatabaseQuery = strQuery Then - Return False - End If - ucrReceiverMultipleStations.Clear() - ucrReceiverMultipleStations.strDatabaseQuery = strQuery - Return True - End Function - - ''' - ''' constructs and sets elements receiver SQL query - ''' - ''' returns true if receivers query was changed - Private Function SetElementsRecieverQuery() As Boolean - If dctElementsColumns.Count < 1 Then - Return False - End If + Private Sub ucrPnlOption_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged + btnMoreOptions.Visible = rdoData.Checked + btnCheckRecords.Visible = rdoData.Checked + lblRecordsNum.Visible = rdoData.Checked + ucrBase.clsRsyntax.SetBaseRFunction(If(rdoData.Checked, clsRImportClimsoftData, clsRImportClimsoftMetaData)) + End Sub - 'sql query to get distinct element values of the selected column(obselement TABLE COLUMN) from the observationfinal table - Dim strQuery As String - strQuery = "SELECT DISTINCT obselement." & dctElementsColumns.Item(ucrComboBoxElements.GetText).Trim("""") & - " FROM observationfinal" & - " INNER JOIN obselement ON observationfinal.describedBy = obselement.elementId" & - " INNER JOIN station ON observationfinal.recordedFrom = station.stationId" - 'if stations have been specified, then get elements for those stations only - If Not ucrReceiverMultipleStations.IsEmpty Then - strQuery = strQuery & " WHERE " & "station." & dctStationColumns.Item(ucrComboBoxStations.GetText).Trim("""") & " IN (" & - String.Join(",", ucrReceiverMultipleStations.GetVariableNamesList(strQuotes:=Chr(39))) & ")" + Private Sub ucrCboStations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboStations.ControlValueChanged + If dctStationCols.Count < 1 Then + Exit Sub End If - strQuery &= ";" + SetRecieverQuery("station", dctStationCols.Item(ucrCboStations.GetText).Trim(""""), ucrReceiverMultipleStations) + 'set as selected receiver. will also execute the receiver's sql query + ucrReceiverMultipleStations.SetMeAsReceiver() + End Sub - If ucrReceiverMultipleElements.strDatabaseQuery = strQuery Then - Return False - End If - ucrReceiverMultipleElements.Clear() - ucrReceiverMultipleElements.strDatabaseQuery = strQuery - Return True - End Function - - Private Sub ucrComboBoxStations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrComboBoxStations.ControlValueChanged - If SetStationsReceiverQuery() Then - 'set as selected receiver. will also execute the receiver's sql query - ucrReceiverMultipleStations.SetMeAsReceiver() + Private Sub ucrCboElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboElements.ControlValueChanged + If dctElementsCols.Count < 1 Then + Exit Sub End If + SetRecieverQuery("obselement", dctElementsCols.Item(ucrCboElements.GetText).Trim(""""), ucrReceiverMultipleElements) + 'set as selected receiver. will also execute receiver's sql the query + ucrReceiverMultipleElements.SetMeAsReceiver() End Sub - Private Sub ucrReceiverMultipleStations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStations.ControlValueChanged - If Not bIgnoreReceiverChanges Then - SetElementsRecieverQuery() + + Private Sub ucrChkDataDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDataDate.ControlValueChanged + 'this forces the date pickers to write default parameter values to the Rfunction. + 'date picker controls have a problem of default date. + 'its not set by default until the user changes selected date + 'todo. in future, this may not be needed + If ucrChkDataDate.Checked Then + ucrDtpEndDataDate.OnControlValueChanged() + ucrDtpStartDataDate.OnControlValueChanged() End If End Sub - Private Sub ucrComboBoxElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrComboBoxElements.ControlValueChanged - If SetElementsRecieverQuery() Then - 'set as selected receiver. will also execute receiver's sql the query - ucrReceiverMultipleElements.SetMeAsReceiver() - End If + Private Sub btnMoreOptions_Click(sender As Object, e As EventArgs) Handles btnMoreOptions.Click + sdgClimsoft.ShowDialog() + lblRecordsNum.Text = "" End Sub - Private Sub ucrUnstackDataControlsValueChanged_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkUnstackData.ControlValueChanged, ucrReceiverMultipleElements.ControlValueChanged, ucrChkObservationData.ControlValueChanged - 'only change the receivers if the event was raised by ucrChkObservationData checkbox - If TypeOf ucrChangedControl Is ucrCheck Then - If ucrChkObservationData.Checked Then - ucrReceiverMultipleElements.SetMeAsReceiver() - Else - ucrReceiverMultipleStations.SetMeAsReceiver() + Private Sub btnCheckRecords_Click(sender As Object, e As EventArgs) Handles btnCheckRecords.Click + Try + lblRecordsNum.Text = "" + Dim strTableName As String = dctTables.Item(ucrCboTable.GetText).Trim("""") + Dim strStationColumn As String = dctStationCols.Item(ucrCboStations.GetText).Trim("""") + Dim strElementsColumn As String = dctElementsCols.Item(ucrCboElements.GetText).Trim("""") + Dim strStationsValues As String = String.Join(",", ucrReceiverMultipleStations.GetVariableNamesList(bWithQuotes:=True, strQuotes:="'")) + Dim strElementsValues As String = String.Join(",", ucrReceiverMultipleElements.GetVariableNamesList(bWithQuotes:=True, strQuotes:="'")) + Dim strQueryCondition As String = " INNER JOIN station ON " & strTableName & ".recordedFrom = station.stationId" & + " INNER JOIN obselement ON " & strTableName & ".describedBy = obselement.elementId WHERE" & + " station." & strStationColumn & " IN (" & strStationsValues & ")" & + " AND obselement." & strElementsColumn & " IN (" & strElementsValues & ")" + + Dim strQCStatus As String = If(dctQCStatuses.Item(ucrCboQCStatus.GetText) = "-1", "", dctQCStatuses.Item(ucrCboQCStatus.GetText)) + + If dctQCStatuses.Item(ucrCboQCStatus.GetText) <> "-1" Then + strQueryCondition = strQueryCondition & " AND qcStatus = " & dctQCStatuses.Item(ucrCboQCStatus.GetText) End If - End If - 'unstack observation data only when more than 1 element is selected - If ucrChkObservationData.Checked AndAlso ucrReceiverMultipleElements.GetVariableNamesAsList.Count > 1 Then - ucrChkUnstackData.Enabled = True - clsRImportFromClimsoft.AddParameter("unstack_data", If(ucrChkUnstackData.Checked, "TRUE", "FALSE"), iPosition:=6) - Else - ucrChkUnstackData.Enabled = False - clsRImportFromClimsoft.RemoveParameterByName("unstack_data") + If ucrChkDataDate.Checked Then + strQueryCondition = strQueryCondition & " AND obsDatetime >= '" & ucrDtpStartDataDate.DateValue.ToString("yyyy-MM-dd") & "' AND obsDatetime <= '" & ucrDtpEndDataDate.DateValue.ToString("yyyy-MM-dd") & "'" + End If + + Dim clsRowsCountRFunction As New RFunction + clsRowsCountRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_db_table_row_count") + clsRowsCountRFunction.AddParameter(strParameterName:="tableName", strParameterValue:=Chr(34) & strTableName & Chr(34)) + clsRowsCountRFunction.AddParameter(strParameterName:="query_condition", strParameterValue:=Chr(34) & strQueryCondition & Chr(34)) + + Dim expTemp As SymbolicExpression = frmMain.clsRLink.RunInternalScriptGetValue(clsRowsCountRFunction.ToScript()) + If expTemp IsNot Nothing Then + Dim recordsNum As Integer = expTemp.AsNumeric().FirstOrDefault() + lblRecordsNum.Text = recordsNum & " records found" + lblRecordsNum.ForeColor = If(recordsNum > 0, Color.Green, Color.Red) + End If + Catch ex As Exception + MessageBox.Show(Me, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End Try + End Sub + + Private Sub ucrControlsContents_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStations.ControlContentsChanged, ucrReceiverMultipleElements.ControlContentsChanged, ucrCboTable.ControlContentsChanged, ucrCboQCStatus.ControlContentsChanged, ucrDtpStartDataDate.ControlContentsChanged, ucrDtpEndDataDate.ControlContentsChanged, ucrPnlOptions.ControlContentsChanged, ucrChkImportStationsMetadata.ControlContentsChanged, ucrChkImportElementsMetadata.ControlContentsChanged, ucrChkImportFlagsMetadata.ControlContentsChanged + Dim bValid As Boolean = False + If rdoData.Checked Then + bValid = Not ucrReceiverMultipleStations.IsEmpty() AndAlso Not ucrReceiverMultipleElements.IsEmpty() AndAlso Not ucrCboTable.IsEmpty() + btnCheckRecords.Enabled = bValid + lblRecordsNum.Text = "" + ElseIf rdoMetadata.Checked Then + bValid = ucrChkImportStationsMetadata.Checked OrElse ucrChkImportElementsMetadata.Checked OrElse ucrChkImportFlagsMetadata.Checked End If + ucrBase.OKEnabled(bValid) End Sub - Private Sub ucrControlsContents_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStations.ControlContentsChanged, ucrReceiverMultipleElements.ControlContentsChanged, ucrChkObservationData.ControlContentsChanged, ucrChkUnstackData.ControlContentsChanged - TestOKEnabled() + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) + sdgImportFromClimSoft.Reset() + CheckAndUpdateConnectionStatus() + End Sub + + Private Sub SetRecieverQuery(strTable As String, strSelectedColumn As String, ucrReceiverControl As ucrReceiverMultiple) + 'sql query to get values of the selected column from the table + Dim strQuery As String = "SELECT DISTINCT " & strSelectedColumn & " FROM " & strTable & " WHERE " & strSelectedColumn & " IS NOT NULL AND " & strSelectedColumn & " <> '';" + If ucrReceiverControl.strDatabaseQuery = strQuery Then + Exit Sub + End If + ucrReceiverControl.Clear() + ucrReceiverControl.strDatabaseQuery = strQuery End Sub Private Sub CheckAndUpdateConnectionStatus() @@ -277,18 +345,9 @@ Public Class dlgClimSoft lblConnection.Text = "No Connection" lblConnection.ForeColor = Color.Red ucrReceiverMultipleStations.Clear() + ucrReceiverMultipleElements.Clear() End If - autoTranslate(Me) End Sub - Private Sub ucrChkDateRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDateRange.ControlValueChanged - 'this forces the date pickers to write default parameter values to the Rfunction. - 'date picker controls have a problem of default date. - 'its not set by default until the user changes selected date - 'todo. in future, this may not be needed - If ucrChkDateRange.Checked Then - ucrDtpEndDate.OnControlValueChanged() - ucrDtpStartdate.OnControlValueChanged() - End If - End Sub -End Class + +End Class \ No newline at end of file diff --git a/instat/dlgClimaticBoxPlot.vb b/instat/dlgClimaticBoxPlot.vb index c8874b72be6..b4ab4385bf2 100644 --- a/instat/dlgClimaticBoxPlot.vb +++ b/instat/dlgClimaticBoxPlot.vb @@ -200,7 +200,7 @@ Public Class dlgClimaticBoxPlot ucrSavePlot.SetPrefix("box_plot") ucrSavePlot.SetIsComboBox() - ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetCheckBoxText("Store Graph") ucrSavePlot.SetSaveTypeAsGraph() ucrSavePlot.SetDataFrameSelector(ucrSelectorClimaticBoxPlot.ucrAvailableDataFrames) ucrSavePlot.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgClimaticStationMaps.vb b/instat/dlgClimaticStationMaps.vb index 7d27f489804..d1be62a0b98 100644 --- a/instat/dlgClimaticStationMaps.vb +++ b/instat/dlgClimaticStationMaps.vb @@ -120,7 +120,7 @@ Public Class dlgClimaticStationMaps ucrSaveMap.SetPrefix("map") ucrSaveMap.SetSaveTypeAsGraph() ucrSaveMap.SetIsComboBox() - ucrSaveMap.SetCheckBoxText("Save Map") + ucrSaveMap.SetCheckBoxText("Store Map") ucrSaveMap.SetAssignToIfUncheckedValue("last_map") ucrSaveMap.SetDataFrameSelector(ucrSelectorOutline.ucrAvailableDataFrames) diff --git a/instat/dlgClimdexIndices.vb b/instat/dlgClimdexIndices.vb index 991cc3ee222..613ef424cc8 100644 --- a/instat/dlgClimdexIndices.vb +++ b/instat/dlgClimdexIndices.vb @@ -101,7 +101,7 @@ Public Class dlgClimdexIndices ucrPnlAnnualMonthly.SetRDefault(Chr(34) & "annual" & Chr(34)) ucrPnlAnnualMonthly.AddToLinkedControls({ucrReceiverMonth}, {rdoMonthly}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkSave.SetText("Save Indices") + ucrChkSave.SetText("Store Indices") ucrChkSave.bChangeParameterValue = False End Sub diff --git a/instat/dlgClusterAnalysis.vb b/instat/dlgClusterAnalysis.vb index 328bd682f89..67ee63a0125 100644 --- a/instat/dlgClusterAnalysis.vb +++ b/instat/dlgClusterAnalysis.vb @@ -119,7 +119,7 @@ Public Class dlgClusterAnalysis ucrSaveGraph.SetPrefix("Cluster_plot") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorClusterData.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgCombineforGraphics.vb b/instat/dlgCombineforGraphics.vb index df1997762ac..c7cb3855f09 100644 --- a/instat/dlgCombineforGraphics.vb +++ b/instat/dlgCombineforGraphics.vb @@ -48,7 +48,7 @@ Public Class dlgCombineforGraphics ucrSave.SetPrefix("combined_graph") ucrSave.SetDataFrameSelector(ucrCombineGraphSelector.ucrAvailableDataFrames) ucrSave.SetSaveType(strRObjectType:=RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) - ucrSave.SetCheckBoxText("Save Graph") + ucrSave.SetCheckBoxText("Store Graph") ucrSave.SetIsComboBox() ucrSave.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgCompareTreatmentLines.vb b/instat/dlgCompareTreatmentLines.vb index 4f464a8dd99..d73b112418a 100644 --- a/instat/dlgCompareTreatmentLines.vb +++ b/instat/dlgCompareTreatmentLines.vb @@ -156,7 +156,7 @@ Public Class dlgCompareTreatmentLines ucrSavePlot.SetPrefix("two_options") ucrSavePlot.SetIsComboBox() - ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetCheckBoxText("Store Graph") ucrSavePlot.SetSaveTypeAsGraph() ucrSavePlot.SetDataFrameSelector(ucrSelectorPlot.ucrAvailableDataFrames) ucrSavePlot.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgConditionalQuantilePlot.vb b/instat/dlgConditionalQuantilePlot.vb index e3ceb9deef0..5a22b4e399d 100644 --- a/instat/dlgConditionalQuantilePlot.vb +++ b/instat/dlgConditionalQuantilePlot.vb @@ -131,7 +131,7 @@ Public Class dlgConditionalQuantilePlot ucrReceiverType.SetLinkedDisplayControl(lblType) ucrSavePlot.SetPrefix("cond_quantile_plot") - ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetCheckBoxText("Store Graph") ucrSavePlot.SetIsComboBox() ucrSavePlot.SetSaveTypeAsGraph() ucrSavePlot.SetDataFrameSelector(ucrConditionalQuantilePlotSelector.ucrAvailableDataFrames) diff --git a/instat/dlgCorrelation.vb b/instat/dlgCorrelation.vb index e7c188447fe..332b92185c1 100644 --- a/instat/dlgCorrelation.vb +++ b/instat/dlgCorrelation.vb @@ -592,7 +592,7 @@ Public Class dlgCorrelation If rdoAsText.Checked Then clsDummyFunction.AddParameter("output", "as.table", iPosition:=2) ucrSaveCorrelation.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrSaveCorrelation.SetCheckBoxText("Save Table") + ucrSaveCorrelation.SetCheckBoxText("Store Table") ucrSaveCorrelation.SetPrefix("summary_table") ucrSaveCorrelation.SetAssignToIfUncheckedValue("last_table") clsPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", @@ -604,14 +604,14 @@ Public Class dlgCorrelation clsDummyFunction.AddParameter("output", "as.dataframe", iPosition:=2) clsPipeOperator.RemoveAssignTo() ucrSaveCorrelation.SetSaveTypeAsDataFrame() - ucrSaveCorrelation.SetCheckBoxText("Save Data Frame") + ucrSaveCorrelation.SetCheckBoxText("Store Data Frame") ucrSaveCorrelation.SetPrefix("data_frame") ucrSaveCorrelation.SetAssignToIfUncheckedValue("last_dataframe") End If Else ucrSaveCorrelation.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) - ucrSaveCorrelation.SetCheckBoxText("Save Table") + ucrSaveCorrelation.SetCheckBoxText("Store Table") ucrSaveCorrelation.SetPrefix("summary_table") ucrSaveCorrelation.SetAssignToIfUncheckedValue("last_table") clsCorrelationFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", @@ -623,7 +623,7 @@ Public Class dlgCorrelation Else ucrSaveCorrelation.SetSaveType(strRObjectType:=RObjectTypeLabel.Model, strRObjectFormat:=RObjectFormat.Text) - ucrSaveCorrelation.SetCheckBoxText("Save Model") + ucrSaveCorrelation.SetCheckBoxText("Store Model") ucrSaveCorrelation.SetPrefix("summary_model") ucrSaveCorrelation.SetAssignToIfUncheckedValue("last_model") clsCorrelationTestFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_model", diff --git a/instat/dlgCountryColouredMap.vb b/instat/dlgCountryColouredMap.vb index 10e97e2f2e0..ccea8029c23 100644 --- a/instat/dlgCountryColouredMap.vb +++ b/instat/dlgCountryColouredMap.vb @@ -92,7 +92,7 @@ Public Class dlgCountryColouredMap ucrSaveMap.SetPrefix("Map") ucrSaveMap.SetSaveTypeAsGraph() ucrSaveMap.SetIsComboBox() - ucrSaveMap.SetCheckBoxText("Save Graph") + ucrSaveMap.SetCheckBoxText("Store Graph") ucrSaveMap.SetAssignToIfUncheckedValue("last_graph") ucrSaveMap.SetDataFrameSelector(ucrSelectorCountryColouredMap.ucrAvailableDataFrames) End Sub diff --git a/instat/dlgCumulativeDistribution.vb b/instat/dlgCumulativeDistribution.vb index cd123316452..f6f326a7f47 100644 --- a/instat/dlgCumulativeDistribution.vb +++ b/instat/dlgCumulativeDistribution.vb @@ -164,7 +164,7 @@ Public Class dlgCumulativeDistribution ucrSaveCumDist.SetSaveTypeAsGraph() ucrSaveCumDist.SetDataFrameSelector(ucrCumDistSelector.ucrAvailableDataFrames) - ucrSaveCumDist.SetCheckBoxText("Save Graph") + ucrSaveCumDist.SetCheckBoxText("Store Graph") ucrSaveCumDist.SetIsComboBox() ucrSaveCumDist.SetPrefix("cumulative_dist") ucrSaveCumDist.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgDescribeTwoVarGraph.vb b/instat/dlgDescribeTwoVarGraph.vb index 00169a986fe..082a787de78 100644 --- a/instat/dlgDescribeTwoVarGraph.vb +++ b/instat/dlgDescribeTwoVarGraph.vb @@ -274,7 +274,7 @@ Public Class dlgDescribeTwoVarGraph ucrSaveGraph.SetPrefix("two_var") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorTwoVarGraph.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb index 72f32dd229a..e0234ea7e9f 100644 --- a/instat/dlgDescribeTwoVariable.Designer.vb +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -60,25 +60,32 @@ Partial Class dlgDescribeTwoVariable Me.cmdSummaries = New System.Windows.Forms.Button() Me.lblMarginName = New System.Windows.Forms.Label() Me.grpDisplay = New System.Windows.Forms.GroupBox() - Me.lblFactorAsPercentage = New System.Windows.Forms.Label() + Me.ucrReceiverColumns = New instat.ucrReceiverMultiple() + Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() + Me.rdoOCol = New System.Windows.Forms.RadioButton() + Me.rdoOCell = New System.Windows.Forms.RadioButton() + Me.rdoORow = New System.Windows.Forms.RadioButton() + Me.ucrpnlPercent = New instat.UcrPanel() + Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() + Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() Me.ucrReceiverFirstVars = New instat.ucrReceiverMultiple() Me.ucrSaveTable = New instat.ucrSave() - Me.ucrChkPercentageProportion = New instat.ucrCheck() - Me.ucrReceiverPercentages = New instat.ucrReceiverSingle() - Me.ucrChkDisplayAsPercentage = New instat.ucrCheck() Me.ucrInputMarginName = New instat.ucrInputTextBox() Me.ucrReorderSummary = New instat.ucrReorder() - Me.ucrChkDisplayMargins = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverThreeVariableThirdVariable = New instat.ucrReceiverSingle() Me.ucrReceiverSecondSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.ucrReceiverSecondTwoVariableFactor = New instat.ucrReceiverSingle() Me.ucrSelectorDescribeTwoVar = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrPnlDescribe = New instat.UcrPanel() - Me.ucrReceiverThreeVariableSecondFactor = New instat.ucrReceiverSingle() Me.ucrReceiverSkimrGroupByFactor = New instat.ucrReceiverSingle() - Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkSummariesRowCol = New instat.ucrCheck() + Me.ucrChkMeans = New instat.ucrCheck() + Me.ucrChkDisplayMargins = New instat.ucrCheck() + Me.ucrChkSwapXYVar = New instat.ucrCheck() + Me.ucrChkCorrelations = New instat.ucrCheck() + Me.ucrChkLevSig = New instat.ucrCheck() + Me.ucrChkOmitMissing = New instat.ucrCheck() Me.grpSummaries.SuspendLayout() Me.grpDisplay.SuspendLayout() Me.SuspendLayout() @@ -92,7 +99,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoThreeVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoThreeVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoThreeVariable.Location = New System.Drawing.Point(432, 12) - Me.rdoThreeVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoThreeVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoThreeVariable.Name = "rdoThreeVariable" Me.rdoThreeVariable.Size = New System.Drawing.Size(150, 42) Me.rdoThreeVariable.TabIndex = 3 @@ -102,9 +109,10 @@ Partial Class dlgDescribeTwoVariable ' 'cmdFormatTable ' + Me.cmdFormatTable.Enabled = False Me.cmdFormatTable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdFormatTable.Location = New System.Drawing.Point(489, 634) - Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFormatTable.Margin = New System.Windows.Forms.Padding(4) Me.cmdFormatTable.Name = "cmdFormatTable" Me.cmdFormatTable.Size = New System.Drawing.Size(156, 34) Me.cmdFormatTable.TabIndex = 23 @@ -125,8 +133,8 @@ Partial Class dlgDescribeTwoVariable 'cmdMissingOptions ' Me.cmdMissingOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMissingOptions.Location = New System.Drawing.Point(250, 444) - Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdMissingOptions.Location = New System.Drawing.Point(539, 439) + Me.cmdMissingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdMissingOptions.Name = "cmdMissingOptions" Me.cmdMissingOptions.Size = New System.Drawing.Size(158, 34) Me.cmdMissingOptions.TabIndex = 21 @@ -166,9 +174,9 @@ Partial Class dlgDescribeTwoVariable Me.grpSummaries.Controls.Add(Me.lblBy) Me.grpSummaries.Controls.Add(Me.lblSecondType) Me.grpSummaries.Location = New System.Drawing.Point(16, 328) - Me.grpSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpSummaries.Margin = New System.Windows.Forms.Padding(4) Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpSummaries.Padding = New System.Windows.Forms.Padding(4) Me.grpSummaries.Size = New System.Drawing.Size(315, 108) Me.grpSummaries.TabIndex = 17 Me.grpSummaries.TabStop = False @@ -267,7 +275,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoSkim.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSkim.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoSkim.Location = New System.Drawing.Point(142, 12) - Me.rdoSkim.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoSkim.Margin = New System.Windows.Forms.Padding(4) Me.rdoSkim.Name = "rdoSkim" Me.rdoSkim.Size = New System.Drawing.Size(150, 42) Me.rdoSkim.TabIndex = 1 @@ -306,7 +314,7 @@ Partial Class dlgDescribeTwoVariable Me.rdoTwoVariable.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTwoVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.rdoTwoVariable.Location = New System.Drawing.Point(286, 12) - Me.rdoTwoVariable.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoTwoVariable.Margin = New System.Windows.Forms.Padding(4) Me.rdoTwoVariable.Name = "rdoTwoVariable" Me.rdoTwoVariable.Size = New System.Drawing.Size(150, 42) Me.rdoTwoVariable.TabIndex = 2 @@ -318,7 +326,7 @@ Partial Class dlgDescribeTwoVariable ' Me.cmdSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.cmdSummaries.Location = New System.Drawing.Point(465, 344) - Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdSummaries.Margin = New System.Windows.Forms.Padding(4) Me.cmdSummaries.Name = "cmdSummaries" Me.cmdSummaries.Size = New System.Drawing.Size(180, 34) Me.cmdSummaries.TabIndex = 1 @@ -339,29 +347,133 @@ Partial Class dlgDescribeTwoVariable ' 'grpDisplay ' - Me.grpDisplay.Controls.Add(Me.ucrChkPercentageProportion) - Me.grpDisplay.Controls.Add(Me.lblFactorAsPercentage) - Me.grpDisplay.Controls.Add(Me.ucrReceiverPercentages) + Me.grpDisplay.Controls.Add(Me.ucrReceiverColumns) Me.grpDisplay.Controls.Add(Me.ucrChkDisplayAsPercentage) - Me.grpDisplay.Location = New System.Drawing.Point(412, 308) - Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpDisplay.Location = New System.Drawing.Point(414, 277) + Me.grpDisplay.Margin = New System.Windows.Forms.Padding(4) Me.grpDisplay.Name = "grpDisplay" - Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.grpDisplay.Size = New System.Drawing.Size(291, 172) + Me.grpDisplay.Padding = New System.Windows.Forms.Padding(4) + Me.grpDisplay.Size = New System.Drawing.Size(291, 219) Me.grpDisplay.TabIndex = 15 Me.grpDisplay.TabStop = False Me.grpDisplay.Text = "Percentages" ' - 'lblFactorAsPercentage + 'ucrReceiverColumns + ' + Me.ucrReceiverColumns.AutoSize = True + Me.ucrReceiverColumns.frmParent = Me + Me.ucrReceiverColumns.Location = New System.Drawing.Point(19, 92) + Me.ucrReceiverColumns.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverColumns.Name = "ucrReceiverColumns" + Me.ucrReceiverColumns.Selector = Nothing + Me.ucrReceiverColumns.Size = New System.Drawing.Size(180, 121) + Me.ucrReceiverColumns.strNcFilePath = "" + Me.ucrReceiverColumns.TabIndex = 55 + Me.ucrReceiverColumns.ucrSelector = Nothing + ' + 'ucrChkDisplayAsPercentage + ' + Me.ucrChkDisplayAsPercentage.AutoSize = True + Me.ucrChkDisplayAsPercentage.Checked = False + Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(14, 22) + Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" + Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(171, 34) + Me.ucrChkDisplayAsPercentage.TabIndex = 54 + ' + 'rdoOCol + ' + Me.rdoOCol.AutoSize = True + Me.rdoOCol.Location = New System.Drawing.Point(432, 336) + Me.rdoOCol.Name = "rdoOCol" + Me.rdoOCol.Size = New System.Drawing.Size(81, 24) + Me.rdoOCol.TabIndex = 40 + Me.rdoOCol.TabStop = True + Me.rdoOCol.Text = "Col(%)" + Me.rdoOCol.UseVisualStyleBackColor = True + ' + 'rdoOCell + ' + Me.rdoOCell.AutoSize = True + Me.rdoOCell.Location = New System.Drawing.Point(612, 335) + Me.rdoOCell.Name = "rdoOCell" + Me.rdoOCell.Size = New System.Drawing.Size(84, 24) + Me.rdoOCell.TabIndex = 41 + Me.rdoOCell.TabStop = True + Me.rdoOCell.Text = "Cell(%)" + Me.rdoOCell.UseVisualStyleBackColor = True + ' + 'rdoORow + ' + Me.rdoORow.AutoSize = True + Me.rdoORow.Location = New System.Drawing.Point(517, 336) + Me.rdoORow.Name = "rdoORow" + Me.rdoORow.Size = New System.Drawing.Size(90, 24) + Me.rdoORow.TabIndex = 42 + Me.rdoORow.TabStop = True + Me.rdoORow.Text = "Row(%)" + Me.rdoORow.UseVisualStyleBackColor = True + ' + 'ucrpnlPercent + ' + Me.ucrpnlPercent.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrpnlPercent.Location = New System.Drawing.Point(424, 331) + Me.ucrpnlPercent.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrpnlPercent.Name = "ucrpnlPercent" + Me.ucrpnlPercent.Size = New System.Drawing.Size(270, 37) + Me.ucrpnlPercent.TabIndex = 43 + ' + 'ucrReceiverPercentages + ' + Me.ucrReceiverPercentages.AutoSize = True + Me.ucrReceiverPercentages.frmParent = Me + Me.ucrReceiverPercentages.Location = New System.Drawing.Point(431, 369) + Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" + Me.ucrReceiverPercentages.Selector = Nothing + Me.ucrReceiverPercentages.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverPercentages.strNcFilePath = "" + Me.ucrReceiverPercentages.TabIndex = 39 + Me.ucrReceiverPercentages.ucrSelector = Nothing + ' + 'ucrReceiverThreeVariableSecondFactor + ' + Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True + Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me + Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(465, 246) + Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" + Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing + Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" + Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 12 + Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing + ' + 'ucrReceiverSecondTwoVariableFactor + ' + Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True + Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me + Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(465, 246) + Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" + Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing + Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverSecondTwoVariableFactor.strNcFilePath = "" + Me.ucrReceiverSecondTwoVariableFactor.TabIndex = 1 + Me.ucrReceiverSecondTwoVariableFactor.ucrSelector = Nothing ' - Me.lblFactorAsPercentage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblFactorAsPercentage.Location = New System.Drawing.Point(14, 63) - Me.lblFactorAsPercentage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblFactorAsPercentage.Name = "lblFactorAsPercentage" - Me.lblFactorAsPercentage.Size = New System.Drawing.Size(231, 22) - Me.lblFactorAsPercentage.TabIndex = 2 - Me.lblFactorAsPercentage.Tag = "" - Me.lblFactorAsPercentage.Text = "Factor as Percentage:" + 'ucrReceiverThreeVariableThirdVariable + ' + Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True + Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me + Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(465, 306) + Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" + Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing + Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverThreeVariableThirdVariable.strNcFilePath = "" + Me.ucrReceiverThreeVariableThirdVariable.TabIndex = 14 + Me.ucrReceiverThreeVariableThirdVariable.ucrSelector = Nothing ' 'ucrReceiverFirstVars ' @@ -382,42 +494,9 @@ Partial Class dlgDescribeTwoVariable Me.ucrSaveTable.Location = New System.Drawing.Point(22, 676) Me.ucrSaveTable.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrSaveTable.Name = "ucrSaveTable" - Me.ucrSaveTable.Size = New System.Drawing.Size(598, 36) + Me.ucrSaveTable.Size = New System.Drawing.Size(459, 36) Me.ucrSaveTable.TabIndex = 24 ' - 'ucrChkPercentageProportion - ' - Me.ucrChkPercentageProportion.AutoSize = True - Me.ucrChkPercentageProportion.Checked = False - Me.ucrChkPercentageProportion.Location = New System.Drawing.Point(18, 126) - Me.ucrChkPercentageProportion.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkPercentageProportion.Name = "ucrChkPercentageProportion" - Me.ucrChkPercentageProportion.Size = New System.Drawing.Size(214, 51) - Me.ucrChkPercentageProportion.TabIndex = 0 - ' - 'ucrReceiverPercentages - ' - Me.ucrReceiverPercentages.AutoSize = True - Me.ucrReceiverPercentages.frmParent = Nothing - Me.ucrReceiverPercentages.Location = New System.Drawing.Point(18, 86) - Me.ucrReceiverPercentages.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverPercentages.Name = "ucrReceiverPercentages" - Me.ucrReceiverPercentages.Selector = Nothing - Me.ucrReceiverPercentages.Size = New System.Drawing.Size(214, 30) - Me.ucrReceiverPercentages.strNcFilePath = "" - Me.ucrReceiverPercentages.TabIndex = 3 - Me.ucrReceiverPercentages.ucrSelector = Nothing - ' - 'ucrChkDisplayAsPercentage - ' - Me.ucrChkDisplayAsPercentage.AutoSize = True - Me.ucrChkDisplayAsPercentage.Checked = False - Me.ucrChkDisplayAsPercentage.Location = New System.Drawing.Point(18, 26) - Me.ucrChkDisplayAsPercentage.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkDisplayAsPercentage.Name = "ucrChkDisplayAsPercentage" - Me.ucrChkDisplayAsPercentage.Size = New System.Drawing.Size(214, 51) - Me.ucrChkDisplayAsPercentage.TabIndex = 1 - ' 'ucrInputMarginName ' Me.ucrInputMarginName.AddQuotesIfUnrecognised = True @@ -440,16 +519,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrReorderSummary.ucrDataFrameList = Nothing Me.ucrReorderSummary.ucrReceiver = Nothing ' - 'ucrChkDisplayMargins - ' - Me.ucrChkDisplayMargins.AutoSize = True - Me.ucrChkDisplayMargins.Checked = False - Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(26, 444) - Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" - Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(214, 34) - Me.ucrChkDisplayMargins.TabIndex = 18 - ' 'ucrBase ' Me.ucrBase.AutoSize = True @@ -460,19 +529,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrBase.Size = New System.Drawing.Size(611, 77) Me.ucrBase.TabIndex = 25 ' - 'ucrReceiverThreeVariableThirdVariable - ' - Me.ucrReceiverThreeVariableThirdVariable.AutoSize = True - Me.ucrReceiverThreeVariableThirdVariable.frmParent = Me - Me.ucrReceiverThreeVariableThirdVariable.Location = New System.Drawing.Point(465, 306) - Me.ucrReceiverThreeVariableThirdVariable.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariableThirdVariable.Name = "ucrReceiverThreeVariableThirdVariable" - Me.ucrReceiverThreeVariableThirdVariable.Selector = Nothing - Me.ucrReceiverThreeVariableThirdVariable.Size = New System.Drawing.Size(180, 30) - Me.ucrReceiverThreeVariableThirdVariable.strNcFilePath = "" - Me.ucrReceiverThreeVariableThirdVariable.TabIndex = 14 - Me.ucrReceiverThreeVariableThirdVariable.ucrSelector = Nothing - ' 'ucrReceiverSecondSkimrGroupByFactor ' Me.ucrReceiverSecondSkimrGroupByFactor.AutoSize = True @@ -486,19 +542,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrReceiverSecondSkimrGroupByFactor.TabIndex = 34 Me.ucrReceiverSecondSkimrGroupByFactor.ucrSelector = Nothing ' - 'ucrReceiverSecondTwoVariableFactor - ' - Me.ucrReceiverSecondTwoVariableFactor.AutoSize = True - Me.ucrReceiverSecondTwoVariableFactor.frmParent = Me - Me.ucrReceiverSecondTwoVariableFactor.Location = New System.Drawing.Point(465, 246) - Me.ucrReceiverSecondTwoVariableFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSecondTwoVariableFactor.Name = "ucrReceiverSecondTwoVariableFactor" - Me.ucrReceiverSecondTwoVariableFactor.Selector = Nothing - Me.ucrReceiverSecondTwoVariableFactor.Size = New System.Drawing.Size(180, 30) - Me.ucrReceiverSecondTwoVariableFactor.strNcFilePath = "" - Me.ucrReceiverSecondTwoVariableFactor.TabIndex = 11 - Me.ucrReceiverSecondTwoVariableFactor.ucrSelector = Nothing - ' 'ucrSelectorDescribeTwoVar ' Me.ucrSelectorDescribeTwoVar.AutoSize = True @@ -520,19 +563,6 @@ Partial Class dlgDescribeTwoVariable Me.ucrPnlDescribe.Size = New System.Drawing.Size(476, 51) Me.ucrPnlDescribe.TabIndex = 0 ' - 'ucrReceiverThreeVariableSecondFactor - ' - Me.ucrReceiverThreeVariableSecondFactor.AutoSize = True - Me.ucrReceiverThreeVariableSecondFactor.frmParent = Me - Me.ucrReceiverThreeVariableSecondFactor.Location = New System.Drawing.Point(465, 246) - Me.ucrReceiverThreeVariableSecondFactor.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverThreeVariableSecondFactor.Name = "ucrReceiverThreeVariableSecondFactor" - Me.ucrReceiverThreeVariableSecondFactor.Selector = Nothing - Me.ucrReceiverThreeVariableSecondFactor.Size = New System.Drawing.Size(180, 30) - Me.ucrReceiverThreeVariableSecondFactor.strNcFilePath = "" - Me.ucrReceiverThreeVariableSecondFactor.TabIndex = 36 - Me.ucrReceiverThreeVariableSecondFactor.ucrSelector = Nothing - ' 'ucrReceiverSkimrGroupByFactor ' Me.ucrReceiverSkimrGroupByFactor.AutoSize = True @@ -543,19 +573,9 @@ Partial Class dlgDescribeTwoVariable Me.ucrReceiverSkimrGroupByFactor.Selector = Nothing Me.ucrReceiverSkimrGroupByFactor.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverSkimrGroupByFactor.strNcFilePath = "" - Me.ucrReceiverSkimrGroupByFactor.TabIndex = 32 + Me.ucrReceiverSkimrGroupByFactor.TabIndex = 2 Me.ucrReceiverSkimrGroupByFactor.ucrSelector = Nothing ' - 'ucrChkOmitMissing - ' - Me.ucrChkOmitMissing.AutoSize = True - Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(26, 444) - Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(214, 34) - Me.ucrChkOmitMissing.TabIndex = 0 - ' 'ucrChkSummariesRowCol ' Me.ucrChkSummariesRowCol.AutoSize = True @@ -566,12 +586,79 @@ Partial Class dlgDescribeTwoVariable Me.ucrChkSummariesRowCol.Size = New System.Drawing.Size(270, 34) Me.ucrChkSummariesRowCol.TabIndex = 20 ' + 'ucrChkMeans + ' + Me.ucrChkMeans.AutoSize = True + Me.ucrChkMeans.Checked = False + Me.ucrChkMeans.Location = New System.Drawing.Point(450, 278) + Me.ucrChkMeans.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkMeans.Name = "ucrChkMeans" + Me.ucrChkMeans.Size = New System.Drawing.Size(145, 34) + Me.ucrChkMeans.TabIndex = 37 + ' + 'ucrChkDisplayMargins + ' + Me.ucrChkDisplayMargins.AutoSize = True + Me.ucrChkDisplayMargins.Checked = False + Me.ucrChkDisplayMargins.Location = New System.Drawing.Point(26, 444) + Me.ucrChkDisplayMargins.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkDisplayMargins.Name = "ucrChkDisplayMargins" + Me.ucrChkDisplayMargins.Size = New System.Drawing.Size(214, 34) + Me.ucrChkDisplayMargins.TabIndex = 18 + ' + 'ucrChkSwapXYVar + ' + Me.ucrChkSwapXYVar.AutoSize = True + Me.ucrChkSwapXYVar.Checked = False + Me.ucrChkSwapXYVar.Location = New System.Drawing.Point(450, 309) + Me.ucrChkSwapXYVar.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkSwapXYVar.Name = "ucrChkSwapXYVar" + Me.ucrChkSwapXYVar.Size = New System.Drawing.Size(236, 34) + Me.ucrChkSwapXYVar.TabIndex = 36 + ' + 'ucrChkCorrelations + ' + Me.ucrChkCorrelations.AutoSize = True + Me.ucrChkCorrelations.Checked = False + Me.ucrChkCorrelations.Location = New System.Drawing.Point(450, 344) + Me.ucrChkCorrelations.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkCorrelations.Name = "ucrChkCorrelations" + Me.ucrChkCorrelations.Size = New System.Drawing.Size(223, 34) + Me.ucrChkCorrelations.TabIndex = 35 + ' + 'ucrChkLevSig + ' + Me.ucrChkLevSig.AutoSize = True + Me.ucrChkLevSig.Checked = False + Me.ucrChkLevSig.Location = New System.Drawing.Point(595, 278) + Me.ucrChkLevSig.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkLevSig.Name = "ucrChkLevSig" + Me.ucrChkLevSig.Size = New System.Drawing.Size(129, 34) + Me.ucrChkLevSig.TabIndex = 38 + ' + 'ucrChkOmitMissing + ' + Me.ucrChkOmitMissing.AutoSize = True + Me.ucrChkOmitMissing.Checked = False + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(450, 383) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(214, 34) + Me.ucrChkOmitMissing.TabIndex = 0 + ' 'dlgDescribeTwoVariable ' Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ClientSize = New System.Drawing.Size(723, 748) + Me.Controls.Add(Me.ucrReceiverPercentages) + Me.Controls.Add(Me.rdoORow) + Me.Controls.Add(Me.rdoOCell) + Me.Controls.Add(Me.rdoOCol) + Me.Controls.Add(Me.ucrpnlPercent) + Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) + Me.Controls.Add(Me.ucrReceiverSecondTwoVariableFactor) Me.Controls.Add(Me.ucrReceiverFirstVars) Me.Controls.Add(Me.ucrSaveTable) Me.Controls.Add(Me.grpDisplay) @@ -579,13 +666,9 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrReorderSummary) Me.Controls.Add(Me.lblMarginName) - Me.Controls.Add(Me.cmdMissingOptions) - Me.Controls.Add(Me.ucrChkDisplayMargins) Me.Controls.Add(Me.cmdFormatTable) Me.Controls.Add(Me.ucrBase) - Me.Controls.Add(Me.ucrReceiverThreeVariableThirdVariable) Me.Controls.Add(Me.ucrReceiverSecondSkimrGroupByFactor) - Me.Controls.Add(Me.ucrReceiverSecondTwoVariableFactor) Me.Controls.Add(Me.ucrSelectorDescribeTwoVar) Me.Controls.Add(Me.lblFirstVariable) Me.Controls.Add(Me.grpSummaries) @@ -593,17 +676,23 @@ Partial Class dlgDescribeTwoVariable Me.Controls.Add(Me.rdoTwoVariable) Me.Controls.Add(Me.rdoSkim) Me.Controls.Add(Me.ucrPnlDescribe) - Me.Controls.Add(Me.ucrReceiverThreeVariableSecondFactor) Me.Controls.Add(Me.ucrReceiverSkimrGroupByFactor) Me.Controls.Add(Me.lblThirdVariable) Me.Controls.Add(Me.lblSecondGroupByFactor) Me.Controls.Add(Me.lbSecondVariable) Me.Controls.Add(Me.lblFirstGroupByFactor) Me.Controls.Add(Me.lblThreeVariableSecondFactor) - Me.Controls.Add(Me.ucrChkOmitMissing) Me.Controls.Add(Me.ucrChkSummariesRowCol) + Me.Controls.Add(Me.ucrChkMeans) + Me.Controls.Add(Me.ucrChkDisplayMargins) + Me.Controls.Add(Me.ucrChkSwapXYVar) + Me.Controls.Add(Me.ucrChkCorrelations) + Me.Controls.Add(Me.ucrChkLevSig) + Me.Controls.Add(Me.ucrChkOmitMissing) + Me.Controls.Add(Me.cmdMissingOptions) + Me.Controls.Add(Me.ucrReceiverThreeVariableThirdVariable) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgDescribeTwoVariable" @@ -652,11 +741,18 @@ Partial Class dlgDescribeTwoVariable Friend WithEvents lblMarginName As Label Friend WithEvents ucrChkDisplayMargins As ucrCheck Friend WithEvents grpDisplay As GroupBox - Friend WithEvents ucrChkPercentageProportion As ucrCheck - Friend WithEvents lblFactorAsPercentage As Label - Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle Friend WithEvents ucrChkDisplayAsPercentage As ucrCheck Friend WithEvents ucrSaveTable As ucrSave Friend WithEvents ucrReceiverFirstVars As ucrReceiverMultiple Friend WithEvents ucrChkSummariesRowCol As ucrCheck + Friend WithEvents ucrChkCorrelations As ucrCheck + Friend WithEvents ucrChkSwapXYVar As ucrCheck + Friend WithEvents ucrChkMeans As ucrCheck + Friend WithEvents ucrChkLevSig As ucrCheck + Friend WithEvents ucrReceiverPercentages As ucrReceiverSingle + Friend WithEvents rdoORow As RadioButton + Friend WithEvents rdoOCell As RadioButton + Friend WithEvents rdoOCol As RadioButton + Friend WithEvents ucrpnlPercent As UcrPanel + Friend WithEvents ucrReceiverColumns As ucrReceiverMultiple End Class diff --git a/instat/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb index de0e1c3e530..5d42d1e4ae1 100644 --- a/instat/dlgDescribeTwoVariable.vb +++ b/instat/dlgDescribeTwoVariable.vb @@ -26,14 +26,14 @@ Public Class dlgDescribeTwoVariable Private bReset As Boolean = True Private bRcodeSet As Boolean = True Private bResetSubdialog As Boolean = False - Public strFirstVariablesType, strSecondVariableType As String + Public strFirstVariablesType, strSecondVariableType, strThirdVariableType As String 'SUMMARY FUNCTIoNS - Private clsCombineFrequencyParametersFunction, clsCombineFunction, - clsDummyFunction, clsGroupByFunction, clsRAnovaFunction, - clsRCorrelationFunction, clsSkimrFunction, clsSummariesListFunction, - clsSummaryTableCombineFactorsFunction, clsSummaryTableFunction, - clsThreeVariableCombineFrequencyParametersFunction, clsPivotWiderFunction As New RFunction + Private clsCombineFrequencyParametersFunction, clsCombineFrequencyColParametersFunction, clsCombineFunction, clsCombineSwapAnova2Table, clsCombineAnova2Function, clsSummariseFunction, + clsDummyFunction, clsGroupByFunction, clsRAnovaFunction, clsCorrFunction, clsRAnovaTableFunction, + clsRCorrelationFunction, clsSkimrFunction, clsSummariesListFunction, clsCombineAnovaFunction, + clsSummaryTableCombineFactorsFunction, clsSummaryTableFunction, clsRAnovaSwapTable2Funtion, + clsThreeVariableCombineFrequencyParametersFunction, clsPivotWiderFunction, clsMappingFunction, clsMapping2Function, clsRAnovaTable2Function As New RFunction 'FORMAT TABLE FUNCTIONS Private clsFootnoteCellBodyFunction, clsFootnoteCellFunction, @@ -44,7 +44,11 @@ Public Class dlgDescribeTwoVariable clsTabStyleCellTextFunction, clsTabStyleCellTitleFunction, clsTabStyleFunction, clsTabStylePxFunction, clsgtExtrasThemesFuction As New RFunction - Private clsGroupByPipeOperator, clsSummaryOperator, clsTildOperator, clsMapOperator, clsPivotOperator As New ROperator + + Private clsGroupByPipeOperator, clsSummaryOperator, clsGroupByPipeOperator2, clsGroupByPipeOperator3, clsGroupByPipeOperator4, clsGroupByPipeOperatorData As New ROperator + + Private clsTildOperator, clsMapOperator, clsPivotOperator As New ROperator + Private clsgtFunction, clsMapSummaryFunction, clsMapGtFunction As New RFunction 'Frequency Parameters @@ -54,7 +58,7 @@ Public Class dlgDescribeTwoVariable 'Format Operators Private clsPipeOperator, clsTabFootnoteOperator, - clsJoiningPipeOperator, clsMutableOperator As New ROperator + clsJoiningPipeOperator, clsMutableOperator, clsAnovaSwapTable2Opeator, clsAnovaTable2Operator, clsYlist2Operator, clsYlistOperator As New ROperator Private iUcrBaseXLocation, iDialogueXsize As Integer Private Sub dlgDescribeTwoVariable_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -123,45 +127,73 @@ Public Class dlgDescribeTwoVariable ucrInputMarginName.SetLinkedDisplayControl(lblMarginName) - ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) - ucrChkDisplayAsPercentage.SetText("As Percentages") - ucrChkDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) - ucrChkDisplayAsPercentage.SetRDefault(Chr(34) & "none" & Chr(34)) - - ucrChkDisplayAsPercentage.AddToLinkedControls(ucrReceiverPercentages, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDisplayAsPercentage.AddToLinkedControls(ucrChkPercentageProportion, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrReceiverPercentages.SetParameter(New RParameter("perc_total_factors", 2)) ucrReceiverPercentages.SetParameterIsString() ucrReceiverPercentages.Selector = ucrSelectorDescribeTwoVar ucrReceiverPercentages.SetDataType("factor") - ucrReceiverPercentages.SetLinkedDisplayControl(lblFactorAsPercentage) - ucrChkPercentageProportion.SetParameter(New RParameter("perc_decimal", 3)) - ucrChkPercentageProportion.SetText("Display as Decimal") - ucrChkPercentageProportion.SetRDefault("FALSE") + ucrReceiverColumns.SetParameter(New RParameter("perc_total_factors", 3)) + ucrReceiverColumns.SetParameterIsString() + ucrReceiverColumns.Selector = ucrSelectorDescribeTwoVar + ucrReceiverColumns.SetDataType("factor") + + ucrChkDisplayAsPercentage.SetParameter(New RParameter("percentage_type", 1)) + ucrChkDisplayAsPercentage.SetText("As Percentages") + ucrChkDisplayAsPercentage.SetValuesCheckedAndUnchecked(Chr(34) & "factors" & Chr(34), Chr(34) & "none" & Chr(34)) + ucrChkDisplayAsPercentage.SetRDefault(Chr(34) & "none" & Chr(34)) + + ucrChkDisplayAsPercentage.AddToLinkedControls(ucrReceiverPercentages, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedUpdateFunction:=True) + ucrChkDisplayAsPercentage.AddToLinkedControls(ucrpnlPercent, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkSummariesRowCol.SetText("Summaries in Rows") ucrChkSummariesRowCol.AddParameterValuesCondition(True, "row_sum", "True") ucrChkSummariesRowCol.AddParameterValuesCondition(False, "row_sum", "False") + ucrChkCorrelations.SetText("Correlations") + ucrChkCorrelations.AddParameterValuesCondition(True, "corr", "True") + ucrChkCorrelations.AddParameterValuesCondition(False, "corr", "False") + + ucrChkMeans.SetText("Means") + ucrChkMeans.SetParameter(New RParameter("means", 5)) + ucrChkMeans.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkMeans.SetRDefault("FALSE") + + ucrChkLevSig.SetText("Sig.Level") + ucrChkLevSig.SetParameter(New RParameter("sign_level", 4)) + ucrChkLevSig.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkLevSig.SetRDefault("FALSE") + + ucrChkSwapXYVar.SetText("Swap First/Second Variables") + ucrChkSwapXYVar.AddParameterValuesCondition(True, "var", "True") + ucrChkSwapXYVar.AddParameterValuesCondition(False, "var", "False") + ucrPnlDescribe.AddRadioButton(rdoTwoVariable) ucrPnlDescribe.AddRadioButton(rdoSkim) ucrPnlDescribe.AddRadioButton(rdoThreeVariable) ucrPnlDescribe.AddParameterValuesCondition(rdoTwoVariable, "checked", "customize") ucrPnlDescribe.AddParameterValuesCondition(rdoSkim, "checked", "skim") ucrPnlDescribe.AddParameterValuesCondition(rdoThreeVariable, "checked", "three_variable") + rdoThreeVariable.Enabled = False + ucrpnlPercent.AddRadioButton(rdoOCol) + ucrpnlPercent.AddRadioButton(rdoORow) + ucrpnlPercent.AddRadioButton(rdoOCell) + ucrpnlPercent.AddParameterValuesCondition(rdoOCol, "percent", "col") + ucrpnlPercent.AddParameterValuesCondition(rdoORow, "percent", "row") + ucrpnlPercent.AddParameterValuesCondition(rdoOCell, "percent", "cell") + ucrPnlDescribe.AddToLinkedControls({ucrReceiverSkimrGroupByFactor, ucrReceiverSecondSkimrGroupByFactor}, {rdoSkim}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableThirdVariable}, {rdoThreeVariable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlDescribe.AddToLinkedControls({ucrReceiverSecondTwoVariableFactor, ucrChkSummariesRowCol}, {rdoTwoVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlDescribe.AddToLinkedControls({ucrReceiverThreeVariableSecondFactor}, {rdoThreeVariable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrpnlPercent.AddToLinkedControls({ucrReceiverPercentages}, {rdoORow}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrpnlPercent.AddToLinkedControls({ucrReceiverColumns}, {rdoOCol}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrReceiverThreeVariableSecondFactor.SetParameter(New RParameter("second_three_varible_factor", 0, bNewIncludeArgumentName:=False)) ucrReceiverThreeVariableSecondFactor.SetParameterIsString() ucrReceiverThreeVariableSecondFactor.Selector = ucrSelectorDescribeTwoVar - ucrReceiverThreeVariableSecondFactor.SetIncludedDataTypes({"factor"}) ucrReceiverThreeVariableSecondFactor.SetLinkedDisplayControl(lblThreeVariableSecondFactor) ucrSaveTable.SetDataFrameSelector(ucrSelectorDescribeTwoVar.ucrAvailableDataFrames) @@ -172,6 +204,7 @@ Public Class dlgDescribeTwoVariable Private Sub SetDefaults() clsCombineFrequencyParametersFunction = New RFunction + clsCombineFrequencyColParametersFunction = New RFunction clsCombineFunction = New RFunction clsDummyFunction = New RFunction clsFootnoteCellBodyFunction = New RFunction @@ -206,8 +239,28 @@ Public Class dlgDescribeTwoVariable clsSummaryOperator = New ROperator clsMapOperator = New ROperator clsPivotWiderFunction = New RFunction + clsCombineAnovaFunction = New RFunction + clsCombineAnova2Function = New RFunction + clsCombineSwapAnova2Table = New RFunction + clsSummariseFunction = New RFunction + clsCorrFunction = New RFunction + clsRAnovaTableFunction = New RFunction clsgtExtrasThemesFuction = New RFunction clsMutableOperator = New ROperator + + clsGroupByPipeOperator2 = New ROperator + clsGroupByPipeOperator3 = New ROperator + clsGroupByPipeOperator4 = New ROperator + clsGroupByPipeOperatorData = New ROperator + clsMappingFunction = New RFunction + clsMapping2Function = New RFunction + clsAnovaTable2Operator = New ROperator + clsAnovaSwapTable2Opeator = New ROperator + clsYlistOperator = New ROperator + clsYlist2Operator = New ROperator + clsRAnovaTable2Function = New RFunction + clsRAnovaSwapTable2Funtion = New RFunction + clsTildOperator = New ROperator clsMapSummaryFunction = New RFunction clsMapGtFunction = New RFunction @@ -220,6 +273,7 @@ Public Class dlgDescribeTwoVariable ucrSaveTable.Reset() clsCombineFrequencyParametersFunction.SetRCommand("c") + clsCombineFrequencyColParametersFunction.SetRCommand("c") clsCombineFunction.SetRCommand("c") @@ -227,6 +281,9 @@ Public Class dlgDescribeTwoVariable clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) clsDummyFunction.AddParameter("theme", "select", iPosition:=2) clsDummyFunction.AddParameter("row_sum", "False", iPosition:=3) + clsDummyFunction.AddParameter("corr", "False", iPosition:=4) + clsDummyFunction.AddParameter("var", "False", iPosition:=5) + clsDummyFunction.AddParameter("percent", "col", iPosition:=6) clsPivotWiderFunction.SetRCommand("pivot_wider") clsPivotWiderFunction.AddParameter("values_from", "value", iPosition:=2) @@ -245,8 +302,47 @@ Public Class dlgDescribeTwoVariable clsgtExtrasThemesFuction.SetPackageName("gtExtras") - clsGroupByFunction.SetPackageName("dplyr") - clsGroupByFunction.SetRCommand("group_by") + clsCombineAnova2Function.SetRCommand("c") + + clsCombineSwapAnova2Table.SetRCommand("c") + + clsMappingFunction.SetPackageName("purrr") + clsMappingFunction.SetRCommand("map") + clsMappingFunction.AddParameter(".x", clsROperatorParameter:=clsYlistOperator, iPosition:=0) + clsMappingFunction.AddParameter(".f", clsROperatorParameter:=clsAnovaTable2Operator, iPosition:=1) + + clsMapping2Function.SetPackageName("purrr") + clsMapping2Function.SetRCommand("map") + clsMapping2Function.AddParameter(".x", clsROperatorParameter:=clsYlist2Operator, iPosition:=0) + clsMapping2Function.AddParameter(".f", clsROperatorParameter:=clsAnovaSwapTable2Opeator, iPosition:=1) + + clsAnovaTable2Operator.SetOperation("~") + clsAnovaTable2Operator.AddParameter("right", clsRFunctionParameter:=clsRAnovaTable2Function, iPosition:=1) + clsAnovaTable2Operator.bForceIncludeOperation = True + + clsAnovaSwapTable2Opeator.SetOperation("~") + clsAnovaSwapTable2Opeator.AddParameter("right", clsRFunctionParameter:=clsRAnovaSwapTable2Funtion, iPosition:=1) + clsAnovaSwapTable2Opeator.bForceIncludeOperation = True + + clsYlistOperator.SetOperation("", bBracketsTemp:=False) + clsYlistOperator.SetAssignTo("y_col_names_list") + + clsYlist2Operator.SetOperation("", bBracketsTemp:=False) + clsYlist2Operator.SetAssignTo("y_col_names_list") + + clsRAnovaTable2Function.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables2") + clsRAnovaTable2Function.AddParameter("data", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsRAnovaTable2Function.AddParameter(" x_col_names", clsRFunctionParameter:=clsCombineAnova2Function, iPosition:=1) + clsRAnovaTable2Function.AddParameter("y_col_name", ".x", iPosition:=2) + clsRAnovaTable2Function.AddParameter("signif.stars", "FALSE", iPosition:=3) + clsRAnovaTable2Function.AddParameter("sign_level", "FALSE", iPosition:=4) + + clsRAnovaSwapTable2Funtion.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables2") + clsRAnovaSwapTable2Funtion.AddParameter("data", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsRAnovaSwapTable2Funtion.AddParameter(" y_col_name", clsRFunctionParameter:=clsCombineSwapAnova2Table, iPosition:=1) + clsRAnovaSwapTable2Funtion.AddParameter("x_col_names", ".x", iPosition:=2) + clsRAnovaSwapTable2Funtion.AddParameter("signif.stars", "FALSE", iPosition:=3) + clsRAnovaSwapTable2Funtion.AddParameter("sign_level", "FALSE", iPosition:=4) clsGroupByPipeOperator.SetOperation("%>%") clsGroupByPipeOperator.AddParameter("skim", clsRFunctionParameter:=clsSkimrFunction, @@ -257,11 +353,40 @@ Public Class dlgDescribeTwoVariable clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") + clsGroupByPipeOperator2.SetOperation("%>%") + clsGroupByPipeOperator2.AddParameter("left", clsROperatorParameter:=clsGroupByPipeOperatorData, iPosition:=0) + clsGroupByPipeOperator2.AddParameter("right", clsRFunctionParameter:=clsGroupByFunction, iPosition:=1) + + clsGroupByPipeOperator3.SetOperation("%>%") + clsGroupByPipeOperator3.AddParameter("left", clsROperatorParameter:=clsGroupByPipeOperator2, iPosition:=0) + clsGroupByPipeOperator3.AddParameter("right", clsRFunctionParameter:=clsSummariseFunction, iPosition:=1) + + clsGroupByPipeOperator4.SetOperation("%>%") + clsGroupByPipeOperator4.AddParameter("left", clsROperatorParameter:=clsGroupByPipeOperator3, iPosition:=0) + clsGroupByPipeOperator4.AddParameter("right", clsRFunctionParameter:=clsgtFunction, iPosition:=1) + + clsGroupByPipeOperatorData.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + + clsSummariseFunction.SetRCommand("summarise") + clsSummariseFunction.AddParameter("cor", clsRFunctionParameter:=clsCorrFunction, bIncludeArgumentName:=False, iPosition:=0) + + clsCorrFunction.SetRCommand("cor") + clsSkimrFunction.SetPackageName("skimr") clsSkimrFunction.SetRCommand("skim_without_charts") + clsRAnovaTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$anova_tables") + clsRAnovaTableFunction.AddParameter("data", Chr(34) & ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsRAnovaTableFunction.AddParameter("x_col_names", clsRFunctionParameter:=clsCombineAnovaFunction, iPosition:=1) + clsRAnovaTableFunction.AddParameter("y_col_name", clsRFunctionParameter:=clsCombineFunction, iPosition:=2) + clsRAnovaTableFunction.AddParameter("signif.stars", "FALSE", iPosition:=3) + clsRAnovaTableFunction.AddParameter("sign_level", "FALSE", iPosition:=4) + clsRAnovaTableFunction.AddParameter("means", "FALSE", iPosition:=5) + clsCombineFunction.SetRCommand("c") + clsCombineAnovaFunction.SetRCommand("c") + clsPipeOperator.SetOperation("%>%") clsPipeOperator.bBrackets = False @@ -281,14 +406,13 @@ Public Class dlgDescribeTwoVariable clsStyleListFunction.SetRCommand("list") clsSummariesListFunction.SetRCommand("c") - clsSummariesListFunction.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), + clsSummariesListFunction.AddParameter("summary_mean", Chr(34) & "summary_mean" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) clsSummaryTableCombineFactorsFunction.SetRCommand("c") clsSummaryTableFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$summary_table") clsSummaryTableFunction.AddParameter("treat_columns_as_factor", "FALSE", iPosition:=3) - 'clsSummaryTableFunction.SetAssignTo("summary_table") clsTildOperator.SetOperation("~") clsTildOperator.AddParameter("right", clsRFunctionParameter:=clsSummaryTableFunction) @@ -310,7 +434,6 @@ Public Class dlgDescribeTwoVariable clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) clsSummaryOperator.AddParameter("tableFun", clsRFunctionParameter:=clsMapSummaryFunction, iPosition:=1) - 'clsSummaryOperator.AddParameter("gttbl", clsRFunctionParameter:=clsgtFunction, iPosition:=1) clsPivotOperator.SetOperation("%>%") clsPivotOperator.AddParameter("left", clsRFunctionParameter:=clsPivotWiderFunction) @@ -319,8 +442,6 @@ Public Class dlgDescribeTwoVariable clsMapOperator.SetOperation("%>%") clsMapOperator.AddParameter("left", clsROperatorParameter:=clsTildOperator) - 'clsMapOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDescribeTwoVar.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - 'clsMapOperator.AddParameter("tableFun", clsRFunctionParameter:=clsMapSummaryFunction, iPosition:=1) clsMapOperator.AddParameter("right", clsROperatorParameter:=clsPivotOperator) clsMapOperator.bBrackets = False @@ -372,16 +493,16 @@ Public Class dlgDescribeTwoVariable Private Sub SetRCodeForControls(bReset As Boolean) bRcodeSet = False - ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=1) - ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=2) - - ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRAnovaFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=1) - ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=2) - ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsSkimrFunction, New RParameter("col_names", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=3) - ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsMapSummaryFunction, New RParameter(".x", 1), iAdditionalPairNo:=4) - - ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsRAnovaFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) - ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=2) + ucrReceiverSecondTwoVariableFactor.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("y_col_name", 2), iAdditionalPairNo:=1) + ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsRCorrelationFunction, New RParameter("x_col_names", 1), iAdditionalPairNo:=1) + ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsSkimrFunction, New RParameter("col_names", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverFirstVars.AddAdditionalCodeParameterPair(clsMapSummaryFunction, New RParameter(".x", 1), iAdditionalPairNo:=3) + ucrChkMeans.AddAdditionalCodeParameterPair(clsRAnovaSwapTable2Funtion, New RParameter("means", iNewPosition:=5), iAdditionalPairNo:=1) + ucrChkLevSig.AddAdditionalCodeParameterPair(clsRAnovaSwapTable2Funtion, New RParameter("sign_level", iNewPosition:=4), iAdditionalPairNo:=1) + ucrChkDisplayMargins.AddAdditionalCodeParameterPair(clsCombineFrequencyColParametersFunction, New RParameter("include_margins", iNewPosition:=5), iAdditionalPairNo:=1) + ucrChkDisplayAsPercentage.AddAdditionalCodeParameterPair(clsCombineFrequencyColParametersFunction, New RParameter("percentage_type", iNewPosition:=1), iAdditionalPairNo:=1) + + ucrSelectorDescribeTwoVar.AddAdditionalCodeParameterPair(clsSummaryTableFunction, ucrSelectorDescribeTwoVar.GetParameter(), iAdditionalPairNo:=1) ucrSaveTable.AddAdditionalRCode(clsJoiningPipeOperator, iAdditionalPairNo:=1) ucrChkOmitMissing.SetRCode(clsSummaryTableFunction, bReset) @@ -392,9 +513,14 @@ Public Class dlgDescribeTwoVariable ucrReceiverSecondSkimrGroupByFactor.SetRCode(clsGroupByFunction, bReset) ucrChkDisplayAsPercentage.SetRCode(clsCombineFrequencyParametersFunction, bReset) ucrReceiverPercentages.SetRCode(clsCombineFrequencyParametersFunction, bReset) - ucrChkPercentageProportion.SetRCode(clsCombineFrequencyParametersFunction, bReset) + ucrReceiverColumns.SetRCode(clsCombineFrequencyColParametersFunction, bReset) ucrPnlDescribe.SetRCode(clsDummyFunction, bReset) + ucrpnlPercent.SetRCode(clsDummyFunction, bReset) ucrChkSummariesRowCol.SetRCode(clsDummyFunction, bReset) + ucrChkCorrelations.SetRCode(clsDummyFunction, bReset) + ucrChkSwapXYVar.SetRCode(clsDummyFunction, bReset) + ucrChkMeans.SetRCode(clsRAnovaTable2Function, bReset) + ucrChkLevSig.SetRCode(clsRAnovaTable2Function, bReset) ucrReceiverThreeVariableSecondFactor.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrReceiverThreeVariableThirdVariable.SetRCode(clsSummaryTableCombineFactorsFunction, bReset) ucrChkDisplayMargins.SetRCode(clsCombineFrequencyParametersFunction, bReset) @@ -412,7 +538,8 @@ Public Class dlgDescribeTwoVariable OrElse (Not ucrReceiverThreeVariableSecondFactor.IsEmpty _ AndAlso Not ucrReceiverThreeVariableThirdVariable.IsEmpty) _ AndAlso (IsFactorByFactor() OrElse IsNumericByFactor() _ - OrElse IsFactorByNumeric() OrElse IsNumericByNumeric())) AndAlso ucrSaveTable.IsComplete) + OrElse IsFactorByNumeric() OrElse IsNumericByNumericByFactor() OrElse IsNumericByFactorByFactor() OrElse IsNumericByNumericByNumeric() _ + OrElse IsFactorByNumericByNumeric() OrElse IsNumericByFactorByNumeric() OrElse IsFactorByFactorByFactor() OrElse IsNumericByNumeric())) AndAlso ucrSaveTable.IsComplete) End Sub Private Function IsFactorByFactor() As Boolean @@ -431,6 +558,30 @@ Public Class dlgDescribeTwoVariable Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "numeric" End Function + Private Function IsNumericByNumericByFactor() As Boolean + Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "numeric" AndAlso strThirdVariableType = "categorical" + End Function + + Private Function IsNumericByFactorByFactor() As Boolean + Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" AndAlso strThirdVariableType = "categorical" + End Function + + Private Function IsFactorByFactorByFactor() As Boolean + Return strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "categorical" AndAlso strThirdVariableType = "categorical" + End Function + + Private Function IsNumericByFactorByNumeric() As Boolean + Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "categorical" AndAlso strThirdVariableType = "numeric" + End Function + + Private Function IsNumericByNumericByNumeric() As Boolean + Return strFirstVariablesType = "numeric" AndAlso strSecondVariableType = "numeric" AndAlso strThirdVariableType = "numeric" + End Function + + Private Function IsFactorByNumericByNumeric() As Boolean + Return strFirstVariablesType = "categorical" AndAlso strSecondVariableType = "numeric" AndAlso strThirdVariableType = "numeric" + End Function + Private Sub ucrBaseDescribeTwoVar_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() SetRCodeForControls(True) @@ -439,11 +590,7 @@ Public Class dlgDescribeTwoVariable Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click If rdoTwoVariable.Checked Then - If IsNumericByFactor() Then - sdgSummaries.SetRFunction(clsSummariesListFunction, clsSummaryTableFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) - End If - ElseIf rdoThreeVariable.Checked Then - If IsFactorByNumeric() OrElse IsNumericByFactor() Then + If IsFactorByNumeric() Then sdgSummaries.SetRFunction(clsSummariesListFunction, clsSummaryTableFunction, clsCombineFunction, ucrSelectorDescribeTwoVar, bResetSubdialog) End If End If @@ -462,34 +609,57 @@ Public Class dlgDescribeTwoVariable Private Sub ManageControlsVisibility() grpSummaries.Visible = rdoThreeVariable.Checked OrElse rdoTwoVariable.Checked - ucrReorderSummary.Visible = IsNumericByFactor() - cmdSummaries.Visible = IsNumericByFactor() ucrChkDisplayMargins.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked AndAlso IsFactorByFactor() grpDisplay.Visible = rdoTwoVariable.Checked AndAlso IsFactorByFactor() - ucrChkSummariesRowCol.Visible = False + ucrReceiverPercentages.Visible = ucrChkDisplayAsPercentage.Checked AndAlso rdoORow.Checked AndAlso IsFactorByFactor() + ucrpnlPercent.Visible = ucrChkDisplayAsPercentage.Checked AndAlso IsFactorByFactor() + ucrReceiverColumns.Visible = ucrChkDisplayAsPercentage.Checked AndAlso IsFactorByFactor() AndAlso rdoOCol.Checked + ucrChkCorrelations.Visible = False + ucrChkSwapXYVar.Visible = False + ucrChkOmitMissing.Visible = False + cmdMissingOptions.Visible = False + If rdoTwoVariable.Checked Then - ucrChkOmitMissing.Visible = strFirstVariablesType = "numeric" - ucrChkSummariesRowCol.Visible = IsNumericByFactor() + ucrChkOmitMissing.Visible = IsNumericByNumeric() OrElse IsNumericByFactor() + ucrChkSwapXYVar.Visible = IsNumericByNumeric() OrElse IsFactorByNumeric() + ucrChkCorrelations.Visible = IsNumericByNumeric() + cmdMissingOptions.Visible = ucrChkOmitMissing.Checked + ElseIf rdoThreeVariable.Checked Then ucrChkOmitMissing.Visible = IsFactorByNumeric() OrElse IsNumericByFactor() Else ucrChkOmitMissing.Visible = False + cmdMissingOptions.Visible = False + End If + If rdoThreeVariable.Checked Then + If IsNumericByFactorByFactor() OrElse IsNumericByFactorByNumeric() Then + ucrReorderSummary.Visible = False + cmdSummaries.Visible = False + End If + ucrChkDisplayMargins.Visible = IsFactorByFactorByFactor() + ucrInputMarginName.Visible = ucrChkDisplayMargins.Checked AndAlso IsFactorByFactorByFactor() End If - cmdMissingOptions.Visible = ucrChkOmitMissing.Checked End Sub Private Sub ChangeBaseRCode() ucrSaveTable.Visible = False + ucrReorderSummary.Visible = False + cmdSummaries.Visible = False + ucrChkSummariesRowCol.Visible = False + cmdFormatTable.Visible = False + ucrChkMeans.Visible = False + ucrChkLevSig.Visible = False + cmdMissingOptions.Visible = False If rdoSkim.Checked Then clsDummyFunction.AddParameter("checked", "skim", iPosition:=0) - + cmdFormatTable.Visible = False ucrSaveTable.Visible = True ucrSaveTable.Location = New Point(23, 286) ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Text) ucrSaveTable.SetAssignToIfUncheckedValue("last_summary") - ucrSaveTable.SetCheckBoxText("Save Summary") + ucrSaveTable.SetCheckBoxText("Store Summary") ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator) clsGroupByPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, @@ -500,12 +670,30 @@ Public Class dlgDescribeTwoVariable ElseIf rdoTwoVariable.Checked Then clsDummyFunction.AddParameter("checked", "customize", iPosition:=0) If IsNumericByNumeric() Then - ucrBase.clsRsyntax.SetBaseRFunction(clsRCorrelationFunction) - ucrSaveTable.Visible = False - ElseIf IsFactorByNumeric() Then - ucrBase.clsRsyntax.SetBaseRFunction(clsRAnovaFunction) + If ucrChkSwapXYVar.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsMapping2Function) + clsDummyFunction.AddParameter("var", "True", iPosition:=5) + + Else + ucrBase.clsRsyntax.SetBaseRFunction(clsMappingFunction) + clsDummyFunction.AddParameter("var", "False", iPosition:=5) + End If + If ucrChkCorrelations.Checked Then + ucrBase.clsRsyntax.AddToAfterCodes(clsRCorrelationFunction, iPosition:=0) + clsDummyFunction.AddParameter("corr", "True", iPosition:=4) + clsRCorrelationFunction.iCallType = 2 + Else + clsDummyFunction.AddParameter("corr", "False", iPosition:=4) + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRCorrelationFunction) + End If ucrSaveTable.Visible = False + cmdFormatTable.Visible = False + ucrChkMeans.Visible = True + ucrChkLevSig.Visible = True ElseIf IsNumericByFactor() Then + ucrBase.clsRsyntax.SetBaseRFunction(clsMappingFunction) + ucrChkMeans.Visible = True + ucrChkLevSig.Visible = True ucrSaveTable.Visible = True ucrSaveTable.Location = New Point(23, 450) clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) @@ -513,7 +701,7 @@ Public Class dlgDescribeTwoVariable ucrSaveTable.SetPrefix("summary_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") - ucrSaveTable.SetCheckBoxText("Save Table") + ucrSaveTable.SetCheckBoxText("Store Table") clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, @@ -521,27 +709,99 @@ Public Class dlgDescribeTwoVariable strObjectName:="last_table") ElseIf IsFactorByFactor() Then ucrSaveTable.Visible = True - ucrSaveTable.Location = New Point(23, 350) + cmdFormatTable.Visible = True + ucrChkMeans.Visible = False + ucrChkLevSig.Visible = False + ucrSaveTable.Location = New Point(23, 351) clsDummyFunction.AddParameter("factor_cols", "FactorVar", iPosition:=1) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetPrefix("frequency_table") ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetAssignToIfUncheckedValue("last_table") - ucrSaveTable.SetCheckBoxText("Save Table") + ucrSaveTable.SetCheckBoxText("Store Table") clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, strRObjectFormatToAssignTo:=RObjectFormat.Html, strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, strObjectName:="last_table") + ElseIf IsFactorByNumeric() Then + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRCorrelationFunction) + If ucrChkSwapXYVar.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsMapping2Function) + clsDummyFunction.AddParameter("var", "True", iPosition:=5) + ucrReorderSummary.Visible = False + cmdSummaries.Visible = False + ucrChkSummariesRowCol.Visible = False + cmdFormatTable.Visible = False + ucrChkMeans.Visible = True + ucrChkLevSig.Visible = True + Else + clsDummyFunction.AddParameter("var", "False", iPosition:=5) + ucrSaveTable.Visible = True + ucrReorderSummary.Visible = True + cmdSummaries.Visible = True + ucrChkSummariesRowCol.Visible = True + cmdFormatTable.Visible = True + ucrChkMeans.Visible = False + ucrChkLevSig.Visible = False + ucrSaveTable.Location = New Point(23, 450) + clsDummyFunction.AddParameter("factor_cols", "Sum", iPosition:=1) + ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + ucrSaveTable.SetPrefix("summary_table") + ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) + ucrSaveTable.SetAssignToIfUncheckedValue("last_table") + ucrSaveTable.SetCheckBoxText("Save Table") + clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_table") + End If + End If ElseIf rdoThreeVariable.Checked Then clsDummyFunction.AddParameter("checked", "three_variable", iPosition:=0) ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetCheckBoxText("Save Table") + If IsFactorByFactorByFactor() Then + cmdFormatTable.Visible = True + + ucrBase.clsRsyntax.SetBaseROperator(clsJoiningPipeOperator) + clsJoiningPipeOperator.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_table") + End If + If IsFactorByNumericByNumeric() Then + cmdFormatTable.Visible = False + ucrBase.clsRsyntax.SetBaseROperator(clsGroupByPipeOperator4) + clsGroupByPipeOperator4.SetAssignToOutputObject(strRObjectToAssignTo:="last_table", + strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Table, + strRObjectFormatToAssignTo:=RObjectFormat.Html, + strRDataFrameNameToAddObjectTo:=ucrSelectorDescribeTwoVar.strCurrentDataFrame, + strObjectName:="last_table") + End If + If IsNumericByNumericByFactor() Then + ucrBase.clsRsyntax.SetBaseRFunction(clsMappingFunction) + cmdFormatTable.Visible = False + End If + If IsNumericByNumericByNumeric() Then + cmdFormatTable.Visible = False + ucrBase.clsRsyntax.SetBaseRFunction(clsMappingFunction) + End If + If IsNumericByFactorByFactor() Then + cmdFormatTable.Visible = False + ucrBase.clsRsyntax.SetBaseRFunction(clsMappingFunction) + End If + If IsNumericByFactorByNumeric() Then + cmdFormatTable.Visible = False + ucrBase.clsRsyntax.SetBaseRFunction(clsMappingFunction) + End If + ucrSaveTable.SetCheckBoxText("Store Table") End If FactorColumns() - End Sub Private Sub UpdateCombineFactorParameterFunction() @@ -567,8 +827,8 @@ Public Class dlgDescribeTwoVariable TestOKEnabled() End Sub - Private Sub ucrChkOmitMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMissing.ControlValueChanged - If ucrChkOmitMissing.Checked Then + Private Sub ucrChkOmitMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMissing.ControlValueChanged, ucrChkCorrelations.ControlValueChanged + If ucrChkOmitMissing.Checked AndAlso ucrChkCorrelations.Checked Then clsRCorrelationFunction.AddParameter("use", Chr(34) & "pairwise.complete.obs" & Chr(34), iPosition:=2) Else clsRCorrelationFunction.RemoveParameterByName("use") @@ -583,6 +843,8 @@ Public Class dlgDescribeTwoVariable Else clsSummaryTableFunction.AddParameter("na_type", clsRFunctionParameter:=clsCombineFunction, iPosition:=9) End If + cmdMissingOptions.Visible = ucrChkOmitMissing.Checked + End Sub Private Sub ucrPnlDescribe_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDescribe.ControlValueChanged @@ -594,8 +856,8 @@ Public Class dlgDescribeTwoVariable ElseIf rdoThreeVariable.Checked Then ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) lblThreeVariableCategorical.Visible = True - lblThreeVariableCategorical.Location = New Point(106, 18) - lblSecondType.Location = New Point(12, 33) + lblThreeVariableCategorical.Location = New Point(38, 33) + lblSecondType.Location = New Point(106, 18) lblSecondBy.Visible = True Else ucrReceiverFirstVars.SetSingleTypeStatus(True, bIsCategoricalNumeric:=True) @@ -607,35 +869,52 @@ Public Class dlgDescribeTwoVariable ChangeFirstTypeLabel() AssignSecondVariableType() + AssignThirdVariableType() ChangeBaseRCode() ManageControlsVisibility() UpdateSummaryTableFunction() UpdateCombineFactorParameterFunction() ChangeLocations() AddRemoveNAParameter() - HideFormatTableButton() FactorColumns() - End Sub - - Private Sub HideFormatTableButton() - cmdFormatTable.Visible = IsNumericByFactor() _ - OrElse IsFactorByFactor() OrElse (IsFactorByNumeric() _ - AndAlso rdoThreeVariable.Checked) + AddRemoveFirstCorrParam() + AddRemoveSecondCorrParam() + AddRemoveThirdCorrParam() + AddRemoveSecondAnovaParam() + AddRemoveThirdAnovaParam() + AddRemoveFirstAnova2Param() End Sub Private Sub ChangeLocations() - If IsNumericByFactor() _ - OrElse (IsFactorByNumeric() AndAlso rdoThreeVariable.Checked) Then - ucrBase.Location = New Point(iUcrBaseXLocation, 487) - Me.Size = New Point(iDialogueXsize, 580) - cmdFormatTable.Location = New Point(326, 423) - ElseIf IsFactorByNumeric() Then - ucrBase.Location = New Point(iUcrBaseXLocation, 319) - Me.Size = New Point(iDialogueXsize, 415) - ElseIf IsFactorByFactor() Then - ucrBase.Location = New Point(iUcrBaseXLocation, 370) - Me.Size = New Point(iDialogueXsize, 465) - cmdFormatTable.Location = New Point(326, 325) + If rdoTwoVariable.Checked Then + If IsFactorByNumeric() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 487) + Me.Size = New Point(iDialogueXsize, 580) + cmdFormatTable.Location = New Point(326, 423) + ElseIf IsNumericByFactor() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 319) + Me.Size = New Point(iDialogueXsize, 415) + ElseIf IsFactorByFactor() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 372) + Me.Size = New Point(iDialogueXsize, 465) + cmdFormatTable.Location = New Point(326, 330) + Else + ucrBase.Location = New Point(iUcrBaseXLocation, 328) + Me.Size = New Point(iDialogueXsize, 425) + End If + ElseIf rdoThreeVariable.Checked Then + If IsNumericByNumericByFactor() OrElse IsNumericByNumericByNumeric() OrElse IsNumericByFactorByFactor() OrElse IsNumericByFactorByNumeric() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 328) + Me.Size = New Point(iDialogueXsize, 425) + ElseIf IsFactorByFactorByFactor() Then + ucrBase.Location = New Point(iUcrBaseXLocation, 370) + Me.Size = New Point(iDialogueXsize, 465) + cmdFormatTable.Visible = True + cmdFormatTable.Location = New Point(326, 350) + Else + ucrBase.Location = New Point(iUcrBaseXLocation, 385) + Me.Size = New Point(iDialogueXsize, 480) + End If Else ucrBase.Location = New Point(iUcrBaseXLocation, 328) Me.Size = New Point(iDialogueXsize, 425) @@ -650,12 +929,54 @@ Public Class dlgDescribeTwoVariable End If End Sub + Private Sub AddRemoveFirstCorrParam() + If rdoThreeVariable.Checked Then + If IsFactorByNumericByNumeric() Then + If ucrReceiverFirstVars.IsEmpty Then + clsGroupByFunction.RemoveParameterByName("var") + Else + clsGroupByFunction.AddParameter("var", ucrReceiverFirstVars.GetVariableNames(False), iPosition:=1, bIncludeArgumentName:=False) + End If + End If + End If + End Sub + + Private Sub AddRemoveSecondCorrParam() + If rdoThreeVariable.Checked Then + If IsFactorByNumericByNumeric() Then + If ucrReceiverThreeVariableSecondFactor.IsEmpty Then + clsCorrFunction.RemoveParameterByName("x") + Else + clsCorrFunction.AddParameter("x", ucrReceiverThreeVariableSecondFactor.GetVariableNames(False), iPosition:=1, bIncludeArgumentName:=False) + End If + End If + End If + End Sub + + Private Sub AddRemoveThirdCorrParam() + If rdoThreeVariable.Checked Then + If IsFactorByNumericByNumeric() Then + If ucrReceiverThreeVariableThirdVariable.IsEmpty Then + clsCorrFunction.RemoveParameterByName("y") + Else + clsCorrFunction.AddParameter("y", ucrReceiverThreeVariableThirdVariable.GetVariableNames(False), iPosition:=2, bIncludeArgumentName:=False) + End If + End If + End If + End Sub + Private Sub FactorColumns() If rdoTwoVariable.Checked Then If IsFactorByFactor() Then clsSummaryTableFunction.AddParameter("factors", "c(" & ucrReceiverSecondTwoVariableFactor.GetVariableNames & "," & ".x" & ")") clsSummaryTableFunction.AddParameter("columns_to_summarise", ".x") clsPivotWiderFunction.AddParameter("names_from", "{{ .x }}", iPosition:=1) + ElseIf IsFactorByNumeric() Then + clsSummaryTableFunction.AddParameter("factors", ".x") + clsPivotWiderFunction.AddParameter("names_from", "{{ .x }}", iPosition:=1) + clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverSecondTwoVariableFactor.GetVariableNames) + clsMapSummaryFunction.AddParameter(".x", ucrReceiverFirstVars.GetVariableNames, iPosition:=3) + SummariesInRowsOrCols() Else clsSummaryTableFunction.AddParameter("factors", ucrReceiverSecondTwoVariableFactor.GetVariableNames) clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=1) @@ -663,6 +984,131 @@ Public Class dlgDescribeTwoVariable SummariesInRowsOrCols() End If End If + If rdoThreeVariable.Checked Then + clsSummaryOperator.AddParameter("col_factor", clsRFunctionParameter:=clsPivotWiderFunction, iPosition:=1) + If IsFactorByFactorByFactor() Then + clsSummaryTableFunction.AddParameter("factors", "c(" & Chr(34) & ucrReceiverFirstVars.lstSelectedVariables.Items(0).Text & Chr(34) & "," & ucrReceiverThreeVariableSecondFactor.GetVariableNames & "," & ucrReceiverThreeVariableThirdVariable.GetVariableNames & ")") + clsSummaryTableFunction.AddParameter("columns_to_summarise", Chr(34) & ucrReceiverFirstVars.lstSelectedVariables.Items(0).Text & Chr(34)) + clsPivotWiderFunction.AddParameter("names_from", ucrReceiverFirstVars.lstSelectedVariables.Items(0).Text, iPosition:=0) + Else + clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=0) + clsSummaryTableFunction.AddParameter("columns_to_summarise", ucrReceiverFirstVars.GetVariableNames) + SummariesInRowsOrCols() + End If + End If + End Sub + + Private Sub AddRemoveFirstAnova2Param() + If rdoThreeVariable.Checked Then + If IsNumericByNumericByFactor() OrElse IsNumericByNumericByNumeric() OrElse IsNumericByFactorByFactor() OrElse IsNumericByFactorByNumeric() Then + If ucrReceiverFirstVars.IsEmpty Then + clsYlistOperator.RemoveParameterByName("cols") + Else + clsYlistOperator.AddParameter("cols", ucrReceiverFirstVars.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + End If + End If + ElseIf rdoTwoVariable.Checked Then + If IsNumericByNumeric() Then + If Not ucrReceiverFirstVars.IsEmpty Then + If ucrChkSwapXYVar.Checked Then + clsYlist2Operator.AddParameter("cols", ucrReceiverFirstVars.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + clsYlistOperator.RemoveParameterByName("cols") + + Else + clsYlistOperator.AddParameter("cols", ucrReceiverFirstVars.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + clsYlist2Operator.RemoveParameterByName("cols") + + End If + Else + clsYlist2Operator.RemoveParameterByName("cols") + clsYlistOperator.RemoveParameterByName("cols") + + End If + ElseIf IsNumericByFactor() Then + If ucrReceiverFirstVars.IsEmpty Then + clsYlistOperator.RemoveParameterByName("cols") + Else + clsYlistOperator.AddParameter("cols", ucrReceiverFirstVars.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + End If + ElseIf IsFactorByNumeric() Then + If Not ucrReceiverFirstVars.IsEmpty Then + If ucrChkSwapXYVar.Checked Then + clsYlist2Operator.AddParameter("cols", ucrReceiverFirstVars.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + clsYlistOperator.RemoveParameterByName("cols") + Else + clsYlist2Operator.RemoveParameterByName("cols") + clsYlistOperator.RemoveParameterByName("cols") + End If + Else + clsYlist2Operator.RemoveParameterByName("cols") + clsYlistOperator.RemoveParameterByName("cols") + + End If + End If + + End If + End Sub + + Private Sub AddRemoveSecondAnovaParam() + If rdoThreeVariable.Checked Then + If IsNumericByNumericByFactor() OrElse IsNumericByNumericByNumeric() OrElse IsNumericByFactorByFactor() OrElse IsNumericByFactorByNumeric() Then + If ucrReceiverThreeVariableSecondFactor.IsEmpty Then + clsCombineAnova2Function.RemoveParameterByName("x") + Else + clsCombineAnova2Function.AddParameter("x", ucrReceiverThreeVariableSecondFactor.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + End If + End If + ElseIf rdoTwoVariable.Checked Then + If IsNumericByNumeric() Then + If Not ucrReceiverSecondTwoVariableFactor.IsEmpty Then + If ucrChkSwapXYVar.Checked Then + clsCombineSwapAnova2Table.AddParameter("x", ucrReceiverSecondTwoVariableFactor.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + clsCombineAnova2Function.RemoveParameterByName("x") + Else + clsCombineAnova2Function.AddParameter("x", ucrReceiverSecondTwoVariableFactor.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + clsCombineSwapAnova2Table.RemoveParameterByName("x") + + End If + Else + clsCombineSwapAnova2Table.RemoveParameterByName("x") + clsCombineAnova2Function.RemoveParameterByName("x") + + End If + ElseIf IsFactorByNumeric() Then + If Not ucrReceiverSecondTwoVariableFactor.IsEmpty Then + If ucrChkSwapXYVar.Checked Then + clsCombineSwapAnova2Table.AddParameter("x", ucrReceiverSecondTwoVariableFactor.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + clsCombineAnova2Function.RemoveParameterByName("x") + Else + clsCombineSwapAnova2Table.RemoveParameterByName("x") + clsCombineAnova2Function.RemoveParameterByName("x") + End If + Else + clsCombineSwapAnova2Table.RemoveParameterByName("x") + clsCombineAnova2Function.RemoveParameterByName("x") + + End If + ElseIf IsNumericByFactor() Then + If ucrReceiverSecondTwoVariableFactor.IsEmpty Then + clsCombineAnova2Function.RemoveParameterByName("x") + Else + clsCombineAnova2Function.AddParameter("x", ucrReceiverSecondTwoVariableFactor.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + End If + End If + End If + + End Sub + + Private Sub AddRemoveThirdAnovaParam() + If rdoThreeVariable.Checked Then + If IsNumericByNumericByFactor() OrElse IsNumericByNumericByNumeric() OrElse IsNumericByFactorByFactor() OrElse IsNumericByFactorByNumeric() Then + If ucrReceiverThreeVariableThirdVariable.IsEmpty Then + clsCombineAnova2Function.RemoveParameterByName("y") + Else + clsCombineAnova2Function.AddParameter("y", ucrReceiverThreeVariableThirdVariable.GetVariableNames(True), iPosition:=2, bIncludeArgumentName:=False) + End If + End If + End If End Sub Private Sub AddRemoveFrequencyParameters() @@ -677,42 +1123,82 @@ Public Class dlgDescribeTwoVariable Dim clsTempFrequency As RFunction = If(rdoThreeVariable.Checked, clsThreeVariableCombineFrequencyParametersFunction, clsCombineFrequencyParametersFunction).Clone - - For Each clsParameter In clsTempFrequency.clsParameters - If IsFactorByFactor() Then - clsSummaryTableFunction.AddParameter(clsParameter) - Else - If IsNumericByFactor() OrElse IsFactorByNumeric() Then - Select Case clsParameter.strArgumentName - Case "signif_fig", "include_margins", "margin_name" - clsSummaryTableFunction.AddParameter(clsParameter) - End Select - End If + Dim clsTempColFrequency As RFunction = clsCombineFrequencyColParametersFunction.Clone + If rdoTwoVariable.Checked Then + If rdoORow.Checked OrElse rdoOCell.Checked Then + For Each clsParameter In clsTempFrequency.clsParameters + If IsFactorByFactor() Then + clsSummaryTableFunction.AddParameter(clsParameter) + Else + If IsNumericByFactor() OrElse IsFactorByNumeric() Then + Select Case clsParameter.strArgumentName + Case "signif_fig", "include_margins", "margin_name" + clsSummaryTableFunction.AddParameter(clsParameter) + End Select + End If + End If + Next + + ElseIf rdoOCol.Checked Then + + For Each clsParameter In clsTempColFrequency.clsParameters + If IsFactorByFactor() Then + clsSummaryTableFunction.AddParameter(clsParameter) + Else + If IsNumericByFactor() OrElse IsFactorByNumeric() Then + Select Case clsParameter.strArgumentName + Case "signif_fig", "include_margins", "margin_name" + clsSummaryTableFunction.AddParameter(clsParameter) + End Select + End If + End If + Next End If - Next + End If End Sub - Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPercentageProportion.ControlValueChanged, - ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, - ucrReceiverPercentages.ControlValueChanged, ucrInputMarginName.ControlValueChanged + Private Sub Frequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPercentages.ControlValueChanged, ucrReceiverColumns.ControlValueChanged, + ucrChkDisplayAsPercentage.ControlValueChanged, ucrChkDisplayMargins.ControlValueChanged, ucrInputMarginName.ControlValueChanged, ucrpnlPercent.ControlValueChanged If rdoTwoVariable.Checked Then If ucrChkDisplayAsPercentage.Checked Then - ucrReceiverPercentages.SetMeAsReceiver() + If rdoORow.Checked Then + ucrReceiverPercentages.SetMeAsReceiver() + ElseIf rdoOCol.Checked Then + ucrReceiverColumns.SetMeAsReceiver() + Else + ucrReceiverFirstVars.SetMeAsReceiver() + End If Else ucrReceiverFirstVars.SetMeAsReceiver() End If Else ucrReceiverFirstVars.SetMeAsReceiver() End If - If ucrChkDisplayMargins.Checked Then - ucrInputMarginName.Visible = True - clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + If rdoORow.Checked OrElse rdoOCell.Checked Then + If ucrChkDisplayMargins.Checked Then + ucrInputMarginName.Visible = True + clsCombineFrequencyParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + Else + ucrInputMarginName.Visible = False + clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") + End If + ElseIf rdoOCol.Checked Then + + If ucrChkDisplayMargins.Checked Then + ucrInputMarginName.Visible = True + clsCombineFrequencyColParametersFunction.AddParameter("margin_name", Chr(34) & ucrInputMarginName.GetText & Chr(34), iPosition:=6) + Else + ucrInputMarginName.Visible = False + clsCombineFrequencyColParametersFunction.RemoveParameterByName("margin_name") + End If Else - ucrInputMarginName.Visible = False + clsCombineFrequencyColParametersFunction.RemoveParameterByName("margin_name") clsCombineFrequencyParametersFunction.RemoveParameterByName("margin_name") End If + FactorColumns() AddRemoveFrequencyParameters() + AddingColumnFactor() End Sub Private Sub ucrSelectorDescribeTwoVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDescribeTwoVar.ControlValueChanged @@ -726,7 +1212,7 @@ Public Class dlgDescribeTwoVariable If rdoTwoVariable.Checked Then If IsFactorByFactor() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) - ElseIf IsNumericByFactor() Then + ElseIf IsFactorByNumeric() Then clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) End If ElseIf rdoThreeVariable.Checked Then @@ -734,14 +1220,12 @@ Public Class dlgDescribeTwoVariable clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) ElseIf IsFactorByFactor() Then clsSummaryTableFunction.AddParameter("summaries", "count_label", iPosition:=4) - ElseIf IsNumericByFactor() Then - clsSummaryTableFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesListFunction, iPosition:=4) End If End If End Sub Private Sub ucrReceiverNumericVariable_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableThirdVariable.ControlValueChanged - AssignSecondVariableType() + AssignThirdVariableType() ManageControlsVisibility() UpdateCombineFactorParameterFunction() ChangeBaseRCode() @@ -749,7 +1233,12 @@ Public Class dlgDescribeTwoVariable UpdateSummaryTableFunction() AddRemoveFrequencyParameters() AddRemoveNAParameter() - HideFormatTableButton() + AddRemoveFirstCorrParam() + AddRemoveThirdCorrParam() + AddRemoveSecondCorrParam() + AddRemoveSecondAnovaParam() + AddRemoveThirdAnovaParam() + AddRemoveFirstAnova2Param() End Sub Private Sub ChangeSumaryLabelText() @@ -760,22 +1249,38 @@ Public Class dlgDescribeTwoVariable If IsFactorByFactor() Then strSummaryName = "Frequency tables" - ElseIf IsNumericByFactor() Then - strSummaryName = "Summary tables" Else If rdoTwoVariable.Checked Then If IsNumericByNumeric() Then - strSummaryName = "Correlations" + strSummaryName = "ANOVA tables" ElseIf IsFactorByNumeric() Then + If ucrChkSwapXYVar.Checked Then + strSummaryName = "ANOVA tables" + Else + strSummaryName = "Summary tables" + End If + ElseIf IsNumericByFactor() Then strSummaryName = "ANOVA tables" Else strSummaryName = "" End If - ElseIf rdoThreeVariable.Checked Then + End If + End If + If rdoThreeVariable.Checked Then + If IsFactorByNumericByNumeric() Then + strSummaryName = "Correlations" + ElseIf IsNumericByNumericByFactor() OrElse IsNumericByNumericByNumeric() Then + strSummaryName = "ANOVA tables" + ElseIf IsNumericByFactorByFactor() Then + strSummaryName = "ANOVA tables" + ElseIf IsNumericByFactorByNumeric() Then + strSummaryName = "ANOVA tables" + ElseIf IsFactorByFactorByFactor() Then + strSummaryName = "Frequency tables" + Else strSummaryName = "Summary tables" End If End If - If strSummaryName <> "" Then lblSummaryName.Text = strSummaryName lblSummaryName.ForeColor = SystemColors.Highlight @@ -789,7 +1294,7 @@ Public Class dlgDescribeTwoVariable Private Sub AssignSecondVariableType() If rdoTwoVariable.Checked OrElse rdoThreeVariable.Checked Then Dim ucrCurrentReceiver As ucrReceiverSingle = If(rdoTwoVariable.Checked, - ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableThirdVariable) + ucrReceiverSecondTwoVariableFactor, ucrReceiverThreeVariableSecondFactor) If Not ucrCurrentReceiver.IsEmpty Then strSecondVariableType = If({"factor", "character", "logical"}.Contains(ucrCurrentReceiver.strCurrDataType), "categorical", "numeric") @@ -808,7 +1313,7 @@ Public Class dlgDescribeTwoVariable Private Sub SummariesInRowsOrCols() If ucrChkSummariesRowCol.Checked Then - clsPivotWiderFunction.AddParameter("names_from", ucrReceiverSecondTwoVariableFactor.GetVariableNames(False), iPosition:=1) + clsPivotWiderFunction.AddParameter("names_from", "{{ .x }}", iPosition:=1) clsDummyFunction.AddParameter("row_sum", "True", iPosition:=3) Else clsPivotWiderFunction.AddParameter("names_from", Chr(39) & "summary-variable" & Chr(39), iPosition:=1) @@ -824,9 +1329,11 @@ Public Class dlgDescribeTwoVariable UpdateSummaryTableFunction() ChangeLocations() AddRemoveNAParameter() - HideFormatTableButton() ManageControlsVisibility() FactorColumns() + AddRemoveFirstAnova2Param() + AddRemoveSecondAnovaParam() + AddingColumnFactor() End Sub Private Sub ChangeFirstTypeLabel() @@ -856,6 +1363,25 @@ Public Class dlgDescribeTwoVariable End If End Sub + Private Sub AssignThirdVariableType() + If rdoThreeVariable.Checked Then + Dim ucrCurrentReceiver As ucrReceiverSingle = ucrReceiverThreeVariableThirdVariable + If Not ucrCurrentReceiver.IsEmpty Then + strThirdVariableType = If({"factor", "character", "logical"}.Contains(ucrCurrentReceiver.strCurrDataType), + "categorical", "numeric") + lblThreeVariableCategorical.Text = strThirdVariableType + lblThreeVariableCategorical.ForeColor = SystemColors.Highlight + + Else + strThirdVariableType = "" + lblThreeVariableCategorical.Text = "________" + lblThreeVariableCategorical.ForeColor = SystemColors.ControlText + End If + ChangeSumaryLabelText() + End If + ManageControlsVisibility() + End Sub + Private Sub SetHelpOptions() Select Case enumTwovariableMode Case TwovariableMode.Describe @@ -863,6 +1389,7 @@ Public Class dlgDescribeTwoVariable Case TwovariableMode.Climatic ucrBase.iHelpTopicID = 408 End Select + End Sub Private Sub ucrReceiverFirstVars_ControlValueAndContentChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlValueChanged, @@ -876,12 +1403,21 @@ Public Class dlgDescribeTwoVariable ChangeLocations() AddRemoveFrequencyParameters() AddRemoveNAParameter() - HideFormatTableButton() FactorColumns() + AddRemoveFirstCorrParam() + AddRemoveSecondAnovaParam() + AddRemoveThirdAnovaParam() + AddRemoveFirstAnova2Param() + AddingColumnFactor() End Sub Private Sub ucrReceiverThreeVariableSecondFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverThreeVariableSecondFactor.ControlValueChanged UpdateCombineFactorParameterFunction() + AssignSecondVariableType() + AddRemoveFirstCorrParam() + AddRemoveSecondCorrParam() + AddRemoveSecondAnovaParam() + AddRemoveFirstAnova2Param() End Sub Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstVars.ControlContentsChanged, @@ -921,7 +1457,7 @@ Public Class dlgDescribeTwoVariable bContainedInMultipleReceiver = lstMultipleVariables.Contains(ucrReceiverSecondTwoVariableFactor.GetVariableNames) Else bContainedInMultipleReceiver = lstMultipleVariables.Contains(ucrReceiverThreeVariableSecondFactor.GetVariableNames) OrElse ( - lstMultipleVariables.Contains(ucrReceiverThreeVariableThirdVariable.GetVariableNames) AndAlso strSecondVariableType = "categorical") + lstMultipleVariables.Contains(ucrReceiverThreeVariableThirdVariable.GetVariableNames)) End If End If @@ -1006,4 +1542,63 @@ Public Class dlgDescribeTwoVariable ManageControlsVisibility() SummariesInRowsOrCols() End Sub + + Private Sub ucrChkCorrelations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkCorrelations.ControlValueChanged + ChangeBaseRCode() + End Sub + + Private Sub ucrChkSwapXYVar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSwapXYVar.ControlValueChanged + AddRemoveFirstAnova2Param() + AddRemoveSecondAnovaParam() + ChangeBaseRCode() + ChangeSumaryLabelText() + End Sub + + Private Sub AddingColumnFactor() + If IsFactorByFactor() Then + If rdoOCol.Checked Then + If Not ucrReceiverFirstVars.IsEmpty Then + ' Get the list of variable names from ucrReceiverFirstVars + Dim variableNames As List(Of String) = ucrReceiverFirstVars.GetVariableNamesAsList + + ' Get the current list of variable names in ucrReceiverColumns + Dim currentColumnVars As List(Of String) = ucrReceiverColumns.GetVariableNamesAsList() + + ' Remove variables from ucrReceiverColumns that are no longer in ucrReceiverFirstVars + For Each varName As String In currentColumnVars + If Not variableNames.Contains(varName) Then + ucrReceiverColumns.Remove(New String() {varName}) ' Remove expects an array of strings + End If + Next + + ' Add the remaining variables to ucrReceiverColumns + For Each varName As String In variableNames + If Not currentColumnVars.Contains(varName) Then + ucrReceiverColumns.Add(varName) + End If + Next + + End If + ElseIf rdoORow.Checked Then + If Not ucrReceiverSecondTwoVariableFactor.IsEmpty Then + ucrReceiverPercentages.Add(ucrReceiverSecondTwoVariableFactor.GetVariableNames(False)) + End If + End If + Else + ucrReceiverPercentages.Clear() + ucrReceiverColumns.Clear() + End If + + End Sub + + Private Sub ucrpnlPercent_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrpnlPercent.ControlValueChanged + AddingColumnFactor() + If rdoOCol.Checked Then + clsDummyFunction.AddParameter("percent", "col", iPosition:=6) + ElseIf rdoORow.Checked Then + clsDummyFunction.AddParameter("percent", "row", iPosition:=6) + Else + clsDummyFunction.AddParameter("percent", "cell", iPosition:=6) + End If + End Sub End Class diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 59a7178f476..c4cb6d97038 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -214,7 +214,7 @@ Public Class dlgDisplayDailyData ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames) ucrSaveGraph.SetIsComboBox() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") ucrPnlFrequencyDisplay.AddRadioButton(rdoTable) diff --git a/instat/dlgDisplayTopN.vb b/instat/dlgDisplayTopN.vb index e4c3a89fd93..59f93c6e4b1 100644 --- a/instat/dlgDisplayTopN.vb +++ b/instat/dlgDisplayTopN.vb @@ -161,7 +161,7 @@ Public Class dlgDisplayTopN ucrInputDisplay.SetDropDownStyleAsNonEditable() ucrSaveDisplay.SetIsComboBox() - ucrSaveDisplay.SetCheckBoxText("Save Graph") + ucrSaveDisplay.SetCheckBoxText("Store Graph") ucrSaveDisplay.SetDataFrameSelector(ucrSelectorDisplayTopN.ucrAvailableDataFrames) ucrSaveDisplay.SetSaveTypeAsGraph() ucrSaveDisplay.SetPrefix("lollipop") diff --git a/instat/dlgDotPlot.vb b/instat/dlgDotPlot.vb index fa66d7cb1b8..6d1823458db 100644 --- a/instat/dlgDotPlot.vb +++ b/instat/dlgDotPlot.vb @@ -111,7 +111,7 @@ Public Class dlgDotPlot ucrSaveDotPlot.SetPrefix("dot_plot") ucrSaveDotPlot.SetSaveTypeAsGraph() ucrSaveDotPlot.SetIsComboBox() - ucrSaveDotPlot.SetCheckBoxText("Save Graph") + ucrSaveDotPlot.SetCheckBoxText("Store Graph") ucrSaveDotPlot.SetDataFrameSelector(ucrDotPlotSelector.ucrAvailableDataFrames) ucrSaveDotPlot.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgEnter.Designer.vb b/instat/dlgEnter.Designer.vb index 3794796db6d..8ddbf63363b 100644 --- a/instat/dlgEnter.Designer.vb +++ b/instat/dlgEnter.Designer.vb @@ -78,12 +78,14 @@ Partial Class dlgEnter Me.ttEnter = New System.Windows.Forms.ToolTip(Me.components) Me.ucrSaveEnterResultInto = New instat.ucrSave() Me.ucrTryModelling = New instat.ucrTry() - Me.ucrDataFrameEnter = New instat.ucrDataFrame() Me.ucrReceiverForEnterCalculation = New instat.ucrReceiverExpression() Me.ucrBase = New instat.ucrButtons() Me.cmdRHelp = New instat.ucrSplitButton() Me.ContextMenuStripBase = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ToolStripMenuBase = New System.Windows.Forms.ToolStripMenuItem() + Me.ucrSelectorEnter = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrChkStoreScalar = New instat.ucrCheck() + Me.checkScalars = New System.Windows.Forms.CheckBox() Me.grpEnterKeyboard2.SuspendLayout() Me.grpBasic.SuspendLayout() Me.ContextMenuStripBase.SuspendLayout() @@ -93,9 +95,10 @@ Partial Class dlgEnter ' Me.chkShowEnterArguments.AutoSize = True Me.chkShowEnterArguments.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.chkShowEnterArguments.Location = New System.Drawing.Point(307, 18) + Me.chkShowEnterArguments.Location = New System.Drawing.Point(460, 27) + Me.chkShowEnterArguments.Margin = New System.Windows.Forms.Padding(4) Me.chkShowEnterArguments.Name = "chkShowEnterArguments" - Me.chkShowEnterArguments.Size = New System.Drawing.Size(109, 17) + Me.chkShowEnterArguments.Size = New System.Drawing.Size(161, 24) Me.chkShowEnterArguments.TabIndex = 155 Me.chkShowEnterArguments.Text = "Show Parameters" Me.chkShowEnterArguments.UseVisualStyleBackColor = True @@ -104,10 +107,9 @@ Partial Class dlgEnter ' Me.lblData.AutoSize = True Me.lblData.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblData.Location = New System.Drawing.Point(10, 20) - Me.lblData.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblData.Location = New System.Drawing.Point(15, 30) Me.lblData.Name = "lblData" - Me.lblData.Size = New System.Drawing.Size(33, 13) + Me.lblData.Size = New System.Drawing.Size(48, 20) Me.lblData.TabIndex = 152 Me.lblData.Tag = "Data" Me.lblData.Text = "Data:" @@ -115,10 +117,10 @@ Partial Class dlgEnter 'cmdQuotes ' Me.cmdQuotes.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdQuotes.Location = New System.Drawing.Point(100, 101) - Me.cmdQuotes.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdQuotes.Location = New System.Drawing.Point(150, 152) + Me.cmdQuotes.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdQuotes.Name = "cmdQuotes" - Me.cmdQuotes.Size = New System.Drawing.Size(49, 30) + Me.cmdQuotes.Size = New System.Drawing.Size(74, 45) Me.cmdQuotes.TabIndex = 142 Me.cmdQuotes.Text = """ """ Me.cmdQuotes.UseVisualStyleBackColor = True @@ -127,10 +129,10 @@ Partial Class dlgEnter ' Me.cmdExponential.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdExponential.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdExponential.Location = New System.Drawing.Point(52, 101) - Me.cmdExponential.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdExponential.Location = New System.Drawing.Point(78, 152) + Me.cmdExponential.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdExponential.Name = "cmdExponential" - Me.cmdExponential.Size = New System.Drawing.Size(49, 30) + Me.cmdExponential.Size = New System.Drawing.Size(74, 45) Me.cmdExponential.TabIndex = 143 Me.cmdExponential.Text = "E" Me.cmdExponential.UseVisualStyleBackColor = True @@ -138,10 +140,10 @@ Partial Class dlgEnter 'cmdConcantenateFunction ' Me.cmdConcantenateFunction.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdConcantenateFunction.Location = New System.Drawing.Point(4, 101) - Me.cmdConcantenateFunction.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdConcantenateFunction.Location = New System.Drawing.Point(6, 152) + Me.cmdConcantenateFunction.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdConcantenateFunction.Name = "cmdConcantenateFunction" - Me.cmdConcantenateFunction.Size = New System.Drawing.Size(49, 30) + Me.cmdConcantenateFunction.Size = New System.Drawing.Size(74, 45) Me.cmdConcantenateFunction.TabIndex = 145 Me.cmdConcantenateFunction.Text = "c( )" Me.cmdConcantenateFunction.UseVisualStyleBackColor = True @@ -150,10 +152,10 @@ Partial Class dlgEnter ' Me.cmdSequenceFunction.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdSequenceFunction.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdSequenceFunction.Location = New System.Drawing.Point(4, 72) - Me.cmdSequenceFunction.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdSequenceFunction.Location = New System.Drawing.Point(6, 108) + Me.cmdSequenceFunction.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdSequenceFunction.Name = "cmdSequenceFunction" - Me.cmdSequenceFunction.Size = New System.Drawing.Size(49, 30) + Me.cmdSequenceFunction.Size = New System.Drawing.Size(74, 45) Me.cmdSequenceFunction.TabIndex = 147 Me.cmdSequenceFunction.Tag = "Del" Me.cmdSequenceFunction.Text = "seq" @@ -163,10 +165,10 @@ Partial Class dlgEnter ' Me.cmdRepelicationFunction.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdRepelicationFunction.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdRepelicationFunction.Location = New System.Drawing.Point(4, 43) - Me.cmdRepelicationFunction.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdRepelicationFunction.Location = New System.Drawing.Point(6, 64) + Me.cmdRepelicationFunction.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdRepelicationFunction.Name = "cmdRepelicationFunction" - Me.cmdRepelicationFunction.Size = New System.Drawing.Size(49, 30) + Me.cmdRepelicationFunction.Size = New System.Drawing.Size(74, 45) Me.cmdRepelicationFunction.TabIndex = 148 Me.cmdRepelicationFunction.Text = "rep" Me.cmdRepelicationFunction.UseVisualStyleBackColor = True @@ -174,10 +176,10 @@ Partial Class dlgEnter 'cmdLogical ' Me.cmdLogical.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdLogical.Location = New System.Drawing.Point(100, 72) - Me.cmdLogical.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdLogical.Location = New System.Drawing.Point(150, 108) + Me.cmdLogical.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdLogical.Name = "cmdLogical" - Me.cmdLogical.Size = New System.Drawing.Size(49, 30) + Me.cmdLogical.Size = New System.Drawing.Size(74, 45) Me.cmdLogical.TabIndex = 149 Me.cmdLogical.Text = "logical" Me.cmdLogical.UseVisualStyleBackColor = True @@ -185,10 +187,10 @@ Partial Class dlgEnter 'cmdPi ' Me.cmdPi.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdPi.Location = New System.Drawing.Point(52, 72) - Me.cmdPi.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdPi.Location = New System.Drawing.Point(78, 108) + Me.cmdPi.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdPi.Name = "cmdPi" - Me.cmdPi.Size = New System.Drawing.Size(49, 30) + Me.cmdPi.Size = New System.Drawing.Size(74, 45) Me.cmdPi.TabIndex = 149 Me.cmdPi.Text = "pi" Me.cmdPi.UseVisualStyleBackColor = True @@ -196,10 +198,10 @@ Partial Class dlgEnter 'cmdLetters2 ' Me.cmdLetters2.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdLetters2.Location = New System.Drawing.Point(52, 14) - Me.cmdLetters2.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdLetters2.Location = New System.Drawing.Point(78, 21) + Me.cmdLetters2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdLetters2.Name = "cmdLetters2" - Me.cmdLetters2.Size = New System.Drawing.Size(49, 30) + Me.cmdLetters2.Size = New System.Drawing.Size(74, 45) Me.cmdLetters2.TabIndex = 152 Me.cmdLetters2.Text = "letters" Me.cmdLetters2.UseVisualStyleBackColor = True @@ -207,10 +209,10 @@ Partial Class dlgEnter 'cmdMonths ' Me.cmdMonths.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMonths.Location = New System.Drawing.Point(52, 43) - Me.cmdMonths.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdMonths.Location = New System.Drawing.Point(78, 64) + Me.cmdMonths.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdMonths.Name = "cmdMonths" - Me.cmdMonths.Size = New System.Drawing.Size(49, 30) + Me.cmdMonths.Size = New System.Drawing.Size(74, 45) Me.cmdMonths.TabIndex = 151 Me.cmdMonths.Text = "months " Me.cmdMonths.UseVisualStyleBackColor = True @@ -219,10 +221,10 @@ Partial Class dlgEnter ' Me.cmdColon.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdColon.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdColon.Location = New System.Drawing.Point(4, 14) - Me.cmdColon.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdColon.Location = New System.Drawing.Point(6, 21) + Me.cmdColon.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdColon.Name = "cmdColon" - Me.cmdColon.Size = New System.Drawing.Size(49, 30) + Me.cmdColon.Size = New System.Drawing.Size(74, 45) Me.cmdColon.TabIndex = 151 Me.cmdColon.Text = "[:]" Me.cmdColon.UseVisualStyleBackColor = True @@ -241,11 +243,11 @@ Partial Class dlgEnter Me.grpEnterKeyboard2.Controls.Add(Me.cmdConcantenateFunction) Me.grpEnterKeyboard2.Controls.Add(Me.cmdExponential) Me.grpEnterKeyboard2.Controls.Add(Me.cmdQuotes) - Me.grpEnterKeyboard2.Location = New System.Drawing.Point(378, 50) - Me.grpEnterKeyboard2.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.grpEnterKeyboard2.Location = New System.Drawing.Point(662, 75) + Me.grpEnterKeyboard2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.grpEnterKeyboard2.Name = "grpEnterKeyboard2" - Me.grpEnterKeyboard2.Padding = New System.Windows.Forms.Padding(2, 3, 2, 3) - Me.grpEnterKeyboard2.Size = New System.Drawing.Size(156, 134) + Me.grpEnterKeyboard2.Padding = New System.Windows.Forms.Padding(3, 4, 3, 4) + Me.grpEnterKeyboard2.Size = New System.Drawing.Size(234, 201) Me.grpEnterKeyboard2.TabIndex = 159 Me.grpEnterKeyboard2.TabStop = False ' @@ -253,10 +255,10 @@ Partial Class dlgEnter ' Me.cmdText.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdText.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdText.Location = New System.Drawing.Point(100, 43) - Me.cmdText.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdText.Location = New System.Drawing.Point(150, 64) + Me.cmdText.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdText.Name = "cmdText" - Me.cmdText.Size = New System.Drawing.Size(49, 30) + Me.cmdText.Size = New System.Drawing.Size(74, 45) Me.cmdText.TabIndex = 155 Me.cmdText.Text = "text" Me.cmdText.UseVisualStyleBackColor = True @@ -265,10 +267,10 @@ Partial Class dlgEnter ' Me.cmdFactor.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.cmdFactor.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFactor.Location = New System.Drawing.Point(100, 14) - Me.cmdFactor.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdFactor.Location = New System.Drawing.Point(150, 21) + Me.cmdFactor.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdFactor.Name = "cmdFactor" - Me.cmdFactor.Size = New System.Drawing.Size(49, 30) + Me.cmdFactor.Size = New System.Drawing.Size(74, 45) Me.cmdFactor.TabIndex = 153 Me.cmdFactor.Text = "factor " Me.cmdFactor.UseVisualStyleBackColor = True @@ -276,10 +278,9 @@ Partial Class dlgEnter 'btnExample ' Me.btnExample.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.btnExample.Location = New System.Drawing.Point(436, 16) - Me.btnExample.Margin = New System.Windows.Forms.Padding(2) + Me.btnExample.Location = New System.Drawing.Point(654, 24) Me.btnExample.Name = "btnExample" - Me.btnExample.Size = New System.Drawing.Size(64, 22) + Me.btnExample.Size = New System.Drawing.Size(96, 33) Me.btnExample.TabIndex = 161 Me.btnExample.Text = "Examples" Me.btnExample.UseVisualStyleBackColor = True @@ -305,21 +306,21 @@ Partial Class dlgEnter Me.grpBasic.Controls.Add(Me.cmd2) Me.grpBasic.Controls.Add(Me.cmd0) Me.grpBasic.Controls.Add(Me.cmd1) - Me.grpBasic.Location = New System.Drawing.Point(170, 51) - Me.grpBasic.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.grpBasic.Location = New System.Drawing.Point(350, 76) + Me.grpBasic.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.grpBasic.Name = "grpBasic" - Me.grpBasic.Padding = New System.Windows.Forms.Padding(2, 3, 2, 3) - Me.grpBasic.Size = New System.Drawing.Size(205, 134) + Me.grpBasic.Padding = New System.Windows.Forms.Padding(3, 4, 3, 4) + Me.grpBasic.Size = New System.Drawing.Size(308, 201) Me.grpBasic.TabIndex = 180 Me.grpBasic.TabStop = False ' 'cmdClear ' Me.cmdClear.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdClear.Location = New System.Drawing.Point(151, 71) - Me.cmdClear.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdClear.Location = New System.Drawing.Point(226, 106) + Me.cmdClear.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdClear.Name = "cmdClear" - Me.cmdClear.Size = New System.Drawing.Size(49, 60) + Me.cmdClear.Size = New System.Drawing.Size(74, 90) Me.cmdClear.TabIndex = 190 Me.cmdClear.Text = "Clear" Me.cmdClear.UseVisualStyleBackColor = True @@ -328,10 +329,10 @@ Partial Class dlgEnter ' Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) Me.Button1.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Button1.Location = New System.Drawing.Point(3, 100) - Me.Button1.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.Button1.Location = New System.Drawing.Point(4, 150) + Me.Button1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(38, 30) + Me.Button1.Size = New System.Drawing.Size(57, 45) Me.Button1.TabIndex = 138 Me.Button1.Text = "," Me.Button1.UseVisualStyleBackColor = True @@ -339,10 +340,10 @@ Partial Class dlgEnter 'cmdBrackets ' Me.cmdBrackets.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdBrackets.Location = New System.Drawing.Point(77, 100) - Me.cmdBrackets.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdBrackets.Location = New System.Drawing.Point(116, 150) + Me.cmdBrackets.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdBrackets.Name = "cmdBrackets" - Me.cmdBrackets.Size = New System.Drawing.Size(38, 30) + Me.cmdBrackets.Size = New System.Drawing.Size(57, 45) Me.cmdBrackets.TabIndex = 136 Me.cmdBrackets.Text = "( )" Me.cmdBrackets.UseVisualStyleBackColor = True @@ -351,10 +352,10 @@ Partial Class dlgEnter ' Me.cmdPower.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!) Me.cmdPower.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdPower.Location = New System.Drawing.Point(151, 42) - Me.cmdPower.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdPower.Location = New System.Drawing.Point(226, 63) + Me.cmdPower.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdPower.Name = "cmdPower" - Me.cmdPower.Size = New System.Drawing.Size(49, 30) + Me.cmdPower.Size = New System.Drawing.Size(74, 45) Me.cmdPower.TabIndex = 133 Me.cmdPower.Text = "^" Me.cmdPower.UseVisualStyleBackColor = True @@ -363,10 +364,10 @@ Partial Class dlgEnter ' Me.cmdDivide.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!) Me.cmdDivide.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdDivide.Location = New System.Drawing.Point(114, 13) - Me.cmdDivide.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdDivide.Location = New System.Drawing.Point(171, 20) + Me.cmdDivide.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdDivide.Name = "cmdDivide" - Me.cmdDivide.Size = New System.Drawing.Size(38, 30) + Me.cmdDivide.Size = New System.Drawing.Size(57, 45) Me.cmdDivide.TabIndex = 131 Me.cmdDivide.Text = "/" Me.cmdDivide.UseVisualStyleBackColor = True @@ -375,10 +376,10 @@ Partial Class dlgEnter ' Me.cmdPlus.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!) Me.cmdPlus.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdPlus.Location = New System.Drawing.Point(114, 100) - Me.cmdPlus.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdPlus.Location = New System.Drawing.Point(171, 150) + Me.cmdPlus.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdPlus.Name = "cmdPlus" - Me.cmdPlus.Size = New System.Drawing.Size(38, 30) + Me.cmdPlus.Size = New System.Drawing.Size(57, 45) Me.cmdPlus.TabIndex = 130 Me.cmdPlus.Text = "+" Me.cmdPlus.UseVisualStyleBackColor = True @@ -387,10 +388,10 @@ Partial Class dlgEnter ' Me.cmdMinus.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!) Me.cmdMinus.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMinus.Location = New System.Drawing.Point(114, 71) - Me.cmdMinus.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdMinus.Location = New System.Drawing.Point(171, 106) + Me.cmdMinus.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdMinus.Name = "cmdMinus" - Me.cmdMinus.Size = New System.Drawing.Size(38, 30) + Me.cmdMinus.Size = New System.Drawing.Size(57, 45) Me.cmdMinus.TabIndex = 129 Me.cmdMinus.Text = "-" Me.cmdMinus.UseVisualStyleBackColor = True @@ -399,10 +400,10 @@ Partial Class dlgEnter ' Me.cmdMultiply.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!) Me.cmdMultiply.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdMultiply.Location = New System.Drawing.Point(114, 42) - Me.cmdMultiply.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmdMultiply.Location = New System.Drawing.Point(171, 63) + Me.cmdMultiply.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmdMultiply.Name = "cmdMultiply" - Me.cmdMultiply.Size = New System.Drawing.Size(38, 30) + Me.cmdMultiply.Size = New System.Drawing.Size(57, 45) Me.cmdMultiply.TabIndex = 128 Me.cmdMultiply.Text = "*" Me.cmdMultiply.UseVisualStyleBackColor = True @@ -411,10 +412,10 @@ Partial Class dlgEnter ' Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!) Me.Button2.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Button2.Location = New System.Drawing.Point(151, 13) - Me.Button2.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.Button2.Location = New System.Drawing.Point(226, 20) + Me.Button2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.Button2.Name = "Button2" - Me.Button2.Size = New System.Drawing.Size(49, 30) + Me.Button2.Size = New System.Drawing.Size(74, 45) Me.Button2.TabIndex = 127 Me.Button2.Text = "." Me.Button2.UseVisualStyleBackColor = True @@ -422,10 +423,10 @@ Partial Class dlgEnter 'cmd9 ' Me.cmd9.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd9.Location = New System.Drawing.Point(77, 13) - Me.cmd9.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd9.Location = New System.Drawing.Point(116, 20) + Me.cmd9.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd9.Name = "cmd9" - Me.cmd9.Size = New System.Drawing.Size(38, 30) + Me.cmd9.Size = New System.Drawing.Size(57, 45) Me.cmd9.TabIndex = 126 Me.cmd9.Text = "9" Me.cmd9.UseVisualStyleBackColor = True @@ -433,10 +434,10 @@ Partial Class dlgEnter 'cmd8 ' Me.cmd8.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd8.Location = New System.Drawing.Point(40, 13) - Me.cmd8.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd8.Location = New System.Drawing.Point(60, 20) + Me.cmd8.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd8.Name = "cmd8" - Me.cmd8.Size = New System.Drawing.Size(38, 30) + Me.cmd8.Size = New System.Drawing.Size(57, 45) Me.cmd8.TabIndex = 125 Me.cmd8.Text = "8" Me.cmd8.UseVisualStyleBackColor = True @@ -444,10 +445,10 @@ Partial Class dlgEnter 'cmd7 ' Me.cmd7.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd7.Location = New System.Drawing.Point(3, 13) - Me.cmd7.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd7.Location = New System.Drawing.Point(4, 20) + Me.cmd7.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd7.Name = "cmd7" - Me.cmd7.Size = New System.Drawing.Size(38, 30) + Me.cmd7.Size = New System.Drawing.Size(57, 45) Me.cmd7.TabIndex = 124 Me.cmd7.Text = "7" Me.cmd7.UseVisualStyleBackColor = True @@ -455,10 +456,10 @@ Partial Class dlgEnter 'cmd6 ' Me.cmd6.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd6.Location = New System.Drawing.Point(77, 42) - Me.cmd6.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd6.Location = New System.Drawing.Point(116, 63) + Me.cmd6.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd6.Name = "cmd6" - Me.cmd6.Size = New System.Drawing.Size(38, 30) + Me.cmd6.Size = New System.Drawing.Size(57, 45) Me.cmd6.TabIndex = 123 Me.cmd6.Text = "6" Me.cmd6.UseVisualStyleBackColor = True @@ -466,10 +467,10 @@ Partial Class dlgEnter 'cmd5 ' Me.cmd5.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd5.Location = New System.Drawing.Point(40, 42) - Me.cmd5.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd5.Location = New System.Drawing.Point(60, 63) + Me.cmd5.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd5.Name = "cmd5" - Me.cmd5.Size = New System.Drawing.Size(38, 30) + Me.cmd5.Size = New System.Drawing.Size(57, 45) Me.cmd5.TabIndex = 122 Me.cmd5.Text = "5" Me.cmd5.UseVisualStyleBackColor = True @@ -477,10 +478,10 @@ Partial Class dlgEnter 'cmd4 ' Me.cmd4.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd4.Location = New System.Drawing.Point(3, 42) - Me.cmd4.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd4.Location = New System.Drawing.Point(4, 63) + Me.cmd4.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd4.Name = "cmd4" - Me.cmd4.Size = New System.Drawing.Size(38, 30) + Me.cmd4.Size = New System.Drawing.Size(57, 45) Me.cmd4.TabIndex = 121 Me.cmd4.Text = "4" Me.cmd4.UseVisualStyleBackColor = True @@ -488,10 +489,10 @@ Partial Class dlgEnter 'cmd3 ' Me.cmd3.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd3.Location = New System.Drawing.Point(77, 71) - Me.cmd3.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd3.Location = New System.Drawing.Point(116, 106) + Me.cmd3.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd3.Name = "cmd3" - Me.cmd3.Size = New System.Drawing.Size(38, 30) + Me.cmd3.Size = New System.Drawing.Size(57, 45) Me.cmd3.TabIndex = 120 Me.cmd3.Text = "3" Me.cmd3.UseVisualStyleBackColor = True @@ -499,10 +500,10 @@ Partial Class dlgEnter 'cmd2 ' Me.cmd2.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd2.Location = New System.Drawing.Point(40, 71) - Me.cmd2.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd2.Location = New System.Drawing.Point(60, 106) + Me.cmd2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd2.Name = "cmd2" - Me.cmd2.Size = New System.Drawing.Size(38, 30) + Me.cmd2.Size = New System.Drawing.Size(57, 45) Me.cmd2.TabIndex = 119 Me.cmd2.Text = "2" Me.cmd2.UseVisualStyleBackColor = True @@ -510,10 +511,10 @@ Partial Class dlgEnter 'cmd0 ' Me.cmd0.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd0.Location = New System.Drawing.Point(40, 100) - Me.cmd0.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd0.Location = New System.Drawing.Point(60, 150) + Me.cmd0.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd0.Name = "cmd0" - Me.cmd0.Size = New System.Drawing.Size(38, 30) + Me.cmd0.Size = New System.Drawing.Size(57, 45) Me.cmd0.TabIndex = 118 Me.cmd0.Text = "0" Me.cmd0.UseVisualStyleBackColor = True @@ -521,10 +522,10 @@ Partial Class dlgEnter 'cmd1 ' Me.cmd1.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmd1.Location = New System.Drawing.Point(3, 71) - Me.cmd1.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.cmd1.Location = New System.Drawing.Point(4, 106) + Me.cmd1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.cmd1.Name = "cmd1" - Me.cmd1.Size = New System.Drawing.Size(38, 30) + Me.cmd1.Size = New System.Drawing.Size(57, 45) Me.cmd1.TabIndex = 117 Me.cmd1.Text = "1" Me.cmd1.UseVisualStyleBackColor = True @@ -532,41 +533,31 @@ Partial Class dlgEnter 'ucrSaveEnterResultInto ' Me.ucrSaveEnterResultInto.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveEnterResultInto.Location = New System.Drawing.Point(11, 243) - Me.ucrSaveEnterResultInto.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveEnterResultInto.Location = New System.Drawing.Point(19, 390) + Me.ucrSaveEnterResultInto.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrSaveEnterResultInto.Name = "ucrSaveEnterResultInto" - Me.ucrSaveEnterResultInto.Size = New System.Drawing.Size(280, 22) + Me.ucrSaveEnterResultInto.Size = New System.Drawing.Size(511, 33) Me.ucrSaveEnterResultInto.TabIndex = 181 ' 'ucrTryModelling ' Me.ucrTryModelling.AutoSize = True - Me.ucrTryModelling.Location = New System.Drawing.Point(3, 202) + Me.ucrTryModelling.Location = New System.Drawing.Point(19, 340) + Me.ucrTryModelling.Margin = New System.Windows.Forms.Padding(6) Me.ucrTryModelling.Name = "ucrTryModelling" Me.ucrTryModelling.RunCommandAsMultipleLines = False - Me.ucrTryModelling.Size = New System.Drawing.Size(480, 33) + Me.ucrTryModelling.Size = New System.Drawing.Size(720, 55) Me.ucrTryModelling.TabIndex = 160 ' - 'ucrDataFrameEnter - ' - Me.ucrDataFrameEnter.AutoSize = True - Me.ucrDataFrameEnter.bDropUnusedFilterLevels = False - Me.ucrDataFrameEnter.bUseCurrentFilter = True - Me.ucrDataFrameEnter.Location = New System.Drawing.Point(11, 55) - Me.ucrDataFrameEnter.Margin = New System.Windows.Forms.Padding(0) - Me.ucrDataFrameEnter.Name = "ucrDataFrameEnter" - Me.ucrDataFrameEnter.Size = New System.Drawing.Size(151, 43) - Me.ucrDataFrameEnter.TabIndex = 156 - ' 'ucrReceiverForEnterCalculation ' Me.ucrReceiverForEnterCalculation.AutoSize = True Me.ucrReceiverForEnterCalculation.frmParent = Me - Me.ucrReceiverForEnterCalculation.Location = New System.Drawing.Point(69, 16) - Me.ucrReceiverForEnterCalculation.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) + Me.ucrReceiverForEnterCalculation.Location = New System.Drawing.Point(104, 24) + Me.ucrReceiverForEnterCalculation.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.ucrReceiverForEnterCalculation.Name = "ucrReceiverForEnterCalculation" Me.ucrReceiverForEnterCalculation.Selector = Nothing - Me.ucrReceiverForEnterCalculation.Size = New System.Drawing.Size(229, 28) + Me.ucrReceiverForEnterCalculation.Size = New System.Drawing.Size(344, 42) Me.ucrReceiverForEnterCalculation.strNcFilePath = "" Me.ucrReceiverForEnterCalculation.TabIndex = 153 Me.ucrReceiverForEnterCalculation.ucrSelector = Nothing @@ -575,18 +566,20 @@ Partial Class dlgEnter ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(11, 278) + Me.ucrBase.Location = New System.Drawing.Point(19, 468) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.Size = New System.Drawing.Size(611, 77) Me.ucrBase.TabIndex = 0 ' 'cmdRHelp ' Me.cmdRHelp.AutoSize = True Me.cmdRHelp.ContextMenuStrip = Me.ContextMenuStripBase - Me.cmdRHelp.Location = New System.Drawing.Point(459, 187) + Me.cmdRHelp.Location = New System.Drawing.Point(789, 280) + Me.cmdRHelp.Margin = New System.Windows.Forms.Padding(4) Me.cmdRHelp.Name = "cmdRHelp" - Me.cmdRHelp.Size = New System.Drawing.Size(68, 23) + Me.cmdRHelp.Size = New System.Drawing.Size(102, 34) Me.cmdRHelp.SplitMenuStrip = Me.ContextMenuStripBase Me.cmdRHelp.TabIndex = 213 Me.cmdRHelp.Text = "R Help" @@ -594,34 +587,70 @@ Partial Class dlgEnter ' 'ContextMenuStripBase ' + Me.ContextMenuStripBase.ImageScalingSize = New System.Drawing.Size(24, 24) Me.ContextMenuStripBase.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuBase}) Me.ContextMenuStripBase.Name = "ContextMenuStrip1" - Me.ContextMenuStripBase.Size = New System.Drawing.Size(99, 26) + Me.ContextMenuStripBase.Size = New System.Drawing.Size(122, 36) ' 'ToolStripMenuBase ' Me.ToolStripMenuBase.Name = "ToolStripMenuBase" - Me.ToolStripMenuBase.Size = New System.Drawing.Size(98, 22) + Me.ToolStripMenuBase.Size = New System.Drawing.Size(121, 32) Me.ToolStripMenuBase.Text = "base" ' + 'ucrSelectorEnter + ' + Me.ucrSelectorEnter.AutoSize = True + Me.ucrSelectorEnter.bDropUnusedFilterLevels = False + Me.ucrSelectorEnter.bShowHiddenColumns = False + Me.ucrSelectorEnter.bUseCurrentFilter = True + Me.ucrSelectorEnter.Location = New System.Drawing.Point(19, 62) + Me.ucrSelectorEnter.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorEnter.Name = "ucrSelectorEnter" + Me.ucrSelectorEnter.Size = New System.Drawing.Size(318, 274) + Me.ucrSelectorEnter.TabIndex = 214 + ' + 'ucrChkStoreScalar + ' + Me.ucrChkStoreScalar.AutoSize = True + Me.ucrChkStoreScalar.Checked = False + Me.ucrChkStoreScalar.Location = New System.Drawing.Point(19, 426) + Me.ucrChkStoreScalar.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkStoreScalar.Name = "ucrChkStoreScalar" + Me.ucrChkStoreScalar.Size = New System.Drawing.Size(199, 34) + Me.ucrChkStoreScalar.TabIndex = 215 + ' + 'checkScalars + ' + Me.checkScalars.AutoSize = True + Me.checkScalars.Location = New System.Drawing.Point(350, 289) + Me.checkScalars.Name = "checkScalars" + Me.checkScalars.Size = New System.Drawing.Size(88, 24) + Me.checkScalars.TabIndex = 216 + Me.checkScalars.Text = "Scalars" + Me.checkScalars.UseVisualStyleBackColor = True + ' 'dlgEnter ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(538, 336) + Me.ClientSize = New System.Drawing.Size(910, 553) + Me.Controls.Add(Me.checkScalars) + Me.Controls.Add(Me.ucrChkStoreScalar) + Me.Controls.Add(Me.ucrSelectorEnter) Me.Controls.Add(Me.cmdRHelp) Me.Controls.Add(Me.ucrSaveEnterResultInto) Me.Controls.Add(Me.grpBasic) Me.Controls.Add(Me.btnExample) Me.Controls.Add(Me.ucrTryModelling) Me.Controls.Add(Me.grpEnterKeyboard2) - Me.Controls.Add(Me.ucrDataFrameEnter) Me.Controls.Add(Me.chkShowEnterArguments) Me.Controls.Add(Me.lblData) Me.Controls.Add(Me.ucrReceiverForEnterCalculation) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgEnter" @@ -639,7 +668,6 @@ Partial Class dlgEnter Friend WithEvents chkShowEnterArguments As CheckBox Friend WithEvents lblData As Label Friend WithEvents ucrReceiverForEnterCalculation As ucrReceiverExpression - Friend WithEvents ucrDataFrameEnter As ucrDataFrame Friend WithEvents cmdQuotes As Button Friend WithEvents cmdExponential As Button Friend WithEvents cmdConcantenateFunction As Button @@ -680,4 +708,7 @@ Partial Class dlgEnter Friend WithEvents cmdRHelp As ucrSplitButton Friend WithEvents ContextMenuStripBase As ContextMenuStrip Friend WithEvents ToolStripMenuBase As ToolStripMenuItem + Friend WithEvents ucrSelectorEnter As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrChkStoreScalar As ucrCheck + Friend WithEvents checkScalars As CheckBox End Class diff --git a/instat/dlgEnter.resx b/instat/dlgEnter.resx index 8f2e9555440..df2ac13fdd2 100644 --- a/instat/dlgEnter.resx +++ b/instat/dlgEnter.resx @@ -121,7 +121,7 @@ 17, 5 - 124 + 25 519, 24 diff --git a/instat/dlgEnter.vb b/instat/dlgEnter.vb index 935c6daae1a..f2220d1b887 100644 --- a/instat/dlgEnter.vb +++ b/instat/dlgEnter.vb @@ -17,14 +17,11 @@ Imports instat.Translations Imports RDotNet Public Class dlgEnter - Dim dataset As DataFrame - Dim clsAttach As New RFunction - Dim clsDetach As New RFunction - Dim clsLength As New RFunction - Public bFirstLoad As Boolean = True - Public strOutput As String + Private clsAttach As New RFunction + Private clsDetach As New RFunction + Private clsAttachScalarsFunction, clsDetachScalarsFunction, clsScalarsDataFuntion, clsAddScalarFunction As New RFunction + Private bFirstLoad As Boolean = True Private strPackageName As String - Public clsCommands As New RFunction Private Sub dlgEnter_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -37,26 +34,62 @@ Public Class dlgEnter TestOKEnabled() autoTranslate(Me) End Sub + Private Sub SetEntryHistory() ucrReceiverForEnterCalculation.AddtoCombobox(ucrReceiverForEnterCalculation.GetText) End Sub Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 458 + + ucrSelectorEnter.SetItemType("scalar") + ucrSelectorEnter.HideShowAddOrDataOptionsOrListView(bAddVisible:=False, bDataOptionsVisible:=False, bListVariables:=False) + + ucrReceiverForEnterCalculation.strSelectorHeading = "Scalars" + ucrReceiverForEnterCalculation.Selector = ucrSelectorEnter + ucrTryModelling.SetReceiver(ucrReceiverForEnterCalculation) ucrTryModelling.SetIsCommand() ucrTryModelling.StrvecOutputRequired() + + ucrChkStoreScalar.SetText("Store Scalar") + + clsAddScalarFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$add_scalar") + + clsScalarsDataFuntion.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_scalars") + clsScalarsDataFuntion.SetAssignTo("scalars") + + clsAttachScalarsFunction.SetRCommand("attach") + clsDetachScalarsFunction.SetRCommand("detach") + clsAttachScalarsFunction.AddParameter("what", clsRFunctionParameter:=clsScalarsDataFuntion) + clsDetachScalarsFunction.AddParameter("name", "scalars") + clsDetachScalarsFunction.AddParameter("unload", "TRUE") + clsAttach.SetRCommand("attach") - clsAttach.AddParameter("what", clsRFunctionParameter:=ucrDataFrameEnter.clsCurrDataFrame) + clsAttach.AddParameter("what", clsRFunctionParameter:=ucrSelectorEnter.ucrAvailableDataFrames.clsCurrDataFrame) clsDetach.SetRCommand("detach") - clsDetach.AddParameter("name", clsRFunctionParameter:=ucrDataFrameEnter.clsCurrDataFrame) clsDetach.AddParameter("unload", "TRUE") + ucrBase.clsRsyntax.SetCommandString("") + ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach, 0) + ucrBase.clsRsyntax.AddToBeforeCodes(clsAttachScalarsFunction, 1) + + ucrBase.clsRsyntax.AddToAfterCodes(clsDetach, 0) + ucrBase.clsRsyntax.AddToAfterCodes(clsDetachScalarsFunction, 1) + ucrSaveEnterResultInto.SetPrefix("enter") - ucrSaveEnterResultInto.SetDataFrameSelector(ucrDataFrameEnter) + ucrSaveEnterResultInto.SetDataFrameSelector(ucrSelectorEnter.ucrAvailableDataFrames) ucrSaveEnterResultInto.SetIsComboBox() ucrSaveEnterResultInto.SetSaveTypeAsColumn() - ucrSaveEnterResultInto.SetLabelText("Enter Result Into:") + ucrSaveEnterResultInto.SetCheckBoxText("Enter Result") + ucrSaveEnterResultInto.SetAssignToIfUncheckedValue("last_enter") + + ucrSaveEnterResultInto.SetPrefix("enter") + ucrSaveEnterResultInto.SetSaveTypeAsColumn() + ucrSaveEnterResultInto.SetIsComboBox() + ucrSaveEnterResultInto.SetCheckBoxText("Enter Result") + ucrSaveEnterResultInto.SetAssignToIfUncheckedValue("last_enter") + ucrSaveEnterResultInto.SetDataFrameSelector(ucrSelectorEnter.ucrAvailableDataFrames) 'Adding tooltips for the buttons ttEnter.SetToolTip(cmdColon, "A subset, e.g. letters[1:4] gives a, b, c, d.") @@ -71,21 +104,42 @@ Public Class dlgEnter ttEnter.SetToolTip(cmdConcantenateFunction, "Combines arguments to form a single vector, e.g. c(1:3 8) is 1, 2, 3, 8.") ttEnter.SetToolTip(cmdExponential, "For scientific notation, e.g. 1.5E-1 = 0.15.") - ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach) - ucrBase.clsRsyntax.AddToAfterCodes(clsDetach) End Sub + + Private Sub checkScalars_CheckedChanged(sender As Object, e As EventArgs) Handles checkScalars.CheckedChanged + If checkScalars.Checked Then + ucrSelectorEnter.HideShowAddOrDataOptionsOrListView(bAddVisible:=True, bDataOptionsVisible:=False, bListVariables:=True) + Else + ucrSelectorEnter.HideShowAddOrDataOptionsOrListView(bAddVisible:=False, bDataOptionsVisible:=False, bListVariables:=False) + End If + End Sub + Private Sub SetDefaults() chkShowEnterArguments.Checked = False - ucrDataFrameEnter.Reset() + ucrChkStoreScalar.Checked = False + ucrSelectorEnter.Reset() + checkScalars.Checked = False + ucrSaveEnterResultInto.ucrChkSave.Checked = True ucrReceiverForEnterCalculation.Clear() + ucrReceiverForEnterCalculation.SetMeAsReceiver() ucrTryModelling.SetRSyntax(ucrBase.clsRsyntax) ucrSaveEnterResultInto.SetRCode(ucrBase.clsRsyntax.clsBaseCommandString) + SaveResults() + ucrBase.clsRsyntax.SetAssignTo(ucrSaveEnterResultInto.GetText(), strTempColumn:=ucrSaveEnterResultInto.GetText(), + strTempDataframe:=ucrSelectorEnter.ucrAvailableDataFrames.cboAvailableDataFrames.Text, + bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix, + bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames, + bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore, + bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength) End Sub + Private Sub ReopenDialog() SaveResults() End Sub + Private Sub TestOKEnabled() - If Not ucrReceiverForEnterCalculation.IsEmpty AndAlso ucrSaveEnterResultInto.IsComplete Then + If Not ucrReceiverForEnterCalculation.IsEmpty AndAlso ucrSaveEnterResultInto.IsComplete AndAlso + (ucrChkStoreScalar.Checked OrElse ucrSaveEnterResultInto.ucrChkSave.Checked) Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -93,8 +147,7 @@ Public Class dlgEnter End Sub Private Sub SaveResults() - If ucrSaveEnterResultInto.IsComplete Then - ucrBase.clsRsyntax.SetAssignTo(ucrSaveEnterResultInto.GetText(), strTempColumn:=ucrSaveEnterResultInto.GetText(), strTempDataframe:=ucrDataFrameEnter.cboAvailableDataFrames.Text, bRequireCorrectLength:=False) + If ucrSaveEnterResultInto.IsComplete AndAlso ucrSaveEnterResultInto.ucrChkSave.Checked Then ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = True ucrBase.clsRsyntax.iCallType = 0 Else @@ -102,27 +155,17 @@ Public Class dlgEnter ucrBase.clsRsyntax.iCallType = 2 ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False End If - End Sub - - Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) Handles ucrBase.BeforeClickOk - 'Dim strScript As String = "" - 'Dim strFunc As String - 'clsAttach.AddParameter("what", clsRFunctionParameter:=ucrDataFrameEnter.clsCurrDataFrame) - 'strFunc = clsAttach.ToScript(strScript) - ' frmMain.clsRLink.RunScript(strScript & strFunc) + ManageScalarStorage() End Sub Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk - 'Dim strScript As String = "" - ' Dim strFunc As String - 'clsDetach.AddParameter("name", clsRFunctionParameter:=ucrDataFrameEnter.clsCurrDataFrame) - 'strFunc = clsDetach.ToScript(strScript) - 'frmMain.clsRLink.RunScript(strScript & strFunc) SetEntryHistory() End Sub Private Sub ucrReceiverForCalculation_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverForEnterCalculation.SelectionChanged ucrBase.clsRsyntax.SetCommandString(ucrReceiverForEnterCalculation.GetVariableNames(False)) + ucrChkStoreScalar.Checked = False + SaveResults() TestOKEnabled() End Sub @@ -194,7 +237,6 @@ Public Class dlgEnter TestOKEnabled() End Sub - Private Sub cmdLETTERS_Click(sender As Object, e As EventArgs) Handles cmdLogical.Click ucrReceiverForEnterCalculation.AddToReceiverAtCursorPosition("as.logical(c( ))", 3) TestOKEnabled() @@ -210,14 +252,6 @@ Public Class dlgEnter TestOKEnabled() End Sub - Private Sub ucrSaveEnterResultInto_NameChanged() - SaveResults() - End Sub - - Private Sub ucrSaveEnterResultInto_ContentsChanged() - TestOKEnabled() - End Sub - ''' ''' displays a popup with example commands just above the input receiver ''' @@ -383,4 +417,45 @@ Public Class dlgEnter frmMaximiseOutput.Show(strFileName:=clsFileUrlUtilities.GetHelpFileURL(strPackageName:=strPackageName), bReplace:=False) End If End Sub + + Private Sub ucrSaveEnterResultInto_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSaveEnterResultInto.ControlValueChanged + Dim strDataFrame As String = ucrSelectorEnter.ucrAvailableDataFrames.strCurrDataFrame + + clsDetach.AddParameter("name", strDataFrame) + clsScalarsDataFuntion.AddParameter("data_name", Chr(34) & strDataFrame & Chr(34)) + clsAddScalarFunction.AddParameter("data_name", Chr(34) & strDataFrame & Chr(34), iPosition:=0) + SaveResults() + TestOKEnabled() + End Sub + + Private Sub ManageScalarStorage() + If ucrChkStoreScalar.Checked AndAlso Not ucrReceiverForEnterCalculation.IsEmpty Then + Dim strResut As String = ucrSaveEnterResultInto.GetText + clsAddScalarFunction.AddParameter("scalar_name", Chr(34) & strResut & Chr(34), iPosition:=1) + clsAddScalarFunction.AddParameter("scalar_value", strResut, iPosition:=2) + ucrBase.clsRsyntax.AddToAfterCodes(clsAddScalarFunction, 2) + ucrBase.clsRsyntax.SetAssignTo(strResut) + + ucrSaveEnterResultInto.btnColumnPosition.Enabled = False + ucrSaveEnterResultInto.ucrChkSave.Enabled = False + ucrSaveEnterResultInto.ucrChkSave.Checked = False + + Else + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsAddScalarFunction) + ucrSaveEnterResultInto.btnColumnPosition.Enabled = True + ucrSaveEnterResultInto.ucrChkSave.Enabled = True + End If + ucrSaveEnterResultInto.btnColumnPosition.Visible = True + ucrSaveEnterResultInto.ucrInputComboSave.Visible = True + ucrSaveEnterResultInto.ucrInputComboSave.Enabled = True + TestOKEnabled() + End Sub + + Private Sub ucrChkStoreScalar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkStoreScalar.ControlValueChanged + ManageScalarStorage() + End Sub + + Private Sub ucrSaveEnterResultInto_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveEnterResultInto.ControlContentsChanged + SaveResults() + End Sub End Class diff --git a/instat/dlgEvapotranspiration.vb b/instat/dlgEvapotranspiration.vb index b78cee3e008..c7c7900f48a 100644 --- a/instat/dlgEvapotranspiration.vb +++ b/instat/dlgEvapotranspiration.vb @@ -98,7 +98,7 @@ Public Class dlgEvapotranspiration ucrReceiverHumidityMin.SetClimaticType("hum_min") ucrReceiverHumidityMin.bAutoFill = True - ucrReceiverWindSpeed.SetParameter(New RParameter("u2", 7)) + ucrReceiverWindSpeed.SetParameter(New RParameter("uz", 7)) ucrReceiverWindSpeed.SetParameterIsRFunction() ucrReceiverWindSpeed.SetClimaticType("wind_speed") ucrReceiverWindSpeed.bAutoFill = True @@ -153,7 +153,7 @@ Public Class dlgEvapotranspiration ucrPnlMethod.AddToLinkedControls(ucrReceiverExtraRadiation, {rdoHargreavesSamani}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlMethod.AddToLinkedControls(ucrNudAlpha, {rdoPriestleyTaylor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="0.23") - ucrReceiverExtraRadiation.SetLinkedDisplayControl(lblRa) + ucrReceiverExtraRadiation.SetLinkedDisplayControl(lblRA) ucrReceiverRadiation.SetLinkedDisplayControl(lblRadiation) ucrReceiverHumidityMax.SetLinkedDisplayControl(lblHumidityMax) ucrReceiverHumidityMin.SetLinkedDisplayControl(lblHumidityMin) @@ -488,7 +488,7 @@ Public Class dlgEvapotranspiration Private Sub ucrReceiverWindSpeed_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWindSpeed.ControlValueChanged, ucrChkWind.ControlValueChanged If ucrChkWind.Checked AndAlso Not ucrReceiverWindSpeed.IsEmpty Then - clsVarnamesVectorPMFunction.AddParameter("x", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorPMFunction.AddParameter("x", Chr(34) & "uz" & Chr(34), bIncludeArgumentName:=False) Else clsVarnamesVectorPMFunction.RemoveParameterByName("x") ucrReceiverHumidityMax.SetMeAsReceiver() diff --git a/instat/dlgExtremes.vb b/instat/dlgExtremes.vb index 122ebf33a53..46840734212 100644 --- a/instat/dlgExtremes.vb +++ b/instat/dlgExtremes.vb @@ -86,7 +86,7 @@ clsInitialListFunction, clsOmitMissingFunction As New RFunction ucrSaveExtremes.SetPrefix("extreme") ucrSaveExtremes.SetIsComboBox() - ucrSaveExtremes.SetCheckBoxText("Save Model:") + ucrSaveExtremes.SetCheckBoxText("Store Model:") ucrSaveExtremes.SetSaveTypeAsModel() ucrSaveExtremes.SetDataFrameSelector(ucrSelectorExtremes.ucrAvailableDataFrames) ucrSaveExtremes.SetAssignToIfUncheckedValue("last_model") diff --git a/instat/dlgExtremesClimatic.vb b/instat/dlgExtremesClimatic.vb index da47e4c0784..6c6052c193c 100644 --- a/instat/dlgExtremesClimatic.vb +++ b/instat/dlgExtremesClimatic.vb @@ -257,14 +257,14 @@ Public Class dlgExtremesClimatic ucrSaveMrlPlot.SetPrefix("mrl_plot") ucrSaveMrlPlot.SetSaveTypeAsGraph() ucrSaveMrlPlot.SetIsComboBox() - ucrSaveMrlPlot.SetCheckBoxText("Save Graph") + ucrSaveMrlPlot.SetCheckBoxText("Store Graph") ucrSaveMrlPlot.SetAssignToIfUncheckedValue("last_graph") ucrSaveThresholdPlot.SetDataFrameSelector(ucrSelectorClimaticExtremes.ucrAvailableDataFrames) ucrSaveThresholdPlot.SetPrefix("threshold_plot") ucrSaveThresholdPlot.SetSaveTypeAsGraph() ucrSaveThresholdPlot.SetIsComboBox() - ucrSaveThresholdPlot.SetCheckBoxText("Save Graph") + ucrSaveThresholdPlot.SetCheckBoxText("Store Graph") ucrSaveThresholdPlot.SetAssignToIfUncheckedValue("last_graph") ucrNudDeclusterColumns.SetParameter(New RParameter("ncol", 7)) @@ -275,7 +275,7 @@ Public Class dlgExtremesClimatic ucrSaveDeclusteredPlot.SetPrefix("declustered_plot") ucrSaveDeclusteredPlot.SetSaveTypeAsGraph() ucrSaveDeclusteredPlot.SetIsComboBox() - ucrSaveDeclusteredPlot.SetCheckBoxText("Save Graph") + ucrSaveDeclusteredPlot.SetCheckBoxText("Store Graph") ucrSaveDeclusteredPlot.SetAssignToIfUncheckedValue("last_graph") ucrInputDistribution.SetParameter(New RParameter("type", 4)) diff --git a/instat/dlgFitCorruptionModel.vb b/instat/dlgFitCorruptionModel.vb index b17694a8fe5..bb4eb2ad90f 100644 --- a/instat/dlgFitCorruptionModel.vb +++ b/instat/dlgFitCorruptionModel.vb @@ -78,7 +78,7 @@ Public Class dlgCorruptionFitModel ucrSaveCorruptionModel.SetPrefix("Corruption_Model") ucrSaveCorruptionModel.SetSaveTypeAsModel() ucrSaveCorruptionModel.SetDataFrameSelector(ucrSelectorFitModel.ucrAvailableDataFrames) - ucrSaveCorruptionModel.SetCheckBoxText("Save Model") + ucrSaveCorruptionModel.SetCheckBoxText("Store Model") ucrSaveCorruptionModel.SetIsComboBox() ucrSaveCorruptionModel.SetAssignToIfUncheckedValue("last_model") End Sub diff --git a/instat/dlgFitModel.vb b/instat/dlgFitModel.vb index 647967813f2..d9e6da9f826 100644 --- a/instat/dlgFitModel.vb +++ b/instat/dlgFitModel.vb @@ -80,7 +80,7 @@ Public Class dlgFitModel ucrModelName.SetDataFrameSelector(ucrSelectorByDataFrameAddRemoveForFitModel.ucrAvailableDataFrames) ucrModelName.SetPrefix("gen_model") ucrModelName.SetSaveTypeAsModel() - ucrModelName.SetCheckBoxText("Save Model") + ucrModelName.SetCheckBoxText("Store Model") ucrModelName.SetIsComboBox() ucrModelName.SetAssignToIfUncheckedValue("last_model") End Sub diff --git a/instat/dlgFourVariableModelling.vb b/instat/dlgFourVariableModelling.vb index 319eff77da8..5b506c46c9f 100644 --- a/instat/dlgFourVariableModelling.vb +++ b/instat/dlgFourVariableModelling.vb @@ -96,7 +96,7 @@ Public Class dlgFourVariableModelling ucrSaveModel.SetPrefix("reg") ucrSaveModel.SetDataFrameSelector(ucrSelectorFourVariableModelling.ucrAvailableDataFrames) ucrSaveModel.SetSaveTypeAsModel() - ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetCheckBoxText("Store Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") diff --git a/instat/dlgGeneralForGraphics.vb b/instat/dlgGeneralForGraphics.vb index 04112a21464..6605d8b45dc 100644 --- a/instat/dlgGeneralForGraphics.vb +++ b/instat/dlgGeneralForGraphics.vb @@ -172,7 +172,7 @@ Public Class dlgGeneralForGraphics ucrSave.SetPrefix("graph") ucrSave.SetIsComboBox() ucrSave.SetSaveTypeAsGraph() - ucrSave.SetCheckBoxText("Save") + ucrSave.SetCheckBoxText("Store") ucrSave.SetDataFrameSelector(ucrGraphicsSelector.ucrAvailableDataFrames) ucrSave.SetAssignToIfUncheckedValue("last_graph") VariableXType() diff --git a/instat/dlgHeatMapPlot.vb b/instat/dlgHeatMapPlot.vb index aef1a4223e8..c9ac609d37d 100644 --- a/instat/dlgHeatMapPlot.vb +++ b/instat/dlgHeatMapPlot.vb @@ -159,7 +159,7 @@ Public Class dlgHeatMapPlot ucrSaveGraph.SetPrefix("heatmap") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetIsComboBox() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetDataFrameSelector(ucrHeatMapSelector.ucrAvailableDataFrames) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index 74b2176d8c6..17dbfb99324 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -203,7 +203,7 @@ Public Class dlgHistogram ucrSaveHist.SetPrefix("histogram") ucrSaveHist.SetDataFrameSelector(ucrHistogramSelector.ucrAvailableDataFrames) ucrSaveHist.SetIsComboBox() - ucrSaveHist.SetCheckBoxText("Save Graph") + ucrSaveHist.SetCheckBoxText("Store Graph") ucrSaveHist.SetSaveTypeAsGraph() ucrSaveHist.SetAssignToIfUncheckedValue("last_graph") DialogueSize() diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index c376b0bdb9f..bcf7cd18f0d 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -206,7 +206,7 @@ Public Class dlgHomogenization ucrInputPenValue.SetValidationTypeAsNumeric() ttOptions.SetToolTip(ucrInputPenValue.txtInput, "The theoretical type I error e.g.0.05 when using the Asymptotic penalty. A vector of length 2 (min,max) if using the CROPS penalty") - ucrSaveResult.SetCheckBoxText("Save Test Object:") + ucrSaveResult.SetCheckBoxText("Store Test Object:") ucrPnlOptions.AddToLinkedControls({ucrSelectorHomogenization, ucrSaveResult, ucrReceiverNeighbour, ucrReceiverStation, ucrReceiverElement}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrInputClimateVariables}, {rdoPrepare, rdoQualityControl, rdoHomogenization, rdoMonthlyTotals}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) diff --git a/instat/dlgHypothesisTestsCalculator.vb b/instat/dlgHypothesisTestsCalculator.vb index 9debb587c7e..1b393cccdc5 100644 --- a/instat/dlgHypothesisTestsCalculator.vb +++ b/instat/dlgHypothesisTestsCalculator.vb @@ -48,7 +48,7 @@ Public Class dlgHypothesisTestsCalculator ucrSaveResult.SetPrefix("test") ucrSaveResult.SetIsComboBox() ucrSaveResult.SetSaveTypeAsModel() - ucrSaveResult.SetCheckBoxText("Save test object") + ucrSaveResult.SetCheckBoxText("Store test object") ucrSaveResult.SetAssignToIfUncheckedValue("Last_Test") ucrSaveResult.SetDataFrameSelector(ucrSelectorColumn.ucrAvailableDataFrames) diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index 215c4e7b639..5370ce37a79 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -59,7 +59,7 @@ Public Class dlgIDFCurves ucrSave.SetPrefix("Prec_accum") ucrSave.SetIsComboBox() - ucrSave.SetCheckBoxText("Save DataFrame") + ucrSave.SetCheckBoxText("Store DataFrame") ucrSave.SetSaveTypeAsDataFrame() ucrSave.SetDataFrameSelector(ucrIDFCurvesSelector.ucrAvailableDataFrames) ucrSave.SetAssignToIfUncheckedValue("last_accum") diff --git a/instat/dlgInfillMissingValues.vb b/instat/dlgInfillMissingValues.vb index 1a90511ddec..92c2342f252 100644 --- a/instat/dlgInfillMissingValues.vb +++ b/instat/dlgInfillMissingValues.vb @@ -285,7 +285,7 @@ Public Class dlgInfillMissingValues ucrSaveGraph.SetPrefix("missing_plot") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorInfillMissing.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index ca4fe3055d8..a750178ff13 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -106,7 +106,7 @@ Public Class dlgInventoryPlot ucrChkDay.SetRDefault("FALSE") ucrSaveDetails.SetPrefix("details") - ucrSaveDetails.SetCheckBoxText("Save Details") + ucrSaveDetails.SetCheckBoxText("Store Details") ucrSaveDetails.SetSaveTypeAsDataFrame() ucrSaveDetails.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) ucrSaveDetails.SetIsComboBox() @@ -160,7 +160,7 @@ Public Class dlgInventoryPlot ucrSaveGraph.SetPrefix("inventory") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgLinePlot.vb b/instat/dlgLinePlot.vb index b5d457c0fc9..c5338de519e 100644 --- a/instat/dlgLinePlot.vb +++ b/instat/dlgLinePlot.vb @@ -205,7 +205,7 @@ Public Class dlgLinePlot ucrSave.SetPrefix("line_plot") ucrSave.SetIsComboBox() ucrSave.SetSaveTypeAsGraph() - ucrSave.SetCheckBoxText("Save Graph") + ucrSave.SetCheckBoxText("Store Graph") ucrSave.SetDataFrameSelector(ucrLinePlotSelector.ucrAvailableDataFrames) ucrSave.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgModelling.vb b/instat/dlgModelling.vb index 9af0dd39c44..cae0e1ed343 100644 --- a/instat/dlgModelling.vb +++ b/instat/dlgModelling.vb @@ -60,7 +60,7 @@ Public Class dlgModelling ucrSaveResult.SetPrefix("model") ucrSaveResult.SetIsComboBox() ucrSaveResult.SetSaveTypeAsModel() - ucrSaveResult.SetCheckBoxText("Save Model") + ucrSaveResult.SetCheckBoxText("Store Model") ucrSaveResult.SetAssignToIfUncheckedValue("last_model") ucrSaveResult.SetDataFrameSelector(ucrSelectorModelling.ucrAvailableDataFrames) diff --git a/instat/dlgMosaicPlot.vb b/instat/dlgMosaicPlot.vb index f4f6c2cf6f0..c8b26f265e4 100644 --- a/instat/dlgMosaicPlot.vb +++ b/instat/dlgMosaicPlot.vb @@ -174,7 +174,7 @@ Public Class dlgMosaicPlot ucrSaveMosaicPlot.SetPrefix("mosaic") ucrSaveMosaicPlot.SetIsComboBox() - ucrSaveMosaicPlot.SetCheckBoxText("Save Graph") + ucrSaveMosaicPlot.SetCheckBoxText("Store Graph") ucrSaveMosaicPlot.SetSaveTypeAsGraph() ucrSaveMosaicPlot.SetDataFrameSelector(ucrSelectorMosaicPlot.ucrAvailableDataFrames) ucrSaveMosaicPlot.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgNewMarkovChains.Designer.vb b/instat/dlgNewMarkovChains.Designer.vb index 6a367c32415..30e8be4f219 100644 --- a/instat/dlgNewMarkovChains.Designer.vb +++ b/instat/dlgNewMarkovChains.Designer.vb @@ -85,7 +85,7 @@ Partial Class dlgNewMarkovChains Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrBase.Location = New System.Drawing.Point(12, 437) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(405, 52) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 0 ' 'ucrSelectorMarkovChains @@ -389,7 +389,7 @@ Partial Class dlgNewMarkovChains Me.chkSaveModel.Name = "chkSaveModel" Me.chkSaveModel.Size = New System.Drawing.Size(83, 17) Me.chkSaveModel.TabIndex = 20 - Me.chkSaveModel.Text = "Save Model" + Me.chkSaveModel.Text = "Store Model" Me.chkSaveModel.UseVisualStyleBackColor = True ' 'chkGraph diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4301e18009f..565148d5c77 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -88,7 +88,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetSaveTypeAsModel() - ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetCheckBoxText("Store Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") @@ -651,13 +651,13 @@ Public Class dlgOneVarFitModel Private Sub SetSaveLabelTextAndPrefix() If rdoGeneralCase.Checked Then - ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetCheckBoxText("Store Model") ucrSaveModel.SetPrefix("dist") ElseIf rdoTest.Checked Then - ucrSaveModel.SetCheckBoxText("Save Test") + ucrSaveModel.SetCheckBoxText("Store Test") ucrSaveModel.SetPrefix("test") ElseIf rdoEstimate.Checked Then - ucrSaveModel.SetCheckBoxText("Save Estimate") + ucrSaveModel.SetCheckBoxText("Store Estimate") ucrSaveModel.SetPrefix("ci") Else MsgBox("Developer error: the Radio Button has not been added to the Panel.") diff --git a/instat/dlgOptions.Designer.vb b/instat/dlgOptions.Designer.vb index 41fe03ab1e8..ed5bd9584f7 100644 --- a/instat/dlgOptions.Designer.vb +++ b/instat/dlgOptions.Designer.vb @@ -38,12 +38,12 @@ Partial Class dlgOptions 'Do not modify it using the code editor. Private Sub InitializeComponent() - Dim TreeNode1 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Languages") - Dim TreeNode2 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Comments") - Dim TreeNode3 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Import") - Dim TreeNode4 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Output Window") - Dim TreeNode5 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Commands") - Dim TreeNode6 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Data View") + Dim TreeNode7 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Languages") + Dim TreeNode8 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Comments") + Dim TreeNode9 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Import") + Dim TreeNode10 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Output Window") + Dim TreeNode11 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Commands") + Dim TreeNode12 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Data View") Me.cmdApply = New System.Windows.Forms.Button() Me.cmdHelp = New System.Windows.Forms.Button() Me.cmdCancel = New System.Windows.Forms.Button() @@ -153,10 +153,9 @@ Partial Class dlgOptions ' 'cmdApply ' - Me.cmdApply.Location = New System.Drawing.Point(576, 486) - Me.cmdApply.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdApply.Location = New System.Drawing.Point(384, 324) Me.cmdApply.Name = "cmdApply" - Me.cmdApply.Size = New System.Drawing.Size(112, 34) + Me.cmdApply.Size = New System.Drawing.Size(75, 23) Me.cmdApply.TabIndex = 10 Me.cmdApply.Tag = "Apply" Me.cmdApply.Text = "Apply" @@ -164,10 +163,9 @@ Partial Class dlgOptions ' 'cmdHelp ' - Me.cmdHelp.Location = New System.Drawing.Point(698, 486) - Me.cmdHelp.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdHelp.Location = New System.Drawing.Point(465, 324) Me.cmdHelp.Name = "cmdHelp" - Me.cmdHelp.Size = New System.Drawing.Size(112, 34) + Me.cmdHelp.Size = New System.Drawing.Size(75, 23) Me.cmdHelp.TabIndex = 12 Me.cmdHelp.Tag = "Help" Me.cmdHelp.Text = "Help" @@ -175,10 +173,9 @@ Partial Class dlgOptions ' 'cmdCancel ' - Me.cmdCancel.Location = New System.Drawing.Point(454, 486) - Me.cmdCancel.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdCancel.Location = New System.Drawing.Point(303, 324) Me.cmdCancel.Name = "cmdCancel" - Me.cmdCancel.Size = New System.Drawing.Size(112, 34) + Me.cmdCancel.Size = New System.Drawing.Size(75, 23) Me.cmdCancel.TabIndex = 9 Me.cmdCancel.Tag = "Cancel" Me.cmdCancel.Text = "Cancel" @@ -186,10 +183,9 @@ Partial Class dlgOptions ' 'cmdOk ' - Me.cmdOk.Location = New System.Drawing.Point(333, 486) - Me.cmdOk.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdOk.Location = New System.Drawing.Point(222, 324) Me.cmdOk.Name = "cmdOk" - Me.cmdOk.Size = New System.Drawing.Size(112, 34) + Me.cmdOk.Size = New System.Drawing.Size(75, 23) Me.cmdOk.TabIndex = 11 Me.cmdOk.Tag = "Ok" Me.cmdOk.Text = "Ok" @@ -198,10 +194,9 @@ Partial Class dlgOptions 'cmdLanguage ' Me.cmdLanguage.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdLanguage.Location = New System.Drawing.Point(818, 486) - Me.cmdLanguage.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdLanguage.Location = New System.Drawing.Point(545, 324) Me.cmdLanguage.Name = "cmdLanguage" - Me.cmdLanguage.Size = New System.Drawing.Size(56, 34) + Me.cmdLanguage.Size = New System.Drawing.Size(37, 23) Me.cmdLanguage.TabIndex = 13 Me.cmdLanguage.Tag = "" Me.cmdLanguage.Text = "Lang" @@ -209,8 +204,7 @@ Partial Class dlgOptions ' 'spltControls ' - Me.spltControls.Location = New System.Drawing.Point(8, 2) - Me.spltControls.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.spltControls.Location = New System.Drawing.Point(5, 1) Me.spltControls.Name = "spltControls" ' 'spltControls.Panel1 @@ -221,17 +215,15 @@ Partial Class dlgOptions 'spltControls.Panel2 ' Me.spltControls.Panel2.Controls.Add(Me.tbcOptions) - Me.spltControls.Size = New System.Drawing.Size(1140, 476) - Me.spltControls.SplitterDistance = 276 - Me.spltControls.SplitterWidth = 6 + Me.spltControls.Size = New System.Drawing.Size(760, 317) + Me.spltControls.SplitterDistance = 184 Me.spltControls.TabIndex = 8 ' 'cmdFactoryReset ' - Me.cmdFactoryReset.Location = New System.Drawing.Point(20, 430) - Me.cmdFactoryReset.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFactoryReset.Location = New System.Drawing.Point(13, 287) Me.cmdFactoryReset.Name = "cmdFactoryReset" - Me.cmdFactoryReset.Size = New System.Drawing.Size(150, 34) + Me.cmdFactoryReset.Size = New System.Drawing.Size(100, 23) Me.cmdFactoryReset.TabIndex = 13 Me.cmdFactoryReset.Tag = "Help" Me.cmdFactoryReset.Text = "Factory Reset" @@ -241,32 +233,31 @@ Partial Class dlgOptions ' Me.trOptions.Dock = System.Windows.Forms.DockStyle.Fill Me.trOptions.Location = New System.Drawing.Point(0, 0) - Me.trOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.trOptions.Name = "trOptions" - TreeNode1.Name = "ndLanguages" - TreeNode1.Tag = "1" - TreeNode1.Text = "Languages" - TreeNode1.ToolTipText = "Choose different languages" - TreeNode2.Name = "ndComments" - TreeNode2.Tag = "2" - TreeNode2.Text = "Comments" - TreeNode2.ToolTipText = "Comments for the dialogs" - TreeNode3.Name = "ndImport" - TreeNode3.Tag = "3" - TreeNode3.Text = "Import" - TreeNode3.ToolTipText = "Import Data Settings" - TreeNode4.Name = "ndOutputWindow" - TreeNode4.Tag = "4" - TreeNode4.Text = "Output Window" - TreeNode4.ToolTipText = "Output Window Formatting Options" - TreeNode5.Name = "ndCommands" - TreeNode5.Tag = "8" - TreeNode5.Text = "Commands" - TreeNode5.ToolTipText = "Commands Options" - TreeNode6.Name = "ndDataView" - TreeNode6.Text = "Data View" - Me.trOptions.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode1, TreeNode2, TreeNode3, TreeNode4, TreeNode5, TreeNode6}) - Me.trOptions.Size = New System.Drawing.Size(276, 476) + TreeNode7.Name = "ndLanguages" + TreeNode7.Tag = "1" + TreeNode7.Text = "Languages" + TreeNode7.ToolTipText = "Choose different languages" + TreeNode8.Name = "ndComments" + TreeNode8.Tag = "2" + TreeNode8.Text = "Comments" + TreeNode8.ToolTipText = "Comments for the dialogs" + TreeNode9.Name = "ndImport" + TreeNode9.Tag = "3" + TreeNode9.Text = "Import" + TreeNode9.ToolTipText = "Import Data Settings" + TreeNode10.Name = "ndOutputWindow" + TreeNode10.Tag = "4" + TreeNode10.Text = "Output Window" + TreeNode10.ToolTipText = "Output Window Formatting Options" + TreeNode11.Name = "ndCommands" + TreeNode11.Tag = "8" + TreeNode11.Text = "Commands" + TreeNode11.ToolTipText = "Commands Options" + TreeNode12.Name = "ndDataView" + TreeNode12.Text = "Data View" + Me.trOptions.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode7, TreeNode8, TreeNode9, TreeNode10, TreeNode11, TreeNode12}) + Me.trOptions.Size = New System.Drawing.Size(184, 317) Me.trOptions.TabIndex = 0 ' 'tbcOptions @@ -285,10 +276,9 @@ Partial Class dlgOptions Me.tbcOptions.Controls.Add(Me.tbpWebsite) Me.tbcOptions.Dock = System.Windows.Forms.DockStyle.Fill Me.tbcOptions.Location = New System.Drawing.Point(0, 0) - Me.tbcOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.tbcOptions.Name = "tbcOptions" Me.tbcOptions.SelectedIndex = 0 - Me.tbcOptions.Size = New System.Drawing.Size(858, 476) + Me.tbcOptions.Size = New System.Drawing.Size(572, 317) Me.tbcOptions.TabIndex = 0 ' 'tbpLanguages @@ -296,11 +286,10 @@ Partial Class dlgOptions Me.tbpLanguages.Controls.Add(Me.lversion) Me.tbpLanguages.Controls.Add(Me.lblLanguage) Me.tbpLanguages.Controls.Add(Me.ucrInputLanguage) - Me.tbpLanguages.Location = New System.Drawing.Point(4, 29) - Me.tbpLanguages.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpLanguages.Location = New System.Drawing.Point(4, 22) Me.tbpLanguages.Name = "tbpLanguages" - Me.tbpLanguages.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpLanguages.Size = New System.Drawing.Size(850, 443) + Me.tbpLanguages.Padding = New System.Windows.Forms.Padding(3) + Me.tbpLanguages.Size = New System.Drawing.Size(564, 291) Me.tbpLanguages.TabIndex = 0 Me.tbpLanguages.Tag = "Languages" Me.tbpLanguages.Text = "Languages" @@ -308,9 +297,10 @@ Partial Class dlgOptions ' 'lversion ' - Me.lversion.Location = New System.Drawing.Point(459, 400) + Me.lversion.Location = New System.Drawing.Point(306, 267) + Me.lversion.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lversion.Name = "lversion" - Me.lversion.Size = New System.Drawing.Size(381, 27) + Me.lversion.Size = New System.Drawing.Size(254, 18) Me.lversion.TabIndex = 4 Me.lversion.Text = "v. " Me.lversion.TextAlign = System.Drawing.ContentAlignment.TopRight @@ -318,10 +308,9 @@ Partial Class dlgOptions 'lblLanguage ' Me.lblLanguage.AutoSize = True - Me.lblLanguage.Location = New System.Drawing.Point(14, 27) - Me.lblLanguage.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblLanguage.Location = New System.Drawing.Point(9, 18) Me.lblLanguage.Name = "lblLanguage" - Me.lblLanguage.Size = New System.Drawing.Size(89, 20) + Me.lblLanguage.Size = New System.Drawing.Size(61, 13) Me.lblLanguage.TabIndex = 3 Me.lblLanguage.Text = "Language :" ' @@ -331,20 +320,19 @@ Partial Class dlgOptions Me.ucrInputLanguage.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputLanguage.GetSetSelectedIndex = -1 Me.ucrInputLanguage.IsReadOnly = False - Me.ucrInputLanguage.Location = New System.Drawing.Point(112, 22) - Me.ucrInputLanguage.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputLanguage.Location = New System.Drawing.Point(75, 15) + Me.ucrInputLanguage.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputLanguage.Name = "ucrInputLanguage" - Me.ucrInputLanguage.Size = New System.Drawing.Size(165, 32) + Me.ucrInputLanguage.Size = New System.Drawing.Size(110, 21) Me.ucrInputLanguage.TabIndex = 2 ' 'tbpComments ' Me.tbpComments.Controls.Add(Me.pnComments) - Me.tbpComments.Location = New System.Drawing.Point(4, 29) - Me.tbpComments.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpComments.Location = New System.Drawing.Point(4, 22) Me.tbpComments.Name = "tbpComments" - Me.tbpComments.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpComments.Size = New System.Drawing.Size(850, 443) + Me.tbpComments.Padding = New System.Windows.Forms.Padding(3) + Me.tbpComments.Size = New System.Drawing.Size(564, 291) Me.tbpComments.TabIndex = 1 Me.tbpComments.Tag = "Comments" Me.tbpComments.Text = "Comments" @@ -355,10 +343,9 @@ Partial Class dlgOptions Me.pnComments.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.pnComments.Controls.Add(Me.ucrInputComment) Me.pnComments.Controls.Add(Me.lblComment) - Me.pnComments.Location = New System.Drawing.Point(15, 15) - Me.pnComments.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.pnComments.Location = New System.Drawing.Point(10, 10) Me.pnComments.Name = "pnComments" - Me.pnComments.Size = New System.Drawing.Size(586, 44) + Me.pnComments.Size = New System.Drawing.Size(391, 29) Me.pnComments.TabIndex = 2 ' 'ucrInputComment @@ -367,19 +354,18 @@ Partial Class dlgOptions Me.ucrInputComment.AutoSize = True Me.ucrInputComment.IsMultiline = False Me.ucrInputComment.IsReadOnly = False - Me.ucrInputComment.Location = New System.Drawing.Point(144, 8) - Me.ucrInputComment.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputComment.Location = New System.Drawing.Point(96, 5) + Me.ucrInputComment.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputComment.Name = "ucrInputComment" - Me.ucrInputComment.Size = New System.Drawing.Size(438, 32) + Me.ucrInputComment.Size = New System.Drawing.Size(292, 21) Me.ucrInputComment.TabIndex = 1 ' 'lblComment ' Me.lblComment.AutoSize = True - Me.lblComment.Location = New System.Drawing.Point(3, 14) - Me.lblComment.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblComment.Location = New System.Drawing.Point(2, 9) Me.lblComment.Name = "lblComment" - Me.lblComment.Size = New System.Drawing.Size(82, 20) + Me.lblComment.Size = New System.Drawing.Size(54, 13) Me.lblComment.TabIndex = 0 Me.lblComment.Tag = "Comment:" Me.lblComment.Text = "Comment:" @@ -389,10 +375,9 @@ Partial Class dlgOptions Me.tbpImport.Controls.Add(Me.lblPreviewRows) Me.tbpImport.Controls.Add(Me.ucrNudPreviewRows) Me.tbpImport.Controls.Add(Me.pnImportData) - Me.tbpImport.Location = New System.Drawing.Point(4, 29) - Me.tbpImport.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpImport.Location = New System.Drawing.Point(4, 22) Me.tbpImport.Name = "tbpImport" - Me.tbpImport.Size = New System.Drawing.Size(850, 443) + Me.tbpImport.Size = New System.Drawing.Size(564, 291) Me.tbpImport.TabIndex = 3 Me.tbpImport.Text = "Import" Me.tbpImport.UseVisualStyleBackColor = True @@ -400,10 +385,9 @@ Partial Class dlgOptions 'lblPreviewRows ' Me.lblPreviewRows.AutoSize = True - Me.lblPreviewRows.Location = New System.Drawing.Point(4, 14) - Me.lblPreviewRows.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblPreviewRows.Location = New System.Drawing.Point(3, 9) Me.lblPreviewRows.Name = "lblPreviewRows" - Me.lblPreviewRows.Size = New System.Drawing.Size(189, 20) + Me.lblPreviewRows.Size = New System.Drawing.Size(130, 13) Me.lblPreviewRows.TabIndex = 0 Me.lblPreviewRows.Text = "Number of Preview Rows:" ' @@ -412,12 +396,12 @@ Partial Class dlgOptions Me.ucrNudPreviewRows.AutoSize = True Me.ucrNudPreviewRows.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudPreviewRows.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPreviewRows.Location = New System.Drawing.Point(405, 8) - Me.ucrNudPreviewRows.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudPreviewRows.Location = New System.Drawing.Point(270, 5) + Me.ucrNudPreviewRows.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudPreviewRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudPreviewRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudPreviewRows.Name = "ucrNudPreviewRows" - Me.ucrNudPreviewRows.Size = New System.Drawing.Size(75, 30) + Me.ucrNudPreviewRows.Size = New System.Drawing.Size(50, 20) Me.ucrNudPreviewRows.TabIndex = 3 Me.ucrNudPreviewRows.Value = New Decimal(New Integer() {10, 0, 0, 0}) ' @@ -425,8 +409,7 @@ Partial Class dlgOptions ' Me.pnImportData.AutoSize = True Me.pnImportData.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.pnImportData.Location = New System.Drawing.Point(15, 15) - Me.pnImportData.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.pnImportData.Location = New System.Drawing.Point(10, 10) Me.pnImportData.Name = "pnImportData" Me.pnImportData.Size = New System.Drawing.Size(0, 0) Me.pnImportData.TabIndex = 2 @@ -439,11 +422,10 @@ Partial Class dlgOptions Me.tbpOutputWindow.Controls.Add(Me.ucrChkIncludeCommentsbyDefault) Me.tbpOutputWindow.Controls.Add(Me.grpROptions) Me.tbpOutputWindow.Controls.Add(Me.pnFormatOptions) - Me.tbpOutputWindow.Location = New System.Drawing.Point(4, 29) - Me.tbpOutputWindow.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpOutputWindow.Location = New System.Drawing.Point(4, 22) Me.tbpOutputWindow.Name = "tbpOutputWindow" - Me.tbpOutputWindow.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpOutputWindow.Size = New System.Drawing.Size(850, 443) + Me.tbpOutputWindow.Padding = New System.Windows.Forms.Padding(3) + Me.tbpOutputWindow.Size = New System.Drawing.Size(564, 291) Me.tbpOutputWindow.TabIndex = 2 Me.tbpOutputWindow.Text = "Output Window" Me.tbpOutputWindow.UseVisualStyleBackColor = True @@ -453,12 +435,12 @@ Partial Class dlgOptions Me.ucrNudMaxOutputsHeight.AutoSize = True Me.ucrNudMaxOutputsHeight.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxOutputsHeight.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxOutputsHeight.Location = New System.Drawing.Point(759, 202) - Me.ucrNudMaxOutputsHeight.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudMaxOutputsHeight.Location = New System.Drawing.Point(506, 135) + Me.ucrNudMaxOutputsHeight.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudMaxOutputsHeight.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaxOutputsHeight.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxOutputsHeight.Name = "ucrNudMaxOutputsHeight" - Me.ucrNudMaxOutputsHeight.Size = New System.Drawing.Size(75, 30) + Me.ucrNudMaxOutputsHeight.Size = New System.Drawing.Size(50, 20) Me.ucrNudMaxOutputsHeight.TabIndex = 29 Me.ucrNudMaxOutputsHeight.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -466,30 +448,30 @@ Partial Class dlgOptions ' Me.ucrChkMaxOutputsHeight.AutoSize = True Me.ucrChkMaxOutputsHeight.Checked = False - Me.ucrChkMaxOutputsHeight.Location = New System.Drawing.Point(450, 202) - Me.ucrChkMaxOutputsHeight.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkMaxOutputsHeight.Location = New System.Drawing.Point(300, 135) + Me.ucrChkMaxOutputsHeight.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkMaxOutputsHeight.Name = "ucrChkMaxOutputsHeight" - Me.ucrChkMaxOutputsHeight.Size = New System.Drawing.Size(294, 51) + Me.ucrChkMaxOutputsHeight.Size = New System.Drawing.Size(196, 34) Me.ucrChkMaxOutputsHeight.TabIndex = 28 ' 'ucrChkShowRCommandsinOutputWindow ' Me.ucrChkShowRCommandsinOutputWindow.AutoSize = True Me.ucrChkShowRCommandsinOutputWindow.Checked = False - Me.ucrChkShowRCommandsinOutputWindow.Location = New System.Drawing.Point(15, 240) - Me.ucrChkShowRCommandsinOutputWindow.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkShowRCommandsinOutputWindow.Location = New System.Drawing.Point(10, 160) + Me.ucrChkShowRCommandsinOutputWindow.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkShowRCommandsinOutputWindow.Name = "ucrChkShowRCommandsinOutputWindow" - Me.ucrChkShowRCommandsinOutputWindow.Size = New System.Drawing.Size(406, 51) + Me.ucrChkShowRCommandsinOutputWindow.Size = New System.Drawing.Size(271, 34) Me.ucrChkShowRCommandsinOutputWindow.TabIndex = 27 ' 'ucrChkIncludeCommentsbyDefault ' Me.ucrChkIncludeCommentsbyDefault.AutoSize = True Me.ucrChkIncludeCommentsbyDefault.Checked = False - Me.ucrChkIncludeCommentsbyDefault.Location = New System.Drawing.Point(15, 202) - Me.ucrChkIncludeCommentsbyDefault.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkIncludeCommentsbyDefault.Location = New System.Drawing.Point(10, 135) + Me.ucrChkIncludeCommentsbyDefault.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkIncludeCommentsbyDefault.Name = "ucrChkIncludeCommentsbyDefault" - Me.ucrChkIncludeCommentsbyDefault.Size = New System.Drawing.Size(406, 51) + Me.ucrChkIncludeCommentsbyDefault.Size = New System.Drawing.Size(271, 34) Me.ucrChkIncludeCommentsbyDefault.TabIndex = 26 ' 'grpROptions @@ -497,11 +479,9 @@ Partial Class dlgOptions Me.grpROptions.Controls.Add(Me.ucrChkShowSignifStars) Me.grpROptions.Controls.Add(Me.ucrNudDigits) Me.grpROptions.Controls.Add(Me.lblNoDigits) - Me.grpROptions.Location = New System.Drawing.Point(15, 288) - Me.grpROptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.grpROptions.Location = New System.Drawing.Point(10, 192) Me.grpROptions.Name = "grpROptions" - Me.grpROptions.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.grpROptions.Size = New System.Drawing.Size(406, 140) + Me.grpROptions.Size = New System.Drawing.Size(271, 93) Me.grpROptions.TabIndex = 25 Me.grpROptions.TabStop = False Me.grpROptions.Text = "R Options" @@ -510,10 +490,10 @@ Partial Class dlgOptions ' Me.ucrChkShowSignifStars.AutoSize = True Me.ucrChkShowSignifStars.Checked = False - Me.ucrChkShowSignifStars.Location = New System.Drawing.Point(10, 74) - Me.ucrChkShowSignifStars.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkShowSignifStars.Location = New System.Drawing.Point(7, 49) + Me.ucrChkShowSignifStars.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkShowSignifStars.Name = "ucrChkShowSignifStars" - Me.ucrChkShowSignifStars.Size = New System.Drawing.Size(382, 51) + Me.ucrChkShowSignifStars.Size = New System.Drawing.Size(255, 34) Me.ucrChkShowSignifStars.TabIndex = 28 ' 'ucrNudDigits @@ -521,22 +501,21 @@ Partial Class dlgOptions Me.ucrNudDigits.AutoSize = True Me.ucrNudDigits.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDigits.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDigits.Location = New System.Drawing.Point(266, 34) - Me.ucrNudDigits.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudDigits.Location = New System.Drawing.Point(177, 23) + Me.ucrNudDigits.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudDigits.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudDigits.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDigits.Name = "ucrNudDigits" - Me.ucrNudDigits.Size = New System.Drawing.Size(75, 30) + Me.ucrNudDigits.Size = New System.Drawing.Size(50, 20) Me.ucrNudDigits.TabIndex = 27 Me.ucrNudDigits.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblNoDigits ' Me.lblNoDigits.AutoSize = True - Me.lblNoDigits.Location = New System.Drawing.Point(9, 34) - Me.lblNoDigits.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblNoDigits.Location = New System.Drawing.Point(6, 23) Me.lblNoDigits.Name = "lblNoDigits" - Me.lblNoDigits.Size = New System.Drawing.Size(204, 20) + Me.lblNoDigits.Size = New System.Drawing.Size(137, 13) Me.lblNoDigits.TabIndex = 1 Me.lblNoDigits.Text = "Number of Digits to Display:" ' @@ -553,48 +532,43 @@ Partial Class dlgOptions Me.pnFormatOptions.Controls.Add(Me.lblOutputFormat) Me.pnFormatOptions.Controls.Add(Me.cmdCommentFormat) Me.pnFormatOptions.Controls.Add(Me.lblCommandFormat) - Me.pnFormatOptions.Location = New System.Drawing.Point(15, 15) - Me.pnFormatOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.pnFormatOptions.Location = New System.Drawing.Point(10, 10) Me.pnFormatOptions.Name = "pnFormatOptions" - Me.pnFormatOptions.Size = New System.Drawing.Size(586, 175) + Me.pnFormatOptions.Size = New System.Drawing.Size(391, 118) Me.pnFormatOptions.TabIndex = 21 ' 'rtbCommentPreview ' - Me.rtbCommentPreview.Location = New System.Drawing.Point(186, 134) - Me.rtbCommentPreview.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rtbCommentPreview.Location = New System.Drawing.Point(124, 89) Me.rtbCommentPreview.Name = "rtbCommentPreview" Me.rtbCommentPreview.ReadOnly = True - Me.rtbCommentPreview.Size = New System.Drawing.Size(218, 37) + Me.rtbCommentPreview.Size = New System.Drawing.Size(147, 26) Me.rtbCommentPreview.TabIndex = 22 Me.rtbCommentPreview.Text = "" ' 'rtbOutputPreview ' - Me.rtbOutputPreview.Location = New System.Drawing.Point(186, 74) - Me.rtbOutputPreview.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rtbOutputPreview.Location = New System.Drawing.Point(124, 49) Me.rtbOutputPreview.Name = "rtbOutputPreview" Me.rtbOutputPreview.ReadOnly = True - Me.rtbOutputPreview.Size = New System.Drawing.Size(218, 37) + Me.rtbOutputPreview.Size = New System.Drawing.Size(147, 26) Me.rtbOutputPreview.TabIndex = 21 Me.rtbOutputPreview.Text = "" ' 'rtbCommandPreview ' - Me.rtbCommandPreview.Location = New System.Drawing.Point(186, 14) - Me.rtbCommandPreview.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rtbCommandPreview.Location = New System.Drawing.Point(124, 9) Me.rtbCommandPreview.Name = "rtbCommandPreview" Me.rtbCommandPreview.ReadOnly = True - Me.rtbCommandPreview.Size = New System.Drawing.Size(218, 37) + Me.rtbCommandPreview.Size = New System.Drawing.Size(147, 26) Me.rtbCommandPreview.TabIndex = 20 Me.rtbCommandPreview.Text = "" ' 'cmdCommandFormat ' - Me.cmdCommandFormat.Location = New System.Drawing.Point(432, 14) - Me.cmdCommandFormat.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdCommandFormat.Location = New System.Drawing.Point(288, 9) Me.cmdCommandFormat.Name = "cmdCommandFormat" - Me.cmdCommandFormat.Size = New System.Drawing.Size(150, 34) + Me.cmdCommandFormat.Size = New System.Drawing.Size(100, 23) Me.cmdCommandFormat.TabIndex = 10 Me.cmdCommandFormat.Text = "Change..." Me.cmdCommandFormat.UseVisualStyleBackColor = True @@ -602,19 +576,17 @@ Partial Class dlgOptions 'lblCommentFormat ' Me.lblCommentFormat.AutoSize = True - Me.lblCommentFormat.Location = New System.Drawing.Point(6, 141) - Me.lblCommentFormat.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblCommentFormat.Location = New System.Drawing.Point(4, 94) Me.lblCommentFormat.Name = "lblCommentFormat" - Me.lblCommentFormat.Size = New System.Drawing.Size(137, 20) + Me.lblCommentFormat.Size = New System.Drawing.Size(89, 13) Me.lblCommentFormat.TabIndex = 19 Me.lblCommentFormat.Text = "Comment Format:" ' 'cmdOutputFormat ' - Me.cmdOutputFormat.Location = New System.Drawing.Point(432, 74) - Me.cmdOutputFormat.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdOutputFormat.Location = New System.Drawing.Point(288, 49) Me.cmdOutputFormat.Name = "cmdOutputFormat" - Me.cmdOutputFormat.Size = New System.Drawing.Size(150, 34) + Me.cmdOutputFormat.Size = New System.Drawing.Size(100, 23) Me.cmdOutputFormat.TabIndex = 16 Me.cmdOutputFormat.Text = "Change..." Me.cmdOutputFormat.UseVisualStyleBackColor = True @@ -622,19 +594,17 @@ Partial Class dlgOptions 'lblOutputFormat ' Me.lblOutputFormat.AutoSize = True - Me.lblOutputFormat.Location = New System.Drawing.Point(6, 81) - Me.lblOutputFormat.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblOutputFormat.Location = New System.Drawing.Point(4, 54) Me.lblOutputFormat.Name = "lblOutputFormat" - Me.lblOutputFormat.Size = New System.Drawing.Size(117, 20) + Me.lblOutputFormat.Size = New System.Drawing.Size(77, 13) Me.lblOutputFormat.TabIndex = 18 Me.lblOutputFormat.Text = "Output Format:" ' 'cmdCommentFormat ' - Me.cmdCommentFormat.Location = New System.Drawing.Point(432, 134) - Me.cmdCommentFormat.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdCommentFormat.Location = New System.Drawing.Point(288, 89) Me.cmdCommentFormat.Name = "cmdCommentFormat" - Me.cmdCommentFormat.Size = New System.Drawing.Size(150, 34) + Me.cmdCommentFormat.Size = New System.Drawing.Size(100, 23) Me.cmdCommentFormat.TabIndex = 16 Me.cmdCommentFormat.Text = "Change..." Me.cmdCommentFormat.UseVisualStyleBackColor = True @@ -642,21 +612,19 @@ Partial Class dlgOptions 'lblCommandFormat ' Me.lblCommandFormat.AutoSize = True - Me.lblCommandFormat.Location = New System.Drawing.Point(6, 21) - Me.lblCommandFormat.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblCommandFormat.Location = New System.Drawing.Point(4, 14) Me.lblCommandFormat.Name = "lblCommandFormat" - Me.lblCommandFormat.Size = New System.Drawing.Size(141, 20) + Me.lblCommandFormat.Size = New System.Drawing.Size(92, 13) Me.lblCommandFormat.TabIndex = 17 Me.lblCommandFormat.Text = "Command Format:" ' 'tbpEditor ' Me.tbpEditor.Controls.Add(Me.pnFormatEditor) - Me.tbpEditor.Location = New System.Drawing.Point(4, 29) - Me.tbpEditor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpEditor.Location = New System.Drawing.Point(4, 22) Me.tbpEditor.Name = "tbpEditor" - Me.tbpEditor.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpEditor.Size = New System.Drawing.Size(850, 443) + Me.tbpEditor.Padding = New System.Windows.Forms.Padding(3) + Me.tbpEditor.Size = New System.Drawing.Size(564, 291) Me.tbpEditor.TabIndex = 10 Me.tbpEditor.Text = "Editor Window" Me.tbpEditor.ToolTipText = "Data View" @@ -668,18 +636,16 @@ Partial Class dlgOptions Me.pnFormatEditor.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.pnFormatEditor.Controls.Add(Me.cmdEditorFont) Me.pnFormatEditor.Controls.Add(Me.lblFont) - Me.pnFormatEditor.Location = New System.Drawing.Point(15, 15) - Me.pnFormatEditor.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.pnFormatEditor.Location = New System.Drawing.Point(10, 10) Me.pnFormatEditor.Name = "pnFormatEditor" - Me.pnFormatEditor.Size = New System.Drawing.Size(318, 41) + Me.pnFormatEditor.Size = New System.Drawing.Size(212, 28) Me.pnFormatEditor.TabIndex = 22 ' 'cmdEditorFont ' - Me.cmdEditorFont.Location = New System.Drawing.Point(164, 3) - Me.cmdEditorFont.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdEditorFont.Location = New System.Drawing.Point(109, 2) Me.cmdEditorFont.Name = "cmdEditorFont" - Me.cmdEditorFont.Size = New System.Drawing.Size(150, 34) + Me.cmdEditorFont.Size = New System.Drawing.Size(100, 23) Me.cmdEditorFont.TabIndex = 10 Me.cmdEditorFont.Text = "Change..." Me.cmdEditorFont.UseVisualStyleBackColor = True @@ -687,10 +653,9 @@ Partial Class dlgOptions 'lblFont ' Me.lblFont.AutoSize = True - Me.lblFont.Location = New System.Drawing.Point(6, 10) - Me.lblFont.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblFont.Location = New System.Drawing.Point(4, 7) Me.lblFont.Name = "lblFont" - Me.lblFont.Size = New System.Drawing.Size(101, 20) + Me.lblFont.Size = New System.Drawing.Size(66, 13) Me.lblFont.TabIndex = 17 Me.lblFont.Text = "Format Font:" ' @@ -700,11 +665,10 @@ Partial Class dlgOptions Me.tbpCommands.Controls.Add(Me.ucrChkShowWaitDialog) Me.tbpCommands.Controls.Add(Me.ucrNudWaitSeconds) Me.tbpCommands.Controls.Add(Me.ucrChkIncludeDefaultParams) - Me.tbpCommands.Location = New System.Drawing.Point(4, 29) - Me.tbpCommands.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpCommands.Location = New System.Drawing.Point(4, 22) Me.tbpCommands.Name = "tbpCommands" - Me.tbpCommands.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpCommands.Size = New System.Drawing.Size(850, 443) + Me.tbpCommands.Padding = New System.Windows.Forms.Padding(3) + Me.tbpCommands.Size = New System.Drawing.Size(564, 291) Me.tbpCommands.TabIndex = 4 Me.tbpCommands.Tag = "Commands" Me.tbpCommands.Text = "Commands" @@ -713,10 +677,9 @@ Partial Class dlgOptions 'lblWaitSeconds ' Me.lblWaitSeconds.AutoSize = True - Me.lblWaitSeconds.Location = New System.Drawing.Point(604, 69) - Me.lblWaitSeconds.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblWaitSeconds.Location = New System.Drawing.Point(403, 46) Me.lblWaitSeconds.Name = "lblWaitSeconds" - Me.lblWaitSeconds.Size = New System.Drawing.Size(69, 20) + Me.lblWaitSeconds.Size = New System.Drawing.Size(47, 13) Me.lblWaitSeconds.TabIndex = 8 Me.lblWaitSeconds.Text = "seconds" ' @@ -724,10 +687,10 @@ Partial Class dlgOptions ' Me.ucrChkShowWaitDialog.AutoSize = True Me.ucrChkShowWaitDialog.Checked = False - Me.ucrChkShowWaitDialog.Location = New System.Drawing.Point(9, 70) - Me.ucrChkShowWaitDialog.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkShowWaitDialog.Location = New System.Drawing.Point(6, 47) + Me.ucrChkShowWaitDialog.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkShowWaitDialog.Name = "ucrChkShowWaitDialog" - Me.ucrChkShowWaitDialog.Size = New System.Drawing.Size(506, 51) + Me.ucrChkShowWaitDialog.Size = New System.Drawing.Size(337, 34) Me.ucrChkShowWaitDialog.TabIndex = 6 ' 'ucrNudWaitSeconds @@ -735,12 +698,12 @@ Partial Class dlgOptions Me.ucrNudWaitSeconds.AutoSize = True Me.ucrNudWaitSeconds.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWaitSeconds.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudWaitSeconds.Location = New System.Drawing.Point(524, 68) - Me.ucrNudWaitSeconds.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudWaitSeconds.Location = New System.Drawing.Point(349, 45) + Me.ucrNudWaitSeconds.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudWaitSeconds.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudWaitSeconds.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWaitSeconds.Name = "ucrNudWaitSeconds" - Me.ucrNudWaitSeconds.Size = New System.Drawing.Size(75, 30) + Me.ucrNudWaitSeconds.Size = New System.Drawing.Size(50, 20) Me.ucrNudWaitSeconds.TabIndex = 5 Me.ucrNudWaitSeconds.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -748,10 +711,10 @@ Partial Class dlgOptions ' Me.ucrChkIncludeDefaultParams.AutoSize = True Me.ucrChkIncludeDefaultParams.Checked = False - Me.ucrChkIncludeDefaultParams.Location = New System.Drawing.Point(9, 30) - Me.ucrChkIncludeDefaultParams.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkIncludeDefaultParams.Location = New System.Drawing.Point(6, 20) + Me.ucrChkIncludeDefaultParams.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkIncludeDefaultParams.Name = "ucrChkIncludeDefaultParams" - Me.ucrChkIncludeDefaultParams.Size = New System.Drawing.Size(597, 51) + Me.ucrChkIncludeDefaultParams.Size = New System.Drawing.Size(398, 34) Me.ucrChkIncludeDefaultParams.TabIndex = 3 ' 'tbpDataView @@ -765,11 +728,10 @@ Partial Class dlgOptions Me.tbpDataView.Controls.Add(Me.lblMaxCols) Me.tbpDataView.Controls.Add(Me.ucrNudMaxRows) Me.tbpDataView.Controls.Add(Me.lblMaxRows) - Me.tbpDataView.Location = New System.Drawing.Point(4, 29) - Me.tbpDataView.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpDataView.Location = New System.Drawing.Point(4, 22) Me.tbpDataView.Name = "tbpDataView" - Me.tbpDataView.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpDataView.Size = New System.Drawing.Size(850, 443) + Me.tbpDataView.Padding = New System.Windows.Forms.Padding(3) + Me.tbpDataView.Size = New System.Drawing.Size(564, 291) Me.tbpDataView.TabIndex = 9 Me.tbpDataView.Text = "Data View" Me.tbpDataView.UseVisualStyleBackColor = True @@ -777,20 +739,18 @@ Partial Class dlgOptions 'lblEvery ' Me.lblEvery.AutoSize = True - Me.lblEvery.Location = New System.Drawing.Point(356, 164) - Me.lblEvery.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEvery.Location = New System.Drawing.Point(220, 115) Me.lblEvery.Name = "lblEvery" - Me.lblEvery.Size = New System.Drawing.Size(46, 20) + Me.lblEvery.Size = New System.Drawing.Size(33, 13) Me.lblEvery.TabIndex = 4 Me.lblEvery.Text = "every" ' 'lblMinutes ' Me.lblMinutes.AutoSize = True - Me.lblMinutes.Location = New System.Drawing.Point(516, 164) - Me.lblMinutes.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblMinutes.Location = New System.Drawing.Point(340, 115) Me.lblMinutes.Name = "lblMinutes" - Me.lblMinutes.Size = New System.Drawing.Size(65, 20) + Me.lblMinutes.Size = New System.Drawing.Size(43, 13) Me.lblMinutes.TabIndex = 4 Me.lblMinutes.Text = "minutes" ' @@ -798,20 +758,20 @@ Partial Class dlgOptions ' Me.ucrChkAutoSave.AutoSize = True Me.ucrChkAutoSave.Checked = False - Me.ucrChkAutoSave.Location = New System.Drawing.Point(20, 162) - Me.ucrChkAutoSave.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkAutoSave.Location = New System.Drawing.Point(13, 114) + Me.ucrChkAutoSave.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkAutoSave.Name = "ucrChkAutoSave" - Me.ucrChkAutoSave.Size = New System.Drawing.Size(326, 51) + Me.ucrChkAutoSave.Size = New System.Drawing.Size(217, 34) Me.ucrChkAutoSave.TabIndex = 3 ' 'ucrChkShowDataonGrid ' Me.ucrChkShowDataonGrid.AutoSize = True Me.ucrChkShowDataonGrid.Checked = False - Me.ucrChkShowDataonGrid.Location = New System.Drawing.Point(20, 117) - Me.ucrChkShowDataonGrid.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkShowDataonGrid.Location = New System.Drawing.Point(13, 78) + Me.ucrChkShowDataonGrid.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkShowDataonGrid.Name = "ucrChkShowDataonGrid" - Me.ucrChkShowDataonGrid.Size = New System.Drawing.Size(590, 51) + Me.ucrChkShowDataonGrid.Size = New System.Drawing.Size(393, 34) Me.ucrChkShowDataonGrid.TabIndex = 3 ' 'ucrNudAutoSaveMinutes @@ -819,12 +779,12 @@ Partial Class dlgOptions Me.ucrNudAutoSaveMinutes.AutoSize = True Me.ucrNudAutoSaveMinutes.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudAutoSaveMinutes.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudAutoSaveMinutes.Location = New System.Drawing.Point(432, 159) - Me.ucrNudAutoSaveMinutes.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudAutoSaveMinutes.Location = New System.Drawing.Point(268, 112) + Me.ucrNudAutoSaveMinutes.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudAutoSaveMinutes.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudAutoSaveMinutes.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudAutoSaveMinutes.Name = "ucrNudAutoSaveMinutes" - Me.ucrNudAutoSaveMinutes.Size = New System.Drawing.Size(75, 30) + Me.ucrNudAutoSaveMinutes.Size = New System.Drawing.Size(50, 20) Me.ucrNudAutoSaveMinutes.TabIndex = 2 Me.ucrNudAutoSaveMinutes.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -833,22 +793,21 @@ Partial Class dlgOptions Me.ucrNudMaxCols.AutoSize = True Me.ucrNudMaxCols.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxCols.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxCols.Location = New System.Drawing.Point(402, 62) - Me.ucrNudMaxCols.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudMaxCols.Location = New System.Drawing.Point(268, 41) + Me.ucrNudMaxCols.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudMaxCols.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaxCols.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxCols.Name = "ucrNudMaxCols" - Me.ucrNudMaxCols.Size = New System.Drawing.Size(75, 30) + Me.ucrNudMaxCols.Size = New System.Drawing.Size(50, 20) Me.ucrNudMaxCols.TabIndex = 2 Me.ucrNudMaxCols.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblMaxCols ' Me.lblMaxCols.AutoSize = True - Me.lblMaxCols.Location = New System.Drawing.Point(15, 66) - Me.lblMaxCols.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblMaxCols.Location = New System.Drawing.Point(10, 44) Me.lblMaxCols.Name = "lblMaxCols" - Me.lblMaxCols.Size = New System.Drawing.Size(297, 20) + Me.lblMaxCols.Size = New System.Drawing.Size(198, 13) Me.lblMaxCols.TabIndex = 1 Me.lblMaxCols.Text = "Maximum Number of Columns to Display:" ' @@ -857,22 +816,21 @@ Partial Class dlgOptions Me.ucrNudMaxRows.AutoSize = True Me.ucrNudMaxRows.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxRows.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxRows.Location = New System.Drawing.Point(402, 22) - Me.ucrNudMaxRows.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrNudMaxRows.Location = New System.Drawing.Point(268, 15) + Me.ucrNudMaxRows.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudMaxRows.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaxRows.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxRows.Name = "ucrNudMaxRows" - Me.ucrNudMaxRows.Size = New System.Drawing.Size(75, 30) + Me.ucrNudMaxRows.Size = New System.Drawing.Size(50, 20) Me.ucrNudMaxRows.TabIndex = 2 Me.ucrNudMaxRows.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblMaxRows ' Me.lblMaxRows.AutoSize = True - Me.lblMaxRows.Location = New System.Drawing.Point(15, 27) - Me.lblMaxRows.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblMaxRows.Location = New System.Drawing.Point(10, 18) Me.lblMaxRows.Name = "lblMaxRows" - Me.lblMaxRows.Size = New System.Drawing.Size(275, 20) + Me.lblMaxRows.Size = New System.Drawing.Size(185, 13) Me.lblMaxRows.TabIndex = 1 Me.lblMaxRows.Text = "Maximum Number of Rows to Display:" ' @@ -881,21 +839,19 @@ Partial Class dlgOptions Me.tbpWorkingDirectory.Controls.Add(Me.cmdWorkingDirectory) Me.tbpWorkingDirectory.Controls.Add(Me.lblWorkingDirectory) Me.tbpWorkingDirectory.Controls.Add(Me.ucrWorkingDirectory) - Me.tbpWorkingDirectory.Location = New System.Drawing.Point(4, 29) - Me.tbpWorkingDirectory.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpWorkingDirectory.Location = New System.Drawing.Point(4, 22) Me.tbpWorkingDirectory.Name = "tbpWorkingDirectory" - Me.tbpWorkingDirectory.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpWorkingDirectory.Size = New System.Drawing.Size(850, 443) + Me.tbpWorkingDirectory.Padding = New System.Windows.Forms.Padding(3) + Me.tbpWorkingDirectory.Size = New System.Drawing.Size(564, 291) Me.tbpWorkingDirectory.TabIndex = 11 Me.tbpWorkingDirectory.Text = "Working Directory" Me.tbpWorkingDirectory.UseVisualStyleBackColor = True ' 'cmdWorkingDirectory ' - Me.cmdWorkingDirectory.Location = New System.Drawing.Point(598, 24) - Me.cmdWorkingDirectory.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdWorkingDirectory.Location = New System.Drawing.Point(399, 16) Me.cmdWorkingDirectory.Name = "cmdWorkingDirectory" - Me.cmdWorkingDirectory.Size = New System.Drawing.Size(36, 32) + Me.cmdWorkingDirectory.Size = New System.Drawing.Size(24, 21) Me.cmdWorkingDirectory.TabIndex = 2 Me.cmdWorkingDirectory.Text = "..." Me.cmdWorkingDirectory.UseVisualStyleBackColor = True @@ -903,10 +859,9 @@ Partial Class dlgOptions 'lblWorkingDirectory ' Me.lblWorkingDirectory.AutoSize = True - Me.lblWorkingDirectory.Location = New System.Drawing.Point(20, 30) - Me.lblWorkingDirectory.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblWorkingDirectory.Location = New System.Drawing.Point(13, 20) Me.lblWorkingDirectory.Name = "lblWorkingDirectory" - Me.lblWorkingDirectory.Size = New System.Drawing.Size(138, 20) + Me.lblWorkingDirectory.Size = New System.Drawing.Size(95, 13) Me.lblWorkingDirectory.TabIndex = 0 Me.lblWorkingDirectory.Text = "Working Directory:" ' @@ -916,10 +871,10 @@ Partial Class dlgOptions Me.ucrWorkingDirectory.AutoSize = True Me.ucrWorkingDirectory.IsMultiline = False Me.ucrWorkingDirectory.IsReadOnly = False - Me.ucrWorkingDirectory.Location = New System.Drawing.Point(207, 26) - Me.ucrWorkingDirectory.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrWorkingDirectory.Location = New System.Drawing.Point(138, 17) + Me.ucrWorkingDirectory.Margin = New System.Windows.Forms.Padding(6) Me.ucrWorkingDirectory.Name = "ucrWorkingDirectory" - Me.ucrWorkingDirectory.Size = New System.Drawing.Size(382, 32) + Me.ucrWorkingDirectory.Size = New System.Drawing.Size(255, 21) Me.ucrWorkingDirectory.TabIndex = 1 ' 'tbpGraphDisplay @@ -928,11 +883,10 @@ Partial Class dlgOptions Me.tbpGraphDisplay.Controls.Add(Me.rdoDisplayinRViewer) Me.tbpGraphDisplay.Controls.Add(Me.rdoDisplayinOutputWindow) Me.tbpGraphDisplay.Controls.Add(Me.ucrPnlGraphDisplay) - Me.tbpGraphDisplay.Location = New System.Drawing.Point(4, 29) - Me.tbpGraphDisplay.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpGraphDisplay.Location = New System.Drawing.Point(4, 22) Me.tbpGraphDisplay.Name = "tbpGraphDisplay" - Me.tbpGraphDisplay.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpGraphDisplay.Size = New System.Drawing.Size(850, 443) + Me.tbpGraphDisplay.Padding = New System.Windows.Forms.Padding(3) + Me.tbpGraphDisplay.Size = New System.Drawing.Size(564, 291) Me.tbpGraphDisplay.TabIndex = 12 Me.tbpGraphDisplay.Text = "Graph Display" Me.tbpGraphDisplay.UseVisualStyleBackColor = True @@ -941,10 +895,9 @@ Partial Class dlgOptions ' Me.rdoDisplayinSeparateWindows.AutoSize = True Me.rdoDisplayinSeparateWindows.Checked = True - Me.rdoDisplayinSeparateWindows.Location = New System.Drawing.Point(9, 78) - Me.rdoDisplayinSeparateWindows.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoDisplayinSeparateWindows.Location = New System.Drawing.Point(6, 52) Me.rdoDisplayinSeparateWindows.Name = "rdoDisplayinSeparateWindows" - Me.rdoDisplayinSeparateWindows.Size = New System.Drawing.Size(239, 24) + Me.rdoDisplayinSeparateWindows.Size = New System.Drawing.Size(163, 17) Me.rdoDisplayinSeparateWindows.TabIndex = 1 Me.rdoDisplayinSeparateWindows.TabStop = True Me.rdoDisplayinSeparateWindows.Text = "Display in Separate Windows" @@ -953,10 +906,9 @@ Partial Class dlgOptions 'rdoDisplayinRViewer ' Me.rdoDisplayinRViewer.AutoSize = True - Me.rdoDisplayinRViewer.Location = New System.Drawing.Point(9, 44) - Me.rdoDisplayinRViewer.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoDisplayinRViewer.Location = New System.Drawing.Point(6, 29) Me.rdoDisplayinRViewer.Name = "rdoDisplayinRViewer" - Me.rdoDisplayinRViewer.Size = New System.Drawing.Size(169, 24) + Me.rdoDisplayinRViewer.Size = New System.Drawing.Size(116, 17) Me.rdoDisplayinRViewer.TabIndex = 1 Me.rdoDisplayinRViewer.Text = "Display in R Viewer" Me.rdoDisplayinRViewer.UseVisualStyleBackColor = True @@ -964,10 +916,9 @@ Partial Class dlgOptions 'rdoDisplayinOutputWindow ' Me.rdoDisplayinOutputWindow.AutoSize = True - Me.rdoDisplayinOutputWindow.Location = New System.Drawing.Point(9, 9) - Me.rdoDisplayinOutputWindow.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoDisplayinOutputWindow.Location = New System.Drawing.Point(6, 6) Me.rdoDisplayinOutputWindow.Name = "rdoDisplayinOutputWindow" - Me.rdoDisplayinOutputWindow.Size = New System.Drawing.Size(214, 24) + Me.rdoDisplayinOutputWindow.Size = New System.Drawing.Size(147, 17) Me.rdoDisplayinOutputWindow.TabIndex = 1 Me.rdoDisplayinOutputWindow.Text = "Display in Output Window" Me.rdoDisplayinOutputWindow.UseVisualStyleBackColor = True @@ -975,10 +926,10 @@ Partial Class dlgOptions 'ucrPnlGraphDisplay ' Me.ucrPnlGraphDisplay.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlGraphDisplay.Location = New System.Drawing.Point(0, 4) - Me.ucrPnlGraphDisplay.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrPnlGraphDisplay.Location = New System.Drawing.Point(0, 3) + Me.ucrPnlGraphDisplay.Margin = New System.Windows.Forms.Padding(5) Me.ucrPnlGraphDisplay.Name = "ucrPnlGraphDisplay" - Me.ucrPnlGraphDisplay.Size = New System.Drawing.Size(548, 99) + Me.ucrPnlGraphDisplay.Size = New System.Drawing.Size(365, 66) Me.ucrPnlGraphDisplay.TabIndex = 3 ' 'tbpTailoredMenus @@ -987,11 +938,10 @@ Partial Class dlgOptions Me.tbpTailoredMenus.Controls.Add(Me.ucrChkViewOptionsByContextMenu) Me.tbpTailoredMenus.Controls.Add(Me.ucrChkViewProcurementMenu) Me.tbpTailoredMenus.Controls.Add(Me.ucrChkViewClimaticMenu) - Me.tbpTailoredMenus.Location = New System.Drawing.Point(4, 29) - Me.tbpTailoredMenus.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpTailoredMenus.Location = New System.Drawing.Point(4, 22) Me.tbpTailoredMenus.Name = "tbpTailoredMenus" - Me.tbpTailoredMenus.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpTailoredMenus.Size = New System.Drawing.Size(850, 443) + Me.tbpTailoredMenus.Padding = New System.Windows.Forms.Padding(3) + Me.tbpTailoredMenus.Size = New System.Drawing.Size(564, 291) Me.tbpTailoredMenus.TabIndex = 13 Me.tbpTailoredMenus.Text = "Tailored Menus" Me.tbpTailoredMenus.UseVisualStyleBackColor = True @@ -1000,40 +950,40 @@ Partial Class dlgOptions ' Me.ucrChkViewStructuredMenu.AutoSize = True Me.ucrChkViewStructuredMenu.Checked = False - Me.ucrChkViewStructuredMenu.Location = New System.Drawing.Point(10, 18) - Me.ucrChkViewStructuredMenu.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkViewStructuredMenu.Location = New System.Drawing.Point(7, 12) + Me.ucrChkViewStructuredMenu.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkViewStructuredMenu.Name = "ucrChkViewStructuredMenu" - Me.ucrChkViewStructuredMenu.Size = New System.Drawing.Size(567, 51) + Me.ucrChkViewStructuredMenu.Size = New System.Drawing.Size(378, 34) Me.ucrChkViewStructuredMenu.TabIndex = 2 ' 'ucrChkViewOptionsByContextMenu ' Me.ucrChkViewOptionsByContextMenu.AutoSize = True Me.ucrChkViewOptionsByContextMenu.Checked = False - Me.ucrChkViewOptionsByContextMenu.Location = New System.Drawing.Point(10, 135) - Me.ucrChkViewOptionsByContextMenu.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkViewOptionsByContextMenu.Location = New System.Drawing.Point(7, 137) + Me.ucrChkViewOptionsByContextMenu.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkViewOptionsByContextMenu.Name = "ucrChkViewOptionsByContextMenu" - Me.ucrChkViewOptionsByContextMenu.Size = New System.Drawing.Size(620, 51) + Me.ucrChkViewOptionsByContextMenu.Size = New System.Drawing.Size(413, 34) Me.ucrChkViewOptionsByContextMenu.TabIndex = 1 ' 'ucrChkViewProcurementMenu ' Me.ucrChkViewProcurementMenu.AutoSize = True Me.ucrChkViewProcurementMenu.Checked = False - Me.ucrChkViewProcurementMenu.Location = New System.Drawing.Point(10, 96) - Me.ucrChkViewProcurementMenu.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkViewProcurementMenu.Location = New System.Drawing.Point(7, 95) + Me.ucrChkViewProcurementMenu.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkViewProcurementMenu.Name = "ucrChkViewProcurementMenu" - Me.ucrChkViewProcurementMenu.Size = New System.Drawing.Size(620, 51) + Me.ucrChkViewProcurementMenu.Size = New System.Drawing.Size(413, 34) Me.ucrChkViewProcurementMenu.TabIndex = 0 ' 'ucrChkViewClimaticMenu ' Me.ucrChkViewClimaticMenu.AutoSize = True Me.ucrChkViewClimaticMenu.Checked = False - Me.ucrChkViewClimaticMenu.Location = New System.Drawing.Point(10, 57) - Me.ucrChkViewClimaticMenu.Margin = New System.Windows.Forms.Padding(8, 8, 8, 8) + Me.ucrChkViewClimaticMenu.Location = New System.Drawing.Point(7, 53) + Me.ucrChkViewClimaticMenu.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkViewClimaticMenu.Name = "ucrChkViewClimaticMenu" - Me.ucrChkViewClimaticMenu.Size = New System.Drawing.Size(610, 51) + Me.ucrChkViewClimaticMenu.Size = New System.Drawing.Size(407, 34) Me.ucrChkViewClimaticMenu.TabIndex = 0 ' 'tbpClimsoft @@ -1046,11 +996,10 @@ Partial Class dlgOptions Me.tbpClimsoft.Controls.Add(Me.ucrInputPort) Me.tbpClimsoft.Controls.Add(Me.ucrInputHost) Me.tbpClimsoft.Controls.Add(Me.ucrInputDatabaseName) - Me.tbpClimsoft.Location = New System.Drawing.Point(4, 29) - Me.tbpClimsoft.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.tbpClimsoft.Location = New System.Drawing.Point(4, 22) Me.tbpClimsoft.Name = "tbpClimsoft" - Me.tbpClimsoft.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4) - Me.tbpClimsoft.Size = New System.Drawing.Size(850, 443) + Me.tbpClimsoft.Padding = New System.Windows.Forms.Padding(3) + Me.tbpClimsoft.Size = New System.Drawing.Size(564, 291) Me.tbpClimsoft.TabIndex = 14 Me.tbpClimsoft.Text = "Climsoft" Me.tbpClimsoft.UseVisualStyleBackColor = True @@ -1059,10 +1008,9 @@ Partial Class dlgOptions ' Me.lblUserName.AutoSize = True Me.lblUserName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblUserName.Location = New System.Drawing.Point(9, 154) - Me.lblUserName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblUserName.Location = New System.Drawing.Point(6, 103) Me.lblUserName.Name = "lblUserName" - Me.lblUserName.Size = New System.Drawing.Size(87, 20) + Me.lblUserName.Size = New System.Drawing.Size(58, 13) Me.lblUserName.TabIndex = 19 Me.lblUserName.Text = "Username:" ' @@ -1070,10 +1018,9 @@ Partial Class dlgOptions ' Me.lblPort.AutoSize = True Me.lblPort.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblPort.Location = New System.Drawing.Point(9, 114) - Me.lblPort.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblPort.Location = New System.Drawing.Point(6, 76) Me.lblPort.Name = "lblPort" - Me.lblPort.Size = New System.Drawing.Size(42, 20) + Me.lblPort.Size = New System.Drawing.Size(29, 13) Me.lblPort.TabIndex = 18 Me.lblPort.Text = "Port:" ' @@ -1081,10 +1028,9 @@ Partial Class dlgOptions ' Me.lblHost.AutoSize = True Me.lblHost.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblHost.Location = New System.Drawing.Point(9, 74) - Me.lblHost.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblHost.Location = New System.Drawing.Point(6, 49) Me.lblHost.Name = "lblHost" - Me.lblHost.Size = New System.Drawing.Size(47, 20) + Me.lblHost.Size = New System.Drawing.Size(32, 13) Me.lblHost.TabIndex = 17 Me.lblHost.Text = "Host:" ' @@ -1092,10 +1038,9 @@ Partial Class dlgOptions ' Me.lblDatabaseName.AutoSize = True Me.lblDatabaseName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDatabaseName.Location = New System.Drawing.Point(9, 32) - Me.lblDatabaseName.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblDatabaseName.Location = New System.Drawing.Point(6, 21) Me.lblDatabaseName.Name = "lblDatabaseName" - Me.lblDatabaseName.Size = New System.Drawing.Size(129, 20) + Me.lblDatabaseName.Size = New System.Drawing.Size(87, 13) Me.lblDatabaseName.TabIndex = 16 Me.lblDatabaseName.Text = "Database Name:" ' @@ -1105,10 +1050,10 @@ Partial Class dlgOptions Me.ucrInputUserName.AutoSize = True Me.ucrInputUserName.IsMultiline = False Me.ucrInputUserName.IsReadOnly = False - Me.ucrInputUserName.Location = New System.Drawing.Point(252, 144) - Me.ucrInputUserName.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputUserName.Location = New System.Drawing.Point(168, 96) + Me.ucrInputUserName.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputUserName.Name = "ucrInputUserName" - Me.ucrInputUserName.Size = New System.Drawing.Size(206, 32) + Me.ucrInputUserName.Size = New System.Drawing.Size(137, 21) Me.ucrInputUserName.TabIndex = 15 ' 'ucrInputPort @@ -1117,10 +1062,10 @@ Partial Class dlgOptions Me.ucrInputPort.AutoSize = True Me.ucrInputPort.IsMultiline = False Me.ucrInputPort.IsReadOnly = False - Me.ucrInputPort.Location = New System.Drawing.Point(252, 104) - Me.ucrInputPort.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputPort.Location = New System.Drawing.Point(168, 69) + Me.ucrInputPort.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputPort.Name = "ucrInputPort" - Me.ucrInputPort.Size = New System.Drawing.Size(206, 32) + Me.ucrInputPort.Size = New System.Drawing.Size(137, 21) Me.ucrInputPort.TabIndex = 14 ' 'ucrInputHost @@ -1129,10 +1074,10 @@ Partial Class dlgOptions Me.ucrInputHost.AutoSize = True Me.ucrInputHost.IsMultiline = False Me.ucrInputHost.IsReadOnly = False - Me.ucrInputHost.Location = New System.Drawing.Point(252, 64) - Me.ucrInputHost.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputHost.Location = New System.Drawing.Point(168, 43) + Me.ucrInputHost.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputHost.Name = "ucrInputHost" - Me.ucrInputHost.Size = New System.Drawing.Size(206, 32) + Me.ucrInputHost.Size = New System.Drawing.Size(137, 21) Me.ucrInputHost.TabIndex = 13 ' 'ucrInputDatabaseName @@ -1141,19 +1086,20 @@ Partial Class dlgOptions Me.ucrInputDatabaseName.AutoSize = True Me.ucrInputDatabaseName.IsMultiline = False Me.ucrInputDatabaseName.IsReadOnly = False - Me.ucrInputDatabaseName.Location = New System.Drawing.Point(252, 26) - Me.ucrInputDatabaseName.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputDatabaseName.Location = New System.Drawing.Point(168, 17) + Me.ucrInputDatabaseName.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputDatabaseName.Name = "ucrInputDatabaseName" - Me.ucrInputDatabaseName.Size = New System.Drawing.Size(206, 32) + Me.ucrInputDatabaseName.Size = New System.Drawing.Size(137, 21) Me.ucrInputDatabaseName.TabIndex = 12 ' 'tbpWebsite ' Me.tbpWebsite.Controls.Add(Me.ucrChkReminder) - Me.tbpWebsite.Location = New System.Drawing.Point(4, 29) + Me.tbpWebsite.Location = New System.Drawing.Point(4, 22) + Me.tbpWebsite.Margin = New System.Windows.Forms.Padding(2) Me.tbpWebsite.Name = "tbpWebsite" - Me.tbpWebsite.Padding = New System.Windows.Forms.Padding(3) - Me.tbpWebsite.Size = New System.Drawing.Size(850, 443) + Me.tbpWebsite.Padding = New System.Windows.Forms.Padding(2) + Me.tbpWebsite.Size = New System.Drawing.Size(564, 291) Me.tbpWebsite.TabIndex = 15 Me.tbpWebsite.Text = "Website" Me.tbpWebsite.UseVisualStyleBackColor = True @@ -1162,18 +1108,18 @@ Partial Class dlgOptions ' Me.ucrChkReminder.AutoSize = True Me.ucrChkReminder.Checked = False - Me.ucrChkReminder.Location = New System.Drawing.Point(11, 33) - Me.ucrChkReminder.Margin = New System.Windows.Forms.Padding(8) + Me.ucrChkReminder.Location = New System.Drawing.Point(7, 22) + Me.ucrChkReminder.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkReminder.Name = "ucrChkReminder" - Me.ucrChkReminder.Size = New System.Drawing.Size(620, 51) + Me.ucrChkReminder.Size = New System.Drawing.Size(413, 34) Me.ucrChkReminder.TabIndex = 2 ' 'dlgOptions ' - 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(1155, 530) + Me.ClientSize = New System.Drawing.Size(770, 353) Me.Controls.Add(Me.cmdLanguage) Me.Controls.Add(Me.cmdApply) Me.Controls.Add(Me.cmdHelp) @@ -1181,7 +1127,6 @@ Partial Class dlgOptions Me.Controls.Add(Me.cmdOk) Me.Controls.Add(Me.spltControls) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOptions" diff --git a/instat/dlgOptions.vb b/instat/dlgOptions.vb index ed9b34f1cd0..35cf301c8b7 100644 --- a/instat/dlgOptions.vb +++ b/instat/dlgOptions.vb @@ -428,7 +428,7 @@ Public Class dlgOptions ApplyEnabled(True) End Sub - Private Sub AllControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudWaitSeconds.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrNudMaxCols.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrInputUserName.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkViewStructuredMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrNudMaxOutputsHeight.ControlValueChanged, ucrChkMaxOutputsHeight.ControlValueChanged + Private Sub AllControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudWaitSeconds.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrNudMaxCols.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrInputUserName.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkViewStructuredMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrNudMaxOutputsHeight.ControlValueChanged, ucrChkMaxOutputsHeight.ControlValueChanged, ucrChkReminder.ControlValueChanged End Sub diff --git a/instat/dlgOptionsByContextBoxplot.vb b/instat/dlgOptionsByContextBoxplot.vb index 11b160cbab7..d13b34fa9fb 100644 --- a/instat/dlgOptionsByContextBoxplot.vb +++ b/instat/dlgOptionsByContextBoxplot.vb @@ -190,7 +190,7 @@ Public Class dlgOptionsByContextBoxplot ucrSavePlot.SetPrefix("boxplot") ucrSavePlot.SetIsComboBox() - ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetCheckBoxText("Store Graph") ucrSavePlot.SetSaveTypeAsGraph() ucrSavePlot.SetDataFrameSelector(ucrSelectorPlot.ucrAvailableDataFrames) ucrSavePlot.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgOptionsByContextFItModel.vb b/instat/dlgOptionsByContextFItModel.vb index 774413160bc..fea1db22d81 100644 --- a/instat/dlgOptionsByContextFItModel.vb +++ b/instat/dlgOptionsByContextFItModel.vb @@ -130,7 +130,7 @@ Public Class dlgOptionsByContextFitModel ucrSaveModel.SetPrefix("reg") ucrSaveModel.SetDataFrameSelector(ucrSelectorFitModel.ucrAvailableDataFrames) ucrSaveModel.SetSaveTypeAsModel() - ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetCheckBoxText("Store Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") diff --git a/instat/dlgOtherRosePlots.vb b/instat/dlgOtherRosePlots.vb index 2affd52a850..527cb0a03bf 100644 --- a/instat/dlgOtherRosePlots.vb +++ b/instat/dlgOtherRosePlots.vb @@ -168,7 +168,7 @@ Public Class dlgOtherRosePlots ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetSaveTypeAsGraph() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetDataFrameSelector(ucrSelectorOtherRosePlots.ucrAvailableDataFrames) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgPICSARainfall.vb b/instat/dlgPICSARainfall.vb index f424bb2b746..9094cf90890 100644 --- a/instat/dlgPICSARainfall.vb +++ b/instat/dlgPICSARainfall.vb @@ -202,7 +202,7 @@ Public Class dlgPICSARainfall ucrSave.SetPrefix("picsa_rainfall_graph") ucrSave.SetIsComboBox() ucrSave.SetSaveTypeAsGraph() - ucrSave.SetCheckBoxText("Save Graph") + ucrSave.SetCheckBoxText("Store Graph") ucrSave.SetDataFrameSelector(ucrSelectorPICSARainfall.ucrAvailableDataFrames) ucrSave.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgParallelCoordinatePlot.vb b/instat/dlgParallelCoordinatePlot.vb index e36c0fbf244..b3cd4519c9b 100644 --- a/instat/dlgParallelCoordinatePlot.vb +++ b/instat/dlgParallelCoordinatePlot.vb @@ -147,7 +147,7 @@ Public Class dlgParallelCoordinatePlot ucrSaveGraph.SetPrefix("par_coord_plot") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorParallelCoordinatePlot.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgPrincipalComponentAnalysis.vb b/instat/dlgPrincipalComponentAnalysis.vb index 401d2927796..c7e42e0917b 100644 --- a/instat/dlgPrincipalComponentAnalysis.vb +++ b/instat/dlgPrincipalComponentAnalysis.vb @@ -89,7 +89,7 @@ Public Class dlgPrincipalComponentAnalysis ucrSaveResult.SetPrefix("pca") ucrSaveResult.SetSaveTypeAsModel() ucrSaveResult.SetDataFrameSelector(ucrSelectorPCA.ucrAvailableDataFrames) - ucrSaveResult.SetCheckBoxText("Save Result") + ucrSaveResult.SetCheckBoxText("Store Result") ucrSaveResult.SetIsComboBox() ucrSaveResult.SetAssignToIfUncheckedValue("last_model") diff --git a/instat/dlgRatingScales.vb b/instat/dlgRatingScales.vb index fc971fee4f1..ed3211cc61e 100644 --- a/instat/dlgRatingScales.vb +++ b/instat/dlgRatingScales.vb @@ -262,17 +262,17 @@ Public Class dlgRatingScales ucrBase.clsRsyntax.SetBaseRFunction(clsSjpLikertFunction) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ElseIf rdoStacked.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsSjpStackFrqFunction) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ElseIf rdoTable.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsSjtStackFrqFunction) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Text) ucrSaveGraph.SetAssignToIfUncheckedValue("last_table") - ucrSaveGraph.SetCheckBoxText("Save Table") + ucrSaveGraph.SetCheckBoxText("Store Table") End If End Sub diff --git a/instat/dlgSPI.vb b/instat/dlgSPI.vb index 206ad8431aa..2ab81117dfc 100644 --- a/instat/dlgSPI.vb +++ b/instat/dlgSPI.vb @@ -114,20 +114,20 @@ Public Class dlgSPI ucrSaveIndex.SetSaveTypeAsColumn() ucrSaveIndex.SetDataFrameSelector(ucrSelectorVariable.ucrAvailableDataFrames) - ucrSaveIndex.SetLabelText("Save Index into:") + ucrSaveIndex.SetLabelText("Store Index into:") ucrSaveIndex.SetIsTextBox() ucrSaveIndex.SetPrefix("spi") ucrSaveModel.SetSaveTypeAsModel() ucrSaveModel.SetDataFrameSelector(ucrSelectorVariable.ucrAvailableDataFrames) - ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetCheckBoxText("Store Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveGraph.SetPrefix("SPI_plot") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorVariable.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgScatterPlot.vb b/instat/dlgScatterPlot.vb index 917b9a763ad..33a0a83fd51 100644 --- a/instat/dlgScatterPlot.vb +++ b/instat/dlgScatterPlot.vb @@ -183,7 +183,7 @@ Public Class dlgScatterPlot ucrSaveScatterPlot.SetSaveType(strRObjectType:=RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) ucrSaveScatterPlot.SetDataFrameSelector(ucrSelectorForScatter.ucrAvailableDataFrames) - ucrSaveScatterPlot.SetCheckBoxText("Save Graph") + ucrSaveScatterPlot.SetCheckBoxText("Store Graph") ucrSaveScatterPlot.SetIsComboBox() ucrSaveScatterPlot.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgScript.vb b/instat/dlgScript.vb index f16bb22c428..7ca7d373b6e 100644 --- a/instat/dlgScript.vb +++ b/instat/dlgScript.vb @@ -72,7 +72,7 @@ Public Class dlgScript ucrCboSaveOutputObjectFormat.SetLinkedDisplayControl(lblSaveObjectFormat) ucrCboSaveOutputObjectFormat.GetSetSelectedIndex = 0 - ucrSaveObject.SetLabelText("Save Graph") + ucrSaveObject.SetLabelText("Store Graph") ucrSaveObject.SetIsComboBox() ucrSaveObject.SetDataFrameSelector(ucrDataFrameSaveOutputSelect) diff --git a/instat/dlgSeasonalGraph.Designer.vb b/instat/dlgSeasonalGraph.Designer.vb index 32effdb64af..a310c25d833 100644 --- a/instat/dlgSeasonalGraph.Designer.vb +++ b/instat/dlgSeasonalGraph.Designer.vb @@ -22,13 +22,354 @@ Partial Class dlgSeasonalGraph 'Ne la modifiez pas à l'aide de l'éditeur de code. _ Private Sub InitializeComponent() + Me.rdoBar = New System.Windows.Forms.RadioButton() + Me.rdoLine = New System.Windows.Forms.RadioButton() + Me.lblXvariable = New System.Windows.Forms.Label() + Me.lblLines = New System.Windows.Forms.Label() + Me.lblFacetBy = New System.Windows.Forms.Label() + Me.lblFill = New System.Windows.Forms.Label() + Me.lblColour = New System.Windows.Forms.Label() + Me.ucrChkAddpointRibbon = New instat.ucrCheck() + Me.ucrChkColour = New instat.ucrCheck() + Me.ucrChkFill = New instat.ucrCheck() + Me.cmdOptions = New instat.ucrSplitButton() + Me.ucrInputLegendPosition = New instat.ucrInputComboBox() + Me.ucrInputStation = New instat.ucrInputComboBox() + Me.ucrReceiverFacetBy = New instat.ucrReceiverSingle() + Me.ucrChkRibbons = New instat.ucrCheck() + Me.ucrChkAddPoint = New instat.ucrCheck() + Me.ucrReceiverX = New instat.ucrReceiverSingle() + Me.ucrReceiverRibbons = New instat.ucrReceiverMultiple() + Me.ucrReceiverLines = New instat.ucrReceiverMultiple() + Me.ucrSave = New instat.ucrSave() + Me.ucrChkLegend = New instat.ucrCheck() + Me.ucrPnlOptions = New instat.UcrPanel() + Me.ucrSelectorForSeasonalGraph = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() + Me.ucrInputAddLegendLine = New instat.ucrInputComboBox() + Me.ucrInputAddLegendRibbon = New instat.ucrInputComboBox() Me.SuspendLayout() ' + 'rdoBar + ' + Me.rdoBar.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoBar.BackColor = System.Drawing.SystemColors.Control + Me.rdoBar.Enabled = False + Me.rdoBar.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoBar.FlatAppearance.BorderSize = 2 + Me.rdoBar.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoBar.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoBar.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoBar.Location = New System.Drawing.Point(204, 20) + Me.rdoBar.Name = "rdoBar" + Me.rdoBar.Size = New System.Drawing.Size(80, 28) + Me.rdoBar.TabIndex = 3 + Me.rdoBar.TabStop = True + Me.rdoBar.Tag = "" + Me.rdoBar.Text = "Bar" + Me.rdoBar.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoBar.UseVisualStyleBackColor = False + ' + 'rdoLine + ' + Me.rdoLine.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoLine.BackColor = System.Drawing.SystemColors.Control + Me.rdoLine.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoLine.FlatAppearance.BorderSize = 2 + Me.rdoLine.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoLine.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoLine.Location = New System.Drawing.Point(126, 20) + Me.rdoLine.Name = "rdoLine" + Me.rdoLine.Size = New System.Drawing.Size(80, 28) + Me.rdoLine.TabIndex = 2 + Me.rdoLine.TabStop = True + Me.rdoLine.Tag = "linepathstep" + Me.rdoLine.Text = "Line" + Me.rdoLine.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoLine.UseVisualStyleBackColor = False + ' + 'lblXvariable + ' + Me.lblXvariable.AutoSize = True + Me.lblXvariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblXvariable.Location = New System.Drawing.Point(320, 285) + Me.lblXvariable.Name = "lblXvariable" + Me.lblXvariable.Size = New System.Drawing.Size(58, 13) + Me.lblXvariable.TabIndex = 6 + Me.lblXvariable.Text = "X Variable:" + ' + 'lblLines + ' + Me.lblLines.AutoSize = True + Me.lblLines.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLines.Location = New System.Drawing.Point(320, 68) + Me.lblLines.Name = "lblLines" + Me.lblLines.Size = New System.Drawing.Size(35, 13) + Me.lblLines.TabIndex = 4 + Me.lblLines.Text = "Lines:" + ' + 'lblFacetBy + ' + Me.lblFacetBy.AutoSize = True + Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFacetBy.Location = New System.Drawing.Point(260, 417) + Me.lblFacetBy.Name = "lblFacetBy" + Me.lblFacetBy.Size = New System.Drawing.Size(100, 13) + Me.lblFacetBy.TabIndex = 8 + Me.lblFacetBy.Tag = "" + Me.lblFacetBy.Text = "Facet By (Optional):" + ' + 'lblFill + ' + Me.lblFill.AutoSize = True + Me.lblFill.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFill.Location = New System.Drawing.Point(14, 384) + Me.lblFill.Name = "lblFill" + Me.lblFill.Size = New System.Drawing.Size(41, 13) + Me.lblFill.TabIndex = 186 + Me.lblFill.Text = "Labels:" + ' + 'lblColour + ' + Me.lblColour.AutoSize = True + Me.lblColour.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblColour.Location = New System.Drawing.Point(14, 332) + Me.lblColour.Name = "lblColour" + Me.lblColour.Size = New System.Drawing.Size(41, 13) + Me.lblColour.TabIndex = 187 + Me.lblColour.Text = "Labels:" + ' + 'ucrChkAddpointRibbon + ' + Me.ucrChkAddpointRibbon.AutoSize = True + Me.ucrChkAddpointRibbon.Checked = False + Me.ucrChkAddpointRibbon.Location = New System.Drawing.Point(319, 381) + Me.ucrChkAddpointRibbon.Name = "ucrChkAddpointRibbon" + Me.ucrChkAddpointRibbon.Size = New System.Drawing.Size(148, 23) + Me.ucrChkAddpointRibbon.TabIndex = 188 + ' + 'ucrChkColour + ' + Me.ucrChkColour.AutoSize = True + Me.ucrChkColour.Checked = False + Me.ucrChkColour.Location = New System.Drawing.Point(14, 301) + Me.ucrChkColour.Name = "ucrChkColour" + Me.ucrChkColour.Size = New System.Drawing.Size(147, 23) + Me.ucrChkColour.TabIndex = 22 + ' + 'ucrChkFill + ' + Me.ucrChkFill.AutoSize = True + Me.ucrChkFill.Checked = False + Me.ucrChkFill.Location = New System.Drawing.Point(14, 356) + Me.ucrChkFill.Name = "ucrChkFill" + Me.ucrChkFill.Size = New System.Drawing.Size(147, 23) + Me.ucrChkFill.TabIndex = 21 + ' + 'cmdOptions + ' + Me.cmdOptions.AutoSize = True + Me.cmdOptions.Location = New System.Drawing.Point(13, 266) + Me.cmdOptions.Name = "cmdOptions" + Me.cmdOptions.Size = New System.Drawing.Size(148, 23) + Me.cmdOptions.TabIndex = 14 + Me.cmdOptions.Tag = "Plot Options" + Me.cmdOptions.Text = "Plot Options" + Me.cmdOptions.UseVisualStyleBackColor = True + ' + 'ucrInputLegendPosition + ' + Me.ucrInputLegendPosition.AddQuotesIfUnrecognised = True + Me.ucrInputLegendPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLegendPosition.GetSetSelectedIndex = -1 + Me.ucrInputLegendPosition.IsReadOnly = False + Me.ucrInputLegendPosition.Location = New System.Drawing.Point(119, 431) + Me.ucrInputLegendPosition.Name = "ucrInputLegendPosition" + Me.ucrInputLegendPosition.Size = New System.Drawing.Size(82, 21) + Me.ucrInputLegendPosition.TabIndex = 18 + ' + 'ucrInputStation + ' + Me.ucrInputStation.AddQuotesIfUnrecognised = True + Me.ucrInputStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputStation.GetSetSelectedIndex = -1 + Me.ucrInputStation.IsReadOnly = False + Me.ucrInputStation.Location = New System.Drawing.Point(386, 431) + Me.ucrInputStation.Name = "ucrInputStation" + Me.ucrInputStation.Size = New System.Drawing.Size(82, 21) + Me.ucrInputStation.TabIndex = 10 + ' + 'ucrReceiverFacetBy + ' + Me.ucrReceiverFacetBy.AutoSize = True + Me.ucrReceiverFacetBy.frmParent = Me + Me.ucrReceiverFacetBy.Location = New System.Drawing.Point(259, 432) + Me.ucrReceiverFacetBy.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverFacetBy.Name = "ucrReceiverFacetBy" + Me.ucrReceiverFacetBy.Selector = Nothing + Me.ucrReceiverFacetBy.Size = New System.Drawing.Size(120, 26) + Me.ucrReceiverFacetBy.strNcFilePath = "" + Me.ucrReceiverFacetBy.TabIndex = 9 + Me.ucrReceiverFacetBy.ucrSelector = Nothing + ' + 'ucrChkRibbons + ' + Me.ucrChkRibbons.AutoSize = True + Me.ucrChkRibbons.Checked = False + Me.ucrChkRibbons.Location = New System.Drawing.Point(319, 184) + Me.ucrChkRibbons.Name = "ucrChkRibbons" + Me.ucrChkRibbons.Size = New System.Drawing.Size(114, 23) + Me.ucrChkRibbons.TabIndex = 11 + ' + 'ucrChkAddPoint + ' + Me.ucrChkAddPoint.AutoSize = True + Me.ucrChkAddPoint.Checked = False + Me.ucrChkAddPoint.Location = New System.Drawing.Point(319, 331) + Me.ucrChkAddPoint.Name = "ucrChkAddPoint" + Me.ucrChkAddPoint.Size = New System.Drawing.Size(148, 23) + Me.ucrChkAddPoint.TabIndex = 15 + ' + 'ucrReceiverX + ' + Me.ucrReceiverX.AutoSize = True + Me.ucrReceiverX.frmParent = Me + Me.ucrReceiverX.Location = New System.Drawing.Point(319, 301) + Me.ucrReceiverX.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverX.Name = "ucrReceiverX" + Me.ucrReceiverX.Selector = Nothing + Me.ucrReceiverX.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverX.strNcFilePath = "" + Me.ucrReceiverX.TabIndex = 7 + Me.ucrReceiverX.ucrSelector = Nothing + ' + 'ucrReceiverRibbons + ' + Me.ucrReceiverRibbons.AutoSize = True + Me.ucrReceiverRibbons.frmParent = Me + Me.ucrReceiverRibbons.Location = New System.Drawing.Point(319, 207) + Me.ucrReceiverRibbons.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverRibbons.Name = "ucrReceiverRibbons" + Me.ucrReceiverRibbons.Selector = Nothing + Me.ucrReceiverRibbons.Size = New System.Drawing.Size(120, 75) + Me.ucrReceiverRibbons.strNcFilePath = "" + Me.ucrReceiverRibbons.TabIndex = 12 + Me.ucrReceiverRibbons.ucrSelector = Nothing + ' + 'ucrReceiverLines + ' + Me.ucrReceiverLines.AutoSize = True + Me.ucrReceiverLines.frmParent = Me + Me.ucrReceiverLines.Location = New System.Drawing.Point(319, 82) + Me.ucrReceiverLines.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLines.Name = "ucrReceiverLines" + Me.ucrReceiverLines.Selector = Nothing + Me.ucrReceiverLines.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverLines.strNcFilePath = "" + Me.ucrReceiverLines.TabIndex = 5 + Me.ucrReceiverLines.ucrSelector = Nothing + ' + 'ucrSave + ' + Me.ucrSave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSave.Location = New System.Drawing.Point(13, 472) + Me.ucrSave.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSave.Name = "ucrSave" + Me.ucrSave.Size = New System.Drawing.Size(451, 24) + Me.ucrSave.TabIndex = 13 + ' + 'ucrChkLegend + ' + Me.ucrChkLegend.AutoSize = True + Me.ucrChkLegend.Checked = False + Me.ucrChkLegend.Location = New System.Drawing.Point(13, 432) + Me.ucrChkLegend.Name = "ucrChkLegend" + Me.ucrChkLegend.Size = New System.Drawing.Size(88, 23) + Me.ucrChkLegend.TabIndex = 17 + ' + 'ucrPnlOptions + ' + Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlOptions.Location = New System.Drawing.Point(122, 12) + Me.ucrPnlOptions.Name = "ucrPnlOptions" + Me.ucrPnlOptions.Size = New System.Drawing.Size(220, 44) + Me.ucrPnlOptions.TabIndex = 1 + ' + 'ucrSelectorForSeasonalGraph + ' + Me.ucrSelectorForSeasonalGraph.AutoSize = True + Me.ucrSelectorForSeasonalGraph.bDropUnusedFilterLevels = False + Me.ucrSelectorForSeasonalGraph.bShowHiddenColumns = False + Me.ucrSelectorForSeasonalGraph.bUseCurrentFilter = True + Me.ucrSelectorForSeasonalGraph.Location = New System.Drawing.Point(13, 68) + Me.ucrSelectorForSeasonalGraph.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorForSeasonalGraph.Name = "ucrSelectorForSeasonalGraph" + Me.ucrSelectorForSeasonalGraph.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorForSeasonalGraph.TabIndex = 0 + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(22, 517) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 19 + ' + 'ucrInputAddLegendLine + ' + Me.ucrInputAddLegendLine.AddQuotesIfUnrecognised = True + Me.ucrInputAddLegendLine.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputAddLegendLine.GetSetSelectedIndex = -1 + Me.ucrInputAddLegendLine.IsReadOnly = False + Me.ucrInputAddLegendLine.Location = New System.Drawing.Point(64, 326) + Me.ucrInputAddLegendLine.Name = "ucrInputAddLegendLine" + Me.ucrInputAddLegendLine.Size = New System.Drawing.Size(205, 23) + Me.ucrInputAddLegendLine.TabIndex = 219 + ' + 'ucrInputAddLegendRibbon + ' + Me.ucrInputAddLegendRibbon.AddQuotesIfUnrecognised = True + Me.ucrInputAddLegendRibbon.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputAddLegendRibbon.GetSetSelectedIndex = -1 + Me.ucrInputAddLegendRibbon.IsReadOnly = False + Me.ucrInputAddLegendRibbon.Location = New System.Drawing.Point(64, 381) + Me.ucrInputAddLegendRibbon.Name = "ucrInputAddLegendRibbon" + Me.ucrInputAddLegendRibbon.Size = New System.Drawing.Size(205, 23) + Me.ucrInputAddLegendRibbon.TabIndex = 220 + ' 'dlgSeasonalGraph ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(600, 450) + Me.ClientSize = New System.Drawing.Size(477, 573) + Me.Controls.Add(Me.ucrInputAddLegendRibbon) + Me.Controls.Add(Me.ucrInputAddLegendLine) + Me.Controls.Add(Me.ucrChkAddpointRibbon) + Me.Controls.Add(Me.lblColour) + Me.Controls.Add(Me.lblFill) + Me.Controls.Add(Me.ucrChkColour) + Me.Controls.Add(Me.ucrChkFill) + Me.Controls.Add(Me.cmdOptions) + Me.Controls.Add(Me.ucrInputLegendPosition) + Me.Controls.Add(Me.ucrInputStation) + Me.Controls.Add(Me.ucrReceiverFacetBy) + Me.Controls.Add(Me.lblFacetBy) + Me.Controls.Add(Me.ucrChkRibbons) + Me.Controls.Add(Me.ucrChkAddPoint) + Me.Controls.Add(Me.lblXvariable) + Me.Controls.Add(Me.ucrReceiverX) + Me.Controls.Add(Me.ucrReceiverRibbons) + Me.Controls.Add(Me.lblLines) + Me.Controls.Add(Me.ucrReceiverLines) + Me.Controls.Add(Me.ucrSave) + Me.Controls.Add(Me.ucrChkLegend) + Me.Controls.Add(Me.rdoBar) + Me.Controls.Add(Me.rdoLine) + Me.Controls.Add(Me.ucrPnlOptions) + Me.Controls.Add(Me.ucrSelectorForSeasonalGraph) + Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -36,6 +377,34 @@ Partial Class dlgSeasonalGraph Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Seasonal Graph" Me.ResumeLayout(False) + Me.PerformLayout() End Sub + + Friend WithEvents ucrSelectorForSeasonalGraph As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents rdoBar As RadioButton + Friend WithEvents rdoLine As RadioButton + Friend WithEvents ucrPnlOptions As UcrPanel + Friend WithEvents ucrChkAddPoint As ucrCheck + Friend WithEvents lblXvariable As Label + Friend WithEvents ucrReceiverX As ucrReceiverSingle + Friend WithEvents ucrChkRibbons As ucrCheck + Friend WithEvents ucrReceiverRibbons As ucrReceiverMultiple + Friend WithEvents lblLines As Label + Friend WithEvents ucrReceiverLines As ucrReceiverMultiple + Friend WithEvents ucrSave As ucrSave + Friend WithEvents ucrChkLegend As ucrCheck + Friend WithEvents ucrInputLegendPosition As ucrInputComboBox + Friend WithEvents ucrInputStation As ucrInputComboBox + Friend WithEvents ucrReceiverFacetBy As ucrReceiverSingle + Friend WithEvents lblFacetBy As Label + Friend WithEvents cmdOptions As ucrSplitButton + Friend WithEvents ucrChkColour As ucrCheck + Friend WithEvents ucrChkFill As ucrCheck + Friend WithEvents lblColour As Label + Friend WithEvents lblFill As Label + Friend WithEvents ucrChkAddpointRibbon As ucrCheck + Friend WithEvents ucrInputAddLegendRibbon As ucrInputComboBox + Friend WithEvents ucrInputAddLegendLine As ucrInputComboBox End Class diff --git a/instat/dlgSeasonalGraph.vb b/instat/dlgSeasonalGraph.vb index 57ef68e0d9f..e21ea4601bf 100644 --- a/instat/dlgSeasonalGraph.vb +++ b/instat/dlgSeasonalGraph.vb @@ -1,3 +1,753 @@ -Public Class dlgSeasonalGraph +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . +Imports instat.Translations + +Public Class dlgSeasonalGraph + Private clsRaesFunction As New RFunction + Private clsBaseOperator As New ROperator + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private bResetSubdialog As Boolean = True + Private clsRggplotFunction As New RFunction + Private clsDummyFunction As New RFunction + Private clsFacetFunction As New RFunction + Private clsFacetOperator As New ROperator + Private clsFacetRowOp As New ROperator + Private clsFacetColOp As New ROperator + Private clsGroupByFunction As New RFunction + Private clsPipeOperator As New ROperator + Private clsThemeFunction As New RFunction + Private clsLabsFunction As New RFunction + Private clsXlabsFunction As New RFunction + Private clsYlabFunction As New RFunction + Private clsXScalecontinuousFunction As New RFunction + Private clsYScalecontinuousFunction As New RFunction + Private clsRFacetFunction As New RFunction + Private dctThemeFunctions As New Dictionary(Of String, RFunction) + Private clsCoordPolarFunction As New RFunction + Private clsCoordPolarStartOperator As New ROperator + Private clsXScaleDateFunction As New RFunction + Private clsYScaleDateFunction As New RFunction + Private clsScaleFillViridisFunction As New RFunction + Private clsScaleColourViridisFunction As New RFunction + Private clsAnnotateFunction As New RFunction + Private clsScalefillidentityFunction As New RFunction + Private clsScalecolouridentityFunction As New RFunction + Private clsGetObjectDataFunction As New RFunction + Private bUpdatingParameters As Boolean = False + Private ReadOnly strFacetWrap As String = "Facet Wrap" + Private ReadOnly strFacetRow As String = "Facet Row" + Private ReadOnly strFacetCol As String = "Facet Column" + Private ReadOnly strNone As String = "None" + Private bUpdateComboOptions As Boolean = True + + 'Parameter names for geoms + Private strFirstParameterName As String = "geomLine" + Private strGeompointParameterName As String = "geom_point" + Private strGeompointParameterName1 As String = "geom_point" + Private strgeomRibbonParameterName As String = "geom_ribbon" + Private strgeomRibbonParameterName0 As String = "geom_ribbon" + Private strGeomParameterNames() As String = {strFirstParameterName, strgeomRibbonParameterName, strgeomRibbonParameterName0, strGeompointParameterName, strGeompointParameterName1} + + Private Sub dlgSeasonalGraph_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + autoTranslate(Me) + TestOkEnabled() + End Sub + + Private Sub InitialiseDialog() + Dim dctLegendPosition As New Dictionary(Of String, String) + Dim dctColour As New Dictionary(Of String, String) + + ucrBase.iHelpTopicID = 522 + + ucrSelectorForSeasonalGraph.SetParameter(New RParameter("data", 0)) + ucrSelectorForSeasonalGraph.SetParameterIsrfunction() + + ucrPnlOptions.AddRadioButton(rdoLine) + ucrPnlOptions.AddRadioButton(rdoBar) + + ucrPnlOptions.AddParameterValuesCondition(rdoLine, "checked", "geom_line") + ucrPnlOptions.AddParameterValuesCondition(rdoBar, "checked", "geom_Bar") + + ucrReceiverLines.Selector = ucrSelectorForSeasonalGraph + ucrReceiverLines.strSelectorHeading = "Variables" + ucrReceiverLines.SetParameterIsString() + ucrReceiverLines.SetLinkedDisplayControl(lblLines) + ucrReceiverLines.bWithQuotes = False + + ucrReceiverX.Selector = ucrSelectorForSeasonalGraph + ucrReceiverX.SetParameter(New RParameter("x", 2)) + ucrReceiverX.SetParameterIsString() + ucrReceiverX.bWithQuotes = False + ucrReceiverX.strSelectorHeading = "Variables" + ucrReceiverX.SetLinkedDisplayControl(lblXvariable) + + ucrChkRibbons.SetText("Ribbon(s):") + ucrChkRibbons.AddParameterPresentCondition(True, "geom_ribbon") + ucrChkRibbons.AddParameterPresentCondition(False, "geom_ribbon", False) + ucrChkRibbons.AddToLinkedControls(ucrReceiverRibbons, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrReceiverRibbons.SetParameter(New RParameter("y", 1)) + ucrReceiverRibbons.Selector = ucrSelectorForSeasonalGraph + ucrReceiverRibbons.strSelectorHeading = "Variables" + ucrReceiverRibbons.SetParameterIsString() + ucrReceiverRibbons.bWithQuotes = False + ucrReceiverRibbons.iMaxItems = 4 + + ucrReceiverFacetBy.SetParameter(New RParameter("var1")) + ucrReceiverFacetBy.Selector = ucrSelectorForSeasonalGraph + ucrReceiverFacetBy.SetIncludedDataTypes({"factor"}) + ucrReceiverFacetBy.strSelectorHeading = "Factors" + ucrReceiverFacetBy.bWithQuotes = False + ucrReceiverFacetBy.SetParameterIsString() + ucrReceiverFacetBy.SetValuesToIgnore({"."}) + + ucrInputStation.SetItems({strFacetWrap, strFacetRow, strFacetCol, strNone}) + ucrInputStation.SetDropDownStyleAsNonEditable() + + ucrChkLegend.SetText("Legend:") + ucrChkLegend.AddToLinkedControls({ucrInputLegendPosition}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="None") + ucrInputLegendPosition.SetDropDownStyleAsNonEditable() + ucrInputLegendPosition.SetParameter(New RParameter("legend.position")) + dctLegendPosition.Add("None", Chr(34) & "none" & Chr(34)) + dctLegendPosition.Add("Left", Chr(34) & "left" & Chr(34)) + dctLegendPosition.Add("Right", Chr(34) & "right" & Chr(34)) + dctLegendPosition.Add("Top", Chr(34) & "top" & Chr(34)) + dctLegendPosition.Add("Bottom", Chr(34) & "bottom" & Chr(34)) + ucrInputLegendPosition.SetItems(dctLegendPosition) + ucrChkLegend.AddParameterPresentCondition(True, "legend.position") + ucrChkLegend.AddParameterPresentCondition(False, "legend.position", False) + + ucrChkAddPoint.SetText("Add Points on Lines") + ucrChkAddPoint.AddParameterValuesCondition(True, "checked", "True") + ucrChkAddPoint.AddParameterValuesCondition(False, "checked", "False") + + ucrChkAddpointRibbon.SetText("Add Points on Ribbons") + ucrChkAddpointRibbon.AddParameterValuesCondition(True, "checked", "True") + ucrChkAddpointRibbon.AddParameterValuesCondition(False, "checked", "False") + + ucrChkFill.SetText("Legend for Ribbons") + ucrChkFill.AddParameterValuesCondition(True, "checked", "True") + ucrChkFill.AddParameterValuesCondition(False, "checked", "False") + ucrChkFill.AddToLinkedControls(ucrInputAddLegendRibbon, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrInputAddLegendRibbon.SetValidationTypeAsList() + ucrInputAddLegendRibbon.SetItems({"Normal (Between Lower and Upper Tercile),Range 40th-90th Percentile", "A,B"}) + ucrInputAddLegendRibbon.SetLinkedDisplayControl(lblFill) + + ucrChkColour.SetText("Legend for Lines") + ucrChkColour.AddParameterValuesCondition(True, "checked", "True") + ucrChkColour.AddParameterValuesCondition(False, "checked", "False") + ucrChkColour.AddToLinkedControls(ucrInputAddLegendLine, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrInputAddLegendLine.SetValidationTypeAsList() + ucrInputAddLegendLine.SetItems({"Median,Record Low/High", "A,B", "maximum,minimum,mean"}) + ucrInputAddLegendLine.SetLinkedDisplayControl(lblColour) + + ucrSave.SetPrefix("Seasonal_Graph") + ucrSave.SetIsComboBox() + ucrSave.SetSaveTypeAsGraph() + ucrSave.SetCheckBoxText("Store Graph") + ucrSave.SetDataFrameSelector(ucrSelectorForSeasonalGraph.ucrAvailableDataFrames) + ucrSave.SetAssignToIfUncheckedValue("last_graph") + End Sub + + Private Sub SetDefaults() + clsRggplotFunction = New RFunction + clsRaesFunction = New RFunction + clsBaseOperator = New ROperator + clsDummyFunction = New RFunction + clsFacetFunction = New RFunction + clsScalecolouridentityFunction = New RFunction + clsScalefillidentityFunction = New RFunction + clsGetObjectDataFunction = New RFunction + clsFacetOperator = New ROperator + clsFacetRowOp = New ROperator + clsFacetColOp = New ROperator + clsPipeOperator = New ROperator + + clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction + + ucrSelectorForSeasonalGraph.Reset() + ucrSelectorForSeasonalGraph.SetGgplotFunction(clsBaseOperator) + ucrSave.Reset() + ucrReceiverLines.SetMeAsReceiver() + bResetSubdialog = True + clsDummyFunction.AddParameter("checked", "geom_line", iPosition:=0) + + clsBaseOperator.SetOperation("+") + clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) + + clsRggplotFunction.SetPackageName("ggplot2") + clsRggplotFunction.SetRCommand("ggplot") + clsRggplotFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaesFunction, iPosition:=1) + + clsRaesFunction.SetPackageName("ggplot2") + clsRaesFunction.SetRCommand("aes") + + clsScalecolouridentityFunction.SetRCommand("scale_colour_identity") + clsScalecolouridentityFunction.AddParameter("name", "NULL", iPosition:=0) + clsScalecolouridentityFunction.AddParameter("guide", Chr(34) & "legend" & Chr(34), iPosition:=1) + + clsScalefillidentityFunction.SetRCommand("scale_fill_identity") + clsScalefillidentityFunction.AddParameter("name", "NULL", iPosition:=0) + clsScalefillidentityFunction.AddParameter("guide", Chr(34) & "legend" & Chr(34), iPosition:=1) + + clsFacetFunction.SetPackageName("ggplot2") + clsFacetRowOp.SetOperation("+") + clsFacetRowOp.bBrackets = False + clsFacetColOp.SetOperation("+") + clsFacetColOp.bBrackets = False + clsFacetOperator.SetOperation("~") + clsFacetOperator.bForceIncludeOperation = True + clsFacetOperator.bBrackets = False + clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOperator, iPosition:=0) + + clsPipeOperator.SetOperation("%>%") + SetPipeAssignTo() + + ucrInputStation.SetName(strFacetWrap) + ucrInputStation.bUpdateRCodeFromControl = True + + clsGroupByFunction.SetPackageName("dplyr") + clsGroupByFunction.SetRCommand("group_by") + + clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction + clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() + clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone + clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() + clsXScalecontinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() + clsYScalecontinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() + clsRFacetFunction = GgplotDefaults.clsFacetFunction.Clone() + clsCoordPolarStartOperator = GgplotDefaults.clsCoordPolarStartOperator.Clone() + clsCoordPolarFunction = GgplotDefaults.clsCoordPolarFunction.Clone() + dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) + clsXScaleDateFunction = GgplotDefaults.clsXScaleDateFunction.Clone() + clsYScaleDateFunction = GgplotDefaults.clsYScaleDateFunction.Clone() + clsScaleFillViridisFunction = GgplotDefaults.clsScaleFillViridisFunction + clsScaleColourViridisFunction = GgplotDefaults.clsScaleColorViridisFunction + clsAnnotateFunction = GgplotDefaults.clsAnnotateFunction + + clsGetObjectDataFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_object_data") + clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + clsGetObjectDataFunction.AddParameter("as_file", "TRUE", iPosition:=2) + + clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") + ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + ucrBase.clsRsyntax.AddToAfterCodes(clsGetObjectDataFunction, iPosition:=0) + End Sub + + Private Sub SetCalculationHistory() + Dim newItem As String = ucrInputAddLegendLine.GetText().Trim() + + If Not String.IsNullOrEmpty(newItem) AndAlso Not ucrInputAddLegendLine.cboInput.Items.Contains(newItem) Then + ucrInputAddLegendLine.AddItems({newItem}) + End If + End Sub + + Private Sub SetCalculationHistory1() + Dim newItem As String = ucrInputAddLegendRibbon.GetText().Trim() + + If Not String.IsNullOrEmpty(newItem) AndAlso Not ucrInputAddLegendRibbon.cboInput.Items.Contains(newItem) Then + ucrInputAddLegendRibbon.AddItems({newItem}) + End If + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + ucrPnlOptions.SetRCode(clsDummyFunction, bReset) + ucrSelectorForSeasonalGraph.SetRCode(clsRggplotFunction, bReset) + ucrSave.SetRCode(clsBaseOperator, bReset) + ucrChkLegend.SetRCode(clsThemeFunction, bReset, bCloneIfNeeded:=True) + ucrInputLegendPosition.SetRCode(clsThemeFunction, bReset, bCloneIfNeeded:=True) + If bReset Then + ucrReceiverX.SetRCode(clsRaesFunction, bReset) + ucrChkColour.SetRCode(clsScalecolouridentityFunction, bReset) + ucrChkFill.SetRCode(clsScalefillidentityFunction, bReset) + ucrChkRibbons.SetRCode(clsBaseOperator, bReset) + ucrChkAddPoint.SetRCode(clsBaseOperator, bReset) + ucrChkAddpointRibbon.SetRCode(clsBaseOperator, bReset) + AutoFacetStation() + AutoFillmonth() + End If + End Sub + + Private Sub TestOkEnabled() + If Not ucrSave.IsComplete OrElse (ucrReceiverLines.IsEmpty AndAlso Not ucrChkRibbons.Checked) Then + ucrBase.OKEnabled(False) + ElseIf Not ucrSave.IsComplete OrElse (ucrReceiverRibbons.IsEmpty AndAlso ucrChkRibbons.Checked) Then + ucrBase.OKEnabled(False) + ElseIf ucrChkRibbons.Checked AndAlso ucrReceiverRibbons.lstSelectedVariables.Items.Count = 1 Then + ucrBase.OKEnabled(False) + ElseIf ucrChkRibbons.Checked AndAlso ucrReceiverRibbons.lstSelectedVariables.Items.Count = 3 Then + ucrBase.OKEnabled(False) + ElseIf ucrReceiverX.IsEmpty Then + ucrBase.OKEnabled(False) + Else + ucrBase.OKEnabled(True) + End If + End Sub + + Private Sub ListGeomLine() + ' Clear parameters before adding new ones + clsBaseOperator.ClearParameters() + + ' Process ucrReceiverLines if not empty + If Not ucrReceiverLines.IsEmpty Then + If ucrChkColour.Checked Then + ' Add geom_line functions for ucrReceiverLines.lstSelectedVariables + For i As Integer = 0 To ucrReceiverLines.lstSelectedVariables.Items.Count - 1 + Dim clsRaeslineFunction As New RFunction + Dim ColourArguments As New List(Of String) From {"grey", "grey", "black", "grey"} + Dim LinewidthArguments As New List(Of String) From {"1.0", "1.0", "2.0", "1.0"} + Dim GroupArguments As New List(Of String) From {"grey", "grey", "grey", "grey"} + + clsRaeslineFunction.SetPackageName("ggplot2") + clsRaeslineFunction.SetRCommand("aes") + clsRaeslineFunction.AddParameter("y", ucrReceiverLines.lstSelectedVariables.Items(i).Text, iPosition:=0) + clsRaeslineFunction.AddParameter("colour", Chr(34) & ColourArguments(i) & Chr(34), iPosition:=1) + + Dim clsGeomLineFunction As New RFunction + clsGeomLineFunction.SetPackageName("ggplot2") + clsGeomLineFunction.SetRCommand("geom_line") + clsGeomLineFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaeslineFunction, iPosition:=1) + clsGeomLineFunction.AddParameter("linewidth", LinewidthArguments(i), iPosition:=2) + clsGeomLineFunction.AddParameter("group", Chr(34) & GroupArguments(i) & Chr(34), iPosition:=3) + + ' Add geom_line function to the base operator + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) + clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) + clsBaseOperator.AddParameter(strFirstParameterName & i, clsRFunctionParameter:=clsGeomLineFunction, iPosition:=3) + Next + If Not ucrInputAddLegendLine.IsEmpty Then + clsScalecolouridentityFunction.AddParameter("labels", ucrInputAddLegendLine.clsRList.ToScript(), iPosition:=2) + Else + clsScalecolouridentityFunction.RemoveParameterByName("labels") + End If + clsBaseOperator.AddParameter("scale_colour_identity", clsRFunctionParameter:=clsScalecolouridentityFunction, iPosition:=13) + Else + For i As Integer = 0 To ucrReceiverLines.lstSelectedVariables.Items.Count - 1 + Dim clsRaeslineFunction As New RFunction + Dim ColourArguments1 As New List(Of String) From {"grey", "grey", "black", "grey"} + Dim LinewidthArguments1 As New List(Of String) From {"1.0", "1.0", "2.0", "1.0"} + + clsRaeslineFunction.SetPackageName("ggplot2") + clsRaeslineFunction.SetRCommand("aes") + clsRaeslineFunction.AddParameter("y", ucrReceiverLines.lstSelectedVariables.Items(i).Text, iPosition:=0) + + Dim clsGeomLineFunction As New RFunction + clsGeomLineFunction.SetPackageName("ggplot2") + clsGeomLineFunction.SetRCommand("geom_line") + clsGeomLineFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaeslineFunction, iPosition:=1) + clsGeomLineFunction.AddParameter("linewidth", LinewidthArguments1(i), iPosition:=2) + clsGeomLineFunction.AddParameter("colour", Chr(34) & ColourArguments1(i) & Chr(34), iPosition:=3) + + ' Add geom_line function to the base operator + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) + clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) + clsBaseOperator.AddParameter(strFirstParameterName & i, clsRFunctionParameter:=clsGeomLineFunction, iPosition:=3) + Next + clsBaseOperator.RemoveParameterByName("scale_colour_identity") + End If + ' Add points if ucrChkAddPoint is checked + If ucrChkAddPoint.Checked Then + For i As Integer = 0 To ucrReceiverLines.lstSelectedVariables.Items.Count - 1 + Dim clsAesGeompointFunction As New RFunction + clsAesGeompointFunction.SetPackageName("ggplot2") + clsAesGeompointFunction.SetRCommand("aes") + clsAesGeompointFunction.AddParameter("y", ucrReceiverLines.lstSelectedVariables.Items(i).Text, iPosition:=0) + + Dim clsGeomPointFunction As New RFunction + clsGeomPointFunction.SetPackageName("ggplot2") + clsGeomPointFunction.SetRCommand("geom_point") + clsGeomPointFunction.AddParameter("mapping", clsRFunctionParameter:=clsAesGeompointFunction, iPosition:=1) + + ' Add geom_point function to the base operator + clsBaseOperator.AddParameter(strGeompointParameterName & "Line" & i, clsRFunctionParameter:=clsGeomPointFunction, iPosition:=9) + Next + Else + For i As Integer = 0 To ucrReceiverLines.lstSelectedVariables.Items.Count - 1 + clsBaseOperator.RemoveParameterByName(strGeompointParameterName & "Line" & i) + Next + End If + Else + For i As Integer = 0 To ucrReceiverLines.lstSelectedVariables.Items.Count - 1 + clsBaseOperator.RemoveParameterByName(strGeompointParameterName & "Line" & i) + clsBaseOperator.RemoveParameterByName(strFirstParameterName & i) + Next + clsBaseOperator.RemoveParameterByName("scale_colour_identity") + End If + + ' Process ucrReceiverRibbons if not empty and ucrChkRibbons is checked + If ucrChkRibbons.Checked AndAlso Not ucrReceiverRibbons.IsEmpty Then + If ucrChkFill.Checked Then + clsBaseOperator.AddParameter("scale_fill_identity", clsRFunctionParameter:=clsScalefillidentityFunction, iPosition:=12) + For i As Integer = 0 To ucrReceiverRibbons.lstSelectedVariables.Items.Count - 1 Step 2 + ' Get current variable + Dim var1 = ucrReceiverRibbons.lstSelectedVariables.Items(i).Text + ' Get the next variable in the pair if available + Dim var2 As String = If(i + 1 < ucrReceiverRibbons.lstSelectedVariables.Items.Count, ucrReceiverRibbons.lstSelectedVariables.Items(i + 1).Text, "") + Dim fillArguments As New List(Of String) From {"#3270C1", "#A3A3A3", "#4DB0F1", "#FF5733"} + + If Not String.IsNullOrEmpty(var2) Then + Dim clsRaesRibFunction As New RFunction + clsRaesRibFunction.SetPackageName("ggplot2") + clsRaesRibFunction.SetRCommand("aes") + clsRaesRibFunction.AddParameter("ymax", var1, iPosition:=0) + clsRaesRibFunction.AddParameter("ymin", var2, iPosition:=1) + clsRaesRibFunction.AddParameter("fill", Chr(34) & fillArguments(i) & Chr(34), iPosition:=2) + + Dim clsRibFunction As New RFunction + clsRibFunction.SetPackageName("ggplot2") + clsRibFunction.SetRCommand("geom_ribbon") + clsRibFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaesRibFunction, iPosition:=1) + + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) + clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) + clsBaseOperator.AddParameter(strgeomRibbonParameterName0 & i, clsRFunctionParameter:=clsRibFunction, iPosition:=1) + End If + Next + If Not ucrInputAddLegendRibbon.IsEmpty Then + clsScalefillidentityFunction.AddParameter("labels", ucrInputAddLegendRibbon.clsRList.ToScript(), iPosition:=2) + Else + clsScalefillidentityFunction.RemoveParameterByName("labels") + End If + Else + For i As Integer = 0 To ucrReceiverRibbons.lstSelectedVariables.Items.Count - 1 Step 2 + ' Get current variable + Dim var1 = ucrReceiverRibbons.lstSelectedVariables.Items(i).Text + ' Get the next variable in the pair if available + Dim var2 As String = If(i + 1 < ucrReceiverRibbons.lstSelectedVariables.Items.Count, ucrReceiverRibbons.lstSelectedVariables.Items(i + 1).Text, "") + Dim fillArguments As New List(Of String) From {"#3270C1", "#A3A3A3", "#4DB0F1", "#FF5733"} + + If Not String.IsNullOrEmpty(var2) Then + Dim clsRaesRibFunction As New RFunction + clsRaesRibFunction.SetPackageName("ggplot2") + clsRaesRibFunction.SetRCommand("aes") + clsRaesRibFunction.AddParameter("ymax", var1, iPosition:=0) + clsRaesRibFunction.AddParameter("ymin", var2, iPosition:=1) + + Dim clsRibFunction As New RFunction + clsRibFunction.SetPackageName("ggplot2") + clsRibFunction.SetRCommand("geom_ribbon") + clsRibFunction.AddParameter("mapping", clsRFunctionParameter:=clsRaesRibFunction, iPosition:=1) + clsRibFunction.AddParameter("fill", Chr(34) & fillArguments(i) & Chr(34), iPosition:=2) + + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) + clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) + clsBaseOperator.AddParameter(strgeomRibbonParameterName0 & i, clsRFunctionParameter:=clsRibFunction, iPosition:=1) + End If + Next + clsBaseOperator.RemoveParameterByName("scale_fill_identity") + End If + + ' Add points to ribbons if ucrChkAddpointRibbon is checked + If ucrChkAddpointRibbon.Checked Then + For Each selectedItem As ListViewItem In ucrReceiverRibbons.lstSelectedVariables.Items + Dim clsAesGeompointFunction1 As New RFunction + clsAesGeompointFunction1.SetPackageName("ggplot2") + clsAesGeompointFunction1.SetRCommand("aes") + clsAesGeompointFunction1.AddParameter("y", selectedItem.Text, iPosition:=0) + + Dim clsGeomPointFunction1 As New RFunction + clsGeomPointFunction1.SetPackageName("ggplot2") + clsGeomPointFunction1.SetRCommand("geom_point") + clsGeomPointFunction1.AddParameter("mapping", clsRFunctionParameter:=clsAesGeompointFunction1, iPosition:=1) + + ' Add geom_point function to the base operator with a unique parameter name + clsBaseOperator.AddParameter(strGeompointParameterName1 & "Ribbon" & ucrReceiverRibbons.lstSelectedVariables.Items.IndexOf(selectedItem), clsRFunctionParameter:=clsGeomPointFunction1, iPosition:=15) + Next + Else + For i As Integer = 0 To ucrReceiverRibbons.lstSelectedVariables.Items.Count - 1 + clsBaseOperator.RemoveParameterByName(strGeompointParameterName1 & "Ribbon" & i) + Next + End If + Else + For i As Integer = 0 To ucrReceiverRibbons.lstSelectedVariables.Items.Count - 1 + clsBaseOperator.RemoveParameterByName(strGeompointParameterName1 & "Ribbon" & i) + clsBaseOperator.RemoveParameterByName(strgeomRibbonParameterName0 & i) + Next + clsBaseOperator.RemoveParameterByName("scale_fill_identity") + End If + + AddRemoveFacets() + AddRemoveGroupBy() + End Sub + + Private Sub UpdateParameters() + clsFacetOperator.RemoveParameterByName("var1") + clsFacetColOp.RemoveParameterByName("col" & ucrInputStation.Name) + clsFacetRowOp.RemoveParameterByName("row" & ucrInputStation.Name) + + clsBaseOperator.RemoveParameterByName("facets") + bUpdatingParameters = True + ucrReceiverFacetBy.SetRCode(Nothing) + Select Case ucrInputStation.GetText() + Case strFacetWrap + ucrReceiverFacetBy.ChangeParameterName("var1") + ucrReceiverFacetBy.SetRCode(clsFacetOperator) + Case strFacetCol + ucrReceiverFacetBy.ChangeParameterName("col" & ucrInputStation.Name) + ucrReceiverFacetBy.SetRCode(clsFacetColOp) + Case strFacetRow + ucrReceiverFacetBy.ChangeParameterName("row" & ucrInputStation.Name) + ucrReceiverFacetBy.SetRCode(clsFacetRowOp) + End Select + If Not clsRaesFunction.ContainsParameter("x") Then + clsRaesFunction.AddParameter("x", Chr(34) & Chr(34), iPosition:=1) + End If + bUpdatingParameters = False + End Sub + + Private Sub AddRemoveFacets() + Dim bWrap As Boolean = False + Dim bCol As Boolean = False + Dim bRow As Boolean = False + + If bUpdatingParameters Then + Exit Sub + End If + + clsBaseOperator.RemoveParameterByName("facets") + If Not ucrReceiverFacetBy.IsEmpty Then + Select Case ucrInputStation.GetText() + Case strFacetWrap + bWrap = True + Case strFacetCol + bCol = True + Case strFacetRow + bRow = True + End Select + End If + + If bWrap OrElse bRow OrElse bCol Then + clsBaseOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction) + End If + If bWrap Then + clsFacetFunction.SetRCommand("facet_wrap") + End If + If bRow OrElse bCol Then + clsFacetFunction.SetRCommand("facet_grid") + End If + If bRow Then + clsFacetOperator.AddParameter("left", clsROperatorParameter:=clsFacetRowOp, iPosition:=0) + ElseIf bCol AndAlso bWrap = False Then + clsFacetOperator.AddParameter("left", ".", iPosition:=0) + Else + clsFacetOperator.RemoveParameterByName("left") + End If + If bCol Then + clsFacetOperator.AddParameter("right", clsROperatorParameter:=clsFacetColOp, iPosition:=1) + ElseIf bRow AndAlso bWrap = False Then + clsFacetOperator.AddParameter("right", ".", iPosition:=1) + Else + clsFacetOperator.RemoveParameterByName("right") + End If + End Sub + + Private Sub AddRemoveGroupBy() + If clsPipeOperator.ContainsParameter("mutate") Then + clsGroupByFunction.ClearParameters() + If clsBaseOperator.ContainsParameter("facets") Then + Select Case ucrInputStation.GetText() + Case strFacetWrap + GetParameterValue(clsFacetOperator) + Case strFacetCol + GetParameterValue(clsFacetColOp) + Case strFacetRow + GetParameterValue(clsFacetRowOp) + End Select + End If + If clsGroupByFunction.iParameterCount > 0 Then + clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=1) + Else + clsPipeOperator.RemoveParameterByName("group_by") + End If + Else + clsPipeOperator.RemoveParameterByName("group_by") + End If + SetPipeAssignTo() + End Sub + + Private Sub ucrInput_ControlValueChanged(ucrChangedControl As ucrInputComboBox) Handles ucrInputStation.ControlValueChanged + If Not bUpdateComboOptions Then + Exit Sub + End If + Dim strChangedText As String = ucrChangedControl.GetText() + If strChangedText <> strNone Then + If Not strChangedText = strFacetCol AndAlso Not strChangedText = strFacetRow AndAlso + Not ucrInputStation.Equals(ucrChangedControl) AndAlso ucrInputStation.GetText() = strChangedText Then + bUpdateComboOptions = False + ucrInputStation.SetName(strNone) + bUpdateComboOptions = True + End If + If (strChangedText = strFacetWrap AndAlso ucrInputStation.GetText = strFacetRow) OrElse (strChangedText = strFacetRow AndAlso + ucrInputStation.GetText = strFacetWrap) OrElse (strChangedText = strFacetWrap AndAlso + ucrInputStation.GetText = strFacetCol) OrElse (strChangedText = strFacetCol AndAlso ucrInputStation.GetText = strFacetWrap) Then + ucrInputStation.SetName(strNone) + End If + End If + UpdateParameters() + AddRemoveFacets() + AddRemoveGroupBy() + End Sub + + Private Sub GetParameterValue(clsOperator As ROperator) + Dim i As Integer = 0 + For Each clsTempParam As RParameter In clsOperator.clsParameters + If clsTempParam.strArgumentValue <> "" AndAlso clsTempParam.strArgumentValue <> "." Then + clsGroupByFunction.AddParameter(i, clsTempParam.strArgumentValue, bIncludeArgumentName:=False, iPosition:=i) + i = i + 1 + End If + Next + End Sub + + Private Sub SetPipeAssignTo() + If ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso clsPipeOperator.clsParameters.Count > 1 Then + clsPipeOperator.SetAssignTo(ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + Else + clsPipeOperator.RemoveAssignTo() + End If + End Sub + + Private Sub ucrReceiverFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFacetBy.ControlValueChanged + AddRemoveFacets() + AddRemoveGroupBy() + End Sub + + Private Sub AutoFacetStation() + Dim ucrCurrentReceiver As ucrReceiver = Nothing + + If ucrSelectorForSeasonalGraph.CurrentReceiver IsNot Nothing Then + ucrCurrentReceiver = ucrSelectorForSeasonalGraph.CurrentReceiver + End If + ucrReceiverFacetBy.AddItemsWithMetadataProperty(ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, "Climatic_Type", {"station_label"}) + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + AddRemoveGroupBy() + End Sub + + Private Sub AutoFillmonth() + Dim ucrCurrentReceiver0 As ucrReceiver = Nothing + + If ucrSelectorForSeasonalGraph.CurrentReceiver IsNot Nothing Then + ucrCurrentReceiver0 = ucrSelectorForSeasonalGraph.CurrentReceiver + End If + ucrReceiverX.AddItemsWithMetadataProperty(ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text, "Climatic_Type", {"month_label"}) + If ucrCurrentReceiver0 IsNot Nothing Then + ucrCurrentReceiver0.SetMeAsReceiver() + End If + End Sub + + Private Sub ucrReceiverLines_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverLines.ControlValueChanged + ListGeomLine() + End Sub + + Private Sub AddRemoveTheme() + If clsThemeFunction.iParameterCount > 0 Then + clsBaseOperator.AddParameter("theme", clsRFunctionParameter:=clsThemeFunction, iPosition:=15) + Else + clsBaseOperator.RemoveParameterByName("theme") + End If + End Sub + + Private Sub ucrChkLegend_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkLegend.ControlValueChanged, ucrInputLegendPosition.ControlValueChanged + AddRemoveTheme() + End Sub + + Private Sub ucrSelectorForSeasonalGraph_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForSeasonalGraph.ControlValueChanged + AutoFacetStation() + SetPipeAssignTo() + AutoFillmonth() + End Sub + + Private Sub ucrBase_Click(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) + TestOkEnabled() + End Sub + + Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click ', PlotOptionsToolStripMenuItem.Click + sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, + clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, + clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, ucrNewBaseSelector:=ucrSelectorForSeasonalGraph, + clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, clsNewXScaleDateFunction:=clsXScaleDateFunction, clsNewAnnotateFunction:=clsAnnotateFunction, + clsNewScaleFillViridisFunction:=clsScaleFillViridisFunction, clsNewScaleColourViridisFunction:=clsScaleColourViridisFunction, clsNewYScaleDateFunction:=clsYScaleDateFunction, clsNewFacetVariablesOperator:=clsFacetOperator, + strMainDialogGeomParameterNames:=strGeomParameterNames, bReset:=bResetSubdialog) + sdgPlots.ShowDialog() + bResetSubdialog = False + End Sub + + Private Sub ucrChkRibbons_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRibbons.ControlValueChanged, ucrReceiverRibbons.ControlValueChanged + ListGeomLine() + If ucrChkRibbons.Checked Then + ucrReceiverRibbons.SetMeAsReceiver() + Else + clsBaseOperator.RemoveParameterByName(strgeomRibbonParameterName0) + End If + End Sub + + Private Sub ucrReceiverX_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverX.ControlValueChanged + Dim variableNames As String = String.Join(",", ucrReceiverX.GetVariableNames()) + ' Concatenate the variable names with commas + variableNames = variableNames.Replace("'", "").Replace("""", "") + + If Not ucrReceiverX.IsEmpty AndAlso (ucrReceiverX.strCurrDataType.Contains("factor") OrElse ucrReceiverX.strCurrDataType = "ordered,factor") Then + clsRaesFunction.AddParameter("group", "1", iPosition:=3) + Else + clsRaesFunction.RemoveParameterByName("group") + clsRaesFunction.AddParameter("x", variableNames) + End If + End Sub + + Private Sub ucrChkAddPoint_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddPoint.ControlValueChanged + ListGeomLine() + End Sub + + Private Sub ucrChkFill_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkFill.ControlValueChanged, ucrChkColour.ControlValueChanged, ucrInputAddLegendRibbon.ControlValueChanged, ucrInputAddLegendLine.ControlValueChanged + ListGeomLine() + SetCalculationHistory() + SetCalculationHistory1() + End Sub + + Private Sub ucrChkAddpointRibbon_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddpointRibbon.ControlValueChanged + ListGeomLine() + End Sub + + Private Sub ucrSelectorForSeasonalGraph_DataFrameChanged() Handles ucrSelectorForSeasonalGraph.DataFrameChanged + clsGetObjectDataFunction.AddParameter("data_name", Chr(34) & ucrSelectorForSeasonalGraph.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) + End Sub + + Private Sub ucrSave_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSave.ControlValueChanged + If ucrSave.ucrChkSave.Checked Then + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & ucrSave.GetText & Chr(34), iPosition:=1) + Else + clsGetObjectDataFunction.AddParameter("object_name", Chr(34) & "last_graph" & Chr(34), iPosition:=1) + End If + End Sub + + Private Sub AllControl_ControlContentsChanged() Handles ucrReceiverX.ControlContentsChanged, ucrReceiverRibbons.ControlContentsChanged, ucrReceiverLines.ControlContentsChanged, ucrSave.ControlContentsChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index 2df8b779213..fa976b592a8 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -183,7 +183,7 @@ Public Class dlgSeasonalPlot ucrSaveGraph.SetPrefix("seasonality_plot") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetSaveTypeAsGraph() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetDataFrameSelector(ucrSelectorSeasonalityComparisons.ucrAvailableDataFrames) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgShowModel.vb b/instat/dlgShowModel.vb index 879bb8c8d14..c534781f14a 100644 --- a/instat/dlgShowModel.vb +++ b/instat/dlgShowModel.vb @@ -58,7 +58,7 @@ Public Class dlgShowModel ucrSaveGraph.SetPrefix("quant") ucrSaveGraph.SetIsComboBox() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorShowModel.ucrAvailableDataFrames) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgSummaryBarOrPieChart.vb b/instat/dlgSummaryBarOrPieChart.vb index 63224a72d51..88ecfdc2b52 100644 --- a/instat/dlgSummaryBarOrPieChart.vb +++ b/instat/dlgSummaryBarOrPieChart.vb @@ -100,7 +100,7 @@ Public Class dlgSummaryBarOrPieChart ucrReceiverSecondFactor.SetParameterIsString() ucrSaveSummaryBar.SetIsComboBox() - ucrSaveSummaryBar.SetCheckBoxText("Save Graph") + ucrSaveSummaryBar.SetCheckBoxText("Store Graph") ucrSaveSummaryBar.SetDataFrameSelector(ucrSummaryBarSelector.ucrAvailableDataFrames) ucrSaveSummaryBar.SetSaveTypeAsGraph() ucrSaveSummaryBar.SetPrefix("bar") diff --git a/instat/dlgSummaryTables.vb b/instat/dlgSummaryTables.vb index 4c553f4f818..bd7aba23fa4 100644 --- a/instat/dlgSummaryTables.vb +++ b/instat/dlgSummaryTables.vb @@ -182,7 +182,7 @@ Public Class dlgSummaryTables ucrSaveTable.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetDataFrameSelector(ucrSelectorSummaryTables.ucrAvailableDataFrames) ucrSaveTable.SetIsComboBox() - ucrSaveTable.SetCheckBoxText("Save Table") + ucrSaveTable.SetCheckBoxText("Store Table") ucrSaveTable.SetAssignToIfUncheckedValue("last_table") ucrReorderSummary.bDataIsSummaries = True diff --git a/instat/dlgTaylorDiagram.vb b/instat/dlgTaylorDiagram.vb index 5de43bf7299..72e41922759 100644 --- a/instat/dlgTaylorDiagram.vb +++ b/instat/dlgTaylorDiagram.vb @@ -71,7 +71,7 @@ Public Class dlgTaylorDiagram ucrChkNormalise.SetRDefault("FALSE") ucrSavePlot.SetPrefix("taylor_diagram_plot") - ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetCheckBoxText("Store Graph") ucrSavePlot.SetIsComboBox() ucrSavePlot.SetSaveTypeAsGraph() ucrSavePlot.SetDataFrameSelector(ucrSelectorTaylorDiagram.ucrAvailableDataFrames) diff --git a/instat/dlgThreeVariableFrequencies.vb b/instat/dlgThreeVariableFrequencies.vb index a0a3c3e330b..e68f16c6c2a 100644 --- a/instat/dlgThreeVariableFrequencies.vb +++ b/instat/dlgThreeVariableFrequencies.vb @@ -291,12 +291,12 @@ Public Class dlgThreeVariableFrequencies ucrBase.clsRsyntax.SetBaseROperator(clsTableBaseOperator) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveGraph.SetAssignToIfUncheckedValue("last_summary") - ucrSaveGraph.SetCheckBoxText("Save Summary") + ucrSaveGraph.SetCheckBoxText("Store Summary") ElseIf rdoGraph.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsGridArrangeFunction) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") End If End Sub diff --git a/instat/dlgThreeVariablesModelling.vb b/instat/dlgThreeVariablesModelling.vb index 80a2882f804..b91e3764e6f 100644 --- a/instat/dlgThreeVariablesModelling.vb +++ b/instat/dlgThreeVariablesModelling.vb @@ -86,7 +86,7 @@ Public Class dlgThreeVariableModelling ucrSaveModel.SetPrefix("reg") ucrSaveModel.SetDataFrameSelector(ucrSelectorThreeVariableModelling.ucrAvailableDataFrames) ucrSaveModel.SetSaveTypeAsModel() - ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetCheckBoxText("Store Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 0ee96af11e3..aa55864e5f6 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -258,7 +258,7 @@ Public Class dlgTimeSeriesPlot ucrSavePlot.SetPrefix("line") ucrSavePlot.SetIsComboBox() - ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetCheckBoxText("Store Graph") ucrSavePlot.SetSaveTypeAsGraph() ucrSavePlot.SetDataFrameSelector(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames) ucrSavePlot.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/dlgTransformClimatic.vb b/instat/dlgTransformClimatic.vb index ca2690e2c39..1b6f7c6009b 100644 --- a/instat/dlgTransformClimatic.vb +++ b/instat/dlgTransformClimatic.vb @@ -520,7 +520,6 @@ Public Class dlgTransformClimatic clsRRaindayUpperOperator.SetOperation("<=") clsRRaindayAndOperator.AddParameter("lower", clsROperatorParameter:=clsRRaindayLowerOperator, iPosition:=1) clsRRaindayLowerOperator.SetOperation(">=") - clsRRaindayLowerOperator.AddParameter("min", 0.85, iPosition:=1) clsRRaindayOrOperator.SetOperation("|") clsRRaindayOrOperator.AddParameter("upper", clsROperatorParameter:=clsGreaterThanOperator, iPosition:=0) @@ -894,11 +893,9 @@ Public Class dlgTransformClimatic clsRTransformCountSpellSub.AddParameter("sub1", clsRFunctionParameter:=clsRRainday, bIncludeArgumentName:=False, iPosition:=0) clsTransformManipulationsFunc.SetRCommand("list") - clsTransformManipulationsFunc.AddParameter("group_by_year", clsRFunctionParameter:=clsGroupByYear, bIncludeArgumentName:=False, iPosition:=0) clsRTransform.SetRCommand("instat_calculation$new") clsRTransform.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) - clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsRCountFunction, iPosition:=1) ' changes depending on the rdo clsRTransform.AddParameter("result_name", Chr(34) & "count" & Chr(34), iPosition:=2) clsRTransform.AddParameter("sub_calculations", clsRFunctionParameter:=clsRTransformCountSpellSub, iPosition:=4) clsRTransform.AddParameter("manipulations", clsRFunctionParameter:=clsTransformManipulationsFunc, iPosition:=5) @@ -930,8 +927,6 @@ Public Class dlgTransformClimatic ucrReceiverData.AddAdditionalCodeParameterPair(clsIfElseRainMaxFunction, New RParameter("no", 2), iAdditionalPairNo:=12) ucrNudSumOver.AddAdditionalCodeParameterPair(clsRasterFuction, New RParameter("n", 1), iAdditionalPairNo:=1) ucrInputSum.AddAdditionalCodeParameterPair(clsRasterFuction, New RParameter("fun", 2), iAdditionalPairNo:=1) - ucrInputSpellUpper.AddAdditionalCodeParameterPair(clsGreaterThanOperator, New RParameter("max", 1), iAdditionalPairNo:=1) - ucrInputSpellLower.AddAdditionalCodeParameterPair(clsLessThanOperator, New RParameter("min", 1), iAdditionalPairNo:=1) ucrReceiverTMin.AddAdditionalCodeParameterPair(clsTMeanAddOperator, New RParameter("tmin", 1), iAdditionalPairNo:=1) ucrReceiverTMax.AddAdditionalCodeParameterPair(clsTMeanAddOperator, New RParameter("tmax", 0), iAdditionalPairNo:=1) ucrReceiverTMean.AddAdditionalCodeParameterPair(clsGrowingDegreDiffOperator, New RParameter("tmean", 0), iAdditionalPairNo:=1) @@ -947,6 +942,7 @@ Public Class dlgTransformClimatic ucrInputEvaporation.AddAdditionalCodeParameterPair(clsWBMaxEvapOperator, New RParameter("value", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) ucrReceiverEvap.AddAdditionalCodeParameterPair(clsWBMaxTailFunction1, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverEvap.AddAdditionalCodeParameterPair(clsAsNumericFunction, New RParameter("x", 0), iAdditionalPairNo:=2) + ucrSaveColumn.AddAdditionalCodeParameterPair(clsEndSeasonWBCalc, New RParameter("result_name", 2), iAdditionalPairNo:=1) ' Moving ucrNudSumOver.SetRCode(clsRMovingFunction, bReset) @@ -961,7 +957,7 @@ Public Class dlgTransformClimatic ' Count ucrNudCountOver.SetRCode(clsRCountFunction, bReset) - ucrInputSpellLower.SetRCode(clsRRaindayLowerOperator, bReset) + ucrInputSpellLower.SetRCode(clsLessThanOperator, bReset) ucrInputSpellUpper.SetRCode(clsRRaindayUpperOperator, bReset) ' Water Balance @@ -1106,6 +1102,7 @@ Public Class dlgTransformClimatic ChangeFunctions() AddRemoveMeanOperator() ShowGroups() + InputConditionOptions() End Sub Private Sub DegreeFunctions() @@ -1217,7 +1214,6 @@ Public Class dlgTransformClimatic Private Sub RainDays() clsRRainday.AddParameter("calculated_from", " list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames() & ")", iPosition:=3) - clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ")", iPosition:=3) End Sub Private Sub ucrSelectorTransform_ControlValueChanged(ucrchangedControl As ucrCore) Handles ucrSelectorTransform.ControlValueChanged @@ -1232,7 +1228,7 @@ Public Class dlgTransformClimatic RainfallChange() End Sub - Private Sub ucrInputSpellLower_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSpellUpper.ControlValueChanged, ucrInputCondition.ControlValueChanged + Private Sub ucrInputSpellLower_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSpellLower.ControlValueChanged, ucrInputSpellUpper.ControlValueChanged, ucrInputCondition.ControlValueChanged InputConditionOptions() End Sub @@ -1282,25 +1278,33 @@ Public Class dlgTransformClimatic End Sub Private Sub CumulativeFunctions() - Select Case ucrInputCumulative.GetText - Case "Sum" - clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsCumulativeSum, iPosition:=1) - Case "Maximum" - clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsCumulativeMaximum, iPosition:=1) - Case "Minimum" - clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsCumulativeMinimum, iPosition:=1) - End Select + If rdoCumulative.Checked Then + Select Case ucrInputCumulative.GetText + Case "Sum" + clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsCumulativeSum, iPosition:=1) + Case "Maximum" + clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsCumulativeMaximum, iPosition:=1) + Case "Minimum" + clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsCumulativeMinimum, iPosition:=1) + End Select + ElseIf rdoCount.Checked Then + clsRTransform.AddParameter("function_exp", clsRFunctionParameter:=clsRCountFunction, iPosition:=1) ' changes depending on the rdo + End If End Sub Private Sub CumulativeColNames() - Select Case ucrInputCumulative.GetText - Case "Sum" - ucrSaveColumn.SetName("cumsum") - Case "Maximum" - ucrSaveColumn.SetName("cummax") - Case "Minimum" - ucrSaveColumn.SetName("cummin") - End Select + If rdoCumulative.Checked Then + Select Case ucrInputCumulative.GetText + Case "Sum" + ucrSaveColumn.SetName("cumsum") + Case "Maximum" + ucrSaveColumn.SetName("cummax") + Case "Minimum" + ucrSaveColumn.SetName("cummin") + End Select + ElseIf rdoCount.Checked Then + ucrSaveColumn.SetName("count") + End If End Sub Private Sub ucrInputCumulative_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputCumulative.ControlValueChanged diff --git a/instat/dlgTreemap.vb b/instat/dlgTreemap.vb index c0b6a25b996..ef94b10e7b2 100644 --- a/instat/dlgTreemap.vb +++ b/instat/dlgTreemap.vb @@ -137,7 +137,7 @@ Public Class dlgTreemap ucrColourText.SetColours() ucrSaveTreemap.SetIsComboBox() - ucrSaveTreemap.SetCheckBoxText("Save Treemap") + ucrSaveTreemap.SetCheckBoxText("Store Treemap") ucrSaveTreemap.SetDataFrameSelector(ucrSelectorTreemap.ucrAvailableDataFrames) ucrSaveTreemap.SetSaveTypeAsGraph() ucrSaveTreemap.SetPrefix("tree_map") diff --git a/instat/dlgTwoVariableFitModel.vb b/instat/dlgTwoVariableFitModel.vb index da56404685a..465cfc4f7c8 100644 --- a/instat/dlgTwoVariableFitModel.vb +++ b/instat/dlgTwoVariableFitModel.vb @@ -159,7 +159,7 @@ Public Class dlgTwoVariableFitModel ucrSaveModels.SetPrefix("two_var") ucrSaveModels.SetSaveTypeAsModel() ucrSaveModels.SetDataFrameSelector(ucrSelectorSimpleReg.ucrAvailableDataFrames) - ucrSaveModels.SetCheckBoxText("Save Model") + ucrSaveModels.SetCheckBoxText("Store Model") ucrSaveModels.SetIsComboBox() ucrSaveModels.SetAssignToIfUncheckedValue("last_model") diff --git a/instat/dlgTwoWayFrequencies.vb b/instat/dlgTwoWayFrequencies.vb index 9d07336cc92..b199bb1036e 100644 --- a/instat/dlgTwoWayFrequencies.vb +++ b/instat/dlgTwoWayFrequencies.vb @@ -379,12 +379,12 @@ Public Class dlgTwoWayFrequencies ucrBase.clsRsyntax.SetBaseRFunction(clsSjTab) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Html) ucrSaveGraph.SetAssignToIfUncheckedValue("last_summary") - ucrSaveGraph.SetCheckBoxText("Save Summary") + ucrSaveGraph.SetCheckBoxText("Store Summary") ElseIf rdoGraph.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsSjPlot) ucrSaveGraph.SetSaveType(RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") End If End Sub diff --git a/instat/dlgUseGraph.vb b/instat/dlgUseGraph.vb index 72f268a077c..8775b4e1a0e 100644 --- a/instat/dlgUseGraph.vb +++ b/instat/dlgUseGraph.vb @@ -85,7 +85,7 @@ Public Class dlgUseGraph ucrSaveGraph.SetSaveType(strRObjectType:=RObjectTypeLabel.Graph, strRObjectFormat:=RObjectFormat.Image) ucrSaveGraph.SetDataFrameSelector(ucrGraphsSelector.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save New Graph") + ucrSaveGraph.SetCheckBoxText("Store New Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgUseModel.vb b/instat/dlgUseModel.vb index 6cdefc38f12..1e280711954 100644 --- a/instat/dlgUseModel.vb +++ b/instat/dlgUseModel.vb @@ -41,7 +41,7 @@ Public Class dlgUseModel ucrSaveResult.SetPrefix("object") ucrSaveResult.SetIsComboBox() ucrSaveResult.SetSaveTypeAsModel() - ucrSaveResult.SetCheckBoxText("Save Output") + ucrSaveResult.SetCheckBoxText("Store Output") ucrSaveResult.SetAssignToIfUncheckedValue("last_object") ucrSaveResult.SetDataFrameSelector(ucrSelectorUseModel.ucrAvailableDataFrames) diff --git a/instat/dlgUseTable.vb b/instat/dlgUseTable.vb index 0e5bd17a22c..1757a270ecf 100644 --- a/instat/dlgUseTable.vb +++ b/instat/dlgUseTable.vb @@ -73,7 +73,7 @@ Public Class dlgUseTable ucrSaveTable.SetPrefix("use_table") ucrSaveTable.SetSaveType(strRObjectType:=RObjectTypeLabel.Table, strRObjectFormat:=RObjectFormat.Html) ucrSaveTable.SetDataFrameSelector(ucrTablesSelector.ucrAvailableDataFrames) - ucrSaveTable.SetCheckBoxText("Save New Table") + ucrSaveTable.SetCheckBoxText("Store New Table") ucrSaveTable.SetIsComboBox() ucrSaveTable.SetAssignToIfUncheckedValue("table") End Sub diff --git a/instat/dlgWindPollutionRose.vb b/instat/dlgWindPollutionRose.vb index 79c87d4b71d..3b94c16bd42 100644 --- a/instat/dlgWindPollutionRose.vb +++ b/instat/dlgWindPollutionRose.vb @@ -108,7 +108,7 @@ Public Class dlgWindPollutionRose ucrSaveGraph.SetPrefix("pollution_rose_plot") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetSaveTypeAsGraph() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetDataFrameSelector(ucrSelectorWindPollutionRose.ucrAvailableDataFrames) ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/dlgWindrose.vb b/instat/dlgWindrose.vb index 1d017283960..5d13cfa1c4d 100644 --- a/instat/dlgWindrose.vb +++ b/instat/dlgWindrose.vb @@ -80,7 +80,7 @@ Public Class dlgWindrose ucrSaveGraph.SetDataFrameSelector(ucrWindRoseSelector.ucrAvailableDataFrames) ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetIsComboBox() - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") End Sub diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 638415b3234..c0909e4c30b 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -415,9 +415,11 @@ Partial Class frmMain Me.ToolStripSeparator75 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbLogScript = New System.Windows.Forms.ToolStripSplitButton() Me.mnuLogScript = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuSwapDataLogScript = New System.Windows.Forms.ToolStripMenuItem() Me.mnuMetadata = New System.Windows.Forms.ToolStripSplitButton() Me.mnuColumnMetadat = New System.Windows.Forms.ToolStripMenuItem() Me.mnuDataFrameMetadat = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuSwapDataMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator76 = New System.Windows.Forms.ToolStripSeparator() Me.mnuTbResetLayout = New System.Windows.Forms.ToolStripButton() Me.separator3 = New System.Windows.Forms.ToolStripSeparator() @@ -1540,6 +1542,7 @@ Partial Class frmMain ' 'mnuViewSwapDataAndScript ' + Me.mnuViewSwapDataAndScript.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None Me.mnuViewSwapDataAndScript.Name = "mnuViewSwapDataAndScript" Me.mnuViewSwapDataAndScript.Size = New System.Drawing.Size(213, 22) Me.mnuViewSwapDataAndScript.Text = "Swap Data and Log/Script" @@ -1579,7 +1582,7 @@ Partial Class frmMain 'ToolStripSeparator28 ' Me.ToolStripSeparator28.Name = "ToolStripSeparator28" - Me.ToolStripSeparator28.Size = New System.Drawing.Size(206, 6) + Me.ToolStripSeparator28.Size = New System.Drawing.Size(215, 6) ' 'mnuHelpWindows ' @@ -1590,95 +1593,95 @@ Partial Class frmMain 'ToolStripSeparator81 ' Me.ToolStripSeparator81.Name = "ToolStripSeparator81" - Me.ToolStripSeparator81.Size = New System.Drawing.Size(206, 6) + Me.ToolStripSeparator81.Size = New System.Drawing.Size(215, 6) ' 'mnuHelpMenus ' Me.mnuHelpMenus.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MenusAndDialogsToolStripMenuItem, Me.ToolStripSeparator82, Me.FileToolStripMenuItem, Me.EditToolStripMenuItem, Me.PrepareToolStripMenuItem, Me.DescribeToolStripMenuItem, Me.ModelToolStripMenuItem, Me.ToolStripSeparator83, Me.StructuredToolStripMenuItem, Me.ClimaticToolStripMenuItem, Me.ProcurementToolStripMenuItem, Me.ExperimentsToolStripMenuItem, Me.ToolsToolStripMenuItem, Me.ViewToolStripMenuItem}) Me.mnuHelpMenus.Name = "mnuHelpMenus" - Me.mnuHelpMenus.Size = New System.Drawing.Size(209, 22) + Me.mnuHelpMenus.Size = New System.Drawing.Size(218, 22) Me.mnuHelpMenus.Text = "Menus and Dialogs" ' 'MenusAndDialogsToolStripMenuItem ' Me.MenusAndDialogsToolStripMenuItem.Name = "MenusAndDialogsToolStripMenuItem" - Me.MenusAndDialogsToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.MenusAndDialogsToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.MenusAndDialogsToolStripMenuItem.Text = "Menus and Dialogs" ' 'ToolStripSeparator82 ' Me.ToolStripSeparator82.Name = "ToolStripSeparator82" - Me.ToolStripSeparator82.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator82.Size = New System.Drawing.Size(172, 6) ' 'FileToolStripMenuItem ' Me.FileToolStripMenuItem.Name = "FileToolStripMenuItem" - Me.FileToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.FileToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.FileToolStripMenuItem.Text = "File" ' 'EditToolStripMenuItem ' Me.EditToolStripMenuItem.Name = "EditToolStripMenuItem" - Me.EditToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.EditToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.EditToolStripMenuItem.Text = "Edit" ' 'PrepareToolStripMenuItem ' Me.PrepareToolStripMenuItem.Name = "PrepareToolStripMenuItem" - Me.PrepareToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.PrepareToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.PrepareToolStripMenuItem.Text = "Prepare" ' 'DescribeToolStripMenuItem ' Me.DescribeToolStripMenuItem.Name = "DescribeToolStripMenuItem" - Me.DescribeToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.DescribeToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.DescribeToolStripMenuItem.Text = "Describe" ' 'ModelToolStripMenuItem ' Me.ModelToolStripMenuItem.Name = "ModelToolStripMenuItem" - Me.ModelToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ModelToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.ModelToolStripMenuItem.Text = "Model" ' 'ToolStripSeparator83 ' Me.ToolStripSeparator83.Name = "ToolStripSeparator83" - Me.ToolStripSeparator83.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator83.Size = New System.Drawing.Size(172, 6) ' 'StructuredToolStripMenuItem ' Me.StructuredToolStripMenuItem.Name = "StructuredToolStripMenuItem" - Me.StructuredToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.StructuredToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.StructuredToolStripMenuItem.Text = "Structured" ' 'ClimaticToolStripMenuItem ' Me.ClimaticToolStripMenuItem.Name = "ClimaticToolStripMenuItem" - Me.ClimaticToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ClimaticToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.ClimaticToolStripMenuItem.Text = "Climatic" ' 'ProcurementToolStripMenuItem ' Me.ProcurementToolStripMenuItem.Name = "ProcurementToolStripMenuItem" - Me.ProcurementToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ProcurementToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.ProcurementToolStripMenuItem.Text = "Procurement" ' 'ExperimentsToolStripMenuItem ' Me.ExperimentsToolStripMenuItem.Name = "ExperimentsToolStripMenuItem" - Me.ExperimentsToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ExperimentsToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.ExperimentsToolStripMenuItem.Text = "Experiments" ' 'ToolsToolStripMenuItem ' Me.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem" - Me.ToolsToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ToolsToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.ToolsToolStripMenuItem.Text = "Tools" ' 'ViewToolStripMenuItem ' Me.ViewToolStripMenuItem.Name = "ViewToolStripMenuItem" - Me.ViewToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ViewToolStripMenuItem.Size = New System.Drawing.Size(175, 22) Me.ViewToolStripMenuItem.Text = "View" ' 'mnuHelpAboutR @@ -1717,7 +1720,7 @@ Partial Class frmMain 'ToolStripSeparator29 ' Me.ToolStripSeparator29.Name = "ToolStripSeparator29" - Me.ToolStripSeparator29.Size = New System.Drawing.Size(206, 6) + Me.ToolStripSeparator29.Size = New System.Drawing.Size(215, 6) ' 'mnuHelpPackagesDocumentation ' @@ -2311,7 +2314,6 @@ Partial Class frmMain ' 'mnuClimaticDescribeSeasonalGraph ' - Me.mnuClimaticDescribeSeasonalGraph.Enabled = False Me.mnuClimaticDescribeSeasonalGraph.Name = "mnuClimaticDescribeSeasonalGraph" Me.mnuClimaticDescribeSeasonalGraph.Size = New System.Drawing.Size(211, 22) Me.mnuClimaticDescribeSeasonalGraph.Text = "Seasonal Graph..." @@ -3254,7 +3256,7 @@ Partial Class frmMain ' Me.mnuTbLogScript.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnuTbLogScript.DropDownButtonWidth = 18 - Me.mnuTbLogScript.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuLogScript}) + Me.mnuTbLogScript.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuLogScript, Me.mnuSwapDataLogScript}) Me.mnuTbLogScript.Image = Global.instat.My.Resources.Resources.scriptwindow Me.mnuTbLogScript.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnuTbLogScript.Name = "mnuTbLogScript" @@ -3266,14 +3268,21 @@ Partial Class frmMain ' Me.mnuLogScript.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None Me.mnuLogScript.Name = "mnuLogScript" - Me.mnuLogScript.Size = New System.Drawing.Size(129, 22) + Me.mnuLogScript.Size = New System.Drawing.Size(210, 22) Me.mnuLogScript.Text = "Log/Script" ' + 'mnuSwapDataLogScript + ' + Me.mnuSwapDataLogScript.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuSwapDataLogScript.Name = "mnuSwapDataLogScript" + Me.mnuSwapDataLogScript.Size = New System.Drawing.Size(210, 22) + Me.mnuSwapDataLogScript.Text = "Swap Data and Log/Script" + ' 'mnuMetadata ' Me.mnuMetadata.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.mnuMetadata.DropDownButtonWidth = 18 - Me.mnuMetadata.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuColumnMetadat, Me.mnuDataFrameMetadat}) + Me.mnuMetadata.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuColumnMetadat, Me.mnuDataFrameMetadat, Me.mnuSwapDataMetadata}) Me.mnuMetadata.Image = CType(resources.GetObject("mnuMetadata.Image"), System.Drawing.Image) Me.mnuMetadata.ImageTransparentColor = System.Drawing.Color.Magenta Me.mnuMetadata.Name = "mnuMetadata" @@ -3285,16 +3294,23 @@ Partial Class frmMain ' Me.mnuColumnMetadat.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None Me.mnuColumnMetadat.Name = "mnuColumnMetadat" - Me.mnuColumnMetadat.Size = New System.Drawing.Size(202, 22) + Me.mnuColumnMetadat.Size = New System.Drawing.Size(214, 22) Me.mnuColumnMetadat.Text = " Column Metadata..." ' 'mnuDataFrameMetadat ' Me.mnuDataFrameMetadat.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None Me.mnuDataFrameMetadat.Name = "mnuDataFrameMetadat" - Me.mnuDataFrameMetadat.Size = New System.Drawing.Size(202, 22) + Me.mnuDataFrameMetadat.Size = New System.Drawing.Size(214, 22) Me.mnuDataFrameMetadat.Text = " Data Frame Metadata..." ' + 'mnuSwapDataMetadata + ' + Me.mnuSwapDataMetadata.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None + Me.mnuSwapDataMetadata.Name = "mnuSwapDataMetadata" + Me.mnuSwapDataMetadata.Size = New System.Drawing.Size(214, 22) + Me.mnuSwapDataMetadata.Text = "Swap Data and Metadata..." + ' 'ToolStripSeparator76 ' Me.ToolStripSeparator76.Name = "ToolStripSeparator76" @@ -5928,4 +5944,6 @@ Partial Class frmMain Friend WithEvents ExperimentsToolStripMenuItem As ToolStripMenuItem Friend WithEvents ToolsToolStripMenuItem As ToolStripMenuItem Friend WithEvents ViewToolStripMenuItem As ToolStripMenuItem + Friend WithEvents mnuSwapDataLogScript As ToolStripMenuItem + Friend WithEvents mnuSwapDataMetadata As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index f249dd309dc..c2351ac4d28 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -54,6 +54,8 @@ Public Class frmMain Public strAutoSaveLogFolderPath As String = Path.Combine(Path.GetTempPath, "R-Instat_log_auto_save") Public strAutoSaveInternalLogFolderPath As String = Path.Combine(Path.GetTempPath, "R-Instat_debug_log_auto_save") + Private strMarkerFilePath As String = Path.Combine(strAutoSaveLogFolderPath, "app_marker.log") + Public strCurrentAutoSaveDataFilePath As String = "" Private strLatestVersion As String = "" @@ -295,7 +297,8 @@ Public Class frmMain mnuViewSwapDataAndScript.Checked = False mnuColumnMetadat.Checked = False mnuDataFrameMetadat.Checked = False - + mnuSwapDataLogScript.Checked = False + mnuSwapDataMetadata.Checked = False mnuTbDataView.Checked = True mnuOutputWindow.Checked = True mnuLogScript.Checked = False @@ -456,32 +459,41 @@ Public Class frmMain '--------------------------------------- 'prompt user for recovery selection - If (strAutoSavedLogFilePaths.Length > 0 OrElse - strAutoSavedDataFilePaths.Length > 0) AndAlso - MsgBox("We have detected that R-Instat may have closed unexpectedly last time." & Environment.NewLine & - "Would you like to see auto recovery options?", - MessageBoxButtons.YesNo, "Auto Recovery") = MsgBoxResult.Yes Then - - dlgAutoSaveRecovery.strAutoSavedLogFilePaths = strAutoSavedLogFilePaths - dlgAutoSaveRecovery.strAutoSavedDataFilePaths = strAutoSavedDataFilePaths - dlgAutoSaveRecovery.strAutoSavedInternalLogFilePaths = strAutoSavedInternalLogFilePaths - dlgAutoSaveRecovery.ShowDialog() - - 'todo. the dialog design is meant to only return just one option; script, data file path or new session. - 'refactor the dialog to enforce the design - - 'get the R script from read file if selected by the user - strScript = dlgAutoSaveRecovery.GetScript() - 'get the data file path if selected by the user - strDataFilePath = dlgAutoSaveRecovery.GetDataFilePath() + 'Check if the marker file exists + If File.Exists(strMarkerFilePath) Then + Dim lastExitStatus As String = File.ReadAllText(strMarkerFilePath).Trim() + If lastExitStatus <> "CleanExit" AndAlso + MsgBox("We have detected that R-Instat may have closed unexpectedly last time." & Environment.NewLine & + "Would you like to see auto recovery options?", + MessageBoxButtons.YesNo, "Auto Recovery") = MsgBoxResult.Yes Then + + dlgAutoSaveRecovery.strAutoSavedLogFilePaths = strAutoSavedLogFilePaths + dlgAutoSaveRecovery.strAutoSavedDataFilePaths = strAutoSavedDataFilePaths + dlgAutoSaveRecovery.strAutoSavedInternalLogFilePaths = strAutoSavedInternalLogFilePaths + dlgAutoSaveRecovery.ShowDialog() + + 'todo. the dialog design is meant to only return just one option; script, data file path or new session. + 'refactor the dialog to enforce the design + + 'get the R script from read file if selected by the user + strScript = dlgAutoSaveRecovery.GetScript() + 'get the data file path if selected by the user + strDataFilePath = dlgAutoSaveRecovery.GetDataFilePath() + End If End If + + Using writer As StreamWriter = New StreamWriter(strMarkerFilePath, False) + writer.WriteLine("Running") + End Using + '--------------------------------------- + '--------------------------------------- 'delete the recovery files If strAutoSavedLogFilePaths.Length > 0 Then Try - File.Delete(strAutoSavedLogFilePaths(0)) + File.Delete(strAutoSavedLogFilePaths(1)) '1 to avoid deleting app_marker file Catch ex As Exception MsgBox("Could not delete backup log file" & Environment.NewLine, "Error deleting file") End Try @@ -578,11 +590,13 @@ Public Class frmMain splMetadata.Panel1.Controls.Add(ucrDataViewer) mnuViewColumnMetadata.Text = "Data View" mnuViewDataView.Text = "Column Metadata" + mnuSwapDataMetadata.Checked = True Else splDataOutput.Panel1.Controls.Add(ucrDataViewer) splMetadata.Panel1.Controls.Add(ucrColumnMeta) mnuViewColumnMetadata.Text = "Column Metadata" mnuViewDataView.Text = "Data View" + mnuSwapDataMetadata.Checked = False End If End Sub @@ -592,11 +606,13 @@ Public Class frmMain splExtraWindows.Panel2.Controls.Add(ucrDataViewer) mnuViewLogScript.Text = "Data View" mnuViewDataView.Text = "Log/Script" + mnuSwapDataLogScript.Checked = True Else splDataOutput.Panel1.Controls.Add(ucrDataViewer) splExtraWindows.Panel2.Controls.Add(ucrScriptWindow) mnuViewLogScript.Text = "Log/Script" mnuViewDataView.Text = "Data View" + mnuSwapDataLogScript.Checked = False End If End Sub @@ -1073,6 +1089,11 @@ Public Class frmMain If RuntimeInformation.IsOSPlatform(OSPlatform.Windows) Then CefRuntimeWrapper.ShutDownCef() End If + + Using writer As StreamWriter = New StreamWriter(strMarkerFilePath, False) + writer.WriteLine("CleanExit") + End Using + Catch ex As Exception MsgBox("Error attempting to save setting files to App Data folder." & Environment.NewLine & "System error message: " & ex.Message, MsgBoxStyle.Critical, "Error saving settings") End Try @@ -2808,4 +2829,18 @@ Public Class frmMain Private Sub MenusAndDialogsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MenusAndDialogsToolStripMenuItem.Click Help.ShowHelp(Me, strStaticPath & "\" & strHelpFilePath, HelpNavigator.TopicId, "12") End Sub + + Private Sub mnuSwapDataMetadata_Click(sender As Object, e As EventArgs) Handles mnuSwapDataMetadata.Click + mnuViewSwapDataAndScript.Enabled = mnuViewSwapDataAndMetadata.Checked + mnuViewSwapDataAndMetadata.Checked = Not mnuViewSwapDataAndMetadata.Checked + UpdateSwapDataAndMetadata() + UpdateLayout() + End Sub + + Private Sub mnuSwapDataLogScript_Click(sender As Object, e As EventArgs) Handles mnuSwapDataLogScript.Click + mnuViewSwapDataAndMetadata.Enabled = mnuViewSwapDataAndScript.Checked + mnuViewSwapDataAndScript.Checked = Not mnuViewSwapDataAndScript.Checked + UpdateSwapDataAndScript() + UpdateLayout() + End Sub End Class diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 741d4f7da58..7670f979bf2 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -313,6 +313,12 @@ + + sdgClimsoft.vb + + + Form + sdgDefineAnnualRainfall.vb @@ -3200,6 +3206,9 @@ dlgThreeVariablePivotTable.vb + + sdgClimsoft.vb + sdgDefineAnnualRainfall.vb diff --git a/instat/sdgClimsoft.Designer.vb b/instat/sdgClimsoft.Designer.vb new file mode 100644 index 00000000000..66902102eb5 --- /dev/null +++ b/instat/sdgClimsoft.Designer.vb @@ -0,0 +1,307 @@ + +Partial Class sdgClimsoft + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.tbpTitles = New System.Windows.Forms.TabPage() + Me.grpMetadataToImport = New System.Windows.Forms.GroupBox() + Me.ucrChkImportElementsMetadata = New instat.ucrCheck() + Me.ucrChkImportStationsMetadata = New instat.ucrCheck() + Me.tbColumns = New System.Windows.Forms.TabPage() + Me.grpColumnsToInclude = New System.Windows.Forms.GroupBox() + Me.ucrChkIncludeQCLog = New instat.ucrCheck() + Me.ucrChkIncludeCapturedBy = New instat.ucrCheck() + Me.ucrChkIncludeQCStatus = New instat.ucrCheck() + Me.ucrChkIncludeLevel = New instat.ucrCheck() + Me.ucrChkIncludeElementAbbrv = New instat.ucrCheck() + Me.ucrChkIncludeStationName = New instat.ucrCheck() + Me.ucrChkIncludeAquistion = New instat.ucrCheck() + Me.ucrChkIncludeEntryForm = New instat.ucrCheck() + Me.ucrChkIncludeFlag = New instat.ucrCheck() + Me.tbpMoreOptions = New System.Windows.Forms.TabControl() + Me.ucrBaseSubdialog = New instat.ucrButtonsSubdialogue() + Me.ucrChkIncludeElementId = New instat.ucrCheck() + Me.ucrChkIncludeStationId = New instat.ucrCheck() + Me.ucrChkIncludeDateTime = New instat.ucrCheck() + Me.ucrChkIncludeElementName = New instat.ucrCheck() + Me.tbpTitles.SuspendLayout() + Me.grpMetadataToImport.SuspendLayout() + Me.tbColumns.SuspendLayout() + Me.grpColumnsToInclude.SuspendLayout() + Me.tbpMoreOptions.SuspendLayout() + Me.SuspendLayout() + ' + 'tbpTitles + ' + Me.tbpTitles.Controls.Add(Me.grpMetadataToImport) + Me.tbpTitles.Location = New System.Drawing.Point(4, 22) + Me.tbpTitles.Name = "tbpTitles" + Me.tbpTitles.Padding = New System.Windows.Forms.Padding(3) + Me.tbpTitles.Size = New System.Drawing.Size(409, 303) + Me.tbpTitles.TabIndex = 2 + Me.tbpTitles.Tag = "" + Me.tbpTitles.Text = "Metadata" + Me.tbpTitles.UseVisualStyleBackColor = True + ' + 'grpMetadataToImport + ' + Me.grpMetadataToImport.Controls.Add(Me.ucrChkImportElementsMetadata) + Me.grpMetadataToImport.Controls.Add(Me.ucrChkImportStationsMetadata) + Me.grpMetadataToImport.Location = New System.Drawing.Point(6, 6) + Me.grpMetadataToImport.Name = "grpMetadataToImport" + Me.grpMetadataToImport.Size = New System.Drawing.Size(384, 243) + Me.grpMetadataToImport.TabIndex = 8 + Me.grpMetadataToImport.TabStop = False + Me.grpMetadataToImport.Text = "Metadata to Import" + ' + 'ucrChkImportElementsMetadata + ' + Me.ucrChkImportElementsMetadata.AutoSize = True + Me.ucrChkImportElementsMetadata.Checked = False + Me.ucrChkImportElementsMetadata.Location = New System.Drawing.Point(0, 46) + Me.ucrChkImportElementsMetadata.Name = "ucrChkImportElementsMetadata" + Me.ucrChkImportElementsMetadata.Size = New System.Drawing.Size(315, 23) + Me.ucrChkImportElementsMetadata.TabIndex = 20 + ' + 'ucrChkImportStationsMetadata + ' + Me.ucrChkImportStationsMetadata.AutoSize = True + Me.ucrChkImportStationsMetadata.Checked = False + Me.ucrChkImportStationsMetadata.Location = New System.Drawing.Point(0, 22) + Me.ucrChkImportStationsMetadata.Name = "ucrChkImportStationsMetadata" + Me.ucrChkImportStationsMetadata.Size = New System.Drawing.Size(315, 23) + Me.ucrChkImportStationsMetadata.TabIndex = 19 + ' + 'tbColumns + ' + Me.tbColumns.Controls.Add(Me.grpColumnsToInclude) + Me.tbColumns.Location = New System.Drawing.Point(4, 22) + Me.tbColumns.Name = "tbColumns" + Me.tbColumns.Padding = New System.Windows.Forms.Padding(3) + Me.tbColumns.Size = New System.Drawing.Size(409, 367) + Me.tbColumns.TabIndex = 3 + Me.tbColumns.Tag = "" + Me.tbColumns.Text = "Data" + Me.tbColumns.UseVisualStyleBackColor = True + ' + 'grpColumnsToInclude + ' + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeElementName) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeDateTime) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeElementId) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeStationId) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeQCLog) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeCapturedBy) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeQCStatus) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeLevel) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeElementAbbrv) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeStationName) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeAquistion) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeEntryForm) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeFlag) + Me.grpColumnsToInclude.Location = New System.Drawing.Point(8, 10) + Me.grpColumnsToInclude.Name = "grpColumnsToInclude" + Me.grpColumnsToInclude.Size = New System.Drawing.Size(394, 351) + Me.grpColumnsToInclude.TabIndex = 32 + Me.grpColumnsToInclude.TabStop = False + Me.grpColumnsToInclude.Text = "Columns to Include" + ' + 'ucrChkIncludeQCLog + ' + Me.ucrChkIncludeQCLog.AutoSize = True + Me.ucrChkIncludeQCLog.Checked = False + Me.ucrChkIncludeQCLog.Location = New System.Drawing.Point(6, 294) + Me.ucrChkIncludeQCLog.Name = "ucrChkIncludeQCLog" + Me.ucrChkIncludeQCLog.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeQCLog.TabIndex = 21 + ' + 'ucrChkIncludeCapturedBy + ' + Me.ucrChkIncludeCapturedBy.AutoSize = True + Me.ucrChkIncludeCapturedBy.Checked = False + Me.ucrChkIncludeCapturedBy.Location = New System.Drawing.Point(6, 243) + Me.ucrChkIncludeCapturedBy.Name = "ucrChkIncludeCapturedBy" + Me.ucrChkIncludeCapturedBy.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeCapturedBy.TabIndex = 20 + ' + 'ucrChkIncludeQCStatus + ' + Me.ucrChkIncludeQCStatus.AutoSize = True + Me.ucrChkIncludeQCStatus.Checked = False + Me.ucrChkIncludeQCStatus.Location = New System.Drawing.Point(6, 269) + Me.ucrChkIncludeQCStatus.Name = "ucrChkIncludeQCStatus" + Me.ucrChkIncludeQCStatus.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeQCStatus.TabIndex = 0 + ' + 'ucrChkIncludeLevel + ' + Me.ucrChkIncludeLevel.AutoSize = True + Me.ucrChkIncludeLevel.Checked = False + Me.ucrChkIncludeLevel.Location = New System.Drawing.Point(6, 196) + Me.ucrChkIncludeLevel.Name = "ucrChkIncludeLevel" + Me.ucrChkIncludeLevel.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeLevel.TabIndex = 19 + ' + 'ucrChkIncludeElementAbbrv + ' + Me.ucrChkIncludeElementAbbrv.AutoSize = True + Me.ucrChkIncludeElementAbbrv.Checked = True + Me.ucrChkIncludeElementAbbrv.Location = New System.Drawing.Point(6, 42) + Me.ucrChkIncludeElementAbbrv.Name = "ucrChkIncludeElementAbbrv" + Me.ucrChkIncludeElementAbbrv.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeElementAbbrv.TabIndex = 18 + ' + 'ucrChkIncludeStationName + ' + Me.ucrChkIncludeStationName.AutoSize = True + Me.ucrChkIncludeStationName.Checked = True + Me.ucrChkIncludeStationName.Location = New System.Drawing.Point(6, 20) + Me.ucrChkIncludeStationName.Name = "ucrChkIncludeStationName" + Me.ucrChkIncludeStationName.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeStationName.TabIndex = 17 + ' + 'ucrChkIncludeAquistion + ' + Me.ucrChkIncludeAquistion.AutoSize = True + Me.ucrChkIncludeAquistion.Checked = False + Me.ucrChkIncludeAquistion.Location = New System.Drawing.Point(6, 168) + Me.ucrChkIncludeAquistion.Name = "ucrChkIncludeAquistion" + Me.ucrChkIncludeAquistion.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeAquistion.TabIndex = 16 + ' + 'ucrChkIncludeEntryForm + ' + Me.ucrChkIncludeEntryForm.AutoSize = True + Me.ucrChkIncludeEntryForm.Checked = False + Me.ucrChkIncludeEntryForm.Location = New System.Drawing.Point(6, 220) + Me.ucrChkIncludeEntryForm.Name = "ucrChkIncludeEntryForm" + Me.ucrChkIncludeEntryForm.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeEntryForm.TabIndex = 15 + ' + 'ucrChkIncludeFlag + ' + Me.ucrChkIncludeFlag.AutoSize = True + Me.ucrChkIncludeFlag.Checked = False + Me.ucrChkIncludeFlag.Location = New System.Drawing.Point(7, 321) + Me.ucrChkIncludeFlag.Name = "ucrChkIncludeFlag" + Me.ucrChkIncludeFlag.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeFlag.TabIndex = 14 + ' + 'tbpMoreOptions + ' + Me.tbpMoreOptions.Controls.Add(Me.tbColumns) + Me.tbpMoreOptions.Controls.Add(Me.tbpTitles) + Me.tbpMoreOptions.Location = New System.Drawing.Point(-1, 4) + Me.tbpMoreOptions.Name = "tbpMoreOptions" + Me.tbpMoreOptions.SelectedIndex = 0 + Me.tbpMoreOptions.Size = New System.Drawing.Size(417, 393) + Me.tbpMoreOptions.TabIndex = 2 + ' + 'ucrBaseSubdialog + ' + Me.ucrBaseSubdialog.AutoSize = True + Me.ucrBaseSubdialog.Location = New System.Drawing.Point(88, 397) + Me.ucrBaseSubdialog.Name = "ucrBaseSubdialog" + Me.ucrBaseSubdialog.Size = New System.Drawing.Size(224, 29) + Me.ucrBaseSubdialog.TabIndex = 3 + ' + 'ucrChkIncludeElementId + ' + Me.ucrChkIncludeElementId.AutoSize = True + Me.ucrChkIncludeElementId.Checked = False + Me.ucrChkIncludeElementId.Location = New System.Drawing.Point(7, 116) + Me.ucrChkIncludeElementId.Name = "ucrChkIncludeElementId" + Me.ucrChkIncludeElementId.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeElementId.TabIndex = 23 + ' + 'ucrChkIncludeStationId + ' + Me.ucrChkIncludeStationId.AutoSize = True + Me.ucrChkIncludeStationId.Checked = False + Me.ucrChkIncludeStationId.Location = New System.Drawing.Point(7, 92) + Me.ucrChkIncludeStationId.Name = "ucrChkIncludeStationId" + Me.ucrChkIncludeStationId.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeStationId.TabIndex = 22 + ' + 'ucrChkIncludeDateTime + ' + Me.ucrChkIncludeDateTime.AutoSize = True + Me.ucrChkIncludeDateTime.Checked = True + Me.ucrChkIncludeDateTime.Location = New System.Drawing.Point(7, 66) + Me.ucrChkIncludeDateTime.Name = "ucrChkIncludeDateTime" + Me.ucrChkIncludeDateTime.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeDateTime.TabIndex = 24 + ' + 'ucrChkIncludeElementName + ' + Me.ucrChkIncludeElementName.AutoSize = True + Me.ucrChkIncludeElementName.Checked = False + Me.ucrChkIncludeElementName.Location = New System.Drawing.Point(7, 141) + Me.ucrChkIncludeElementName.Name = "ucrChkIncludeElementName" + Me.ucrChkIncludeElementName.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeElementName.TabIndex = 25 + ' + 'sdgClimsoft + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(417, 434) + Me.Controls.Add(Me.ucrBaseSubdialog) + Me.Controls.Add(Me.tbpMoreOptions) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "sdgClimsoft" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent + Me.Text = "More Climsoft Options" + Me.tbpTitles.ResumeLayout(False) + Me.grpMetadataToImport.ResumeLayout(False) + Me.grpMetadataToImport.PerformLayout() + Me.tbColumns.ResumeLayout(False) + Me.grpColumnsToInclude.ResumeLayout(False) + Me.grpColumnsToInclude.PerformLayout() + Me.tbpMoreOptions.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ucrBaseSubdialog As ucrButtonsSubdialogue + Friend WithEvents tbpTitles As TabPage + Friend WithEvents grpMetadataToImport As GroupBox + Friend WithEvents tbColumns As TabPage + Friend WithEvents ucrChkIncludeQCStatus As ucrCheck + Friend WithEvents tbpMoreOptions As TabControl + Friend WithEvents grpColumnsToInclude As GroupBox + Friend WithEvents ucrChkIncludeFlag As ucrCheck + Friend WithEvents ucrChkIncludeAquistion As ucrCheck + Friend WithEvents ucrChkIncludeEntryForm As ucrCheck + Friend WithEvents ucrChkIncludeElementAbbrv As ucrCheck + Friend WithEvents ucrChkIncludeStationName As ucrCheck + Friend WithEvents ucrChkImportElementsMetadata As ucrCheck + Friend WithEvents ucrChkImportStationsMetadata As ucrCheck + Friend WithEvents ucrChkIncludeCapturedBy As ucrCheck + Friend WithEvents ucrChkIncludeLevel As ucrCheck + Friend WithEvents ucrChkIncludeQCLog As ucrCheck + Friend WithEvents ucrChkIncludeElementId As ucrCheck + Friend WithEvents ucrChkIncludeStationId As ucrCheck + Friend WithEvents ucrChkIncludeDateTime As ucrCheck + Friend WithEvents ucrChkIncludeElementName As ucrCheck +End Class \ No newline at end of file diff --git a/instat/sdgClimsoft.resx b/instat/sdgClimsoft.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgClimsoft.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/sdgClimsoft.vb b/instat/sdgClimsoft.vb new file mode 100644 index 00000000000..c1a48427aa3 --- /dev/null +++ b/instat/sdgClimsoft.vb @@ -0,0 +1,126 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . +Imports instat.Translations + +Public Class sdgClimsoft + + Private bControlsInitialised As Boolean = False + Private Sub sdgClimsoft_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + End Sub + + Private Sub InitialiseControls() + + If bControlsInitialised Then + Exit Sub + End If + + 'Columns to include + '--------------------------------------- + ucrChkIncludeStationName.SetText("Station Name") + ucrChkIncludeStationName.Enabled = False + + ucrChkIncludeElementAbbrv.SetText("Element Abbreviation") + ucrChkIncludeElementAbbrv.Enabled = False + + ucrChkIncludeDateTime.SetText("Date Time") + ucrChkIncludeDateTime.Enabled = False + + ucrChkIncludeStationId.SetText("Station Id") + ucrChkIncludeStationId.SetParameter(New RParameter("include_station_id", 13)) + ucrChkIncludeStationId.SetRDefault("FALSE") + + ucrChkIncludeElementId.SetText("Element Id") + ucrChkIncludeElementId.SetParameter(New RParameter("include_element_id", 14)) + ucrChkIncludeElementId.SetRDefault("FALSE") + + ucrChkIncludeElementName.SetText("Element Name") + ucrChkIncludeElementName.SetParameter(New RParameter("include_element_name", 15)) + ucrChkIncludeElementName.SetRDefault("FALSE") + + ucrChkIncludeAquistion.SetText("Acquisition Type") + ucrChkIncludeAquistion.SetParameter(New RParameter("include_acquisition_type", 16)) + ucrChkIncludeAquistion.SetRDefault("FALSE") + + ucrChkIncludeLevel.SetText("Level") + ucrChkIncludeLevel.SetParameter(New RParameter("include_level", 17)) + ucrChkIncludeLevel.SetRDefault("FALSE") + + ucrChkIncludeEntryForm.SetText("Entry Form") + ucrChkIncludeEntryForm.SetParameter(New RParameter("include_entry_form", 18)) + ucrChkIncludeEntryForm.SetRDefault("FALSE") + + ucrChkIncludeCapturedBy.SetText("Captured By (user)") + ucrChkIncludeCapturedBy.SetParameter(New RParameter("include_captured_by", 19)) + ucrChkIncludeCapturedBy.SetRDefault("FALSE") + + ucrChkIncludeQCStatus.SetText("QC Status") + ucrChkIncludeQCStatus.SetParameter(New RParameter("include_qc_status", 20)) + ucrChkIncludeQCStatus.SetRDefault("FALSE") + + ucrChkIncludeQCLog.SetText("QC Log") + ucrChkIncludeQCLog.SetParameter(New RParameter("include_qc_log", 21)) + ucrChkIncludeQCLog.SetRDefault("FALSE") + + ucrChkIncludeFlag.SetText("Flag") + ucrChkIncludeFlag.SetParameter(New RParameter("include_flag", 22)) + ucrChkIncludeFlag.SetRDefault("FALSE") + + '--------------------------------------- + + 'Metadata + '--------------------------------------- + ucrChkImportStationsMetadata.SetText("Selected Stations") + ucrChkImportStationsMetadata.SetParameter(New RParameter("import_selected_stations_metadata", 23)) + ucrChkImportStationsMetadata.SetRDefault("FALSE") + + ucrChkImportElementsMetadata.SetText("Selected Elements") + ucrChkImportElementsMetadata.SetParameter(New RParameter("import_selected_elements_metadata", 24)) + ucrChkImportElementsMetadata.SetRDefault("FALSE") + '--------------------------------------- + + bControlsInitialised = True + + End Sub + + Public Sub SetRCode(clsRFunction As RFunction, Optional bReset As Boolean = True) + 'initialise controls if not initialised + InitialiseControls() + + 'Columns + '--------------------------------------- + ucrChkIncludeStationId.SetRCode(clsRFunction, bReset) + ucrChkIncludeElementId.SetRCode(clsRFunction, bReset) + ucrChkIncludeElementName.SetRCode(clsRFunction, bReset) + ucrChkIncludeAquistion.SetRCode(clsRFunction, bReset) + ucrChkIncludeLevel.SetRCode(clsRFunction, bReset) + ucrChkIncludeEntryForm.SetRCode(clsRFunction, bReset) + ucrChkIncludeCapturedBy.SetRCode(clsRFunction, bReset) + ucrChkIncludeQCStatus.SetRCode(clsRFunction, bReset) + ucrChkIncludeQCLog.SetRCode(clsRFunction, bReset) + ucrChkIncludeFlag.SetRCode(clsRFunction, bReset) + '--------------------------------------- + + 'Metadata + '--------------------------------------- + ucrChkImportStationsMetadata.SetRCode(clsRFunction, bReset) + ucrChkImportElementsMetadata.SetRCode(clsRFunction, bReset) + '--------------------------------------- + + End Sub + + +End Class \ No newline at end of file diff --git a/instat/sdgCorrPlot.vb b/instat/sdgCorrPlot.vb index 1faf8f6ff24..c3007a715b4 100644 --- a/instat/sdgCorrPlot.vb +++ b/instat/sdgCorrPlot.vb @@ -62,7 +62,7 @@ Public Class sdgCorrPlot ucrSaveGraph.SetPrefix("cor_graph") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(dlgCorrelation.ucrSelectorCorrelation.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/sdgOneVarFitModDisplay.vb b/instat/sdgOneVarFitModDisplay.vb index a8f0c0ee9a6..9f88a303e55 100644 --- a/instat/sdgOneVarFitModDisplay.vb +++ b/instat/sdgOneVarFitModDisplay.vb @@ -61,14 +61,14 @@ Public Class sdgOneVarFitModDisplay ucrSavePlots.SetPrefix("plot") ucrSavePlots.SetSaveTypeAsGraph() ucrSavePlots.SetDataFrameSelector(dlgOneVarFitModel.ucrSelectorOneVarFitMod.ucrAvailableDataFrames) - ucrSavePlots.SetCheckBoxText("Save Graph") + ucrSavePlots.SetCheckBoxText("Store Graph") ucrSavePlots.SetIsComboBox() ucrSavePlots.SetAssignToIfUncheckedValue("last_graph") ucrSaveLikelihood.SetPrefix("likelihood") ucrSaveLikelihood.SetSaveTypeAsGraph() ucrSaveLikelihood.SetDataFrameSelector(dlgOneVarFitModel.ucrSelectorOneVarFitMod.ucrAvailableDataFrames) - ucrSaveLikelihood.SetCheckBoxText("Save Graph") + ucrSaveLikelihood.SetCheckBoxText("Store Graph") ucrSaveLikelihood.SetIsComboBox() ucrSaveLikelihood.SetAssignToIfUncheckedValue("last_likelihood") InitialiseTabs() diff --git a/instat/sdgPrincipalComponentAnalysis.vb b/instat/sdgPrincipalComponentAnalysis.vb index b69bc650010..29e0ba24da7 100644 --- a/instat/sdgPrincipalComponentAnalysis.vb +++ b/instat/sdgPrincipalComponentAnalysis.vb @@ -123,7 +123,7 @@ Public Class sdgPrincipalComponentAnalysis ucrSaveGraph.SetPrefix("pca_graph") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(dlgPrincipalComponentAnalysis.ucrSelectorPCA.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetCheckBoxText("Store Graph") ucrSaveGraph.SetIsComboBox() ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 5de19edc94f..8ab9363348a 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -4517,3 +4517,23 @@ DataSheet$set("public", "has_labels", function(col_names) { return(!is.null(attr(col_names, "labels"))) } ) + +DataSheet$set("public", "anova_tables2", function(x_col_names, y_col_name, signif.stars = FALSE, sign_level = FALSE, means = FALSE) { + + if(missing(x_col_names) || missing(y_col_name)) stop("Both x_col_names and y_col_names are required") + if(sign_level || signif.stars) message("This is no longer descriptive") + if(sign_level) end_col = 5 else end_col = 4 + + if (length(x_col_names) == 1) { + formula_str <- paste0( as.name(y_col_name), "~ ", as.name(x_col_names)) + } else if (length(x_col_names) > 1) { + formula_str <- paste0(as.name(y_col_name), "~ ", as.name(paste(x_col_names, collapse = " + "))) + } + + return_item <- NULL + mod <- lm(formula = as.formula(formula_str), data = self$get_data_frame()) + return_item[[paste0("ANOVA table: ", formula_str, sep = "")]] <- anova(mod)[1:end_col] + if(means) return_item[[paste0("Means table of ", y_col_name)]] <- model.tables(aov(mod), type = "means") + return(return_item) +} +) \ No newline at end of file diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 29363b88365..78fe1743d8b 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1848,6 +1848,264 @@ DataBook$set("public", "database_disconnect", function() { } ) +#Gets the row count of the table. +DataBook$set("public", "get_db_table_row_count", function(tableName, query_condition = NULL) { + con <- self$get_database_connection() + if(is.null(con)){ + stop("No database connection") + } + + if(is.null(query_condition)){ + query_condition <- "" + } + + out <- DBI::dbGetQuery(con, paste0("SELECT COUNT(*) as result FROM ",tableName," ", query_condition, ";" )) + return(out$result) + +}) + +#Imports Climsoft metadata. +DataBook$set("public", "import_climsoft_metadata", function(import_stations = FALSE, import_elements = FALSE, import_flags = FALSE) { + + if(!import_stations && !import_elements){ + stop("No metadata selected for import") + } + + con <- self$get_database_connection() + if(is.null(con)){ + stop("No database connection") + } + + #imports metadata + #-------------------------------- + data_list <- list() + + if(import_stations){ + stations_metadata_name <- next_default_item("stations_metadata", self$get_data_names(), include_index = FALSE) + #todo.(22/03/2023) 2 fields have been intentionally left out because they are yet to be released to Climsoft users. Namely; wsi and gtsWSI + #include them once the new Climsoft release has been supplied to users + data_list[[stations_metadata_name]] <- DBI::dbGetQuery(con, "SELECT stationId AS station_id, stationName AS station_name, wmoid, icaoid, latitude, longitude, elevation, qualifier, geoLocationMethod AS geo_location_method, geoLocationAccuracy AS geo_location_accuracy, openingDatetime AS opening_date_time, closingDatetime AS closing_date_time, authority, adminRegion AS admin_region, drainageBasin AS drainage_basin, wacaSelection AS waca_selection, cptSelection AS cpt_selection, stationOperational AS station_Operational, country AS country FROM station;") + } + + if(import_elements){ + elements_metadata_name <- next_default_item("elements_metadata", self$get_data_names(), include_index = FALSE) + data_list[[elements_metadata_name]] <- DBI::dbGetQuery(con, "SELECT elementId AS element_id, elementName AS element_name, abbreviation, description, elementtype AS element_type, upperLimit AS upper_limit , lowerLimit AS lower_limit, units FROM obselement;") + } + + if(import_flags){ + flags_metadata_name <- next_default_item("flags_metadata", self$get_data_names(), include_index = FALSE) + data_list[[flags_metadata_name]] <- DBI::dbGetQuery(con, "SELECT characterSymbol AS flag_name, description FROM flags;") + + } + + self$import_data(data_tables = data_list) + #-------------------------------- + + #transform imported metadata + #-------------------------------- + if(import_stations){ + self$convert_column_to_type(data_name = stations_metadata_name, col_names = c("station_id","station_name","qualifier","authority","admin_region","drainage_basin","station_Operational","country"), to_type = "factor") + } + + if(import_elements){ + self$convert_column_to_type(data_name = elements_metadata_name, col_names = c("element_id","element_name","abbreviation","element_type"), to_type = "factor") + } + + if(import_flags){ + self$convert_column_to_type(data_name = flags_metadata_name, col_names = c("flag_name"), to_type = "factor") + } + #-------------------------------- + +}) + +#imports data from Climsoft observation tables; initial or final. +#imports selected stations and elements metadata +DataBook$set("public", "import_climsoft_data", function(tableName, + station_filter_column, stations = c(), + element_filter_column, elements = c(), + qc_status = -1, start_date = NULL, end_date = NULL, unstack_data = FALSE, + include_station_id = FALSE, include_element_id = FALSE, include_element_name = FALSE, + include_acquisition_type = FALSE, include_level = FALSE, include_entry_form = FALSE, include_captured_by = FALSE, + include_qc_status = FALSE, include_qc_log = FALSE, include_flag = FALSE, + import_selected_stations_metadata = FALSE, import_selected_elements_metadata = FALSE) { + #connection and parameter checks + #-------------------------------- + con <- self$get_database_connection() + if(is.null(con)){ + stop("No database connection") + } + + if(missing(tableName) || missing(station_filter_column) || missing(element_filter_column) || length(stations) == 0 || length(elements) == 0){ + stop("Missing parameters. tableName, station_filter_column, element_filter_column, stations and elements must be supplied") + } + + if (!is.null(start_date) && !lubridate::is.Date(start_date) ) { + stop("start_date must be of type Date.") + } + + if (!is.null(end_date) && !lubridate::is.Date(end_date) ) { + stop("start_date must be of type Date.") + } + #-------------------------------- + + #selects + #-------------------------------- + + sql_select<- "" + + if(include_station_id){ + sql_select <- paste0(tableName,".recordedFrom AS station_id") + sql_select <-paste0(sql_select,", station.stationName AS station_name") + }else{ + sql_select <-"station.stationName AS station_name" + } + + if(include_element_id){ + sql_select <-paste0(sql_select, ", ", tableName,".describedBy AS element_id") + } + + sql_select <-paste0(sql_select,", obselement.abbreviation AS element_abbrv") + + if(include_element_name){ + sql_select <-paste0(sql_select,", obselement.elementName AS element_name") + } + + if(include_acquisition_type){ + sql_select <-paste0(sql_select,", ", tableName,".acquisitionType"," AS acquisition_type") + } + + if(include_level){ + sql_select <-paste0(sql_select,", ", tableName,".obsLevel"," AS level") + } + + if(include_entry_form){ + sql_select <-paste0(sql_select,", ", tableName,".dataForm"," AS entry_form") + } + + if(include_captured_by){ + sql_select <-paste0(sql_select,", ", tableName,".capturedBy"," AS captured_by") + } + + if(include_qc_status){ + sql_select <-paste0(sql_select,", ", tableName,".qcStatus"," AS qc_status") + } + + sql_select <-paste0(sql_select,", ", tableName,".obsDatetime AS date_time") + + if(include_qc_log){ + sql_select <-paste0(sql_select,", ", tableName,".qcTypeLog"," AS qc_log") + } + + if(include_flag){ + sql_select <-paste0(sql_select,", ", tableName,".flag"," AS flag") + } + + sql_select <-paste0(sql_select,", ", tableName,".obsValue AS value") + + sql_select<- paste0("SELECT ", sql_select, " FROM ", tableName, + " INNER JOIN station ON ", tableName, ".recordedFrom = station.stationId", + " INNER JOIN obselement ON ",tableName,".describedBy = obselement.elementId") + #-------------------------------- + + #filters + #-------------------------------- + sql_stations_filter <- paste0(" station.", station_filter_column, " IN ", paste0("(", paste0("'", stations, "'", collapse = ", "), ")")) + sql_elements_filter <- paste0(" obselement.", element_filter_column, " IN ", paste0("(", paste0("'", elements, "'", collapse = ", "), ")")) + + sql_filter <- sql_stations_filter + sql_filter <- paste0(sql_filter," AND ",sql_elements_filter) + + if(qc_status>-1){ + sql_filter <- paste0(sql_filter," AND qcStatus = ", qc_status) + } + + if (!is.null(start_date)) { + sql_filter = paste0(sql_filter," AND obsDatetime >= ", sQuote(format(start_date, format = "%Y-%m-%d"))) + } + + if (!is.null(end_date)) { + sql_filter <- paste0(sql_filter," AND obsDatetime <=", sQuote(format(end_date, format = "%Y-%m-%d"))) + } + + sql_filter<- paste0(" WHERE ",sql_filter) + #-------------------------------- + + #order by + #-------------------------------- + sql_order_by <- paste0(" ORDER BY ",tableName,".recordedFrom, ",tableName, ".describedBy, ",tableName, ".obsDatetime",";") + #-------------------------------- + + #import data + #-------------------------------- + data_list <- list() + + if(import_selected_stations_metadata){ + stations_metadata_name <- next_default_item("stations_metadata", self$get_data_names(), include_index = FALSE) + data_list[[stations_metadata_name]] <- DBI::dbGetQuery(con, paste0("SELECT * FROM station WHERE", sql_stations_filter)) + } + + if(import_selected_elements_metadata){ + elements_metadata_name <- next_default_item("elements_metadata", self$get_data_names(), include_index = FALSE) + data_list[[elements_metadata_name]] <- DBI::dbGetQuery(con, paste0("SELECT * FROM obselement WHERE", sql_elements_filter)) + } + + observations_data_name <- next_default_item("observations_data", self$get_data_names(), include_index = FALSE) + data_list[[observations_data_name]] <- DBI::dbGetQuery(con,paste0(sql_select, sql_filter, sql_order_by)) + + if(unstack_data){ + observations_unstacked_data_name <- next_default_item("observations_unstacked_data", self$get_data_names(), include_index = FALSE) + data_list[[observations_unstacked_data_name]] <- reshape2::dcast(data = data_list[[observations_data_name]], formula = station_name + date_time ~ element_abbrv, value.var = "value") + } + + + self$import_data(data_tables = data_list) + #-------------------------------- + + #transform imported data + #-------------------------------- + self$convert_column_to_type(data_name = observations_data_name, col_names = c("station_name","element_abbrv"), to_type = "factor") + + if(include_station_id){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "station_id", to_type = "factor") + } + + if(include_element_id){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "element_id", to_type = "factor") + } + + if(include_element_name){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "element_name", to_type = "factor") + } + + if(include_qc_status){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "qc_status", to_type = "factor") + } + + if(include_acquisition_type){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "acquisition_type", to_type = "factor") + } + + if(include_level){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "level", to_type = "factor") + } + + if(include_flag){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "flag", to_type = "factor") + } + + if(include_entry_form){ + self$convert_column_to_type(data_name = observations_data_name, col_names = "entry_form", to_type = "factor") + } + + #todo. should this be done at this point?? Keeping in mind that we may have hourly data + #create a plain date column from the observation data datetime column values + #obsdate <- self$get_columns_from_data(data_name = observations_data_name, col_names = "date_time", use_current_filter = FALSE) + #self$add_columns_to_data(data_name = observations_data_name, col_name = "date", col_data = as.Date(x = obsdate), before = FALSE, adjacent_column = "date_time") + #-------------------------------- + +}) + +#TODO. Deprecated. Delete this after after deleting the import from Climsoft wizard dialog DataBook$set("public", "import_from_climsoft", function(stationfiltercolumn = "stationId", stations = c(), elementfiltercolumn = "elementId", elements = c(), include_observation_data = FALSE, include_observation_flags = FALSE, unstack_data = FALSE, include_elements_info = FALSE, start_date = NULL, end_date = NULL) { #need to perform checks here con <- self$get_database_connection() @@ -2818,4 +3076,9 @@ DataBook$set("public","wrap_or_unwrap_data", function(data_name, col_name, colum self$add_columns_to_data(data_name=data_name, col_name=col_name, col_data=column_data, before=FALSE) } } -) \ No newline at end of file +) + +DataBook$set("public", "anova_tables2", function(data_name, x_col_names, y_col_name, signif.stars = FALSE, sign_level = FALSE, means = FALSE) { + self$get_data_objects(data_name)$anova_tables2(x_col_names = x_col_names, y_col_name = y_col_name, signif.stars = signif.stars, sign_level = sign_level, means = means) +} +) diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 47b59844abf..2425ae6c2ac 100644 Binary files a/instat/translations/rInstatTranslations.db and b/instat/translations/rInstatTranslations.db differ diff --git a/instat/ucrDataView.Designer.vb b/instat/ucrDataView.Designer.vb index d1250cdae1f..312d7b4de5d 100644 --- a/instat/ucrDataView.Designer.vb +++ b/instat/ucrDataView.Designer.vb @@ -120,26 +120,21 @@ Partial Class ucrDataView Me.lblHeaderDataView = New System.Windows.Forms.Label() Me.tlpTableContainer = New System.Windows.Forms.TableLayoutPanel() Me.panelSectionsAll = New System.Windows.Forms.Panel() - Me.panelSectionIfYouMust = New System.Windows.Forms.Panel() + Me.panelSectionAdvanced = New System.Windows.Forms.Panel() Me.linkStartAddRPackage = New System.Windows.Forms.LinkLabel() - Me.lblIFYouMust = New System.Windows.Forms.Label() - Me.linkStartPasteData = New System.Windows.Forms.LinkLabel() + Me.lblAdvanced = New System.Windows.Forms.Label() Me.linkStartRestoreBackup = New System.Windows.Forms.LinkLabel() - Me.linkStartSwapDataScriptWindow = New System.Windows.Forms.LinkLabel() + Me.linkStartPasteScriptfromClipboard = New System.Windows.Forms.LinkLabel() Me.panelSectionRecent = New System.Windows.Forms.Panel() Me.lblRecent = New System.Windows.Forms.Label() Me.panelRecentMenuItems = New System.Windows.Forms.Panel() Me.panelSectionHelp = New System.Windows.Forms.Panel() - Me.linkHelpClimaticMenu = New System.Windows.Forms.LinkLabel() - Me.linkHelpPrepareMenu = New System.Windows.Forms.LinkLabel() Me.linkHelpData = New System.Windows.Forms.LinkLabel() Me.linkHelpGettingStarted = New System.Windows.Forms.LinkLabel() Me.lblHelp = New System.Windows.Forms.Label() - Me.linkHelpIntroduction = New System.Windows.Forms.LinkLabel() - Me.linkHelpInstructionVideos = New System.Windows.Forms.LinkLabel() - Me.linkHelpRpackages = New System.Windows.Forms.LinkLabel() - Me.linkHelpRInstatWebsite = New System.Windows.Forms.LinkLabel() + Me.linkHelpRInstatResourcesSite = New System.Windows.Forms.LinkLabel() Me.panelSectionStart = New System.Windows.Forms.Panel() + Me.linkStartPasteData = New System.Windows.Forms.LinkLabel() Me.lblStart = New System.Windows.Forms.Label() Me.linkStartNewDataFrame = New System.Windows.Forms.LinkLabel() Me.linkStartOpenFile = New System.Windows.Forms.LinkLabel() @@ -164,7 +159,7 @@ Partial Class ucrDataView Me.statusColumnMenu.SuspendLayout() Me.tlpTableContainer.SuspendLayout() Me.panelSectionsAll.SuspendLayout() - Me.panelSectionIfYouMust.SuspendLayout() + Me.panelSectionAdvanced.SuspendLayout() Me.panelSectionRecent.SuspendLayout() Me.panelSectionHelp.SuspendLayout() Me.panelSectionStart.SuspendLayout() @@ -672,7 +667,7 @@ Partial Class ucrDataView ' 'panelSectionsAll ' - Me.panelSectionsAll.Controls.Add(Me.panelSectionIfYouMust) + Me.panelSectionsAll.Controls.Add(Me.panelSectionAdvanced) Me.panelSectionsAll.Controls.Add(Me.panelSectionRecent) Me.panelSectionsAll.Controls.Add(Me.panelSectionHelp) Me.panelSectionsAll.Controls.Add(Me.panelSectionStart) @@ -683,17 +678,16 @@ Partial Class ucrDataView Me.panelSectionsAll.Size = New System.Drawing.Size(243, 455) Me.panelSectionsAll.TabIndex = 9 ' - 'panelSectionIfYouMust + 'panelSectionAdvanced ' - Me.panelSectionIfYouMust.Controls.Add(Me.linkStartAddRPackage) - Me.panelSectionIfYouMust.Controls.Add(Me.lblIFYouMust) - Me.panelSectionIfYouMust.Controls.Add(Me.linkStartPasteData) - Me.panelSectionIfYouMust.Controls.Add(Me.linkStartRestoreBackup) - Me.panelSectionIfYouMust.Controls.Add(Me.linkStartSwapDataScriptWindow) - Me.panelSectionIfYouMust.Location = New System.Drawing.Point(28, 446) - Me.panelSectionIfYouMust.Name = "panelSectionIfYouMust" - Me.panelSectionIfYouMust.Size = New System.Drawing.Size(374, 105) - Me.panelSectionIfYouMust.TabIndex = 12 + Me.panelSectionAdvanced.Controls.Add(Me.linkStartAddRPackage) + Me.panelSectionAdvanced.Controls.Add(Me.lblAdvanced) + Me.panelSectionAdvanced.Controls.Add(Me.linkStartRestoreBackup) + Me.panelSectionAdvanced.Controls.Add(Me.linkStartPasteScriptfromClipboard) + Me.panelSectionAdvanced.Location = New System.Drawing.Point(28, 431) + Me.panelSectionAdvanced.Name = "panelSectionAdvanced" + Me.panelSectionAdvanced.Size = New System.Drawing.Size(374, 105) + Me.panelSectionAdvanced.TabIndex = 12 ' 'linkStartAddRPackage ' @@ -701,36 +695,23 @@ Partial Class ucrDataView Me.linkStartAddRPackage.AutoSize = True Me.linkStartAddRPackage.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.linkStartAddRPackage.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkStartAddRPackage.Location = New System.Drawing.Point(7, 86) + Me.linkStartAddRPackage.Location = New System.Drawing.Point(7, 65) Me.linkStartAddRPackage.Name = "linkStartAddRPackage" Me.linkStartAddRPackage.Size = New System.Drawing.Size(143, 13) Me.linkStartAddRPackage.TabIndex = 6 Me.linkStartAddRPackage.TabStop = True Me.linkStartAddRPackage.Text = "Add R package to R-Instat..." ' - 'lblIFYouMust + 'lblAdvanced ' - Me.lblIFYouMust.AutoSize = True - Me.lblIFYouMust.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblIFYouMust.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblIFYouMust.Location = New System.Drawing.Point(5, 4) - Me.lblIFYouMust.Name = "lblIFYouMust" - Me.lblIFYouMust.Size = New System.Drawing.Size(122, 25) - Me.lblIFYouMust.TabIndex = 0 - Me.lblIFYouMust.Text = "If you must:" - ' - 'linkStartPasteData - ' - Me.linkStartPasteData.ActiveLinkColor = System.Drawing.Color.Red - Me.linkStartPasteData.AutoSize = True - Me.linkStartPasteData.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkStartPasteData.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkStartPasteData.Location = New System.Drawing.Point(7, 31) - Me.linkStartPasteData.Name = "linkStartPasteData" - Me.linkStartPasteData.Size = New System.Drawing.Size(136, 13) - Me.linkStartPasteData.TabIndex = 3 - Me.linkStartPasteData.TabStop = True - Me.linkStartPasteData.Text = "Paste data from clipboard..." + Me.lblAdvanced.AutoSize = True + Me.lblAdvanced.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblAdvanced.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblAdvanced.Location = New System.Drawing.Point(5, 4) + Me.lblAdvanced.Name = "lblAdvanced" + Me.lblAdvanced.Size = New System.Drawing.Size(108, 25) + Me.lblAdvanced.TabIndex = 0 + Me.lblAdvanced.Text = "Advanced" ' 'linkStartRestoreBackup ' @@ -738,25 +719,25 @@ Partial Class ucrDataView Me.linkStartRestoreBackup.AutoSize = True Me.linkStartRestoreBackup.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.linkStartRestoreBackup.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkStartRestoreBackup.Location = New System.Drawing.Point(7, 49) + Me.linkStartRestoreBackup.Location = New System.Drawing.Point(7, 47) Me.linkStartRestoreBackup.Name = "linkStartRestoreBackup" - Me.linkStartRestoreBackup.Size = New System.Drawing.Size(116, 13) + Me.linkStartRestoreBackup.Size = New System.Drawing.Size(166, 13) Me.linkStartRestoreBackup.TabIndex = 4 Me.linkStartRestoreBackup.TabStop = True - Me.linkStartRestoreBackup.Text = "Restore from Backup..." + Me.linkStartRestoreBackup.Text = "Restore Data or Log from Backup" ' - 'linkStartSwapDataScriptWindow + 'linkStartPasteScriptfromClipboard ' - Me.linkStartSwapDataScriptWindow.ActiveLinkColor = System.Drawing.Color.Red - Me.linkStartSwapDataScriptWindow.AutoSize = True - Me.linkStartSwapDataScriptWindow.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkStartSwapDataScriptWindow.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkStartSwapDataScriptWindow.Location = New System.Drawing.Point(7, 68) - Me.linkStartSwapDataScriptWindow.Name = "linkStartSwapDataScriptWindow" - Me.linkStartSwapDataScriptWindow.Size = New System.Drawing.Size(162, 13) - Me.linkStartSwapDataScriptWindow.TabIndex = 5 - Me.linkStartSwapDataScriptWindow.TabStop = True - Me.linkStartSwapDataScriptWindow.Text = "Swap Data and Script Window..." + Me.linkStartPasteScriptfromClipboard.ActiveLinkColor = System.Drawing.Color.Red + Me.linkStartPasteScriptfromClipboard.AutoSize = True + Me.linkStartPasteScriptfromClipboard.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkStartPasteScriptfromClipboard.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkStartPasteScriptfromClipboard.Location = New System.Drawing.Point(8, 30) + Me.linkStartPasteScriptfromClipboard.Name = "linkStartPasteScriptfromClipboard" + Me.linkStartPasteScriptfromClipboard.Size = New System.Drawing.Size(134, 13) + Me.linkStartPasteScriptfromClipboard.TabIndex = 5 + Me.linkStartPasteScriptfromClipboard.TabStop = True + Me.linkStartPasteScriptfromClipboard.Text = "Paste Script from Clipboard" ' 'panelSectionRecent ' @@ -764,7 +745,7 @@ Partial Class ucrDataView Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.panelSectionRecent.Controls.Add(Me.lblRecent) Me.panelSectionRecent.Controls.Add(Me.panelRecentMenuItems) - Me.panelSectionRecent.Location = New System.Drawing.Point(28, 91) + Me.panelSectionRecent.Location = New System.Drawing.Point(28, 124) Me.panelSectionRecent.Name = "panelSectionRecent" Me.panelSectionRecent.Size = New System.Drawing.Size(179, 186) Me.panelSectionRecent.TabIndex = 13 @@ -785,60 +766,29 @@ Partial Class ucrDataView Me.panelRecentMenuItems.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.panelRecentMenuItems.AutoScroll = True - Me.panelRecentMenuItems.Location = New System.Drawing.Point(9, 38) + Me.panelRecentMenuItems.Location = New System.Drawing.Point(9, 44) Me.panelRecentMenuItems.Name = "panelRecentMenuItems" Me.panelRecentMenuItems.Size = New System.Drawing.Size(159, 138) Me.panelRecentMenuItems.TabIndex = 6 ' 'panelSectionHelp ' - Me.panelSectionHelp.Controls.Add(Me.linkHelpClimaticMenu) - Me.panelSectionHelp.Controls.Add(Me.linkHelpPrepareMenu) Me.panelSectionHelp.Controls.Add(Me.linkHelpData) Me.panelSectionHelp.Controls.Add(Me.linkHelpGettingStarted) Me.panelSectionHelp.Controls.Add(Me.lblHelp) - Me.panelSectionHelp.Controls.Add(Me.linkHelpIntroduction) - Me.panelSectionHelp.Controls.Add(Me.linkHelpInstructionVideos) - Me.panelSectionHelp.Controls.Add(Me.linkHelpRpackages) - Me.panelSectionHelp.Controls.Add(Me.linkHelpRInstatWebsite) - Me.panelSectionHelp.Location = New System.Drawing.Point(28, 278) + Me.panelSectionHelp.Controls.Add(Me.linkHelpRInstatResourcesSite) + Me.panelSectionHelp.Location = New System.Drawing.Point(28, 314) Me.panelSectionHelp.Name = "panelSectionHelp" - Me.panelSectionHelp.Size = New System.Drawing.Size(374, 169) + Me.panelSectionHelp.Size = New System.Drawing.Size(374, 109) Me.panelSectionHelp.TabIndex = 12 ' - 'linkHelpClimaticMenu - ' - Me.linkHelpClimaticMenu.ActiveLinkColor = System.Drawing.Color.Red - Me.linkHelpClimaticMenu.AutoSize = True - Me.linkHelpClimaticMenu.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpClimaticMenu.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpClimaticMenu.Location = New System.Drawing.Point(8, 98) - Me.linkHelpClimaticMenu.Name = "linkHelpClimaticMenu" - Me.linkHelpClimaticMenu.Size = New System.Drawing.Size(73, 13) - Me.linkHelpClimaticMenu.TabIndex = 14 - Me.linkHelpClimaticMenu.TabStop = True - Me.linkHelpClimaticMenu.Text = "Climatic Menu" - ' - 'linkHelpPrepareMenu - ' - Me.linkHelpPrepareMenu.ActiveLinkColor = System.Drawing.Color.Red - Me.linkHelpPrepareMenu.AutoSize = True - Me.linkHelpPrepareMenu.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpPrepareMenu.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpPrepareMenu.Location = New System.Drawing.Point(8, 82) - Me.linkHelpPrepareMenu.Name = "linkHelpPrepareMenu" - Me.linkHelpPrepareMenu.Size = New System.Drawing.Size(74, 13) - Me.linkHelpPrepareMenu.TabIndex = 13 - Me.linkHelpPrepareMenu.TabStop = True - Me.linkHelpPrepareMenu.Text = "Prepare Menu" - ' 'linkHelpData ' Me.linkHelpData.ActiveLinkColor = System.Drawing.Color.Red Me.linkHelpData.AutoSize = True Me.linkHelpData.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.linkHelpData.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpData.Location = New System.Drawing.Point(8, 66) + Me.linkHelpData.Location = New System.Drawing.Point(8, 49) Me.linkHelpData.Name = "linkHelpData" Me.linkHelpData.Size = New System.Drawing.Size(30, 13) Me.linkHelpData.TabIndex = 12 @@ -851,7 +801,7 @@ Partial Class ucrDataView Me.linkHelpGettingStarted.AutoSize = True Me.linkHelpGettingStarted.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.linkHelpGettingStarted.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpGettingStarted.Location = New System.Drawing.Point(8, 49) + Me.linkHelpGettingStarted.Location = New System.Drawing.Point(8, 33) Me.linkHelpGettingStarted.Name = "linkHelpGettingStarted" Me.linkHelpGettingStarted.Size = New System.Drawing.Size(78, 13) Me.linkHelpGettingStarted.TabIndex = 11 @@ -869,71 +819,44 @@ Partial Class ucrDataView Me.lblHelp.TabIndex = 2 Me.lblHelp.Text = "Help" ' - 'linkHelpIntroduction - ' - Me.linkHelpIntroduction.ActiveLinkColor = System.Drawing.Color.Red - Me.linkHelpIntroduction.AutoSize = True - Me.linkHelpIntroduction.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpIntroduction.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpIntroduction.Location = New System.Drawing.Point(8, 31) - Me.linkHelpIntroduction.Name = "linkHelpIntroduction" - Me.linkHelpIntroduction.Size = New System.Drawing.Size(63, 13) - Me.linkHelpIntroduction.TabIndex = 7 - Me.linkHelpIntroduction.TabStop = True - Me.linkHelpIntroduction.Text = "Introduction" - ' - 'linkHelpInstructionVideos - ' - Me.linkHelpInstructionVideos.ActiveLinkColor = System.Drawing.Color.Red - Me.linkHelpInstructionVideos.AutoSize = True - Me.linkHelpInstructionVideos.Enabled = False - Me.linkHelpInstructionVideos.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpInstructionVideos.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpInstructionVideos.Location = New System.Drawing.Point(8, 152) - Me.linkHelpInstructionVideos.Name = "linkHelpInstructionVideos" - Me.linkHelpInstructionVideos.Size = New System.Drawing.Size(98, 13) - Me.linkHelpInstructionVideos.TabIndex = 10 - Me.linkHelpInstructionVideos.TabStop = True - Me.linkHelpInstructionVideos.Text = "Instructional videos" - Me.linkHelpInstructionVideos.Visible = False - ' - 'linkHelpRpackages - ' - Me.linkHelpRpackages.ActiveLinkColor = System.Drawing.Color.Red - Me.linkHelpRpackages.AutoSize = True - Me.linkHelpRpackages.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpRpackages.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpRpackages.Location = New System.Drawing.Point(8, 114) - Me.linkHelpRpackages.Name = "linkHelpRpackages" - Me.linkHelpRpackages.Size = New System.Drawing.Size(116, 13) - Me.linkHelpRpackages.TabIndex = 8 - Me.linkHelpRpackages.TabStop = True - Me.linkHelpRpackages.Text = "R packages in R-Instat" - ' - 'linkHelpRInstatWebsite - ' - Me.linkHelpRInstatWebsite.ActiveLinkColor = System.Drawing.Color.Red - Me.linkHelpRInstatWebsite.AutoSize = True - Me.linkHelpRInstatWebsite.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpRInstatWebsite.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpRInstatWebsite.Location = New System.Drawing.Point(8, 133) - Me.linkHelpRInstatWebsite.Name = "linkHelpRInstatWebsite" - Me.linkHelpRInstatWebsite.Size = New System.Drawing.Size(83, 13) - Me.linkHelpRInstatWebsite.TabIndex = 9 - Me.linkHelpRInstatWebsite.TabStop = True - Me.linkHelpRInstatWebsite.Text = "R-Instat website" + 'linkHelpRInstatResourcesSite + ' + Me.linkHelpRInstatResourcesSite.ActiveLinkColor = System.Drawing.Color.Red + Me.linkHelpRInstatResourcesSite.AutoSize = True + Me.linkHelpRInstatResourcesSite.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpRInstatResourcesSite.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpRInstatResourcesSite.Location = New System.Drawing.Point(8, 65) + Me.linkHelpRInstatResourcesSite.Name = "linkHelpRInstatResourcesSite" + Me.linkHelpRInstatResourcesSite.Size = New System.Drawing.Size(119, 13) + Me.linkHelpRInstatResourcesSite.TabIndex = 9 + Me.linkHelpRInstatResourcesSite.TabStop = True + Me.linkHelpRInstatResourcesSite.Text = "R-Instat Resources Site" ' 'panelSectionStart ' + Me.panelSectionStart.Controls.Add(Me.linkStartPasteData) Me.panelSectionStart.Controls.Add(Me.lblStart) Me.panelSectionStart.Controls.Add(Me.linkStartNewDataFrame) Me.panelSectionStart.Controls.Add(Me.linkStartOpenFile) Me.panelSectionStart.Controls.Add(Me.linkStartOpenLibrary) Me.panelSectionStart.Location = New System.Drawing.Point(28, 6) Me.panelSectionStart.Name = "panelSectionStart" - Me.panelSectionStart.Size = New System.Drawing.Size(374, 85) + Me.panelSectionStart.Size = New System.Drawing.Size(374, 113) Me.panelSectionStart.TabIndex = 11 ' + 'linkStartPasteData + ' + Me.linkStartPasteData.ActiveLinkColor = System.Drawing.Color.Red + Me.linkStartPasteData.AutoSize = True + Me.linkStartPasteData.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkStartPasteData.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkStartPasteData.Location = New System.Drawing.Point(7, 84) + Me.linkStartPasteData.Name = "linkStartPasteData" + Me.linkStartPasteData.Size = New System.Drawing.Size(136, 13) + Me.linkStartPasteData.TabIndex = 7 + Me.linkStartPasteData.TabStop = True + Me.linkStartPasteData.Text = "Paste data from clipboard..." + ' 'lblStart ' Me.lblStart.AutoSize = True @@ -964,7 +887,7 @@ Partial Class ucrDataView Me.linkStartOpenFile.AutoSize = True Me.linkStartOpenFile.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.linkStartOpenFile.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkStartOpenFile.Location = New System.Drawing.Point(7, 49) + Me.linkStartOpenFile.Location = New System.Drawing.Point(7, 48) Me.linkStartOpenFile.Name = "linkStartOpenFile" Me.linkStartOpenFile.Size = New System.Drawing.Size(90, 13) Me.linkStartOpenFile.TabIndex = 4 @@ -977,7 +900,7 @@ Partial Class ucrDataView Me.linkStartOpenLibrary.AutoSize = True Me.linkStartOpenLibrary.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.linkStartOpenLibrary.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkStartOpenLibrary.Location = New System.Drawing.Point(7, 68) + Me.linkStartOpenLibrary.Location = New System.Drawing.Point(7, 66) Me.linkStartOpenLibrary.Name = "linkStartOpenLibrary" Me.linkStartOpenLibrary.Size = New System.Drawing.Size(105, 13) Me.linkStartOpenLibrary.TabIndex = 5 @@ -1166,8 +1089,8 @@ Partial Class ucrDataView Me.tlpTableContainer.ResumeLayout(False) Me.tlpTableContainer.PerformLayout() Me.panelSectionsAll.ResumeLayout(False) - Me.panelSectionIfYouMust.ResumeLayout(False) - Me.panelSectionIfYouMust.PerformLayout() + Me.panelSectionAdvanced.ResumeLayout(False) + Me.panelSectionAdvanced.PerformLayout() Me.panelSectionRecent.ResumeLayout(False) Me.panelSectionRecent.PerformLayout() Me.panelSectionHelp.ResumeLayout(False) @@ -1253,10 +1176,7 @@ Partial Class ucrDataView Friend WithEvents panelRecentMenuItems As Panel Friend WithEvents panelSectionHelp As Panel Friend WithEvents lblHelp As Label - Friend WithEvents linkHelpIntroduction As LinkLabel - Friend WithEvents linkHelpInstructionVideos As LinkLabel - Friend WithEvents linkHelpRpackages As LinkLabel - Friend WithEvents linkHelpRInstatWebsite As LinkLabel + Friend WithEvents linkHelpRInstatResourcesSite As LinkLabel Friend WithEvents panelSectionStart As Panel Friend WithEvents lblStart As Label Friend WithEvents linkStartNewDataFrame As LinkLabel @@ -1291,14 +1211,12 @@ Partial Class ucrDataView Friend WithEvents mnuDeleteCol2 As ToolStripMenuItem Friend WithEvents ToolStripSeparator14 As ToolStripSeparator Friend WithEvents mnuEditCell As ToolStripMenuItem - Friend WithEvents linkHelpPrepareMenu As LinkLabel Friend WithEvents linkHelpData As LinkLabel Friend WithEvents linkHelpGettingStarted As LinkLabel - Friend WithEvents linkHelpClimaticMenu As LinkLabel - Friend WithEvents panelSectionIfYouMust As Panel - Friend WithEvents lblIFYouMust As Label - Friend WithEvents linkStartPasteData As LinkLabel + Friend WithEvents panelSectionAdvanced As Panel + Friend WithEvents lblAdvanced As Label Friend WithEvents linkStartRestoreBackup As LinkLabel - Friend WithEvents linkStartSwapDataScriptWindow As LinkLabel + Friend WithEvents linkStartPasteScriptfromClipboard As LinkLabel Friend WithEvents linkStartAddRPackage As LinkLabel + Friend WithEvents linkStartPasteData As LinkLabel End Class diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 3f77aed3c2f..e41522cc43e 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -661,20 +661,24 @@ Public Class ucrDataView GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) Else Dim bCheckLabels As Boolean = GetCurrentDataFrameFocus().clsPrepareFunctions.CheckHasLabels(strColumn) - frmConvertToNumeric.SetDataFrameName(GetCurrentDataFrameFocus().strName) - frmConvertToNumeric.SetColumnName(strColumn) - frmConvertToNumeric.CheckLabels(bCheckLabels) - frmConvertToNumeric.SetNonNumeric(iNonNumericValues) - frmConvertToNumeric.ShowDialog() - ' Yes for "normal" convert and No for "ordinal" convert - Select Case frmConvertToNumeric.DialogResult - Case DialogResult.Yes - GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) - Case DialogResult.No - GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, False) - Case DialogResult.Cancel - Continue For - End Select + If bCheckLabels Then + GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) + Else + frmConvertToNumeric.SetDataFrameName(GetCurrentDataFrameFocus().strName) + frmConvertToNumeric.SetColumnName(strColumn) + frmConvertToNumeric.CheckLabels(bCheckLabels) + frmConvertToNumeric.SetNonNumeric(iNonNumericValues) + frmConvertToNumeric.ShowDialog() + ' Yes for "normal" convert and No for "ordinal" convert + Select Case frmConvertToNumeric.DialogResult + Case DialogResult.Yes + GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) + Case DialogResult.No + GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, False) + Case DialogResult.Cancel + Continue For + End Select + End If frmConvertToNumeric.Close() End If Next @@ -765,16 +769,16 @@ Public Class ucrDataView panelSectionRecent.Visible = panelRecentMenuItems.Controls.Count > 0 End Sub - Private Sub linkHelpIntroduction_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpIntroduction.LinkClicked + Private Sub linkHelpIntroduction_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Help.ShowHelp(frmMain, frmMain.strStaticPath & "/" & frmMain.strHelpFilePath, HelpNavigator.TopicId, "0") End Sub - Private Sub linkHelpRpackages_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpRpackages.LinkClicked + Private Sub linkHelpRpackages_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) dlgHelpVignettes.ShowDialog() End Sub - Private Sub linkHelpRInstatWebsite_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpRInstatWebsite.LinkClicked - Process.Start("http://r-instat.org/") + Private Sub linkHelpRInstatWebsite_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpRInstatResourcesSite.LinkClicked + Process.Start("https://ecampus.r-instat.org/course/view.php?id=14") End Sub Private Sub rowContextMenuStrip_Opening(sender As Object, e As CancelEventArgs) Handles rowContextMenuStrip.Opening @@ -1019,15 +1023,15 @@ Public Class ucrDataView Help.ShowHelp(frmMain, frmMain.strStaticPath & "/" & frmMain.strHelpFilePath, HelpNavigator.TopicId, "71") End Sub - Private Sub linkHelpPrepareMenu_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpPrepareMenu.LinkClicked + Private Sub linkHelpPrepareMenu_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Help.ShowHelp(frmMain, frmMain.strStaticPath & "/" & frmMain.strHelpFilePath, HelpNavigator.TopicId, "9") End Sub - Private Sub linkHelpClimaticMenu_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpClimaticMenu.LinkClicked + Private Sub linkHelpClimaticMenu_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Help.ShowHelp(frmMain, frmMain.strStaticPath & "/" & frmMain.strHelpFilePath, HelpNavigator.TopicId, "19") End Sub - Private Sub linkStartSwapDataScriptWindow_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkStartSwapDataScriptWindow.LinkClicked + Private Sub linkStartPasteScriptfromClipboard_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkStartPasteScriptfromClipboard.LinkClicked frmMain.mnuViewSwapDataAndMetadata.Enabled = frmMain.mnuViewSwapDataAndScript.Checked frmMain.mnuViewSwapDataAndScript.Checked = Not frmMain.mnuViewSwapDataAndScript.Checked frmMain.UpdateSwapDataAndScript() @@ -1045,4 +1049,5 @@ Public Class ucrDataView Private Sub linkStartPasteData_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkStartPasteData.LinkClicked dlgPasteNewColumns.ShowDialog() End Sub + End Class \ No newline at end of file