From f6877f8e7b66f369737adb3a6089b9c22b48649e Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Thu, 23 Nov 2023 16:36:20 +0300 Subject: [PATCH 01/25] changes to the code --- instat/dlgHomogenization.Designer.vb | 229 ++++++++++++++++++++------- instat/dlgHomogenization.vb | 113 +++++++++++-- 2 files changed, 277 insertions(+), 65 deletions(-) diff --git a/instat/dlgHomogenization.Designer.vb b/instat/dlgHomogenization.Designer.vb index 35b58e1b6f4..cc64702cd39 100644 --- a/instat/dlgHomogenization.Designer.vb +++ b/instat/dlgHomogenization.Designer.vb @@ -52,8 +52,6 @@ Partial Class dlgHomogenization Me.ucrChkSummary = New instat.ucrCheck() Me.ttOptions = New System.Windows.Forms.ToolTip(Me.components) Me.rdoSingle = New System.Windows.Forms.RadioButton() - Me.rdoMultiple = New System.Windows.Forms.RadioButton() - Me.rdoNeighbouring = New System.Windows.Forms.RadioButton() Me.lblNeighbouring = New System.Windows.Forms.Label() Me.ucrReceiverNeighbour = New instat.ucrReceiverSingle() Me.ucrPnlOptions = New instat.UcrPanel() @@ -63,9 +61,22 @@ Partial Class dlgHomogenization Me.ucrBase = New instat.ucrButtons() Me.lblStation = New System.Windows.Forms.Label() Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.rdoMultiple = New System.Windows.Forms.RadioButton() + Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() + Me.grpStationFile = New System.Windows.Forms.GroupBox() + Me.ucrReceiverStationFile = New instat.ucrReceiverMultiple() + Me.lblStationFile = New System.Windows.Forms.Label() + Me.grpDataFile = New System.Windows.Forms.GroupBox() + Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() + Me.lblDataFiles = New System.Windows.Forms.Label() + Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrInputClimateVariables = New instat.ucrInputTextBox() + Me.lblClimaticVariable = New System.Windows.Forms.Label() Me.grpMethods.SuspendLayout() Me.grpCptOptions.SuspendLayout() Me.grpOutputOptions.SuspendLayout() + Me.grpStationFile.SuspendLayout() + Me.grpDataFile.SuspendLayout() Me.SuspendLayout() ' 'lblElement @@ -380,7 +391,7 @@ Partial Class dlgHomogenization Me.rdoSingle.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSingle.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSingle.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSingle.Location = New System.Drawing.Point(62, 27) + Me.rdoSingle.Location = New System.Drawing.Point(90, 9) Me.rdoSingle.Name = "rdoSingle" Me.rdoSingle.Size = New System.Drawing.Size(101, 28) Me.rdoSingle.TabIndex = 1 @@ -390,44 +401,6 @@ Partial Class dlgHomogenization Me.rdoSingle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoSingle.UseVisualStyleBackColor = False ' - 'rdoMultiple - ' - Me.rdoMultiple.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoMultiple.BackColor = System.Drawing.SystemColors.Control - Me.rdoMultiple.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultiple.FlatAppearance.BorderSize = 2 - Me.rdoMultiple.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultiple.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoMultiple.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultiple.Location = New System.Drawing.Point(260, 27) - Me.rdoMultiple.Name = "rdoMultiple" - Me.rdoMultiple.Size = New System.Drawing.Size(101, 28) - Me.rdoMultiple.TabIndex = 3 - Me.rdoMultiple.TabStop = True - Me.rdoMultiple.Tag = "" - Me.rdoMultiple.Text = "Multiple" - Me.rdoMultiple.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoMultiple.UseVisualStyleBackColor = False - ' - 'rdoNeighbouring - ' - Me.rdoNeighbouring.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoNeighbouring.BackColor = System.Drawing.SystemColors.Control - Me.rdoNeighbouring.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoNeighbouring.FlatAppearance.BorderSize = 2 - Me.rdoNeighbouring.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoNeighbouring.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoNeighbouring.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoNeighbouring.Location = New System.Drawing.Point(161, 27) - Me.rdoNeighbouring.Name = "rdoNeighbouring" - Me.rdoNeighbouring.Size = New System.Drawing.Size(101, 28) - Me.rdoNeighbouring.TabIndex = 2 - Me.rdoNeighbouring.TabStop = True - Me.rdoNeighbouring.Tag = "" - Me.rdoNeighbouring.Text = "Neighbouring" - Me.rdoNeighbouring.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoNeighbouring.UseVisualStyleBackColor = False - ' 'lblNeighbouring ' Me.lblNeighbouring.AutoSize = True @@ -454,7 +427,7 @@ Partial Class dlgHomogenization 'ucrPnlOptions ' Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlOptions.Location = New System.Drawing.Point(51, 25) + Me.ucrPnlOptions.Location = New System.Drawing.Point(51, 6) Me.ucrPnlOptions.Name = "ucrPnlOptions" Me.ucrPnlOptions.Size = New System.Drawing.Size(321, 30) Me.ucrPnlOptions.TabIndex = 0 @@ -463,7 +436,7 @@ Partial Class dlgHomogenization ' Me.ucrSaveResult.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrSaveResult.Enabled = False - Me.ucrSaveResult.Location = New System.Drawing.Point(12, 413) + Me.ucrSaveResult.Location = New System.Drawing.Point(12, 493) Me.ucrSaveResult.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveResult.Name = "ucrSaveResult" Me.ucrSaveResult.Size = New System.Drawing.Size(320, 24) @@ -498,9 +471,9 @@ Partial Class dlgHomogenization ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(12, 440) + Me.ucrBase.Location = New System.Drawing.Point(12, 522) 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 = 15 ' 'lblStation @@ -526,19 +499,155 @@ Partial Class dlgHomogenization Me.ucrReceiverStation.TabIndex = 6 Me.ucrReceiverStation.ucrSelector = Nothing ' + 'rdoMultiple + ' + Me.rdoMultiple.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoMultiple.BackColor = System.Drawing.SystemColors.Control + Me.rdoMultiple.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMultiple.FlatAppearance.BorderSize = 2 + Me.rdoMultiple.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMultiple.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoMultiple.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoMultiple.Location = New System.Drawing.Point(189, 9) + Me.rdoMultiple.Name = "rdoMultiple" + Me.rdoMultiple.Size = New System.Drawing.Size(101, 28) + Me.rdoMultiple.TabIndex = 16 + Me.rdoMultiple.TabStop = True + Me.rdoMultiple.Tag = "" + Me.rdoMultiple.Text = "Multiple" + Me.rdoMultiple.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoMultiple.UseVisualStyleBackColor = False + ' + 'ucrSelectorStationFile + ' + Me.ucrSelectorStationFile.AutoSize = True + Me.ucrSelectorStationFile.bDropUnusedFilterLevels = False + Me.ucrSelectorStationFile.bShowHiddenColumns = False + Me.ucrSelectorStationFile.bUseCurrentFilter = True + Me.ucrSelectorStationFile.Location = New System.Drawing.Point(6, 16) + Me.ucrSelectorStationFile.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorStationFile.Name = "ucrSelectorStationFile" + Me.ucrSelectorStationFile.Size = New System.Drawing.Size(213, 185) + Me.ucrSelectorStationFile.TabIndex = 0 + ' + 'grpStationFile + ' + Me.grpStationFile.Controls.Add(Me.ucrReceiverStationFile) + Me.grpStationFile.Controls.Add(Me.lblStationFile) + Me.grpStationFile.Controls.Add(Me.ucrSelectorStationFile) + Me.grpStationFile.Location = New System.Drawing.Point(11, 260) + Me.grpStationFile.Name = "grpStationFile" + Me.grpStationFile.Size = New System.Drawing.Size(397, 201) + Me.grpStationFile.TabIndex = 17 + Me.grpStationFile.TabStop = False + Me.grpStationFile.Text = "StationFile" + ' + 'ucrReceiverStationFile + ' + Me.ucrReceiverStationFile.AutoSize = True + Me.ucrReceiverStationFile.frmParent = Me + Me.ucrReceiverStationFile.Location = New System.Drawing.Point(265, 38) + Me.ucrReceiverStationFile.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationFile.Name = "ucrReceiverStationFile" + Me.ucrReceiverStationFile.Selector = Nothing + Me.ucrReceiverStationFile.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverStationFile.strNcFilePath = "" + Me.ucrReceiverStationFile.TabIndex = 6 + Me.ucrReceiverStationFile.ucrSelector = Nothing + ' + 'lblStationFile + ' + Me.lblStationFile.AutoSize = True + Me.lblStationFile.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblStationFile.Location = New System.Drawing.Point(269, 19) + Me.lblStationFile.Name = "lblStationFile" + Me.lblStationFile.Size = New System.Drawing.Size(86, 13) + Me.lblStationFile.TabIndex = 5 + Me.lblStationFile.Text = "Station Columns:" + ' + 'grpDataFile + ' + Me.grpDataFile.Controls.Add(Me.ucrReceiverDataFiles) + Me.grpDataFile.Controls.Add(Me.lblDataFiles) + Me.grpDataFile.Controls.Add(Me.ucrSelectorDataFiles) + Me.grpDataFile.Location = New System.Drawing.Point(12, 59) + Me.grpDataFile.Name = "grpDataFile" + Me.grpDataFile.Size = New System.Drawing.Size(397, 201) + Me.grpDataFile.TabIndex = 18 + Me.grpDataFile.TabStop = False + Me.grpDataFile.Text = "Data File" + ' + 'ucrReceiverDataFiles + ' + Me.ucrReceiverDataFiles.AutoSize = True + Me.ucrReceiverDataFiles.frmParent = Me + Me.ucrReceiverDataFiles.Location = New System.Drawing.Point(265, 38) + Me.ucrReceiverDataFiles.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDataFiles.Name = "ucrReceiverDataFiles" + Me.ucrReceiverDataFiles.Selector = Nothing + Me.ucrReceiverDataFiles.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverDataFiles.strNcFilePath = "" + Me.ucrReceiverDataFiles.TabIndex = 6 + Me.ucrReceiverDataFiles.ucrSelector = Nothing + ' + 'lblDataFiles + ' + Me.lblDataFiles.AutoSize = True + Me.lblDataFiles.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDataFiles.Location = New System.Drawing.Point(269, 19) + Me.lblDataFiles.Name = "lblDataFiles" + Me.lblDataFiles.Size = New System.Drawing.Size(57, 13) + Me.lblDataFiles.TabIndex = 5 + Me.lblDataFiles.Text = "Data Files:" + ' + 'ucrSelectorDataFiles + ' + Me.ucrSelectorDataFiles.AutoSize = True + Me.ucrSelectorDataFiles.bDropUnusedFilterLevels = False + Me.ucrSelectorDataFiles.bShowHiddenColumns = False + Me.ucrSelectorDataFiles.bUseCurrentFilter = True + Me.ucrSelectorDataFiles.Location = New System.Drawing.Point(6, 16) + Me.ucrSelectorDataFiles.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDataFiles.Name = "ucrSelectorDataFiles" + Me.ucrSelectorDataFiles.Size = New System.Drawing.Size(213, 185) + Me.ucrSelectorDataFiles.TabIndex = 0 + ' + 'ucrInputClimateVariables + ' + Me.ucrInputClimateVariables.AddQuotesIfUnrecognised = True + Me.ucrInputClimateVariables.AutoSize = True + Me.ucrInputClimateVariables.IsMultiline = False + Me.ucrInputClimateVariables.IsReadOnly = False + Me.ucrInputClimateVariables.Location = New System.Drawing.Point(272, 464) + Me.ucrInputClimateVariables.Name = "ucrInputClimateVariables" + Me.ucrInputClimateVariables.Size = New System.Drawing.Size(137, 21) + Me.ucrInputClimateVariables.TabIndex = 19 + ' + 'lblClimaticVariable + ' + Me.lblClimaticVariable.AutoSize = True + Me.lblClimaticVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblClimaticVariable.Location = New System.Drawing.Point(182, 468) + Me.lblClimaticVariable.Name = "lblClimaticVariable" + Me.lblClimaticVariable.Size = New System.Drawing.Size(87, 13) + Me.lblClimaticVariable.TabIndex = 20 + Me.lblClimaticVariable.Text = "Climatic Variable:" + ' 'dlgHomogenization ' 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(422, 494) - Me.Controls.Add(Me.lblStation) + Me.ClientSize = New System.Drawing.Size(422, 579) + Me.Controls.Add(Me.grpDataFile) Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.ucrSelectorHomogenization) + Me.Controls.Add(Me.lblClimaticVariable) + Me.Controls.Add(Me.ucrInputClimateVariables) + Me.Controls.Add(Me.rdoMultiple) + Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.lblNeighbouring) - Me.Controls.Add(Me.ucrReceiverNeighbour) - Me.Controls.Add(Me.rdoNeighbouring) Me.Controls.Add(Me.rdoSingle) - Me.Controls.Add(Me.rdoMultiple) Me.Controls.Add(Me.ucrPnlOptions) Me.Controls.Add(Me.ucrSaveResult) Me.Controls.Add(Me.grpOutputOptions) @@ -546,8 +655,9 @@ Partial Class dlgHomogenization Me.Controls.Add(Me.grpMethods) Me.Controls.Add(Me.lblElement) Me.Controls.Add(Me.ucrReceiverElement) - Me.Controls.Add(Me.ucrSelectorHomogenization) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.grpStationFile) + Me.Controls.Add(Me.ucrReceiverNeighbour) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -560,6 +670,10 @@ Partial Class dlgHomogenization Me.grpCptOptions.PerformLayout() Me.grpOutputOptions.ResumeLayout(False) Me.grpOutputOptions.PerformLayout() + Me.grpStationFile.ResumeLayout(False) + Me.grpStationFile.PerformLayout() + Me.grpDataFile.ResumeLayout(False) + Me.grpDataFile.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -593,9 +707,7 @@ Partial Class dlgHomogenization Friend WithEvents lblPenaltyValue As Label Friend WithEvents ucrInputPenValue As ucrInputTextBox Friend WithEvents rdoSingle As RadioButton - Friend WithEvents rdoMultiple As RadioButton Friend WithEvents ucrPnlOptions As UcrPanel - Friend WithEvents rdoNeighbouring As RadioButton Friend WithEvents lblNeighbouring As Label Friend WithEvents ucrReceiverNeighbour As ucrReceiverSingle Friend WithEvents ucrInputComboVarDistribution As ucrInputComboBox @@ -605,4 +717,15 @@ Partial Class dlgHomogenization Friend WithEvents rdoBuishand As RadioButton Friend WithEvents lblStation As Label Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents rdoMultiple As RadioButton + Friend WithEvents lblClimaticVariable As Label + Friend WithEvents ucrInputClimateVariables As ucrInputTextBox + Friend WithEvents grpDataFile As GroupBox + Friend WithEvents ucrReceiverDataFiles As ucrReceiverMultiple + Friend WithEvents lblDataFiles As Label + Friend WithEvents ucrSelectorDataFiles As ucrSelectorByDataFrameAddRemove + Friend WithEvents grpStationFile As GroupBox + Friend WithEvents ucrReceiverStationFile As ucrReceiverMultiple + Friend WithEvents lblStationFile As Label + Friend WithEvents ucrSelectorStationFile As ucrSelectorByDataFrameAddRemove End Class diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index ffca7cb35e8..4b8e8b481b8 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -19,8 +19,10 @@ Imports instat.Translations Public Class dlgHomogenization Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsCptMeanFunction, clsCptVarianceFunction, clsCptMeanVarianceFunction, clsExcludeNAFunction, clsPlotFunction, clsSummaryFunction, clsSnhtFunction, clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsCompleteCasesFunction As New RFunction - Private clsBracketsOperator, clsLeftBracketOperator, clsRightBracketOperator As New ROperator + Private clsCptMeanFunction, clsCptVarianceFunction, clsCptMeanVarianceFunction, clsExcludeNAFunction, clsPlotFunction, clsSummaryFunction, clsSnhtFunction, + clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsDummyFunction, clsCsv2climatolFunction, + clsGetColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsColumnsFunction As New RFunction + Private clsBracketsOperator, clsLeftBracketOperator, clsVars1ColumnsFunction, clsRightBracketOperator As New ROperator Private Sub dlgHomogenization_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -46,6 +48,23 @@ Public Class dlgHomogenization ucrBase.clsRsyntax.iCallType = 2 ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False + ucrSelectorStationFile.SetParameter(New RParameter("stnfile", 1)) + 'ucrSelectorStationFile.SetParameterIsrfunction() + + ucrSelectorDataFiles.SetParameter(New RParameter("csvfile", 0)) + ucrSelectorDataFiles.SetParameterIsrfunction() + + ucrReceiverStationFile.SetParameter(New RParameter("datacol", 2)) + ucrReceiverStationFile.Selector = ucrSelectorStationFile + + ucrReceiverDataFiles.SetParameter(New RParameter("stncol", 3)) + ucrReceiverDataFiles.Selector = ucrSelectorDataFiles + ucrReceiverDataFiles.SetParameterIsString() + + + ucrInputClimateVariables.SetParameter(New RParameter("varcli", 4)) + ucrInputClimateVariables.SetLinkedDisplayControl(lblClimaticVariable) + ucrReceiverStation.SetParameter(New RParameter("station", 0)) ucrReceiverStation.Selector = ucrSelectorHomogenization ucrReceiverStation.SetParameterIsRFunction() @@ -75,11 +94,10 @@ Public Class dlgHomogenization ttOptions.SetToolTip(rdoBuishand, "Performes the Buishand range test for change-point detection of a normal variate.") ucrPnlOptions.AddRadioButton(rdoSingle) - ucrPnlOptions.AddRadioButton(rdoNeighbouring) ucrPnlOptions.AddRadioButton(rdoMultiple) - ucrPnlOptions.AddFunctionNamesCondition(rdoSingle, {"cpt.mean", "cpt.var", "cpt.meanvar", "snh.test", "pettitt.test", "br.test", "tapply"}) - ucrPnlOptions.AddFunctionNamesCondition(rdoNeighbouring, {"cpt.mean", "cpt.var", "cpt.meanvar", "snh.test", "pettitt.test", "br.test", "tapply"}, False) - ucrPnlOptions.AddFunctionNamesCondition(rdoMultiple, {"cpt.mean", "cpt.var", "cpt.meanvar", "snh.test", "pettitt.test", "br.test", "tapply"}, False) + 'ucrPnlOptions.AddFunctionNamesCondition(rdoSingle, {"cpt.mean", "cpt.var", "cpt.meanvar", "snh.test", "pettitt.test", "br.test", "tapply"}) + ucrPnlOptions.AddParameterValuesCondition(rdoSingle, "checked", "single") + ucrPnlOptions.AddParameterValuesCondition(rdoMultiple, "checked", "multiple") ucrChkPlot.SetText("Plot") ucrChkPlot.AddRSyntaxContainsFunctionNamesCondition(True, {"plot"}) @@ -154,10 +172,10 @@ Public Class dlgHomogenization 'ucrSaveResult.SetIsComboBox() 'ucrSaveResult.SetPrefix("Test") 'ucrSaveResult.SetAssignToIfUncheckedValue("last_model") - + ucrPnlOptions.AddToLinkedControls({ucrSelectorHomogenization, ucrReceiverNeighbour, ucrReceiverStation, ucrReceiverElement}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls(ucrInputClimateVariables, {rdoMultiple}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboPenalty.AddToLinkedControls(ucrInputPenValue, {"Asymptotic", "CROPS"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrInputComboMethod.AddToLinkedControls(ucrInputQ, {"SegNeigh", "BinSeg"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=5) - ucrPnlOptions.AddToLinkedControls(ucrReceiverNeighbour, {rdoNeighbouring}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlMethods.AddToLinkedControls(ucrInputComboMeanDistribution, {rdoCptMean}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlMethods.AddToLinkedControls(ucrInputComboVarDistribution, {rdoCptVariance}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlMethods.AddToLinkedControls(ucrInputComboMeanVarDistribution, {rdoCptMeanVariance}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -166,10 +184,9 @@ Public Class dlgHomogenization ucrReceiverNeighbour.SetLinkedDisplayControl(lblNeighbouring) ucrInputPenValue.SetLinkedDisplayControl(lblPenaltyValue) ucrInputQ.SetLinkedDisplayControl(lblQ) + ucrReceiverElement.SetLinkedDisplayControl(lblElement) + ucrReceiverStation.SetLinkedDisplayControl(lblStation) - 'Not yet working! - rdoMultiple.Enabled = False - rdoNeighbouring.Enabled = False End Sub Private Sub SetDefaults() @@ -183,17 +200,29 @@ Public Class dlgHomogenization clsPettittFunction = New RFunction clsBuishandFunction = New RFunction clsCompleteCasesFunction = New RFunction + clsCsv2climatolFunction = New RFunction + clsDummyFunction = New RFunction + clsGetColumnsFunction = New RFunction + clsPmatchFunction = New RFunction + clsColumnsFunction = New RFunction clsBracketsOperator = New ROperator clsLeftBracketOperator = New ROperator clsRightBracketOperator = New ROperator + clsVars1ColumnsFunction = New ROperator + ucrSelectorHomogenization.Reset() ucrReceiverElement.SetMeAsReceiver() + ucrReceiverDataFiles.SetMeAsReceiver() + ucrReceiverStationFile.SetMeAsReceiver() 'ucrSaveResult.Reset() 'TODO: Set conditions properly! rdoSnht.Checked = True + clsDummyFunction.AddParameter("checked", "single", iPosition:=0) + + clsCptMeanFunction.SetPackageName("changepoint") clsCptMeanFunction.SetRCommand("cpt.mean") clsCptMeanFunction.AddParameter("Q", 5, iPosition:=5) @@ -248,6 +277,28 @@ Public Class dlgHomogenization clsRightBracketOperator.bSpaceAroundOperation = False clsRightBracketOperator.bBrackets = False + clsCsv2climatolFunction.SetPackageName("climatol") + clsCsv2climatolFunction.SetRCommand("csv2climatol") + clsCsv2climatolFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsCsv2climatolFunction.AddParameter("datacol", clsRFunctionParameter:=clsPmatchFunction, iPosition:=1) + clsCsv2climatolFunction.AddParameter("header", "TRUE", iPosition:=2) + + clsGetColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") + clsGetColumnsFunction.SetAssignTo("col_data") + + clsVars1ColumnsFunction.SetOperation("", bBracketsTemp:=False) + clsVars1ColumnsFunction.SetAssignTo("var_1") + + clsColumnsFunction.SetRCommand("colnames") + clsColumnsFunction.AddParameter("data", ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + + clsPmatchFunction.SetRCommand("pmatch") + clsPmatchFunction.AddParameter("paste", clsRFunctionParameter:=clsColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) + clsPmatchFunction.AddParameter("duplicates.ok", "TRUE", iPosition:=1) + clsPmatchFunction.AddParameter("cols", clsROperatorParameter:=clsVars1ColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) + clsPmatchFunction.SetAssignTo("data_file") + + ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) AddPlotSummaryParameters() @@ -284,7 +335,8 @@ Public Class dlgHomogenization ucrReceiverStation.SetRCode(clsLeftBracketOperator, bReset) 'ucrPnlMethods.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrPnlOptions.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + 'ucrPnlOptions.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrPnlOptions.SetRCode(clsDummyFunction, bReset) 'ucrSaveResult.AddAdditionalRCode(clsCptVarianceFunction, iAdditionalPairNo:=1) 'ucrSaveResult.AddAdditionalRCode(clsCptMeanVarianceFunction, iAdditionalPairNo:=2) @@ -293,6 +345,8 @@ Public Class dlgHomogenization 'ucrSaveResult.AddAdditionalRCode(clsBuishandFunction, iAdditionalPairNo:=5) 'ucrSaveResult.SetRCode(clsCptMeanFunction, bReset) + ucrReceiverDataFiles.SetRCode(clsGetColumnsFunction, bReset) + 'ucrSelectorDataFiles.SetRCode(clsGetColumnsFunction, bReset) ucrChkPlot.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) @@ -390,4 +444,39 @@ Public Class dlgHomogenization Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged TestOkEnabled() End Sub + + Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged + If rdoSingle.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) + + Else + ucrBase.clsRsyntax.SetBaseRFunction(clsCsv2climatolFunction) + + End If + + HideShowControls() + End Sub + Private Sub HideShowControls() + If rdoMultiple.Checked Then + grpDataFile.Show() + grpStationFile.Show() + grpMethods.Hide() + grpCptOptions.Hide() + grpOutputOptions.Hide() + Else + grpStationFile.Hide() + grpDataFile.Hide() + grpMethods.Show() + grpCptOptions.Show() + grpOutputOptions.Show() + End If + End Sub + + Private Sub ucrReceiverDataFiles_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDataFiles.ControlValueChanged + If Not ucrReceiverDataFiles.IsEmpty Then + clsVars1ColumnsFunction.AddParameter("cols", ucrReceiverDataFiles.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + Else + clsVars1ColumnsFunction.RemoveParameterByName("cols") + End If + End Sub End Class \ No newline at end of file From 9b35fa0e861b06a3f566753181d4e84f348d5a7d Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 27 Nov 2023 10:51:19 +0300 Subject: [PATCH 02/25] changes to the code --- instat/dlgHomogenization.Designer.vb | 2 +- instat/dlgHomogenization.vb | 100 ++++++++++++++++++++++----- 2 files changed, 84 insertions(+), 18 deletions(-) diff --git a/instat/dlgHomogenization.Designer.vb b/instat/dlgHomogenization.Designer.vb index cc64702cd39..b089421cd22 100644 --- a/instat/dlgHomogenization.Designer.vb +++ b/instat/dlgHomogenization.Designer.vb @@ -639,7 +639,6 @@ Partial Class dlgHomogenization Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(422, 579) - Me.Controls.Add(Me.grpDataFile) Me.Controls.Add(Me.ucrReceiverStation) Me.Controls.Add(Me.ucrSelectorHomogenization) Me.Controls.Add(Me.lblClimaticVariable) @@ -658,6 +657,7 @@ Partial Class dlgHomogenization Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.grpStationFile) Me.Controls.Add(Me.ucrReceiverNeighbour) + Me.Controls.Add(Me.grpDataFile) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 4b8e8b481b8..3457bb9558a 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -21,8 +21,8 @@ Public Class dlgHomogenization Private bReset As Boolean = True Private clsCptMeanFunction, clsCptVarianceFunction, clsCptMeanVarianceFunction, clsExcludeNAFunction, clsPlotFunction, clsSummaryFunction, clsSnhtFunction, clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsDummyFunction, clsCsv2climatolFunction, - clsGetColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsColumnsFunction As New RFunction - Private clsBracketsOperator, clsLeftBracketOperator, clsVars1ColumnsFunction, clsRightBracketOperator As New ROperator + clsGetColumnsFunction, clsGetStnColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsPmatch2Function, clsColumnsFunction, clsColumns2Function As New RFunction + Private clsBracketsOperator, clsLeftBracketOperator, clsVars2ColumnsFunction, clsVars1ColumnsFunction, clsRightBracketOperator As New ROperator Private Sub dlgHomogenization_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -52,15 +52,16 @@ Public Class dlgHomogenization 'ucrSelectorStationFile.SetParameterIsrfunction() ucrSelectorDataFiles.SetParameter(New RParameter("csvfile", 0)) - ucrSelectorDataFiles.SetParameterIsrfunction() + 'ucrSelectorDataFiles.SetParameterIsrfunction() - ucrReceiverStationFile.SetParameter(New RParameter("datacol", 2)) - ucrReceiverStationFile.Selector = ucrSelectorStationFile - - ucrReceiverDataFiles.SetParameter(New RParameter("stncol", 3)) + ucrReceiverDataFiles.SetParameter(New RParameter("datacol", 2)) ucrReceiverDataFiles.Selector = ucrSelectorDataFiles ucrReceiverDataFiles.SetParameterIsString() + ucrReceiverStationFile.SetParameter(New RParameter("stncol", 3)) + ucrReceiverStationFile.Selector = ucrSelectorStationFile + ucrReceiverStationFile.SetParameterIsString() + ucrInputClimateVariables.SetParameter(New RParameter("varcli", 4)) ucrInputClimateVariables.SetLinkedDisplayControl(lblClimaticVariable) @@ -205,17 +206,23 @@ Public Class dlgHomogenization clsGetColumnsFunction = New RFunction clsPmatchFunction = New RFunction clsColumnsFunction = New RFunction + clsPmatch2Function = New RFunction + clsColumns2Function = New RFunction + clsGetStnColumnsFunction = New RFunction clsBracketsOperator = New ROperator clsLeftBracketOperator = New ROperator clsRightBracketOperator = New ROperator clsVars1ColumnsFunction = New ROperator + clsVars2ColumnsFunction = New ROperator ucrSelectorHomogenization.Reset() ucrReceiverElement.SetMeAsReceiver() ucrReceiverDataFiles.SetMeAsReceiver() ucrReceiverStationFile.SetMeAsReceiver() + ucrSelectorDataFiles.Reset() + ucrSelectorStationFile.Reset() 'ucrSaveResult.Reset() 'TODO: Set conditions properly! rdoSnht.Checked = True @@ -281,23 +288,37 @@ Public Class dlgHomogenization clsCsv2climatolFunction.SetRCommand("csv2climatol") clsCsv2climatolFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) clsCsv2climatolFunction.AddParameter("datacol", clsRFunctionParameter:=clsPmatchFunction, iPosition:=1) - clsCsv2climatolFunction.AddParameter("header", "TRUE", iPosition:=2) + clsCsv2climatolFunction.AddParameter("stnfile", clsRFunctionParameter:=ucrSelectorStationFile.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=2) + clsCsv2climatolFunction.AddParameter("stncol", clsRFunctionParameter:=clsPmatch2Function, iPosition:=3) + clsCsv2climatolFunction.AddParameter("header", "TRUE", iPosition:=4) clsGetColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") clsGetColumnsFunction.SetAssignTo("col_data") + clsGetStnColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") + clsGetStnColumnsFunction.SetAssignTo("stn_data") + clsVars1ColumnsFunction.SetOperation("", bBracketsTemp:=False) clsVars1ColumnsFunction.SetAssignTo("var_1") clsColumnsFunction.SetRCommand("colnames") - clsColumnsFunction.AddParameter("data", ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) clsPmatchFunction.SetRCommand("pmatch") - clsPmatchFunction.AddParameter("paste", clsRFunctionParameter:=clsColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) + clsPmatchFunction.AddParameter("elements", clsRFunctionParameter:=clsColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) clsPmatchFunction.AddParameter("duplicates.ok", "TRUE", iPosition:=1) clsPmatchFunction.AddParameter("cols", clsROperatorParameter:=clsVars1ColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) clsPmatchFunction.SetAssignTo("data_file") + clsVars2ColumnsFunction.SetOperation("", bBracketsTemp:=False) + clsVars2ColumnsFunction.SetAssignTo("var_2") + + clsColumns2Function.SetRCommand("colnames") + + clsPmatch2Function.SetRCommand("pmatch") + clsPmatch2Function.AddParameter("stn_data", clsRFunctionParameter:=clsColumns2Function, bIncludeArgumentName:=False, iPosition:=0) + clsPmatch2Function.AddParameter("duplicates.ok", "TRUE", iPosition:=1) + clsPmatch2Function.AddParameter("cols", clsROperatorParameter:=clsVars2ColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) + clsPmatch2Function.SetAssignTo("stns_file") ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) @@ -336,7 +357,9 @@ Public Class dlgHomogenization 'ucrPnlMethods.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) 'ucrPnlOptions.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrPnlOptions.SetRCode(clsDummyFunction, bReset) + If bReset Then + ucrPnlOptions.SetRCode(clsDummyFunction, bReset) + End If 'ucrSaveResult.AddAdditionalRCode(clsCptVarianceFunction, iAdditionalPairNo:=1) 'ucrSaveResult.AddAdditionalRCode(clsCptMeanVarianceFunction, iAdditionalPairNo:=2) @@ -346,18 +369,25 @@ Public Class dlgHomogenization 'ucrSaveResult.SetRCode(clsCptMeanFunction, bReset) ucrReceiverDataFiles.SetRCode(clsGetColumnsFunction, bReset) - 'ucrSelectorDataFiles.SetRCode(clsGetColumnsFunction, bReset) - + 'ucrSelectorDataFiles.SetRCode(clsColumnsFunction, bReset) + ucrReceiverStationFile.SetRCode(clsGetStnColumnsFunction, bReset) + ucrInputClimateVariables.SetRCode(clsCsv2climatolFunction, bReset) + ' ucrSelectorStationFile.SetRCode(clsColumns2Function, bReset) ucrChkPlot.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub Private Sub TestOkEnabled() - If ucrReceiverElement.IsEmpty OrElse Not ucrSaveResult.IsComplete OrElse (ucrInputComboMethod.GetText = "BinSeg" AndAlso ucrInputQ.IsEmpty) OrElse (ucrInputComboPenalty.GetText = "Asymptotic" AndAlso ucrInputPenValue.IsEmpty) OrElse ucrNudMinSegLen.GetText = "" Then - ucrBase.OKEnabled(False) + If rdoSingle.Checked Then + If ucrReceiverElement.IsEmpty OrElse Not ucrSaveResult.IsComplete OrElse (ucrInputComboMethod.GetText = "BinSeg" AndAlso ucrInputQ.IsEmpty) OrElse (ucrInputComboPenalty.GetText = "Asymptotic" AndAlso ucrInputPenValue.IsEmpty) OrElse ucrNudMinSegLen.GetText = "" Then + ucrBase.OKEnabled(False) + Else + ucrBase.OKEnabled(True) + End If Else - ucrBase.OKEnabled(True) + ucrBase.OKEnabled(Not ucrReceiverStationFile.IsEmpty AndAlso Not ucrReceiverDataFiles.IsEmpty) End If + End Sub Private Sub ucrPnlMethods_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethods.ControlValueChanged @@ -441,7 +471,9 @@ Public Class dlgHomogenization TestOkEnabled() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, + ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, + ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, ucrReceiverStationFile.ControlContentsChanged TestOkEnabled() End Sub @@ -479,4 +511,38 @@ Public Class dlgHomogenization clsVars1ColumnsFunction.RemoveParameterByName("cols") End If End Sub + + Private Sub ucrReceiverStationFile_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStationFile.ControlValueChanged + If Not ucrReceiverStationFile.IsEmpty Then + clsVars2ColumnsFunction.AddParameter("cols", ucrReceiverStationFile.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + Else + clsVars2ColumnsFunction.RemoveParameterByName("cols") + End If + End Sub + + Private Sub ucrSelectorDataFiles_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDataFiles.ControlValueChanged + clsColumnsFunction.AddParameter("data", ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + + End Sub + + Private Sub ucrSelectorStationFile_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorStationFile.ControlValueChanged + clsColumns2Function.AddParameter("stndata", ucrSelectorStationFile.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + End Sub + + Private Sub ucrInputClimateVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputClimateVariables.ControlValueChanged + If Not ucrInputClimateVariables.IsEmpty Then + clsCsv2climatolFunction.AddParameter("varcli", Chr(34) & ucrInputClimateVariables.GetText & Chr(34), iPosition:=5) + + Else + clsCsv2climatolFunction.RemoveParameterByName("varcli") + End If + End Sub + 'Private Sub DataFrameParameter() + ' If ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then + ' clsColumnsFunction.AddParameter("data", ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + ' End If + 'End Sub + 'Private Sub ucrSelectorDataFiles_DataFrameChanged() Handles ucrSelectorDataFiles.DataFrameChanged + ' DataFrameParameter() + 'End Sub End Class \ No newline at end of file From cf72f962e35c67e5081e0c6171fdb02aa5de9abe Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 29 Nov 2023 12:44:29 +0300 Subject: [PATCH 03/25] changes to the code --- instat/dlgHomogenization.Designer.vb | 606 +++++++++++++++------------ instat/dlgHomogenization.vb | 109 ++++- 2 files changed, 419 insertions(+), 296 deletions(-) diff --git a/instat/dlgHomogenization.Designer.vb b/instat/dlgHomogenization.Designer.vb index b089421cd22..73a0e57571a 100644 --- a/instat/dlgHomogenization.Designer.vb +++ b/instat/dlgHomogenization.Designer.vb @@ -31,47 +31,51 @@ Partial Class dlgHomogenization Me.rdoBuishand = New System.Windows.Forms.RadioButton() Me.rdoPettitt = New System.Windows.Forms.RadioButton() Me.rdoSnht = New System.Windows.Forms.RadioButton() - Me.ucrPnlMethods = New instat.UcrPanel() Me.grpCptOptions = New System.Windows.Forms.GroupBox() - Me.ucrInputComboMeanVarDistribution = New instat.ucrInputComboBox() - Me.ucrInputComboVarDistribution = New instat.ucrInputComboBox() Me.lblPenaltyValue = New System.Windows.Forms.Label() - Me.ucrInputPenValue = New instat.ucrInputTextBox() Me.lblMinSegLen = New System.Windows.Forms.Label() Me.lblQ = New System.Windows.Forms.Label() Me.lblPenalty = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblDistribution = New System.Windows.Forms.Label() - Me.ucrNudMinSegLen = New instat.ucrNud() - Me.ucrInputQ = New instat.ucrInputTextBox() - Me.ucrInputComboMeanDistribution = New instat.ucrInputComboBox() - Me.ucrInputComboMethod = New instat.ucrInputComboBox() - Me.ucrInputComboPenalty = New instat.ucrInputComboBox() Me.grpOutputOptions = New System.Windows.Forms.GroupBox() - Me.ucrChkPlot = New instat.ucrCheck() - Me.ucrChkSummary = New instat.ucrCheck() Me.ttOptions = New System.Windows.Forms.ToolTip(Me.components) Me.rdoSingle = New System.Windows.Forms.RadioButton() Me.lblNeighbouring = New System.Windows.Forms.Label() - Me.ucrReceiverNeighbour = New instat.ucrReceiverSingle() - Me.ucrPnlOptions = New instat.UcrPanel() - Me.ucrSaveResult = New instat.ucrSave() - Me.ucrReceiverElement = New instat.ucrReceiverSingle() - Me.ucrSelectorHomogenization = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrBase = New instat.ucrButtons() Me.lblStation = New System.Windows.Forms.Label() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.rdoMultiple = New System.Windows.Forms.RadioButton() - Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() Me.grpStationFile = New System.Windows.Forms.GroupBox() - Me.ucrReceiverStationFile = New instat.ucrReceiverMultiple() Me.lblStationFile = New System.Windows.Forms.Label() Me.grpDataFile = New System.Windows.Forms.GroupBox() - Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() Me.lblDataFiles = New System.Windows.Forms.Label() - Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrInputClimateVariables = New instat.ucrInputTextBox() Me.lblClimaticVariable = New System.Windows.Forms.Label() + Me.lblFinalYear = New System.Windows.Forms.Label() + Me.lblInitialYear = New System.Windows.Forms.Label() + Me.ucrInputFinalYear = New instat.ucrInputTextBox() + Me.ucrInputInitialYear = New instat.ucrInputTextBox() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrSelectorHomogenization = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrInputClimateVariables = New instat.ucrInputTextBox() + Me.ucrPnlOptions = New instat.UcrPanel() + Me.ucrSaveResult = New instat.ucrSave() + Me.ucrChkPlot = New instat.ucrCheck() + Me.ucrChkSummary = New instat.ucrCheck() + Me.ucrInputComboMeanVarDistribution = New instat.ucrInputComboBox() + Me.ucrInputComboVarDistribution = New instat.ucrInputComboBox() + Me.ucrInputPenValue = New instat.ucrInputTextBox() + Me.ucrNudMinSegLen = New instat.ucrNud() + Me.ucrInputQ = New instat.ucrInputTextBox() + Me.ucrInputComboMeanDistribution = New instat.ucrInputComboBox() + Me.ucrInputComboMethod = New instat.ucrInputComboBox() + Me.ucrInputComboPenalty = New instat.ucrInputComboBox() + Me.ucrPnlMethods = New instat.UcrPanel() + Me.ucrReceiverElement = New instat.ucrReceiverSingle() + Me.ucrBase = New instat.ucrButtons() + Me.ucrReceiverStationFile = New instat.ucrReceiverMultiple() + Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverNeighbour = New instat.ucrReceiverSingle() + Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() + Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() Me.grpMethods.SuspendLayout() Me.grpCptOptions.SuspendLayout() Me.grpOutputOptions.SuspendLayout() @@ -171,14 +175,6 @@ Partial Class dlgHomogenization Me.rdoSnht.Text = "SNHT" Me.rdoSnht.UseVisualStyleBackColor = True ' - 'ucrPnlMethods - ' - Me.ucrPnlMethods.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMethods.Location = New System.Drawing.Point(6, 17) - Me.ucrPnlMethods.Name = "ucrPnlMethods" - Me.ucrPnlMethods.Size = New System.Drawing.Size(197, 68) - Me.ucrPnlMethods.TabIndex = 0 - ' 'grpCptOptions ' Me.grpCptOptions.Controls.Add(Me.ucrInputComboMeanVarDistribution) @@ -202,28 +198,6 @@ Partial Class dlgHomogenization Me.grpCptOptions.TabStop = False Me.grpCptOptions.Text = "Change Point Options" ' - 'ucrInputComboMeanVarDistribution - ' - Me.ucrInputComboMeanVarDistribution.AddQuotesIfUnrecognised = True - Me.ucrInputComboMeanVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboMeanVarDistribution.GetSetSelectedIndex = -1 - Me.ucrInputComboMeanVarDistribution.IsReadOnly = False - Me.ucrInputComboMeanVarDistribution.Location = New System.Drawing.Point(68, 67) - Me.ucrInputComboMeanVarDistribution.Name = "ucrInputComboMeanVarDistribution" - Me.ucrInputComboMeanVarDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMeanVarDistribution.TabIndex = 14 - ' - 'ucrInputComboVarDistribution - ' - Me.ucrInputComboVarDistribution.AddQuotesIfUnrecognised = True - Me.ucrInputComboVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboVarDistribution.GetSetSelectedIndex = -1 - Me.ucrInputComboVarDistribution.IsReadOnly = False - Me.ucrInputComboVarDistribution.Location = New System.Drawing.Point(68, 67) - Me.ucrInputComboVarDistribution.Name = "ucrInputComboVarDistribution" - Me.ucrInputComboVarDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboVarDistribution.TabIndex = 15 - ' 'lblPenaltyValue ' Me.lblPenaltyValue.AutoSize = True @@ -234,17 +208,6 @@ Partial Class dlgHomogenization Me.lblPenaltyValue.TabIndex = 12 Me.lblPenaltyValue.Text = "Pen.Value:" ' - 'ucrInputPenValue - ' - Me.ucrInputPenValue.AddQuotesIfUnrecognised = True - Me.ucrInputPenValue.AutoSize = True - Me.ucrInputPenValue.IsMultiline = False - Me.ucrInputPenValue.IsReadOnly = False - Me.ucrInputPenValue.Location = New System.Drawing.Point(68, 138) - Me.ucrInputPenValue.Name = "ucrInputPenValue" - Me.ucrInputPenValue.Size = New System.Drawing.Size(55, 21) - Me.ucrInputPenValue.TabIndex = 11 - ' 'lblMinSegLen ' Me.lblMinSegLen.AutoSize = True @@ -295,63 +258,6 @@ Partial Class dlgHomogenization Me.lblDistribution.TabIndex = 6 Me.lblDistribution.Text = "Distribution:" ' - 'ucrNudMinSegLen - ' - Me.ucrNudMinSegLen.AutoSize = True - Me.ucrNudMinSegLen.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinSegLen.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMinSegLen.Location = New System.Drawing.Point(68, 91) - Me.ucrNudMinSegLen.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMinSegLen.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinSegLen.Name = "ucrNudMinSegLen" - Me.ucrNudMinSegLen.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMinSegLen.TabIndex = 4 - Me.ucrNudMinSegLen.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrInputQ - ' - Me.ucrInputQ.AddQuotesIfUnrecognised = True - Me.ucrInputQ.AutoSize = True - Me.ucrInputQ.IsMultiline = False - Me.ucrInputQ.IsReadOnly = False - Me.ucrInputQ.Location = New System.Drawing.Point(68, 114) - Me.ucrInputQ.Name = "ucrInputQ" - Me.ucrInputQ.Size = New System.Drawing.Size(55, 21) - Me.ucrInputQ.TabIndex = 3 - ' - 'ucrInputComboMeanDistribution - ' - Me.ucrInputComboMeanDistribution.AddQuotesIfUnrecognised = True - Me.ucrInputComboMeanDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboMeanDistribution.GetSetSelectedIndex = -1 - Me.ucrInputComboMeanDistribution.IsReadOnly = False - Me.ucrInputComboMeanDistribution.Location = New System.Drawing.Point(68, 67) - Me.ucrInputComboMeanDistribution.Name = "ucrInputComboMeanDistribution" - Me.ucrInputComboMeanDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMeanDistribution.TabIndex = 2 - ' - 'ucrInputComboMethod - ' - Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True - Me.ucrInputComboMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboMethod.GetSetSelectedIndex = -1 - Me.ucrInputComboMethod.IsReadOnly = False - Me.ucrInputComboMethod.Location = New System.Drawing.Point(68, 43) - Me.ucrInputComboMethod.Name = "ucrInputComboMethod" - Me.ucrInputComboMethod.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMethod.TabIndex = 1 - ' - 'ucrInputComboPenalty - ' - Me.ucrInputComboPenalty.AddQuotesIfUnrecognised = True - Me.ucrInputComboPenalty.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboPenalty.GetSetSelectedIndex = -1 - Me.ucrInputComboPenalty.IsReadOnly = False - Me.ucrInputComboPenalty.Location = New System.Drawing.Point(68, 19) - Me.ucrInputComboPenalty.Name = "ucrInputComboPenalty" - Me.ucrInputComboPenalty.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboPenalty.TabIndex = 0 - ' 'grpOutputOptions ' Me.grpOutputOptions.Controls.Add(Me.ucrChkPlot) @@ -364,24 +270,6 @@ Partial Class dlgHomogenization Me.grpOutputOptions.TabStop = False Me.grpOutputOptions.Text = "Output Options" ' - 'ucrChkPlot - ' - Me.ucrChkPlot.AutoSize = True - Me.ucrChkPlot.Checked = False - Me.ucrChkPlot.Location = New System.Drawing.Point(10, 19) - Me.ucrChkPlot.Name = "ucrChkPlot" - Me.ucrChkPlot.Size = New System.Drawing.Size(100, 23) - Me.ucrChkPlot.TabIndex = 1 - ' - 'ucrChkSummary - ' - Me.ucrChkSummary.AutoSize = True - Me.ucrChkSummary.Checked = False - Me.ucrChkSummary.Location = New System.Drawing.Point(110, 19) - Me.ucrChkSummary.Name = "ucrChkSummary" - Me.ucrChkSummary.Size = New System.Drawing.Size(93, 23) - Me.ucrChkSummary.TabIndex = 0 - ' 'rdoSingle ' Me.rdoSingle.Appearance = System.Windows.Forms.Appearance.Button @@ -411,71 +299,6 @@ Partial Class dlgHomogenization Me.lblNeighbouring.TabIndex = 9 Me.lblNeighbouring.Text = "Neighbour:" ' - 'ucrReceiverNeighbour - ' - Me.ucrReceiverNeighbour.AutoSize = True - Me.ucrReceiverNeighbour.frmParent = Me - Me.ucrReceiverNeighbour.Location = New System.Drawing.Point(266, 206) - Me.ucrReceiverNeighbour.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverNeighbour.Name = "ucrReceiverNeighbour" - Me.ucrReceiverNeighbour.Selector = Nothing - Me.ucrReceiverNeighbour.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverNeighbour.strNcFilePath = "" - Me.ucrReceiverNeighbour.TabIndex = 10 - Me.ucrReceiverNeighbour.ucrSelector = Nothing - ' - 'ucrPnlOptions - ' - Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlOptions.Location = New System.Drawing.Point(51, 6) - Me.ucrPnlOptions.Name = "ucrPnlOptions" - Me.ucrPnlOptions.Size = New System.Drawing.Size(321, 30) - Me.ucrPnlOptions.TabIndex = 0 - ' - 'ucrSaveResult - ' - Me.ucrSaveResult.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveResult.Enabled = False - Me.ucrSaveResult.Location = New System.Drawing.Point(12, 493) - Me.ucrSaveResult.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveResult.Name = "ucrSaveResult" - Me.ucrSaveResult.Size = New System.Drawing.Size(320, 24) - Me.ucrSaveResult.TabIndex = 14 - ' - 'ucrReceiverElement - ' - Me.ucrReceiverElement.AutoSize = True - Me.ucrReceiverElement.frmParent = Me - Me.ucrReceiverElement.Location = New System.Drawing.Point(266, 151) - Me.ucrReceiverElement.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverElement.Name = "ucrReceiverElement" - Me.ucrReceiverElement.Selector = Nothing - Me.ucrReceiverElement.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverElement.strNcFilePath = "" - Me.ucrReceiverElement.TabIndex = 8 - Me.ucrReceiverElement.ucrSelector = Nothing - ' - 'ucrSelectorHomogenization - ' - Me.ucrSelectorHomogenization.AutoSize = True - Me.ucrSelectorHomogenization.bDropUnusedFilterLevels = False - Me.ucrSelectorHomogenization.bShowHiddenColumns = False - Me.ucrSelectorHomogenization.bUseCurrentFilter = True - Me.ucrSelectorHomogenization.Location = New System.Drawing.Point(12, 58) - Me.ucrSelectorHomogenization.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorHomogenization.Name = "ucrSelectorHomogenization" - Me.ucrSelectorHomogenization.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorHomogenization.TabIndex = 4 - ' - 'ucrBase - ' - Me.ucrBase.AutoSize = True - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(12, 522) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 15 - ' 'lblStation ' Me.lblStation.AutoSize = True @@ -486,19 +309,6 @@ Partial Class dlgHomogenization Me.lblStation.TabIndex = 5 Me.lblStation.Text = "Station:" ' - 'ucrReceiverStation - ' - Me.ucrReceiverStation.AutoSize = True - Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(266, 96) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 6 - Me.ucrReceiverStation.ucrSelector = Nothing - ' 'rdoMultiple ' Me.rdoMultiple.Appearance = System.Windows.Forms.Appearance.Button @@ -518,18 +328,6 @@ Partial Class dlgHomogenization Me.rdoMultiple.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoMultiple.UseVisualStyleBackColor = False ' - 'ucrSelectorStationFile - ' - Me.ucrSelectorStationFile.AutoSize = True - Me.ucrSelectorStationFile.bDropUnusedFilterLevels = False - Me.ucrSelectorStationFile.bShowHiddenColumns = False - Me.ucrSelectorStationFile.bUseCurrentFilter = True - Me.ucrSelectorStationFile.Location = New System.Drawing.Point(6, 16) - Me.ucrSelectorStationFile.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorStationFile.Name = "ucrSelectorStationFile" - Me.ucrSelectorStationFile.Size = New System.Drawing.Size(213, 185) - Me.ucrSelectorStationFile.TabIndex = 0 - ' 'grpStationFile ' Me.grpStationFile.Controls.Add(Me.ucrReceiverStationFile) @@ -542,20 +340,7 @@ Partial Class dlgHomogenization Me.grpStationFile.TabStop = False Me.grpStationFile.Text = "StationFile" ' - 'ucrReceiverStationFile - ' - Me.ucrReceiverStationFile.AutoSize = True - Me.ucrReceiverStationFile.frmParent = Me - Me.ucrReceiverStationFile.Location = New System.Drawing.Point(265, 38) - Me.ucrReceiverStationFile.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStationFile.Name = "ucrReceiverStationFile" - Me.ucrReceiverStationFile.Selector = Nothing - Me.ucrReceiverStationFile.Size = New System.Drawing.Size(120, 100) - Me.ucrReceiverStationFile.strNcFilePath = "" - Me.ucrReceiverStationFile.TabIndex = 6 - Me.ucrReceiverStationFile.ucrSelector = Nothing - ' - 'lblStationFile + 'lblStationFile ' Me.lblStationFile.AutoSize = True Me.lblStationFile.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -577,10 +362,302 @@ Partial Class dlgHomogenization Me.grpDataFile.TabStop = False Me.grpDataFile.Text = "Data File" ' + 'lblDataFiles + ' + Me.lblDataFiles.AutoSize = True + Me.lblDataFiles.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDataFiles.Location = New System.Drawing.Point(269, 19) + Me.lblDataFiles.Name = "lblDataFiles" + Me.lblDataFiles.Size = New System.Drawing.Size(76, 13) + Me.lblDataFiles.TabIndex = 5 + Me.lblDataFiles.Text = "Data Columns:" + ' + 'lblClimaticVariable + ' + Me.lblClimaticVariable.AutoSize = True + Me.lblClimaticVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblClimaticVariable.Location = New System.Drawing.Point(182, 468) + Me.lblClimaticVariable.Name = "lblClimaticVariable" + Me.lblClimaticVariable.Size = New System.Drawing.Size(87, 13) + Me.lblClimaticVariable.TabIndex = 20 + Me.lblClimaticVariable.Text = "Climatic Variable:" + ' + 'lblFinalYear + ' + Me.lblFinalYear.AutoSize = True + Me.lblFinalYear.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFinalYear.Location = New System.Drawing.Point(15, 488) + Me.lblFinalYear.Name = "lblFinalYear" + Me.lblFinalYear.Size = New System.Drawing.Size(57, 13) + Me.lblFinalYear.TabIndex = 21 + Me.lblFinalYear.Text = "Final Year:" + ' + 'lblInitialYear + ' + Me.lblInitialYear.AutoSize = True + Me.lblInitialYear.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblInitialYear.Location = New System.Drawing.Point(15, 465) + Me.lblInitialYear.Name = "lblInitialYear" + Me.lblInitialYear.Size = New System.Drawing.Size(59, 13) + Me.lblInitialYear.TabIndex = 22 + Me.lblInitialYear.Text = "Initial Year:" + ' + 'ucrInputFinalYear + ' + Me.ucrInputFinalYear.AddQuotesIfUnrecognised = True + Me.ucrInputFinalYear.AutoSize = True + Me.ucrInputFinalYear.IsMultiline = False + Me.ucrInputFinalYear.IsReadOnly = False + Me.ucrInputFinalYear.Location = New System.Drawing.Point(77, 484) + Me.ucrInputFinalYear.Name = "ucrInputFinalYear" + Me.ucrInputFinalYear.Size = New System.Drawing.Size(89, 21) + Me.ucrInputFinalYear.TabIndex = 24 + ' + 'ucrInputInitialYear + ' + Me.ucrInputInitialYear.AddQuotesIfUnrecognised = True + Me.ucrInputInitialYear.AutoSize = True + Me.ucrInputInitialYear.IsMultiline = False + Me.ucrInputInitialYear.IsReadOnly = False + Me.ucrInputInitialYear.Location = New System.Drawing.Point(77, 461) + Me.ucrInputInitialYear.Name = "ucrInputInitialYear" + Me.ucrInputInitialYear.Size = New System.Drawing.Size(89, 21) + Me.ucrInputInitialYear.TabIndex = 23 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(266, 96) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 6 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrSelectorHomogenization + ' + Me.ucrSelectorHomogenization.AutoSize = True + Me.ucrSelectorHomogenization.bDropUnusedFilterLevels = False + Me.ucrSelectorHomogenization.bShowHiddenColumns = False + Me.ucrSelectorHomogenization.bUseCurrentFilter = True + Me.ucrSelectorHomogenization.Location = New System.Drawing.Point(12, 58) + Me.ucrSelectorHomogenization.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorHomogenization.Name = "ucrSelectorHomogenization" + Me.ucrSelectorHomogenization.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorHomogenization.TabIndex = 4 + ' + 'ucrInputClimateVariables + ' + Me.ucrInputClimateVariables.AddQuotesIfUnrecognised = True + Me.ucrInputClimateVariables.AutoSize = True + Me.ucrInputClimateVariables.IsMultiline = False + Me.ucrInputClimateVariables.IsReadOnly = False + Me.ucrInputClimateVariables.Location = New System.Drawing.Point(272, 464) + Me.ucrInputClimateVariables.Name = "ucrInputClimateVariables" + Me.ucrInputClimateVariables.Size = New System.Drawing.Size(137, 21) + Me.ucrInputClimateVariables.TabIndex = 19 + ' + 'ucrPnlOptions + ' + Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlOptions.Location = New System.Drawing.Point(51, 6) + Me.ucrPnlOptions.Name = "ucrPnlOptions" + Me.ucrPnlOptions.Size = New System.Drawing.Size(321, 30) + Me.ucrPnlOptions.TabIndex = 0 + ' + 'ucrSaveResult + ' + Me.ucrSaveResult.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveResult.Enabled = False + Me.ucrSaveResult.Location = New System.Drawing.Point(12, 426) + Me.ucrSaveResult.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveResult.Name = "ucrSaveResult" + Me.ucrSaveResult.Size = New System.Drawing.Size(320, 24) + Me.ucrSaveResult.TabIndex = 14 + ' + 'ucrChkPlot + ' + Me.ucrChkPlot.AutoSize = True + Me.ucrChkPlot.Checked = False + Me.ucrChkPlot.Location = New System.Drawing.Point(10, 19) + Me.ucrChkPlot.Name = "ucrChkPlot" + Me.ucrChkPlot.Size = New System.Drawing.Size(100, 23) + Me.ucrChkPlot.TabIndex = 1 + ' + 'ucrChkSummary + ' + Me.ucrChkSummary.AutoSize = True + Me.ucrChkSummary.Checked = False + Me.ucrChkSummary.Location = New System.Drawing.Point(110, 19) + Me.ucrChkSummary.Name = "ucrChkSummary" + Me.ucrChkSummary.Size = New System.Drawing.Size(93, 23) + Me.ucrChkSummary.TabIndex = 0 + ' + 'ucrInputComboMeanVarDistribution + ' + Me.ucrInputComboMeanVarDistribution.AddQuotesIfUnrecognised = True + Me.ucrInputComboMeanVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboMeanVarDistribution.GetSetSelectedIndex = -1 + Me.ucrInputComboMeanVarDistribution.IsReadOnly = False + Me.ucrInputComboMeanVarDistribution.Location = New System.Drawing.Point(68, 67) + Me.ucrInputComboMeanVarDistribution.Name = "ucrInputComboMeanVarDistribution" + Me.ucrInputComboMeanVarDistribution.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboMeanVarDistribution.TabIndex = 14 + ' + 'ucrInputComboVarDistribution + ' + Me.ucrInputComboVarDistribution.AddQuotesIfUnrecognised = True + Me.ucrInputComboVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboVarDistribution.GetSetSelectedIndex = -1 + Me.ucrInputComboVarDistribution.IsReadOnly = False + Me.ucrInputComboVarDistribution.Location = New System.Drawing.Point(68, 67) + Me.ucrInputComboVarDistribution.Name = "ucrInputComboVarDistribution" + Me.ucrInputComboVarDistribution.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboVarDistribution.TabIndex = 15 + ' + 'ucrInputPenValue + ' + Me.ucrInputPenValue.AddQuotesIfUnrecognised = True + Me.ucrInputPenValue.AutoSize = True + Me.ucrInputPenValue.IsMultiline = False + Me.ucrInputPenValue.IsReadOnly = False + Me.ucrInputPenValue.Location = New System.Drawing.Point(68, 138) + Me.ucrInputPenValue.Name = "ucrInputPenValue" + Me.ucrInputPenValue.Size = New System.Drawing.Size(55, 21) + Me.ucrInputPenValue.TabIndex = 11 + ' + 'ucrNudMinSegLen + ' + Me.ucrNudMinSegLen.AutoSize = True + Me.ucrNudMinSegLen.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMinSegLen.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMinSegLen.Location = New System.Drawing.Point(68, 91) + Me.ucrNudMinSegLen.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMinSegLen.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMinSegLen.Name = "ucrNudMinSegLen" + Me.ucrNudMinSegLen.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMinSegLen.TabIndex = 4 + Me.ucrNudMinSegLen.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputQ + ' + Me.ucrInputQ.AddQuotesIfUnrecognised = True + Me.ucrInputQ.AutoSize = True + Me.ucrInputQ.IsMultiline = False + Me.ucrInputQ.IsReadOnly = False + Me.ucrInputQ.Location = New System.Drawing.Point(68, 114) + Me.ucrInputQ.Name = "ucrInputQ" + Me.ucrInputQ.Size = New System.Drawing.Size(55, 21) + Me.ucrInputQ.TabIndex = 3 + ' + 'ucrInputComboMeanDistribution + ' + Me.ucrInputComboMeanDistribution.AddQuotesIfUnrecognised = True + Me.ucrInputComboMeanDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboMeanDistribution.GetSetSelectedIndex = -1 + Me.ucrInputComboMeanDistribution.IsReadOnly = False + Me.ucrInputComboMeanDistribution.Location = New System.Drawing.Point(68, 67) + Me.ucrInputComboMeanDistribution.Name = "ucrInputComboMeanDistribution" + Me.ucrInputComboMeanDistribution.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboMeanDistribution.TabIndex = 2 + ' + 'ucrInputComboMethod + ' + Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboMethod.GetSetSelectedIndex = -1 + Me.ucrInputComboMethod.IsReadOnly = False + Me.ucrInputComboMethod.Location = New System.Drawing.Point(68, 43) + Me.ucrInputComboMethod.Name = "ucrInputComboMethod" + Me.ucrInputComboMethod.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboMethod.TabIndex = 1 + ' + 'ucrInputComboPenalty + ' + Me.ucrInputComboPenalty.AddQuotesIfUnrecognised = True + Me.ucrInputComboPenalty.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboPenalty.GetSetSelectedIndex = -1 + Me.ucrInputComboPenalty.IsReadOnly = False + Me.ucrInputComboPenalty.Location = New System.Drawing.Point(68, 19) + Me.ucrInputComboPenalty.Name = "ucrInputComboPenalty" + Me.ucrInputComboPenalty.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboPenalty.TabIndex = 0 + ' + 'ucrPnlMethods + ' + Me.ucrPnlMethods.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMethods.Location = New System.Drawing.Point(6, 17) + Me.ucrPnlMethods.Name = "ucrPnlMethods" + Me.ucrPnlMethods.Size = New System.Drawing.Size(197, 68) + Me.ucrPnlMethods.TabIndex = 0 + ' + 'ucrReceiverElement + ' + Me.ucrReceiverElement.AutoSize = True + Me.ucrReceiverElement.frmParent = Me + Me.ucrReceiverElement.Location = New System.Drawing.Point(266, 151) + Me.ucrReceiverElement.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverElement.Name = "ucrReceiverElement" + Me.ucrReceiverElement.Selector = Nothing + Me.ucrReceiverElement.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverElement.strNcFilePath = "" + Me.ucrReceiverElement.TabIndex = 8 + Me.ucrReceiverElement.ucrSelector = Nothing + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(12, 515) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 15 + ' + 'ucrReceiverStationFile + ' + Me.ucrReceiverStationFile.AutoSize = True + Me.ucrReceiverStationFile.frmParent = Nothing + Me.ucrReceiverStationFile.Location = New System.Drawing.Point(265, 38) + Me.ucrReceiverStationFile.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationFile.Name = "ucrReceiverStationFile" + Me.ucrReceiverStationFile.Selector = Nothing + Me.ucrReceiverStationFile.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverStationFile.strNcFilePath = "" + Me.ucrReceiverStationFile.TabIndex = 6 + Me.ucrReceiverStationFile.ucrSelector = Nothing + ' + 'ucrSelectorStationFile + ' + Me.ucrSelectorStationFile.AutoSize = True + Me.ucrSelectorStationFile.bDropUnusedFilterLevels = False + Me.ucrSelectorStationFile.bShowHiddenColumns = False + Me.ucrSelectorStationFile.bUseCurrentFilter = True + Me.ucrSelectorStationFile.Location = New System.Drawing.Point(6, 16) + Me.ucrSelectorStationFile.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorStationFile.Name = "ucrSelectorStationFile" + Me.ucrSelectorStationFile.Size = New System.Drawing.Size(213, 185) + Me.ucrSelectorStationFile.TabIndex = 0 + ' + 'ucrReceiverNeighbour + ' + Me.ucrReceiverNeighbour.AutoSize = True + Me.ucrReceiverNeighbour.frmParent = Me + Me.ucrReceiverNeighbour.Location = New System.Drawing.Point(266, 206) + Me.ucrReceiverNeighbour.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverNeighbour.Name = "ucrReceiverNeighbour" + Me.ucrReceiverNeighbour.Selector = Nothing + Me.ucrReceiverNeighbour.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverNeighbour.strNcFilePath = "" + Me.ucrReceiverNeighbour.TabIndex = 10 + Me.ucrReceiverNeighbour.ucrSelector = Nothing + ' 'ucrReceiverDataFiles ' Me.ucrReceiverDataFiles.AutoSize = True - Me.ucrReceiverDataFiles.frmParent = Me + Me.ucrReceiverDataFiles.frmParent = Nothing Me.ucrReceiverDataFiles.Location = New System.Drawing.Point(265, 38) Me.ucrReceiverDataFiles.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDataFiles.Name = "ucrReceiverDataFiles" @@ -590,16 +667,6 @@ Partial Class dlgHomogenization Me.ucrReceiverDataFiles.TabIndex = 6 Me.ucrReceiverDataFiles.ucrSelector = Nothing ' - 'lblDataFiles - ' - Me.lblDataFiles.AutoSize = True - Me.lblDataFiles.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDataFiles.Location = New System.Drawing.Point(269, 19) - Me.lblDataFiles.Name = "lblDataFiles" - Me.lblDataFiles.Size = New System.Drawing.Size(57, 13) - Me.lblDataFiles.TabIndex = 5 - Me.lblDataFiles.Text = "Data Files:" - ' 'ucrSelectorDataFiles ' Me.ucrSelectorDataFiles.AutoSize = True @@ -612,33 +679,16 @@ Partial Class dlgHomogenization Me.ucrSelectorDataFiles.Size = New System.Drawing.Size(213, 185) Me.ucrSelectorDataFiles.TabIndex = 0 ' - 'ucrInputClimateVariables - ' - Me.ucrInputClimateVariables.AddQuotesIfUnrecognised = True - Me.ucrInputClimateVariables.AutoSize = True - Me.ucrInputClimateVariables.IsMultiline = False - Me.ucrInputClimateVariables.IsReadOnly = False - Me.ucrInputClimateVariables.Location = New System.Drawing.Point(272, 464) - Me.ucrInputClimateVariables.Name = "ucrInputClimateVariables" - Me.ucrInputClimateVariables.Size = New System.Drawing.Size(137, 21) - Me.ucrInputClimateVariables.TabIndex = 19 - ' - 'lblClimaticVariable - ' - Me.lblClimaticVariable.AutoSize = True - Me.lblClimaticVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblClimaticVariable.Location = New System.Drawing.Point(182, 468) - Me.lblClimaticVariable.Name = "lblClimaticVariable" - Me.lblClimaticVariable.Size = New System.Drawing.Size(87, 13) - Me.lblClimaticVariable.TabIndex = 20 - Me.lblClimaticVariable.Text = "Climatic Variable:" - ' 'dlgHomogenization ' 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(422, 579) + Me.ClientSize = New System.Drawing.Size(422, 570) + Me.Controls.Add(Me.ucrInputFinalYear) + Me.Controls.Add(Me.ucrInputInitialYear) + Me.Controls.Add(Me.lblInitialYear) + Me.Controls.Add(Me.lblFinalYear) Me.Controls.Add(Me.ucrReceiverStation) Me.Controls.Add(Me.ucrSelectorHomogenization) Me.Controls.Add(Me.lblClimaticVariable) @@ -728,4 +778,8 @@ Partial Class dlgHomogenization Friend WithEvents ucrReceiverStationFile As ucrReceiverMultiple Friend WithEvents lblStationFile As Label Friend WithEvents ucrSelectorStationFile As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrInputFinalYear As ucrInputTextBox + Friend WithEvents ucrInputInitialYear As ucrInputTextBox + Friend WithEvents lblInitialYear As Label + Friend WithEvents lblFinalYear As Label End Class diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 3457bb9558a..bce239a1415 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -20,7 +20,7 @@ Public Class dlgHomogenization Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private clsCptMeanFunction, clsCptVarianceFunction, clsCptMeanVarianceFunction, clsExcludeNAFunction, clsPlotFunction, clsSummaryFunction, clsSnhtFunction, - clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsDummyFunction, clsCsv2climatolFunction, + clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsDummyFunction, clsCsv2climatolFunction, clsHomogenQCFunctin, clsDdm2Function, clsHomogenFunction, clsGetColumnsFunction, clsGetStnColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsPmatch2Function, clsColumnsFunction, clsColumns2Function As New RFunction Private clsBracketsOperator, clsLeftBracketOperator, clsVars2ColumnsFunction, clsVars1ColumnsFunction, clsRightBracketOperator As New ROperator Private Sub dlgHomogenization_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -33,6 +33,7 @@ Public Class dlgHomogenization SetDefaults() End If SetRCodeForControls(bReset) + DialogSize() bReset = False TestOkEnabled() autoTranslate(Me) @@ -49,10 +50,10 @@ Public Class dlgHomogenization ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False ucrSelectorStationFile.SetParameter(New RParameter("stnfile", 1)) - 'ucrSelectorStationFile.SetParameterIsrfunction() + ucrSelectorStationFile.SetParameterIsrfunction() ucrSelectorDataFiles.SetParameter(New RParameter("csvfile", 0)) - 'ucrSelectorDataFiles.SetParameterIsrfunction() + ucrSelectorDataFiles.SetParameterIsrfunction() ucrReceiverDataFiles.SetParameter(New RParameter("datacol", 2)) ucrReceiverDataFiles.Selector = ucrSelectorDataFiles @@ -66,6 +67,14 @@ Public Class dlgHomogenization ucrInputClimateVariables.SetParameter(New RParameter("varcli", 4)) ucrInputClimateVariables.SetLinkedDisplayControl(lblClimaticVariable) + ucrInputInitialYear.SetParameter(New RParameter("anyi", 1)) + ucrInputInitialYear.SetValidationTypeAsNumeric() + ucrInputInitialYear.SetLinkedDisplayControl(lblInitialYear) + + ucrInputFinalYear.SetParameter(New RParameter("anyf", 2)) + ucrInputFinalYear.SetValidationTypeAsNumeric() + ucrInputFinalYear.SetLinkedDisplayControl(lblFinalYear) + ucrReceiverStation.SetParameter(New RParameter("station", 0)) ucrReceiverStation.Selector = ucrSelectorHomogenization ucrReceiverStation.SetParameterIsRFunction() @@ -173,8 +182,8 @@ Public Class dlgHomogenization 'ucrSaveResult.SetIsComboBox() 'ucrSaveResult.SetPrefix("Test") 'ucrSaveResult.SetAssignToIfUncheckedValue("last_model") - ucrPnlOptions.AddToLinkedControls({ucrSelectorHomogenization, ucrReceiverNeighbour, ucrReceiverStation, ucrReceiverElement}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOptions.AddToLinkedControls(ucrInputClimateVariables, {rdoMultiple}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrSelectorHomogenization, ucrSaveResult, ucrReceiverNeighbour, ucrReceiverStation, ucrReceiverElement}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrInputClimateVariables, ucrInputInitialYear, ucrInputFinalYear}, {rdoMultiple}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboPenalty.AddToLinkedControls(ucrInputPenValue, {"Asymptotic", "CROPS"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrInputComboMethod.AddToLinkedControls(ucrInputQ, {"SegNeigh", "BinSeg"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=5) ucrPnlMethods.AddToLinkedControls(ucrInputComboMeanDistribution, {rdoCptMean}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -209,6 +218,9 @@ Public Class dlgHomogenization clsPmatch2Function = New RFunction clsColumns2Function = New RFunction clsGetStnColumnsFunction = New RFunction + clsHomogenQCFunctin = New RFunction + clsDdm2Function = New RFunction + clsHomogenFunction = New RFunction clsBracketsOperator = New ROperator clsLeftBracketOperator = New ROperator @@ -216,7 +228,6 @@ Public Class dlgHomogenization clsVars1ColumnsFunction = New ROperator clsVars2ColumnsFunction = New ROperator - ucrSelectorHomogenization.Reset() ucrReceiverElement.SetMeAsReceiver() ucrReceiverDataFiles.SetMeAsReceiver() @@ -229,7 +240,6 @@ Public Class dlgHomogenization clsDummyFunction.AddParameter("checked", "single", iPosition:=0) - clsCptMeanFunction.SetPackageName("changepoint") clsCptMeanFunction.SetRCommand("cpt.mean") clsCptMeanFunction.AddParameter("Q", 5, iPosition:=5) @@ -286,9 +296,7 @@ Public Class dlgHomogenization clsCsv2climatolFunction.SetPackageName("climatol") clsCsv2climatolFunction.SetRCommand("csv2climatol") - clsCsv2climatolFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) clsCsv2climatolFunction.AddParameter("datacol", clsRFunctionParameter:=clsPmatchFunction, iPosition:=1) - clsCsv2climatolFunction.AddParameter("stnfile", clsRFunctionParameter:=ucrSelectorStationFile.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=2) clsCsv2climatolFunction.AddParameter("stncol", clsRFunctionParameter:=clsPmatch2Function, iPosition:=3) clsCsv2climatolFunction.AddParameter("header", "TRUE", iPosition:=4) @@ -320,6 +328,20 @@ Public Class dlgHomogenization clsPmatch2Function.AddParameter("cols", clsROperatorParameter:=clsVars2ColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) clsPmatch2Function.SetAssignTo("stns_file") + clsHomogenQCFunctin.SetPackageName("climatol") + clsHomogenQCFunctin.SetRCommand("homogen") + clsHomogenQCFunctin.AddParameter("onlyQC", "TRUE", iPosition:=3) + 'clsHomogenQCFunctin.SetAssignTo("QC") + + clsDdm2Function.SetPackageName("climatol") + clsDdm2Function.SetRCommand("dd2m") + clsDdm2Function.AddParameter("valm", 1, iPosition:=3) + + clsHomogenFunction.SetPackageName("climatol") + clsHomogenFunction.SetRCommand("homogen") + clsHomogenFunction.AddParameter("std", 1, iPosition:=3) + clsHomogenFunction.AddParameter("annual", Chr(34) & "total" & Chr(34), iPosition:=4) + ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) AddPlotSummaryParameters() @@ -353,6 +375,7 @@ Public Class dlgHomogenization ucrInputPenValue.AddAdditionalCodeParameterPair(clsCptMeanVarianceFunction, ucrInputPenValue.GetParameter, iAdditionalPairNo:=2) ucrInputPenValue.SetRCode(clsCptMeanFunction, bReset) + 'ucrInputClimateVariables.AddAdditionalCodeParameterPair(clsHomogenQCFunctin, ucrInputClimateVariables.GetParameter, iAdditionalPairNo:=1) ucrReceiverStation.SetRCode(clsLeftBracketOperator, bReset) 'ucrPnlMethods.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) @@ -369,10 +392,12 @@ Public Class dlgHomogenization 'ucrSaveResult.SetRCode(clsCptMeanFunction, bReset) ucrReceiverDataFiles.SetRCode(clsGetColumnsFunction, bReset) - 'ucrSelectorDataFiles.SetRCode(clsColumnsFunction, bReset) + ucrSelectorDataFiles.SetRCode(clsGetColumnsFunction, bReset) ucrReceiverStationFile.SetRCode(clsGetStnColumnsFunction, bReset) ucrInputClimateVariables.SetRCode(clsCsv2climatolFunction, bReset) - ' ucrSelectorStationFile.SetRCode(clsColumns2Function, bReset) + ucrSelectorStationFile.SetRCode(clsGetStnColumnsFunction, bReset) + ucrInputFinalYear.SetRCode(clsHomogenQCFunctin, bReset) + ucrInputInitialYear.SetRCode(clsHomogenQCFunctin, bReset) ucrChkPlot.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub @@ -385,7 +410,7 @@ Public Class dlgHomogenization ucrBase.OKEnabled(True) End If Else - ucrBase.OKEnabled(Not ucrReceiverStationFile.IsEmpty AndAlso Not ucrReceiverDataFiles.IsEmpty) + ucrBase.OKEnabled((Not ucrReceiverStationFile.IsEmpty AndAlso Not ucrReceiverDataFiles.IsEmpty) AndAlso (Not ucrInputClimateVariables.IsEmpty AndAlso Not ucrInputInitialYear.IsEmpty AndAlso Not ucrInputFinalYear.IsEmpty)) End If End Sub @@ -473,19 +498,24 @@ Public Class dlgHomogenization Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, - ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, ucrReceiverStationFile.ControlContentsChanged + ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, + ucrReceiverStationFile.ControlContentsChanged, ucrInputFinalYear.ControlContentsChanged, ucrInputInitialYear.ControlContentsChanged, ucrInputClimateVariables.ControlContentsChanged TestOkEnabled() End Sub Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoSingle.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) - + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsHomogenQCFunctin) + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsDdm2Function) + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsHomogenFunction) Else ucrBase.clsRsyntax.SetBaseRFunction(clsCsv2climatolFunction) - + ucrBase.clsRsyntax.AddToAfterCodes(clsHomogenQCFunctin, 0) + ucrBase.clsRsyntax.AddToAfterCodes(clsDdm2Function, 1) + ucrBase.clsRsyntax.AddToAfterCodes(clsHomogenFunction, 2) End If - + DialogSize() HideShowControls() End Sub Private Sub HideShowControls() @@ -503,6 +533,15 @@ Public Class dlgHomogenization grpOutputOptions.Show() End If End Sub + Private Sub DialogSize() + If rdoMultiple.Checked Then + Me.Size = New Size(438, 609) + Me.ucrBase.Location = New Point(12, 515) + Else + Me.Size = New Size(438, 550) + Me.ucrBase.Location = New Point(12, 460) + End If + End Sub Private Sub ucrReceiverDataFiles_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDataFiles.ControlValueChanged If Not ucrReceiverDataFiles.IsEmpty Then @@ -521,20 +560,50 @@ Public Class dlgHomogenization End Sub Private Sub ucrSelectorDataFiles_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDataFiles.ControlValueChanged - clsColumnsFunction.AddParameter("data", ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) - + clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsCsv2climatolFunction.AddParameter("data", Chr(34) & ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) End Sub Private Sub ucrSelectorStationFile_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorStationFile.ControlValueChanged - clsColumns2Function.AddParameter("stndata", ucrSelectorStationFile.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + clsColumns2Function.AddParameter("stndata", clsRCodeStructureParameter:=ucrSelectorStationFile.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsCsv2climatolFunction.AddParameter("stnfile", Chr(34) & ucrSelectorStationFile.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), iPosition:=2) End Sub Private Sub ucrInputClimateVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputClimateVariables.ControlValueChanged If Not ucrInputClimateVariables.IsEmpty Then clsCsv2climatolFunction.AddParameter("varcli", Chr(34) & ucrInputClimateVariables.GetText & Chr(34), iPosition:=5) - + clsHomogenQCFunctin.AddParameter("par", Chr(34) & ucrInputClimateVariables.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + clsDdm2Function.AddParameter("var", Chr(34) & ucrInputClimateVariables.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + clsHomogenFunction.AddParameter("name", Chr(34) & ucrInputClimateVariables.GetText & "-m" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) Else clsCsv2climatolFunction.RemoveParameterByName("varcli") + clsHomogenQCFunctin.RemoveParameterByName("par") + clsDdm2Function.RemoveParameterByName("var") + clsHomogenFunction.RemoveParameterByName("name") + End If + End Sub + + Private Sub ucrInputFinalYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFinalYear.ControlValueChanged + If Not ucrInputFinalYear.IsEmpty Then + clsHomogenQCFunctin.AddParameter("anyf", ucrInputFinalYear.GetText, iPosition:=2) + clsDdm2Function.AddParameter("initial", ucrInputFinalYear.GetText, bIncludeArgumentName:=False, iPosition:=2) + clsHomogenFunction.AddParameter("in_yr", ucrInputFinalYear.GetText, bIncludeArgumentName:=False, iPosition:=2) + Else + clsHomogenQCFunctin.RemoveParameterByName("anyf") + clsDdm2Function.RemoveParameterByName("par") + clsHomogenFunction.RemoveParameterByName("in_yr") + End If + End Sub + + Private Sub ucrInputInitialYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputInitialYear.ControlValueChanged + If Not ucrInputInitialYear.IsEmpty Then + clsHomogenQCFunctin.AddParameter("anyi", ucrInputInitialYear.GetText, iPosition:=1) + clsDdm2Function.AddParameter("final", ucrInputInitialYear.GetText, bIncludeArgumentName:=False, iPosition:=1) + clsHomogenFunction.AddParameter("final_yr", ucrInputInitialYear.GetText, bIncludeArgumentName:=False, iPosition:=1) + Else + clsHomogenQCFunctin.RemoveParameterByName("anyi") + clsDdm2Function.RemoveParameterByName("final") + clsHomogenFunction.RemoveParameterByName("final_yr") End If End Sub 'Private Sub DataFrameParameter() From c265a44840461c148fb1c48eef8bb58c8e8b91c5 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 29 Nov 2023 12:46:55 +0300 Subject: [PATCH 04/25] changes to the code --- instat/dlgHomogenization.vb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index bce239a1415..c060e619c62 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -63,7 +63,6 @@ Public Class dlgHomogenization ucrReceiverStationFile.Selector = ucrSelectorStationFile ucrReceiverStationFile.SetParameterIsString() - ucrInputClimateVariables.SetParameter(New RParameter("varcli", 4)) ucrInputClimateVariables.SetLinkedDisplayControl(lblClimaticVariable) @@ -331,7 +330,6 @@ Public Class dlgHomogenization clsHomogenQCFunctin.SetPackageName("climatol") clsHomogenQCFunctin.SetRCommand("homogen") clsHomogenQCFunctin.AddParameter("onlyQC", "TRUE", iPosition:=3) - 'clsHomogenQCFunctin.SetAssignTo("QC") clsDdm2Function.SetPackageName("climatol") clsDdm2Function.SetRCommand("dd2m") @@ -375,7 +373,6 @@ Public Class dlgHomogenization ucrInputPenValue.AddAdditionalCodeParameterPair(clsCptMeanVarianceFunction, ucrInputPenValue.GetParameter, iAdditionalPairNo:=2) ucrInputPenValue.SetRCode(clsCptMeanFunction, bReset) - 'ucrInputClimateVariables.AddAdditionalCodeParameterPair(clsHomogenQCFunctin, ucrInputClimateVariables.GetParameter, iAdditionalPairNo:=1) ucrReceiverStation.SetRCode(clsLeftBracketOperator, bReset) 'ucrPnlMethods.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) @@ -518,6 +515,7 @@ Public Class dlgHomogenization DialogSize() HideShowControls() End Sub + Private Sub HideShowControls() If rdoMultiple.Checked Then grpDataFile.Show() @@ -533,6 +531,7 @@ Public Class dlgHomogenization grpOutputOptions.Show() End If End Sub + Private Sub DialogSize() If rdoMultiple.Checked Then Me.Size = New Size(438, 609) @@ -606,12 +605,5 @@ Public Class dlgHomogenization clsHomogenFunction.RemoveParameterByName("final_yr") End If End Sub - 'Private Sub DataFrameParameter() - ' If ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then - ' clsColumnsFunction.AddParameter("data", ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) - ' End If - 'End Sub - 'Private Sub ucrSelectorDataFiles_DataFrameChanged() Handles ucrSelectorDataFiles.DataFrameChanged - ' DataFrameParameter() - 'End Sub + End Class \ No newline at end of file From 17c94f3c17dfa3339e3a1ddb325dc4b6e757e939 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 29 Nov 2023 15:03:23 +0300 Subject: [PATCH 05/25] changes --- instat/dlgHomogenization.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index c060e619c62..dd9c8e67cc9 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -409,7 +409,6 @@ Public Class dlgHomogenization Else ucrBase.OKEnabled((Not ucrReceiverStationFile.IsEmpty AndAlso Not ucrReceiverDataFiles.IsEmpty) AndAlso (Not ucrInputClimateVariables.IsEmpty AndAlso Not ucrInputInitialYear.IsEmpty AndAlso Not ucrInputFinalYear.IsEmpty)) End If - End Sub Private Sub ucrPnlMethods_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethods.ControlValueChanged From c632edc0cb7b345342532e8083d46794bc240954 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 11 Dec 2023 15:46:39 +0300 Subject: [PATCH 06/25] changes to the code --- instat/dlgIDFCurves.Designer.vb | 140 +++++++++++++++++++++++++++++++- instat/dlgIDFCurves.vb | 20 ++++- 2 files changed, 158 insertions(+), 2 deletions(-) diff --git a/instat/dlgIDFCurves.Designer.vb b/instat/dlgIDFCurves.Designer.vb index f9af1238740..03092567cbe 100644 --- a/instat/dlgIDFCurves.Designer.vb +++ b/instat/dlgIDFCurves.Designer.vb @@ -22,13 +22,139 @@ Partial Class dlgIDFCurves 'Do not modify it using the code editor. _ Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtons() + Me.ucrIDFCurvesSelector = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverDateTime = New instat.ucrReceiverSingle() + Me.ucrReceiverPrec = New instat.ucrReceiverSingle() + Me.lblDateTime = New System.Windows.Forms.Label() + Me.lblRain = New System.Windows.Forms.Label() + Me.ucrStationName = New instat.ucrInputTextBox() + Me.lblStationName = New System.Windows.Forms.Label() + Me.UcrNud1 = New instat.ucrNud() + Me.lblMinimumProp = New System.Windows.Forms.Label() Me.SuspendLayout() ' + 'ucrBase + ' + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(6, 298) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'ucrIDFCurvesSelector + ' + Me.ucrIDFCurvesSelector.AutoSize = True + Me.ucrIDFCurvesSelector.bDropUnusedFilterLevels = False + Me.ucrIDFCurvesSelector.bShowHiddenColumns = False + Me.ucrIDFCurvesSelector.bUseCurrentFilter = True + Me.ucrIDFCurvesSelector.Location = New System.Drawing.Point(6, 16) + Me.ucrIDFCurvesSelector.Margin = New System.Windows.Forms.Padding(0) + Me.ucrIDFCurvesSelector.Name = "ucrIDFCurvesSelector" + Me.ucrIDFCurvesSelector.Size = New System.Drawing.Size(213, 183) + Me.ucrIDFCurvesSelector.TabIndex = 1 + ' + 'ucrReceiverDateTime + ' + Me.ucrReceiverDateTime.AutoSize = True + Me.ucrReceiverDateTime.frmParent = Me + Me.ucrReceiverDateTime.Location = New System.Drawing.Point(279, 72) + Me.ucrReceiverDateTime.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDateTime.Name = "ucrReceiverDateTime" + Me.ucrReceiverDateTime.Selector = Nothing + Me.ucrReceiverDateTime.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDateTime.strNcFilePath = "" + Me.ucrReceiverDateTime.TabIndex = 2 + Me.ucrReceiverDateTime.ucrSelector = Nothing + ' + 'ucrReceiverPrec + ' + Me.ucrReceiverPrec.AutoSize = True + Me.ucrReceiverPrec.frmParent = Me + Me.ucrReceiverPrec.Location = New System.Drawing.Point(279, 105) + Me.ucrReceiverPrec.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPrec.Name = "ucrReceiverPrec" + Me.ucrReceiverPrec.Selector = Nothing + Me.ucrReceiverPrec.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverPrec.strNcFilePath = "" + Me.ucrReceiverPrec.TabIndex = 3 + Me.ucrReceiverPrec.ucrSelector = Nothing + ' + 'lblDateTime + ' + Me.lblDateTime.AutoSize = True + Me.lblDateTime.Location = New System.Drawing.Point(276, 52) + Me.lblDateTime.Name = "lblDateTime" + Me.lblDateTime.Size = New System.Drawing.Size(56, 13) + Me.lblDateTime.TabIndex = 4 + Me.lblDateTime.Text = "Date-Time" + ' + 'lblRain + ' + Me.lblRain.AutoSize = True + Me.lblRain.Location = New System.Drawing.Point(285, 92) + Me.lblRain.Name = "lblRain" + Me.lblRain.Size = New System.Drawing.Size(29, 13) + Me.lblRain.TabIndex = 5 + Me.lblRain.Text = "Rain" + ' + 'ucrStationName + ' + Me.ucrStationName.AddQuotesIfUnrecognised = True + Me.ucrStationName.AutoSize = True + Me.ucrStationName.IsMultiline = False + Me.ucrStationName.IsReadOnly = False + Me.ucrStationName.Location = New System.Drawing.Point(279, 152) + Me.ucrStationName.Name = "ucrStationName" + Me.ucrStationName.Size = New System.Drawing.Size(137, 21) + Me.ucrStationName.TabIndex = 6 + ' + 'lblStationName + ' + Me.lblStationName.AutoSize = True + Me.lblStationName.Location = New System.Drawing.Point(281, 135) + Me.lblStationName.Name = "lblStationName" + Me.lblStationName.Size = New System.Drawing.Size(71, 13) + Me.lblStationName.TabIndex = 7 + Me.lblStationName.Text = "Station Name" + ' + 'UcrNud1 + ' + Me.UcrNud1.AutoSize = True + Me.UcrNud1.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNud1.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.UcrNud1.Location = New System.Drawing.Point(365, 191) + Me.UcrNud1.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.UcrNud1.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNud1.Name = "UcrNud1" + Me.UcrNud1.Size = New System.Drawing.Size(50, 20) + Me.UcrNud1.TabIndex = 8 + Me.UcrNud1.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblMinimumProp + ' + Me.lblMinimumProp.AutoSize = True + Me.lblMinimumProp.Location = New System.Drawing.Point(261, 194) + Me.lblMinimumProp.Name = "lblMinimumProp" + Me.lblMinimumProp.Size = New System.Drawing.Size(99, 13) + Me.lblMinimumProp.TabIndex = 9 + Me.lblMinimumProp.Text = "Minimum Proportion" + ' 'dlgIDFCurves ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(487, 450) + Me.ClientSize = New System.Drawing.Size(425, 355) + Me.Controls.Add(Me.lblMinimumProp) + Me.Controls.Add(Me.UcrNud1) + Me.Controls.Add(Me.lblStationName) + Me.Controls.Add(Me.ucrStationName) + Me.Controls.Add(Me.lblRain) + Me.Controls.Add(Me.lblDateTime) + Me.Controls.Add(Me.ucrReceiverPrec) + Me.Controls.Add(Me.ucrReceiverDateTime) + Me.Controls.Add(Me.ucrIDFCurvesSelector) + Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -36,6 +162,18 @@ Partial Class dlgIDFCurves Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "IDF Curves" Me.ResumeLayout(False) + Me.PerformLayout() End Sub + + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrIDFCurvesSelector As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrReceiverDateTime As ucrReceiverSingle + Friend WithEvents lblStationName As Label + Friend WithEvents ucrStationName As ucrInputTextBox + Friend WithEvents lblRain As Label + Friend WithEvents lblDateTime As Label + Friend WithEvents ucrReceiverPrec As ucrReceiverSingle + Friend WithEvents lblMinimumProp As Label + Friend WithEvents UcrNud1 As ucrNud End Class diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index e146ccf6d86..a640110facd 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -1,3 +1,21 @@ -Public Class dlgIDFCurves +' 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 dlgIDFCurves + End Class \ No newline at end of file From 1fa7e5697901e1cecd214890b8533af661fd2aeb Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Tue, 12 Dec 2023 12:43:12 +0300 Subject: [PATCH 07/25] changes to the code --- instat/dlgIDFCurves.vb | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index a640110facd..ef0c4adfc7a 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -16,6 +16,44 @@ Imports instat.Translations Public Class dlgIDFCurves + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private bResetRCode As Boolean = True + Private Sub dlgIDFCurves_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 + TestOKEnabled() + autoTranslate(Me) + End Sub + + Private Sub InitialiseDialog() + + End Sub + + Private Sub SetDefaults() + + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + + End Sub + + Private Sub TestOkEnabled() + + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) + TestOkEnabled() + End Sub End Class \ No newline at end of file From 893502c74d881d8edac84a795cc579b710cf892a Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Tue, 12 Dec 2023 13:14:53 +0300 Subject: [PATCH 08/25] changes to the code --- instat/dlgIDFCurves.Designer.vb | 28 ++++++++++++++-------------- instat/dlgIDFCurves.vb | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/instat/dlgIDFCurves.Designer.vb b/instat/dlgIDFCurves.Designer.vb index 03092567cbe..b100d53baa4 100644 --- a/instat/dlgIDFCurves.Designer.vb +++ b/instat/dlgIDFCurves.Designer.vb @@ -30,7 +30,7 @@ Partial Class dlgIDFCurves Me.lblRain = New System.Windows.Forms.Label() Me.ucrStationName = New instat.ucrInputTextBox() Me.lblStationName = New System.Windows.Forms.Label() - Me.UcrNud1 = New instat.ucrNud() + Me.ucrNudMaxPrec = New instat.ucrNud() Me.lblMinimumProp = New System.Windows.Forms.Label() Me.SuspendLayout() ' @@ -118,18 +118,18 @@ Partial Class dlgIDFCurves Me.lblStationName.TabIndex = 7 Me.lblStationName.Text = "Station Name" ' - 'UcrNud1 + 'ucrNudMaxPrec ' - Me.UcrNud1.AutoSize = True - Me.UcrNud1.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.UcrNud1.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.UcrNud1.Location = New System.Drawing.Point(365, 191) - Me.UcrNud1.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.UcrNud1.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.UcrNud1.Name = "UcrNud1" - Me.UcrNud1.Size = New System.Drawing.Size(50, 20) - Me.UcrNud1.TabIndex = 8 - Me.UcrNud1.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxPrec.AutoSize = True + Me.ucrNudMaxPrec.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxPrec.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaxPrec.Location = New System.Drawing.Point(365, 191) + Me.ucrNudMaxPrec.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaxPrec.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxPrec.Name = "ucrNudMaxPrec" + Me.ucrNudMaxPrec.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMaxPrec.TabIndex = 8 + Me.ucrNudMaxPrec.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblMinimumProp ' @@ -146,7 +146,7 @@ Partial Class dlgIDFCurves Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(425, 355) Me.Controls.Add(Me.lblMinimumProp) - Me.Controls.Add(Me.UcrNud1) + Me.Controls.Add(Me.ucrNudMaxPrec) Me.Controls.Add(Me.lblStationName) Me.Controls.Add(Me.ucrStationName) Me.Controls.Add(Me.lblRain) @@ -175,5 +175,5 @@ Partial Class dlgIDFCurves Friend WithEvents lblDateTime As Label Friend WithEvents ucrReceiverPrec As ucrReceiverSingle Friend WithEvents lblMinimumProp As Label - Friend WithEvents UcrNud1 As ucrNud + Friend WithEvents ucrNudMaxPrec As ucrNud End Class diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index ef0c4adfc7a..30090f2441f 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -19,6 +19,7 @@ Public Class dlgIDFCurves Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private bResetRCode As Boolean = True + Private clsIDFCurvesFunction As New RFunction Private Sub dlgIDFCurves_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -35,11 +36,34 @@ Public Class dlgIDFCurves End Sub Private Sub InitialiseDialog() + ucrIDFCurvesSelector.SetParameter(New RParameter("prdat", 0)) + ucrIDFCurvesSelector.SetParameterIsrfunction() + + ucrReceiverDateTime.SetParameter(New RParameter("clmn", 1)) + ucrReceiverDateTime.Selector = ucrIDFCurvesSelector + + ucrReceiverPrec.SetParameter(New RParameter("clmn", 1)) + ucrReceiverPrec.Selector = ucrIDFCurvesSelector + + ucrStationName.SetParameter(New RParameter("stname", 2)) + + ucrNudMaxPrec.SetParameter(New RParameter("mindpy", 3)) + ucrNudMaxPrec.SetMinMax(0, 1) + ucrNudMaxPrec.Increment = 0.1 End Sub Private Sub SetDefaults() + clsIDFCurvesFunction = New RFunction + + ucrIDFCurvesSelector.Reset() + ucrReceiverDateTime.SetMeAsReceiver() + + clsIDFCurvesFunction.SetPackageName("climatol") + clsIDFCurvesFunction.SetRCommand("IDFcurves") + clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=0) + ucrBase.clsRsyntax.SetBaseRFunction(clsIDFCurvesFunction) End Sub Private Sub SetRCodeForControls(bReset As Boolean) From ad0feb1fec07aed8e6568016f598a6ea55b4e67c Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 13 Dec 2023 09:30:09 +0300 Subject: [PATCH 09/25] changes --- instat/dlgIDFCurves.vb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index 30090f2441f..26087dbb953 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -20,6 +20,7 @@ Public Class dlgIDFCurves Private bReset As Boolean = True Private bResetRCode As Boolean = True Private clsIDFCurvesFunction As New RFunction + Private clsVarsColumnsOperator As ROperator Private Sub dlgIDFCurves_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -55,6 +56,7 @@ Public Class dlgIDFCurves Private Sub SetDefaults() clsIDFCurvesFunction = New RFunction + clsVarsColumnsOperator = New ROperator ucrIDFCurvesSelector.Reset() ucrReceiverDateTime.SetMeAsReceiver() @@ -63,10 +65,15 @@ Public Class dlgIDFCurves clsIDFCurvesFunction.SetRCommand("IDFcurves") clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=0) + clsVarsColumnsOperator.SetOperation("", bBracketsTemp:=False) + clsVarsColumnsOperator.SetAssignTo("var_2") + ucrBase.clsRsyntax.SetBaseRFunction(clsIDFCurvesFunction) End Sub Private Sub SetRCodeForControls(bReset As Boolean) + ucrIDFCurvesSelector.SetRCode(clsIDFCurvesFunction, bReset) + ucrReceiverDateTime.SetRCode(clsIDFCurvesFunction, bReset) End Sub @@ -80,4 +87,19 @@ Public Class dlgIDFCurves TestOkEnabled() End Sub + Private Sub ucrReceiverDateTime_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDateTime.ControlValueChanged + + End Sub + + Private Sub ucrReceiverPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPrec.ControlValueChanged + + End Sub + + Private Sub ucrNudMaxPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaxPrec.ControlValueChanged + + End Sub + + Private Sub ucrStationName_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrStationName.ControlValueChanged + + End Sub End Class \ No newline at end of file From dd0296532edda1407714ccc5bf77da99f287ecf9 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 13 Dec 2023 10:30:06 +0300 Subject: [PATCH 10/25] changes to the code --- instat/dlgIDFCurves.vb | 51 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index 26087dbb953..4b5174f02be 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -19,7 +19,7 @@ Public Class dlgIDFCurves Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private bResetRCode As Boolean = True - Private clsIDFCurvesFunction As New RFunction + Private clsIDFCurvesFunction, clsPmatchFunction, clsGetColumnsFunction, clsColumnsFunction As New RFunction Private clsVarsColumnsOperator As ROperator Private Sub dlgIDFCurves_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -56,24 +56,44 @@ Public Class dlgIDFCurves Private Sub SetDefaults() clsIDFCurvesFunction = New RFunction + clsPmatchFunction = New RFunction + clsGetColumnsFunction = New RFunction + + clsColumnsFunction = New RFunction + clsVarsColumnsOperator = New ROperator ucrIDFCurvesSelector.Reset() ucrReceiverDateTime.SetMeAsReceiver() + clsGetColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") + clsGetColumnsFunction.SetAssignTo("col_data") + clsIDFCurvesFunction.SetPackageName("climatol") clsIDFCurvesFunction.SetRCommand("IDFcurves") - clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=0) + clsIDFCurvesFunction.AddParameter("clmn", clsRFunctionParameter:=clsPmatchFunction, iPosition:=2) + clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=3) clsVarsColumnsOperator.SetOperation("", bBracketsTemp:=False) clsVarsColumnsOperator.SetAssignTo("var_2") + clsColumnsFunction.SetRCommand("colnames") + + + clsPmatchFunction.SetRCommand("pmatch") + clsPmatchFunction.AddParameter("elements", clsRFunctionParameter:=clsColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) + clsPmatchFunction.AddParameter("duplicates.ok", "TRUE", iPosition:=1) + clsPmatchFunction.AddParameter("cols", clsROperatorParameter:=clsVarsColumnsOperator, bIncludeArgumentName:=False, iPosition:=0) + clsPmatchFunction.SetAssignTo("data_file") + ucrBase.clsRsyntax.SetBaseRFunction(clsIDFCurvesFunction) End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrIDFCurvesSelector.SetRCode(clsIDFCurvesFunction, bReset) - ucrReceiverDateTime.SetRCode(clsIDFCurvesFunction, bReset) + ucrIDFCurvesSelector.SetRCode(clsGetColumnsFunction, bReset) + ucrReceiverDateTime.SetRCode(clsGetColumnsFunction, bReset) + ucrNudMaxPrec.SetRCode(clsIDFCurvesFunction, bReset) + ucrStationName.SetRCode(clsIDFCurvesFunction, bReset) End Sub @@ -88,18 +108,35 @@ Public Class dlgIDFCurves End Sub Private Sub ucrReceiverDateTime_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDateTime.ControlValueChanged - + If Not ucrReceiverDateTime.IsEmpty Then + clsVarsColumnsOperator.AddParameter("cols", ucrReceiverDateTime.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + Else + clsVarsColumnsOperator.RemoveParameterByName("cols") + End If End Sub Private Sub ucrReceiverPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPrec.ControlValueChanged - + If Not ucrReceiverPrec.IsEmpty Then + clsVarsColumnsOperator.AddParameter("cols", ucrReceiverPrec.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + Else + clsVarsColumnsOperator.RemoveParameterByName("cols") + End If End Sub Private Sub ucrNudMaxPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaxPrec.ControlValueChanged - + clsIDFCurvesFunction.AddParameter("mindpy", ucrNudMaxPrec.GetText, iPosition:=5) End Sub Private Sub ucrStationName_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrStationName.ControlValueChanged + If Not ucrStationName.IsEmpty Then + clsIDFCurvesFunction.AddParameter("stname", Chr(34) & ucrStationName.GetText & Chr(34), iPosition:=4) + Else + clsIDFCurvesFunction.RemoveParameterByName("stname") + End If + End Sub + Private Sub ucrIDFCurvesSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrIDFCurvesSelector.ControlValueChanged + clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrIDFCurvesSelector.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsIDFCurvesFunction.AddParameter("data", Chr(34) & ucrIDFCurvesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34), bIncludeArgumentName:=False, iPosition:=0) End Sub End Class \ No newline at end of file From 50c44c32c9bb89c16630bb866cec198a1e9ae1cb Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 15 Dec 2023 10:40:40 +0300 Subject: [PATCH 11/25] changes --- instat/dlgIDFCurves.Designer.vb | 12 +++++++ instat/dlgIDFCurves.vb | 57 ++++++++++++++++++++++----------- 2 files changed, 51 insertions(+), 18 deletions(-) diff --git a/instat/dlgIDFCurves.Designer.vb b/instat/dlgIDFCurves.Designer.vb index b100d53baa4..29831b3d60d 100644 --- a/instat/dlgIDFCurves.Designer.vb +++ b/instat/dlgIDFCurves.Designer.vb @@ -32,6 +32,7 @@ Partial Class dlgIDFCurves Me.lblStationName = New System.Windows.Forms.Label() Me.ucrNudMaxPrec = New instat.ucrNud() Me.lblMinimumProp = New System.Windows.Forms.Label() + Me.ucrSave = New instat.ucrSave() Me.SuspendLayout() ' 'ucrBase @@ -140,11 +141,21 @@ Partial Class dlgIDFCurves Me.lblMinimumProp.TabIndex = 9 Me.lblMinimumProp.Text = "Minimum Proportion" ' + 'ucrSave + ' + Me.ucrSave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSave.Location = New System.Drawing.Point(7, 264) + Me.ucrSave.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSave.Name = "ucrSave" + Me.ucrSave.Size = New System.Drawing.Size(401, 24) + Me.ucrSave.TabIndex = 70 + ' 'dlgIDFCurves ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(425, 355) + Me.Controls.Add(Me.ucrSave) Me.Controls.Add(Me.lblMinimumProp) Me.Controls.Add(Me.ucrNudMaxPrec) Me.Controls.Add(Me.lblStationName) @@ -176,4 +187,5 @@ Partial Class dlgIDFCurves Friend WithEvents ucrReceiverPrec As ucrReceiverSingle Friend WithEvents lblMinimumProp As Label Friend WithEvents ucrNudMaxPrec As ucrNud + Friend WithEvents ucrSave As ucrSave End Class diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index 4b5174f02be..08c661f2456 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -20,7 +20,7 @@ Public Class dlgIDFCurves Private bReset As Boolean = True Private bResetRCode As Boolean = True Private clsIDFCurvesFunction, clsPmatchFunction, clsGetColumnsFunction, clsColumnsFunction As New RFunction - Private clsVarsColumnsOperator As ROperator + Private clsVarsColumnsOperator, clsVars1ColumnsOperator As ROperator Private Sub dlgIDFCurves_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -37,6 +37,8 @@ Public Class dlgIDFCurves End Sub Private Sub InitialiseDialog() + ucrBase.clsRsyntax.iCallType = 3 + ucrIDFCurvesSelector.SetParameter(New RParameter("prdat", 0)) ucrIDFCurvesSelector.SetParameterIsrfunction() @@ -49,8 +51,19 @@ Public Class dlgIDFCurves ucrStationName.SetParameter(New RParameter("stname", 2)) ucrNudMaxPrec.SetParameter(New RParameter("mindpy", 3)) - ucrNudMaxPrec.SetMinMax(0, 1) + ucrNudMaxPrec.SetMinMax(0.0, 1.0) ucrNudMaxPrec.Increment = 0.1 + ucrNudMaxPrec.DecimalPlaces = 1 + ucrNudMaxPrec.SetRDefault(0.8) + + + 'ucrSave.SetPrefix("IDF_Curve") + 'ucrSave.SetIsComboBox() + 'ucrSave.SetCheckBoxText("Save Graph") + 'ucrSave.SetSaveTypeAsGraph() + ''ucrSave.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Text) + 'ucrSave.SetDataFrameSelector(ucrIDFCurvesSelector.ucrAvailableDataFrames) + 'ucrSave.SetAssignToIfUncheckedValue("last_summary") End Sub @@ -62,6 +75,7 @@ Public Class dlgIDFCurves clsColumnsFunction = New RFunction clsVarsColumnsOperator = New ROperator + clsVars1ColumnsOperator = New ROperator ucrIDFCurvesSelector.Reset() ucrReceiverDateTime.SetMeAsReceiver() @@ -73,17 +87,26 @@ Public Class dlgIDFCurves clsIDFCurvesFunction.SetRCommand("IDFcurves") clsIDFCurvesFunction.AddParameter("clmn", clsRFunctionParameter:=clsPmatchFunction, iPosition:=2) clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=3) + 'clsIDFCurvesFunction.iCallType = 1 + 'clsIDFCurvesFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", + ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, + ' strRObjectFormatToAssignTo:=RObjectFormat.Text, + ' strRDataFrameNameToAddObjectTo:=ucrIDFCurvesSelector.strCurrentDataFrame, + ' strObjectName:="last_summary") + clsVarsColumnsOperator.SetOperation("", bBracketsTemp:=False) - clsVarsColumnsOperator.SetAssignTo("var_2") + clsVarsColumnsOperator.SetAssignTo("var_1") - clsColumnsFunction.SetRCommand("colnames") + clsVars1ColumnsOperator.SetOperation("", bBracketsTemp:=False) + clsVars1ColumnsOperator.SetAssignTo("var_2") + clsColumnsFunction.SetRCommand("colnames") clsPmatchFunction.SetRCommand("pmatch") clsPmatchFunction.AddParameter("elements", clsRFunctionParameter:=clsColumnsFunction, bIncludeArgumentName:=False, iPosition:=0) clsPmatchFunction.AddParameter("duplicates.ok", "TRUE", iPosition:=1) - clsPmatchFunction.AddParameter("cols", clsROperatorParameter:=clsVarsColumnsOperator, bIncludeArgumentName:=False, iPosition:=0) + clsPmatchFunction.AddParameter("cols", clsROperatorParameter:=clsVars1ColumnsOperator, bIncludeArgumentName:=False, iPosition:=0) clsPmatchFunction.SetAssignTo("data_file") ucrBase.clsRsyntax.SetBaseRFunction(clsIDFCurvesFunction) @@ -91,10 +114,15 @@ Public Class dlgIDFCurves Private Sub SetRCodeForControls(bReset As Boolean) ucrIDFCurvesSelector.SetRCode(clsGetColumnsFunction, bReset) - ucrReceiverDateTime.SetRCode(clsGetColumnsFunction, bReset) + ucrNudMaxPrec.SetRCode(clsIDFCurvesFunction, bReset) ucrStationName.SetRCode(clsIDFCurvesFunction, bReset) + 'ucrSave.SetRCode(clsIDFCurvesFunction, bReset) + If bReset Then + ucrReceiverDateTime.SetRCode(clsGetColumnsFunction, bReset) + ucrReceiverPrec.SetRCode(clsGetColumnsFunction, bReset) + End If End Sub Private Sub TestOkEnabled() @@ -107,19 +135,12 @@ Public Class dlgIDFCurves TestOkEnabled() End Sub - Private Sub ucrReceiverDateTime_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDateTime.ControlValueChanged - If Not ucrReceiverDateTime.IsEmpty Then - clsVarsColumnsOperator.AddParameter("cols", ucrReceiverDateTime.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) - Else - clsVarsColumnsOperator.RemoveParameterByName("cols") - End If - End Sub - Private Sub ucrReceiverPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPrec.ControlValueChanged - If Not ucrReceiverPrec.IsEmpty Then - clsVarsColumnsOperator.AddParameter("cols", ucrReceiverPrec.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) + Private Sub ucrReceiverPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPrec.ControlValueChanged, ucrReceiverDateTime.ControlValueChanged + If Not ucrReceiverPrec.IsEmpty AndAlso Not ucrReceiverDateTime.IsEmpty Then + clsVars1ColumnsOperator.AddParameter("cols", "c(" & ucrReceiverDateTime.GetVariableNames() & ", " & ucrReceiverPrec.GetVariableNames() & ")", iPosition:=0, bIncludeArgumentName:=False) Else - clsVarsColumnsOperator.RemoveParameterByName("cols") + clsVars1ColumnsOperator.RemoveParameterByName("cols") End If End Sub @@ -137,6 +158,6 @@ Public Class dlgIDFCurves Private Sub ucrIDFCurvesSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrIDFCurvesSelector.ControlValueChanged clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrIDFCurvesSelector.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) - clsIDFCurvesFunction.AddParameter("data", Chr(34) & ucrIDFCurvesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + clsIDFCurvesFunction.AddParameter("data", ucrIDFCurvesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) End Sub End Class \ No newline at end of file From 4abdd4eb81ed407a2a62588a3a3417dd1e059699 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Tue, 19 Dec 2023 12:37:14 +0300 Subject: [PATCH 12/25] Adding single receivers --- instat/dlgHomogenization.Designer.vb | 278 +++++++++++++++++++-------- instat/dlgHomogenization.vb | 75 ++++++-- 2 files changed, 255 insertions(+), 98 deletions(-) diff --git a/instat/dlgHomogenization.Designer.vb b/instat/dlgHomogenization.Designer.vb index 73a0e57571a..5ceb228b44c 100644 --- a/instat/dlgHomogenization.Designer.vb +++ b/instat/dlgHomogenization.Designer.vb @@ -45,7 +45,11 @@ Partial Class dlgHomogenization Me.lblStation = New System.Windows.Forms.Label() Me.rdoMultiple = New System.Windows.Forms.RadioButton() Me.grpStationFile = New System.Windows.Forms.GroupBox() - Me.lblStationFile = New System.Windows.Forms.Label() + Me.lblLongtude = New System.Windows.Forms.Label() + Me.lblStationName = New System.Windows.Forms.Label() + Me.lblStationID = New System.Windows.Forms.Label() + Me.lblElavation = New System.Windows.Forms.Label() + Me.lblLatitude = New System.Windows.Forms.Label() Me.grpDataFile = New System.Windows.Forms.GroupBox() Me.lblDataFiles = New System.Windows.Forms.Label() Me.lblClimaticVariable = New System.Windows.Forms.Label() @@ -71,9 +75,13 @@ Partial Class dlgHomogenization Me.ucrPnlMethods = New instat.UcrPanel() Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverStationFile = New instat.ucrReceiverMultiple() - Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverNeighbour = New instat.ucrReceiverSingle() + Me.ucrReceiverElavation = New instat.ucrReceiverSingle() + Me.ucrReceiverStationId = New instat.ucrReceiverSingle() + Me.ucrReceiverStationName = New instat.ucrReceiverSingle() + Me.ucrReceiverLongtitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() Me.grpMethods.SuspendLayout() @@ -90,7 +98,7 @@ Partial Class dlgHomogenization Me.lblElement.Location = New System.Drawing.Point(264, 135) Me.lblElement.Name = "lblElement" Me.lblElement.Size = New System.Drawing.Size(48, 13) - Me.lblElement.TabIndex = 7 + Me.lblElement.TabIndex = 6 Me.lblElement.Text = "Element:" ' 'grpMethods @@ -105,7 +113,7 @@ Partial Class dlgHomogenization Me.grpMethods.Location = New System.Drawing.Point(12, 243) Me.grpMethods.Name = "grpMethods" Me.grpMethods.Size = New System.Drawing.Size(209, 104) - Me.grpMethods.TabIndex = 11 + Me.grpMethods.TabIndex = 10 Me.grpMethods.TabStop = False Me.grpMethods.Text = "Methods" ' @@ -116,7 +124,7 @@ Partial Class dlgHomogenization Me.rdoCptMean.Location = New System.Drawing.Point(87, 23) Me.rdoCptMean.Name = "rdoCptMean" Me.rdoCptMean.Size = New System.Drawing.Size(52, 17) - Me.rdoCptMean.TabIndex = 6 + Me.rdoCptMean.TabIndex = 3 Me.rdoCptMean.Text = "Mean" Me.rdoCptMean.UseVisualStyleBackColor = True ' @@ -127,7 +135,7 @@ Partial Class dlgHomogenization Me.rdoCptMeanVariance.Location = New System.Drawing.Point(87, 69) Me.rdoCptMeanVariance.Name = "rdoCptMeanVariance" Me.rdoCptMeanVariance.Size = New System.Drawing.Size(118, 17) - Me.rdoCptMeanVariance.TabIndex = 5 + Me.rdoCptMeanVariance.TabIndex = 6 Me.rdoCptMeanVariance.Text = "Mean and Variance" Me.rdoCptMeanVariance.UseVisualStyleBackColor = True ' @@ -149,7 +157,7 @@ Partial Class dlgHomogenization Me.rdoBuishand.Location = New System.Drawing.Point(9, 69) Me.rdoBuishand.Name = "rdoBuishand" Me.rdoBuishand.Size = New System.Drawing.Size(69, 17) - Me.rdoBuishand.TabIndex = 16 + Me.rdoBuishand.TabIndex = 5 Me.rdoBuishand.Text = "Buishand" Me.rdoBuishand.UseVisualStyleBackColor = True ' @@ -160,7 +168,7 @@ Partial Class dlgHomogenization Me.rdoPettitt.Location = New System.Drawing.Point(9, 46) Me.rdoPettitt.Name = "rdoPettitt" Me.rdoPettitt.Size = New System.Drawing.Size(52, 17) - Me.rdoPettitt.TabIndex = 15 + Me.rdoPettitt.TabIndex = 2 Me.rdoPettitt.Text = "Pettitt" Me.rdoPettitt.UseVisualStyleBackColor = True ' @@ -171,7 +179,7 @@ Partial Class dlgHomogenization Me.rdoSnht.Location = New System.Drawing.Point(9, 23) Me.rdoSnht.Name = "rdoSnht" Me.rdoSnht.Size = New System.Drawing.Size(55, 17) - Me.rdoSnht.TabIndex = 14 + Me.rdoSnht.TabIndex = 1 Me.rdoSnht.Text = "SNHT" Me.rdoSnht.UseVisualStyleBackColor = True ' @@ -194,7 +202,7 @@ Partial Class dlgHomogenization Me.grpCptOptions.Location = New System.Drawing.Point(227, 243) Me.grpCptOptions.Name = "grpCptOptions" Me.grpCptOptions.Size = New System.Drawing.Size(179, 170) - Me.grpCptOptions.TabIndex = 12 + Me.grpCptOptions.TabIndex = 14 Me.grpCptOptions.TabStop = False Me.grpCptOptions.Text = "Change Point Options" ' @@ -205,7 +213,7 @@ Partial Class dlgHomogenization Me.lblPenaltyValue.Location = New System.Drawing.Point(4, 142) Me.lblPenaltyValue.Name = "lblPenaltyValue" Me.lblPenaltyValue.Size = New System.Drawing.Size(59, 13) - Me.lblPenaltyValue.TabIndex = 12 + Me.lblPenaltyValue.TabIndex = 5 Me.lblPenaltyValue.Text = "Pen.Value:" ' 'lblMinSegLen @@ -215,7 +223,7 @@ Partial Class dlgHomogenization Me.lblMinSegLen.Location = New System.Drawing.Point(4, 95) Me.lblMinSegLen.Name = "lblMinSegLen" Me.lblMinSegLen.Size = New System.Drawing.Size(64, 13) - Me.lblMinSegLen.TabIndex = 10 + Me.lblMinSegLen.TabIndex = 3 Me.lblMinSegLen.Text = "MinSegLen:" ' 'lblQ @@ -225,7 +233,7 @@ Partial Class dlgHomogenization Me.lblQ.Location = New System.Drawing.Point(4, 120) Me.lblQ.Name = "lblQ" Me.lblQ.Size = New System.Drawing.Size(18, 13) - Me.lblQ.TabIndex = 9 + Me.lblQ.TabIndex = 4 Me.lblQ.Text = "Q:" ' 'lblPenalty @@ -235,7 +243,7 @@ Partial Class dlgHomogenization Me.lblPenalty.Location = New System.Drawing.Point(4, 21) Me.lblPenalty.Name = "lblPenalty" Me.lblPenalty.Size = New System.Drawing.Size(45, 13) - Me.lblPenalty.TabIndex = 8 + Me.lblPenalty.TabIndex = 0 Me.lblPenalty.Text = "Penalty:" ' 'lblMethod @@ -245,7 +253,7 @@ Partial Class dlgHomogenization Me.lblMethod.Location = New System.Drawing.Point(4, 44) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(46, 13) - Me.lblMethod.TabIndex = 7 + Me.lblMethod.TabIndex = 1 Me.lblMethod.Text = "Method:" ' 'lblDistribution @@ -255,7 +263,7 @@ Partial Class dlgHomogenization Me.lblDistribution.Location = New System.Drawing.Point(4, 69) Me.lblDistribution.Name = "lblDistribution" Me.lblDistribution.Size = New System.Drawing.Size(62, 13) - Me.lblDistribution.TabIndex = 6 + Me.lblDistribution.TabIndex = 2 Me.lblDistribution.Text = "Distribution:" ' 'grpOutputOptions @@ -266,7 +274,7 @@ Partial Class dlgHomogenization Me.grpOutputOptions.Location = New System.Drawing.Point(12, 353) Me.grpOutputOptions.Name = "grpOutputOptions" Me.grpOutputOptions.Size = New System.Drawing.Size(209, 42) - Me.grpOutputOptions.TabIndex = 13 + Me.grpOutputOptions.TabIndex = 12 Me.grpOutputOptions.TabStop = False Me.grpOutputOptions.Text = "Output Options" ' @@ -296,7 +304,7 @@ Partial Class dlgHomogenization Me.lblNeighbouring.Location = New System.Drawing.Point(264, 190) Me.lblNeighbouring.Name = "lblNeighbouring" Me.lblNeighbouring.Size = New System.Drawing.Size(59, 13) - Me.lblNeighbouring.TabIndex = 9 + Me.lblNeighbouring.TabIndex = 8 Me.lblNeighbouring.Text = "Neighbour:" ' 'lblStation @@ -306,7 +314,7 @@ Partial Class dlgHomogenization Me.lblStation.Location = New System.Drawing.Point(264, 80) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(43, 13) - Me.lblStation.TabIndex = 5 + Me.lblStation.TabIndex = 4 Me.lblStation.Text = "Station:" ' 'rdoMultiple @@ -321,7 +329,7 @@ Partial Class dlgHomogenization Me.rdoMultiple.Location = New System.Drawing.Point(189, 9) Me.rdoMultiple.Name = "rdoMultiple" Me.rdoMultiple.Size = New System.Drawing.Size(101, 28) - Me.rdoMultiple.TabIndex = 16 + Me.rdoMultiple.TabIndex = 2 Me.rdoMultiple.TabStop = True Me.rdoMultiple.Tag = "" Me.rdoMultiple.Text = "Multiple" @@ -330,25 +338,73 @@ Partial Class dlgHomogenization ' 'grpStationFile ' - Me.grpStationFile.Controls.Add(Me.ucrReceiverStationFile) - Me.grpStationFile.Controls.Add(Me.lblStationFile) + Me.grpStationFile.Controls.Add(Me.ucrReceiverElavation) + Me.grpStationFile.Controls.Add(Me.lblLongtude) + Me.grpStationFile.Controls.Add(Me.lblStationName) + Me.grpStationFile.Controls.Add(Me.lblStationID) + Me.grpStationFile.Controls.Add(Me.lblElavation) + Me.grpStationFile.Controls.Add(Me.ucrReceiverStationId) + Me.grpStationFile.Controls.Add(Me.ucrReceiverStationName) + Me.grpStationFile.Controls.Add(Me.ucrReceiverLongtitude) + Me.grpStationFile.Controls.Add(Me.ucrReceiverLatitude) + Me.grpStationFile.Controls.Add(Me.lblLatitude) Me.grpStationFile.Controls.Add(Me.ucrSelectorStationFile) Me.grpStationFile.Location = New System.Drawing.Point(11, 260) Me.grpStationFile.Name = "grpStationFile" Me.grpStationFile.Size = New System.Drawing.Size(397, 201) - Me.grpStationFile.TabIndex = 17 + Me.grpStationFile.TabIndex = 11 Me.grpStationFile.TabStop = False Me.grpStationFile.Text = "StationFile" ' - 'lblStationFile - ' - Me.lblStationFile.AutoSize = True - Me.lblStationFile.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblStationFile.Location = New System.Drawing.Point(269, 19) - Me.lblStationFile.Name = "lblStationFile" - Me.lblStationFile.Size = New System.Drawing.Size(86, 13) - Me.lblStationFile.TabIndex = 5 - Me.lblStationFile.Text = "Station Columns:" + 'lblLongtude + ' + Me.lblLongtude.AutoSize = True + Me.lblLongtude.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLongtude.Location = New System.Drawing.Point(274, 51) + Me.lblLongtude.Name = "lblLongtude" + Me.lblLongtude.Size = New System.Drawing.Size(57, 13) + Me.lblLongtude.TabIndex = 3 + Me.lblLongtude.Text = "Longitude:" + ' + 'lblStationName + ' + Me.lblStationName.AutoSize = True + Me.lblStationName.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblStationName.Location = New System.Drawing.Point(274, 125) + Me.lblStationName.Name = "lblStationName" + Me.lblStationName.Size = New System.Drawing.Size(74, 13) + Me.lblStationName.TabIndex = 7 + Me.lblStationName.Text = "Station Name:" + ' + 'lblStationID + ' + Me.lblStationID.AutoSize = True + Me.lblStationID.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblStationID.Location = New System.Drawing.Point(274, 161) + Me.lblStationID.Name = "lblStationID" + Me.lblStationID.Size = New System.Drawing.Size(55, 13) + Me.lblStationID.TabIndex = 9 + Me.lblStationID.Text = "Station Id:" + ' + 'lblElavation + ' + Me.lblElavation.AutoSize = True + Me.lblElavation.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblElavation.Location = New System.Drawing.Point(274, 90) + Me.lblElavation.Name = "lblElavation" + Me.lblElavation.Size = New System.Drawing.Size(54, 13) + Me.lblElavation.TabIndex = 5 + Me.lblElavation.Text = "Elavation:" + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLatitude.Location = New System.Drawing.Point(274, 10) + Me.lblLatitude.Name = "lblLatitude" + Me.lblLatitude.Size = New System.Drawing.Size(48, 13) + Me.lblLatitude.TabIndex = 1 + Me.lblLatitude.Text = "Latitude:" ' 'grpDataFile ' @@ -358,7 +414,7 @@ Partial Class dlgHomogenization Me.grpDataFile.Location = New System.Drawing.Point(12, 59) Me.grpDataFile.Name = "grpDataFile" Me.grpDataFile.Size = New System.Drawing.Size(397, 201) - Me.grpDataFile.TabIndex = 18 + Me.grpDataFile.TabIndex = 3 Me.grpDataFile.TabStop = False Me.grpDataFile.Text = "Data File" ' @@ -369,7 +425,7 @@ Partial Class dlgHomogenization Me.lblDataFiles.Location = New System.Drawing.Point(269, 19) Me.lblDataFiles.Name = "lblDataFiles" Me.lblDataFiles.Size = New System.Drawing.Size(76, 13) - Me.lblDataFiles.TabIndex = 5 + Me.lblDataFiles.TabIndex = 1 Me.lblDataFiles.Text = "Data Columns:" ' 'lblClimaticVariable @@ -379,7 +435,7 @@ Partial Class dlgHomogenization Me.lblClimaticVariable.Location = New System.Drawing.Point(182, 468) Me.lblClimaticVariable.Name = "lblClimaticVariable" Me.lblClimaticVariable.Size = New System.Drawing.Size(87, 13) - Me.lblClimaticVariable.TabIndex = 20 + Me.lblClimaticVariable.TabIndex = 19 Me.lblClimaticVariable.Text = "Climatic Variable:" ' 'lblFinalYear @@ -389,7 +445,7 @@ Partial Class dlgHomogenization Me.lblFinalYear.Location = New System.Drawing.Point(15, 488) Me.lblFinalYear.Name = "lblFinalYear" Me.lblFinalYear.Size = New System.Drawing.Size(57, 13) - Me.lblFinalYear.TabIndex = 21 + Me.lblFinalYear.TabIndex = 17 Me.lblFinalYear.Text = "Final Year:" ' 'lblInitialYear @@ -399,7 +455,7 @@ Partial Class dlgHomogenization Me.lblInitialYear.Location = New System.Drawing.Point(15, 465) Me.lblInitialYear.Name = "lblInitialYear" Me.lblInitialYear.Size = New System.Drawing.Size(59, 13) - Me.lblInitialYear.TabIndex = 22 + Me.lblInitialYear.TabIndex = 15 Me.lblInitialYear.Text = "Initial Year:" ' 'ucrInputFinalYear @@ -411,7 +467,7 @@ Partial Class dlgHomogenization Me.ucrInputFinalYear.Location = New System.Drawing.Point(77, 484) Me.ucrInputFinalYear.Name = "ucrInputFinalYear" Me.ucrInputFinalYear.Size = New System.Drawing.Size(89, 21) - Me.ucrInputFinalYear.TabIndex = 24 + Me.ucrInputFinalYear.TabIndex = 18 ' 'ucrInputInitialYear ' @@ -422,7 +478,7 @@ Partial Class dlgHomogenization Me.ucrInputInitialYear.Location = New System.Drawing.Point(77, 461) Me.ucrInputInitialYear.Name = "ucrInputInitialYear" Me.ucrInputInitialYear.Size = New System.Drawing.Size(89, 21) - Me.ucrInputInitialYear.TabIndex = 23 + Me.ucrInputInitialYear.TabIndex = 16 ' 'ucrReceiverStation ' @@ -434,7 +490,7 @@ Partial Class dlgHomogenization Me.ucrReceiverStation.Selector = Nothing Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 6 + Me.ucrReceiverStation.TabIndex = 5 Me.ucrReceiverStation.ucrSelector = Nothing ' 'ucrSelectorHomogenization @@ -458,7 +514,7 @@ Partial Class dlgHomogenization Me.ucrInputClimateVariables.Location = New System.Drawing.Point(272, 464) Me.ucrInputClimateVariables.Name = "ucrInputClimateVariables" Me.ucrInputClimateVariables.Size = New System.Drawing.Size(137, 21) - Me.ucrInputClimateVariables.TabIndex = 19 + Me.ucrInputClimateVariables.TabIndex = 20 ' 'ucrPnlOptions ' @@ -476,7 +532,7 @@ Partial Class dlgHomogenization Me.ucrSaveResult.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveResult.Name = "ucrSaveResult" Me.ucrSaveResult.Size = New System.Drawing.Size(320, 24) - Me.ucrSaveResult.TabIndex = 14 + Me.ucrSaveResult.TabIndex = 13 ' 'ucrChkPlot ' @@ -485,7 +541,7 @@ Partial Class dlgHomogenization Me.ucrChkPlot.Location = New System.Drawing.Point(10, 19) Me.ucrChkPlot.Name = "ucrChkPlot" Me.ucrChkPlot.Size = New System.Drawing.Size(100, 23) - Me.ucrChkPlot.TabIndex = 1 + Me.ucrChkPlot.TabIndex = 0 ' 'ucrChkSummary ' @@ -494,7 +550,7 @@ Partial Class dlgHomogenization Me.ucrChkSummary.Location = New System.Drawing.Point(110, 19) Me.ucrChkSummary.Name = "ucrChkSummary" Me.ucrChkSummary.Size = New System.Drawing.Size(93, 23) - Me.ucrChkSummary.TabIndex = 0 + Me.ucrChkSummary.TabIndex = 1 ' 'ucrInputComboMeanVarDistribution ' @@ -505,7 +561,7 @@ Partial Class dlgHomogenization Me.ucrInputComboMeanVarDistribution.Location = New System.Drawing.Point(68, 67) Me.ucrInputComboMeanVarDistribution.Name = "ucrInputComboMeanVarDistribution" Me.ucrInputComboMeanVarDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMeanVarDistribution.TabIndex = 14 + Me.ucrInputComboMeanVarDistribution.TabIndex = 8 ' 'ucrInputComboVarDistribution ' @@ -539,7 +595,7 @@ Partial Class dlgHomogenization Me.ucrNudMinSegLen.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMinSegLen.Name = "ucrNudMinSegLen" Me.ucrNudMinSegLen.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMinSegLen.TabIndex = 4 + Me.ucrNudMinSegLen.TabIndex = 9 Me.ucrNudMinSegLen.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrInputQ @@ -551,7 +607,7 @@ Partial Class dlgHomogenization Me.ucrInputQ.Location = New System.Drawing.Point(68, 114) Me.ucrInputQ.Name = "ucrInputQ" Me.ucrInputQ.Size = New System.Drawing.Size(55, 21) - Me.ucrInputQ.TabIndex = 3 + Me.ucrInputQ.TabIndex = 10 ' 'ucrInputComboMeanDistribution ' @@ -573,7 +629,7 @@ Partial Class dlgHomogenization Me.ucrInputComboMethod.Location = New System.Drawing.Point(68, 43) Me.ucrInputComboMethod.Name = "ucrInputComboMethod" Me.ucrInputComboMethod.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMethod.TabIndex = 1 + Me.ucrInputComboMethod.TabIndex = 7 ' 'ucrInputComboPenalty ' @@ -584,7 +640,7 @@ Partial Class dlgHomogenization Me.ucrInputComboPenalty.Location = New System.Drawing.Point(68, 19) Me.ucrInputComboPenalty.Name = "ucrInputComboPenalty" Me.ucrInputComboPenalty.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboPenalty.TabIndex = 0 + Me.ucrInputComboPenalty.TabIndex = 6 ' 'ucrPnlMethods ' @@ -604,7 +660,7 @@ Partial Class dlgHomogenization Me.ucrReceiverElement.Selector = Nothing Me.ucrReceiverElement.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverElement.strNcFilePath = "" - Me.ucrReceiverElement.TabIndex = 8 + Me.ucrReceiverElement.TabIndex = 7 Me.ucrReceiverElement.ucrSelector = Nothing ' 'ucrBase @@ -614,20 +670,85 @@ Partial Class dlgHomogenization Me.ucrBase.Location = New System.Drawing.Point(12, 515) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 15 + Me.ucrBase.TabIndex = 21 ' - 'ucrReceiverStationFile + 'ucrReceiverNeighbour ' - Me.ucrReceiverStationFile.AutoSize = True - Me.ucrReceiverStationFile.frmParent = Nothing - Me.ucrReceiverStationFile.Location = New System.Drawing.Point(265, 38) - Me.ucrReceiverStationFile.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStationFile.Name = "ucrReceiverStationFile" - Me.ucrReceiverStationFile.Selector = Nothing - Me.ucrReceiverStationFile.Size = New System.Drawing.Size(120, 100) - Me.ucrReceiverStationFile.strNcFilePath = "" - Me.ucrReceiverStationFile.TabIndex = 6 - Me.ucrReceiverStationFile.ucrSelector = Nothing + Me.ucrReceiverNeighbour.AutoSize = True + Me.ucrReceiverNeighbour.frmParent = Me + Me.ucrReceiverNeighbour.Location = New System.Drawing.Point(266, 206) + Me.ucrReceiverNeighbour.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverNeighbour.Name = "ucrReceiverNeighbour" + Me.ucrReceiverNeighbour.Selector = Nothing + Me.ucrReceiverNeighbour.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverNeighbour.strNcFilePath = "" + Me.ucrReceiverNeighbour.TabIndex = 9 + Me.ucrReceiverNeighbour.ucrSelector = Nothing + ' + 'ucrReceiverElavation + ' + Me.ucrReceiverElavation.AutoSize = True + Me.ucrReceiverElavation.frmParent = Nothing + Me.ucrReceiverElavation.Location = New System.Drawing.Point(272, 105) + Me.ucrReceiverElavation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverElavation.Name = "ucrReceiverElavation" + Me.ucrReceiverElavation.Selector = Nothing + Me.ucrReceiverElavation.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverElavation.strNcFilePath = "" + Me.ucrReceiverElavation.TabIndex = 6 + Me.ucrReceiverElavation.ucrSelector = Nothing + ' + 'ucrReceiverStationId + ' + Me.ucrReceiverStationId.AutoSize = True + Me.ucrReceiverStationId.frmParent = Nothing + Me.ucrReceiverStationId.Location = New System.Drawing.Point(272, 175) + Me.ucrReceiverStationId.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationId.Name = "ucrReceiverStationId" + Me.ucrReceiverStationId.Selector = Nothing + Me.ucrReceiverStationId.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStationId.strNcFilePath = "" + Me.ucrReceiverStationId.TabIndex = 10 + Me.ucrReceiverStationId.ucrSelector = Nothing + ' + 'ucrReceiverStationName + ' + Me.ucrReceiverStationName.AutoSize = True + Me.ucrReceiverStationName.frmParent = Nothing + Me.ucrReceiverStationName.Location = New System.Drawing.Point(272, 140) + Me.ucrReceiverStationName.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationName.Name = "ucrReceiverStationName" + Me.ucrReceiverStationName.Selector = Nothing + Me.ucrReceiverStationName.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStationName.strNcFilePath = "" + Me.ucrReceiverStationName.TabIndex = 8 + Me.ucrReceiverStationName.ucrSelector = Nothing + ' + 'ucrReceiverLongtitude + ' + Me.ucrReceiverLongtitude.AutoSize = True + Me.ucrReceiverLongtitude.frmParent = Nothing + Me.ucrReceiverLongtitude.Location = New System.Drawing.Point(272, 68) + Me.ucrReceiverLongtitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongtitude.Name = "ucrReceiverLongtitude" + Me.ucrReceiverLongtitude.Selector = Nothing + Me.ucrReceiverLongtitude.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverLongtitude.strNcFilePath = "" + Me.ucrReceiverLongtitude.TabIndex = 4 + Me.ucrReceiverLongtitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Nothing + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(272, 25) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 2 + Me.ucrReceiverLatitude.ucrSelector = Nothing ' 'ucrSelectorStationFile ' @@ -641,19 +762,6 @@ Partial Class dlgHomogenization Me.ucrSelectorStationFile.Size = New System.Drawing.Size(213, 185) Me.ucrSelectorStationFile.TabIndex = 0 ' - 'ucrReceiverNeighbour - ' - Me.ucrReceiverNeighbour.AutoSize = True - Me.ucrReceiverNeighbour.frmParent = Me - Me.ucrReceiverNeighbour.Location = New System.Drawing.Point(266, 206) - Me.ucrReceiverNeighbour.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverNeighbour.Name = "ucrReceiverNeighbour" - Me.ucrReceiverNeighbour.Selector = Nothing - Me.ucrReceiverNeighbour.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverNeighbour.strNcFilePath = "" - Me.ucrReceiverNeighbour.TabIndex = 10 - Me.ucrReceiverNeighbour.ucrSelector = Nothing - ' 'ucrReceiverDataFiles ' Me.ucrReceiverDataFiles.AutoSize = True @@ -664,7 +772,7 @@ Partial Class dlgHomogenization Me.ucrReceiverDataFiles.Selector = Nothing Me.ucrReceiverDataFiles.Size = New System.Drawing.Size(120, 100) Me.ucrReceiverDataFiles.strNcFilePath = "" - Me.ucrReceiverDataFiles.TabIndex = 6 + Me.ucrReceiverDataFiles.TabIndex = 2 Me.ucrReceiverDataFiles.ucrSelector = Nothing ' 'ucrSelectorDataFiles @@ -685,6 +793,8 @@ Partial Class dlgHomogenization Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(422, 570) + Me.Controls.Add(Me.grpStationFile) + Me.Controls.Add(Me.grpDataFile) Me.Controls.Add(Me.ucrInputFinalYear) Me.Controls.Add(Me.ucrInputInitialYear) Me.Controls.Add(Me.lblInitialYear) @@ -705,9 +815,7 @@ Partial Class dlgHomogenization Me.Controls.Add(Me.lblElement) Me.Controls.Add(Me.ucrReceiverElement) Me.Controls.Add(Me.ucrBase) - Me.Controls.Add(Me.grpStationFile) Me.Controls.Add(Me.ucrReceiverNeighbour) - Me.Controls.Add(Me.grpDataFile) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -775,11 +883,19 @@ Partial Class dlgHomogenization Friend WithEvents lblDataFiles As Label Friend WithEvents ucrSelectorDataFiles As ucrSelectorByDataFrameAddRemove Friend WithEvents grpStationFile As GroupBox - Friend WithEvents ucrReceiverStationFile As ucrReceiverMultiple - Friend WithEvents lblStationFile As Label + Friend WithEvents lblLatitude As Label Friend WithEvents ucrSelectorStationFile As ucrSelectorByDataFrameAddRemove Friend WithEvents ucrInputFinalYear As ucrInputTextBox Friend WithEvents ucrInputInitialYear As ucrInputTextBox Friend WithEvents lblInitialYear As Label Friend WithEvents lblFinalYear As Label + Friend WithEvents ucrReceiverStationId As ucrReceiverSingle + Friend WithEvents ucrReceiverStationName As ucrReceiverSingle + Friend WithEvents ucrReceiverLongtitude As ucrReceiverSingle + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrReceiverElavation As ucrReceiverSingle + Friend WithEvents lblLongtude As Label + Friend WithEvents lblStationName As Label + Friend WithEvents lblStationID As Label + Friend WithEvents lblElavation As Label End Class diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index dd9c8e67cc9..e14a36e7118 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -59,11 +59,29 @@ Public Class dlgHomogenization ucrReceiverDataFiles.Selector = ucrSelectorDataFiles ucrReceiverDataFiles.SetParameterIsString() - ucrReceiverStationFile.SetParameter(New RParameter("stncol", 3)) - ucrReceiverStationFile.Selector = ucrSelectorStationFile - ucrReceiverStationFile.SetParameterIsString() + ucrReceiverLatitude.SetParameter(New RParameter("lat", 3, bNewIncludeArgumentName:=False)) + ucrReceiverLatitude.Selector = ucrSelectorStationFile + ucrReceiverLatitude.SetParameterIsString() + ucrReceiverLatitude.SetLinkedDisplayControl(lblLatitude) + ucrReceiverLatitude.SetMeAsReceiver() - ucrInputClimateVariables.SetParameter(New RParameter("varcli", 4)) + ucrReceiverLongtitude.Selector = ucrSelectorStationFile + ucrReceiverLongtitude.SetParameterIsString() + ucrReceiverLongtitude.SetLinkedDisplayControl(lblLongtude) + + ucrReceiverElavation.Selector = ucrSelectorStationFile + ucrReceiverElavation.SetParameterIsString() + ucrReceiverElavation.SetLinkedDisplayControl(lblElavation) + + ucrReceiverStationName.Selector = ucrSelectorStationFile + ucrReceiverStationName.SetParameterIsString() + ucrReceiverStationName.SetLinkedDisplayControl(lblStationName) + + ucrReceiverStationId.Selector = ucrSelectorStationFile + ucrReceiverStationId.SetParameterIsString() + ucrReceiverStationId.SetLinkedDisplayControl(lblStationID) + + ucrInputClimateVariables.SetParameter(New RParameter("varcli", 8)) ucrInputClimateVariables.SetLinkedDisplayControl(lblClimaticVariable) ucrInputInitialYear.SetParameter(New RParameter("anyi", 1)) @@ -230,7 +248,7 @@ Public Class dlgHomogenization ucrSelectorHomogenization.Reset() ucrReceiverElement.SetMeAsReceiver() ucrReceiverDataFiles.SetMeAsReceiver() - ucrReceiverStationFile.SetMeAsReceiver() + 'ucrReceiverLatitude.SetMeAsReceiver() ucrSelectorDataFiles.Reset() ucrSelectorStationFile.Reset() 'ucrSaveResult.Reset() @@ -390,7 +408,11 @@ Public Class dlgHomogenization 'ucrSaveResult.SetRCode(clsCptMeanFunction, bReset) ucrReceiverDataFiles.SetRCode(clsGetColumnsFunction, bReset) ucrSelectorDataFiles.SetRCode(clsGetColumnsFunction, bReset) - ucrReceiverStationFile.SetRCode(clsGetStnColumnsFunction, bReset) + ucrReceiverLatitude.SetRCode(clsGetColumnsFunction, bReset) + ucrReceiverLongtitude.SetRCode(clsGetColumnsFunction, bReset) + ucrReceiverElavation.SetRCode(clsGetColumnsFunction, bReset) + ucrReceiverStationId.SetRCode(clsGetColumnsFunction, bReset) + ucrReceiverStationName.SetRCode(clsGetColumnsFunction, bReset) ucrInputClimateVariables.SetRCode(clsCsv2climatolFunction, bReset) ucrSelectorStationFile.SetRCode(clsGetStnColumnsFunction, bReset) ucrInputFinalYear.SetRCode(clsHomogenQCFunctin, bReset) @@ -407,7 +429,7 @@ Public Class dlgHomogenization ucrBase.OKEnabled(True) End If Else - ucrBase.OKEnabled((Not ucrReceiverStationFile.IsEmpty AndAlso Not ucrReceiverDataFiles.IsEmpty) AndAlso (Not ucrInputClimateVariables.IsEmpty AndAlso Not ucrInputInitialYear.IsEmpty AndAlso Not ucrInputFinalYear.IsEmpty)) + ucrBase.OKEnabled((Not ucrReceiverLatitude.IsEmpty AndAlso Not ucrReceiverLongtitude.IsEmpty AndAlso (Not ucrReceiverStationName.IsEmpty OrElse Not ucrReceiverStationId.IsEmpty) AndAlso Not ucrReceiverDataFiles.IsEmpty) AndAlso (Not ucrInputClimateVariables.IsEmpty AndAlso Not ucrInputInitialYear.IsEmpty AndAlso Not ucrInputFinalYear.IsEmpty)) End If End Sub @@ -494,8 +516,8 @@ Public Class dlgHomogenization Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, - ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, - ucrReceiverStationFile.ControlContentsChanged, ucrInputFinalYear.ControlContentsChanged, ucrInputInitialYear.ControlContentsChanged, ucrInputClimateVariables.ControlContentsChanged + ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, ucrInputFinalYear.ControlContentsChanged, ucrInputInitialYear.ControlContentsChanged, ucrInputClimateVariables.ControlContentsChanged, + ucrReceiverStationName.ControlContentsChanged, ucrReceiverStationId.ControlContentsChanged, ucrReceiverLongtitude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged TestOkEnabled() End Sub @@ -549,14 +571,6 @@ Public Class dlgHomogenization End If End Sub - Private Sub ucrReceiverStationFile_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStationFile.ControlValueChanged - If Not ucrReceiverStationFile.IsEmpty Then - clsVars2ColumnsFunction.AddParameter("cols", ucrReceiverStationFile.GetVariableNames(True), iPosition:=0, bIncludeArgumentName:=False) - Else - clsVars2ColumnsFunction.RemoveParameterByName("cols") - End If - End Sub - Private Sub ucrSelectorDataFiles_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDataFiles.ControlValueChanged clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) clsCsv2climatolFunction.AddParameter("data", Chr(34) & ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) @@ -605,4 +619,31 @@ Public Class dlgHomogenization End If End Sub + Private Sub ucrReceiverLatitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverLatitude.ControlValueChanged, ucrReceiverElavation.ControlValueChanged, + ucrReceiverLongtitude.ControlValueChanged, ucrReceiverStationId.ControlValueChanged, ucrReceiverStationName.ControlValueChanged + If Not ucrReceiverLatitude.IsEmpty AndAlso Not ucrReceiverLongtitude.IsEmpty Then + Dim lstVariables As List(Of String) = New List(Of String)() + + lstVariables.Add(ucrReceiverLatitude.GetVariableNames()) + lstVariables.Add(ucrReceiverLongtitude.GetVariableNames()) + + If Not ucrReceiverElavation.IsEmpty Then + lstVariables.Add(ucrReceiverElavation.GetVariableNames()) + Else + lstVariables.Add(0) + End If + + If Not ucrReceiverStationName.IsEmpty Then + lstVariables.Add(ucrReceiverStationName.GetVariableNames()) + End If + + If Not ucrReceiverStationId.IsEmpty Then + lstVariables.Add(ucrReceiverStationId.GetVariableNames()) + End If + + clsVars2ColumnsFunction.AddParameter("cols", "c(" & String.Join(", ", lstVariables) & ")", iPosition:=0, bIncludeArgumentName:=False) + Else + clsVars2ColumnsFunction.RemoveParameterByName("cols") + End If + End Sub End Class \ No newline at end of file From 33cc47b2210f57b5e228c9e4317c2e721d2130e3 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 20 Dec 2023 14:43:43 +0300 Subject: [PATCH 13/25] adding buttons --- instat/dlgHomogenization.Designer.vb | 122 +++++++++++++++++++++------ instat/dlgHomogenization.vb | 82 ++++++++++++++---- 2 files changed, 158 insertions(+), 46 deletions(-) diff --git a/instat/dlgHomogenization.Designer.vb b/instat/dlgHomogenization.Designer.vb index 5ceb228b44c..ff4597390d3 100644 --- a/instat/dlgHomogenization.Designer.vb +++ b/instat/dlgHomogenization.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgHomogenization Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,7 +20,7 @@ Partial Class dlgHomogenization '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.components = New System.ComponentModel.Container() Me.lblElement = New System.Windows.Forms.Label() @@ -43,7 +43,7 @@ Partial Class dlgHomogenization Me.rdoSingle = New System.Windows.Forms.RadioButton() Me.lblNeighbouring = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() - Me.rdoMultiple = New System.Windows.Forms.RadioButton() + Me.rdoPrepare = New System.Windows.Forms.RadioButton() Me.grpStationFile = New System.Windows.Forms.GroupBox() Me.lblLongtude = New System.Windows.Forms.Label() Me.lblStationName = New System.Windows.Forms.Label() @@ -84,6 +84,9 @@ Partial Class dlgHomogenization Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() + Me.rdoHomogenization = New System.Windows.Forms.RadioButton() + Me.rdoMonthlyTotals = New System.Windows.Forms.RadioButton() + Me.rdoQualityControl = New System.Windows.Forms.RadioButton() Me.grpMethods.SuspendLayout() Me.grpCptOptions.SuspendLayout() Me.grpOutputOptions.SuspendLayout() @@ -287,9 +290,9 @@ Partial Class dlgHomogenization Me.rdoSingle.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSingle.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSingle.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSingle.Location = New System.Drawing.Point(90, 9) + Me.rdoSingle.Location = New System.Drawing.Point(12, 9) Me.rdoSingle.Name = "rdoSingle" - Me.rdoSingle.Size = New System.Drawing.Size(101, 28) + Me.rdoSingle.Size = New System.Drawing.Size(78, 28) Me.rdoSingle.TabIndex = 1 Me.rdoSingle.TabStop = True Me.rdoSingle.Tag = "" @@ -317,24 +320,24 @@ Partial Class dlgHomogenization Me.lblStation.TabIndex = 4 Me.lblStation.Text = "Station:" ' - 'rdoMultiple - ' - Me.rdoMultiple.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoMultiple.BackColor = System.Drawing.SystemColors.Control - Me.rdoMultiple.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultiple.FlatAppearance.BorderSize = 2 - Me.rdoMultiple.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMultiple.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoMultiple.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultiple.Location = New System.Drawing.Point(189, 9) - Me.rdoMultiple.Name = "rdoMultiple" - Me.rdoMultiple.Size = New System.Drawing.Size(101, 28) - Me.rdoMultiple.TabIndex = 2 - Me.rdoMultiple.TabStop = True - Me.rdoMultiple.Tag = "" - Me.rdoMultiple.Text = "Multiple" - Me.rdoMultiple.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoMultiple.UseVisualStyleBackColor = False + 'rdoPrepare + ' + Me.rdoPrepare.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoPrepare.BackColor = System.Drawing.SystemColors.Control + Me.rdoPrepare.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPrepare.FlatAppearance.BorderSize = 2 + Me.rdoPrepare.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPrepare.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoPrepare.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoPrepare.Location = New System.Drawing.Point(88, 9) + Me.rdoPrepare.Name = "rdoPrepare" + Me.rdoPrepare.Size = New System.Drawing.Size(63, 28) + Me.rdoPrepare.TabIndex = 2 + Me.rdoPrepare.TabStop = True + Me.rdoPrepare.Tag = "" + Me.rdoPrepare.Text = "Prepare" + Me.rdoPrepare.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoPrepare.UseVisualStyleBackColor = False ' 'grpStationFile ' @@ -519,9 +522,9 @@ Partial Class dlgHomogenization 'ucrPnlOptions ' Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlOptions.Location = New System.Drawing.Point(51, 6) + Me.ucrPnlOptions.Location = New System.Drawing.Point(12, 2) Me.ucrPnlOptions.Name = "ucrPnlOptions" - Me.ucrPnlOptions.Size = New System.Drawing.Size(321, 30) + Me.ucrPnlOptions.Size = New System.Drawing.Size(408, 51) Me.ucrPnlOptions.TabIndex = 0 ' 'ucrSaveResult @@ -787,12 +790,72 @@ Partial Class dlgHomogenization Me.ucrSelectorDataFiles.Size = New System.Drawing.Size(213, 185) Me.ucrSelectorDataFiles.TabIndex = 0 ' + 'rdoHomogenization + ' + Me.rdoHomogenization.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoHomogenization.BackColor = System.Drawing.SystemColors.Control + Me.rdoHomogenization.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoHomogenization.FlatAppearance.BorderSize = 2 + Me.rdoHomogenization.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoHomogenization.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoHomogenization.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoHomogenization.Location = New System.Drawing.Point(319, 9) + Me.rdoHomogenization.Name = "rdoHomogenization" + Me.rdoHomogenization.Size = New System.Drawing.Size(101, 28) + Me.rdoHomogenization.TabIndex = 23 + Me.rdoHomogenization.TabStop = True + Me.rdoHomogenization.Tag = "" + Me.rdoHomogenization.Text = "Homogenization" + Me.rdoHomogenization.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoHomogenization.UseVisualStyleBackColor = False + ' + 'rdoMonthlyTotals + ' + Me.rdoMonthlyTotals.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoMonthlyTotals.BackColor = System.Drawing.SystemColors.Control + Me.rdoMonthlyTotals.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMonthlyTotals.FlatAppearance.BorderSize = 2 + Me.rdoMonthlyTotals.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMonthlyTotals.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoMonthlyTotals.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoMonthlyTotals.Location = New System.Drawing.Point(233, 9) + Me.rdoMonthlyTotals.Name = "rdoMonthlyTotals" + Me.rdoMonthlyTotals.Size = New System.Drawing.Size(91, 28) + Me.rdoMonthlyTotals.TabIndex = 24 + Me.rdoMonthlyTotals.TabStop = True + Me.rdoMonthlyTotals.Tag = "" + Me.rdoMonthlyTotals.Text = "Monthly Totals " + Me.rdoMonthlyTotals.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoMonthlyTotals.UseVisualStyleBackColor = False + ' + 'rdoQualityControl + ' + Me.rdoQualityControl.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoQualityControl.BackColor = System.Drawing.SystemColors.Control + Me.rdoQualityControl.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoQualityControl.FlatAppearance.BorderSize = 2 + Me.rdoQualityControl.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoQualityControl.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoQualityControl.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoQualityControl.Location = New System.Drawing.Point(148, 9) + Me.rdoQualityControl.Name = "rdoQualityControl" + Me.rdoQualityControl.Size = New System.Drawing.Size(87, 28) + Me.rdoQualityControl.TabIndex = 25 + Me.rdoQualityControl.TabStop = True + Me.rdoQualityControl.Tag = "" + Me.rdoQualityControl.Text = "Quality Control" + Me.rdoQualityControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoQualityControl.UseVisualStyleBackColor = False + ' 'dlgHomogenization ' 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(422, 570) + Me.Controls.Add(Me.rdoQualityControl) + Me.Controls.Add(Me.rdoMonthlyTotals) + Me.Controls.Add(Me.rdoHomogenization) Me.Controls.Add(Me.grpStationFile) Me.Controls.Add(Me.grpDataFile) Me.Controls.Add(Me.ucrInputFinalYear) @@ -803,7 +866,7 @@ Partial Class dlgHomogenization Me.Controls.Add(Me.ucrSelectorHomogenization) Me.Controls.Add(Me.lblClimaticVariable) Me.Controls.Add(Me.ucrInputClimateVariables) - Me.Controls.Add(Me.rdoMultiple) + Me.Controls.Add(Me.rdoPrepare) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.lblNeighbouring) Me.Controls.Add(Me.rdoSingle) @@ -875,7 +938,7 @@ Partial Class dlgHomogenization Friend WithEvents rdoBuishand As RadioButton Friend WithEvents lblStation As Label Friend WithEvents ucrReceiverStation As ucrReceiverSingle - Friend WithEvents rdoMultiple As RadioButton + Friend WithEvents rdoPrepare As RadioButton Friend WithEvents lblClimaticVariable As Label Friend WithEvents ucrInputClimateVariables As ucrInputTextBox Friend WithEvents grpDataFile As GroupBox @@ -898,4 +961,7 @@ Partial Class dlgHomogenization Friend WithEvents lblStationName As Label Friend WithEvents lblStationID As Label Friend WithEvents lblElavation As Label + Friend WithEvents rdoQualityControl As RadioButton + Friend WithEvents rdoMonthlyTotals As RadioButton + Friend WithEvents rdoHomogenization As RadioButton End Class diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index e14a36e7118..77c81f75c6f 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -23,6 +23,11 @@ Public Class dlgHomogenization clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsDummyFunction, clsCsv2climatolFunction, clsHomogenQCFunctin, clsDdm2Function, clsHomogenFunction, clsGetColumnsFunction, clsGetStnColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsPmatch2Function, clsColumnsFunction, clsColumns2Function As New RFunction Private clsBracketsOperator, clsLeftBracketOperator, clsVars2ColumnsFunction, clsVars1ColumnsFunction, clsRightBracketOperator As New ROperator + + Private Sub ucrPnlOptions_Load(sender As Object, e As EventArgs) Handles ucrPnlOptions.Load + + End Sub + Private Sub dlgHomogenization_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -121,10 +126,18 @@ Public Class dlgHomogenization ttOptions.SetToolTip(rdoBuishand, "Performes the Buishand range test for change-point detection of a normal variate.") ucrPnlOptions.AddRadioButton(rdoSingle) - ucrPnlOptions.AddRadioButton(rdoMultiple) + ucrPnlOptions.AddRadioButton(rdoPrepare) + ucrPnlOptions.AddRadioButton(rdoQualityControl) + ucrPnlOptions.AddRadioButton(rdoMonthlyTotals) + ucrPnlOptions.AddRadioButton(rdoHomogenization) 'ucrPnlOptions.AddFunctionNamesCondition(rdoSingle, {"cpt.mean", "cpt.var", "cpt.meanvar", "snh.test", "pettitt.test", "br.test", "tapply"}) ucrPnlOptions.AddParameterValuesCondition(rdoSingle, "checked", "single") - ucrPnlOptions.AddParameterValuesCondition(rdoMultiple, "checked", "multiple") + ucrPnlOptions.AddParameterValuesCondition(rdoPrepare, "checked", "prepare") + ucrPnlOptions.AddParameterValuesCondition(rdoQualityControl, "checked", "quality") + ucrPnlOptions.AddParameterValuesCondition(rdoMonthlyTotals, "checked", "month_totals") + ucrPnlOptions.AddParameterValuesCondition(rdoHomogenization, "checked", "homogen") + + ucrChkPlot.SetText("Plot") ucrChkPlot.AddRSyntaxContainsFunctionNamesCondition(True, {"plot"}) @@ -200,7 +213,8 @@ Public Class dlgHomogenization 'ucrSaveResult.SetPrefix("Test") 'ucrSaveResult.SetAssignToIfUncheckedValue("last_model") ucrPnlOptions.AddToLinkedControls({ucrSelectorHomogenization, ucrSaveResult, ucrReceiverNeighbour, ucrReceiverStation, ucrReceiverElement}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOptions.AddToLinkedControls({ucrInputClimateVariables, ucrInputInitialYear, ucrInputFinalYear}, {rdoMultiple}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrInputClimateVariables}, {rdoPrepare, rdoQualityControl, rdoHomogenization, rdoMonthlyTotals}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrInputInitialYear, ucrInputFinalYear}, {rdoQualityControl, rdoHomogenization, rdoMonthlyTotals}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboPenalty.AddToLinkedControls(ucrInputPenValue, {"Asymptotic", "CROPS"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrInputComboMethod.AddToLinkedControls(ucrInputQ, {"SegNeigh", "BinSeg"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=5) ucrPnlMethods.AddToLinkedControls(ucrInputComboMeanDistribution, {rdoCptMean}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -248,7 +262,6 @@ Public Class dlgHomogenization ucrSelectorHomogenization.Reset() ucrReceiverElement.SetMeAsReceiver() ucrReceiverDataFiles.SetMeAsReceiver() - 'ucrReceiverLatitude.SetMeAsReceiver() ucrSelectorDataFiles.Reset() ucrSelectorStationFile.Reset() 'ucrSaveResult.Reset() @@ -348,6 +361,7 @@ Public Class dlgHomogenization clsHomogenQCFunctin.SetPackageName("climatol") clsHomogenQCFunctin.SetRCommand("homogen") clsHomogenQCFunctin.AddParameter("onlyQC", "TRUE", iPosition:=3) + clsHomogenQCFunctin.SetAssignTo("QC") clsDdm2Function.SetPackageName("climatol") clsDdm2Function.SetRCommand("dd2m") @@ -415,8 +429,6 @@ Public Class dlgHomogenization ucrReceiverStationName.SetRCode(clsGetColumnsFunction, bReset) ucrInputClimateVariables.SetRCode(clsCsv2climatolFunction, bReset) ucrSelectorStationFile.SetRCode(clsGetStnColumnsFunction, bReset) - ucrInputFinalYear.SetRCode(clsHomogenQCFunctin, bReset) - ucrInputInitialYear.SetRCode(clsHomogenQCFunctin, bReset) ucrChkPlot.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub @@ -428,8 +440,10 @@ Public Class dlgHomogenization Else ucrBase.OKEnabled(True) End If + ElseIf rdoPrepare.Checked Then + ucrBase.OKEnabled((Not ucrReceiverLatitude.IsEmpty AndAlso Not ucrReceiverLongtitude.IsEmpty AndAlso (Not ucrReceiverStationName.IsEmpty OrElse Not ucrReceiverStationId.IsEmpty) AndAlso Not ucrReceiverDataFiles.IsEmpty) AndAlso Not ucrInputClimateVariables.IsEmpty) Else - ucrBase.OKEnabled((Not ucrReceiverLatitude.IsEmpty AndAlso Not ucrReceiverLongtitude.IsEmpty AndAlso (Not ucrReceiverStationName.IsEmpty OrElse Not ucrReceiverStationId.IsEmpty) AndAlso Not ucrReceiverDataFiles.IsEmpty) AndAlso (Not ucrInputClimateVariables.IsEmpty AndAlso Not ucrInputInitialYear.IsEmpty AndAlso Not ucrInputFinalYear.IsEmpty)) + ucrBase.OKEnabled(Not ucrInputClimateVariables.IsEmpty AndAlso Not ucrInputInitialYear.IsEmpty AndAlso Not ucrInputFinalYear.IsEmpty) End If End Sub @@ -527,23 +541,44 @@ Public Class dlgHomogenization ucrBase.clsRsyntax.RemoveFromAfterCodes(clsHomogenQCFunctin) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsDdm2Function) ucrBase.clsRsyntax.RemoveFromAfterCodes(clsHomogenFunction) - Else + ElseIf rdoPrepare.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsCsv2climatolFunction) - ucrBase.clsRsyntax.AddToAfterCodes(clsHomogenQCFunctin, 0) - ucrBase.clsRsyntax.AddToAfterCodes(clsDdm2Function, 1) - ucrBase.clsRsyntax.AddToAfterCodes(clsHomogenFunction, 2) + ElseIf rdoQualityControl.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsHomogenQCFunctin) + ElseIf rdoMonthlyTotals.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsDdm2Function) + Else + ucrBase.clsRsyntax.SetBaseRFunction(clsHomogenFunction) End If DialogSize() HideShowControls() End Sub Private Sub HideShowControls() - If rdoMultiple.Checked Then + If rdoPrepare.Checked Then grpDataFile.Show() grpStationFile.Show() grpMethods.Hide() grpCptOptions.Hide() grpOutputOptions.Hide() + ElseIf rdoHomogenization.Checked Then + grpMethods.Hide() + grpCptOptions.Hide() + grpOutputOptions.Hide() + grpStationFile.Hide() + grpDataFile.Hide() + ElseIf rdoMonthlyTotals.Checked Then + grpMethods.Hide() + grpCptOptions.Hide() + grpOutputOptions.Hide() + grpStationFile.Hide() + grpDataFile.Hide() + ElseIf rdoQualityControl.Checked Then + grpMethods.Hide() + grpCptOptions.Hide() + grpOutputOptions.Hide() + grpStationFile.Hide() + grpDataFile.Hide() Else grpStationFile.Hide() grpDataFile.Hide() @@ -554,12 +589,23 @@ Public Class dlgHomogenization End Sub Private Sub DialogSize() - If rdoMultiple.Checked Then + If rdoSingle.Checked Then + Me.Size = New Size(438, 550) + Me.ucrBase.Location = New Point(12, 460) + ElseIf rdoPrepare.Checked Then Me.Size = New Size(438, 609) Me.ucrBase.Location = New Point(12, 515) + Me.ucrInputClimateVariables.Location = New Point(272, 464) + Me.lblClimaticVariable.Location = New Point(182, 468) Else - Me.Size = New Size(438, 550) - Me.ucrBase.Location = New Point(12, 460) + Me.Size = New Size(438, 160) + Me.ucrBase.Location = New Point(12, 130) + Me.ucrInputClimateVariables.Location = New Point(272, 61) + Me.ucrInputInitialYear.Location = New Point(77, 59) + Me.ucrInputFinalYear.Location = New Point(77, 90) + Me.lblClimaticVariable.Location = New Point(182, 65) + Me.lblFinalYear.Location = New Point(15, 94) + Me.lblInitialYear.Location = New Point(15, 63) End If End Sub @@ -597,7 +643,7 @@ Public Class dlgHomogenization Private Sub ucrInputFinalYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFinalYear.ControlValueChanged If Not ucrInputFinalYear.IsEmpty Then - clsHomogenQCFunctin.AddParameter("anyf", ucrInputFinalYear.GetText, iPosition:=2) + clsHomogenQCFunctin.AddParameter("anyf", ucrInputFinalYear.GetText, iPosition:=2, bIncludeArgumentName:=False) clsDdm2Function.AddParameter("initial", ucrInputFinalYear.GetText, bIncludeArgumentName:=False, iPosition:=2) clsHomogenFunction.AddParameter("in_yr", ucrInputFinalYear.GetText, bIncludeArgumentName:=False, iPosition:=2) Else @@ -609,7 +655,7 @@ Public Class dlgHomogenization Private Sub ucrInputInitialYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputInitialYear.ControlValueChanged If Not ucrInputInitialYear.IsEmpty Then - clsHomogenQCFunctin.AddParameter("anyi", ucrInputInitialYear.GetText, iPosition:=1) + clsHomogenQCFunctin.AddParameter("anyi", ucrInputInitialYear.GetText, iPosition:=1, bIncludeArgumentName:=False) clsDdm2Function.AddParameter("final", ucrInputInitialYear.GetText, bIncludeArgumentName:=False, iPosition:=1) clsHomogenFunction.AddParameter("final_yr", ucrInputInitialYear.GetText, bIncludeArgumentName:=False, iPosition:=1) Else @@ -640,10 +686,10 @@ Public Class dlgHomogenization If Not ucrReceiverStationId.IsEmpty Then lstVariables.Add(ucrReceiverStationId.GetVariableNames()) End If - clsVars2ColumnsFunction.AddParameter("cols", "c(" & String.Join(", ", lstVariables) & ")", iPosition:=0, bIncludeArgumentName:=False) Else clsVars2ColumnsFunction.RemoveParameterByName("cols") End If End Sub + End Class \ No newline at end of file From 4f48d77f1031aec9b06510b65d6b20b60861ef71 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 20 Dec 2023 16:46:40 +0300 Subject: [PATCH 14/25] changes to the dialog --- instat/dlgIDFCurves.Designer.vb | 164 ++++++++++++++++---------------- instat/dlgIDFCurves.vb | 45 ++++----- instat/frmMain.Designer.vb | 5 +- 3 files changed, 103 insertions(+), 111 deletions(-) diff --git a/instat/dlgIDFCurves.Designer.vb b/instat/dlgIDFCurves.Designer.vb index 29831b3d60d..d5264b4eda9 100644 --- a/instat/dlgIDFCurves.Designer.vb +++ b/instat/dlgIDFCurves.Designer.vb @@ -22,69 +22,23 @@ Partial Class dlgIDFCurves 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.ucrIDFCurvesSelector = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrReceiverDateTime = New instat.ucrReceiverSingle() - Me.ucrReceiverPrec = New instat.ucrReceiverSingle() Me.lblDateTime = New System.Windows.Forms.Label() Me.lblRain = New System.Windows.Forms.Label() - Me.ucrStationName = New instat.ucrInputTextBox() Me.lblStationName = New System.Windows.Forms.Label() - Me.ucrNudMaxPrec = New instat.ucrNud() Me.lblMinimumProp = New System.Windows.Forms.Label() Me.ucrSave = New instat.ucrSave() + Me.ucrNudMaxPrec = New instat.ucrNud() + Me.ucrStationName = New instat.ucrInputTextBox() + Me.ucrReceiverPrec = New instat.ucrReceiverSingle() + Me.ucrReceiverDateTime = New instat.ucrReceiverSingle() + Me.ucrIDFCurvesSelector = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() ' - 'ucrBase - ' - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(6, 298) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 0 - ' - 'ucrIDFCurvesSelector - ' - Me.ucrIDFCurvesSelector.AutoSize = True - Me.ucrIDFCurvesSelector.bDropUnusedFilterLevels = False - Me.ucrIDFCurvesSelector.bShowHiddenColumns = False - Me.ucrIDFCurvesSelector.bUseCurrentFilter = True - Me.ucrIDFCurvesSelector.Location = New System.Drawing.Point(6, 16) - Me.ucrIDFCurvesSelector.Margin = New System.Windows.Forms.Padding(0) - Me.ucrIDFCurvesSelector.Name = "ucrIDFCurvesSelector" - Me.ucrIDFCurvesSelector.Size = New System.Drawing.Size(213, 183) - Me.ucrIDFCurvesSelector.TabIndex = 1 - ' - 'ucrReceiverDateTime - ' - Me.ucrReceiverDateTime.AutoSize = True - Me.ucrReceiverDateTime.frmParent = Me - Me.ucrReceiverDateTime.Location = New System.Drawing.Point(279, 72) - Me.ucrReceiverDateTime.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDateTime.Name = "ucrReceiverDateTime" - Me.ucrReceiverDateTime.Selector = Nothing - Me.ucrReceiverDateTime.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverDateTime.strNcFilePath = "" - Me.ucrReceiverDateTime.TabIndex = 2 - Me.ucrReceiverDateTime.ucrSelector = Nothing - ' - 'ucrReceiverPrec - ' - Me.ucrReceiverPrec.AutoSize = True - Me.ucrReceiverPrec.frmParent = Me - Me.ucrReceiverPrec.Location = New System.Drawing.Point(279, 105) - Me.ucrReceiverPrec.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverPrec.Name = "ucrReceiverPrec" - Me.ucrReceiverPrec.Selector = Nothing - Me.ucrReceiverPrec.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverPrec.strNcFilePath = "" - Me.ucrReceiverPrec.TabIndex = 3 - Me.ucrReceiverPrec.ucrSelector = Nothing - ' 'lblDateTime ' Me.lblDateTime.AutoSize = True - Me.lblDateTime.Location = New System.Drawing.Point(276, 52) + Me.lblDateTime.Location = New System.Drawing.Point(290, 38) Me.lblDateTime.Name = "lblDateTime" Me.lblDateTime.Size = New System.Drawing.Size(56, 13) Me.lblDateTime.TabIndex = 4 @@ -93,49 +47,25 @@ Partial Class dlgIDFCurves 'lblRain ' Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(285, 92) + Me.lblRain.Location = New System.Drawing.Point(289, 81) Me.lblRain.Name = "lblRain" Me.lblRain.Size = New System.Drawing.Size(29, 13) Me.lblRain.TabIndex = 5 Me.lblRain.Text = "Rain" ' - 'ucrStationName - ' - Me.ucrStationName.AddQuotesIfUnrecognised = True - Me.ucrStationName.AutoSize = True - Me.ucrStationName.IsMultiline = False - Me.ucrStationName.IsReadOnly = False - Me.ucrStationName.Location = New System.Drawing.Point(279, 152) - Me.ucrStationName.Name = "ucrStationName" - Me.ucrStationName.Size = New System.Drawing.Size(137, 21) - Me.ucrStationName.TabIndex = 6 - ' 'lblStationName ' Me.lblStationName.AutoSize = True - Me.lblStationName.Location = New System.Drawing.Point(281, 135) + Me.lblStationName.Location = New System.Drawing.Point(289, 128) Me.lblStationName.Name = "lblStationName" Me.lblStationName.Size = New System.Drawing.Size(71, 13) Me.lblStationName.TabIndex = 7 Me.lblStationName.Text = "Station Name" ' - 'ucrNudMaxPrec - ' - Me.ucrNudMaxPrec.AutoSize = True - Me.ucrNudMaxPrec.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaxPrec.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxPrec.Location = New System.Drawing.Point(365, 191) - Me.ucrNudMaxPrec.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMaxPrec.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaxPrec.Name = "ucrNudMaxPrec" - Me.ucrNudMaxPrec.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMaxPrec.TabIndex = 8 - Me.ucrNudMaxPrec.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblMinimumProp ' Me.lblMinimumProp.AutoSize = True - Me.lblMinimumProp.Location = New System.Drawing.Point(261, 194) + Me.lblMinimumProp.Location = New System.Drawing.Point(263, 186) Me.lblMinimumProp.Name = "lblMinimumProp" Me.lblMinimumProp.Size = New System.Drawing.Size(99, 13) Me.lblMinimumProp.TabIndex = 9 @@ -144,17 +74,87 @@ Partial Class dlgIDFCurves 'ucrSave ' Me.ucrSave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSave.Location = New System.Drawing.Point(7, 264) + Me.ucrSave.Location = New System.Drawing.Point(7, 224) Me.ucrSave.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSave.Name = "ucrSave" Me.ucrSave.Size = New System.Drawing.Size(401, 24) Me.ucrSave.TabIndex = 70 ' + 'ucrNudMaxPrec + ' + Me.ucrNudMaxPrec.AutoSize = True + Me.ucrNudMaxPrec.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxPrec.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaxPrec.Location = New System.Drawing.Point(365, 183) + Me.ucrNudMaxPrec.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaxPrec.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxPrec.Name = "ucrNudMaxPrec" + Me.ucrNudMaxPrec.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMaxPrec.TabIndex = 8 + Me.ucrNudMaxPrec.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrStationName + ' + Me.ucrStationName.AddQuotesIfUnrecognised = True + Me.ucrStationName.AutoSize = True + Me.ucrStationName.IsMultiline = False + Me.ucrStationName.IsReadOnly = False + Me.ucrStationName.Location = New System.Drawing.Point(286, 144) + Me.ucrStationName.Name = "ucrStationName" + Me.ucrStationName.Size = New System.Drawing.Size(130, 21) + Me.ucrStationName.TabIndex = 6 + ' + 'ucrReceiverPrec + ' + Me.ucrReceiverPrec.AutoSize = True + Me.ucrReceiverPrec.frmParent = Me + Me.ucrReceiverPrec.Location = New System.Drawing.Point(286, 98) + Me.ucrReceiverPrec.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverPrec.Name = "ucrReceiverPrec" + Me.ucrReceiverPrec.Selector = Nothing + Me.ucrReceiverPrec.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverPrec.strNcFilePath = "" + Me.ucrReceiverPrec.TabIndex = 3 + Me.ucrReceiverPrec.ucrSelector = Nothing + ' + 'ucrReceiverDateTime + ' + Me.ucrReceiverDateTime.AutoSize = True + Me.ucrReceiverDateTime.frmParent = Me + Me.ucrReceiverDateTime.Location = New System.Drawing.Point(286, 55) + Me.ucrReceiverDateTime.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDateTime.Name = "ucrReceiverDateTime" + Me.ucrReceiverDateTime.Selector = Nothing + Me.ucrReceiverDateTime.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDateTime.strNcFilePath = "" + Me.ucrReceiverDateTime.TabIndex = 2 + Me.ucrReceiverDateTime.ucrSelector = Nothing + ' + 'ucrIDFCurvesSelector + ' + Me.ucrIDFCurvesSelector.AutoSize = True + Me.ucrIDFCurvesSelector.bDropUnusedFilterLevels = False + Me.ucrIDFCurvesSelector.bShowHiddenColumns = False + Me.ucrIDFCurvesSelector.bUseCurrentFilter = True + Me.ucrIDFCurvesSelector.Location = New System.Drawing.Point(6, 8) + Me.ucrIDFCurvesSelector.Margin = New System.Windows.Forms.Padding(0) + Me.ucrIDFCurvesSelector.Name = "ucrIDFCurvesSelector" + Me.ucrIDFCurvesSelector.Size = New System.Drawing.Size(213, 183) + Me.ucrIDFCurvesSelector.TabIndex = 1 + ' + 'ucrBase + ' + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(6, 258) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' 'dlgIDFCurves ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(425, 355) + Me.ClientSize = New System.Drawing.Size(417, 329) Me.Controls.Add(Me.ucrSave) Me.Controls.Add(Me.lblMinimumProp) Me.Controls.Add(Me.ucrNudMaxPrec) diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index 08c661f2456..e046763b097 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -37,7 +37,7 @@ Public Class dlgIDFCurves End Sub Private Sub InitialiseDialog() - ucrBase.clsRsyntax.iCallType = 3 + ucrBase.clsRsyntax.bSeparateThread = False ucrIDFCurvesSelector.SetParameter(New RParameter("prdat", 0)) ucrIDFCurvesSelector.SetParameterIsrfunction() @@ -56,14 +56,12 @@ Public Class dlgIDFCurves ucrNudMaxPrec.DecimalPlaces = 1 ucrNudMaxPrec.SetRDefault(0.8) - - 'ucrSave.SetPrefix("IDF_Curve") - 'ucrSave.SetIsComboBox() - 'ucrSave.SetCheckBoxText("Save Graph") - 'ucrSave.SetSaveTypeAsGraph() - ''ucrSave.SetSaveType(RObjectTypeLabel.Summary, strRObjectFormat:=RObjectFormat.Text) - 'ucrSave.SetDataFrameSelector(ucrIDFCurvesSelector.ucrAvailableDataFrames) - 'ucrSave.SetAssignToIfUncheckedValue("last_summary") + ucrSave.SetPrefix("Prec_accum") + ucrSave.SetIsComboBox() + ucrSave.SetCheckBoxText("Save DataFrame") + ucrSave.SetSaveTypeAsDataFrame() + ucrSave.SetDataFrameSelector(ucrIDFCurvesSelector.ucrAvailableDataFrames) + ucrSave.SetAssignToIfUncheckedValue("last_accum") End Sub @@ -83,18 +81,6 @@ Public Class dlgIDFCurves clsGetColumnsFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") clsGetColumnsFunction.SetAssignTo("col_data") - clsIDFCurvesFunction.SetPackageName("climatol") - clsIDFCurvesFunction.SetRCommand("IDFcurves") - clsIDFCurvesFunction.AddParameter("clmn", clsRFunctionParameter:=clsPmatchFunction, iPosition:=2) - clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=3) - 'clsIDFCurvesFunction.iCallType = 1 - 'clsIDFCurvesFunction.SetAssignToOutputObject(strRObjectToAssignTo:="last_summary", - ' strRObjectTypeLabelToAssignTo:=RObjectTypeLabel.Summary, - ' strRObjectFormatToAssignTo:=RObjectFormat.Text, - ' strRDataFrameNameToAddObjectTo:=ucrIDFCurvesSelector.strCurrentDataFrame, - ' strObjectName:="last_summary") - - clsVarsColumnsOperator.SetOperation("", bBracketsTemp:=False) clsVarsColumnsOperator.SetAssignTo("var_1") @@ -109,15 +95,20 @@ Public Class dlgIDFCurves clsPmatchFunction.AddParameter("cols", clsROperatorParameter:=clsVars1ColumnsOperator, bIncludeArgumentName:=False, iPosition:=0) clsPmatchFunction.SetAssignTo("data_file") + clsIDFCurvesFunction.SetPackageName("climatol") + clsIDFCurvesFunction.SetRCommand("IDFcurves") + clsIDFCurvesFunction.AddParameter("clmn", clsRFunctionParameter:=clsPmatchFunction, iPosition:=2) + clsIDFCurvesFunction.AddParameter("na.code", "NA", iPosition:=3) + ucrBase.clsRsyntax.SetBaseRFunction(clsIDFCurvesFunction) + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrIDFCurvesSelector.SetRCode(clsGetColumnsFunction, bReset) - ucrNudMaxPrec.SetRCode(clsIDFCurvesFunction, bReset) ucrStationName.SetRCode(clsIDFCurvesFunction, bReset) - 'ucrSave.SetRCode(clsIDFCurvesFunction, bReset) + ucrSave.SetRCode(clsIDFCurvesFunction, bReset) If bReset Then ucrReceiverDateTime.SetRCode(clsGetColumnsFunction, bReset) @@ -126,7 +117,7 @@ Public Class dlgIDFCurves End Sub Private Sub TestOkEnabled() - + ucrBase.OKEnabled(Not ucrReceiverDateTime.IsEmpty AndAlso Not ucrReceiverPrec.IsEmpty AndAlso Not ucrStationName.IsEmpty) End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -135,7 +126,6 @@ Public Class dlgIDFCurves TestOkEnabled() End Sub - Private Sub ucrReceiverPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPrec.ControlValueChanged, ucrReceiverDateTime.ControlValueChanged If Not ucrReceiverPrec.IsEmpty AndAlso Not ucrReceiverDateTime.IsEmpty Then clsVars1ColumnsOperator.AddParameter("cols", "c(" & ucrReceiverDateTime.GetVariableNames() & ", " & ucrReceiverPrec.GetVariableNames() & ")", iPosition:=0, bIncludeArgumentName:=False) @@ -160,4 +150,9 @@ Public Class dlgIDFCurves clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrIDFCurvesSelector.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) clsIDFCurvesFunction.AddParameter("data", ucrIDFCurvesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) End Sub + + Private Sub ucrReceiverDateTime_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDateTime.ControlContentsChanged, +ucrReceiverPrec.ControlContentsChanged, ucrStationName.ControlContentsChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 8b97727f1a8..83ed55fd58a 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -2190,7 +2190,6 @@ Partial Class frmMain ' 'mnuClimaticDescribeIDF ' - Me.mnuClimaticDescribeIDF.Enabled = False Me.mnuClimaticDescribeIDF.Name = "mnuClimaticDescribeIDF" Me.mnuClimaticDescribeIDF.Size = New System.Drawing.Size(211, 22) Me.mnuClimaticDescribeIDF.Text = "IDF..." @@ -5092,9 +5091,7 @@ Partial Class frmMain Me.IsMdiContainer = True Me.MainMenuStrip = Me.mnuBar Me.Name = "frmMain" - Me.Text = "R-Instat " + My.Application.Info.Version.Major.ToString + "." + - My.Application.Info.Version.Minor.ToString + "." + - My.Application.Info.Version.Build.ToString + Me.Text = "R-Instat .." Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.stsStrip.ResumeLayout(False) Me.stsStrip.PerformLayout() From 3c101da5bba901004ec4ec54a920fef0fdff0fbd Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 10 Jan 2024 16:04:39 +0300 Subject: [PATCH 15/25] change --- instat/dlgHomogenization.Designer.vb | 480 +++++++++++++-------------- instat/dlgHomogenization.vb | 4 +- 2 files changed, 242 insertions(+), 242 deletions(-) diff --git a/instat/dlgHomogenization.Designer.vb b/instat/dlgHomogenization.Designer.vb index ff4597390d3..0b13188ecd5 100644 --- a/instat/dlgHomogenization.Designer.vb +++ b/instat/dlgHomogenization.Designer.vb @@ -31,27 +31,46 @@ Partial Class dlgHomogenization Me.rdoBuishand = New System.Windows.Forms.RadioButton() Me.rdoPettitt = New System.Windows.Forms.RadioButton() Me.rdoSnht = New System.Windows.Forms.RadioButton() + Me.ucrPnlMethods = New instat.UcrPanel() Me.grpCptOptions = New System.Windows.Forms.GroupBox() + Me.ucrInputComboMeanVarDistribution = New instat.ucrInputComboBox() + Me.ucrInputComboVarDistribution = New instat.ucrInputComboBox() Me.lblPenaltyValue = New System.Windows.Forms.Label() + Me.ucrInputPenValue = New instat.ucrInputTextBox() Me.lblMinSegLen = New System.Windows.Forms.Label() Me.lblQ = New System.Windows.Forms.Label() Me.lblPenalty = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblDistribution = New System.Windows.Forms.Label() + Me.ucrNudMinSegLen = New instat.ucrNud() + Me.ucrInputQ = New instat.ucrInputTextBox() + Me.ucrInputComboMeanDistribution = New instat.ucrInputComboBox() + Me.ucrInputComboMethod = New instat.ucrInputComboBox() + Me.ucrInputComboPenalty = New instat.ucrInputComboBox() Me.grpOutputOptions = New System.Windows.Forms.GroupBox() + Me.ucrChkPlot = New instat.ucrCheck() + Me.ucrChkSummary = New instat.ucrCheck() Me.ttOptions = New System.Windows.Forms.ToolTip(Me.components) Me.rdoSingle = New System.Windows.Forms.RadioButton() Me.lblNeighbouring = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.rdoPrepare = New System.Windows.Forms.RadioButton() Me.grpStationFile = New System.Windows.Forms.GroupBox() + Me.ucrReceiverElavation = New instat.ucrReceiverSingle() Me.lblLongtude = New System.Windows.Forms.Label() Me.lblStationName = New System.Windows.Forms.Label() Me.lblStationID = New System.Windows.Forms.Label() Me.lblElavation = New System.Windows.Forms.Label() + Me.ucrReceiverStationId = New instat.ucrReceiverSingle() + Me.ucrReceiverStationName = New instat.ucrReceiverSingle() + Me.ucrReceiverLongtitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() Me.lblLatitude = New System.Windows.Forms.Label() + Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() Me.grpDataFile = New System.Windows.Forms.GroupBox() + Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() Me.lblDataFiles = New System.Windows.Forms.Label() + Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() Me.lblClimaticVariable = New System.Windows.Forms.Label() Me.lblFinalYear = New System.Windows.Forms.Label() Me.lblInitialYear = New System.Windows.Forms.Label() @@ -62,28 +81,9 @@ Partial Class dlgHomogenization Me.ucrInputClimateVariables = New instat.ucrInputTextBox() Me.ucrPnlOptions = New instat.UcrPanel() Me.ucrSaveResult = New instat.ucrSave() - Me.ucrChkPlot = New instat.ucrCheck() - Me.ucrChkSummary = New instat.ucrCheck() - Me.ucrInputComboMeanVarDistribution = New instat.ucrInputComboBox() - Me.ucrInputComboVarDistribution = New instat.ucrInputComboBox() - Me.ucrInputPenValue = New instat.ucrInputTextBox() - Me.ucrNudMinSegLen = New instat.ucrNud() - Me.ucrInputQ = New instat.ucrInputTextBox() - Me.ucrInputComboMeanDistribution = New instat.ucrInputComboBox() - Me.ucrInputComboMethod = New instat.ucrInputComboBox() - Me.ucrInputComboPenalty = New instat.ucrInputComboBox() - Me.ucrPnlMethods = New instat.UcrPanel() Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverNeighbour = New instat.ucrReceiverSingle() - Me.ucrReceiverElavation = New instat.ucrReceiverSingle() - Me.ucrReceiverStationId = New instat.ucrReceiverSingle() - Me.ucrReceiverStationName = New instat.ucrReceiverSingle() - Me.ucrReceiverLongtitude = New instat.ucrReceiverSingle() - Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() - Me.ucrSelectorStationFile = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrReceiverDataFiles = New instat.ucrReceiverMultiple() - Me.ucrSelectorDataFiles = New instat.ucrSelectorByDataFrameAddRemove() Me.rdoHomogenization = New System.Windows.Forms.RadioButton() Me.rdoMonthlyTotals = New System.Windows.Forms.RadioButton() Me.rdoQualityControl = New System.Windows.Forms.RadioButton() @@ -186,6 +186,14 @@ Partial Class dlgHomogenization Me.rdoSnht.Text = "SNHT" Me.rdoSnht.UseVisualStyleBackColor = True ' + 'ucrPnlMethods + ' + Me.ucrPnlMethods.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlMethods.Location = New System.Drawing.Point(6, 17) + Me.ucrPnlMethods.Name = "ucrPnlMethods" + Me.ucrPnlMethods.Size = New System.Drawing.Size(197, 68) + Me.ucrPnlMethods.TabIndex = 0 + ' 'grpCptOptions ' Me.grpCptOptions.Controls.Add(Me.ucrInputComboMeanVarDistribution) @@ -209,6 +217,28 @@ Partial Class dlgHomogenization Me.grpCptOptions.TabStop = False Me.grpCptOptions.Text = "Change Point Options" ' + 'ucrInputComboMeanVarDistribution + ' + Me.ucrInputComboMeanVarDistribution.AddQuotesIfUnrecognised = True + Me.ucrInputComboMeanVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboMeanVarDistribution.GetSetSelectedIndex = -1 + Me.ucrInputComboMeanVarDistribution.IsReadOnly = False + Me.ucrInputComboMeanVarDistribution.Location = New System.Drawing.Point(68, 67) + Me.ucrInputComboMeanVarDistribution.Name = "ucrInputComboMeanVarDistribution" + Me.ucrInputComboMeanVarDistribution.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboMeanVarDistribution.TabIndex = 8 + ' + 'ucrInputComboVarDistribution + ' + Me.ucrInputComboVarDistribution.AddQuotesIfUnrecognised = True + Me.ucrInputComboVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboVarDistribution.GetSetSelectedIndex = -1 + Me.ucrInputComboVarDistribution.IsReadOnly = False + Me.ucrInputComboVarDistribution.Location = New System.Drawing.Point(68, 67) + Me.ucrInputComboVarDistribution.Name = "ucrInputComboVarDistribution" + Me.ucrInputComboVarDistribution.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboVarDistribution.TabIndex = 15 + ' 'lblPenaltyValue ' Me.lblPenaltyValue.AutoSize = True @@ -219,6 +249,17 @@ Partial Class dlgHomogenization Me.lblPenaltyValue.TabIndex = 5 Me.lblPenaltyValue.Text = "Pen.Value:" ' + 'ucrInputPenValue + ' + Me.ucrInputPenValue.AddQuotesIfUnrecognised = True + Me.ucrInputPenValue.AutoSize = True + Me.ucrInputPenValue.IsMultiline = False + Me.ucrInputPenValue.IsReadOnly = False + Me.ucrInputPenValue.Location = New System.Drawing.Point(68, 138) + Me.ucrInputPenValue.Name = "ucrInputPenValue" + Me.ucrInputPenValue.Size = New System.Drawing.Size(55, 21) + Me.ucrInputPenValue.TabIndex = 11 + ' 'lblMinSegLen ' Me.lblMinSegLen.AutoSize = True @@ -269,6 +310,63 @@ Partial Class dlgHomogenization Me.lblDistribution.TabIndex = 2 Me.lblDistribution.Text = "Distribution:" ' + 'ucrNudMinSegLen + ' + Me.ucrNudMinSegLen.AutoSize = True + Me.ucrNudMinSegLen.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMinSegLen.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMinSegLen.Location = New System.Drawing.Point(68, 91) + Me.ucrNudMinSegLen.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMinSegLen.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMinSegLen.Name = "ucrNudMinSegLen" + Me.ucrNudMinSegLen.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMinSegLen.TabIndex = 9 + Me.ucrNudMinSegLen.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputQ + ' + Me.ucrInputQ.AddQuotesIfUnrecognised = True + Me.ucrInputQ.AutoSize = True + Me.ucrInputQ.IsMultiline = False + Me.ucrInputQ.IsReadOnly = False + Me.ucrInputQ.Location = New System.Drawing.Point(68, 114) + Me.ucrInputQ.Name = "ucrInputQ" + Me.ucrInputQ.Size = New System.Drawing.Size(55, 21) + Me.ucrInputQ.TabIndex = 10 + ' + 'ucrInputComboMeanDistribution + ' + Me.ucrInputComboMeanDistribution.AddQuotesIfUnrecognised = True + Me.ucrInputComboMeanDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboMeanDistribution.GetSetSelectedIndex = -1 + Me.ucrInputComboMeanDistribution.IsReadOnly = False + Me.ucrInputComboMeanDistribution.Location = New System.Drawing.Point(68, 67) + Me.ucrInputComboMeanDistribution.Name = "ucrInputComboMeanDistribution" + Me.ucrInputComboMeanDistribution.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboMeanDistribution.TabIndex = 2 + ' + 'ucrInputComboMethod + ' + Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboMethod.GetSetSelectedIndex = -1 + Me.ucrInputComboMethod.IsReadOnly = False + Me.ucrInputComboMethod.Location = New System.Drawing.Point(68, 43) + Me.ucrInputComboMethod.Name = "ucrInputComboMethod" + Me.ucrInputComboMethod.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboMethod.TabIndex = 7 + ' + 'ucrInputComboPenalty + ' + Me.ucrInputComboPenalty.AddQuotesIfUnrecognised = True + Me.ucrInputComboPenalty.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputComboPenalty.GetSetSelectedIndex = -1 + Me.ucrInputComboPenalty.IsReadOnly = False + Me.ucrInputComboPenalty.Location = New System.Drawing.Point(68, 19) + Me.ucrInputComboPenalty.Name = "ucrInputComboPenalty" + Me.ucrInputComboPenalty.Size = New System.Drawing.Size(64, 21) + Me.ucrInputComboPenalty.TabIndex = 6 + ' 'grpOutputOptions ' Me.grpOutputOptions.Controls.Add(Me.ucrChkPlot) @@ -281,6 +379,24 @@ Partial Class dlgHomogenization Me.grpOutputOptions.TabStop = False Me.grpOutputOptions.Text = "Output Options" ' + 'ucrChkPlot + ' + Me.ucrChkPlot.AutoSize = True + Me.ucrChkPlot.Checked = False + Me.ucrChkPlot.Location = New System.Drawing.Point(10, 19) + Me.ucrChkPlot.Name = "ucrChkPlot" + Me.ucrChkPlot.Size = New System.Drawing.Size(100, 23) + Me.ucrChkPlot.TabIndex = 0 + ' + 'ucrChkSummary + ' + Me.ucrChkSummary.AutoSize = True + Me.ucrChkSummary.Checked = False + Me.ucrChkSummary.Location = New System.Drawing.Point(110, 19) + Me.ucrChkSummary.Name = "ucrChkSummary" + Me.ucrChkSummary.Size = New System.Drawing.Size(93, 23) + Me.ucrChkSummary.TabIndex = 1 + ' 'rdoSingle ' Me.rdoSingle.Appearance = System.Windows.Forms.Appearance.Button @@ -359,6 +475,19 @@ Partial Class dlgHomogenization Me.grpStationFile.TabStop = False Me.grpStationFile.Text = "StationFile" ' + 'ucrReceiverElavation + ' + Me.ucrReceiverElavation.AutoSize = True + Me.ucrReceiverElavation.frmParent = Me + Me.ucrReceiverElavation.Location = New System.Drawing.Point(272, 105) + Me.ucrReceiverElavation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverElavation.Name = "ucrReceiverElavation" + Me.ucrReceiverElavation.Selector = Nothing + Me.ucrReceiverElavation.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverElavation.strNcFilePath = "" + Me.ucrReceiverElavation.TabIndex = 6 + Me.ucrReceiverElavation.ucrSelector = Nothing + ' 'lblLongtude ' Me.lblLongtude.AutoSize = True @@ -399,6 +528,58 @@ Partial Class dlgHomogenization Me.lblElavation.TabIndex = 5 Me.lblElavation.Text = "Elavation:" ' + 'ucrReceiverStationId + ' + Me.ucrReceiverStationId.AutoSize = True + Me.ucrReceiverStationId.frmParent = Me + Me.ucrReceiverStationId.Location = New System.Drawing.Point(272, 175) + Me.ucrReceiverStationId.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationId.Name = "ucrReceiverStationId" + Me.ucrReceiverStationId.Selector = Nothing + Me.ucrReceiverStationId.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStationId.strNcFilePath = "" + Me.ucrReceiverStationId.TabIndex = 10 + Me.ucrReceiverStationId.ucrSelector = Nothing + ' + 'ucrReceiverStationName + ' + Me.ucrReceiverStationName.AutoSize = True + Me.ucrReceiverStationName.frmParent = Me + Me.ucrReceiverStationName.Location = New System.Drawing.Point(272, 140) + Me.ucrReceiverStationName.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationName.Name = "ucrReceiverStationName" + Me.ucrReceiverStationName.Selector = Nothing + Me.ucrReceiverStationName.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStationName.strNcFilePath = "" + Me.ucrReceiverStationName.TabIndex = 8 + Me.ucrReceiverStationName.ucrSelector = Nothing + ' + 'ucrReceiverLongtitude + ' + Me.ucrReceiverLongtitude.AutoSize = True + Me.ucrReceiverLongtitude.frmParent = Me + Me.ucrReceiverLongtitude.Location = New System.Drawing.Point(272, 68) + Me.ucrReceiverLongtitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongtitude.Name = "ucrReceiverLongtitude" + Me.ucrReceiverLongtitude.Selector = Nothing + Me.ucrReceiverLongtitude.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverLongtitude.strNcFilePath = "" + Me.ucrReceiverLongtitude.TabIndex = 4 + Me.ucrReceiverLongtitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(272, 25) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 2 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' 'lblLatitude ' Me.lblLatitude.AutoSize = True @@ -409,6 +590,18 @@ Partial Class dlgHomogenization Me.lblLatitude.TabIndex = 1 Me.lblLatitude.Text = "Latitude:" ' + 'ucrSelectorStationFile + ' + Me.ucrSelectorStationFile.AutoSize = True + Me.ucrSelectorStationFile.bDropUnusedFilterLevels = False + Me.ucrSelectorStationFile.bShowHiddenColumns = False + Me.ucrSelectorStationFile.bUseCurrentFilter = True + Me.ucrSelectorStationFile.Location = New System.Drawing.Point(6, 16) + Me.ucrSelectorStationFile.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorStationFile.Name = "ucrSelectorStationFile" + Me.ucrSelectorStationFile.Size = New System.Drawing.Size(213, 185) + Me.ucrSelectorStationFile.TabIndex = 0 + ' 'grpDataFile ' Me.grpDataFile.Controls.Add(Me.ucrReceiverDataFiles) @@ -421,6 +614,19 @@ Partial Class dlgHomogenization Me.grpDataFile.TabStop = False Me.grpDataFile.Text = "Data File" ' + 'ucrReceiverDataFiles + ' + Me.ucrReceiverDataFiles.AutoSize = True + Me.ucrReceiverDataFiles.frmParent = Me + Me.ucrReceiverDataFiles.Location = New System.Drawing.Point(265, 38) + Me.ucrReceiverDataFiles.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDataFiles.Name = "ucrReceiverDataFiles" + Me.ucrReceiverDataFiles.Selector = Nothing + Me.ucrReceiverDataFiles.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverDataFiles.strNcFilePath = "" + Me.ucrReceiverDataFiles.TabIndex = 2 + Me.ucrReceiverDataFiles.ucrSelector = Nothing + ' 'lblDataFiles ' Me.lblDataFiles.AutoSize = True @@ -431,11 +637,23 @@ Partial Class dlgHomogenization Me.lblDataFiles.TabIndex = 1 Me.lblDataFiles.Text = "Data Columns:" ' + 'ucrSelectorDataFiles + ' + Me.ucrSelectorDataFiles.AutoSize = True + Me.ucrSelectorDataFiles.bDropUnusedFilterLevels = False + Me.ucrSelectorDataFiles.bShowHiddenColumns = False + Me.ucrSelectorDataFiles.bUseCurrentFilter = True + Me.ucrSelectorDataFiles.Location = New System.Drawing.Point(6, 16) + Me.ucrSelectorDataFiles.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDataFiles.Name = "ucrSelectorDataFiles" + Me.ucrSelectorDataFiles.Size = New System.Drawing.Size(213, 185) + Me.ucrSelectorDataFiles.TabIndex = 0 + ' 'lblClimaticVariable ' Me.lblClimaticVariable.AutoSize = True Me.lblClimaticVariable.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblClimaticVariable.Location = New System.Drawing.Point(182, 468) + Me.lblClimaticVariable.Location = New System.Drawing.Point(195, 468) Me.lblClimaticVariable.Name = "lblClimaticVariable" Me.lblClimaticVariable.Size = New System.Drawing.Size(87, 13) Me.lblClimaticVariable.TabIndex = 19 @@ -514,9 +732,9 @@ Partial Class dlgHomogenization Me.ucrInputClimateVariables.AutoSize = True Me.ucrInputClimateVariables.IsMultiline = False Me.ucrInputClimateVariables.IsReadOnly = False - Me.ucrInputClimateVariables.Location = New System.Drawing.Point(272, 464) + Me.ucrInputClimateVariables.Location = New System.Drawing.Point(284, 464) Me.ucrInputClimateVariables.Name = "ucrInputClimateVariables" - Me.ucrInputClimateVariables.Size = New System.Drawing.Size(137, 21) + Me.ucrInputClimateVariables.Size = New System.Drawing.Size(125, 21) Me.ucrInputClimateVariables.TabIndex = 20 ' 'ucrPnlOptions @@ -537,122 +755,6 @@ Partial Class dlgHomogenization Me.ucrSaveResult.Size = New System.Drawing.Size(320, 24) Me.ucrSaveResult.TabIndex = 13 ' - 'ucrChkPlot - ' - Me.ucrChkPlot.AutoSize = True - Me.ucrChkPlot.Checked = False - Me.ucrChkPlot.Location = New System.Drawing.Point(10, 19) - Me.ucrChkPlot.Name = "ucrChkPlot" - Me.ucrChkPlot.Size = New System.Drawing.Size(100, 23) - Me.ucrChkPlot.TabIndex = 0 - ' - 'ucrChkSummary - ' - Me.ucrChkSummary.AutoSize = True - Me.ucrChkSummary.Checked = False - Me.ucrChkSummary.Location = New System.Drawing.Point(110, 19) - Me.ucrChkSummary.Name = "ucrChkSummary" - Me.ucrChkSummary.Size = New System.Drawing.Size(93, 23) - Me.ucrChkSummary.TabIndex = 1 - ' - 'ucrInputComboMeanVarDistribution - ' - Me.ucrInputComboMeanVarDistribution.AddQuotesIfUnrecognised = True - Me.ucrInputComboMeanVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboMeanVarDistribution.GetSetSelectedIndex = -1 - Me.ucrInputComboMeanVarDistribution.IsReadOnly = False - Me.ucrInputComboMeanVarDistribution.Location = New System.Drawing.Point(68, 67) - Me.ucrInputComboMeanVarDistribution.Name = "ucrInputComboMeanVarDistribution" - Me.ucrInputComboMeanVarDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMeanVarDistribution.TabIndex = 8 - ' - 'ucrInputComboVarDistribution - ' - Me.ucrInputComboVarDistribution.AddQuotesIfUnrecognised = True - Me.ucrInputComboVarDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboVarDistribution.GetSetSelectedIndex = -1 - Me.ucrInputComboVarDistribution.IsReadOnly = False - Me.ucrInputComboVarDistribution.Location = New System.Drawing.Point(68, 67) - Me.ucrInputComboVarDistribution.Name = "ucrInputComboVarDistribution" - Me.ucrInputComboVarDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboVarDistribution.TabIndex = 15 - ' - 'ucrInputPenValue - ' - Me.ucrInputPenValue.AddQuotesIfUnrecognised = True - Me.ucrInputPenValue.AutoSize = True - Me.ucrInputPenValue.IsMultiline = False - Me.ucrInputPenValue.IsReadOnly = False - Me.ucrInputPenValue.Location = New System.Drawing.Point(68, 138) - Me.ucrInputPenValue.Name = "ucrInputPenValue" - Me.ucrInputPenValue.Size = New System.Drawing.Size(55, 21) - Me.ucrInputPenValue.TabIndex = 11 - ' - 'ucrNudMinSegLen - ' - Me.ucrNudMinSegLen.AutoSize = True - Me.ucrNudMinSegLen.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinSegLen.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMinSegLen.Location = New System.Drawing.Point(68, 91) - Me.ucrNudMinSegLen.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMinSegLen.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinSegLen.Name = "ucrNudMinSegLen" - Me.ucrNudMinSegLen.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMinSegLen.TabIndex = 9 - Me.ucrNudMinSegLen.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrInputQ - ' - Me.ucrInputQ.AddQuotesIfUnrecognised = True - Me.ucrInputQ.AutoSize = True - Me.ucrInputQ.IsMultiline = False - Me.ucrInputQ.IsReadOnly = False - Me.ucrInputQ.Location = New System.Drawing.Point(68, 114) - Me.ucrInputQ.Name = "ucrInputQ" - Me.ucrInputQ.Size = New System.Drawing.Size(55, 21) - Me.ucrInputQ.TabIndex = 10 - ' - 'ucrInputComboMeanDistribution - ' - Me.ucrInputComboMeanDistribution.AddQuotesIfUnrecognised = True - Me.ucrInputComboMeanDistribution.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboMeanDistribution.GetSetSelectedIndex = -1 - Me.ucrInputComboMeanDistribution.IsReadOnly = False - Me.ucrInputComboMeanDistribution.Location = New System.Drawing.Point(68, 67) - Me.ucrInputComboMeanDistribution.Name = "ucrInputComboMeanDistribution" - Me.ucrInputComboMeanDistribution.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMeanDistribution.TabIndex = 2 - ' - 'ucrInputComboMethod - ' - Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True - Me.ucrInputComboMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboMethod.GetSetSelectedIndex = -1 - Me.ucrInputComboMethod.IsReadOnly = False - Me.ucrInputComboMethod.Location = New System.Drawing.Point(68, 43) - Me.ucrInputComboMethod.Name = "ucrInputComboMethod" - Me.ucrInputComboMethod.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboMethod.TabIndex = 7 - ' - 'ucrInputComboPenalty - ' - Me.ucrInputComboPenalty.AddQuotesIfUnrecognised = True - Me.ucrInputComboPenalty.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputComboPenalty.GetSetSelectedIndex = -1 - Me.ucrInputComboPenalty.IsReadOnly = False - Me.ucrInputComboPenalty.Location = New System.Drawing.Point(68, 19) - Me.ucrInputComboPenalty.Name = "ucrInputComboPenalty" - Me.ucrInputComboPenalty.Size = New System.Drawing.Size(64, 21) - Me.ucrInputComboPenalty.TabIndex = 6 - ' - 'ucrPnlMethods - ' - Me.ucrPnlMethods.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMethods.Location = New System.Drawing.Point(6, 17) - Me.ucrPnlMethods.Name = "ucrPnlMethods" - Me.ucrPnlMethods.Size = New System.Drawing.Size(197, 68) - Me.ucrPnlMethods.TabIndex = 0 - ' 'ucrReceiverElement ' Me.ucrReceiverElement.AutoSize = True @@ -688,108 +790,6 @@ Partial Class dlgHomogenization Me.ucrReceiverNeighbour.TabIndex = 9 Me.ucrReceiverNeighbour.ucrSelector = Nothing ' - 'ucrReceiverElavation - ' - Me.ucrReceiverElavation.AutoSize = True - Me.ucrReceiverElavation.frmParent = Nothing - Me.ucrReceiverElavation.Location = New System.Drawing.Point(272, 105) - Me.ucrReceiverElavation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverElavation.Name = "ucrReceiverElavation" - Me.ucrReceiverElavation.Selector = Nothing - Me.ucrReceiverElavation.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverElavation.strNcFilePath = "" - Me.ucrReceiverElavation.TabIndex = 6 - Me.ucrReceiverElavation.ucrSelector = Nothing - ' - 'ucrReceiverStationId - ' - Me.ucrReceiverStationId.AutoSize = True - Me.ucrReceiverStationId.frmParent = Nothing - Me.ucrReceiverStationId.Location = New System.Drawing.Point(272, 175) - Me.ucrReceiverStationId.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStationId.Name = "ucrReceiverStationId" - Me.ucrReceiverStationId.Selector = Nothing - Me.ucrReceiverStationId.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverStationId.strNcFilePath = "" - Me.ucrReceiverStationId.TabIndex = 10 - Me.ucrReceiverStationId.ucrSelector = Nothing - ' - 'ucrReceiverStationName - ' - Me.ucrReceiverStationName.AutoSize = True - Me.ucrReceiverStationName.frmParent = Nothing - Me.ucrReceiverStationName.Location = New System.Drawing.Point(272, 140) - Me.ucrReceiverStationName.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStationName.Name = "ucrReceiverStationName" - Me.ucrReceiverStationName.Selector = Nothing - Me.ucrReceiverStationName.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverStationName.strNcFilePath = "" - Me.ucrReceiverStationName.TabIndex = 8 - Me.ucrReceiverStationName.ucrSelector = Nothing - ' - 'ucrReceiverLongtitude - ' - Me.ucrReceiverLongtitude.AutoSize = True - Me.ucrReceiverLongtitude.frmParent = Nothing - Me.ucrReceiverLongtitude.Location = New System.Drawing.Point(272, 68) - Me.ucrReceiverLongtitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLongtitude.Name = "ucrReceiverLongtitude" - Me.ucrReceiverLongtitude.Selector = Nothing - Me.ucrReceiverLongtitude.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverLongtitude.strNcFilePath = "" - Me.ucrReceiverLongtitude.TabIndex = 4 - Me.ucrReceiverLongtitude.ucrSelector = Nothing - ' - 'ucrReceiverLatitude - ' - Me.ucrReceiverLatitude.AutoSize = True - Me.ucrReceiverLatitude.frmParent = Nothing - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(272, 25) - Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" - Me.ucrReceiverLatitude.Selector = Nothing - Me.ucrReceiverLatitude.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverLatitude.strNcFilePath = "" - Me.ucrReceiverLatitude.TabIndex = 2 - Me.ucrReceiverLatitude.ucrSelector = Nothing - ' - 'ucrSelectorStationFile - ' - Me.ucrSelectorStationFile.AutoSize = True - Me.ucrSelectorStationFile.bDropUnusedFilterLevels = False - Me.ucrSelectorStationFile.bShowHiddenColumns = False - Me.ucrSelectorStationFile.bUseCurrentFilter = True - Me.ucrSelectorStationFile.Location = New System.Drawing.Point(6, 16) - Me.ucrSelectorStationFile.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorStationFile.Name = "ucrSelectorStationFile" - Me.ucrSelectorStationFile.Size = New System.Drawing.Size(213, 185) - Me.ucrSelectorStationFile.TabIndex = 0 - ' - 'ucrReceiverDataFiles - ' - Me.ucrReceiverDataFiles.AutoSize = True - Me.ucrReceiverDataFiles.frmParent = Nothing - Me.ucrReceiverDataFiles.Location = New System.Drawing.Point(265, 38) - Me.ucrReceiverDataFiles.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDataFiles.Name = "ucrReceiverDataFiles" - Me.ucrReceiverDataFiles.Selector = Nothing - Me.ucrReceiverDataFiles.Size = New System.Drawing.Size(120, 100) - Me.ucrReceiverDataFiles.strNcFilePath = "" - Me.ucrReceiverDataFiles.TabIndex = 2 - Me.ucrReceiverDataFiles.ucrSelector = Nothing - ' - 'ucrSelectorDataFiles - ' - Me.ucrSelectorDataFiles.AutoSize = True - Me.ucrSelectorDataFiles.bDropUnusedFilterLevels = False - Me.ucrSelectorDataFiles.bShowHiddenColumns = False - Me.ucrSelectorDataFiles.bUseCurrentFilter = True - Me.ucrSelectorDataFiles.Location = New System.Drawing.Point(6, 16) - Me.ucrSelectorDataFiles.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorDataFiles.Name = "ucrSelectorDataFiles" - Me.ucrSelectorDataFiles.Size = New System.Drawing.Size(213, 185) - Me.ucrSelectorDataFiles.TabIndex = 0 - ' 'rdoHomogenization ' Me.rdoHomogenization.Appearance = System.Windows.Forms.Appearance.Button diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 77c81f75c6f..50e757c3c7d 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -595,8 +595,8 @@ Public Class dlgHomogenization ElseIf rdoPrepare.Checked Then Me.Size = New Size(438, 609) Me.ucrBase.Location = New Point(12, 515) - Me.ucrInputClimateVariables.Location = New Point(272, 464) - Me.lblClimaticVariable.Location = New Point(182, 468) + Me.ucrInputClimateVariables.Location = New Point(284, 464) + Me.lblClimaticVariable.Location = New Point(195, 468) Else Me.Size = New Size(438, 160) Me.ucrBase.Location = New Point(12, 130) From 55b40492fe0f5788bcdd58d386332019e014f39a Mon Sep 17 00:00:00 2001 From: n-thony Date: Thu, 11 Jan 2024 14:38:48 +0300 Subject: [PATCH 16/25] minor addition --- instat/dlgHomogenization.vb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 50e757c3c7d..8b89fcb9cb9 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -24,6 +24,10 @@ Public Class dlgHomogenization clsGetColumnsFunction, clsGetStnColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsPmatch2Function, clsColumnsFunction, clsColumns2Function As New RFunction Private clsBracketsOperator, clsLeftBracketOperator, clsVars2ColumnsFunction, clsVars1ColumnsFunction, clsRightBracketOperator As New ROperator + ' Counter variable to keep track of the enabled radio button + Private iEnabledRadioButtonIndex As Integer = 0 + + Private lstOfRadioButtons As List(Of RadioButton) Private Sub ucrPnlOptions_Load(sender As Object, e As EventArgs) Handles ucrPnlOptions.Load End Sub @@ -228,6 +232,8 @@ Public Class dlgHomogenization ucrReceiverElement.SetLinkedDisplayControl(lblElement) ucrReceiverStation.SetLinkedDisplayControl(lblStation) + lstOfRadioButtons = New List(Of RadioButton) From {rdoSingle, rdoPrepare, rdoQualityControl, rdoMonthlyTotals, rdoHomogenization} + End Sub Private Sub SetDefaults() @@ -375,6 +381,8 @@ Public Class dlgHomogenization ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) AddPlotSummaryParameters() + + ResetRadioButtons() End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -433,6 +441,13 @@ Public Class dlgHomogenization ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub + Private Sub ResetRadioButtons() + With lstOfRadioButtons + .ForEach(Sub(radioButton) radioButton.Enabled = False) + .First().Enabled = True + End With + End Sub + Private Sub TestOkEnabled() If rdoSingle.Checked Then If ucrReceiverElement.IsEmpty OrElse Not ucrSaveResult.IsComplete OrElse (ucrInputComboMethod.GetText = "BinSeg" AndAlso ucrInputQ.IsEmpty) OrElse (ucrInputComboPenalty.GetText = "Asymptotic" AndAlso ucrInputPenValue.IsEmpty) OrElse ucrNudMinSegLen.GetText = "" Then @@ -692,4 +707,14 @@ Public Class dlgHomogenization End If End Sub + Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk + ' Enable the next radio button if within the limit + If iEnabledRadioButtonIndex >= 0 AndAlso iEnabledRadioButtonIndex < 5 Then + lstOfRadioButtons(iEnabledRadioButtonIndex + 1).Enabled = True + Else + ' If all radio buttons are enabled, you may want to reset the counter or handle it as per your requirements + ' For this example, I am resetting the counter to 0 + iEnabledRadioButtonIndex = 0 + End If + End Sub End Class \ No newline at end of file From 9552ffa4a7ea44e63c1c0eaf967db214b5129484 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 15 Jan 2024 11:06:16 +0300 Subject: [PATCH 17/25] Changes to the code --- instat/dlgHomogenization.vb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 8b89fcb9cb9..a12f6a2d2ad 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -232,7 +232,7 @@ Public Class dlgHomogenization ucrReceiverElement.SetLinkedDisplayControl(lblElement) ucrReceiverStation.SetLinkedDisplayControl(lblStation) - lstOfRadioButtons = New List(Of RadioButton) From {rdoSingle, rdoPrepare, rdoQualityControl, rdoMonthlyTotals, rdoHomogenization} + lstOfRadioButtons = New List(Of RadioButton) From {rdoPrepare, rdoQualityControl, rdoMonthlyTotals, rdoHomogenization} End Sub @@ -439,6 +439,8 @@ Public Class dlgHomogenization ucrSelectorStationFile.SetRCode(clsGetStnColumnsFunction, bReset) ucrChkPlot.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) + ucrInputFinalYear.SetRSyntax(ucrBase.clsRsyntax, bReset) + ucrInputInitialYear.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub Private Sub ResetRadioButtons() @@ -709,12 +711,22 @@ Public Class dlgHomogenization Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk ' Enable the next radio button if within the limit - If iEnabledRadioButtonIndex >= 0 AndAlso iEnabledRadioButtonIndex < 5 Then - lstOfRadioButtons(iEnabledRadioButtonIndex + 1).Enabled = True + If iEnabledRadioButtonIndex >= 0 AndAlso iEnabledRadioButtonIndex < lstOfRadioButtons.Count - 1 Then + ' Disable the current radio button + lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = False + + ' Enable the next radio button + iEnabledRadioButtonIndex += 1 + lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = True Else ' If all radio buttons are enabled, you may want to reset the counter or handle it as per your requirements ' For this example, I am resetting the counter to 0 iEnabledRadioButtonIndex = 0 + + ' Disable all radio buttons except the first one + For i As Integer = 2 To lstOfRadioButtons.Count - 1 + lstOfRadioButtons(i).Enabled = False + Next End If End Sub End Class \ No newline at end of file From f6c4a3ec19a3113e54436274bcd9338cddb6176e Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 15 Jan 2024 15:57:44 +0300 Subject: [PATCH 18/25] changes --- instat/dlgHomogenization.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index a12f6a2d2ad..2b754d36494 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -19,6 +19,7 @@ Imports instat.Translations Public Class dlgHomogenization Private bFirstLoad As Boolean = True Private bReset As Boolean = True + Private bResetRCode As Boolean = True Private clsCptMeanFunction, clsCptVarianceFunction, clsCptMeanVarianceFunction, clsExcludeNAFunction, clsPlotFunction, clsSummaryFunction, clsSnhtFunction, clsPettittFunction, clsBuishandFunction, clsTapplyFunction, clsDummyFunction, clsCsv2climatolFunction, clsHomogenQCFunctin, clsDdm2Function, clsHomogenFunction, clsGetColumnsFunction, clsGetStnColumnsFunction, clsCompleteCasesFunction, clsPmatchFunction, clsPmatch2Function, clsColumnsFunction, clsColumns2Function As New RFunction @@ -659,6 +660,8 @@ Public Class dlgHomogenization End Sub Private Sub ucrInputFinalYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFinalYear.ControlValueChanged + TestOkEnabled() + If Not ucrInputFinalYear.IsEmpty Then clsHomogenQCFunctin.AddParameter("anyf", ucrInputFinalYear.GetText, iPosition:=2, bIncludeArgumentName:=False) clsDdm2Function.AddParameter("initial", ucrInputFinalYear.GetText, bIncludeArgumentName:=False, iPosition:=2) @@ -671,6 +674,8 @@ Public Class dlgHomogenization End Sub Private Sub ucrInputInitialYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputInitialYear.ControlValueChanged + TestOkEnabled() + If Not ucrInputInitialYear.IsEmpty Then clsHomogenQCFunctin.AddParameter("anyi", ucrInputInitialYear.GetText, iPosition:=1, bIncludeArgumentName:=False) clsDdm2Function.AddParameter("final", ucrInputInitialYear.GetText, bIncludeArgumentName:=False, iPosition:=1) @@ -710,7 +715,6 @@ Public Class dlgHomogenization End Sub Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk - ' Enable the next radio button if within the limit If iEnabledRadioButtonIndex >= 0 AndAlso iEnabledRadioButtonIndex < lstOfRadioButtons.Count - 1 Then ' Disable the current radio button lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = False From 474b1130983213dc4bff70c9a773de73d31bd44e Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 17 Jan 2024 17:12:41 +0300 Subject: [PATCH 19/25] Changes --- instat/dlgHomogenization.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 2b754d36494..7b68a16a95d 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -717,7 +717,7 @@ Public Class dlgHomogenization Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk If iEnabledRadioButtonIndex >= 0 AndAlso iEnabledRadioButtonIndex < lstOfRadioButtons.Count - 1 Then ' Disable the current radio button - lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = False + 'lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = False ' Enable the next radio button iEnabledRadioButtonIndex += 1 @@ -728,9 +728,9 @@ Public Class dlgHomogenization iEnabledRadioButtonIndex = 0 ' Disable all radio buttons except the first one - For i As Integer = 2 To lstOfRadioButtons.Count - 1 - lstOfRadioButtons(i).Enabled = False - Next + 'For i As Integer = 2 To lstOfRadioButtons.Count - 1 + ' lstOfRadioButtons(i).Enabled = False + 'Next End If End Sub End Class \ No newline at end of file From 5e067fd584704f68b10a7595fce6eee4464d7f96 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 19 Jan 2024 09:47:54 +0300 Subject: [PATCH 20/25] changes to the code --- instat/dlgHomogenization.vb | 46 ++++++++----------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index 7b68a16a95d..d3a8c315c88 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -29,9 +29,6 @@ Public Class dlgHomogenization Private iEnabledRadioButtonIndex As Integer = 0 Private lstOfRadioButtons As List(Of RadioButton) - Private Sub ucrPnlOptions_Load(sender As Object, e As EventArgs) Handles ucrPnlOptions.Load - - End Sub Private Sub dlgHomogenization_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -135,15 +132,12 @@ Public Class dlgHomogenization ucrPnlOptions.AddRadioButton(rdoQualityControl) ucrPnlOptions.AddRadioButton(rdoMonthlyTotals) ucrPnlOptions.AddRadioButton(rdoHomogenization) - 'ucrPnlOptions.AddFunctionNamesCondition(rdoSingle, {"cpt.mean", "cpt.var", "cpt.meanvar", "snh.test", "pettitt.test", "br.test", "tapply"}) ucrPnlOptions.AddParameterValuesCondition(rdoSingle, "checked", "single") ucrPnlOptions.AddParameterValuesCondition(rdoPrepare, "checked", "prepare") ucrPnlOptions.AddParameterValuesCondition(rdoQualityControl, "checked", "quality") ucrPnlOptions.AddParameterValuesCondition(rdoMonthlyTotals, "checked", "month_totals") ucrPnlOptions.AddParameterValuesCondition(rdoHomogenization, "checked", "homogen") - - ucrChkPlot.SetText("Plot") ucrChkPlot.AddRSyntaxContainsFunctionNamesCondition(True, {"plot"}) ucrChkPlot.AddRSyntaxContainsFunctionNamesCondition(False, {"plot"}, False) @@ -211,12 +205,8 @@ 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.SetDataFrameSelector(ucrSelectorHomogenization.ucrAvailableDataFrames) ucrSaveResult.SetCheckBoxText("Save Test Object:") - 'ucrSaveResult.SetSaveTypeAsModel() - 'ucrSaveResult.SetIsComboBox() - 'ucrSaveResult.SetPrefix("Test") - 'ucrSaveResult.SetAssignToIfUncheckedValue("last_model") + ucrPnlOptions.AddToLinkedControls({ucrSelectorHomogenization, ucrSaveResult, ucrReceiverNeighbour, ucrReceiverStation, ucrReceiverElement}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrInputClimateVariables}, {rdoPrepare, rdoQualityControl, rdoHomogenization, rdoMonthlyTotals}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrInputInitialYear, ucrInputFinalYear}, {rdoQualityControl, rdoHomogenization, rdoMonthlyTotals}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -271,7 +261,6 @@ Public Class dlgHomogenization ucrReceiverDataFiles.SetMeAsReceiver() ucrSelectorDataFiles.Reset() ucrSelectorStationFile.Reset() - 'ucrSaveResult.Reset() 'TODO: Set conditions properly! rdoSnht.Checked = True @@ -416,19 +405,10 @@ Public Class dlgHomogenization ucrReceiverStation.SetRCode(clsLeftBracketOperator, bReset) - 'ucrPnlMethods.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - 'ucrPnlOptions.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) If bReset Then ucrPnlOptions.SetRCode(clsDummyFunction, bReset) End If - 'ucrSaveResult.AddAdditionalRCode(clsCptVarianceFunction, iAdditionalPairNo:=1) - 'ucrSaveResult.AddAdditionalRCode(clsCptMeanVarianceFunction, iAdditionalPairNo:=2) - 'ucrSaveResult.AddAdditionalRCode(clsPettittFunction, iAdditionalPairNo:=3) - 'ucrSaveResult.AddAdditionalRCode(clsSnhtFunction, iAdditionalPairNo:=4) - 'ucrSaveResult.AddAdditionalRCode(clsBuishandFunction, iAdditionalPairNo:=5) - - 'ucrSaveResult.SetRCode(clsCptMeanFunction, bReset) ucrReceiverDataFiles.SetRCode(clsGetColumnsFunction, bReset) ucrSelectorDataFiles.SetRCode(clsGetColumnsFunction, bReset) ucrReceiverLatitude.SetRCode(clsGetColumnsFunction, bReset) @@ -546,13 +526,6 @@ Public Class dlgHomogenization TestOkEnabled() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, - ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, - ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, ucrInputFinalYear.ControlContentsChanged, ucrInputInitialYear.ControlContentsChanged, ucrInputClimateVariables.ControlContentsChanged, - ucrReceiverStationName.ControlContentsChanged, ucrReceiverStationId.ControlContentsChanged, ucrReceiverLongtitude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged - TestOkEnabled() - End Sub - Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoSingle.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsSnhtFunction) @@ -690,7 +663,7 @@ Public Class dlgHomogenization Private Sub ucrReceiverLatitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverLatitude.ControlValueChanged, ucrReceiverElavation.ControlValueChanged, ucrReceiverLongtitude.ControlValueChanged, ucrReceiverStationId.ControlValueChanged, ucrReceiverStationName.ControlValueChanged If Not ucrReceiverLatitude.IsEmpty AndAlso Not ucrReceiverLongtitude.IsEmpty Then - Dim lstVariables As List(Of String) = New List(Of String)() + Dim lstVariables As New List(Of String)() lstVariables.Add(ucrReceiverLatitude.GetVariableNames()) lstVariables.Add(ucrReceiverLongtitude.GetVariableNames()) @@ -716,9 +689,6 @@ Public Class dlgHomogenization Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk If iEnabledRadioButtonIndex >= 0 AndAlso iEnabledRadioButtonIndex < lstOfRadioButtons.Count - 1 Then - ' Disable the current radio button - 'lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = False - ' Enable the next radio button iEnabledRadioButtonIndex += 1 lstOfRadioButtons(iEnabledRadioButtonIndex).Enabled = True @@ -726,11 +696,13 @@ Public Class dlgHomogenization ' If all radio buttons are enabled, you may want to reset the counter or handle it as per your requirements ' For this example, I am resetting the counter to 0 iEnabledRadioButtonIndex = 0 - - ' Disable all radio buttons except the first one - 'For i As Integer = 2 To lstOfRadioButtons.Count - 1 - ' lstOfRadioButtons(i).Enabled = False - 'Next End If End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrSaveResult.ControlContentsChanged, + ucrInputQ.ControlContentsChanged, ucrInputPenValue.ControlContentsChanged, ucrNudMinSegLen.ControlContentsChanged, + ucrInputComboMethod.ControlContentsChanged, ucrInputComboPenalty.ControlContentsChanged, ucrReceiverDataFiles.ControlContentsChanged, ucrInputFinalYear.ControlContentsChanged, ucrInputInitialYear.ControlContentsChanged, ucrInputClimateVariables.ControlContentsChanged, + ucrReceiverStationName.ControlContentsChanged, ucrReceiverStationId.ControlContentsChanged, ucrReceiverLongtitude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file From 92262b51db78e6c66ba44f5c3b47ff713b00fd6b Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 19 Jan 2024 10:17:56 +0300 Subject: [PATCH 21/25] changes to the code --- instat/dlgIDFCurves.vb | 15 ++++++++++++--- instat/frmMain.Designer.vb | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/instat/dlgIDFCurves.vb b/instat/dlgIDFCurves.vb index e046763b097..d0e3ce284eb 100644 --- a/instat/dlgIDFCurves.vb +++ b/instat/dlgIDFCurves.vb @@ -135,7 +135,11 @@ Public Class dlgIDFCurves End Sub Private Sub ucrNudMaxPrec_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaxPrec.ControlValueChanged - clsIDFCurvesFunction.AddParameter("mindpy", ucrNudMaxPrec.GetText, iPosition:=5) + If Not ucrNudMaxPrec.IsEmpty Then + clsIDFCurvesFunction.AddParameter("mindpy", ucrNudMaxPrec.GetText, iPosition:=5) + Else + clsIDFCurvesFunction.RemoveParameterByName("mindpy") + End If End Sub Private Sub ucrStationName_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrStationName.ControlValueChanged @@ -147,8 +151,13 @@ Public Class dlgIDFCurves End Sub Private Sub ucrIDFCurvesSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrIDFCurvesSelector.ControlValueChanged - clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrIDFCurvesSelector.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) - clsIDFCurvesFunction.AddParameter("data", ucrIDFCurvesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + If Not ucrIDFCurvesSelector.IsEmpty Then + clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrIDFCurvesSelector.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsIDFCurvesFunction.AddParameter("data", ucrIDFCurvesSelector.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem, bIncludeArgumentName:=False, iPosition:=0) + Else + clsColumnsFunction.RemoveParameterByName("data") + clsIDFCurvesFunction.RemoveParameterByName("data") + End If End Sub Private Sub ucrReceiverDateTime_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDateTime.ControlContentsChanged, diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index aed32956f7f..feea27fc959 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -5103,6 +5103,9 @@ Partial Class frmMain Me.MainMenuStrip = Me.mnuBar Me.Margin = New System.Windows.Forms.Padding(4) Me.Name = "frmMain" + Me.Text = "R-Instat " + My.Application.Info.Version.Major.ToString + "." + + My.Application.Info.Version.Minor.ToString + "." + + My.Application.Info.Version.Build.ToString Me.Text = "R-Instat .." Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.stsStrip.ResumeLayout(False) From 1c3cf89cd49fe973a0ac7e9fe7da67277f578e52 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 19 Jan 2024 10:30:58 +0300 Subject: [PATCH 22/25] code change --- instat/dlgHomogenization.vb | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/instat/dlgHomogenization.vb b/instat/dlgHomogenization.vb index d3a8c315c88..a3132b561ac 100644 --- a/instat/dlgHomogenization.vb +++ b/instat/dlgHomogenization.vb @@ -609,13 +609,23 @@ Public Class dlgHomogenization End Sub Private Sub ucrSelectorDataFiles_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDataFiles.ControlValueChanged - clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) - clsCsv2climatolFunction.AddParameter("data", Chr(34) & ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + If Not ucrSelectorDataFiles.IsEmpty Then + clsColumnsFunction.AddParameter("data", clsRCodeStructureParameter:=ucrSelectorDataFiles.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsCsv2climatolFunction.AddParameter("data", Chr(34) & ucrSelectorDataFiles.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + Else + clsColumnsFunction.RemoveParameterByName("data") + clsCsv2climatolFunction.RemoveParameterByName("data") + End If End Sub Private Sub ucrSelectorStationFile_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorStationFile.ControlValueChanged - clsColumns2Function.AddParameter("stndata", clsRCodeStructureParameter:=ucrSelectorStationFile.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) - clsCsv2climatolFunction.AddParameter("stnfile", Chr(34) & ucrSelectorStationFile.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), iPosition:=2) + If Not ucrSelectorStationFile.IsEmpty Then + clsColumns2Function.AddParameter("stndata", clsRCodeStructureParameter:=ucrSelectorStationFile.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) + clsCsv2climatolFunction.AddParameter("stnfile", Chr(34) & ucrSelectorStationFile.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & ".csv" & Chr(34), iPosition:=2) + Else + clsColumns2Function.RemoveParameterByName("stndata") + clsCsv2climatolFunction.RemoveParameterByName("stnfile") + End If End Sub Private Sub ucrInputClimateVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputClimateVariables.ControlValueChanged @@ -633,8 +643,6 @@ Public Class dlgHomogenization End Sub Private Sub ucrInputFinalYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFinalYear.ControlValueChanged - TestOkEnabled() - If Not ucrInputFinalYear.IsEmpty Then clsHomogenQCFunctin.AddParameter("anyf", ucrInputFinalYear.GetText, iPosition:=2, bIncludeArgumentName:=False) clsDdm2Function.AddParameter("initial", ucrInputFinalYear.GetText, bIncludeArgumentName:=False, iPosition:=2) @@ -647,8 +655,6 @@ Public Class dlgHomogenization End Sub Private Sub ucrInputInitialYear_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputInitialYear.ControlValueChanged - TestOkEnabled() - If Not ucrInputInitialYear.IsEmpty Then clsHomogenQCFunctin.AddParameter("anyi", ucrInputInitialYear.GetText, iPosition:=1, bIncludeArgumentName:=False) clsDdm2Function.AddParameter("final", ucrInputInitialYear.GetText, bIncludeArgumentName:=False, iPosition:=1) From 3054db1cc932e54f40dab7bc44960fba592e23a4 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 22 Jan 2024 13:40:13 +0300 Subject: [PATCH 23/25] fixed bug --- instat/static/InstatObject/R/instat_object_R6.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 53a7c82fb5e..fd19d0d0f00 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1921,14 +1921,14 @@ DataBook$set("public", "export_workspace", function(data_names, file, include_gr for(temp_name in data_names) { e[[temp_name]] <- self$get_data_frame(temp_name, use_current_filter = FALSE) if(include_graphs) { - graphs <- self$get_graphs(temp_name) + graphs <- self$get_objects(data_name = temp_name, object_type_label = "graph") graph_names <- names(graphs) for(i in seq_along(graphs)) { e[[paste(temp_name, graph_names[i], sep = "_")]] <- graphs[[i]] } } if(include_models) { - models <- self$get_models(temp_name) + models <- self$get_objects(data_name = temp_name, object_type_label = "model") model_names <- names(models) for(i in seq_along(models)) { e[[paste(temp_name, model_names[i], sep = "_")]] <- models[[i]] From cf78b694b266c9aa29c824507f168868e3f20c7e Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 22 Jan 2024 15:15:43 +0300 Subject: [PATCH 24/25] chsnges to the code --- instat/UcrGeomListWithAes.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/UcrGeomListWithAes.vb b/instat/UcrGeomListWithAes.vb index f4028853efb..ef4c78eb9c2 100644 --- a/instat/UcrGeomListWithAes.vb +++ b/instat/UcrGeomListWithAes.vb @@ -344,7 +344,7 @@ Public Class ucrGeomListWithParameters 'This is a temporary solution to issue which should be solved with geoms 'This adds "" aes for x or y when no variables are mapped to them for geoms which require it, either adding to the global or local aes. - If clsGeomFunction.strRCommand = "geom_boxplot" OrElse clsGeomFunction.strRCommand = "geom_dotplot" Then + If clsGeomFunction.strRCommand = "geom_boxplot" OrElse clsGeomFunction.strRCommand = "geom_dotplot" OrElse clsGeomFunction.strRCommand = "geom_violin" Then If (clsGlobalAesFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "x") = -1 OrElse ucrChkIgnoreGlobalAes.Checked) AndAlso clsLocalAesFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "x") = -1 Then clsCurrentAesFunction.AddParameter("x", Chr(34) & Chr(34)) End If @@ -358,6 +358,9 @@ Public Class ucrGeomListWithParameters End If 'Adding stat = identity method If {"geom_bar", "geom_density", "geom_freqpoly"}.Contains(clsGeomFunction.strRCommand) Then + If (clsGlobalAesFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "x") = -1 OrElse ucrChkIgnoreGlobalAes.Checked) AndAlso clsLocalAesFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "x") = -1 Then + clsCurrentAesFunction.AddParameter("x", Chr(34) & Chr(34)) + End If 'If there is a y in the global aes, and the global aes are not ignored or if there is a y in the local aes then in case stat has not been set manually, stat is set to identity. If (((clsGlobalAesFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "y") <> -1) AndAlso ((clsGeomFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "inherit.aes") = -1) OrElse (Not ucrChkIgnoreGlobalAes.Checked))) OrElse (clsLocalAesFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "y") <> -1)) AndAlso (clsGeomFunction.clsParameters.FindIndex(Function(x) x.strArgumentName = "stat") = -1) Then clsGeomFunction.AddParameter("stat", Chr(34) & "identity" & Chr(34)) From 1ead6d5ead96f3c86b63e22a4d104c0ae93f84b4 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 22 Jan 2024 15:32:19 +0300 Subject: [PATCH 25/25] chsnges --- instat/dlgBoxPlot.designer.vb | 16 ++++++++-------- instat/translations/rInstatTranslations.db | Bin 8302592 -> 8302592 bytes 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/instat/dlgBoxPlot.designer.vb b/instat/dlgBoxPlot.designer.vb index a722ae22baf..ccb4edde49b 100644 --- a/instat/dlgBoxPlot.designer.vb +++ b/instat/dlgBoxPlot.designer.vb @@ -108,7 +108,7 @@ Partial Class dlgBoxplot Me.rdoBoxplotTufte.Size = New System.Drawing.Size(133, 27) Me.rdoBoxplotTufte.TabIndex = 1 Me.rdoBoxplotTufte.TabStop = True - Me.rdoBoxplotTufte.Text = "Boxplot/Tufte Boxplot" + Me.rdoBoxplotTufte.Text = "Boxplot" Me.rdoBoxplotTufte.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoBoxplotTufte.UseVisualStyleBackColor = True ' @@ -172,42 +172,42 @@ Partial Class dlgBoxplot ' Me.contextMenuStripOptions.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripMenuItemPlotOptions, Me.toolStripMenuItemBoxOptions, Me.toolStripMenuItemJitterOptions, Me.toolStripMenuItemSummaryOptions, Me.toolStripMenuItemTufteOptions, Me.toolStripMenuItemViolinOptions}) Me.contextMenuStripOptions.Name = "contextMenuStripOk" - Me.contextMenuStripOptions.Size = New System.Drawing.Size(181, 158) + Me.contextMenuStripOptions.Size = New System.Drawing.Size(171, 136) ' 'toolStripMenuItemPlotOptions ' Me.toolStripMenuItemPlotOptions.Name = "toolStripMenuItemPlotOptions" - Me.toolStripMenuItemPlotOptions.Size = New System.Drawing.Size(180, 22) + Me.toolStripMenuItemPlotOptions.Size = New System.Drawing.Size(170, 22) Me.toolStripMenuItemPlotOptions.Text = "Plot Options" ' 'toolStripMenuItemBoxOptions ' Me.toolStripMenuItemBoxOptions.Name = "toolStripMenuItemBoxOptions" - Me.toolStripMenuItemBoxOptions.Size = New System.Drawing.Size(180, 22) + Me.toolStripMenuItemBoxOptions.Size = New System.Drawing.Size(170, 22) Me.toolStripMenuItemBoxOptions.Text = "Boxplot Options" ' 'toolStripMenuItemJitterOptions ' Me.toolStripMenuItemJitterOptions.Name = "toolStripMenuItemJitterOptions" - Me.toolStripMenuItemJitterOptions.Size = New System.Drawing.Size(180, 22) + Me.toolStripMenuItemJitterOptions.Size = New System.Drawing.Size(170, 22) Me.toolStripMenuItemJitterOptions.Text = "Jitter Options" ' 'toolStripMenuItemSummaryOptions ' Me.toolStripMenuItemSummaryOptions.Name = "toolStripMenuItemSummaryOptions" - Me.toolStripMenuItemSummaryOptions.Size = New System.Drawing.Size(180, 22) + Me.toolStripMenuItemSummaryOptions.Size = New System.Drawing.Size(170, 22) Me.toolStripMenuItemSummaryOptions.Text = "Summary Options" ' 'toolStripMenuItemTufteOptions ' Me.toolStripMenuItemTufteOptions.Name = "toolStripMenuItemTufteOptions" - Me.toolStripMenuItemTufteOptions.Size = New System.Drawing.Size(180, 22) + Me.toolStripMenuItemTufteOptions.Size = New System.Drawing.Size(170, 22) Me.toolStripMenuItemTufteOptions.Text = "Tufte Options" ' 'toolStripMenuItemViolinOptions ' Me.toolStripMenuItemViolinOptions.Name = "toolStripMenuItemViolinOptions" - Me.toolStripMenuItemViolinOptions.Size = New System.Drawing.Size(180, 22) + Me.toolStripMenuItemViolinOptions.Size = New System.Drawing.Size(170, 22) Me.toolStripMenuItemViolinOptions.Text = "Violin Options" ' 'ucrInputSummaries diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 82986ede7c30ed9c7e24823a908c088e143d99a8..e10a26275f882750d62bb3e1192ab808f50c4c33 100644 GIT binary patch delta 470 zcmWO2+g6NW0D$5C8YJy(Qkkehm^2ZQeJL3f$+kq^C>a`M^HbTZXuZp6j^;|NSq{4m zM{dEXlY9ry4Lr+#{*^5UtH~($qp3g2eMKTEl`=`l2H7Z^q+B*jg=~>Zsgi1`ky_a* z+hn`!kUH5Z_0k}XvP+WEB)esgG)s%5WUuU#{n9E2s&pq&$(QG9}aUOlIV{l&ke6p~%I@(aE g&BW>N*-RX~4?YA7!D6r!d<;GXpNrYdmtWuh13CJxwg3PC delta 466 zcmWO2Syzm40Kj2y4WqQkRw-IkRK`wr5sj@#Xo~VnVJuO2?VO48JKe_3`$?SPvaivV zb9@4~Zunn3U*IYH`deBE78|1c*T%jmKaWIGBBhd&m9k3GvRcZdT-Hd1R7#ap%UY?C zb+TSI$VS;DwNfYbvRN9WQMSldX_97XkyhCzZPG3svR!sar*uiT?39e`lHIaL_R2ol zF9+nH9FiV6EJx(19Fya6LQcvl>6O!RM*8HeoRfaZ%6YjU7v+*%mH`=*D{@taZp*k#$Q=nklX6$4WLoaYeR&{xc_@$Mu{@C(c`DCjR_5fnypWgQ ziT^c4e~L86L*=RJ$`zf-_J;~Byt}ZEj%e5xGnK+&N_&rdy dkj=!wtKfC;CU_gX3*HAGf{(>)=F`v5{{hBruHXOw