From f6877f8e7b66f369737adb3a6089b9c22b48649e Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Thu, 23 Nov 2023 16:36:20 +0300 Subject: [PATCH 01/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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/57] 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 b02ccd707d0d0dec17ac706f57206e461a2ce8f8 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Tue, 19 Dec 2023 17:24:42 +0100 Subject: [PATCH 13/57] Added reduce Water --- instat/dlgEndOfRainsSeason.Designer.vb | 286 +-- instat/dlgEndOfRainsSeason.vb | 180 +- instat/dlgTransformClimatic.Designer.vb | 576 ++--- instat/dlgTransformClimatic.resx | 2074 ++++++++--------- instat/dlgTransformClimatic.vb | 96 +- .../InstatObject/R/stand_alone_functions.R | 22 + 6 files changed, 1609 insertions(+), 1625 deletions(-) diff --git a/instat/dlgEndOfRainsSeason.Designer.vb b/instat/dlgEndOfRainsSeason.Designer.vb index 538b4708bfc..cdaaea08385 100644 --- a/instat/dlgEndOfRainsSeason.Designer.vb +++ b/instat/dlgEndOfRainsSeason.Designer.vb @@ -51,7 +51,6 @@ Partial Class dlgEndOfRainsSeason Me.cmdDoyRange = New System.Windows.Forms.Button() Me.rdoVariableEvaporation = New System.Windows.Forms.RadioButton() Me.rdoValueEvaporation = New System.Windows.Forms.RadioButton() - Me.lblReplaceNA = New System.Windows.Forms.Label() Me.grpEndofSeason = New System.Windows.Forms.GroupBox() Me.ucrInputEndofSeasonOccurence = New instat.ucrInputTextBox() Me.ucrInputSeasonDoy = New instat.ucrInputTextBox() @@ -69,7 +68,6 @@ Partial Class dlgEndOfRainsSeason Me.rdoEndOfSeasons = New System.Windows.Forms.RadioButton() Me.rdoEndOfRains = New System.Windows.Forms.RadioButton() Me.ucrPnlEndOfRainsAndSeasons = New instat.UcrPanel() - Me.ucrInputReplaceNA = New instat.ucrInputTextBox() Me.ucrReceiverEvaporation = New instat.ucrReceiverSingle() Me.ucrInputEvaporation = New instat.ucrInputTextBox() Me.ucrPnlEvaporation = New instat.UcrPanel() @@ -94,40 +92,36 @@ Partial Class dlgEndOfRainsSeason 'lblYear ' Me.lblYear.AutoSize = True - Me.lblYear.Location = New System.Drawing.Point(459, 206) - Me.lblYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblYear.Location = New System.Drawing.Point(306, 137) Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(47, 20) + Me.lblYear.Size = New System.Drawing.Size(32, 13) Me.lblYear.TabIndex = 5 Me.lblYear.Text = "Year:" ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(459, 136) - Me.lblDate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblDate.Location = New System.Drawing.Point(306, 91) Me.lblDate.Name = "lblDate" - Me.lblDate.Size = New System.Drawing.Size(48, 20) + Me.lblDate.Size = New System.Drawing.Size(33, 13) Me.lblDate.TabIndex = 3 Me.lblDate.Text = "Date:" ' 'lblDOY ' Me.lblDOY.AutoSize = True - Me.lblDOY.Location = New System.Drawing.Point(459, 272) - Me.lblDOY.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblDOY.Location = New System.Drawing.Point(306, 181) Me.lblDOY.Name = "lblDOY" - Me.lblDOY.Size = New System.Drawing.Size(97, 20) + Me.lblDOY.Size = New System.Drawing.Size(66, 13) Me.lblDOY.TabIndex = 7 Me.lblDOY.Text = "Day of Year:" ' 'lblCapacity ' Me.lblCapacity.AutoSize = True - Me.lblCapacity.Location = New System.Drawing.Point(24, 465) - Me.lblCapacity.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblCapacity.Location = New System.Drawing.Point(16, 310) Me.lblCapacity.Name = "lblCapacity" - Me.lblCapacity.Size = New System.Drawing.Size(74, 20) + Me.lblCapacity.Size = New System.Drawing.Size(51, 13) Me.lblCapacity.TabIndex = 20 Me.lblCapacity.Tag = "Capacity:" Me.lblCapacity.Text = "Capacity:" @@ -135,60 +129,54 @@ Partial Class dlgEndOfRainsSeason 'lblRainfall ' Me.lblRainfall.AutoSize = True - Me.lblRainfall.Location = New System.Drawing.Point(459, 338) - Me.lblRainfall.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblRainfall.Location = New System.Drawing.Point(306, 225) Me.lblRainfall.Name = "lblRainfall" - Me.lblRainfall.Size = New System.Drawing.Size(104, 20) + Me.lblRainfall.Size = New System.Drawing.Size(70, 13) Me.lblRainfall.TabIndex = 9 Me.lblRainfall.Text = "Rain Column:" ' 'lblEvaporation ' Me.lblEvaporation.AutoSize = True - Me.lblEvaporation.Location = New System.Drawing.Point(22, 517) - Me.lblEvaporation.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEvaporation.Location = New System.Drawing.Point(15, 345) Me.lblEvaporation.Name = "lblEvaporation" - Me.lblEvaporation.Size = New System.Drawing.Size(98, 20) + Me.lblEvaporation.Size = New System.Drawing.Size(67, 13) Me.lblEvaporation.TabIndex = 24 Me.lblEvaporation.Text = "Evaporation:" ' 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(459, 69) - Me.lblStation.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblStation.Location = New System.Drawing.Point(306, 46) Me.lblStation.Name = "lblStation" - Me.lblStation.Size = New System.Drawing.Size(64, 20) + Me.lblStation.Size = New System.Drawing.Size(43, 13) Me.lblStation.TabIndex = 1 Me.lblStation.Text = "Station:" ' 'lblAmount ' Me.lblAmount.AutoSize = True - Me.lblAmount.Location = New System.Drawing.Point(22, 465) - Me.lblAmount.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblAmount.Location = New System.Drawing.Point(15, 310) Me.lblAmount.Name = "lblAmount" - Me.lblAmount.Size = New System.Drawing.Size(69, 20) + Me.lblAmount.Size = New System.Drawing.Size(46, 13) Me.lblAmount.TabIndex = 14 Me.lblAmount.Text = "Amount:" ' 'lblTotalOverDays ' Me.lblTotalOverDays.AutoSize = True - Me.lblTotalOverDays.Location = New System.Drawing.Point(242, 465) - Me.lblTotalOverDays.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTotalOverDays.Location = New System.Drawing.Point(161, 310) Me.lblTotalOverDays.Name = "lblTotalOverDays" - Me.lblTotalOverDays.Size = New System.Drawing.Size(96, 20) + Me.lblTotalOverDays.Size = New System.Drawing.Size(66, 13) Me.lblTotalOverDays.TabIndex = 16 Me.lblTotalOverDays.Text = "Over Day(s):" ' 'lblWaterBalanceLessThan ' Me.lblWaterBalanceLessThan.AutoSize = True - Me.lblWaterBalanceLessThan.Location = New System.Drawing.Point(202, 465) - Me.lblWaterBalanceLessThan.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblWaterBalanceLessThan.Location = New System.Drawing.Point(135, 310) Me.lblWaterBalanceLessThan.Name = "lblWaterBalanceLessThan" - Me.lblWaterBalanceLessThan.Size = New System.Drawing.Size(136, 20) + Me.lblWaterBalanceLessThan.Size = New System.Drawing.Size(93, 13) Me.lblWaterBalanceLessThan.TabIndex = 22 Me.lblWaterBalanceLessThan.Tag = "Water Balance <=" Me.lblWaterBalanceLessThan.Text = "Water Balance <=" @@ -196,10 +184,9 @@ Partial Class dlgEndOfRainsSeason 'cmdDoyRange ' Me.cmdDoyRange.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdDoyRange.Location = New System.Drawing.Point(33, 405) - Me.cmdDoyRange.Margin = New System.Windows.Forms.Padding(4) + Me.cmdDoyRange.Location = New System.Drawing.Point(22, 270) Me.cmdDoyRange.Name = "cmdDoyRange" - Me.cmdDoyRange.Size = New System.Drawing.Size(158, 39) + Me.cmdDoyRange.Size = New System.Drawing.Size(105, 26) Me.cmdDoyRange.TabIndex = 11 Me.cmdDoyRange.Tag = "" Me.cmdDoyRange.Text = "Day Range" @@ -208,10 +195,9 @@ Partial Class dlgEndOfRainsSeason 'rdoVariableEvaporation ' Me.rdoVariableEvaporation.AutoSize = True - Me.rdoVariableEvaporation.Location = New System.Drawing.Point(335, 513) - Me.rdoVariableEvaporation.Margin = New System.Windows.Forms.Padding(4) + Me.rdoVariableEvaporation.Location = New System.Drawing.Point(223, 342) Me.rdoVariableEvaporation.Name = "rdoVariableEvaporation" - Me.rdoVariableEvaporation.Size = New System.Drawing.Size(92, 24) + Me.rdoVariableEvaporation.Size = New System.Drawing.Size(63, 17) Me.rdoVariableEvaporation.TabIndex = 28 Me.rdoVariableEvaporation.Text = "Variable" Me.rdoVariableEvaporation.UseVisualStyleBackColor = True @@ -219,24 +205,13 @@ Partial Class dlgEndOfRainsSeason 'rdoValueEvaporation ' Me.rdoValueEvaporation.AutoSize = True - Me.rdoValueEvaporation.Location = New System.Drawing.Point(144, 513) - Me.rdoValueEvaporation.Margin = New System.Windows.Forms.Padding(4) + Me.rdoValueEvaporation.Location = New System.Drawing.Point(96, 342) Me.rdoValueEvaporation.Name = "rdoValueEvaporation" - Me.rdoValueEvaporation.Size = New System.Drawing.Size(75, 24) + Me.rdoValueEvaporation.Size = New System.Drawing.Size(52, 17) Me.rdoValueEvaporation.TabIndex = 26 Me.rdoValueEvaporation.Text = "Value" Me.rdoValueEvaporation.UseVisualStyleBackColor = True ' - 'lblReplaceNA - ' - Me.lblReplaceNA.AutoSize = True - Me.lblReplaceNA.Location = New System.Drawing.Point(122, 603) - Me.lblReplaceNA.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblReplaceNA.Name = "lblReplaceNA" - Me.lblReplaceNA.Size = New System.Drawing.Size(130, 20) - Me.lblReplaceNA.TabIndex = 30 - Me.lblReplaceNA.Text = "Replace NA with:" - ' 'grpEndofSeason ' Me.grpEndofSeason.Controls.Add(Me.ucrInputEndofSeasonOccurence) @@ -245,11 +220,9 @@ Partial Class dlgEndOfRainsSeason Me.grpEndofSeason.Controls.Add(Me.ucrChkEndofSeasonOccurence) Me.grpEndofSeason.Controls.Add(Me.ucrChkEndofSeasonDate) Me.grpEndofSeason.Controls.Add(Me.ucrChkEndofSeasonDoy) - Me.grpEndofSeason.Location = New System.Drawing.Point(4, 639) - Me.grpEndofSeason.Margin = New System.Windows.Forms.Padding(4) + Me.grpEndofSeason.Location = New System.Drawing.Point(3, 426) Me.grpEndofSeason.Name = "grpEndofSeason" - Me.grpEndofSeason.Padding = New System.Windows.Forms.Padding(4) - Me.grpEndofSeason.Size = New System.Drawing.Size(708, 62) + Me.grpEndofSeason.Size = New System.Drawing.Size(472, 41) Me.grpEndofSeason.TabIndex = 32 Me.grpEndofSeason.TabStop = False Me.grpEndofSeason.Text = "End of Season" @@ -260,10 +233,10 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofSeasonOccurence.AutoSize = True Me.ucrInputEndofSeasonOccurence.IsMultiline = False Me.ucrInputEndofSeasonOccurence.IsReadOnly = False - Me.ucrInputEndofSeasonOccurence.Location = New System.Drawing.Point(542, 22) - Me.ucrInputEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputEndofSeasonOccurence.Location = New System.Drawing.Point(361, 15) + Me.ucrInputEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputEndofSeasonOccurence.Name = "ucrInputEndofSeasonOccurence" - Me.ucrInputEndofSeasonOccurence.Size = New System.Drawing.Size(156, 32) + Me.ucrInputEndofSeasonOccurence.Size = New System.Drawing.Size(104, 21) Me.ucrInputEndofSeasonOccurence.TabIndex = 38 ' 'ucrInputSeasonDoy @@ -272,10 +245,10 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputSeasonDoy.AutoSize = True Me.ucrInputSeasonDoy.IsMultiline = False Me.ucrInputSeasonDoy.IsReadOnly = False - Me.ucrInputSeasonDoy.Location = New System.Drawing.Point(74, 22) - Me.ucrInputSeasonDoy.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputSeasonDoy.Location = New System.Drawing.Point(49, 15) + Me.ucrInputSeasonDoy.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputSeasonDoy.Name = "ucrInputSeasonDoy" - Me.ucrInputSeasonDoy.Size = New System.Drawing.Size(100, 32) + Me.ucrInputSeasonDoy.Size = New System.Drawing.Size(67, 21) Me.ucrInputSeasonDoy.TabIndex = 32 ' 'ucrInputEndofSeasonDate @@ -284,40 +257,40 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofSeasonDate.AutoSize = True Me.ucrInputEndofSeasonDate.IsMultiline = False Me.ucrInputEndofSeasonDate.IsReadOnly = False - Me.ucrInputEndofSeasonDate.Location = New System.Drawing.Point(248, 22) - Me.ucrInputEndofSeasonDate.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputEndofSeasonDate.Location = New System.Drawing.Point(165, 15) + Me.ucrInputEndofSeasonDate.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputEndofSeasonDate.Name = "ucrInputEndofSeasonDate" - Me.ucrInputEndofSeasonDate.Size = New System.Drawing.Size(165, 32) + Me.ucrInputEndofSeasonDate.Size = New System.Drawing.Size(110, 21) Me.ucrInputEndofSeasonDate.TabIndex = 37 ' 'ucrChkEndofSeasonOccurence ' Me.ucrChkEndofSeasonOccurence.AutoSize = True Me.ucrChkEndofSeasonOccurence.Checked = False - Me.ucrChkEndofSeasonOccurence.Location = New System.Drawing.Point(422, 26) - Me.ucrChkEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkEndofSeasonOccurence.Location = New System.Drawing.Point(281, 17) + Me.ucrChkEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkEndofSeasonOccurence.Name = "ucrChkEndofSeasonOccurence" - Me.ucrChkEndofSeasonOccurence.Size = New System.Drawing.Size(126, 51) + Me.ucrChkEndofSeasonOccurence.Size = New System.Drawing.Size(84, 34) Me.ucrChkEndofSeasonOccurence.TabIndex = 48 ' 'ucrChkEndofSeasonDate ' Me.ucrChkEndofSeasonDate.AutoSize = True Me.ucrChkEndofSeasonDate.Checked = False - Me.ucrChkEndofSeasonDate.Location = New System.Drawing.Point(182, 24) - Me.ucrChkEndofSeasonDate.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkEndofSeasonDate.Location = New System.Drawing.Point(121, 16) + Me.ucrChkEndofSeasonDate.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkEndofSeasonDate.Name = "ucrChkEndofSeasonDate" - Me.ucrChkEndofSeasonDate.Size = New System.Drawing.Size(80, 51) + Me.ucrChkEndofSeasonDate.Size = New System.Drawing.Size(53, 34) Me.ucrChkEndofSeasonDate.TabIndex = 47 ' 'ucrChkEndofSeasonDoy ' Me.ucrChkEndofSeasonDoy.AutoSize = True Me.ucrChkEndofSeasonDoy.Checked = False - Me.ucrChkEndofSeasonDoy.Location = New System.Drawing.Point(6, 24) - Me.ucrChkEndofSeasonDoy.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkEndofSeasonDoy.Location = New System.Drawing.Point(4, 16) + Me.ucrChkEndofSeasonDoy.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkEndofSeasonDoy.Name = "ucrChkEndofSeasonDoy" - Me.ucrChkEndofSeasonDoy.Size = New System.Drawing.Size(87, 51) + Me.ucrChkEndofSeasonDoy.Size = New System.Drawing.Size(58, 34) Me.ucrChkEndofSeasonDoy.TabIndex = 46 ' 'grpEndofRains @@ -328,11 +301,9 @@ Partial Class dlgEndOfRainsSeason Me.grpEndofRains.Controls.Add(Me.ucrChkEndofRainsDoy) Me.grpEndofRains.Controls.Add(Me.ucrChkEndofRainsDate) Me.grpEndofRains.Controls.Add(Me.ucrChkEndofRainsOccurence) - Me.grpEndofRains.Location = New System.Drawing.Point(4, 639) - Me.grpEndofRains.Margin = New System.Windows.Forms.Padding(4) + Me.grpEndofRains.Location = New System.Drawing.Point(3, 426) Me.grpEndofRains.Name = "grpEndofRains" - Me.grpEndofRains.Padding = New System.Windows.Forms.Padding(4) - Me.grpEndofRains.Size = New System.Drawing.Size(644, 60) + Me.grpEndofRains.Size = New System.Drawing.Size(429, 40) Me.grpEndofRains.TabIndex = 18 Me.grpEndofRains.TabStop = False Me.grpEndofRains.Text = "End of Rains" @@ -343,10 +314,10 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofRainsDate.AutoSize = True Me.ucrInputEndofRainsDate.IsMultiline = False Me.ucrInputEndofRainsDate.IsReadOnly = False - Me.ucrInputEndofRainsDate.Location = New System.Drawing.Point(248, 26) - Me.ucrInputEndofRainsDate.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputEndofRainsDate.Location = New System.Drawing.Point(165, 17) + Me.ucrInputEndofRainsDate.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputEndofRainsDate.Name = "ucrInputEndofRainsDate" - Me.ucrInputEndofRainsDate.Size = New System.Drawing.Size(140, 26) + Me.ucrInputEndofRainsDate.Size = New System.Drawing.Size(93, 17) Me.ucrInputEndofRainsDate.TabIndex = 36 ' 'ucrInputEndofRainsOccurence @@ -355,10 +326,10 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofRainsOccurence.AutoSize = True Me.ucrInputEndofRainsOccurence.IsMultiline = False Me.ucrInputEndofRainsOccurence.IsReadOnly = False - Me.ucrInputEndofRainsOccurence.Location = New System.Drawing.Point(512, 24) - Me.ucrInputEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputEndofRainsOccurence.Location = New System.Drawing.Point(341, 16) + Me.ucrInputEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputEndofRainsOccurence.Name = "ucrInputEndofRainsOccurence" - Me.ucrInputEndofRainsOccurence.Size = New System.Drawing.Size(141, 30) + Me.ucrInputEndofRainsOccurence.Size = New System.Drawing.Size(94, 20) Me.ucrInputEndofRainsOccurence.TabIndex = 39 ' 'ucrInputEndRainDoy @@ -367,40 +338,40 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndRainDoy.AutoSize = True Me.ucrInputEndRainDoy.IsMultiline = False Me.ucrInputEndRainDoy.IsReadOnly = False - Me.ucrInputEndRainDoy.Location = New System.Drawing.Point(75, 26) - Me.ucrInputEndRainDoy.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputEndRainDoy.Location = New System.Drawing.Point(50, 17) + Me.ucrInputEndRainDoy.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputEndRainDoy.Name = "ucrInputEndRainDoy" - Me.ucrInputEndRainDoy.Size = New System.Drawing.Size(98, 32) + Me.ucrInputEndRainDoy.Size = New System.Drawing.Size(65, 21) Me.ucrInputEndRainDoy.TabIndex = 50 ' 'ucrChkEndofRainsDoy ' Me.ucrChkEndofRainsDoy.AutoSize = True Me.ucrChkEndofRainsDoy.Checked = False - Me.ucrChkEndofRainsDoy.Location = New System.Drawing.Point(8, 27) - Me.ucrChkEndofRainsDoy.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkEndofRainsDoy.Location = New System.Drawing.Point(5, 18) + Me.ucrChkEndofRainsDoy.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkEndofRainsDoy.Name = "ucrChkEndofRainsDoy" - Me.ucrChkEndofRainsDoy.Size = New System.Drawing.Size(90, 51) + Me.ucrChkEndofRainsDoy.Size = New System.Drawing.Size(60, 34) Me.ucrChkEndofRainsDoy.TabIndex = 49 ' 'ucrChkEndofRainsDate ' Me.ucrChkEndofRainsDate.AutoSize = True Me.ucrChkEndofRainsDate.Checked = False - Me.ucrChkEndofRainsDate.Location = New System.Drawing.Point(177, 26) - Me.ucrChkEndofRainsDate.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkEndofRainsDate.Location = New System.Drawing.Point(118, 17) + Me.ucrChkEndofRainsDate.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkEndofRainsDate.Name = "ucrChkEndofRainsDate" - Me.ucrChkEndofRainsDate.Size = New System.Drawing.Size(78, 51) + Me.ucrChkEndofRainsDate.Size = New System.Drawing.Size(52, 34) Me.ucrChkEndofRainsDate.TabIndex = 48 ' 'ucrChkEndofRainsOccurence ' Me.ucrChkEndofRainsOccurence.AutoSize = True Me.ucrChkEndofRainsOccurence.Checked = False - Me.ucrChkEndofRainsOccurence.Location = New System.Drawing.Point(396, 24) - Me.ucrChkEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkEndofRainsOccurence.Location = New System.Drawing.Point(264, 16) + Me.ucrChkEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkEndofRainsOccurence.Name = "ucrChkEndofRainsOccurence" - Me.ucrChkEndofRainsOccurence.Size = New System.Drawing.Size(136, 51) + Me.ucrChkEndofRainsOccurence.Size = New System.Drawing.Size(91, 34) Me.ucrChkEndofRainsOccurence.TabIndex = 47 ' 'rdoEndOfSeasons @@ -411,10 +382,9 @@ Partial Class dlgEndOfRainsSeason Me.rdoEndOfSeasons.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEndOfSeasons.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoEndOfSeasons.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoEndOfSeasons.Location = New System.Drawing.Point(326, 15) - Me.rdoEndOfSeasons.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEndOfSeasons.Location = New System.Drawing.Point(217, 10) Me.rdoEndOfSeasons.Name = "rdoEndOfSeasons" - Me.rdoEndOfSeasons.Size = New System.Drawing.Size(195, 40) + Me.rdoEndOfSeasons.Size = New System.Drawing.Size(130, 27) Me.rdoEndOfSeasons.TabIndex = 36 Me.rdoEndOfSeasons.Text = "End of Season" Me.rdoEndOfSeasons.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -428,10 +398,9 @@ Partial Class dlgEndOfRainsSeason Me.rdoEndOfRains.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEndOfRains.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoEndOfRains.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoEndOfRains.Location = New System.Drawing.Point(134, 15) - Me.rdoEndOfRains.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEndOfRains.Location = New System.Drawing.Point(89, 10) Me.rdoEndOfRains.Name = "rdoEndOfRains" - Me.rdoEndOfRains.Size = New System.Drawing.Size(195, 40) + Me.rdoEndOfRains.Size = New System.Drawing.Size(130, 27) Me.rdoEndOfRains.TabIndex = 35 Me.rdoEndOfRains.Text = "End of Rains" Me.rdoEndOfRains.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -440,33 +409,21 @@ Partial Class dlgEndOfRainsSeason 'ucrPnlEndOfRainsAndSeasons ' Me.ucrPnlEndOfRainsAndSeasons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlEndOfRainsAndSeasons.Location = New System.Drawing.Point(118, 14) - Me.ucrPnlEndOfRainsAndSeasons.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlEndOfRainsAndSeasons.Location = New System.Drawing.Point(79, 9) + Me.ucrPnlEndOfRainsAndSeasons.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrPnlEndOfRainsAndSeasons.Name = "ucrPnlEndOfRainsAndSeasons" - Me.ucrPnlEndOfRainsAndSeasons.Size = New System.Drawing.Size(410, 52) + Me.ucrPnlEndOfRainsAndSeasons.Size = New System.Drawing.Size(273, 35) Me.ucrPnlEndOfRainsAndSeasons.TabIndex = 34 ' - 'ucrInputReplaceNA - ' - Me.ucrInputReplaceNA.AddQuotesIfUnrecognised = True - Me.ucrInputReplaceNA.AutoSize = True - Me.ucrInputReplaceNA.IsMultiline = False - Me.ucrInputReplaceNA.IsReadOnly = False - Me.ucrInputReplaceNA.Location = New System.Drawing.Point(264, 596) - Me.ucrInputReplaceNA.Margin = New System.Windows.Forms.Padding(14) - Me.ucrInputReplaceNA.Name = "ucrInputReplaceNA" - Me.ucrInputReplaceNA.Size = New System.Drawing.Size(78, 32) - Me.ucrInputReplaceNA.TabIndex = 31 - ' 'ucrReceiverEvaporation ' Me.ucrReceiverEvaporation.AutoSize = True Me.ucrReceiverEvaporation.frmParent = Me - Me.ucrReceiverEvaporation.Location = New System.Drawing.Point(431, 513) + Me.ucrReceiverEvaporation.Location = New System.Drawing.Point(287, 342) Me.ucrReceiverEvaporation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEvaporation.Name = "ucrReceiverEvaporation" Me.ucrReceiverEvaporation.Selector = Nothing - Me.ucrReceiverEvaporation.Size = New System.Drawing.Size(210, 30) + Me.ucrReceiverEvaporation.Size = New System.Drawing.Size(140, 20) Me.ucrReceiverEvaporation.strNcFilePath = "" Me.ucrReceiverEvaporation.TabIndex = 29 Me.ucrReceiverEvaporation.ucrSelector = Nothing @@ -477,19 +434,19 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEvaporation.AutoSize = True Me.ucrInputEvaporation.IsMultiline = False Me.ucrInputEvaporation.IsReadOnly = False - Me.ucrInputEvaporation.Location = New System.Drawing.Point(230, 513) - Me.ucrInputEvaporation.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputEvaporation.Location = New System.Drawing.Point(153, 342) + Me.ucrInputEvaporation.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputEvaporation.Name = "ucrInputEvaporation" - Me.ucrInputEvaporation.Size = New System.Drawing.Size(96, 32) + Me.ucrInputEvaporation.Size = New System.Drawing.Size(64, 21) Me.ucrInputEvaporation.TabIndex = 27 ' 'ucrPnlEvaporation ' Me.ucrPnlEvaporation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlEvaporation.Location = New System.Drawing.Point(144, 505) - Me.ucrPnlEvaporation.Margin = New System.Windows.Forms.Padding(9) + Me.ucrPnlEvaporation.Location = New System.Drawing.Point(96, 337) + Me.ucrPnlEvaporation.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrPnlEvaporation.Name = "ucrPnlEvaporation" - Me.ucrPnlEvaporation.Size = New System.Drawing.Size(518, 40) + Me.ucrPnlEvaporation.Size = New System.Drawing.Size(345, 27) Me.ucrPnlEvaporation.TabIndex = 25 ' 'ucrInputFilterPreview @@ -498,10 +455,10 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputFilterPreview.AutoSize = True Me.ucrInputFilterPreview.IsMultiline = False Me.ucrInputFilterPreview.IsReadOnly = True - Me.ucrInputFilterPreview.Location = New System.Drawing.Point(196, 410) - Me.ucrInputFilterPreview.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputFilterPreview.Location = New System.Drawing.Point(131, 273) + Me.ucrInputFilterPreview.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" - Me.ucrInputFilterPreview.Size = New System.Drawing.Size(363, 33) + Me.ucrInputFilterPreview.Size = New System.Drawing.Size(242, 22) Me.ucrInputFilterPreview.TabIndex = 12 ' 'ucrNudTotalOverDays @@ -509,12 +466,12 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudTotalOverDays.AutoSize = True Me.ucrNudTotalOverDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTotalOverDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTotalOverDays.Location = New System.Drawing.Point(350, 462) - Me.ucrNudTotalOverDays.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudTotalOverDays.Location = New System.Drawing.Point(233, 308) + Me.ucrNudTotalOverDays.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudTotalOverDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTotalOverDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTotalOverDays.Name = "ucrNudTotalOverDays" - Me.ucrNudTotalOverDays.Size = New System.Drawing.Size(75, 30) + Me.ucrNudTotalOverDays.Size = New System.Drawing.Size(50, 20) Me.ucrNudTotalOverDays.TabIndex = 17 Me.ucrNudTotalOverDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -523,12 +480,12 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudAmount.AutoSize = True Me.ucrNudAmount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudAmount.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudAmount.Location = New System.Drawing.Point(102, 462) - Me.ucrNudAmount.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudAmount.Location = New System.Drawing.Point(68, 308) + Me.ucrNudAmount.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudAmount.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudAmount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudAmount.Name = "ucrNudAmount" - Me.ucrNudAmount.Size = New System.Drawing.Size(75, 30) + Me.ucrNudAmount.Size = New System.Drawing.Size(50, 20) Me.ucrNudAmount.TabIndex = 15 Me.ucrNudAmount.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -537,12 +494,12 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudWBLessThan.AutoSize = True Me.ucrNudWBLessThan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWBLessThan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudWBLessThan.Location = New System.Drawing.Point(351, 462) - Me.ucrNudWBLessThan.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudWBLessThan.Location = New System.Drawing.Point(234, 308) + Me.ucrNudWBLessThan.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudWBLessThan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudWBLessThan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWBLessThan.Name = "ucrNudWBLessThan" - Me.ucrNudWBLessThan.Size = New System.Drawing.Size(75, 30) + Me.ucrNudWBLessThan.Size = New System.Drawing.Size(50, 20) Me.ucrNudWBLessThan.TabIndex = 23 Me.ucrNudWBLessThan.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -551,12 +508,12 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudCapacity.AutoSize = True Me.ucrNudCapacity.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCapacity.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCapacity.Location = New System.Drawing.Point(104, 462) - Me.ucrNudCapacity.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudCapacity.Location = New System.Drawing.Point(69, 308) + Me.ucrNudCapacity.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudCapacity.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudCapacity.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCapacity.Name = "ucrNudCapacity" - Me.ucrNudCapacity.Size = New System.Drawing.Size(75, 30) + Me.ucrNudCapacity.Size = New System.Drawing.Size(50, 20) Me.ucrNudCapacity.TabIndex = 21 Me.ucrNudCapacity.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -564,11 +521,11 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrReceiverStation.AutoSize = True Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(464, 88) + Me.ucrReceiverStation.Location = New System.Drawing.Point(309, 59) Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverStation.Name = "ucrReceiverStation" Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(214, 30) + Me.ucrReceiverStation.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverStation.strNcFilePath = "" Me.ucrReceiverStation.TabIndex = 2 Me.ucrReceiverStation.ucrSelector = Nothing @@ -577,11 +534,11 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrReceiverYear.AutoSize = True Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Location = New System.Drawing.Point(464, 225) + Me.ucrReceiverYear.Location = New System.Drawing.Point(309, 150) Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverYear.Name = "ucrReceiverYear" Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.Size = New System.Drawing.Size(214, 30) + Me.ucrReceiverYear.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverYear.strNcFilePath = "" Me.ucrReceiverYear.TabIndex = 6 Me.ucrReceiverYear.ucrSelector = Nothing @@ -590,11 +547,11 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(464, 156) + Me.ucrReceiverDate.Location = New System.Drawing.Point(309, 104) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(214, 30) + Me.ucrReceiverDate.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverDate.strNcFilePath = "" Me.ucrReceiverDate.TabIndex = 4 Me.ucrReceiverDate.ucrSelector = Nothing @@ -603,11 +560,11 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrReceiverDOY.AutoSize = True Me.ucrReceiverDOY.frmParent = Me - Me.ucrReceiverDOY.Location = New System.Drawing.Point(464, 291) + Me.ucrReceiverDOY.Location = New System.Drawing.Point(309, 194) Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDOY.Name = "ucrReceiverDOY" Me.ucrReceiverDOY.Selector = Nothing - Me.ucrReceiverDOY.Size = New System.Drawing.Size(214, 30) + Me.ucrReceiverDOY.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverDOY.strNcFilePath = "" Me.ucrReceiverDOY.TabIndex = 8 Me.ucrReceiverDOY.ucrSelector = Nothing @@ -616,11 +573,11 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrReceiverRainfall.AutoSize = True Me.ucrReceiverRainfall.frmParent = Me - Me.ucrReceiverRainfall.Location = New System.Drawing.Point(464, 357) + Me.ucrReceiverRainfall.Location = New System.Drawing.Point(309, 238) Me.ucrReceiverRainfall.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRainfall.Name = "ucrReceiverRainfall" Me.ucrReceiverRainfall.Selector = Nothing - Me.ucrReceiverRainfall.Size = New System.Drawing.Size(214, 30) + Me.ucrReceiverRainfall.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverRainfall.strNcFilePath = "" Me.ucrReceiverRainfall.TabIndex = 10 Me.ucrReceiverRainfall.ucrSelector = Nothing @@ -631,20 +588,20 @@ Partial Class dlgEndOfRainsSeason Me.ucrSelectorForWaterBalance.bDropUnusedFilterLevels = False Me.ucrSelectorForWaterBalance.bShowHiddenColumns = False Me.ucrSelectorForWaterBalance.bUseCurrentFilter = True - Me.ucrSelectorForWaterBalance.Location = New System.Drawing.Point(4, 104) + Me.ucrSelectorForWaterBalance.Location = New System.Drawing.Point(3, 69) Me.ucrSelectorForWaterBalance.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForWaterBalance.Name = "ucrSelectorForWaterBalance" - Me.ucrSelectorForWaterBalance.Size = New System.Drawing.Size(320, 274) + Me.ucrSelectorForWaterBalance.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorForWaterBalance.TabIndex = 0 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(4, 708) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) + Me.ucrBase.Location = New System.Drawing.Point(3, 472) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(611, 77) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 33 ' 'ucrNudWB @@ -652,12 +609,12 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudWB.AutoSize = True Me.ucrNudWB.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWB.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudWB.Location = New System.Drawing.Point(189, 561) - Me.ucrNudWB.Margin = New System.Windows.Forms.Padding(9) + Me.ucrNudWB.Location = New System.Drawing.Point(126, 374) + Me.ucrNudWB.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudWB.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudWB.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWB.Name = "ucrNudWB" - Me.ucrNudWB.Size = New System.Drawing.Size(75, 30) + Me.ucrNudWB.Size = New System.Drawing.Size(50, 20) Me.ucrNudWB.TabIndex = 47 Me.ucrNudWB.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -665,25 +622,23 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrChkWB.AutoSize = True Me.ucrChkWB.Checked = False - Me.ucrChkWB.Location = New System.Drawing.Point(26, 561) - Me.ucrChkWB.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkWB.Location = New System.Drawing.Point(17, 374) + Me.ucrChkWB.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrChkWB.Name = "ucrChkWB" - Me.ucrChkWB.Size = New System.Drawing.Size(150, 34) + Me.ucrChkWB.Size = New System.Drawing.Size(100, 23) Me.ucrChkWB.TabIndex = 46 ' 'dlgEndOfRainsSeason ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(144.0!, 144.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(716, 824) + Me.ClientSize = New System.Drawing.Size(477, 549) Me.Controls.Add(Me.ucrNudWB) Me.Controls.Add(Me.ucrChkWB) Me.Controls.Add(Me.rdoEndOfSeasons) Me.Controls.Add(Me.rdoEndOfRains) Me.Controls.Add(Me.ucrPnlEndOfRainsAndSeasons) - Me.Controls.Add(Me.ucrInputReplaceNA) - Me.Controls.Add(Me.lblReplaceNA) Me.Controls.Add(Me.rdoVariableEvaporation) Me.Controls.Add(Me.grpEndofSeason) Me.Controls.Add(Me.rdoValueEvaporation) @@ -715,7 +670,6 @@ Partial Class dlgEndOfRainsSeason Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.grpEndofRains) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgEndOfRainsSeason" @@ -759,8 +713,6 @@ Partial Class dlgEndOfRainsSeason Friend WithEvents rdoVariableEvaporation As RadioButton Friend WithEvents rdoValueEvaporation As RadioButton Friend WithEvents ucrPnlEvaporation As UcrPanel - Friend WithEvents ucrInputReplaceNA As ucrInputTextBox - Friend WithEvents lblReplaceNA As Label Friend WithEvents ucrInputEndofRainsOccurence As ucrInputTextBox Friend WithEvents ucrInputEndofSeasonOccurence As ucrInputTextBox Friend WithEvents ucrInputEndofSeasonDate As ucrInputTextBox diff --git a/instat/dlgEndOfRainsSeason.vb b/instat/dlgEndOfRainsSeason.vb index 52cd221bf40..9011080d997 100644 --- a/instat/dlgEndOfRainsSeason.vb +++ b/instat/dlgEndOfRainsSeason.vb @@ -47,9 +47,9 @@ Public Class dlgEndOfRainsSeason #Region "end_of_rains_code_structures" ' Rolling sum rain - Private clsEndRainsRollingSumCalc As New RFunction + Private clsEndRainsRollingSumCalc, clsWBEvaporationMinFunction, clsWBEvaporationMaxFunction As New RFunction Private clsRollSumRainFunction As New RFunction - + Private clsWBOperator1, clsWBOperator2 As New ROperator ' Conditions filter Private clsEndRainsConditionsFilterCalc As New RFunction Private clsEndRainsConditionsFilterSubCalcsList As New RFunction @@ -97,16 +97,20 @@ Public Class dlgEndOfRainsSeason Private clsEndSeasonWBMinCalc As New RFunction Private clsEndSeasonWBMinCalcSubCalcsList As New RFunction Private clsReduceWBMinFunction As New RFunction + Private clsReduceWBMinFunction1 As New RFunction Private clsPMinWBMinFunction As New RFunction Private clsWBMinTailFunction As New RFunction + Private clsWBMinTailFunction1 As New RFunction Private clsWBMinEvapOperator As New ROperator ' Water Balance max Private clsEndSeasonWBMaxCalc As New RFunction Private clsEndSeasonWBMaxCalcSubCalcsList As New RFunction Private clsReduceWBMaxFunction As New RFunction + Private clsReduceWBMaxFunction1 As New RFunction Private clsPMinWBMaxFunction As New RFunction Private clsWBMaxTailFunction As New RFunction + Private clsWBMaxTailFunction1 As New RFunction Private clsWBMaxEvapOperator As New ROperator ' Water Balance @@ -264,11 +268,6 @@ Public Class dlgEndOfRainsSeason ucrInputEvaporation.SetValidationTypeAsNumeric() ucrInputEvaporation.AddQuotesIfUnrecognised = False - ucrInputReplaceNA.SetParameter(New RParameter("yes", 1)) - ucrInputReplaceNA.SetValidationTypeAsNumeric() - ucrInputReplaceNA.AddQuotesIfUnrecognised = False - - ucrNudWBLessThan.SetParameter(New RParameter("1", 1, False)) ucrNudWBLessThan.SetMinMax(0, Integer.MaxValue) ucrNudWBLessThan.Increment = 0.5 @@ -301,32 +300,34 @@ Public Class dlgEndOfRainsSeason ucrChkWB.SetParameter(New RParameter("WB_evap")) ucrChkWB.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkWB.SetText("Reducing") - ucrChkWB.SetLinkedDisplayControl(ucrNudWB) + 'ucrChkWB.SetLinkedDisplayControl(ucrNudWB) ucrNudWB.SetParameter(New RParameter("WB_evap_value")) ucrNudWB.SetMinMax(0, 1) - ucrNudWB.DecimalPlaces = 0.01 + 'ucrNudWB.DecimalPlaces = 0.01 ucrNudWB.Increment = 0.01 + ucrNudWB.DecimalPlaces = 2 + 'linking controls ucrChkEndofRainsDoy.AddToLinkedControls(ucrInputEndRainDoy, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofSeasonOccurence.AddToLinkedControls(ucrInputEndofSeasonOccurence, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofSeasonDate.AddToLinkedControls(ucrInputEndofSeasonDate, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofSeasonDoy.AddToLinkedControls(ucrInputSeasonDoy, {True}, bNewLinkedHideIfParameterMissing:=True) - ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation}, bNewLinkedHideIfParameterMissing:=True) ucrPnlEvaporation.AddToLinkedControls(ucrReceiverEvaporation, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlEvaporation.AddToLinkedControls(ucrInputReplaceNA, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsOccurence.AddToLinkedControls(ucrInputEndofRainsOccurence, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsDate.AddToLinkedControls(ucrInputEndofRainsDate, {True}, bNewLinkedHideIfParameterMissing:=True) ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrNudAmount, ucrNudTotalOverDays}, {rdoEndOfRains}, bNewLinkedHideIfParameterMissing:=True) ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrNudCapacity, ucrNudWBLessThan, ucrChkEndofSeasonDoy}, {rdoEndOfSeasons}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrPnlEvaporation}, {rdoEndOfSeasons}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrChkWB}, {rdoEndOfSeasons}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrChkEndofSeasonDate, ucrChkEndofSeasonDoy, ucrChkEndofSeasonOccurence}, {rdoEndOfSeasons}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrChkEndofRainsDate, ucrChkEndofRainsDoy, ucrChkEndofRainsOccurence}, {rdoEndOfRains}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsDoy.SetLinkedDisplayControl(grpEndofRains) ucrPnlEvaporation.SetLinkedDisplayControl(lblEvaporation) - ucrInputReplaceNA.SetLinkedDisplayControl(lblReplaceNA) ucrNudAmount.SetLinkedDisplayControl(lblAmount) ucrNudWBLessThan.SetLinkedDisplayControl(lblWaterBalanceLessThan) ucrNudCapacity.SetLinkedDisplayControl(lblCapacity) @@ -421,16 +422,20 @@ Public Class dlgEndOfRainsSeason clsEndSeasonWBMinCalc.Clear() clsEndSeasonWBMinCalcSubCalcsList.Clear() clsReduceWBMinFunction.Clear() + clsReduceWBMinFunction1.Clear() clsPMinWBMinFunction.Clear() clsWBMinTailFunction.Clear() + clsWBMinTailFunction1.Clear() clsWBMinEvapOperator.Clear() ' Water Balance max clsEndSeasonWBMaxCalc.Clear() clsEndSeasonWBMaxCalcSubCalcsList.Clear() clsReduceWBMaxFunction.Clear() + clsReduceWBMaxFunction1.Clear() clsPMinWBMaxFunction.Clear() clsWBMaxTailFunction.Clear() + clsWBMaxTailFunction1.Clear() clsWBMaxEvapOperator.Clear() ' Water Balance @@ -438,6 +443,10 @@ Public Class dlgEndOfRainsSeason clsEndSeasonWBCalcSubCalcsList.Clear() clsIfElseWBFunction.Clear() clsWBOperator.Clear() + clsWBOperator1.Clear() + clsWBOperator2.Clear() + clsWBEvaporationMinFunction.Clear() + clsPMinWBMaxFunction.Clear() clsWBMinMaxOperator.Clear() ' Evaporation @@ -610,6 +619,16 @@ Public Class dlgEndOfRainsSeason clsEndRainsCombinationManipulationList.AddParameter("manip2", clsRFunctionParameter:=clsGroupByStationYearCalc, bIncludeArgumentName:=False, iPosition:=1) clsEndRainsCombinationManipulationList.AddParameter("manip3", clsRFunctionParameter:=clsDoyFilterCalc, bIncludeArgumentName:=False, iPosition:=2) + clsWBOperator1.SetOperation("-") + clsWBOperator1.AddParameter("left", "..1 + ..2", iPosition:=0) + clsWBOperator1.AddParameter("right", clsRFunctionParameter:=clsWBEvaporationMinFunction, iPosition:=1) + clsWBOperator1.bSpaceAroundOperation = True + clsWBOperator1.bBrackets = False + + clsWBEvaporationMinFunction.SetRCommand("WB_evaporation") + clsWBEvaporationMinFunction.AddParameter("water_balance", "..1", iPosition:=0, bIncludeArgumentName:=False) + clsWBEvaporationMinFunction.AddParameter("y", "..2", iPosition:=4, bIncludeArgumentName:=False) + clsEndRainsCombinationSubCalcList.SetRCommand("list") clsEndRainsCombinationSubCalcList.AddParameter("sub1", clsRFunctionParameter:=clsEndRainsLastDoySummaryCalc, bIncludeArgumentName:=False, iPosition:=0) @@ -649,13 +668,12 @@ Public Class dlgEndOfRainsSeason 'Pmax clsPMaxFunction.SetRCommand("pmax") - clsPMaxFunction.AddParameter("0", "x + y", iPosition:=0, bIncludeArgumentName:=False) + clsPMaxFunction.AddParameter("0", "..1 + ..2", iPosition:=0, bIncludeArgumentName:=False) clsPMaxFunction.AddParameter("1", "0", bIncludeArgumentName:=False) ' Water Balance min clsEndSeasonWBMinCalc.SetRCommand("instat_calculation$new") clsEndSeasonWBMinCalc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) - clsEndSeasonWBMinCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMinFunction, iPosition:=1) clsEndSeasonWBMinCalc.AddParameter("result_name", Chr(34) & strWBMin & Chr(34), iPosition:=2) clsEndSeasonWBMinCalc.AddParameter("sub_calculations", clsRFunctionParameter:=clsEndSeasonWBMinCalcSubCalcsList, iPosition:=3) clsEndSeasonWBMinCalc.SetAssignTo(strWBMin) @@ -664,13 +682,20 @@ Public Class dlgEndOfRainsSeason clsEndSeasonWBMinCalcSubCalcsList.AddParameter("0", clsRFunctionParameter:=clsEndSeasonRainMinCalc, iPosition:=0, bIncludeArgumentName:=False) clsReduceWBMinFunction.bToScriptAsRString = True - clsReduceWBMinFunction.SetRCommand("Reduce") - clsReduceWBMinFunction.AddParameter("f", clsRFunctionParameter:=clsPMinWBMinFunction, iPosition:=0) - clsReduceWBMinFunction.AddParameter("x", clsRFunctionParameter:=clsWBMinTailFunction, iPosition:=1) - clsReduceWBMinFunction.AddParameter("init", "0", iPosition:=2) - clsReduceWBMinFunction.AddParameter("accumulate", "TRUE", iPosition:=3) - - clsPMinWBMinFunction.SetRCommand("function(x, y) pmin") + clsReduceWBMinFunction.SetPackageName("purrr") + clsReduceWBMinFunction.SetRCommand("accumulate") + clsReduceWBMinFunction.AddParameter(".f", clsRFunctionParameter:=clsPMinWBMinFunction, iPosition:=0) + clsReduceWBMinFunction.AddParameter(".x", clsRFunctionParameter:=clsWBMinTailFunction, iPosition:=1) + clsReduceWBMinFunction.AddParameter(".init", "0", iPosition:=2) + + clsReduceWBMinFunction1.bToScriptAsRString = True + clsReduceWBMinFunction1.SetPackageName("purrr") + clsReduceWBMinFunction1.SetRCommand("accumulate2") + clsReduceWBMinFunction1.AddParameter(".f", clsRFunctionParameter:=clsPMinWBMinFunction, iPosition:=0) + clsReduceWBMinFunction1.AddParameter(".x", clsRFunctionParameter:=clsWBMinTailFunction, iPosition:=1) + clsReduceWBMinFunction1.AddParameter(".init", "0", iPosition:=2) + + clsPMinWBMinFunction.SetRCommand(" ~ pmin") clsPMinWBMinFunction.AddParameter("0", clsRFunctionParameter:=clsPMaxFunction, iPosition:=0, bIncludeArgumentName:=False) clsPMinWBMinFunction.AddParameter("1", iCapacityDefault, iPosition:=1, bIncludeArgumentName:=False) @@ -678,6 +703,10 @@ Public Class dlgEndOfRainsSeason clsWBMinTailFunction.AddParameter("x", clsROperatorParameter:=clsWBMinEvapOperator, iPosition:=0) clsWBMinTailFunction.AddParameter("n", "-1", iPosition:=1) + clsWBMinTailFunction1.SetRCommand("tail") + clsWBMinTailFunction1.AddParameter("x", ucrReceiverEvaporation.GetVariableNames(False), iPosition:=0) + clsWBMinTailFunction1.AddParameter("n", "-1", iPosition:=1) + clsWBMinEvapOperator.SetOperation("-") clsWBMinEvapOperator.AddParameter("0", strRainMin, iPosition:=0) clsWBMinEvapOperator.AddParameter("value", "5", iPosition:=1) @@ -685,7 +714,6 @@ Public Class dlgEndOfRainsSeason ' Water Balance max clsEndSeasonWBMaxCalc.SetRCommand("instat_calculation$new") clsEndSeasonWBMaxCalc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) - clsEndSeasonWBMaxCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMaxFunction, iPosition:=1) clsEndSeasonWBMaxCalc.AddParameter("result_name", Chr(34) & strWBMax & Chr(34), iPosition:=2) clsEndSeasonWBMaxCalc.AddParameter("sub_calculations", clsRFunctionParameter:=clsEndSeasonWBMaxCalcSubCalcsList, iPosition:=3) clsEndSeasonWBMaxCalc.SetAssignTo(strWBMax) @@ -694,13 +722,20 @@ Public Class dlgEndOfRainsSeason clsEndSeasonWBMaxCalcSubCalcsList.AddParameter("0", clsRFunctionParameter:=clsEndSeasonRainMaxCalc, iPosition:=0, bIncludeArgumentName:=False) clsReduceWBMaxFunction.bToScriptAsRString = True - clsReduceWBMaxFunction.SetRCommand("Reduce") - clsReduceWBMaxFunction.AddParameter("f", clsRFunctionParameter:=clsPMinWBMaxFunction, iPosition:=0) - clsReduceWBMaxFunction.AddParameter("x", clsRFunctionParameter:=clsWBMaxTailFunction, iPosition:=1) - clsReduceWBMaxFunction.AddParameter("init", "0", iPosition:=2) - clsReduceWBMaxFunction.AddParameter("accumulate", "TRUE", iPosition:=3) - - clsPMinWBMaxFunction.SetRCommand("function(x, y) pmin") + clsReduceWBMaxFunction.SetPackageName("purrr") + clsReduceWBMaxFunction.SetRCommand("accumulate") + clsReduceWBMaxFunction.AddParameter(".f", clsRFunctionParameter:=clsPMinWBMaxFunction, iPosition:=0) + clsReduceWBMaxFunction.AddParameter(".x", clsRFunctionParameter:=clsWBMaxTailFunction, iPosition:=1) + clsReduceWBMaxFunction.AddParameter(".init", "0", iPosition:=2) + + clsReduceWBMaxFunction1.bToScriptAsRString = True + clsReduceWBMaxFunction1.SetPackageName("purrr") + clsReduceWBMaxFunction1.SetRCommand("accumulate2") + clsReduceWBMaxFunction1.AddParameter(".f", clsRFunctionParameter:=clsPMinWBMaxFunction, iPosition:=0) + clsReduceWBMaxFunction1.AddParameter(".x", clsRFunctionParameter:=clsWBMaxTailFunction, iPosition:=1) + clsReduceWBMaxFunction1.AddParameter(".init", "0", iPosition:=2) + + clsPMinWBMaxFunction.SetRCommand(" ~ pmin") clsPMinWBMaxFunction.AddParameter("0", clsRFunctionParameter:=clsPMaxFunction, iPosition:=0, bIncludeArgumentName:=False) clsPMinWBMaxFunction.AddParameter("1", iCapacityDefault, iPosition:=1, bIncludeArgumentName:=False) @@ -708,6 +743,10 @@ Public Class dlgEndOfRainsSeason clsWBMaxTailFunction.AddParameter("x", clsROperatorParameter:=clsWBMaxEvapOperator, iPosition:=0) clsWBMaxTailFunction.AddParameter("n", "-1", iPosition:=1) + clsWBMaxTailFunction1.SetRCommand("tail") + clsWBMaxTailFunction1.AddParameter("x", ucrReceiverEvaporation.GetVariableNames(False), iPosition:=0) + clsWBMaxTailFunction1.AddParameter("n", "-1", iPosition:=1) + clsWBMaxEvapOperator.SetOperation("-") clsWBMaxEvapOperator.AddParameter("0", strRainMax, iPosition:=0) clsWBMaxEvapOperator.AddParameter("value", "5", iPosition:=1) @@ -840,7 +879,7 @@ Public Class dlgEndOfRainsSeason ucrReceiverRainfall.AddAdditionalCodeParameterPair(clsEndSeasonIsNaRain, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverRainfall.AddAdditionalCodeParameterPair(clsIfElseRainMinFunction, New RParameter("no", 2), iAdditionalPairNo:=2) ucrReceiverRainfall.AddAdditionalCodeParameterPair(clsIfElseRainMaxFunction, New RParameter("no", 2), iAdditionalPairNo:=3) - ucrReceiverEvaporation.AddAdditionalCodeParameterPair(clsIfElseVariableEvaporation, New RParameter("no", 2), iAdditionalPairNo:=1) + ucrReceiverEvaporation.AddAdditionalCodeParameterPair(clsWBMaxTailFunction1, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverDate.AddAdditionalCodeParameterPair(clsFirstDateFunction, New RParameter("x", 0), iAdditionalPairNo:=1) ucrNudCapacity.AddAdditionalCodeParameterPair(clsPMinWBMinFunction, New RParameter("1", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) @@ -850,8 +889,6 @@ Public Class dlgEndOfRainsSeason ucrReceiverDOY.SetRCode(clsDayToOperator, bReset) - ucrReceiverEvaporation.SetRCode(clsIsNaEvaporation, bReset) - ucrInputEndRainDoy.SetRCode(clsEndRainsLastDoySummaryCalc, bReset) ucrInputEndofRainsDate.SetRCode(clsEndRainsLastDateSummaryCalc, bReset) ucrInputEndofRainsOccurence.SetRCode(clsEndRainsStatusSummaryCalc, bReset) @@ -866,10 +903,12 @@ Public Class dlgEndOfRainsSeason ucrNudWBLessThan.SetRCode(clsEndSeasonWBConditionOperator, bReset) - ucrPnlEvaporation.SetRCode(clsWBMinEvapOperator, bReset) - ucrInputEvaporation.SetRCode(clsWBMinEvapOperator, bReset) + If bReset Then + ucrPnlEvaporation.SetRCode(clsWBMinEvapOperator, bReset) + ucrInputEvaporation.SetRCode(clsWBMinEvapOperator, bReset) + ucrReceiverEvaporation.SetRCode(clsWBMinTailFunction1, bReset) + End If ucrNudCapacity.SetRCode(clsIfElseRainMaxFunction, bReset) - ucrInputReplaceNA.SetRCode(clsIfElseVariableEvaporation, bReset) ucrChkEndofSeasonDoy.SetRCode(clsEndSeasonCombinationSubCalcList, bReset) ucrChkEndofSeasonDate.SetRCode(clsEndSeasonCombinationSubCalcList, bReset) @@ -912,7 +951,7 @@ Public Class dlgEndOfRainsSeason bOkEnabled = False ElseIf rdoValueEvaporation.Checked AndAlso ucrInputEvaporation.IsEmpty Then bOkEnabled = False - ElseIf rdoVariableEvaporation.Checked AndAlso (ucrReceiverEvaporation.IsEmpty OrElse ucrInputReplaceNA.IsEmpty) Then + ElseIf rdoVariableEvaporation.Checked AndAlso ucrReceiverEvaporation.IsEmpty Then bOkEnabled = False End If Else @@ -989,21 +1028,58 @@ Public Class dlgEndOfRainsSeason clsDoyFilterCalcFromList.ClearParameters() End Sub - Private Sub ucrPnlEvaporation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlEvaporation.ControlValueChanged, ucrReceiverEvaporation.ControlValueChanged, ucrInputReplaceNA.ControlValueChanged, ucrInputEvaporation.ControlValueChanged + Private Sub ucrPnlEvaporation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlEvaporation.ControlValueChanged, ucrReceiverEvaporation.ControlValueChanged, ucrInputEvaporation.ControlValueChanged Evaporation() End Sub Private Sub Evaporation() - If rdoValueEvaporation.Checked Then - ucrReceiverRainfall.SetMeAsReceiver() - clsWBMinEvapOperator.RemoveParameterByName("variable") - clsWBMaxEvapOperator.RemoveParameterByName("variable") - ElseIf rdoVariableEvaporation.Checked Then - ucrReceiverEvaporation.SetMeAsReceiver() - clsWBMinEvapOperator.AddParameter("variable", clsRFunctionParameter:=clsIfElseVariableEvaporation, iPosition:=1, bIncludeArgumentName:=False) - clsWBMinEvapOperator.RemoveParameterByName("value") - clsWBMaxEvapOperator.AddParameter("variable", clsRFunctionParameter:=clsIfElseVariableEvaporation, iPosition:=1, bIncludeArgumentName:=False) - clsWBMaxEvapOperator.RemoveParameterByName("value") + If rdoEndOfSeasons.Checked Then + If rdoValueEvaporation.Checked Then + clsEndSeasonWBMinCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMinFunction, iPosition:=1) + clsEndSeasonWBMaxCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMaxFunction, iPosition:=1) + clsWBMinEvapOperator.RemoveParameterByName("variable") + clsWBMaxEvapOperator.RemoveParameterByName("variable") + If ucrChkWB.Checked Then + clsWBEvaporationMinFunction.AddParameter("WB_evap_value", ucrNudWB.GetText(), iPosition:=1, bIncludeArgumentName:=False) + clsWBEvaporationMinFunction.AddParameter("yes", ucrNudCapacity.GetText(), iPosition:=2, bIncludeArgumentName:=False) + clsWBEvaporationMinFunction.AddParameter("value", ucrInputEvaporation.GetText(), iPosition:=3, bIncludeArgumentName:=False) + clsPMaxFunction.AddParameter("wb", clsROperatorParameter:=clsWBOperator1, iPosition:=0, bIncludeArgumentName:=False) + clsPMaxFunction.RemoveParameterByName("0") + clsPMaxFunction.RemoveParameterByName("0") + clsWBMaxEvapOperator.RemoveParameterByName("value") + clsWBMinEvapOperator.RemoveParameterByName("value") + Else + clsPMaxFunction.AddParameter("0", "..1 + ..2", iPosition:=0, bIncludeArgumentName:=False) + clsPMaxFunction.RemoveParameterByName("wb") + clsPMaxFunction.RemoveParameterByName("wb") + clsWBMaxEvapOperator.AddParameter("value", ucrInputEvaporation.GetText(), iPosition:=1) + clsWBMinEvapOperator.AddParameter("value", ucrInputEvaporation.GetText(), iPosition:=1) + End If + Else + ucrReceiverEvaporation.SetMeAsReceiver() + clsEndSeasonWBMaxCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMaxFunction1, iPosition:=1) + clsEndSeasonWBMinCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMinFunction1, iPosition:=1) + clsWBMinEvapOperator.RemoveParameterByName("variable") + clsWBMaxEvapOperator.RemoveParameterByName("variable") + If ucrChkWB.Checked Then + clsWBEvaporationMinFunction.AddParameter("WB_evap_value", ucrNudWB.GetText(), iPosition:=1, bIncludeArgumentName:=False) + clsWBEvaporationMinFunction.AddParameter("yes", ucrNudCapacity.GetText(), iPosition:=2, bIncludeArgumentName:=False) + clsWBEvaporationMinFunction.AddParameter("value", "..3", bIncludeArgumentName:=False, iPosition:=3) + clsReduceWBMinFunction1.AddParameter(".y", clsRFunctionParameter:=clsWBMinTailFunction1, iPosition:=1) + clsReduceWBMaxFunction1.AddParameter(".y", clsRFunctionParameter:=clsWBMaxTailFunction1, iPosition:=1) + clsPMaxFunction.AddParameter("wb", clsROperatorParameter:=clsWBOperator1, iPosition:=0, bIncludeArgumentName:=False) + clsPMaxFunction.RemoveParameterByName("0") + clsPMaxFunction.RemoveParameterByName("0") + clsWBMaxEvapOperator.RemoveParameterByName("value") + clsWBMinEvapOperator.RemoveParameterByName("value") + Else + clsPMaxFunction.AddParameter("0", "..1 + ..2", iPosition:=0, bIncludeArgumentName:=False) + clsPMaxFunction.RemoveParameterByName("wb") + clsPMaxFunction.RemoveParameterByName("wb") + clsReduceWBMinFunction1.AddParameter(".y", clsRFunctionParameter:=clsWBMinTailFunction1, iPosition:=1) + clsReduceWBMaxFunction1.AddParameter(".y", clsRFunctionParameter:=clsWBMaxTailFunction1, iPosition:=1) + End If + End If End If End Sub @@ -1065,7 +1141,15 @@ Public Class dlgEndOfRainsSeason End If End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlEndOfRainsAndSeasons.ControlContentsChanged, ucrReceiverRainfall.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrNudCapacity.ControlContentsChanged, ucrNudWBLessThan.ControlContentsChanged, ucrInputSeasonDoy.ControlContentsChanged, ucrNudTotalOverDays.ControlContentsChanged, ucrNudAmount.ControlContentsChanged, ucrChkEndofRainsDoy.ControlContentsChanged, ucrInputEndRainDoy.ControlContentsChanged, ucrChkEndofRainsDate.ControlContentsChanged, ucrInputEndofRainsDate.ControlContentsChanged, ucrChkEndofRainsOccurence.ControlContentsChanged, ucrInputEndofRainsOccurence.ControlContentsChanged, ucrChkEndofSeasonDoy.ControlContentsChanged, ucrPnlEvaporation.ControlContentsChanged, ucrReceiverEvaporation.ControlContentsChanged, ucrInputReplaceNA.ControlContentsChanged, ucrChkEndofSeasonOccurence.ControlContentsChanged, ucrInputEndofSeasonOccurence.ControlContentsChanged, ucrChkEndofSeasonDate.ControlContentsChanged, ucrInputEndofSeasonDate.ControlContentsChanged, ucrInputEvaporation.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlEndOfRainsAndSeasons.ControlContentsChanged, ucrReceiverRainfall.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrNudCapacity.ControlContentsChanged, ucrNudWBLessThan.ControlContentsChanged, ucrInputSeasonDoy.ControlContentsChanged, ucrNudTotalOverDays.ControlContentsChanged, ucrNudAmount.ControlContentsChanged, ucrChkEndofRainsDoy.ControlContentsChanged, ucrInputEndRainDoy.ControlContentsChanged, ucrChkEndofRainsDate.ControlContentsChanged, ucrInputEndofRainsDate.ControlContentsChanged, ucrChkEndofRainsOccurence.ControlContentsChanged, ucrInputEndofRainsOccurence.ControlContentsChanged, ucrChkEndofSeasonDoy.ControlContentsChanged, ucrPnlEvaporation.ControlContentsChanged, ucrReceiverEvaporation.ControlContentsChanged, ucrChkEndofSeasonOccurence.ControlContentsChanged, ucrInputEndofSeasonOccurence.ControlContentsChanged, ucrChkEndofSeasonDate.ControlContentsChanged, ucrInputEndofSeasonDate.ControlContentsChanged, ucrInputEvaporation.ControlContentsChanged TestOKEnabled() End Sub + + Private Sub ucrChkWB_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkWB.ControlValueChanged, ucrNudWB.ControlValueChanged, ucrNudCapacity.ControlValueChanged + Evaporation() + End Sub + + Private Sub rdoValueEvaporation_CheckedChanged(sender As Object, e As EventArgs) Handles rdoValueEvaporation.CheckedChanged, rdoVariableEvaporation.CheckedChanged + Evaporation() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgTransformClimatic.Designer.vb b/instat/dlgTransformClimatic.Designer.vb index 90233cefd17..6878c7a9c9e 100644 --- a/instat/dlgTransformClimatic.Designer.vb +++ b/instat/dlgTransformClimatic.Designer.vb @@ -40,18 +40,26 @@ Partial Class dlgTransformClimatic Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgTransformClimatic)) - Me.lblYear = New System.Windows.Forms.Label() - Me.lblDate = New System.Windows.Forms.Label() - Me.lblStation = New System.Windows.Forms.Label() - Me.lblData = New System.Windows.Forms.Label() + Me.rdoWaterBalance = New System.Windows.Forms.RadioButton() + Me.ucrNudLimit = New instat.ucrNud() + Me.ucrNudMgdd = New instat.ucrNud() + Me.lblBaselineMgdd = New System.Windows.Forms.Label() + Me.lblLimit = New System.Windows.Forms.Label() + Me.ucrInputPosition = New instat.ucrInputComboBox() + Me.ucrChkCircular = New instat.ucrCheck() Me.rdoSpell = New System.Windows.Forms.RadioButton() + Me.lblRowsMultSpells = New System.Windows.Forms.Label() + Me.lblDate = New System.Windows.Forms.Label() + Me.ucrInputSpellUpper = New instat.ucrInputTextBox() Me.rdoMoving = New System.Windows.Forms.RadioButton() Me.rdoCount = New System.Windows.Forms.RadioButton() - Me.rdoWaterBalance = New System.Windows.Forms.RadioButton() - Me.lblSumRows = New System.Windows.Forms.Label() - Me.lblSumOver = New System.Windows.Forms.Label() - Me.lblCountOver = New System.Windows.Forms.Label() + Me.lblStation = New System.Windows.Forms.Label() + Me.lblYear = New System.Windows.Forms.Label() + Me.ucrChkUseMaxMin = New instat.ucrCheck() + Me.lblData = New System.Windows.Forms.Label() Me.grpTransform = New System.Windows.Forms.GroupBox() + Me.ucrNudWB = New instat.ucrNud() + Me.ucrChkWB = New instat.ucrCheck() Me.ucrInputSpellLower = New instat.ucrInputComboBox() Me.ucrChkOptions = New instat.ucrCheck() Me.ucrReceiverEvap = New instat.ucrReceiverSingle() @@ -62,26 +70,20 @@ Partial Class dlgTransformClimatic Me.ucrPnlEvap = New instat.UcrPanel() Me.ucrInputCircularPosition = New instat.ucrInputComboBox() Me.lblPosition = New System.Windows.Forms.Label() - Me.ucrInputPosition = New instat.ucrInputComboBox() - Me.ucrChkCircular = New instat.ucrCheck() Me.ucrNudMultSpells = New instat.ucrNud() - Me.lblRowsMultSpells = New System.Windows.Forms.Label() - Me.ucrInputSpellUpper = New instat.ucrInputTextBox() + Me.lblSumRows = New System.Windows.Forms.Label() Me.ucrInputCondition = New instat.ucrInputComboBox() Me.lblCondition = New System.Windows.Forms.Label() Me.lblWBEvaporation = New System.Windows.Forms.Label() + Me.lblCountOver = New System.Windows.Forms.Label() Me.ucrNudSumOver = New instat.ucrNud() Me.lblWBCapacity = New System.Windows.Forms.Label() Me.ucrNudWBCapacity = New instat.ucrNud() Me.ucrInputSum = New instat.ucrInputComboBox() + Me.lblSumOver = New System.Windows.Forms.Label() Me.ucrNudCountOver = New instat.ucrNud() Me.ucrInputCumulative = New instat.ucrInputComboBox() - Me.lblTMin = New System.Windows.Forms.Label() Me.grpDegree = New System.Windows.Forms.GroupBox() - Me.ucrNudLimit = New instat.ucrNud() - Me.ucrNudMgdd = New instat.ucrNud() - Me.lblBaselineMgdd = New System.Windows.Forms.Label() - Me.lblLimit = New System.Windows.Forms.Label() Me.rdoModifiedGDD = New System.Windows.Forms.RadioButton() Me.lblBaselineGDD = New System.Windows.Forms.Label() Me.rdoGrowingDegreeDays = New System.Windows.Forms.RadioButton() @@ -92,53 +94,87 @@ Partial Class dlgTransformClimatic Me.ucrNudHDD = New instat.ucrNud() Me.rdoDiurnalRange = New System.Windows.Forms.RadioButton() Me.ucrPnlDegree = New instat.UcrPanel() + Me.ucrReceiverData = New instat.ucrReceiverSingle() + Me.ttRdoGdd = New System.Windows.Forms.ToolTip(Me.components) + Me.lblTMin = New System.Windows.Forms.Label() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.rdoMultSpells = New System.Windows.Forms.RadioButton() - Me.rdoCumulative = New System.Windows.Forms.RadioButton() - Me.rdoDegree = New System.Windows.Forms.RadioButton() Me.lblTMax = New System.Windows.Forms.Label() Me.lblTMean = New System.Windows.Forms.Label() - Me.ucrSaveColumn = New instat.ucrSave() Me.ucrPnlTransform = New instat.UcrPanel() + Me.rdoDegree = New System.Windows.Forms.RadioButton() + Me.rdoCumulative = New System.Windows.Forms.RadioButton() Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.ucrSelectorTransform = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverTMin = New instat.ucrReceiverSingle() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() Me.ucrReceiverTMean = New instat.ucrReceiverSingle() Me.ucrReceiverTMax = New instat.ucrReceiverSingle() - Me.ucrReceiverData = New instat.ucrReceiverSingle() - Me.ucrReceiverYear = New instat.ucrReceiverSingle() - Me.ucrChkUseMaxMin = New instat.ucrCheck() - Me.ttRdoRange = New System.Windows.Forms.ToolTip(Me.components) + Me.ucrSaveColumn = New instat.ucrSave() + Me.ucrSelectorTransform = New instat.ucrSelectorByDataFrameAddRemove() Me.ttRdoTMean = New System.Windows.Forms.ToolTip(Me.components) Me.ttRdoHdd = New System.Windows.Forms.ToolTip(Me.components) - Me.ttRdoGdd = New System.Windows.Forms.ToolTip(Me.components) Me.ttRdoMgdd = New System.Windows.Forms.ToolTip(Me.components) - Me.ucrChkWB = New instat.ucrCheck() - Me.ucrNudWB = New instat.ucrNud() + Me.ttRdoRange = New System.Windows.Forms.ToolTip(Me.components) Me.grpTransform.SuspendLayout() Me.grpDegree.SuspendLayout() Me.SuspendLayout() ' - 'lblYear + 'rdoWaterBalance ' - resources.ApplyResources(Me.lblYear, "lblYear") - Me.lblYear.Name = "lblYear" + resources.ApplyResources(Me.rdoWaterBalance, "rdoWaterBalance") + Me.rdoWaterBalance.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoWaterBalance.FlatAppearance.BorderSize = 2 + Me.rdoWaterBalance.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoWaterBalance.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoWaterBalance.Name = "rdoWaterBalance" + Me.rdoWaterBalance.UseVisualStyleBackColor = True ' - 'lblDate + 'ucrNudLimit ' - resources.ApplyResources(Me.lblDate, "lblDate") - Me.lblDate.Name = "lblDate" + resources.ApplyResources(Me.ucrNudLimit, "ucrNudLimit") + Me.ucrNudLimit.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLimit.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudLimit.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudLimit.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLimit.Name = "ucrNudLimit" + Me.ucrNudLimit.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblStation + 'ucrNudMgdd ' - resources.ApplyResources(Me.lblStation, "lblStation") - Me.lblStation.Name = "lblStation" + resources.ApplyResources(Me.ucrNudMgdd, "ucrNudMgdd") + Me.ucrNudMgdd.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMgdd.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMgdd.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMgdd.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMgdd.Name = "ucrNudMgdd" + Me.ucrNudMgdd.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblData + 'lblBaselineMgdd ' - resources.ApplyResources(Me.lblData, "lblData") - Me.lblData.Name = "lblData" + resources.ApplyResources(Me.lblBaselineMgdd, "lblBaselineMgdd") + Me.lblBaselineMgdd.Name = "lblBaselineMgdd" + Me.lblBaselineMgdd.Tag = "Over" + ' + 'lblLimit + ' + resources.ApplyResources(Me.lblLimit, "lblLimit") + Me.lblLimit.Name = "lblLimit" + Me.lblLimit.Tag = "Over" + ' + 'ucrInputPosition + ' + Me.ucrInputPosition.AddQuotesIfUnrecognised = True + resources.ApplyResources(Me.ucrInputPosition, "ucrInputPosition") + Me.ucrInputPosition.GetSetSelectedIndex = -1 + Me.ucrInputPosition.IsReadOnly = False + Me.ucrInputPosition.Name = "ucrInputPosition" + ' + 'ucrChkCircular + ' + resources.ApplyResources(Me.ucrChkCircular, "ucrChkCircular") + Me.ucrChkCircular.Checked = False + Me.ucrChkCircular.Name = "ucrChkCircular" ' 'rdoSpell ' @@ -150,6 +186,25 @@ Partial Class dlgTransformClimatic Me.rdoSpell.Name = "rdoSpell" Me.rdoSpell.UseVisualStyleBackColor = True ' + 'lblRowsMultSpells + ' + resources.ApplyResources(Me.lblRowsMultSpells, "lblRowsMultSpells") + Me.lblRowsMultSpells.Name = "lblRowsMultSpells" + Me.lblRowsMultSpells.Tag = "Rows_to_Take_Over:" + ' + 'lblDate + ' + resources.ApplyResources(Me.lblDate, "lblDate") + Me.lblDate.Name = "lblDate" + ' + 'ucrInputSpellUpper + ' + Me.ucrInputSpellUpper.AddQuotesIfUnrecognised = True + resources.ApplyResources(Me.ucrInputSpellUpper, "ucrInputSpellUpper") + Me.ucrInputSpellUpper.IsMultiline = False + Me.ucrInputSpellUpper.IsReadOnly = False + Me.ucrInputSpellUpper.Name = "ucrInputSpellUpper" + ' 'rdoMoving ' resources.ApplyResources(Me.rdoMoving, "rdoMoving") @@ -171,33 +226,26 @@ Partial Class dlgTransformClimatic Me.rdoCount.Name = "rdoCount" Me.rdoCount.UseVisualStyleBackColor = True ' - 'rdoWaterBalance + 'lblStation ' - resources.ApplyResources(Me.rdoWaterBalance, "rdoWaterBalance") - Me.rdoWaterBalance.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoWaterBalance.FlatAppearance.BorderSize = 2 - Me.rdoWaterBalance.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoWaterBalance.ForeColor = System.Drawing.SystemColors.ActiveCaptionText - Me.rdoWaterBalance.Name = "rdoWaterBalance" - Me.rdoWaterBalance.UseVisualStyleBackColor = True + resources.ApplyResources(Me.lblStation, "lblStation") + Me.lblStation.Name = "lblStation" ' - 'lblSumRows + 'lblYear ' - resources.ApplyResources(Me.lblSumRows, "lblSumRows") - Me.lblSumRows.Name = "lblSumRows" - Me.lblSumRows.Tag = "Rows" + resources.ApplyResources(Me.lblYear, "lblYear") + Me.lblYear.Name = "lblYear" ' - 'lblSumOver + 'ucrChkUseMaxMin ' - resources.ApplyResources(Me.lblSumOver, "lblSumOver") - Me.lblSumOver.Name = "lblSumOver" - Me.lblSumOver.Tag = "Over" + resources.ApplyResources(Me.ucrChkUseMaxMin, "ucrChkUseMaxMin") + Me.ucrChkUseMaxMin.Checked = True + Me.ucrChkUseMaxMin.Name = "ucrChkUseMaxMin" ' - 'lblCountOver + 'lblData ' - resources.ApplyResources(Me.lblCountOver, "lblCountOver") - Me.lblCountOver.Name = "lblCountOver" - Me.lblCountOver.Tag = "Rows_to_Count_Over:" + resources.ApplyResources(Me.lblData, "lblData") + Me.lblData.Name = "lblData" ' 'grpTransform ' @@ -234,6 +282,22 @@ Partial Class dlgTransformClimatic Me.grpTransform.Name = "grpTransform" Me.grpTransform.TabStop = False ' + 'ucrNudWB + ' + resources.ApplyResources(Me.ucrNudWB, "ucrNudWB") + Me.ucrNudWB.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudWB.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudWB.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudWB.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudWB.Name = "ucrNudWB" + Me.ucrNudWB.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkWB + ' + resources.ApplyResources(Me.ucrChkWB, "ucrChkWB") + Me.ucrChkWB.Checked = False + Me.ucrChkWB.Name = "ucrChkWB" + ' 'ucrInputSpellLower ' Me.ucrInputSpellLower.AddQuotesIfUnrecognised = True @@ -303,20 +367,6 @@ Partial Class dlgTransformClimatic resources.ApplyResources(Me.lblPosition, "lblPosition") Me.lblPosition.Name = "lblPosition" ' - 'ucrInputPosition - ' - Me.ucrInputPosition.AddQuotesIfUnrecognised = True - resources.ApplyResources(Me.ucrInputPosition, "ucrInputPosition") - Me.ucrInputPosition.GetSetSelectedIndex = -1 - Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Name = "ucrInputPosition" - ' - 'ucrChkCircular - ' - resources.ApplyResources(Me.ucrChkCircular, "ucrChkCircular") - Me.ucrChkCircular.Checked = False - Me.ucrChkCircular.Name = "ucrChkCircular" - ' 'ucrNudMultSpells ' resources.ApplyResources(Me.ucrNudMultSpells, "ucrNudMultSpells") @@ -327,19 +377,11 @@ Partial Class dlgTransformClimatic Me.ucrNudMultSpells.Name = "ucrNudMultSpells" Me.ucrNudMultSpells.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblRowsMultSpells - ' - resources.ApplyResources(Me.lblRowsMultSpells, "lblRowsMultSpells") - Me.lblRowsMultSpells.Name = "lblRowsMultSpells" - Me.lblRowsMultSpells.Tag = "Rows_to_Take_Over:" - ' - 'ucrInputSpellUpper + 'lblSumRows ' - Me.ucrInputSpellUpper.AddQuotesIfUnrecognised = True - resources.ApplyResources(Me.ucrInputSpellUpper, "ucrInputSpellUpper") - Me.ucrInputSpellUpper.IsMultiline = False - Me.ucrInputSpellUpper.IsReadOnly = False - Me.ucrInputSpellUpper.Name = "ucrInputSpellUpper" + resources.ApplyResources(Me.lblSumRows, "lblSumRows") + Me.lblSumRows.Name = "lblSumRows" + Me.lblSumRows.Tag = "Rows" ' 'ucrInputCondition ' @@ -361,6 +403,12 @@ Partial Class dlgTransformClimatic Me.lblWBEvaporation.Name = "lblWBEvaporation" Me.lblWBEvaporation.Tag = "Evaporation" ' + 'lblCountOver + ' + resources.ApplyResources(Me.lblCountOver, "lblCountOver") + Me.lblCountOver.Name = "lblCountOver" + Me.lblCountOver.Tag = "Rows_to_Count_Over:" + ' 'ucrNudSumOver ' resources.ApplyResources(Me.ucrNudSumOver, "ucrNudSumOver") @@ -395,6 +443,12 @@ Partial Class dlgTransformClimatic Me.ucrInputSum.IsReadOnly = False Me.ucrInputSum.Name = "ucrInputSum" ' + 'lblSumOver + ' + resources.ApplyResources(Me.lblSumOver, "lblSumOver") + Me.lblSumOver.Name = "lblSumOver" + Me.lblSumOver.Tag = "Over" + ' 'ucrNudCountOver ' resources.ApplyResources(Me.ucrNudCountOver, "ucrNudCountOver") @@ -413,11 +467,6 @@ Partial Class dlgTransformClimatic Me.ucrInputCumulative.IsReadOnly = False Me.ucrInputCumulative.Name = "ucrInputCumulative" ' - 'lblTMin - ' - resources.ApplyResources(Me.lblTMin, "lblTMin") - Me.lblTMin.Name = "lblTMin" - ' 'grpDegree ' Me.grpDegree.Controls.Add(Me.ucrNudLimit) @@ -438,46 +487,14 @@ Partial Class dlgTransformClimatic Me.grpDegree.Name = "grpDegree" Me.grpDegree.TabStop = False ' - 'ucrNudLimit - ' - resources.ApplyResources(Me.ucrNudLimit, "ucrNudLimit") - Me.ucrNudLimit.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLimit.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudLimit.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudLimit.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudLimit.Name = "ucrNudLimit" - Me.ucrNudLimit.Value = New Decimal(New Integer() {0, 0, 0, 0}) + 'rdoModifiedGDD ' - 'ucrNudMgdd + resources.ApplyResources(Me.rdoModifiedGDD, "rdoModifiedGDD") + Me.rdoModifiedGDD.Name = "rdoModifiedGDD" + Me.rdoModifiedGDD.TabStop = True + Me.rdoModifiedGDD.UseVisualStyleBackColor = True ' - resources.ApplyResources(Me.ucrNudMgdd, "ucrNudMgdd") - Me.ucrNudMgdd.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMgdd.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMgdd.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMgdd.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMgdd.Name = "ucrNudMgdd" - Me.ucrNudMgdd.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblBaselineMgdd - ' - resources.ApplyResources(Me.lblBaselineMgdd, "lblBaselineMgdd") - Me.lblBaselineMgdd.Name = "lblBaselineMgdd" - Me.lblBaselineMgdd.Tag = "Over" - ' - 'lblLimit - ' - resources.ApplyResources(Me.lblLimit, "lblLimit") - Me.lblLimit.Name = "lblLimit" - Me.lblLimit.Tag = "Over" - ' - 'rdoModifiedGDD - ' - resources.ApplyResources(Me.rdoModifiedGDD, "rdoModifiedGDD") - Me.rdoModifiedGDD.Name = "rdoModifiedGDD" - Me.rdoModifiedGDD.TabStop = True - Me.rdoModifiedGDD.UseVisualStyleBackColor = True - ' - 'lblBaselineGDD + 'lblBaselineGDD ' resources.ApplyResources(Me.lblBaselineGDD, "lblBaselineGDD") Me.lblBaselineGDD.Name = "lblBaselineGDD" @@ -542,6 +559,29 @@ Partial Class dlgTransformClimatic resources.ApplyResources(Me.ucrPnlDegree, "ucrPnlDegree") Me.ucrPnlDegree.Name = "ucrPnlDegree" ' + 'ucrReceiverData + ' + resources.ApplyResources(Me.ucrReceiverData, "ucrReceiverData") + Me.ucrReceiverData.frmParent = Me + Me.ucrReceiverData.Name = "ucrReceiverData" + Me.ucrReceiverData.Selector = Nothing + Me.ucrReceiverData.strNcFilePath = "" + Me.ucrReceiverData.ucrSelector = Nothing + ' + 'lblTMin + ' + resources.ApplyResources(Me.lblTMin, "lblTMin") + Me.lblTMin.Name = "lblTMin" + ' + 'ucrReceiverStation + ' + resources.ApplyResources(Me.ucrReceiverStation, "ucrReceiverStation") + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.ucrSelector = Nothing + ' 'rdoMultSpells ' resources.ApplyResources(Me.rdoMultSpells, "rdoMultSpells") @@ -552,26 +592,6 @@ Partial Class dlgTransformClimatic Me.rdoMultSpells.Name = "rdoMultSpells" Me.rdoMultSpells.UseVisualStyleBackColor = True ' - 'rdoCumulative - ' - resources.ApplyResources(Me.rdoCumulative, "rdoCumulative") - Me.rdoCumulative.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoCumulative.FlatAppearance.BorderSize = 2 - Me.rdoCumulative.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoCumulative.ForeColor = System.Drawing.SystemColors.ActiveCaptionText - Me.rdoCumulative.Name = "rdoCumulative" - Me.rdoCumulative.UseVisualStyleBackColor = True - ' - 'rdoDegree - ' - resources.ApplyResources(Me.rdoDegree, "rdoDegree") - Me.rdoDegree.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoDegree.FlatAppearance.BorderSize = 2 - Me.rdoDegree.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoDegree.ForeColor = System.Drawing.SystemColors.ActiveCaptionText - Me.rdoDegree.Name = "rdoDegree" - Me.rdoDegree.UseVisualStyleBackColor = True - ' 'lblTMax ' resources.ApplyResources(Me.lblTMax, "lblTMax") @@ -582,16 +602,31 @@ Partial Class dlgTransformClimatic resources.ApplyResources(Me.lblTMean, "lblTMean") Me.lblTMean.Name = "lblTMean" ' - 'ucrSaveColumn - ' - resources.ApplyResources(Me.ucrSaveColumn, "ucrSaveColumn") - Me.ucrSaveColumn.Name = "ucrSaveColumn" - ' 'ucrPnlTransform ' resources.ApplyResources(Me.ucrPnlTransform, "ucrPnlTransform") Me.ucrPnlTransform.Name = "ucrPnlTransform" ' + 'rdoDegree + ' + resources.ApplyResources(Me.rdoDegree, "rdoDegree") + Me.rdoDegree.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoDegree.FlatAppearance.BorderSize = 2 + Me.rdoDegree.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoDegree.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoDegree.Name = "rdoDegree" + Me.rdoDegree.UseVisualStyleBackColor = True + ' + 'rdoCumulative + ' + resources.ApplyResources(Me.rdoCumulative, "rdoCumulative") + Me.rdoCumulative.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoCumulative.FlatAppearance.BorderSize = 2 + Me.rdoCumulative.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoCumulative.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoCumulative.Name = "rdoCumulative" + Me.rdoCumulative.UseVisualStyleBackColor = True + ' 'ucrReceiverDate ' resources.ApplyResources(Me.ucrReceiverDate, "ucrReceiverDate") @@ -601,23 +636,6 @@ Partial Class dlgTransformClimatic Me.ucrReceiverDate.strNcFilePath = "" Me.ucrReceiverDate.ucrSelector = Nothing ' - 'ucrReceiverStation - ' - resources.ApplyResources(Me.ucrReceiverStation, "ucrReceiverStation") - Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.ucrSelector = Nothing - ' - 'ucrSelectorTransform - ' - resources.ApplyResources(Me.ucrSelectorTransform, "ucrSelectorTransform") - Me.ucrSelectorTransform.bDropUnusedFilterLevels = False - Me.ucrSelectorTransform.bShowHiddenColumns = False - Me.ucrSelectorTransform.bUseCurrentFilter = True - Me.ucrSelectorTransform.Name = "ucrSelectorTransform" - ' 'ucrBase ' resources.ApplyResources(Me.ucrBase, "ucrBase") @@ -632,6 +650,15 @@ Partial Class dlgTransformClimatic Me.ucrReceiverTMin.strNcFilePath = "" Me.ucrReceiverTMin.ucrSelector = Nothing ' + 'ucrReceiverYear + ' + resources.ApplyResources(Me.ucrReceiverYear, "ucrReceiverYear") + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.ucrSelector = Nothing + ' 'ucrReceiverTMean ' resources.ApplyResources(Me.ucrReceiverTMean, "ucrReceiverTMean") @@ -650,78 +677,51 @@ Partial Class dlgTransformClimatic Me.ucrReceiverTMax.strNcFilePath = "" Me.ucrReceiverTMax.ucrSelector = Nothing ' - 'ucrReceiverData - ' - resources.ApplyResources(Me.ucrReceiverData, "ucrReceiverData") - Me.ucrReceiverData.frmParent = Me - Me.ucrReceiverData.Name = "ucrReceiverData" - Me.ucrReceiverData.Selector = Nothing - Me.ucrReceiverData.strNcFilePath = "" - Me.ucrReceiverData.ucrSelector = Nothing - ' - 'ucrReceiverYear - ' - resources.ApplyResources(Me.ucrReceiverYear, "ucrReceiverYear") - Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Name = "ucrReceiverYear" - Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.ucrSelector = Nothing - ' - 'ucrChkUseMaxMin - ' - resources.ApplyResources(Me.ucrChkUseMaxMin, "ucrChkUseMaxMin") - Me.ucrChkUseMaxMin.Checked = True - Me.ucrChkUseMaxMin.Name = "ucrChkUseMaxMin" - ' - 'ucrChkWB + 'ucrSaveColumn ' - resources.ApplyResources(Me.ucrChkWB, "ucrChkWB") - Me.ucrChkWB.Checked = False - Me.ucrChkWB.Name = "ucrChkWB" + resources.ApplyResources(Me.ucrSaveColumn, "ucrSaveColumn") + Me.ucrSaveColumn.Name = "ucrSaveColumn" ' - 'ucrNudWB + 'ucrSelectorTransform ' - resources.ApplyResources(Me.ucrNudWB, "ucrNudWB") - Me.ucrNudWB.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudWB.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudWB.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudWB.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudWB.Name = "ucrNudWB" - Me.ucrNudWB.Value = New Decimal(New Integer() {0, 0, 0, 0}) + resources.ApplyResources(Me.ucrSelectorTransform, "ucrSelectorTransform") + Me.ucrSelectorTransform.bDropUnusedFilterLevels = False + Me.ucrSelectorTransform.bShowHiddenColumns = False + Me.ucrSelectorTransform.bUseCurrentFilter = True + Me.ucrSelectorTransform.Name = "ucrSelectorTransform" ' 'dlgTransformClimatic ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.Controls.Add(Me.rdoDegree) - Me.Controls.Add(Me.ucrSaveColumn) - Me.Controls.Add(Me.rdoCumulative) - Me.Controls.Add(Me.rdoMultSpells) Me.Controls.Add(Me.rdoWaterBalance) Me.Controls.Add(Me.rdoSpell) + Me.Controls.Add(Me.lblDate) Me.Controls.Add(Me.rdoMoving) Me.Controls.Add(Me.rdoCount) - Me.Controls.Add(Me.ucrPnlTransform) Me.Controls.Add(Me.lblStation) - Me.Controls.Add(Me.ucrReceiverDate) - Me.Controls.Add(Me.ucrReceiverStation) - Me.Controls.Add(Me.ucrSelectorTransform) - Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.lblYear) - Me.Controls.Add(Me.lblDate) - Me.Controls.Add(Me.ucrReceiverTMin) + Me.Controls.Add(Me.ucrChkUseMaxMin) + Me.Controls.Add(Me.lblData) + Me.Controls.Add(Me.grpTransform) Me.Controls.Add(Me.grpDegree) - Me.Controls.Add(Me.ucrReceiverTMean) + Me.Controls.Add(Me.ucrReceiverData) Me.Controls.Add(Me.lblTMin) + Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.rdoMultSpells) Me.Controls.Add(Me.lblTMax) - Me.Controls.Add(Me.ucrReceiverTMax) - Me.Controls.Add(Me.ucrReceiverData) - Me.Controls.Add(Me.ucrReceiverYear) - Me.Controls.Add(Me.ucrChkUseMaxMin) Me.Controls.Add(Me.lblTMean) - Me.Controls.Add(Me.lblData) - Me.Controls.Add(Me.grpTransform) + Me.Controls.Add(Me.ucrPnlTransform) + Me.Controls.Add(Me.rdoDegree) + Me.Controls.Add(Me.rdoCumulative) + Me.Controls.Add(Me.ucrReceiverDate) + Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.ucrReceiverTMin) + Me.Controls.Add(Me.ucrReceiverYear) + Me.Controls.Add(Me.ucrReceiverTMean) + Me.Controls.Add(Me.ucrReceiverTMax) + Me.Controls.Add(Me.ucrSaveColumn) + Me.Controls.Add(Me.ucrSelectorTransform) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -735,80 +735,80 @@ Partial Class dlgTransformClimatic End Sub - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrReceiverYear As ucrReceiverSingle - Friend WithEvents lblYear As Label - Friend WithEvents lblDate As Label - Friend WithEvents ucrReceiverDate As ucrReceiverSingle - Friend WithEvents lblStation As Label - Friend WithEvents ucrReceiverStation As ucrReceiverSingle - Friend WithEvents ucrSelectorTransform As ucrSelectorByDataFrameAddRemove - Friend WithEvents lblData As Label - Friend WithEvents ucrReceiverData As ucrReceiverSingle Friend WithEvents rdoWaterBalance As RadioButton + Friend WithEvents ucrNudLimit As ucrNud + Friend WithEvents ucrNudMgdd As ucrNud + Friend WithEvents lblBaselineMgdd As Label + Friend WithEvents lblLimit As Label + Friend WithEvents ucrInputPosition As ucrInputComboBox + Friend WithEvents ucrChkCircular As ucrCheck Friend WithEvents rdoSpell As RadioButton + Friend WithEvents lblRowsMultSpells As Label + Friend WithEvents lblDate As Label + Friend WithEvents ucrInputSpellUpper As ucrInputTextBox Friend WithEvents rdoMoving As RadioButton Friend WithEvents rdoCount As RadioButton - Friend WithEvents ucrPnlTransform As UcrPanel - Friend WithEvents lblSumRows As Label - Friend WithEvents ucrNudSumOver As ucrNud - Friend WithEvents lblSumOver As Label - Friend WithEvents ucrInputSum As ucrInputComboBox - Friend WithEvents ucrNudCountOver As ucrNud - Friend WithEvents lblCountOver As Label - Friend WithEvents lblWBEvaporation As Label - Friend WithEvents ucrNudWBCapacity As ucrNud - Friend WithEvents lblWBCapacity As Label + Friend WithEvents lblStation As Label + Friend WithEvents lblYear As Label + Friend WithEvents ucrChkUseMaxMin As ucrCheck + Friend WithEvents lblData As Label Friend WithEvents grpTransform As GroupBox - Friend WithEvents ucrInputSpellUpper As ucrInputTextBox - Friend WithEvents ucrInputCondition As ucrInputComboBox - Friend WithEvents lblCondition As Label - Friend WithEvents rdoMultSpells As RadioButton - Friend WithEvents ucrChkGroupByYear As ucrCheck - Friend WithEvents ucrNudMultSpells As ucrNud - Friend WithEvents lblRowsMultSpells As Label - Friend WithEvents ucrInputEvaporation As ucrInputTextBox - Friend WithEvents ucrPnlEvap As UcrPanel + Friend WithEvents ucrNudWB As ucrNud + Friend WithEvents ucrChkWB As ucrCheck + Friend WithEvents ucrInputSpellLower As ucrInputComboBox + Friend WithEvents ucrChkOptions As ucrCheck Friend WithEvents ucrReceiverEvap As ucrReceiverSingle - Friend WithEvents rdoEvapVariable As RadioButton - Friend WithEvents rdoEvapValue As RadioButton - Friend WithEvents lblPosition As Label - Friend WithEvents ucrInputPosition As ucrInputComboBox - Friend WithEvents ucrChkCircular As ucrCheck - Friend WithEvents ucrInputCircularPosition As ucrInputComboBox - Friend WithEvents rdoCumulative As RadioButton - Friend WithEvents ucrInputCumulative As ucrInputComboBox - Friend WithEvents ucrSaveColumn As ucrSave - Friend WithEvents ucrReceiverTMean As ucrReceiverSingle - Friend WithEvents lblTMean As Label - Friend WithEvents ucrReceiverTMin As ucrReceiverSingle - Friend WithEvents lblTMax As Label - Friend WithEvents ucrReceiverTMax As ucrReceiverSingle - Friend WithEvents lblTMin As Label - Friend WithEvents ucrChkUseMaxMin As ucrCheck - Friend WithEvents rdoDegree As RadioButton - Friend WithEvents rdoDiurnalRange As RadioButton - Friend WithEvents ucrPnlDegree As UcrPanel - Friend WithEvents rdoModifiedGDD As RadioButton - Friend WithEvents rdoGrowingDegreeDays As RadioButton - Friend WithEvents rdoHeatingDegreeDays As RadioButton - Friend WithEvents rdoTMean As RadioButton Friend WithEvents grpDegree As GroupBox + Friend WithEvents rdoModifiedGDD As RadioButton Friend WithEvents lblBaselineGDD As Label + Friend WithEvents rdoGrowingDegreeDays As RadioButton Friend WithEvents lblBaselineHDD As Label + Friend WithEvents rdoHeatingDegreeDays As RadioButton Friend WithEvents ucrNudGDD As ucrNud + Friend WithEvents rdoTMean As RadioButton Friend WithEvents ucrNudHDD As ucrNud - Friend WithEvents lblLimit As Label - Friend WithEvents ucrChkOptions As ucrCheck - Friend WithEvents ucrInputSpellLower As ucrInputComboBox - Friend WithEvents ucrNudMgdd As ucrNud - Friend WithEvents lblBaselineMgdd As Label - Friend WithEvents ucrNudLimit As ucrNud - Friend WithEvents ttRdoRange As ToolTip + Friend WithEvents rdoDiurnalRange As RadioButton + Friend WithEvents ucrPnlDegree As UcrPanel + Friend WithEvents ucrReceiverData As ucrReceiverSingle + Friend WithEvents lblTMin As Label + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents rdoMultSpells As RadioButton + Friend WithEvents lblTMax As Label + Friend WithEvents lblTMean As Label + Friend WithEvents ucrPnlTransform As UcrPanel + Friend WithEvents rdoDegree As RadioButton + Friend WithEvents rdoCumulative As RadioButton + Friend WithEvents ucrReceiverDate As ucrReceiverSingle + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrReceiverTMin As ucrReceiverSingle + Friend WithEvents ucrReceiverYear As ucrReceiverSingle + Friend WithEvents ucrReceiverTMean As ucrReceiverSingle + Friend WithEvents ucrReceiverTMax As ucrReceiverSingle + Friend WithEvents ucrSaveColumn As ucrSave + Friend WithEvents ucrSelectorTransform As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrInputEvaporation As ucrInputTextBox + Friend WithEvents ucrChkGroupByYear As ucrCheck + Friend WithEvents rdoEvapVariable As RadioButton + Friend WithEvents rdoEvapValue As RadioButton + Friend WithEvents ucrPnlEvap As UcrPanel + Friend WithEvents ucrInputCircularPosition As ucrInputComboBox + Friend WithEvents lblPosition As Label + Friend WithEvents ucrNudMultSpells As ucrNud + Friend WithEvents lblSumRows As Label + Friend WithEvents ucrInputCondition As ucrInputComboBox + Friend WithEvents lblCondition As Label + Friend WithEvents lblWBEvaporation As Label + Friend WithEvents lblCountOver As Label + Friend WithEvents ucrNudSumOver As ucrNud + Friend WithEvents lblWBCapacity As Label + Friend WithEvents ucrNudWBCapacity As ucrNud + Friend WithEvents ucrInputSum As ucrInputComboBox + Friend WithEvents lblSumOver As Label + Friend WithEvents ucrNudCountOver As ucrNud + Friend WithEvents ucrInputCumulative As ucrInputComboBox + Friend WithEvents ttRdoGdd As ToolTip Friend WithEvents ttRdoTMean As ToolTip Friend WithEvents ttRdoHdd As ToolTip - Friend WithEvents ttRdoGdd As ToolTip Friend WithEvents ttRdoMgdd As ToolTip - Friend WithEvents ucrNudWB As ucrNud - Friend WithEvents ucrChkWB As ucrCheck + Friend WithEvents ttRdoRange As ToolTip End Class diff --git a/instat/dlgTransformClimatic.resx b/instat/dlgTransformClimatic.resx index b41733cce82..7df82c09ec8 100644 --- a/instat/dlgTransformClimatic.resx +++ b/instat/dlgTransformClimatic.resx @@ -117,141 +117,219 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - NoControl + + Button + + + None - - 408, 250 + + MiddleCenter - - 4, 0, 4, 0 + + Flat - - 47, 20 + + NoControl - - 12 + + 358, 8 - - Year: + + 71, 40 - - lblYear + + + 75 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Water Balance - + + MiddleCenter + + + rdoWaterBalance + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 14 + + 0 - + True - - NoControl + + 136, 122 - - 408, 176 + + 6, 6, 6, 6 - - 4, 0, 4, 0 + + 50, 20 - - 48, 20 + + 45 - - 8 + + ucrNudLimit - - Date: + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - lblDate + + grpDegree - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 - - $this + + True - - 15 + + 136, 97 - + + 6, 6, 6, 6 + + + 50, 20 + + + 44 + + + ucrNudMgdd + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDegree + + + 1 + + True - + NoControl - - 408, 100 - - - 4, 0, 4, 0 + + 85, 101 - - 64, 20 + + 50, 13 - - 6 + + 45 - - Station: + + Baseline: - - lblStation + + lblBaselineMgdd - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + grpDegree - - 9 + + 2 - + True - + NoControl - - 408, 326 - - - 4, 0, 4, 0 + + 101, 124 - - 72, 20 + + 31, 13 - - 16 + + 44 - - Element: + + Limit: - - lblData + + lblLimit - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + grpDegree - + + 3 + + + GrowAndShrink + + + 199, 55 + + + 9, 9, 9, 9 + + + 137, 21 + + + 24 + + + ucrInputPosition + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpTransform + + + 12 + + + True + + + 24, 58 + + + 6, 6, 6, 6 + + + 100, 34 + + 26 + + ucrChkCircular + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpTransform + + + 13 + Button @@ -268,16 +346,13 @@ NoControl - 332, 22 - - - 4, 4, 4, 4 + 220, 8 - 106, 60 + 71, 40 - 3 + 74 Spell @@ -295,43 +370,127 @@ $this - 5 - - - Button - - - None - - - MiddleCenter + 1 - - Flat + + True - + NoControl - - 228, 22 + + 12, 25 - - 4, 4, 4, 4 + + 126, 13 - - 106, 60 + + 14 - - 2 + + Rows to Take Max Over: - - Moving + + lblRowsMultSpells - - MiddleCenter + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - rdoMoving + + grpTransform + + + 15 + + + True + + + NoControl + + + 257, 110 + + + 33, 13 + + + 79 + + + Date: + + + lblDate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + 285, 50 + + + 9, 9, 9, 9 + + + 49, 21 + + + 13 + + + ucrInputSpellUpper + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpTransform + + + 16 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 151, 8 + + + 71, 40 + + + 73 + + + Moving + + + MiddleCenter + + + rdoMoving System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -340,7 +499,7 @@ $this - 6 + 3 Button @@ -355,16 +514,13 @@ NoControl - 21, 22 - - - 4, 4, 4, 4 + 13, 8 - 106, 60 + 71, 40 - 1 + 72 Count @@ -382,163 +538,136 @@ $this - 7 - - - Button - - - None - - - MiddleCenter + 4 - - Flat + + True - + NoControl - - 538, 22 - - - 4, 4, 4, 4 - - - 106, 60 + + 257, 60 - - 4 + + 43, 13 - - Water Balance + + 77 - - MiddleCenter + + Station: - - rdoWaterBalance + + lblStation - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 4 + + 5 - + True - + NoControl - - 368, 36 - - - 4, 0, 4, 0 + + 257, 160 - - 49, 20 + + 32, 13 - - 5 + + 81 - - Rows + + Year: - - lblSumRows + + lblYear - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + $this - - 17 + + 6 - + True - - NoControl - - - 236, 36 - - - 4, 0, 4, 0 + + 260, 173 - - 42, 20 + + 6, 6, 6, 6 - - 3 + + 144, 24 - - Over + + 91 - - lblSumOver + + ucrChkUseMaxMin - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpTransform + + $this - - 26 + + 7 - + True - + NoControl - - 18, 36 - - - 4, 0, 4, 0 + + 258, 210 - - 155, 20 + + 48, 13 - - 8 + + 83 - - Rows to Count Over: + + Element: - - lblCountOver + + lblData - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + $this - - 21 + + 8 True - 186, 122 + 124, 81 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 45 @@ -559,13 +688,13 @@ True - 23, 122 + 15, 81 - 6, 6, 6, 6 + 4, 4, 4, 4 - 150, 34 + 100, 23 44 @@ -586,13 +715,13 @@ GrowAndShrink - 106, 76 + 71, 51 - 14, 14, 14, 14 + 9, 9, 9, 9 - 74, 32 + 49, 21 43 @@ -613,493 +742,46 @@ True - 399, 168 + 266, 112 - 9, 9, 9, 9 + 6, 6, 6, 6 - 114, 51 - - - 38 - - - False - - - ucrChkOptions - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTransform - - - 3 - - - True - - - True - - - 144, 144 - - - True - - - 1154, 735 - - - Button - - - None - - - MiddleCenter - - - Flat - - - NoControl - - - 642, 22 - - - 4, 4, 4, 4 - - - 106, 60 - - - 26 - - - Degrees - - - MiddleCenter - - - rdoDegree - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - GrowAndShrink - - - 16, 616 - - - 6, 8, 6, 8 - - - 502, 32 - - - 20 - - - ucrSaveColumn - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 1 - - - Button - - - None - - - MiddleCenter - - - Flat - - - NoControl - - - 124, 22 - - - 4, 4, 4, 4 - - - 106, 60 - - - 25 - - - Cumulative - - - MiddleCenter - - - rdoCumulative - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - Button - - - None - - - MiddleCenter - - - Flat - - - NoControl - - - 435, 22 - - - 4, 4, 4, 4 - - - 106, 60 - - - 23 - - - Multiple Spells - - - MiddleCenter - - - rdoMultSpells - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - GrowAndShrink - - - 16, 14 - - - 9, 9, 9, 9 - - - 746, 74 - - - 0 - - - ucrPnlTransform - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 8 - - - True - - - 412, 195 - - - 0, 0, 0, 0 - - - 206, 30 - - - 9 - - - ucrReceiverDate - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 10 - - - True - - - 412, 120 - - - 0, 0, 0, 0 - - - 206, 30 - - - 7 - - - ucrReceiverStation - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 11 - - - True - - - 15, 92 - - - 0, 0, 0, 0 - - - 320, 274 - - - 5 - - - ucrSelectorTransform - - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 12 - - - True - - - GrowAndShrink - - - 15, 656 - - - 6, 6, 6, 6 - - - 611, 77 - - - 21 - - - ucrBase - - - instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 13 - - - True - - - 412, 420 - - - 0, 0, 0, 0 - - - 206, 30 - - - 31 - - - ucrReceiverTMin - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 16 - - - True - - - 266, 183 - - - 9, 9, 9, 9 - - - 75, 30 - - - 45 - - - ucrNudLimit - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDegree - - - 0 - - - True - - - 266, 146 - - - 9, 9, 9, 9 - - - 75, 30 - - - 44 - - - ucrNudMgdd - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDegree - - - 1 - - - True - - - NoControl - - - 184, 150 - - - 4, 0, 4, 0 - - - 74, 20 - - - 45 - - - Baseline: - - - lblBaselineMgdd - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDegree - - - 2 - - - True + 100, 34 - - NoControl + + 38 - - 204, 186 + + False - - 4, 0, 4, 0 + + ucrChkOptions - - 46, 20 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 44 + + grpTransform - - Limit: + + 3 - - lblLimit + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + 96, 96 - - grpDegree + + True - - 3 + + 516, 490 True @@ -1108,13 +790,10 @@ NoControl - 22, 183 - - - 4, 4, 4, 4 + 10, 122 - 139, 24 + 95, 17 41 @@ -1141,13 +820,10 @@ NoControl - 184, 150 - - - 4, 0, 4, 0 + 85, 100 - 74, 20 + 50, 13 43 @@ -1174,13 +850,10 @@ NoControl - 22, 148 - - - 4, 4, 4, 4 + 10, 99 - 75, 24 + 52, 17 40 @@ -1207,13 +880,10 @@ NoControl - 184, 116 - - - 4, 0, 4, 0 + 85, 77 - 74, 20 + 50, 13 43 @@ -1240,13 +910,10 @@ NoControl - 22, 114 - - - 4, 4, 4, 4 + 10, 76 - 74, 24 + 52, 17 39 @@ -1270,13 +937,13 @@ True - 266, 146 + 137, 97 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 43 @@ -1300,13 +967,10 @@ NoControl - 22, 80 - - - 4, 4, 4, 4 + 10, 53 - 87, 24 + 61, 17 38 @@ -1330,13 +994,13 @@ True - 266, 110 + 136, 73 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 43 @@ -1360,13 +1024,10 @@ NoControl - 22, 45 - - - 4, 4, 4, 4 + 10, 30 - 140, 24 + 96, 17 37 @@ -1390,220 +1051,448 @@ GrowAndShrink - 9, 28 + 6, 19 - 9, 9, 9, 9 + 6, 6, 6, 6 - 178, 190 + 99, 127 34 - - ucrPnlDegree + + ucrPnlDegree + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDegree + + + 13 + + + 9, 246 + + + 195, 151 + + + 98 + + + Options: + + + grpDegree + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + True + + + 260, 223 + + + 0, 0, 0, 0 + + + 123, 20 + + + 84 + + + ucrReceiverData + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 11 + + + True + + + NoControl + + + 257, 260 + + + 33, 13 + + + 92 + + + Tmin: + + + lblTMin + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 + + + True + + + 260, 73 + + + 0, 0, 0, 0 + + + 123, 20 + + + 78 + + + ucrReceiverStation + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 13 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 289, 8 + + + 71, 40 + + + 88 + + + Multiple Spells + + + MiddleCenter + + + rdoMultSpells + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 14 + + + True + + + NoControl + + + 257, 210 + + + 36, 13 + + + 94 + + + Tmax: + + + lblTMax + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 15 + + + True + + + NoControl + + + 255, 210 + + + 43, 13 + + + 96 + + + Tmean: + + + lblTMean + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 16 + + + GrowAndShrink - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10, 2 - - grpDegree + + 6, 6, 6, 6 - - 13 + + 497, 49 - - 785, 176 + + 71 - - 4, 4, 4, 4 + + ucrPnlTransform - - 4, 4, 4, 4 + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 356, 226 + + $this - - 42 + + 17 - - Options: + + Button - - grpDegree + + None - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + MiddleCenter - - $this + + Flat - - 17 + + NoControl - - True + + 427, 8 - - 412, 345 + + 71, 40 - - 0, 0, 0, 0 + + 90 - - 206, 30 + + Degrees - - 33 + + MiddleCenter - - ucrReceiverTMean + + rdoDegree - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 18 - - True + + Button - + + None + + + MiddleCenter + + + Flat + + NoControl - - 408, 400 + + 82, 8 - - 4, 0, 4, 0 + + 71, 40 - - 47, 20 + + 89 - - 28 + + Cumulative - - Tmin: + + MiddleCenter - - lblTMin + + rdoCumulative - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 19 - + True - - NoControl - - - 408, 326 - - - 4, 0, 4, 0 + + 260, 123 - - 51, 20 + + 0, 0, 0, 0 - - 30 + + 123, 20 - - Tmax: + + 80 - - lblTMax + + ucrReceiverDate - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - + 20 - + True - - 412, 345 + + GrowAndShrink - - 0, 0, 0, 0 + + 9, 430 - - 206, 30 + + 4, 4, 4, 4 - - 29 + + 408, 52 - - ucrReceiverTMax + + 87 - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + ucrBase - + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + $this - + 21 - + True - - 412, 345 + + 260, 273 - + 0, 0, 0, 0 - - 206, 30 + + 123, 20 - - 17 + + 95 - - ucrReceiverData + + ucrReceiverTMin - + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - + 22 True - 412, 270 + 260, 173 0, 0, 0, 0 - 206, 30 + 123, 20 - 13 + 82 ucrReceiverYear @@ -1617,68 +1506,113 @@ 23 - + True - - 412, 270 + + 260, 223 - - 9, 9, 9, 9 + + 0, 0, 0, 0 - - 206, 36 + + 123, 20 - - 27 + + 97 - - ucrChkUseMaxMin + + ucrReceiverTMean + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 24 + + + True + + + 260, 223 + + + 0, 0, 0, 0 + + + 123, 20 + + + 93 + + + ucrReceiverTMax + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 25 + + + GrowAndShrink + + + 10, 404 + + + 4, 5, 4, 5 + + + 335, 21 + + + 86 + + + ucrSaveColumn - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 24 + + 26 - + True - - NoControl - - - 408, 326 - - - 4, 0, 4, 0 + + 9, 54 - - 62, 20 + + 0, 0, 0, 0 - - 32 + + 213, 183 - - Tmean: + + 76 - - lblTMean + + ucrSelectorTransform - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 25 - - - 4, 4, 4, 4 + + 27 CenterScreen @@ -1686,10 +1620,10 @@ Transform - - ttRdoRange + + ttRdoGdd - + System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1704,18 +1638,18 @@ System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ttRdoGdd - - - System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ttRdoMgdd System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ttRdoRange + + + System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + dlgTransformClimatic @@ -1723,13 +1657,13 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 530, 80 + 310, 53 0, 0, 0, 0 - 154, 30 + 103, 20 37 @@ -1750,13 +1684,13 @@ True - 232, 80 + 151, 53 - 14, 14, 14, 14 + 9, 9, 9, 9 - 154, 32 + 88, 21 31 @@ -1777,13 +1711,13 @@ True - 36, 168 + 24, 112 - 9, 9, 9, 9 + 6, 6, 6, 6 - 261, 51 + 174, 34 22 @@ -1807,13 +1741,10 @@ NoControl - 430, 83 - - - 4, 4, 4, 4 + 247, 55 - 92, 24 + 63, 17 36 @@ -1840,13 +1771,10 @@ NoControl - 129, 82 - - - 4, 4, 4, 4 + 86, 55 - 75, 24 + 52, 17 35 @@ -1870,13 +1798,13 @@ GrowAndShrink - 123, 70 + 82, 47 - 9, 9, 9, 9 + 6, 6, 6, 6 - 578, 44 + 343, 29 29 @@ -1897,13 +1825,13 @@ GrowAndShrink - 298, 82 + 199, 55 - 14, 14, 14, 14 + 9, 9, 9, 9 - 206, 32 + 137, 21 27 @@ -1927,13 +1855,10 @@ NoControl - 226, 88 - - - 4, 0, 4, 0 + 151, 59 - 69, 20 + 47, 13 25 @@ -1953,71 +1878,17 @@ 11 - - GrowAndShrink - - - 298, 82 - - - 14, 14, 14, 14 - - - 206, 32 - - - 24 - - - ucrInputPosition - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTransform - - - 12 - - - True - - - 36, 87 - - - 9, 9, 9, 9 - - - 150, 51 - - - 26 - - - ucrChkCircular - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTransform - - - 13 - True - 291, 32 + 194, 21 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 15 @@ -2034,77 +1905,47 @@ 14 - + True - + NoControl - - 18, 38 - - - 4, 0, 4, 0 + + 245, 24 - - 180, 20 + + 34, 13 - - 14 + + 5 - - Rows to Take Max Over: + + Rows - - lblRowsMultSpells + + lblSumRows - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform - - - 15 - - - True - - - 428, 75 - - - 14, 14, 14, 14 - - - 74, 32 - - - 13 - - - ucrInputSpellUpper - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - + grpTransform - - 16 + + 17 GrowAndShrink - 186, 75 + 124, 50 - 14, 14, 14, 14 + 9, 9, 9, 9 - 232, 32 + 155, 21 12 @@ -2128,13 +1969,10 @@ NoControl - 18, 80 - - - 4, 0, 4, 0 + 12, 53 - 80, 20 + 54, 13 10 @@ -2161,13 +1999,10 @@ NoControl - 20, 82 - - - 4, 0, 4, 0 + 13, 55 - 98, 20 + 67, 13 6 @@ -2187,17 +2022,47 @@ 20 + + True + + + NoControl + + + 12, 24 + + + 106, 13 + + + 8 + + + Rows to Count Over: + + + lblCountOver + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpTransform + + + 21 + True - 290, 32 + 193, 21 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 4 @@ -2221,13 +2086,10 @@ NoControl - 20, 38 - - - 4, 0, 4, 0 + 13, 25 - 74, 20 + 51, 13 1 @@ -2251,13 +2113,13 @@ True - 129, 32 + 86, 21 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 2 @@ -2278,13 +2140,13 @@ GrowAndShrink - 36, 32 + 24, 21 - 14, 14, 14, 14 + 9, 9, 9, 9 - 168, 32 + 112, 21 0 @@ -2301,17 +2163,47 @@ 25 + + True + + + NoControl + + + 157, 24 + + + 30, 13 + + + 3 + + + Over + + + lblSumOver + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpTransform + + + 26 + True - 201, 32 + 134, 21 - 9, 9, 9, 9 + 6, 6, 6, 6 - 75, 30 + 50, 20 9 @@ -2332,13 +2224,13 @@ GrowAndShrink - 36, 32 + 24, 21 - 14, 14, 14, 14 + 9, 9, 9, 9 - 168, 32 + 112, 21 26 @@ -2356,19 +2248,13 @@ 28 - 15, 392 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 9, 254 - 733, 213 + 428, 151 - 18 + 85 Options @@ -2383,21 +2269,21 @@ $this - 27 + 9 - - 17, 17 + + 38, 8 - 133, 17 + 170, 8 - 252, 17 - - - 357, 17 + 289, 8 - 462, 17 + 405, 12 + + + 520, 12 \ No newline at end of file diff --git a/instat/dlgTransformClimatic.vb b/instat/dlgTransformClimatic.vb index 1aefa1e19c8..54f8333ae37 100644 --- a/instat/dlgTransformClimatic.vb +++ b/instat/dlgTransformClimatic.vb @@ -35,8 +35,8 @@ Public Class dlgTransformClimatic Private clsGreaterThanOperator, clsLessThanOperator As New ROperator ' Water Balance - Private clsPMinFunctionMax, clsPMaxFunctionMax, clsRWaterBalanceFunction As New RFunction - Private clsPMaxOperatorMax, clsReduceOpEvapValue As New ROperator + Private clsPMinFunctionMax, clsPMaxFunctionMax, clsRWaterBalanceFunction, clsTailFunction, clsWBEvaporation As New RFunction + Private clsPMaxOperatorMax, clsReduceOpEvapValue, clsWBOperator As New ROperator 'Degree Private clsDiurnalRangeOperator, clsTMeanAddOperator, clsTMeanDivideOperator As New ROperator @@ -230,9 +230,10 @@ Public Class dlgTransformClimatic ucrChkWB.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkWB.SetText("Reducing") - ucrNudWB.SetParameter(New RParameter("WB_evap_value")) + ucrNudWB.SetParameter(New RParameter("WB_evap_value", 2)) ucrNudWB.SetMinMax(0, 1) ucrNudWB.Increment = 0.01 + ucrNudWB.DecimalPlaces = 2 ' Count ucrNudCountOver.SetParameter(New RParameter("width", 1)) @@ -322,7 +323,7 @@ Public Class dlgTransformClimatic ucrPnlDegree.AddToLinkedControls(ucrNudHDD, {rdoHeatingDegreeDays}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=15.0) ucrPnlDegree.AddToLinkedControls(ucrNudLimit, {rdoModifiedGDD}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=30.0) - ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) ucrPnlTransform.AddToLinkedControls({ucrInputCumulative}, {rdoCumulative}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Sum") ucrPnlTransform.AddToLinkedControls({ucrNudCountOver}, {rdoCount}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) @@ -337,7 +338,6 @@ Public Class dlgTransformClimatic ucrPnlTransform.AddToLinkedControls({ucrReceiverYear, ucrReceiverData, ucrChkOptions}, {rdoCumulative, rdoCount, rdoMoving, rdoMultSpells, rdoSpell, rdoWaterBalance}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlTransform.AddToLinkedControls({ucrChkUseMaxMin, ucrPnlDegree}, {rdoDegree}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlTransform.AddToLinkedControls({ucrChkWB}, {rdoWaterBalance}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkCircular.AddToLinkedControls(ucrInputCircularPosition, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkCircular.AddToLinkedControls(ucrInputPosition, {False}, bNewLinkedHideIfParameterMissing:=True) @@ -366,7 +366,8 @@ Public Class dlgTransformClimatic clsReplaceNAasElement = New RFunction clsRCountFunction = New RFunction clsRWaterBalanceFunction = New RFunction - + clsWBEvaporation = New RFunction + clsTailFunction = New RFunction clsRRaindayMatch = New RFunction clsRRaindayAndOperator = New ROperator clsRRaindayOrOperator = New ROperator @@ -395,6 +396,7 @@ Public Class dlgTransformClimatic clsPMinFunctionMax = New RFunction clsPMaxFunctionMax = New RFunction clsPMaxOperatorMax = New ROperator + clsWBOperator = New ROperator clsGroupByYear.Clear() clsReduceOpEvapValue.Clear() clsGreaterThanOperator.Clear() @@ -496,8 +498,24 @@ Public Class dlgTransformClimatic clsPMinFunctionMax.AddParameter("capacity", 60, iPosition:=1, bIncludeArgumentName:=False) clsRWaterBalanceFunction.AddParameter("replace_na", iPosition:=1, bIncludeArgumentName:=False) clsRWaterBalanceFunction.AddParameter("accumulate", "TRUE", iPosition:=2) - '"Reduce(function(x, y) pmin(pmax(x + y - " & ucrInputEvaporation.GetText & ", 0), " & ucrNudCapacity.Value & "), Rain, accumulate=TRUE)" & Chr(34)) + clsWBOperator.SetOperation("-") + clsWBOperator.AddParameter("left", "x + y", iPosition:=0) + clsWBOperator.AddParameter("right", clsRFunctionParameter:=clsWBEvaporation, iPosition:=1) + clsWBOperator.bSpaceAroundOperation = True + clsWBOperator.bBrackets = False + + clsWBEvaporation.SetRCommand("WB_evaporation") + clsWBEvaporation.AddParameter("water_balance", "x", iPosition:=0, bIncludeArgumentName:=False) + clsWBEvaporation.AddParameter("WB_evap_value", 0.5, iPosition:=1, bIncludeArgumentName:=False) + clsWBEvaporation.AddParameter("capacity", 60, iPosition:=2, bIncludeArgumentName:=False) + clsWBEvaporation.AddParameter("evaporation_value", 5, iPosition:=3, bIncludeArgumentName:=False) + clsWBEvaporation.AddParameter("rain", "rain", iPosition:=4, bIncludeArgumentName:=False) + + clsTailFunction.SetPackageName("utils") + clsTailFunction.SetRCommand("tail") + clsTailFunction.AddParameter("x", "rain", iPosition:=0) + clsTailFunction.AddParameter("n", "-1", iPosition:=1) ' Degree clsDiurnalRangeOperator.SetOperation("-") clsDiurnalRangeOperator.bToScriptAsRString = True @@ -660,9 +678,9 @@ Public Class dlgTransformClimatic ' Water Balance ucrPnlEvap.SetRCode(clsPMaxOperatorMax, bReset) - ucrInputEvaporation.SetRCode(clsPMaxOperatorMax, bReset) ucrReceiverEvap.SetRCode(clsReduceOpEvapValue, bReset) ucrNudWBCapacity.SetRCode(clsPMinFunctionMax, bReset) + ucrNudWB.SetRCode(clsWBOperator, bReset) 'Degree ucrReceiverTMin.SetRCode(clsDiurnalRangeOperator, bReset) @@ -675,6 +693,9 @@ Public Class dlgTransformClimatic ucrPnlDegree.SetRCode(clsDummyFunction, bReset) ucrSaveColumn.SetRCode(clsRTransform, bReset) + If bReset Then + ucrInputEvaporation.SetRCode(clsPMaxOperatorMax, bReset) + End If End Sub Private Sub TestOkEnabled() @@ -779,7 +800,8 @@ Public Class dlgTransformClimatic clsRTransform.RemoveParameterByName("sub_calculations") clsTransformCheck = clsRTransform End If - Evaporation() + ReduceWaterBalance() + 'Evaporation() AddCalculate() SetAssignName() GroupByStation() @@ -901,28 +923,12 @@ Public Class dlgTransformClimatic clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ")", iPosition:=3) End Sub - Private Sub Evaporation() - If rdoWaterBalance.Checked Then - If rdoEvapValue.Checked Then - ucrReceiverData.SetMeAsReceiver() - clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ")") - clsPMaxOperatorMax.AddParameter("evaporation.value", 5, iPosition:=1, bIncludeArgumentName:=False) - ElseIf rdoEvapVariable.Checked Then - ucrReceiverEvap.SetMeAsReceiver() - clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ", " & strCurrDataName & "=" & ucrReceiverEvap.GetVariableNames & ")") - clsReduceOpEvapValue.SetOperation("-") - clsRWaterBalanceFunction.AddParameter("replace_na", clsROperatorParameter:=clsReduceOpEvapValue, iPosition:=1, bIncludeArgumentName:=False) - clsPMaxOperatorMax.RemoveParameterByName("evaporation.value") - End If - End If - End Sub - Private Sub ucrSelectorTransform_ControlValueChanged(ucrchangedControl As ucrCore) Handles ucrSelectorTransform.ControlValueChanged strCurrDataName = Chr(34) & ucrSelectorTransform.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34) RainDays() GroupByYear() GroupByStation() - Evaporation() + ReduceWaterBalance() ChangeFunctions() AddCalculate() End Sub @@ -933,7 +939,7 @@ Public Class dlgTransformClimatic Private Sub ucrReceiverData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverData.ControlValueChanged, ucrReceiverEvap.ControlValueChanged RainDays() - Evaporation() + ReduceWaterBalance() End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged @@ -955,7 +961,7 @@ Public Class dlgTransformClimatic End Sub Private Sub ucrInputEvaporation_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputEvaporation.ControlContentsChanged, ucrPnlEvap.ControlContentsChanged - Evaporation() + ReduceWaterBalance() End Sub Private Sub RasterFunction() @@ -1086,4 +1092,38 @@ Public Class dlgTransformClimatic AddRemoveMeanOperator() AddCalculate() End Sub + Private Sub ReduceWaterBalance() + If rdoWaterBalance.Checked Then + If rdoEvapValue.Checked Then + ucrReceiverData.SetMeAsReceiver() + clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ")") + If ucrChkWB.Checked Then + clsPMaxFunctionMax.AddParameter("0", 0, iPosition:=1, bIncludeArgumentName:=False) + clsPMaxOperatorMax.AddParameter("wb", clsROperatorParameter:=clsWBOperator, iPosition:=0, bIncludeArgumentName:=False) + clsPMaxOperatorMax.RemoveParameterByName("first") + clsPMaxOperatorMax.RemoveParameterByName("evaporation.value") + clsRWaterBalanceFunction.AddParameter("replace_na", clsRFunctionParameter:=clsTailFunction, iPosition:=2, bIncludeArgumentName:=False) + clsRWaterBalanceFunction.AddParameter("init", "0", iPosition:=3, bIncludeArgumentName:=False) + Else + clsPMaxOperatorMax.AddParameter("evaporation.value", 5, iPosition:=1, bIncludeArgumentName:=False) + clsPMaxFunctionMax.RemoveParameterByName("wb") + End If + + ElseIf rdoEvapVariable.Checked Then + ucrReceiverEvap.SetMeAsReceiver() + clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ", " & strCurrDataName & "=" & ucrReceiverEvap.GetVariableNames & ")") + clsReduceOpEvapValue.SetOperation("-") + clsRWaterBalanceFunction.AddParameter("replace_na", clsROperatorParameter:=clsReduceOpEvapValue, iPosition:=1, bIncludeArgumentName:=False) + clsPMaxOperatorMax.RemoveParameterByName("evaporation.value") + End If + End If + End Sub + + Private Sub ucrChkWB_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkWB.ControlValueChanged + ReduceWaterBalance() + End Sub + + Private Sub rdoEvapValue_CheckedChanged(sender As Object, e As EventArgs) Handles rdoEvapValue.CheckedChanged, rdoEvapVariable.CheckedChanged + ReduceWaterBalance() + End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 09f224a2981..c5c51361406 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -3006,3 +3006,25 @@ getExample <- function (topic, package = NULL, lib.loc = NULL, character.only = } return(example_text) } + +WB_evaporation <- function(water_balance, frac, capacity, evaporation_value, rain){ + if (water_balance >= frac*capacity){ + evaporation <- evaporation_value + } else { + if (rain == 0){ + evaporation <- evaporation_value * ((water_balance)/(frac*capacity)) + } else { + if (water_balance < frac*capacity){ + if (rain > evaporation_value){ + evaporation <- evaporation_value + } else { + evaporation <- evaporation_value * ((water_balance)/(frac*capacity)) + evaporation <- evaporation + ((evaporation_value - evaporation)*(rain/evaporation_value)) + } + } else { + evaporation <- evaporation_value + } + } + } + return(evaporation) +} \ 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 14/57] 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 15/57] 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 bf4b8a50591d0930827f19d9859096cb45c4249b Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 28 Dec 2023 17:13:11 +0100 Subject: [PATCH 16/57] Created Climpact dialogue that exports station data in Climpact2 format --- instat/dlgExportForCimpact.Designer.vb | 340 +++++++++++++++++++++++++ instat/dlgExportForCimpact.resx | 120 +++++++++ instat/dlgExportForCimpact.vb | 261 +++++++++++++++++++ instat/frmMain.Designer.vb | 14 +- instat/frmMain.vb | 4 + instat/instat.vbproj | 9 + 6 files changed, 744 insertions(+), 4 deletions(-) create mode 100644 instat/dlgExportForCimpact.Designer.vb create mode 100644 instat/dlgExportForCimpact.resx create mode 100644 instat/dlgExportForCimpact.vb diff --git a/instat/dlgExportForCimpact.Designer.vb b/instat/dlgExportForCimpact.Designer.vb new file mode 100644 index 00000000000..f3accf48437 --- /dev/null +++ b/instat/dlgExportForCimpact.Designer.vb @@ -0,0 +1,340 @@ + _ +Partial Class dlgExportForClimpact + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.lblTN = New System.Windows.Forms.Label() + Me.ucrReceiverTN = New instat.ucrReceiverSingle() + Me.lblTX = New System.Windows.Forms.Label() + Me.ucrReceiverTX = New instat.ucrReceiverSingle() + Me.lblRR = New System.Windows.Forms.Label() + Me.ucrReceiverRR = New instat.ucrReceiverSingle() + Me.lblDay = New System.Windows.Forms.Label() + Me.ucrReceiverDay = New instat.ucrReceiverSingle() + Me.lblMonth = New System.Windows.Forms.Label() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() + Me.ucrChkExportDataFrame = New instat.ucrCheck() + Me.lblExport = New System.Windows.Forms.Label() + Me.cmdBrowse = New System.Windows.Forms.Button() + Me.ucrInputExportFile = New instat.ucrInputTextBox() + Me.ucrSaveNewDataFrame = New instat.ucrSave() + Me.ucrChkNewDataFrame = New instat.ucrCheck() + Me.ucrBase = New instat.ucrButtons() + Me.lblYear = New System.Windows.Forms.Label() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.ucrSelectorImportToClimpact = New instat.ucrSelectorByDataFrameAddRemove() + Me.lblMissingValues = New System.Windows.Forms.Label() + Me.ucrInputCodeMissingValues = New instat.ucrInputTextBox() + Me.SuspendLayout() + ' + 'lblTN + ' + Me.lblTN.AutoSize = True + Me.lblTN.Location = New System.Drawing.Point(278, 244) + Me.lblTN.Name = "lblTN" + Me.lblTN.Size = New System.Drawing.Size(93, 13) + Me.lblTN.TabIndex = 11 + Me.lblTN.Text = "Min. Temperature:" + ' + 'ucrReceiverTN + ' + Me.ucrReceiverTN.AutoSize = True + Me.ucrReceiverTN.frmParent = Me + Me.ucrReceiverTN.Location = New System.Drawing.Point(278, 257) + Me.ucrReceiverTN.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverTN.Name = "ucrReceiverTN" + Me.ucrReceiverTN.Selector = Nothing + Me.ucrReceiverTN.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverTN.strNcFilePath = "" + Me.ucrReceiverTN.TabIndex = 12 + Me.ucrReceiverTN.ucrSelector = Nothing + ' + 'lblTX + ' + Me.lblTX.AutoSize = True + Me.lblTX.Location = New System.Drawing.Point(278, 197) + Me.lblTX.Name = "lblTX" + Me.lblTX.Size = New System.Drawing.Size(96, 13) + Me.lblTX.TabIndex = 9 + Me.lblTX.Text = "Max. Temperature:" + ' + 'ucrReceiverTX + ' + Me.ucrReceiverTX.AutoSize = True + Me.ucrReceiverTX.frmParent = Me + Me.ucrReceiverTX.Location = New System.Drawing.Point(278, 215) + Me.ucrReceiverTX.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverTX.Name = "ucrReceiverTX" + Me.ucrReceiverTX.Selector = Nothing + Me.ucrReceiverTX.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverTX.strNcFilePath = "" + Me.ucrReceiverTX.TabIndex = 10 + Me.ucrReceiverTX.ucrSelector = Nothing + ' + 'lblRR + ' + Me.lblRR.AutoSize = True + Me.lblRR.Location = New System.Drawing.Point(278, 150) + Me.lblRR.Name = "lblRR" + Me.lblRR.Size = New System.Drawing.Size(45, 13) + Me.lblRR.TabIndex = 7 + Me.lblRR.Text = "Rainfall:" + ' + 'ucrReceiverRR + ' + Me.ucrReceiverRR.AutoSize = True + Me.ucrReceiverRR.frmParent = Me + Me.ucrReceiverRR.Location = New System.Drawing.Point(278, 168) + Me.ucrReceiverRR.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverRR.Name = "ucrReceiverRR" + Me.ucrReceiverRR.Selector = Nothing + Me.ucrReceiverRR.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverRR.strNcFilePath = "" + Me.ucrReceiverRR.TabIndex = 8 + Me.ucrReceiverRR.ucrSelector = Nothing + ' + 'lblDay + ' + Me.lblDay.AutoSize = True + Me.lblDay.Location = New System.Drawing.Point(278, 106) + Me.lblDay.Name = "lblDay" + Me.lblDay.Size = New System.Drawing.Size(29, 13) + Me.lblDay.TabIndex = 5 + Me.lblDay.Text = "Day:" + ' + 'ucrReceiverDay + ' + Me.ucrReceiverDay.AutoSize = True + Me.ucrReceiverDay.frmParent = Me + Me.ucrReceiverDay.Location = New System.Drawing.Point(278, 119) + Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDay.Name = "ucrReceiverDay" + Me.ucrReceiverDay.Selector = Nothing + Me.ucrReceiverDay.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDay.strNcFilePath = "" + Me.ucrReceiverDay.TabIndex = 6 + Me.ucrReceiverDay.ucrSelector = Nothing + ' + 'lblMonth + ' + Me.lblMonth.AutoSize = True + Me.lblMonth.Location = New System.Drawing.Point(278, 59) + Me.lblMonth.Name = "lblMonth" + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 3 + Me.lblMonth.Text = "Month:" + ' + 'ucrReceiverMonth + ' + Me.ucrReceiverMonth.AutoSize = True + Me.ucrReceiverMonth.frmParent = Me + Me.ucrReceiverMonth.Location = New System.Drawing.Point(278, 77) + Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMonth.Name = "ucrReceiverMonth" + Me.ucrReceiverMonth.Selector = Nothing + Me.ucrReceiverMonth.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverMonth.strNcFilePath = "" + Me.ucrReceiverMonth.TabIndex = 4 + Me.ucrReceiverMonth.ucrSelector = Nothing + ' + 'ucrChkExportDataFrame + ' + Me.ucrChkExportDataFrame.AutoSize = True + Me.ucrChkExportDataFrame.Checked = False + Me.ucrChkExportDataFrame.Location = New System.Drawing.Point(9, 299) + Me.ucrChkExportDataFrame.Name = "ucrChkExportDataFrame" + Me.ucrChkExportDataFrame.Size = New System.Drawing.Size(266, 23) + Me.ucrChkExportDataFrame.TabIndex = 14 + ' + 'lblExport + ' + Me.lblExport.AutoSize = True + Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblExport.Location = New System.Drawing.Point(9, 370) + Me.lblExport.Name = "lblExport" + Me.lblExport.Size = New System.Drawing.Size(59, 13) + Me.lblExport.TabIndex = 16 + Me.lblExport.Text = "Export File:" + ' + 'cmdBrowse + ' + Me.cmdBrowse.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdBrowse.Location = New System.Drawing.Point(326, 365) + Me.cmdBrowse.Name = "cmdBrowse" + Me.cmdBrowse.Size = New System.Drawing.Size(80, 23) + Me.cmdBrowse.TabIndex = 18 + Me.cmdBrowse.Text = "Browse" + Me.cmdBrowse.UseVisualStyleBackColor = True + ' + 'ucrInputExportFile + ' + Me.ucrInputExportFile.AddQuotesIfUnrecognised = True + Me.ucrInputExportFile.AutoSize = True + Me.ucrInputExportFile.IsMultiline = False + Me.ucrInputExportFile.IsReadOnly = False + Me.ucrInputExportFile.Location = New System.Drawing.Point(142, 366) + Me.ucrInputExportFile.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrInputExportFile.Name = "ucrInputExportFile" + Me.ucrInputExportFile.Size = New System.Drawing.Size(182, 21) + Me.ucrInputExportFile.TabIndex = 17 + ' + 'ucrSaveNewDataFrame + ' + Me.ucrSaveNewDataFrame.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveNewDataFrame.Location = New System.Drawing.Point(9, 331) + Me.ucrSaveNewDataFrame.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveNewDataFrame.Name = "ucrSaveNewDataFrame" + Me.ucrSaveNewDataFrame.Size = New System.Drawing.Size(348, 24) + Me.ucrSaveNewDataFrame.TabIndex = 15 + ' + 'ucrChkNewDataFrame + ' + Me.ucrChkNewDataFrame.AutoSize = True + Me.ucrChkNewDataFrame.Checked = False + Me.ucrChkNewDataFrame.Location = New System.Drawing.Point(9, 270) + Me.ucrChkNewDataFrame.Name = "ucrChkNewDataFrame" + Me.ucrChkNewDataFrame.Size = New System.Drawing.Size(266, 23) + Me.ucrChkNewDataFrame.TabIndex = 13 + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(7, 396) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 19 + ' + 'lblYear + ' + Me.lblYear.AutoSize = True + Me.lblYear.Location = New System.Drawing.Point(278, 12) + Me.lblYear.Name = "lblYear" + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 1 + Me.lblYear.Text = "Year:" + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.AutoSize = True + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Location = New System.Drawing.Point(278, 30) + Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.TabIndex = 2 + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'ucrSelectorImportToClimpact + ' + Me.ucrSelectorImportToClimpact.AutoSize = True + Me.ucrSelectorImportToClimpact.bDropUnusedFilterLevels = False + Me.ucrSelectorImportToClimpact.bShowHiddenColumns = False + Me.ucrSelectorImportToClimpact.bUseCurrentFilter = True + Me.ucrSelectorImportToClimpact.Location = New System.Drawing.Point(9, 3) + Me.ucrSelectorImportToClimpact.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorImportToClimpact.Name = "ucrSelectorImportToClimpact" + Me.ucrSelectorImportToClimpact.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorImportToClimpact.TabIndex = 0 + ' + 'lblMissingValues + ' + Me.lblMissingValues.AutoSize = True + Me.lblMissingValues.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMissingValues.Location = New System.Drawing.Point(4, 244) + Me.lblMissingValues.Name = "lblMissingValues" + Me.lblMissingValues.Size = New System.Drawing.Size(122, 13) + Me.lblMissingValues.TabIndex = 33 + Me.lblMissingValues.Text = "Code Missing Values as:" + ' + 'ucrInputCodeMissingValues + ' + Me.ucrInputCodeMissingValues.AddQuotesIfUnrecognised = True + Me.ucrInputCodeMissingValues.AutoSize = True + Me.ucrInputCodeMissingValues.IsMultiline = False + Me.ucrInputCodeMissingValues.IsReadOnly = False + Me.ucrInputCodeMissingValues.Location = New System.Drawing.Point(132, 242) + Me.ucrInputCodeMissingValues.Name = "ucrInputCodeMissingValues" + Me.ucrInputCodeMissingValues.Size = New System.Drawing.Size(99, 21) + Me.ucrInputCodeMissingValues.TabIndex = 32 + ' + 'dlgExportForClimpact + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi + Me.ClientSize = New System.Drawing.Size(422, 450) + Me.Controls.Add(Me.lblMissingValues) + Me.Controls.Add(Me.ucrInputCodeMissingValues) + Me.Controls.Add(Me.lblTN) + Me.Controls.Add(Me.ucrReceiverTN) + Me.Controls.Add(Me.lblTX) + Me.Controls.Add(Me.ucrReceiverTX) + Me.Controls.Add(Me.lblRR) + Me.Controls.Add(Me.ucrReceiverRR) + Me.Controls.Add(Me.lblDay) + Me.Controls.Add(Me.ucrReceiverDay) + Me.Controls.Add(Me.lblMonth) + Me.Controls.Add(Me.ucrReceiverMonth) + Me.Controls.Add(Me.ucrChkExportDataFrame) + Me.Controls.Add(Me.lblExport) + Me.Controls.Add(Me.cmdBrowse) + Me.Controls.Add(Me.ucrInputExportFile) + Me.Controls.Add(Me.ucrSaveNewDataFrame) + Me.Controls.Add(Me.ucrChkNewDataFrame) + Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.lblYear) + Me.Controls.Add(Me.ucrReceiverYear) + Me.Controls.Add(Me.ucrSelectorImportToClimpact) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "dlgExportForClimpact" + Me.Text = "Export For Climpact" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents lblTN As Label + Friend WithEvents ucrReceiverTN As ucrReceiverSingle + Friend WithEvents lblTX As Label + Friend WithEvents ucrReceiverTX As ucrReceiverSingle + Friend WithEvents lblRR As Label + Friend WithEvents ucrReceiverRR As ucrReceiverSingle + Friend WithEvents lblDay As Label + Friend WithEvents ucrReceiverDay As ucrReceiverSingle + Friend WithEvents lblMonth As Label + Friend WithEvents ucrReceiverMonth As ucrReceiverSingle + Friend WithEvents ucrChkExportDataFrame As ucrCheck + Friend WithEvents lblExport As Label + Friend WithEvents cmdBrowse As Button + Friend WithEvents ucrInputExportFile As ucrInputTextBox + Friend WithEvents ucrSaveNewDataFrame As ucrSave + Friend WithEvents ucrChkNewDataFrame As ucrCheck + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents lblYear As Label + Friend WithEvents ucrReceiverYear As ucrReceiverSingle + Friend WithEvents ucrSelectorImportToClimpact As ucrSelectorByDataFrameAddRemove + Friend WithEvents lblMissingValues As Label + Friend WithEvents ucrInputCodeMissingValues As ucrInputTextBox +End Class diff --git a/instat/dlgExportForCimpact.resx b/instat/dlgExportForCimpact.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgExportForCimpact.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgExportForCimpact.vb b/instat/dlgExportForCimpact.vb new file mode 100644 index 00000000000..80a6108ad49 --- /dev/null +++ b/instat/dlgExportForCimpact.vb @@ -0,0 +1,261 @@ +' 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 System.IO +Imports instat.Translations + +Public Class dlgExportForClimpact + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private clsDataFrameFunction, clsCurrentNewColumnFunction, clsOutputClimpact, clsDummyFunction, clsMutateFunction, clsExportClimpactFunction As New RFunction + Private clsPipeOperator As New ROperator + + Private Sub dlgExportForClimpact_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + autoTranslate(Me) + TestOkEnabled() + End Sub + + Private Sub InitialiseDialog() + + ucrInputCodeMissingValues.SetParameter(New RParameter("na_code")) + ucrInputCodeMissingValues.SetRDefault("-99.9") + ucrInputCodeMissingValues.AddQuotesIfUnrecognised = False + + 'Year Receiver + ucrReceiverYear.Selector = ucrSelectorImportToClimpact + ucrReceiverYear.SetClimaticType("year") + ucrReceiverYear.bAutoFill = True + ucrReceiverYear.strSelectorHeading = "Year Variables" + + 'Month Receiver + ucrReceiverMonth.Selector = ucrSelectorImportToClimpact + ucrReceiverMonth.SetClimaticType("month") + ucrReceiverMonth.bAutoFill = True + ucrReceiverMonth.strSelectorHeading = "Month Variables" + + 'Day Receiver + ucrReceiverDay.Selector = ucrSelectorImportToClimpact + ucrReceiverDay.SetParameter(New RParameter("day", 0)) + ucrReceiverDay.SetParameterIsString() + ucrReceiverDay.bWithQuotes = False + ucrReceiverDay.bAutoFill = True + ucrReceiverDay.SetClimaticType("doy") + ucrReceiverDay.strSelectorHeading = "Day Variables" + + 'Element Receiver + ucrReceiverTX.Selector = ucrSelectorImportToClimpact + ucrReceiverTX.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) + ucrReceiverTX.SetParameterIsString() + ucrReceiverTX.bWithQuotes = False + ucrReceiverTX.SetClimaticType("temp_max") + ucrReceiverTX.bAutoFill = True + + + ucrReceiverTN.Selector = ucrSelectorImportToClimpact + ucrReceiverTN.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) + ucrReceiverTN.SetParameterIsString() + ucrReceiverTN.SetClimaticType("temp_min") + ucrReceiverTN.bAutoFill = True + ucrReceiverTN.bWithQuotes = False + + ucrReceiverRR.SetParameter(New RParameter("left", 2, bNewIncludeArgumentName:=False)) + ucrReceiverRR.Selector = ucrSelectorImportToClimpact + ucrReceiverRR.SetClimaticType("rain") + ucrReceiverRR.bAutoFill = True + ucrReceiverRR.SetParameterIsString() + ucrReceiverRR.bWithQuotes = False + + ucrChkNewDataFrame.SetText("New Data Frame Name") + ucrChkNewDataFrame.AddToLinkedControls(ucrSaveNewDataFrame, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkNewDataFrame.AddParameterValuesCondition(True, "dataframe", "True") + ucrChkNewDataFrame.AddParameterValuesCondition(False, "dataframe", "False") + + ucrChkExportDataFrame.SetText(" Export Data Frame(s)") + ucrChkExportDataFrame.AddToLinkedControls(ucrInputExportFile, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkExportDataFrame.AddParameterValuesCondition(True, "export", "True") + ucrChkExportDataFrame.AddParameterValuesCondition(False, "export", "False") + + ucrSaveNewDataFrame.SetSaveTypeAsDataFrame() + ucrSaveNewDataFrame.SetIsTextBox() + ucrSaveNewDataFrame.SetLabelText("Data Frame Name:") + + ucrInputExportFile.SetParameter(New RParameter("file", 1)) + ucrInputExportFile.IsReadOnly = True + ucrInputExportFile.SetLinkedDisplayControl(lblExport) + + DataFrameAssignTo() + End Sub + + Private Sub SetDefaults() + clsDataFrameFunction = New RFunction + clsDummyFunction = New RFunction + clsCurrentNewColumnFunction = New RFunction + clsMutateFunction = New RFunction + clsExportClimpactFunction = New RFunction + clsPipeOperator = New ROperator + clsOutputClimpact = New RFunction + + ucrSelectorImportToClimpact.Reset() + ucrSaveNewDataFrame.Reset() + + + clsDummyFunction.AddParameter("dataframe", "True", iPosition:=0) + clsDummyFunction.AddParameter("export", "False", iPosition:=1) + + clsDataFrameFunction.SetRCommand("data.frame") + clsDataFrameFunction.AddParameter("x", "columns", iPosition:=5, bIncludeArgumentName:=False) + + clsPipeOperator.SetOperation("%>%") + clsPipeOperator.AddParameter("left", clsRFunctionParameter:=clsOutputClimpact, iPosition:=0) + clsPipeOperator.AddParameter("right", clsRFunctionParameter:=clsMutateFunction, iPosition:=1) + + clsOutputClimpact.SetRCommand("output_Climpact") + clsOutputClimpact.AddParameter("long.data", "TRUE") + + clsMutateFunction.SetPackageName("dplyr") + clsMutateFunction.SetRCommand("mutate") + + clsExportClimpactFunction.SetPackageName("rio") + clsExportClimpactFunction.SetRCommand("export") + clsExportClimpactFunction.AddParameter("x", clsROperatorParameter:=clsPipeOperator, iPosition:=0) + + + 'ucrBase.clsRsyntax.SetBaseRFunction(clsExportClimpactFunction) + ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) + 'ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) + + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + ucrReceiverDay.SetRCode(clsOutputClimpact, bReset) + ucrReceiverYear.SetRCode(clsOutputClimpact, bReset) + ucrSelectorImportToClimpact.SetRCode(clsOutputClimpact, bReset) + ucrReceiverRR.SetRCode(clsOutputClimpact, bReset) + ucrReceiverTN.SetRCode(clsOutputClimpact, bReset) + ucrReceiverTX.SetRCode(clsOutputClimpact, bReset) + ucrReceiverMonth.SetRCode(clsOutputClimpact, bReset) + ucrInputCodeMissingValues.SetRCode(clsOutputClimpact, bReset) + ucrInputExportFile.SetRCode(clsExportClimpactFunction) + End Sub + + Private Sub TestOkEnabled() + ucrBase.OKEnabled(Not ucrReceiverDay.IsEmpty _ + AndAlso Not ucrReceiverMonth.IsEmpty _ + AndAlso Not ucrReceiverYear.IsEmpty _ + AndAlso Not ucrReceiverRR.IsEmpty _ + AndAlso Not ucrReceiverTX.IsEmpty _ + AndAlso Not ucrReceiverTN.IsEmpty + ) + If ucrChkNewDataFrame.Checked And Not ucrSaveNewDataFrame.IsComplete Then + ucrBase.OKEnabled(False) + End If + If ucrChkExportDataFrame.Checked And ucrInputExportFile.IsEmpty Then + ucrBase.OKEnabled(False) + End If + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) + TestOkEnabled() + End Sub + + Private Sub DataFrameAssignTo() + Dim strDataframeName As String = ucrSelectorImportToClimpact.ucrAvailableDataFrames.cboAvailableDataFrames.Text + If strDataframeName = "" OrElse ucrSaveNewDataFrame.bUserTyped Then + Exit Sub + End If + ucrSaveNewDataFrame.SetPrefix(strDataframeName & "__climpact") + End Sub + + Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click + SelectFileToSave() + End Sub + + Private Sub SelectFileToSave() + Using dlgSave As New SaveFileDialog + dlgSave.Title = "Save Climpact File" + dlgSave.Filter = "Comma separated file (*.csv)|*.csv|Text File (*.txt)|*.txt" + If ucrInputExportFile.GetText() <> "" Then + dlgSave.InitialDirectory = ucrInputExportFile.GetText().Replace("/", "\") + Else + dlgSave.InitialDirectory = frmMain.clsInstatOptions.strWorkingDirectory + End If + If dlgSave.ShowDialog() = DialogResult.OK Then + ucrInputExportFile.SetName(dlgSave.FileName.Replace("\", "/")) + End If + TestOkEnabled() + End Using + End Sub + + Private Sub ucrSelectorImportToClimpact_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorImportToClimpact.ControlValueChanged + DataFrameAssignTo() + End Sub + + 'Private Sub ucrChkNewDataFrame_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkNewDataFrame.ControlValueChanged, ucrChkExportDataFrame.ControlValueChanged + ' SettingBaseFunction() + 'End Sub + + 'Private Sub ucrReceiverElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlValueChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverTX.ControlValueChanged + ' ucrBase.clsRsyntax.lstBeforeCodes.Clear() + ' clsCurrentNewColumnFunction = ucrReceiver.Get(True).Clone + ' clsCurrentNewColumnFunction.SetAssignTo("columns") + ' ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) + ' SettingBaseFunction() + 'End Sub + + Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, + ucrSaveNewDataFrame.ControlContentsChanged, ucrInputExportFile.ControlContentsChanged, ucrChkExportDataFrame.ControlContentsChanged, ucrReceiverTX.ControlValueChanged + TestOkEnabled() + End Sub + + Private Sub ucrInputExportFile_Click(sender As Object, e As EventArgs) Handles ucrInputExportFile.Click + If ucrInputExportFile.IsEmpty() Then + SelectFileToSave() + End If + 'SettingBaseFunction() + End Sub + + Private Sub SettingBaseFunction() + cmdBrowse.Visible = False + If ucrChkNewDataFrame.Checked And ucrChkExportDataFrame.Checked Then + ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) + ucrBase.clsRsyntax.ClearCodes() + ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) + ucrBase.clsRsyntax.AddToAfterCodes(clsExportClimpactFunction) + cmdBrowse.Visible = True + ElseIf ucrChkNewDataFrame.Checked AndAlso Not ucrChkExportDataFrame.Checked Then + ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) + ucrBase.clsRsyntax.lstAfterCodes.Clear() + cmdBrowse.Visible = False + ElseIf ucrChkExportDataFrame.Checked AndAlso Not ucrChkNewDataFrame.Checked Then + ucrBase.clsRsyntax.lstBeforeCodes.Clear() + ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) + ucrBase.clsRsyntax.SetBaseRFunction(clsExportClimpactFunction) + ucrBase.clsRsyntax.lstAfterCodes.Clear() + cmdBrowse.Visible = True + End If + End Sub +End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 8b97727f1a8..1e5af34703e 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -188,6 +188,7 @@ Partial Class frmMain Me.mnuClimaticFileExportToClimsoft = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileExportToCPT = New System.Windows.Forms.ToolStripMenuItem() Me.mnuExportToWWRToolStrip = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticFileExportToClimpact = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator18 = New System.Windows.Forms.ToolStripSeparator() Me.mnuClimaticTidyandExamine = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticTidyandExamineVisualiseData = New System.Windows.Forms.ToolStripMenuItem() @@ -1623,7 +1624,7 @@ Partial Class frmMain ' 'mnuClimaticFile ' - Me.mnuClimaticFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFileImportSST, Me.mnuClimaticFileImportfromIRIDataLibrary, Me.mnuClimaticFileImportfromClimateDataStore, Me.mnuClimaticFileImportandTidyNetCDF, Me.mnuClimaticFileImportandTidyShapefile, Me.ToolStripSeparator20, Me.mnuClimateFileImportfromClimSoft, Me.mnuClimateFileImportfromClimSoftWizard, Me.mnuClimaticFileImportfromCliData, Me.ToolStripSeparator15, Me.mnuClimaticFileExportToClimsoft, Me.mnuClimaticFileExportToCPT, Me.mnuExportToWWRToolStrip}) + Me.mnuClimaticFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFileImportSST, Me.mnuClimaticFileImportfromIRIDataLibrary, Me.mnuClimaticFileImportfromClimateDataStore, Me.mnuClimaticFileImportandTidyNetCDF, Me.mnuClimaticFileImportandTidyShapefile, Me.ToolStripSeparator20, Me.mnuClimateFileImportfromClimSoft, Me.mnuClimateFileImportfromClimSoftWizard, Me.mnuClimaticFileImportfromCliData, Me.ToolStripSeparator15, Me.mnuClimaticFileExportToClimsoft, Me.mnuClimaticFileExportToCPT, Me.mnuExportToWWRToolStrip, Me.mnuClimaticFileExportToClimpact}) Me.mnuClimaticFile.Name = "mnuClimaticFile" Me.mnuClimaticFile.Size = New System.Drawing.Size(212, 22) Me.mnuClimaticFile.Text = "File" @@ -1707,6 +1708,12 @@ Partial Class frmMain Me.mnuExportToWWRToolStrip.Size = New System.Drawing.Size(282, 22) Me.mnuExportToWWRToolStrip.Text = "Export to World Weather Records..." ' + 'mnuClimaticFileExportToClimpact + ' + Me.mnuClimaticFileExportToClimpact.Name = "mnuClimaticFileExportToClimpact" + Me.mnuClimaticFileExportToClimpact.Size = New System.Drawing.Size(282, 22) + Me.mnuClimaticFileExportToClimpact.Text = "Export to Climpact..." + ' 'ToolStripSeparator18 ' Me.ToolStripSeparator18.Name = "ToolStripSeparator18" @@ -5092,9 +5099,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() @@ -5774,4 +5779,5 @@ Partial Class frmMain Friend WithEvents mnuClimaticDescribeOtherRosePlots As ToolStripMenuItem Friend WithEvents mnuClimaticDescribeTrendGraph As ToolStripMenuItem Friend WithEvents mnuClimaticDescribeSeasonalGraph As ToolStripMenuItem + Friend WithEvents mnuClimaticFileExportToClimpact As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 3d47b2e8971..f05c52c3480 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2450,6 +2450,10 @@ Public Class frmMain dlgExportToClimsoft.ShowDialog() End Sub + Private Sub mnuClimaticFileExportToClimpact_Click(sender As Object, e As EventArgs) Handles mnuClimaticFileExportToClimpact.Click + dlgExportForClimpact.ShowDialog() + End Sub + Private Sub mnuPrepareDataReshapeScaleOrDistance_Click(sender As Object, e As EventArgs) Handles mnuPrepareDataReshapeScaleOrDistance.Click dlgCluster.ShowDialog() End Sub diff --git a/instat/instat.vbproj b/instat/instat.vbproj index eb03c008b07..ffff0848a70 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -239,6 +239,12 @@ Form + + dlgExportForCimpact.vb + + + Form + dlgFindInVariableOrFilter.vb @@ -3038,6 +3044,9 @@ dlgEdit.vb + + dlgExportForCimpact.vb + dlgExportToClimsoft.vb From 15c498dd715a65c237dd937acc10c54d8b7a2fe7 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:36:05 +0100 Subject: [PATCH 17/57] Code Changes --- ...ct.Designer.vb => dlgExportForClimpact.Designer.vb} | 0 ...ExportForCimpact.resx => dlgExportForClimpact.resx} | 0 ...{dlgExportForCimpact.vb => dlgExportForClimpact.vb} | 0 instat/instat.vbproj | 10 +++++----- 4 files changed, 5 insertions(+), 5 deletions(-) rename instat/{dlgExportForCimpact.Designer.vb => dlgExportForClimpact.Designer.vb} (100%) rename instat/{dlgExportForCimpact.resx => dlgExportForClimpact.resx} (100%) rename instat/{dlgExportForCimpact.vb => dlgExportForClimpact.vb} (100%) diff --git a/instat/dlgExportForCimpact.Designer.vb b/instat/dlgExportForClimpact.Designer.vb similarity index 100% rename from instat/dlgExportForCimpact.Designer.vb rename to instat/dlgExportForClimpact.Designer.vb diff --git a/instat/dlgExportForCimpact.resx b/instat/dlgExportForClimpact.resx similarity index 100% rename from instat/dlgExportForCimpact.resx rename to instat/dlgExportForClimpact.resx diff --git a/instat/dlgExportForCimpact.vb b/instat/dlgExportForClimpact.vb similarity index 100% rename from instat/dlgExportForCimpact.vb rename to instat/dlgExportForClimpact.vb diff --git a/instat/instat.vbproj b/instat/instat.vbproj index ffff0848a70..bbd77d95dd3 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -239,10 +239,10 @@ Form - - dlgExportForCimpact.vb + + dlgExportForClimpact.vb - + Form @@ -3044,8 +3044,8 @@ dlgEdit.vb - - dlgExportForCimpact.vb + + dlgExportForClimpact.vb dlgExportToClimsoft.vb From 9ddf799896538d0b12fbced60a70e44ef910604b Mon Sep 17 00:00:00 2001 From: n-thony Date: Mon, 8 Jan 2024 14:36:44 +0300 Subject: [PATCH 18/57] Fixed bug in Column Selection > Partially labelled option --- instat/static/InstatObject/R/stand_alone_functions.R | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 09f224a2981..0b9e0bee90d 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2555,10 +2555,8 @@ is.containValueLabel <- function(x){ } is.containPartialValueLabel <- function(x) { - if(is.containValueLabel(x)) { - return(!all(x[!is.na(x)] %in% attr(x, labels_label))) - } - else{return(FALSE)} + level_counts <- table(x) + return(length(names(level_counts[level_counts == 0])) > 0) } read_corpora <- function(data){ From 3641eef2235b530e66e51073b89189f4db42c283 Mon Sep 17 00:00:00 2001 From: n-thony Date: Tue, 9 Jan 2024 16:11:18 +0300 Subject: [PATCH 19/57] Added option to select column with un --- instat/dlgSelectColumns.vb | 4 +++- instat/static/InstatObject/R/stand_alone_functions.R | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/instat/dlgSelectColumns.vb b/instat/dlgSelectColumns.vb index 20e1bb3abc9..3ecbe0daa37 100644 --- a/instat/dlgSelectColumns.vb +++ b/instat/dlgSelectColumns.vb @@ -53,7 +53,7 @@ Public Class dlgSelectColumns ucrInputSelectOperation.SetItems({"Columns", "Starts with", "Ends with", "Contains", "Matches", "Numeric range", "Last column", "Where"}) ucrInputSelectOperation.SetDropDownStyleAsNonEditable() - ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Variable label", "Value label", "Empty columns", "NA columns", "Partially labelled"}) + ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Variable label", "Value label", "Empty columns", "NA columns", "Partially labelled", "Unused label"}) ucrInputColumnType.SetDropDownStyleAsNonEditable() ucrInputSelectOperation.AddToLinkedControls(ucrChkIgnoreCase, {"Starts with", "Ends with", "Contains", "Matches"}, bNewLinkedHideIfParameterMissing:=True) @@ -222,6 +222,8 @@ Public Class dlgSelectColumns clsParametersList.AddParameter("fn", "is.NAvariable", iPosition:=0) ElseIf strValue = "Partially labelled" Then clsParametersList.AddParameter("fn", "is.containPartialValueLabel", iPosition:=0) + ElseIf strValue = "Unused label" Then + clsParametersList.AddParameter("fn", "is.containUnusedValueLabel", iPosition:=0) End If Case "Last column" strValue = "Last column" diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 0b9e0bee90d..6fc572a5b41 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2555,6 +2555,14 @@ is.containValueLabel <- function(x){ } is.containPartialValueLabel <- function(x) { + if(is.containValueLabel(x)) { + return(!all(x[!is.na(x)] %in% attr(x, labels_label))) + } + else{return(FALSE)} +} + +is.containUnusedValueLabel <- function(x) { + if(!is.containValueLabel(x)) return(FALSE) level_counts <- table(x) return(length(names(level_counts[level_counts == 0])) > 0) } From a5b85df1591f110f811e14da0a7d45cde6569451 Mon Sep 17 00:00:00 2001 From: n-thony Date: Wed, 10 Jan 2024 12:57:30 +0300 Subject: [PATCH 20/57] minor code change --- instat/dlgSelectColumns.vb | 4 +--- instat/static/InstatObject/R/stand_alone_functions.R | 9 ++------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/instat/dlgSelectColumns.vb b/instat/dlgSelectColumns.vb index 3ecbe0daa37..20e1bb3abc9 100644 --- a/instat/dlgSelectColumns.vb +++ b/instat/dlgSelectColumns.vb @@ -53,7 +53,7 @@ Public Class dlgSelectColumns ucrInputSelectOperation.SetItems({"Columns", "Starts with", "Ends with", "Contains", "Matches", "Numeric range", "Last column", "Where"}) ucrInputSelectOperation.SetDropDownStyleAsNonEditable() - ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Variable label", "Value label", "Empty columns", "NA columns", "Partially labelled", "Unused label"}) + ucrInputColumnType.SetItems({"Numeric", "Factor", "Character", "Logical", "Variable label", "Value label", "Empty columns", "NA columns", "Partially labelled"}) ucrInputColumnType.SetDropDownStyleAsNonEditable() ucrInputSelectOperation.AddToLinkedControls(ucrChkIgnoreCase, {"Starts with", "Ends with", "Contains", "Matches"}, bNewLinkedHideIfParameterMissing:=True) @@ -222,8 +222,6 @@ Public Class dlgSelectColumns clsParametersList.AddParameter("fn", "is.NAvariable", iPosition:=0) ElseIf strValue = "Partially labelled" Then clsParametersList.AddParameter("fn", "is.containPartialValueLabel", iPosition:=0) - ElseIf strValue = "Unused label" Then - clsParametersList.AddParameter("fn", "is.containUnusedValueLabel", iPosition:=0) End If Case "Last column" strValue = "Last column" diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 6fc572a5b41..641dbe99c56 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2556,17 +2556,12 @@ is.containValueLabel <- function(x){ is.containPartialValueLabel <- function(x) { if(is.containValueLabel(x)) { - return(!all(x[!is.na(x)] %in% attr(x, labels_label))) + level_counts <- table(x) + return(!all(x[!is.na(x)] %in% attr(x, labels_label)) && sum(levelCounts == 0) == 0) } else{return(FALSE)} } -is.containUnusedValueLabel <- function(x) { - if(!is.containValueLabel(x)) return(FALSE) - level_counts <- table(x) - return(length(names(level_counts[level_counts == 0])) > 0) -} - read_corpora <- function(data){ data_all <- NULL description <- NULL From 1d8c872a7147b0789750e777d13b195fa92cc5c6 Mon Sep 17 00:00:00 2001 From: n-thony Date: Wed, 10 Jan 2024 13:13:04 +0300 Subject: [PATCH 21/57] minor addition --- instat/static/InstatObject/R/stand_alone_functions.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 641dbe99c56..fe3bc9e6fcf 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -2556,8 +2556,9 @@ is.containValueLabel <- function(x){ is.containPartialValueLabel <- function(x) { if(is.containValueLabel(x)) { - level_counts <- table(x) - return(!all(x[!is.na(x)] %in% attr(x, labels_label)) && sum(levelCounts == 0) == 0) + levelCounts <- table(x) + return(!all(x[!is.na(x)] %in% attr(x, labels_label)) && + sum(levelCounts == 0) == 0) } else{return(FALSE)} } From 3c101da5bba901004ec4ec54a920fef0fdff0fbd Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Wed, 10 Jan 2024 16:04:39 +0300 Subject: [PATCH 22/57] 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 23/57] 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 24/57] 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 25/57] 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 26/57] 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 b2da5ac25485ca958a16d617566216dcf020df1e Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Wed, 17 Jan 2024 17:59:42 +0100 Subject: [PATCH 27/57] Change made --- instat/dlgEndOfRainsSeason.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/dlgEndOfRainsSeason.vb b/instat/dlgEndOfRainsSeason.vb index 9011080d997..46103d31e9f 100644 --- a/instat/dlgEndOfRainsSeason.vb +++ b/instat/dlgEndOfRainsSeason.vb @@ -314,8 +314,8 @@ Public Class dlgEndOfRainsSeason ucrChkEndofSeasonOccurence.AddToLinkedControls(ucrInputEndofSeasonOccurence, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofSeasonDate.AddToLinkedControls(ucrInputEndofSeasonDate, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofSeasonDoy.AddToLinkedControls(ucrInputSeasonDoy, {True}, bNewLinkedHideIfParameterMissing:=True) - ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) - ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation}, bNewLinkedHideIfParameterMissing:=True) + ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) + ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation},bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlEvaporation.AddToLinkedControls(ucrReceiverEvaporation, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsOccurence.AddToLinkedControls(ucrInputEndofRainsOccurence, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsDate.AddToLinkedControls(ucrInputEndofRainsDate, {True}, bNewLinkedHideIfParameterMissing:=True) @@ -674,6 +674,7 @@ Public Class dlgEndOfRainsSeason ' Water Balance min clsEndSeasonWBMinCalc.SetRCommand("instat_calculation$new") clsEndSeasonWBMinCalc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsEndSeasonWBMinCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMinFunction, iPosition:=1) clsEndSeasonWBMinCalc.AddParameter("result_name", Chr(34) & strWBMin & Chr(34), iPosition:=2) clsEndSeasonWBMinCalc.AddParameter("sub_calculations", clsRFunctionParameter:=clsEndSeasonWBMinCalcSubCalcsList, iPosition:=3) clsEndSeasonWBMinCalc.SetAssignTo(strWBMin) @@ -714,6 +715,7 @@ Public Class dlgEndOfRainsSeason ' Water Balance max clsEndSeasonWBMaxCalc.SetRCommand("instat_calculation$new") clsEndSeasonWBMaxCalc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsEndSeasonWBMaxCalc.AddParameter("function_exp", clsRFunctionParameter:=clsReduceWBMaxFunction, iPosition:=1) clsEndSeasonWBMaxCalc.AddParameter("result_name", Chr(34) & strWBMax & Chr(34), iPosition:=2) clsEndSeasonWBMaxCalc.AddParameter("sub_calculations", clsRFunctionParameter:=clsEndSeasonWBMaxCalcSubCalcsList, iPosition:=3) clsEndSeasonWBMaxCalc.SetAssignTo(strWBMax) From 2ec1cdb9c8ecfb1603c1a1f7f7d0621b97e9ad6a Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Thu, 18 Jan 2024 07:53:55 +0100 Subject: [PATCH 28/57] Minor Design change --- instat/dlgEndOfRainsSeason.Designer.vb | 50 +++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/instat/dlgEndOfRainsSeason.Designer.vb b/instat/dlgEndOfRainsSeason.Designer.vb index cdaaea08385..8b4b8203617 100644 --- a/instat/dlgEndOfRainsSeason.Designer.vb +++ b/instat/dlgEndOfRainsSeason.Designer.vb @@ -234,7 +234,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofSeasonOccurence.IsMultiline = False Me.ucrInputEndofSeasonOccurence.IsReadOnly = False Me.ucrInputEndofSeasonOccurence.Location = New System.Drawing.Point(361, 15) - Me.ucrInputEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputEndofSeasonOccurence.Name = "ucrInputEndofSeasonOccurence" Me.ucrInputEndofSeasonOccurence.Size = New System.Drawing.Size(104, 21) Me.ucrInputEndofSeasonOccurence.TabIndex = 38 @@ -246,7 +246,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputSeasonDoy.IsMultiline = False Me.ucrInputSeasonDoy.IsReadOnly = False Me.ucrInputSeasonDoy.Location = New System.Drawing.Point(49, 15) - Me.ucrInputSeasonDoy.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputSeasonDoy.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputSeasonDoy.Name = "ucrInputSeasonDoy" Me.ucrInputSeasonDoy.Size = New System.Drawing.Size(67, 21) Me.ucrInputSeasonDoy.TabIndex = 32 @@ -258,7 +258,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofSeasonDate.IsMultiline = False Me.ucrInputEndofSeasonDate.IsReadOnly = False Me.ucrInputEndofSeasonDate.Location = New System.Drawing.Point(165, 15) - Me.ucrInputEndofSeasonDate.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputEndofSeasonDate.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputEndofSeasonDate.Name = "ucrInputEndofSeasonDate" Me.ucrInputEndofSeasonDate.Size = New System.Drawing.Size(110, 21) Me.ucrInputEndofSeasonDate.TabIndex = 37 @@ -268,7 +268,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkEndofSeasonOccurence.AutoSize = True Me.ucrChkEndofSeasonOccurence.Checked = False Me.ucrChkEndofSeasonOccurence.Location = New System.Drawing.Point(281, 17) - Me.ucrChkEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkEndofSeasonOccurence.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkEndofSeasonOccurence.Name = "ucrChkEndofSeasonOccurence" Me.ucrChkEndofSeasonOccurence.Size = New System.Drawing.Size(84, 34) Me.ucrChkEndofSeasonOccurence.TabIndex = 48 @@ -278,7 +278,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkEndofSeasonDate.AutoSize = True Me.ucrChkEndofSeasonDate.Checked = False Me.ucrChkEndofSeasonDate.Location = New System.Drawing.Point(121, 16) - Me.ucrChkEndofSeasonDate.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkEndofSeasonDate.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkEndofSeasonDate.Name = "ucrChkEndofSeasonDate" Me.ucrChkEndofSeasonDate.Size = New System.Drawing.Size(53, 34) Me.ucrChkEndofSeasonDate.TabIndex = 47 @@ -288,7 +288,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkEndofSeasonDoy.AutoSize = True Me.ucrChkEndofSeasonDoy.Checked = False Me.ucrChkEndofSeasonDoy.Location = New System.Drawing.Point(4, 16) - Me.ucrChkEndofSeasonDoy.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkEndofSeasonDoy.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkEndofSeasonDoy.Name = "ucrChkEndofSeasonDoy" Me.ucrChkEndofSeasonDoy.Size = New System.Drawing.Size(58, 34) Me.ucrChkEndofSeasonDoy.TabIndex = 46 @@ -315,7 +315,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofRainsDate.IsMultiline = False Me.ucrInputEndofRainsDate.IsReadOnly = False Me.ucrInputEndofRainsDate.Location = New System.Drawing.Point(165, 17) - Me.ucrInputEndofRainsDate.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputEndofRainsDate.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputEndofRainsDate.Name = "ucrInputEndofRainsDate" Me.ucrInputEndofRainsDate.Size = New System.Drawing.Size(93, 17) Me.ucrInputEndofRainsDate.TabIndex = 36 @@ -327,7 +327,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndofRainsOccurence.IsMultiline = False Me.ucrInputEndofRainsOccurence.IsReadOnly = False Me.ucrInputEndofRainsOccurence.Location = New System.Drawing.Point(341, 16) - Me.ucrInputEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputEndofRainsOccurence.Name = "ucrInputEndofRainsOccurence" Me.ucrInputEndofRainsOccurence.Size = New System.Drawing.Size(94, 20) Me.ucrInputEndofRainsOccurence.TabIndex = 39 @@ -339,7 +339,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEndRainDoy.IsMultiline = False Me.ucrInputEndRainDoy.IsReadOnly = False Me.ucrInputEndRainDoy.Location = New System.Drawing.Point(50, 17) - Me.ucrInputEndRainDoy.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputEndRainDoy.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputEndRainDoy.Name = "ucrInputEndRainDoy" Me.ucrInputEndRainDoy.Size = New System.Drawing.Size(65, 21) Me.ucrInputEndRainDoy.TabIndex = 50 @@ -349,7 +349,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkEndofRainsDoy.AutoSize = True Me.ucrChkEndofRainsDoy.Checked = False Me.ucrChkEndofRainsDoy.Location = New System.Drawing.Point(5, 18) - Me.ucrChkEndofRainsDoy.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkEndofRainsDoy.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkEndofRainsDoy.Name = "ucrChkEndofRainsDoy" Me.ucrChkEndofRainsDoy.Size = New System.Drawing.Size(60, 34) Me.ucrChkEndofRainsDoy.TabIndex = 49 @@ -359,7 +359,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkEndofRainsDate.AutoSize = True Me.ucrChkEndofRainsDate.Checked = False Me.ucrChkEndofRainsDate.Location = New System.Drawing.Point(118, 17) - Me.ucrChkEndofRainsDate.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkEndofRainsDate.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkEndofRainsDate.Name = "ucrChkEndofRainsDate" Me.ucrChkEndofRainsDate.Size = New System.Drawing.Size(52, 34) Me.ucrChkEndofRainsDate.TabIndex = 48 @@ -369,7 +369,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkEndofRainsOccurence.AutoSize = True Me.ucrChkEndofRainsOccurence.Checked = False Me.ucrChkEndofRainsOccurence.Location = New System.Drawing.Point(264, 16) - Me.ucrChkEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkEndofRainsOccurence.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkEndofRainsOccurence.Name = "ucrChkEndofRainsOccurence" Me.ucrChkEndofRainsOccurence.Size = New System.Drawing.Size(91, 34) Me.ucrChkEndofRainsOccurence.TabIndex = 47 @@ -410,7 +410,7 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrPnlEndOfRainsAndSeasons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlEndOfRainsAndSeasons.Location = New System.Drawing.Point(79, 9) - Me.ucrPnlEndOfRainsAndSeasons.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrPnlEndOfRainsAndSeasons.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlEndOfRainsAndSeasons.Name = "ucrPnlEndOfRainsAndSeasons" Me.ucrPnlEndOfRainsAndSeasons.Size = New System.Drawing.Size(273, 35) Me.ucrPnlEndOfRainsAndSeasons.TabIndex = 34 @@ -435,7 +435,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputEvaporation.IsMultiline = False Me.ucrInputEvaporation.IsReadOnly = False Me.ucrInputEvaporation.Location = New System.Drawing.Point(153, 342) - Me.ucrInputEvaporation.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputEvaporation.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputEvaporation.Name = "ucrInputEvaporation" Me.ucrInputEvaporation.Size = New System.Drawing.Size(64, 21) Me.ucrInputEvaporation.TabIndex = 27 @@ -444,7 +444,7 @@ Partial Class dlgEndOfRainsSeason ' Me.ucrPnlEvaporation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrPnlEvaporation.Location = New System.Drawing.Point(96, 337) - Me.ucrPnlEvaporation.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrPnlEvaporation.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlEvaporation.Name = "ucrPnlEvaporation" Me.ucrPnlEvaporation.Size = New System.Drawing.Size(345, 27) Me.ucrPnlEvaporation.TabIndex = 25 @@ -456,7 +456,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrInputFilterPreview.IsMultiline = False Me.ucrInputFilterPreview.IsReadOnly = True Me.ucrInputFilterPreview.Location = New System.Drawing.Point(131, 273) - Me.ucrInputFilterPreview.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputFilterPreview.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" Me.ucrInputFilterPreview.Size = New System.Drawing.Size(242, 22) Me.ucrInputFilterPreview.TabIndex = 12 @@ -467,7 +467,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudTotalOverDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTotalOverDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudTotalOverDays.Location = New System.Drawing.Point(233, 308) - Me.ucrNudTotalOverDays.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudTotalOverDays.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudTotalOverDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTotalOverDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTotalOverDays.Name = "ucrNudTotalOverDays" @@ -481,7 +481,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudAmount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudAmount.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudAmount.Location = New System.Drawing.Point(68, 308) - Me.ucrNudAmount.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudAmount.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudAmount.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudAmount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudAmount.Name = "ucrNudAmount" @@ -495,7 +495,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudWBLessThan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWBLessThan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudWBLessThan.Location = New System.Drawing.Point(234, 308) - Me.ucrNudWBLessThan.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudWBLessThan.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudWBLessThan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudWBLessThan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWBLessThan.Name = "ucrNudWBLessThan" @@ -509,7 +509,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudCapacity.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCapacity.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudCapacity.Location = New System.Drawing.Point(69, 308) - Me.ucrNudCapacity.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudCapacity.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudCapacity.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudCapacity.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCapacity.Name = "ucrNudCapacity" @@ -599,7 +599,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrBase.Location = New System.Drawing.Point(3, 472) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 33 @@ -610,7 +610,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrNudWB.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWB.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudWB.Location = New System.Drawing.Point(126, 374) - Me.ucrNudWB.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudWB.Margin = New System.Windows.Forms.Padding(6) Me.ucrNudWB.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudWB.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWB.Name = "ucrNudWB" @@ -623,7 +623,7 @@ Partial Class dlgEndOfRainsSeason Me.ucrChkWB.AutoSize = True Me.ucrChkWB.Checked = False Me.ucrChkWB.Location = New System.Drawing.Point(17, 374) - Me.ucrChkWB.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrChkWB.Margin = New System.Windows.Forms.Padding(4) Me.ucrChkWB.Name = "ucrChkWB" Me.ucrChkWB.Size = New System.Drawing.Size(100, 23) Me.ucrChkWB.TabIndex = 46 @@ -634,6 +634,8 @@ Partial Class dlgEndOfRainsSeason Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(477, 549) + Me.Controls.Add(Me.ucrReceiverEvaporation) + Me.Controls.Add(Me.ucrInputEvaporation) Me.Controls.Add(Me.ucrNudWB) Me.Controls.Add(Me.ucrChkWB) Me.Controls.Add(Me.rdoEndOfSeasons) @@ -642,8 +644,6 @@ Partial Class dlgEndOfRainsSeason Me.Controls.Add(Me.rdoVariableEvaporation) Me.Controls.Add(Me.grpEndofSeason) Me.Controls.Add(Me.rdoValueEvaporation) - Me.Controls.Add(Me.ucrReceiverEvaporation) - Me.Controls.Add(Me.ucrInputEvaporation) Me.Controls.Add(Me.ucrPnlEvaporation) Me.Controls.Add(Me.ucrInputFilterPreview) Me.Controls.Add(Me.cmdDoyRange) From 5e067fd584704f68b10a7595fce6eee4464d7f96 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 19 Jan 2024 09:47:54 +0300 Subject: [PATCH 29/57] 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 bd82e5e455090a4530028677dad85fd373206428 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Fri, 19 Jan 2024 08:09:18 +0100 Subject: [PATCH 30/57] Ajusted Appearance of the Define Climatic Data dialog --- instat/DlgDefineClimaticData.Designer.vb | 770 +++++++++++------------ 1 file changed, 385 insertions(+), 385 deletions(-) diff --git a/instat/DlgDefineClimaticData.Designer.vb b/instat/DlgDefineClimaticData.Designer.vb index cfd7f27a21e..bfa0558f912 100644 --- a/instat/DlgDefineClimaticData.Designer.vb +++ b/instat/DlgDefineClimaticData.Designer.vb @@ -38,102 +38,68 @@ Partial Class DlgDefineClimaticData 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.ucrChkLinkedMetaData = New instat.ucrCheck() - Me.ucrSelectorLinkedDataFrame = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrInputCheckInput = New instat.ucrInputTextBox() Me.cmdCheckUnique = New System.Windows.Forms.Button() - Me.ucrSelectorDefineClimaticData = New instat.ucrSelectorByDataFrameAddRemove() Me.lblStationName = New System.Windows.Forms.Label() Me.lblDOY = New System.Windows.Forms.Label() Me.lblLongitude = New System.Windows.Forms.Label() Me.lblLatitude = New System.Windows.Forms.Label() Me.lblAltitude = New System.Windows.Forms.Label() Me.grpStation = New System.Windows.Forms.GroupBox() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() - Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() - Me.ucrReceiverAltitude = New instat.ucrReceiverSingle() - Me.ucrBase = New instat.ucrButtons() Me.grpDateTime = New System.Windows.Forms.GroupBox() - Me.ucrReceiverYear = New instat.ucrReceiverSingle() Me.lblDate = New System.Windows.Forms.Label() Me.lblMonth = New System.Windows.Forms.Label() - Me.ucrReceiverDOY = New instat.ucrReceiverSingle() Me.lblYear = New System.Windows.Forms.Label() - Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrReceiverMonth = New instat.ucrReceiverSingle() - Me.ucrReceiverDay = New instat.ucrReceiverSingle() Me.lblDay = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() - Me.ucrReceiverStationMeta = New instat.ucrReceiverSingle() - Me.ucrReceiverLonMeta = New instat.ucrReceiverSingle() - Me.ucrReceiverLatMeta = New instat.ucrReceiverSingle() - Me.ucrReceiverAltMeta = New instat.ucrReceiverSingle() Me.grpMeta = New System.Windows.Forms.GroupBox() Me.lblRain = New System.Windows.Forms.Label() Me.grpElements = New System.Windows.Forms.GroupBox() - Me.ucrReceiverMaxRH = New instat.ucrReceiverSingle() Me.lblMaxRH = New System.Windows.Forms.Label() - Me.ucrReceiverMinRH = New instat.ucrReceiverSingle() Me.lblMinimumRH = New System.Windows.Forms.Label() + Me.lblMaxTemp = New System.Windows.Forms.Label() + Me.lblCloudCover = New System.Windows.Forms.Label() + Me.lblMinTemp = New System.Windows.Forms.Label() + Me.lblRadiation = New System.Windows.Forms.Label() + Me.lblSunshine = New System.Windows.Forms.Label() + Me.lblWindSpeed = New System.Windows.Forms.Label() + Me.lblWindDirection = New System.Windows.Forms.Label() + Me.ucrChkLinkedMetaData = New instat.ucrCheck() + Me.ucrSelectorLinkedDataFrame = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrInputCheckInput = New instat.ucrInputTextBox() + Me.ucrSelectorDefineClimaticData = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverAltitude = New instat.ucrReceiverSingle() + Me.ucrBase = New instat.ucrButtons() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.ucrReceiverDOY = New instat.ucrReceiverSingle() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() + Me.ucrReceiverDay = New instat.ucrReceiverSingle() + Me.ucrReceiverMaxRH = New instat.ucrReceiverSingle() + Me.ucrReceiverMinRH = New instat.ucrReceiverSingle() Me.ucrReceiverWindDirection = New instat.ucrReceiverSingle() Me.ucrReceiverRain = New instat.ucrReceiverSingle() Me.ucrReceiverSunshine = New instat.ucrReceiverSingle() Me.ucrReceiverRadiation = New instat.ucrReceiverSingle() Me.ucrReceiverMaxTemp = New instat.ucrReceiverSingle() Me.ucrReceiverCloudCover = New instat.ucrReceiverSingle() - Me.lblMaxTemp = New System.Windows.Forms.Label() - Me.lblCloudCover = New System.Windows.Forms.Label() - Me.lblMinTemp = New System.Windows.Forms.Label() - Me.lblRadiation = New System.Windows.Forms.Label() Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() - Me.lblSunshine = New System.Windows.Forms.Label() Me.ucrReceiverMinTemp = New instat.ucrReceiverSingle() - Me.lblWindSpeed = New System.Windows.Forms.Label() - Me.lblWindDirection = New System.Windows.Forms.Label() + Me.ucrReceiverStationMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverLonMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverLatMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverAltMeta = New instat.ucrReceiverSingle() Me.grpStation.SuspendLayout() Me.grpDateTime.SuspendLayout() Me.grpMeta.SuspendLayout() Me.grpElements.SuspendLayout() Me.SuspendLayout() ' - 'ucrChkLinkedMetaData - ' - Me.ucrChkLinkedMetaData.AutoSize = True - Me.ucrChkLinkedMetaData.Checked = False - Me.ucrChkLinkedMetaData.Location = New System.Drawing.Point(16, 204) - Me.ucrChkLinkedMetaData.Margin = New System.Windows.Forms.Padding(6) - Me.ucrChkLinkedMetaData.Name = "ucrChkLinkedMetaData" - Me.ucrChkLinkedMetaData.Size = New System.Drawing.Size(195, 23) - Me.ucrChkLinkedMetaData.TabIndex = 21 - ' - 'ucrSelectorLinkedDataFrame - ' - Me.ucrSelectorLinkedDataFrame.AutoSize = True - Me.ucrSelectorLinkedDataFrame.bDropUnusedFilterLevels = False - Me.ucrSelectorLinkedDataFrame.bShowHiddenColumns = False - Me.ucrSelectorLinkedDataFrame.bUseCurrentFilter = True - Me.ucrSelectorLinkedDataFrame.Location = New System.Drawing.Point(16, 224) - Me.ucrSelectorLinkedDataFrame.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorLinkedDataFrame.Name = "ucrSelectorLinkedDataFrame" - Me.ucrSelectorLinkedDataFrame.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorLinkedDataFrame.TabIndex = 20 - ' - 'ucrInputCheckInput - ' - Me.ucrInputCheckInput.AddQuotesIfUnrecognised = True - Me.ucrInputCheckInput.AutoSize = True - Me.ucrInputCheckInput.IsMultiline = False - Me.ucrInputCheckInput.IsReadOnly = False - Me.ucrInputCheckInput.Location = New System.Drawing.Point(147, 439) - Me.ucrInputCheckInput.Margin = New System.Windows.Forms.Padding(9) - Me.ucrInputCheckInput.Name = "ucrInputCheckInput" - Me.ucrInputCheckInput.Size = New System.Drawing.Size(253, 21) - Me.ucrInputCheckInput.TabIndex = 18 - ' 'cmdCheckUnique ' Me.cmdCheckUnique.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -144,18 +110,6 @@ Partial Class DlgDefineClimaticData Me.cmdCheckUnique.Text = "Check Duplicates" Me.cmdCheckUnique.UseVisualStyleBackColor = True ' - 'ucrSelectorDefineClimaticData - ' - Me.ucrSelectorDefineClimaticData.AutoSize = True - Me.ucrSelectorDefineClimaticData.bDropUnusedFilterLevels = False - Me.ucrSelectorDefineClimaticData.bShowHiddenColumns = False - Me.ucrSelectorDefineClimaticData.bUseCurrentFilter = True - Me.ucrSelectorDefineClimaticData.Location = New System.Drawing.Point(16, 9) - Me.ucrSelectorDefineClimaticData.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorDefineClimaticData.Name = "ucrSelectorDefineClimaticData" - Me.ucrSelectorDefineClimaticData.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorDefineClimaticData.TabIndex = 13 - ' 'lblStationName ' Me.lblStationName.AutoSize = True @@ -218,74 +172,12 @@ Partial Class DlgDefineClimaticData Me.grpStation.Controls.Add(Me.ucrReceiverAltitude) Me.grpStation.Location = New System.Drawing.Point(242, 234) Me.grpStation.Name = "grpStation" - Me.grpStation.Size = New System.Drawing.Size(112, 173) + Me.grpStation.Size = New System.Drawing.Size(126, 173) Me.grpStation.TabIndex = 14 Me.grpStation.TabStop = False Me.grpStation.Tag = "" Me.grpStation.Text = "Station" ' - 'ucrReceiverStation - ' - Me.ucrReceiverStation.AutoSize = True - Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(10, 29) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 8 - Me.ucrReceiverStation.ucrSelector = Nothing - ' - 'ucrReceiverLongitude - ' - Me.ucrReceiverLongitude.AutoSize = True - Me.ucrReceiverLongitude.frmParent = Me - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(10, 106) - Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" - Me.ucrReceiverLongitude.Selector = Nothing - Me.ucrReceiverLongitude.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverLongitude.strNcFilePath = "" - Me.ucrReceiverLongitude.TabIndex = 10 - Me.ucrReceiverLongitude.ucrSelector = Nothing - ' - 'ucrReceiverLatitude - ' - Me.ucrReceiverLatitude.AutoSize = True - Me.ucrReceiverLatitude.frmParent = Me - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(10, 68) - Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" - Me.ucrReceiverLatitude.Selector = Nothing - Me.ucrReceiverLatitude.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverLatitude.strNcFilePath = "" - Me.ucrReceiverLatitude.TabIndex = 9 - Me.ucrReceiverLatitude.ucrSelector = Nothing - ' - 'ucrReceiverAltitude - ' - Me.ucrReceiverAltitude.AutoSize = True - Me.ucrReceiverAltitude.frmParent = Me - Me.ucrReceiverAltitude.Location = New System.Drawing.Point(10, 145) - Me.ucrReceiverAltitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverAltitude.Name = "ucrReceiverAltitude" - Me.ucrReceiverAltitude.Selector = Nothing - Me.ucrReceiverAltitude.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverAltitude.strNcFilePath = "" - Me.ucrReceiverAltitude.TabIndex = 11 - Me.ucrReceiverAltitude.ucrSelector = Nothing - ' - 'ucrBase - ' - Me.ucrBase.AutoSize = True - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(6, 476) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 19 - ' 'grpDateTime ' Me.grpDateTime.Controls.Add(Me.lblDOY) @@ -298,7 +190,7 @@ Partial Class DlgDefineClimaticData Me.grpDateTime.Controls.Add(Me.ucrReceiverMonth) Me.grpDateTime.Controls.Add(Me.ucrReceiverDay) Me.grpDateTime.Controls.Add(Me.lblDay) - Me.grpDateTime.Location = New System.Drawing.Point(372, 234) + Me.grpDateTime.Location = New System.Drawing.Point(242, 12) Me.grpDateTime.Name = "grpDateTime" Me.grpDateTime.Size = New System.Drawing.Size(126, 196) Me.grpDateTime.TabIndex = 15 @@ -306,19 +198,6 @@ Partial Class DlgDefineClimaticData Me.grpDateTime.Tag = "" Me.grpDateTime.Text = "Date and Time" ' - 'ucrReceiverYear - ' - Me.ucrReceiverYear.AutoSize = True - Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Location = New System.Drawing.Point(12, 62) - Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverYear.Name = "ucrReceiverYear" - Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 3 - Me.ucrReceiverYear.ucrSelector = Nothing - ' 'lblDate ' Me.lblDate.AutoSize = True @@ -339,19 +218,6 @@ Partial Class DlgDefineClimaticData Me.lblMonth.TabIndex = 4 Me.lblMonth.Text = "Month:" ' - 'ucrReceiverDOY - ' - Me.ucrReceiverDOY.AutoSize = True - Me.ucrReceiverDOY.frmParent = Me - Me.ucrReceiverDOY.Location = New System.Drawing.Point(12, 170) - Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDOY.Name = "ucrReceiverDOY" - Me.ucrReceiverDOY.Selector = Nothing - Me.ucrReceiverDOY.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverDOY.strNcFilePath = "" - Me.ucrReceiverDOY.TabIndex = 9 - Me.ucrReceiverDOY.ucrSelector = Nothing - ' 'lblYear ' Me.lblYear.AutoSize = True @@ -362,45 +228,6 @@ Partial Class DlgDefineClimaticData Me.lblYear.TabIndex = 2 Me.lblYear.Text = "Year:" ' - 'ucrReceiverDate - ' - Me.ucrReceiverDate.AutoSize = True - Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(12, 26) - Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDate.Name = "ucrReceiverDate" - Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverDate.strNcFilePath = "" - Me.ucrReceiverDate.TabIndex = 1 - Me.ucrReceiverDate.ucrSelector = Nothing - ' - 'ucrReceiverMonth - ' - Me.ucrReceiverMonth.AutoSize = True - Me.ucrReceiverMonth.frmParent = Me - Me.ucrReceiverMonth.Location = New System.Drawing.Point(12, 98) - Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMonth.Name = "ucrReceiverMonth" - Me.ucrReceiverMonth.Selector = Nothing - Me.ucrReceiverMonth.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverMonth.strNcFilePath = "" - Me.ucrReceiverMonth.TabIndex = 5 - Me.ucrReceiverMonth.ucrSelector = Nothing - ' - 'ucrReceiverDay - ' - Me.ucrReceiverDay.AutoSize = True - Me.ucrReceiverDay.frmParent = Me - Me.ucrReceiverDay.Location = New System.Drawing.Point(12, 133) - Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDay.Name = "ucrReceiverDay" - Me.ucrReceiverDay.Selector = Nothing - Me.ucrReceiverDay.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverDay.strNcFilePath = "" - Me.ucrReceiverDay.TabIndex = 7 - Me.ucrReceiverDay.ucrSelector = Nothing - ' 'lblDay ' Me.lblDay.AutoSize = True @@ -451,77 +278,25 @@ Partial Class DlgDefineClimaticData Me.Label4.TabIndex = 0 Me.Label4.Text = "Name:" ' - 'ucrReceiverStationMeta - ' - Me.ucrReceiverStationMeta.AutoSize = True - Me.ucrReceiverStationMeta.frmParent = Me - Me.ucrReceiverStationMeta.Location = New System.Drawing.Point(11, 31) - Me.ucrReceiverStationMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStationMeta.Name = "ucrReceiverStationMeta" - Me.ucrReceiverStationMeta.Selector = Nothing - Me.ucrReceiverStationMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverStationMeta.strNcFilePath = "" - Me.ucrReceiverStationMeta.TabIndex = 8 - Me.ucrReceiverStationMeta.ucrSelector = Nothing - ' - 'ucrReceiverLonMeta + 'grpMeta ' - Me.ucrReceiverLonMeta.AutoSize = True - Me.ucrReceiverLonMeta.frmParent = Me - Me.ucrReceiverLonMeta.Location = New System.Drawing.Point(9, 108) - Me.ucrReceiverLonMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLonMeta.Name = "ucrReceiverLonMeta" - Me.ucrReceiverLonMeta.Selector = Nothing - Me.ucrReceiverLonMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverLonMeta.strNcFilePath = "" - Me.ucrReceiverLonMeta.TabIndex = 10 - Me.ucrReceiverLonMeta.ucrSelector = Nothing + Me.grpMeta.Controls.Add(Me.Label1) + Me.grpMeta.Controls.Add(Me.Label2) + Me.grpMeta.Controls.Add(Me.Label3) + Me.grpMeta.Controls.Add(Me.Label4) + Me.grpMeta.Controls.Add(Me.ucrReceiverStationMeta) + Me.grpMeta.Controls.Add(Me.ucrReceiverLonMeta) + Me.grpMeta.Controls.Add(Me.ucrReceiverLatMeta) + Me.grpMeta.Controls.Add(Me.ucrReceiverAltMeta) + Me.grpMeta.Location = New System.Drawing.Point(242, 234) + Me.grpMeta.Name = "grpMeta" + Me.grpMeta.Size = New System.Drawing.Size(112, 173) + Me.grpMeta.TabIndex = 22 + Me.grpMeta.TabStop = False + Me.grpMeta.Tag = "" + Me.grpMeta.Text = "Station" ' - 'ucrReceiverLatMeta - ' - Me.ucrReceiverLatMeta.AutoSize = True - Me.ucrReceiverLatMeta.frmParent = Me - Me.ucrReceiverLatMeta.Location = New System.Drawing.Point(9, 70) - Me.ucrReceiverLatMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLatMeta.Name = "ucrReceiverLatMeta" - Me.ucrReceiverLatMeta.Selector = Nothing - Me.ucrReceiverLatMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverLatMeta.strNcFilePath = "" - Me.ucrReceiverLatMeta.TabIndex = 9 - Me.ucrReceiverLatMeta.ucrSelector = Nothing - ' - 'ucrReceiverAltMeta - ' - Me.ucrReceiverAltMeta.AutoSize = True - Me.ucrReceiverAltMeta.frmParent = Me - Me.ucrReceiverAltMeta.Location = New System.Drawing.Point(9, 147) - Me.ucrReceiverAltMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverAltMeta.Name = "ucrReceiverAltMeta" - Me.ucrReceiverAltMeta.Selector = Nothing - Me.ucrReceiverAltMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverAltMeta.strNcFilePath = "" - Me.ucrReceiverAltMeta.TabIndex = 11 - Me.ucrReceiverAltMeta.ucrSelector = Nothing - ' - 'grpMeta - ' - Me.grpMeta.Controls.Add(Me.Label1) - Me.grpMeta.Controls.Add(Me.Label2) - Me.grpMeta.Controls.Add(Me.Label3) - Me.grpMeta.Controls.Add(Me.Label4) - Me.grpMeta.Controls.Add(Me.ucrReceiverStationMeta) - Me.grpMeta.Controls.Add(Me.ucrReceiverLonMeta) - Me.grpMeta.Controls.Add(Me.ucrReceiverLatMeta) - Me.grpMeta.Controls.Add(Me.ucrReceiverAltMeta) - Me.grpMeta.Location = New System.Drawing.Point(242, 234) - Me.grpMeta.Name = "grpMeta" - Me.grpMeta.Size = New System.Drawing.Size(112, 173) - Me.grpMeta.TabIndex = 22 - Me.grpMeta.TabStop = False - Me.grpMeta.Tag = "" - Me.grpMeta.Text = "Station" - ' - 'lblRain + 'lblRain ' Me.lblRain.AutoSize = True Me.lblRain.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -553,64 +328,307 @@ Partial Class DlgDefineClimaticData Me.grpElements.Controls.Add(Me.ucrReceiverMinTemp) Me.grpElements.Controls.Add(Me.lblWindSpeed) Me.grpElements.Controls.Add(Me.lblWindDirection) - Me.grpElements.Location = New System.Drawing.Point(238, 6) + Me.grpElements.Location = New System.Drawing.Point(374, 12) Me.grpElements.Name = "grpElements" - Me.grpElements.Size = New System.Drawing.Size(260, 225) + Me.grpElements.Size = New System.Drawing.Size(151, 395) Me.grpElements.TabIndex = 16 Me.grpElements.TabStop = False Me.grpElements.Text = "Elements" ' + 'lblMaxRH + ' + Me.lblMaxRH.AutoSize = True + Me.lblMaxRH.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMaxRH.Location = New System.Drawing.Point(15, 351) + Me.lblMaxRH.Name = "lblMaxRH" + Me.lblMaxRH.Size = New System.Drawing.Size(90, 13) + Me.lblMaxRH.TabIndex = 18 + Me.lblMaxRH.Text = "Maximum RH (%):" + ' + 'lblMinimumRH + ' + Me.lblMinimumRH.AutoSize = True + Me.lblMinimumRH.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMinimumRH.Location = New System.Drawing.Point(15, 315) + Me.lblMinimumRH.Name = "lblMinimumRH" + Me.lblMinimumRH.Size = New System.Drawing.Size(87, 13) + Me.lblMinimumRH.TabIndex = 16 + Me.lblMinimumRH.Text = "Minimum RH (%):" + ' + 'lblMaxTemp + ' + Me.lblMaxTemp.AutoSize = True + Me.lblMaxTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMaxTemp.Location = New System.Drawing.Point(15, 88) + Me.lblMaxTemp.Name = "lblMaxTemp" + Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) + Me.lblMaxTemp.TabIndex = 4 + Me.lblMaxTemp.Text = "Maximum Temperature:" + ' + 'lblCloudCover + ' + Me.lblCloudCover.AutoSize = True + Me.lblCloudCover.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblCloudCover.Location = New System.Drawing.Point(15, 277) + Me.lblCloudCover.Name = "lblCloudCover" + Me.lblCloudCover.Size = New System.Drawing.Size(68, 13) + Me.lblCloudCover.TabIndex = 14 + Me.lblCloudCover.Text = "Cloud Cover:" + ' + 'lblMinTemp + ' + Me.lblMinTemp.AutoSize = True + Me.lblMinTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMinTemp.Location = New System.Drawing.Point(15, 51) + Me.lblMinTemp.Name = "lblMinTemp" + Me.lblMinTemp.Size = New System.Drawing.Size(114, 13) + Me.lblMinTemp.TabIndex = 2 + Me.lblMinTemp.Text = "Minimum Temperature:" + ' + 'lblRadiation + ' + Me.lblRadiation.AutoSize = True + Me.lblRadiation.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblRadiation.Location = New System.Drawing.Point(15, 239) + Me.lblRadiation.Name = "lblRadiation" + Me.lblRadiation.Size = New System.Drawing.Size(55, 13) + Me.lblRadiation.TabIndex = 12 + Me.lblRadiation.Text = "Radiation:" + ' + 'lblSunshine + ' + Me.lblSunshine.AutoSize = True + Me.lblSunshine.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSunshine.Location = New System.Drawing.Point(15, 199) + Me.lblSunshine.Name = "lblSunshine" + Me.lblSunshine.Size = New System.Drawing.Size(85, 13) + Me.lblSunshine.TabIndex = 10 + Me.lblSunshine.Text = "Sunshine Hours:" + ' + 'lblWindSpeed + ' + Me.lblWindSpeed.AutoSize = True + Me.lblWindSpeed.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblWindSpeed.Location = New System.Drawing.Point(15, 125) + Me.lblWindSpeed.Name = "lblWindSpeed" + Me.lblWindSpeed.Size = New System.Drawing.Size(69, 13) + Me.lblWindSpeed.TabIndex = 6 + Me.lblWindSpeed.Text = "Wind Speed:" + ' + 'lblWindDirection + ' + Me.lblWindDirection.AutoSize = True + Me.lblWindDirection.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblWindDirection.Location = New System.Drawing.Point(15, 162) + Me.lblWindDirection.Name = "lblWindDirection" + Me.lblWindDirection.Size = New System.Drawing.Size(80, 13) + Me.lblWindDirection.TabIndex = 8 + Me.lblWindDirection.Text = "Wind Direction:" + ' + 'ucrChkLinkedMetaData + ' + Me.ucrChkLinkedMetaData.AutoSize = True + Me.ucrChkLinkedMetaData.Checked = False + Me.ucrChkLinkedMetaData.Location = New System.Drawing.Point(16, 204) + Me.ucrChkLinkedMetaData.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkLinkedMetaData.Name = "ucrChkLinkedMetaData" + Me.ucrChkLinkedMetaData.Size = New System.Drawing.Size(195, 23) + Me.ucrChkLinkedMetaData.TabIndex = 21 + ' + 'ucrSelectorLinkedDataFrame + ' + Me.ucrSelectorLinkedDataFrame.AutoSize = True + Me.ucrSelectorLinkedDataFrame.bDropUnusedFilterLevels = False + Me.ucrSelectorLinkedDataFrame.bShowHiddenColumns = False + Me.ucrSelectorLinkedDataFrame.bUseCurrentFilter = True + Me.ucrSelectorLinkedDataFrame.Location = New System.Drawing.Point(16, 224) + Me.ucrSelectorLinkedDataFrame.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorLinkedDataFrame.Name = "ucrSelectorLinkedDataFrame" + Me.ucrSelectorLinkedDataFrame.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorLinkedDataFrame.TabIndex = 20 + ' + 'ucrInputCheckInput + ' + Me.ucrInputCheckInput.AddQuotesIfUnrecognised = True + Me.ucrInputCheckInput.AutoSize = True + Me.ucrInputCheckInput.IsMultiline = False + Me.ucrInputCheckInput.IsReadOnly = False + Me.ucrInputCheckInput.Location = New System.Drawing.Point(147, 439) + Me.ucrInputCheckInput.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputCheckInput.Name = "ucrInputCheckInput" + Me.ucrInputCheckInput.Size = New System.Drawing.Size(253, 21) + Me.ucrInputCheckInput.TabIndex = 18 + ' + 'ucrSelectorDefineClimaticData + ' + Me.ucrSelectorDefineClimaticData.AutoSize = True + Me.ucrSelectorDefineClimaticData.bDropUnusedFilterLevels = False + Me.ucrSelectorDefineClimaticData.bShowHiddenColumns = False + Me.ucrSelectorDefineClimaticData.bUseCurrentFilter = True + Me.ucrSelectorDefineClimaticData.Location = New System.Drawing.Point(16, 9) + Me.ucrSelectorDefineClimaticData.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDefineClimaticData.Name = "ucrSelectorDefineClimaticData" + Me.ucrSelectorDefineClimaticData.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorDefineClimaticData.TabIndex = 13 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Nothing + Me.ucrReceiverStation.Location = New System.Drawing.Point(10, 29) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 8 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverLongitude + ' + Me.ucrReceiverLongitude.AutoSize = True + Me.ucrReceiverLongitude.frmParent = Nothing + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(10, 106) + Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" + Me.ucrReceiverLongitude.Selector = Nothing + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverLongitude.strNcFilePath = "" + Me.ucrReceiverLongitude.TabIndex = 10 + Me.ucrReceiverLongitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Nothing + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(10, 68) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 9 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverAltitude + ' + Me.ucrReceiverAltitude.AutoSize = True + Me.ucrReceiverAltitude.frmParent = Nothing + Me.ucrReceiverAltitude.Location = New System.Drawing.Point(10, 145) + Me.ucrReceiverAltitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltitude.Name = "ucrReceiverAltitude" + Me.ucrReceiverAltitude.Selector = Nothing + Me.ucrReceiverAltitude.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverAltitude.strNcFilePath = "" + Me.ucrReceiverAltitude.TabIndex = 11 + Me.ucrReceiverAltitude.ucrSelector = Nothing + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(6, 476) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 19 + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.AutoSize = True + Me.ucrReceiverYear.frmParent = Nothing + Me.ucrReceiverYear.Location = New System.Drawing.Point(12, 62) + Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.TabIndex = 3 + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'ucrReceiverDOY + ' + Me.ucrReceiverDOY.AutoSize = True + Me.ucrReceiverDOY.frmParent = Nothing + Me.ucrReceiverDOY.Location = New System.Drawing.Point(12, 170) + Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDOY.Name = "ucrReceiverDOY" + Me.ucrReceiverDOY.Selector = Nothing + Me.ucrReceiverDOY.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDOY.strNcFilePath = "" + Me.ucrReceiverDOY.TabIndex = 9 + Me.ucrReceiverDOY.ucrSelector = Nothing + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.AutoSize = True + Me.ucrReceiverDate.frmParent = Nothing + Me.ucrReceiverDate.Location = New System.Drawing.Point(12, 26) + Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDate.strNcFilePath = "" + Me.ucrReceiverDate.TabIndex = 1 + Me.ucrReceiverDate.ucrSelector = Nothing + ' + 'ucrReceiverMonth + ' + Me.ucrReceiverMonth.AutoSize = True + Me.ucrReceiverMonth.frmParent = Nothing + Me.ucrReceiverMonth.Location = New System.Drawing.Point(12, 98) + Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMonth.Name = "ucrReceiverMonth" + Me.ucrReceiverMonth.Selector = Nothing + Me.ucrReceiverMonth.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverMonth.strNcFilePath = "" + Me.ucrReceiverMonth.TabIndex = 5 + Me.ucrReceiverMonth.ucrSelector = Nothing + ' + 'ucrReceiverDay + ' + Me.ucrReceiverDay.AutoSize = True + Me.ucrReceiverDay.frmParent = Nothing + Me.ucrReceiverDay.Location = New System.Drawing.Point(12, 133) + Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDay.Name = "ucrReceiverDay" + Me.ucrReceiverDay.Selector = Nothing + Me.ucrReceiverDay.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDay.strNcFilePath = "" + Me.ucrReceiverDay.TabIndex = 7 + Me.ucrReceiverDay.ucrSelector = Nothing + ' 'ucrReceiverMaxRH ' Me.ucrReceiverMaxRH.AutoSize = True - Me.ucrReceiverMaxRH.frmParent = Me - Me.ucrReceiverMaxRH.Location = New System.Drawing.Point(144, 193) + Me.ucrReceiverMaxRH.frmParent = Nothing + Me.ucrReceiverMaxRH.Location = New System.Drawing.Point(18, 366) Me.ucrReceiverMaxRH.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMaxRH.Name = "ucrReceiverMaxRH" Me.ucrReceiverMaxRH.Selector = Nothing - Me.ucrReceiverMaxRH.Size = New System.Drawing.Size(99, 20) + Me.ucrReceiverMaxRH.Size = New System.Drawing.Size(116, 20) Me.ucrReceiverMaxRH.strNcFilePath = "" Me.ucrReceiverMaxRH.TabIndex = 19 Me.ucrReceiverMaxRH.ucrSelector = Nothing ' - 'lblMaxRH - ' - Me.lblMaxRH.AutoSize = True - Me.lblMaxRH.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxRH.Location = New System.Drawing.Point(141, 178) - Me.lblMaxRH.Name = "lblMaxRH" - Me.lblMaxRH.Size = New System.Drawing.Size(90, 13) - Me.lblMaxRH.TabIndex = 18 - Me.lblMaxRH.Text = "Maximum RH (%):" - ' 'ucrReceiverMinRH ' Me.ucrReceiverMinRH.AutoSize = True - Me.ucrReceiverMinRH.frmParent = Me - Me.ucrReceiverMinRH.Location = New System.Drawing.Point(144, 152) + Me.ucrReceiverMinRH.frmParent = Nothing + Me.ucrReceiverMinRH.Location = New System.Drawing.Point(18, 330) Me.ucrReceiverMinRH.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinRH.Name = "ucrReceiverMinRH" Me.ucrReceiverMinRH.Selector = Nothing - Me.ucrReceiverMinRH.Size = New System.Drawing.Size(99, 20) + Me.ucrReceiverMinRH.Size = New System.Drawing.Size(116, 20) Me.ucrReceiverMinRH.strNcFilePath = "" Me.ucrReceiverMinRH.TabIndex = 17 Me.ucrReceiverMinRH.ucrSelector = Nothing ' - 'lblMinimumRH - ' - Me.lblMinimumRH.AutoSize = True - Me.lblMinimumRH.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMinimumRH.Location = New System.Drawing.Point(141, 137) - Me.lblMinimumRH.Name = "lblMinimumRH" - Me.lblMinimumRH.Size = New System.Drawing.Size(87, 13) - Me.lblMinimumRH.TabIndex = 16 - Me.lblMinimumRH.Text = "Minimum RH (%):" - ' 'ucrReceiverWindDirection ' Me.ucrReceiverWindDirection.AutoSize = True - Me.ucrReceiverWindDirection.frmParent = Me - Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(18, 193) + Me.ucrReceiverWindDirection.frmParent = Nothing + Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(18, 177) Me.ucrReceiverWindDirection.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWindDirection.Name = "ucrReceiverWindDirection" Me.ucrReceiverWindDirection.Selector = Nothing @@ -622,8 +640,8 @@ Partial Class DlgDefineClimaticData 'ucrReceiverRain ' Me.ucrReceiverRain.AutoSize = True - Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(18, 31) + Me.ucrReceiverRain.frmParent = Nothing + Me.ucrReceiverRain.Location = New System.Drawing.Point(18, 30) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing @@ -635,12 +653,12 @@ Partial Class DlgDefineClimaticData 'ucrReceiverSunshine ' Me.ucrReceiverSunshine.AutoSize = True - Me.ucrReceiverSunshine.frmParent = Me - Me.ucrReceiverSunshine.Location = New System.Drawing.Point(144, 31) + Me.ucrReceiverSunshine.frmParent = Nothing + Me.ucrReceiverSunshine.Location = New System.Drawing.Point(18, 215) Me.ucrReceiverSunshine.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSunshine.Name = "ucrReceiverSunshine" Me.ucrReceiverSunshine.Selector = Nothing - Me.ucrReceiverSunshine.Size = New System.Drawing.Size(99, 20) + Me.ucrReceiverSunshine.Size = New System.Drawing.Size(116, 20) Me.ucrReceiverSunshine.strNcFilePath = "" Me.ucrReceiverSunshine.TabIndex = 11 Me.ucrReceiverSunshine.ucrSelector = Nothing @@ -648,12 +666,12 @@ Partial Class DlgDefineClimaticData 'ucrReceiverRadiation ' Me.ucrReceiverRadiation.AutoSize = True - Me.ucrReceiverRadiation.frmParent = Me - Me.ucrReceiverRadiation.Location = New System.Drawing.Point(144, 70) + Me.ucrReceiverRadiation.frmParent = Nothing + Me.ucrReceiverRadiation.Location = New System.Drawing.Point(18, 254) Me.ucrReceiverRadiation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRadiation.Name = "ucrReceiverRadiation" Me.ucrReceiverRadiation.Selector = Nothing - Me.ucrReceiverRadiation.Size = New System.Drawing.Size(99, 20) + Me.ucrReceiverRadiation.Size = New System.Drawing.Size(116, 20) Me.ucrReceiverRadiation.strNcFilePath = "" Me.ucrReceiverRadiation.TabIndex = 13 Me.ucrReceiverRadiation.ucrSelector = Nothing @@ -661,8 +679,8 @@ Partial Class DlgDefineClimaticData 'ucrReceiverMaxTemp ' Me.ucrReceiverMaxTemp.AutoSize = True - Me.ucrReceiverMaxTemp.frmParent = Me - Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(18, 111) + Me.ucrReceiverMaxTemp.frmParent = Nothing + Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(18, 103) Me.ucrReceiverMaxTemp.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMaxTemp.Name = "ucrReceiverMaxTemp" Me.ucrReceiverMaxTemp.Selector = Nothing @@ -674,61 +692,21 @@ Partial Class DlgDefineClimaticData 'ucrReceiverCloudCover ' Me.ucrReceiverCloudCover.AutoSize = True - Me.ucrReceiverCloudCover.frmParent = Me - Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(144, 111) + Me.ucrReceiverCloudCover.frmParent = Nothing + Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(18, 292) Me.ucrReceiverCloudCover.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverCloudCover.Name = "ucrReceiverCloudCover" Me.ucrReceiverCloudCover.Selector = Nothing - Me.ucrReceiverCloudCover.Size = New System.Drawing.Size(99, 20) + Me.ucrReceiverCloudCover.Size = New System.Drawing.Size(116, 20) Me.ucrReceiverCloudCover.strNcFilePath = "" Me.ucrReceiverCloudCover.TabIndex = 15 Me.ucrReceiverCloudCover.ucrSelector = Nothing ' - 'lblMaxTemp - ' - Me.lblMaxTemp.AutoSize = True - Me.lblMaxTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxTemp.Location = New System.Drawing.Point(15, 96) - Me.lblMaxTemp.Name = "lblMaxTemp" - Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) - Me.lblMaxTemp.TabIndex = 4 - Me.lblMaxTemp.Text = "Maximum Temperature:" - ' - 'lblCloudCover - ' - Me.lblCloudCover.AutoSize = True - Me.lblCloudCover.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblCloudCover.Location = New System.Drawing.Point(141, 96) - Me.lblCloudCover.Name = "lblCloudCover" - Me.lblCloudCover.Size = New System.Drawing.Size(68, 13) - Me.lblCloudCover.TabIndex = 14 - Me.lblCloudCover.Text = "Cloud Cover:" - ' - 'lblMinTemp - ' - Me.lblMinTemp.AutoSize = True - Me.lblMinTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMinTemp.Location = New System.Drawing.Point(15, 55) - Me.lblMinTemp.Name = "lblMinTemp" - Me.lblMinTemp.Size = New System.Drawing.Size(111, 13) - Me.lblMinTemp.TabIndex = 2 - Me.lblMinTemp.Text = "Minimum Temperature" - ' - 'lblRadiation - ' - Me.lblRadiation.AutoSize = True - Me.lblRadiation.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblRadiation.Location = New System.Drawing.Point(141, 55) - Me.lblRadiation.Name = "lblRadiation" - Me.lblRadiation.Size = New System.Drawing.Size(55, 13) - Me.lblRadiation.TabIndex = 12 - Me.lblRadiation.Text = "Radiation:" - ' 'ucrReceiverWindSpeed ' Me.ucrReceiverWindSpeed.AutoSize = True - Me.ucrReceiverWindSpeed.frmParent = Me - Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(18, 152) + Me.ucrReceiverWindSpeed.frmParent = Nothing + Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(18, 140) Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" Me.ucrReceiverWindSpeed.Selector = Nothing @@ -737,21 +715,11 @@ Partial Class DlgDefineClimaticData Me.ucrReceiverWindSpeed.TabIndex = 7 Me.ucrReceiverWindSpeed.ucrSelector = Nothing ' - 'lblSunshine - ' - Me.lblSunshine.AutoSize = True - Me.lblSunshine.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSunshine.Location = New System.Drawing.Point(141, 15) - Me.lblSunshine.Name = "lblSunshine" - Me.lblSunshine.Size = New System.Drawing.Size(85, 13) - Me.lblSunshine.TabIndex = 10 - Me.lblSunshine.Text = "Sunshine Hours:" - ' 'ucrReceiverMinTemp ' Me.ucrReceiverMinTemp.AutoSize = True - Me.ucrReceiverMinTemp.frmParent = Me - Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(18, 70) + Me.ucrReceiverMinTemp.frmParent = Nothing + Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(18, 66) Me.ucrReceiverMinTemp.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinTemp.Name = "ucrReceiverMinTemp" Me.ucrReceiverMinTemp.Selector = Nothing @@ -760,32 +728,64 @@ Partial Class DlgDefineClimaticData Me.ucrReceiverMinTemp.TabIndex = 3 Me.ucrReceiverMinTemp.ucrSelector = Nothing ' - 'lblWindSpeed + 'ucrReceiverStationMeta ' - Me.lblWindSpeed.AutoSize = True - Me.lblWindSpeed.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblWindSpeed.Location = New System.Drawing.Point(15, 137) - Me.lblWindSpeed.Name = "lblWindSpeed" - Me.lblWindSpeed.Size = New System.Drawing.Size(69, 13) - Me.lblWindSpeed.TabIndex = 6 - Me.lblWindSpeed.Text = "Wind Speed:" + Me.ucrReceiverStationMeta.AutoSize = True + Me.ucrReceiverStationMeta.frmParent = Nothing + Me.ucrReceiverStationMeta.Location = New System.Drawing.Point(11, 31) + Me.ucrReceiverStationMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationMeta.Name = "ucrReceiverStationMeta" + Me.ucrReceiverStationMeta.Selector = Nothing + Me.ucrReceiverStationMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverStationMeta.strNcFilePath = "" + Me.ucrReceiverStationMeta.TabIndex = 8 + Me.ucrReceiverStationMeta.ucrSelector = Nothing ' - 'lblWindDirection + 'ucrReceiverLonMeta ' - Me.lblWindDirection.AutoSize = True - Me.lblWindDirection.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblWindDirection.Location = New System.Drawing.Point(15, 178) - Me.lblWindDirection.Name = "lblWindDirection" - Me.lblWindDirection.Size = New System.Drawing.Size(80, 13) - Me.lblWindDirection.TabIndex = 8 - Me.lblWindDirection.Text = "Wind Direction:" + Me.ucrReceiverLonMeta.AutoSize = True + Me.ucrReceiverLonMeta.frmParent = Nothing + Me.ucrReceiverLonMeta.Location = New System.Drawing.Point(9, 108) + Me.ucrReceiverLonMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLonMeta.Name = "ucrReceiverLonMeta" + Me.ucrReceiverLonMeta.Selector = Nothing + Me.ucrReceiverLonMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLonMeta.strNcFilePath = "" + Me.ucrReceiverLonMeta.TabIndex = 10 + Me.ucrReceiverLonMeta.ucrSelector = Nothing + ' + 'ucrReceiverLatMeta + ' + Me.ucrReceiverLatMeta.AutoSize = True + Me.ucrReceiverLatMeta.frmParent = Nothing + Me.ucrReceiverLatMeta.Location = New System.Drawing.Point(9, 70) + Me.ucrReceiverLatMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatMeta.Name = "ucrReceiverLatMeta" + Me.ucrReceiverLatMeta.Selector = Nothing + Me.ucrReceiverLatMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLatMeta.strNcFilePath = "" + Me.ucrReceiverLatMeta.TabIndex = 9 + Me.ucrReceiverLatMeta.ucrSelector = Nothing + ' + 'ucrReceiverAltMeta + ' + Me.ucrReceiverAltMeta.AutoSize = True + Me.ucrReceiverAltMeta.frmParent = Nothing + Me.ucrReceiverAltMeta.Location = New System.Drawing.Point(9, 147) + Me.ucrReceiverAltMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltMeta.Name = "ucrReceiverAltMeta" + Me.ucrReceiverAltMeta.Selector = Nothing + Me.ucrReceiverAltMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverAltMeta.strNcFilePath = "" + Me.ucrReceiverAltMeta.TabIndex = 11 + Me.ucrReceiverAltMeta.ucrSelector = Nothing ' 'DlgDefineClimaticData ' 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(502, 460) + Me.ClientSize = New System.Drawing.Size(533, 531) Me.Controls.Add(Me.ucrChkLinkedMetaData) Me.Controls.Add(Me.ucrSelectorLinkedDataFrame) Me.Controls.Add(Me.ucrInputCheckInput) From 92262b51db78e6c66ba44f5c3b47ff713b00fd6b Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 19 Jan 2024 10:17:56 +0300 Subject: [PATCH 31/57] 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 32/57] 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 1680e60835d175b0daa15a23486da1e60597d759 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Fri, 19 Jan 2024 08:58:22 +0100 Subject: [PATCH 33/57] Code Changes --- instat/dlgExportForClimpact.Designer.vb | 34 +---- instat/dlgExportForClimpact.vb | 120 +++--------------- .../InstatObject/R/stand_alone_functions.R | 19 +++ 3 files changed, 44 insertions(+), 129 deletions(-) diff --git a/instat/dlgExportForClimpact.Designer.vb b/instat/dlgExportForClimpact.Designer.vb index f3accf48437..89b93233df1 100644 --- a/instat/dlgExportForClimpact.Designer.vb +++ b/instat/dlgExportForClimpact.Designer.vb @@ -36,8 +36,6 @@ Partial Class dlgExportForClimpact Me.lblExport = New System.Windows.Forms.Label() Me.cmdBrowse = New System.Windows.Forms.Button() Me.ucrInputExportFile = New instat.ucrInputTextBox() - Me.ucrSaveNewDataFrame = New instat.ucrSave() - Me.ucrChkNewDataFrame = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.lblYear = New System.Windows.Forms.Label() Me.ucrReceiverYear = New instat.ucrReceiverSingle() @@ -169,7 +167,7 @@ Partial Class dlgExportForClimpact ' Me.lblExport.AutoSize = True Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblExport.Location = New System.Drawing.Point(9, 370) + Me.lblExport.Location = New System.Drawing.Point(9, 330) Me.lblExport.Name = "lblExport" Me.lblExport.Size = New System.Drawing.Size(59, 13) Me.lblExport.TabIndex = 16 @@ -178,7 +176,7 @@ Partial Class dlgExportForClimpact 'cmdBrowse ' Me.cmdBrowse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdBrowse.Location = New System.Drawing.Point(326, 365) + Me.cmdBrowse.Location = New System.Drawing.Point(326, 325) Me.cmdBrowse.Name = "cmdBrowse" Me.cmdBrowse.Size = New System.Drawing.Size(80, 23) Me.cmdBrowse.TabIndex = 18 @@ -191,35 +189,17 @@ Partial Class dlgExportForClimpact Me.ucrInputExportFile.AutoSize = True Me.ucrInputExportFile.IsMultiline = False Me.ucrInputExportFile.IsReadOnly = False - Me.ucrInputExportFile.Location = New System.Drawing.Point(142, 366) + Me.ucrInputExportFile.Location = New System.Drawing.Point(142, 326) Me.ucrInputExportFile.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrInputExportFile.Name = "ucrInputExportFile" Me.ucrInputExportFile.Size = New System.Drawing.Size(182, 21) Me.ucrInputExportFile.TabIndex = 17 ' - 'ucrSaveNewDataFrame - ' - Me.ucrSaveNewDataFrame.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveNewDataFrame.Location = New System.Drawing.Point(9, 331) - Me.ucrSaveNewDataFrame.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveNewDataFrame.Name = "ucrSaveNewDataFrame" - Me.ucrSaveNewDataFrame.Size = New System.Drawing.Size(348, 24) - Me.ucrSaveNewDataFrame.TabIndex = 15 - ' - 'ucrChkNewDataFrame - ' - Me.ucrChkNewDataFrame.AutoSize = True - Me.ucrChkNewDataFrame.Checked = False - Me.ucrChkNewDataFrame.Location = New System.Drawing.Point(9, 270) - Me.ucrChkNewDataFrame.Name = "ucrChkNewDataFrame" - Me.ucrChkNewDataFrame.Size = New System.Drawing.Size(266, 23) - Me.ucrChkNewDataFrame.TabIndex = 13 - ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(7, 396) + Me.ucrBase.Location = New System.Drawing.Point(7, 356) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) @@ -284,7 +264,7 @@ Partial Class dlgExportForClimpact ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.ClientSize = New System.Drawing.Size(422, 450) + Me.ClientSize = New System.Drawing.Size(422, 412) Me.Controls.Add(Me.lblMissingValues) Me.Controls.Add(Me.ucrInputCodeMissingValues) Me.Controls.Add(Me.lblTN) @@ -301,8 +281,6 @@ Partial Class dlgExportForClimpact Me.Controls.Add(Me.lblExport) Me.Controls.Add(Me.cmdBrowse) Me.Controls.Add(Me.ucrInputExportFile) - Me.Controls.Add(Me.ucrSaveNewDataFrame) - Me.Controls.Add(Me.ucrChkNewDataFrame) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.lblYear) Me.Controls.Add(Me.ucrReceiverYear) @@ -329,8 +307,6 @@ Partial Class dlgExportForClimpact Friend WithEvents lblExport As Label Friend WithEvents cmdBrowse As Button Friend WithEvents ucrInputExportFile As ucrInputTextBox - Friend WithEvents ucrSaveNewDataFrame As ucrSave - Friend WithEvents ucrChkNewDataFrame As ucrCheck Friend WithEvents ucrBase As ucrButtons Friend WithEvents lblYear As Label Friend WithEvents ucrReceiverYear As ucrReceiverSingle diff --git a/instat/dlgExportForClimpact.vb b/instat/dlgExportForClimpact.vb index 80a6108ad49..e3063d08cd7 100644 --- a/instat/dlgExportForClimpact.vb +++ b/instat/dlgExportForClimpact.vb @@ -20,8 +20,8 @@ Imports instat.Translations Public Class dlgExportForClimpact Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsDataFrameFunction, clsCurrentNewColumnFunction, clsOutputClimpact, clsDummyFunction, clsMutateFunction, clsExportClimpactFunction As New RFunction - Private clsPipeOperator As New ROperator + Private clsOutputClimpact As New RFunction + Private Sub dlgExportForClimpact_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -57,22 +57,20 @@ Public Class dlgExportForClimpact 'Day Receiver ucrReceiverDay.Selector = ucrSelectorImportToClimpact - ucrReceiverDay.SetParameter(New RParameter("day", 0)) + ucrReceiverDay.SetParameter(New RParameter("day", 5, bNewIncludeArgumentName:=False)) ucrReceiverDay.SetParameterIsString() ucrReceiverDay.bWithQuotes = False + ucrReceiverDay.SetClimaticType("day") ucrReceiverDay.bAutoFill = True - ucrReceiverDay.SetClimaticType("doy") - ucrReceiverDay.strSelectorHeading = "Day Variables" 'Element Receiver ucrReceiverTX.Selector = ucrSelectorImportToClimpact - ucrReceiverTX.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) + ucrReceiverTX.SetParameter(New RParameter("x", 4, bNewIncludeArgumentName:=False)) ucrReceiverTX.SetParameterIsString() ucrReceiverTX.bWithQuotes = False ucrReceiverTX.SetClimaticType("temp_max") ucrReceiverTX.bAutoFill = True - ucrReceiverTN.Selector = ucrSelectorImportToClimpact ucrReceiverTN.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) ucrReceiverTN.SetParameterIsString() @@ -87,64 +85,36 @@ Public Class dlgExportForClimpact ucrReceiverRR.SetParameterIsString() ucrReceiverRR.bWithQuotes = False - ucrChkNewDataFrame.SetText("New Data Frame Name") - ucrChkNewDataFrame.AddToLinkedControls(ucrSaveNewDataFrame, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkNewDataFrame.AddParameterValuesCondition(True, "dataframe", "True") - ucrChkNewDataFrame.AddParameterValuesCondition(False, "dataframe", "False") - ucrChkExportDataFrame.SetText(" Export Data Frame(s)") ucrChkExportDataFrame.AddToLinkedControls(ucrInputExportFile, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkExportDataFrame.AddParameterValuesCondition(True, "export", "True") ucrChkExportDataFrame.AddParameterValuesCondition(False, "export", "False") - ucrSaveNewDataFrame.SetSaveTypeAsDataFrame() - ucrSaveNewDataFrame.SetIsTextBox() - ucrSaveNewDataFrame.SetLabelText("Data Frame Name:") - - ucrInputExportFile.SetParameter(New RParameter("file", 1)) + ucrInputExportFile.SetParameter(New RParameter("output_file ", 9)) ucrInputExportFile.IsReadOnly = True ucrInputExportFile.SetLinkedDisplayControl(lblExport) - DataFrameAssignTo() End Sub Private Sub SetDefaults() - clsDataFrameFunction = New RFunction - clsDummyFunction = New RFunction - clsCurrentNewColumnFunction = New RFunction - clsMutateFunction = New RFunction - clsExportClimpactFunction = New RFunction - clsPipeOperator = New ROperator + clsOutputClimpact = New RFunction ucrSelectorImportToClimpact.Reset() - ucrSaveNewDataFrame.Reset() - clsDummyFunction.AddParameter("dataframe", "True", iPosition:=0) - clsDummyFunction.AddParameter("export", "False", iPosition:=1) + clsOutputClimpact.SetRCommand("write_weather_data") + clsOutputClimpact.AddParameter("year", clsRFunctionParameter:=ucrReceiverYear.GetVariables, iPosition:=1) + clsOutputClimpact.AddParameter("month", clsRFunctionParameter:=ucrReceiverMonth.GetVariables, iPosition:=2) + clsOutputClimpact.AddParameter("day", clsRFunctionParameter:=ucrReceiverDay.GetVariables, iPosition:=3) + clsOutputClimpact.AddParameter("rain", clsRFunctionParameter:=ucrReceiverRR.GetVariables, iPosition:=4) + clsOutputClimpact.AddParameter("mn_tmp", clsRFunctionParameter:=ucrReceiverTN.GetVariables, iPosition:=5) + clsOutputClimpact.AddParameter("mx_tmp", clsRFunctionParameter:=ucrReceiverTX.GetVariables, iPosition:=6) + clsOutputClimpact.AddParameter("missing_code", "-99.9", iPosition:=7) - clsDataFrameFunction.SetRCommand("data.frame") - clsDataFrameFunction.AddParameter("x", "columns", iPosition:=5, bIncludeArgumentName:=False) - clsPipeOperator.SetOperation("%>%") - clsPipeOperator.AddParameter("left", clsRFunctionParameter:=clsOutputClimpact, iPosition:=0) - clsPipeOperator.AddParameter("right", clsRFunctionParameter:=clsMutateFunction, iPosition:=1) + ucrBase.clsRsyntax.SetBaseRFunction(clsOutputClimpact) - clsOutputClimpact.SetRCommand("output_Climpact") - clsOutputClimpact.AddParameter("long.data", "TRUE") - - clsMutateFunction.SetPackageName("dplyr") - clsMutateFunction.SetRCommand("mutate") - - clsExportClimpactFunction.SetPackageName("rio") - clsExportClimpactFunction.SetRCommand("export") - clsExportClimpactFunction.AddParameter("x", clsROperatorParameter:=clsPipeOperator, iPosition:=0) - - - 'ucrBase.clsRsyntax.SetBaseRFunction(clsExportClimpactFunction) - ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) - 'ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) End Sub @@ -152,12 +122,10 @@ Public Class dlgExportForClimpact ucrReceiverDay.SetRCode(clsOutputClimpact, bReset) ucrReceiverYear.SetRCode(clsOutputClimpact, bReset) ucrSelectorImportToClimpact.SetRCode(clsOutputClimpact, bReset) - ucrReceiverRR.SetRCode(clsOutputClimpact, bReset) - ucrReceiverTN.SetRCode(clsOutputClimpact, bReset) - ucrReceiverTX.SetRCode(clsOutputClimpact, bReset) + ucrReceiverMonth.SetRCode(clsOutputClimpact, bReset) ucrInputCodeMissingValues.SetRCode(clsOutputClimpact, bReset) - ucrInputExportFile.SetRCode(clsExportClimpactFunction) + ucrInputExportFile.SetRCode(clsOutputClimpact) End Sub Private Sub TestOkEnabled() @@ -168,9 +136,6 @@ Public Class dlgExportForClimpact AndAlso Not ucrReceiverTX.IsEmpty _ AndAlso Not ucrReceiverTN.IsEmpty ) - If ucrChkNewDataFrame.Checked And Not ucrSaveNewDataFrame.IsComplete Then - ucrBase.OKEnabled(False) - End If If ucrChkExportDataFrame.Checked And ucrInputExportFile.IsEmpty Then ucrBase.OKEnabled(False) End If @@ -182,14 +147,6 @@ Public Class dlgExportForClimpact TestOkEnabled() End Sub - Private Sub DataFrameAssignTo() - Dim strDataframeName As String = ucrSelectorImportToClimpact.ucrAvailableDataFrames.cboAvailableDataFrames.Text - If strDataframeName = "" OrElse ucrSaveNewDataFrame.bUserTyped Then - Exit Sub - End If - ucrSaveNewDataFrame.SetPrefix(strDataframeName & "__climpact") - End Sub - Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click SelectFileToSave() End Sub @@ -197,7 +154,7 @@ Public Class dlgExportForClimpact Private Sub SelectFileToSave() Using dlgSave As New SaveFileDialog dlgSave.Title = "Save Climpact File" - dlgSave.Filter = "Comma separated file (*.csv)|*.csv|Text File (*.txt)|*.txt" + dlgSave.Filter = "Text File (*.txt)|*.txt" If ucrInputExportFile.GetText() <> "" Then dlgSave.InitialDirectory = ucrInputExportFile.GetText().Replace("/", "\") Else @@ -210,24 +167,8 @@ Public Class dlgExportForClimpact End Using End Sub - Private Sub ucrSelectorImportToClimpact_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorImportToClimpact.ControlValueChanged - DataFrameAssignTo() - End Sub - - 'Private Sub ucrChkNewDataFrame_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkNewDataFrame.ControlValueChanged, ucrChkExportDataFrame.ControlValueChanged - ' SettingBaseFunction() - 'End Sub - - 'Private Sub ucrReceiverElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlValueChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverTX.ControlValueChanged - ' ucrBase.clsRsyntax.lstBeforeCodes.Clear() - ' clsCurrentNewColumnFunction = ucrReceiver.Get(True).Clone - ' clsCurrentNewColumnFunction.SetAssignTo("columns") - ' ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) - ' SettingBaseFunction() - 'End Sub - Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, - ucrSaveNewDataFrame.ControlContentsChanged, ucrInputExportFile.ControlContentsChanged, ucrChkExportDataFrame.ControlContentsChanged, ucrReceiverTX.ControlValueChanged + Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverDay.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrInputExportFile.ControlContentsChanged, ucrChkExportDataFrame.ControlContentsChanged, ucrReceiverTX.ControlValueChanged, ucrReceiverMonth.ControlValueChanged TestOkEnabled() End Sub @@ -235,27 +176,6 @@ Public Class dlgExportForClimpact If ucrInputExportFile.IsEmpty() Then SelectFileToSave() End If - 'SettingBaseFunction() End Sub - Private Sub SettingBaseFunction() - cmdBrowse.Visible = False - If ucrChkNewDataFrame.Checked And ucrChkExportDataFrame.Checked Then - ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) - ucrBase.clsRsyntax.ClearCodes() - ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) - ucrBase.clsRsyntax.AddToAfterCodes(clsExportClimpactFunction) - cmdBrowse.Visible = True - ElseIf ucrChkNewDataFrame.Checked AndAlso Not ucrChkExportDataFrame.Checked Then - ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) - ucrBase.clsRsyntax.lstAfterCodes.Clear() - cmdBrowse.Visible = False - ElseIf ucrChkExportDataFrame.Checked AndAlso Not ucrChkNewDataFrame.Checked Then - ucrBase.clsRsyntax.lstBeforeCodes.Clear() - ucrBase.clsRsyntax.AddToBeforeCodes(clsCurrentNewColumnFunction) - ucrBase.clsRsyntax.SetBaseRFunction(clsExportClimpactFunction) - ucrBase.clsRsyntax.lstAfterCodes.Clear() - cmdBrowse.Visible = True - End If - End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 09f224a2981..9c5ea7de187 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -3006,3 +3006,22 @@ getExample <- function (topic, package = NULL, lib.loc = NULL, character.only = } return(example_text) } + + +write_weather_data <- function(year, month, day, rain, mn_tmp, mx_tmp, missing_code, output_file) { + # Create a data frame with the provided inputs + weather_data <- data.frame(year = year, + month = month, + day = day, + rain = rain, + mn_tmp = mn_tmp, + mx_tmp = mx_tmp) + + # Replace missing values with the specified code + weather_data[is.na(weather_data)] <- missing_code + + # Write the data frame to a text file + write.table(weather_data, file = output_file, sep = "\t", row.names = FALSE, col.names = TRUE) + + cat("Weather data has been written to", output_file, "\n") +} \ No newline at end of file From 9303e77f30fb8aee30a34ef4105e620ab74570f1 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:01:43 +0100 Subject: [PATCH 34/57] Design Changes --- instat/dlgExportForClimpact.Designer.vb | 22 +++++----------------- instat/dlgExportForClimpact.vb | 17 ++--------------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/instat/dlgExportForClimpact.Designer.vb b/instat/dlgExportForClimpact.Designer.vb index 89b93233df1..fcd6f1c67ff 100644 --- a/instat/dlgExportForClimpact.Designer.vb +++ b/instat/dlgExportForClimpact.Designer.vb @@ -32,7 +32,6 @@ Partial Class dlgExportForClimpact Me.ucrReceiverDay = New instat.ucrReceiverSingle() Me.lblMonth = New System.Windows.Forms.Label() Me.ucrReceiverMonth = New instat.ucrReceiverSingle() - Me.ucrChkExportDataFrame = New instat.ucrCheck() Me.lblExport = New System.Windows.Forms.Label() Me.cmdBrowse = New System.Windows.Forms.Button() Me.ucrInputExportFile = New instat.ucrInputTextBox() @@ -154,20 +153,11 @@ Partial Class dlgExportForClimpact Me.ucrReceiverMonth.TabIndex = 4 Me.ucrReceiverMonth.ucrSelector = Nothing ' - 'ucrChkExportDataFrame - ' - Me.ucrChkExportDataFrame.AutoSize = True - Me.ucrChkExportDataFrame.Checked = False - Me.ucrChkExportDataFrame.Location = New System.Drawing.Point(9, 299) - Me.ucrChkExportDataFrame.Name = "ucrChkExportDataFrame" - Me.ucrChkExportDataFrame.Size = New System.Drawing.Size(266, 23) - Me.ucrChkExportDataFrame.TabIndex = 14 - ' 'lblExport ' Me.lblExport.AutoSize = True Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblExport.Location = New System.Drawing.Point(9, 330) + Me.lblExport.Location = New System.Drawing.Point(9, 307) Me.lblExport.Name = "lblExport" Me.lblExport.Size = New System.Drawing.Size(59, 13) Me.lblExport.TabIndex = 16 @@ -176,7 +166,7 @@ Partial Class dlgExportForClimpact 'cmdBrowse ' Me.cmdBrowse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdBrowse.Location = New System.Drawing.Point(326, 325) + Me.cmdBrowse.Location = New System.Drawing.Point(293, 302) Me.cmdBrowse.Name = "cmdBrowse" Me.cmdBrowse.Size = New System.Drawing.Size(80, 23) Me.cmdBrowse.TabIndex = 18 @@ -189,7 +179,7 @@ Partial Class dlgExportForClimpact Me.ucrInputExportFile.AutoSize = True Me.ucrInputExportFile.IsMultiline = False Me.ucrInputExportFile.IsReadOnly = False - Me.ucrInputExportFile.Location = New System.Drawing.Point(142, 326) + Me.ucrInputExportFile.Location = New System.Drawing.Point(108, 303) Me.ucrInputExportFile.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrInputExportFile.Name = "ucrInputExportFile" Me.ucrInputExportFile.Size = New System.Drawing.Size(182, 21) @@ -199,7 +189,7 @@ Partial Class dlgExportForClimpact ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(7, 356) + Me.ucrBase.Location = New System.Drawing.Point(7, 332) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) @@ -264,7 +254,7 @@ Partial Class dlgExportForClimpact ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.ClientSize = New System.Drawing.Size(422, 412) + Me.ClientSize = New System.Drawing.Size(422, 388) Me.Controls.Add(Me.lblMissingValues) Me.Controls.Add(Me.ucrInputCodeMissingValues) Me.Controls.Add(Me.lblTN) @@ -277,7 +267,6 @@ Partial Class dlgExportForClimpact Me.Controls.Add(Me.ucrReceiverDay) Me.Controls.Add(Me.lblMonth) Me.Controls.Add(Me.ucrReceiverMonth) - Me.Controls.Add(Me.ucrChkExportDataFrame) Me.Controls.Add(Me.lblExport) Me.Controls.Add(Me.cmdBrowse) Me.Controls.Add(Me.ucrInputExportFile) @@ -303,7 +292,6 @@ Partial Class dlgExportForClimpact Friend WithEvents ucrReceiverDay As ucrReceiverSingle Friend WithEvents lblMonth As Label Friend WithEvents ucrReceiverMonth As ucrReceiverSingle - Friend WithEvents ucrChkExportDataFrame As ucrCheck Friend WithEvents lblExport As Label Friend WithEvents cmdBrowse As Button Friend WithEvents ucrInputExportFile As ucrInputTextBox diff --git a/instat/dlgExportForClimpact.vb b/instat/dlgExportForClimpact.vb index e3063d08cd7..48628621480 100644 --- a/instat/dlgExportForClimpact.vb +++ b/instat/dlgExportForClimpact.vb @@ -22,7 +22,6 @@ Public Class dlgExportForClimpact Private bReset As Boolean = True Private clsOutputClimpact As New RFunction - Private Sub dlgExportForClimpact_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -85,11 +84,6 @@ Public Class dlgExportForClimpact ucrReceiverRR.SetParameterIsString() ucrReceiverRR.bWithQuotes = False - ucrChkExportDataFrame.SetText(" Export Data Frame(s)") - ucrChkExportDataFrame.AddToLinkedControls(ucrInputExportFile, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkExportDataFrame.AddParameterValuesCondition(True, "export", "True") - ucrChkExportDataFrame.AddParameterValuesCondition(False, "export", "False") - ucrInputExportFile.SetParameter(New RParameter("output_file ", 9)) ucrInputExportFile.IsReadOnly = True ucrInputExportFile.SetLinkedDisplayControl(lblExport) @@ -97,12 +91,10 @@ Public Class dlgExportForClimpact End Sub Private Sub SetDefaults() - clsOutputClimpact = New RFunction ucrSelectorImportToClimpact.Reset() - clsOutputClimpact.SetRCommand("write_weather_data") clsOutputClimpact.AddParameter("year", clsRFunctionParameter:=ucrReceiverYear.GetVariables, iPosition:=1) clsOutputClimpact.AddParameter("month", clsRFunctionParameter:=ucrReceiverMonth.GetVariables, iPosition:=2) @@ -112,14 +104,10 @@ Public Class dlgExportForClimpact clsOutputClimpact.AddParameter("mx_tmp", clsRFunctionParameter:=ucrReceiverTX.GetVariables, iPosition:=6) clsOutputClimpact.AddParameter("missing_code", "-99.9", iPosition:=7) - ucrBase.clsRsyntax.SetBaseRFunction(clsOutputClimpact) - - End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrReceiverDay.SetRCode(clsOutputClimpact, bReset) ucrReceiverYear.SetRCode(clsOutputClimpact, bReset) ucrSelectorImportToClimpact.SetRCode(clsOutputClimpact, bReset) @@ -136,7 +124,7 @@ Public Class dlgExportForClimpact AndAlso Not ucrReceiverTX.IsEmpty _ AndAlso Not ucrReceiverTN.IsEmpty ) - If ucrChkExportDataFrame.Checked And ucrInputExportFile.IsEmpty Then + If ucrInputExportFile.IsEmpty Then ucrBase.OKEnabled(False) End If End Sub @@ -167,8 +155,7 @@ Public Class dlgExportForClimpact End Using End Sub - - Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverDay.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrInputExportFile.ControlContentsChanged, ucrChkExportDataFrame.ControlContentsChanged, ucrReceiverTX.ControlValueChanged, ucrReceiverMonth.ControlValueChanged + Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverDay.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrInputExportFile.ControlContentsChanged, ucrReceiverTX.ControlValueChanged, ucrReceiverMonth.ControlValueChanged TestOkEnabled() End Sub From 12312451d9702adaa4f02a9a9ebb18e8d30125f0 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:13:14 +0100 Subject: [PATCH 35/57] Design Changes --- instat/dlgExportForClimpact.Designer.vb | 194 ++++++++++++------------ 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/instat/dlgExportForClimpact.Designer.vb b/instat/dlgExportForClimpact.Designer.vb index fcd6f1c67ff..8f633d2e8a2 100644 --- a/instat/dlgExportForClimpact.Designer.vb +++ b/instat/dlgExportForClimpact.Designer.vb @@ -23,24 +23,24 @@ Partial Class dlgExportForClimpact _ Private Sub InitializeComponent() Me.lblTN = New System.Windows.Forms.Label() - Me.ucrReceiverTN = New instat.ucrReceiverSingle() Me.lblTX = New System.Windows.Forms.Label() - Me.ucrReceiverTX = New instat.ucrReceiverSingle() Me.lblRR = New System.Windows.Forms.Label() - Me.ucrReceiverRR = New instat.ucrReceiverSingle() Me.lblDay = New System.Windows.Forms.Label() - Me.ucrReceiverDay = New instat.ucrReceiverSingle() Me.lblMonth = New System.Windows.Forms.Label() - Me.ucrReceiverMonth = New instat.ucrReceiverSingle() Me.lblExport = New System.Windows.Forms.Label() Me.cmdBrowse = New System.Windows.Forms.Button() + Me.lblYear = New System.Windows.Forms.Label() + Me.lblMissingValues = New System.Windows.Forms.Label() + Me.ucrInputCodeMissingValues = New instat.ucrInputTextBox() + Me.ucrReceiverTN = New instat.ucrReceiverSingle() + Me.ucrReceiverTX = New instat.ucrReceiverSingle() + Me.ucrReceiverRR = New instat.ucrReceiverSingle() + Me.ucrReceiverDay = New instat.ucrReceiverSingle() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() Me.ucrInputExportFile = New instat.ucrInputTextBox() Me.ucrBase = New instat.ucrButtons() - Me.lblYear = New System.Windows.Forms.Label() Me.ucrReceiverYear = New instat.ucrReceiverSingle() Me.ucrSelectorImportToClimpact = New instat.ucrSelectorByDataFrameAddRemove() - Me.lblMissingValues = New System.Windows.Forms.Label() - Me.ucrInputCodeMissingValues = New instat.ucrInputTextBox() Me.SuspendLayout() ' 'lblTN @@ -52,6 +52,92 @@ Partial Class dlgExportForClimpact Me.lblTN.TabIndex = 11 Me.lblTN.Text = "Min. Temperature:" ' + 'lblTX + ' + Me.lblTX.AutoSize = True + Me.lblTX.Location = New System.Drawing.Point(278, 197) + Me.lblTX.Name = "lblTX" + Me.lblTX.Size = New System.Drawing.Size(96, 13) + Me.lblTX.TabIndex = 9 + Me.lblTX.Text = "Max. Temperature:" + ' + 'lblRR + ' + Me.lblRR.AutoSize = True + Me.lblRR.Location = New System.Drawing.Point(278, 150) + Me.lblRR.Name = "lblRR" + Me.lblRR.Size = New System.Drawing.Size(45, 13) + Me.lblRR.TabIndex = 7 + Me.lblRR.Text = "Rainfall:" + ' + 'lblDay + ' + Me.lblDay.AutoSize = True + Me.lblDay.Location = New System.Drawing.Point(278, 106) + Me.lblDay.Name = "lblDay" + Me.lblDay.Size = New System.Drawing.Size(29, 13) + Me.lblDay.TabIndex = 5 + Me.lblDay.Text = "Day:" + ' + 'lblMonth + ' + Me.lblMonth.AutoSize = True + Me.lblMonth.Location = New System.Drawing.Point(278, 59) + Me.lblMonth.Name = "lblMonth" + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 3 + Me.lblMonth.Text = "Month:" + ' + 'lblExport + ' + Me.lblExport.AutoSize = True + Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblExport.Location = New System.Drawing.Point(9, 297) + Me.lblExport.Name = "lblExport" + Me.lblExport.Size = New System.Drawing.Size(59, 13) + Me.lblExport.TabIndex = 16 + Me.lblExport.Text = "Export File:" + ' + 'cmdBrowse + ' + Me.cmdBrowse.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdBrowse.Location = New System.Drawing.Point(293, 291) + Me.cmdBrowse.Name = "cmdBrowse" + Me.cmdBrowse.Size = New System.Drawing.Size(80, 23) + Me.cmdBrowse.TabIndex = 18 + Me.cmdBrowse.Text = "Browse" + Me.cmdBrowse.UseVisualStyleBackColor = True + ' + 'lblYear + ' + Me.lblYear.AutoSize = True + Me.lblYear.Location = New System.Drawing.Point(278, 12) + Me.lblYear.Name = "lblYear" + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 1 + Me.lblYear.Text = "Year:" + ' + 'lblMissingValues + ' + Me.lblMissingValues.AutoSize = True + Me.lblMissingValues.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMissingValues.Location = New System.Drawing.Point(4, 244) + Me.lblMissingValues.Name = "lblMissingValues" + Me.lblMissingValues.Size = New System.Drawing.Size(122, 13) + Me.lblMissingValues.TabIndex = 33 + Me.lblMissingValues.Text = "Code Missing Values as:" + ' + 'ucrInputCodeMissingValues + ' + Me.ucrInputCodeMissingValues.AddQuotesIfUnrecognised = True + Me.ucrInputCodeMissingValues.AutoSize = True + Me.ucrInputCodeMissingValues.IsMultiline = False + Me.ucrInputCodeMissingValues.IsReadOnly = False + Me.ucrInputCodeMissingValues.Location = New System.Drawing.Point(132, 242) + Me.ucrInputCodeMissingValues.Name = "ucrInputCodeMissingValues" + Me.ucrInputCodeMissingValues.Size = New System.Drawing.Size(99, 21) + Me.ucrInputCodeMissingValues.TabIndex = 32 + ' 'ucrReceiverTN ' Me.ucrReceiverTN.AutoSize = True @@ -65,15 +151,6 @@ Partial Class dlgExportForClimpact Me.ucrReceiverTN.TabIndex = 12 Me.ucrReceiverTN.ucrSelector = Nothing ' - 'lblTX - ' - Me.lblTX.AutoSize = True - Me.lblTX.Location = New System.Drawing.Point(278, 197) - Me.lblTX.Name = "lblTX" - Me.lblTX.Size = New System.Drawing.Size(96, 13) - Me.lblTX.TabIndex = 9 - Me.lblTX.Text = "Max. Temperature:" - ' 'ucrReceiverTX ' Me.ucrReceiverTX.AutoSize = True @@ -87,15 +164,6 @@ Partial Class dlgExportForClimpact Me.ucrReceiverTX.TabIndex = 10 Me.ucrReceiverTX.ucrSelector = Nothing ' - 'lblRR - ' - Me.lblRR.AutoSize = True - Me.lblRR.Location = New System.Drawing.Point(278, 150) - Me.lblRR.Name = "lblRR" - Me.lblRR.Size = New System.Drawing.Size(45, 13) - Me.lblRR.TabIndex = 7 - Me.lblRR.Text = "Rainfall:" - ' 'ucrReceiverRR ' Me.ucrReceiverRR.AutoSize = True @@ -109,15 +177,6 @@ Partial Class dlgExportForClimpact Me.ucrReceiverRR.TabIndex = 8 Me.ucrReceiverRR.ucrSelector = Nothing ' - 'lblDay - ' - Me.lblDay.AutoSize = True - Me.lblDay.Location = New System.Drawing.Point(278, 106) - Me.lblDay.Name = "lblDay" - Me.lblDay.Size = New System.Drawing.Size(29, 13) - Me.lblDay.TabIndex = 5 - Me.lblDay.Text = "Day:" - ' 'ucrReceiverDay ' Me.ucrReceiverDay.AutoSize = True @@ -131,15 +190,6 @@ Partial Class dlgExportForClimpact Me.ucrReceiverDay.TabIndex = 6 Me.ucrReceiverDay.ucrSelector = Nothing ' - 'lblMonth - ' - Me.lblMonth.AutoSize = True - Me.lblMonth.Location = New System.Drawing.Point(278, 59) - Me.lblMonth.Name = "lblMonth" - Me.lblMonth.Size = New System.Drawing.Size(40, 13) - Me.lblMonth.TabIndex = 3 - Me.lblMonth.Text = "Month:" - ' 'ucrReceiverMonth ' Me.ucrReceiverMonth.AutoSize = True @@ -153,33 +203,13 @@ Partial Class dlgExportForClimpact Me.ucrReceiverMonth.TabIndex = 4 Me.ucrReceiverMonth.ucrSelector = Nothing ' - 'lblExport - ' - Me.lblExport.AutoSize = True - Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblExport.Location = New System.Drawing.Point(9, 307) - Me.lblExport.Name = "lblExport" - Me.lblExport.Size = New System.Drawing.Size(59, 13) - Me.lblExport.TabIndex = 16 - Me.lblExport.Text = "Export File:" - ' - 'cmdBrowse - ' - Me.cmdBrowse.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdBrowse.Location = New System.Drawing.Point(293, 302) - Me.cmdBrowse.Name = "cmdBrowse" - Me.cmdBrowse.Size = New System.Drawing.Size(80, 23) - Me.cmdBrowse.TabIndex = 18 - Me.cmdBrowse.Text = "Browse" - Me.cmdBrowse.UseVisualStyleBackColor = True - ' 'ucrInputExportFile ' Me.ucrInputExportFile.AddQuotesIfUnrecognised = True Me.ucrInputExportFile.AutoSize = True Me.ucrInputExportFile.IsMultiline = False Me.ucrInputExportFile.IsReadOnly = False - Me.ucrInputExportFile.Location = New System.Drawing.Point(108, 303) + Me.ucrInputExportFile.Location = New System.Drawing.Point(108, 293) Me.ucrInputExportFile.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrInputExportFile.Name = "ucrInputExportFile" Me.ucrInputExportFile.Size = New System.Drawing.Size(182, 21) @@ -189,21 +219,12 @@ Partial Class dlgExportForClimpact ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(7, 332) + Me.ucrBase.Location = New System.Drawing.Point(7, 318) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 19 ' - 'lblYear - ' - Me.lblYear.AutoSize = True - Me.lblYear.Location = New System.Drawing.Point(278, 12) - Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(32, 13) - Me.lblYear.TabIndex = 1 - Me.lblYear.Text = "Year:" - ' 'ucrReceiverYear ' Me.ucrReceiverYear.AutoSize = True @@ -229,32 +250,11 @@ Partial Class dlgExportForClimpact Me.ucrSelectorImportToClimpact.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorImportToClimpact.TabIndex = 0 ' - 'lblMissingValues - ' - Me.lblMissingValues.AutoSize = True - Me.lblMissingValues.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMissingValues.Location = New System.Drawing.Point(4, 244) - Me.lblMissingValues.Name = "lblMissingValues" - Me.lblMissingValues.Size = New System.Drawing.Size(122, 13) - Me.lblMissingValues.TabIndex = 33 - Me.lblMissingValues.Text = "Code Missing Values as:" - ' - 'ucrInputCodeMissingValues - ' - Me.ucrInputCodeMissingValues.AddQuotesIfUnrecognised = True - Me.ucrInputCodeMissingValues.AutoSize = True - Me.ucrInputCodeMissingValues.IsMultiline = False - Me.ucrInputCodeMissingValues.IsReadOnly = False - Me.ucrInputCodeMissingValues.Location = New System.Drawing.Point(132, 242) - Me.ucrInputCodeMissingValues.Name = "ucrInputCodeMissingValues" - Me.ucrInputCodeMissingValues.Size = New System.Drawing.Size(99, 21) - Me.ucrInputCodeMissingValues.TabIndex = 32 - ' 'dlgExportForClimpact ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.ClientSize = New System.Drawing.Size(422, 388) + Me.ClientSize = New System.Drawing.Size(422, 370) Me.Controls.Add(Me.lblMissingValues) Me.Controls.Add(Me.ucrInputCodeMissingValues) Me.Controls.Add(Me.lblTN) From 00102aad6d26c39564c3c895ca6ce291de01483a Mon Sep 17 00:00:00 2001 From: n-thony Date: Mon, 22 Jan 2024 12:24:50 +0300 Subject: [PATCH 36/57] minor change --- instat/ucrSplitButton.vb | 55 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index de6826314e7..fac51d5c750 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -585,9 +585,60 @@ Public Class ucrSplitButton State = PushButtonState.Pressed - If _contextSplitMenuStrip IsNot Nothing Then - _contextSplitMenuStrip.Show(Me, New Point(0, Height), ToolStripDropDownDirection.BelowRight) + Dim tmpForm As New Form With { + .AutoScaleMode = AutoScaleMode.None, + .FormBorderStyle = FormBorderStyle.None, + .StartPosition = FormStartPosition.Manual, + .ShowInTaskbar = False + } + + '' Event handler for item click + 'Dim itemClickHandler As EventHandler = Sub(sender As Object, e As ToolStripItemClickedEventArgs) + ' ' Handle the item click here + ' ' You can perform actions based on the selected item + ' ' ... + + ' ' Detach the event handler + ' RemoveHandler _contextSplitMenuStrip.ItemClicked, itemClickHandler + + ' ' Close the form + ' tmpForm.Close() + ' End Sub + + '' Attach the event handler + 'AddHandler _contextSplitMenuStrip.ItemClicked, itemClickHandler + + Dim panel As New Panel With { + .Dock = DockStyle.Fill, + .AutoScroll = True + } + + _contextSplitMenuStrip.TopLevel = False + _contextSplitMenuStrip.Dock = DockStyle.Top + panel.Controls.Add(_contextSplitMenuStrip) + + ' Set the panel size based on the preferred size of the context menu + panel.Size = _contextSplitMenuStrip.PreferredSize + + ' Set a maximum height for the form + Dim maxHeight As Integer = 100 + If panel.Height > maxHeight Then + panel.Height = maxHeight End If + + tmpForm.Size = New Size(panel.Width, panel.Height) + tmpForm.Location = PointToScreen(New Point(0, Height)) + + tmpForm.Controls.Add(panel) + tmpForm.Show() + _contextSplitMenuStrip.Show(panel, New Point(0, 0)) + + ' Set the initial vertical scroll position to show the last items in the menu + panel.VerticalScroll.Value = panel.VerticalScroll.Maximum + + 'If _contextSplitMenuStrip IsNot Nothing Then + ' _contextSplitMenuStrip.Show(Me, New Point(0, Height), ToolStripDropDownDirection.BelowRight) + 'End If End Sub Private Sub SplitMenuStrip_Opening(sender As Object, e As CancelEventArgs) From 31cf29a486245cf8e40925faf3482330228461fc Mon Sep 17 00:00:00 2001 From: n-thony Date: Mon, 22 Jan 2024 12:53:22 +0300 Subject: [PATCH 37/57] minor code addition --- instat/ucrSplitButton.vb | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index fac51d5c750..40435240c41 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -592,21 +592,12 @@ Public Class ucrSplitButton .ShowInTaskbar = False } - '' Event handler for item click - 'Dim itemClickHandler As EventHandler = Sub(sender As Object, e As ToolStripItemClickedEventArgs) - ' ' Handle the item click here - ' ' You can perform actions based on the selected item - ' ' ... - - ' ' Detach the event handler - ' RemoveHandler _contextSplitMenuStrip.ItemClicked, itemClickHandler - - ' ' Close the form - ' tmpForm.Close() - ' End Sub - - '' Attach the event handler - 'AddHandler _contextSplitMenuStrip.ItemClicked, itemClickHandler + ' Event handler for item click + AddHandler _contextSplitMenuStrip.ItemClicked, Sub(sender As Object, e As ToolStripItemClickedEventArgs) + RemoveHandler _contextSplitMenuStrip.ItemClicked + ' Close the form + tmpForm.Close() + End Sub Dim panel As New Panel With { .Dock = DockStyle.Fill, From 3054db1cc932e54f40dab7bc44960fba592e23a4 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 22 Jan 2024 13:40:13 +0300 Subject: [PATCH 38/57] 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 211755b6bc5d98555bd7e5126d8d6a6107458b32 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:02:04 +0100 Subject: [PATCH 39/57] Code changes --- instat/dlgExportForClimpact.Designer.vb | 1 + instat/dlgExportForClimpact.vb | 37 ++++++++++--------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/instat/dlgExportForClimpact.Designer.vb b/instat/dlgExportForClimpact.Designer.vb index 8f633d2e8a2..fa0a0034e58 100644 --- a/instat/dlgExportForClimpact.Designer.vb +++ b/instat/dlgExportForClimpact.Designer.vb @@ -276,6 +276,7 @@ Partial Class dlgExportForClimpact Me.Controls.Add(Me.ucrSelectorImportToClimpact) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgExportForClimpact" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Export For Climpact" Me.ResumeLayout(False) Me.PerformLayout() diff --git a/instat/dlgExportForClimpact.vb b/instat/dlgExportForClimpact.vb index 48628621480..a7d078dcec0 100644 --- a/instat/dlgExportForClimpact.vb +++ b/instat/dlgExportForClimpact.vb @@ -38,50 +38,54 @@ Public Class dlgExportForClimpact Private Sub InitialiseDialog() - ucrInputCodeMissingValues.SetParameter(New RParameter("na_code")) + ucrInputCodeMissingValues.SetParameter(New RParameter("missing_code", 6)) ucrInputCodeMissingValues.SetRDefault("-99.9") - ucrInputCodeMissingValues.AddQuotesIfUnrecognised = False 'Year Receiver ucrReceiverYear.Selector = ucrSelectorImportToClimpact + ucrReceiverYear.SetParameter(New RParameter("year", 0)) ucrReceiverYear.SetClimaticType("year") + ucrReceiverYear.SetParameterIsRFunction() ucrReceiverYear.bAutoFill = True ucrReceiverYear.strSelectorHeading = "Year Variables" 'Month Receiver ucrReceiverMonth.Selector = ucrSelectorImportToClimpact + ucrReceiverMonth.SetParameter(New RParameter("month", 1)) ucrReceiverMonth.SetClimaticType("month") + ucrReceiverMonth.SetParameterIsRFunction() ucrReceiverMonth.bAutoFill = True ucrReceiverMonth.strSelectorHeading = "Month Variables" + ucrReceiverMonth.bWithQuotes = False 'Day Receiver ucrReceiverDay.Selector = ucrSelectorImportToClimpact - ucrReceiverDay.SetParameter(New RParameter("day", 5, bNewIncludeArgumentName:=False)) - ucrReceiverDay.SetParameterIsString() + ucrReceiverDay.SetParameter(New RParameter("day", 2)) + ucrReceiverDay.SetParameterIsRFunction() ucrReceiverDay.bWithQuotes = False ucrReceiverDay.SetClimaticType("day") ucrReceiverDay.bAutoFill = True 'Element Receiver ucrReceiverTX.Selector = ucrSelectorImportToClimpact - ucrReceiverTX.SetParameter(New RParameter("x", 4, bNewIncludeArgumentName:=False)) - ucrReceiverTX.SetParameterIsString() + ucrReceiverTX.SetParameter(New RParameter("mx_tmp", 3)) + ucrReceiverTX.SetParameterIsRFunction() ucrReceiverTX.bWithQuotes = False ucrReceiverTX.SetClimaticType("temp_max") ucrReceiverTX.bAutoFill = True ucrReceiverTN.Selector = ucrSelectorImportToClimpact - ucrReceiverTN.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) - ucrReceiverTN.SetParameterIsString() + ucrReceiverTN.SetParameter(New RParameter("mn_tmp", 4)) + ucrReceiverTN.SetParameterIsRFunction() ucrReceiverTN.SetClimaticType("temp_min") ucrReceiverTN.bAutoFill = True ucrReceiverTN.bWithQuotes = False - ucrReceiverRR.SetParameter(New RParameter("left", 2, bNewIncludeArgumentName:=False)) + ucrReceiverRR.SetParameter(New RParameter("rain", 5,)) ucrReceiverRR.Selector = ucrSelectorImportToClimpact ucrReceiverRR.SetClimaticType("rain") ucrReceiverRR.bAutoFill = True - ucrReceiverRR.SetParameterIsString() + ucrReceiverRR.SetParameterIsRFunction() ucrReceiverRR.bWithQuotes = False ucrInputExportFile.SetParameter(New RParameter("output_file ", 9)) @@ -96,24 +100,13 @@ Public Class dlgExportForClimpact ucrSelectorImportToClimpact.Reset() clsOutputClimpact.SetRCommand("write_weather_data") - clsOutputClimpact.AddParameter("year", clsRFunctionParameter:=ucrReceiverYear.GetVariables, iPosition:=1) - clsOutputClimpact.AddParameter("month", clsRFunctionParameter:=ucrReceiverMonth.GetVariables, iPosition:=2) - clsOutputClimpact.AddParameter("day", clsRFunctionParameter:=ucrReceiverDay.GetVariables, iPosition:=3) - clsOutputClimpact.AddParameter("rain", clsRFunctionParameter:=ucrReceiverRR.GetVariables, iPosition:=4) - clsOutputClimpact.AddParameter("mn_tmp", clsRFunctionParameter:=ucrReceiverTN.GetVariables, iPosition:=5) - clsOutputClimpact.AddParameter("mx_tmp", clsRFunctionParameter:=ucrReceiverTX.GetVariables, iPosition:=6) - clsOutputClimpact.AddParameter("missing_code", "-99.9", iPosition:=7) ucrBase.clsRsyntax.SetBaseRFunction(clsOutputClimpact) End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrReceiverYear.SetRCode(clsOutputClimpact, bReset) - ucrSelectorImportToClimpact.SetRCode(clsOutputClimpact, bReset) - ucrReceiverMonth.SetRCode(clsOutputClimpact, bReset) - ucrInputCodeMissingValues.SetRCode(clsOutputClimpact, bReset) - ucrInputExportFile.SetRCode(clsOutputClimpact) + SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub Private Sub TestOkEnabled() From cf78b694b266c9aa29c824507f168868e3f20c7e Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Mon, 22 Jan 2024 15:15:43 +0300 Subject: [PATCH 40/57] 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 41/57] 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 From 0e8611772917b9ef268fa9bd3ed6a9da3258b0be Mon Sep 17 00:00:00 2001 From: n-thony Date: Mon, 22 Jan 2024 16:19:17 +0300 Subject: [PATCH 42/57] bug fixes --- instat/ucrSplitButton.vb | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index 40435240c41..4a2ef4b0c38 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -591,45 +591,43 @@ Public Class ucrSplitButton .StartPosition = FormStartPosition.Manual, .ShowInTaskbar = False } - - ' Event handler for item click - AddHandler _contextSplitMenuStrip.ItemClicked, Sub(sender As Object, e As ToolStripItemClickedEventArgs) - RemoveHandler _contextSplitMenuStrip.ItemClicked - ' Close the form - tmpForm.Close() - End Sub - Dim panel As New Panel With { .Dock = DockStyle.Fill, .AutoScroll = True } - _contextSplitMenuStrip.TopLevel = False _contextSplitMenuStrip.Dock = DockStyle.Top - panel.Controls.Add(_contextSplitMenuStrip) ' Set the panel size based on the preferred size of the context menu panel.Size = _contextSplitMenuStrip.PreferredSize + ' Event handler for item click + AddHandler _contextSplitMenuStrip.ItemClicked, Sub(sender As Object, e As ToolStripItemClickedEventArgs) + tmpForm.Close() + End Sub + + AddHandler tmpForm.FormClosed, Sub(sender As Object, e As FormClosedEventArgs) + If panel.Controls.Contains(_contextSplitMenuStrip) Then + panel.Controls.Remove(_contextSplitMenuStrip) + End If + End Sub + + + panel.Controls.Add(_contextSplitMenuStrip) ' Set a maximum height for the form Dim maxHeight As Integer = 100 If panel.Height > maxHeight Then panel.Height = maxHeight End If + If _contextSplitMenuStrip IsNot Nothing Then + _contextSplitMenuStrip.Show() + End If + tmpForm.Size = New Size(panel.Width, panel.Height) tmpForm.Location = PointToScreen(New Point(0, Height)) - tmpForm.Controls.Add(panel) tmpForm.Show() - _contextSplitMenuStrip.Show(panel, New Point(0, 0)) - - ' Set the initial vertical scroll position to show the last items in the menu - panel.VerticalScroll.Value = panel.VerticalScroll.Maximum - - 'If _contextSplitMenuStrip IsNot Nothing Then - ' _contextSplitMenuStrip.Show(Me, New Point(0, Height), ToolStripDropDownDirection.BelowRight) - 'End If End Sub Private Sub SplitMenuStrip_Opening(sender As Object, e As CancelEventArgs) From ce18b6e0866a95ea62c0f8555f7abdd6d7e642ce Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:43:01 +0100 Subject: [PATCH 43/57] Removing the quotes from the dataframe --- instat/static/InstatObject/R/stand_alone_functions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 9c5ea7de187..3b0fa0f4436 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -3021,7 +3021,7 @@ write_weather_data <- function(year, month, day, rain, mn_tmp, mx_tmp, missing_c weather_data[is.na(weather_data)] <- missing_code # Write the data frame to a text file - write.table(weather_data, file = output_file, sep = "\t", row.names = FALSE, col.names = TRUE) + write.table(weather_data, file = output_file, sep = "\t", row.names = FALSE, col.names = TRUE, quote = FALSE) cat("Weather data has been written to", output_file, "\n") } \ No newline at end of file From 432f371294937be2cc991f4f332e219f1ef691e3 Mon Sep 17 00:00:00 2001 From: n-thony Date: Tue, 23 Jan 2024 11:04:43 +0300 Subject: [PATCH 44/57] minor design changes --- instat/ucrSplitButton.vb | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index 4a2ef4b0c38..29cb60fafec 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -232,14 +232,19 @@ Public Class ucrSplitButton If mevent.Button = MouseButtons.Right AndAlso ClientRectangle.Contains(mevent.Location) AndAlso Not _bSplitMenuVisible Then ShowContextMenuStrip() ElseIf _contextSplitMenuStrip Is Nothing OrElse Not _bSplitMenuVisible Then - SetButtonDrawState() - If ClientRectangle.Contains(mevent.Location) AndAlso Not _dropDownRectangle.Contains(mevent.Location) Then - OnClick(New EventArgs()) + ' Trigger the Click event + OnClick(EventArgs.Empty) End If End If + + ' Set the button state to Normal regardless of other conditions + State = PushButtonState.Normal + + MyBase.OnMouseUp(mevent) End Sub + Protected Overrides Sub OnPaint(pevent As PaintEventArgs) MyBase.OnPaint(pevent) If Not _bShowSplit Then Exit Sub @@ -593,15 +598,13 @@ Public Class ucrSplitButton } Dim panel As New Panel With { .Dock = DockStyle.Fill, - .AutoScroll = True + .AutoScroll = True, + .Size = _contextSplitMenuStrip.PreferredSize, + .BorderStyle = BorderStyle.FixedSingle } _contextSplitMenuStrip.TopLevel = False _contextSplitMenuStrip.Dock = DockStyle.Top - ' Set the panel size based on the preferred size of the context menu - panel.Size = _contextSplitMenuStrip.PreferredSize - - ' Event handler for item click AddHandler _contextSplitMenuStrip.ItemClicked, Sub(sender As Object, e As ToolStripItemClickedEventArgs) tmpForm.Close() End Sub @@ -612,6 +615,10 @@ Public Class ucrSplitButton End If End Sub + AddHandler tmpForm.LostFocus, Sub(sender As Object, e As EventArgs) + _bSplitMenuVisible = False + tmpForm.Close() + End Sub panel.Controls.Add(_contextSplitMenuStrip) ' Set a maximum height for the form From 4dce91150680a1cf17fed177392a009a5477c0a4 Mon Sep 17 00:00:00 2001 From: n-thony Date: Tue, 23 Jan 2024 13:14:58 +0300 Subject: [PATCH 45/57] minor design change --- instat/ucrSplitButton.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index 29cb60fafec..cdb21f10c3b 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -598,12 +598,14 @@ Public Class ucrSplitButton } Dim panel As New Panel With { .Dock = DockStyle.Fill, - .AutoScroll = True, .Size = _contextSplitMenuStrip.PreferredSize, + .AutoScroll = True, .BorderStyle = BorderStyle.FixedSingle } _contextSplitMenuStrip.TopLevel = False _contextSplitMenuStrip.Dock = DockStyle.Top + _contextSplitMenuStrip.Padding = New Padding(0, -2, 0, -2) + _contextSplitMenuStrip.ShowImageMargin = False AddHandler _contextSplitMenuStrip.ItemClicked, Sub(sender As Object, e As ToolStripItemClickedEventArgs) tmpForm.Close() @@ -622,7 +624,7 @@ Public Class ucrSplitButton panel.Controls.Add(_contextSplitMenuStrip) ' Set a maximum height for the form - Dim maxHeight As Integer = 100 + Dim maxHeight As Integer = 250 If panel.Height > maxHeight Then panel.Height = maxHeight End If From 70af7216d89c68958e9a8eac5a47cf920f06d912 Mon Sep 17 00:00:00 2001 From: n-thony Date: Wed, 24 Jan 2024 10:30:16 +0300 Subject: [PATCH 46/57] adjusted the scrollbar --- instat/ucrSplitButton.vb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index cdb21f10c3b..2b30b7ac5b5 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -598,13 +598,11 @@ Public Class ucrSplitButton } Dim panel As New Panel With { .Dock = DockStyle.Fill, - .Size = _contextSplitMenuStrip.PreferredSize, - .AutoScroll = True, - .BorderStyle = BorderStyle.FixedSingle + .BorderStyle = BorderStyle.None, + .Size = _contextSplitMenuStrip.PreferredSize } _contextSplitMenuStrip.TopLevel = False _contextSplitMenuStrip.Dock = DockStyle.Top - _contextSplitMenuStrip.Padding = New Padding(0, -2, 0, -2) _contextSplitMenuStrip.ShowImageMargin = False AddHandler _contextSplitMenuStrip.ItemClicked, Sub(sender As Object, e As ToolStripItemClickedEventArgs) @@ -627,14 +625,23 @@ Public Class ucrSplitButton Dim maxHeight As Integer = 250 If panel.Height > maxHeight Then panel.Height = maxHeight + panel.AutoScroll = True End If If _contextSplitMenuStrip IsNot Nothing Then _contextSplitMenuStrip.Show() End If + ' Calculate whether to show the form above or below + Dim screenRect As Rectangle = Screen.FromControl(Me).WorkingArea + Dim bShowUp As Boolean = PointToScreen(New Point(0, Height + panel.Height)).Y > screenRect.Bottom + + If bShowUp Then + tmpForm.Location = PointToScreen(New Point(0, Height - tmpForm.Height)) + Else + tmpForm.Location = PointToScreen(New Point(0, Height)) + End If tmpForm.Size = New Size(panel.Width, panel.Height) - tmpForm.Location = PointToScreen(New Point(0, Height)) tmpForm.Controls.Add(panel) tmpForm.Show() End Sub From 10d07b974d02105b7b74ba6fd415a9cd78d2a0c2 Mon Sep 17 00:00:00 2001 From: n-thony Date: Wed, 24 Jan 2024 11:49:37 +0300 Subject: [PATCH 47/57] bug fixes --- instat/ucrSplitButton.vb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/instat/ucrSplitButton.vb b/instat/ucrSplitButton.vb index 2b30b7ac5b5..95776041dba 100644 --- a/instat/ucrSplitButton.vb +++ b/instat/ucrSplitButton.vb @@ -598,8 +598,7 @@ Public Class ucrSplitButton } Dim panel As New Panel With { .Dock = DockStyle.Fill, - .BorderStyle = BorderStyle.None, - .Size = _contextSplitMenuStrip.PreferredSize + .BorderStyle = BorderStyle.None } _contextSplitMenuStrip.TopLevel = False _contextSplitMenuStrip.Dock = DockStyle.Top @@ -623,9 +622,14 @@ Public Class ucrSplitButton panel.Controls.Add(_contextSplitMenuStrip) ' Set a maximum height for the form Dim maxHeight As Integer = 250 - If panel.Height > maxHeight Then - panel.Height = maxHeight + + ' Ensure that the panel fits the preferred size of the context menu without extra space + Dim preferredSize As Size = _contextSplitMenuStrip.PreferredSize + If preferredSize.Height > maxHeight Then panel.AutoScroll = True + preferredSize.Height = maxHeight + Else + panel.AutoScroll = False End If If _contextSplitMenuStrip IsNot Nothing Then @@ -634,14 +638,16 @@ Public Class ucrSplitButton ' Calculate whether to show the form above or below Dim screenRect As Rectangle = Screen.FromControl(Me).WorkingArea - Dim bShowUp As Boolean = PointToScreen(New Point(0, Height + panel.Height)).Y > screenRect.Bottom + Dim showUp As Boolean = PointToScreen(New Point(0, Height + PreferredSize.Height)).Y > screenRect.Bottom - If bShowUp Then + ' Set the form size and location accordingly + tmpForm.Size = New Size(PreferredSize.Width, PreferredSize.Height) + If showUp Then tmpForm.Location = PointToScreen(New Point(0, Height - tmpForm.Height)) Else tmpForm.Location = PointToScreen(New Point(0, Height)) End If - tmpForm.Size = New Size(panel.Width, panel.Height) + tmpForm.Controls.Add(panel) tmpForm.Show() End Sub From c26173249959c167016637f10685380f0abeaa7c Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:08:41 +0100 Subject: [PATCH 48/57] Fixes bug where the script tab does not come with a name --- instat/ucrScript.vb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/instat/ucrScript.vb b/instat/ucrScript.vb index 8186584b1a6..b507c785a7a 100644 --- a/instat/ucrScript.vb +++ b/instat/ucrScript.vb @@ -26,7 +26,7 @@ Public Class ucrScript Private iMaxLineNumberCharLength As Integer = 0 Private Const iTabIndexLog As Integer = 0 Private strRInstatLogFilesFolderPath As String = Path.Combine(Path.GetFullPath(FileIO.SpecialDirectories.MyDocuments), "R-Instat_Log_files") - + Private strCurrentScriptFileName As String = "" 'holds the saved script file name to help remember the current selected folder path Friend WithEvents clsScriptActive As Scintilla Friend WithEvents clsScriptLog As Scintilla @@ -214,7 +214,12 @@ Public Class ucrScript Using dlgSave As New SaveFileDialog dlgSave.Title = "Save " & If(bIsLog, "Log", "Script") & " To File" dlgSave.Filter = "R Script File (*.R)|*.R|Text File (*.txt)|*.txt" - + If Not String.IsNullOrEmpty(strCurrentScriptFileName) Then + dlgSave.FileName = Path.GetFileName(strCurrentScriptFileName) + dlgSave.InitialDirectory = Path.GetDirectoryName(strCurrentScriptFileName) + Else + dlgSave.InitialDirectory = frmMain.clsInstatOptions.strWorkingDirectory + End If 'Ensure that dialog opens in correct folder. 'In theory, we should be able to use `dlgLoad.RestoreDirectory = True` but this does 'not work (I think a bug in WinForms).So we need to use static variables instead. @@ -225,6 +230,7 @@ Public Class ucrScript If dlgSave.ShowDialog() = DialogResult.OK Then Try File.WriteAllText(dlgSave.FileName, If(bIsLog, clsScriptLog.Text, clsScriptActive.Text)) + strCurrentScriptFileName = dlgSave.FileName bIsTextChanged = False TabControl.SelectedTab.Text = System.IO.Path.GetFileNameWithoutExtension(dlgSave.FileName) frmMain.clsRecentItems.addToMenu(Replace(Path.Combine(Path.GetFullPath(FileIO.SpecialDirectories.MyDocuments), System.IO.Path.GetFileName(dlgSave.FileName)), "\", "/")) From 227bac85c1c5866467021d13ee6a788ce73df709 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Wed, 24 Jan 2024 13:26:36 +0100 Subject: [PATCH 49/57] change made --- instat/dlgEndOfRainsSeason.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgEndOfRainsSeason.vb b/instat/dlgEndOfRainsSeason.vb index 46103d31e9f..bb6f21e4d1a 100644 --- a/instat/dlgEndOfRainsSeason.vb +++ b/instat/dlgEndOfRainsSeason.vb @@ -276,6 +276,7 @@ Public Class dlgEndOfRainsSeason ucrNudCapacity.SetParameter(New RParameter("yes", 1)) ucrNudCapacity.SetMinMax(1, Integer.MaxValue) ucrNudCapacity.Increment = 10 + ucrNudCapacity.SetRDefault(100) ucrInputSeasonDoy.SetParameter(New RParameter("result_name", 3)) ucrInputSeasonDoy.SetValidationTypeAsRVariable() @@ -315,7 +316,7 @@ Public Class dlgEndOfRainsSeason ucrChkEndofSeasonDate.AddToLinkedControls(ucrInputEndofSeasonDate, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofSeasonDoy.AddToLinkedControls(ucrInputSeasonDoy, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkWB.AddToLinkedControls(ucrNudWB, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) - ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation},bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=5) ucrPnlEvaporation.AddToLinkedControls(ucrReceiverEvaporation, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsOccurence.AddToLinkedControls(ucrInputEndofRainsOccurence, {True}, bNewLinkedHideIfParameterMissing:=True) ucrChkEndofRainsDate.AddToLinkedControls(ucrInputEndofRainsDate, {True}, bNewLinkedHideIfParameterMissing:=True) From 2c2f751c117cda57468968568ed507ff4fbef09c Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Wed, 24 Jan 2024 14:41:00 +0100 Subject: [PATCH 50/57] Change made --- instat/dlgEndOfRainsSeason.vb | 9 ++++++++- instat/dlgStartofRains.Designer.vb | 32 ++++++++++++++---------------- instat/dlgStartofRains.vb | 22 ++++++++++++++------ 3 files changed, 39 insertions(+), 24 deletions(-) diff --git a/instat/dlgEndOfRainsSeason.vb b/instat/dlgEndOfRainsSeason.vb index bb6f21e4d1a..6c9a4e03f3f 100644 --- a/instat/dlgEndOfRainsSeason.vb +++ b/instat/dlgEndOfRainsSeason.vb @@ -276,7 +276,6 @@ Public Class dlgEndOfRainsSeason ucrNudCapacity.SetParameter(New RParameter("yes", 1)) ucrNudCapacity.SetMinMax(1, Integer.MaxValue) ucrNudCapacity.Increment = 10 - ucrNudCapacity.SetRDefault(100) ucrInputSeasonDoy.SetParameter(New RParameter("result_name", 3)) ucrInputSeasonDoy.SetValidationTypeAsRVariable() @@ -1051,12 +1050,16 @@ Public Class dlgEndOfRainsSeason clsPMaxFunction.RemoveParameterByName("0") clsWBMaxEvapOperator.RemoveParameterByName("value") clsWBMinEvapOperator.RemoveParameterByName("value") + clsPMinWBMaxFunction.RemoveParameterByName("1") + clsPMinWBMinFunction.RemoveParameterByName("1") Else clsPMaxFunction.AddParameter("0", "..1 + ..2", iPosition:=0, bIncludeArgumentName:=False) clsPMaxFunction.RemoveParameterByName("wb") clsPMaxFunction.RemoveParameterByName("wb") clsWBMaxEvapOperator.AddParameter("value", ucrInputEvaporation.GetText(), iPosition:=1) clsWBMinEvapOperator.AddParameter("value", ucrInputEvaporation.GetText(), iPosition:=1) + clsPMinWBMaxFunction.AddParameter("1", ucrNudCapacity.GetText(), iPosition:=1) + clsPMinWBMinFunction.AddParameter("1", ucrNudCapacity.GetText(), iPosition:=1) End If Else ucrReceiverEvaporation.SetMeAsReceiver() @@ -1075,12 +1078,16 @@ Public Class dlgEndOfRainsSeason clsPMaxFunction.RemoveParameterByName("0") clsWBMaxEvapOperator.RemoveParameterByName("value") clsWBMinEvapOperator.RemoveParameterByName("value") + clsPMinWBMaxFunction.RemoveParameterByName("1") + clsPMinWBMinFunction.RemoveParameterByName("1") Else clsPMaxFunction.AddParameter("0", "..1 + ..2", iPosition:=0, bIncludeArgumentName:=False) clsPMaxFunction.RemoveParameterByName("wb") clsPMaxFunction.RemoveParameterByName("wb") clsReduceWBMinFunction1.AddParameter(".y", clsRFunctionParameter:=clsWBMinTailFunction1, iPosition:=1) clsReduceWBMaxFunction1.AddParameter(".y", clsRFunctionParameter:=clsWBMaxTailFunction1, iPosition:=1) + clsPMinWBMaxFunction.AddParameter("1", ucrNudCapacity.GetText(), iPosition:=1) + clsPMinWBMinFunction.AddParameter("1", ucrNudCapacity.GetText(), iPosition:=1) End If End If End If diff --git a/instat/dlgStartofRains.Designer.vb b/instat/dlgStartofRains.Designer.vb index ea3a0db2d9d..e5f35fb174b 100644 --- a/instat/dlgStartofRains.Designer.vb +++ b/instat/dlgStartofRains.Designer.vb @@ -66,9 +66,9 @@ Partial Class dlgStartofRains Me.rdoTRPercentile = New System.Windows.Forms.RadioButton() Me.ucrPnlTRCalculateBy = New instat.UcrPanel() Me.grpRainParameters = New System.Windows.Forms.GroupBox() + Me.ucrInputThreshold = New instat.ucrInputComboBox() Me.ucrInputFilterPreview = New instat.ucrInputTextBox() Me.cmdDoyRange = New System.Windows.Forms.Button() - Me.ucrNudThreshold = New instat.ucrNud() Me.lblThreshold = New System.Windows.Forms.Label() Me.lblDOY = New System.Windows.Forms.Label() Me.lblDate = New System.Windows.Forms.Label() @@ -409,9 +409,9 @@ Partial Class dlgStartofRains ' 'grpRainParameters ' + Me.grpRainParameters.Controls.Add(Me.ucrInputThreshold) Me.grpRainParameters.Controls.Add(Me.ucrInputFilterPreview) Me.grpRainParameters.Controls.Add(Me.cmdDoyRange) - Me.grpRainParameters.Controls.Add(Me.ucrNudThreshold) Me.grpRainParameters.Controls.Add(Me.lblThreshold) Me.grpRainParameters.Location = New System.Drawing.Point(4, 238) Me.grpRainParameters.Name = "grpRainParameters" @@ -419,6 +419,17 @@ Partial Class dlgStartofRains Me.grpRainParameters.TabIndex = 11 Me.grpRainParameters.TabStop = False ' + 'ucrInputThreshold + ' + Me.ucrInputThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputThreshold.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputThreshold.GetSetSelectedIndex = -1 + Me.ucrInputThreshold.IsReadOnly = False + Me.ucrInputThreshold.Location = New System.Drawing.Point(70, 11) + Me.ucrInputThreshold.Name = "ucrInputThreshold" + Me.ucrInputThreshold.Size = New System.Drawing.Size(62, 21) + Me.ucrInputThreshold.TabIndex = 21 + ' 'ucrInputFilterPreview ' Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True @@ -441,19 +452,6 @@ Partial Class dlgStartofRains Me.cmdDoyRange.Text = "Day Range" Me.cmdDoyRange.UseVisualStyleBackColor = True ' - 'ucrNudThreshold - ' - Me.ucrNudThreshold.AutoSize = True - Me.ucrNudThreshold.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudThreshold.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudThreshold.Location = New System.Drawing.Point(69, 11) - Me.ucrNudThreshold.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudThreshold.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudThreshold.Name = "ucrNudThreshold" - Me.ucrNudThreshold.Size = New System.Drawing.Size(42, 20) - Me.ucrNudThreshold.TabIndex = 1 - Me.ucrNudThreshold.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblThreshold ' Me.lblThreshold.AutoSize = True @@ -665,7 +663,7 @@ Partial Class dlgStartofRains Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrBase.Location = New System.Drawing.Point(5, 514) 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 = 20 ' 'dlgStartofRains @@ -741,7 +739,6 @@ Partial Class dlgStartofRains Friend WithEvents ucrPnlTRCalculateBy As UcrPanel Friend WithEvents ucrNudRDMinimumDays As ucrNud Friend WithEvents ucrNudRDOutOfDays As ucrNud - Friend WithEvents ucrNudThreshold As ucrNud Friend WithEvents ucrChkNumberOfRainyDays As ucrCheck Friend WithEvents ucrNudDSLengthOfTime As ucrNud Friend WithEvents ucrNudDSMaximumDays As ucrNud @@ -760,4 +757,5 @@ Partial Class dlgStartofRains Friend WithEvents ucrChkStatus As ucrCheck Friend WithEvents ucrInputNewStatusColumnName As ucrInputTextBox Friend WithEvents grpDisplay As GroupBox + Friend WithEvents ucrInputThreshold As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgStartofRains.vb b/instat/dlgStartofRains.vb index 45a55caf552..8717e3e6506 100644 --- a/instat/dlgStartofRains.vb +++ b/instat/dlgStartofRains.vb @@ -87,6 +87,7 @@ Public Class dlgStartofRains Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 199 + Dim dctInputThreshold As New Dictionary(Of String, String) ' setting the selector ucrSelectorForStartofRains.SetParameter(New RParameter("data_name", 0)) @@ -129,8 +130,17 @@ Public Class dlgStartofRains ucrReceiverRainfall.SetClimaticType("rain") ucrReceiverRainfall.bAutoFill = True - ucrNudThreshold.SetParameter(New RParameter("threshold", 1)) - ucrNudThreshold.DecimalPlaces = 2 + ucrInputThreshold.SetParameter(New RParameter("threshold", 1)) + dctInputThreshold.Add("0.85", "0.85") + dctInputThreshold.Add("0.5", "0.5") + dctInputThreshold.Add("0.05", "0.05") + dctInputThreshold.Add("0.99", "0.99") + ucrInputThreshold.SetItems(dctInputThreshold) + ucrInputThreshold.AddQuotesIfUnrecognised = False + ucrInputThreshold.SetLinkedDisplayControl(lblThreshold) + ucrInputThreshold.SetRDefault(0.85) + + 'Total Rainfall ucrPnlTRCalculateBy.AddRadioButton(rdoTRAmount) @@ -715,7 +725,7 @@ Public Class dlgStartofRains ucrReceiverRainfall.AddAdditionalCodeParameterPair(clsRainDayConditionOperator, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=3) ucrReceiverRainfall.AddAdditionalCodeParameterPair(clsFirstRain, New RParameter("x", 0), iAdditionalPairNo:=4) ucrReceiverRainfall.AddAdditionalCodeParameterPair(clsIsNaRain, New RParameter("x", 0), iAdditionalPairNo:=5) - ucrNudThreshold.AddAdditionalCodeParameterPair(clsRainDayConditionOperator, New RParameter("threshold", 1), iAdditionalPairNo:=1) + ucrInputThreshold.AddAdditionalCodeParameterPair(clsRainDayConditionOperator, New RParameter("threshold", 1), iAdditionalPairNo:=1) 'clsSORStartSummary.SetControlParameters(ucrReceiverRainfall, iAdditionalPairNo:=4) 'clsSORStatusSummary.SetControlParameters(ucrReceiverRainfall, iAdditionalPairNo:=5) @@ -727,7 +737,7 @@ Public Class dlgStartofRains ucrChkAsDoy.SetRCode(clsCombinationSubCalcList, bReset) ucrChkStatus.SetRCode(clsCombinationSubCalcList, bReset) ucrChkAsDate.SetRCode(clsCombinationSubCalcList, bReset) - ucrNudThreshold.SetRCode(clsRainDayOperator, bReset) + ucrInputThreshold.SetRCode(clsRainDayOperator, bReset) ucrReceiverDate.SetRCode(clsFirstDate, bReset) ucrInputNewDoyColumnName.SetRCode(clsCalcStartDOY, bReset) @@ -766,7 +776,7 @@ Public Class dlgStartofRains Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverDOY.IsEmpty AndAlso Not ucrReceiverYear.IsEmpty AndAlso - ucrNudThreshold.GetText <> "" AndAlso + ucrInputThreshold.GetText <> "" AndAlso ( (ucrChkNumberOfRainyDays.Checked AndAlso ucrNudRDMinimumDays.GetText <> "" AndAlso ucrNudRDOutOfDays.GetText <> "") OrElse Not ucrChkNumberOfRainyDays.Checked) AndAlso @@ -970,7 +980,7 @@ Public Class dlgStartofRains End If End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRainfall.ControlContentsChanged, ucrInputNewDoyColumnName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrNudThreshold.ControlContentsChanged, ucrChkNumberOfRainyDays.ControlContentsChanged, ucrNudRDMinimumDays.ControlContentsChanged, ucrNudRDOutOfDays.ControlContentsChanged, ucrChkTotalRainfall.ControlContentsChanged, ucrNudTROverDays.ControlContentsChanged, ucrPnlTRCalculateBy.ControlContentsChanged, ucrNudTRAmount.ControlContentsChanged, ucrNudTRPercentile.ControlContentsChanged, ucrChkDrySpell.ControlContentsChanged, ucrNudDSMaximumDays.ControlContentsChanged, ucrNudDSLengthOfTime.ControlContentsChanged, ucrNudDPMaxRain.ControlContentsChanged, ucrChkAsDoy.ControlContentsChanged, ucrChkAsDate.ControlContentsChanged, ucrInputNewDateColumnName.ControlContentsChanged, ucrChkStatus.ControlContentsChanged, ucrInputNewStatusColumnName.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRainfall.ControlContentsChanged, ucrInputNewDoyColumnName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrInputThreshold.ControlContentsChanged, ucrChkNumberOfRainyDays.ControlContentsChanged, ucrNudRDMinimumDays.ControlContentsChanged, ucrNudRDOutOfDays.ControlContentsChanged, ucrChkTotalRainfall.ControlContentsChanged, ucrNudTROverDays.ControlContentsChanged, ucrPnlTRCalculateBy.ControlContentsChanged, ucrNudTRAmount.ControlContentsChanged, ucrNudTRPercentile.ControlContentsChanged, ucrChkDrySpell.ControlContentsChanged, ucrNudDSMaximumDays.ControlContentsChanged, ucrNudDSLengthOfTime.ControlContentsChanged, ucrNudDPMaxRain.ControlContentsChanged, ucrChkAsDoy.ControlContentsChanged, ucrChkAsDate.ControlContentsChanged, ucrInputNewDateColumnName.ControlContentsChanged, ucrChkStatus.ControlContentsChanged, ucrInputNewStatusColumnName.ControlContentsChanged TestOKEnabled() End Sub From f8cb648627f83053079892e2ab2403232912f703 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:23:00 +0100 Subject: [PATCH 51/57] Code changes --- instat/dlgExportForClimpact.vb | 7 +++---- instat/frmMain.Designer.vb | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/instat/dlgExportForClimpact.vb b/instat/dlgExportForClimpact.vb index a7d078dcec0..9949b76e5b6 100644 --- a/instat/dlgExportForClimpact.vb +++ b/instat/dlgExportForClimpact.vb @@ -148,14 +148,13 @@ Public Class dlgExportForClimpact End Using End Sub - Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverDay.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrInputExportFile.ControlContentsChanged, ucrReceiverTX.ControlValueChanged, ucrReceiverMonth.ControlValueChanged - TestOkEnabled() - End Sub - Private Sub ucrInputExportFile_Click(sender As Object, e As EventArgs) Handles ucrInputExportFile.Click If ucrInputExportFile.IsEmpty() Then SelectFileToSave() End If End Sub + Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverDay.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrInputExportFile.ControlContentsChanged, ucrReceiverTX.ControlValueChanged, ucrReceiverMonth.ControlValueChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index b646fda10dc..5333d6462c3 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -5107,8 +5107,6 @@ Partial Class frmMain Me.MainMenuStrip = Me.mnuBar Me.Name = "frmMain" - Me.Text = "R-Instat .." - Me.Text = "R-Instat " + My.Application.Info.Version.Major.ToString + "." + My.Application.Info.Version.Minor.ToString + "." + My.Application.Info.Version.Build.ToString() From 44bce7710298d71851eb7ee2d3b55e8d33bb3668 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Thu, 25 Jan 2024 11:35:59 +0100 Subject: [PATCH 52/57] Code Changes --- instat/ucrScript.vb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/instat/ucrScript.vb b/instat/ucrScript.vb index b507c785a7a..56fcbf581cd 100644 --- a/instat/ucrScript.vb +++ b/instat/ucrScript.vb @@ -26,7 +26,7 @@ Public Class ucrScript Private iMaxLineNumberCharLength As Integer = 0 Private Const iTabIndexLog As Integer = 0 Private strRInstatLogFilesFolderPath As String = Path.Combine(Path.GetFullPath(FileIO.SpecialDirectories.MyDocuments), "R-Instat_Log_files") - Private strCurrentScriptFileName As String = "" 'holds the saved script file name to help remember the current selected folder path + Friend WithEvents clsScriptActive As Scintilla Friend WithEvents clsScriptLog As Scintilla @@ -196,6 +196,10 @@ Public Class ucrScript End If End Sub + Private Function SelectedTab() As String + Return TabControl.SelectedTab.Text + End Function + ''' ''' Displays a file save dialog; allows the user to specify a folder and file name; and saves ''' the log/script to the specified file. @@ -214,12 +218,8 @@ Public Class ucrScript Using dlgSave As New SaveFileDialog dlgSave.Title = "Save " & If(bIsLog, "Log", "Script") & " To File" dlgSave.Filter = "R Script File (*.R)|*.R|Text File (*.txt)|*.txt" - If Not String.IsNullOrEmpty(strCurrentScriptFileName) Then - dlgSave.FileName = Path.GetFileName(strCurrentScriptFileName) - dlgSave.InitialDirectory = Path.GetDirectoryName(strCurrentScriptFileName) - Else - dlgSave.InitialDirectory = frmMain.clsInstatOptions.strWorkingDirectory - End If + dlgSave.FileName = Path.GetFileName(SelectedTab) + 'Ensure that dialog opens in correct folder. 'In theory, we should be able to use `dlgLoad.RestoreDirectory = True` but this does 'not work (I think a bug in WinForms).So we need to use static variables instead. @@ -230,7 +230,6 @@ Public Class ucrScript If dlgSave.ShowDialog() = DialogResult.OK Then Try File.WriteAllText(dlgSave.FileName, If(bIsLog, clsScriptLog.Text, clsScriptActive.Text)) - strCurrentScriptFileName = dlgSave.FileName bIsTextChanged = False TabControl.SelectedTab.Text = System.IO.Path.GetFileNameWithoutExtension(dlgSave.FileName) frmMain.clsRecentItems.addToMenu(Replace(Path.Combine(Path.GetFullPath(FileIO.SpecialDirectories.MyDocuments), System.IO.Path.GetFileName(dlgSave.FileName)), "\", "/")) From 81f9494041ea7ba0809f43fde918434892c1dbfc Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Thu, 25 Jan 2024 15:15:59 +0300 Subject: [PATCH 53/57] changes to the code --- instat/dlgBoxPlot.designer.vb | 76 +++++++++- instat/dlgBoxPlot.vb | 256 +++++++++++++++++++++++++++++++++- 2 files changed, 323 insertions(+), 9 deletions(-) diff --git a/instat/dlgBoxPlot.designer.vb b/instat/dlgBoxPlot.designer.vb index ccb4edde49b..0dc0345dac6 100644 --- a/instat/dlgBoxPlot.designer.vb +++ b/instat/dlgBoxPlot.designer.vb @@ -70,6 +70,11 @@ Partial Class dlgBoxplot Me.ucrByFactorsReceiver = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() Me.ucrPnlPlots = New instat.UcrPanel() + Me.ucrInputStation = New instat.ucrInputComboBox() + Me.ucr1stFactorReceiver = New instat.ucrReceiverSingle() + Me.lblFacetBy = New System.Windows.Forms.Label() + Me.ucrInputLegendPosition = New instat.ucrInputComboBox() + Me.ucrChkLegend = New instat.ucrCheck() Me.contextMenuStripOptions.SuspendLayout() Me.SuspendLayout() ' @@ -300,7 +305,7 @@ Partial Class dlgBoxplot 'ucrSaveBoxplot ' Me.ucrSaveBoxplot.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveBoxplot.Location = New System.Drawing.Point(10, 384) + Me.ucrSaveBoxplot.Location = New System.Drawing.Point(10, 415) Me.ucrSaveBoxplot.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveBoxplot.Name = "ucrSaveBoxplot" Me.ucrSaveBoxplot.Size = New System.Drawing.Size(328, 24) @@ -379,7 +384,7 @@ Partial Class dlgBoxplot ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 412) + Me.ucrBase.Location = New System.Drawing.Point(10, 442) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 23 @@ -392,12 +397,72 @@ Partial Class dlgBoxplot Me.ucrPnlPlots.Size = New System.Drawing.Size(410, 35) Me.ucrPnlPlots.TabIndex = 0 ' + 'ucrInputStation + ' + Me.ucrInputStation.AddQuotesIfUnrecognised = True + Me.ucrInputStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputStation.GetSetSelectedIndex = -1 + Me.ucrInputStation.IsReadOnly = False + Me.ucrInputStation.Location = New System.Drawing.Point(335, 390) + Me.ucrInputStation.Name = "ucrInputStation" + Me.ucrInputStation.Size = New System.Drawing.Size(86, 21) + Me.ucrInputStation.TabIndex = 26 + ' + 'ucr1stFactorReceiver + ' + Me.ucr1stFactorReceiver.AutoSize = True + Me.ucr1stFactorReceiver.frmParent = Me + Me.ucr1stFactorReceiver.Location = New System.Drawing.Point(222, 391) + Me.ucr1stFactorReceiver.Margin = New System.Windows.Forms.Padding(0) + Me.ucr1stFactorReceiver.Name = "ucr1stFactorReceiver" + Me.ucr1stFactorReceiver.Selector = Nothing + Me.ucr1stFactorReceiver.Size = New System.Drawing.Size(109, 26) + Me.ucr1stFactorReceiver.strNcFilePath = "" + Me.ucr1stFactorReceiver.TabIndex = 25 + Me.ucr1stFactorReceiver.ucrSelector = Nothing + ' + 'lblFacetBy + ' + Me.lblFacetBy.AutoSize = True + Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblFacetBy.Location = New System.Drawing.Point(222, 376) + Me.lblFacetBy.Name = "lblFacetBy" + Me.lblFacetBy.Size = New System.Drawing.Size(52, 13) + Me.lblFacetBy.TabIndex = 24 + Me.lblFacetBy.Tag = "" + Me.lblFacetBy.Text = "Facet By:" + ' + 'ucrInputLegendPosition + ' + Me.ucrInputLegendPosition.AddQuotesIfUnrecognised = True + Me.ucrInputLegendPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputLegendPosition.GetSetSelectedIndex = -1 + Me.ucrInputLegendPosition.IsReadOnly = False + Me.ucrInputLegendPosition.Location = New System.Drawing.Point(105, 390) + Me.ucrInputLegendPosition.Name = "ucrInputLegendPosition" + Me.ucrInputLegendPosition.Size = New System.Drawing.Size(112, 21) + Me.ucrInputLegendPosition.TabIndex = 28 + ' + 'ucrChkLegend + ' + Me.ucrChkLegend.AutoSize = True + Me.ucrChkLegend.Checked = False + Me.ucrChkLegend.Location = New System.Drawing.Point(10, 388) + Me.ucrChkLegend.Name = "ucrChkLegend" + Me.ucrChkLegend.Size = New System.Drawing.Size(98, 24) + Me.ucrChkLegend.TabIndex = 27 + ' 'dlgBoxplot ' 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(425, 466) + Me.ClientSize = New System.Drawing.Size(425, 497) + Me.Controls.Add(Me.ucrInputStation) + Me.Controls.Add(Me.ucr1stFactorReceiver) + Me.Controls.Add(Me.lblFacetBy) + Me.Controls.Add(Me.ucrInputLegendPosition) + Me.Controls.Add(Me.ucrChkLegend) Me.Controls.Add(Me.ucrInputSummaries) Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.ucrChkTufte) @@ -467,4 +532,9 @@ Partial Class dlgBoxplot Friend WithEvents toolStripMenuItemTufteOptions As ToolStripMenuItem Friend WithEvents ucrInputSummaries As ucrInputComboBox Friend WithEvents toolStripMenuItemSummaryOptions As ToolStripMenuItem + Friend WithEvents ucrInputStation As ucrInputComboBox + Friend WithEvents ucr1stFactorReceiver As ucrReceiverSingle + Friend WithEvents lblFacetBy As Label + Friend WithEvents ucrInputLegendPosition As ucrInputComboBox + Friend WithEvents ucrChkLegend As ucrCheck End Class diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb index d9628ed6a70..a06ba3c9526 100644 --- a/instat/dlgBoxPlot.vb +++ b/instat/dlgBoxPlot.vb @@ -55,6 +55,22 @@ Public Class dlgBoxplot Private clsAddedJitterFunc As New RFunction Private clsXScaleDateFunction As New RFunction Private clsYScaleDateFunction As New RFunction + Private clsFacetsFunction As New RFunction + + Private clsFacetFunction As New RFunction + Private clsFacetVariablesOperator As New ROperator + Private clsFacetRowOp As New ROperator + Private clsFacetColOp As New ROperator + Private clsPipeOperator As New ROperator + Private clsGroupByFunction As New RFunction + + Private ReadOnly strFacetWrap As String = "Facet Wrap" + Private ReadOnly strFacetRow As String = "Facet Row" + Private ReadOnly strFacetCol As String = "Facet Column" + Private ReadOnly strNone As String = "None" + + Private bUpdateComboOptions As Boolean = True + Private bUpdatingParameters As Boolean = False 'Parameter names for geoms Private strFirstParameterName As String = "geomfunc" @@ -83,6 +99,7 @@ Public Class dlgBoxplot Dim clsCoordFlipParam As New RParameter Dim clsAddedJitterParam As New RParameter Dim dctSummaries As New Dictionary(Of String, String) + Dim dctLegendPosition As New Dictionary(Of String, String) ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False ucrBase.iHelpTopicID = 436 ucrBase.clsRsyntax.iCallType = 3 @@ -95,7 +112,7 @@ Public Class dlgBoxplot ucrPnlPlots.AddFunctionNamesCondition(rdoJitter, "geom_jitter") ucrPnlPlots.AddFunctionNamesCondition(rdoViolin, "geom_violin") ucrPnlPlots.AddToLinkedControls(ucrChkAddPoints, {rdoBoxplotTufte, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlPlots.AddToLinkedControls({ucrChkTufte}, {rdoBoxplotTufte}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlPlots.AddToLinkedControls({ucrChkTufte, ucrChkLegend, ucrInputStation, ucr1stFactorReceiver}, {rdoBoxplotTufte}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTufte.AddToLinkedControls(ucrChkVarWidth, {"FALSE"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrSelectorBoxPlot.SetParameter(New RParameter("data", 0)) @@ -178,6 +195,31 @@ Public Class dlgBoxplot ucrInputSummaries.SetItems(dctSummaries) ucrInputSummaries.SetDropDownStyleAsNonEditable() + ucrChkLegend.SetText("Legend:") + ucrChkLegend.AddToLinkedControls({ucrInputLegendPosition}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="None") + ucrInputLegendPosition.SetDropDownStyleAsNonEditable() + ucrInputLegendPosition.SetParameter(New RParameter("legend.position")) + dctLegendPosition.Add("None", Chr(34) & "none" & Chr(34)) + dctLegendPosition.Add("Left", Chr(34) & "left" & Chr(34)) + dctLegendPosition.Add("Right", Chr(34) & "right" & Chr(34)) + dctLegendPosition.Add("Top", Chr(34) & "top" & Chr(34)) + dctLegendPosition.Add("Bottom", Chr(34) & "bottom" & Chr(34)) + ucrInputLegendPosition.SetItems(dctLegendPosition) + ucrChkLegend.AddParameterPresentCondition(True, "legend.position") + ucrChkLegend.AddParameterPresentCondition(False, "legend.position", False) + + ucr1stFactorReceiver.SetParameter(New RParameter("var1")) + ucr1stFactorReceiver.Selector = ucrSelectorBoxPlot + ucr1stFactorReceiver.SetIncludedDataTypes({"factor"}) + ucr1stFactorReceiver.strSelectorHeading = "Factors" + ucr1stFactorReceiver.bWithQuotes = False + ucr1stFactorReceiver.SetParameterIsString() + ucr1stFactorReceiver.SetValuesToIgnore({"."}) + ucr1stFactorReceiver.SetParameterPosition(1) + ucr1stFactorReceiver.SetLinkedDisplayControl(lblFacetBy) + + ucrInputStation.SetItems({strFacetWrap, strFacetRow, strFacetCol, strNone}) + ucrInputStation.SetDropDownStyleAsNonEditable() ucrChkGrouptoConnect.SetText("Group to Connect") ucrChkGrouptoConnect.AddToLinkedControls(ucrInputSummaries, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -196,6 +238,12 @@ Public Class dlgBoxplot clsRaesFunction = New RFunction clsLocalRaesFunction = New RFunction clsStatSummary = New RFunction + clsFacetFunction = New RFunction + clsFacetVariablesOperator = New ROperator + clsFacetRowOp = New ROperator + clsFacetColOp = New ROperator + clsPipeOperator = New ROperator + clsGroupByFunction = New RFunction 'Setting up new functions clsBoxplotFunction = New RFunction @@ -206,6 +254,9 @@ Public Class dlgBoxplot clsAddedJitterFunc.Clear() + ucrInputStation.SetName(strFacetWrap) + ucrInputStation.bUpdateRCodeFromControl = True + ucrSelectorBoxPlot.Reset() ucrSelectorBoxPlot.SetGgplotFunction(clsBaseOperator) @@ -265,6 +316,22 @@ Public Class dlgBoxplot clsStatSummary.AddParameter("group", 1, iPosition:=1) clsStatSummary.AddParameter("color", Chr(34) & "blue" & Chr(34), iPosition:=2) + clsFacetFunction.SetPackageName("ggplot2") + clsFacetRowOp.SetOperation("+") + clsFacetRowOp.bBrackets = False + clsFacetColOp.SetOperation("+") + clsFacetColOp.bBrackets = False + clsFacetVariablesOperator.SetOperation("~") + clsFacetVariablesOperator.bForceIncludeOperation = True + clsFacetVariablesOperator.bBrackets = False + clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetVariablesOperator, iPosition:=0) + + clsPipeOperator.SetOperation("%>%") + SetPipeAssignTo() + + clsGroupByFunction.SetPackageName("dplyr") + clsGroupByFunction.SetRCommand("group_by") + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() @@ -307,8 +374,12 @@ Public Class dlgBoxplot ucrInputSummaries.SetRCode(clsStatSummary, bReset) ucrChkGrouptoConnect.SetRCode(clsBaseOperator, bReset) ucrPnlPlots.SetRCode(clsCurrGeomFunction, bReset) - + ucrChkLegend.SetRCode(clsThemeFunction, bReset, bCloneIfNeeded:=True) + ucrInputLegendPosition.SetRCode(clsThemeFunction, bReset, bCloneIfNeeded:=True) ucrChkTufte.SetRCode(clsCurrGeomFunction, bReset) + If bReset Then + AutoFacetStation() + End If End Sub Private Sub TestOkEnabled() @@ -409,10 +480,22 @@ Public Class dlgBoxplot TestOkEnabled() End Sub + Private Sub AddRemoveTheme() + If clsThemeFunction.iParameterCount > 0 Then + clsBaseOperator.AddParameter("theme", clsRFunctionParameter:=clsThemeFunction, iPosition:=15) + Else + clsBaseOperator.RemoveParameterByName("theme") + End If + End Sub + + Private Sub ucrChkLegend_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkLegend.ControlValueChanged, ucrInputLegendPosition.ControlValueChanged + AddRemoveTheme() + End Sub + Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click, toolStripMenuItemPlotOptions.Click sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewYScalecontinuousFunction:=clsYScaleContinuousFunction, clsNewXScalecontinuousFunction:=clsXScaleContinuousFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, - clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, ucrNewBaseSelector:=ucrSelectorBoxPlot, + clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, ucrNewBaseSelector:=ucrSelectorBoxPlot, clsNewFacetVariablesOperator:=clsFacetVariablesOperator, clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, clsNewXScaleDateFunction:=clsXScaleDateFunction, clsNewAnnotateFunction:=clsAnnotateFunction, clsNewScaleFillViridisFunction:=clsScaleFillViridisFunction, clsNewScaleColourViridisFunction:=clsScaleColourViridisFunction, clsNewYScaleDateFunction:=clsYScaleDateFunction, strMainDialogGeomParameterNames:=strGeomParameterNames, bReset:=bResetSubdialog) @@ -442,9 +525,9 @@ Public Class dlgBoxplot Private Sub DialogueSize() If rdoBoxplotTufte.Checked OrElse rdoViolin.Checked Then - Me.Size = New Size(441, 505) - Me.ucrSaveBoxplot.Location = New Point(10, 384) - Me.ucrBase.Location = New Point(10, 413) + Me.Size = New Size(441, 536) + Me.ucrSaveBoxplot.Location = New Point(10, 418) + Me.ucrBase.Location = New Point(10, 442) Else Me.Size = New Size(441, 479) Me.ucrSaveBoxplot.Location = New Point(10, 356) @@ -452,6 +535,167 @@ Public Class dlgBoxplot End If End Sub + Private Sub AutoFacetStation() + Dim ucrCurrentReceiver As ucrReceiver = Nothing + + If ucrSelectorBoxPlot.CurrentReceiver IsNot Nothing Then + ucrCurrentReceiver = ucrSelectorBoxPlot.CurrentReceiver + End If + ucr1stFactorReceiver.AddItemsWithMetadataProperty(ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text, "Climatic_Type", {"station_label"}) + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + AddRemoveGroupBy() + End Sub + + Private Sub ucrInput_ControlValueChanged(ucrChangedControl As ucrInputComboBox) Handles ucrInputStation.ControlValueChanged + If Not bUpdateComboOptions Then + Exit Sub + End If + Dim strChangedText As String = ucrChangedControl.GetText() + If strChangedText <> strNone Then + If Not strChangedText = strFacetCol AndAlso Not strChangedText = strFacetRow AndAlso + Not ucrInputStation.Equals(ucrChangedControl) AndAlso ucrInputStation.GetText() = strChangedText Then + bUpdateComboOptions = False + ucrInputStation.SetName(strNone) + bUpdateComboOptions = True + End If + If (strChangedText = strFacetWrap AndAlso ucrInputStation.GetText = strFacetRow) OrElse (strChangedText = strFacetRow AndAlso + ucrInputStation.GetText = strFacetWrap) OrElse (strChangedText = strFacetWrap AndAlso + ucrInputStation.GetText = strFacetCol) OrElse (strChangedText = strFacetCol AndAlso ucrInputStation.GetText = strFacetWrap) Then + ucrInputStation.SetName(strNone) + End If + End If + UpdateParameters() + AddRemoveFacets() + AddRemoveGroupBy() + End Sub + + Private Sub UpdateParameters() + clsFacetVariablesOperator.RemoveParameterByName("var1") + clsFacetColOp.RemoveParameterByName("col" & ucrInputStation.Name) + clsFacetRowOp.RemoveParameterByName("row" & ucrInputStation.Name) + + clsBaseOperator.RemoveParameterByName("facets") + bUpdatingParameters = True + ucr1stFactorReceiver.SetRCode(Nothing) + Select Case ucrInputStation.GetText() + Case strFacetWrap + ucr1stFactorReceiver.ChangeParameterName("var1") + ucr1stFactorReceiver.SetRCode(clsFacetVariablesOperator) + Case strFacetCol + ucr1stFactorReceiver.ChangeParameterName("col" & ucrInputStation.Name) + ucr1stFactorReceiver.SetRCode(clsFacetColOp) + Case strFacetRow + ucr1stFactorReceiver.ChangeParameterName("row" & ucrInputStation.Name) + ucr1stFactorReceiver.SetRCode(clsFacetRowOp) + End Select + If Not clsRaesFunction.ContainsParameter("x") Then + clsRaesFunction.AddParameter("x", Chr(34) & Chr(34)) + End If + bUpdatingParameters = False + End Sub + + Private Sub AddRemoveFacets() + Dim bWrap As Boolean = False + Dim bCol As Boolean = False + Dim bRow As Boolean = False + + If bUpdatingParameters Then + Exit Sub + End If + + clsBaseOperator.RemoveParameterByName("facets") + If Not ucr1stFactorReceiver.IsEmpty Then + Select Case ucrInputStation.GetText() + Case strFacetWrap + bWrap = True + Case strFacetCol + bCol = True + Case strFacetRow + bRow = True + End Select + End If + + If bWrap OrElse bRow OrElse bCol Then + clsBaseOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction) + End If + If bWrap Then + clsFacetFunction.SetRCommand("facet_wrap") + End If + If bRow OrElse bCol Then + clsFacetFunction.SetRCommand("facet_grid") + End If + If bRow Then + clsFacetVariablesOperator.AddParameter("left", clsROperatorParameter:=clsFacetRowOp, iPosition:=0) + ElseIf bCol AndAlso bWrap = False Then + clsFacetVariablesOperator.AddParameter("left", ".", iPosition:=0) + Else + clsFacetVariablesOperator.RemoveParameterByName("left") + End If + If bCol Then + clsFacetVariablesOperator.AddParameter("right", clsROperatorParameter:=clsFacetColOp, iPosition:=1) + ElseIf bRow AndAlso bWrap = False Then + clsFacetVariablesOperator.AddParameter("right", ".", iPosition:=1) + Else + clsFacetVariablesOperator.RemoveParameterByName("right") + End If + End Sub + + Private Sub ucr1stFactorReceiver_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucr1stFactorReceiver.ControlValueChanged, ucrByFactorsReceiver.ControlValueChanged + AddRemoveFacets() + AddRemoveGroupBy() + End Sub + + Private Sub GetParameterValue(clsOperator As ROperator) + Dim i As Integer = 0 + For Each clsTempParam As RParameter In clsOperator.clsParameters + If clsTempParam.strArgumentValue <> "" AndAlso clsTempParam.strArgumentValue <> "." Then + clsGroupByFunction.AddParameter(i, clsTempParam.strArgumentValue, bIncludeArgumentName:=False, iPosition:=i) + i = i + 1 + End If + Next + End Sub + + Private Sub AddRemoveGroupBy() + If clsPipeOperator.ContainsParameter("mutate") Then + clsGroupByFunction.ClearParameters() + If clsBaseOperator.ContainsParameter("facets") Then + Select Case ucrInputStation.GetText() + Case strFacetWrap + GetParameterValue(clsFacetVariablesOperator) + Case strFacetCol + GetParameterValue(clsFacetColOp) + Case strFacetRow + GetParameterValue(clsFacetRowOp) + End Select + End If + + If clsGroupByFunction.iParameterCount > 0 Then + clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=1) + Else + clsPipeOperator.RemoveParameterByName("group_by") + End If + Else + clsPipeOperator.RemoveParameterByName("group_by") + End If + + SetPipeAssignTo() + End Sub + + Private Sub SetPipeAssignTo() + If ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso clsPipeOperator.clsParameters.Count > 1 Then + clsPipeOperator.SetAssignTo(ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + Else + clsPipeOperator.RemoveAssignTo() + End If + End Sub + + Private Sub ucrSelectorBoxPlot_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorBoxPlot.ControlValueChanged + AutoFacetStation() + SetPipeAssignTo() + End Sub + Private Sub ucrSaveBoxplot_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveBoxplot.ControlContentsChanged, ucrVariablesAsFactorForBoxplot.ControlContentsChanged TestOkEnabled() End Sub From cd1b6c7626550e44943223e5c9c3ca55b86aba27 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:00:45 +0100 Subject: [PATCH 54/57] Code changes --- instat/ucrScript.vb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/instat/ucrScript.vb b/instat/ucrScript.vb index 56fcbf581cd..94ee428fca8 100644 --- a/instat/ucrScript.vb +++ b/instat/ucrScript.vb @@ -196,10 +196,6 @@ Public Class ucrScript End If End Sub - Private Function SelectedTab() As String - Return TabControl.SelectedTab.Text - End Function - ''' ''' Displays a file save dialog; allows the user to specify a folder and file name; and saves ''' the log/script to the specified file. @@ -218,7 +214,7 @@ Public Class ucrScript Using dlgSave As New SaveFileDialog dlgSave.Title = "Save " & If(bIsLog, "Log", "Script") & " To File" dlgSave.Filter = "R Script File (*.R)|*.R|Text File (*.txt)|*.txt" - dlgSave.FileName = Path.GetFileName(SelectedTab) + dlgSave.FileName = Path.GetFileName(TabControl.SelectedTab.Text) 'Ensure that dialog opens in correct folder. 'In theory, we should be able to use `dlgLoad.RestoreDirectory = True` but this does From 52246de1e5164e31827418f4409050f28e317979 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 26 Jan 2024 11:16:57 +0300 Subject: [PATCH 55/57] changes to the code --- instat/dlgBoxPlot.vb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb index a06ba3c9526..302b50919dc 100644 --- a/instat/dlgBoxPlot.vb +++ b/instat/dlgBoxPlot.vb @@ -112,7 +112,7 @@ Public Class dlgBoxplot ucrPnlPlots.AddFunctionNamesCondition(rdoJitter, "geom_jitter") ucrPnlPlots.AddFunctionNamesCondition(rdoViolin, "geom_violin") ucrPnlPlots.AddToLinkedControls(ucrChkAddPoints, {rdoBoxplotTufte, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlPlots.AddToLinkedControls({ucrChkTufte, ucrChkLegend, ucrInputStation, ucr1stFactorReceiver}, {rdoBoxplotTufte}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlPlots.AddToLinkedControls({ucrChkTufte}, {rdoBoxplotTufte}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTufte.AddToLinkedControls(ucrChkVarWidth, {"FALSE"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrSelectorBoxPlot.SetParameter(New RParameter("data", 0)) @@ -526,12 +526,22 @@ Public Class dlgBoxplot Private Sub DialogueSize() If rdoBoxplotTufte.Checked OrElse rdoViolin.Checked Then Me.Size = New Size(441, 536) + Me.ucrChkLegend.Location = New Size(10, 388) + Me.ucrInputLegendPosition.Location = New Size(105, 390) + Me.ucrInputStation.Location = New Size(335, 390) + Me.ucr1stFactorReceiver.Location = New Size(222, 391) + Me.lblFacetBy.Location = New Size(222, 376) Me.ucrSaveBoxplot.Location = New Point(10, 418) Me.ucrBase.Location = New Point(10, 442) Else - Me.Size = New Size(441, 479) - Me.ucrSaveBoxplot.Location = New Point(10, 356) - Me.ucrBase.Location = New Point(10, 384) + Me.Size = New Size(441, 500) + Me.ucrChkLegend.Location = New Size(10, 358) + Me.ucrInputLegendPosition.Location = New Size(105, 360) + Me.ucrInputStation.Location = New Size(335, 360) + Me.ucr1stFactorReceiver.Location = New Size(222, 361) + Me.lblFacetBy.Location = New Size(222, 346) + Me.ucrSaveBoxplot.Location = New Point(10, 390) + Me.ucrBase.Location = New Point(10, 415) End If End Sub From ca53d2b580d17fc563031085fd18d3f5bc5e90b1 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Mon, 29 Jan 2024 10:33:52 +0100 Subject: [PATCH 56/57] Small change made. --- instat/dlgEndOfRainsSeason.vb | 2 -- instat/dlgTransformClimatic.vb | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/dlgEndOfRainsSeason.vb b/instat/dlgEndOfRainsSeason.vb index 6c9a4e03f3f..f4685299ee9 100644 --- a/instat/dlgEndOfRainsSeason.vb +++ b/instat/dlgEndOfRainsSeason.vb @@ -300,11 +300,9 @@ Public Class dlgEndOfRainsSeason ucrChkWB.SetParameter(New RParameter("WB_evap")) ucrChkWB.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkWB.SetText("Reducing") - 'ucrChkWB.SetLinkedDisplayControl(ucrNudWB) ucrNudWB.SetParameter(New RParameter("WB_evap_value")) ucrNudWB.SetMinMax(0, 1) - 'ucrNudWB.DecimalPlaces = 0.01 ucrNudWB.Increment = 0.01 ucrNudWB.DecimalPlaces = 2 diff --git a/instat/dlgTransformClimatic.vb b/instat/dlgTransformClimatic.vb index 54f8333ae37..d4b2ae83e7f 100644 --- a/instat/dlgTransformClimatic.vb +++ b/instat/dlgTransformClimatic.vb @@ -505,6 +505,8 @@ Public Class dlgTransformClimatic clsWBOperator.bSpaceAroundOperation = True clsWBOperator.bBrackets = False + clsReduceOpEvapValue.SetOperation("-") + clsWBEvaporation.SetRCommand("WB_evaporation") clsWBEvaporation.AddParameter("water_balance", "x", iPosition:=0, bIncludeArgumentName:=False) clsWBEvaporation.AddParameter("WB_evap_value", 0.5, iPosition:=1, bIncludeArgumentName:=False) @@ -1095,6 +1097,7 @@ Public Class dlgTransformClimatic Private Sub ReduceWaterBalance() If rdoWaterBalance.Checked Then If rdoEvapValue.Checked Then + clsRTransform.RemoveParameterByName("calculated_from") ucrReceiverData.SetMeAsReceiver() clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ")") If ucrChkWB.Checked Then @@ -1112,7 +1115,6 @@ Public Class dlgTransformClimatic ElseIf rdoEvapVariable.Checked Then ucrReceiverEvap.SetMeAsReceiver() clsRTransform.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverData.GetVariableNames & ", " & strCurrDataName & "=" & ucrReceiverEvap.GetVariableNames & ")") - clsReduceOpEvapValue.SetOperation("-") clsRWaterBalanceFunction.AddParameter("replace_na", clsROperatorParameter:=clsReduceOpEvapValue, iPosition:=1, bIncludeArgumentName:=False) clsPMaxOperatorMax.RemoveParameterByName("evaporation.value") End If From 39b8b150da3c6fcf6ecbb6dcba72fd024ad0df73 Mon Sep 17 00:00:00 2001 From: Sophie Malla Tatchum Date: Wed, 31 Jan 2024 09:58:51 +0100 Subject: [PATCH 57/57] Change Made On the Design --- instat/DlgDefineClimaticData.Designer.vb | 684 +++++++++++------------ 1 file changed, 342 insertions(+), 342 deletions(-) diff --git a/instat/DlgDefineClimaticData.Designer.vb b/instat/DlgDefineClimaticData.Designer.vb index bfa0558f912..d50f0fef080 100644 --- a/instat/DlgDefineClimaticData.Designer.vb +++ b/instat/DlgDefineClimaticData.Designer.vb @@ -45,55 +45,55 @@ Partial Class DlgDefineClimaticData Me.lblLatitude = New System.Windows.Forms.Label() Me.lblAltitude = New System.Windows.Forms.Label() Me.grpStation = New System.Windows.Forms.GroupBox() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverAltitude = New instat.ucrReceiverSingle() Me.grpDateTime = New System.Windows.Forms.GroupBox() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() Me.lblDate = New System.Windows.Forms.Label() Me.lblMonth = New System.Windows.Forms.Label() + Me.ucrReceiverDOY = New instat.ucrReceiverSingle() Me.lblYear = New System.Windows.Forms.Label() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() + Me.ucrReceiverDay = New instat.ucrReceiverSingle() Me.lblDay = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.grpMeta = New System.Windows.Forms.GroupBox() + Me.ucrReceiverStationMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverLonMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverLatMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverAltMeta = New instat.ucrReceiverSingle() Me.lblRain = New System.Windows.Forms.Label() Me.grpElements = New System.Windows.Forms.GroupBox() + Me.ucrReceiverMaxRH = New instat.ucrReceiverSingle() Me.lblMaxRH = New System.Windows.Forms.Label() + Me.ucrReceiverMinRH = New instat.ucrReceiverSingle() Me.lblMinimumRH = New System.Windows.Forms.Label() + Me.ucrReceiverWindDirection = New instat.ucrReceiverSingle() + Me.ucrReceiverRain = New instat.ucrReceiverSingle() + Me.ucrReceiverSunshine = New instat.ucrReceiverSingle() + Me.ucrReceiverRadiation = New instat.ucrReceiverSingle() + Me.ucrReceiverMaxTemp = New instat.ucrReceiverSingle() + Me.ucrReceiverCloudCover = New instat.ucrReceiverSingle() Me.lblMaxTemp = New System.Windows.Forms.Label() Me.lblCloudCover = New System.Windows.Forms.Label() Me.lblMinTemp = New System.Windows.Forms.Label() Me.lblRadiation = New System.Windows.Forms.Label() + Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() Me.lblSunshine = New System.Windows.Forms.Label() + Me.ucrReceiverMinTemp = New instat.ucrReceiverSingle() Me.lblWindSpeed = New System.Windows.Forms.Label() Me.lblWindDirection = New System.Windows.Forms.Label() Me.ucrChkLinkedMetaData = New instat.ucrCheck() Me.ucrSelectorLinkedDataFrame = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrInputCheckInput = New instat.ucrInputTextBox() Me.ucrSelectorDefineClimaticData = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() - Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() - Me.ucrReceiverAltitude = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverYear = New instat.ucrReceiverSingle() - Me.ucrReceiverDOY = New instat.ucrReceiverSingle() - Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrReceiverMonth = New instat.ucrReceiverSingle() - Me.ucrReceiverDay = New instat.ucrReceiverSingle() - Me.ucrReceiverMaxRH = New instat.ucrReceiverSingle() - Me.ucrReceiverMinRH = New instat.ucrReceiverSingle() - Me.ucrReceiverWindDirection = New instat.ucrReceiverSingle() - Me.ucrReceiverRain = New instat.ucrReceiverSingle() - Me.ucrReceiverSunshine = New instat.ucrReceiverSingle() - Me.ucrReceiverRadiation = New instat.ucrReceiverSingle() - Me.ucrReceiverMaxTemp = New instat.ucrReceiverSingle() - Me.ucrReceiverCloudCover = New instat.ucrReceiverSingle() - Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() - Me.ucrReceiverMinTemp = New instat.ucrReceiverSingle() - Me.ucrReceiverStationMeta = New instat.ucrReceiverSingle() - Me.ucrReceiverLonMeta = New instat.ucrReceiverSingle() - Me.ucrReceiverLatMeta = New instat.ucrReceiverSingle() - Me.ucrReceiverAltMeta = New instat.ucrReceiverSingle() Me.grpStation.SuspendLayout() Me.grpDateTime.SuspendLayout() Me.grpMeta.SuspendLayout() @@ -178,6 +178,58 @@ Partial Class DlgDefineClimaticData Me.grpStation.Tag = "" Me.grpStation.Text = "Station" ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(10, 29) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 6 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverLongitude + ' + Me.ucrReceiverLongitude.AutoSize = True + Me.ucrReceiverLongitude.frmParent = Me + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(10, 106) + Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" + Me.ucrReceiverLongitude.Selector = Nothing + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverLongitude.strNcFilePath = "" + Me.ucrReceiverLongitude.TabIndex = 8 + Me.ucrReceiverLongitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(10, 68) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 7 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverAltitude + ' + Me.ucrReceiverAltitude.AutoSize = True + Me.ucrReceiverAltitude.frmParent = Me + Me.ucrReceiverAltitude.Location = New System.Drawing.Point(10, 145) + Me.ucrReceiverAltitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltitude.Name = "ucrReceiverAltitude" + Me.ucrReceiverAltitude.Selector = Nothing + Me.ucrReceiverAltitude.Size = New System.Drawing.Size(100, 20) + Me.ucrReceiverAltitude.strNcFilePath = "" + Me.ucrReceiverAltitude.TabIndex = 9 + Me.ucrReceiverAltitude.ucrSelector = Nothing + ' 'grpDateTime ' Me.grpDateTime.Controls.Add(Me.lblDOY) @@ -198,6 +250,19 @@ Partial Class DlgDefineClimaticData Me.grpDateTime.Tag = "" Me.grpDateTime.Text = "Date and Time" ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.AutoSize = True + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Location = New System.Drawing.Point(12, 62) + Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.TabIndex = 2 + Me.ucrReceiverYear.ucrSelector = Nothing + ' 'lblDate ' Me.lblDate.AutoSize = True @@ -218,6 +283,19 @@ Partial Class DlgDefineClimaticData Me.lblMonth.TabIndex = 4 Me.lblMonth.Text = "Month:" ' + 'ucrReceiverDOY + ' + Me.ucrReceiverDOY.AutoSize = True + Me.ucrReceiverDOY.frmParent = Me + Me.ucrReceiverDOY.Location = New System.Drawing.Point(12, 170) + Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDOY.Name = "ucrReceiverDOY" + Me.ucrReceiverDOY.Selector = Nothing + Me.ucrReceiverDOY.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDOY.strNcFilePath = "" + Me.ucrReceiverDOY.TabIndex = 5 + Me.ucrReceiverDOY.ucrSelector = Nothing + ' 'lblYear ' Me.lblYear.AutoSize = True @@ -228,6 +306,45 @@ Partial Class DlgDefineClimaticData Me.lblYear.TabIndex = 2 Me.lblYear.Text = "Year:" ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.AutoSize = True + Me.ucrReceiverDate.frmParent = Me + Me.ucrReceiverDate.Location = New System.Drawing.Point(12, 26) + Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDate.strNcFilePath = "" + Me.ucrReceiverDate.TabIndex = 1 + Me.ucrReceiverDate.ucrSelector = Nothing + ' + 'ucrReceiverMonth + ' + Me.ucrReceiverMonth.AutoSize = True + Me.ucrReceiverMonth.frmParent = Me + Me.ucrReceiverMonth.Location = New System.Drawing.Point(12, 98) + Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMonth.Name = "ucrReceiverMonth" + Me.ucrReceiverMonth.Selector = Nothing + Me.ucrReceiverMonth.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverMonth.strNcFilePath = "" + Me.ucrReceiverMonth.TabIndex = 3 + Me.ucrReceiverMonth.ucrSelector = Nothing + ' + 'ucrReceiverDay + ' + Me.ucrReceiverDay.AutoSize = True + Me.ucrReceiverDay.frmParent = Me + Me.ucrReceiverDay.Location = New System.Drawing.Point(12, 133) + Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDay.Name = "ucrReceiverDay" + Me.ucrReceiverDay.Selector = Nothing + Me.ucrReceiverDay.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDay.strNcFilePath = "" + Me.ucrReceiverDay.TabIndex = 4 + Me.ucrReceiverDay.ucrSelector = Nothing + ' 'lblDay ' Me.lblDay.AutoSize = True @@ -296,6 +413,58 @@ Partial Class DlgDefineClimaticData Me.grpMeta.Tag = "" Me.grpMeta.Text = "Station" ' + 'ucrReceiverStationMeta + ' + Me.ucrReceiverStationMeta.AutoSize = True + Me.ucrReceiverStationMeta.frmParent = Me + Me.ucrReceiverStationMeta.Location = New System.Drawing.Point(11, 31) + Me.ucrReceiverStationMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationMeta.Name = "ucrReceiverStationMeta" + Me.ucrReceiverStationMeta.Selector = Nothing + Me.ucrReceiverStationMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverStationMeta.strNcFilePath = "" + Me.ucrReceiverStationMeta.TabIndex = 8 + Me.ucrReceiverStationMeta.ucrSelector = Nothing + ' + 'ucrReceiverLonMeta + ' + Me.ucrReceiverLonMeta.AutoSize = True + Me.ucrReceiverLonMeta.frmParent = Me + Me.ucrReceiverLonMeta.Location = New System.Drawing.Point(9, 108) + Me.ucrReceiverLonMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLonMeta.Name = "ucrReceiverLonMeta" + Me.ucrReceiverLonMeta.Selector = Nothing + Me.ucrReceiverLonMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLonMeta.strNcFilePath = "" + Me.ucrReceiverLonMeta.TabIndex = 10 + Me.ucrReceiverLonMeta.ucrSelector = Nothing + ' + 'ucrReceiverLatMeta + ' + Me.ucrReceiverLatMeta.AutoSize = True + Me.ucrReceiverLatMeta.frmParent = Me + Me.ucrReceiverLatMeta.Location = New System.Drawing.Point(9, 70) + Me.ucrReceiverLatMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatMeta.Name = "ucrReceiverLatMeta" + Me.ucrReceiverLatMeta.Selector = Nothing + Me.ucrReceiverLatMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLatMeta.strNcFilePath = "" + Me.ucrReceiverLatMeta.TabIndex = 9 + Me.ucrReceiverLatMeta.ucrSelector = Nothing + ' + 'ucrReceiverAltMeta + ' + Me.ucrReceiverAltMeta.AutoSize = True + Me.ucrReceiverAltMeta.frmParent = Me + Me.ucrReceiverAltMeta.Location = New System.Drawing.Point(9, 147) + Me.ucrReceiverAltMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltMeta.Name = "ucrReceiverAltMeta" + Me.ucrReceiverAltMeta.Selector = Nothing + Me.ucrReceiverAltMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverAltMeta.strNcFilePath = "" + Me.ucrReceiverAltMeta.TabIndex = 11 + Me.ucrReceiverAltMeta.ucrSelector = Nothing + ' 'lblRain ' Me.lblRain.AutoSize = True @@ -335,6 +504,19 @@ Partial Class DlgDefineClimaticData Me.grpElements.TabStop = False Me.grpElements.Text = "Elements" ' + 'ucrReceiverMaxRH + ' + Me.ucrReceiverMaxRH.AutoSize = True + Me.ucrReceiverMaxRH.frmParent = Me + Me.ucrReceiverMaxRH.Location = New System.Drawing.Point(18, 366) + Me.ucrReceiverMaxRH.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMaxRH.Name = "ucrReceiverMaxRH" + Me.ucrReceiverMaxRH.Selector = Nothing + Me.ucrReceiverMaxRH.Size = New System.Drawing.Size(116, 20) + Me.ucrReceiverMaxRH.strNcFilePath = "" + Me.ucrReceiverMaxRH.TabIndex = 19 + Me.ucrReceiverMaxRH.ucrSelector = Nothing + ' 'lblMaxRH ' Me.lblMaxRH.AutoSize = True @@ -345,6 +527,19 @@ Partial Class DlgDefineClimaticData Me.lblMaxRH.TabIndex = 18 Me.lblMaxRH.Text = "Maximum RH (%):" ' + 'ucrReceiverMinRH + ' + Me.ucrReceiverMinRH.AutoSize = True + Me.ucrReceiverMinRH.frmParent = Me + Me.ucrReceiverMinRH.Location = New System.Drawing.Point(18, 330) + Me.ucrReceiverMinRH.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMinRH.Name = "ucrReceiverMinRH" + Me.ucrReceiverMinRH.Selector = Nothing + Me.ucrReceiverMinRH.Size = New System.Drawing.Size(116, 20) + Me.ucrReceiverMinRH.strNcFilePath = "" + Me.ucrReceiverMinRH.TabIndex = 18 + Me.ucrReceiverMinRH.ucrSelector = Nothing + ' 'lblMinimumRH ' Me.lblMinimumRH.AutoSize = True @@ -355,31 +550,109 @@ Partial Class DlgDefineClimaticData Me.lblMinimumRH.TabIndex = 16 Me.lblMinimumRH.Text = "Minimum RH (%):" ' - 'lblMaxTemp + 'ucrReceiverWindDirection ' - Me.lblMaxTemp.AutoSize = True - Me.lblMaxTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxTemp.Location = New System.Drawing.Point(15, 88) - Me.lblMaxTemp.Name = "lblMaxTemp" - Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) - Me.lblMaxTemp.TabIndex = 4 - Me.lblMaxTemp.Text = "Maximum Temperature:" + Me.ucrReceiverWindDirection.AutoSize = True + Me.ucrReceiverWindDirection.frmParent = Me + Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(18, 177) + Me.ucrReceiverWindDirection.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverWindDirection.Name = "ucrReceiverWindDirection" + Me.ucrReceiverWindDirection.Selector = Nothing + Me.ucrReceiverWindDirection.Size = New System.Drawing.Size(111, 20) + Me.ucrReceiverWindDirection.strNcFilePath = "" + Me.ucrReceiverWindDirection.TabIndex = 14 + Me.ucrReceiverWindDirection.ucrSelector = Nothing ' - 'lblCloudCover + 'ucrReceiverRain ' - Me.lblCloudCover.AutoSize = True - Me.lblCloudCover.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblCloudCover.Location = New System.Drawing.Point(15, 277) - Me.lblCloudCover.Name = "lblCloudCover" - Me.lblCloudCover.Size = New System.Drawing.Size(68, 13) - Me.lblCloudCover.TabIndex = 14 - Me.lblCloudCover.Text = "Cloud Cover:" + Me.ucrReceiverRain.AutoSize = True + Me.ucrReceiverRain.frmParent = Me + Me.ucrReceiverRain.Location = New System.Drawing.Point(18, 30) + Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverRain.Name = "ucrReceiverRain" + Me.ucrReceiverRain.Selector = Nothing + Me.ucrReceiverRain.Size = New System.Drawing.Size(111, 20) + Me.ucrReceiverRain.strNcFilePath = "" + Me.ucrReceiverRain.TabIndex = 10 + Me.ucrReceiverRain.ucrSelector = Nothing ' - 'lblMinTemp + 'ucrReceiverSunshine ' - Me.lblMinTemp.AutoSize = True - Me.lblMinTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMinTemp.Location = New System.Drawing.Point(15, 51) + Me.ucrReceiverSunshine.AutoSize = True + Me.ucrReceiverSunshine.frmParent = Me + Me.ucrReceiverSunshine.Location = New System.Drawing.Point(18, 215) + Me.ucrReceiverSunshine.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSunshine.Name = "ucrReceiverSunshine" + Me.ucrReceiverSunshine.Selector = Nothing + Me.ucrReceiverSunshine.Size = New System.Drawing.Size(116, 20) + Me.ucrReceiverSunshine.strNcFilePath = "" + Me.ucrReceiverSunshine.TabIndex = 15 + Me.ucrReceiverSunshine.ucrSelector = Nothing + ' + 'ucrReceiverRadiation + ' + Me.ucrReceiverRadiation.AutoSize = True + Me.ucrReceiverRadiation.frmParent = Me + Me.ucrReceiverRadiation.Location = New System.Drawing.Point(18, 254) + Me.ucrReceiverRadiation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverRadiation.Name = "ucrReceiverRadiation" + Me.ucrReceiverRadiation.Selector = Nothing + Me.ucrReceiverRadiation.Size = New System.Drawing.Size(116, 20) + Me.ucrReceiverRadiation.strNcFilePath = "" + Me.ucrReceiverRadiation.TabIndex = 16 + Me.ucrReceiverRadiation.ucrSelector = Nothing + ' + 'ucrReceiverMaxTemp + ' + Me.ucrReceiverMaxTemp.AutoSize = True + Me.ucrReceiverMaxTemp.frmParent = Me + Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(18, 103) + Me.ucrReceiverMaxTemp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMaxTemp.Name = "ucrReceiverMaxTemp" + Me.ucrReceiverMaxTemp.Selector = Nothing + Me.ucrReceiverMaxTemp.Size = New System.Drawing.Size(111, 20) + Me.ucrReceiverMaxTemp.strNcFilePath = "" + Me.ucrReceiverMaxTemp.TabIndex = 12 + Me.ucrReceiverMaxTemp.ucrSelector = Nothing + ' + 'ucrReceiverCloudCover + ' + Me.ucrReceiverCloudCover.AutoSize = True + Me.ucrReceiverCloudCover.frmParent = Me + Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(18, 292) + Me.ucrReceiverCloudCover.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverCloudCover.Name = "ucrReceiverCloudCover" + Me.ucrReceiverCloudCover.Selector = Nothing + Me.ucrReceiverCloudCover.Size = New System.Drawing.Size(116, 20) + Me.ucrReceiverCloudCover.strNcFilePath = "" + Me.ucrReceiverCloudCover.TabIndex = 17 + Me.ucrReceiverCloudCover.ucrSelector = Nothing + ' + 'lblMaxTemp + ' + Me.lblMaxTemp.AutoSize = True + Me.lblMaxTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMaxTemp.Location = New System.Drawing.Point(15, 88) + Me.lblMaxTemp.Name = "lblMaxTemp" + Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) + Me.lblMaxTemp.TabIndex = 4 + Me.lblMaxTemp.Text = "Maximum Temperature:" + ' + 'lblCloudCover + ' + Me.lblCloudCover.AutoSize = True + Me.lblCloudCover.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblCloudCover.Location = New System.Drawing.Point(15, 277) + Me.lblCloudCover.Name = "lblCloudCover" + Me.lblCloudCover.Size = New System.Drawing.Size(68, 13) + Me.lblCloudCover.TabIndex = 14 + Me.lblCloudCover.Text = "Cloud Cover:" + ' + 'lblMinTemp + ' + Me.lblMinTemp.AutoSize = True + Me.lblMinTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMinTemp.Location = New System.Drawing.Point(15, 51) Me.lblMinTemp.Name = "lblMinTemp" Me.lblMinTemp.Size = New System.Drawing.Size(114, 13) Me.lblMinTemp.TabIndex = 2 @@ -395,6 +668,19 @@ Partial Class DlgDefineClimaticData Me.lblRadiation.TabIndex = 12 Me.lblRadiation.Text = "Radiation:" ' + 'ucrReceiverWindSpeed + ' + Me.ucrReceiverWindSpeed.AutoSize = True + Me.ucrReceiverWindSpeed.frmParent = Me + Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(18, 140) + Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" + Me.ucrReceiverWindSpeed.Selector = Nothing + Me.ucrReceiverWindSpeed.Size = New System.Drawing.Size(111, 20) + Me.ucrReceiverWindSpeed.strNcFilePath = "" + Me.ucrReceiverWindSpeed.TabIndex = 13 + Me.ucrReceiverWindSpeed.ucrSelector = Nothing + ' 'lblSunshine ' Me.lblSunshine.AutoSize = True @@ -405,6 +691,19 @@ Partial Class DlgDefineClimaticData Me.lblSunshine.TabIndex = 10 Me.lblSunshine.Text = "Sunshine Hours:" ' + 'ucrReceiverMinTemp + ' + Me.ucrReceiverMinTemp.AutoSize = True + Me.ucrReceiverMinTemp.frmParent = Me + Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(18, 66) + Me.ucrReceiverMinTemp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMinTemp.Name = "ucrReceiverMinTemp" + Me.ucrReceiverMinTemp.Selector = Nothing + Me.ucrReceiverMinTemp.Size = New System.Drawing.Size(111, 20) + Me.ucrReceiverMinTemp.strNcFilePath = "" + Me.ucrReceiverMinTemp.TabIndex = 11 + Me.ucrReceiverMinTemp.ucrSelector = Nothing + ' 'lblWindSpeed ' Me.lblWindSpeed.AutoSize = True @@ -471,58 +770,6 @@ Partial Class DlgDefineClimaticData Me.ucrSelectorDefineClimaticData.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorDefineClimaticData.TabIndex = 13 ' - 'ucrReceiverStation - ' - Me.ucrReceiverStation.AutoSize = True - Me.ucrReceiverStation.frmParent = Nothing - Me.ucrReceiverStation.Location = New System.Drawing.Point(10, 29) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(100, 20) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 8 - Me.ucrReceiverStation.ucrSelector = Nothing - ' - 'ucrReceiverLongitude - ' - Me.ucrReceiverLongitude.AutoSize = True - Me.ucrReceiverLongitude.frmParent = Nothing - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(10, 106) - Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" - Me.ucrReceiverLongitude.Selector = Nothing - Me.ucrReceiverLongitude.Size = New System.Drawing.Size(100, 20) - Me.ucrReceiverLongitude.strNcFilePath = "" - Me.ucrReceiverLongitude.TabIndex = 10 - Me.ucrReceiverLongitude.ucrSelector = Nothing - ' - 'ucrReceiverLatitude - ' - Me.ucrReceiverLatitude.AutoSize = True - Me.ucrReceiverLatitude.frmParent = Nothing - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(10, 68) - Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" - Me.ucrReceiverLatitude.Selector = Nothing - Me.ucrReceiverLatitude.Size = New System.Drawing.Size(100, 20) - Me.ucrReceiverLatitude.strNcFilePath = "" - Me.ucrReceiverLatitude.TabIndex = 9 - Me.ucrReceiverLatitude.ucrSelector = Nothing - ' - 'ucrReceiverAltitude - ' - Me.ucrReceiverAltitude.AutoSize = True - Me.ucrReceiverAltitude.frmParent = Nothing - Me.ucrReceiverAltitude.Location = New System.Drawing.Point(10, 145) - Me.ucrReceiverAltitude.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverAltitude.Name = "ucrReceiverAltitude" - Me.ucrReceiverAltitude.Selector = Nothing - Me.ucrReceiverAltitude.Size = New System.Drawing.Size(100, 20) - Me.ucrReceiverAltitude.strNcFilePath = "" - Me.ucrReceiverAltitude.TabIndex = 11 - Me.ucrReceiverAltitude.ucrSelector = Nothing - ' 'ucrBase ' Me.ucrBase.AutoSize = True @@ -533,253 +780,6 @@ Partial Class DlgDefineClimaticData Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 19 ' - 'ucrReceiverYear - ' - Me.ucrReceiverYear.AutoSize = True - Me.ucrReceiverYear.frmParent = Nothing - Me.ucrReceiverYear.Location = New System.Drawing.Point(12, 62) - Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverYear.Name = "ucrReceiverYear" - Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 3 - Me.ucrReceiverYear.ucrSelector = Nothing - ' - 'ucrReceiverDOY - ' - Me.ucrReceiverDOY.AutoSize = True - Me.ucrReceiverDOY.frmParent = Nothing - Me.ucrReceiverDOY.Location = New System.Drawing.Point(12, 170) - Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDOY.Name = "ucrReceiverDOY" - Me.ucrReceiverDOY.Selector = Nothing - Me.ucrReceiverDOY.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverDOY.strNcFilePath = "" - Me.ucrReceiverDOY.TabIndex = 9 - Me.ucrReceiverDOY.ucrSelector = Nothing - ' - 'ucrReceiverDate - ' - Me.ucrReceiverDate.AutoSize = True - Me.ucrReceiverDate.frmParent = Nothing - Me.ucrReceiverDate.Location = New System.Drawing.Point(12, 26) - Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDate.Name = "ucrReceiverDate" - Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverDate.strNcFilePath = "" - Me.ucrReceiverDate.TabIndex = 1 - Me.ucrReceiverDate.ucrSelector = Nothing - ' - 'ucrReceiverMonth - ' - Me.ucrReceiverMonth.AutoSize = True - Me.ucrReceiverMonth.frmParent = Nothing - Me.ucrReceiverMonth.Location = New System.Drawing.Point(12, 98) - Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMonth.Name = "ucrReceiverMonth" - Me.ucrReceiverMonth.Selector = Nothing - Me.ucrReceiverMonth.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverMonth.strNcFilePath = "" - Me.ucrReceiverMonth.TabIndex = 5 - Me.ucrReceiverMonth.ucrSelector = Nothing - ' - 'ucrReceiverDay - ' - Me.ucrReceiverDay.AutoSize = True - Me.ucrReceiverDay.frmParent = Nothing - Me.ucrReceiverDay.Location = New System.Drawing.Point(12, 133) - Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDay.Name = "ucrReceiverDay" - Me.ucrReceiverDay.Selector = Nothing - Me.ucrReceiverDay.Size = New System.Drawing.Size(98, 20) - Me.ucrReceiverDay.strNcFilePath = "" - Me.ucrReceiverDay.TabIndex = 7 - Me.ucrReceiverDay.ucrSelector = Nothing - ' - 'ucrReceiverMaxRH - ' - Me.ucrReceiverMaxRH.AutoSize = True - Me.ucrReceiverMaxRH.frmParent = Nothing - Me.ucrReceiverMaxRH.Location = New System.Drawing.Point(18, 366) - Me.ucrReceiverMaxRH.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMaxRH.Name = "ucrReceiverMaxRH" - Me.ucrReceiverMaxRH.Selector = Nothing - Me.ucrReceiverMaxRH.Size = New System.Drawing.Size(116, 20) - Me.ucrReceiverMaxRH.strNcFilePath = "" - Me.ucrReceiverMaxRH.TabIndex = 19 - Me.ucrReceiverMaxRH.ucrSelector = Nothing - ' - 'ucrReceiverMinRH - ' - Me.ucrReceiverMinRH.AutoSize = True - Me.ucrReceiverMinRH.frmParent = Nothing - Me.ucrReceiverMinRH.Location = New System.Drawing.Point(18, 330) - Me.ucrReceiverMinRH.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMinRH.Name = "ucrReceiverMinRH" - Me.ucrReceiverMinRH.Selector = Nothing - Me.ucrReceiverMinRH.Size = New System.Drawing.Size(116, 20) - Me.ucrReceiverMinRH.strNcFilePath = "" - Me.ucrReceiverMinRH.TabIndex = 17 - Me.ucrReceiverMinRH.ucrSelector = Nothing - ' - 'ucrReceiverWindDirection - ' - Me.ucrReceiverWindDirection.AutoSize = True - Me.ucrReceiverWindDirection.frmParent = Nothing - Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(18, 177) - Me.ucrReceiverWindDirection.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverWindDirection.Name = "ucrReceiverWindDirection" - Me.ucrReceiverWindDirection.Selector = Nothing - Me.ucrReceiverWindDirection.Size = New System.Drawing.Size(111, 20) - Me.ucrReceiverWindDirection.strNcFilePath = "" - Me.ucrReceiverWindDirection.TabIndex = 9 - Me.ucrReceiverWindDirection.ucrSelector = Nothing - ' - 'ucrReceiverRain - ' - Me.ucrReceiverRain.AutoSize = True - Me.ucrReceiverRain.frmParent = Nothing - Me.ucrReceiverRain.Location = New System.Drawing.Point(18, 30) - Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverRain.Name = "ucrReceiverRain" - Me.ucrReceiverRain.Selector = Nothing - Me.ucrReceiverRain.Size = New System.Drawing.Size(111, 20) - Me.ucrReceiverRain.strNcFilePath = "" - Me.ucrReceiverRain.TabIndex = 1 - Me.ucrReceiverRain.ucrSelector = Nothing - ' - 'ucrReceiverSunshine - ' - Me.ucrReceiverSunshine.AutoSize = True - Me.ucrReceiverSunshine.frmParent = Nothing - Me.ucrReceiverSunshine.Location = New System.Drawing.Point(18, 215) - Me.ucrReceiverSunshine.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSunshine.Name = "ucrReceiverSunshine" - Me.ucrReceiverSunshine.Selector = Nothing - Me.ucrReceiverSunshine.Size = New System.Drawing.Size(116, 20) - Me.ucrReceiverSunshine.strNcFilePath = "" - Me.ucrReceiverSunshine.TabIndex = 11 - Me.ucrReceiverSunshine.ucrSelector = Nothing - ' - 'ucrReceiverRadiation - ' - Me.ucrReceiverRadiation.AutoSize = True - Me.ucrReceiverRadiation.frmParent = Nothing - Me.ucrReceiverRadiation.Location = New System.Drawing.Point(18, 254) - Me.ucrReceiverRadiation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverRadiation.Name = "ucrReceiverRadiation" - Me.ucrReceiverRadiation.Selector = Nothing - Me.ucrReceiverRadiation.Size = New System.Drawing.Size(116, 20) - Me.ucrReceiverRadiation.strNcFilePath = "" - Me.ucrReceiverRadiation.TabIndex = 13 - Me.ucrReceiverRadiation.ucrSelector = Nothing - ' - 'ucrReceiverMaxTemp - ' - Me.ucrReceiverMaxTemp.AutoSize = True - Me.ucrReceiverMaxTemp.frmParent = Nothing - Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(18, 103) - Me.ucrReceiverMaxTemp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMaxTemp.Name = "ucrReceiverMaxTemp" - Me.ucrReceiverMaxTemp.Selector = Nothing - Me.ucrReceiverMaxTemp.Size = New System.Drawing.Size(111, 20) - Me.ucrReceiverMaxTemp.strNcFilePath = "" - Me.ucrReceiverMaxTemp.TabIndex = 5 - Me.ucrReceiverMaxTemp.ucrSelector = Nothing - ' - 'ucrReceiverCloudCover - ' - Me.ucrReceiverCloudCover.AutoSize = True - Me.ucrReceiverCloudCover.frmParent = Nothing - Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(18, 292) - Me.ucrReceiverCloudCover.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverCloudCover.Name = "ucrReceiverCloudCover" - Me.ucrReceiverCloudCover.Selector = Nothing - Me.ucrReceiverCloudCover.Size = New System.Drawing.Size(116, 20) - Me.ucrReceiverCloudCover.strNcFilePath = "" - Me.ucrReceiverCloudCover.TabIndex = 15 - Me.ucrReceiverCloudCover.ucrSelector = Nothing - ' - 'ucrReceiverWindSpeed - ' - Me.ucrReceiverWindSpeed.AutoSize = True - Me.ucrReceiverWindSpeed.frmParent = Nothing - Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(18, 140) - Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" - Me.ucrReceiverWindSpeed.Selector = Nothing - Me.ucrReceiverWindSpeed.Size = New System.Drawing.Size(111, 20) - Me.ucrReceiverWindSpeed.strNcFilePath = "" - Me.ucrReceiverWindSpeed.TabIndex = 7 - Me.ucrReceiverWindSpeed.ucrSelector = Nothing - ' - 'ucrReceiverMinTemp - ' - Me.ucrReceiverMinTemp.AutoSize = True - Me.ucrReceiverMinTemp.frmParent = Nothing - Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(18, 66) - Me.ucrReceiverMinTemp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMinTemp.Name = "ucrReceiverMinTemp" - Me.ucrReceiverMinTemp.Selector = Nothing - Me.ucrReceiverMinTemp.Size = New System.Drawing.Size(111, 20) - Me.ucrReceiverMinTemp.strNcFilePath = "" - Me.ucrReceiverMinTemp.TabIndex = 3 - Me.ucrReceiverMinTemp.ucrSelector = Nothing - ' - 'ucrReceiverStationMeta - ' - Me.ucrReceiverStationMeta.AutoSize = True - Me.ucrReceiverStationMeta.frmParent = Nothing - Me.ucrReceiverStationMeta.Location = New System.Drawing.Point(11, 31) - Me.ucrReceiverStationMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStationMeta.Name = "ucrReceiverStationMeta" - Me.ucrReceiverStationMeta.Selector = Nothing - Me.ucrReceiverStationMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverStationMeta.strNcFilePath = "" - Me.ucrReceiverStationMeta.TabIndex = 8 - Me.ucrReceiverStationMeta.ucrSelector = Nothing - ' - 'ucrReceiverLonMeta - ' - Me.ucrReceiverLonMeta.AutoSize = True - Me.ucrReceiverLonMeta.frmParent = Nothing - Me.ucrReceiverLonMeta.Location = New System.Drawing.Point(9, 108) - Me.ucrReceiverLonMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLonMeta.Name = "ucrReceiverLonMeta" - Me.ucrReceiverLonMeta.Selector = Nothing - Me.ucrReceiverLonMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverLonMeta.strNcFilePath = "" - Me.ucrReceiverLonMeta.TabIndex = 10 - Me.ucrReceiverLonMeta.ucrSelector = Nothing - ' - 'ucrReceiverLatMeta - ' - Me.ucrReceiverLatMeta.AutoSize = True - Me.ucrReceiverLatMeta.frmParent = Nothing - Me.ucrReceiverLatMeta.Location = New System.Drawing.Point(9, 70) - Me.ucrReceiverLatMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverLatMeta.Name = "ucrReceiverLatMeta" - Me.ucrReceiverLatMeta.Selector = Nothing - Me.ucrReceiverLatMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverLatMeta.strNcFilePath = "" - Me.ucrReceiverLatMeta.TabIndex = 9 - Me.ucrReceiverLatMeta.ucrSelector = Nothing - ' - 'ucrReceiverAltMeta - ' - Me.ucrReceiverAltMeta.AutoSize = True - Me.ucrReceiverAltMeta.frmParent = Nothing - Me.ucrReceiverAltMeta.Location = New System.Drawing.Point(9, 147) - Me.ucrReceiverAltMeta.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverAltMeta.Name = "ucrReceiverAltMeta" - Me.ucrReceiverAltMeta.Selector = Nothing - Me.ucrReceiverAltMeta.Size = New System.Drawing.Size(93, 20) - Me.ucrReceiverAltMeta.strNcFilePath = "" - Me.ucrReceiverAltMeta.TabIndex = 11 - Me.ucrReceiverAltMeta.ucrSelector = Nothing - ' 'DlgDefineClimaticData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)