diff --git a/instat/dlgSPI.Designer.vb b/instat/dlgSPI.Designer.vb index b3a94470bea..51b55b20b33 100644 --- a/instat/dlgSPI.Designer.vb +++ b/instat/dlgSPI.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgSPI Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,20 +20,292 @@ Partial Class dlgSPI '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() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgSPI)) - Me.SuspendLayout() - ' - 'dlgSPI - ' - resources.ApplyResources(Me, "$this") - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.MaximizeBox = False - Me.MinimizeBox = False - Me.Name = "dlgSPI" - Me.ResumeLayout(False) - + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgSPI)) + Me.lblDate = New System.Windows.Forms.Label() + Me.lblYear = New System.Windows.Forms.Label() + Me.lblMonth = New System.Windows.Forms.Label() + Me.lblData = New System.Windows.Forms.Label() + Me.grpIndex = New System.Windows.Forms.GroupBox() + Me.rdoSPEI = New System.Windows.Forms.RadioButton() + Me.rdoSPI = New System.Windows.Forms.RadioButton() + Me.ucrPnlIndex = New instat.UcrPanel() + Me.lblTimeScale = New System.Windows.Forms.Label() + Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() + Me.grpKernel = New System.Windows.Forms.GroupBox() + Me.lblShift = New System.Windows.Forms.Label() + Me.grpKernelType = New System.Windows.Forms.GroupBox() + Me.rdoRectangular = New System.Windows.Forms.RadioButton() + Me.rdoGaussian = New System.Windows.Forms.RadioButton() + Me.rdoCircular = New System.Windows.Forms.RadioButton() + Me.rdoTriangular = New System.Windows.Forms.RadioButton() + Me.ucrPnlKernelType = New instat.UcrPanel() + Me.ucrNudKernelShift = New instat.ucrNud() + Me.ucrSaveIndex = New instat.ucrSave() + Me.ucrNudTimeScale = New instat.ucrNud() + Me.ucrChkOmitMissingValues = New instat.ucrCheck() + Me.ucrBase = New instat.ucrButtons() + Me.ucrReceiverData = New instat.ucrReceiverSingle() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrSelectorVariable = New instat.ucrSelectorByDataFrameAddRemove() + Me.grpIndex.SuspendLayout() + Me.grpKernel.SuspendLayout() + Me.grpKernelType.SuspendLayout() + Me.SuspendLayout() + ' + 'lblDate + ' + resources.ApplyResources(Me.lblDate, "lblDate") + Me.lblDate.Name = "lblDate" + ' + 'lblYear + ' + resources.ApplyResources(Me.lblYear, "lblYear") + Me.lblYear.Name = "lblYear" + ' + 'lblMonth + ' + resources.ApplyResources(Me.lblMonth, "lblMonth") + Me.lblMonth.Name = "lblMonth" + ' + 'lblData + ' + resources.ApplyResources(Me.lblData, "lblData") + Me.lblData.Name = "lblData" + ' + 'grpIndex + ' + Me.grpIndex.Controls.Add(Me.rdoSPEI) + Me.grpIndex.Controls.Add(Me.rdoSPI) + Me.grpIndex.Controls.Add(Me.ucrPnlIndex) + resources.ApplyResources(Me.grpIndex, "grpIndex") + Me.grpIndex.Name = "grpIndex" + Me.grpIndex.TabStop = False + ' + 'rdoSPEI + ' + resources.ApplyResources(Me.rdoSPEI, "rdoSPEI") + Me.rdoSPEI.Name = "rdoSPEI" + Me.rdoSPEI.TabStop = True + Me.rdoSPEI.UseVisualStyleBackColor = True + ' + 'rdoSPI + ' + resources.ApplyResources(Me.rdoSPI, "rdoSPI") + Me.rdoSPI.Name = "rdoSPI" + Me.rdoSPI.TabStop = True + Me.rdoSPI.UseVisualStyleBackColor = True + ' + 'ucrPnlIndex + ' + resources.ApplyResources(Me.ucrPnlIndex, "ucrPnlIndex") + Me.ucrPnlIndex.Name = "ucrPnlIndex" + ' + 'lblTimeScale + ' + resources.ApplyResources(Me.lblTimeScale, "lblTimeScale") + Me.lblTimeScale.Name = "lblTimeScale" + ' + 'grpKernel + ' + Me.grpKernel.Controls.Add(Me.lblShift) + Me.grpKernel.Controls.Add(Me.grpKernelType) + Me.grpKernel.Controls.Add(Me.ucrNudKernelShift) + resources.ApplyResources(Me.grpKernel, "grpKernel") + Me.grpKernel.Name = "grpKernel" + Me.grpKernel.TabStop = False + ' + 'lblShift + ' + resources.ApplyResources(Me.lblShift, "lblShift") + Me.lblShift.Name = "lblShift" + ' + 'grpKernelType + ' + Me.grpKernelType.Controls.Add(Me.rdoRectangular) + Me.grpKernelType.Controls.Add(Me.rdoGaussian) + Me.grpKernelType.Controls.Add(Me.rdoCircular) + Me.grpKernelType.Controls.Add(Me.rdoTriangular) + Me.grpKernelType.Controls.Add(Me.ucrPnlKernelType) + resources.ApplyResources(Me.grpKernelType, "grpKernelType") + Me.grpKernelType.Name = "grpKernelType" + Me.grpKernelType.TabStop = False + ' + 'rdoRectangular + ' + resources.ApplyResources(Me.rdoRectangular, "rdoRectangular") + Me.rdoRectangular.Name = "rdoRectangular" + Me.rdoRectangular.TabStop = True + Me.rdoRectangular.UseVisualStyleBackColor = True + ' + 'rdoGaussian + ' + resources.ApplyResources(Me.rdoGaussian, "rdoGaussian") + Me.rdoGaussian.Name = "rdoGaussian" + Me.rdoGaussian.TabStop = True + Me.rdoGaussian.UseVisualStyleBackColor = True + ' + 'rdoCircular + ' + resources.ApplyResources(Me.rdoCircular, "rdoCircular") + Me.rdoCircular.Name = "rdoCircular" + Me.rdoCircular.TabStop = True + Me.rdoCircular.UseVisualStyleBackColor = True + ' + 'rdoTriangular + ' + resources.ApplyResources(Me.rdoTriangular, "rdoTriangular") + Me.rdoTriangular.Name = "rdoTriangular" + Me.rdoTriangular.TabStop = True + Me.rdoTriangular.UseVisualStyleBackColor = True + ' + 'ucrPnlKernelType + ' + resources.ApplyResources(Me.ucrPnlKernelType, "ucrPnlKernelType") + Me.ucrPnlKernelType.Name = "ucrPnlKernelType" + ' + 'ucrNudKernelShift + ' + Me.ucrNudKernelShift.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudKernelShift.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudKernelShift, "ucrNudKernelShift") + Me.ucrNudKernelShift.Maximum = New Decimal(New Integer() {24, 0, 0, 0}) + Me.ucrNudKernelShift.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudKernelShift.Name = "ucrNudKernelShift" + Me.ucrNudKernelShift.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrSaveIndex + ' + resources.ApplyResources(Me.ucrSaveIndex, "ucrSaveIndex") + Me.ucrSaveIndex.Name = "ucrSaveIndex" + ' + 'ucrNudTimeScale + ' + Me.ucrNudTimeScale.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTimeScale.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudTimeScale, "ucrNudTimeScale") + Me.ucrNudTimeScale.Maximum = New Decimal(New Integer() {24, 0, 0, 0}) + Me.ucrNudTimeScale.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudTimeScale.Name = "ucrNudTimeScale" + Me.ucrNudTimeScale.Value = New Decimal(New Integer() {1, 0, 0, 0}) + ' + 'ucrChkOmitMissingValues + ' + Me.ucrChkOmitMissingValues.Checked = False + resources.ApplyResources(Me.ucrChkOmitMissingValues, "ucrChkOmitMissingValues") + Me.ucrChkOmitMissingValues.Name = "ucrChkOmitMissingValues" + ' + 'ucrBase + ' + resources.ApplyResources(Me.ucrBase, "ucrBase") + Me.ucrBase.Name = "ucrBase" + ' + 'ucrReceiverData + ' + Me.ucrReceiverData.frmParent = Me + resources.ApplyResources(Me.ucrReceiverData, "ucrReceiverData") + Me.ucrReceiverData.Name = "ucrReceiverData" + Me.ucrReceiverData.Selector = Nothing + Me.ucrReceiverData.strNcFilePath = "" + Me.ucrReceiverData.ucrSelector = Nothing + ' + 'ucrReceiverMonth + ' + Me.ucrReceiverMonth.frmParent = Me + resources.ApplyResources(Me.ucrReceiverMonth, "ucrReceiverMonth") + Me.ucrReceiverMonth.Name = "ucrReceiverMonth" + Me.ucrReceiverMonth.Selector = Nothing + Me.ucrReceiverMonth.strNcFilePath = "" + Me.ucrReceiverMonth.ucrSelector = Nothing + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.frmParent = Me + resources.ApplyResources(Me.ucrReceiverYear, "ucrReceiverYear") + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.frmParent = Me + resources.ApplyResources(Me.ucrReceiverDate, "ucrReceiverDate") + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.strNcFilePath = "" + Me.ucrReceiverDate.ucrSelector = Nothing + ' + 'ucrSelectorVariable + ' + Me.ucrSelectorVariable.bShowHiddenColumns = False + Me.ucrSelectorVariable.bUseCurrentFilter = True + resources.ApplyResources(Me.ucrSelectorVariable, "ucrSelectorVariable") + Me.ucrSelectorVariable.Name = "ucrSelectorVariable" + ' + 'dlgSPI + ' + resources.ApplyResources(Me, "$this") + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrSaveIndex) + Me.Controls.Add(Me.grpKernel) + Me.Controls.Add(Me.ucrNudTimeScale) + Me.Controls.Add(Me.ucrChkOmitMissingValues) + Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.lblTimeScale) + Me.Controls.Add(Me.grpIndex) + Me.Controls.Add(Me.lblData) + Me.Controls.Add(Me.lblMonth) + Me.Controls.Add(Me.lblYear) + Me.Controls.Add(Me.lblDate) + Me.Controls.Add(Me.ucrReceiverData) + Me.Controls.Add(Me.ucrReceiverMonth) + Me.Controls.Add(Me.ucrReceiverYear) + Me.Controls.Add(Me.ucrReceiverDate) + Me.Controls.Add(Me.ucrSelectorVariable) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgSPI" + Me.grpIndex.ResumeLayout(False) + Me.grpIndex.PerformLayout() + Me.grpKernel.ResumeLayout(False) + Me.grpKernel.PerformLayout() + Me.grpKernelType.ResumeLayout(False) + Me.grpKernelType.PerformLayout() + Me.ResumeLayout(False) + Me.PerformLayout() + End Sub -End Class + Friend WithEvents ucrSelectorVariable As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrReceiverDate As ucrReceiverSingle + Friend WithEvents lblDate As Label + Friend WithEvents ucrReceiverData As ucrReceiverSingle + Friend WithEvents ucrReceiverMonth As ucrReceiverSingle + Friend WithEvents ucrReceiverYear As ucrReceiverSingle + Friend WithEvents lblData As Label + Friend WithEvents lblMonth As Label + Friend WithEvents lblYear As Label + Friend WithEvents grpIndex As GroupBox + Friend WithEvents rdoSPEI As RadioButton + Friend WithEvents rdoSPI As RadioButton + Friend WithEvents lblTimeScale As Label + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrChkOmitMissingValues As ucrCheck + Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker + Friend WithEvents ucrNudTimeScale As ucrNud + Friend WithEvents grpKernel As GroupBox + Friend WithEvents rdoRectangular As RadioButton + Friend WithEvents rdoTriangular As RadioButton + Friend WithEvents ucrPnlKernelType As UcrPanel + Friend WithEvents rdoCircular As RadioButton + Friend WithEvents rdoGaussian As RadioButton + Friend WithEvents lblShift As Label + Friend WithEvents ucrNudKernelShift As ucrNud + Friend WithEvents ucrPnlIndex As UcrPanel + Friend WithEvents ucrSaveIndex As ucrSave + Friend WithEvents grpKernelType As GroupBox +End Class \ No newline at end of file diff --git a/instat/dlgSPI.resx b/instat/dlgSPI.resx index d07a00df893..5980810a2b4 100644 --- a/instat/dlgSPI.resx +++ b/instat/dlgSPI.resx @@ -1,143 +1,990 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - - 6, 13 - - - 800, 450 - - - - CenterScreen - - - dlgSPI - - - dlgSPI - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + NoControl + + + + 262, 38 + + + 33, 13 + + + 1 + + + Date: + + + lblDate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + True + + + NoControl + + + 262, 85 + + + 32, 13 + + + 3 + + + Year: + + + lblYear + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + True + + + NoControl + + + 262, 132 + + + 40, 13 + + + 5 + + + Month: + + + lblMonth + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + True + + + NoControl + + + 262, 179 + + + 33, 13 + + + 7 + + + Data: + + + lblData + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + rdoSPEI + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpIndex + + + 0 + + + rdoSPI + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpIndex + + + 1 + + + ucrPnlIndex + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpIndex + + + 2 + + + 10, 230 + + + 149, 52 + + + 9 + + + Index + + + grpIndex + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + True + + + NoControl + + + 65, 20 + + + 49, 17 + + + 1 + + + SPEI + + + rdoSPEI + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpIndex + + + 0 + + + True + + + NoControl + + + 7, 20 + + + 42, 17 + + + 0 + + + SPI + + + rdoSPI + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpIndex + + + 1 + + + 7, 19 + + + 123, 18 + + + 26 + + + ucrPnlIndex + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpIndex + + + 2 + + + True + + + NoControl + + + 10, 299 + + + 63, 13 + + + 11 + + + Time Scale: + + + lblTimeScale + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + 17, 17 + + + lblShift + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernel + + + 0 + + + grpKernelType + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernel + + + 1 + + + ucrNudKernelShift + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpKernel + + + 2 + + + 191, 230 + + + 213, 129 + + + 10 + + + Kernel + + + grpKernel + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + NoControl + + + 7, 102 + + + 31, 13 + + + 25 + + + Shift: + + + lblShift + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernel + + + 0 + + + rdoRectangular + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 0 + + + rdoGaussian + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 1 + + + rdoCircular + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 2 + + + rdoTriangular + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 3 + + + ucrPnlKernelType + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpKernelType + + + 4 + + + 10, 22 + + + 199, 70 + + + 25 + + + Type + + + grpKernelType + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernel + + + 1 + + + True + + + NoControl + + + 6, 20 + + + 83, 17 + + + 2 + + + Rectangular + + + rdoRectangular + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 0 + + + True + + + NoControl + + + 8, 44 + + + 69, 17 + + + 5 + + + Gaussian + + + rdoGaussian + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 1 + + + True + + + NoControl + + + 107, 44 + + + 60, 17 + + + 4 + + + Circular + + + rdoCircular + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 2 + + + True + + + NoControl + + + 107, 19 + + + 72, 17 + + + 3 + + + Triangular + + + rdoTriangular + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernelType + + + 3 + + + 6, 18 + + + 187, 42 + + + 24 + + + ucrPnlKernelType + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpKernelType + + + 4 + + + 41, 98 + + + 50, 20 + + + 24 + + + ucrNudKernelShift + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpKernel + + + 2 + + + False + + + 10, 364 + + + 256, 24 + + + 14 + + + ucrSaveIndex + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 + + + 75, 296 + + + 50, 20 + + + 12 + + + ucrNudTimeScale + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 2 + + + 10, 339 + + + 100, 20 + + + 13 + + + ucrChkOmitMissingValues + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 3 + + + 10, 397 + + + 410, 57 + + + 15 + + + ucrBase + + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 + + + True + + + 25 + + + 6, 13 + + + 430, 462 + + + 262, 148 + + + 0, 0, 0, 0 + + + 120, 20 + + + 6 + + + ucrReceiverMonth + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 12 + + + 262, 101 + + + 0, 0, 0, 0 + + + 120, 20 + + + 4 + + + ucrReceiverYear + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 13 + + + 262, 54 + + + 0, 0, 0, 0 + + + 120, 20 + + + 2 + + + ucrReceiverDate + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 14 + + + 10, 22 + + + 0, 0, 0, 0 + + + 210, 180 + + + 0 + + + ucrSelectorVariable + + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 15 + + + CenterScreen + + + SPI + + + BackgroundWorker1 + + + System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + dlgSPI + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 262, 195 + + + 0, 0, 0, 0 + + + 120, 20 + + + 8 + + + ucrReceiverData + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 11 + \ No newline at end of file diff --git a/instat/dlgSPI.vb b/instat/dlgSPI.vb index a4a23a90ae2..5d1c0b4e9e5 100644 --- a/instat/dlgSPI.vb +++ b/instat/dlgSPI.vb @@ -1,3 +1,170 @@ -Public Class dlgSPI - +'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 dlgSPI + Private bFirstload As Boolean = True + Private bReset As Boolean = True + Private clsSpiFunction, clsSpeiFunction, clsListFunction As New RFunction + + Private Sub dlgSPI_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() + End Sub + + Private Sub InitialiseDialog() + ucrBase.clsRsyntax.iCallType = 2 + ucrBase.iHelpTopicID = 510 + + ucrSelectorVariable.SetParameterIsString() + + 'receivers: + ' by receivers + ucrReceiverData.SetParameterIsRFunction() + ucrReceiverData.SetParameter(New RParameter("data", 0)) + ucrReceiverData.Selector = ucrSelectorVariable + ucrReceiverData.bAutoFill = True + ucrReceiverData.strSelectorHeading = "Variables" + + ucrReceiverYear.SetParameterIsString() + ucrReceiverYear.Selector = ucrSelectorVariable + ucrReceiverYear.SetClimaticType("year") + ucrReceiverYear.bAutoFill = True + ucrReceiverYear.strSelectorHeading = "Year Variables" + + ucrReceiverMonth.SetParameterIsString() + ucrReceiverMonth.Selector = ucrSelectorVariable + ucrReceiverMonth.SetClimaticType("month") + ucrReceiverMonth.bAutoFill = True + ucrReceiverMonth.strSelectorHeading = "Month Variables" + + ucrReceiverDate.SetParameterIsString() + ucrReceiverDate.Selector = ucrSelectorVariable + ucrReceiverDate.SetClimaticType("date") + ucrReceiverDate.bAutoFill = True + ucrReceiverDate.strSelectorHeading = "Date Variables" + + 'setting up Nuds + ucrNudTimeScale.SetParameter(New RParameter("scale", 1)) + ucrNudTimeScale.SetMinMax(1, 24) + + ' others + ucrChkOmitMissingValues.SetParameter(New RParameter("na.rm", 5)) + ucrChkOmitMissingValues.SetText("Omit Missing Values") + ucrChkOmitMissingValues.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkOmitMissingValues.SetRDefault("FALSE") + + 'panel + ucrPnlKernelType.SetParameter(New RParameter("type", 0)) + ucrPnlKernelType.AddRadioButton(rdoTriangular, Chr(39) & "triangular" & Chr(39)) + ucrPnlKernelType.AddRadioButton(rdoCircular, Chr(39) & "circular" & Chr(39)) + ucrPnlKernelType.AddRadioButton(rdoRectangular, Chr(39) & "rectangular" & Chr(39)) + ucrPnlKernelType.AddRadioButton(rdoGaussian, Chr(39) & "gaussian" & Chr(39)) + + 'ucrshift + ucrNudKernelShift.SetParameter(New RParameter("shift", 1)) + ucrNudKernelShift.SetMinMax(0, 24) + + 'ucrpnlInd + ucrPnlIndex.AddRadioButton(rdoSPI) + ucrPnlIndex.AddRadioButton(rdoSPEI) + ucrPnlIndex.AddFunctionNamesCondition(rdoSPI, "spi") + ucrPnlIndex.AddFunctionNamesCondition(rdoSPEI, "spei") + + ucrSaveIndex.SetSaveTypeAsColumn() + ucrSaveIndex.SetDataFrameSelector(ucrSelectorVariable.ucrAvailableDataFrames) + ucrSaveIndex.SetLabelText("Save Index into:") + ucrSaveIndex.SetIsTextBox() + ucrSaveIndex.SetAssignToBooleans(bTempAssignToIsPrefix:=True) + End Sub + + Private Sub SetDefaults() + clsSpeiFunction = New RFunction + clsSpiFunction = New RFunction + clsListFunction = New RFunction + + ucrSelectorVariable.Reset() + + clsListFunction.SetRCommand("list") + clsListFunction.AddParameter("type", Chr(39) & "rectangular" & Chr(39), iPosition:=0) + clsListFunction.AddParameter("shift", 0, iPosition:=1) + + clsSpiFunction.SetPackageName("SPEI") + clsSpiFunction.SetRCommand("spi") + clsSpiFunction.AddParameter("scale", 1, iPosition:=1) + clsSpiFunction.AddParameter("kernel", clsRFunctionParameter:=clsListFunction, iPosition:=2) + + clsSpeiFunction.SetPackageName("SPEI") + clsSpeiFunction.SetRCommand("spei") + clsSpeiFunction.AddParameter("scale", 1, iPosition:=1) + clsSpeiFunction.AddParameter("kernel", clsRFunctionParameter:=clsListFunction, iPosition:=2) + + ucrBase.clsRsyntax.SetBaseRFunction(clsSpiFunction) + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + ucrNudTimeScale.AddAdditionalCodeParameterPair(clsSpeiFunction, New RParameter("scale", 1), iAdditionalPairNo:=1) + ucrChkOmitMissingValues.AddAdditionalCodeParameterPair(clsSpeiFunction, New RParameter("na.rm", 6), iAdditionalPairNo:=1) + ucrReceiverData.AddAdditionalCodeParameterPair(clsSpeiFunction, New RParameter("data", 0), iAdditionalPairNo:=1) + + ucrReceiverData.SetRCode(clsSpiFunction, bReset) + ucrChkOmitMissingValues.SetRCode(clsSpiFunction, bReset) + ucrNudTimeScale.SetRCode(clsSpiFunction, bReset) + ucrPnlKernelType.SetRCode(clsListFunction, bReset) + ucrNudKernelShift.SetRCode(clsListFunction, bReset) + ucrPnlIndex.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + 'ucrSaveIndex.AddAdditionalRCode(clsSpeiFunction, iAdditionalPairNo:=1) + 'ucrSaveIndex.SetRCode(clsSpiFunction, bReset) + End Sub + + Private Sub TestOKEnabled() + If ucrReceiverData.IsEmpty Then + ucrBase.OKEnabled(False) + Else + ucrBase.OKEnabled(True) + 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 ucrPnlIndex_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlIndex.ControlContentsChanged + If rdoSPI.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsSpiFunction) + 'clsSpiFunction.SetAssignTo("spi", strTempDataframe:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:="spi", bAssignToIsPrefix:=True) + ucrSaveIndex.SetPrefix("spi") + ElseIf rdoSPEI.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsSpeiFunction) + 'clsSpeiFunction.SetAssignTo("spei", strTempDataframe:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:="spei", bAssignToIsPrefix:=True) + ucrSaveIndex.SetPrefix("spei") + End If + End Sub + + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverData.ControlContentsChanged + TestOKEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 939ff0809bb..6d43b45cc6f 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -511,6 +511,7 @@ Partial Class frmMain Me.splMetadata = New System.Windows.Forms.SplitContainer() Me.splLogScript = New System.Windows.Forms.SplitContainer() Me.splDataOutput = New System.Windows.Forms.SplitContainer() + Me.mnuClimaticSPI = New System.Windows.Forms.ToolStripMenuItem() Me.ucrColumnMeta = New instat.ucrColumnMetadata() Me.ucrDataFrameMeta = New instat.ucrDataFrameMetadata() Me.ucrLogWindow = New instat.ucrLog() @@ -1327,7 +1328,7 @@ Partial Class frmMain ' 'mnuClimatic ' - Me.mnuClimatic.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFile, Me.ToolStripSeparator18, Me.mnuClimaticDates, Me.mnuClimaticDefineClimaticData, Me.mnuClimaticCheckData, Me.mnuClimaticPrepare, Me.mnuClimdex, Me.ToolStripSeparator30, Me.mnuClimaticDescribe, Me.mnuClimaticPICSA, Me.mnuCMSAF, Me.ToolStripSeparator16, Me.mnuClimaticModels, Me.mnuClimaticExamine, Me.mnuClimaticProcess, Me.ToolStripSeparator23, Me.mnuClimaticSCF, Me.mnuClimaticEvaporation, Me.mnuClimaticCrop, Me.mnuClimaticHeatSum, Me.mnuClimateMethods}) + Me.mnuClimatic.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFile, Me.ToolStripSeparator18, Me.mnuClimaticDates, Me.mnuClimaticDefineClimaticData, Me.mnuClimaticCheckData, Me.mnuClimaticPrepare, Me.mnuClimdex, Me.ToolStripSeparator30, Me.mnuClimaticDescribe, Me.mnuClimaticPICSA, Me.mnuCMSAF, Me.ToolStripSeparator16, Me.mnuClimaticModels, Me.mnuClimaticExamine, Me.mnuClimaticProcess, Me.ToolStripSeparator23, Me.mnuClimaticSCF, Me.mnuClimaticEvaporation, Me.mnuClimaticCrop, Me.mnuClimaticHeatSum, Me.mnuClimateMethods, Me.mnuClimaticSPI}) Me.mnuClimatic.Name = "mnuClimatic" resources.ApplyResources(Me.mnuClimatic, "mnuClimatic") Me.mnuClimatic.Tag = "Climatic" @@ -3289,6 +3290,11 @@ Partial Class frmMain Me.splDataOutput.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splDataOutput.Panel2.Controls.Add(Me.ucrOutput) ' + 'mnuClimaticSPI + ' + resources.ApplyResources(Me.mnuClimaticSPI, "mnuClimaticSPI") + Me.mnuClimaticSPI.Name = "mnuClimaticSPI" + ' 'ucrColumnMeta ' Me.ucrColumnMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle @@ -3850,4 +3856,5 @@ Partial Class frmMain Friend WithEvents mnuModelHypothesisTests As ToolStripMenuItem Friend WithEvents ToolStripSeparator46 As ToolStripSeparator Friend WithEvents mnuClimaticPrepareEvapotranspiration As ToolStripMenuItem + Friend WithEvents mnuClimaticSPI As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 3697b9918d1..def8957dd29 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1835,6 +1835,15 @@ False + + False + + + 212, 22 + + + SPI... + 63, 20 @@ -3788,7 +3797,7 @@ True - 99 + 29 6, 13 @@ -8314,6 +8323,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticSPI + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 575cb34b3b9..ab550677c3e 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1901,4 +1901,7 @@ Public Class frmMain dlgEvapotranspiration.ShowDialog() End Sub + Private Sub mnuClimaticSPI_Click(sender As Object, e As EventArgs) Handles mnuClimaticSPI.Click + dlgSPI.ShowDialog() + End Sub End Class \ No newline at end of file