diff --git a/instat/dlgOutfillingStationData.Designer.vb b/instat/dlgOutfillingStationData.Designer.vb new file mode 100644 index 0000000000..0959b64ae9 --- /dev/null +++ b/instat/dlgOutfillingStationData.Designer.vb @@ -0,0 +1,498 @@ + _ +Partial Class dlgOutfillingStationData + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.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.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.ucrInputOmitMonths = New instat.ucrInputComboBox() + Me.ucrChkStationToExclude = New instat.ucrCheck() + Me.ucrChkRandomSeed = New instat.ucrCheck() + Me.ucrNudRandomSeed = New instat.ucrNud() + 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, 455) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 51) + Me.ucrBase.TabIndex = 27 + ' + 'ucrSelectorOutfilling + ' + Me.ucrSelectorOutfilling.AutoSize = True + Me.ucrSelectorOutfilling.bDropUnusedFilterLevels = False + Me.ucrSelectorOutfilling.bShowHiddenColumns = False + Me.ucrSelectorOutfilling.bUseCurrentFilter = True + 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(213, 183) + Me.ucrSelectorOutfilling.TabIndex = 0 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + 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(120, 21) + 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(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(120, 20) + Me.ucrReceiverRain.strNcFilePath = "" + Me.ucrReceiverRain.TabIndex = 12 + Me.ucrReceiverRain.ucrSelector = Nothing + ' + 'ucrReceiverLongitude + ' + Me.ucrReceiverLongitude.AutoSize = True + Me.ucrReceiverLongitude.frmParent = Me + 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(120, 21) + Me.ucrReceiverLongitude.strNcFilePath = "" + Me.ucrReceiverLongitude.TabIndex = 10 + Me.ucrReceiverLongitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(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(120, 23) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 8 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.AutoSize = True + Me.ucrReceiverDate.frmParent = Me + 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(120, 20) + 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(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(120, 22) + Me.ucrReceiverEstimates.strNcFilePath = "" + Me.ucrReceiverEstimates.TabIndex = 14 + Me.ucrReceiverEstimates.ucrSelector = Nothing + ' + '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.Name = "lblStation" + 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(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(33, 13) + 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.Name = "lblLatitude" + 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(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(57, 13) + 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.Name = "lblRain" + 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(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(55, 13) + 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(60, 324) + Me.ucrInputBins.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputBins.Name = "ucrInputBins" + 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(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(30, 13) + Me.lblBins.TabIndex = 15 + 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(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(50, 32) + Me.ucrNudCount.TabIndex = 18 + 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(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(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(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(34, 13) + 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.Name = "lblCount" + Me.lblCount.Size = New System.Drawing.Size(38, 13) + Me.lblCount.TabIndex = 17 + Me.lblCount.Text = "Count:" + ' + '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(328, 330) + Me.ucrInputDist.Margin = New System.Windows.Forms.Padding(6) + Me.ucrInputDist.Name = "ucrInputDist" + Me.ucrInputDist.Size = New System.Drawing.Size(77, 21) + Me.ucrInputDist.TabIndex = 22 + ' + '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(328, 369) + Me.ucrInputMarkov.Margin = New System.Windows.Forms.Padding(6) + Me.ucrInputMarkov.Name = "ucrInputMarkov" + 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(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(62, 13) + 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.Name = "lblMarkov" + Me.lblMarkov.Size = New System.Drawing.Size(46, 13) + Me.lblMarkov.TabIndex = 23 + Me.lblMarkov.Text = "Markov:" + ' + 'ucrChkOmitMonths + ' + 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.Name = "ucrChkOmitMonths" + Me.ucrChkOmitMonths.Size = New System.Drawing.Size(114, 23) + Me.ucrChkOmitMonths.TabIndex = 25 + ' + '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(133, 244) + Me.ucrInputOmitMonths.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputOmitMonths.Name = "ucrInputOmitMonths" + 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, 202) + Me.ucrChkStationToExclude.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkStationToExclude.Name = "ucrChkStationToExclude" + 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(6, 282) + Me.ucrChkRandomSeed.Margin = New System.Windows.Forms.Padding(4) + Me.ucrChkRandomSeed.Name = "ucrChkRandomSeed" + Me.ucrChkRandomSeed.Size = New System.Drawing.Size(117, 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(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(78, 27) + Me.ucrNudRandomSeed.TabIndex = 31 + Me.ucrNudRandomSeed.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'cmdFilterFromFactors + ' + Me.cmdFilterFromFactors.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdFilterFromFactors.Location = New System.Drawing.Point(133, 197) + Me.cmdFilterFromFactors.Name = "cmdFilterFromFactors" + Me.cmdFilterFromFactors.Size = New System.Drawing.Size(73, 33) + Me.cmdFilterFromFactors.TabIndex = 33 + Me.cmdFilterFromFactors.Tag = "Define_New_Filter" + 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, 517) + Me.Controls.Add(Me.ucrSaveResultGen) + Me.Controls.Add(Me.ucrSaveResultEst) + Me.Controls.Add(Me.cmdFilterFromFactors) + Me.Controls.Add(Me.ucrNudRandomSeed) + Me.Controls.Add(Me.ucrChkRandomSeed) + Me.Controls.Add(Me.ucrChkStationToExclude) + Me.Controls.Add(Me.ucrInputOmitMonths) + 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.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.Margin = New System.Windows.Forms.Padding(2) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "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 ucrChkOmitMonths As ucrCheck + Friend WithEvents ucrInputOmitMonths As ucrInputComboBox + Friend WithEvents ucrNudRandomSeed As ucrNud + Friend WithEvents ucrChkRandomSeed As ucrCheck + Friend WithEvents ucrChkStationToExclude As ucrCheck + Friend WithEvents cmdFilterFromFactors As Button + Friend WithEvents ucrSaveResultGen As ucrSave + Friend WithEvents ucrSaveResultEst As ucrSave +End Class 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/dlgOutfillingStationData.vb b/instat/dlgOutfillingStationData.vb new file mode 100644 index 0000000000..a1942aa39f --- /dev/null +++ b/instat/dlgOutfillingStationData.vb @@ -0,0 +1,382 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations + +Public Class dlgOutfillingStationData + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + 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 + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + TestOkEnabled() + EnsureSaveResultsChecked() + 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("lon", 5)) + ucrReceiverLongitude.Selector = ucrSelectorOutfilling + ucrReceiverLongitude.SetParameterIsString() + ucrReceiverLongitude.SetClimaticType("lon") + ucrReceiverLongitude.bAutoFill = True + ucrReceiverLongitude.SetLinkedDisplayControl(lblLong) + + ucrReceiverLatitude.SetParameter(New RParameter("lat", 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({"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") + ucrInputMarkov.SetItems(dctLogical) + 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(Chr(34) & "gamma" & Chr(34)) + 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", "True") + ucrChkOmitMonths.AddParameterValuesCondition(False, "omit", "False") + ucrChkOmitMonths.AddToLinkedControls({ucrInputOmitMonths}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrChkStationToExclude.SetText("Stations") + ucrChkStationToExclude.AddParameterValuesCondition(True, "exclude", "True") + ucrChkStationToExclude.AddParameterValuesCondition(False, "exclude", "False") + + 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) + + 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() + + ucrSaveResultGen.Reset() + + bResetSubdialog = 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.SetAssignTo("outfilled_data") + + 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) + + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + ucrChkOmitMonths.SetRCode(clsDummyFunction, bReset) + ucrChkRandomSeed.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) + ucrNudRandomSeed.SetRCode(clsDoFillingFunction, bReset) + ucrInputDist.SetRCode(clsDoFillingFunction, bReset) + ucrInputMarkov.SetRCode(clsDoFillingFunction, bReset) + ucrReceiverStation.SetRCode(clsDoFillingFunction, bReset) + ucrSaveResultEst.SetRCode(clsSelectFunction, bReset) + ucrSaveResultGen.SetRCode(clsSelectFunction2, bReset) + AddTargetMonthsVar() + FilterFactorsVisibility() + 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 + (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) + End If + End Sub + + Private Sub ucrChkOmitMonths_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkOmitMonths.ControlValueChanged + AddTargetMonthsVar() + End Sub + + 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 + 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", ucrInputMarkov.GetText, iPosition:=6) + 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 + SetDataFramePrefix() + 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, ucrChkStationToExclude.ControlContentsChanged, + ucrInputDist.ControlContentsChanged, ucrInputMarkov.ControlContentsChanged, ucrNudCount.ControlContentsChanged, ucrNudDays.ControlContentsChanged, ucrSaveResultGen.ControlContentsChanged, ucrSaveResultEst.ControlContentsChanged + TestOkEnabled() + 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 + + 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 + Dim strSelectedStations As String = sdgFiltersFromFactor.GetSelectedStations() + + If strSelectedStations <> "" Then + clsDoFillingFunction.AddParameter("stations_to_include", strSelectedStations) + 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) + Dim strDataframeNameGen As String = ucrReceiverEstimates.GetVariableNames(False) + + If Not ucrReceiverEstimates.IsEmpty Then + If ucrSaveResultEst.ucrChkSave.Checked Then + ucrSaveResultEst.SetPrefix(strDataframeName & "_" & "gen") + End If + If ucrSaveResultGen.ucrChkSave.Checked Then + ucrSaveResultGen.SetPrefix(strDataframeNameGen & "_" & "out") + End If + End If + End Sub + +End Class \ No newline at end of file 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/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 1f46dac6c1..14fe14c604 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -2579,7 +2579,6 @@ Partial Class frmMain ' 'mnuClimaticModelOutfilling ' - Me.mnuClimaticModelOutfilling.Enabled = False Me.mnuClimaticModelOutfilling.Name = "mnuClimaticModelOutfilling" Me.mnuClimaticModelOutfilling.Size = New System.Drawing.Size(180, 22) Me.mnuClimaticModelOutfilling.Text = "Outfilling..." 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 diff --git a/instat/sdgFiltersFromFactor.vb b/instat/sdgFiltersFromFactor.vb index 91d4bc8128..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 @@ -55,6 +61,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 @@ -62,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 @@ -79,4 +87,31 @@ 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 + + Private Sub SelectAllFactorLevels() + If ucrFactorLevels.RowCount > 0 Then + ucrFactorLevels.SelectAllGridRows(True) ' Pass True to select all rows + 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 diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb deleted file mode 100644 index 0847923f08..0000000000 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb +++ /dev/null @@ -1,54 +0,0 @@ - _ -Partial Class dlgOutfillingStationData - Inherits System.Windows.Forms.Form - - 'Form overrides dispose to clean up the component list. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ - Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.SuspendLayout() - ' - 'ucrBase - ' - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(16, 439) - 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 - ' - '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.Controls.Add(Me.ucrBase) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.MaximizeBox = False - Me.MinimizeBox = False - Me.Name = "dlgOutfillingStationData" - Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Outfilling Station Data" - Me.ResumeLayout(False) - - End Sub - - Friend WithEvents ucrBase As ucrButtons -End Class diff --git a/instat/static/InstatObject/R/dlgOutfillingStationData.vb b/instat/static/InstatObject/R/dlgOutfillingStationData.vb deleted file mode 100644 index 89fdc2ec56..0000000000 --- a/instat/static/InstatObject/R/dlgOutfillingStationData.vb +++ /dev/null @@ -1,3 +0,0 @@ -Public Class dlgOutfillingStationData - -End Class \ No newline at end of file diff --git a/instat/translations/rInstatTranslations.db b/instat/translations/rInstatTranslations.db index 7a5bfeec61..e271c4235f 100644 Binary files a/instat/translations/rInstatTranslations.db and b/instat/translations/rInstatTranslations.db differ