diff --git a/docs/Download.html b/docs/Download.html
index 2894dd034cc..4fd4d8652f2 100644
--- a/docs/Download.html
+++ b/docs/Download.html
@@ -79,11 +79,11 @@
Download R-Instat
-
If this is your first time downloading R-Instat, we recommend you download the Complete Installer. The Complete Installer is the same version of R-Instat as the Basic Installer but also includes the required version of R (3.6.0 currently) to run R-Instat.
+
If this is your first time downloading R-Instat, we recommend you download the Complete Installer. The Complete Installer is the same version of R-Instat as the Basic Installer but also includes the required version of R (3.6.0 currently) to run R-Instat.
If you do not know if you have the latest version of R, download the Complete Installer. The Basic Installer does not include R.
R-Instat is currently a Windows only application. However, it can be accessed on Mac or Linux through use of a Virtual Windows Machine.
-
R-Instat 0.5.2 Complete Installer (.exe 577MB)
-
R-Instat 0.5.2 Basic Installer (.msi 499MB)
+
R-Instat 0.5.3 Complete Installer (.exe 577MB)
+
R-Instat 0.5.3 Basic Installer (.msi 499MB)
Installation & Documentation
diff --git a/instat/DlgUseDate.vb b/instat/DlgUseDate.vb
index 79094da19ed..b15a197f59c 100644
--- a/instat/DlgUseDate.vb
+++ b/instat/DlgUseDate.vb
@@ -38,6 +38,7 @@ Public Class dlgUseDate
Private Sub InitialiseDialog()
ucrBase.iHelpTopicID = 462
+ ucrBase.clsRsyntax.iCallType = 2
'Selector
ucrSelectorUseDate.SetParameter(New RParameter("data_name", 0))
diff --git a/instat/clsGgplotDefaults.vb b/instat/clsGgplotDefaults.vb
index e6242559e49..a043672eea5 100644
--- a/instat/clsGgplotDefaults.vb
+++ b/instat/clsGgplotDefaults.vb
@@ -14,34 +14,34 @@
' You should have received a copy of the GNU General Public License
' along with this program. If not, see
.
-Public Class GgplotDefaults
- Public Shared ReadOnly Property clsDefaultLabs As RFunction
- Get
- Dim clsTempFunc As New RFunction
-
- clsTempFunc.SetPackageName("ggplot2")
- clsTempFunc.SetRCommand("labs")
- clsTempFunc.AddParameter("title", Chr(34) & Chr(34))
- clsTempFunc.AddParameter("subtitle", Chr(34) & Chr(34))
- clsTempFunc.AddParameter("caption", Chr(34) & Chr(34))
- Return clsTempFunc
- End Get
- End Property
-
- Public Shared ReadOnly Property clsDefaultThemeParameter As RParameter
- Get
- Dim clsTempParam As New RParameter
-
- clsTempParam.SetArgumentName("theme_name")
+Public Class GgplotDefaults
+ Public Shared ReadOnly Property clsDefaultLabs As RFunction
+ Get
+ Dim clsTempFunc As New RFunction
+
+ clsTempFunc.SetPackageName("ggplot2")
+ clsTempFunc.SetRCommand("labs")
+ clsTempFunc.AddParameter("title", Chr(34) & Chr(34))
+ clsTempFunc.AddParameter("subtitle", Chr(34) & Chr(34))
+ clsTempFunc.AddParameter("caption", Chr(34) & Chr(34))
+ Return clsTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsDefaultThemeParameter As RParameter
+ Get
+ Dim clsTempParam As New RParameter
+
+ clsTempParam.SetArgumentName("theme_name")
clsTempParam.SetArgumentValue("theme_grey()")
'This position MUST be smaller than the position of the theme() parameter
' Otherwise this will overwrite any specific theme options selected
' Currently theme() is set to position 100
- clsTempParam.Position = 14
- Return clsTempParam
- End Get
- End Property
-
+ clsTempParam.Position = 14
+ Return clsTempParam
+ End Get
+ End Property
+
Public Shared ReadOnly Property strThemes As String()
Get
Dim strTemp As String()
@@ -50,103 +50,122 @@ Public Class GgplotDefaults
System.Array.Sort(Of String)(strTemp)
Return strTemp
End Get
- End Property
-
- Public Shared ReadOnly Property clsXlabTitleFunction As RFunction
- Get
- Dim clsXlabTempFunc As New RFunction
-
- clsXlabTempFunc.SetPackageName("ggplot2")
- clsXlabTempFunc.SetRCommand("xlab")
- Return clsXlabTempFunc
- End Get
- End Property
-
- Public Shared ReadOnly Property clsYlabTitleFunction As RFunction
- Get
- Dim clsYlabTempFunc As New RFunction
-
- clsYlabTempFunc.SetPackageName("ggplot2")
- clsYlabTempFunc.SetRCommand("ylab")
- Return clsYlabTempFunc
- End Get
- End Property
-
- Public Shared ReadOnly Property clsXScalecontinuousFunction As RFunction
- Get
- Dim clsXlabScalesTempFunc As New RFunction
-
- clsXlabScalesTempFunc.SetPackageName("ggplot2")
-
- clsXlabScalesTempFunc.SetRCommand("scale_x_continuous")
- Return clsXlabScalesTempFunc
- End Get
- End Property
-
- Public Shared ReadOnly Property clsYScalecontinuousFunction As RFunction
- Get
- Dim clsYlabScalesTempFunc As New RFunction
-
- clsYlabScalesTempFunc.SetPackageName("ggplot2")
- clsYlabScalesTempFunc.SetRCommand("scale_y_continuous")
-
- Return clsYlabScalesTempFunc
- End Get
End Property
- Public Shared ReadOnly Property clsYScaleDateFunction As RFunction
- Get
- Dim clsYlabScalesDateTempFunc As New RFunction
-
- clsYlabScalesDateTempFunc.SetPackageName("ggplot2")
- clsYlabScalesDateTempFunc.SetRCommand("scale_y_date")
-
- Return clsYlabScalesDateTempFunc
- End Get
- End Property
-
- Public Shared ReadOnly Property clsFacetFunction As RFunction
- Get
- Dim clsFacetTempFunc As New RFunction
- Dim clsFacetVariablesOp As New ROperator("~")
-
- clsFacetTempFunc.SetPackageName("ggplot2")
- clsFacetTempFunc.SetRCommand("facet_wrap")
- clsFacetTempFunc.AddParameter("dir", Chr(34) & "h" & Chr(34))
- clsFacetTempFunc.AddParameter("facets", clsROperatorParameter:=clsFacetVariablesOp)
- Return clsFacetTempFunc
- End Get
+ Public Shared ReadOnly Property clsXlabTitleFunction As RFunction
+ Get
+ Dim clsXlabTempFunc As New RFunction
+
+ clsXlabTempFunc.SetPackageName("ggplot2")
+ clsXlabTempFunc.SetRCommand("xlab")
+ Return clsXlabTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsYlabTitleFunction As RFunction
+ Get
+ Dim clsYlabTempFunc As New RFunction
+
+ clsYlabTempFunc.SetPackageName("ggplot2")
+ clsYlabTempFunc.SetRCommand("ylab")
+ Return clsYlabTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsXScalecontinuousFunction As RFunction
+ Get
+ Dim clsXlabScalesTempFunc As New RFunction
+
+ clsXlabScalesTempFunc.SetPackageName("ggplot2")
+
+ clsXlabScalesTempFunc.SetRCommand("scale_x_continuous")
+ Return clsXlabScalesTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsYScalecontinuousFunction As RFunction
+ Get
+ Dim clsYlabScalesTempFunc As New RFunction
+
+ clsYlabScalesTempFunc.SetPackageName("ggplot2")
+ clsYlabScalesTempFunc.SetRCommand("scale_y_continuous")
+
+ Return clsYlabScalesTempFunc
+ End Get
End Property
- Public Shared ReadOnly Property clsAesFunction As RFunction
- Get
+ Public Shared ReadOnly Property clsYScaleDateFunction As RFunction
+ Get
+ Dim clsYlabScalesDateTempFunc As New RFunction
+
+ clsYlabScalesDateTempFunc.SetPackageName("ggplot2")
+ clsYlabScalesDateTempFunc.SetRCommand("scale_y_date")
+
+ Return clsYlabScalesDateTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsFacetFunction As RFunction
+ Get
+ Dim clsFacetTempFunc As New RFunction
+ Dim clsFacetVariablesOp As New ROperator("~")
+
+ clsFacetTempFunc.SetPackageName("ggplot2")
+ clsFacetTempFunc.SetRCommand("facet_wrap")
+ clsFacetTempFunc.AddParameter("dir", Chr(34) & "h" & Chr(34))
+ clsFacetTempFunc.AddParameter("facets", clsROperatorParameter:=clsFacetVariablesOp)
+ Return clsFacetTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsAesFunction As RFunction
+ Get
Dim clslocalAesTempFunc As New RFunction
- clslocalAesTempFunc.SetPackageName("ggplot2")
+ clslocalAesTempFunc.SetPackageName("ggplot2")
clslocalAesTempFunc.SetRCommand("aes")
- Return clslocalAesTempFunc
- End Get
- End Property
-
- Public Shared ReadOnly Property dctThemeFunctions As Dictionary(Of String, RFunction)
- Get
- Dim dctTemp As New Dictionary(Of String, RFunction)
+ Return clslocalAesTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsCoordPolarFunction As RFunction
+ Get
+ Dim clsCoordPolarTempFunc As New RFunction
+ clsCoordPolarTempFunc.SetPackageName("ggplot2")
+ clsCoordPolarTempFunc.SetRCommand("coord_polar")
+ Return clsCoordPolarTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property clsCoordPolarStartOperator As ROperator
+ Get
+ Dim clsStartOPerator As New ROperator
+ clsStartOPerator.SetOperation("*")
+ clsStartOPerator.AddParameter("0", "0", iPosition:=0)
+ clsStartOPerator.AddParameter("1", "pi", iPosition:=1)
+ Return clsStartOPerator
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property dctThemeFunctions As Dictionary(Of String, RFunction)
+ Get
+ Dim dctTemp As New Dictionary(Of String, RFunction)
Dim clsElementText As RFunction
Dim clsElementLine As RFunction
Dim clsElementRect As RFunction
Dim clsUnit As RFunction
- clsElementText = New RFunction
- clsElementLine = New RFunction
+ clsElementText = New RFunction
+ clsElementLine = New RFunction
+ clsElementRect = New RFunction
clsElementRect = New RFunction
- clsElementRect = New RFunction
-
- clsUnit = New RFunction
-
- clsUnit.SetPackageName("grid")
- clsElementText.SetPackageName("ggplot2")
+
+ clsUnit = New RFunction
+
+ clsUnit.SetPackageName("grid")
+ clsElementText.SetPackageName("ggplot2")
clsElementLine.SetPackageName("ggplot2")
- clsElementRect.SetPackageName("ggplot2")
+ clsElementRect.SetPackageName("ggplot2")
clsElementText.SetRCommand("element_text")
clsElementLine.SetRCommand("element_line")
clsElementRect.SetRCommand("element_rect")
@@ -164,10 +183,10 @@ Public Class GgplotDefaults
dctTemp.Add("axis.title.x.top", clsElementText.Clone())
dctTemp.Add("axis.title.y", clsElementText.Clone())
dctTemp.Add("axis.title.y.right", clsElementText.Clone())
- dctTemp.Add("axis.text", clsElementText.Clone())
- dctTemp.Add("axis.text.x", clsElementText.Clone())
- dctTemp.Add("axis.text.x.top", clsElementText.Clone())
- dctTemp.Add("axis.text.y", clsElementText.Clone())
+ dctTemp.Add("axis.text", clsElementText.Clone())
+ dctTemp.Add("axis.text.x", clsElementText.Clone())
+ dctTemp.Add("axis.text.x.top", clsElementText.Clone())
+ dctTemp.Add("axis.text.y", clsElementText.Clone())
dctTemp.Add("axis.text.y.right", clsElementText.Clone())
dctTemp.Add("axis.ticks", clsElementLine.Clone())
dctTemp.Add("axis.ticks.x", clsElementLine.Clone())
@@ -213,54 +232,54 @@ Public Class GgplotDefaults
dctTemp.Add("plot.margin", clsUnit.Clone())
dctTemp.Add("strip.background", clsElementRect.Clone())
' dctTemp.Add("strip.placement", clsElementLine.Clone())
- dctTemp.Add("strip.text", clsElementText.Clone())
- dctTemp.Add("strip.text.x", clsElementText.Clone())
+ dctTemp.Add("strip.text", clsElementText.Clone())
+ dctTemp.Add("strip.text.x", clsElementText.Clone())
dctTemp.Add("strip.text.y", clsElementText.Clone())
dctTemp.Add("strip.switch.pad.grid", clsUnit.Clone())
dctTemp.Add("strip.switch.pad.wrap", clsUnit.Clone())
- Return dctTemp
- End Get
+ Return dctTemp
+ End Get
End Property
- Public Shared ReadOnly Property dctFonts As Dictionary(Of String, String)
- Get
- Dim dctTemp As New Dictionary(Of String, String)
- dctTemp.Add("Times Roman", Chr(34) & "Times" & Chr(34))
- dctTemp.Add("Courier", Chr(34) & "Courier" & Chr(34))
- dctTemp.Add("Couriersans", Chr(34) & "Couriersans" & Chr(34))
- dctTemp.Add("Serif", Chr(34) & "serif" & Chr(34))
- dctTemp.Add("NimbusSanCond", Chr(34) & "NimbusSanCond" & Chr(34))
- dctTemp.Add("CenturySch", Chr(34) & "CenturySch" & Chr(34))
- dctTemp.Add("NewCenturySchoolbook", Chr(34) & "NewCenturySchoolbook" & Chr(34))
- dctTemp.Add("Palatino", Chr(34) & "Palatino" & Chr(34))
- dctTemp.Add("Bookman", Chr(34) & "Bookman" & Chr(34))
- dctTemp.Add("URWBookman", Chr(34) & "URWBookman" & Chr(34))
- dctTemp.Add("URWGothic", Chr(34) & "URWGothic" & Chr(34))
- dctTemp.Add("NimbusRom", Chr(34) & "NimbusRom" & Chr(34))
- dctTemp.Add("URWPalladioURWTimes", Chr(34) & "URWPalladioURWTimes" & Chr(34))
- dctTemp.Add("NimbusMonURWHelvetica", Chr(34) & "NimbusMonURWHelvetica" & Chr(34))
- dctTemp.Add("Helvetica - Narrow", Chr(34) & "Helvetica - Narrow" & Chr(34))
- dctTemp.Add("Helveticaserif", Chr(34) & "Helveticaserif" & Chr(34))
- dctTemp.Add("Short", Chr(34) & "Short" & Chr(34))
- dctTemp.Add("Canonicalmono", Chr(34) & "Canonicalmono" & Chr(34))
- dctTemp.Add("AvantGarde", Chr(34) & "AvantGarde" & Chr(34))
-
- Return dctTemp
- End Get
+ Public Shared ReadOnly Property dctFonts As Dictionary(Of String, String)
+ Get
+ Dim dctTemp As New Dictionary(Of String, String)
+ dctTemp.Add("Times Roman", Chr(34) & "Times" & Chr(34))
+ dctTemp.Add("Courier", Chr(34) & "Courier" & Chr(34))
+ dctTemp.Add("Couriersans", Chr(34) & "Couriersans" & Chr(34))
+ dctTemp.Add("Serif", Chr(34) & "serif" & Chr(34))
+ dctTemp.Add("NimbusSanCond", Chr(34) & "NimbusSanCond" & Chr(34))
+ dctTemp.Add("CenturySch", Chr(34) & "CenturySch" & Chr(34))
+ dctTemp.Add("NewCenturySchoolbook", Chr(34) & "NewCenturySchoolbook" & Chr(34))
+ dctTemp.Add("Palatino", Chr(34) & "Palatino" & Chr(34))
+ dctTemp.Add("Bookman", Chr(34) & "Bookman" & Chr(34))
+ dctTemp.Add("URWBookman", Chr(34) & "URWBookman" & Chr(34))
+ dctTemp.Add("URWGothic", Chr(34) & "URWGothic" & Chr(34))
+ dctTemp.Add("NimbusRom", Chr(34) & "NimbusRom" & Chr(34))
+ dctTemp.Add("URWPalladioURWTimes", Chr(34) & "URWPalladioURWTimes" & Chr(34))
+ dctTemp.Add("NimbusMonURWHelvetica", Chr(34) & "NimbusMonURWHelvetica" & Chr(34))
+ dctTemp.Add("Helvetica - Narrow", Chr(34) & "Helvetica - Narrow" & Chr(34))
+ dctTemp.Add("Helveticaserif", Chr(34) & "Helveticaserif" & Chr(34))
+ dctTemp.Add("Short", Chr(34) & "Short" & Chr(34))
+ dctTemp.Add("Canonicalmono", Chr(34) & "Canonicalmono" & Chr(34))
+ dctTemp.Add("AvantGarde", Chr(34) & "AvantGarde" & Chr(34))
+
+ Return dctTemp
+ End Get
End Property
- Public Shared ReadOnly Property dctFontFace As Dictionary(Of String, String)
+ Public Shared ReadOnly Property dctFontFace As Dictionary(Of String, String)
Get
Dim dctTempFontFace As New Dictionary(Of String, String)
dctTempFontFace.Add("Plain", Chr(34) & "plain" & Chr(34))
dctTempFontFace.Add("Bold", Chr(34) & "bold" & Chr(34))
dctTempFontFace.Add("Italic", Chr(34) & "italic" & Chr(34))
dctTempFontFace.Add("Bold italic", Chr(34) & "bold.italic" & Chr(34))
- Return dctTempFontFace
- End Get
+ Return dctTempFontFace
+ End Get
End Property
- Public Shared ReadOnly Property dctColour As Dictionary(Of String, String)
+ Public Shared ReadOnly Property dctColour As Dictionary(Of String, String)
Get
Dim dctTempColour As New Dictionary(Of String, String)
dctTempColour.Add("White", Chr(34) & "white" & Chr(34))
@@ -270,12 +289,12 @@ Public Class GgplotDefaults
dctTempColour.Add("Light-Blue", Chr(34) & "lightblue" & Chr(34))
dctTempColour.Add("Grey", Chr(34) & "grey" & Chr(34))
dctTempColour.Add("Yellow", Chr(34) & "yellow" & Chr(34))
- dctTempColour.Add("Yellow-Green", Chr(34) & "yellowgreen" & Chr(34))
- Return dctTempColour
- End Get
+ dctTempColour.Add("Yellow-Green", Chr(34) & "yellowgreen" & Chr(34))
+ Return dctTempColour
+ End Get
End Property
- Public Shared ReadOnly Property dctLineType As Dictionary(Of String, String)
+ Public Shared ReadOnly Property dctLineType As Dictionary(Of String, String)
Get
Dim dctTempLineType As New Dictionary(Of String, String)
dctTempLineType.Add("Blank", Chr(34) & "blank" & Chr(34))
@@ -289,11 +308,11 @@ Public Class GgplotDefaults
dctTempLineType.Add("F1", Chr(34) & "F1" & Chr(34))
dctTempLineType.Add("4C88C488", Chr(34) & "4C88C488" & Chr(34))
dctTempLineType.Add("12345678", Chr(34) & "12345678" & Chr(34))
- Return dctTempLineType
- End Get
- End Property
-
- Public Shared ReadOnly Property dctLineEnd As Dictionary(Of String, String)
+ Return dctTempLineType
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property dctLineEnd As Dictionary(Of String, String)
Get
Dim dctTempLineEnd As New Dictionary(Of String, String)
dctTempLineEnd.Add("None", Chr(34) & "NULL" & Chr(34))
@@ -301,10 +320,10 @@ Public Class GgplotDefaults
dctTempLineEnd.Add("butt", Chr(34) & "butt" & Chr(34))
dctTempLineEnd.Add("square", Chr(34) & "square" & Chr(34))
Return dctTempLineEnd
- End Get
+ End Get
End Property
- Public Shared ReadOnly Property dctUnits As Dictionary(Of String, String)
+ Public Shared ReadOnly Property dctUnits As Dictionary(Of String, String)
Get
Dim dctTempUnits As New Dictionary(Of String, String)
dctTempUnits.Add("Normalised Parent Coordinates", Chr(34) & "npc" & Chr(34))
@@ -326,20 +345,20 @@ Public Class GgplotDefaults
dctTempUnits.Add("Grop Height", Chr(34) & "grobheight" & Chr(34))
dctTempUnits.Add("Grop Width", Chr(34) & "grobwidth" & Chr(34))
Return dctTempUnits
- End Get
- End Property
- Public Shared ReadOnly Property clsDefaultThemeFunction As RFunction
- Get
- Dim clsTempFunc As New RFunction
-
- clsTempFunc.SetPackageName("ggplot2")
- clsTempFunc.SetRCommand("theme")
-
- Return clsTempFunc
- End Get
+ End Get
End Property
+ Public Shared ReadOnly Property clsDefaultThemeFunction As RFunction
+ Get
+ Dim clsTempFunc As New RFunction
+
+ clsTempFunc.SetPackageName("ggplot2")
+ clsTempFunc.SetRCommand("theme")
- Public Shared ReadOnly Property dctTransformations As Dictionary(Of String, String)
+ Return clsTempFunc
+ End Get
+ End Property
+
+ Public Shared ReadOnly Property dctTransformations As Dictionary(Of String, String)
Get
Dim dcttempTransfromations As New Dictionary(Of String, String)
dcttempTransfromations.Add("asn", Chr(34) & "asn" & Chr(34))
@@ -358,28 +377,28 @@ Public Class GgplotDefaults
dcttempTransfromations.Add("reverse", Chr(34) & "reverse" & Chr(34))
dcttempTransfromations.Add("sqrt", Chr(34) & "sqrt" & Chr(34))
Return dcttempTransfromations
- End Get
+ End Get
End Property
- Public Shared ReadOnly Property dctXPosition As Dictionary(Of String, String)
+ Public Shared ReadOnly Property dctXPosition As Dictionary(Of String, String)
Get
Dim dctTempXPosition As New Dictionary(Of String, String)
dctTempXPosition.Add("Top", Chr(34) & "top" & Chr(34))
dctTempXPosition.Add("Bottom", Chr(34) & "bottom" & Chr(34))
Return dctTempXPosition
- End Get
+ End Get
End Property
- Public Shared ReadOnly Property dctYPosition As Dictionary(Of String, String)
+ Public Shared ReadOnly Property dctYPosition As Dictionary(Of String, String)
Get
Dim dctTempYPosition As New Dictionary(Of String, String)
dctTempYPosition.Add("Left", Chr(34) & "left" & Chr(34))
dctTempYPosition.Add("Right", Chr(34) & "right" & Chr(34))
Return dctTempYPosition
- End Get
- End Property
-
+ End Get
+ End Property
+
Public Shared ReadOnly Property dctStartMonthOriginDates As Dictionary(Of String, String)
Get
Dim dctDateStartMonths As New Dictionary(Of String, String)
@@ -399,5 +418,5 @@ Public Class GgplotDefaults
Return dctDateStartMonths
End Get
- End Property
+ End Property
End Class
\ No newline at end of file
diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb
index edfdea4435d..c42eb448ae0 100644
--- a/instat/dlgBoxPlot.vb
+++ b/instat/dlgBoxPlot.vb
@@ -33,6 +33,8 @@ Public Class dlgBoxplot
Private clsXScaleContinuousFunction As New RFunction
Private clsYScaleContinuousFunction As New RFunction
Private clsRFacetFunction As New RFunction
+ Private clsCoordPolarFunction As New RFunction
+ Private clsCoordPolarStartOperator As New ROperator
Private clsThemeFunction As New RFunction
Private dctThemeFunctions As Dictionary(Of String, RFunction)
Private bResetSubdialog As Boolean = True
@@ -249,6 +251,8 @@ Public Class dlgBoxplot
clsRFacetFunction = GgplotDefaults.clsFacetFunction.Clone()
clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone
clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone()
+ clsCoordPolarFunction = GgplotDefaults.clsCoordPolarFunction.Clone()
+ clsCoordPolarStartOperator = GgplotDefaults.clsCoordPolarStartOperator.Clone()
dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions)
clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
@@ -292,7 +296,7 @@ Public Class dlgBoxplot
End Sub
Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click
- sdgPlots.SetRCode(clsBaseOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, clsNewXScalecontinuousFunction:=clsXScaleContinuousFunction, clsNewYScalecontinuousFunction:=clsYScaleContinuousFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, ucrNewBaseSelector:=ucrSelectorBoxPlot, strMainDialogGeomParameterNames:=strGeomParameterNames, bReset:=bResetSubdialog)
+ sdgPlots.SetRCode(clsBaseOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, clsNewXScalecontinuousFunction:=clsXScaleContinuousFunction, clsNewYScalecontinuousFunction:=clsYScaleContinuousFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, ucrNewBaseSelector:=ucrSelectorBoxPlot, strMainDialogGeomParameterNames:=strGeomParameterNames, bReset:=bResetSubdialog)
sdgPlots.ShowDialog()
bResetSubdialog = False
diff --git a/instat/dlgCircular.Designer.vb b/instat/dlgCircular.Designer.vb
index 03d4daf298b..4fdf11d80c0 100644
--- a/instat/dlgCircular.Designer.vb
+++ b/instat/dlgCircular.Designer.vb
@@ -22,32 +22,238 @@ Partial Class dlgCircular
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
- Me.UcrButtons1 = New instat.ucrButtons()
+ Me.lblToCircular = New System.Windows.Forms.Label()
+ Me.grpUnits = New System.Windows.Forms.GroupBox()
+ Me.rdoHours = New System.Windows.Forms.RadioButton()
+ Me.rdoDegrees = New System.Windows.Forms.RadioButton()
+ Me.rdoRadians = New System.Windows.Forms.RadioButton()
+ Me.ucrPnlUnits = New instat.UcrPanel()
+ Me.rdo2Pi = New System.Windows.Forms.RadioButton()
+ Me.rdoPi = New System.Windows.Forms.RadioButton()
+ Me.rdoAsis = New System.Windows.Forms.RadioButton()
+ Me.grpModulo = New System.Windows.Forms.GroupBox()
+ Me.ucrPnlModulo = New instat.UcrPanel()
+ Me.ucrSaveCircularColumn = New instat.ucrSave()
+ Me.ucrReceiverCircular = New instat.ucrReceiverSingle()
+ Me.ucrSelectorCircular = New instat.ucrSelectorByDataFrameAddRemove()
+ Me.ucrBase = New instat.ucrButtons()
+ Me.grpUnits.SuspendLayout()
+ Me.grpModulo.SuspendLayout()
Me.SuspendLayout()
'
- 'UcrButtons1
+ 'lblToCircular
'
- Me.UcrButtons1.Location = New System.Drawing.Point(86, 373)
- Me.UcrButtons1.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
- Me.UcrButtons1.Name = "UcrButtons1"
- Me.UcrButtons1.Size = New System.Drawing.Size(547, 64)
- Me.UcrButtons1.TabIndex = 0
+ Me.lblToCircular.AutoSize = True
+ Me.lblToCircular.Location = New System.Drawing.Point(345, 62)
+ Me.lblToCircular.Name = "lblToCircular"
+ Me.lblToCircular.Size = New System.Drawing.Size(79, 17)
+ Me.lblToCircular.TabIndex = 2
+ Me.lblToCircular.Text = "To circular:"
+ '
+ 'grpUnits
+ '
+ Me.grpUnits.Controls.Add(Me.rdoHours)
+ Me.grpUnits.Controls.Add(Me.rdoDegrees)
+ Me.grpUnits.Controls.Add(Me.rdoRadians)
+ Me.grpUnits.Controls.Add(Me.ucrPnlUnits)
+ Me.grpUnits.Location = New System.Drawing.Point(13, 261)
+ Me.grpUnits.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.grpUnits.Name = "grpUnits"
+ Me.grpUnits.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.grpUnits.Size = New System.Drawing.Size(140, 108)
+ Me.grpUnits.TabIndex = 4
+ Me.grpUnits.TabStop = False
+ Me.grpUnits.Text = "Units"
+ '
+ 'rdoHours
+ '
+ Me.rdoHours.AutoSize = True
+ Me.rdoHours.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoHours.Location = New System.Drawing.Point(13, 81)
+ Me.rdoHours.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.rdoHours.Name = "rdoHours"
+ Me.rdoHours.Size = New System.Drawing.Size(65, 21)
+ Me.rdoHours.TabIndex = 3
+ Me.rdoHours.TabStop = True
+ Me.rdoHours.Text = "hours"
+ Me.rdoHours.UseVisualStyleBackColor = True
+ '
+ 'rdoDegrees
+ '
+ Me.rdoDegrees.AutoSize = True
+ Me.rdoDegrees.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoDegrees.Location = New System.Drawing.Point(13, 53)
+ Me.rdoDegrees.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.rdoDegrees.Name = "rdoDegrees"
+ Me.rdoDegrees.Size = New System.Drawing.Size(81, 21)
+ Me.rdoDegrees.TabIndex = 2
+ Me.rdoDegrees.TabStop = True
+ Me.rdoDegrees.Text = "degrees"
+ Me.rdoDegrees.UseVisualStyleBackColor = True
+ '
+ 'rdoRadians
+ '
+ Me.rdoRadians.AutoSize = True
+ Me.rdoRadians.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoRadians.Location = New System.Drawing.Point(13, 26)
+ Me.rdoRadians.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.rdoRadians.Name = "rdoRadians"
+ Me.rdoRadians.Size = New System.Drawing.Size(76, 21)
+ Me.rdoRadians.TabIndex = 1
+ Me.rdoRadians.TabStop = True
+ Me.rdoRadians.Text = "radians"
+ Me.rdoRadians.UseVisualStyleBackColor = True
+ '
+ 'ucrPnlUnits
+ '
+ Me.ucrPnlUnits.Location = New System.Drawing.Point(4, 20)
+ Me.ucrPnlUnits.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6)
+ Me.ucrPnlUnits.Name = "ucrPnlUnits"
+ Me.ucrPnlUnits.Size = New System.Drawing.Size(124, 82)
+ Me.ucrPnlUnits.TabIndex = 0
+ '
+ 'rdo2Pi
+ '
+ Me.rdo2Pi.AutoSize = True
+ Me.rdo2Pi.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdo2Pi.Location = New System.Drawing.Point(20, 76)
+ Me.rdo2Pi.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.rdo2Pi.Name = "rdo2Pi"
+ Me.rdo2Pi.Size = New System.Drawing.Size(48, 21)
+ Me.rdo2Pi.TabIndex = 3
+ Me.rdo2Pi.TabStop = True
+ Me.rdo2Pi.Text = "2pi"
+ Me.rdo2Pi.UseVisualStyleBackColor = True
+ '
+ 'rdoPi
+ '
+ Me.rdoPi.AutoSize = True
+ Me.rdoPi.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoPi.Location = New System.Drawing.Point(20, 48)
+ Me.rdoPi.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.rdoPi.Name = "rdoPi"
+ Me.rdoPi.Size = New System.Drawing.Size(40, 21)
+ Me.rdoPi.TabIndex = 2
+ Me.rdoPi.TabStop = True
+ Me.rdoPi.Text = "pi"
+ Me.rdoPi.UseVisualStyleBackColor = True
+ '
+ 'rdoAsis
+ '
+ Me.rdoAsis.AutoSize = True
+ Me.rdoAsis.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoAsis.Location = New System.Drawing.Point(20, 21)
+ Me.rdoAsis.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.rdoAsis.Name = "rdoAsis"
+ Me.rdoAsis.Size = New System.Drawing.Size(54, 21)
+ Me.rdoAsis.TabIndex = 1
+ Me.rdoAsis.TabStop = True
+ Me.rdoAsis.Text = "asis"
+ Me.rdoAsis.UseVisualStyleBackColor = True
+ '
+ 'grpModulo
+ '
+ Me.grpModulo.Controls.Add(Me.rdo2Pi)
+ Me.grpModulo.Controls.Add(Me.rdoPi)
+ Me.grpModulo.Controls.Add(Me.rdoAsis)
+ Me.grpModulo.Controls.Add(Me.ucrPnlModulo)
+ Me.grpModulo.Location = New System.Drawing.Point(215, 261)
+ Me.grpModulo.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.grpModulo.Name = "grpModulo"
+ Me.grpModulo.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4)
+ Me.grpModulo.Size = New System.Drawing.Size(140, 108)
+ Me.grpModulo.TabIndex = 5
+ Me.grpModulo.TabStop = False
+ Me.grpModulo.Text = "Modulo"
+ '
+ 'ucrPnlModulo
+ '
+ Me.ucrPnlModulo.Location = New System.Drawing.Point(13, 14)
+ Me.ucrPnlModulo.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6)
+ Me.ucrPnlModulo.Name = "ucrPnlModulo"
+ Me.ucrPnlModulo.Size = New System.Drawing.Size(124, 82)
+ Me.ucrPnlModulo.TabIndex = 3
+ '
+ 'ucrSaveCircularColumn
+ '
+ Me.ucrSaveCircularColumn.Location = New System.Drawing.Point(13, 386)
+ Me.ucrSaveCircularColumn.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6)
+ Me.ucrSaveCircularColumn.Name = "ucrSaveCircularColumn"
+ Me.ucrSaveCircularColumn.Size = New System.Drawing.Size(324, 30)
+ Me.ucrSaveCircularColumn.TabIndex = 6
+ '
+ 'ucrReceiverCircular
+ '
+ Me.ucrReceiverCircular.frmParent = Me
+ Me.ucrReceiverCircular.Location = New System.Drawing.Point(349, 81)
+ Me.ucrReceiverCircular.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverCircular.Name = "ucrReceiverCircular"
+ Me.ucrReceiverCircular.Selector = Nothing
+ Me.ucrReceiverCircular.Size = New System.Drawing.Size(160, 25)
+ Me.ucrReceiverCircular.strNcFilePath = ""
+ Me.ucrReceiverCircular.TabIndex = 3
+ Me.ucrReceiverCircular.ucrSelector = Nothing
+ '
+ 'ucrSelectorCircular
+ '
+ Me.ucrSelectorCircular.bDropUnusedFilterLevels = False
+ Me.ucrSelectorCircular.bShowHiddenColumns = False
+ Me.ucrSelectorCircular.bUseCurrentFilter = True
+ Me.ucrSelectorCircular.Location = New System.Drawing.Point(13, 33)
+ Me.ucrSelectorCircular.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrSelectorCircular.Name = "ucrSelectorCircular"
+ Me.ucrSelectorCircular.Size = New System.Drawing.Size(280, 222)
+ Me.ucrSelectorCircular.TabIndex = 1
+ '
+ 'ucrBase
+ '
+ Me.ucrBase.Location = New System.Drawing.Point(13, 420)
+ Me.ucrBase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5)
+ Me.ucrBase.Name = "ucrBase"
+ Me.ucrBase.Size = New System.Drawing.Size(537, 64)
+ Me.ucrBase.TabIndex = 0
'
'dlgCircular
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(800, 450)
- Me.Controls.Add(Me.UcrButtons1)
+ Me.ClientSize = New System.Drawing.Size(559, 491)
+ Me.Controls.Add(Me.ucrSaveCircularColumn)
+ Me.Controls.Add(Me.grpModulo)
+ Me.Controls.Add(Me.grpUnits)
+ Me.Controls.Add(Me.lblToCircular)
+ Me.Controls.Add(Me.ucrReceiverCircular)
+ Me.Controls.Add(Me.ucrSelectorCircular)
+ Me.Controls.Add(Me.ucrBase)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
+ Me.Margin = New System.Windows.Forms.Padding(3, 2, 3, 2)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "dlgCircular"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "Circular"
+ Me.Text = "Convert to Circular"
+ Me.grpUnits.ResumeLayout(False)
+ Me.grpUnits.PerformLayout()
+ Me.grpModulo.ResumeLayout(False)
+ Me.grpModulo.PerformLayout()
Me.ResumeLayout(False)
+ Me.PerformLayout()
End Sub
- Friend WithEvents UcrButtons1 As ucrButtons
+ Friend WithEvents ucrBase As ucrButtons
+ Friend WithEvents ucrSelectorCircular As ucrSelectorByDataFrameAddRemove
+ Friend WithEvents ucrReceiverCircular As ucrReceiverSingle
+ Friend WithEvents lblToCircular As Label
+ Friend WithEvents grpUnits As GroupBox
+ Friend WithEvents rdoHours As RadioButton
+ Friend WithEvents rdoDegrees As RadioButton
+ Friend WithEvents rdoRadians As RadioButton
+ Friend WithEvents ucrPnlUnits As UcrPanel
+ Friend WithEvents rdo2Pi As RadioButton
+ Friend WithEvents rdoPi As RadioButton
+ Friend WithEvents rdoAsis As RadioButton
+ Friend WithEvents ucrPnlModulo As UcrPanel
+ Friend WithEvents grpModulo As GroupBox
+ Friend WithEvents ucrSaveCircularColumn As ucrSave
End Class
diff --git a/instat/dlgCircular.vb b/instat/dlgCircular.vb
index 68f1b5b7095..2e11543dc3e 100644
--- a/instat/dlgCircular.vb
+++ b/instat/dlgCircular.vb
@@ -1,3 +1,94 @@
-Public Class dlgCircular
+' 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 dlgCircular
+ Private bFirstLoad As Boolean = True
+ Private bReset As Boolean = True
+ Private clsCircularFunction As New RFunction
+ Private Sub dlgCircular_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ If bFirstLoad Then
+ InitialiseDialog()
+ bFirstLoad = False
+ End If
+ If bReset Then
+ SetDefaults()
+ End If
+ SetRcodeforControls(bReset)
+ bReset = False
+ autoTranslate(Me)
+ End Sub
+ Private Sub InitialiseDialog()
+ ucrReceiverCircular.Selector = ucrSelectorCircular
+ ucrReceiverCircular.SetMeAsReceiver()
+
+ ucrReceiverCircular.SetParameter(New RParameter("x", 0))
+ ucrReceiverCircular.SetParameterIsRFunction()
+
+ ucrPnlModulo.SetParameter(New RParameter("modulo", 1))
+ ucrPnlModulo.AddRadioButton(rdoAsis, Chr(34) & "asis" & Chr(34))
+ ucrPnlModulo.AddRadioButton(rdo2Pi, Chr(34) & "2pi" & Chr(34))
+ ucrPnlModulo.AddRadioButton(rdoPi, Chr(34) & "pi" & Chr(34))
+
+ ucrPnlUnits.SetParameter(New RParameter("units", 2))
+ ucrPnlUnits.AddRadioButton(rdoDegrees, Chr(34) & "degrees" & Chr(34))
+ ucrPnlUnits.AddRadioButton(rdoHours, Chr(34) & "hours" & Chr(34))
+ ucrPnlUnits.AddRadioButton(rdoRadians, Chr(34) & "radians" & Chr(34))
+
+ ucrSaveCircularColumn.SetPrefix("circ")
+ ucrSaveCircularColumn.SetSaveTypeAsColumn()
+ ucrSaveCircularColumn.SetDataFrameSelector(ucrSelectorCircular.ucrAvailableDataFrames)
+ ucrSaveCircularColumn.SetLabelText("New Column Name:")
+ ucrSaveCircularColumn.SetIsComboBox()
+ End Sub
+
+ Private Sub SetDefaults()
+ clsCircularFunction = New RFunction
+
+ ucrSelectorCircular.Reset()
+ ucrSaveCircularColumn.Reset()
+ clsCircularFunction.SetPackageName("circular")
+ clsCircularFunction.SetRCommand("circular")
+
+ clsCircularFunction.AddParameter("units", Chr(34) & "radians" & Chr(34), iPosition:=2)
+ clsCircularFunction.AddParameter("modulo", Chr(34) & "2pi" & Chr(34), iPosition:=1)
+
+ clsCircularFunction.SetAssignTo(ucrSaveCircularColumn.GetText, strTempDataframe:=ucrSelectorCircular.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveCircularColumn.GetText)
+ ucrBase.clsRsyntax.SetBaseRFunction(clsCircularFunction)
+ End Sub
+
+ Private Sub SetRcodeforControls(breset As Boolean)
+ SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, breset)
+ End Sub
+
+ Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
+ SetDefaults()
+ SetRcodeforControls(True)
+ TestOkEnabled()
+ End Sub
+
+ Private Sub TestOkEnabled()
+ If ucrReceiverCircular.IsEmpty OrElse Not ucrSaveCircularColumn.IsComplete Then
+ ucrBase.OKEnabled(False)
+ Else
+ ucrBase.OKEnabled(True)
+ End If
+ End Sub
+
+ Private Sub ucrReceiverCircular_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverCircular.ControlContentsChanged, ucrSaveCircularColumn.ControlContentsChanged
+ TestOkEnabled()
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgEndOfRainsSeason.Designer.vb b/instat/dlgEndOfRainsSeason.Designer.vb
index ccc8ef7605d..58a53e60cfa 100644
--- a/instat/dlgEndOfRainsSeason.Designer.vb
+++ b/instat/dlgEndOfRainsSeason.Designer.vb
@@ -66,6 +66,9 @@ Partial Class dlgEndOfRainsSeason
Me.ucrChkEndofRainsOccurence = New instat.ucrCheck()
Me.ucrInputEndofRainsDate = New instat.ucrInputTextBox()
Me.ucrInputEndofRainsOccurence = New instat.ucrInputTextBox()
+ Me.rdoEndOfSeasons = New System.Windows.Forms.RadioButton()
+ Me.rdoEndOfRains = New System.Windows.Forms.RadioButton()
+ Me.ucrPnlEndOfRainsAndSeasons = New instat.UcrPanel()
Me.ucrInputReplaceNA = New instat.ucrInputTextBox()
Me.ucrReceiverEvaporation = New instat.ucrReceiverSingle()
Me.ucrInputEvaporation = New instat.ucrInputTextBox()
@@ -73,8 +76,6 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputFilterPreview = New instat.ucrInputTextBox()
Me.ucrNudTotalOverDays = New instat.ucrNud()
Me.ucrNudAmount = New instat.ucrNud()
- Me.ucrChkEndOfRains = New instat.ucrCheck()
- Me.ucrChkEndOfSeason = New instat.ucrCheck()
Me.ucrNudWBLessThan = New instat.ucrNud()
Me.ucrNudCapacity = New instat.ucrNud()
Me.ucrReceiverStation = New instat.ucrReceiverSingle()
@@ -91,7 +92,7 @@ Partial Class dlgEndOfRainsSeason
'lblYear
'
Me.lblYear.AutoSize = True
- Me.lblYear.Location = New System.Drawing.Point(250, 108)
+ Me.lblYear.Location = New System.Drawing.Point(271, 137)
Me.lblYear.Name = "lblYear"
Me.lblYear.Size = New System.Drawing.Size(32, 13)
Me.lblYear.TabIndex = 5
@@ -100,7 +101,7 @@ Partial Class dlgEndOfRainsSeason
'lblDate
'
Me.lblDate.AutoSize = True
- Me.lblDate.Location = New System.Drawing.Point(250, 62)
+ Me.lblDate.Location = New System.Drawing.Point(271, 91)
Me.lblDate.Name = "lblDate"
Me.lblDate.Size = New System.Drawing.Size(33, 13)
Me.lblDate.TabIndex = 3
@@ -109,7 +110,7 @@ Partial Class dlgEndOfRainsSeason
'lblDOY
'
Me.lblDOY.AutoSize = True
- Me.lblDOY.Location = New System.Drawing.Point(250, 152)
+ Me.lblDOY.Location = New System.Drawing.Point(271, 181)
Me.lblDOY.Name = "lblDOY"
Me.lblDOY.Size = New System.Drawing.Size(66, 13)
Me.lblDOY.TabIndex = 7
@@ -118,7 +119,7 @@ Partial Class dlgEndOfRainsSeason
'lblCapacity
'
Me.lblCapacity.AutoSize = True
- Me.lblCapacity.Location = New System.Drawing.Point(116, 382)
+ Me.lblCapacity.Location = New System.Drawing.Point(16, 310)
Me.lblCapacity.Name = "lblCapacity"
Me.lblCapacity.Size = New System.Drawing.Size(51, 13)
Me.lblCapacity.TabIndex = 20
@@ -128,7 +129,7 @@ Partial Class dlgEndOfRainsSeason
'lblRainfall
'
Me.lblRainfall.AutoSize = True
- Me.lblRainfall.Location = New System.Drawing.Point(250, 196)
+ Me.lblRainfall.Location = New System.Drawing.Point(271, 225)
Me.lblRainfall.Name = "lblRainfall"
Me.lblRainfall.Size = New System.Drawing.Size(70, 13)
Me.lblRainfall.TabIndex = 9
@@ -137,7 +138,7 @@ Partial Class dlgEndOfRainsSeason
'lblEvaporation
'
Me.lblEvaporation.AutoSize = True
- Me.lblEvaporation.Location = New System.Drawing.Point(25, 414)
+ Me.lblEvaporation.Location = New System.Drawing.Point(25, 345)
Me.lblEvaporation.Name = "lblEvaporation"
Me.lblEvaporation.Size = New System.Drawing.Size(67, 13)
Me.lblEvaporation.TabIndex = 24
@@ -146,7 +147,7 @@ Partial Class dlgEndOfRainsSeason
'lblStation
'
Me.lblStation.AutoSize = True
- Me.lblStation.Location = New System.Drawing.Point(250, 17)
+ Me.lblStation.Location = New System.Drawing.Point(271, 46)
Me.lblStation.Name = "lblStation"
Me.lblStation.Size = New System.Drawing.Size(43, 13)
Me.lblStation.TabIndex = 1
@@ -155,7 +156,7 @@ Partial Class dlgEndOfRainsSeason
'lblAmount
'
Me.lblAmount.AutoSize = True
- Me.lblAmount.Location = New System.Drawing.Point(116, 288)
+ Me.lblAmount.Location = New System.Drawing.Point(15, 310)
Me.lblAmount.Name = "lblAmount"
Me.lblAmount.Size = New System.Drawing.Size(46, 13)
Me.lblAmount.TabIndex = 14
@@ -164,7 +165,7 @@ Partial Class dlgEndOfRainsSeason
'lblTotalOverDays
'
Me.lblTotalOverDays.AutoSize = True
- Me.lblTotalOverDays.Location = New System.Drawing.Point(262, 288)
+ Me.lblTotalOverDays.Location = New System.Drawing.Point(161, 310)
Me.lblTotalOverDays.Name = "lblTotalOverDays"
Me.lblTotalOverDays.Size = New System.Drawing.Size(66, 13)
Me.lblTotalOverDays.TabIndex = 16
@@ -173,7 +174,7 @@ Partial Class dlgEndOfRainsSeason
'lblWaterBalanceLessThan
'
Me.lblWaterBalanceLessThan.AutoSize = True
- Me.lblWaterBalanceLessThan.Location = New System.Drawing.Point(235, 382)
+ Me.lblWaterBalanceLessThan.Location = New System.Drawing.Point(135, 310)
Me.lblWaterBalanceLessThan.Name = "lblWaterBalanceLessThan"
Me.lblWaterBalanceLessThan.Size = New System.Drawing.Size(93, 13)
Me.lblWaterBalanceLessThan.TabIndex = 22
@@ -183,7 +184,7 @@ Partial Class dlgEndOfRainsSeason
'cmdDoyRange
'
Me.cmdDoyRange.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdDoyRange.Location = New System.Drawing.Point(10, 241)
+ Me.cmdDoyRange.Location = New System.Drawing.Point(22, 270)
Me.cmdDoyRange.Name = "cmdDoyRange"
Me.cmdDoyRange.Size = New System.Drawing.Size(105, 26)
Me.cmdDoyRange.TabIndex = 11
@@ -194,29 +195,27 @@ Partial Class dlgEndOfRainsSeason
'rdoVariableEvaporation
'
Me.rdoVariableEvaporation.AutoSize = True
- Me.rdoVariableEvaporation.Location = New System.Drawing.Point(107, 439)
+ Me.rdoVariableEvaporation.Location = New System.Drawing.Point(107, 370)
Me.rdoVariableEvaporation.Name = "rdoVariableEvaporation"
Me.rdoVariableEvaporation.Size = New System.Drawing.Size(66, 17)
Me.rdoVariableEvaporation.TabIndex = 28
- Me.rdoVariableEvaporation.TabStop = True
Me.rdoVariableEvaporation.Text = "Variable:"
Me.rdoVariableEvaporation.UseVisualStyleBackColor = True
'
'rdoValueEvaporation
'
Me.rdoValueEvaporation.AutoSize = True
- Me.rdoValueEvaporation.Location = New System.Drawing.Point(107, 412)
+ Me.rdoValueEvaporation.Location = New System.Drawing.Point(107, 343)
Me.rdoValueEvaporation.Name = "rdoValueEvaporation"
Me.rdoValueEvaporation.Size = New System.Drawing.Size(55, 17)
Me.rdoValueEvaporation.TabIndex = 26
- Me.rdoValueEvaporation.TabStop = True
Me.rdoValueEvaporation.Text = "Value:"
Me.rdoValueEvaporation.UseVisualStyleBackColor = True
'
'lblReplaceNA
'
Me.lblReplaceNA.AutoSize = True
- Me.lblReplaceNA.Location = New System.Drawing.Point(81, 471)
+ Me.lblReplaceNA.Location = New System.Drawing.Point(81, 402)
Me.lblReplaceNA.Name = "lblReplaceNA"
Me.lblReplaceNA.Size = New System.Drawing.Size(90, 13)
Me.lblReplaceNA.TabIndex = 30
@@ -230,9 +229,9 @@ Partial Class dlgEndOfRainsSeason
Me.grpEndofSeason.Controls.Add(Me.ucrInputSeasonDoy)
Me.grpEndofSeason.Controls.Add(Me.ucrInputEndofSeasonDate)
Me.grpEndofSeason.Controls.Add(Me.ucrInputEndofSeasonOccurence)
- Me.grpEndofSeason.Location = New System.Drawing.Point(10, 494)
+ Me.grpEndofSeason.Location = New System.Drawing.Point(10, 426)
Me.grpEndofSeason.Name = "grpEndofSeason"
- Me.grpEndofSeason.Size = New System.Drawing.Size(428, 48)
+ Me.grpEndofSeason.Size = New System.Drawing.Size(428, 42)
Me.grpEndofSeason.TabIndex = 32
Me.grpEndofSeason.TabStop = False
Me.grpEndofSeason.Text = "End of Season"
@@ -240,23 +239,23 @@ Partial Class dlgEndOfRainsSeason
'ucrChkEndofSeasonOccurence
'
Me.ucrChkEndofSeasonOccurence.Checked = False
- Me.ucrChkEndofSeasonOccurence.Location = New System.Drawing.Point(264, 20)
+ Me.ucrChkEndofSeasonOccurence.Location = New System.Drawing.Point(264, 18)
Me.ucrChkEndofSeasonOccurence.Name = "ucrChkEndofSeasonOccurence"
- Me.ucrChkEndofSeasonOccurence.Size = New System.Drawing.Size(87, 20)
+ Me.ucrChkEndofSeasonOccurence.Size = New System.Drawing.Size(82, 20)
Me.ucrChkEndofSeasonOccurence.TabIndex = 48
'
'ucrChkEndofSeasonDate
'
Me.ucrChkEndofSeasonDate.Checked = False
- Me.ucrChkEndofSeasonDate.Location = New System.Drawing.Point(133, 20)
+ Me.ucrChkEndofSeasonDate.Location = New System.Drawing.Point(133, 18)
Me.ucrChkEndofSeasonDate.Name = "ucrChkEndofSeasonDate"
- Me.ucrChkEndofSeasonDate.Size = New System.Drawing.Size(52, 20)
+ Me.ucrChkEndofSeasonDate.Size = New System.Drawing.Size(51, 20)
Me.ucrChkEndofSeasonDate.TabIndex = 47
'
'ucrChkEndofSeasonDoy
'
Me.ucrChkEndofSeasonDoy.Checked = False
- Me.ucrChkEndofSeasonDoy.Location = New System.Drawing.Point(8, 20)
+ Me.ucrChkEndofSeasonDoy.Location = New System.Drawing.Point(8, 18)
Me.ucrChkEndofSeasonDoy.Name = "ucrChkEndofSeasonDoy"
Me.ucrChkEndofSeasonDoy.Size = New System.Drawing.Size(45, 20)
Me.ucrChkEndofSeasonDoy.TabIndex = 46
@@ -266,7 +265,7 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputSeasonDoy.AddQuotesIfUnrecognised = True
Me.ucrInputSeasonDoy.IsMultiline = False
Me.ucrInputSeasonDoy.IsReadOnly = False
- Me.ucrInputSeasonDoy.Location = New System.Drawing.Point(59, 20)
+ Me.ucrInputSeasonDoy.Location = New System.Drawing.Point(59, 17)
Me.ucrInputSeasonDoy.Name = "ucrInputSeasonDoy"
Me.ucrInputSeasonDoy.Size = New System.Drawing.Size(67, 21)
Me.ucrInputSeasonDoy.TabIndex = 32
@@ -276,7 +275,7 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputEndofSeasonDate.AddQuotesIfUnrecognised = True
Me.ucrInputEndofSeasonDate.IsMultiline = False
Me.ucrInputEndofSeasonDate.IsReadOnly = False
- Me.ucrInputEndofSeasonDate.Location = New System.Drawing.Point(189, 20)
+ Me.ucrInputEndofSeasonDate.Location = New System.Drawing.Point(186, 17)
Me.ucrInputEndofSeasonDate.Name = "ucrInputEndofSeasonDate"
Me.ucrInputEndofSeasonDate.Size = New System.Drawing.Size(67, 21)
Me.ucrInputEndofSeasonDate.TabIndex = 37
@@ -286,7 +285,7 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputEndofSeasonOccurence.AddQuotesIfUnrecognised = True
Me.ucrInputEndofSeasonOccurence.IsMultiline = False
Me.ucrInputEndofSeasonOccurence.IsReadOnly = False
- Me.ucrInputEndofSeasonOccurence.Location = New System.Drawing.Point(352, 20)
+ Me.ucrInputEndofSeasonOccurence.Location = New System.Drawing.Point(352, 17)
Me.ucrInputEndofSeasonOccurence.Name = "ucrInputEndofSeasonOccurence"
Me.ucrInputEndofSeasonOccurence.Size = New System.Drawing.Size(67, 21)
Me.ucrInputEndofSeasonOccurence.TabIndex = 38
@@ -299,12 +298,12 @@ Partial Class dlgEndOfRainsSeason
Me.grpEndofRains.Controls.Add(Me.ucrChkEndofRainsOccurence)
Me.grpEndofRains.Controls.Add(Me.ucrInputEndofRainsDate)
Me.grpEndofRains.Controls.Add(Me.ucrInputEndofRainsOccurence)
- Me.grpEndofRains.Location = New System.Drawing.Point(10, 324)
+ Me.grpEndofRains.Location = New System.Drawing.Point(10, 426)
Me.grpEndofRains.Name = "grpEndofRains"
- Me.grpEndofRains.Size = New System.Drawing.Size(428, 47)
+ Me.grpEndofRains.Size = New System.Drawing.Size(428, 40)
Me.grpEndofRains.TabIndex = 18
Me.grpEndofRains.TabStop = False
- Me.grpEndofRains.Text = "End of Rains"
+ Me.grpEndofRains.Text = "End of Rains"
'
'ucrInputEndRainDoy
'
@@ -360,20 +359,59 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputEndofRainsOccurence.Size = New System.Drawing.Size(67, 21)
Me.ucrInputEndofRainsOccurence.TabIndex = 39
'
+ 'rdoEndOfSeasons
+ '
+ Me.rdoEndOfSeasons.Appearance = System.Windows.Forms.Appearance.Button
+ Me.rdoEndOfSeasons.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoEndOfSeasons.FlatAppearance.BorderSize = 2
+ Me.rdoEndOfSeasons.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoEndOfSeasons.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.rdoEndOfSeasons.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoEndOfSeasons.Location = New System.Drawing.Point(237, 10)
+ Me.rdoEndOfSeasons.Name = "rdoEndOfSeasons"
+ Me.rdoEndOfSeasons.Size = New System.Drawing.Size(130, 27)
+ Me.rdoEndOfSeasons.TabIndex = 36
+ Me.rdoEndOfSeasons.Text = "End of Season"
+ Me.rdoEndOfSeasons.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ Me.rdoEndOfSeasons.UseVisualStyleBackColor = True
+ '
+ 'rdoEndOfRains
+ '
+ Me.rdoEndOfRains.Appearance = System.Windows.Forms.Appearance.Button
+ Me.rdoEndOfRains.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoEndOfRains.FlatAppearance.BorderSize = 2
+ Me.rdoEndOfRains.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption
+ Me.rdoEndOfRains.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.rdoEndOfRains.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.rdoEndOfRains.Location = New System.Drawing.Point(109, 10)
+ Me.rdoEndOfRains.Name = "rdoEndOfRains"
+ Me.rdoEndOfRains.Size = New System.Drawing.Size(130, 27)
+ Me.rdoEndOfRains.TabIndex = 35
+ Me.rdoEndOfRains.Text = "End of Rains"
+ Me.rdoEndOfRains.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ Me.rdoEndOfRains.UseVisualStyleBackColor = True
+ '
+ 'ucrPnlEndOfRainsAndSeasons
+ '
+ Me.ucrPnlEndOfRainsAndSeasons.Location = New System.Drawing.Point(99, 9)
+ Me.ucrPnlEndOfRainsAndSeasons.Name = "ucrPnlEndOfRainsAndSeasons"
+ Me.ucrPnlEndOfRainsAndSeasons.Size = New System.Drawing.Size(273, 35)
+ Me.ucrPnlEndOfRainsAndSeasons.TabIndex = 34
+ '
'ucrInputReplaceNA
'
Me.ucrInputReplaceNA.AddQuotesIfUnrecognised = True
Me.ucrInputReplaceNA.IsMultiline = False
Me.ucrInputReplaceNA.IsReadOnly = False
- Me.ucrInputReplaceNA.Location = New System.Drawing.Point(176, 466)
+ Me.ucrInputReplaceNA.Location = New System.Drawing.Point(176, 397)
Me.ucrInputReplaceNA.Name = "ucrInputReplaceNA"
- Me.ucrInputReplaceNA.Size = New System.Drawing.Size(139, 21)
+ Me.ucrInputReplaceNA.Size = New System.Drawing.Size(52, 21)
Me.ucrInputReplaceNA.TabIndex = 31
'
'ucrReceiverEvaporation
'
Me.ucrReceiverEvaporation.frmParent = Me
- Me.ucrReceiverEvaporation.Location = New System.Drawing.Point(176, 439)
+ Me.ucrReceiverEvaporation.Location = New System.Drawing.Point(176, 370)
Me.ucrReceiverEvaporation.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverEvaporation.Name = "ucrReceiverEvaporation"
Me.ucrReceiverEvaporation.Selector = Nothing
@@ -387,16 +425,16 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputEvaporation.AddQuotesIfUnrecognised = True
Me.ucrInputEvaporation.IsMultiline = False
Me.ucrInputEvaporation.IsReadOnly = False
- Me.ucrInputEvaporation.Location = New System.Drawing.Point(176, 412)
+ Me.ucrInputEvaporation.Location = New System.Drawing.Point(176, 343)
Me.ucrInputEvaporation.Name = "ucrInputEvaporation"
- Me.ucrInputEvaporation.Size = New System.Drawing.Size(139, 21)
+ Me.ucrInputEvaporation.Size = New System.Drawing.Size(52, 21)
Me.ucrInputEvaporation.TabIndex = 27
'
'ucrPnlEvaporation
'
- Me.ucrPnlEvaporation.Location = New System.Drawing.Point(100, 406)
+ Me.ucrPnlEvaporation.Location = New System.Drawing.Point(107, 337)
Me.ucrPnlEvaporation.Name = "ucrPnlEvaporation"
- Me.ucrPnlEvaporation.Size = New System.Drawing.Size(67, 67)
+ Me.ucrPnlEvaporation.Size = New System.Drawing.Size(67, 62)
Me.ucrPnlEvaporation.TabIndex = 25
'
'ucrInputFilterPreview
@@ -404,7 +442,7 @@ Partial Class dlgEndOfRainsSeason
Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True
Me.ucrInputFilterPreview.IsMultiline = False
Me.ucrInputFilterPreview.IsReadOnly = True
- Me.ucrInputFilterPreview.Location = New System.Drawing.Point(119, 244)
+ Me.ucrInputFilterPreview.Location = New System.Drawing.Point(131, 273)
Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview"
Me.ucrInputFilterPreview.Size = New System.Drawing.Size(242, 22)
Me.ucrInputFilterPreview.TabIndex = 12
@@ -413,7 +451,7 @@ Partial Class dlgEndOfRainsSeason
'
Me.ucrNudTotalOverDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudTotalOverDays.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudTotalOverDays.Location = New System.Drawing.Point(334, 286)
+ Me.ucrNudTotalOverDays.Location = New System.Drawing.Point(233, 308)
Me.ucrNudTotalOverDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
Me.ucrNudTotalOverDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudTotalOverDays.Name = "ucrNudTotalOverDays"
@@ -425,7 +463,7 @@ Partial Class dlgEndOfRainsSeason
'
Me.ucrNudAmount.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudAmount.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudAmount.Location = New System.Drawing.Point(169, 286)
+ Me.ucrNudAmount.Location = New System.Drawing.Point(68, 308)
Me.ucrNudAmount.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
Me.ucrNudAmount.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudAmount.Name = "ucrNudAmount"
@@ -433,27 +471,11 @@ Partial Class dlgEndOfRainsSeason
Me.ucrNudAmount.TabIndex = 15
Me.ucrNudAmount.Value = New Decimal(New Integer() {0, 0, 0, 0})
'
- 'ucrChkEndOfRains
- '
- Me.ucrChkEndOfRains.Checked = False
- Me.ucrChkEndOfRains.Location = New System.Drawing.Point(10, 286)
- Me.ucrChkEndOfRains.Name = "ucrChkEndOfRains"
- Me.ucrChkEndOfRains.Size = New System.Drawing.Size(101, 20)
- Me.ucrChkEndOfRains.TabIndex = 13
- '
- 'ucrChkEndOfSeason
- '
- Me.ucrChkEndOfSeason.Checked = False
- Me.ucrChkEndOfSeason.Location = New System.Drawing.Point(10, 380)
- Me.ucrChkEndOfSeason.Name = "ucrChkEndOfSeason"
- Me.ucrChkEndOfSeason.Size = New System.Drawing.Size(105, 20)
- Me.ucrChkEndOfSeason.TabIndex = 19
- '
'ucrNudWBLessThan
'
Me.ucrNudWBLessThan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudWBLessThan.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudWBLessThan.Location = New System.Drawing.Point(334, 380)
+ Me.ucrNudWBLessThan.Location = New System.Drawing.Point(234, 308)
Me.ucrNudWBLessThan.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
Me.ucrNudWBLessThan.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudWBLessThan.Name = "ucrNudWBLessThan"
@@ -465,7 +487,7 @@ Partial Class dlgEndOfRainsSeason
'
Me.ucrNudCapacity.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudCapacity.Increment = New Decimal(New Integer() {1, 0, 0, 0})
- Me.ucrNudCapacity.Location = New System.Drawing.Point(169, 380)
+ Me.ucrNudCapacity.Location = New System.Drawing.Point(69, 308)
Me.ucrNudCapacity.Maximum = New Decimal(New Integer() {100, 0, 0, 0})
Me.ucrNudCapacity.Minimum = New Decimal(New Integer() {0, 0, 0, 0})
Me.ucrNudCapacity.Name = "ucrNudCapacity"
@@ -476,7 +498,7 @@ Partial Class dlgEndOfRainsSeason
'ucrReceiverStation
'
Me.ucrReceiverStation.frmParent = Me
- Me.ucrReceiverStation.Location = New System.Drawing.Point(253, 30)
+ Me.ucrReceiverStation.Location = New System.Drawing.Point(274, 59)
Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverStation.Name = "ucrReceiverStation"
Me.ucrReceiverStation.Selector = Nothing
@@ -488,7 +510,7 @@ Partial Class dlgEndOfRainsSeason
'ucrReceiverYear
'
Me.ucrReceiverYear.frmParent = Me
- Me.ucrReceiverYear.Location = New System.Drawing.Point(253, 121)
+ Me.ucrReceiverYear.Location = New System.Drawing.Point(274, 150)
Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverYear.Name = "ucrReceiverYear"
Me.ucrReceiverYear.Selector = Nothing
@@ -500,7 +522,7 @@ Partial Class dlgEndOfRainsSeason
'ucrReceiverDate
'
Me.ucrReceiverDate.frmParent = Me
- Me.ucrReceiverDate.Location = New System.Drawing.Point(253, 75)
+ Me.ucrReceiverDate.Location = New System.Drawing.Point(274, 104)
Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverDate.Name = "ucrReceiverDate"
Me.ucrReceiverDate.Selector = Nothing
@@ -512,7 +534,7 @@ Partial Class dlgEndOfRainsSeason
'ucrReceiverDOY
'
Me.ucrReceiverDOY.frmParent = Me
- Me.ucrReceiverDOY.Location = New System.Drawing.Point(253, 165)
+ Me.ucrReceiverDOY.Location = New System.Drawing.Point(274, 194)
Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverDOY.Name = "ucrReceiverDOY"
Me.ucrReceiverDOY.Selector = Nothing
@@ -524,7 +546,7 @@ Partial Class dlgEndOfRainsSeason
'ucrReceiverRainfall
'
Me.ucrReceiverRainfall.frmParent = Me
- Me.ucrReceiverRainfall.Location = New System.Drawing.Point(253, 209)
+ Me.ucrReceiverRainfall.Location = New System.Drawing.Point(274, 238)
Me.ucrReceiverRainfall.Margin = New System.Windows.Forms.Padding(0)
Me.ucrReceiverRainfall.Name = "ucrReceiverRainfall"
Me.ucrReceiverRainfall.Selector = Nothing
@@ -538,7 +560,7 @@ Partial Class dlgEndOfRainsSeason
Me.ucrSelectorForWaterBalance.bDropUnusedFilterLevels = False
Me.ucrSelectorForWaterBalance.bShowHiddenColumns = False
Me.ucrSelectorForWaterBalance.bUseCurrentFilter = True
- Me.ucrSelectorForWaterBalance.Location = New System.Drawing.Point(10, 11)
+ Me.ucrSelectorForWaterBalance.Location = New System.Drawing.Point(11, 69)
Me.ucrSelectorForWaterBalance.Margin = New System.Windows.Forms.Padding(0)
Me.ucrSelectorForWaterBalance.Name = "ucrSelectorForWaterBalance"
Me.ucrSelectorForWaterBalance.Size = New System.Drawing.Size(210, 180)
@@ -546,7 +568,7 @@ Partial Class dlgEndOfRainsSeason
'
'ucrBase
'
- Me.ucrBase.Location = New System.Drawing.Point(10, 545)
+ Me.ucrBase.Location = New System.Drawing.Point(18, 472)
Me.ucrBase.Name = "ucrBase"
Me.ucrBase.Size = New System.Drawing.Size(405, 56)
Me.ucrBase.TabIndex = 33
@@ -555,10 +577,14 @@ Partial Class dlgEndOfRainsSeason
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(455, 604)
+ Me.ClientSize = New System.Drawing.Size(456, 533)
+ Me.Controls.Add(Me.rdoEndOfSeasons)
+ Me.Controls.Add(Me.rdoEndOfRains)
+ Me.Controls.Add(Me.ucrPnlEndOfRainsAndSeasons)
Me.Controls.Add(Me.ucrInputReplaceNA)
Me.Controls.Add(Me.lblReplaceNA)
Me.Controls.Add(Me.rdoVariableEvaporation)
+ Me.Controls.Add(Me.grpEndofSeason)
Me.Controls.Add(Me.rdoValueEvaporation)
Me.Controls.Add(Me.ucrReceiverEvaporation)
Me.Controls.Add(Me.ucrInputEvaporation)
@@ -569,8 +595,6 @@ Partial Class dlgEndOfRainsSeason
Me.Controls.Add(Me.lblTotalOverDays)
Me.Controls.Add(Me.ucrNudAmount)
Me.Controls.Add(Me.lblAmount)
- Me.Controls.Add(Me.ucrChkEndOfRains)
- Me.Controls.Add(Me.ucrChkEndOfSeason)
Me.Controls.Add(Me.lblEvaporation)
Me.Controls.Add(Me.ucrNudWBLessThan)
Me.Controls.Add(Me.lblWaterBalanceLessThan)
@@ -589,7 +613,6 @@ Partial Class dlgEndOfRainsSeason
Me.Controls.Add(Me.ucrSelectorForWaterBalance)
Me.Controls.Add(Me.ucrBase)
Me.Controls.Add(Me.grpEndofRains)
- Me.Controls.Add(Me.grpEndofSeason)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.MaximizeBox = False
Me.MinimizeBox = False
@@ -626,11 +649,8 @@ Partial Class dlgEndOfRainsSeason
Friend WithEvents ucrNudCapacity As ucrNud
Friend WithEvents ucrInputSeasonDoy As ucrInputTextBox
Friend WithEvents lblWaterBalanceLessThan As Label
- Friend WithEvents ucrChkEndOfSeason As ucrCheck
- Friend WithEvents ucrChkEndOfRains As ucrCheck
Friend WithEvents ucrInputFilterPreview As ucrInputTextBox
Friend WithEvents cmdDoyRange As Button
- Friend WithEvents ucrInputEvaporation As ucrInputTextBox
Friend WithEvents ucrReceiverEvaporation As ucrReceiverSingle
Friend WithEvents rdoVariableEvaporation As RadioButton
Friend WithEvents rdoValueEvaporation As RadioButton
@@ -650,4 +670,8 @@ Partial Class dlgEndOfRainsSeason
Friend WithEvents ucrChkEndofRainsDate As ucrCheck
Friend WithEvents ucrChkEndofRainsOccurence As ucrCheck
Friend WithEvents ucrInputEndRainDoy As ucrInputTextBox
+ Friend WithEvents rdoEndOfSeasons As RadioButton
+ Friend WithEvents rdoEndOfRains As RadioButton
+ Friend WithEvents ucrPnlEndOfRainsAndSeasons As UcrPanel
+ Friend WithEvents ucrInputEvaporation As ucrInputTextBox
End Class
\ No newline at end of file
diff --git a/instat/dlgEndOfRainsSeason.vb b/instat/dlgEndOfRainsSeason.vb
index 922b1227737..8e501686059 100644
--- a/instat/dlgEndOfRainsSeason.vb
+++ b/instat/dlgEndOfRainsSeason.vb
@@ -30,6 +30,7 @@ Public Class dlgEndOfRainsSeason
#Region "general_code_structures"
' General
Private clsRunCalculation As New RFunction
+ Private clsFirstOrLastFunction As New RFunction
' Group by
Private clsGroupByStationYearCalc As New RFunction
@@ -146,7 +147,7 @@ Public Class dlgEndOfRainsSeason
Private clsEndSeasonCombinationSubCalcList As New RFunction
#End Region
- Private Sub dlgWaterBalance_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ Private Sub dlgEndOfRainsSeason_Load(sender As Object, e As EventArgs) Handles MyBase.Load
autoTranslate(Me)
If bFirstload Then
InitialiseDialog()
@@ -201,47 +202,46 @@ Public Class dlgEndOfRainsSeason
ucrReceiverYear.SetClimaticType("year")
ucrReceiverYear.bAutoFill = True
ucrReceiverYear.strSelectorHeading = "Year Variables"
+
+ ucrChkEndofSeasonDoy.AddParameterPresentCondition(True, "sub1", True)
+ ucrChkEndofSeasonDoy.AddParameterPresentCondition(False, "sub1", False)
+ ucrChkEndofSeasonDoy.SetText("Day")
+
+ 'TODO Set conditions for end of rains vs end of season
+ ucrPnlEndOfRainsAndSeasons.AddRadioButton(rdoEndOfRains)
+ ucrPnlEndOfRainsAndSeasons.AddRadioButton(rdoEndOfSeasons)
+ ucrPnlEndOfRainsAndSeasons.AddFunctionNamesCondition(rdoEndOfRains, "last")
+ ucrPnlEndOfRainsAndSeasons.AddFunctionNamesCondition(rdoEndOfSeasons, "first")
#End Region
#Region "end_of_rains_controls"
- 'TODO Set conditions for end of rains vs end of season
- ucrChkEndOfRains.SetText("End of Rains")
- ucrChkEndOfRains.AddToLinkedControls(ucrNudAmount, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndOfRains.AddToLinkedControls(ucrNudTotalOverDays, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndOfRains.AddToLinkedControls(ucrChkEndofRainsDoy, {True}, bNewLinkedHideIfParameterMissing:=True)
ucrNudAmount.SetParameter(New RParameter("threshold", 1, False))
- ucrNudAmount.SetMinMax() ' min and max
ucrNudAmount.DecimalPlaces = 2
ucrNudAmount.Increment = 0.1
- ucrNudAmount.SetLinkedDisplayControl(lblAmount)
ucrNudTotalOverDays.SetParameter(New RParameter("n", 1))
ucrNudTotalOverDays.SetMinMax(1, 366)
- ucrNudTotalOverDays.SetLinkedDisplayControl(lblTotalOverDays)
- ucrChkEndofRainsDoy.AddToLinkedControls(ucrInputEndRainDoy, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndofRainsDoy.SetText("Day")
- ucrChkEndofRainsDoy.AddParameterPresentCondition(True, "sub1", True)
+ ucrChkEndofRainsDoy.AddParameterPresentCondition(True, "sub1")
ucrChkEndofRainsDoy.AddParameterPresentCondition(False, "sub1", False)
- ucrChkEndofRainsDoy.SetLinkedDisplayControl(grpEndofRains)
+ ucrChkEndofRainsDoy.SetText("Day")
+
ucrInputEndRainDoy.SetParameter(New RParameter("result_name", 3))
ucrInputEndRainDoy.SetValidationTypeAsRVariable()
ucrInputEndRainDoy.SetDataFrameSelector(ucrSelectorForWaterBalance.ucrAvailableDataFrames)
- ucrChkEndofRainsDate.AddToLinkedControls(ucrInputEndofRainsDate, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndofRainsDate.SetText("Date")
- ucrChkEndofRainsDate.AddParameterPresentCondition(True, "sub2", True)
+ ucrChkEndofRainsDate.AddParameterPresentCondition(True, "sub2")
ucrChkEndofRainsDate.AddParameterPresentCondition(False, "sub2", False)
+ ucrChkEndofRainsDate.SetText("Date")
ucrInputEndofRainsDate.SetParameter(New RParameter("result_name", 2))
ucrInputEndofRainsDate.SetValidationTypeAsRVariable()
ucrInputEndofRainsDate.SetDataFrameSelector(ucrSelectorForWaterBalance.ucrAvailableDataFrames)
- ucrChkEndofRainsOccurence.AddToLinkedControls(ucrInputEndofRainsOccurence, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrChkEndofRainsOccurence.SetText("Occurrence")
- ucrChkEndofRainsOccurence.AddParameterPresentCondition(True, "sub3", True)
+ ucrChkEndofRainsOccurence.AddParameterPresentCondition(True, "sub3")
ucrChkEndofRainsOccurence.AddParameterPresentCondition(False, "sub3", False)
ucrInputEndofRainsOccurence.SetParameter(New RParameter("result_name", 2))
@@ -255,24 +255,11 @@ Public Class dlgEndOfRainsSeason
ucrReceiverEvaporation.SetParameterIsString()
ucrReceiverEvaporation.bWithQuotes = False
- 'TODO Set conditions for end of rains vs end of season
- ucrChkEndOfSeason.SetText("End of Season")
-
ucrPnlEvaporation.AddRadioButton(rdoValueEvaporation)
ucrPnlEvaporation.AddRadioButton(rdoVariableEvaporation)
- ucrPnlEvaporation.AddParameterPresentCondition(rdoValueEvaporation, "value")
+ ucrPnlEvaporation.AddParameterPresentCondition(rdoValueEvaporation, "variable", False)
ucrPnlEvaporation.AddParameterPresentCondition(rdoVariableEvaporation, "variable")
- ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlEvaporation.AddToLinkedControls(ucrReceiverEvaporation, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlEvaporation.AddToLinkedControls(ucrInputReplaceNA, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True)
- ucrPnlEvaporation.SetLinkedDisplayControl(lblEvaporation)
-
- ucrChkEndOfSeason.AddToLinkedControls(ucrNudCapacity, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndOfSeason.AddToLinkedControls(ucrNudWBLessThan, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndOfSeason.AddToLinkedControls(ucrPnlEvaporation, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoValueEvaporation)
- ucrChkEndOfSeason.AddToLinkedControls(ucrChkEndofSeasonDoy, {True}, bNewLinkedHideIfParameterMissing:=True)
-
ucrInputEvaporation.SetParameter(New RParameter("value", 1, bNewIncludeArgumentName:=False))
ucrInputEvaporation.SetValidationTypeAsNumeric()
ucrInputEvaporation.AddQuotesIfUnrecognised = False
@@ -280,48 +267,61 @@ Public Class dlgEndOfRainsSeason
ucrInputReplaceNA.SetParameter(New RParameter("yes", 1))
ucrInputReplaceNA.SetValidationTypeAsNumeric()
ucrInputReplaceNA.AddQuotesIfUnrecognised = False
- ucrInputReplaceNA.SetLinkedDisplayControl(lblReplaceNA)
+
ucrNudWBLessThan.SetParameter(New RParameter("1", 1, False))
ucrNudWBLessThan.SetMinMax(0, Integer.MaxValue)
ucrNudWBLessThan.Increment = 0.5
ucrNudWBLessThan.DecimalPlaces = 2
- ucrNudWBLessThan.SetLinkedDisplayControl(lblWaterBalanceLessThan)
ucrNudCapacity.SetParameter(New RParameter("yes", 1))
ucrNudCapacity.SetMinMax(1, Integer.MaxValue)
ucrNudCapacity.Increment = 10
- ucrNudCapacity.SetLinkedDisplayControl(lblCapacity)
-
- ucrChkEndofSeasonDoy.AddToLinkedControls(ucrInputEndRainDoy, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndofSeasonDoy.SetText("Day")
- ucrChkEndofSeasonDoy.AddParameterPresentCondition(True, "sub1", True)
- ucrChkEndofSeasonDoy.AddParameterPresentCondition(False, "sub1", False)
- ucrChkEndofSeasonDoy.SetLinkedDisplayControl(grpEndofRains)
- ucrChkEndofSeasonDoy.SetLinkedDisplayControl(grpEndofSeason)
- ucrChkEndofSeasonDoy.AddToLinkedControls(ucrInputSeasonDoy, {True}, bNewLinkedHideIfParameterMissing:=True)
ucrInputSeasonDoy.SetParameter(New RParameter("result_name", 3))
ucrInputSeasonDoy.SetValidationTypeAsRVariable()
ucrInputSeasonDoy.SetDataFrameSelector(ucrSelectorForWaterBalance.ucrAvailableDataFrames)
- ucrChkEndofSeasonDate.AddToLinkedControls(ucrInputEndofSeasonDate, {True}, bNewLinkedHideIfParameterMissing:=True)
ucrChkEndofSeasonDate.SetText("Date")
- ucrChkEndofSeasonDate.AddParameterPresentCondition(True, "sub2", True)
+ ucrChkEndofSeasonDate.AddParameterPresentCondition(True, "sub2")
ucrChkEndofSeasonDate.AddParameterPresentCondition(False, "sub2", False)
ucrInputEndofSeasonDate.SetParameter(New RParameter("result_name", 3))
ucrInputEndofSeasonDate.SetValidationTypeAsRVariable()
ucrInputEndofSeasonDate.SetDataFrameSelector(ucrSelectorForWaterBalance.ucrAvailableDataFrames)
- ucrChkEndofSeasonOccurence.AddToLinkedControls(ucrInputEndofSeasonOccurence, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrChkEndofSeasonOccurence.SetText("Occurrence")
- ucrChkEndofSeasonOccurence.AddParameterPresentCondition(True, "sub3", True)
+ ucrChkEndofSeasonOccurence.AddParameterPresentCondition(True, "sub3")
ucrChkEndofSeasonOccurence.AddParameterPresentCondition(False, "sub3", False)
+ ucrChkEndofSeasonOccurence.SetText("Occurrence")
ucrInputEndofSeasonOccurence.SetParameter(New RParameter("result_name", 2))
ucrInputEndofSeasonOccurence.SetDataFrameSelector(ucrSelectorForWaterBalance.ucrAvailableDataFrames)
ucrInputEndofSeasonOccurence.SetValidationTypeAsRVariable()
+
+
+ 'linking controls
+ ucrChkEndofRainsDoy.AddToLinkedControls(ucrInputEndRainDoy, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkEndofSeasonOccurence.AddToLinkedControls(ucrInputEndofSeasonOccurence, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkEndofSeasonDate.AddToLinkedControls(ucrInputEndofSeasonDate, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkEndofSeasonDoy.AddToLinkedControls(ucrInputSeasonDoy, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlEvaporation.AddToLinkedControls(ucrInputEvaporation, {rdoValueEvaporation}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlEvaporation.AddToLinkedControls(ucrReceiverEvaporation, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlEvaporation.AddToLinkedControls(ucrInputReplaceNA, {rdoVariableEvaporation}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkEndofRainsOccurence.AddToLinkedControls(ucrInputEndofRainsOccurence, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkEndofRainsDate.AddToLinkedControls(ucrInputEndofRainsDate, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrNudAmount, ucrNudTotalOverDays}, {rdoEndOfRains}, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrNudCapacity, ucrNudWBLessThan, ucrChkEndofSeasonDoy}, {rdoEndOfSeasons}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
+ ucrPnlEndOfRainsAndSeasons.AddToLinkedControls({ucrPnlEvaporation}, {rdoEndOfSeasons}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
+
+ ucrChkEndofRainsDoy.SetLinkedDisplayControl(grpEndofRains)
+ ucrPnlEvaporation.SetLinkedDisplayControl(lblEvaporation)
+ ucrInputReplaceNA.SetLinkedDisplayControl(lblReplaceNA)
+ ucrNudAmount.SetLinkedDisplayControl(lblAmount)
+ ucrNudWBLessThan.SetLinkedDisplayControl(lblWaterBalanceLessThan)
+ ucrNudCapacity.SetLinkedDisplayControl(lblCapacity)
+ ucrChkEndofSeasonDoy.SetLinkedDisplayControl(grpEndofSeason)
+ ucrNudTotalOverDays.SetLinkedDisplayControl(lblTotalOverDays)
+
#End Region
End Sub
@@ -340,10 +340,13 @@ Public Class dlgEndOfRainsSeason
Dim strEndSeasonStatus As String = "end_season_status"
Dim strEndSeasonDate As String = "end_season_date"
Dim strDoyFilter As String = "doy_filter"
+ Dim strEndofRains As String = "end_of_rains_combined"
+ Dim strEndofSeason As String = "end_of_season_combined"
#Region "clear_code_structures"
' General
clsRunCalculation.Clear()
+ clsFirstOrLastFunction.Clear()
' Group by
clsGroupByStationYearCalc.Clear()
@@ -460,6 +463,8 @@ Public Class dlgEndOfRainsSeason
ucrSelectorForWaterBalance.Reset()
ucrReceiverRainfall.SetMeAsReceiver()
+ 'temporary fix
+ rdoEndOfRains.Checked = True
' Group by
clsGroupByStationYearCalc.SetRCommand("instat_calculation$new")
@@ -494,7 +499,6 @@ Public Class dlgEndOfRainsSeason
clsDayToOperator.SetOperation("<=")
clsDayToOperator.AddParameter("to", 366, iPosition:=1)
-
#Region "end_of_rains"
' Rolling sum calculation
@@ -588,7 +592,7 @@ Public Class dlgEndOfRainsSeason
clsEndRainsCombinationCalc.AddParameter("type", Chr(34) & "combination" & Chr(34), iPosition:=0)
clsEndRainsCombinationCalc.AddParameter("manipulations", clsRFunctionParameter:=clsEndRainsCombinationManipulationList, iPosition:=1)
clsEndRainsCombinationCalc.AddParameter("sub_calculations", clsRFunctionParameter:=clsEndRainsCombinationSubCalcList, iPosition:=2)
- clsEndRainsCombinationCalc.SetAssignTo("end_of_rains_combined")
+ clsEndRainsCombinationCalc.SetAssignTo(strEndofRains)
clsEndRainsCombinationManipulationList.SetRCommand("list")
clsEndRainsCombinationManipulationList.AddParameter("manip1", clsRFunctionParameter:=clsEndRainsConditionsFilterCalc, bIncludeArgumentName:=False, iPosition:=0)
@@ -804,7 +808,7 @@ Public Class dlgEndOfRainsSeason
clsEndSeasonCombinationCalc.AddParameter("type", Chr(34) & "combination" & Chr(34), iPosition:=0)
clsEndSeasonCombinationCalc.AddParameter("manipulations", clsRFunctionParameter:=clsEndSeasonCombinationManipulationList, iPosition:=1)
clsEndSeasonCombinationCalc.AddParameter("sub_calculations", clsRFunctionParameter:=clsEndSeasonCombinationSubCalcList, iPosition:=2)
- clsEndSeasonCombinationCalc.SetAssignTo("end_of_season_combined")
+ clsEndSeasonCombinationCalc.SetAssignTo(strEndofSeason)
clsEndSeasonCombinationManipulationList.SetRCommand("list")
clsEndSeasonCombinationManipulationList.AddParameter("manip1", clsRFunctionParameter:=clsEndSeasonConditionsFilterCalc, bIncludeArgumentName:=False, iPosition:=0)
@@ -815,6 +819,7 @@ Public Class dlgEndOfRainsSeason
clsEndSeasonCombinationSubCalcList.AddParameter("sub1", clsRFunctionParameter:=clsEndSeasonFirstDoySummaryCalc, bIncludeArgumentName:=False, iPosition:=0)
#End Region
+ clsFirstOrLastFunction = clsLastDoyFunction
End Sub
Private Sub SetRCodeForControls(bReset As Boolean)
@@ -830,7 +835,7 @@ Public Class dlgEndOfRainsSeason
ucrNudCapacity.AddAdditionalCodeParameterPair(clsPMinWBMinFunction, New RParameter("1", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1)
ucrNudCapacity.AddAdditionalCodeParameterPair(clsPMinWBMaxFunction, New RParameter("1", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2)
- ucrInputEvaporation.AddAdditionalCodeParameterPair(clsWBMaxEvapOperator, ucrInputEvaporation.GetParameter(), iAdditionalPairNo:=1)
+ ucrInputEvaporation.AddAdditionalCodeParameterPair(clsWBMaxEvapOperator, New RParameter("value", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1)
ucrReceiverDOY.SetRCode(clsDayToOperator, bReset)
@@ -848,9 +853,6 @@ Public Class dlgEndOfRainsSeason
ucrReceiverRainfall.SetRCode(clsRollSumRainFunction, bReset)
- ucrChkEndOfSeason.SetRCode(clsEndRainsCombinationSubCalcList, bReset)
- ucrChkEndofSeasonOccurence.SetRCode(clsEndRainsCombinationSubCalcList, bReset)
-
ucrNudWBLessThan.SetRCode(clsEndSeasonWBConditionOperator, bReset)
ucrPnlEvaporation.SetRCode(clsWBMinEvapOperator, bReset)
@@ -867,25 +869,14 @@ Public Class dlgEndOfRainsSeason
ucrChkEndofRainsDoy.SetRCode(clsEndRainsCombinationSubCalcList, bReset)
ucrChkEndofRainsDate.SetRCode(clsEndRainsCombinationSubCalcList, bReset)
ucrChkEndofRainsOccurence.SetRCode(clsEndRainsCombinationSubCalcList, bReset)
-
- 'TODO temporary until these are converted to radio buttons
- If bReset Then
- ucrChkEndOfRains.Checked = True
- ucrChkEndOfRains.Checked = False
- ucrChkEndOfSeason.Checked = True
- ucrChkEndOfSeason.Checked = False
- End If
- EndOfRainsColumns()
- EndOfSeasonColumns()
+ ucrPnlEndOfRainsAndSeasons.SetRCode(clsFirstOrLastFunction, bReset)
End Sub
Private Sub TestOKEnabled()
Dim bOkEnabled As Boolean = True
'TODO change to radio buttons so only one can be checked at a time
- If ucrChkEndOfRains.Checked AndAlso ucrChkEndOfSeason.Checked Then
- bOkEnabled = False
- ElseIf ucrChkEndOfRains.Checked Then
+ If rdoEndOfRains.Checked Then
If ucrReceiverRainfall.IsEmpty OrElse ucrReceiverDate.IsEmpty OrElse ucrReceiverDOY.IsEmpty OrElse ucrReceiverYear.IsEmpty OrElse ucrNudAmount.GetText = "" OrElse ucrNudTotalOverDays.GetText = "" Then
bOkEnabled = False
ElseIf Not (ucrChkEndofRainsDoy.Checked OrElse ucrChkEndofRainsDate.Checked OrElse ucrChkEndofRainsOccurence.Checked) Then
@@ -897,7 +888,7 @@ Public Class dlgEndOfRainsSeason
ElseIf ucrChkEndofRainsOccurence.Checked AndAlso ucrInputEndofRainsOccurence.IsEmpty Then
bOkEnabled = False
End If
- ElseIf ucrChkEndOfSeason.Checked Then
+ ElseIf rdoEndOfSeasons.Checked Then
If ucrReceiverRainfall.IsEmpty OrElse ucrReceiverDate.IsEmpty OrElse ucrReceiverDOY.IsEmpty OrElse ucrReceiverYear.IsEmpty OrElse ucrNudCapacity.GetText = "" OrElse ucrNudWBLessThan.GetText = "" Then
bOkEnabled = False
ElseIf Not (ucrChkEndofSeasonDoy.Checked OrElse ucrChkEndofSeasonDate.Checked OrElse ucrChkEndofSeasonOccurence.Checked) Then
@@ -987,7 +978,7 @@ Public Class dlgEndOfRainsSeason
clsDoyFilterCalcFromList.ClearParameters()
End Sub
- Private Sub ucrPnlEvaporation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlEvaporation.ControlValueChanged, ucrReceiverEvaporation.ControlValueChanged, ucrInputEvaporation.ControlValueChanged, ucrInputReplaceNA.ControlValueChanged
+ Private Sub ucrPnlEvaporation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlEvaporation.ControlValueChanged, ucrReceiverEvaporation.ControlValueChanged, ucrInputReplaceNA.ControlValueChanged, ucrInputEvaporation.ControlValueChanged
Evaporation()
End Sub
@@ -1005,61 +996,65 @@ Public Class dlgEndOfRainsSeason
End If
End Sub
- Private Sub ucrChkEndofRainsDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofRainsDoy.ControlValueChanged, ucrChkEndofRainsDate.ControlValueChanged, ucrChkEndofRainsOccurence.ControlValueChanged
- EndOfRainsColumns()
+ Private Sub ucrPnlEndOfRainsAndSeasons_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlEndOfRainsAndSeasons.ControlValueChanged
+ If rdoEndOfRains.Checked Then
+ clsRunCalculation.AddParameter("calc", clsRFunctionParameter:=clsEndRainsCombinationCalc)
+ clsFirstOrLastFunction = clsLastDoyFunction
+ Else
+ clsRunCalculation.AddParameter("calc", clsRFunctionParameter:=clsEndSeasonCombinationCalc)
+ clsFirstOrLastFunction = clsFirstDoyFunction
+ End If
End Sub
- Private Sub EndOfRainsColumns()
+ Private Sub ucrChkEndofRainsDoy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofRainsDoy.ControlValueChanged
If ucrChkEndofRainsDoy.Checked Then
clsEndRainsCombinationSubCalcList.AddParameter("sub1", clsRFunctionParameter:=clsEndRainsLastDoySummaryCalc, bIncludeArgumentName:=False, iPosition:=0)
Else
clsEndRainsCombinationSubCalcList.RemoveParameterByName("sub1")
End If
+ End Sub
+
+ Private Sub ucrChkEndofRainsDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofRainsDate.ControlValueChanged
If ucrChkEndofRainsDate.Checked Then
clsEndRainsCombinationSubCalcList.AddParameter("sub2", clsRFunctionParameter:=clsEndRainsLastDateSummaryCalc, bIncludeArgumentName:=False, iPosition:=1)
Else
clsEndRainsCombinationSubCalcList.RemoveParameterByName("sub2")
End If
- If ucrChkEndofRainsOccurence.Checked Then
- clsEndRainsCombinationSubCalcList.AddParameter("sub3", clsRFunctionParameter:=clsEndRainsStatusSummaryCalc, bIncludeArgumentName:=False, iPosition:=2)
- Else
- clsEndRainsCombinationSubCalcList.RemoveParameterByName("sub3")
- End If
End Sub
- Private Sub ucrChkEndofSeasonOccurence_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofSeasonOccurence.ControlValueChanged, ucrChkEndofSeasonDate.ControlValueChanged, ucrChkEndofSeasonDoy.ControlValueChanged
- EndOfSeasonColumns()
+ Private Sub ucrChkEndofSeasonOccurence_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofSeasonOccurence.ControlValueChanged
+ If ucrChkEndofSeasonOccurence.Checked Then
+ clsEndSeasonCombinationSubCalcList.AddParameter("sub3", clsRFunctionParameter:=clsEndSeasonStatusSummaryCalc, bIncludeArgumentName:=False, iPosition:=2)
+ Else
+ clsEndSeasonCombinationSubCalcList.RemoveParameterByName("sub3")
+ End If
End Sub
- Private Sub EndOfSeasonColumns()
+ Private Sub ucrChkEndofSeasonDoy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofSeasonDoy.ControlValueChanged
If ucrChkEndofSeasonDoy.Checked Then
clsEndSeasonCombinationSubCalcList.AddParameter("sub1", clsRFunctionParameter:=clsEndSeasonFirstDoySummaryCalc, bIncludeArgumentName:=False, iPosition:=0)
Else
clsEndSeasonCombinationSubCalcList.RemoveParameterByName("sub1")
End If
+ End Sub
+
+ Private Sub ucrChkEndofSeasonDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofSeasonDate.ControlValueChanged
If ucrChkEndofSeasonDate.Checked Then
clsEndSeasonCombinationSubCalcList.AddParameter("sub2", clsRFunctionParameter:=clsEndSeasonFirstDateSummaryCalc, bIncludeArgumentName:=False, iPosition:=1)
Else
clsEndSeasonCombinationSubCalcList.RemoveParameterByName("sub2")
End If
- If ucrChkEndofSeasonOccurence.Checked Then
- clsEndSeasonCombinationSubCalcList.AddParameter("sub3", clsRFunctionParameter:=clsEndSeasonStatusSummaryCalc, bIncludeArgumentName:=False, iPosition:=2)
+ End Sub
+
+ Private Sub ucrChkEndofRainsOccurence_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndofRainsOccurence.ControlValueChanged
+ If ucrChkEndofRainsOccurence.Checked Then
+ clsEndRainsCombinationSubCalcList.AddParameter("sub3", clsRFunctionParameter:=clsEndRainsStatusSummaryCalc, bIncludeArgumentName:=False, iPosition:=2)
Else
- clsEndSeasonCombinationSubCalcList.RemoveParameterByName("sub3")
+ clsEndRainsCombinationSubCalcList.RemoveParameterByName("sub3")
End If
End Sub
- Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkEndOfRains.ControlContentsChanged, ucrChkEndOfSeason.ControlContentsChanged, ucrReceiverRainfall.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrNudCapacity.ControlContentsChanged, ucrNudWBLessThan.ControlContentsChanged, ucrInputSeasonDoy.ControlContentsChanged, ucrNudTotalOverDays.ControlContentsChanged, ucrNudAmount.ControlContentsChanged, ucrChkEndofRainsDoy.ControlContentsChanged, ucrInputEndRainDoy.ControlContentsChanged, ucrChkEndofRainsDate.ControlContentsChanged, ucrInputEndofRainsDate.ControlContentsChanged, ucrChkEndofRainsOccurence.ControlContentsChanged, ucrInputEndofRainsOccurence.ControlContentsChanged, ucrChkEndofSeasonDoy.ControlContentsChanged, ucrPnlEvaporation.ControlContentsChanged, ucrReceiverEvaporation.ControlContentsChanged, ucrInputEvaporation.ControlContentsChanged, ucrInputReplaceNA.ControlContentsChanged, ucrChkEndofSeasonOccurence.ControlContentsChanged, ucrInputEndofSeasonOccurence.ControlContentsChanged, ucrChkEndofSeasonDate.ControlContentsChanged, ucrInputEndofSeasonDate.ControlContentsChanged
+ Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlEndOfRainsAndSeasons.ControlContentsChanged, ucrReceiverRainfall.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrNudCapacity.ControlContentsChanged, ucrNudWBLessThan.ControlContentsChanged, ucrInputSeasonDoy.ControlContentsChanged, ucrNudTotalOverDays.ControlContentsChanged, ucrNudAmount.ControlContentsChanged, ucrChkEndofRainsDoy.ControlContentsChanged, ucrInputEndRainDoy.ControlContentsChanged, ucrChkEndofRainsDate.ControlContentsChanged, ucrInputEndofRainsDate.ControlContentsChanged, ucrChkEndofRainsOccurence.ControlContentsChanged, ucrInputEndofRainsOccurence.ControlContentsChanged, ucrChkEndofSeasonDoy.ControlContentsChanged, ucrPnlEvaporation.ControlContentsChanged, ucrReceiverEvaporation.ControlContentsChanged, ucrInputReplaceNA.ControlContentsChanged, ucrChkEndofSeasonOccurence.ControlContentsChanged, ucrInputEndofSeasonOccurence.ControlContentsChanged, ucrChkEndofSeasonDate.ControlContentsChanged, ucrInputEndofSeasonDate.ControlContentsChanged, ucrInputEvaporation.ControlContentsChanged
TestOKEnabled()
End Sub
-
- Private Sub ucrChkEndOfRains_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkEndOfRains.ControlValueChanged, ucrChkEndOfSeason.ControlValueChanged
- If ucrChkEndOfRains.Checked Then
- clsRunCalculation.AddParameter("calc", clsRFunctionParameter:=clsEndRainsCombinationCalc)
- ElseIf ucrChkEndOfSeason.Checked Then
- clsRunCalculation.AddParameter("calc", clsRFunctionParameter:=clsEndSeasonCombinationCalc)
- Else
- clsRunCalculation.RemoveParameterByName("calc")
- End If
- End Sub
End Class
\ No newline at end of file
diff --git a/instat/dlgInfill.Designer.vb b/instat/dlgInfill.Designer.vb
index e11d1742f93..8f54ddf1957 100644
--- a/instat/dlgInfill.Designer.vb
+++ b/instat/dlgInfill.Designer.vb
@@ -19,7 +19,7 @@ Partial Class dlgInfill
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
@@ -36,16 +36,27 @@ Partial Class dlgInfill
'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(dlgInfill))
Me.lblDate = New System.Windows.Forms.Label()
Me.lblByFactors = New System.Windows.Forms.Label()
- Me.ucrChkResort = New instat.ucrCheck()
+ Me.lblLimits = New System.Windows.Forms.Label()
+ Me.grpOptions = New System.Windows.Forms.GroupBox()
+ Me.lblEndDate = New System.Windows.Forms.Label()
+ Me.lblStartDate = New System.Windows.Forms.Label()
+ Me.lblStartingFrom = New System.Windows.Forms.Label()
Me.ucrReceiverFactors = New instat.ucrReceiverMultiple()
Me.ucrReceiverDate = New instat.ucrReceiverSingle()
Me.ucrInfillSelector = New instat.ucrSelectorByDataFrameAddRemove()
Me.ucrBase = New instat.ucrButtons()
+ Me.ucrChkCompleteYears = New instat.ucrCheck()
+ Me.ucrChkResort = New instat.ucrCheck()
+ Me.ucrInputComboMonth = New instat.ucrInputComboBox()
+ Me.ucrInputLimitOptions = New instat.ucrInputComboBox()
+ Me.ucrDtpEndDate = New instat.ucrDateTimePicker()
+ Me.ucrDtpStartDate = New instat.ucrDateTimePicker()
+ Me.grpOptions.SuspendLayout()
Me.SuspendLayout()
'
'lblDate
@@ -58,11 +69,41 @@ Partial Class dlgInfill
resources.ApplyResources(Me.lblByFactors, "lblByFactors")
Me.lblByFactors.Name = "lblByFactors"
'
- 'ucrChkResort
+ 'lblLimits
'
- Me.ucrChkResort.Checked = False
- resources.ApplyResources(Me.ucrChkResort, "ucrChkResort")
- Me.ucrChkResort.Name = "ucrChkResort"
+ resources.ApplyResources(Me.lblLimits, "lblLimits")
+ Me.lblLimits.Name = "lblLimits"
+ '
+ 'grpOptions
+ '
+ Me.grpOptions.Controls.Add(Me.lblStartingFrom)
+ Me.grpOptions.Controls.Add(Me.ucrChkCompleteYears)
+ Me.grpOptions.Controls.Add(Me.ucrChkResort)
+ Me.grpOptions.Controls.Add(Me.ucrInputComboMonth)
+ Me.grpOptions.Controls.Add(Me.ucrInputLimitOptions)
+ Me.grpOptions.Controls.Add(Me.ucrDtpEndDate)
+ Me.grpOptions.Controls.Add(Me.lblLimits)
+ Me.grpOptions.Controls.Add(Me.lblEndDate)
+ Me.grpOptions.Controls.Add(Me.lblStartDate)
+ Me.grpOptions.Controls.Add(Me.ucrDtpStartDate)
+ resources.ApplyResources(Me.grpOptions, "grpOptions")
+ Me.grpOptions.Name = "grpOptions"
+ Me.grpOptions.TabStop = False
+ '
+ 'lblEndDate
+ '
+ resources.ApplyResources(Me.lblEndDate, "lblEndDate")
+ Me.lblEndDate.Name = "lblEndDate"
+ '
+ 'lblStartDate
+ '
+ resources.ApplyResources(Me.lblStartDate, "lblStartDate")
+ Me.lblStartDate.Name = "lblStartDate"
+ '
+ 'lblStartingFrom
+ '
+ resources.ApplyResources(Me.lblStartingFrom, "lblStartingFrom")
+ Me.lblStartingFrom.Name = "lblStartingFrom"
'
'ucrReceiverFactors
'
@@ -84,6 +125,7 @@ Partial Class dlgInfill
'
'ucrInfillSelector
'
+ Me.ucrInfillSelector.bDropUnusedFilterLevels = False
Me.ucrInfillSelector.bShowHiddenColumns = False
Me.ucrInfillSelector.bUseCurrentFilter = True
resources.ApplyResources(Me.ucrInfillSelector, "ucrInfillSelector")
@@ -94,22 +136,64 @@ Partial Class dlgInfill
resources.ApplyResources(Me.ucrBase, "ucrBase")
Me.ucrBase.Name = "ucrBase"
'
+ 'ucrChkCompleteYears
+ '
+ Me.ucrChkCompleteYears.Checked = False
+ resources.ApplyResources(Me.ucrChkCompleteYears, "ucrChkCompleteYears")
+ Me.ucrChkCompleteYears.Name = "ucrChkCompleteYears"
+ '
+ 'ucrChkResort
+ '
+ Me.ucrChkResort.Checked = False
+ resources.ApplyResources(Me.ucrChkResort, "ucrChkResort")
+ Me.ucrChkResort.Name = "ucrChkResort"
+ '
+ 'ucrInputComboMonth
+ '
+ Me.ucrInputComboMonth.AddQuotesIfUnrecognised = True
+ Me.ucrInputComboMonth.IsReadOnly = False
+ resources.ApplyResources(Me.ucrInputComboMonth, "ucrInputComboMonth")
+ Me.ucrInputComboMonth.Name = "ucrInputComboMonth"
+ '
+ 'ucrInputLimitOptions
+ '
+ Me.ucrInputLimitOptions.AddQuotesIfUnrecognised = True
+ Me.ucrInputLimitOptions.IsReadOnly = False
+ resources.ApplyResources(Me.ucrInputLimitOptions, "ucrInputLimitOptions")
+ Me.ucrInputLimitOptions.Name = "ucrInputLimitOptions"
+ '
+ 'ucrDtpEndDate
+ '
+ resources.ApplyResources(Me.ucrDtpEndDate, "ucrDtpEndDate")
+ Me.ucrDtpEndDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0)
+ Me.ucrDtpEndDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0)
+ Me.ucrDtpEndDate.Name = "ucrDtpEndDate"
+ '
+ 'ucrDtpStartDate
+ '
+ resources.ApplyResources(Me.ucrDtpStartDate, "ucrDtpStartDate")
+ Me.ucrDtpStartDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0)
+ Me.ucrDtpStartDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0)
+ Me.ucrDtpStartDate.Name = "ucrDtpStartDate"
+ '
'dlgInfill
'
resources.ApplyResources(Me, "$this")
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.Controls.Add(Me.ucrChkResort)
Me.Controls.Add(Me.lblByFactors)
Me.Controls.Add(Me.lblDate)
Me.Controls.Add(Me.ucrReceiverFactors)
Me.Controls.Add(Me.ucrReceiverDate)
Me.Controls.Add(Me.ucrInfillSelector)
Me.Controls.Add(Me.ucrBase)
+ Me.Controls.Add(Me.grpOptions)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "dlgInfill"
Me.Tag = "Infill"
+ Me.grpOptions.ResumeLayout(False)
+ Me.grpOptions.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -122,4 +206,14 @@ Partial Class dlgInfill
Friend WithEvents lblDate As Label
Friend WithEvents lblByFactors As Label
Friend WithEvents ucrChkResort As ucrCheck
+ Friend WithEvents ucrInputComboMonth As ucrInputComboBox
+ Friend WithEvents ucrDtpEndDate As ucrDateTimePicker
+ Friend WithEvents ucrDtpStartDate As ucrDateTimePicker
+ Friend WithEvents lblLimits As Label
+ Friend WithEvents ucrInputLimitOptions As ucrInputComboBox
+ Friend WithEvents grpOptions As GroupBox
+ Friend WithEvents lblEndDate As Label
+ Friend WithEvents lblStartDate As Label
+ Friend WithEvents ucrChkCompleteYears As ucrCheck
+ Friend WithEvents lblStartingFrom As Label
End Class
diff --git a/instat/dlgInfill.resx b/instat/dlgInfill.resx
index 124b66b240b..384903e7f78 100644
--- a/instat/dlgInfill.resx
+++ b/instat/dlgInfill.resx
@@ -121,6 +121,10 @@
True
+
+
+ NoControl
+
263, 15
@@ -144,11 +148,14 @@
$this
- 2
+ 1
True
+
+ NoControl
+
263, 66
@@ -171,13 +178,94 @@
$this
+ 0
+
+
+ True
+
+
+ NoControl
+
+
+ 12, 23
+
+
+ 36, 13
+
+
+ 30
+
+
+ Limits:
+
+
+ lblLimits
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpOptions
+
+
+ 6
+
+
+ True
+
+
+ NoControl
+
+
+ 155, 50
+
+
+ 69, 13
+
+
+ 35
+
+
+ Starting from:
+
+
+ lblStartingFrom
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpOptions
+
+
+ 0
+
+
+ 16, 47
+
+
+ 135, 20
+
+
+ 34
+
+
+ ucrChkCompleteYears
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpOptions
+
+
1
- 263, 196
+ 167, 19
- 141, 20
+ 171, 20
5
@@ -189,10 +277,178 @@
instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- $this
+ grpOptions
- 0
+ 2
+
+
+ 227, 46
+
+
+ 92, 21
+
+
+ 26
+
+
+ ucrInputComboMonth
+
+
+ instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpOptions
+
+
+ 3
+
+
+ 55, 19
+
+
+ 92, 21
+
+
+ 29
+
+
+ ucrInputLimitOptions
+
+
+ instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpOptions
+
+
+ 4
+
+
+ 77, 72
+
+
+ 200, 20
+
+
+ 28
+
+
+ ucrDtpEndDate
+
+
+ instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpOptions
+
+
+ 5
+
+
+ True
+
+
+ NoControl
+
+
+ 12, 76
+
+
+ 53, 13
+
+
+ 33
+
+
+ End date:
+
+
+ lblEndDate
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpOptions
+
+
+ 7
+
+
+ True
+
+
+ NoControl
+
+
+ 12, 49
+
+
+ 56, 13
+
+
+ 32
+
+
+ Start date:
+
+
+ lblStartDate
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpOptions
+
+
+ 8
+
+
+ 77, 45
+
+
+ 200, 20
+
+
+ 27
+
+
+ ucrDtpStartDate
+
+
+ instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpOptions
+
+
+ 9
+
+
+ 9, 196
+
+
+ 396, 104
+
+
+ 5
+
+
+ Options
+
+
+ grpOptions
+
+
+ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 6
True
@@ -201,12 +457,11 @@
6, 13
- 417, 286
+ 417, 363
263, 31
-
0, 0, 0, 0
@@ -226,7 +481,7 @@
$this
- 4
+ 3
9, 9
@@ -250,10 +505,10 @@
$this
- 5
+ 4
- 9, 228
+ 9, 306
406, 52
@@ -271,13 +526,16 @@
$this
- 6
+ 5
+
+
+ NoControl
CenterScreen
- Infill
+ Fill date gaps
dlgInfill
@@ -307,6 +565,6 @@
$this
- 3
+ 2
\ No newline at end of file
diff --git a/instat/dlgInfill.vb b/instat/dlgInfill.vb
index 455f4efce0b..d9f7778a2b2 100644
--- a/instat/dlgInfill.vb
+++ b/instat/dlgInfill.vb
@@ -18,7 +18,7 @@ Imports instat.Translations
Public Class dlgInfill
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True
-
+ Private clsDefaultFunction As New RFunction
Private Sub dlgInfill_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
InitialiseDialog()
@@ -38,7 +38,6 @@ Public Class dlgInfill
ucrBase.clsRsyntax.iCallType = 2
'Set receiver
ucrReceiverDate.Selector = ucrInfillSelector
- ucrReceiverDate.SetMeAsReceiver()
ucrReceiverDate.SetDataType("Date")
ucrReceiverDate.SetParameter(New RParameter("date_name", 1))
ucrReceiverDate.SetParameterIsString()
@@ -49,7 +48,7 @@ Public Class dlgInfill
ucrReceiverFactors.SetIncludedDataTypes({"factor"})
ucrReceiverFactors.Selector = ucrInfillSelector
ucrReceiverFactors.strSelectorHeading = "Factors"
- ucrReceiverFactors.SetParameter(New RParameter("factors", 2))
+ ucrReceiverFactors.SetParameter(New RParameter("factors", 5))
ucrReceiverFactors.SetParameterIsString()
ucrReceiverFactors.strSelectorHeading = "Factors"
@@ -60,20 +59,64 @@ Public Class dlgInfill
ucrChkResort.SetParameter(New RParameter("resort", 3))
ucrChkResort.SetValuesCheckedAndUnchecked("TRUE", "FALSE")
ucrChkResort.SetRDefault("TRUE")
- ucrChkResort.SetText("Sort Data after Infilling")
+ ucrChkResort.SetText("Sort Data after filling gaps")
+
+ ucrInputLimitOptions.SetItems({"Data Limits", "Fixed Limits"})
+ ucrInputLimitOptions.AddParameterPresentCondition("Fixed Limits", {"start_date", "end_date"})
+ ucrInputLimitOptions.AddParameterPresentCondition("Data Limits", {"start_date", "end_date"}, False)
+ ucrInputLimitOptions.SetDropDownStyleAsNonEditable()
+
+ ucrInputComboMonth.SetParameter(New RParameter("start_month", 2))
+ Dim dctMonth As New Dictionary(Of String, String)
+ dctMonth.Add("January", 1)
+ dctMonth.Add("February", 2)
+ dctMonth.Add("March", 3)
+ dctMonth.Add("April", 4)
+ dctMonth.Add("May", 5)
+ dctMonth.Add("June", 6)
+ dctMonth.Add("July", 7)
+ dctMonth.Add("August", 8)
+ dctMonth.Add("September", 9)
+ dctMonth.Add("October", 10)
+ dctMonth.Add("November", 11)
+ dctMonth.Add("December", 12)
+ ucrInputComboMonth.SetItems(dctMonth)
+ ucrInputComboMonth.SetDropDownStyleAsNonEditable()
+ ucrInputComboMonth.SetLinkedDisplayControl(lblStartingFrom)
+
+ ucrDtpStartDate.SetParameter(New RParameter("start_date", 3))
+ ucrDtpStartDate.SetParameterIsRDate()
+
+ ucrDtpEndDate.SetParameter(New RParameter("end_date", 4))
+ ucrDtpEndDate.SetParameterIsRDate()
+
+ ucrChkCompleteYears.SetText("Ensure complete years")
+ ucrChkCompleteYears.AddParameterPresentCondition(True, "start_month")
+ ucrChkCompleteYears.AddParameterPresentCondition(False, "start_month", False)
+
+ ucrInputLimitOptions.AddToLinkedControls(ucrChkCompleteYears, {"Data Limits"}, bNewLinkedHideIfParameterMissing:=True)
+ ucrInputLimitOptions.AddToLinkedControls(ucrDtpEndDate, {"Fixed Limits"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
+ ucrInputLimitOptions.AddToLinkedControls(ucrDtpStartDate, {"Fixed Limits"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkCompleteYears.AddToLinkedControls(ucrInputComboMonth, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="January")
+ ucrDtpEndDate.SetLinkedDisplayControl(lblEndDate)
+ ucrDtpStartDate.SetLinkedDisplayControl(lblStartDate)
End Sub
Private Sub SetDefaults()
- Dim clsDefaultFunction As New RFunction
- ' Set default RFunction as the base function
+ clsDefaultFunction = New RFunction
+
+ 'Set default RFunction as the base function
ucrInfillSelector.Reset()
- clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$infill_missing_dates")
- ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone())
+ ucrReceiverFactors.SetMeAsReceiver()
+ clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$infill_missing_dates")
+ ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction)
End Sub
Private Sub SetRCodeforControls(bReset As Boolean)
- SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset)
+ If bReset Then
+ SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset)
+ End If
End Sub
Private Sub TestOkEnabled()
@@ -89,6 +132,16 @@ Public Class dlgInfill
SetRCodeforControls(True)
TestOkEnabled()
End Sub
+ 'Temporary fix::Date pickers do not work automatically by setting Rcode. Need to check why?
+ Private Sub ucrDtpStartDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDtpStartDate.ControlValueChanged, ucrDtpEndDate.ControlValueChanged, ucrInputLimitOptions.ControlValueChanged
+ If ucrInputLimitOptions.GetText = "Fixed Limits" Then
+ clsDefaultFunction.AddParameter("start_date", clsRFunctionParameter:=ucrDtpStartDate.ValueAsRDate(), iPosition:=3)
+ clsDefaultFunction.AddParameter("end_date", clsRFunctionParameter:=ucrDtpEndDate.ValueAsRDate(), iPosition:=4)
+ Else
+ clsDefaultFunction.RemoveParameterByName("start_date")
+ clsDefaultFunction.RemoveParameterByName("end_date")
+ End If
+ End Sub
Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFactors.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged
TestOkEnabled()
diff --git a/instat/dlgPICSARainfall.Designer.vb b/instat/dlgPICSARainfall.Designer.vb
index 072a8cd6011..84a1f81f875 100644
--- a/instat/dlgPICSARainfall.Designer.vb
+++ b/instat/dlgPICSARainfall.Designer.vb
@@ -42,7 +42,9 @@ Partial Class dlgPICSARainfall
Me.lblXVariable = New System.Windows.Forms.Label()
Me.lblAvailable = New System.Windows.Forms.Label()
Me.cmdOptions = New System.Windows.Forms.Button()
- Me.cmdLineOptions = New System.Windows.Forms.Button()
+ Me.cmdPICSAOptions = New System.Windows.Forms.Button()
+ Me.lblFacetBy = New System.Windows.Forms.Label()
+ Me.ucrReceiverFacetBy = New instat.ucrReceiverSingle()
Me.ucrReceiverX = New instat.ucrReceiverSingle()
Me.ucrChkPoints = New instat.ucrCheck()
Me.ucrSave = New instat.ucrSave()
@@ -50,9 +52,6 @@ Partial Class dlgPICSARainfall
Me.ucrBase = New instat.ucrButtons()
Me.ucrReceiverColourBy = New instat.ucrReceiverSingle()
Me.ucrVariablesAsFactorForPicsa = New instat.ucrVariablesAsFactor()
- Me.cmdPICSAOptions = New System.Windows.Forms.Button()
- Me.ucrReceiverFacetBy = New instat.ucrReceiverSingle()
- Me.lblFacetBy = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'lblFactorOptional
@@ -97,16 +96,40 @@ Partial Class dlgPICSARainfall
Me.cmdOptions.Text = "Plot Options"
Me.cmdOptions.UseVisualStyleBackColor = True
'
- 'cmdLineOptions
+ 'cmdPICSAOptions
+ '
+ Me.cmdPICSAOptions.Enabled = False
+ Me.cmdPICSAOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.cmdPICSAOptions.Location = New System.Drawing.Point(9, 201)
+ Me.cmdPICSAOptions.Name = "cmdPICSAOptions"
+ Me.cmdPICSAOptions.Size = New System.Drawing.Size(119, 23)
+ Me.cmdPICSAOptions.TabIndex = 21
+ Me.cmdPICSAOptions.Tag = ""
+ Me.cmdPICSAOptions.Text = "PICSA Options"
+ Me.cmdPICSAOptions.UseVisualStyleBackColor = True
+ '
+ 'lblFacetBy
+ '
+ Me.lblFacetBy.AutoSize = True
+ Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl
+ Me.lblFacetBy.Location = New System.Drawing.Point(248, 278)
+ Me.lblFacetBy.Name = "lblFacetBy"
+ Me.lblFacetBy.Size = New System.Drawing.Size(100, 13)
+ Me.lblFacetBy.TabIndex = 31
+ Me.lblFacetBy.Tag = ""
+ Me.lblFacetBy.Text = "Facet By (Optional):"
+ '
+ 'ucrReceiverFacetBy
'
- Me.cmdLineOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdLineOptions.Location = New System.Drawing.Point(9, 201)
- Me.cmdLineOptions.Name = "cmdLineOptions"
- Me.cmdLineOptions.Size = New System.Drawing.Size(119, 23)
- Me.cmdLineOptions.TabIndex = 29
- Me.cmdLineOptions.Tag = "Line_Options"
- Me.cmdLineOptions.Text = "Line Options"
- Me.cmdLineOptions.UseVisualStyleBackColor = True
+ Me.ucrReceiverFacetBy.frmParent = Me
+ Me.ucrReceiverFacetBy.Location = New System.Drawing.Point(248, 293)
+ Me.ucrReceiverFacetBy.Margin = New System.Windows.Forms.Padding(0)
+ Me.ucrReceiverFacetBy.Name = "ucrReceiverFacetBy"
+ Me.ucrReceiverFacetBy.Selector = Nothing
+ Me.ucrReceiverFacetBy.Size = New System.Drawing.Size(125, 26)
+ Me.ucrReceiverFacetBy.strNcFilePath = ""
+ Me.ucrReceiverFacetBy.TabIndex = 32
+ Me.ucrReceiverFacetBy.ucrSelector = Nothing
'
'ucrReceiverX
'
@@ -177,41 +200,6 @@ Partial Class dlgPICSARainfall
Me.ucrVariablesAsFactorForPicsa.ucrSelector = Nothing
Me.ucrVariablesAsFactorForPicsa.ucrVariableSelector = Nothing
'
- 'cmdPICSAOptions
- '
- Me.cmdPICSAOptions.Enabled = False
- Me.cmdPICSAOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.cmdPICSAOptions.Location = New System.Drawing.Point(9, 260)
- Me.cmdPICSAOptions.Name = "cmdPICSAOptions"
- Me.cmdPICSAOptions.Size = New System.Drawing.Size(119, 23)
- Me.cmdPICSAOptions.TabIndex = 21
- Me.cmdPICSAOptions.Tag = ""
- Me.cmdPICSAOptions.Text = "PICSA Options"
- Me.cmdPICSAOptions.UseVisualStyleBackColor = True
- '
- 'ucrReceiverFacetBy
- '
- Me.ucrReceiverFacetBy.frmParent = Me
- Me.ucrReceiverFacetBy.Location = New System.Drawing.Point(248, 293)
- Me.ucrReceiverFacetBy.Margin = New System.Windows.Forms.Padding(0)
- Me.ucrReceiverFacetBy.Name = "ucrReceiverFacetBy"
- Me.ucrReceiverFacetBy.Selector = Nothing
- Me.ucrReceiverFacetBy.Size = New System.Drawing.Size(125, 26)
- Me.ucrReceiverFacetBy.strNcFilePath = ""
- Me.ucrReceiverFacetBy.TabIndex = 32
- Me.ucrReceiverFacetBy.ucrSelector = Nothing
- '
- 'lblFacetBy
- '
- Me.lblFacetBy.AutoSize = True
- Me.lblFacetBy.ImeMode = System.Windows.Forms.ImeMode.NoControl
- Me.lblFacetBy.Location = New System.Drawing.Point(248, 278)
- Me.lblFacetBy.Name = "lblFacetBy"
- Me.lblFacetBy.Size = New System.Drawing.Size(100, 13)
- Me.lblFacetBy.TabIndex = 31
- Me.lblFacetBy.Tag = ""
- Me.lblFacetBy.Text = "Facet By (Optional):"
- '
'dlgPICSARainfall
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -219,7 +207,6 @@ Partial Class dlgPICSARainfall
Me.ClientSize = New System.Drawing.Size(429, 407)
Me.Controls.Add(Me.ucrReceiverFacetBy)
Me.Controls.Add(Me.lblFacetBy)
- Me.Controls.Add(Me.cmdLineOptions)
Me.Controls.Add(Me.ucrReceiverX)
Me.Controls.Add(Me.cmdOptions)
Me.Controls.Add(Me.ucrChkPoints)
@@ -253,7 +240,6 @@ Partial Class dlgPICSARainfall
Friend WithEvents lblXVariable As Label
Friend WithEvents lblAvailable As Label
Friend WithEvents cmdOptions As Button
- Friend WithEvents cmdLineOptions As Button
Friend WithEvents ucrVariablesAsFactorForPicsa As ucrVariablesAsFactor
Friend WithEvents cmdPICSAOptions As Button
Friend WithEvents ucrReceiverFacetBy As ucrReceiverSingle
diff --git a/instat/dlgPICSARainfall.vb b/instat/dlgPICSARainfall.vb
index df44c0ed67d..318b1e6bfd1 100644
--- a/instat/dlgPICSARainfall.vb
+++ b/instat/dlgPICSARainfall.vb
@@ -31,7 +31,7 @@ Public Class dlgPICSARainfall
Private clsYScalecontinuousFunction As New RFunction
Private clsCLimitsYContinuous As New RFunction
Private clsYScaleDateFunction As New RFunction
- Private clsYLimitsYDate As New RFunction
+ Private clsCLimitsYDate As New RFunction
Private clsFacetFunction As New RFunction
Private clsFacetOperator As New ROperator
Private clsThemeFunction As New RFunction
@@ -39,12 +39,9 @@ Public Class dlgPICSARainfall
Private bResetSubdialog As Boolean = True
Private bResetLineLayerSubdialog As Boolean = True
Private clsLocalRaesFunction As New RFunction
- Private clsGeomPoint As New RFunction
Private clsPointsFunc As New RFunction
Private clsPointsParam As New RParameter
Private clsYLabsFunction, clsXLabsFunction, clsLabsFunction As RFunction
- Private clsXAxisLabels, clsYAxisLabels As New RFunction
- Private clsPnlBackgroundFunction, clsPnlGridLinesFunction As RFunction
Private clsFactorLevels As New RFunction
Private clsDatePeriodOperator As New ROperator
@@ -98,8 +95,6 @@ Public Class dlgPICSARainfall
Private clsAsDate As New RFunction
Private clsAsNumeric As New RFunction
- Private strCalcColumn As String
-
Private Sub dlgPCSARainfall_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
InitialiseDialog()
@@ -173,7 +168,6 @@ Public Class dlgPICSARainfall
ucrSave.SetDataFrameSelector(ucrSelectorPICSARainfall.ucrAvailableDataFrames)
ucrSave.SetAssignToIfUncheckedValue("last_graph")
End Sub
-
Private Sub SetDefaults()
Dim clsPanelBackgroundElementRect As New RFunction
Dim clsXElementLabels As New RFunction
@@ -198,7 +192,7 @@ Public Class dlgPICSARainfall
clsFactorLevels = New RFunction
clsCLimitsYContinuous = New RFunction
- clsYLimitsYDate = New RFunction
+ clsCLimitsYDate = New RFunction
clsFacetFunction = New RFunction
clsFacetOperator = New ROperator
@@ -251,15 +245,20 @@ Public Class dlgPICSARainfall
clsYScalecontinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone()
clsYScalecontinuousFunction.AddParameter("limits", clsRFunctionParameter:=clsCLimitsYContinuous, iPosition:=3)
clsCLimitsYContinuous.SetRCommand("c")
- clsCLimitsYContinuous.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
- clsCLimitsYContinuous.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
+ clsCLimitsYContinuous.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYContinuous.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
clsYScaleDateFunction = GgplotDefaults.clsYScaleDateFunction.Clone()
clsYScaleDateFunction.AddParameter("date_labels", Chr(34) & "%d %b" & Chr(34), iPosition:=0)
- clsYLimitsYDate.SetRCommand("c")
+ clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsCLimitsYDate, iPosition:=3)
+ clsAsDateYLimit.SetRCommand("as.Date")
+ clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsCLimitsYDate, iPosition:=0)
+ clsAsDateYLimit.AddParameter("format", Chr(34) & "%Y/%B/%d" & Chr(34), iPosition:=1)
+
+ clsCLimitsYDate.SetRCommand("c")
+ clsCLimitsYDate.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYDate.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
- ' clsCLimitsYDate.AddParameter("min", "January", bIncludeArgumentName:=False, iPosition:=0)
- 'clsCLimitsYDate.AddParameter("max", "December", bIncludeArgumentName:=False, iPosition:=1)
'TODO Not yet implemented so do not add
'clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsCLimitsYDate, iPosition:=8)
@@ -302,16 +301,13 @@ Public Class dlgPICSARainfall
clsGeomLine.AddParameter("size", "0.8")
clsBaseOperator.AddParameter(clsPointsParam)
+
clsFacetFunction.SetPackageName("ggplot2")
clsFacetFunction.SetRCommand("facet_wrap")
clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOperator, iPosition:=0)
clsFacetOperator.SetOperation("~")
- clsAsDateYLimit.SetRCommand("as.Date")
- clsAsDateYLimit.AddParameter("format", Chr(34) & "%Y/%B/%d" & Chr(34))
-
-
'Mean Line
clsGeomHlineMean.SetPackageName("ggplot2")
clsGeomHlineMean.SetRCommand("geom_hline")
@@ -327,7 +323,6 @@ Public Class dlgPICSARainfall
clsMeanFunction.AddParameter("na.rm", "TRUE")
clsRoundMeanY.SetRCommand("round")
- clsRoundMeanY.AddParameter("x", clsRFunctionParameter:=clsMeanFunction, iPosition:=0)
clsAsDateMeanY.SetRCommand("as.Date")
clsAsDateMeanY.AddParameter("x", clsRFunctionParameter:=clsRoundMeanY, iPosition:=0)
@@ -608,11 +603,9 @@ Public Class dlgPICSARainfall
If ucrVariablesAsFactorForPicsa.bSingleVariable Then
'Added this because this sub is called on sed defaults and it over writes the enabled property
cmdPICSAOptions.Enabled = True
- cmdLineOptions.Enabled = True
cmdOptions.Enabled = True
Else
'cmdPICSAOptions.Enabled = False
- cmdLineOptions.Enabled = False
cmdOptions.Enabled = False
End If
End Sub
@@ -623,7 +616,7 @@ Public Class dlgPICSARainfall
'add more functions
Private Sub cmdPICSAOptions_Click(sender As Object, e As EventArgs) Handles cmdPICSAOptions.Click
- sdgPICSARainfallGraph.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewPipeOperator:=clsPipeOperator, dctNewThemeFunctions:=dctThemeFunctions, clsNewLabsFunction:=clsLabsFunction, clsNewThemeFunction:=clsThemeFunction, clsNewXScaleContinuousFunction:=clsXScalecontinuousFunction, clsNewYScaleContinuousFunction:=clsYScalecontinuousFunction, clsNewGeomhlineMean:=clsGeomHlineMean, clsNewGeomhlineMedian:=clsGeomHlineMedian, clsNewGeomhlineLowerTercile:=clsGeomHlineLowerTercile, clsNewGeomhlineUpperTercile:=clsGeomHlineUpperTercile, clsNewXLabsFunction:=clsXLabsFunction, clsNewYLabsFunction:=clsYLabsFunction, clsNewRaesFunction:=clsRaesFunction, clsNewAsDate:=clsAsDate, clsNewAsDateYLimit:=clsAsDateYLimit, clsNewAsNumeric:=clsAsNumeric, clsNewYScaleDateFunction:=clsYScaleDateFunction, clsNewDatePeriodOperator:=clsDatePeriodOperator, clsNewGeomTextLabelMeanLine:=clsGeomTextLabelMeanLine, clsNewRoundMeanY:=clsRoundMeanY, clsNewPasteMeanY:=clsPasteMeanY, clsNewGeomTextLabelMedianLine:=clsGeomTextLabelMedianLine, clsNewRoundMedianY:=clsRoundMedianY, clsNewPasteMedianY:=clsPasteMedianY, clsNewGeomTextLabelLowerTercileLine:=clsGeomTextLabelLowerTercileLine, clsNewRoundLowerTercileY:=clsRoundLowerTercileY, clsNewPasteLowerTercileY:=clsPasteLowerTercileY, clsNewGeomTextLabelUpperTercileLine:=clsGeomTextLabelUpperTercileLine, clsNewRoundUpperTercileY:=clsRoundUpperTercileY, clsNewPasteUpperTercileY:=clsPasteUpperTercileY, strXAxisType:=ucrReceiverX.strCurrDataType, clsNewMutateFunction:=clsMutateFunction, clsNewMeanFunction:=clsMeanFunction, clsNewMedianFunction:=clsMedianFunction, clsNewLowerTercileFunction:=clsLowerTercileFunction, clsNewUpperTercileFunction:=clsUpperTercileFunction, clsNewAsDateMeanY:=clsAsDateMeanY, clsNewAsDateMedianY:=clsAsDateMedianY, clsNewAsDateLowerTercileY:=clsAsDateLowerTercileY, clsNewAsDateUpperTercileY:=clsAsDateUpperTercileY, clsNewFormatMeanY:=clsFormatMeanY, clsNewFormatMedianY:=clsFormatMedianY, clsNewFormatLowerTercileY:=clsFormatLowerTercileY, clsNewFormatUpperTercileY:=clsFormatUpperTercileY, clsNewYLimitsYDate:=clsYLimitsYDate, bReset:=bResetSubdialog)
+ sdgPICSARainfallGraph.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewPipeOperator:=clsPipeOperator, dctNewThemeFunctions:=dctThemeFunctions, clsNewLabsFunction:=clsLabsFunction, clsNewThemeFunction:=clsThemeFunction, clsNewXScaleContinuousFunction:=clsXScalecontinuousFunction, clsNewYScaleContinuousFunction:=clsYScalecontinuousFunction, clsNewGeomhlineMean:=clsGeomHlineMean, clsNewGeomhlineMedian:=clsGeomHlineMedian, clsNewGeomhlineLowerTercile:=clsGeomHlineLowerTercile, clsNewGeomhlineUpperTercile:=clsGeomHlineUpperTercile, clsNewXLabsFunction:=clsXLabsFunction, clsNewYLabsFunction:=clsYLabsFunction, clsNewRaesFunction:=clsRaesFunction, clsNewAsDate:=clsAsDate, clsNewAsDateYLimit:=clsAsDateYLimit, clsNewAsNumeric:=clsAsNumeric, clsNewYScaleDateFunction:=clsYScaleDateFunction, clsNewDatePeriodOperator:=clsDatePeriodOperator, clsNewGeomTextLabelMeanLine:=clsGeomTextLabelMeanLine, clsNewRoundMeanY:=clsRoundMeanY, clsNewPasteMeanY:=clsPasteMeanY, clsNewGeomTextLabelMedianLine:=clsGeomTextLabelMedianLine, clsNewRoundMedianY:=clsRoundMedianY, clsNewPasteMedianY:=clsPasteMedianY, clsNewGeomTextLabelLowerTercileLine:=clsGeomTextLabelLowerTercileLine, clsNewRoundLowerTercileY:=clsRoundLowerTercileY, clsNewPasteLowerTercileY:=clsPasteLowerTercileY, clsNewGeomTextLabelUpperTercileLine:=clsGeomTextLabelUpperTercileLine, clsNewRoundUpperTercileY:=clsRoundUpperTercileY, clsNewPasteUpperTercileY:=clsPasteUpperTercileY, strXAxisType:=ucrReceiverX.strCurrDataType, clsNewMutateFunction:=clsMutateFunction, clsNewMeanFunction:=clsMeanFunction, clsNewMedianFunction:=clsMedianFunction, clsNewLowerTercileFunction:=clsLowerTercileFunction, clsNewUpperTercileFunction:=clsUpperTercileFunction, clsNewAsDateMeanY:=clsAsDateMeanY, clsNewAsDateMedianY:=clsAsDateMedianY, clsNewAsDateLowerTercileY:=clsAsDateLowerTercileY, clsNewAsDateUpperTercileY:=clsAsDateUpperTercileY, clsNewFormatMeanY:=clsFormatMeanY, clsNewFormatMedianY:=clsFormatMedianY, clsNewFormatLowerTercileY:=clsFormatLowerTercileY, clsNewFormatUpperTercileY:=clsFormatUpperTercileY, bReset:=bResetSubdialog)
sdgPICSARainfallGraph.ShowDialog()
AddRemoveGroupBy()
bResetSubdialog = False
@@ -636,7 +629,7 @@ Public Class dlgPICSARainfall
'AddRemoveGroupByAndHlines()
End Sub
- Private Sub cmdLineOptions_Click(sender As Object, e As EventArgs) Handles cmdLineOptions.Click
+ Private Sub cmdLineOptions_Click(sender As Object, e As EventArgs)
sdgLayerOptions.SetupLayer(clsNewGgPlot:=clsRggplotFunction, clsNewGeomFunc:=clsGeomLine, clsNewGlobalAesFunc:=clsRaesFunction, clsNewLocalAes:=clsLocalRaesFunction, bFixGeom:=True, ucrNewBaseSelector:=ucrSelectorPICSARainfall, bApplyAesGlobally:=True, bReset:=bResetLineLayerSubdialog)
sdgLayerOptions.ShowDialog()
bResetLineLayerSubdialog = False
diff --git a/instat/dlgSpells.Designer.vb b/instat/dlgSpells.Designer.vb
index f3b8ae489f3..fec3d46f74e 100644
--- a/instat/dlgSpells.Designer.vb
+++ b/instat/dlgSpells.Designer.vb
@@ -42,8 +42,9 @@ Partial Class dlgSpells
Me.lblDate = New System.Windows.Forms.Label()
Me.lblYear = New System.Windows.Forms.Label()
Me.lblDOY = New System.Windows.Forms.Label()
- Me.lblThreshold = New System.Windows.Forms.Label()
+ Me.lblAnd = New System.Windows.Forms.Label()
Me.grpRainParameters = New System.Windows.Forms.GroupBox()
+ Me.ucrInputFilterPreview = New instat.ucrInputTextBox()
Me.cmdDoyRange = New System.Windows.Forms.Button()
Me.ucrInputSpellLower = New instat.ucrInputTextBox()
Me.ucrInputCondition = New instat.ucrInputComboBox()
@@ -59,7 +60,6 @@ Partial Class dlgSpells
Me.ucrReceiverElement = New instat.ucrReceiverSingle()
Me.ucrSelectorForSpells = New instat.ucrSelectorByDataFrameAddRemove()
Me.ucrBase = New instat.ucrButtons()
- Me.ucrInputFilterPreview = New instat.ucrInputTextBox()
Me.grpRainParameters.SuspendLayout()
Me.SuspendLayout()
'
@@ -99,15 +99,15 @@ Partial Class dlgSpells
Me.lblDOY.TabIndex = 5
Me.lblDOY.Text = "Day of Year:"
'
- 'lblThreshold
+ 'lblAnd
'
- Me.lblThreshold.AutoSize = True
- Me.lblThreshold.Location = New System.Drawing.Point(10, 58)
- Me.lblThreshold.Name = "lblThreshold"
- Me.lblThreshold.Size = New System.Drawing.Size(54, 13)
- Me.lblThreshold.TabIndex = 4
- Me.lblThreshold.Tag = "Threshold"
- Me.lblThreshold.Text = "Condition:"
+ Me.lblAnd.AutoSize = True
+ Me.lblAnd.Location = New System.Drawing.Point(239, 59)
+ Me.lblAnd.Name = "lblAnd"
+ Me.lblAnd.Size = New System.Drawing.Size(25, 13)
+ Me.lblAnd.TabIndex = 4
+ Me.lblAnd.Tag = ""
+ Me.lblAnd.Text = "and"
'
'grpRainParameters
'
@@ -116,7 +116,7 @@ Partial Class dlgSpells
Me.grpRainParameters.Controls.Add(Me.ucrInputSpellLower)
Me.grpRainParameters.Controls.Add(Me.ucrInputCondition)
Me.grpRainParameters.Controls.Add(Me.ucrInputSpellUpper)
- Me.grpRainParameters.Controls.Add(Me.lblThreshold)
+ Me.grpRainParameters.Controls.Add(Me.lblAnd)
Me.grpRainParameters.Location = New System.Drawing.Point(10, 236)
Me.grpRainParameters.Name = "grpRainParameters"
Me.grpRainParameters.Size = New System.Drawing.Size(380, 86)
@@ -124,6 +124,16 @@ Partial Class dlgSpells
Me.grpRainParameters.TabStop = False
Me.grpRainParameters.Text = "Options"
'
+ 'ucrInputFilterPreview
+ '
+ Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True
+ Me.ucrInputFilterPreview.IsMultiline = False
+ Me.ucrInputFilterPreview.IsReadOnly = True
+ Me.ucrInputFilterPreview.Location = New System.Drawing.Point(124, 25)
+ Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview"
+ Me.ucrInputFilterPreview.Size = New System.Drawing.Size(242, 22)
+ Me.ucrInputFilterPreview.TabIndex = 27
+ '
'cmdDoyRange
'
Me.cmdDoyRange.ImeMode = System.Windows.Forms.ImeMode.NoControl
@@ -140,7 +150,7 @@ Partial Class dlgSpells
Me.ucrInputSpellLower.AddQuotesIfUnrecognised = True
Me.ucrInputSpellLower.IsMultiline = False
Me.ucrInputSpellLower.IsReadOnly = False
- Me.ucrInputSpellLower.Location = New System.Drawing.Point(67, 55)
+ Me.ucrInputSpellLower.Location = New System.Drawing.Point(168, 55)
Me.ucrInputSpellLower.Name = "ucrInputSpellLower"
Me.ucrInputSpellLower.Size = New System.Drawing.Size(63, 21)
Me.ucrInputSpellLower.TabIndex = 5
@@ -149,9 +159,9 @@ Partial Class dlgSpells
'
Me.ucrInputCondition.AddQuotesIfUnrecognised = True
Me.ucrInputCondition.IsReadOnly = False
- Me.ucrInputCondition.Location = New System.Drawing.Point(136, 55)
+ Me.ucrInputCondition.Location = New System.Drawing.Point(13, 55)
Me.ucrInputCondition.Name = "ucrInputCondition"
- Me.ucrInputCondition.Size = New System.Drawing.Size(86, 21)
+ Me.ucrInputCondition.Size = New System.Drawing.Size(141, 21)
Me.ucrInputCondition.TabIndex = 6
'
'ucrInputSpellUpper
@@ -159,7 +169,7 @@ Partial Class dlgSpells
Me.ucrInputSpellUpper.AddQuotesIfUnrecognised = True
Me.ucrInputSpellUpper.IsMultiline = False
Me.ucrInputSpellUpper.IsReadOnly = False
- Me.ucrInputSpellUpper.Location = New System.Drawing.Point(228, 55)
+ Me.ucrInputSpellUpper.Location = New System.Drawing.Point(272, 55)
Me.ucrInputSpellUpper.Name = "ucrInputSpellUpper"
Me.ucrInputSpellUpper.Size = New System.Drawing.Size(63, 21)
Me.ucrInputSpellUpper.TabIndex = 7
@@ -197,7 +207,7 @@ Partial Class dlgSpells
Me.ucrChkConditional.Checked = False
Me.ucrChkConditional.Location = New System.Drawing.Point(10, 325)
Me.ucrChkConditional.Name = "ucrChkConditional"
- Me.ucrChkConditional.Size = New System.Drawing.Size(193, 20)
+ Me.ucrChkConditional.Size = New System.Drawing.Size(288, 20)
Me.ucrChkConditional.TabIndex = 13
'
'ucrReceiverStation
@@ -262,6 +272,7 @@ Partial Class dlgSpells
'
'ucrSelectorForSpells
'
+ Me.ucrSelectorForSpells.bDropUnusedFilterLevels = False
Me.ucrSelectorForSpells.bShowHiddenColumns = False
Me.ucrSelectorForSpells.bUseCurrentFilter = True
Me.ucrSelectorForSpells.Location = New System.Drawing.Point(10, 22)
@@ -277,16 +288,6 @@ Partial Class dlgSpells
Me.ucrBase.Size = New System.Drawing.Size(405, 52)
Me.ucrBase.TabIndex = 0
'
- 'ucrInputFilterPreview
- '
- Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True
- Me.ucrInputFilterPreview.IsMultiline = False
- Me.ucrInputFilterPreview.IsReadOnly = True
- Me.ucrInputFilterPreview.Location = New System.Drawing.Point(124, 25)
- Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview"
- Me.ucrInputFilterPreview.Size = New System.Drawing.Size(242, 22)
- Me.ucrInputFilterPreview.TabIndex = 27
- '
'dlgSpells
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -334,7 +335,7 @@ Partial Class dlgSpells
Friend WithEvents ucrReceiverDOY As ucrReceiverSingle
Friend WithEvents grpRainParameters As GroupBox
Friend WithEvents ucrInputCondition As ucrInputComboBox
- Friend WithEvents lblThreshold As Label
+ Friend WithEvents lblAnd As Label
Friend WithEvents lblStation As Label
Friend WithEvents ucrReceiverStation As ucrReceiverSingle
Friend WithEvents ucrInputSpellLower As ucrInputTextBox
diff --git a/instat/dlgSpells.vb b/instat/dlgSpells.vb
index 462be1e16b0..b12bc27fa72 100644
--- a/instat/dlgSpells.vb
+++ b/instat/dlgSpells.vb
@@ -24,11 +24,15 @@ Public Class dlgSpells
Private clsDayFromAndToOperator, clsDayFromOperator, clsDayToOperator As New ROperator
Private clsApplyInstatFunction, clsSpellLogicalCalc, clsRRaindayMatch As New RFunction
Private clsSpellsFunction As New RFunction
- Private clsRRaindayOperator, clsSpellLogicalAndOperator, clsSpellLogicalLowerOperator, clsSpellLogicalUpperOperator, clsAdditionalConditionReplaceOperator, clsAdditionalConditionReplaceOperator2, clsGreaterThanOperator, clsLessThanOperator As New ROperator
+ Private clsRRaindayOperator, clsSpellLogicalAndOperator, clsSpellLogicalGreaterThanOperator, clsSpellLogicalLessThanOperator, clsAdditionalConditionReplaceOperator, clsAdditionalConditionReplaceOperator2, clsGreaterThanOperator, clsLessThanOperator As New ROperator
Private clsAdditionalCondition, clsAdditionalConditionList, clsSubSpellLength2, clsAdditionalConditionReplaceFunction As New RFunction
Private strCurrDataName As String = ""
- Private strRainDay As String = "rain_day"
+
+ Private strLessThan As String = "Less than or equal to"
+ Private strGreaterThan As String = "Greater than or equal to"
+ Private strBetween As String = "Between"
+ Private strExcludingBetween As String = "Excluding between"
Private Sub dlgSpells_Load(sender As Object, e As EventArgs) Handles MyBase.Load
autoTranslate(Me)
@@ -55,27 +59,25 @@ Public Class dlgSpells
ucrReceiverElement.SetParameterIsString()
ucrReceiverElement.bWithQuotes = False
ucrReceiverElement.Selector = ucrSelectorForSpells
- 'ucrReceiverElement.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "rain" & Chr(34)})
- ucrReceiverElement.bAutoFill = True
ucrReceiverElement.SetDataType("numeric")
- ucrReceiverElement.strSelectorHeading = "Variables"
+ ucrReceiverElement.SetClimaticType("rain")
+ ucrReceiverElement.bAutoFill = True
ucrReceiverStation.SetParameter(New RParameter("station", 1, False))
ucrReceiverStation.SetParameterIsString()
ucrReceiverStation.Selector = ucrSelectorForSpells
- ucrReceiverStation.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "station" & Chr(34)})
+ ucrReceiverStation.SetClimaticType("station")
ucrReceiverStation.bAutoFill = True
- ucrReceiverStation.strSelectorHeading = "Station Variables"
ucrReceiverYear.Selector = ucrSelectorForSpells
- ucrReceiverYear.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "year" & Chr(34)})
+ ucrReceiverYear.SetClimaticType("year")
ucrReceiverYear.bAutoFill = True
- ucrReceiverYear.strSelectorHeading = "Year Variables"
ucrReceiverDate.SetParameter(New RParameter("date", 0, False))
ucrReceiverDate.SetParameterIsString()
ucrReceiverDate.Selector = ucrSelectorForSpells
- ucrReceiverDate.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "date" & Chr(34)})
+ ucrReceiverDate.SetDataType("Date")
+ ucrReceiverDate.SetClimaticType("date")
ucrReceiverDate.bAutoFill = True
ucrReceiverDate.strSelectorHeading = "Date Variables"
@@ -83,9 +85,9 @@ Public Class dlgSpells
ucrReceiverDOY.SetParameterIsString()
ucrReceiverDOY.bWithQuotes = False
ucrReceiverDOY.Selector = ucrSelectorForSpells
- ucrReceiverDOY.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "doy" & Chr(34)})
+ ucrReceiverDOY.SetDataType("numeric")
+ ucrReceiverDOY.SetClimaticType("doy")
ucrReceiverDOY.bAutoFill = True
- ucrReceiverDOY.strSelectorHeading = "Day Variables"
clsSubSpellLength1.SetRCommand("list")
clsMaxValueList.SetRCommand("list")
@@ -97,11 +99,12 @@ Public Class dlgSpells
ucrInputSpellUpper.SetParameter(New RParameter("max", 1))
ucrInputSpellUpper.SetValidationTypeAsNumeric()
ucrInputSpellUpper.AddQuotesIfUnrecognised = False
+ ucrInputSpellUpper.SetLinkedDisplayControl(lblAnd)
- ucrInputCondition.SetItems({"<=", "Between", "Outer", ">="})
+ ucrInputCondition.SetItems({strLessThan, strGreaterThan, strBetween, strExcludingBetween})
ucrInputCondition.SetDropDownStyleAsNonEditable()
- ucrChkConditional.SetText("Assuming Condition Satisfied at Start of Each Period")
+ ucrChkConditional.SetText("Assume condition not satisfied at start of each period")
ucrChkConditional.SetParameter(New RParameter("initial_value"))
ucrChkConditional.SetValuesCheckedAndUnchecked("0", "NA_real_")
ucrChkConditional.SetRDefault("NA_real_")
@@ -110,8 +113,8 @@ Public Class dlgSpells
ucrInputNewColumnName.SetDataFrameSelector(ucrSelectorForSpells.ucrAvailableDataFrames)
ucrInputNewColumnName.SetName("spells")
- ucrInputCondition.AddToLinkedControls(ucrInputSpellUpper, {"<=", "Between", "Outer", ">="}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.85)
- ucrInputCondition.AddToLinkedControls(ucrInputSpellLower, {"Between", "Outer"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0)
+ ucrInputCondition.AddToLinkedControls(ucrInputSpellLower, {strLessThan, strGreaterThan, strBetween, strExcludingBetween}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0)
+ ucrInputCondition.AddToLinkedControls(ucrInputSpellUpper, {strBetween, strExcludingBetween}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.85)
ucrInputFilterPreview.IsReadOnly = True
End Sub
@@ -124,6 +127,7 @@ Public Class dlgSpells
clsMaxSpellManipulation.Clear()
clsDayFilter.Clear()
clsGroupBy.Clear()
+ clsSpellsFunction.Clear()
clsSpellLogicalCalc.Clear()
clsSpellLength.Clear()
clsMaxSpellSummary.Clear()
@@ -132,8 +136,8 @@ Public Class dlgSpells
clsDayToOperator.Clear()
clsRRaindayOperator.Clear()
clsSpellLogicalAndOperator.Clear()
- clsSpellLogicalLowerOperator.Clear()
- clsSpellLogicalUpperOperator.Clear()
+ clsSpellLogicalGreaterThanOperator.Clear()
+ clsSpellLogicalLessThanOperator.Clear()
clsMaxFunction.Clear()
clsAdditionalCondition.Clear()
clsAdditionalConditionList.Clear()
@@ -146,7 +150,7 @@ Public Class dlgSpells
ucrSelectorForSpells.Reset()
ucrReceiverElement.SetMeAsReceiver()
- ucrInputCondition.SetName("Between")
+ ucrInputCondition.SetName(strBetween)
ucrInputNewColumnName.SetName("spells")
ucrInputSpellLower.SetName(0)
ucrInputSpellUpper.SetName(0.85)
@@ -190,10 +194,10 @@ Public Class dlgSpells
clsSpellLogicalAndOperator.bToScriptAsRString = True
clsSpellLogicalAndOperator.SetOperation("&")
- clsSpellLogicalLowerOperator.SetOperation(">=")
- clsSpellLogicalLowerOperator.AddParameter("min", 0, iPosition:=1)
- clsSpellLogicalUpperOperator.SetOperation("<=")
- clsSpellLogicalUpperOperator.AddParameter("max", 0.85, iPosition:=1)
+ clsSpellLogicalGreaterThanOperator.SetOperation(">=")
+ clsSpellLogicalGreaterThanOperator.AddParameter("min", 0, iPosition:=1)
+ clsSpellLogicalLessThanOperator.SetOperation("<=")
+ clsSpellLogicalLessThanOperator.AddParameter("max", 0.85, iPosition:=1)
clsGreaterThanOperator.SetOperation(">")
clsLessThanOperator.SetOperation("<")
@@ -229,7 +233,6 @@ Public Class dlgSpells
clsMaxSpellSummary.AddParameter("function_exp", clsRFunctionParameter:=clsMaxFunction, iPosition:=1)
clsMaxSpellSummary.AddParameter("save", 2, iPosition:=6)
clsMaxSpellSummary.AddParameter("result_name", Chr(34) & ucrInputNewColumnName.GetText() & Chr(34), iPosition:=3)
- 'clsMaxSpellSummary.AddParameter("sub_calculation", clsRFunctionParameter:=clsMaxSpellSubCalcs, iPosition:=5)
clsMaxSpellSummary.AddParameter("manipulations", clsRFunctionParameter:=clsMaxSpellManipulation, iPosition:=5)
clsMaxSpellSummary.SetAssignTo("spells")
@@ -239,7 +242,6 @@ Public Class dlgSpells
clsMaxSpellSubCalcs.SetRCommand("list")
clsMaxSpellSubCalcs.AddParameter("sub1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0)
- clsMaxSpellSubCalcs.AddParameter("sub2", clsRFunctionParameter:=clsGroupBy, bIncludeArgumentName:=False, iPosition:=1)
clsMaxSpellManipulation.SetRCommand("list")
clsMaxSpellManipulation.AddParameter("manip1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0)
@@ -260,16 +262,16 @@ Public Class dlgSpells
Private Sub SetRCodeForControls(bReset As Boolean)
ucrReceiverDOY.AddAdditionalCodeParameterPair(clsDayFromOperator, New RParameter("doy", 0), iAdditionalPairNo:=1)
- ucrReceiverElement.AddAdditionalCodeParameterPair(clsSpellLogicalLowerOperator, New RParameter("rain", 0), iAdditionalPairNo:=1)
+ ucrReceiverElement.AddAdditionalCodeParameterPair(clsSpellLogicalGreaterThanOperator, New RParameter("rain", 0), iAdditionalPairNo:=1)
ucrReceiverElement.AddAdditionalCodeParameterPair(clsGreaterThanOperator, New RParameter("rain", 0), iAdditionalPairNo:=2)
ucrReceiverElement.AddAdditionalCodeParameterPair(clsLessThanOperator, New RParameter("rain", 0), iAdditionalPairNo:=3)
ucrInputSpellUpper.AddAdditionalCodeParameterPair(clsGreaterThanOperator, New RParameter("left", 1), iAdditionalPairNo:=1)
ucrInputSpellLower.AddAdditionalCodeParameterPair(clsLessThanOperator, New RParameter("left", 1), iAdditionalPairNo:=1)
ucrReceiverDOY.SetRCode(clsDayToOperator, bReset)
- ucrReceiverElement.SetRCode(clsSpellLogicalUpperOperator, bReset)
- ucrInputSpellLower.SetRCode(clsSpellLogicalLowerOperator, bReset)
- ucrInputSpellUpper.SetRCode(clsSpellLogicalUpperOperator, bReset)
+ ucrReceiverElement.SetRCode(clsSpellLogicalLessThanOperator, bReset)
+ ucrInputSpellLower.SetRCode(clsSpellLogicalGreaterThanOperator, bReset)
+ ucrInputSpellUpper.SetRCode(clsSpellLogicalLessThanOperator, bReset)
ucrInputNewColumnName.SetRCode(clsMaxSpellSummary, bReset)
ucrChkConditional.SetRCode(clsSpellsFunction, bReset)
End Sub
@@ -281,7 +283,7 @@ Public Class dlgSpells
End Sub
Private Sub TestOKEnabled()
- If Not ucrReceiverElement.IsEmpty AndAlso Not ucrInputNewColumnName.IsEmpty AndAlso Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverDOY.IsEmpty AndAlso Not ucrReceiverYear.IsEmpty AndAlso ((ucrInputCondition.GetText = "Between" AndAlso Not ucrInputSpellLower.IsEmpty AndAlso Not ucrInputSpellUpper.IsEmpty) OrElse (ucrInputCondition.GetText = "Outer" AndAlso Not ucrInputSpellLower.IsEmpty AndAlso Not ucrInputSpellUpper.IsEmpty) OrElse (ucrInputCondition.GetText = "<=" AndAlso Not ucrInputSpellUpper.IsEmpty) OrElse (ucrInputCondition.GetText = ">=" AndAlso Not ucrInputSpellUpper.IsEmpty)) Then
+ If Not ucrReceiverElement.IsEmpty AndAlso Not ucrInputNewColumnName.IsEmpty AndAlso Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverDOY.IsEmpty AndAlso Not ucrReceiverYear.IsEmpty AndAlso ((ucrInputCondition.GetText = strBetween AndAlso Not ucrInputSpellLower.IsEmpty AndAlso Not ucrInputSpellUpper.IsEmpty) OrElse (ucrInputCondition.GetText = strExcludingBetween AndAlso Not ucrInputSpellLower.IsEmpty AndAlso Not ucrInputSpellUpper.IsEmpty) OrElse (ucrInputCondition.GetText = strLessThan AndAlso Not ucrInputSpellUpper.IsEmpty) OrElse (ucrInputCondition.GetText = strGreaterThan AndAlso Not ucrInputSpellUpper.IsEmpty)) Then
ucrBase.OKEnabled(True)
Else
ucrBase.OKEnabled(False)
@@ -295,33 +297,38 @@ Public Class dlgSpells
End Sub
Private Sub InputConditionOptions()
+ 'Set here as they are > and < for "Excluding between"
+ clsSpellLogicalGreaterThanOperator.SetOperation(">=")
+ clsSpellLogicalLessThanOperator.SetOperation("<=")
Select Case ucrInputCondition.GetText
- Case "<="
- ucrInputSpellLower.Visible = False
+ Case strLessThan
+ clsSpellLogicalAndOperator.RemoveParameterByName("lower")
+ clsSpellLogicalGreaterThanOperator.RemoveParameterByName("min")
+ clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalLessThanOperator, iPosition:=0)
+ clsSpellLogicalLessThanOperator.AddParameter("max", ucrInputSpellLower.GetText, iPosition:=1)
+ clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalLessThanOperator, iPosition:=0)
+ Case strGreaterThan
clsSpellLogicalAndOperator.RemoveParameterByName("upper")
- clsSpellLogicalUpperOperator.RemoveParameterByName("max")
- clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalLowerOperator, iPosition:=0)
- clsSpellLogicalLowerOperator.AddParameter("min", ucrInputSpellUpper.GetText, iPosition:=1)
- clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalLowerOperator, iPosition:=0)
- Case "Between" ' match(Rain>=LEFT & Rain<=RIGHT, 1, nomatch = 0)
- ucrInputSpellLower.Visible = True
- clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalLowerOperator, iPosition:=0)
- clsSpellLogicalLowerOperator.AddParameter("min", ucrInputSpellLower.GetText, iPosition:=1)
- clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalUpperOperator, iPosition:=0)
- clsSpellLogicalUpperOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1)
+ clsSpellLogicalLessThanOperator.RemoveParameterByName("max")
+ clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalGreaterThanOperator, iPosition:=0)
+ clsSpellLogicalGreaterThanOperator.AddParameter("min", ucrInputSpellLower.GetText, iPosition:=1)
+ clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalGreaterThanOperator, iPosition:=0)
+ Case strBetween
+ clsSpellLogicalAndOperator.SetOperation("&")
+ clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalGreaterThanOperator, iPosition:=0)
+ clsSpellLogicalGreaterThanOperator.AddParameter("min", ucrInputSpellLower.GetText, iPosition:=1)
+ clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalLessThanOperator, iPosition:=1)
+ clsSpellLogicalLessThanOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1)
+ clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalAndOperator, iPosition:=0)
+ Case strExcludingBetween
+ clsSpellLogicalAndOperator.SetOperation("|")
+ clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsSpellLogicalGreaterThanOperator, iPosition:=1)
+ clsSpellLogicalGreaterThanOperator.SetOperation(">")
+ clsSpellLogicalGreaterThanOperator.AddParameter("min", ucrInputSpellUpper.GetText, iPosition:=1)
+ clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalLessThanOperator, iPosition:=0)
+ clsSpellLogicalLessThanOperator.SetOperation("<")
+ clsSpellLogicalLessThanOperator.AddParameter("max", ucrInputSpellLower.GetText, iPosition:=1)
clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalAndOperator, iPosition:=0)
- Case "Outer"
- ucrInputSpellLower.Visible = True
- clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsGreaterThanOperator, iPosition:=0)
- clsSpellLogicalAndOperator.AddParameter("lower", clsROperatorParameter:=clsLessThanOperator, iPosition:=1)
- clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalAndOperator, iPosition:=2)
- Case ">="
- ucrInputSpellLower.Visible = False
- clsSpellLogicalAndOperator.RemoveParameterByName("lower")
- clsSpellLogicalLowerOperator.RemoveParameterByName("min")
- clsSpellLogicalAndOperator.AddParameter("upper", clsROperatorParameter:=clsSpellLogicalUpperOperator, iPosition:=0)
- clsSpellLogicalUpperOperator.AddParameter("max", ucrInputSpellUpper.GetText, iPosition:=1)
- clsRRaindayOperator.AddParameter("x", clsROperatorParameter:=clsSpellLogicalUpperOperator, iPosition:=0)
End Select
End Sub
@@ -354,11 +361,9 @@ Public Class dlgSpells
If ucrChkConditional.Checked Then
clsMaxSpellSummary.AddParameter("sub_calculation", clsRFunctionParameter:=clsMaxSpellSubCalcs, iPosition:=5)
clsMaxSpellManipulation.RemoveParameterByName("manip1")
- clsMaxSpellManipulation.RemoveParameterByName("manip2")
Else
clsMaxSpellSummary.RemoveParameterByName("sub_calculation")
clsMaxSpellManipulation.AddParameter("manip1", clsRFunctionParameter:=clsSpellLength, bIncludeArgumentName:=False, iPosition:=0)
- clsMaxSpellManipulation.AddParameter("manip2", clsRFunctionParameter:=clsGroupBy, bIncludeArgumentName:=False, iPosition:=1)
End If
End Sub
diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb
index 57f0be05198..d19abad4bc2 100644
--- a/instat/frmMain.Designer.vb
+++ b/instat/frmMain.Designer.vb
@@ -462,6 +462,10 @@ Partial Class frmMain
Me.mnuPrepareColumnDateUseDate = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuPrepareColumnDateMakeTime = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuPrepareColumnDateUseTime = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuPrepareColumnDefine = New System.Windows.Forms.ToolStripMenuItem()
+ Me.mnuPrepareColumnDefineConvertColumns = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripSeparator55 = New System.Windows.Forms.ToolStripSeparator()
+ Me.mnuPrepareColumnDefineCircular = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuPrepareColumnReshape = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuPrepareColumnReshapeColumnSummaries = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuPrepareColumnReshapeGeneralSummaries = New System.Windows.Forms.ToolStripMenuItem()
@@ -580,10 +584,6 @@ Partial Class frmMain
Me.splDataOutput = New System.Windows.Forms.SplitContainer()
Me.ucrDataViewer = New instat.ucrDataView()
Me.ucrOutput = New instat.ucrOutputWindow()
- Me.mnuPrepareColumnDefine = New System.Windows.Forms.ToolStripMenuItem()
- Me.mnuPrepareColumnDefineConvertColumns = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripSeparator55 = New System.Windows.Forms.ToolStripSeparator()
- Me.mnuPrepareColumnDefineCircular = New System.Windows.Forms.ToolStripMenuItem()
Me.stsStrip.SuspendLayout()
Me.Tool_strip.SuspendLayout()
Me.mnuBar.SuspendLayout()
@@ -3021,6 +3021,27 @@ Partial Class frmMain
resources.ApplyResources(Me.mnuPrepareColumnDateUseTime, "mnuPrepareColumnDateUseTime")
Me.mnuPrepareColumnDateUseTime.Name = "mnuPrepareColumnDateUseTime"
'
+ 'mnuPrepareColumnDefine
+ '
+ Me.mnuPrepareColumnDefine.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuPrepareColumnDefineConvertColumns, Me.ToolStripSeparator55, Me.mnuPrepareColumnDefineCircular})
+ Me.mnuPrepareColumnDefine.Name = "mnuPrepareColumnDefine"
+ resources.ApplyResources(Me.mnuPrepareColumnDefine, "mnuPrepareColumnDefine")
+ '
+ 'mnuPrepareColumnDefineConvertColumns
+ '
+ Me.mnuPrepareColumnDefineConvertColumns.Name = "mnuPrepareColumnDefineConvertColumns"
+ resources.ApplyResources(Me.mnuPrepareColumnDefineConvertColumns, "mnuPrepareColumnDefineConvertColumns")
+ '
+ 'ToolStripSeparator55
+ '
+ Me.ToolStripSeparator55.Name = "ToolStripSeparator55"
+ resources.ApplyResources(Me.ToolStripSeparator55, "ToolStripSeparator55")
+ '
+ 'mnuPrepareColumnDefineCircular
+ '
+ Me.mnuPrepareColumnDefineCircular.Name = "mnuPrepareColumnDefineCircular"
+ resources.ApplyResources(Me.mnuPrepareColumnDefineCircular, "mnuPrepareColumnDefineCircular")
+ '
'mnuPrepareColumnReshape
'
Me.mnuPrepareColumnReshape.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuPrepareColumnReshapeColumnSummaries, Me.mnuPrepareColumnReshapeGeneralSummaries, Me.ToolStripSeparator10, Me.mnuPrepareColumnReshapeStack, Me.mnuPrepareColumnReshapeUnstack, Me.mnuPrepareColumnReshapeMerge, Me.ToolStripSeparator11, Me.mnuPrepareAppendDataFrame, Me.mnuPrepareColumnReshapeSubset, Me.mnuPrepareColumnReshapeRandomSubset, Me.mnuPrepareColumnReshapeTranspose})
@@ -3722,27 +3743,6 @@ Partial Class frmMain
resources.ApplyResources(Me.ucrOutput, "ucrOutput")
Me.ucrOutput.Name = "ucrOutput"
'
- 'mnuPrepareColumnDefine
- '
- Me.mnuPrepareColumnDefine.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuPrepareColumnDefineConvertColumns, Me.ToolStripSeparator55, Me.mnuPrepareColumnDefineCircular})
- Me.mnuPrepareColumnDefine.Name = "mnuPrepareColumnDefine"
- resources.ApplyResources(Me.mnuPrepareColumnDefine, "mnuPrepareColumnDefine")
- '
- 'mnuPrepareColumnDefineConvertColumns
- '
- Me.mnuPrepareColumnDefineConvertColumns.Name = "mnuPrepareColumnDefineConvertColumns"
- resources.ApplyResources(Me.mnuPrepareColumnDefineConvertColumns, "mnuPrepareColumnDefineConvertColumns")
- '
- 'ToolStripSeparator55
- '
- Me.ToolStripSeparator55.Name = "ToolStripSeparator55"
- resources.ApplyResources(Me.ToolStripSeparator55, "ToolStripSeparator55")
- '
- 'mnuPrepareColumnDefineCircular
- '
- resources.ApplyResources(Me.mnuPrepareColumnDefineCircular, "mnuPrepareColumnDefineCircular")
- Me.mnuPrepareColumnDefineCircular.Name = "mnuPrepareColumnDefineCircular"
- '
'frmMain
'
resources.ApplyResources(Me, "$this")
diff --git a/instat/frmMain.resx b/instat/frmMain.resx
index 1a79878e5a4..a6085084a3d 100644
--- a/instat/frmMain.resx
+++ b/instat/frmMain.resx
@@ -118,18 +118,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 79, 24
-
-
- Describe
-
-
- 203, 26
-
-
- One Variable
-
172, 26
@@ -157,11 +145,11 @@
Rating Data...
-
+
203, 26
-
- Two Variables
+
+ One Variable
171, 26
@@ -184,11 +172,11 @@
Frequencies...
-
+
203, 26
-
- Three Variables
+
+ Two Variables
@@ -218,11 +206,11 @@
Frequencies
-
+
203, 26
-
- Specific
+
+ Three Variables
249, 26
@@ -311,11 +299,11 @@
Mosaic Plot...
-
+
203, 26
-
- General
+
+ Specific
221, 26
@@ -347,14 +335,14 @@
Use Summaries...
-
- 200, 6
-
-
+
203, 26
-
- Multivariate
+
+ General
+
+
+ 200, 6
242, 26
@@ -374,6 +362,12 @@
Canonical Correlations...
+
+ 203, 26
+
+
+ Multivariate
+
200, 6
@@ -404,17 +398,11 @@
View Graph...
-
- 64, 24
-
-
- Model
-
-
- 244, 26
+
+ 79, 24
-
- Probability Distributions
+
+ Describe
294, 26
@@ -437,14 +425,14 @@
Random Samples (Use Model)...
-
- 241, 6
-
-
+
244, 26
-
- One Variable
+
+ Probability Distributions
+
+
+ 241, 6
207, 26
@@ -464,11 +452,11 @@
Use Model...
-
+
244, 26
-
- Two Variables
+
+ One Variable
189, 26
@@ -491,11 +479,11 @@
Use Model...
-
+
244, 26
-
- Three Variables
+
+ Two Variables
189, 26
@@ -521,11 +509,11 @@
Use Model...
-
+
244, 26
-
- Four Variables
+
+ Three Variables
189, 26
@@ -551,11 +539,11 @@
Use Model...
-
+
244, 26
-
- General
+
+ Four Variables
189, 26
@@ -581,6 +569,12 @@
Use Model...
+
+ 244, 26
+
+
+ General
+
241, 6
@@ -602,15 +596,6 @@
Use Model...
-
- False
-
-
- 244, 26
-
-
- Other (One Variable)
-
196, 26
@@ -644,14 +629,14 @@
Goodness of Fit...
-
+
False
-
+
244, 26
-
- Other (Two Variables)
+
+ Other (One Variable)
False
@@ -698,14 +683,14 @@
Non Parameteric One Way ANOVA...
-
+
False
-
+
244, 26
-
- Other (Three Variable)
+
+ Other (Two Variables)
False
@@ -728,14 +713,14 @@
Chi-square Test...
-
+
False
-
+
244, 26
-
- Other (General)
+
+ Other (Three Variable)
False
@@ -764,6 +749,21 @@
Log Linear...
+
+ False
+
+
+ 244, 26
+
+
+ Other (General)
+
+
+ 64, 24
+
+
+ Model
+
False
@@ -788,15 +788,6 @@
False
-
- 259, 26
-
-
- Evaporation
-
-
- False
-
False
@@ -815,13 +806,13 @@
Penman...
-
+
259, 26
-
- Crop
+
+ Evaporation
-
+
False
@@ -842,6 +833,15 @@
Water Satisfaction Index...
+
+ 259, 26
+
+
+ Crop
+
+
+ False
+
False
@@ -854,12 +854,6 @@
False
-
- 53, 24
-
-
- View
-
252, 26
@@ -926,11 +920,11 @@
Reset to Default Layout
-
+
53, 24
-
- Help
+
+ View
265, 26
@@ -992,12 +986,6 @@
262, 6
-
- 265, 26
-
-
- Guides
-
199, 26
@@ -1019,6 +1007,12 @@
More...
+
+ 265, 26
+
+
+ Guides
+
False
@@ -1040,6 +1034,12 @@
Acknowlegments
+
+ 53, 24
+
+
+ Help
+
538, 56
@@ -1049,18 +1049,6 @@
638, 56
-
- 75, 24
-
-
- Climatic
-
-
- 259, 26
-
-
- File
-
256, 26
@@ -1109,14 +1097,14 @@
Export to CPT...
-
- 256, 6
-
-
+
259, 26
-
- Tidy and Examine
+
+ File
+
+
+ 256, 6
255, 26
@@ -1190,11 +1178,11 @@
One Variable Frequencies
-
+
259, 26
-
- Dates
+
+ Tidy and Examine
195, 26
@@ -1238,17 +1226,17 @@
Use Time...
-
+
259, 26
-
- Define Climatic Data...
+
+ Dates
-
+
259, 26
-
- Check Data
+
+ Define Climatic Data...
207, 26
@@ -1280,11 +1268,11 @@
QC Rainfall...
-
+
259, 26
-
- Prepare
+
+ Check Data
224, 26
@@ -1451,14 +1439,14 @@
False
-
- 256, 6
-
-
+
259, 26
-
- Describe
+
+ Prepare
+
+
+ 256, 6
False
@@ -1478,18 +1466,18 @@
Temperature...
-
- 241, 26
-
-
- Wind Speed/Direction...
-
164, 26
Wind Rose...
+
+ 241, 26
+
+
+ Wind Speed/Direction...
+
False
@@ -1514,11 +1502,11 @@
238, 6
-
+
259, 26
-
- PICSA
+
+ Describe
295, 26
@@ -1547,11 +1535,11 @@
Crops...
-
+
259, 26
-
- CM SAF
+
+ PICSA
280, 26
@@ -1565,17 +1553,17 @@
Export to CM SAF R Toolbox...
-
+
259, 26
-
- Mapping...
+
+ CM SAF
-
+
259, 26
-
- Model
+
+ Mapping...
214, 26
@@ -1598,14 +1586,14 @@
Markov Modelling...
-
- 256, 6
-
-
+
259, 26
-
- Seasonal Forecast Support
+
+ Model
+
+
+ 256, 6
295, 26
@@ -1646,20 +1634,11 @@
Cumulative/Exceedance Graph...
-
+
259, 26
-
- Climate Methods
-
-
- False
-
-
- 239, 26
-
-
- Data Manipulation
+
+ Seasonal Forecast Support
False
@@ -1796,11 +1775,11 @@
Output for CDT...
-
+
239, 26
-
- Graphics
+
+ Data Manipulation
False
@@ -1919,6 +1898,12 @@
Three Summaries...
+
+ 239, 26
+
+
+ Graphics
+
False
@@ -1928,12 +1913,6 @@
Model...
-
- 239, 26
-
-
- Additional
-
False
@@ -1979,6 +1958,12 @@
Water Balance...
+
+ 239, 26
+
+
+ Additional
+
False
@@ -1988,6 +1973,21 @@
Create Climate Object...
+
+ 259, 26
+
+
+ Climate Methods
+
+
+ False
+
+
+ 75, 24
+
+
+ Climatic
+
Ctrl+S
@@ -1998,12 +1998,6 @@
Save...
-
- 281, 26
-
-
- Save As
-
253, 26
@@ -2028,6 +2022,12 @@
Save Script Window As...
+
+ 281, 26
+
+
+ Save As
+
False
@@ -2058,12 +2058,6 @@
Exit
-
- 47, 24
-
-
- Edit
-
False
@@ -2148,12 +2142,24 @@
Select All
+
+ 47, 24
+
+
+ Edit
+
775, 56
946, 56
+
+ 151, 20
+
+
+ No worksheet loaded
+
0, 568
@@ -2181,42 +2187,9 @@
1
-
- 151, 20
-
-
- No worksheet loaded
-
17, 95
-
- 0, 28
-
-
- No
-
-
- 1112, 37
-
-
- 7
-
-
- Tool
-
-
- Tool_strip
-
-
- System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 2
-
Magenta
@@ -2280,15 +2253,6 @@
Edit Last Dialog
-
- Magenta
-
-
- 44, 34
-
-
- Last 10 Dialogs
-
63, 6
@@ -2301,6 +2265,15 @@
False
+
+ Magenta
+
+
+ 44, 34
+
+
+ Last 10 Dialogs
+
Magenta
@@ -2370,164 +2343,38 @@
He&lp
-
- 122, 95
-
-
- On
-
-
- 44, 24
-
-
- File
-
-
- 216, 26
-
-
- Data Frame
-
-
- 216, 26
-
-
- Check Data
-
-
- 213, 6
-
-
- 216, 26
-
-
- Column: Calculate
-
-
- 216, 26
-
-
- Column: Generate
-
-
- 216, 26
-
-
- Column: Factor
-
-
- 216, 26
-
-
- Column: Text
-
-
- 216, 26
-
-
- Column: Date
-
-
- 216, 26
-
-
- Convert Columns...
-
-
- 213, 6
-
-
- False
-
-
- 216, 26
-
-
- Circular...
-
-
- 216, 26
-
-
- Column: Define
-
-
- 216, 26
-
-
- Column: Reshape
-
-
- 213, 6
-
-
- 216, 26
-
-
- Keys and Links
-
-
- 216, 26
-
-
- Data Object
-
-
- 216, 26
-
-
- R Objects
-
-
- 72, 24
-
-
- Prepare
-
-
- 105, 24
-
-
- Procurement
-
-
- 148, 24
-
-
- Options by Context
-
-
- 56, 24
-
-
- Tools
-
-
- 0, 0
+
+ 0, 28
-
- 8, 2, 0, 2
+
+ No
-
- 1112, 28
+
+ 1112, 37
-
- 6
+
+ 7
-
- Menu_strip
+
+ Tool
-
- mnuBar
+
+ Tool_strip
-
- System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
$this
-
- 3
+
+ 2
+
+
+ 122, 95
+
+
+ On
Ctrl+N
@@ -2601,12 +2448,6 @@
278, 6
-
- 281, 26
-
-
- Export
-
246, 26
@@ -2631,6 +2472,12 @@
Export Graph As Image...
+
+ 281, 26
+
+
+ Export
+
281, 26
@@ -2640,6 +2487,12 @@
278, 6
+
+ 44, 24
+
+
+ File
+
239, 26
@@ -2751,6 +2604,12 @@
Colour by Property...
+
+ 216, 26
+
+
+ Data Frame
+
299, 26
@@ -2838,6 +2697,15 @@
Anonymise ID Column...
+
+ 216, 26
+
+
+ Check Data
+
+
+ 213, 6
+
221, 26
@@ -2892,6 +2760,12 @@
Row Summary...
+
+ 216, 26
+
+
+ Column: Calculate
+
212, 26
@@ -2925,6 +2799,12 @@
Permute Columns...
+
+ 216, 26
+
+
+ Column: Generate
+
214, 26
@@ -3006,26 +2886,32 @@
Factor Data Frame...
-
+
216, 26
+
+ Column: Factor
+
+
+ 180, 26
+
Find/Replace...
- 216, 26
+ 180, 26
Transform...
- 216, 26
+ 180, 26
Split...
- 216, 26
+ 180, 26
Combine...
@@ -3034,17 +2920,23 @@
False
- 216, 26
+ 180, 26
Match...
- 216, 26
+ 180, 26
Distance...
+
+ 216, 26
+
+
+ Column: Text
+
195, 26
@@ -3087,6 +2979,33 @@
Use Time...
+
+ 216, 26
+
+
+ Column: Date
+
+
+ 216, 26
+
+
+ Convert Columns...
+
+
+ 213, 6
+
+
+ 216, 26
+
+
+ Circular...
+
+
+ 216, 26
+
+
+ Column: Define
+
233, 26
@@ -3147,6 +3066,15 @@
Transpose...
+
+ 216, 26
+
+
+ Column: Reshape
+
+
+ 213, 6
+
248, 26
@@ -3177,6 +3105,12 @@
Add Comment...
+
+ 216, 26
+
+
+ Keys and Links
+
False
@@ -3255,6 +3189,12 @@
Delete Metadata...
+
+ 216, 26
+
+
+ Data Object
+
147, 26
@@ -3279,6 +3219,18 @@
Delete...
+
+ 216, 26
+
+
+ R Objects
+
+
+ 72, 24
+
+
+ Prepare
+
263, 26
@@ -3291,12 +3243,6 @@
Define Procurement Data...
-
- 263, 26
-
-
- Prepare
-
437, 26
@@ -3351,11 +3297,11 @@
Merge Additional Data...
-
+
263, 26
-
- Describe
+
+ Prepare
255, 26
@@ -3372,12 +3318,6 @@
252, 6
-
- 255, 26
-
-
- Categorical
-
393, 26
@@ -3405,11 +3345,11 @@
Mosaic Plot...
-
+
255, 26
-
- Numeric
+
+ Categorical
314, 26
@@ -3432,11 +3372,17 @@
Correlations (Red Flags or others)...
-
+
+ 255, 26
+
+
+ Numeric
+
+
263, 26
-
- Mapping
+
+ Describe
224, 26
@@ -3444,11 +3390,11 @@
Map Country Values...
-
+
263, 26
-
- Model
+
+ Mapping
356, 26
@@ -3462,6 +3408,12 @@
Fit Model...
+
+ 263, 26
+
+
+ Model
+
260, 6
@@ -3471,12 +3423,6 @@
Define Red Flag Variables...
-
- 263, 26
-
-
- Corruption Risk Index
-
335, 26
@@ -3489,11 +3435,17 @@
Summarise CRI by Country (or other)...
-
- 304, 26
+
+ 263, 26
-
- Check Data
+
+ Corruption Risk Index
+
+
+ 105, 24
+
+
+ Procurement
260, 26
@@ -3528,17 +3480,17 @@
One Variable Frequencies...
-
+
304, 26
-
- Define Options by Context Data...
+
+ Check Data
-
+
304, 26
-
- Prepare
+
+ Define Options by Context Data...
344, 26
@@ -3567,11 +3519,11 @@
Unstack...
-
+
304, 26
-
- Describe
+
+ Prepare
269, 26
@@ -3594,11 +3546,11 @@
Boxplot...
-
+
304, 26
-
- Model
+
+ Describe
211, 26
@@ -3612,6 +3564,18 @@
General Fit Model...
+
+ 304, 26
+
+
+ Model
+
+
+ 148, 24
+
+
+ Options by Context
+
False
@@ -3672,6 +3636,39 @@
Options...
+
+ 56, 24
+
+
+ Tools
+
+
+ 0, 0
+
+
+ 8, 2, 0, 2
+
+
+ 1112, 28
+
+
+ 6
+
+
+ Menu_strip
+
+
+ mnuBar
+
+
+ System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 3
+
126, 22
@@ -8394,6 +8391,30 @@
System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ mnuPrepareColumnDefine
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ mnuPrepareColumnDefineConvertColumns
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ToolStripSeparator55
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ mnuPrepareColumnDefineCircular
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
mnuPrepareColumnReshape
@@ -9036,30 +9057,6 @@
System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- mnuPrepareColumnDefine
-
-
- System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- mnuPrepareColumnDefineConvertColumns
-
-
- System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- ToolStripSeparator55
-
-
- System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- mnuPrepareColumnDefineCircular
-
-
- System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
frmMain
diff --git a/instat/sdgPICSARainfallGraph.Designer.vb b/instat/sdgPICSARainfallGraph.Designer.vb
index 44688fd06fa..0c5e22f8ec1 100644
--- a/instat/sdgPICSARainfallGraph.Designer.vb
+++ b/instat/sdgPICSARainfallGraph.Designer.vb
@@ -163,6 +163,13 @@ Partial Class sdgPICSARainfallGraph
Me.UcrChkPnlBackgroundLineType = New instat.ucrCheck()
Me.UcrChkPnlBackgroundFill = New instat.ucrCheck()
Me.ucrChkPnlBackgroundColour = New instat.ucrCheck()
+ Me.tpRug = New System.Windows.Forms.TabPage()
+ Me.ucrInputXaxisOptions = New instat.ucrInputComboBox()
+ Me.lblXaxisOptions = New System.Windows.Forms.Label()
+ Me.ucrChkXaxis = New instat.ucrCheck()
+ Me.ucrInputYaxisOptions = New instat.ucrInputComboBox()
+ Me.lblYaxisOptions = New System.Windows.Forms.Label()
+ Me.ucrChkYaxis = New instat.ucrCheck()
Me.ucrSdgPICSARainfalbuttons = New instat.ucrButtonsSubdialogue()
Me.tbPICSA.SuspendLayout()
Me.tpTitles.SuspendLayout()
@@ -179,6 +186,7 @@ Partial Class sdgPICSARainfallGraph
Me.grpPnlBorder.SuspendLayout()
Me.grpMajorGridLines.SuspendLayout()
Me.grpPnlBackground.SuspendLayout()
+ Me.tpRug.SuspendLayout()
Me.SuspendLayout()
'
'lblXTo
@@ -203,6 +211,7 @@ Partial Class sdgPICSARainfallGraph
Me.tbPICSA.Controls.Add(Me.tpYAxis)
Me.tbPICSA.Controls.Add(Me.tpLines)
Me.tbPICSA.Controls.Add(Me.tpPanel)
+ Me.tbPICSA.Controls.Add(Me.tpRug)
resources.ApplyResources(Me.tbPICSA, "tbPICSA")
Me.tbPICSA.Name = "tbPICSA"
Me.tbPICSA.SelectedIndex = 0
@@ -1266,6 +1275,54 @@ Partial Class sdgPICSARainfallGraph
resources.ApplyResources(Me.ucrChkPnlBackgroundColour, "ucrChkPnlBackgroundColour")
Me.ucrChkPnlBackgroundColour.Name = "ucrChkPnlBackgroundColour"
'
+ 'tpRug
+ '
+ Me.tpRug.Controls.Add(Me.ucrInputXaxisOptions)
+ Me.tpRug.Controls.Add(Me.lblXaxisOptions)
+ Me.tpRug.Controls.Add(Me.ucrChkXaxis)
+ Me.tpRug.Controls.Add(Me.ucrInputYaxisOptions)
+ Me.tpRug.Controls.Add(Me.lblYaxisOptions)
+ Me.tpRug.Controls.Add(Me.ucrChkYaxis)
+ resources.ApplyResources(Me.tpRug, "tpRug")
+ Me.tpRug.Name = "tpRug"
+ Me.tpRug.UseVisualStyleBackColor = True
+ '
+ 'ucrInputXaxisOptions
+ '
+ Me.ucrInputXaxisOptions.AddQuotesIfUnrecognised = True
+ Me.ucrInputXaxisOptions.IsReadOnly = False
+ resources.ApplyResources(Me.ucrInputXaxisOptions, "ucrInputXaxisOptions")
+ Me.ucrInputXaxisOptions.Name = "ucrInputXaxisOptions"
+ '
+ 'lblXaxisOptions
+ '
+ resources.ApplyResources(Me.lblXaxisOptions, "lblXaxisOptions")
+ Me.lblXaxisOptions.Name = "lblXaxisOptions"
+ '
+ 'ucrChkXaxis
+ '
+ Me.ucrChkXaxis.Checked = False
+ resources.ApplyResources(Me.ucrChkXaxis, "ucrChkXaxis")
+ Me.ucrChkXaxis.Name = "ucrChkXaxis"
+ '
+ 'ucrInputYaxisOptions
+ '
+ Me.ucrInputYaxisOptions.AddQuotesIfUnrecognised = True
+ Me.ucrInputYaxisOptions.IsReadOnly = False
+ resources.ApplyResources(Me.ucrInputYaxisOptions, "ucrInputYaxisOptions")
+ Me.ucrInputYaxisOptions.Name = "ucrInputYaxisOptions"
+ '
+ 'lblYaxisOptions
+ '
+ resources.ApplyResources(Me.lblYaxisOptions, "lblYaxisOptions")
+ Me.lblYaxisOptions.Name = "lblYaxisOptions"
+ '
+ 'ucrChkYaxis
+ '
+ Me.ucrChkYaxis.Checked = False
+ resources.ApplyResources(Me.ucrChkYaxis, "ucrChkYaxis")
+ Me.ucrChkYaxis.Name = "ucrChkYaxis"
+ '
'ucrSdgPICSARainfalbuttons
'
resources.ApplyResources(Me.ucrSdgPICSARainfalbuttons, "ucrSdgPICSARainfalbuttons")
@@ -1305,6 +1362,8 @@ Partial Class sdgPICSARainfallGraph
Me.grpMajorGridLines.ResumeLayout(False)
Me.grpMajorGridLines.PerformLayout()
Me.grpPnlBackground.ResumeLayout(False)
+ Me.tpRug.ResumeLayout(False)
+ Me.tpRug.PerformLayout()
Me.ResumeLayout(False)
End Sub
@@ -1450,4 +1509,11 @@ Partial Class sdgPICSARainfallGraph
Friend WithEvents ucrInputYSpecifyLowerLimitDateMonth As ucrInputComboBox
Friend WithEvents ucrNudUpperLimit As ucrNud
Friend WithEvents ucrNudLowerLimit As ucrNud
+ Friend WithEvents tpRug As TabPage
+ Friend WithEvents ucrChkYaxis As ucrCheck
+ Friend WithEvents lblYaxisOptions As Label
+ Friend WithEvents ucrInputYaxisOptions As ucrInputComboBox
+ Friend WithEvents ucrInputXaxisOptions As ucrInputComboBox
+ Friend WithEvents lblXaxisOptions As Label
+ Friend WithEvents ucrChkXaxis As ucrCheck
End Class
diff --git a/instat/sdgPICSARainfallGraph.resx b/instat/sdgPICSARainfallGraph.resx
index da404c2a414..fa8f9f52527 100644
--- a/instat/sdgPICSARainfallGraph.resx
+++ b/instat/sdgPICSARainfallGraph.resx
@@ -3447,8 +3447,173 @@
4
+
+ 225, 69
+
+
+ 137, 21
+
+
+ 5
+
+
+ ucrInputXaxisOptions
+
+
+ instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ tpRug
+
+
+ 0
+
+
+ True
+
+
+ 135, 69
+
+
+ 77, 13
+
+
+ 4
+
+
+ X-axis Options:
+
+
+ lblXaxisOptions
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tpRug
+
+
+ 1
+
+
+ 6, 69
+
+
+ 100, 20
+
+
+ 3
+
+
+ ucrChkXaxis
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ tpRug
+
+
+ 2
+
+
+ 225, 25
+
+
+ 137, 21
+
+
+ 2
+
+
+ ucrInputYaxisOptions
+
+
+ instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ tpRug
+
+
+ 3
+
+
+ True
+
+
+ 135, 25
+
+
+ 77, 13
+
+
+ 1
+
+
+ Y-axis Options:
+
+
+ lblYaxisOptions
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tpRug
+
+
+ 4
+
+
+ 6, 25
+
+
+ 100, 20
+
+
+ 0
+
+
+ ucrChkYaxis
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ tpRug
+
+
+ 5
+
+
+ 4, 22
+
+
+ 3, 3, 3, 3
+
+
+ 567, 309
+
+
+ 5
+
+
+ Rug
+
+
+ tpRug
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tbPICSA
+
+
+ 5
+
- 10, 4
+ 12, -3
575, 335
diff --git a/instat/sdgPICSARainfallGraph.vb b/instat/sdgPICSARainfallGraph.vb
index 0caead6c5de..9c05a83c951 100644
--- a/instat/sdgPICSARainfallGraph.vb
+++ b/instat/sdgPICSARainfallGraph.vb
@@ -31,19 +31,18 @@ Public Class sdgPICSARainfallGraph
Private strLowerTercileName As String = ".lower_ter_y"
Private strUpperTercileName As String = ".upper_ter_y"
- Private strLeapYearSelected As String = "2016"
-
-
Public clsBaseOperator As ROperator
Public clsPipeOperator As ROperator
Public clsLabsFunction, clsXLabsFunction, clsYLabsFunction As RFunction
Public clsXScaleContinuousFunction, clsYScaleContinuousFunction As New RFunction
- Public clsCLimitsYContinuous, clsCLimitsYDate, clsYLimitsYDate, clsAsDateLimit As New RFunction
+ Public clsCLimitsYContinuous, clsCLimitsYDate, clsAsDateLimit As New RFunction
Public clsXScalecontinuousSeqFunction, clsYScaleContinuousSeqFunction As New RFunction
Public clsYScaleDateFunction As New RFunction
Public clsThemeFunction As RFunction
Public dctThemeFunctions As New Dictionary(Of String, RFunction)
Private bRCodeSet As Boolean = False
+ Public dctRugSidesX As New Dictionary(Of String, String)
+ Public dctRugSidesY As New Dictionary(Of String, String)
Private clsPlotElementTitle As New RFunction
Private clsPlotElementSubTitle As New RFunction
@@ -59,7 +58,6 @@ Public Class sdgPICSARainfallGraph
Private clsElementBlank As New RFunction
Private dctLabelForDays As New Dictionary(Of String, String)
Private dctDateTimePeriods As New Dictionary(Of String, String)
- Private dctDateStartMonths As New Dictionary(Of String, String)
Private clsDatePeriodOperator As New ROperator
@@ -95,12 +93,16 @@ Public Class sdgPICSARainfallGraph
Private clsAsDateYLimit As New RFunction
Private clsAsNumeric As New RFunction
+ Private clsGeomRug As New RFunction
+ Private clsRugParam As New RParameter
+
Private Sub sdgPICSARainfallGraph_Load(sender As Object, e As EventArgs) Handles MyBase.Load
autoTranslate(Me)
+ ' Hide the rug tab
+ tbPICSA.TabPages.Remove(tpRug)
End Sub
Public Sub InitialiseControls()
-
clsElementBlank = New RFunction
clsElementBlank.SetPackageName("ggplot2")
clsElementBlank.SetRCommand("element_blank")
@@ -216,21 +218,21 @@ Public Class sdgPICSARainfallGraph
ucrPnlYAxisType.AddToLinkedControls(ucrInputYSpecifyUpperLimitDateMonth, {rdoYDate}, bNewLinkedHideIfParameterMissing:=True)
ucrChkYSpecifyLowerLimit.SetText("Specify Lower Limit")
- ucrChkYSpecifyLowerLimit.AddParameterValuesCondition(True, "min", "NA", False)
- ucrChkYSpecifyLowerLimit.AddParameterValuesCondition(False, "min", "NA", True)
+ ucrChkYSpecifyLowerLimit.AddParameterValuesCondition(True, "lowerlimit", "NA", False)
+ ucrChkYSpecifyLowerLimit.AddParameterValuesCondition(False, "lowerlimit", "NA", True)
ucrChkYSpecifyLowerLimit.AddToLinkedControls(ucrInputYSpecifyLowerLimitNumeric, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrInputYSpecifyLowerLimitNumeric.SetParameter(New RParameter("min", 0))
+ ucrInputYSpecifyLowerLimitNumeric.SetParameter(New RParameter("lowerlimit", 0))
ucrInputYSpecifyLowerLimitNumeric.SetValidationTypeAsNumeric()
ucrInputYSpecifyLowerLimitNumeric.SetValuesToIgnore({"NA"})
ucrInputYSpecifyLowerLimitNumeric.AddQuotesIfUnrecognised = False
ucrChkYSpecifyUpperLimit.SetText("Specify Upper Limit")
- ucrChkYSpecifyUpperLimit.AddParameterValuesCondition(True, "max", "NA", False)
- ucrChkYSpecifyUpperLimit.AddParameterValuesCondition(False, "max", "NA", True)
+ ucrChkYSpecifyUpperLimit.AddParameterValuesCondition(True, "upperlimit", "NA", False)
+ ucrChkYSpecifyUpperLimit.AddParameterValuesCondition(False, "upperlimit", "NA", True)
ucrChkYSpecifyUpperLimit.AddToLinkedControls(ucrInputYSpecifyUpperLimitNumeric, {True}, bNewLinkedHideIfParameterMissing:=True)
- ucrInputYSpecifyUpperLimitNumeric.SetParameter(New RParameter("max", 1))
+ ucrInputYSpecifyUpperLimitNumeric.SetParameter(New RParameter("upperlimit", 1))
ucrInputYSpecifyUpperLimitNumeric.SetValidationTypeAsNumeric()
ucrInputYSpecifyUpperLimitNumeric.SetValuesToIgnore({"NA"})
ucrInputYSpecifyUpperLimitNumeric.AddQuotesIfUnrecognised = False
@@ -298,15 +300,14 @@ Public Class sdgPICSARainfallGraph
'Dates limits
- ucrInputYSpecifyLowerLimitDateMonth.SetParameter(New RParameter("min"), 0)
+ ucrInputYSpecifyLowerLimitDateMonth.SetParameter(New RParameter("lowerlimit"), 0)
ucrInputYSpecifyLowerLimitDateMonth.SetItems({"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"})
ucrInputYSpecifyLowerLimitDateMonth.AddQuotesIfUnrecognised = False
ucrInputYSpecifyLowerLimitDateMonth.bAllowNonConditionValues = True
ucrInputYSpecifyLowerLimitDateMonth.SetDropDownStyleAsNonEditable()
ucrInputYSpecifyLowerLimitDateMonth.SetName("January")
-
- ucrInputYSpecifyUpperLimitDateMonth.SetParameter(New RParameter("max"), 0)
+ ucrInputYSpecifyUpperLimitDateMonth.SetParameter(New RParameter("upperlimit"), 0)
ucrInputYSpecifyUpperLimitDateMonth.SetItems({"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"})
ucrInputYSpecifyUpperLimitDateMonth.AddQuotesIfUnrecognised = False
ucrInputYSpecifyUpperLimitDateMonth.bAllowNonConditionValues = True
@@ -541,10 +542,52 @@ Public Class sdgPICSARainfallGraph
ucrNudUpperLimit.Value = 31
+ ' Rug Tab
+ clsGeomRug.SetPackageName("ggplot2")
+ clsGeomRug.SetRCommand("geom_rug")
+
+ ucrChkYaxis.SetText("Y-axis")
+ ucrChkYaxis.AddToLinkedControls(ucrInputYaxisOptions, {True}, bNewLinkedHideIfParameterMissing:=True) 'objNewDefaultState:="Left"
+ ucrChkYaxis.AddParameterPresentCondition({True}, "sides")
+ ucrChkYaxis.AddParameterPresentCondition({False}, "sides", False)
+
+ ucrInputYaxisOptions.SetLinkedDisplayControl(lblYaxisOptions)
+ ucrInputYaxisOptions.SetParameter(New RParameter("sides"))
+
+ dctRugSidesY.Add("Left", Chr(34) & "l" & Chr(34))
+ dctRugSidesY.Add("Right", Chr(34) & "r" & Chr(34))
+ dctRugSidesY.Add("Both", Chr(34) & "lr" & Chr(34))
+
+ ucrInputYaxisOptions.SetItems(dctRugSidesY)
+ ucrInputYaxisOptions.SetDropDownStyleAsNonEditable()
+ ucrInputYaxisOptions.AddFunctionNamesCondition("Left", "geom_rug")
+ ucrInputYaxisOptions.AddFunctionNamesCondition("Right", "geom_rug")
+ ucrInputYaxisOptions.AddFunctionNamesCondition("Both", "geom_rug")
+
+ ucrChkXaxis.SetText("X-axis")
+ ucrChkXaxis.AddToLinkedControls(ucrInputXaxisOptions, {True}, bNewLinkedHideIfParameterMissing:=True) 'objNewDefaultState:="Top")
+ ucrChkXaxis.AddParameterPresentCondition({True}, "sides")
+ ucrChkXaxis.AddParameterPresentCondition({False}, "sides", False)
+
+ ucrInputXaxisOptions.SetLinkedDisplayControl(lblXaxisOptions)
+ ucrInputXaxisOptions.SetParameter(New RParameter("sides"))
+
+ dctRugSidesX.Add("Top", Chr(34) & "t" & Chr(34))
+ dctRugSidesX.Add("Bottom", Chr(34) & "b" & Chr(34))
+ dctRugSidesX.Add("Both", Chr(34) & "tb" & Chr(34))
+
+ ucrInputXaxisOptions.SetItems(dctRugSidesX)
+ ucrInputXaxisOptions.SetDropDownStyleAsNonEditable()
+ ucrInputXaxisOptions.AddFunctionNamesCondition("Top", "geom_rug")
+ ucrInputXaxisOptions.AddFunctionNamesCondition("Bottom", "geom_rug")
+ ucrInputXaxisOptions.AddFunctionNamesCondition("Both", "geom_rug")
+
bControlsInitialised = True
End Sub
- Public Sub SetRCode(clsNewOperator As ROperator, clsNewPipeOperator As ROperator, Optional clsNewLabsFunction As RFunction = Nothing, Optional clsNewXLabsFunction As RFunction = Nothing, Optional clsNewYLabsFunction As RFunction = Nothing, Optional clsNewXScaleContinuousFunction As RFunction = Nothing, Optional clsNewYScaleContinuousFunction As RFunction = Nothing, Optional clsNewYScaleDateFunction As RFunction = Nothing, Optional clsNewThemeFunction As RFunction = Nothing, Optional dctNewThemeFunctions As Dictionary(Of String, RFunction) = Nothing, Optional clsNewGeomhlineMean As RFunction = Nothing, Optional clsNewGeomhlineMedian As RFunction = Nothing, Optional clsNewGeomhlineLowerTercile As RFunction = Nothing, Optional clsNewGeomhlineUpperTercile As RFunction = Nothing, Optional clsNewRaesFunction As RFunction = Nothing, Optional clsNewAsDate As RFunction = Nothing, Optional clsNewAsDateYLimit As RFunction = Nothing, Optional clsNewAsNumeric As RFunction = Nothing, Optional clsNewDatePeriodOperator As ROperator = Nothing, Optional clsNewGeomTextLabelMeanLine As RFunction = Nothing, Optional clsNewRoundMeanY As RFunction = Nothing, Optional clsNewPasteMeanY As RFunction = Nothing, Optional clsNewGeomTextLabelMedianLine As RFunction = Nothing, Optional clsNewRoundMedianY As RFunction = Nothing, Optional clsNewPasteMedianY As RFunction = Nothing, Optional clsNewGeomTextLabelLowerTercileLine As RFunction = Nothing, Optional clsNewRoundLowerTercileY As RFunction = Nothing, Optional clsNewPasteLowerTercileY As RFunction = Nothing, Optional clsNewGeomTextLabelUpperTercileLine As RFunction = Nothing, Optional clsNewRoundUpperTercileY As RFunction = Nothing, Optional clsNewPasteUpperTercileY As RFunction = Nothing, Optional strXAxisType As String = "", Optional clsNewMutateFunction As RFunction = Nothing, Optional clsNewMeanFunction As RFunction = Nothing, Optional clsNewMedianFunction As RFunction = Nothing, Optional clsNewLowerTercileFunction As RFunction = Nothing, Optional clsNewUpperTercileFunction As RFunction = Nothing, Optional clsNewAsDateMeanY As RFunction = Nothing, Optional clsNewAsDateMedianY As RFunction = Nothing, Optional clsNewAsDateLowerTercileY As RFunction = Nothing, Optional clsNewAsDateUpperTercileY As RFunction = Nothing, Optional clsNewFormatMeanY As RFunction = Nothing, Optional clsNewFormatMedianY As RFunction = Nothing, Optional clsNewFormatLowerTercileY As RFunction = Nothing, Optional clsNewFormatUpperTercileY As RFunction = Nothing, Optional clsNewYLimitsYDate As RFunction = Nothing, Optional bReset As Boolean = False)
+ Public Sub SetRCode(clsNewOperator As ROperator, clsNewPipeOperator As ROperator, Optional clsNewLabsFunction As RFunction = Nothing, Optional clsNewXLabsFunction As RFunction = Nothing, Optional clsNewYLabsFunction As RFunction = Nothing, Optional clsNewXScaleContinuousFunction As RFunction = Nothing, Optional clsNewYScaleContinuousFunction As RFunction = Nothing, Optional clsNewYScaleDateFunction As RFunction = Nothing, Optional clsNewThemeFunction As RFunction = Nothing, Optional dctNewThemeFunctions As Dictionary(Of String, RFunction) = Nothing, Optional clsNewGeomhlineMean As RFunction = Nothing, Optional clsNewGeomhlineMedian As RFunction = Nothing, Optional clsNewGeomhlineLowerTercile As RFunction = Nothing, Optional clsNewGeomhlineUpperTercile As RFunction = Nothing, Optional clsNewRaesFunction As RFunction = Nothing, Optional clsNewAsDate As RFunction = Nothing, Optional clsNewAsDateYLimit As RFunction = Nothing, Optional clsNewAsNumeric As RFunction = Nothing, Optional clsNewDatePeriodOperator As ROperator = Nothing, Optional clsNewGeomTextLabelMeanLine As RFunction = Nothing, Optional clsNewRoundMeanY As RFunction = Nothing, Optional clsNewPasteMeanY As RFunction = Nothing, Optional clsNewGeomTextLabelMedianLine As RFunction = Nothing, Optional clsNewRoundMedianY As RFunction = Nothing, Optional clsNewPasteMedianY As RFunction = Nothing, Optional clsNewGeomTextLabelLowerTercileLine As RFunction = Nothing, Optional clsNewRoundLowerTercileY As RFunction = Nothing, Optional clsNewPasteLowerTercileY As RFunction = Nothing, Optional clsNewGeomTextLabelUpperTercileLine As RFunction = Nothing, Optional clsNewRoundUpperTercileY As RFunction = Nothing, Optional clsNewPasteUpperTercileY As RFunction = Nothing, Optional strXAxisType As String = "", Optional clsNewMutateFunction As RFunction = Nothing, Optional clsNewMeanFunction As RFunction = Nothing, Optional clsNewMedianFunction As RFunction = Nothing, Optional clsNewLowerTercileFunction As RFunction = Nothing, Optional clsNewUpperTercileFunction As RFunction = Nothing, Optional clsNewAsDateMeanY As RFunction = Nothing, Optional clsNewAsDateMedianY As RFunction = Nothing, Optional clsNewAsDateLowerTercileY As RFunction = Nothing, Optional clsNewAsDateUpperTercileY As RFunction = Nothing, Optional clsNewFormatMeanY As RFunction = Nothing, Optional clsNewFormatMedianY As RFunction = Nothing, Optional clsNewFormatLowerTercileY As RFunction = Nothing, Optional clsNewFormatUpperTercileY As RFunction = Nothing, Optional bReset As Boolean = False)
+ Dim clsCLimitsY As RFunction
+
bRCodeSet = False
clsBaseOperator = clsNewOperator
clsPipeOperator = clsNewPipeOperator
@@ -661,7 +704,6 @@ Public Class sdgPICSARainfallGraph
clsAsNumeric = clsNewAsNumeric
clsAsDateYLimit = clsNewAsDateYLimit
- clsYLimitsYDate = clsNewYLimitsYDate
clsDatePeriodOperator = clsNewDatePeriodOperator
@@ -689,17 +731,48 @@ Public Class sdgPICSARainfallGraph
Else
clsCLimitsYContinuous = New RFunction
clsCLimitsYContinuous.SetRCommand("c")
+ clsCLimitsYContinuous.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYContinuous.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
End If
Else
clsCLimitsYContinuous = New RFunction
clsCLimitsYContinuous.SetRCommand("c")
+ clsCLimitsYContinuous.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYContinuous.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
+ End If
+
+ ' Limits c() function for y date scales
+ Dim clsTempYLimitsDateParam As RParameter
+ If clsAsDateYLimit.ContainsParameter("x") Then
+ clsTempYLimitsDateParam = clsAsDateYLimit.GetParameter("x")
+ If clsTempYLimitsDateParam.clsArgumentCodeStructure IsNot Nothing Then
+ clsCLimitsYDate = clsTempYLimitsDateParam.clsArgumentCodeStructure
+ Else
+ 'TODO move to ggplot defaults
+ clsCLimitsYDate = New RFunction
+ clsCLimitsYDate.SetRCommand("c")
+ clsCLimitsYDate.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYDate.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
+ End If
+ Else
+ clsCLimitsYDate = New RFunction
+ clsCLimitsYDate.SetRCommand("c")
+ clsCLimitsYDate.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYDate.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
End If
ucrPnlYAxisType.SetRCode(clsRaesFunction, bReset, bCloneIfNeeded:=True)
- ucrChkYSpecifyLowerLimit.SetRCode(clsCLimitsYContinuous, bReset, bCloneIfNeeded:=True)
+ 'This is needed to set the R code correctly for ucrChkYSpecifyLowerLimit/ucrChkYSpecifyUpperLimit
+ 'since used by both continuous and date scales
+ If rdoYDate.Checked Then
+ clsCLimitsY = clsCLimitsYDate
+ Else
+ clsCLimitsY = clsCLimitsYContinuous
+ End If
+ ucrChkYSpecifyLowerLimit.SetRCode(clsCLimitsY, bReset, bCloneIfNeeded:=True)
ucrInputYSpecifyLowerLimitNumeric.SetRCode(clsCLimitsYContinuous, bReset, bCloneIfNeeded:=True)
- ucrChkYSpecifyUpperLimit.SetRCode(clsCLimitsYContinuous, bReset, bCloneIfNeeded:=True)
+ ucrChkYSpecifyUpperLimit.SetRCode(clsCLimitsY, bReset, bCloneIfNeeded:=True)
ucrInputYSpecifyUpperLimitNumeric.SetRCode(clsCLimitsYContinuous, bReset, bCloneIfNeeded:=True)
ucrChkSpecifyXAxisTickMarks.SetRCode(clsXScaleContinuousFunction, bReset, bCloneIfNeeded:=True)
@@ -721,46 +794,6 @@ Public Class sdgPICSARainfallGraph
clsXScalecontinuousSeqFunction.SetRCommand("seq")
End If
- ' Limits c() function for y continuous scales
- Dim clsTempYLimitsContinuousParam As RParameter
- If clsYScaleContinuousFunction.ContainsParameter("limits") Then
- clsTempYLimitsContinuousParam = clsYScaleContinuousFunction.GetParameter("limits")
- If clsTempYLimitsContinuousParam.clsArgumentCodeStructure IsNot Nothing Then
- clsCLimitsYContinuous = clsTempYLimitsContinuousParam.clsArgumentCodeStructure
- Else
- 'TODO move to ggplot defaults
- clsCLimitsYContinuous = New RFunction
- clsCLimitsYContinuous.SetRCommand("c")
- clsCLimitsYContinuous.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
- clsCLimitsYContinuous.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
- End If
- Else
- clsCLimitsYContinuous = New RFunction
- clsCLimitsYContinuous.SetRCommand("c")
- clsCLimitsYContinuous.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
- clsCLimitsYContinuous.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
- End If
-
- ' Limits c() function for y date scales
- Dim clsTempYLimitsDateParam As RParameter
- If clsYScaleDateFunction.ContainsParameter("limits") Then
- clsTempYLimitsDateParam = clsYScaleDateFunction.GetParameter("limits")
- If clsTempYLimitsDateParam.clsArgumentCodeStructure IsNot Nothing Then
- clsCLimitsYDate = clsTempYLimitsDateParam.clsArgumentCodeStructure
- Else
- 'TODO move to ggplot defaults
- clsCLimitsYDate = New RFunction
- clsCLimitsYDate.SetRCommand("c")
- clsCLimitsYDate.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
- clsCLimitsYDate.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
- End If
- Else
- clsCLimitsYDate = New RFunction
- clsCLimitsYDate.SetRCommand("c")
- clsCLimitsYDate.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
- clsCLimitsYDate.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
- End If
-
ucrInputXFrom.SetRCode(clsXScalecontinuousSeqFunction, bReset, bCloneIfNeeded:=True)
ucrInputXTo.SetRCode(clsXScalecontinuousSeqFunction, bReset, bCloneIfNeeded:=True)
ucrInputXInStepsOf.SetRCode(clsXScalecontinuousSeqFunction, bReset, bCloneIfNeeded:=True)
@@ -903,6 +936,12 @@ Public Class sdgPICSARainfallGraph
ucrNudLabelTransparency.AddAdditionalCodeParameterPair(clsGeomTextLabelUpperTercileLine, New RParameter("alpha", 4), iAdditionalPairNo:=3)
ucrNudLabelTransparency.SetRCode(clsGeomTextLabelMeanLine, bReset, bCloneIfNeeded:=True)
+ ' Rug Tab
+ 'ucrChkYaxis.SetRCode(clsGeomRug, bReset, bCloneIfNeeded:=True)
+ 'ucrInputYaxisOptions.SetRCode(clsGeomRug, bReset, bCloneIfNeeded:=True)
+ 'ucrChkXaxis.SetRCode(clsGeomRug, bReset, bCloneIfNeeded:=True)
+ 'ucrInputXaxisOptions.SetRCode(clsGeomRug, bReset, bCloneIfNeeded:=True)
+
bRCodeSet = True
AddRemoveTheme()
AddRemoveLabs()
@@ -916,6 +955,7 @@ Public Class sdgPICSARainfallGraph
AddRemoveXAxisScalesContinuous()
AddRemoveYAxisScales()
AddRemoveHline()
+ AddRemoveDateLimits()
SetMeanLabelType()
SetMedianLabelType()
SetTercilesLabelType()
@@ -923,10 +963,12 @@ Public Class sdgPICSARainfallGraph
AddRemoveMinorGridLines()
AddRemovePanelBorder()
AddRemoveDateBreaks()
- ucrNudLowerLimit.Value = 1
- ucrNudUpperLimit.Value = 31
- ucrInputYSpecifyLowerLimitDateMonth.SetName("January")
- ucrInputYSpecifyUpperLimitDateMonth.SetName("December")
+ If bReset Then
+ ucrNudLowerLimit.Value = 1
+ ucrNudUpperLimit.Value = 31
+ ucrInputYSpecifyLowerLimitDateMonth.SetName("January")
+ ucrInputYSpecifyUpperLimitDateMonth.SetName("December")
+ End If
End Sub
Private Sub ucrChkAddMedian_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddMean.ControlValueChanged, ucrChkAddMedian.ControlValueChanged, ucrChkAddTerciles.ControlValueChanged
@@ -1293,38 +1335,48 @@ Public Class sdgPICSARainfallGraph
AddRemoveDateLimits()
End Sub
- Private Sub SetDefault()
- clsYLimitsYDate.AddParameter("min", 1)
- clsYLimitsYDate.AddParameter("max", 31)
- clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsYLimitsYDate)
- clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
- End Sub
-
Private Sub AddRemoveDateLimits()
+ Dim iYear As Integer
+ Dim iYearLower As Integer
+ Dim iYearUpper As Integer
- If rdoYDate.Checked Then
- If ucrChkYSpecifyLowerLimit.Checked AndAlso ucrChkYSpecifyUpperLimit.Checked Then
- clsYLimitsYDate.AddParameter("min", Chr(34) & strLeapYearSelected & "/" & ucrInputYSpecifyLowerLimitDateMonth.GetText & "/" & ucrNudLowerLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0)
- clsYLimitsYDate.AddParameter("max", Chr(34) & strLeapYearSelected & "/" & ucrInputYSpecifyUpperLimitDateMonth.GetText & "/" & ucrNudUpperLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
- clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsYLimitsYDate)
- clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
- ElseIf ucrChkYSpecifyLowerLimit.Checked AndAlso Not ucrChkYSpecifyUpperLimit.Checked Then
- clsYLimitsYDate.AddParameter("min", Chr(34) & strLeapYearSelected & "/" & ucrInputYSpecifyLowerLimitDateMonth.GetText & "/" & ucrNudLowerLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0)
- clsYLimitsYDate.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
- clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsYLimitsYDate)
- clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
- ElseIf Not ucrChkYSpecifyLowerLimit.Checked AndAlso ucrChkYSpecifyUpperLimit.Checked Then
- clsYLimitsYDate.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
- clsYLimitsYDate.AddParameter("max", Chr(34) & strLeapYearSelected & "/" & ucrInputYSpecifyUpperLimitDateMonth.GetText & "/" & ucrNudUpperLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
- clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsYLimitsYDate)
- clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
- Else
- clsYScaleDateFunction.RemoveParameterByName("limits")
- clsYLimitsYDate.RemoveParameterByName("min")
- clsYLimitsYDate.RemoveParameterByName("max")
- End If
+ If ucrInputStartMonth.GetText() = "January" OrElse ucrInputStartMonth.GetText() = "February" Then
+ iYear = 2016
+ Else
+ iYear = 2015
+ End If
+ iYearLower = iYear
+ iYearUpper = iYear
+
+ If ucrInputYSpecifyLowerLimitDateMonth.cboInput.SelectedIndex < ucrInputStartMonth.cboInput.SelectedIndex Then
+ iYearLower = iYear + 1
+ End If
+ If ucrInputYSpecifyUpperLimitDateMonth.cboInput.SelectedIndex < ucrInputStartMonth.cboInput.SelectedIndex Then
+ iYearUpper = iYear + 1
End If
+ If bRCodeSet Then
+ If rdoYDate.Checked Then
+ If ucrChkYSpecifyLowerLimit.Checked AndAlso ucrChkYSpecifyUpperLimit.Checked Then
+ clsCLimitsYDate.AddParameter("lowerlimit", Chr(34) & iYearLower & "/" & ucrInputYSpecifyLowerLimitDateMonth.GetText & "/" & ucrNudLowerLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYDate.AddParameter("upperlimit", Chr(34) & iYearUpper & "/" & ucrInputYSpecifyUpperLimitDateMonth.GetText & "/" & ucrNudUpperLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
+ clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsCLimitsYDate)
+ clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
+ ElseIf ucrChkYSpecifyLowerLimit.Checked AndAlso Not ucrChkYSpecifyUpperLimit.Checked Then
+ clsCLimitsYDate.AddParameter("lowerlimit", Chr(34) & iYearLower & "/" & ucrInputYSpecifyLowerLimitDateMonth.GetText & "/" & ucrNudLowerLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYDate.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
+ clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsCLimitsYDate)
+ clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
+ ElseIf Not ucrChkYSpecifyLowerLimit.Checked AndAlso ucrChkYSpecifyUpperLimit.Checked Then
+ clsCLimitsYDate.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYDate.AddParameter("upperlimit", Chr(34) & iYearUpper & "/" & ucrInputYSpecifyUpperLimitDateMonth.GetText & "/" & ucrNudUpperLimit.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=1)
+ clsAsDateYLimit.AddParameter("x", clsRFunctionParameter:=clsCLimitsYDate)
+ clsYScaleDateFunction.AddParameter("limits", clsRFunctionParameter:=clsAsDateYLimit, iPosition:=0)
+ Else
+ clsYScaleDateFunction.RemoveParameterByName("limits")
+ End If
+ End If
+ End If
End Sub
@@ -1357,9 +1409,6 @@ Public Class sdgPICSARainfallGraph
If ucrChkYSpecifyUpperLimit.Checked Then
ucrInputYSpecifyUpperLimitNumeric.Visible = True
End If
-
-
-
End If
End Sub
@@ -1367,10 +1416,10 @@ Public Class sdgPICSARainfallGraph
Private Sub ucrYLimitControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkYSpecifyLowerLimit.ControlValueChanged, ucrChkYSpecifyUpperLimit.ControlValueChanged, ucrInputYSpecifyLowerLimitNumeric.ControlValueChanged, ucrInputYSpecifyUpperLimitNumeric.ControlValueChanged
If bRCodeSet Then
If Not ucrChkYSpecifyLowerLimit.Checked Then
- clsCLimitsYContinuous.AddParameter("min", "NA", bIncludeArgumentName:=False, iPosition:=0)
+ clsCLimitsYContinuous.AddParameter("lowerlimit", "NA", bIncludeArgumentName:=False, iPosition:=0)
End If
If Not ucrChkYSpecifyUpperLimit.Checked Then
- clsCLimitsYContinuous.AddParameter("max", "NA", bIncludeArgumentName:=False, iPosition:=1)
+ clsCLimitsYContinuous.AddParameter("upperlimit", "NA", bIncludeArgumentName:=False, iPosition:=1)
End If
AddRemoveYLimits()
End If
@@ -1478,4 +1527,20 @@ Public Class sdgPICSARainfallGraph
End If
End If
End Sub
+
+ Private Sub ucrInputYaxisOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputYaxisOptions.ControlValueChanged
+ AddRemoveRugPlot()
+ End Sub
+
+ Private Sub AddRemoveRugPlot()
+ 'If ucrChkYaxis.Checked Or ucrChkXaxis.Checked Then
+ ' clsBaseOperator.AddParameter("sides", clsRFunctionParameter:=clsGeomRug)
+ 'End If
+ End Sub
+
+ Private Sub ucrInputStartMonth_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputStartMonth.ControlValueChanged
+ If bRCodeSet Then
+ AddRemoveDateLimits()
+ End If
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/sdgPlots.Designer.vb b/instat/sdgPlots.Designer.vb
index 3b3fbdc06c3..22cd01af12a 100644
--- a/instat/sdgPlots.Designer.vb
+++ b/instat/sdgPlots.Designer.vb
@@ -97,6 +97,14 @@ Partial Class sdgPlots
Me.cmdAllOptions = New System.Windows.Forms.Button()
Me.ucrInputThemes = New instat.ucrInputComboBox()
Me.tbpCoordinates = New System.Windows.Forms.TabPage()
+ Me.grpPolarCordinates = New System.Windows.Forms.GroupBox()
+ Me.ucrInputPolarCoordinates = New instat.ucrInputComboBox()
+ Me.lblPolarCoordinate = New System.Windows.Forms.Label()
+ Me.lblStartingAngle = New System.Windows.Forms.Label()
+ Me.ucrChkUsePolarCoordinates = New instat.ucrCheck()
+ Me.lblPi = New System.Windows.Forms.Label()
+ Me.ucrChkDirectionAnticlockwise = New instat.ucrCheck()
+ Me.ucrInputStartingAngle = New instat.ucrInputTextBox()
Me.ucrChkSameScale = New instat.ucrCheck()
Me.ucrChkHorizontalPlot = New instat.ucrCheck()
Me.ucrBaseSubdialog = New instat.ucrButtonsSubdialogue()
@@ -110,6 +118,7 @@ Partial Class sdgPlots
Me.tbpTheme.SuspendLayout()
Me.grpCommonOptions.SuspendLayout()
Me.tbpCoordinates.SuspendLayout()
+ Me.grpPolarCordinates.SuspendLayout()
Me.SuspendLayout()
'
'tbpPlotsOptions
@@ -555,12 +564,69 @@ Partial Class sdgPlots
'
'tbpCoordinates
'
+ Me.tbpCoordinates.Controls.Add(Me.grpPolarCordinates)
Me.tbpCoordinates.Controls.Add(Me.ucrChkSameScale)
Me.tbpCoordinates.Controls.Add(Me.ucrChkHorizontalPlot)
resources.ApplyResources(Me.tbpCoordinates, "tbpCoordinates")
Me.tbpCoordinates.Name = "tbpCoordinates"
Me.tbpCoordinates.UseVisualStyleBackColor = True
'
+ 'grpPolarCordinates
+ '
+ Me.grpPolarCordinates.Controls.Add(Me.ucrInputPolarCoordinates)
+ Me.grpPolarCordinates.Controls.Add(Me.lblPolarCoordinate)
+ Me.grpPolarCordinates.Controls.Add(Me.lblStartingAngle)
+ Me.grpPolarCordinates.Controls.Add(Me.ucrChkUsePolarCoordinates)
+ Me.grpPolarCordinates.Controls.Add(Me.lblPi)
+ Me.grpPolarCordinates.Controls.Add(Me.ucrChkDirectionAnticlockwise)
+ Me.grpPolarCordinates.Controls.Add(Me.ucrInputStartingAngle)
+ resources.ApplyResources(Me.grpPolarCordinates, "grpPolarCordinates")
+ Me.grpPolarCordinates.Name = "grpPolarCordinates"
+ Me.grpPolarCordinates.TabStop = False
+ '
+ 'ucrInputPolarCoordinates
+ '
+ Me.ucrInputPolarCoordinates.AddQuotesIfUnrecognised = True
+ Me.ucrInputPolarCoordinates.IsReadOnly = False
+ resources.ApplyResources(Me.ucrInputPolarCoordinates, "ucrInputPolarCoordinates")
+ Me.ucrInputPolarCoordinates.Name = "ucrInputPolarCoordinates"
+ '
+ 'lblPolarCoordinate
+ '
+ resources.ApplyResources(Me.lblPolarCoordinate, "lblPolarCoordinate")
+ Me.lblPolarCoordinate.Name = "lblPolarCoordinate"
+ '
+ 'lblStartingAngle
+ '
+ resources.ApplyResources(Me.lblStartingAngle, "lblStartingAngle")
+ Me.lblStartingAngle.Name = "lblStartingAngle"
+ '
+ 'ucrChkUsePolarCoordinates
+ '
+ Me.ucrChkUsePolarCoordinates.Checked = False
+ resources.ApplyResources(Me.ucrChkUsePolarCoordinates, "ucrChkUsePolarCoordinates")
+ Me.ucrChkUsePolarCoordinates.Name = "ucrChkUsePolarCoordinates"
+ '
+ 'lblPi
+ '
+ resources.ApplyResources(Me.lblPi, "lblPi")
+ Me.lblPi.Name = "lblPi"
+ Me.lblPi.Tag = ""
+ '
+ 'ucrChkDirectionAnticlockwise
+ '
+ Me.ucrChkDirectionAnticlockwise.Checked = False
+ resources.ApplyResources(Me.ucrChkDirectionAnticlockwise, "ucrChkDirectionAnticlockwise")
+ Me.ucrChkDirectionAnticlockwise.Name = "ucrChkDirectionAnticlockwise"
+ '
+ 'ucrInputStartingAngle
+ '
+ Me.ucrInputStartingAngle.AddQuotesIfUnrecognised = True
+ Me.ucrInputStartingAngle.IsMultiline = False
+ Me.ucrInputStartingAngle.IsReadOnly = False
+ resources.ApplyResources(Me.ucrInputStartingAngle, "ucrInputStartingAngle")
+ Me.ucrInputStartingAngle.Name = "ucrInputStartingAngle"
+ '
'ucrChkSameScale
'
Me.ucrChkSameScale.Checked = False
@@ -603,6 +669,8 @@ Partial Class sdgPlots
Me.tbpTheme.PerformLayout()
Me.grpCommonOptions.ResumeLayout(False)
Me.tbpCoordinates.ResumeLayout(False)
+ Me.grpPolarCordinates.ResumeLayout(False)
+ Me.grpPolarCordinates.PerformLayout()
Me.ResumeLayout(False)
End Sub
@@ -670,6 +738,14 @@ Partial Class sdgPlots
Friend WithEvents ucrChkLabeler As ucrCheck
Friend WithEvents cmdSimpleOptions As Button
Friend WithEvents ucrChkSameScale As ucrCheck
+ Friend WithEvents ucrChkUsePolarCoordinates As ucrCheck
+ Friend WithEvents ucrChkDirectionAnticlockwise As ucrCheck
+ Friend WithEvents ucrInputStartingAngle As ucrInputTextBox
+ Friend WithEvents lblPi As Label
+ Friend WithEvents grpPolarCordinates As GroupBox
+ Friend WithEvents lblStartingAngle As Label
+ Friend WithEvents ucrInputPolarCoordinates As ucrInputComboBox
+ Friend WithEvents lblPolarCoordinate As Label
End Class
diff --git a/instat/sdgPlots.resx b/instat/sdgPlots.resx
index 4757a9bb2c9..9113f5adf66 100644
--- a/instat/sdgPlots.resx
+++ b/instat/sdgPlots.resx
@@ -117,6 +117,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 169, 252
+
+
+ 46, 20
+
+
+
+ 31
+
ucrNudNumberofRows
@@ -129,6 +140,15 @@
0
+
+ 7, 254
+
+
+ 156, 20
+
+
+ 29
+
ucrChkNoOfRowsOrColumns
@@ -141,6 +161,15 @@
1
+
+ 8, 13
+
+
+ 121, 20
+
+
+ 28
+
ucrChkIncludeFacets
@@ -153,6 +182,15 @@
2
+
+ 273, 278
+
+
+ 220, 20
+
+
+ 27
+
ucrChkLabeler
@@ -165,6 +203,15 @@
3
+
+ 273, 252
+
+
+ 100, 20
+
+
+ 27
+
ucrChkFreeSpace
@@ -177,6 +224,15 @@
4
+
+ 273, 229
+
+
+ 100, 20
+
+
+ 26
+
ucrChkFreeScalesY
@@ -189,6 +245,15 @@
5
+
+ 273, 206
+
+
+ 100, 20
+
+
+ 25
+
ucrChkFreeScalesX
@@ -201,6 +266,15 @@
6
+
+ 273, 183
+
+
+ 100, 20
+
+
+ 24
+
ucrChkMargin
@@ -213,6 +287,19 @@
7
+
+ 8, 36
+
+
+
+ 0, 0, 0, 0
+
+
+ 210, 180
+
+
+ 20
+
ucrFacetSelector
@@ -225,6 +312,24 @@
8
+
+ True
+
+
+ NoControl
+
+
+ 8, 230
+
+
+ 72, 17
+
+
+ 7
+
+
+ Horizontal
+
rdoHorizontal
@@ -237,6 +342,24 @@
9
+
+ True
+
+
+ NoControl
+
+
+ 104, 230
+
+
+ 60, 17
+
+
+ 6
+
+
+ Vertical
+
rdoVertical
@@ -249,6 +372,24 @@
10
+
+ True
+
+
+ NoControl
+
+
+ 274, 133
+
+
+ 109, 13
+
+
+ 4
+
+
+ 2nd Factor (Optional):
+
lblFactor2
@@ -261,6 +402,24 @@
11
+
+ True
+
+
+ NoControl
+
+
+ 272, 78
+
+
+ 57, 13
+
+
+ 3
+
+
+ 1st Factor:
+
lblFactor1
@@ -273,6 +432,18 @@
12
+
+ 273, 148
+
+
+ 0, 0, 0, 0
+
+
+ 106, 26
+
+
+ 2
+
ucr2ndFactorReceiver
@@ -285,6 +456,18 @@
13
+
+ 273, 93
+
+
+ 0, 0, 0, 0
+
+
+ 106, 26
+
+
+ 1
+
ucr1stFactorReceiver
@@ -297,6 +480,15 @@
14
+
+ 8, 228
+
+
+ 165, 20
+
+
+ 30
+
ucrPnlHorizonatalVertical
@@ -309,18 +501,15 @@
15
-
4, 22
-
3, 3, 3, 3
499, 330
-
3
@@ -339,6 +528,15 @@
0
+
+ 7, 6
+
+
+ 218, 191
+
+
+ 0
+
ucrPlotsAdditionalLayers
@@ -378,6 +576,24 @@
1
+
+ True
+
+
+ NoControl
+
+
+ 6, 68
+
+
+ 78, 13
+
+
+ 10
+
+
+ Graph Caption:
+
lblCaption
@@ -390,6 +606,24 @@
0
+
+ True
+
+
+ NoControl
+
+
+ 6, 41
+
+
+ 84, 13
+
+
+ 10
+
+
+ Graph Sub Title:
+
lblSubTitle
@@ -402,17 +636,194 @@
1
-
- Label1
+
+ True
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ NoControl
-
- tbpTitles
+
+ 7, 17
-
- 2
+
+ 62, 13
+
+
+ 10
+
+
+ Graph Title:
+
+
+ Label1
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tbpTitles
+
+
+ 2
+
+
+ 6, 75
+
+
+ 100, 20
+
+
+ 14
+
+
+ ucrChkOverwriteLegendTitle
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpLegendTitle
+
+
+ 0
+
+
+ 6, 51
+
+
+ 100, 20
+
+
+ 13
+
+
+ ucrChkDisplayLegendTitle
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpLegendTitle
+
+
+ 1
+
+
+ 133, 74
+
+
+ 160, 21
+
+
+ 11
+
+
+ ucrInputLegend
+
+
+ instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpLegendTitle
+
+
+ 2
+
+
+ True
+
+
+ NoControl
+
+
+ 73, 23
+
+
+ 60, 17
+
+
+ 10
+
+
+ Custom
+
+
+ rdoLegendTitleCustom
+
+
+ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpLegendTitle
+
+
+ 3
+
+
+ True
+
+
+ NoControl
+
+
+ 6, 23
+
+
+ 47, 17
+
+
+ 9
+
+
+ Auto
+
+
+ rdoLegendTitleAuto
+
+
+ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpLegendTitle
+
+
+ 4
+
+
+ 4, 20
+
+
+ 117, 25
+
+
+ 12
+
+
+ ucrPnlLegendTitle
+
+
+ instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpLegendTitle
+
+
+ 5
+
+
+ 10, 171
+
+
+ 299, 105
+
+
+ 8
+
+
+ Legend Title
+
+
+ False
grpLegendTitle
@@ -426,6 +837,15 @@
3
+
+ 126, 71
+
+
+ 166, 21
+
+
+ 9
+
ucrInputGraphCaption
@@ -438,6 +858,15 @@
4
+
+ 126, 44
+
+
+ 166, 21
+
+
+ 9
+
ucrInputGraphSubTitle
@@ -450,6 +879,15 @@
5
+
+ 126, 17
+
+
+ 166, 21
+
+
+ 9
+
ucrInputGraphTitle
@@ -489,6 +927,15 @@
2
+
+ 0, 1
+
+
+ 512, 322
+
+
+ 0
+
ucrXAxis
@@ -528,6 +975,15 @@
3
+
+ 0, 1
+
+
+ 496, 329
+
+
+ 0
+
ucrYAxis
@@ -567,6 +1023,21 @@
4
+
+ NoControl
+
+
+ 113, 48
+
+
+ 92, 23
+
+
+ 107
+
+
+ Simple Options
+
cmdSimpleOptions
@@ -576,1241 +1047,29 @@
tbpTheme
-
- 0
-
-
- urChkSelectTheme
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpTheme
-
-
- 1
-
-
- grpCommonOptions
-
-
- System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTheme
-
-
- 2
-
-
- lblFont
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTheme
-
-
- 3
-
-
- cmdAllOptions
-
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTheme
-
-
- 4
-
-
- ucrInputThemes
-
-
- instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpTheme
-
-
- 5
-
-
- 4, 22
-
-
- 3, 3, 3, 3
-
-
- 499, 330
-
-
- 1
-
-
- Themes
-
-
- tbpTheme
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpPlotsOptions
-
-
- 5
-
-
- 7, 41
-
-
- 233, 20
-
-
- 15
-
-
- ucrChkSameScale
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpCoordinates
-
-
- 0
-
-
- 7, 15
-
-
- 233, 20
-
-
- 14
-
-
- ucrChkHorizontalPlot
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpCoordinates
-
-
- 1
-
-
- 4, 22
-
-
- 3, 3, 3, 3
-
-
- 499, 330
-
-
- 7
-
-
- Coordinates
-
-
- tbpCoordinates
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpPlotsOptions
-
-
- 6
-
-
- 1, 3
-
-
- 507, 356
-
-
- 0
-
-
- tbpPlotsOptions
-
-
- System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 1
-
-
- 169, 252
-
-
- 46, 20
-
-
- 31
-
-
- ucrNudNumberofRows
-
-
- instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 0
-
-
- 7, 254
-
-
- 156, 20
-
-
- 29
-
-
- ucrChkNoOfRowsOrColumns
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 1
-
-
- 8, 13
-
-
- 121, 20
-
-
- 28
-
-
- ucrChkIncludeFacets
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 2
-
-
- 273, 278
-
-
- 220, 20
-
-
- 27
-
-
- ucrChkLabeler
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 3
-
-
- 273, 252
-
-
- 100, 20
-
-
- 27
-
-
- ucrChkFreeSpace
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 4
-
-
- 273, 229
-
-
- 100, 20
-
-
- 26
-
-
- ucrChkFreeScalesY
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 5
-
-
- 273, 206
-
-
- 100, 20
-
-
- 25
-
-
- ucrChkFreeScalesX
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 6
-
-
- 273, 183
-
-
- 100, 20
-
-
- 24
-
-
- ucrChkMargin
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 7
-
-
- 8, 36
-
-
- 0, 0, 0, 0
-
-
- 210, 180
-
-
- 20
-
-
- ucrFacetSelector
-
-
- instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 8
-
-
- True
-
-
- NoControl
-
-
- 8, 230
-
-
- 72, 17
-
-
- 7
-
-
- Horizontal
-
-
- rdoHorizontal
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpFacet
-
-
- 9
-
-
- True
-
-
- NoControl
-
-
- 104, 230
-
-
- 60, 17
-
-
- 6
-
-
- Vertical
-
-
- rdoVertical
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpFacet
-
-
- 10
-
-
- True
-
-
- NoControl
-
-
- 274, 133
-
-
- 109, 13
-
-
- 4
-
-
- 2nd Factor (Optional):
-
-
- lblFactor2
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpFacet
-
-
- 11
-
-
- True
-
-
- NoControl
-
-
- 272, 78
-
-
- 57, 13
-
-
- 3
-
-
- 1st Factor:
-
-
- lblFactor1
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpFacet
-
-
- 12
-
-
- 273, 148
-
-
- 0, 0, 0, 0
-
-
- 106, 26
-
-
- 2
-
-
- ucr2ndFactorReceiver
-
-
- instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 13
-
-
- 273, 93
-
-
- 0, 0, 0, 0
-
-
- 106, 26
-
-
- 1
-
-
- ucr1stFactorReceiver
-
-
- instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 14
-
-
- 8, 228
-
-
- 165, 20
-
-
- 30
-
-
- ucrPnlHorizonatalVertical
-
-
- instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpFacet
-
-
- 15
-
-
- 7, 6
-
-
- 218, 191
-
-
- 0
-
-
- ucrPlotsAdditionalLayers
-
-
- instat.ucrAdditionalLayers, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpLayers
-
-
- 0
-
-
- True
-
-
- NoControl
-
-
- 6, 68
-
-
- 78, 13
-
-
- 10
-
-
- Graph Caption:
-
-
- lblCaption
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTitles
-
-
- 0
-
-
- True
-
-
- NoControl
-
-
- 6, 41
-
-
- 84, 13
-
-
- 10
-
-
- Graph Sub Title:
-
-
- lblSubTitle
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTitles
-
-
- 1
-
-
- True
-
-
- NoControl
-
-
- 7, 17
-
-
- 62, 13
-
-
- 10
-
-
- Graph Title:
-
-
- Label1
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTitles
-
-
- 2
-
-
- ucrChkOverwriteLegendTitle
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 0
-
-
- ucrChkDisplayLegendTitle
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 1
-
-
- ucrInputLegend
-
-
- instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 2
-
-
- rdoLegendTitleCustom
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpLegendTitle
-
-
- 3
-
-
- rdoLegendTitleAuto
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpLegendTitle
-
-
- 4
-
-
- ucrPnlLegendTitle
-
-
- instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 5
-
-
- 10, 171
-
-
- 299, 105
-
-
- 8
-
-
- Legend Title
-
-
- False
-
-
- grpLegendTitle
-
-
- System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTitles
-
-
- 3
-
-
- 6, 75
-
-
- 100, 20
-
-
- 14
-
-
- ucrChkOverwriteLegendTitle
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 0
-
-
- 6, 51
-
-
- 100, 20
-
-
- 13
-
-
- ucrChkDisplayLegendTitle
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 1
-
-
- 133, 74
-
-
- 160, 21
-
-
- 11
-
-
- ucrInputLegend
-
-
- instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 2
-
-
- True
-
-
- NoControl
-
-
- 73, 23
-
-
- 60, 17
-
-
- 10
-
-
- Custom
-
-
- rdoLegendTitleCustom
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpLegendTitle
-
-
- 3
-
-
- True
-
-
- NoControl
-
-
- 6, 23
-
-
- 47, 17
-
-
- 9
-
-
- Auto
-
-
- rdoLegendTitleAuto
-
-
- System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpLegendTitle
-
-
- 4
-
-
- 4, 20
-
-
- 117, 25
-
-
- 12
-
-
- ucrPnlLegendTitle
-
-
- instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpLegendTitle
-
-
- 5
-
-
- 126, 71
-
-
- 166, 21
-
-
- 9
-
-
- ucrInputGraphCaption
-
-
- instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpTitles
-
-
- 4
-
-
- 126, 44
-
-
- 166, 21
-
-
- 9
-
-
- ucrInputGraphSubTitle
-
-
- instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpTitles
-
-
- 5
-
-
- 126, 17
-
-
- 166, 21
-
-
- 9
-
-
- ucrInputGraphTitle
-
-
- instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpTitles
-
-
- 6
-
-
- 0, 1
-
-
- 512, 322
-
-
- 0
-
-
- ucrXAxis
-
-
- instat.ucrAxes, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpXAxis
-
-
- 0
-
-
- 0, 1
-
-
- 496, 329
-
-
- 0
-
-
- ucrYAxis
-
-
- instat.ucrAxes, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpYAxis
-
-
- 0
-
-
- NoControl
-
-
- 113, 48
-
-
- 92, 23
-
-
- 107
-
-
- Simple Options
-
-
- cmdSimpleOptions
-
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tbpTheme
-
-
- 0
-
-
- 6, 19
-
-
- 97, 20
-
-
- 106
-
-
- urChkSelectTheme
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- tbpTheme
-
-
- 1
-
-
- ucrNudYaxisMarkSize
-
-
- instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 0
-
-
- ucrNudXaxisMarkSize
-
-
- instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 1
-
-
- ucrNudYSize
-
-
- instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 2
-
-
- ucrNudXSize
-
-
- instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 3
-
-
- ucrNudXAngle
-
-
- instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 4
-
-
- ucrInputLegendPosition
-
-
- instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 5
-
-
- ucrChkYaxisTickMarkLabelSize
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 6
-
-
- ucrChkXaxisTickMarkLabelSize
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 7
-
-
- ucrChkYaxisSize
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 8
-
-
- ucrChkXaxisSize
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 9
-
-
- ucrChkXaxisAngle
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 10
-
-
- ucrChkLegendPosition
-
-
- instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
-
- grpCommonOptions
-
-
- 11
-
-
- 7, 81
-
-
- 455, 243
+
+ 0
-
- 5
+
+ 6, 19
-
- Common Options
+
+ 97, 20
-
- grpCommonOptions
+
+ 106
-
- System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ urChkSelectTheme
-
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
tbpTheme
-
- 2
+
+ 1
246, 205
@@ -2064,6 +1323,30 @@
11
+
+ 7, 81
+
+
+ 455, 243
+
+
+ 5
+
+
+ Common Options
+
+
+ grpCommonOptions
+
+
+ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tbpTheme
+
+
+ 2
+
True
@@ -2139,6 +1422,318 @@
5
+
+ 4, 22
+
+
+ 3, 3, 3, 3
+
+
+ 499, 330
+
+
+ 1
+
+
+ Themes
+
+
+ tbpTheme
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tbpPlotsOptions
+
+
+ 5
+
+
+ 103, 43
+
+
+ 65, 21
+
+
+ 24
+
+
+ ucrInputPolarCoordinates
+
+
+ instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpPolarCordinates
+
+
+ 0
+
+
+ True
+
+
+ NoControl
+
+
+ 10, 46
+
+
+ 88, 13
+
+
+ 23
+
+
+ Polar Coordinate:
+
+
+ lblPolarCoordinate
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpPolarCordinates
+
+
+ 1
+
+
+ True
+
+
+ 10, 99
+
+
+ 76, 13
+
+
+ 22
+
+
+ Starting Angle:
+
+
+ lblStartingAngle
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpPolarCordinates
+
+
+ 2
+
+
+ 12, 19
+
+
+ 147, 20
+
+
+ 16
+
+
+ ucrChkUsePolarCoordinates
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpPolarCordinates
+
+
+ 3
+
+
+ True
+
+
+ NoControl
+
+
+ 138, 100
+
+
+ 15, 13
+
+
+ 21
+
+
+ pi
+
+
+ lblPi
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpPolarCordinates
+
+
+ 4
+
+
+ 12, 70
+
+
+ 155, 20
+
+
+ 17
+
+
+ ucrChkDirectionAnticlockwise
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpPolarCordinates
+
+
+ 5
+
+
+ 92, 95
+
+
+ 43, 21
+
+
+ 19
+
+
+ ucrInputStartingAngle
+
+
+ instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ grpPolarCordinates
+
+
+ 6
+
+
+ 3, 67
+
+
+ 300, 136
+
+
+ 22
+
+
+ Polar Cordinates
+
+
+ grpPolarCordinates
+
+
+ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tbpCoordinates
+
+
+ 0
+
+
+ 13, 41
+
+
+ 233, 20
+
+
+ 15
+
+
+ ucrChkSameScale
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ tbpCoordinates
+
+
+ 1
+
+
+ 13, 15
+
+
+ 233, 20
+
+
+ 14
+
+
+ ucrChkHorizontalPlot
+
+
+ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
+
+ tbpCoordinates
+
+
+ 2
+
+
+ 4, 22
+
+
+ 3, 3, 3, 3
+
+
+ 499, 330
+
+
+ 7
+
+
+ Coordinates
+
+
+ tbpCoordinates
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tbpPlotsOptions
+
+
+ 6
+
+
+ 1, 3
+
+
+ 507, 356
+
+
+ 0
+
+
+ tbpPlotsOptions
+
+
+ System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 1
+
164, 365
diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb
index d7cfef70856..9fdb097129f 100644
--- a/instat/sdgPlots.vb
+++ b/instat/sdgPlots.vb
@@ -54,8 +54,14 @@ Public Class sdgPlots
Private clsYElemetText As New RFunction
Private clsYElemetTitle As New RFunction
+ 'Polar Coordinates
+ Private clsCoordPolarFunc As New RFunction
+ Private clsCoordPolarStartOperator As New ROperator
+
'See bLayersDefaultIsGolobal below.
+ Private dctTheta As New Dictionary(Of String, String)
+
Private Sub sdgPlots_Load(sender As Object, e As EventArgs)
autoTranslate(Me)
End Sub
@@ -223,7 +229,6 @@ Public Class sdgPlots
ucrChkHorizontalPlot.SetParameter(clsCoordFlipParam, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True)
ucrChkHorizontalPlot.AddParameterPresentCondition(True, "coord_flip", True)
-
ucrChkSameScale.SetText("Same Scale (coord-equal)")
clsCoordEqualFunc.SetPackageName("ggplot2")
clsCoordEqualFunc.SetRCommand("coord_equal")
@@ -255,6 +260,32 @@ Public Class sdgPlots
ucrChkLegendPosition.AddParameterPresentCondition(True, "legend.position")
ucrChkLegendPosition.AddParameterPresentCondition(False, "legend.position", False)
+ 'Polar Coordinates
+ ucrChkUsePolarCoordinates.SetText("Polar Coordinates")
+ ucrChkUsePolarCoordinates.AddParameterPresentCondition(True, "coord_polar")
+ ucrChkUsePolarCoordinates.AddParameterPresentCondition(False, "coord_polar", False)
+ ucrChkUsePolarCoordinates.AddToLinkedControls({ucrChkDirectionAnticlockwise, ucrInputStartingAngle}, {True}, bNewLinkedHideIfParameterMissing:=True)
+ ucrChkUsePolarCoordinates.AddToLinkedControls({ucrInputPolarCoordinates}, {True}, bNewLinkedHideIfParameterMissing:=True)
+
+ ucrChkDirectionAnticlockwise.SetText("Anticlockwise Direction")
+ ucrChkDirectionAnticlockwise.SetParameter(New RParameter("direction"), bNewChangeParameterValue:=True, strNewValueIfChecked:="-1", strNewValueIfUnchecked:="1")
+ ucrChkDirectionAnticlockwise.SetRDefault("1")
+
+ ucrInputStartingAngle.SetParameter(New RParameter("0", iNewPosition:=0))
+ ucrInputStartingAngle.SetValidationTypeAsNumeric()
+ ucrInputStartingAngle.AddQuotesIfUnrecognised = False
+ ucrInputStartingAngle.SetLinkedDisplayControl(New List(Of Control)({lblPi, lblStartingAngle}))
+
+
+ dctTheta.Add("x", Chr(34) & "x" & Chr(34))
+ dctTheta.Add("y", Chr(34) & "y" & Chr(34))
+ ucrInputPolarCoordinates.SetParameter(New RParameter("theta", iNewPosition:=1))
+ ucrInputPolarCoordinates.SetLinkedDisplayControl(lblPolarCoordinate)
+ ucrInputPolarCoordinates.SetItems(dctTheta)
+ ucrInputPolarCoordinates.SetDropDownStyleAsNonEditable()
+ ucrInputPolarCoordinates.SetRDefault(Chr(34) & "x" & Chr(34))
+
+
ucrChkXaxisAngle.SetText("X axis Tick Labels Angle")
ucrChkXaxisAngle.AddToLinkedControls(ucrNudXAngle, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=10, bNewLinkedChangeParameterValue:=True)
ucrNudXAngle.SetParameter(New RParameter("angle"))
@@ -294,7 +325,7 @@ Public Class sdgPlots
ucrChkYaxisTickMarkLabelSize.AddParameterPresentCondition(False, "size", False)
End Sub
- Public Sub SetRCode(clsNewOperator As ROperator, Optional clsNewGlobalAesFunction As RFunction = Nothing, Optional clsNewYScalecontinuousFunction As RFunction = Nothing, Optional clsNewXScalecontinuousFunction As RFunction = Nothing, Optional clsNewLabsFunction As RFunction = Nothing, Optional clsNewXLabsTitleFunction As RFunction = Nothing, Optional clsNewYLabTitleFunction As RFunction = Nothing, Optional clsNewFacetFunction As RFunction = Nothing, Optional clsNewThemeFunction As RFunction = Nothing, Optional dctNewThemeFunctions As Dictionary(Of String, RFunction) = Nothing, Optional ucrNewBaseSelector As ucrSelector = Nothing, Optional strMainDialogGeomParameterNames() As String = Nothing, Optional bReset As Boolean = False)
+ Public Sub SetRCode(clsNewOperator As ROperator, Optional clsNewGlobalAesFunction As RFunction = Nothing, Optional clsNewYScalecontinuousFunction As RFunction = Nothing, Optional clsNewXScalecontinuousFunction As RFunction = Nothing, Optional clsNewLabsFunction As RFunction = Nothing, Optional clsNewXLabsTitleFunction As RFunction = Nothing, Optional clsNewYLabTitleFunction As RFunction = Nothing, Optional clsNewFacetFunction As RFunction = Nothing, Optional clsNewThemeFunction As RFunction = Nothing, Optional clsNewCoordPolarFunction As RFunction = Nothing, Optional clsNewCoordPolarStartOperator As ROperator = Nothing, Optional dctNewThemeFunctions As Dictionary(Of String, RFunction) = Nothing, Optional ucrNewBaseSelector As ucrSelector = Nothing, Optional strMainDialogGeomParameterNames() As String = Nothing, Optional bReset As Boolean = False)
Dim clsTempParam As RParameter
bRCodeSet = False
@@ -316,8 +347,10 @@ Public Class sdgPlots
clsYScalecontinuousFunction = clsNewYScalecontinuousFunction
clsFacetFunction = clsNewFacetFunction
clsThemeFunction = clsNewThemeFunction
+ clsCoordPolarFunc = clsNewCoordPolarFunction
+ clsCoordPolarStartOperator = clsNewCoordPolarStartOperator
+ clsCoordPolarFunc.AddParameter("start", clsROperatorParameter:=clsCoordPolarStartOperator, iPosition:=1)
dctThemeFunctions = dctNewThemeFunctions
-
dctThemeFunctions.TryGetValue("axis.text.x", clsXElementText)
dctThemeFunctions.TryGetValue("axis.title.x", clsXElementTitle)
dctThemeFunctions.TryGetValue("axis.text.y", clsYElemetText)
@@ -374,6 +407,10 @@ Public Class sdgPlots
'coordinates tab
ucrChkHorizontalPlot.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True)
ucrChkSameScale.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True)
+ ucrChkUsePolarCoordinates.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True)
+ ucrChkDirectionAnticlockwise.SetRCode(clsCoordPolarFunc, bReset:=True, bCloneIfNeeded:=True)
+ ucrInputStartingAngle.SetRCode(clsCoordPolarStartOperator, bReset, bCloneIfNeeded:=True)
+ ucrInputPolarCoordinates.SetRCode(clsCoordPolarFunc, bReset:=True, bCloneIfNeeded:=True)
ucrPlotsAdditionalLayers.SetRCodeForControl(clsNewBaseOperator:=clsBaseOperator, clsRNewggplotFunc:=clsRggplotFunction, clsNewAesFunc:=clsGlobalAesFunction, strNewGlobalDataFrame:=strDataFrame, strMainDialogGeomParameterNames:=strMainDialogGeomParameterNames, bReset:=bReset)
bRCodeSet = True
@@ -609,13 +646,13 @@ Public Class sdgPlots
If clsGlobalAesFunction.ContainsParameter(strAes) AndAlso clsGlobalAesFunction.GetParameter(strAes).strArgumentValue <> Chr(34) & Chr(34) Then
'Run R code to determine type
'Temp default to continuous
- Return "Continuous"
+ Return "continuous"
Else
'When aes not present discrete scale function works
- Return "Discrete"
+ Return "discrete"
End If
Else
- Return "Discrete"
+ Return "discrete"
End If
End Function
@@ -727,4 +764,11 @@ Public Class sdgPlots
sdgThemesSub.ShowDialog()
SetRcodeForCommonThemesControls(False)
End Sub
+ Private Sub ucrChkUsePolarCoordinates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkUsePolarCoordinates.ControlValueChanged
+ If ucrChkUsePolarCoordinates.Checked Then
+ clsBaseOperator.AddParameter("coord_polar", clsRFunctionParameter:=clsCoordPolarFunc, iPosition:=20)
+ Else
+ clsBaseOperator.RemoveParameterByName("coord_polar")
+ End If
+ End Sub
End Class
\ No newline at end of file
diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R
index 8e0c3b86ab6..08d9a76870b 100644
--- a/instat/static/InstatObject/R/data_object_R6.R
+++ b/instat/static/InstatObject/R/data_object_R6.R
@@ -2122,43 +2122,49 @@ DataSheet$set("public","split_date", function(col_name = "", year_val = FALSE, y
col_name <- next_default_item(prefix = "leap_year", existing_names = self$get_column_names(), include_index = FALSE)
self$add_columns_to_data(col_name = col_name, col_data = leap_year_vector)
}
- if(year_val) {
+ if(year_name) {
if(s_shift) {
col_name <- next_default_item(prefix = "s_year", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = temp_s_year_num)
+ self$add_columns_to_data(col_name = col_name, col_data = temp_s_year)
self$append_to_variables_metadata(col_names = col_name, property = label_label, new_val = paste("Shifted year starting on day", s_start_day))
+ new_labels <- sort(unique(temp_s_year_num))
+ names(new_labels) <- sort(unique(temp_s_year))
+ self$append_to_variables_metadata(col_names = col_name, property = labels_label, new_val = new_labels)
}
else {
year_vector <- lubridate::year(col_data)
col_name <- next_default_item(prefix = "year", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = year_vector)
+ self$add_columns_to_data(col_name = col_name, col_data = factor(year_vector))
+ }
+ if(is_climatic && is.null(self$get_climatic_column_name(year_label))) {
+ self$append_climatic_types(types = c(year = col_name))
}
- if(is_climatic) self$set_climatic_types(types = c(year = col_name))
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
}
- if(year_name) {
+ if(year_val) {
if(s_shift) {
col_name <- next_default_item(prefix = "s_year", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = temp_s_year)
+ self$add_columns_to_data(col_name = col_name, col_data = temp_s_year_num)
self$append_to_variables_metadata(col_names = col_name, property = label_label, new_val = paste("Shifted year starting on day", s_start_day))
- new_labels <- sort(unique(temp_s_year_num))
- names(new_labels) <- sort(unique(temp_s_year))
- self$append_to_variables_metadata(col_names = col_name, property = labels_label, new_val = new_labels)
}
else {
year_vector <- lubridate::year(col_data)
col_name <- next_default_item(prefix = "year", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = factor(year_vector))
+ self$add_columns_to_data(col_name = col_name, col_data = year_vector)
+ }
+ if(is_climatic && is.null(self$get_climatic_column_name(year_label))) {
+ self$append_climatic_types(types = c(year = col_name))
}
- if(is_climatic) self$set_climatic_types(types = c(year = col_name))
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
}
- if(month_val) {
- month_val_vector <- (lubridate::month(col_data) - (s_start_month - 1)) %% 12
- month_val_vector <- ifelse(month_val_vector == 0, 12, month_val_vector)
- col_name <- next_default_item(prefix = "month_val", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = month_val_vector)
+ if(month_name) {
+ month_name_vector <- forcats::fct_shift(f = lubridate::month(col_data, label = TRUE, abbr = FALSE), n = s_start_month - 1)
+ col_name <- next_default_item(prefix = "month_name", existing_names = self$get_column_names(), include_index = FALSE)
+ self$add_columns_to_data(col_name = col_name, col_data = month_name_vector)
if(s_shift) self$append_to_variables_metadata(col_names = col_name, property = label_label, new_val = paste("Shifted month starting on day", s_start_day))
+ if(is_climatic && is.null(self$get_climatic_column_name(month_label))) {
+ self$append_climatic_types(types = c(month = col_name))
+ }
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
}
if(month_abbr) {
@@ -2166,24 +2172,29 @@ DataSheet$set("public","split_date", function(col_name = "", year_val = FALSE, y
col_name <- next_default_item(prefix = "month_abbr", existing_names = self$get_column_names(), include_index = FALSE)
self$add_columns_to_data(col_name = col_name, col_data = month_abbr_vector)
if(s_shift) self$append_to_variables_metadata(col_names = col_name, property = label_label, new_val = paste("Shifted month starting on day", s_start_day))
+ if(is_climatic && is.null(self$get_climatic_column_name(month_label))) {
+ self$append_climatic_types(types = c(month = col_name))
+ }
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
}
- if(month_name) {
- month_name_vector <- forcats::fct_shift(f = lubridate::month(col_data, label = TRUE, abbr = FALSE), n = s_start_month - 1)
- col_name <- next_default_item(prefix = "month_name", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = month_name_vector)
+ if(month_val) {
+ month_val_vector <- (lubridate::month(col_data) - (s_start_month - 1)) %% 12
+ month_val_vector <- ifelse(month_val_vector == 0, 12, month_val_vector)
+ col_name <- next_default_item(prefix = "month_val", existing_names = self$get_column_names(), include_index = FALSE)
+ self$add_columns_to_data(col_name = col_name, col_data = month_val_vector)
if(s_shift) self$append_to_variables_metadata(col_names = col_name, property = label_label, new_val = paste("Shifted month starting on day", s_start_day))
+ if(is_climatic && is.null(self$get_climatic_column_name(month_label))) {
+ self$append_climatic_types(types = c(month = col_name))
+ }
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
}
- if(day) {
- day_vector <- lubridate::day(col_data)
- col_name <- next_default_item(prefix = "day", existing_names = self$get_column_names(), include_index = FALSE)
- self$add_columns_to_data(col_name = col_name, col_data = day_vector)
- }
if(day_in_month) {
day_in_month_vector <- as.numeric(lubridate::mday(col_data))
col_name <- next_default_item(prefix = "day_in_month", existing_names = self$get_column_names(), include_index = FALSE)
self$add_columns_to_data(col_name = col_name, col_data = day_in_month_vector)
+ if(is_climatic && is.null(self$get_climatic_column_name(day_label))) {
+ self$append_climatic_types(types = c(day = col_name))
+ }
}
if(days_in_month) {
days_in_month_vector <- as.numeric(lubridate::days_in_month(col_data))
@@ -2201,7 +2212,9 @@ DataSheet$set("public","split_date", function(col_name = "", year_val = FALSE, y
col_name <- next_default_item(prefix = "doy", existing_names = self$get_column_names(), include_index = FALSE)
self$add_columns_to_data(col_name = col_name, col_data = day_in_year_366_vector)
}
- if(is_climatic) self$set_climatic_types(types = c(doy = col_name))
+ if(is_climatic && is.null(self$get_climatic_column_name(doy_label))) {
+ self$append_climatic_types(types = c(doy = col_name))
+ }
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
}
if(day_in_year) {
@@ -2210,7 +2223,6 @@ DataSheet$set("public","split_date", function(col_name = "", year_val = FALSE, y
day_in_year_vector <- dplyr::if_else(day_in_year_vector == 0, dplyr::if_else(lubridate::leap_year(col_data), 366, 365), day_in_year_vector)
col_name <- next_default_item(prefix = "doy_365", existing_names = self$get_column_names(), include_index = FALSE)
self$add_columns_to_data(col_name = col_name, col_data = day_in_year_vector)
- if(is_climatic) self$set_climatic_types(types = c(doy = col_name))
self$append_to_variables_metadata(col_names = col_name, property = doy_start_label, new_val = s_start_day)
if(s_shift) self$append_to_variables_metadata(col_names = col_name, property = label_label, new_val = paste("Shifted year starting on day", s_start_day))
}
@@ -2347,18 +2359,39 @@ DataBook$set("public","define_as_climatic", function(data_name, types, key_col_n
}
}
self$get_data_objects(data_name)$set_climatic_types(types)
- cat("Climatic dataset:", data_name, "\n")
- cat("----------------\n")
+}
+)
+
+DataSheet$set("public","set_climatic_types", function(types) {
+ # Clear all climatic types first
+ self$append_to_variables_metadata(property = climatic_type_label, new_val = NULL)
+ if(!all(names(types) %in% all_climatic_column_types)) stop("Cannot recognise the following climatic types: ", paste(names(types)[!names(types) %in% all_climatic_column_types], collapse = ", "))
+ invisible(sapply(names(types), function(name) self$append_to_variables_metadata(types[name], climatic_type_label, name)))
types <- types[sort(names(types))]
+ cat("Climatic dataset:", self$get_metadata(data_name_label), "\n")
+ cat("----------------\n")
+ cat("Definition", "\n")
+ cat("----------------\n")
for(i in seq_along(types)) {
cat(names(types)[i], ": ", types[i], "\n", sep = "")
}
}
)
-DataSheet$set("public","set_climatic_types", function(types) {
+DataSheet$set("public","append_climatic_types", function(types) {
if(!all(names(types) %in% all_climatic_column_types)) stop("Cannot recognise the following climatic types: ", paste(names(types)[!names(types) %in% all_climatic_column_types], collapse = ", "))
+ for(i in seq_along(types)) {
+ col <- self$get_climatic_column_name(names(types)[i])
+ if(!is.null(col)) self$append_to_variables_metadata(col, climatic_type_label, NULL)
+ }
invisible(sapply(names(types), function(name) self$append_to_variables_metadata(types[name], climatic_type_label, name)))
+ cat("Climatic dataset:", self$get_metadata(data_name_label), "\n")
+ cat("----------------\n")
+ cat("Update", "\n")
+ cat("----------------\n")
+ for(i in seq_along(types)) {
+ cat(names(types)[i], ": ", types[i], "\n", sep = "")
+ }
}
)
@@ -2499,17 +2532,44 @@ DataSheet$set("public","make_inventory_plot", function(date_col, station_col = N
}
)
-DataSheet$set("public","infill_missing_dates", function(date_name, factors, resort = TRUE) {
+DataSheet$set("public","infill_missing_dates", function(date_name, factors, start_month, start_date, end_date, resort = TRUE) {
date_col <- self$get_columns_from_data(date_name)
- if(!lubridate::is.Date(date_col)) stop(date_name, " is not a Date column.")
+ if(!lubridate::is.Date(date_col)) stop("date_col is not a Date column.")
if(anyNA(date_col)) stop("Cannot do infilling as date column has missing values")
+ if(!missing(start_date) && !lubridate::is.Date(start_date)) stop("start_date is not of type Date")
+ if(!missing(end_date) && !lubridate::is.Date(end_date)) stop("end_date is not of type Date")
+ if(!missing(start_month) && !is.numeric(start_month)) stop("start_month is not numeric")
+ if(!missing(start_month)) end_month <- ((start_month - 2) %% 12) + 1
+
+ min_date <- min(date_col)
+ max_date <- max(date_col)
+ if(!missing(start_date)) {
+ if(start_date > min_date) stop("Start date cannot be greater than earliest date")
+ }
+ if(!missing(end_date)) {
+ if(end_date < max_date) stop("End date cannot be less than latest date")
+ }
+
if(missing(factors)) {
if(anyDuplicated(date_col) > 0) stop("Cannot do infilling as date column has duplicate values.")
- min <- min(date_col)
- max <- max(date_col)
- full_dates <- seq(min, max, by = "day")
+
+ if(!missing(start_date) | !missing(end_date)) {
+ if(!missing(start_date)) {
+ min_date <- start_date
+ }
+ if(!missing(end_date)) {
+ max_date <- end_date
+ }
+ }
+ else if(!missing(start_month)) {
+ if(start_month <= lubridate::month(min_date)) min_date <- as.Date(paste(lubridate::year(min_date), start_month, 1, sep = "-"), format = "%Y-%m-%d")
+ else min_date <- as.Date(paste(lubridate::year(min_date) - 1, start_month, 1, sep = "-"), format = "%Y-%m-%d")
+ if(end_month >= lubridate::month(max_date)) as.Date(paste(lubridate::year(max_date), end_month, lubridate::days_in_month(as.Date(paste(lubridate::year(max_date), end_month, 1, sep = "-", format = "%Y-%m-%d"))), sep = "-"), format = "%Y-%m-%d")
+ else max_date <- as.Date(paste(lubridate::year(max_date) + 1, end_month, lubridate::days_in_month(as.Date(paste(lubridate::year(max_date) + 1, end_month, 1, sep = "-"))), sep = "-", format = "%Y-%m-%d"), format = "%Y-%m-%d")
+ }
+ full_dates <- seq(min_date, max_date, by = "day")
if(length(full_dates) > length(date_col)) {
- cat("Infilling", (length(full_dates) - length(date_col)), "missing dates", "\n")
+ cat("Adding", (length(full_dates) - length(date_col)), "rows for date gaps", "\n")
full_dates <- data.frame(full_dates)
names(full_dates) <- date_name
by <- date_name
@@ -2527,13 +2587,29 @@ DataSheet$set("public","infill_missing_dates", function(date_name, factors, reso
col_names_exp[[i]] <- lazyeval::interp(~ var, var = as.name(col_name))
}
grouped_data <- self$get_data_frame(use_current_filter = FALSE) %>% dplyr::group_by_(.dots = col_names_exp)
- date_ranges <- grouped_data %>% dplyr::summarise_(.dots = setNames(list(lazyeval::interp(~ min(var), var = as.name(date_name)), lazyeval::interp(~ max(var), var = as.name(date_name))), c("Min", "Max")))
- date_lengths <- grouped_data %>% dplyr::summarise(Count = n())
+ date_ranges <- grouped_data %>% dplyr::summarise_(.dots = setNames(list(lazyeval::interp(~ min(var), var = as.name(date_name)), lazyeval::interp(~ max(var), var = as.name(date_name))), c("min_date", "max_date")))
+ date_lengths <- grouped_data %>% dplyr::summarise(count = n())
+ if(!missing(start_date) | !missing(end_date)) {
+ if(!missing(start_date)) {
+ date_ranges$min_date <- start_date
+ }
+ if(!missing(end_date)) {
+ date_ranges$max_date <- end_date
+ }
+ }
+ else if(!missing(start_month)) {
+ date_ranges$min_date <- dplyr::if_else(lubridate::month(date_ranges$min_date) >= start_month,
+ as.Date(paste(lubridate::year(date_ranges$min_date), start_month, 1, sep = "-"), format = "%Y-%m-%d"),
+ as.Date(paste(lubridate::year(date_ranges$min_date) - 1, start_month, 1, sep = "-"), format = "%Y-%m-%d"))
+ date_ranges$max_date <- dplyr::if_else(lubridate::month(date_ranges$max_date) <= end_month,
+ as.Date(paste(lubridate::year(date_ranges$max_date), end_month, lubridate::days_in_month(as.Date(paste(lubridate::year(date_ranges$max_date), end_month, 1, sep = "-"), format = "%Y-%m-%d")), sep = "-"), format = "%Y-%m-%d"),
+ as.Date(paste(lubridate::year(date_ranges$max_date) + 1, end_month, lubridate::days_in_month(as.Date(paste(lubridate::year(date_ranges$max_date), end_month, 1, sep = "-"), format = "%Y-%m-%d")), sep = "-"), format = "%Y-%m-%d"))
+ }
full_dates_list <- list()
for(j in 1:nrow(date_ranges)) {
- full_dates <- seq(date_ranges$Min[j], date_ranges$Max[j], by = "day")
+ full_dates <- seq(date_ranges$min_date[j], date_ranges$max_date[j], by = "day")
if(length(full_dates) > date_lengths[[2]][j]) {
- cat("Infilling", (length(full_dates) - date_lengths[[2]][j]), "missing dates for:", paste(unlist(date_ranges[1:length(factors)][j, ]), collapse = "-"), "\n")
+ cat(paste(unlist(date_ranges[1:length(factors)][j, ]), collapse = "-"), ": Adding", (length(full_dates) - date_lengths[[2]][j]), "rows for date gaps", "\n")
merge_required <- TRUE
}
full_dates <- data.frame(full_dates)
@@ -3335,7 +3411,10 @@ DataSheet$set("public","standardise_country_names", function(country_columns = c
)
DataSheet$set("public", "get_climatic_column_name", function(col_name) {
- if(!self$get_metadata(is_climatic_label))stop("Define data as climatic.")
+ if(!self$get_metadata(is_climatic_label)) {
+ warning("Data not defined as climatic.")
+ return(NULL)
+ }
if(col_name %in% self$get_variables_metadata()$Climatic_Type){
new_data = subset(self$get_variables_metadata(), Climatic_Type==col_name, select = Name)
return(as.character(new_data))
diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R
index af297983c69..b326a10d4e5 100644
--- a/instat/static/InstatObject/R/instat_object_R6.R
+++ b/instat/static/InstatObject/R/instat_object_R6.R
@@ -1324,8 +1324,8 @@ DataBook$set("public", "import_NetCDF", function(nc, name, only_data_vars = TRUE
# }
# )
-DataBook$set("public", "infill_missing_dates", function(data_name, date_name, factors, resort = TRUE) {
- self$get_data_objects(data_name)$infill_missing_dates(date_name = date_name, factor = factors, resort = resort)
+DataBook$set("public", "infill_missing_dates", function(data_name, date_name, factors, start_month, start_date, end_date, resort = TRUE) {
+ self$get_data_objects(data_name)$infill_missing_dates(date_name = date_name, factor = factors, start_month = start_month, start_date = start_date, end_date = end_date, resort = resort)
}
)
@@ -1756,6 +1756,7 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r
}
if(definition_props) {
calc_from <- list()
+ if(!missing(station)) calc_from[[length(calc_from) + 1]] <- station
calc_from[[length(calc_from) + 1]] <- plant_day_name
calc_from[[length(calc_from) + 1]] <- plant_length_name
calc_from[[length(calc_from) + 1]] <- rain_total_name
@@ -1770,8 +1771,10 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r
prop_data_frame <- self$run_instat_calculation(propor_table, display = TRUE)
if(print_table) {
prop_data_frame$prop_success <- round(prop_data_frame$prop_success, 2)
- prop_table_unstacked <- reshape2::dcast(formula = as.formula(paste(plant_length_name, "+", rain_total_name, "~", plant_day_name)), data = prop_data_frame, value.var = "prop_success")
- prop_table_split <- split(prop_table_unstacked, prop_table_unstacked[[plant_length_name]])
+ prop_table_unstacked <- reshape2::dcast(formula = as.formula(paste(if(!missing(station)) paste(station, "+"), plant_length_name, "+", rain_total_name, "~", plant_day_name)), data = prop_data_frame, value.var = "prop_success")
+ if(!missing(station)) f <- interaction(prop_table_unstacked[[station]], prop_table_unstacked[[plant_length_name]], lex.order = TRUE)
+ else f <- prop_table_unstacked[[plant_length_name]]
+ prop_table_split <- split(prop_table_unstacked, f)
return(prop_table_split)
}
}
diff --git a/instat/ucrAxes.vb b/instat/ucrAxes.vb
index 7c58f5a2c09..5f0d611904e 100644
--- a/instat/ucrAxes.vb
+++ b/instat/ucrAxes.vb
@@ -140,16 +140,18 @@ Public Class ucrAxes
ucrInputLowerLimit.SetParameterIncludeArgumentName(False)
ucrInputLowerLimit.SetValidationTypeAsNumeric()
ucrInputLowerLimit.AddQuotesIfUnrecognised = False
+ ucrInputLowerLimit.SetValuesToIgnore({"NA"})
ucrInputLowerLimit.SetLinkedDisplayControl(lblLowerLimit)
ucrInputUpperLimit.SetParameter(New RParameter("upperlimit", 1))
ucrInputUpperLimit.SetParameterIncludeArgumentName(False)
ucrInputUpperLimit.SetValidationTypeAsNumeric()
ucrInputUpperLimit.AddQuotesIfUnrecognised = False
+ ucrInputUpperLimit.SetValuesToIgnore({"NA"})
ucrInputUpperLimit.SetLinkedDisplayControl(lblUpperLimit)
'Axis type - controls which options are available
- ucrInputAxisType.SetItems({"Continuous", "Discrete", "Date"})
+ ucrInputAxisType.SetItems({"continuous", "discrete", "date"})
ucrInputAxisType.SetDropDownStyleAsNonEditable()
ucrInputRelaceMissingvalues.SetParameter(New RParameter("na.value"))
@@ -186,7 +188,7 @@ Public Class ucrAxes
bControlsInitialised = True
End Sub
- Public Sub SetRCodeForControl(bIsXAxis As Boolean, Optional strNewAxisType As String = "Continuous", Optional clsNewXYScaleContinuousFunction As RFunction = Nothing, Optional clsNewXYlabTitleFunction As RFunction = Nothing, Optional clsNewBaseOperator As ROperator = Nothing, Optional bReset As Boolean = False, Optional bCloneIfNeeded As Boolean = False)
+ Public Sub SetRCodeForControl(bIsXAxis As Boolean, Optional strNewAxisType As String = "continuous", Optional clsNewXYScaleContinuousFunction As RFunction = Nothing, Optional clsNewXYlabTitleFunction As RFunction = Nothing, Optional clsNewBaseOperator As ROperator = Nothing, Optional bReset As Boolean = False, Optional bCloneIfNeeded As Boolean = False)
Dim clsTempBreaksParam As RParameter
Dim clsTempMinorBreaksParam As RParameter
@@ -389,12 +391,14 @@ Public Class ucrAxes
End Sub
Private Sub ExpandControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkExpand.ControlValueChanged, ucrInputExpand.ControlValueChanged
- If ucrChkExpand.Checked AndAlso Not ucrInputExpand.IsEmpty Then
- clsXYScaleContinuousFunction.AddParameter("expand", clsRFunctionParameter:=ucrInputExpand.clsRList)
- Else
- clsXYScaleContinuousFunction.RemoveParameterByName("expand")
+ If bRCodeSet Then
+ If ucrChkExpand.Checked AndAlso Not ucrInputExpand.IsEmpty Then
+ clsXYScaleContinuousFunction.AddParameter("expand", clsRFunctionParameter:=ucrInputExpand.clsRList)
+ Else
+ clsXYScaleContinuousFunction.RemoveParameterByName("expand")
+ End If
+ AddRemoveContinuousXYScales()
End If
- AddRemoveContinuousXYScales()
End Sub
Private Sub ScalesCheckboxes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkExpand.ControlValueChanged, ucrChkPosition.ControlValueChanged, ucrChkTransformation.ControlValueChanged, ucrChkExpand.ControlValueChanged, ucrChkNaValue.ControlValueChanged
diff --git a/instat/ucrReceiver.vb b/instat/ucrReceiver.vb
index ad3f2b1a891..0ba287e157d 100644
--- a/instat/ucrReceiver.vb
+++ b/instat/ucrReceiver.vb
@@ -604,25 +604,34 @@ Public Class ucrReceiver
' don't always want to autofill when dataframe is changed.
' Something like AndAlso Selector.CurrentReceiver.bAttachedToPrimaryDataFrame
' except always want to autofill when resetting regardless of current receiver
- If bAutoFill AndAlso lstIncludedAutoFillProperties.Count > 0 AndAlso Selector IsNot Nothing AndAlso ((bTypeSet AndAlso GetItemType() = "column") OrElse Selector.GetItemType() = "column") AndAlso (Selector.CurrentReceiver Is Nothing OrElse Selector.CurrentReceiver.bAttachedToPrimaryDataFrame) Then
- SetMeAsReceiver()
- clsGetItems.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_names")
- clsIncludeList.SetRCommand("list")
- For Each kvpInclude In lstIncludedAutoFillProperties
- clsIncludeList.AddParameter(kvpInclude.Key, GetListAsRString(kvpInclude.Value.ToList(), bWithQuotes:=False))
- Next
- clsGetItems.AddParameter("include", clsRFunctionParameter:=clsIncludeList)
- clsGetItems.AddParameter("data_name", Chr(34) & Selector.strCurrentDataFrame & Chr(34))
- expItems = frmMain.clsRLink.RunInternalScriptGetValue(clsGetItems.ToScript(), bSilent:=True)
- If expItems IsNot Nothing AndAlso Not expItems.Type = Internals.SymbolicExpressionType.Null Then
- chrColumns = expItems.AsCharacter
- If chrColumns.Count = 1 Then
- For Each lviTempVariable As ListViewItem In Selector.lstAvailableVariable.Items
- If lviTempVariable.Text = chrColumns(0) Then
- Add(lviTempVariable.Text, Selector.strCurrentDataFrame)
- Exit For
- End If
- Next
+ If bAutoFill AndAlso Selector IsNot Nothing AndAlso (Selector.CurrentReceiver Is Nothing OrElse Selector.CurrentReceiver.bAttachedToPrimaryDataFrame) Then
+ ' If no autofill properties then simply check if one item is in the selector
+ ' (may need to modify behaviour for multiple receivers)
+ If lstIncludedAutoFillProperties.Count = 0 Then
+ SetMeAsReceiver()
+ If Selector.lstAvailableVariable.Items.Count = 1 Then
+ Add(Selector.lstAvailableVariable.Items(0).Text, Selector.strCurrentDataFrame)
+ End If
+ ElseIf lstIncludedAutoFillProperties.Count > 0 AndAlso ((bTypeSet AndAlso GetItemType() = "column") OrElse Selector.GetItemType() = "column") Then
+ SetMeAsReceiver()
+ clsGetItems.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_names")
+ clsIncludeList.SetRCommand("list")
+ For Each kvpInclude In lstIncludedAutoFillProperties
+ clsIncludeList.AddParameter(kvpInclude.Key, GetListAsRString(kvpInclude.Value.ToList(), bWithQuotes:=False))
+ Next
+ clsGetItems.AddParameter("include", clsRFunctionParameter:=clsIncludeList)
+ clsGetItems.AddParameter("data_name", Chr(34) & Selector.strCurrentDataFrame & Chr(34))
+ expItems = frmMain.clsRLink.RunInternalScriptGetValue(clsGetItems.ToScript(), bSilent:=True)
+ If expItems IsNot Nothing AndAlso Not expItems.Type = Internals.SymbolicExpressionType.Null Then
+ chrColumns = expItems.AsCharacter
+ If chrColumns.Count = 1 Then
+ For Each lviTempVariable As ListViewItem In Selector.lstAvailableVariable.Items
+ If lviTempVariable.Text = chrColumns(0) Then
+ Add(lviTempVariable.Text, Selector.strCurrentDataFrame)
+ Exit For
+ End If
+ Next
+ End If
End If
End If
End If