From e0c8735f1b9bbddb8be0a80dd17764d313eb8310 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 17 Jan 2025 15:43:19 +0300 Subject: [PATCH 01/15] changes to the code --- .../R/dlgOutfillingStationData.Designer.vb | 354 +++++++++++++++++- .../R/dlgOutfillingStationData.vb | 205 +++++++++- 2 files changed, 556 insertions(+), 3 deletions(-) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb index 0847923f08..c63c54230f 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb @@ -23,22 +23,346 @@ Partial Class dlgOutfillingStationData _ Private Sub InitializeComponent() Me.ucrBase = New instat.ucrButtons() + Me.ucrSelectorOutfilling = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverRain = New instat.ucrReceiverSingle() + Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() + Me.lblStation = New System.Windows.Forms.Label() + Me.lblDate = New System.Windows.Forms.Label() + Me.lblLatitude = New System.Windows.Forms.Label() + Me.lblLong = New System.Windows.Forms.Label() + Me.lblRain = New System.Windows.Forms.Label() + Me.lblEstimates = New System.Windows.Forms.Label() + Me.ucrInputBins = New instat.ucrInputComboBox() + Me.lblBins = New System.Windows.Forms.Label() + Me.ucrNudCount = New instat.ucrNud() + Me.ucrNudDays = New instat.ucrNud() + Me.lblDays = New System.Windows.Forms.Label() + Me.lblCount = New System.Windows.Forms.Label() + Me.cmdOmitMonths = New System.Windows.Forms.Button() + Me.ucrInputDist = New instat.ucrInputComboBox() + Me.ucrInputMarkov = New instat.ucrInputComboBox() + Me.lblDist = New System.Windows.Forms.Label() + Me.lblMarkov = New System.Windows.Forms.Label() + Me.ucrChkOmitMonths = New instat.ucrCheck() Me.SuspendLayout() ' 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(16, 439) + Me.ucrBase.Location = New System.Drawing.Point(16, 530) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(615, 78) Me.ucrBase.TabIndex = 0 ' + 'ucrSelectorOutfilling + ' + Me.ucrSelectorOutfilling.AutoSize = True + Me.ucrSelectorOutfilling.bDropUnusedFilterLevels = False + Me.ucrSelectorOutfilling.bShowHiddenColumns = False + Me.ucrSelectorOutfilling.bUseCurrentFilter = True + Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(9, 17) + Me.ucrSelectorOutfilling.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorOutfilling.Name = "ucrSelectorOutfilling" + Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(318, 274) + Me.ucrSelectorOutfilling.TabIndex = 1 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(492, 65) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 2 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverRain + ' + Me.ucrReceiverRain.AutoSize = True + Me.ucrReceiverRain.frmParent = Me + Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 334) + Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverRain.Name = "ucrReceiverRain" + Me.ucrReceiverRain.Selector = Nothing + Me.ucrReceiverRain.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverRain.strNcFilePath = "" + Me.ucrReceiverRain.TabIndex = 3 + Me.ucrReceiverRain.ucrSelector = Nothing + ' + 'ucrReceiverLongitude + ' + Me.ucrReceiverLongitude.AutoSize = True + Me.ucrReceiverLongitude.frmParent = Me + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 266) + Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" + Me.ucrReceiverLongitude.Selector = Nothing + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverLongitude.strNcFilePath = "" + Me.ucrReceiverLongitude.TabIndex = 4 + Me.ucrReceiverLongitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 199) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 5 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.AutoSize = True + Me.ucrReceiverDate.frmParent = Me + Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 133) + Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverDate.strNcFilePath = "" + Me.ucrReceiverDate.TabIndex = 6 + Me.ucrReceiverDate.ucrSelector = Nothing + ' + 'ucrReceiverEstimates + ' + Me.ucrReceiverEstimates.AutoSize = True + Me.ucrReceiverEstimates.frmParent = Me + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 407) + Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" + Me.ucrReceiverEstimates.Selector = Nothing + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverEstimates.strNcFilePath = "" + Me.ucrReceiverEstimates.TabIndex = 7 + Me.ucrReceiverEstimates.ucrSelector = Nothing + ' + 'lblStation + ' + Me.lblStation.AutoSize = True + Me.lblStation.Location = New System.Drawing.Point(496, 38) + Me.lblStation.Name = "lblStation" + Me.lblStation.Size = New System.Drawing.Size(64, 20) + Me.lblStation.TabIndex = 8 + Me.lblStation.Text = "Station:" + ' + 'lblDate + ' + Me.lblDate.AutoSize = True + Me.lblDate.Location = New System.Drawing.Point(496, 107) + Me.lblDate.Name = "lblDate" + Me.lblDate.Size = New System.Drawing.Size(48, 20) + Me.lblDate.TabIndex = 9 + Me.lblDate.Text = "Date:" + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.Location = New System.Drawing.Point(496, 172) + Me.lblLatitude.Name = "lblLatitude" + Me.lblLatitude.Size = New System.Drawing.Size(71, 20) + Me.lblLatitude.TabIndex = 10 + Me.lblLatitude.Text = "Latitude:" + ' + 'lblLong + ' + Me.lblLong.AutoSize = True + Me.lblLong.Location = New System.Drawing.Point(496, 239) + Me.lblLong.Name = "lblLong" + Me.lblLong.Size = New System.Drawing.Size(84, 20) + Me.lblLong.TabIndex = 11 + Me.lblLong.Text = "Longitude:" + ' + 'lblRain + ' + Me.lblRain.AutoSize = True + Me.lblRain.Location = New System.Drawing.Point(496, 307) + Me.lblRain.Name = "lblRain" + Me.lblRain.Size = New System.Drawing.Size(46, 20) + Me.lblRain.TabIndex = 12 + Me.lblRain.Text = "Rain:" + ' + 'lblEstimates + ' + Me.lblEstimates.AutoSize = True + Me.lblEstimates.Location = New System.Drawing.Point(496, 380) + Me.lblEstimates.Name = "lblEstimates" + Me.lblEstimates.Size = New System.Drawing.Size(84, 20) + Me.lblEstimates.TabIndex = 13 + Me.lblEstimates.Text = "Estimates:" + ' + 'ucrInputBins + ' + Me.ucrInputBins.AddQuotesIfUnrecognised = True + Me.ucrInputBins.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputBins.GetSetSelectedIndex = -1 + Me.ucrInputBins.IsReadOnly = False + Me.ucrInputBins.Location = New System.Drawing.Point(104, 304) + Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputBins.Name = "ucrInputBins" + Me.ucrInputBins.Size = New System.Drawing.Size(254, 32) + Me.ucrInputBins.TabIndex = 54 + ' + 'lblBins + ' + Me.lblBins.AutoSize = True + Me.lblBins.Location = New System.Drawing.Point(43, 309) + Me.lblBins.Name = "lblBins" + Me.lblBins.Size = New System.Drawing.Size(44, 20) + Me.lblBins.TabIndex = 55 + Me.lblBins.Text = "Bins:" + ' + 'ucrNudCount + ' + Me.ucrNudCount.AutoSize = True + Me.ucrNudCount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCount.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudCount.Location = New System.Drawing.Point(104, 353) + Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudCount.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudCount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCount.Name = "ucrNudCount" + Me.ucrNudCount.Size = New System.Drawing.Size(75, 30) + Me.ucrNudCount.TabIndex = 56 + Me.ucrNudCount.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudDays + ' + Me.ucrNudDays.AutoSize = True + Me.ucrNudDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDays.Location = New System.Drawing.Point(104, 397) + Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDays.Name = "ucrNudDays" + Me.ucrNudDays.Size = New System.Drawing.Size(75, 30) + Me.ucrNudDays.TabIndex = 57 + Me.ucrNudDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblDays + ' + Me.lblDays.AutoSize = True + Me.lblDays.Location = New System.Drawing.Point(43, 407) + Me.lblDays.Name = "lblDays" + Me.lblDays.Size = New System.Drawing.Size(49, 20) + Me.lblDays.TabIndex = 58 + Me.lblDays.Text = "Days:" + ' + 'lblCount + ' + Me.lblCount.AutoSize = True + Me.lblCount.Location = New System.Drawing.Point(36, 358) + Me.lblCount.Name = "lblCount" + Me.lblCount.Size = New System.Drawing.Size(56, 20) + Me.lblCount.TabIndex = 59 + Me.lblCount.Text = "Count:" + ' + 'cmdOmitMonths + ' + Me.cmdOmitMonths.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdOmitMonths.Location = New System.Drawing.Point(564, 445) + Me.cmdOmitMonths.Margin = New System.Windows.Forms.Padding(4) + Me.cmdOmitMonths.Name = "cmdOmitMonths" + Me.cmdOmitMonths.Size = New System.Drawing.Size(104, 66) + Me.cmdOmitMonths.TabIndex = 60 + Me.cmdOmitMonths.Text = "Omit Months" + Me.cmdOmitMonths.UseVisualStyleBackColor = True + ' + 'ucrInputDist + ' + Me.ucrInputDist.AddQuotesIfUnrecognised = True + Me.ucrInputDist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputDist.GetSetSelectedIndex = -1 + Me.ucrInputDist.IsReadOnly = False + Me.ucrInputDist.Location = New System.Drawing.Point(104, 437) + Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputDist.Name = "ucrInputDist" + Me.ucrInputDist.Size = New System.Drawing.Size(171, 32) + Me.ucrInputDist.TabIndex = 61 + ' + 'ucrInputMarkov + ' + Me.ucrInputMarkov.AddQuotesIfUnrecognised = True + Me.ucrInputMarkov.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputMarkov.GetSetSelectedIndex = -1 + Me.ucrInputMarkov.IsReadOnly = False + Me.ucrInputMarkov.Location = New System.Drawing.Point(104, 485) + Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputMarkov.Name = "ucrInputMarkov" + Me.ucrInputMarkov.Size = New System.Drawing.Size(173, 32) + Me.ucrInputMarkov.TabIndex = 62 + ' + 'lblDist + ' + Me.lblDist.AutoSize = True + Me.lblDist.Location = New System.Drawing.Point(5, 441) + Me.lblDist.Name = "lblDist" + Me.lblDist.Size = New System.Drawing.Size(93, 20) + Me.lblDist.TabIndex = 63 + Me.lblDist.Text = "Distribution:" + ' + 'lblMarkov + ' + Me.lblMarkov.AutoSize = True + Me.lblMarkov.Location = New System.Drawing.Point(28, 490) + Me.lblMarkov.Name = "lblMarkov" + Me.lblMarkov.Size = New System.Drawing.Size(64, 20) + Me.lblMarkov.TabIndex = 64 + Me.lblMarkov.Text = "Markov:" + ' + 'ucrChkOmitMonths + ' + Me.ucrChkOmitMonths.AutoSize = True + Me.ucrChkOmitMonths.Checked = False + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(394, 461) + Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" + Me.ucrChkOmitMonths.Size = New System.Drawing.Size(150, 34) + Me.ucrChkOmitMonths.TabIndex = 65 + ' 'dlgOutfillingStationData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(669, 531) + Me.ClientSize = New System.Drawing.Size(694, 614) + Me.Controls.Add(Me.ucrChkOmitMonths) + Me.Controls.Add(Me.lblMarkov) + Me.Controls.Add(Me.lblDist) + Me.Controls.Add(Me.ucrInputMarkov) + Me.Controls.Add(Me.ucrInputDist) + Me.Controls.Add(Me.cmdOmitMonths) + Me.Controls.Add(Me.lblCount) + Me.Controls.Add(Me.lblDays) + Me.Controls.Add(Me.ucrNudDays) + Me.Controls.Add(Me.ucrNudCount) + Me.Controls.Add(Me.lblBins) + Me.Controls.Add(Me.ucrInputBins) + Me.Controls.Add(Me.lblEstimates) + Me.Controls.Add(Me.lblRain) + Me.Controls.Add(Me.lblLong) + Me.Controls.Add(Me.lblLatitude) + Me.Controls.Add(Me.lblDate) + Me.Controls.Add(Me.lblStation) + Me.Controls.Add(Me.ucrReceiverEstimates) + Me.Controls.Add(Me.ucrReceiverDate) + Me.Controls.Add(Me.ucrReceiverLatitude) + Me.Controls.Add(Me.ucrReceiverLongitude) + Me.Controls.Add(Me.ucrReceiverRain) + Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.ucrSelectorOutfilling) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -47,8 +371,34 @@ Partial Class dlgOutfillingStationData Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Outfilling Station Data" Me.ResumeLayout(False) + Me.PerformLayout() End Sub Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrSelectorOutfilling As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents lblEstimates As Label + Friend WithEvents lblRain As Label + Friend WithEvents lblLong As Label + Friend WithEvents lblLatitude As Label + Friend WithEvents lblDate As Label + Friend WithEvents lblStation As Label + Friend WithEvents ucrReceiverEstimates As ucrReceiverSingle + Friend WithEvents ucrReceiverDate As ucrReceiverSingle + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrReceiverLongitude As ucrReceiverSingle + Friend WithEvents ucrReceiverRain As ucrReceiverSingle + Friend WithEvents lblCount As Label + Friend WithEvents lblDays As Label + Friend WithEvents ucrNudDays As ucrNud + Friend WithEvents ucrNudCount As ucrNud + Friend WithEvents lblBins As Label + Friend WithEvents ucrInputBins As ucrInputComboBox + Friend WithEvents lblMarkov As Label + Friend WithEvents lblDist As Label + Friend WithEvents ucrInputMarkov As ucrInputComboBox + Friend WithEvents ucrInputDist As ucrInputComboBox + Friend WithEvents cmdOmitMonths As Button + Friend WithEvents ucrChkOmitMonths As ucrCheck End Class diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index 89fdc2ec56..a57096da7a 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -1,3 +1,206 @@ -Public Class dlgOutfillingStationData +' 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 +Imports System.IO + +Public Class dlgOutfillingStationData + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private bResetSubdialog As Boolean = False + Private clsDoFillingFunction As New RFunction + Private clsDummyFunction As New RFunction + Private Sub dlgOutfillingStationData_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() + Dim dctLogical As New Dictionary(Of String, String) + Dim dctDist As New Dictionary(Of String, String) + + ucrSelectorOutfilling.SetParameter(New RParameter("data", 0)) + ucrSelectorOutfilling.SetParameterIsrfunction() + + ucrReceiverStation.SetParameter(New RParameter("station", 1)) + ucrReceiverStation.Selector = ucrSelectorOutfilling + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.SetClimaticType("station") + ucrReceiverStation.bAutoFill = True + ucrReceiverStation.SetLinkedDisplayControl(lblStation) + + ucrReceiverDate.SetParameter(New RParameter("date", 2)) + ucrReceiverDate.Selector = ucrSelectorOutfilling + ucrReceiverDate.SetParameterIsString() + ucrReceiverDate.SetClimaticType("date") + ucrReceiverDate.bAutoFill = True + ucrReceiverDate.SetLinkedDisplayControl(lblDate) + + ucrReceiverRain.SetParameter(New RParameter("rainfall", 3)) + ucrReceiverRain.Selector = ucrSelectorOutfilling + ucrReceiverRain.SetParameterIsString() + ucrReceiverRain.SetClimaticType("rain") + ucrReceiverRain.bAutoFill = True + ucrReceiverRain.SetLinkedDisplayControl(lblRain) + + ucrReceiverEstimates.SetParameter(New RParameter("rainfall_estimate_column", 4)) + ucrReceiverEstimates.Selector = ucrSelectorOutfilling + ucrReceiverEstimates.SetParameterIsString() + ucrReceiverEstimates.SetLinkedDisplayControl(lblEstimates) + + ucrReceiverLongitude.SetParameter(New RParameter("longitude", 5)) + ucrReceiverLongitude.Selector = ucrSelectorOutfilling + ucrReceiverLongitude.SetParameterIsString() + ucrReceiverLongitude.SetClimaticType("lon") + ucrReceiverLongitude.bAutoFill = True + ucrReceiverLongitude.SetLinkedDisplayControl(lblLong) + + ucrReceiverLatitude.SetParameter(New RParameter("latitude", 6)) + ucrReceiverLatitude.Selector = ucrSelectorOutfilling + ucrReceiverLatitude.SetParameterIsString() + ucrReceiverLatitude.SetClimaticType("lat") + ucrReceiverLatitude.bAutoFill = True + ucrReceiverLatitude.SetLinkedDisplayControl(lblLatitude) + + ucrInputBins.SetParameter(New RParameter("custom_bins", 5)) + ucrInputBins.SetValidationTypeAsNumericList() + ucrInputBins.SetItems({"160", "1, 3, 5, 10, 15, 20", "92, 122, 153", "124, 184, 10", "92, 152, 15"}) + ucrInputBins.AddQuotesIfUnrecognised = False + ucrInputBins.bAllowNonConditionValues = True + + ucrInputMarkov.SetParameter(New RParameter("markovflag", 6)) + dctLogical.Add("TRUE", "TRUE") + dctLogical.Add("FALSE", "FALSE") + ucrInputMarkov.SetItems(dctLogical) + ucrInputMarkov.SetRDefault("TRUE") + ucrInputMarkov.SetDropDownStyleAsNonEditable() + + ucrInputDist.SetParameter(New RParameter("distribution_flag", 7)) + dctDist.Add("Gamma", Chr(34) & "gamma" & Chr(34)) + dctDist.Add("Lognormal", Chr(34) & "lognormal" & Chr(34)) + ucrInputDist.SetItems(dctDist) + ucrInputDist.SetRDefault("Gamma") + ucrInputDist.SetDropDownStyleAsNonEditable() + + ucrNudCount.SetParameter(New RParameter("count_filter", 8)) + ucrNudCount.SetLinkedDisplayControl(lblCount) + ucrNudCount.SetMinMax(1, Integer.MaxValue) + ucrNudCount.SetRDefault(10) + + ucrNudDays.SetParameter(New RParameter("min_rainy_days_threshold", 9)) + ucrNudDays.SetLinkedDisplayControl(lblDays) + ucrNudDays.SetMinMax(1, Integer.MaxValue) + ucrNudDays.SetRDefault(50) + + ucrChkOmitMonths.SetText("Dry Month(s)") + ucrChkOmitMonths.AddParameterValuesCondition(True, "omit", "False") + ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "True") + + End Sub + + Private Sub SetDefaults() + clsDoFillingFunction = New RFunction + clsDummyFunction = New RFunction + + ucrSelectorOutfilling.Reset() + + clsDummyFunction.AddParameter("omit", "False", iPosition:=0) + + clsDoFillingFunction.SetPackageName("outfillingR") + clsDoFillingFunction.SetRCommand("do_infilling") + + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + ucrChkOmitMonths.SetRCode(clsDummyFunction, bReset) + ucrSelectorOutfilling.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverDate.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverEstimates.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverLatitude.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverLongitude.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverRain.SetRCode(clsDoFillingFunction, bReset) + ucrNudCount.SetRCode(clsDoFillingFunction, bReset) + ucrNudDays.SetRCode(clsDoFillingFunction, bReset) + ucrInputDist.SetRCode(clsDoFillingFunction, bReset) + ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) + ucrInputBins.SetRCode(clsDoFillingFunction, bReset) + End Sub + + Private Sub TestOkEnabled() + + End Sub + + Private Sub ucrChkOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMonths.ControlValueChanged + cmdOmitMonths.Visible = ucrChkOmitMonths.Checked + End Sub + + Private Sub ucrInputBins_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputBins.ControlValueChanged + If Not ucrInputBins.IsEmpty Then + clsDoFillingFunction.AddParameter("custom_bins", "c(" & ucrInputBins.GetText & ")", iPosition:=5) + Else + clsDoFillingFunction.RemoveParameterByName("custom_bins") + End If + End Sub + + Private Sub ucrNudCount_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudCount.ControlValueChanged + If Not ucrNudCount.IsEmpty Then + clsDoFillingFunction.AddParameter("count_filter", ucrNudCount.GetText, iPosition:=8) + Else + clsDoFillingFunction.RemoveParameterByName("count_filter") + End If + End Sub + + Private Sub ucrNudDays_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudDays.ControlValueChanged + If Not ucrNudDays.IsEmpty Then + clsDoFillingFunction.AddParameter("min_rainy_days_threshold", ucrNudDays.GetText, iPosition:=9) + Else + clsDoFillingFunction.RemoveParameterByName("min_rainy_days_threshold") + End If + End Sub + + Private Sub ucrInputDist_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputDist.ControlValueChanged + If Not ucrInputDist.IsEmpty Then + clsDoFillingFunction.AddParameter("distribution_flag", Chr(34) & ucrInputDist.GetText & Chr(34), iPosition:=7) + Else + clsDoFillingFunction.RemoveParameterByName("distribution_flag") + End If + End Sub + + Private Sub ucrInputMarkov_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputMarkov.ControlValueChanged + If Not ucrInputMarkov.IsEmpty Then + clsDoFillingFunction.AddParameter("markovflag", "c(" & ucrInputMarkov.GetText & ")", iPosition:=5) + Else + clsDoFillingFunction.RemoveParameterByName("markovflag") + End If + End Sub + + Private Sub ucrReceiverEstimates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlValueChanged + If Not ucrReceiverEstimates.IsEmpty Then + clsDoFillingFunction.AddParameter("rfe", ucrReceiverEstimates.GetVariableNames, iPosition:=10) + Else + clsDoFillingFunction.RemoveParameterByName("rfe") + End If + End Sub End Class \ No newline at end of file From 4c522e51158abcc2c095d82a349681c8eac7d94d Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 17 Jan 2025 16:39:48 +0300 Subject: [PATCH 02/15] changes --- .../R/dlgOutfillingStationData.vb | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index a57096da7a..4fcaa55310 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -149,7 +149,21 @@ Public Class dlgOutfillingStationData End Sub Private Sub TestOkEnabled() - + If Not ucrReceiverStation.IsEmpty AndAlso + Not ucrReceiverEstimates.IsEmpty AndAlso + Not ucrReceiverDate.IsEmpty AndAlso + Not ucrReceiverLatitude.IsEmpty AndAlso + Not ucrReceiverLongitude.IsEmpty AndAlso + Not ucrReceiverRain.IsEmpty AndAlso + Not ucrNudCount.IsEmpty AndAlso + Not ucrNudDays.IsEmpty AndAlso + Not ucrInputBins.IsEmpty AndAlso + Not ucrInputDist.IsEmpty AndAlso + Not ucrInputMarkov.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End Sub Private Sub ucrChkOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMonths.ControlValueChanged @@ -203,4 +217,17 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.RemoveParameterByName("rfe") 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 ucrReceiverEstimates_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, + ucrReceiverLongitude.ControlContentsChanged, ucrReceiverRain.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged, ucrInputBins.ControlContentsChanged, + ucrInputDist.ControlContentsChanged, ucrInputMarkov.ControlContentsChanged, ucrNudCount.ControlContentsChanged, ucrNudDays.ControlContentsChanged + TestOkEnabled() + End Sub + End Class \ No newline at end of file From a886cd693372599ca8a107a9a5dc224db65e1e67 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 20 Jan 2025 11:00:50 +0300 Subject: [PATCH 03/15] changes --- .../R/dlgOutfillingStationData.Designer.vb | 61 ++++++++++++++----- .../R/dlgOutfillingStationData.vb | 40 ++++++++++-- 2 files changed, 80 insertions(+), 21 deletions(-) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb index c63c54230f..50fa960f08 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb @@ -48,12 +48,14 @@ Partial Class dlgOutfillingStationData Me.lblDist = New System.Windows.Forms.Label() Me.lblMarkov = New System.Windows.Forms.Label() Me.ucrChkOmitMonths = New instat.ucrCheck() + Me.ucrInputSelectStation = New instat.ucrInputFactorLevels() + Me.Label1 = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(16, 530) + Me.ucrBase.Location = New System.Drawing.Point(16, 558) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(615, 78) @@ -75,7 +77,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverStation.AutoSize = True Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(492, 65) + Me.ucrReceiverStation.Location = New System.Drawing.Point(492, 55) Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverStation.Name = "ucrReceiverStation" Me.ucrReceiverStation.Selector = Nothing @@ -88,7 +90,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 334) + Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 371) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing @@ -101,7 +103,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLongitude.AutoSize = True Me.ucrReceiverLongitude.frmParent = Me - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 266) + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 303) Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" Me.ucrReceiverLongitude.Selector = Nothing @@ -114,7 +116,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLatitude.AutoSize = True Me.ucrReceiverLatitude.frmParent = Me - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 199) + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 236) Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" Me.ucrReceiverLatitude.Selector = Nothing @@ -127,7 +129,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 133) + Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 170) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing @@ -140,7 +142,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverEstimates.AutoSize = True Me.ucrReceiverEstimates.frmParent = Me - Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 407) + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 444) Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" Me.ucrReceiverEstimates.Selector = Nothing @@ -152,7 +154,7 @@ Partial Class dlgOutfillingStationData 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(496, 38) + Me.lblStation.Location = New System.Drawing.Point(496, 28) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(64, 20) Me.lblStation.TabIndex = 8 @@ -161,7 +163,7 @@ Partial Class dlgOutfillingStationData 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(496, 107) + Me.lblDate.Location = New System.Drawing.Point(496, 144) Me.lblDate.Name = "lblDate" Me.lblDate.Size = New System.Drawing.Size(48, 20) Me.lblDate.TabIndex = 9 @@ -170,7 +172,7 @@ Partial Class dlgOutfillingStationData 'lblLatitude ' Me.lblLatitude.AutoSize = True - Me.lblLatitude.Location = New System.Drawing.Point(496, 172) + Me.lblLatitude.Location = New System.Drawing.Point(496, 209) Me.lblLatitude.Name = "lblLatitude" Me.lblLatitude.Size = New System.Drawing.Size(71, 20) Me.lblLatitude.TabIndex = 10 @@ -179,7 +181,7 @@ Partial Class dlgOutfillingStationData 'lblLong ' Me.lblLong.AutoSize = True - Me.lblLong.Location = New System.Drawing.Point(496, 239) + Me.lblLong.Location = New System.Drawing.Point(496, 276) Me.lblLong.Name = "lblLong" Me.lblLong.Size = New System.Drawing.Size(84, 20) Me.lblLong.TabIndex = 11 @@ -188,7 +190,7 @@ Partial Class dlgOutfillingStationData 'lblRain ' Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(496, 307) + Me.lblRain.Location = New System.Drawing.Point(496, 344) Me.lblRain.Name = "lblRain" Me.lblRain.Size = New System.Drawing.Size(46, 20) Me.lblRain.TabIndex = 12 @@ -197,7 +199,7 @@ Partial Class dlgOutfillingStationData 'lblEstimates ' Me.lblEstimates.AutoSize = True - Me.lblEstimates.Location = New System.Drawing.Point(496, 380) + Me.lblEstimates.Location = New System.Drawing.Point(496, 417) Me.lblEstimates.Name = "lblEstimates" Me.lblEstimates.Size = New System.Drawing.Size(84, 20) Me.lblEstimates.TabIndex = 13 @@ -273,7 +275,7 @@ Partial Class dlgOutfillingStationData 'cmdOmitMonths ' Me.cmdOmitMonths.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOmitMonths.Location = New System.Drawing.Point(564, 445) + Me.cmdOmitMonths.Location = New System.Drawing.Point(564, 481) Me.cmdOmitMonths.Margin = New System.Windows.Forms.Padding(4) Me.cmdOmitMonths.Name = "cmdOmitMonths" Me.cmdOmitMonths.Size = New System.Drawing.Size(104, 66) @@ -327,17 +329,42 @@ Partial Class dlgOutfillingStationData ' Me.ucrChkOmitMonths.AutoSize = True Me.ucrChkOmitMonths.Checked = False - Me.ucrChkOmitMonths.Location = New System.Drawing.Point(394, 461) + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(394, 497) Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" Me.ucrChkOmitMonths.Size = New System.Drawing.Size(150, 34) Me.ucrChkOmitMonths.TabIndex = 65 ' + 'ucrInputSelectStation + ' + Me.ucrInputSelectStation.AddQuotesIfUnrecognised = True + Me.ucrInputSelectStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputSelectStation.GetSetSelectedIndex = -1 + Me.ucrInputSelectStation.IsReadOnly = False + Me.ucrInputSelectStation.Location = New System.Drawing.Point(497, 111) + Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(21) + Me.ucrInputSelectStation.Name = "ucrInputSelectStation" + Me.ucrInputSelectStation.Size = New System.Drawing.Size(180, 34) + Me.ucrInputSelectStation.TabIndex = 93 + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.Label1.Location = New System.Drawing.Point(498, 87) + Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(146, 20) + Me.Label1.TabIndex = 92 + Me.Label1.Text = "Station To Exclude:" + ' 'dlgOutfillingStationData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(694, 614) + Me.ClientSize = New System.Drawing.Size(694, 655) + Me.Controls.Add(Me.ucrInputSelectStation) + Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.ucrChkOmitMonths) Me.Controls.Add(Me.lblMarkov) Me.Controls.Add(Me.lblDist) @@ -401,4 +428,6 @@ Partial Class dlgOutfillingStationData Friend WithEvents ucrInputDist As ucrInputComboBox Friend WithEvents cmdOmitMonths As Button Friend WithEvents ucrChkOmitMonths As ucrCheck + Friend WithEvents ucrInputSelectStation As ucrInputFactorLevels + Friend WithEvents Label1 As Label End Class diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index 4fcaa55310..70c29c5cce 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -15,7 +15,6 @@ ' along with this program. If not, see . Imports instat.Translations -Imports System.IO Public Class dlgOutfillingStationData Private bFirstLoad As Boolean = True @@ -23,6 +22,8 @@ Public Class dlgOutfillingStationData Private bResetSubdialog As Boolean = False Private clsDoFillingFunction As New RFunction Private clsDummyFunction As New RFunction + Private clsBaseFunction, clsDataListFunction As New RFunction + Private Sub dlgOutfillingStationData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -70,14 +71,14 @@ Public Class dlgOutfillingStationData ucrReceiverEstimates.SetParameterIsString() ucrReceiverEstimates.SetLinkedDisplayControl(lblEstimates) - ucrReceiverLongitude.SetParameter(New RParameter("longitude", 5)) + ucrReceiverLongitude.SetParameter(New RParameter("lon", 5)) ucrReceiverLongitude.Selector = ucrSelectorOutfilling ucrReceiverLongitude.SetParameterIsString() ucrReceiverLongitude.SetClimaticType("lon") ucrReceiverLongitude.bAutoFill = True ucrReceiverLongitude.SetLinkedDisplayControl(lblLong) - ucrReceiverLatitude.SetParameter(New RParameter("latitude", 6)) + ucrReceiverLatitude.SetParameter(New RParameter("lat", 6)) ucrReceiverLatitude.Selector = ucrSelectorOutfilling ucrReceiverLatitude.SetParameterIsString() ucrReceiverLatitude.SetClimaticType("lat") @@ -86,7 +87,7 @@ Public Class dlgOutfillingStationData ucrInputBins.SetParameter(New RParameter("custom_bins", 5)) ucrInputBins.SetValidationTypeAsNumericList() - ucrInputBins.SetItems({"160", "1, 3, 5, 10, 15, 20", "92, 122, 153", "124, 184, 10", "92, 152, 15"}) + ucrInputBins.SetItems({"1, 3, 5, 10, 15, 20", "1.5, 4, 8, 16, 32"}) ucrInputBins.AddQuotesIfUnrecognised = False ucrInputBins.bAllowNonConditionValues = True @@ -101,7 +102,7 @@ Public Class dlgOutfillingStationData dctDist.Add("Gamma", Chr(34) & "gamma" & Chr(34)) dctDist.Add("Lognormal", Chr(34) & "lognormal" & Chr(34)) ucrInputDist.SetItems(dctDist) - ucrInputDist.SetRDefault("Gamma") + ucrInputDist.SetRDefault(Chr(34) & "gamma" & Chr(34)) ucrInputDist.SetDropDownStyleAsNonEditable() ucrNudCount.SetParameter(New RParameter("count_filter", 8)) @@ -118,18 +119,36 @@ Public Class dlgOutfillingStationData ucrChkOmitMonths.AddParameterValuesCondition(True, "omit", "False") ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "True") + ucrInputSelectStation.SetParameter(New RParameter("station_to_exclude", 10)) + ucrInputSelectStation.SetFactorReceiver(ucrReceiverStation) + ucrInputSelectStation.strQuotes = "" End Sub Private Sub SetDefaults() clsDoFillingFunction = New RFunction clsDummyFunction = New RFunction + clsBaseFunction = New RFunction + clsDataListFunction = New RFunction ucrSelectorOutfilling.Reset() + ucrInputSelectStation.bFirstLevelDefault = True + + + ucrInputBins.SetName("1, 3, 5, 10, 15, 20") clsDummyFunction.AddParameter("omit", "False", iPosition:=0) clsDoFillingFunction.SetPackageName("outfillingR") clsDoFillingFunction.SetRCommand("do_infilling") + clsDoFillingFunction.SetAssignTo("infill_data") + + clsDataListFunction.SetRCommand("list") + clsDataListFunction.AddParameter("infilled_data", clsRFunctionParameter:=clsDoFillingFunction, iPosition:=0) + + clsBaseFunction.SetRCommand("data_book$import_data") + clsBaseFunction.AddParameter("data_tables", clsRFunctionParameter:=clsDataListFunction, iPosition:=0) + + ucrBase.clsRsyntax.SetBaseRFunction(clsBaseFunction) End Sub @@ -146,6 +165,8 @@ Public Class dlgOutfillingStationData ucrInputDist.SetRCode(clsDoFillingFunction, bReset) ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) ucrInputBins.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) + ucrInputSelectStation.SetRCode(clsDoFillingFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -230,4 +251,13 @@ Public Class dlgOutfillingStationData TestOkEnabled() End Sub + Private Sub ucrInputSelectStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSelectStation.ControlValueChanged, ucrReceiverStation.ControlValueChanged + If Not ucrReceiverStation.IsEmpty AndAlso Not ucrInputSelectStation.IsEmpty Then + clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & ucrInputSelectStation.GetValue() & Chr(34), iPosition:=10) + + Else + clsDoFillingFunction.RemoveParameterByName("station_to_exclude") + End If + + End Sub End Class \ No newline at end of file From 86f2eb6e4df13dfa0832391efa7a851362134428 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 22 Jan 2025 10:07:28 +0300 Subject: [PATCH 04/15] changes --- instat/frmMain.Designer.vb | 1 - .../R/dlgOutfillingStationData.Designer.vb | 82 +++++++++---------- .../R/dlgOutfillingStationData.vb | 29 ++++--- 3 files changed, 59 insertions(+), 53 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index eea0678acb..9e5116e418 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -2570,7 +2570,6 @@ Partial Class frmMain ' 'mnuClimaticModelOutfilling ' - Me.mnuClimaticModelOutfilling.Enabled = False Me.mnuClimaticModelOutfilling.Name = "mnuClimaticModelOutfilling" Me.mnuClimaticModelOutfilling.Size = New System.Drawing.Size(271, 34) Me.mnuClimaticModelOutfilling.Text = "Outfilling..." diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb index 50fa960f08..5cce1f3bb9 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb @@ -55,11 +55,11 @@ Partial Class dlgOutfillingStationData 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(16, 558) + Me.ucrBase.Location = New System.Drawing.Point(16, 567) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(615, 78) - Me.ucrBase.TabIndex = 0 + Me.ucrBase.TabIndex = 27 ' 'ucrSelectorOutfilling ' @@ -71,7 +71,7 @@ Partial Class dlgOutfillingStationData Me.ucrSelectorOutfilling.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOutfilling.Name = "ucrSelectorOutfilling" Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(318, 274) - Me.ucrSelectorOutfilling.TabIndex = 1 + Me.ucrSelectorOutfilling.TabIndex = 0 ' 'ucrReceiverStation ' @@ -90,46 +90,46 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 371) + Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 385) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing Me.ucrReceiverRain.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverRain.strNcFilePath = "" - Me.ucrReceiverRain.TabIndex = 3 + Me.ucrReceiverRain.TabIndex = 12 Me.ucrReceiverRain.ucrSelector = Nothing ' 'ucrReceiverLongitude ' Me.ucrReceiverLongitude.AutoSize = True Me.ucrReceiverLongitude.frmParent = Me - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 303) + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 317) Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" Me.ucrReceiverLongitude.Selector = Nothing Me.ucrReceiverLongitude.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverLongitude.strNcFilePath = "" - Me.ucrReceiverLongitude.TabIndex = 4 + Me.ucrReceiverLongitude.TabIndex = 10 Me.ucrReceiverLongitude.ucrSelector = Nothing ' 'ucrReceiverLatitude ' Me.ucrReceiverLatitude.AutoSize = True Me.ucrReceiverLatitude.frmParent = Me - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 236) + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 250) Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" Me.ucrReceiverLatitude.Selector = Nothing Me.ucrReceiverLatitude.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverLatitude.strNcFilePath = "" - Me.ucrReceiverLatitude.TabIndex = 5 + Me.ucrReceiverLatitude.TabIndex = 8 Me.ucrReceiverLatitude.ucrSelector = Nothing ' 'ucrReceiverDate ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 170) + Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 184) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing @@ -142,13 +142,13 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverEstimates.AutoSize = True Me.ucrReceiverEstimates.frmParent = Me - Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 444) + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 458) Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" Me.ucrReceiverEstimates.Selector = Nothing Me.ucrReceiverEstimates.Size = New System.Drawing.Size(180, 30) Me.ucrReceiverEstimates.strNcFilePath = "" - Me.ucrReceiverEstimates.TabIndex = 7 + Me.ucrReceiverEstimates.TabIndex = 14 Me.ucrReceiverEstimates.ucrSelector = Nothing ' 'lblStation @@ -157,49 +157,49 @@ Partial Class dlgOutfillingStationData Me.lblStation.Location = New System.Drawing.Point(496, 28) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(64, 20) - Me.lblStation.TabIndex = 8 + Me.lblStation.TabIndex = 1 Me.lblStation.Text = "Station:" ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(496, 144) + Me.lblDate.Location = New System.Drawing.Point(496, 158) Me.lblDate.Name = "lblDate" Me.lblDate.Size = New System.Drawing.Size(48, 20) - Me.lblDate.TabIndex = 9 + Me.lblDate.TabIndex = 5 Me.lblDate.Text = "Date:" ' 'lblLatitude ' Me.lblLatitude.AutoSize = True - Me.lblLatitude.Location = New System.Drawing.Point(496, 209) + Me.lblLatitude.Location = New System.Drawing.Point(496, 223) Me.lblLatitude.Name = "lblLatitude" Me.lblLatitude.Size = New System.Drawing.Size(71, 20) - Me.lblLatitude.TabIndex = 10 + Me.lblLatitude.TabIndex = 7 Me.lblLatitude.Text = "Latitude:" ' 'lblLong ' Me.lblLong.AutoSize = True - Me.lblLong.Location = New System.Drawing.Point(496, 276) + Me.lblLong.Location = New System.Drawing.Point(496, 290) Me.lblLong.Name = "lblLong" Me.lblLong.Size = New System.Drawing.Size(84, 20) - Me.lblLong.TabIndex = 11 + Me.lblLong.TabIndex = 9 Me.lblLong.Text = "Longitude:" ' 'lblRain ' Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(496, 344) + Me.lblRain.Location = New System.Drawing.Point(496, 358) Me.lblRain.Name = "lblRain" Me.lblRain.Size = New System.Drawing.Size(46, 20) - Me.lblRain.TabIndex = 12 + Me.lblRain.TabIndex = 11 Me.lblRain.Text = "Rain:" ' 'lblEstimates ' Me.lblEstimates.AutoSize = True - Me.lblEstimates.Location = New System.Drawing.Point(496, 417) + Me.lblEstimates.Location = New System.Drawing.Point(496, 431) Me.lblEstimates.Name = "lblEstimates" Me.lblEstimates.Size = New System.Drawing.Size(84, 20) Me.lblEstimates.TabIndex = 13 @@ -215,7 +215,7 @@ Partial Class dlgOutfillingStationData Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(14) Me.ucrInputBins.Name = "ucrInputBins" Me.ucrInputBins.Size = New System.Drawing.Size(254, 32) - Me.ucrInputBins.TabIndex = 54 + Me.ucrInputBins.TabIndex = 16 ' 'lblBins ' @@ -223,7 +223,7 @@ Partial Class dlgOutfillingStationData Me.lblBins.Location = New System.Drawing.Point(43, 309) Me.lblBins.Name = "lblBins" Me.lblBins.Size = New System.Drawing.Size(44, 20) - Me.lblBins.TabIndex = 55 + Me.lblBins.TabIndex = 15 Me.lblBins.Text = "Bins:" ' 'ucrNudCount @@ -237,7 +237,7 @@ Partial Class dlgOutfillingStationData Me.ucrNudCount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Name = "ucrNudCount" Me.ucrNudCount.Size = New System.Drawing.Size(75, 30) - Me.ucrNudCount.TabIndex = 56 + Me.ucrNudCount.TabIndex = 18 Me.ucrNudCount.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrNudDays @@ -251,16 +251,16 @@ Partial Class dlgOutfillingStationData Me.ucrNudDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Name = "ucrNudDays" Me.ucrNudDays.Size = New System.Drawing.Size(75, 30) - Me.ucrNudDays.TabIndex = 57 + Me.ucrNudDays.TabIndex = 20 Me.ucrNudDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblDays ' Me.lblDays.AutoSize = True - Me.lblDays.Location = New System.Drawing.Point(43, 407) + Me.lblDays.Location = New System.Drawing.Point(43, 400) Me.lblDays.Name = "lblDays" Me.lblDays.Size = New System.Drawing.Size(49, 20) - Me.lblDays.TabIndex = 58 + Me.lblDays.TabIndex = 19 Me.lblDays.Text = "Days:" ' 'lblCount @@ -269,17 +269,17 @@ Partial Class dlgOutfillingStationData Me.lblCount.Location = New System.Drawing.Point(36, 358) Me.lblCount.Name = "lblCount" Me.lblCount.Size = New System.Drawing.Size(56, 20) - Me.lblCount.TabIndex = 59 + Me.lblCount.TabIndex = 17 Me.lblCount.Text = "Count:" ' 'cmdOmitMonths ' Me.cmdOmitMonths.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOmitMonths.Location = New System.Drawing.Point(564, 481) + Me.cmdOmitMonths.Location = New System.Drawing.Point(564, 493) Me.cmdOmitMonths.Margin = New System.Windows.Forms.Padding(4) Me.cmdOmitMonths.Name = "cmdOmitMonths" Me.cmdOmitMonths.Size = New System.Drawing.Size(104, 66) - Me.cmdOmitMonths.TabIndex = 60 + Me.cmdOmitMonths.TabIndex = 26 Me.cmdOmitMonths.Text = "Omit Months" Me.cmdOmitMonths.UseVisualStyleBackColor = True ' @@ -293,7 +293,7 @@ Partial Class dlgOutfillingStationData Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputDist.Name = "ucrInputDist" Me.ucrInputDist.Size = New System.Drawing.Size(171, 32) - Me.ucrInputDist.TabIndex = 61 + Me.ucrInputDist.TabIndex = 22 ' 'ucrInputMarkov ' @@ -305,7 +305,7 @@ Partial Class dlgOutfillingStationData Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputMarkov.Name = "ucrInputMarkov" Me.ucrInputMarkov.Size = New System.Drawing.Size(173, 32) - Me.ucrInputMarkov.TabIndex = 62 + Me.ucrInputMarkov.TabIndex = 24 ' 'lblDist ' @@ -313,7 +313,7 @@ Partial Class dlgOutfillingStationData Me.lblDist.Location = New System.Drawing.Point(5, 441) Me.lblDist.Name = "lblDist" Me.lblDist.Size = New System.Drawing.Size(93, 20) - Me.lblDist.TabIndex = 63 + Me.lblDist.TabIndex = 21 Me.lblDist.Text = "Distribution:" ' 'lblMarkov @@ -322,18 +322,18 @@ Partial Class dlgOutfillingStationData Me.lblMarkov.Location = New System.Drawing.Point(28, 490) Me.lblMarkov.Name = "lblMarkov" Me.lblMarkov.Size = New System.Drawing.Size(64, 20) - Me.lblMarkov.TabIndex = 64 + Me.lblMarkov.TabIndex = 23 Me.lblMarkov.Text = "Markov:" ' 'ucrChkOmitMonths ' Me.ucrChkOmitMonths.AutoSize = True Me.ucrChkOmitMonths.Checked = False - Me.ucrChkOmitMonths.Location = New System.Drawing.Point(394, 497) + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(394, 509) Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" Me.ucrChkOmitMonths.Size = New System.Drawing.Size(150, 34) - Me.ucrChkOmitMonths.TabIndex = 65 + Me.ucrChkOmitMonths.TabIndex = 25 ' 'ucrInputSelectStation ' @@ -341,21 +341,21 @@ Partial Class dlgOutfillingStationData Me.ucrInputSelectStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputSelectStation.GetSetSelectedIndex = -1 Me.ucrInputSelectStation.IsReadOnly = False - Me.ucrInputSelectStation.Location = New System.Drawing.Point(497, 111) + Me.ucrInputSelectStation.Location = New System.Drawing.Point(492, 119) Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(21) Me.ucrInputSelectStation.Name = "ucrInputSelectStation" Me.ucrInputSelectStation.Size = New System.Drawing.Size(180, 34) - Me.ucrInputSelectStation.TabIndex = 93 + Me.ucrInputSelectStation.TabIndex = 4 ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label1.Location = New System.Drawing.Point(498, 87) + Me.Label1.Location = New System.Drawing.Point(496, 92) Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(146, 20) - Me.Label1.TabIndex = 92 + Me.Label1.TabIndex = 3 Me.Label1.Text = "Station To Exclude:" ' 'dlgOutfillingStationData diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index 70c29c5cce..0422c6eab5 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -89,18 +89,16 @@ Public Class dlgOutfillingStationData ucrInputBins.SetValidationTypeAsNumericList() ucrInputBins.SetItems({"1, 3, 5, 10, 15, 20", "1.5, 4, 8, 16, 32"}) ucrInputBins.AddQuotesIfUnrecognised = False - ucrInputBins.bAllowNonConditionValues = True ucrInputMarkov.SetParameter(New RParameter("markovflag", 6)) dctLogical.Add("TRUE", "TRUE") dctLogical.Add("FALSE", "FALSE") ucrInputMarkov.SetItems(dctLogical) - ucrInputMarkov.SetRDefault("TRUE") ucrInputMarkov.SetDropDownStyleAsNonEditable() ucrInputDist.SetParameter(New RParameter("distribution_flag", 7)) - dctDist.Add("Gamma", Chr(34) & "gamma" & Chr(34)) - dctDist.Add("Lognormal", Chr(34) & "lognormal" & Chr(34)) + dctDist.Add("gamma", Chr(34) & "gamma" & Chr(34)) + dctDist.Add("lognormal", Chr(34) & "lognormal" & Chr(34)) ucrInputDist.SetItems(dctDist) ucrInputDist.SetRDefault(Chr(34) & "gamma" & Chr(34)) ucrInputDist.SetDropDownStyleAsNonEditable() @@ -116,10 +114,9 @@ Public Class dlgOutfillingStationData ucrNudDays.SetRDefault(50) ucrChkOmitMonths.SetText("Dry Month(s)") - ucrChkOmitMonths.AddParameterValuesCondition(True, "omit", "False") - ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "True") + ucrChkOmitMonths.AddParameterValuesCondition(True, "omit", "True") + ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "False") - ucrInputSelectStation.SetParameter(New RParameter("station_to_exclude", 10)) ucrInputSelectStation.SetFactorReceiver(ucrReceiverStation) ucrInputSelectStation.strQuotes = "" End Sub @@ -132,7 +129,8 @@ Public Class dlgOutfillingStationData ucrSelectorOutfilling.Reset() ucrInputSelectStation.bFirstLevelDefault = True - + ucrInputBins.Reset() + ucrReceiverStation.SetMeAsReceiver() ucrInputBins.SetName("1, 3, 5, 10, 15, 20") @@ -141,6 +139,7 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.SetPackageName("outfillingR") clsDoFillingFunction.SetRCommand("do_infilling") clsDoFillingFunction.SetAssignTo("infill_data") + clsDoFillingFunction.AddParameter("markovflag", "TRUE", iPosition:=6) clsDataListFunction.SetRCommand("list") clsDataListFunction.AddParameter("infilled_data", clsRFunctionParameter:=clsDoFillingFunction, iPosition:=0) @@ -164,9 +163,9 @@ Public Class dlgOutfillingStationData ucrNudDays.SetRCode(clsDoFillingFunction, bReset) ucrInputDist.SetRCode(clsDoFillingFunction, bReset) ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) - ucrInputBins.SetRCode(clsDoFillingFunction, bReset) ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) ucrInputSelectStation.SetRCode(clsDoFillingFunction, bReset) + UpdateVisibility() End Sub Private Sub TestOkEnabled() @@ -188,6 +187,10 @@ Public Class dlgOutfillingStationData End Sub Private Sub ucrChkOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMonths.ControlValueChanged + UpdateVisibility() + End Sub + + Private Sub UpdateVisibility() cmdOmitMonths.Visible = ucrChkOmitMonths.Checked End Sub @@ -225,7 +228,7 @@ Public Class dlgOutfillingStationData Private Sub ucrInputMarkov_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputMarkov.ControlValueChanged If Not ucrInputMarkov.IsEmpty Then - clsDoFillingFunction.AddParameter("markovflag", "c(" & ucrInputMarkov.GetText & ")", iPosition:=5) + clsDoFillingFunction.AddParameter("markovflag", ucrInputMarkov.GetText, iPosition:=6) Else clsDoFillingFunction.RemoveParameterByName("markovflag") End If @@ -251,6 +254,11 @@ Public Class dlgOutfillingStationData TestOkEnabled() End Sub + 'Private Sub cmdOmitMonths_Click(sender As Object, e As EventArgs) Handles cmdOmitMonths.Click + ' sdgSelectMonth.ShowDialog() + ' bResetSubdialog = True + 'End Sub + Private Sub ucrInputSelectStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSelectStation.ControlValueChanged, ucrReceiverStation.ControlValueChanged If Not ucrReceiverStation.IsEmpty AndAlso Not ucrInputSelectStation.IsEmpty Then clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & ucrInputSelectStation.GetValue() & Chr(34), iPosition:=10) @@ -258,6 +266,5 @@ Public Class dlgOutfillingStationData Else clsDoFillingFunction.RemoveParameterByName("station_to_exclude") End If - End Sub End Class \ No newline at end of file From 7b33222fdf29093387741d043e4669794a3f33f8 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 23 Jan 2025 13:17:01 +0300 Subject: [PATCH 05/15] changes to the code --- .../R/dlgOutfillingStationData.Designer.vb | 31 ++++++++-------- .../R/dlgOutfillingStationData.vb | 37 +++++++++++++------ 2 files changed, 41 insertions(+), 27 deletions(-) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb index 5cce1f3bb9..be3f382b1d 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb @@ -42,7 +42,6 @@ Partial Class dlgOutfillingStationData Me.ucrNudDays = New instat.ucrNud() Me.lblDays = New System.Windows.Forms.Label() Me.lblCount = New System.Windows.Forms.Label() - Me.cmdOmitMonths = New System.Windows.Forms.Button() Me.ucrInputDist = New instat.ucrInputComboBox() Me.ucrInputMarkov = New instat.ucrInputComboBox() Me.lblDist = New System.Windows.Forms.Label() @@ -50,6 +49,7 @@ Partial Class dlgOutfillingStationData Me.ucrChkOmitMonths = New instat.ucrCheck() Me.ucrInputSelectStation = New instat.ucrInputFactorLevels() Me.Label1 = New System.Windows.Forms.Label() + Me.ucrInputOmitMonths = New instat.ucrInputComboBox() Me.SuspendLayout() ' 'ucrBase @@ -272,17 +272,6 @@ Partial Class dlgOutfillingStationData Me.lblCount.TabIndex = 17 Me.lblCount.Text = "Count:" ' - 'cmdOmitMonths - ' - Me.cmdOmitMonths.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdOmitMonths.Location = New System.Drawing.Point(564, 493) - Me.cmdOmitMonths.Margin = New System.Windows.Forms.Padding(4) - Me.cmdOmitMonths.Name = "cmdOmitMonths" - Me.cmdOmitMonths.Size = New System.Drawing.Size(104, 66) - Me.cmdOmitMonths.TabIndex = 26 - Me.cmdOmitMonths.Text = "Omit Months" - Me.cmdOmitMonths.UseVisualStyleBackColor = True - ' 'ucrInputDist ' Me.ucrInputDist.AddQuotesIfUnrecognised = True @@ -329,7 +318,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrChkOmitMonths.AutoSize = True Me.ucrChkOmitMonths.Checked = False - Me.ucrChkOmitMonths.Location = New System.Drawing.Point(394, 509) + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(379, 506) Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" Me.ucrChkOmitMonths.Size = New System.Drawing.Size(150, 34) @@ -358,11 +347,24 @@ Partial Class dlgOutfillingStationData Me.Label1.TabIndex = 3 Me.Label1.Text = "Station To Exclude:" ' + 'ucrInputOmitMonths + ' + Me.ucrInputOmitMonths.AddQuotesIfUnrecognised = True + Me.ucrInputOmitMonths.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputOmitMonths.GetSetSelectedIndex = -1 + Me.ucrInputOmitMonths.IsReadOnly = False + Me.ucrInputOmitMonths.Location = New System.Drawing.Point(516, 510) + Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputOmitMonths.Name = "ucrInputOmitMonths" + Me.ucrInputOmitMonths.Size = New System.Drawing.Size(171, 32) + Me.ucrInputOmitMonths.TabIndex = 28 + ' 'dlgOutfillingStationData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(694, 655) + Me.Controls.Add(Me.ucrInputOmitMonths) Me.Controls.Add(Me.ucrInputSelectStation) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.ucrChkOmitMonths) @@ -370,7 +372,6 @@ Partial Class dlgOutfillingStationData Me.Controls.Add(Me.lblDist) Me.Controls.Add(Me.ucrInputMarkov) Me.Controls.Add(Me.ucrInputDist) - Me.Controls.Add(Me.cmdOmitMonths) Me.Controls.Add(Me.lblCount) Me.Controls.Add(Me.lblDays) Me.Controls.Add(Me.ucrNudDays) @@ -426,8 +427,8 @@ Partial Class dlgOutfillingStationData Friend WithEvents lblDist As Label Friend WithEvents ucrInputMarkov As ucrInputComboBox Friend WithEvents ucrInputDist As ucrInputComboBox - Friend WithEvents cmdOmitMonths As Button Friend WithEvents ucrChkOmitMonths As ucrCheck Friend WithEvents ucrInputSelectStation As ucrInputFactorLevels Friend WithEvents Label1 As Label + Friend WithEvents ucrInputOmitMonths As ucrInputComboBox End Class diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index 0422c6eab5..a32263f832 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -87,9 +87,14 @@ Public Class dlgOutfillingStationData ucrInputBins.SetParameter(New RParameter("custom_bins", 5)) ucrInputBins.SetValidationTypeAsNumericList() - ucrInputBins.SetItems({"1, 3, 5, 10, 15, 20", "1.5, 4, 8, 16, 32"}) + ucrInputBins.SetItems({"1, 3, 5, 10, 15, 20", "1.2, 4, 8, 16, 32"}) ucrInputBins.AddQuotesIfUnrecognised = False + ucrInputOmitMonths.SetParameter(New RParameter("target_months", 10)) + ucrInputOmitMonths.SetValidationTypeAsNumericList() + ucrInputOmitMonths.SetItems({"5,6,7,8,9", "1, 2, 3, 11, 12", "1,2,12"}) + ucrInputOmitMonths.AddQuotesIfUnrecognised = False + ucrInputMarkov.SetParameter(New RParameter("markovflag", 6)) dctLogical.Add("TRUE", "TRUE") dctLogical.Add("FALSE", "FALSE") @@ -116,6 +121,7 @@ Public Class dlgOutfillingStationData ucrChkOmitMonths.SetText("Dry Month(s)") ucrChkOmitMonths.AddParameterValuesCondition(True, "omit", "True") ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "False") + ucrChkOmitMonths.AddToLinkedControls({ucrInputOmitMonths}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ', bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1.5) ucrInputSelectStation.SetFactorReceiver(ucrReceiverStation) ucrInputSelectStation.strQuotes = "" @@ -128,11 +134,13 @@ Public Class dlgOutfillingStationData clsDataListFunction = New RFunction ucrSelectorOutfilling.Reset() - ucrInputSelectStation.bFirstLevelDefault = True + ucrInputSelectStation.SetName("") ucrInputBins.Reset() + ucrInputSelectStation.Reset() ucrReceiverStation.SetMeAsReceiver() ucrInputBins.SetName("1, 3, 5, 10, 15, 20") + ucrInputOmitMonths.SetName("5,6,7,8,9") clsDummyFunction.AddParameter("omit", "False", iPosition:=0) @@ -140,6 +148,7 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.SetRCommand("do_infilling") clsDoFillingFunction.SetAssignTo("infill_data") clsDoFillingFunction.AddParameter("markovflag", "TRUE", iPosition:=6) + clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & "" & Chr(34), iPosition:=10) clsDataListFunction.SetRCommand("list") clsDataListFunction.AddParameter("infilled_data", clsRFunctionParameter:=clsDoFillingFunction, iPosition:=0) @@ -165,7 +174,7 @@ Public Class dlgOutfillingStationData ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) ucrInputSelectStation.SetRCode(clsDoFillingFunction, bReset) - UpdateVisibility() + AddTargetMonthsVar() End Sub Private Sub TestOkEnabled() @@ -187,11 +196,17 @@ Public Class dlgOutfillingStationData End Sub Private Sub ucrChkOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMonths.ControlValueChanged - UpdateVisibility() + AddTargetMonthsVar() End Sub - Private Sub UpdateVisibility() - cmdOmitMonths.Visible = ucrChkOmitMonths.Checked + Private Sub AddTargetMonthsVar() + If ucrChkOmitMonths.Checked AndAlso Not ucrInputOmitMonths.IsEmpty Then + clsDoFillingFunction.AddParameter("target_months", "c(" & ucrInputOmitMonths.GetText & ")", iPosition:=10) + clsDummyFunction.AddParameter("omit", "True", iPosition:=0) + Else + clsDoFillingFunction.RemoveParameterByName("target_months") + clsDummyFunction.AddParameter("omit", "False", iPosition:=0) + End If End Sub Private Sub ucrInputBins_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputBins.ControlValueChanged @@ -254,17 +269,15 @@ Public Class dlgOutfillingStationData TestOkEnabled() End Sub - 'Private Sub cmdOmitMonths_Click(sender As Object, e As EventArgs) Handles cmdOmitMonths.Click - ' sdgSelectMonth.ShowDialog() - ' bResetSubdialog = True - 'End Sub - Private Sub ucrInputSelectStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSelectStation.ControlValueChanged, ucrReceiverStation.ControlValueChanged If Not ucrReceiverStation.IsEmpty AndAlso Not ucrInputSelectStation.IsEmpty Then clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & ucrInputSelectStation.GetValue() & Chr(34), iPosition:=10) - Else clsDoFillingFunction.RemoveParameterByName("station_to_exclude") End If End Sub + + Private Sub ucrInputOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputOmitMonths.ControlValueChanged + AddTargetMonthsVar() + End Sub End Class \ No newline at end of file From 68dff728590f74b4f220c6bf85251b6e6c3ba8ed Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 24 Jan 2025 14:10:48 +0300 Subject: [PATCH 06/15] changes to the code --- .../R/dlgOutfillingStationData.Designer.vb | 210 +++++++++++------- .../R/dlgOutfillingStationData.vb | 60 ++++- 2 files changed, 186 insertions(+), 84 deletions(-) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb index be3f382b1d..96a4d0eb72 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb @@ -48,17 +48,19 @@ Partial Class dlgOutfillingStationData Me.lblMarkov = New System.Windows.Forms.Label() Me.ucrChkOmitMonths = New instat.ucrCheck() Me.ucrInputSelectStation = New instat.ucrInputFactorLevels() - Me.Label1 = New System.Windows.Forms.Label() Me.ucrInputOmitMonths = New instat.ucrInputComboBox() + Me.ucrChkStationToExclude = New instat.ucrCheck() + Me.ucrChkRandomSeed = New instat.ucrCheck() + Me.ucrNudRandomSeed = New instat.ucrNud() + Me.ucrSaveResultInto = New instat.ucrSave() Me.SuspendLayout() ' 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(16, 567) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Location = New System.Drawing.Point(6, 432) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(615, 78) + Me.ucrBase.Size = New System.Drawing.Size(410, 51) Me.ucrBase.TabIndex = 27 ' 'ucrSelectorOutfilling @@ -67,21 +69,21 @@ Partial Class dlgOutfillingStationData Me.ucrSelectorOutfilling.bDropUnusedFilterLevels = False Me.ucrSelectorOutfilling.bShowHiddenColumns = False Me.ucrSelectorOutfilling.bUseCurrentFilter = True - Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(9, 17) + Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(6, 10) Me.ucrSelectorOutfilling.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOutfilling.Name = "ucrSelectorOutfilling" - Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(318, 274) + Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorOutfilling.TabIndex = 0 ' 'ucrReceiverStation ' Me.ucrReceiverStation.AutoSize = True Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(492, 55) + Me.ucrReceiverStation.Location = New System.Drawing.Point(328, 39) Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverStation.Name = "ucrReceiverStation" Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 21) Me.ucrReceiverStation.strNcFilePath = "" Me.ucrReceiverStation.TabIndex = 2 Me.ucrReceiverStation.ucrSelector = Nothing @@ -90,11 +92,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 385) + Me.ucrReceiverRain.Location = New System.Drawing.Point(328, 221) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing - Me.ucrReceiverRain.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverRain.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverRain.strNcFilePath = "" Me.ucrReceiverRain.TabIndex = 12 Me.ucrReceiverRain.ucrSelector = Nothing @@ -103,11 +105,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLongitude.AutoSize = True Me.ucrReceiverLongitude.frmParent = Me - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 317) + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(328, 177) Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" Me.ucrReceiverLongitude.Selector = Nothing - Me.ucrReceiverLongitude.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(120, 21) Me.ucrReceiverLongitude.strNcFilePath = "" Me.ucrReceiverLongitude.TabIndex = 10 Me.ucrReceiverLongitude.ucrSelector = Nothing @@ -116,11 +118,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLatitude.AutoSize = True Me.ucrReceiverLatitude.frmParent = Me - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 250) + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(328, 130) Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" Me.ucrReceiverLatitude.Selector = Nothing - Me.ucrReceiverLatitude.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(120, 23) Me.ucrReceiverLatitude.strNcFilePath = "" Me.ucrReceiverLatitude.TabIndex = 8 Me.ucrReceiverLatitude.ucrSelector = Nothing @@ -129,11 +131,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 184) + Me.ucrReceiverDate.Location = New System.Drawing.Point(328, 83) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDate.strNcFilePath = "" Me.ucrReceiverDate.TabIndex = 6 Me.ucrReceiverDate.ucrSelector = Nothing @@ -142,11 +144,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverEstimates.AutoSize = True Me.ucrReceiverEstimates.frmParent = Me - Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 458) + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(328, 267) Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" Me.ucrReceiverEstimates.Selector = Nothing - Me.ucrReceiverEstimates.Size = New System.Drawing.Size(180, 30) + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 22) Me.ucrReceiverEstimates.strNcFilePath = "" Me.ucrReceiverEstimates.TabIndex = 14 Me.ucrReceiverEstimates.ucrSelector = Nothing @@ -154,54 +156,60 @@ Partial Class dlgOutfillingStationData 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(496, 28) + Me.lblStation.Location = New System.Drawing.Point(331, 21) + Me.lblStation.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) 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:" ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(496, 158) + Me.lblDate.Location = New System.Drawing.Point(331, 66) + Me.lblDate.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) 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 = 5 Me.lblDate.Text = "Date:" ' 'lblLatitude ' Me.lblLatitude.AutoSize = True - Me.lblLatitude.Location = New System.Drawing.Point(496, 223) + Me.lblLatitude.Location = New System.Drawing.Point(331, 113) + Me.lblLatitude.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblLatitude.Name = "lblLatitude" - Me.lblLatitude.Size = New System.Drawing.Size(71, 20) + Me.lblLatitude.Size = New System.Drawing.Size(48, 13) Me.lblLatitude.TabIndex = 7 Me.lblLatitude.Text = "Latitude:" ' 'lblLong ' Me.lblLong.AutoSize = True - Me.lblLong.Location = New System.Drawing.Point(496, 290) + Me.lblLong.Location = New System.Drawing.Point(331, 159) + Me.lblLong.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblLong.Name = "lblLong" - Me.lblLong.Size = New System.Drawing.Size(84, 20) + Me.lblLong.Size = New System.Drawing.Size(57, 13) Me.lblLong.TabIndex = 9 Me.lblLong.Text = "Longitude:" ' 'lblRain ' Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(496, 358) + Me.lblRain.Location = New System.Drawing.Point(331, 204) + Me.lblRain.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(46, 20) + Me.lblRain.Size = New System.Drawing.Size(32, 13) Me.lblRain.TabIndex = 11 Me.lblRain.Text = "Rain:" ' 'lblEstimates ' Me.lblEstimates.AutoSize = True - Me.lblEstimates.Location = New System.Drawing.Point(496, 431) + Me.lblEstimates.Location = New System.Drawing.Point(331, 248) + Me.lblEstimates.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblEstimates.Name = "lblEstimates" - Me.lblEstimates.Size = New System.Drawing.Size(84, 20) + Me.lblEstimates.Size = New System.Drawing.Size(55, 13) Me.lblEstimates.TabIndex = 13 Me.lblEstimates.Text = "Estimates:" ' @@ -211,18 +219,19 @@ Partial Class dlgOutfillingStationData Me.ucrInputBins.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputBins.GetSetSelectedIndex = -1 Me.ucrInputBins.IsReadOnly = False - Me.ucrInputBins.Location = New System.Drawing.Point(104, 304) - Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputBins.Location = New System.Drawing.Point(60, 324) + Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputBins.Name = "ucrInputBins" - Me.ucrInputBins.Size = New System.Drawing.Size(254, 32) + Me.ucrInputBins.Size = New System.Drawing.Size(132, 21) Me.ucrInputBins.TabIndex = 16 ' 'lblBins ' Me.lblBins.AutoSize = True - Me.lblBins.Location = New System.Drawing.Point(43, 309) + Me.lblBins.Location = New System.Drawing.Point(6, 328) + Me.lblBins.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblBins.Name = "lblBins" - Me.lblBins.Size = New System.Drawing.Size(44, 20) + Me.lblBins.Size = New System.Drawing.Size(30, 13) Me.lblBins.TabIndex = 15 Me.lblBins.Text = "Bins:" ' @@ -231,12 +240,12 @@ Partial Class dlgOutfillingStationData Me.ucrNudCount.AutoSize = True Me.ucrNudCount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCount.Location = New System.Drawing.Point(104, 353) - Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudCount.Location = New System.Drawing.Point(60, 356) + Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(4) Me.ucrNudCount.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudCount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Name = "ucrNudCount" - Me.ucrNudCount.Size = New System.Drawing.Size(75, 30) + Me.ucrNudCount.Size = New System.Drawing.Size(50, 32) Me.ucrNudCount.TabIndex = 18 Me.ucrNudCount.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -245,30 +254,32 @@ Partial Class dlgOutfillingStationData Me.ucrNudDays.AutoSize = True Me.ucrNudDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDays.Location = New System.Drawing.Point(104, 397) - Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudDays.Location = New System.Drawing.Point(328, 297) + Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(4) Me.ucrNudDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Name = "ucrNudDays" - Me.ucrNudDays.Size = New System.Drawing.Size(75, 30) + Me.ucrNudDays.Size = New System.Drawing.Size(50, 21) Me.ucrNudDays.TabIndex = 20 Me.ucrNudDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblDays ' Me.lblDays.AutoSize = True - Me.lblDays.Location = New System.Drawing.Point(43, 400) + Me.lblDays.Location = New System.Drawing.Point(291, 299) + Me.lblDays.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblDays.Name = "lblDays" - Me.lblDays.Size = New System.Drawing.Size(49, 20) + Me.lblDays.Size = New System.Drawing.Size(34, 13) Me.lblDays.TabIndex = 19 Me.lblDays.Text = "Days:" ' 'lblCount ' Me.lblCount.AutoSize = True - Me.lblCount.Location = New System.Drawing.Point(36, 358) + Me.lblCount.Location = New System.Drawing.Point(6, 360) + Me.lblCount.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblCount.Name = "lblCount" - Me.lblCount.Size = New System.Drawing.Size(56, 20) + Me.lblCount.Size = New System.Drawing.Size(38, 13) Me.lblCount.TabIndex = 17 Me.lblCount.Text = "Count:" ' @@ -278,10 +289,10 @@ Partial Class dlgOutfillingStationData Me.ucrInputDist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputDist.GetSetSelectedIndex = -1 Me.ucrInputDist.IsReadOnly = False - Me.ucrInputDist.Location = New System.Drawing.Point(104, 437) - Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputDist.Location = New System.Drawing.Point(328, 330) + Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputDist.Name = "ucrInputDist" - Me.ucrInputDist.Size = New System.Drawing.Size(171, 32) + Me.ucrInputDist.Size = New System.Drawing.Size(77, 21) Me.ucrInputDist.TabIndex = 22 ' 'ucrInputMarkov @@ -290,27 +301,29 @@ Partial Class dlgOutfillingStationData Me.ucrInputMarkov.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputMarkov.GetSetSelectedIndex = -1 Me.ucrInputMarkov.IsReadOnly = False - Me.ucrInputMarkov.Location = New System.Drawing.Point(104, 485) - Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputMarkov.Location = New System.Drawing.Point(328, 369) + Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputMarkov.Name = "ucrInputMarkov" - Me.ucrInputMarkov.Size = New System.Drawing.Size(173, 32) + Me.ucrInputMarkov.Size = New System.Drawing.Size(77, 21) Me.ucrInputMarkov.TabIndex = 24 ' 'lblDist ' Me.lblDist.AutoSize = True - Me.lblDist.Location = New System.Drawing.Point(5, 441) + Me.lblDist.Location = New System.Drawing.Point(264, 332) + Me.lblDist.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblDist.Name = "lblDist" - Me.lblDist.Size = New System.Drawing.Size(93, 20) + Me.lblDist.Size = New System.Drawing.Size(62, 13) Me.lblDist.TabIndex = 21 Me.lblDist.Text = "Distribution:" ' 'lblMarkov ' Me.lblMarkov.AutoSize = True - Me.lblMarkov.Location = New System.Drawing.Point(28, 490) + Me.lblMarkov.Location = New System.Drawing.Point(282, 372) + Me.lblMarkov.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMarkov.Name = "lblMarkov" - Me.lblMarkov.Size = New System.Drawing.Size(64, 20) + Me.lblMarkov.Size = New System.Drawing.Size(46, 13) Me.lblMarkov.TabIndex = 23 Me.lblMarkov.Text = "Markov:" ' @@ -318,10 +331,10 @@ Partial Class dlgOutfillingStationData ' Me.ucrChkOmitMonths.AutoSize = True Me.ucrChkOmitMonths.Checked = False - Me.ucrChkOmitMonths.Location = New System.Drawing.Point(379, 506) - Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(6, 245) + Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(4) Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" - Me.ucrChkOmitMonths.Size = New System.Drawing.Size(150, 34) + Me.ucrChkOmitMonths.Size = New System.Drawing.Size(100, 23) Me.ucrChkOmitMonths.TabIndex = 25 ' 'ucrInputSelectStation @@ -330,43 +343,78 @@ Partial Class dlgOutfillingStationData Me.ucrInputSelectStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputSelectStation.GetSetSelectedIndex = -1 Me.ucrInputSelectStation.IsReadOnly = False - Me.ucrInputSelectStation.Location = New System.Drawing.Point(492, 119) - Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(21) + Me.ucrInputSelectStation.Location = New System.Drawing.Point(128, 205) + Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(14) Me.ucrInputSelectStation.Name = "ucrInputSelectStation" - Me.ucrInputSelectStation.Size = New System.Drawing.Size(180, 34) + Me.ucrInputSelectStation.Size = New System.Drawing.Size(120, 22) Me.ucrInputSelectStation.TabIndex = 4 ' - 'Label1 - ' - Me.Label1.AutoSize = True - Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label1.Location = New System.Drawing.Point(496, 92) - Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(146, 20) - Me.Label1.TabIndex = 3 - Me.Label1.Text = "Station To Exclude:" - ' 'ucrInputOmitMonths ' Me.ucrInputOmitMonths.AddQuotesIfUnrecognised = True Me.ucrInputOmitMonths.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputOmitMonths.GetSetSelectedIndex = -1 Me.ucrInputOmitMonths.IsReadOnly = False - Me.ucrInputOmitMonths.Location = New System.Drawing.Point(516, 510) - Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputOmitMonths.Location = New System.Drawing.Point(128, 244) + Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputOmitMonths.Name = "ucrInputOmitMonths" - Me.ucrInputOmitMonths.Size = New System.Drawing.Size(171, 32) + Me.ucrInputOmitMonths.Size = New System.Drawing.Size(114, 21) Me.ucrInputOmitMonths.TabIndex = 28 ' + 'ucrChkStationToExclude + ' + Me.ucrChkStationToExclude.AutoSize = True + Me.ucrChkStationToExclude.Checked = False + Me.ucrChkStationToExclude.Location = New System.Drawing.Point(6, 205) + Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkStationToExclude.Name = "ucrChkStationToExclude" + Me.ucrChkStationToExclude.Size = New System.Drawing.Size(117, 23) + Me.ucrChkStationToExclude.TabIndex = 29 + ' + 'ucrChkRandomSeed + ' + Me.ucrChkRandomSeed.AutoSize = True + Me.ucrChkRandomSeed.Checked = False + Me.ucrChkRandomSeed.Location = New System.Drawing.Point(6, 282) + Me.ucrChkRandomSeed.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkRandomSeed.Name = "ucrChkRandomSeed" + Me.ucrChkRandomSeed.Size = New System.Drawing.Size(100, 23) + Me.ucrChkRandomSeed.TabIndex = 30 + ' + 'ucrNudRandomSeed + ' + Me.ucrNudRandomSeed.AutoSize = True + Me.ucrNudRandomSeed.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudRandomSeed.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudRandomSeed.Location = New System.Drawing.Point(128, 284) + Me.ucrNudRandomSeed.Margin = New System.Windows.Forms.Padding(4) + Me.ucrNudRandomSeed.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudRandomSeed.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudRandomSeed.Name = "ucrNudRandomSeed" + Me.ucrNudRandomSeed.Size = New System.Drawing.Size(78, 27) + Me.ucrNudRandomSeed.TabIndex = 31 + Me.ucrNudRandomSeed.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrSaveResultInto + ' + Me.ucrSaveResultInto.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveResultInto.Location = New System.Drawing.Point(6, 400) + Me.ucrSaveResultInto.Margin = New System.Windows.Forms.Padding(4, 6, 4, 6) + Me.ucrSaveResultInto.Name = "ucrSaveResultInto" + Me.ucrSaveResultInto.Size = New System.Drawing.Size(326, 21) + Me.ucrSaveResultInto.TabIndex = 197 + ' 'dlgOutfillingStationData ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(694, 655) + Me.ClientSize = New System.Drawing.Size(463, 496) + Me.Controls.Add(Me.ucrSaveResultInto) + Me.Controls.Add(Me.ucrNudRandomSeed) + Me.Controls.Add(Me.ucrChkRandomSeed) + Me.Controls.Add(Me.ucrChkStationToExclude) Me.Controls.Add(Me.ucrInputOmitMonths) Me.Controls.Add(Me.ucrInputSelectStation) - Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.ucrChkOmitMonths) Me.Controls.Add(Me.lblMarkov) Me.Controls.Add(Me.lblDist) @@ -393,6 +441,7 @@ Partial Class dlgOutfillingStationData Me.Controls.Add(Me.ucrSelectorOutfilling) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(2) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOutfillingStationData" @@ -429,6 +478,9 @@ Partial Class dlgOutfillingStationData Friend WithEvents ucrInputDist As ucrInputComboBox Friend WithEvents ucrChkOmitMonths As ucrCheck Friend WithEvents ucrInputSelectStation As ucrInputFactorLevels - Friend WithEvents Label1 As Label Friend WithEvents ucrInputOmitMonths As ucrInputComboBox + Friend WithEvents ucrNudRandomSeed As ucrNud + Friend WithEvents ucrChkRandomSeed As ucrCheck + Friend WithEvents ucrChkStationToExclude As ucrCheck + Friend WithEvents ucrSaveResultInto As ucrSave End Class diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index a32263f832..9804cbc4b1 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -121,10 +121,30 @@ Public Class dlgOutfillingStationData ucrChkOmitMonths.SetText("Dry Month(s)") ucrChkOmitMonths.AddParameterValuesCondition(True, "omit", "True") ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "False") - ucrChkOmitMonths.AddToLinkedControls({ucrInputOmitMonths}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ', bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1.5) + ucrChkOmitMonths.AddToLinkedControls({ucrInputOmitMonths}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrChkStationToExclude.SetText("Station(s) to Exclude") + ucrChkStationToExclude.AddParameterValuesCondition(True, "exclude", "True") + ucrChkStationToExclude.AddParameterValuesCondition(False, "exclude", "False") + ucrChkStationToExclude.AddToLinkedControls({ucrInputSelectStation}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrNudRandomSeed.SetParameter(New RParameter("set_seed", 10)) + ucrNudRandomSeed.SetMinMax(1, Integer.MaxValue) + + ucrChkRandomSeed.SetText("Random Seed") + ucrChkRandomSeed.AddParameterValuesCondition(True, "seed", "True") + ucrChkRandomSeed.AddParameterValuesCondition(False, "seed", "False") + ucrChkRandomSeed.AddToLinkedControls({ucrNudRandomSeed}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=999) ucrInputSelectStation.SetFactorReceiver(ucrReceiverStation) ucrInputSelectStation.strQuotes = "" + + ucrSaveResultInto.SetPrefix("outfilled") + ucrSaveResultInto.SetSaveTypeAsColumn() + ucrSaveResultInto.SetIsComboBox() + ucrSaveResultInto.SetCheckBoxText("Store Result") + ucrSaveResultInto.SetAssignToIfUncheckedValue("last_outfilled") + ucrSaveResultInto.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) End Sub Private Sub SetDefaults() @@ -139,16 +159,20 @@ Public Class dlgOutfillingStationData ucrInputSelectStation.Reset() ucrReceiverStation.SetMeAsReceiver() + ucrSaveResultInto.Reset() + ucrSaveResultInto.ucrChkSave.Checked = True + ucrInputBins.SetName("1, 3, 5, 10, 15, 20") ucrInputOmitMonths.SetName("5,6,7,8,9") clsDummyFunction.AddParameter("omit", "False", iPosition:=0) + clsDummyFunction.AddParameter("exclude", "False", iPosition:=1) + clsDummyFunction.AddParameter("seed", "False", iPosition:=2) clsDoFillingFunction.SetPackageName("outfillingR") clsDoFillingFunction.SetRCommand("do_infilling") clsDoFillingFunction.SetAssignTo("infill_data") clsDoFillingFunction.AddParameter("markovflag", "TRUE", iPosition:=6) - clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & "" & Chr(34), iPosition:=10) clsDataListFunction.SetRCommand("list") clsDataListFunction.AddParameter("infilled_data", clsRFunctionParameter:=clsDoFillingFunction, iPosition:=0) @@ -156,12 +180,20 @@ Public Class dlgOutfillingStationData clsBaseFunction.SetRCommand("data_book$import_data") clsBaseFunction.AddParameter("data_tables", clsRFunctionParameter:=clsDataListFunction, iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsBaseFunction) + ucrBase.clsRsyntax.SetBaseRFunction(clsDoFillingFunction) + ucrBase.clsRsyntax.SetAssignTo(ucrSaveResultInto.GetText(), strTempColumn:=ucrSaveResultInto.GetText(), + strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, + bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix, + bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames, + bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore, + bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength) End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrChkOmitMonths.SetRCode(clsDummyFunction, bReset) + ucrChkStationToExclude.SetRCode(clsDummyFunction, bReset) + ucrChkRandomSeed.SetRCode(clsDummyFunction, bReset) ucrSelectorOutfilling.SetRCode(clsDoFillingFunction, bReset) ucrReceiverDate.SetRCode(clsDoFillingFunction, bReset) ucrReceiverEstimates.SetRCode(clsDoFillingFunction, bReset) @@ -170,10 +202,15 @@ Public Class dlgOutfillingStationData ucrReceiverRain.SetRCode(clsDoFillingFunction, bReset) ucrNudCount.SetRCode(clsDoFillingFunction, bReset) ucrNudDays.SetRCode(clsDoFillingFunction, bReset) + ucrNudRandomSeed.SetRCode(clsDoFillingFunction, bReset) ucrInputDist.SetRCode(clsDoFillingFunction, bReset) ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) ucrInputSelectStation.SetRCode(clsDoFillingFunction, bReset) + ucrSaveResultInto.SetRCode(clsDoFillingFunction, bReset) + If bReset Then + + End If AddTargetMonthsVar() End Sub @@ -269,15 +306,28 @@ Public Class dlgOutfillingStationData TestOkEnabled() End Sub - Private Sub ucrInputSelectStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSelectStation.ControlValueChanged, ucrReceiverStation.ControlValueChanged - If Not ucrReceiverStation.IsEmpty AndAlso Not ucrInputSelectStation.IsEmpty Then + Private Sub ucrInputSelectStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSelectStation.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrChkStationToExclude.ControlValueChanged + If ucrChkStationToExclude.Checked AndAlso Not ucrReceiverStation.IsEmpty AndAlso Not ucrInputSelectStation.IsEmpty Then clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & ucrInputSelectStation.GetValue() & Chr(34), iPosition:=10) + clsDummyFunction.AddParameter("exclude", "True", iPosition:=1) Else clsDoFillingFunction.RemoveParameterByName("station_to_exclude") + clsDummyFunction.AddParameter("exclude", "False", iPosition:=1) End If End Sub Private Sub ucrInputOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputOmitMonths.ControlValueChanged AddTargetMonthsVar() End Sub + + Private Sub ucrNudRandomSeed_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudRandomSeed.ControlValueChanged, ucrChkRandomSeed.ControlValueChanged + If ucrChkRandomSeed.Checked AndAlso Not ucrNudRandomSeed.IsEmpty Then + clsDoFillingFunction.AddParameter("set_seed", ucrNudRandomSeed.GetText, iPosition:=10) + clsDummyFunction.AddParameter("seed", "True", iPosition:=2) + Else + clsDoFillingFunction.RemoveParameterByName("set_seed") + clsDummyFunction.AddParameter("seed", "False", iPosition:=2) + End If + End Sub + End Class \ No newline at end of file From c32edf6b99b16c4bdd896aa3c67bea632c905412 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 24 Jan 2025 14:12:18 +0300 Subject: [PATCH 07/15] changes --- .../InstatObject/R/dlgOutfillingStationData.vb | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb index 9804cbc4b1..ef3957590a 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ b/instat/static/InstatObject/R/dlgOutfillingStationData.vb @@ -19,10 +19,8 @@ Imports instat.Translations Public Class dlgOutfillingStationData Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private bResetSubdialog As Boolean = False Private clsDoFillingFunction As New RFunction Private clsDummyFunction As New RFunction - Private clsBaseFunction, clsDataListFunction As New RFunction Private Sub dlgOutfillingStationData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -150,8 +148,6 @@ Public Class dlgOutfillingStationData Private Sub SetDefaults() clsDoFillingFunction = New RFunction clsDummyFunction = New RFunction - clsBaseFunction = New RFunction - clsDataListFunction = New RFunction ucrSelectorOutfilling.Reset() ucrInputSelectStation.SetName("") @@ -174,12 +170,6 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.SetAssignTo("infill_data") clsDoFillingFunction.AddParameter("markovflag", "TRUE", iPosition:=6) - clsDataListFunction.SetRCommand("list") - clsDataListFunction.AddParameter("infilled_data", clsRFunctionParameter:=clsDoFillingFunction, iPosition:=0) - - clsBaseFunction.SetRCommand("data_book$import_data") - clsBaseFunction.AddParameter("data_tables", clsRFunctionParameter:=clsDataListFunction, iPosition:=0) - ucrBase.clsRsyntax.SetBaseRFunction(clsDoFillingFunction) ucrBase.clsRsyntax.SetAssignTo(ucrSaveResultInto.GetText(), strTempColumn:=ucrSaveResultInto.GetText(), strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, @@ -208,9 +198,6 @@ Public Class dlgOutfillingStationData ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) ucrInputSelectStation.SetRCode(clsDoFillingFunction, bReset) ucrSaveResultInto.SetRCode(clsDoFillingFunction, bReset) - If bReset Then - - End If AddTargetMonthsVar() End Sub From dde7391bf5c1c29efcc66d359a9c29163698053d Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 30 Jan 2025 10:56:27 +0300 Subject: [PATCH 08/15] changes to the code --- .../dlgOutfillingStationData.Designer.vb | 165 ++++++++---------- .../R => }/dlgOutfillingStationData.resx | 0 .../R => }/dlgOutfillingStationData.vb | 0 instat/instat.vbproj | 6 +- 4 files changed, 80 insertions(+), 91 deletions(-) rename instat/{static/InstatObject/R => }/dlgOutfillingStationData.Designer.vb (81%) rename instat/{static/InstatObject/R => }/dlgOutfillingStationData.resx (100%) rename instat/{static/InstatObject/R => }/dlgOutfillingStationData.vb (100%) diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/dlgOutfillingStationData.Designer.vb similarity index 81% rename from instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb rename to instat/dlgOutfillingStationData.Designer.vb index 96a4d0eb72..32bee74a02 100644 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ b/instat/dlgOutfillingStationData.Designer.vb @@ -58,9 +58,10 @@ Partial Class dlgOutfillingStationData 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(6, 432) + Me.ucrBase.Location = New System.Drawing.Point(9, 665) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 51) + Me.ucrBase.Size = New System.Drawing.Size(615, 78) Me.ucrBase.TabIndex = 27 ' 'ucrSelectorOutfilling @@ -69,21 +70,21 @@ Partial Class dlgOutfillingStationData Me.ucrSelectorOutfilling.bDropUnusedFilterLevels = False Me.ucrSelectorOutfilling.bShowHiddenColumns = False Me.ucrSelectorOutfilling.bUseCurrentFilter = True - Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(6, 10) + Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(9, 15) Me.ucrSelectorOutfilling.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOutfilling.Name = "ucrSelectorOutfilling" - Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(320, 282) Me.ucrSelectorOutfilling.TabIndex = 0 ' 'ucrReceiverStation ' Me.ucrReceiverStation.AutoSize = True Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(328, 39) + Me.ucrReceiverStation.Location = New System.Drawing.Point(492, 60) 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, 21) + Me.ucrReceiverStation.Size = New System.Drawing.Size(180, 32) Me.ucrReceiverStation.strNcFilePath = "" Me.ucrReceiverStation.TabIndex = 2 Me.ucrReceiverStation.ucrSelector = Nothing @@ -92,11 +93,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(328, 221) + Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 340) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing - Me.ucrReceiverRain.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverRain.Size = New System.Drawing.Size(180, 31) Me.ucrReceiverRain.strNcFilePath = "" Me.ucrReceiverRain.TabIndex = 12 Me.ucrReceiverRain.ucrSelector = Nothing @@ -105,11 +106,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLongitude.AutoSize = True Me.ucrReceiverLongitude.frmParent = Me - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(328, 177) + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 272) Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" Me.ucrReceiverLongitude.Selector = Nothing - Me.ucrReceiverLongitude.Size = New System.Drawing.Size(120, 21) + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(180, 32) Me.ucrReceiverLongitude.strNcFilePath = "" Me.ucrReceiverLongitude.TabIndex = 10 Me.ucrReceiverLongitude.ucrSelector = Nothing @@ -118,11 +119,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLatitude.AutoSize = True Me.ucrReceiverLatitude.frmParent = Me - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(328, 130) + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 200) 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, 23) + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(180, 35) Me.ucrReceiverLatitude.strNcFilePath = "" Me.ucrReceiverLatitude.TabIndex = 8 Me.ucrReceiverLatitude.ucrSelector = Nothing @@ -131,11 +132,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(328, 83) + Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 128) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDate.Size = New System.Drawing.Size(180, 31) Me.ucrReceiverDate.strNcFilePath = "" Me.ucrReceiverDate.TabIndex = 6 Me.ucrReceiverDate.ucrSelector = Nothing @@ -144,11 +145,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverEstimates.AutoSize = True Me.ucrReceiverEstimates.frmParent = Me - Me.ucrReceiverEstimates.Location = New System.Drawing.Point(328, 267) + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 411) Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" Me.ucrReceiverEstimates.Selector = Nothing - Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 22) + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(180, 34) Me.ucrReceiverEstimates.strNcFilePath = "" Me.ucrReceiverEstimates.TabIndex = 14 Me.ucrReceiverEstimates.ucrSelector = Nothing @@ -156,60 +157,54 @@ Partial Class dlgOutfillingStationData 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(331, 21) - Me.lblStation.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblStation.Location = New System.Drawing.Point(496, 32) Me.lblStation.Name = "lblStation" - Me.lblStation.Size = New System.Drawing.Size(43, 13) + Me.lblStation.Size = New System.Drawing.Size(64, 20) Me.lblStation.TabIndex = 1 Me.lblStation.Text = "Station:" ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(331, 66) - Me.lblDate.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblDate.Location = New System.Drawing.Point(496, 102) Me.lblDate.Name = "lblDate" - Me.lblDate.Size = New System.Drawing.Size(33, 13) + Me.lblDate.Size = New System.Drawing.Size(48, 20) Me.lblDate.TabIndex = 5 Me.lblDate.Text = "Date:" ' 'lblLatitude ' Me.lblLatitude.AutoSize = True - Me.lblLatitude.Location = New System.Drawing.Point(331, 113) - Me.lblLatitude.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblLatitude.Location = New System.Drawing.Point(496, 174) Me.lblLatitude.Name = "lblLatitude" - Me.lblLatitude.Size = New System.Drawing.Size(48, 13) + Me.lblLatitude.Size = New System.Drawing.Size(71, 20) Me.lblLatitude.TabIndex = 7 Me.lblLatitude.Text = "Latitude:" ' 'lblLong ' Me.lblLong.AutoSize = True - Me.lblLong.Location = New System.Drawing.Point(331, 159) - Me.lblLong.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblLong.Location = New System.Drawing.Point(496, 245) Me.lblLong.Name = "lblLong" - Me.lblLong.Size = New System.Drawing.Size(57, 13) + Me.lblLong.Size = New System.Drawing.Size(84, 20) Me.lblLong.TabIndex = 9 Me.lblLong.Text = "Longitude:" ' 'lblRain ' Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(331, 204) - Me.lblRain.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblRain.Location = New System.Drawing.Point(496, 314) Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(32, 13) + Me.lblRain.Size = New System.Drawing.Size(46, 20) Me.lblRain.TabIndex = 11 Me.lblRain.Text = "Rain:" ' 'lblEstimates ' Me.lblEstimates.AutoSize = True - Me.lblEstimates.Location = New System.Drawing.Point(331, 248) - Me.lblEstimates.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblEstimates.Location = New System.Drawing.Point(496, 382) Me.lblEstimates.Name = "lblEstimates" - Me.lblEstimates.Size = New System.Drawing.Size(55, 13) + Me.lblEstimates.Size = New System.Drawing.Size(84, 20) Me.lblEstimates.TabIndex = 13 Me.lblEstimates.Text = "Estimates:" ' @@ -219,19 +214,18 @@ Partial Class dlgOutfillingStationData Me.ucrInputBins.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputBins.GetSetSelectedIndex = -1 Me.ucrInputBins.IsReadOnly = False - Me.ucrInputBins.Location = New System.Drawing.Point(60, 324) - Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputBins.Location = New System.Drawing.Point(90, 498) + Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) Me.ucrInputBins.Name = "ucrInputBins" - Me.ucrInputBins.Size = New System.Drawing.Size(132, 21) + Me.ucrInputBins.Size = New System.Drawing.Size(198, 32) Me.ucrInputBins.TabIndex = 16 ' 'lblBins ' Me.lblBins.AutoSize = True - Me.lblBins.Location = New System.Drawing.Point(6, 328) - Me.lblBins.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblBins.Location = New System.Drawing.Point(9, 505) Me.lblBins.Name = "lblBins" - Me.lblBins.Size = New System.Drawing.Size(30, 13) + Me.lblBins.Size = New System.Drawing.Size(44, 20) Me.lblBins.TabIndex = 15 Me.lblBins.Text = "Bins:" ' @@ -240,12 +234,12 @@ Partial Class dlgOutfillingStationData Me.ucrNudCount.AutoSize = True Me.ucrNudCount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCount.Location = New System.Drawing.Point(60, 356) - Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(4) + Me.ucrNudCount.Location = New System.Drawing.Point(90, 548) + Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudCount.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudCount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Name = "ucrNudCount" - Me.ucrNudCount.Size = New System.Drawing.Size(50, 32) + Me.ucrNudCount.Size = New System.Drawing.Size(75, 49) Me.ucrNudCount.TabIndex = 18 Me.ucrNudCount.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -254,32 +248,30 @@ Partial Class dlgOutfillingStationData Me.ucrNudDays.AutoSize = True Me.ucrNudDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDays.Location = New System.Drawing.Point(328, 297) - Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(4) + Me.ucrNudDays.Location = New System.Drawing.Point(492, 457) + Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Name = "ucrNudDays" - Me.ucrNudDays.Size = New System.Drawing.Size(50, 21) + Me.ucrNudDays.Size = New System.Drawing.Size(75, 32) Me.ucrNudDays.TabIndex = 20 Me.ucrNudDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblDays ' Me.lblDays.AutoSize = True - Me.lblDays.Location = New System.Drawing.Point(291, 299) - Me.lblDays.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblDays.Location = New System.Drawing.Point(436, 460) Me.lblDays.Name = "lblDays" - Me.lblDays.Size = New System.Drawing.Size(34, 13) + Me.lblDays.Size = New System.Drawing.Size(49, 20) Me.lblDays.TabIndex = 19 Me.lblDays.Text = "Days:" ' 'lblCount ' Me.lblCount.AutoSize = True - Me.lblCount.Location = New System.Drawing.Point(6, 360) - Me.lblCount.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblCount.Location = New System.Drawing.Point(9, 554) Me.lblCount.Name = "lblCount" - Me.lblCount.Size = New System.Drawing.Size(38, 13) + Me.lblCount.Size = New System.Drawing.Size(56, 20) Me.lblCount.TabIndex = 17 Me.lblCount.Text = "Count:" ' @@ -289,10 +281,10 @@ Partial Class dlgOutfillingStationData Me.ucrInputDist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputDist.GetSetSelectedIndex = -1 Me.ucrInputDist.IsReadOnly = False - Me.ucrInputDist.Location = New System.Drawing.Point(328, 330) - Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(6) + Me.ucrInputDist.Location = New System.Drawing.Point(492, 508) + Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputDist.Name = "ucrInputDist" - Me.ucrInputDist.Size = New System.Drawing.Size(77, 21) + Me.ucrInputDist.Size = New System.Drawing.Size(116, 32) Me.ucrInputDist.TabIndex = 22 ' 'ucrInputMarkov @@ -301,29 +293,27 @@ Partial Class dlgOutfillingStationData Me.ucrInputMarkov.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputMarkov.GetSetSelectedIndex = -1 Me.ucrInputMarkov.IsReadOnly = False - Me.ucrInputMarkov.Location = New System.Drawing.Point(328, 369) - Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(6) + Me.ucrInputMarkov.Location = New System.Drawing.Point(492, 568) + Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) Me.ucrInputMarkov.Name = "ucrInputMarkov" - Me.ucrInputMarkov.Size = New System.Drawing.Size(77, 21) + Me.ucrInputMarkov.Size = New System.Drawing.Size(116, 32) Me.ucrInputMarkov.TabIndex = 24 ' 'lblDist ' Me.lblDist.AutoSize = True - Me.lblDist.Location = New System.Drawing.Point(264, 332) - Me.lblDist.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblDist.Location = New System.Drawing.Point(396, 511) Me.lblDist.Name = "lblDist" - Me.lblDist.Size = New System.Drawing.Size(62, 13) + Me.lblDist.Size = New System.Drawing.Size(93, 20) Me.lblDist.TabIndex = 21 Me.lblDist.Text = "Distribution:" ' 'lblMarkov ' Me.lblMarkov.AutoSize = True - Me.lblMarkov.Location = New System.Drawing.Point(282, 372) - Me.lblMarkov.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblMarkov.Location = New System.Drawing.Point(423, 572) Me.lblMarkov.Name = "lblMarkov" - Me.lblMarkov.Size = New System.Drawing.Size(46, 13) + Me.lblMarkov.Size = New System.Drawing.Size(64, 20) Me.lblMarkov.TabIndex = 23 Me.lblMarkov.Text = "Markov:" ' @@ -331,10 +321,10 @@ Partial Class dlgOutfillingStationData ' Me.ucrChkOmitMonths.AutoSize = True Me.ucrChkOmitMonths.Checked = False - Me.ucrChkOmitMonths.Location = New System.Drawing.Point(6, 245) - Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(9, 377) + Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" - Me.ucrChkOmitMonths.Size = New System.Drawing.Size(100, 23) + Me.ucrChkOmitMonths.Size = New System.Drawing.Size(171, 35) Me.ucrChkOmitMonths.TabIndex = 25 ' 'ucrInputSelectStation @@ -343,10 +333,10 @@ Partial Class dlgOutfillingStationData Me.ucrInputSelectStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputSelectStation.GetSetSelectedIndex = -1 Me.ucrInputSelectStation.IsReadOnly = False - Me.ucrInputSelectStation.Location = New System.Drawing.Point(128, 205) - Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(14) + Me.ucrInputSelectStation.Location = New System.Drawing.Point(200, 315) + Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(21, 22, 21, 22) Me.ucrInputSelectStation.Name = "ucrInputSelectStation" - Me.ucrInputSelectStation.Size = New System.Drawing.Size(120, 22) + Me.ucrInputSelectStation.Size = New System.Drawing.Size(180, 34) Me.ucrInputSelectStation.TabIndex = 4 ' 'ucrInputOmitMonths @@ -355,30 +345,30 @@ Partial Class dlgOutfillingStationData Me.ucrInputOmitMonths.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputOmitMonths.GetSetSelectedIndex = -1 Me.ucrInputOmitMonths.IsReadOnly = False - Me.ucrInputOmitMonths.Location = New System.Drawing.Point(128, 244) - Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputOmitMonths.Location = New System.Drawing.Point(200, 375) + Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) Me.ucrInputOmitMonths.Name = "ucrInputOmitMonths" - Me.ucrInputOmitMonths.Size = New System.Drawing.Size(114, 21) + Me.ucrInputOmitMonths.Size = New System.Drawing.Size(171, 32) Me.ucrInputOmitMonths.TabIndex = 28 ' 'ucrChkStationToExclude ' Me.ucrChkStationToExclude.AutoSize = True Me.ucrChkStationToExclude.Checked = False - Me.ucrChkStationToExclude.Location = New System.Drawing.Point(6, 205) - Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkStationToExclude.Location = New System.Drawing.Point(9, 315) + Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkStationToExclude.Name = "ucrChkStationToExclude" - Me.ucrChkStationToExclude.Size = New System.Drawing.Size(117, 23) + Me.ucrChkStationToExclude.Size = New System.Drawing.Size(188, 35) Me.ucrChkStationToExclude.TabIndex = 29 ' 'ucrChkRandomSeed ' Me.ucrChkRandomSeed.AutoSize = True Me.ucrChkRandomSeed.Checked = False - Me.ucrChkRandomSeed.Location = New System.Drawing.Point(6, 282) - Me.ucrChkRandomSeed.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkRandomSeed.Location = New System.Drawing.Point(9, 434) + Me.ucrChkRandomSeed.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrChkRandomSeed.Name = "ucrChkRandomSeed" - Me.ucrChkRandomSeed.Size = New System.Drawing.Size(100, 23) + Me.ucrChkRandomSeed.Size = New System.Drawing.Size(176, 35) Me.ucrChkRandomSeed.TabIndex = 30 ' 'ucrNudRandomSeed @@ -386,29 +376,29 @@ Partial Class dlgOutfillingStationData Me.ucrNudRandomSeed.AutoSize = True Me.ucrNudRandomSeed.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudRandomSeed.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudRandomSeed.Location = New System.Drawing.Point(128, 284) - Me.ucrNudRandomSeed.Margin = New System.Windows.Forms.Padding(4) + Me.ucrNudRandomSeed.Location = New System.Drawing.Point(200, 437) + Me.ucrNudRandomSeed.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) Me.ucrNudRandomSeed.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudRandomSeed.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudRandomSeed.Name = "ucrNudRandomSeed" - Me.ucrNudRandomSeed.Size = New System.Drawing.Size(78, 27) + Me.ucrNudRandomSeed.Size = New System.Drawing.Size(117, 42) Me.ucrNudRandomSeed.TabIndex = 31 Me.ucrNudRandomSeed.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrSaveResultInto ' Me.ucrSaveResultInto.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveResultInto.Location = New System.Drawing.Point(6, 400) - Me.ucrSaveResultInto.Margin = New System.Windows.Forms.Padding(4, 6, 4, 6) + Me.ucrSaveResultInto.Location = New System.Drawing.Point(9, 615) + Me.ucrSaveResultInto.Margin = New System.Windows.Forms.Padding(6, 9, 6, 9) Me.ucrSaveResultInto.Name = "ucrSaveResultInto" - Me.ucrSaveResultInto.Size = New System.Drawing.Size(326, 21) + Me.ucrSaveResultInto.Size = New System.Drawing.Size(489, 32) Me.ucrSaveResultInto.TabIndex = 197 ' 'dlgOutfillingStationData ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(463, 496) + Me.ClientSize = New System.Drawing.Size(694, 763) Me.Controls.Add(Me.ucrSaveResultInto) Me.Controls.Add(Me.ucrNudRandomSeed) Me.Controls.Add(Me.ucrChkRandomSeed) @@ -441,7 +431,6 @@ Partial Class dlgOutfillingStationData Me.Controls.Add(Me.ucrSelectorOutfilling) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(2) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOutfillingStationData" diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.resx b/instat/dlgOutfillingStationData.resx similarity index 100% rename from instat/static/InstatObject/R/dlgOutfillingStationData.resx rename to instat/dlgOutfillingStationData.resx diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb similarity index 100% rename from instat/static/InstatObject/R/dlgOutfillingStationData.vb rename to instat/dlgOutfillingStationData.vb diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 22cb6700b6..eb67168f9e 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -391,10 +391,10 @@ Form - + dlgOutfillingStationData.vb - + Form @@ -3450,7 +3450,7 @@ sdgSummaryThemes.vb - + dlgOutfillingStationData.vb From 1674e855f3e035562de5f128e6cd803e2884f03f Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 10 Feb 2025 16:13:38 +0300 Subject: [PATCH 09/15] changes --- instat/dlgOutfillingStationData.Designer.vb | 203 +++++++++++--------- instat/dlgOutfillingStationData.vb | 94 ++++++--- instat/sdgFiltersFromFactor.vb | 13 ++ 3 files changed, 182 insertions(+), 128 deletions(-) diff --git a/instat/dlgOutfillingStationData.Designer.vb b/instat/dlgOutfillingStationData.Designer.vb index 32bee74a02..7dc03aed73 100644 --- a/instat/dlgOutfillingStationData.Designer.vb +++ b/instat/dlgOutfillingStationData.Designer.vb @@ -47,21 +47,21 @@ Partial Class dlgOutfillingStationData Me.lblDist = New System.Windows.Forms.Label() Me.lblMarkov = New System.Windows.Forms.Label() Me.ucrChkOmitMonths = New instat.ucrCheck() - Me.ucrInputSelectStation = New instat.ucrInputFactorLevels() Me.ucrInputOmitMonths = New instat.ucrInputComboBox() Me.ucrChkStationToExclude = New instat.ucrCheck() Me.ucrChkRandomSeed = New instat.ucrCheck() Me.ucrNudRandomSeed = New instat.ucrNud() - Me.ucrSaveResultInto = New instat.ucrSave() + Me.ucrSaveColumn = New instat.ucrSave() + Me.cmdFilterFromFactors = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(9, 665) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrBase.Location = New System.Drawing.Point(6, 432) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(615, 78) + Me.ucrBase.Size = New System.Drawing.Size(410, 51) Me.ucrBase.TabIndex = 27 ' 'ucrSelectorOutfilling @@ -70,21 +70,21 @@ Partial Class dlgOutfillingStationData Me.ucrSelectorOutfilling.bDropUnusedFilterLevels = False Me.ucrSelectorOutfilling.bShowHiddenColumns = False Me.ucrSelectorOutfilling.bUseCurrentFilter = True - Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(9, 15) + Me.ucrSelectorOutfilling.Location = New System.Drawing.Point(6, 10) Me.ucrSelectorOutfilling.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOutfilling.Name = "ucrSelectorOutfilling" - Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(320, 282) + Me.ucrSelectorOutfilling.Size = New System.Drawing.Size(213, 183) Me.ucrSelectorOutfilling.TabIndex = 0 ' 'ucrReceiverStation ' Me.ucrReceiverStation.AutoSize = True Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(492, 60) + Me.ucrReceiverStation.Location = New System.Drawing.Point(328, 39) Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverStation.Name = "ucrReceiverStation" Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(180, 32) + Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 21) Me.ucrReceiverStation.strNcFilePath = "" Me.ucrReceiverStation.TabIndex = 2 Me.ucrReceiverStation.ucrSelector = Nothing @@ -93,11 +93,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(492, 340) + Me.ucrReceiverRain.Location = New System.Drawing.Point(328, 221) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing - Me.ucrReceiverRain.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverRain.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverRain.strNcFilePath = "" Me.ucrReceiverRain.TabIndex = 12 Me.ucrReceiverRain.ucrSelector = Nothing @@ -106,11 +106,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLongitude.AutoSize = True Me.ucrReceiverLongitude.frmParent = Me - Me.ucrReceiverLongitude.Location = New System.Drawing.Point(492, 272) + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(328, 177) Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" Me.ucrReceiverLongitude.Selector = Nothing - Me.ucrReceiverLongitude.Size = New System.Drawing.Size(180, 32) + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(120, 21) Me.ucrReceiverLongitude.strNcFilePath = "" Me.ucrReceiverLongitude.TabIndex = 10 Me.ucrReceiverLongitude.ucrSelector = Nothing @@ -119,11 +119,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverLatitude.AutoSize = True Me.ucrReceiverLatitude.frmParent = Me - Me.ucrReceiverLatitude.Location = New System.Drawing.Point(492, 200) + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(328, 130) Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" Me.ucrReceiverLatitude.Selector = Nothing - Me.ucrReceiverLatitude.Size = New System.Drawing.Size(180, 35) + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(120, 23) Me.ucrReceiverLatitude.strNcFilePath = "" Me.ucrReceiverLatitude.TabIndex = 8 Me.ucrReceiverLatitude.ucrSelector = Nothing @@ -132,11 +132,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(492, 128) + Me.ucrReceiverDate.Location = New System.Drawing.Point(328, 83) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDate.strNcFilePath = "" Me.ucrReceiverDate.TabIndex = 6 Me.ucrReceiverDate.ucrSelector = Nothing @@ -145,11 +145,11 @@ Partial Class dlgOutfillingStationData ' Me.ucrReceiverEstimates.AutoSize = True Me.ucrReceiverEstimates.frmParent = Me - Me.ucrReceiverEstimates.Location = New System.Drawing.Point(492, 411) + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(328, 267) Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" Me.ucrReceiverEstimates.Selector = Nothing - Me.ucrReceiverEstimates.Size = New System.Drawing.Size(180, 34) + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 22) Me.ucrReceiverEstimates.strNcFilePath = "" Me.ucrReceiverEstimates.TabIndex = 14 Me.ucrReceiverEstimates.ucrSelector = Nothing @@ -157,54 +157,60 @@ Partial Class dlgOutfillingStationData 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(496, 32) + Me.lblStation.Location = New System.Drawing.Point(331, 21) + Me.lblStation.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) 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:" ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(496, 102) + Me.lblDate.Location = New System.Drawing.Point(331, 66) + Me.lblDate.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) 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 = 5 Me.lblDate.Text = "Date:" ' 'lblLatitude ' Me.lblLatitude.AutoSize = True - Me.lblLatitude.Location = New System.Drawing.Point(496, 174) + Me.lblLatitude.Location = New System.Drawing.Point(331, 113) + Me.lblLatitude.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblLatitude.Name = "lblLatitude" - Me.lblLatitude.Size = New System.Drawing.Size(71, 20) + Me.lblLatitude.Size = New System.Drawing.Size(48, 13) Me.lblLatitude.TabIndex = 7 Me.lblLatitude.Text = "Latitude:" ' 'lblLong ' Me.lblLong.AutoSize = True - Me.lblLong.Location = New System.Drawing.Point(496, 245) + Me.lblLong.Location = New System.Drawing.Point(331, 159) + Me.lblLong.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblLong.Name = "lblLong" - Me.lblLong.Size = New System.Drawing.Size(84, 20) + Me.lblLong.Size = New System.Drawing.Size(57, 13) Me.lblLong.TabIndex = 9 Me.lblLong.Text = "Longitude:" ' 'lblRain ' Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(496, 314) + Me.lblRain.Location = New System.Drawing.Point(331, 204) + Me.lblRain.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(46, 20) + Me.lblRain.Size = New System.Drawing.Size(32, 13) Me.lblRain.TabIndex = 11 Me.lblRain.Text = "Rain:" ' 'lblEstimates ' Me.lblEstimates.AutoSize = True - Me.lblEstimates.Location = New System.Drawing.Point(496, 382) + Me.lblEstimates.Location = New System.Drawing.Point(331, 248) + Me.lblEstimates.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblEstimates.Name = "lblEstimates" - Me.lblEstimates.Size = New System.Drawing.Size(84, 20) + Me.lblEstimates.Size = New System.Drawing.Size(55, 13) Me.lblEstimates.TabIndex = 13 Me.lblEstimates.Text = "Estimates:" ' @@ -214,18 +220,19 @@ Partial Class dlgOutfillingStationData Me.ucrInputBins.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputBins.GetSetSelectedIndex = -1 Me.ucrInputBins.IsReadOnly = False - Me.ucrInputBins.Location = New System.Drawing.Point(90, 498) - Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) + Me.ucrInputBins.Location = New System.Drawing.Point(60, 324) + Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputBins.Name = "ucrInputBins" - Me.ucrInputBins.Size = New System.Drawing.Size(198, 32) + Me.ucrInputBins.Size = New System.Drawing.Size(132, 21) Me.ucrInputBins.TabIndex = 16 ' 'lblBins ' Me.lblBins.AutoSize = True - Me.lblBins.Location = New System.Drawing.Point(9, 505) + Me.lblBins.Location = New System.Drawing.Point(6, 328) + Me.lblBins.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblBins.Name = "lblBins" - Me.lblBins.Size = New System.Drawing.Size(44, 20) + Me.lblBins.Size = New System.Drawing.Size(30, 13) Me.lblBins.TabIndex = 15 Me.lblBins.Text = "Bins:" ' @@ -234,12 +241,12 @@ Partial Class dlgOutfillingStationData Me.ucrNudCount.AutoSize = True Me.ucrNudCount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCount.Location = New System.Drawing.Point(90, 548) - Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudCount.Location = New System.Drawing.Point(60, 356) + Me.ucrNudCount.Margin = New System.Windows.Forms.Padding(4) Me.ucrNudCount.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudCount.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCount.Name = "ucrNudCount" - Me.ucrNudCount.Size = New System.Drawing.Size(75, 49) + Me.ucrNudCount.Size = New System.Drawing.Size(50, 32) Me.ucrNudCount.TabIndex = 18 Me.ucrNudCount.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -248,30 +255,32 @@ Partial Class dlgOutfillingStationData Me.ucrNudDays.AutoSize = True Me.ucrNudDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDays.Location = New System.Drawing.Point(492, 457) - Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudDays.Location = New System.Drawing.Point(328, 297) + Me.ucrNudDays.Margin = New System.Windows.Forms.Padding(4) Me.ucrNudDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDays.Name = "ucrNudDays" - Me.ucrNudDays.Size = New System.Drawing.Size(75, 32) + Me.ucrNudDays.Size = New System.Drawing.Size(50, 21) Me.ucrNudDays.TabIndex = 20 Me.ucrNudDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblDays ' Me.lblDays.AutoSize = True - Me.lblDays.Location = New System.Drawing.Point(436, 460) + Me.lblDays.Location = New System.Drawing.Point(291, 299) + Me.lblDays.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblDays.Name = "lblDays" - Me.lblDays.Size = New System.Drawing.Size(49, 20) + Me.lblDays.Size = New System.Drawing.Size(34, 13) Me.lblDays.TabIndex = 19 Me.lblDays.Text = "Days:" ' 'lblCount ' Me.lblCount.AutoSize = True - Me.lblCount.Location = New System.Drawing.Point(9, 554) + Me.lblCount.Location = New System.Drawing.Point(6, 360) + Me.lblCount.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblCount.Name = "lblCount" - Me.lblCount.Size = New System.Drawing.Size(56, 20) + Me.lblCount.Size = New System.Drawing.Size(38, 13) Me.lblCount.TabIndex = 17 Me.lblCount.Text = "Count:" ' @@ -281,10 +290,10 @@ Partial Class dlgOutfillingStationData Me.ucrInputDist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputDist.GetSetSelectedIndex = -1 Me.ucrInputDist.IsReadOnly = False - Me.ucrInputDist.Location = New System.Drawing.Point(492, 508) - Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputDist.Location = New System.Drawing.Point(328, 330) + Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputDist.Name = "ucrInputDist" - Me.ucrInputDist.Size = New System.Drawing.Size(116, 32) + Me.ucrInputDist.Size = New System.Drawing.Size(77, 21) Me.ucrInputDist.TabIndex = 22 ' 'ucrInputMarkov @@ -293,27 +302,29 @@ Partial Class dlgOutfillingStationData Me.ucrInputMarkov.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputMarkov.GetSetSelectedIndex = -1 Me.ucrInputMarkov.IsReadOnly = False - Me.ucrInputMarkov.Location = New System.Drawing.Point(492, 568) - Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(9, 9, 9, 9) + Me.ucrInputMarkov.Location = New System.Drawing.Point(328, 369) + Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(6) Me.ucrInputMarkov.Name = "ucrInputMarkov" - Me.ucrInputMarkov.Size = New System.Drawing.Size(116, 32) + Me.ucrInputMarkov.Size = New System.Drawing.Size(77, 21) Me.ucrInputMarkov.TabIndex = 24 ' 'lblDist ' Me.lblDist.AutoSize = True - Me.lblDist.Location = New System.Drawing.Point(396, 511) + Me.lblDist.Location = New System.Drawing.Point(264, 332) + Me.lblDist.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblDist.Name = "lblDist" - Me.lblDist.Size = New System.Drawing.Size(93, 20) + Me.lblDist.Size = New System.Drawing.Size(62, 13) Me.lblDist.TabIndex = 21 Me.lblDist.Text = "Distribution:" ' 'lblMarkov ' Me.lblMarkov.AutoSize = True - Me.lblMarkov.Location = New System.Drawing.Point(423, 572) + Me.lblMarkov.Location = New System.Drawing.Point(282, 372) + Me.lblMarkov.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMarkov.Name = "lblMarkov" - Me.lblMarkov.Size = New System.Drawing.Size(64, 20) + Me.lblMarkov.Size = New System.Drawing.Size(46, 13) Me.lblMarkov.TabIndex = 23 Me.lblMarkov.Text = "Markov:" ' @@ -321,54 +332,42 @@ Partial Class dlgOutfillingStationData ' Me.ucrChkOmitMonths.AutoSize = True Me.ucrChkOmitMonths.Checked = False - Me.ucrChkOmitMonths.Location = New System.Drawing.Point(9, 377) - Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkOmitMonths.Location = New System.Drawing.Point(6, 245) + Me.ucrChkOmitMonths.Margin = New System.Windows.Forms.Padding(4) Me.ucrChkOmitMonths.Name = "ucrChkOmitMonths" - Me.ucrChkOmitMonths.Size = New System.Drawing.Size(171, 35) + Me.ucrChkOmitMonths.Size = New System.Drawing.Size(114, 23) Me.ucrChkOmitMonths.TabIndex = 25 ' - 'ucrInputSelectStation - ' - Me.ucrInputSelectStation.AddQuotesIfUnrecognised = True - Me.ucrInputSelectStation.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputSelectStation.GetSetSelectedIndex = -1 - Me.ucrInputSelectStation.IsReadOnly = False - Me.ucrInputSelectStation.Location = New System.Drawing.Point(200, 315) - Me.ucrInputSelectStation.Margin = New System.Windows.Forms.Padding(21, 22, 21, 22) - Me.ucrInputSelectStation.Name = "ucrInputSelectStation" - Me.ucrInputSelectStation.Size = New System.Drawing.Size(180, 34) - Me.ucrInputSelectStation.TabIndex = 4 - ' 'ucrInputOmitMonths ' Me.ucrInputOmitMonths.AddQuotesIfUnrecognised = True Me.ucrInputOmitMonths.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputOmitMonths.GetSetSelectedIndex = -1 Me.ucrInputOmitMonths.IsReadOnly = False - Me.ucrInputOmitMonths.Location = New System.Drawing.Point(200, 375) - Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(14, 14, 14, 14) + Me.ucrInputOmitMonths.Location = New System.Drawing.Point(133, 244) + Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputOmitMonths.Name = "ucrInputOmitMonths" - Me.ucrInputOmitMonths.Size = New System.Drawing.Size(171, 32) + Me.ucrInputOmitMonths.Size = New System.Drawing.Size(114, 21) Me.ucrInputOmitMonths.TabIndex = 28 ' 'ucrChkStationToExclude ' Me.ucrChkStationToExclude.AutoSize = True Me.ucrChkStationToExclude.Checked = False - Me.ucrChkStationToExclude.Location = New System.Drawing.Point(9, 315) - Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkStationToExclude.Location = New System.Drawing.Point(6, 205) + Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(4) Me.ucrChkStationToExclude.Name = "ucrChkStationToExclude" - Me.ucrChkStationToExclude.Size = New System.Drawing.Size(188, 35) + Me.ucrChkStationToExclude.Size = New System.Drawing.Size(125, 23) Me.ucrChkStationToExclude.TabIndex = 29 ' 'ucrChkRandomSeed ' Me.ucrChkRandomSeed.AutoSize = True Me.ucrChkRandomSeed.Checked = False - Me.ucrChkRandomSeed.Location = New System.Drawing.Point(9, 434) - Me.ucrChkRandomSeed.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrChkRandomSeed.Location = New System.Drawing.Point(6, 282) + Me.ucrChkRandomSeed.Margin = New System.Windows.Forms.Padding(4) Me.ucrChkRandomSeed.Name = "ucrChkRandomSeed" - Me.ucrChkRandomSeed.Size = New System.Drawing.Size(176, 35) + Me.ucrChkRandomSeed.Size = New System.Drawing.Size(117, 23) Me.ucrChkRandomSeed.TabIndex = 30 ' 'ucrNudRandomSeed @@ -376,35 +375,46 @@ Partial Class dlgOutfillingStationData Me.ucrNudRandomSeed.AutoSize = True Me.ucrNudRandomSeed.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudRandomSeed.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudRandomSeed.Location = New System.Drawing.Point(200, 437) - Me.ucrNudRandomSeed.Margin = New System.Windows.Forms.Padding(6, 6, 6, 6) + Me.ucrNudRandomSeed.Location = New System.Drawing.Point(133, 284) + Me.ucrNudRandomSeed.Margin = New System.Windows.Forms.Padding(4) Me.ucrNudRandomSeed.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudRandomSeed.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudRandomSeed.Name = "ucrNudRandomSeed" - Me.ucrNudRandomSeed.Size = New System.Drawing.Size(117, 42) + Me.ucrNudRandomSeed.Size = New System.Drawing.Size(78, 27) Me.ucrNudRandomSeed.TabIndex = 31 Me.ucrNudRandomSeed.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrSaveResultInto + 'ucrSaveColumn + ' + Me.ucrSaveColumn.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveColumn.Location = New System.Drawing.Point(9, 396) + Me.ucrSaveColumn.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveColumn.Name = "ucrSaveColumn" + Me.ucrSaveColumn.Size = New System.Drawing.Size(292, 21) + Me.ucrSaveColumn.TabIndex = 32 + ' + 'cmdFilterFromFactors ' - Me.ucrSaveResultInto.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveResultInto.Location = New System.Drawing.Point(9, 615) - Me.ucrSaveResultInto.Margin = New System.Windows.Forms.Padding(6, 9, 6, 9) - Me.ucrSaveResultInto.Name = "ucrSaveResultInto" - Me.ucrSaveResultInto.Size = New System.Drawing.Size(489, 32) - Me.ucrSaveResultInto.TabIndex = 197 + Me.cmdFilterFromFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdFilterFromFactors.Location = New System.Drawing.Point(130, 195) + Me.cmdFilterFromFactors.Name = "cmdFilterFromFactors" + Me.cmdFilterFromFactors.Size = New System.Drawing.Size(129, 38) + Me.cmdFilterFromFactors.TabIndex = 33 + Me.cmdFilterFromFactors.Tag = "Define_New_Filter" + Me.cmdFilterFromFactors.Text = "Station(s) to Exclude" + Me.cmdFilterFromFactors.UseVisualStyleBackColor = True ' 'dlgOutfillingStationData ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(694, 763) - Me.Controls.Add(Me.ucrSaveResultInto) + Me.ClientSize = New System.Drawing.Size(463, 493) + Me.Controls.Add(Me.cmdFilterFromFactors) + Me.Controls.Add(Me.ucrSaveColumn) Me.Controls.Add(Me.ucrNudRandomSeed) Me.Controls.Add(Me.ucrChkRandomSeed) Me.Controls.Add(Me.ucrChkStationToExclude) Me.Controls.Add(Me.ucrInputOmitMonths) - Me.Controls.Add(Me.ucrInputSelectStation) Me.Controls.Add(Me.ucrChkOmitMonths) Me.Controls.Add(Me.lblMarkov) Me.Controls.Add(Me.lblDist) @@ -431,6 +441,7 @@ Partial Class dlgOutfillingStationData Me.Controls.Add(Me.ucrSelectorOutfilling) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(2) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOutfillingStationData" @@ -466,10 +477,10 @@ Partial Class dlgOutfillingStationData Friend WithEvents ucrInputMarkov As ucrInputComboBox Friend WithEvents ucrInputDist As ucrInputComboBox Friend WithEvents ucrChkOmitMonths As ucrCheck - Friend WithEvents ucrInputSelectStation As ucrInputFactorLevels Friend WithEvents ucrInputOmitMonths As ucrInputComboBox Friend WithEvents ucrNudRandomSeed As ucrNud Friend WithEvents ucrChkRandomSeed As ucrCheck Friend WithEvents ucrChkStationToExclude As ucrCheck - Friend WithEvents ucrSaveResultInto As ucrSave + Friend WithEvents ucrSaveColumn As ucrSave + Friend WithEvents cmdFilterFromFactors As Button End Class diff --git a/instat/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb index ef3957590a..77fea94a71 100644 --- a/instat/dlgOutfillingStationData.vb +++ b/instat/dlgOutfillingStationData.vb @@ -19,6 +19,7 @@ Imports instat.Translations Public Class dlgOutfillingStationData Private bFirstLoad As Boolean = True Private bReset As Boolean = True + Private bResetSubdialog = False Private clsDoFillingFunction As New RFunction Private clsDummyFunction As New RFunction @@ -124,7 +125,7 @@ Public Class dlgOutfillingStationData ucrChkStationToExclude.SetText("Station(s) to Exclude") ucrChkStationToExclude.AddParameterValuesCondition(True, "exclude", "True") ucrChkStationToExclude.AddParameterValuesCondition(False, "exclude", "False") - ucrChkStationToExclude.AddToLinkedControls({ucrInputSelectStation}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + 'ucrChkStationToExclude.AddToLinkedControls({ucrInputSelectStation}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrNudRandomSeed.SetParameter(New RParameter("set_seed", 10)) ucrNudRandomSeed.SetMinMax(1, Integer.MaxValue) @@ -134,15 +135,12 @@ Public Class dlgOutfillingStationData ucrChkRandomSeed.AddParameterValuesCondition(False, "seed", "False") ucrChkRandomSeed.AddToLinkedControls({ucrNudRandomSeed}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=999) - ucrInputSelectStation.SetFactorReceiver(ucrReceiverStation) - ucrInputSelectStation.strQuotes = "" + ucrSaveColumn.SetSaveTypeAsColumn() + ucrSaveColumn.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) + ucrSaveColumn.SetLabelText("Prefix for New Columns:") + ucrSaveColumn.SetIsComboBox() - ucrSaveResultInto.SetPrefix("outfilled") - ucrSaveResultInto.SetSaveTypeAsColumn() - ucrSaveResultInto.SetIsComboBox() - ucrSaveResultInto.SetCheckBoxText("Store Result") - ucrSaveResultInto.SetAssignToIfUncheckedValue("last_outfilled") - ucrSaveResultInto.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) + 'ucrSaveColumn.setLinkedReceiver(ucrReceiverSplitTextColumn) End Sub Private Sub SetDefaults() @@ -150,13 +148,12 @@ Public Class dlgOutfillingStationData clsDummyFunction = New RFunction ucrSelectorOutfilling.Reset() - ucrInputSelectStation.SetName("") ucrInputBins.Reset() - ucrInputSelectStation.Reset() ucrReceiverStation.SetMeAsReceiver() - ucrSaveResultInto.Reset() - ucrSaveResultInto.ucrChkSave.Checked = True + ucrSaveColumn.Reset() + + bResetSubdialog = True ucrInputBins.SetName("1, 3, 5, 10, 15, 20") ucrInputOmitMonths.SetName("5,6,7,8,9") @@ -170,13 +167,15 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.SetAssignTo("infill_data") clsDoFillingFunction.AddParameter("markovflag", "TRUE", iPosition:=6) + clsDoFillingFunction.SetAssignTo(ucrSaveColumn.GetText(), strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveColumn.GetText()) + ucrBase.clsRsyntax.SetBaseRFunction(clsDoFillingFunction) - ucrBase.clsRsyntax.SetAssignTo(ucrSaveResultInto.GetText(), strTempColumn:=ucrSaveResultInto.GetText(), - strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, - bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix, - bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames, - bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore, - bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength) + 'ucrBase.clsRsyntax.SetAssignTo(ucrSaveResultInto.GetText(), strTempColumn:=ucrSaveResultInto.GetText(), + ' strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, + ' bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix, + ' bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames, + ' bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore, + ' bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength) End Sub @@ -196,9 +195,12 @@ Public Class dlgOutfillingStationData ucrInputDist.SetRCode(clsDoFillingFunction, bReset) ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) - ucrInputSelectStation.SetRCode(clsDoFillingFunction, bReset) - ucrSaveResultInto.SetRCode(clsDoFillingFunction, bReset) + ucrSaveColumn.SetRCode(clsDoFillingFunction, bReset) AddTargetMonthsVar() + FilterFactorsVisibility() + If bReset Then + ucrChkStationToExclude.SetRCode(clsDummyFunction, bReset) + End If End Sub Private Sub TestOkEnabled() @@ -211,6 +213,7 @@ Public Class dlgOutfillingStationData Not ucrNudCount.IsEmpty AndAlso Not ucrNudDays.IsEmpty AndAlso Not ucrInputBins.IsEmpty AndAlso + ucrSaveColumn.IsComplete() AndAlso Not ucrInputDist.IsEmpty AndAlso Not ucrInputMarkov.IsEmpty Then ucrBase.OKEnabled(True) @@ -279,6 +282,7 @@ Public Class dlgOutfillingStationData Else clsDoFillingFunction.RemoveParameterByName("rfe") End If + SetDataFramePrefix() End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -289,20 +293,10 @@ Public Class dlgOutfillingStationData Private Sub ucrReceiverEstimates_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, ucrReceiverLongitude.ControlContentsChanged, ucrReceiverRain.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged, ucrInputBins.ControlContentsChanged, - ucrInputDist.ControlContentsChanged, ucrInputMarkov.ControlContentsChanged, ucrNudCount.ControlContentsChanged, ucrNudDays.ControlContentsChanged + ucrInputDist.ControlContentsChanged, ucrInputMarkov.ControlContentsChanged, ucrNudCount.ControlContentsChanged, ucrNudDays.ControlContentsChanged, ucrSaveColumn.ControlContentsChanged TestOkEnabled() End Sub - Private Sub ucrInputSelectStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSelectStation.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrChkStationToExclude.ControlValueChanged - If ucrChkStationToExclude.Checked AndAlso Not ucrReceiverStation.IsEmpty AndAlso Not ucrInputSelectStation.IsEmpty Then - clsDoFillingFunction.AddParameter("station_to_exclude ", Chr(34) & ucrInputSelectStation.GetValue() & Chr(34), iPosition:=10) - clsDummyFunction.AddParameter("exclude", "True", iPosition:=1) - Else - clsDoFillingFunction.RemoveParameterByName("station_to_exclude") - clsDummyFunction.AddParameter("exclude", "False", iPosition:=1) - End If - End Sub - Private Sub ucrInputOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputOmitMonths.ControlValueChanged AddTargetMonthsVar() End Sub @@ -317,4 +311,40 @@ Public Class dlgOutfillingStationData End If End Sub + Private Sub cmdFilterFromFactors_Click(sender As Object, e As EventArgs) Handles cmdFilterFromFactors.Click + ' Ensure the dataframe and parameters are set before showing the dialog + sdgFiltersFromFactor.SetRcodeAndDefaultDataFrame(ucrSelectorOutfilling, bReset:=bResetSubdialog) + sdgFiltersFromFactor.ShowDialog() + + ' Retrieve the selected stations and add them to the main function + Dim strSelectedStations As String = sdgFiltersFromFactor.GetSelectedStations() + + If strSelectedStations <> "" Then + clsDoFillingFunction.AddParameter("stations_to_include", strSelectedStations) + Else + clsDoFillingFunction.RemoveParameterByName("stations_to_include") + End If + + bResetSubdialog = False + End Sub + + Private Sub ucrChkStationToExclude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkStationToExclude.ControlValueChanged + FilterFactorsVisibility() + End Sub + + Private Sub FilterFactorsVisibility() + cmdFilterFromFactors.Visible = ucrChkStationToExclude.Checked + End Sub + + Private Sub SetDataFramePrefix() + Dim strDataframeName As String = ucrReceiverEstimates.GetVariableNames(False) + If strDataframeName = "" OrElse ucrSaveColumn.bUserTyped Then + Exit Sub + End If + If Not ucrReceiverEstimates.IsEmpty Then + ucrSaveColumn.SetPrefix(strDataframeName & "_") + + End If + End Sub + End Class \ No newline at end of file diff --git a/instat/sdgFiltersFromFactor.vb b/instat/sdgFiltersFromFactor.vb index 91d4bc8128..5f1dc39829 100644 --- a/instat/sdgFiltersFromFactor.vb +++ b/instat/sdgFiltersFromFactor.vb @@ -79,4 +79,17 @@ Public Class sdgFiltersFromFactor Private Sub ucrSelectorFiltersFromFactors_DataFrameChanged() Handles ucrSelectorFiltersFromFactors.DataFrameChanged clsAddFilterFromFactors.AddParameter("data_name", Chr(34) & ucrSelectorFiltersFromFactors.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0) End Sub + + Public Function GetSelectedStations() As String + Dim strSelectedLevels As String = mdlCoreControl.GetRVector( + ucrFactorLevels.GetSelectedCellValues(ucrFactor.DefaultColumnNames.Label, True) + ) + + If strSelectedLevels <> "" Then + Return strSelectedLevels + Else + Return "" + End If + End Function + End Class \ No newline at end of file From 384c4dddbcc33708bcd2b318405290c2c4bdff1d Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 10 Feb 2025 16:14:14 +0300 Subject: [PATCH 10/15] changes --- instat/dlgOutfillingStationData.vb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/instat/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb index 77fea94a71..f72cbd4c16 100644 --- a/instat/dlgOutfillingStationData.vb +++ b/instat/dlgOutfillingStationData.vb @@ -125,7 +125,6 @@ Public Class dlgOutfillingStationData ucrChkStationToExclude.SetText("Station(s) to Exclude") ucrChkStationToExclude.AddParameterValuesCondition(True, "exclude", "True") ucrChkStationToExclude.AddParameterValuesCondition(False, "exclude", "False") - 'ucrChkStationToExclude.AddToLinkedControls({ucrInputSelectStation}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrNudRandomSeed.SetParameter(New RParameter("set_seed", 10)) ucrNudRandomSeed.SetMinMax(1, Integer.MaxValue) @@ -139,8 +138,6 @@ Public Class dlgOutfillingStationData ucrSaveColumn.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) ucrSaveColumn.SetLabelText("Prefix for New Columns:") ucrSaveColumn.SetIsComboBox() - - 'ucrSaveColumn.setLinkedReceiver(ucrReceiverSplitTextColumn) End Sub Private Sub SetDefaults() @@ -170,13 +167,6 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.SetAssignTo(ucrSaveColumn.GetText(), strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveColumn.GetText()) ucrBase.clsRsyntax.SetBaseRFunction(clsDoFillingFunction) - 'ucrBase.clsRsyntax.SetAssignTo(ucrSaveResultInto.GetText(), strTempColumn:=ucrSaveResultInto.GetText(), - ' strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, - ' bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix, - ' bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames, - ' bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore, - ' bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength) - End Sub Private Sub SetRCodeForControls(bReset As Boolean) From fa6e1414f994c1c56ba523f59501039d45984efd Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Wed, 12 Feb 2025 16:36:01 +0300 Subject: [PATCH 11/15] changes --- instat/dlgOutfillingStationData.Designer.vb | 8 ++++---- instat/dlgOutfillingStationData.vb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/instat/dlgOutfillingStationData.Designer.vb b/instat/dlgOutfillingStationData.Designer.vb index 7dc03aed73..5db9f3be4a 100644 --- a/instat/dlgOutfillingStationData.Designer.vb +++ b/instat/dlgOutfillingStationData.Designer.vb @@ -354,7 +354,7 @@ Partial Class dlgOutfillingStationData ' Me.ucrChkStationToExclude.AutoSize = True Me.ucrChkStationToExclude.Checked = False - Me.ucrChkStationToExclude.Location = New System.Drawing.Point(6, 205) + Me.ucrChkStationToExclude.Location = New System.Drawing.Point(6, 202) Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(4) Me.ucrChkStationToExclude.Name = "ucrChkStationToExclude" Me.ucrChkStationToExclude.Size = New System.Drawing.Size(125, 23) @@ -396,12 +396,12 @@ Partial Class dlgOutfillingStationData 'cmdFilterFromFactors ' Me.cmdFilterFromFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdFilterFromFactors.Location = New System.Drawing.Point(130, 195) + Me.cmdFilterFromFactors.Location = New System.Drawing.Point(133, 197) Me.cmdFilterFromFactors.Name = "cmdFilterFromFactors" - Me.cmdFilterFromFactors.Size = New System.Drawing.Size(129, 38) + Me.cmdFilterFromFactors.Size = New System.Drawing.Size(73, 33) Me.cmdFilterFromFactors.TabIndex = 33 Me.cmdFilterFromFactors.Tag = "Define_New_Filter" - Me.cmdFilterFromFactors.Text = "Station(s) to Exclude" + Me.cmdFilterFromFactors.Text = "Include" Me.cmdFilterFromFactors.UseVisualStyleBackColor = True ' 'dlgOutfillingStationData diff --git a/instat/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb index f72cbd4c16..5b5a8a9849 100644 --- a/instat/dlgOutfillingStationData.vb +++ b/instat/dlgOutfillingStationData.vb @@ -122,7 +122,7 @@ Public Class dlgOutfillingStationData ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "False") ucrChkOmitMonths.AddToLinkedControls({ucrInputOmitMonths}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkStationToExclude.SetText("Station(s) to Exclude") + ucrChkStationToExclude.SetText("Stations") ucrChkStationToExclude.AddParameterValuesCondition(True, "exclude", "True") ucrChkStationToExclude.AddParameterValuesCondition(False, "exclude", "False") From b75ed71470e3136b4061d28803f72ec49e21fc38 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Fri, 14 Feb 2025 12:11:00 +0300 Subject: [PATCH 12/15] changes to the code --- instat/dlgOutfillingStationData.Designer.vb | 40 +++++--- instat/dlgOutfillingStationData.vb | 102 ++++++++++++++------ 2 files changed, 97 insertions(+), 45 deletions(-) diff --git a/instat/dlgOutfillingStationData.Designer.vb b/instat/dlgOutfillingStationData.Designer.vb index 5db9f3be4a..0959b64ae9 100644 --- a/instat/dlgOutfillingStationData.Designer.vb +++ b/instat/dlgOutfillingStationData.Designer.vb @@ -51,14 +51,15 @@ Partial Class dlgOutfillingStationData Me.ucrChkStationToExclude = New instat.ucrCheck() Me.ucrChkRandomSeed = New instat.ucrCheck() Me.ucrNudRandomSeed = New instat.ucrNud() - Me.ucrSaveColumn = New instat.ucrSave() Me.cmdFilterFromFactors = New System.Windows.Forms.Button() + Me.ucrSaveResultEst = New instat.ucrSave() + Me.ucrSaveResultGen = New instat.ucrSave() Me.SuspendLayout() ' 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(6, 432) + Me.ucrBase.Location = New System.Drawing.Point(6, 455) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 51) @@ -384,15 +385,6 @@ Partial Class dlgOutfillingStationData Me.ucrNudRandomSeed.TabIndex = 31 Me.ucrNudRandomSeed.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrSaveColumn - ' - Me.ucrSaveColumn.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveColumn.Location = New System.Drawing.Point(9, 396) - Me.ucrSaveColumn.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveColumn.Name = "ucrSaveColumn" - Me.ucrSaveColumn.Size = New System.Drawing.Size(292, 21) - Me.ucrSaveColumn.TabIndex = 32 - ' 'cmdFilterFromFactors ' Me.cmdFilterFromFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl @@ -404,13 +396,32 @@ Partial Class dlgOutfillingStationData Me.cmdFilterFromFactors.Text = "Include" Me.cmdFilterFromFactors.UseVisualStyleBackColor = True ' + 'ucrSaveResultEst + ' + Me.ucrSaveResultEst.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveResultEst.Location = New System.Drawing.Point(6, 387) + Me.ucrSaveResultEst.Margin = New System.Windows.Forms.Padding(4, 6, 4, 6) + Me.ucrSaveResultEst.Name = "ucrSaveResultEst" + Me.ucrSaveResultEst.Size = New System.Drawing.Size(326, 22) + Me.ucrSaveResultEst.TabIndex = 197 + ' + 'ucrSaveResultGen + ' + Me.ucrSaveResultGen.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrSaveResultGen.Location = New System.Drawing.Point(6, 421) + Me.ucrSaveResultGen.Margin = New System.Windows.Forms.Padding(4, 6, 4, 6) + Me.ucrSaveResultGen.Name = "ucrSaveResultGen" + Me.ucrSaveResultGen.Size = New System.Drawing.Size(326, 22) + Me.ucrSaveResultGen.TabIndex = 198 + ' 'dlgOutfillingStationData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(463, 493) + Me.ClientSize = New System.Drawing.Size(463, 517) + Me.Controls.Add(Me.ucrSaveResultGen) + Me.Controls.Add(Me.ucrSaveResultEst) Me.Controls.Add(Me.cmdFilterFromFactors) - Me.Controls.Add(Me.ucrSaveColumn) Me.Controls.Add(Me.ucrNudRandomSeed) Me.Controls.Add(Me.ucrChkRandomSeed) Me.Controls.Add(Me.ucrChkStationToExclude) @@ -481,6 +492,7 @@ Partial Class dlgOutfillingStationData Friend WithEvents ucrNudRandomSeed As ucrNud Friend WithEvents ucrChkRandomSeed As ucrCheck Friend WithEvents ucrChkStationToExclude As ucrCheck - Friend WithEvents ucrSaveColumn As ucrSave Friend WithEvents cmdFilterFromFactors As Button + Friend WithEvents ucrSaveResultGen As ucrSave + Friend WithEvents ucrSaveResultEst As ucrSave End Class diff --git a/instat/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb index 5b5a8a9849..79c5dee586 100644 --- a/instat/dlgOutfillingStationData.vb +++ b/instat/dlgOutfillingStationData.vb @@ -22,6 +22,7 @@ Public Class dlgOutfillingStationData Private bResetSubdialog = False Private clsDoFillingFunction As New RFunction Private clsDummyFunction As New RFunction + Private clsSelectFunction, clsSelectFunction2 As New RFunction Private Sub dlgOutfillingStationData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -34,6 +35,7 @@ Public Class dlgOutfillingStationData SetRCodeForControls(bReset) bReset = False TestOkEnabled() + EnsureSaveResultsChecked() autoTranslate(Me) End Sub @@ -134,21 +136,32 @@ Public Class dlgOutfillingStationData ucrChkRandomSeed.AddParameterValuesCondition(False, "seed", "False") ucrChkRandomSeed.AddToLinkedControls({ucrNudRandomSeed}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=999) - ucrSaveColumn.SetSaveTypeAsColumn() - ucrSaveColumn.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) - ucrSaveColumn.SetLabelText("Prefix for New Columns:") - ucrSaveColumn.SetIsComboBox() + ucrSaveResultEst.SetSaveTypeAsColumn() + ucrSaveResultEst.SetIsComboBox() + ucrSaveResultEst.SetCheckBoxText("Estimated") + ucrSaveResultEst.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) + ucrSaveResultEst.setLinkedReceiver(ucrReceiverEstimates) + + ucrSaveResultGen.SetSaveTypeAsColumn() + ucrSaveResultGen.SetIsComboBox() + ucrSaveResultGen.SetCheckBoxText("Outfilled") + ucrSaveResultGen.SetDataFrameSelector(ucrSelectorOutfilling.ucrAvailableDataFrames) + ucrSaveResultGen.setLinkedReceiver(ucrReceiverEstimates) End Sub Private Sub SetDefaults() clsDoFillingFunction = New RFunction clsDummyFunction = New RFunction + clsSelectFunction = New RFunction + clsSelectFunction2 = New RFunction ucrSelectorOutfilling.Reset() ucrInputBins.Reset() ucrReceiverStation.SetMeAsReceiver() + EnsureSaveResultsChecked() + ucrSaveResultEst.Reset() - ucrSaveColumn.Reset() + ucrSaveResultGen.Reset() bResetSubdialog = True @@ -163,15 +176,25 @@ Public Class dlgOutfillingStationData clsDoFillingFunction.SetRCommand("do_infilling") clsDoFillingFunction.SetAssignTo("infill_data") clsDoFillingFunction.AddParameter("markovflag", "TRUE", iPosition:=6) + clsDoFillingFunction.SetAssignTo("outfilled_data") - clsDoFillingFunction.SetAssignTo(ucrSaveColumn.GetText(), strTempDataframe:=ucrSelectorOutfilling.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveColumn.GetText()) + clsSelectFunction.SetPackageName("dplyr") + clsSelectFunction.SetRCommand("select") + clsSelectFunction.AddParameter("est", clsRFunctionParameter:=clsDoFillingFunction, bIncludeArgumentName:=False, iPosition:=0) + clsSelectFunction.AddParameter("gen", Chr(34) & "generated_rainfall" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) + + clsSelectFunction2.SetPackageName("dplyr") + clsSelectFunction2.SetRCommand("select") + clsSelectFunction2.AddParameter("out", "outfilled_data", bIncludeArgumentName:=False, iPosition:=0) + clsSelectFunction2.AddParameter("filled", Chr(34) & "outfilled_rainfall" & Chr(34), bIncludeArgumentName:=False, iPosition:=1) + + ucrBase.clsRsyntax.AddToAfterCodes(clsSelectFunction, 0) + ucrBase.clsRsyntax.AddToAfterCodes(clsSelectFunction2, 1) - ucrBase.clsRsyntax.SetBaseRFunction(clsDoFillingFunction) End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrChkOmitMonths.SetRCode(clsDummyFunction, bReset) - ucrChkStationToExclude.SetRCode(clsDummyFunction, bReset) ucrChkRandomSeed.SetRCode(clsDummyFunction, bReset) ucrSelectorOutfilling.SetRCode(clsDoFillingFunction, bReset) ucrReceiverDate.SetRCode(clsDoFillingFunction, bReset) @@ -185,27 +208,29 @@ Public Class dlgOutfillingStationData ucrInputDist.SetRCode(clsDoFillingFunction, bReset) ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) - ucrSaveColumn.SetRCode(clsDoFillingFunction, bReset) + ucrSaveResultEst.SetRCode(clsSelectFunction, bReset) + ucrSaveResultGen.SetRCode(clsSelectFunction2, bReset) AddTargetMonthsVar() FilterFactorsVisibility() - If bReset Then - ucrChkStationToExclude.SetRCode(clsDummyFunction, bReset) - End If + ucrChkStationToExclude.SetRCode(clsDummyFunction, bReset) End Sub Private Sub TestOkEnabled() If Not ucrReceiverStation.IsEmpty AndAlso - Not ucrReceiverEstimates.IsEmpty AndAlso - Not ucrReceiverDate.IsEmpty AndAlso - Not ucrReceiverLatitude.IsEmpty AndAlso - Not ucrReceiverLongitude.IsEmpty AndAlso - Not ucrReceiverRain.IsEmpty AndAlso - Not ucrNudCount.IsEmpty AndAlso - Not ucrNudDays.IsEmpty AndAlso - Not ucrInputBins.IsEmpty AndAlso - ucrSaveColumn.IsComplete() AndAlso - Not ucrInputDist.IsEmpty AndAlso - Not ucrInputMarkov.IsEmpty Then + Not ucrReceiverEstimates.IsEmpty AndAlso + Not ucrReceiverDate.IsEmpty AndAlso + Not ucrReceiverLatitude.IsEmpty AndAlso + Not ucrReceiverLongitude.IsEmpty AndAlso + Not ucrReceiverRain.IsEmpty AndAlso + Not ucrNudCount.IsEmpty AndAlso + Not ucrNudDays.IsEmpty AndAlso + Not ucrInputBins.IsEmpty AndAlso + (Not ucrChkStationToExclude.Checked OrElse (ucrChkStationToExclude.Checked AndAlso sdgFiltersFromFactor.GetSelectedStations() <> "")) AndAlso + (ucrSaveResultEst.ucrChkSave.Checked AndAlso ucrSaveResultEst.IsComplete()) AndAlso + (ucrSaveResultGen.ucrChkSave.Checked AndAlso ucrSaveResultGen.IsComplete()) AndAlso + Not ucrInputDist.IsEmpty AndAlso + Not ucrInputMarkov.IsEmpty Then + ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -282,8 +307,8 @@ Public Class dlgOutfillingStationData End Sub Private Sub ucrReceiverEstimates_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, - ucrReceiverLongitude.ControlContentsChanged, ucrReceiverRain.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged, ucrInputBins.ControlContentsChanged, - ucrInputDist.ControlContentsChanged, ucrInputMarkov.ControlContentsChanged, ucrNudCount.ControlContentsChanged, ucrNudDays.ControlContentsChanged, ucrSaveColumn.ControlContentsChanged + ucrReceiverLongitude.ControlContentsChanged, ucrReceiverRain.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged, ucrInputBins.ControlContentsChanged, ucrChkStationToExclude.ControlContentsChanged, + ucrInputDist.ControlContentsChanged, ucrInputMarkov.ControlContentsChanged, ucrNudCount.ControlContentsChanged, ucrNudDays.ControlContentsChanged, ucrSaveResultGen.ControlContentsChanged, ucrSaveResultEst.ControlContentsChanged TestOkEnabled() End Sub @@ -314,26 +339,41 @@ Public Class dlgOutfillingStationData Else clsDoFillingFunction.RemoveParameterByName("stations_to_include") End If - + TestOkEnabled() bResetSubdialog = False End Sub Private Sub ucrChkStationToExclude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkStationToExclude.ControlValueChanged FilterFactorsVisibility() + If ucrChkStationToExclude.Checked Then + clsDummyFunction.AddParameter("exclude", "True", iPosition:=1) + + Else + clsDummyFunction.AddParameter("exclude", "False", iPosition:=1) + + End If End Sub Private Sub FilterFactorsVisibility() cmdFilterFromFactors.Visible = ucrChkStationToExclude.Checked End Sub + Private Sub EnsureSaveResultsChecked() + ucrSaveResultEst.ucrChkSave.Checked = True + ucrSaveResultGen.ucrChkSave.Checked = True + End Sub + Private Sub SetDataFramePrefix() Dim strDataframeName As String = ucrReceiverEstimates.GetVariableNames(False) - If strDataframeName = "" OrElse ucrSaveColumn.bUserTyped Then - Exit Sub - End If - If Not ucrReceiverEstimates.IsEmpty Then - ucrSaveColumn.SetPrefix(strDataframeName & "_") + Dim strDataframeNameGen As String = ucrReceiverEstimates.GetVariableNames(False) + If Not ucrReceiverEstimates.IsEmpty Then + If ucrSaveResultEst.ucrChkSave.Checked Then + ucrSaveResultEst.SetPrefix(strDataframeName & "_" & "out") + End If + If ucrSaveResultGen.ucrChkSave.Checked Then + ucrSaveResultGen.SetPrefix(strDataframeNameGen & "_" & "gen") + End If End If End Sub From 85a40262f4e37167d004b0b4bec53323ae710fd8 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Mon, 17 Feb 2025 09:45:52 +0300 Subject: [PATCH 13/15] changes to the code --- instat/dlgOutfillingStationData.vb | 4 ++-- instat/sdgFiltersFromFactor.vb | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/instat/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb index 79c5dee586..b1314bf829 100644 --- a/instat/dlgOutfillingStationData.vb +++ b/instat/dlgOutfillingStationData.vb @@ -369,10 +369,10 @@ Public Class dlgOutfillingStationData If Not ucrReceiverEstimates.IsEmpty Then If ucrSaveResultEst.ucrChkSave.Checked Then - ucrSaveResultEst.SetPrefix(strDataframeName & "_" & "out") + ucrSaveResultEst.SetPrefix(strDataframeName & "_" & "gen") End If If ucrSaveResultGen.ucrChkSave.Checked Then - ucrSaveResultGen.SetPrefix(strDataframeNameGen & "_" & "gen") + ucrSaveResultGen.SetPrefix(strDataframeNameGen & "_" & "out") End If End If End Sub diff --git a/instat/sdgFiltersFromFactor.vb b/instat/sdgFiltersFromFactor.vb index 5f1dc39829..24138a3e4e 100644 --- a/instat/sdgFiltersFromFactor.vb +++ b/instat/sdgFiltersFromFactor.vb @@ -55,6 +55,8 @@ Public Class sdgFiltersFromFactor dctParamAndColNames:=dctParamAndColNames, hiddenColNames:={ucrFactor.DefaultColumnNames.Level}, bIncludeNALevel:=False) + ' Automatically select all rows by default + AddHandler ucrReceiverFactor.SelectionChanged, AddressOf SelectAllFactorLevels End Sub @@ -92,4 +94,10 @@ Public Class sdgFiltersFromFactor End If End Function + Private Sub SelectAllFactorLevels() + If ucrFactorLevels.RowCount > 0 Then + ucrFactorLevels.SelectAllGridRows(True) ' Pass True to select all rows + End If + End Sub + End Class \ No newline at end of file From b2e5bd537610cdee7c7974459eeb6615e02a1812 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Tue, 18 Feb 2025 15:53:46 +0300 Subject: [PATCH 14/15] changes --- instat/dlgOutfillingStationData.vb | 2 ++ instat/dlgRestrict.vb | 1 + instat/sdgFiltersFromFactor.vb | 18 ++++++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/instat/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb index b1314bf829..a1942aa39f 100644 --- a/instat/dlgOutfillingStationData.vb +++ b/instat/dlgOutfillingStationData.vb @@ -329,6 +329,8 @@ Public Class dlgOutfillingStationData Private Sub cmdFilterFromFactors_Click(sender As Object, e As EventArgs) Handles cmdFilterFromFactors.Click ' Ensure the dataframe and parameters are set before showing the dialog sdgFiltersFromFactor.SetRcodeAndDefaultDataFrame(ucrSelectorOutfilling, bReset:=bResetSubdialog) + + sdgFiltersFromFactor.enumFactorMode = sdgFiltersFromFactor.FactorMode.OutFilling sdgFiltersFromFactor.ShowDialog() ' Retrieve the selected stations and add them to the main function diff --git a/instat/dlgRestrict.vb b/instat/dlgRestrict.vb index ecabeb9a0b..dcbbea6dea 100644 --- a/instat/dlgRestrict.vb +++ b/instat/dlgRestrict.vb @@ -210,6 +210,7 @@ Public Class dlgRestrict Private Sub cmdFilterFromFactors_Click(sender As Object, e As EventArgs) Handles cmdFilterFromFactors.Click sdgFiltersFromFactor.SetRcodeAndDefaultDataFrame(ucrSelectorFilter, bReset:=bResetSubdialog) + sdgFiltersFromFactor.enumFactorMode = sdgFiltersFromFactor.FactorMode.Filter sdgFiltersFromFactor.ShowDialog() bResetSubdialog = False ucrSelectorFilter.LoadList() diff --git a/instat/sdgFiltersFromFactor.vb b/instat/sdgFiltersFromFactor.vb index 24138a3e4e..6a0c60c341 100644 --- a/instat/sdgFiltersFromFactor.vb +++ b/instat/sdgFiltersFromFactor.vb @@ -19,6 +19,11 @@ Public Class sdgFiltersFromFactor Private bFirstLoad As Boolean Private bReset As Boolean = True Private clsAddFilterFromFactors As RFunction + Public enumFactorMode As String = FactorMode.Filter + Public Enum FactorMode + OutFilling + Filter + End Enum Public Sub New() 'This call is required by the designer. @@ -35,6 +40,7 @@ Public Class sdgFiltersFromFactor InitialiseControls() bFirstLoad = False End If + OpeningMode() autoTranslate(Me) End Sub @@ -64,11 +70,11 @@ Public Class sdgFiltersFromFactor If ucrNewBaseSelector IsNot Nothing AndAlso ucrNewBaseSelector.strCurrentDataFrame <> "" Then ucrSelectorFiltersFromFactors.SetDataframe(ucrNewBaseSelector.strCurrentDataFrame, False) End If - ucrReceiverFactor.SetRCode(clsAddFilterFromFactors, bReset) - ucrFactorLevels.SetRCode(clsAddFilterFromFactors, bReset) If bReset Then ucrSelectorFiltersFromFactors.Reset() + ucrFactorLevels.SetRCode(clsAddFilterFromFactors, bReset) + ucrReceiverFactor.SetRCode(clsAddFilterFromFactors, bReset) End If End Sub @@ -100,4 +106,12 @@ Public Class sdgFiltersFromFactor End If End Sub + Private Sub OpeningMode() + Select Case enumFactorMode + Case FactorMode.Filter + Me.Text = "Filters From Factor" + Case FactorMode.OutFilling + Me.Text = "Stations to Include" + End Select + End Sub End Class \ No newline at end of file From 74c438ec1008f5987a407de2735f971b299202f3 Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Tue, 18 Feb 2025 15:58:52 +0300 Subject: [PATCH 15/15] changes --- instat/translations/rInstatTranslations.db | Bin 8306688 -> 8306688 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 7a5bfeec619318b8852212770681d3d8e5fae1e9..e271c4235f81745366604b149ffac1c58cb5e015 100644 GIT binary patch delta 561 zcmWm4$ySm97=U4>KuFWfG6R0iGE=ic{K-fw!3LTf8!VL%94dz-O)bL?ExzMcR{xHr z8y9ip1eekscn_X7y)B;Ilgs^e=CJ3tXY+x$J^NEs>?#fwr;1DEgo<0mqf({fRq?5u zRH;^}Q8}ejt5TM4R!OB6=$T%GC)k?5rj5$5tBU{Wg!&d6hxVl>?8)!xgE}|8e za2aj5f_D7B9q2?CuAv*(aRWCILJz{|g^37mp%1qa#U1ox0C#Z@_c4eV;uyjMJj5eB zMgmXp6wmM+FEES|jA9Jqn7~WC!fU+2B;Mj3rZ9~eBq2y4jakfL9t(Jn5BP{hEMXZd h_=Htt@EL1Z#}{m16I=L-Z`j6nWU*5zlz*hX{{UrB3U~kj delta 549 zcmWm4OE=U39LM4FpBbh}C@BhmN-9bkV{$3ERft?BbWwa~av3Fex{RD@@jJG)n%yjI zEX=9Hyd&?yY17Bz**(eRKW`Gh%ACaS@*XGgQzpmcF?mfsQ;sRu*6m`Y7oOjk{1rgBroq1?R#XFui7xIs_ua;h!k)}-P| zXE3{;aaTN^z;U+XuN(3DJ5B<=a5$8T{&8>brjJ}yq6*h=9o4vj8r;M!oZed0;STPi z9{13I`v{^DAv7V32WUnMTG57wc!YL5Mh804g>LlV37+B^deMh|JjVbA@d85_#t23c z!Ap!`920nj*LZ`sn8Z80#}uX^L=nRW%wQICm`5B7_=rzf#AhsF87o-D8rHFaO>E%{ SzTz9cBY|!F$fl2WVuAm4&Ig77