diff --git a/instat/clsGgplotDefaults.vb b/instat/clsGgplotDefaults.vb index 8e4f80b6644..b1851caa48e 100644 --- a/instat/clsGgplotDefaults.vb +++ b/instat/clsGgplotDefaults.vb @@ -92,6 +92,17 @@ Public Class GgplotDefaults 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 @@ -145,6 +156,8 @@ Public Class GgplotDefaults dctTemp.Add("rect", clsElementRect.Clone()) dctTemp.Add("text", clsElementText.Clone()) dctTemp.Add("title", clsElementText.Clone()) + dctTemp.Add("sub.title", clsElementText.Clone()) + dctTemp.Add("caption", clsElementText.Clone()) 'dctTemp.Add("aspect.ratio", clsElementText.Clone()) dctTemp.Add("axis.title", clsElementText.Clone()) dctTemp.Add("axis.title.x", clsElementText.Clone()) @@ -250,9 +263,11 @@ Public Class GgplotDefaults 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)) dctTempColour.Add("Black", Chr(34) & "black" & Chr(34)) dctTempColour.Add("Red", Chr(34) & "red" & Chr(34)) dctTempColour.Add("Blue", Chr(34) & "blue" & Chr(34)) + 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)) diff --git a/instat/clsInstatOptions.vb b/instat/clsInstatOptions.vb index 7a1b211280b..8a91caa09a6 100644 --- a/instat/clsInstatOptions.vb +++ b/instat/clsInstatOptions.vb @@ -46,6 +46,10 @@ Imports RDotNet Public bShowWaitDialog As Nullable(Of Boolean) Public iWaitTimeDelaySeconds As Nullable(Of Integer) Public iToolbarHeight As Nullable(Of Integer) + Public strClimsoftDatabaseName As String + Public strClimsoftHost As String + Public strClimsoftPort As String + Public strClimsoftUsername As String Public Sub New(Optional bSetOptions As Boolean = True) 'TODO Is this sensible to do in constructor? @@ -79,6 +83,10 @@ Imports RDotNet bShowWaitDialog = clsInstatOptionsDefaults.DEFAULTbShowWaitDialog iWaitTimeDelaySeconds = clsInstatOptionsDefaults.DEFAULTiWaitTimeDelaySeconds iToolbarHeight = clsInstatOptionsDefaults.DEFAULTiToolbarHeight + strClimsoftDatabaseName = clsInstatOptionsDefaults.DEFAULTstrClimsoftDatabaseName + strClimsoftHost = clsInstatOptionsDefaults.DEFAULTstrClimsoftHost + strClimsoftPort = clsInstatOptionsDefaults.DEFAULTstrClimsoftPort + strClimsoftUsername = clsInstatOptionsDefaults.DEFAULTstrClimsoftUsername If bSetOptions Then SetOptions() End If @@ -240,6 +248,30 @@ Imports RDotNet Else SetToolbarHeight(clsInstatOptionsDefaults.DEFAULTiToolbarHeight) End If + + If strClimsoftDatabaseName IsNot Nothing Then + SetClimsoftDatabaseName(strClimsoftDatabaseName) + Else + SetClimsoftDatabaseName(clsInstatOptionsDefaults.DEFAULTstrClimsoftDatabaseName) + End If + + If strClimsoftHost IsNot Nothing Then + SetClimsoftHost(strClimsoftHost) + Else + SetClimsoftHost(clsInstatOptionsDefaults.DEFAULTstrClimsoftHost) + End If + + If strClimsoftPort IsNot Nothing Then + SetClimsoftPort(strClimsoftPort) + Else + SetClimsoftPort(clsInstatOptionsDefaults.DEFAULTstrClimsoftPort) + End If + + If strClimsoftUsername IsNot Nothing Then + SetClimsoftUsername(strClimsoftUsername) + Else + SetClimsoftUsername(clsInstatOptionsDefaults.DEFAULTstrClimsoftUsername) + End If End Sub Public Sub SetMaxRows(iRows As Integer) @@ -420,4 +452,20 @@ Imports RDotNet iToolbarHeight = iNewToolbarHeight frmMain.SetToolbarHeight(iToolbarHeight) End Sub + + Public Sub SetClimsoftDatabaseName(strNewClimsoftDatabaseName As String) + strClimsoftDatabaseName = strNewClimsoftDatabaseName + End Sub + + Public Sub SetClimsoftHost(strNewClimsoftHost As String) + strClimsoftHost = strNewClimsoftHost + End Sub + + Public Sub SetClimsoftPort(strNewClimsoftPort As String) + strClimsoftPort = strNewClimsoftPort + End Sub + + Public Sub SetClimsoftUsername(strNewClimsoftUsername As String) + strClimsoftUsername = strNewClimsoftUsername + End Sub End Class \ No newline at end of file diff --git a/instat/clsInstatOptionsDefaults.vb b/instat/clsInstatOptionsDefaults.vb index c86fbba54d2..0263eafc6a4 100644 --- a/instat/clsInstatOptionsDefaults.vb +++ b/instat/clsInstatOptionsDefaults.vb @@ -48,4 +48,8 @@ Public Class clsInstatOptionsDefaults Public Shared ReadOnly DEFAULTbShowWaitDialog As Boolean = True Public Shared ReadOnly DEFAULTiWaitTimeDelaySeconds As Integer = 2 Public Shared ReadOnly DEFAULTiToolbarHeight As Integer = 30 + Public Shared ReadOnly DEFAULTstrClimsoftDatabaseName As String = "mariadb_climsoft_db_v4" + Public Shared ReadOnly DEFAULTstrClimsoftHost As String = "127.0.0.1" + Public Shared ReadOnly DEFAULTstrClimsoftPort As String = "3308" + Public Shared ReadOnly DEFAULTstrClimsoftUsername As String = "root" End Class diff --git a/instat/dlgClimSoft.vb b/instat/dlgClimSoft.vb index a01dd91e21a..ab5ae078f27 100644 --- a/instat/dlgClimSoft.vb +++ b/instat/dlgClimSoft.vb @@ -83,10 +83,10 @@ Public Class dlgClimSoft ucrInputEndDate.SetName("") clsRDatabaseConnect.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$database_connect") - clsRDatabaseConnect.AddParameter("host", "127.0.0.1") - sdgImportFromClimSoft.ucrInputDatabaseName.SetName("") - sdgImportFromClimSoft.ucrInputPort.SetName("") - sdgImportFromClimSoft.ucrInputUserName.SetName("") + clsRDatabaseConnect.AddParameter("dbname", frmMain.clsInstatOptions.strClimsoftDatabaseName, iPosition:=0) + clsRDatabaseConnect.AddParameter("host", frmMain.clsInstatOptions.strClimsoftHost, iPosition:=1) + clsRDatabaseConnect.AddParameter("port", frmMain.clsInstatOptions.strClimsoftPort, iPosition:=2) + clsRDatabaseConnect.AddParameter("user", frmMain.clsInstatOptions.strClimsoftUsername, iPosition:=3) clsRDatabaseDisconnect.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$database_disconnect") clsRImportFromClimsoft.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_from_climsoft") diff --git a/instat/dlgClimaticCheckDataRain.Designer.vb b/instat/dlgClimaticCheckDataRain.Designer.vb index 501335f5cab..45d544988f5 100644 --- a/instat/dlgClimaticCheckDataRain.Designer.vb +++ b/instat/dlgClimaticCheckDataRain.Designer.vb @@ -34,8 +34,14 @@ Partial Class dlgClimaticCheckDataRain Me.lblRainDays = New System.Windows.Forms.Label() Me.lblSkewnessWeight = New System.Windows.Forms.Label() Me.grpLogicalCalculatedColumns = New System.Windows.Forms.GroupBox() + Me.ucrChkLogicalColumns = New instat.ucrCheck() + Me.ucrChkCalculatedColumns = New instat.ucrCheck() Me.lblCoeff = New System.Windows.Forms.Label() Me.cmdOmitMonths = New System.Windows.Forms.Button() + Me.lblThreshold = New System.Windows.Forms.Label() + Me.lblMissingThreshold = New System.Windows.Forms.Label() + Me.lblThresholdmm = New System.Windows.Forms.Label() + Me.ucrInputThreshold = New instat.ucrInputTextBox() Me.ucrInputThresholdValue = New instat.ucrInputTextBox() Me.ucrNudCoeff = New instat.ucrNud() Me.ucrChkOmitZero = New instat.ucrCheck() @@ -56,9 +62,6 @@ Partial Class dlgClimaticCheckDataRain Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrSelectorRain = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrChkLogicalColumns = New instat.ucrCheck() - Me.ucrChkCalculatedColumns = New instat.ucrCheck() - Me.lblThreshold = New System.Windows.Forms.Label() Me.grpLogicalCalculatedColumns.SuspendLayout() Me.SuspendLayout() ' @@ -120,6 +123,18 @@ Partial Class dlgClimaticCheckDataRain Me.grpLogicalCalculatedColumns.Name = "grpLogicalCalculatedColumns" Me.grpLogicalCalculatedColumns.TabStop = False ' + 'ucrChkLogicalColumns + ' + Me.ucrChkLogicalColumns.Checked = False + resources.ApplyResources(Me.ucrChkLogicalColumns, "ucrChkLogicalColumns") + Me.ucrChkLogicalColumns.Name = "ucrChkLogicalColumns" + ' + 'ucrChkCalculatedColumns + ' + Me.ucrChkCalculatedColumns.Checked = False + resources.ApplyResources(Me.ucrChkCalculatedColumns, "ucrChkCalculatedColumns") + Me.ucrChkCalculatedColumns.Name = "ucrChkCalculatedColumns" + ' 'lblCoeff ' resources.ApplyResources(Me.lblCoeff, "lblCoeff") @@ -131,6 +146,29 @@ Partial Class dlgClimaticCheckDataRain Me.cmdOmitMonths.Name = "cmdOmitMonths" Me.cmdOmitMonths.UseVisualStyleBackColor = True ' + 'lblThreshold + ' + resources.ApplyResources(Me.lblThreshold, "lblThreshold") + Me.lblThreshold.Name = "lblThreshold" + ' + 'lblMissingThreshold + ' + resources.ApplyResources(Me.lblMissingThreshold, "lblMissingThreshold") + Me.lblMissingThreshold.Name = "lblMissingThreshold" + ' + 'lblThresholdmm + ' + resources.ApplyResources(Me.lblThresholdmm, "lblThresholdmm") + Me.lblThresholdmm.Name = "lblThresholdmm" + ' + 'ucrInputThreshold + ' + Me.ucrInputThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputThreshold.IsMultiline = False + Me.ucrInputThreshold.IsReadOnly = False + resources.ApplyResources(Me.ucrInputThreshold, "ucrInputThreshold") + Me.ucrInputThreshold.Name = "ucrInputThreshold" + ' 'ucrInputThresholdValue ' Me.ucrInputThresholdValue.AddQuotesIfUnrecognised = True @@ -292,27 +330,13 @@ Partial Class dlgClimaticCheckDataRain resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrChkLogicalColumns - ' - Me.ucrChkLogicalColumns.Checked = False - resources.ApplyResources(Me.ucrChkLogicalColumns, "ucrChkLogicalColumns") - Me.ucrChkLogicalColumns.Name = "ucrChkLogicalColumns" - ' - 'ucrChkCalculatedColumns - ' - Me.ucrChkCalculatedColumns.Checked = False - resources.ApplyResources(Me.ucrChkCalculatedColumns, "ucrChkCalculatedColumns") - Me.ucrChkCalculatedColumns.Name = "ucrChkCalculatedColumns" - ' - 'lblThreshold - ' - resources.ApplyResources(Me.lblThreshold, "lblThreshold") - Me.lblThreshold.Name = "lblThreshold" - ' 'dlgClimaticCheckDataRain ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblThresholdmm) + Me.Controls.Add(Me.ucrInputThreshold) + Me.Controls.Add(Me.lblMissingThreshold) Me.Controls.Add(Me.lblThreshold) Me.Controls.Add(Me.ucrInputThresholdValue) Me.Controls.Add(Me.cmdOmitMonths) @@ -393,4 +417,7 @@ Partial Class dlgClimaticCheckDataRain Friend WithEvents cmdOmitMonths As Button Friend WithEvents ucrInputThresholdValue As ucrInputTextBox Friend WithEvents lblThreshold As Label + Friend WithEvents lblMissingThreshold As Label + Friend WithEvents ucrInputThreshold As ucrInputTextBox + Friend WithEvents lblThresholdmm As Label End Class diff --git a/instat/dlgClimaticCheckDataRain.resx b/instat/dlgClimaticCheckDataRain.resx index 2e0c177c9cb..1aa28050cdc 100644 --- a/instat/dlgClimaticCheckDataRain.resx +++ b/instat/dlgClimaticCheckDataRain.resx @@ -148,7 +148,7 @@ $this - 30 + 33 True @@ -178,7 +178,7 @@ $this - 28 + 31 True @@ -208,7 +208,7 @@ $this - 27 + 30 True @@ -238,7 +238,7 @@ $this - 25 + 28 True @@ -268,7 +268,7 @@ $this - 22 + 25 True @@ -298,7 +298,7 @@ $this - 24 + 27 NoControl @@ -325,7 +325,7 @@ $this - 10 + 13 True @@ -355,7 +355,7 @@ $this - 9 + 12 True @@ -385,7 +385,7 @@ $this - 8 + 11 True @@ -400,7 +400,7 @@ 96, 13 - 25 + 30 Skewness Weight: @@ -415,7 +415,16 @@ $this - 6 + 9 + + + 6, 21 + + + 185, 20 + + + 0 ucrChkLogicalColumns @@ -429,6 +438,15 @@ 0 + + 230, 21 + + + 163, 20 + + + 1 + ucrChkCalculatedColumns @@ -448,7 +466,7 @@ 399, 55 - 29 + 34 Include in Original Data @@ -463,7 +481,7 @@ $this - 33 + 36 True @@ -478,7 +496,7 @@ 35, 13 - 27 + 32 Coeff: @@ -493,22 +511,19 @@ $this - 3 - - - False + 6 NoControl - 264, 298 + 334, 298 75, 23 - 33 + 25 Omit Months @@ -523,8 +538,119 @@ $this + 5 + + + True + + + NoControl + + + 56, 363 + + + 57, 13 + + + 28 + + + Threshold: + + + lblThreshold + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + True + + + NoControl + + + 107, 304 + + + 130, 13 + + + 23 + + + Missing Values Threshold: + + + lblMissingThreshold + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 2 + + True + + + NoControl + + + 296, 305 + + + 23, 13 + + + 37 + + + mm + + + lblThresholdmm + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 239, 301 + + + 54, 21 + + + 36 + + + ucrInputThreshold + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + 116, 359 @@ -532,7 +658,7 @@ 54, 21 - 34 + 29 ucrInputThresholdValue @@ -544,7 +670,7 @@ $this - 1 + 4 334, 358 @@ -553,7 +679,7 @@ 50, 20 - 28 + 33 ucrNudCoeff @@ -565,7 +691,7 @@ $this - 4 + 7 116, 332 @@ -574,7 +700,7 @@ 113, 20 - 24 + 27 ucrChkOmitZero @@ -586,7 +712,7 @@ $this - 5 + 8 334, 332 @@ -595,7 +721,7 @@ 50, 20 - 26 + 31 ucrNudSkewnessWeight @@ -607,7 +733,7 @@ $this - 7 + 10 106, 271 @@ -628,7 +754,7 @@ $this - 11 + 14 106, 242 @@ -649,7 +775,7 @@ $this - 12 + 15 106, 213 @@ -670,7 +796,7 @@ $this - 13 + 16 10, 332 @@ -679,7 +805,7 @@ 100, 20 - 23 + 26 ucrChkOutlier @@ -691,13 +817,13 @@ $this - 14 + 17 10, 301 - 100, 20 + 92, 20 22 @@ -712,7 +838,7 @@ $this - 15 + 18 10, 271 @@ -733,7 +859,7 @@ $this - 16 + 19 10, 242 @@ -754,7 +880,7 @@ $this - 17 + 20 10, 213 @@ -775,7 +901,7 @@ $this - 18 + 21 True @@ -786,36 +912,6 @@ 421, 504 - - True - - - NoControl - - - 56, 363 - - - 57, 13 - - - 35 - - - Threshold: - - - lblThreshold - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - 264, 255 @@ -838,7 +934,7 @@ $this - 20 + 23 264, 211 @@ -862,7 +958,7 @@ $this - 21 + 24 264, 123 @@ -886,7 +982,7 @@ $this - 23 + 26 264, 79 @@ -910,7 +1006,7 @@ $this - 26 + 29 264, 35 @@ -934,7 +1030,7 @@ $this - 29 + 32 10, 16 @@ -958,7 +1054,7 @@ $this - 31 + 34 10, 449 @@ -967,7 +1063,7 @@ 410, 52 - 32 + 35 ucrBase @@ -979,7 +1075,7 @@ $this - 32 + 35 CenterScreen @@ -1015,48 +1111,6 @@ $this - 19 - - - 6, 21 - - - 185, 20 - - - 30 - - - ucrChkLogicalColumns - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLogicalCalculatedColumns - - - 0 - - - 230, 21 - - - 163, 20 - - - 31 - - - ucrChkCalculatedColumns - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLogicalCalculatedColumns - - - 1 + 22 \ No newline at end of file diff --git a/instat/dlgClimaticCheckDataRain.vb b/instat/dlgClimaticCheckDataRain.vb index 11818878003..714ee283e5a 100644 --- a/instat/dlgClimaticCheckDataRain.vb +++ b/instat/dlgClimaticCheckDataRain.vb @@ -40,6 +40,12 @@ Public Class dlgClimaticCheckDataRain Private clsCumulativeList As New RFunction Private strCumulativeCalc As String = "Wet_days" Private strCumulativeTestCalc As String = "wet_days" + Private strDryMonthCalc As String = "dry_month" + Private strDryMonthTestCalc As String = "dry_month_calc" + 'Dry Month + Private clsGroupByMonthYearFunction, clsDryMonthCalculationFunc, clsListCalcFunction, clsSumFuction, clsDryMonthTestCalculationFunc, clsListTestFunction, clsNotIsNaFunction, clsDrySumFuction, clsFilterMonthFunction, clsGroupByListFunc As New RFunction + Private clsDryMonthEqualOperator, clsDryMonthAndOperator, clsLessOperator, clsDryTestAndOperator, clsInOperator, clsNotOperator As New ROperator + 'Combined Filters Private clsOrOperator As New ROperator Private clsListSubCalc As New RFunction @@ -47,11 +53,11 @@ Public Class dlgClimaticCheckDataRain Private clsListForOutlierManipulations, clsRainyDaysFunc, clsUpperOutlierLimitFunc, clsUpperOutlierLimitValueCalcFunc, clsUpperOutlierlimitTestFunc, clsUpperListOutlier As New RFunction Private clsUpperOutlierOperator As New ROperator Private strUpperOutlierTest As String = "upper_outlier" - Private clsLowerOutlierLimitValueCalcFunc, clsLowerOutlierlimitTestFunc, clsLowerListOutlier, clsLowerOutlierLimitFunc As New RFunction Private clsLowerOutlierOperator As New ROperator Private strLowerOutlierTest As String = "lower_outlier" Private clsOutliersOperator As New ROperator + Private bResetSubdialog As Boolean = False Private Sub dlgRain_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then @@ -71,12 +77,8 @@ Public Class dlgClimaticCheckDataRain End Sub Private Sub InitialiseDialog() - ucrBase.clsRsyntax.iCallType = 2 - ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False - - 'temp disabled untill implemented - ucrChkDryMonth.SetText("Dry Month") - ucrChkDryMonth.Enabled = False + Dim lstControls As New List(Of Control) + lstControls.AddRange({lblMissingThreshold, cmdOmitMonths, lblThresholdmm}) ucrReceiverStation.Selector = ucrSelectorRain ucrReceiverStation.SetClimaticType("station") @@ -115,6 +117,9 @@ Public Class dlgClimaticCheckDataRain ucrChkWetDays.SetParameter(New RParameter("wet_days", strCumulativeTestCalc, 1, False), bNewChangeParameterValue:=False) ucrChkWetDays.SetText("Consecutive") + ucrChkDryMonth.SetParameter(New RParameter("dry_month", strDryMonthCalc, 1, False), bNewChangeParameterValue:=False) + ucrChkDryMonth.SetText("Dry Month") + ucrNudSame.SetParameter(New RParameter("right", 1, bNewIncludeArgumentName:=False)) ucrNudWetDays.SetParameter(New RParameter("right", 1, bNewIncludeArgumentName:=False)) @@ -126,6 +131,10 @@ Public Class dlgClimaticCheckDataRain ucrNudCoeff.Increment = 0.1 ucrNudCoeff.SetRDefault("1.5") + ucrInputThreshold.SetParameter(New RParameter("limit", 1)) + ucrInputThreshold.AddQuotesIfUnrecognised = False + ucrInputThreshold.SetValidationTypeAsNumeric(dcmMin:=0) + ucrNudSkewnessWeight.SetParameter(New RParameter("skewnessweight", 4)) ucrNudSkewnessWeight.DecimalPlaces = 1 ucrNudSkewnessWeight.Increment = 0.1 @@ -143,12 +152,13 @@ Public Class dlgClimaticCheckDataRain ucrChkLarge.AddToLinkedControls(ucrNudLarge, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=200) ucrChkSame.AddToLinkedControls(ucrNudSame, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=2) ucrChkWetDays.AddToLinkedControls(ucrNudWetDays, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=10) - 'ucrChkDryMonth.AddToLinkedControls(cmdOmitMonths, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) + ucrChkDryMonth.AddToLinkedControls(ucrInputThreshold, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.05) ucrChkOutlier.AddToLinkedControls(ucrChkOmitZero, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkOutlier.AddToLinkedControls(ucrNudCoeff, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1.5) ucrChkOutlier.AddToLinkedControls(ucrNudSkewnessWeight, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=4) ucrChkOmitZero.AddToLinkedControls(ucrInputThresholdValue, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrInputThreshold.SetLinkedDisplayControl(lstControls) ucrInputThresholdValue.SetLinkedDisplayControl(lblThreshold) ucrNudLarge.SetLinkedDisplayControl(lblmm) ucrNudSame.SetLinkedDisplayControl(lblDays) @@ -178,6 +188,8 @@ Public Class dlgClimaticCheckDataRain clsEqualOperator = New ROperator clsLargeOperator = New ROperator clsLargeLessOperator = New ROperator + clsInOperator = New ROperator + clsNotOperator = New ROperator clsRainyDaysOperator.Clear() clsUpperOutlierOperator.Clear() @@ -193,10 +205,28 @@ Public Class dlgClimaticCheckDataRain clsCumulativeCalcFunc.Clear() clsUpperOutlierlimitTestFunc.Clear() clsListForOutlierManipulations.Clear() + clsDryMonthCalculationFunc.Clear() + clsGroupByMonthYearFunction.Clear() + clsListCalcFunction.Clear() + clsSumFuction.Clear() + clsDryMonthTestCalculationFunc.Clear() + clsListTestFunction.Clear() + clsNotIsNaFunction.Clear() + clsDrySumFuction.Clear() + clsFilterMonthFunction.Clear() + clsGroupByListFunc.Clear() + clsDryMonthEqualOperator.Clear() + clsDryMonthAndOperator.Clear() + clsLessOperator.Clear() + clsDryTestAndOperator.Clear() + clsInOperator.Clear() + clsNotOperator.Clear() ucrSelectorRain.Reset() ucrReceiverElement.SetMeAsReceiver() + bResetSubdialog = True + 'Group Function clsGroupByFunc.SetRCommand("instat_calculation$new") clsGroupByFunc.AddParameter("type", Chr(34) & "by" & Chr(34), iPosition:=0) @@ -317,12 +347,18 @@ Public Class dlgClimaticCheckDataRain clsCumulativeList.SetRCommand("list") clsCumulativeList.AddParameter("sub1", clsRFunctionParameter:=clsCumulativeCalcFunc, bIncludeArgumentName:=False) - 'Group By Month clsGroupByMonth.SetRCommand("instat_calculation$new") clsGroupByMonth.AddParameter("type", Chr(34) & "by" & Chr(34), iPosition:=0) clsGroupByMonth.SetAssignTo("grouping_month") + clsGroupByMonthYearFunction.SetRCommand("instat_calculation$new") + clsGroupByMonthYearFunction.AddParameter("type", Chr(34) & "by" & Chr(34), iPosition:=0) + clsGroupByMonthYearFunction.SetAssignTo("grouping_month_year") + + clsGroupByListFunc.SetRCommand("list") + clsGroupByListFunc.AddParameter("group", clsRFunctionParameter:=clsGroupByMonthYearFunction, bIncludeArgumentName:=False) + clsListForOutlierManipulations.SetRCommand("list") clsListForOutlierManipulations.AddParameter("sub1", clsRFunctionParameter:=clsGroupByMonth, bIncludeArgumentName:=False, iPosition:=0) 'clsListForOutlierManipulations.AddParameter("sub2", clsRFunctionParameter:=clsRainyDaysFunc, bIncludeArgumentName:=False, iPosition:=1) @@ -404,7 +440,68 @@ Public Class dlgClimaticCheckDataRain clsOrOperator.bBrackets = True clsOrOperator.bToScriptAsRString = True - ' Run Calc funct + 'Dry Month Calculations + clsFilterMonthFunction.SetRCommand("instat_calculation$new") + clsFilterMonthFunction.AddParameter("type", Chr(34) & "filter" & Chr(34), iPosition:=0) + clsFilterMonthFunction.AddParameter("function_exp", clsROperatorParameter:=clsInOperator, iPosition:=1) + clsFilterMonthFunction.AddParameter("manipulations", clsRFunctionParameter:=clsGroupByListFunc, iPosition:=3) + clsFilterMonthFunction.SetAssignTo("filter_months") + + clsInOperator.SetOperation("%in%") + clsInOperator.AddParameter("not_month", clsROperatorParameter:=clsNotOperator, iPosition:=0) + clsInOperator.bBrackets = False + clsInOperator.bToScriptAsRString = True + + clsNotOperator.SetOperation("!") + clsNotOperator.bSpaceAroundOperation = False + clsNotOperator.AddParameter("space", "", iPosition:=0) + + clsDryMonthCalculationFunc.SetRCommand("instat_calculation$new") + clsDryMonthCalculationFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsDryMonthCalculationFunc.AddParameter("function_exp", clsROperatorParameter:=clsDryMonthAndOperator, iPosition:=1) + clsDryMonthCalculationFunc.AddParameter("manipulations", clsRFunctionParameter:=clsListCalcFunction, iPosition:=3) + clsDryMonthCalculationFunc.AddParameter("result_name", Chr(34) & strDryMonthCalc & Chr(34), iPosition:=4) + clsDryMonthCalculationFunc.SetAssignTo("dry_month_calculation") + + clsListCalcFunction.SetRCommand("list") + clsListCalcFunction.AddParameter("group", clsRFunctionParameter:=clsFilterMonthFunction, bIncludeArgumentName:=False) + + clsDryMonthEqualOperator.SetOperation("==") + clsDryMonthEqualOperator.AddParameter("sum", clsRFunctionParameter:=clsSumFuction, iPosition:=0) + clsDryMonthEqualOperator.AddParameter("zero", 0, iPosition:=1) + + clsSumFuction.SetRCommand("sum") + + clsLessOperator.SetOperation("<") + clsLessOperator.AddParameter("and", clsRFunctionParameter:=clsDrySumFuction, iPosition:=0) + clsLessOperator.AddParameter("limit", 0.05, iPosition:=1) + + clsDryMonthAndOperator.SetOperation("&") + clsDryMonthAndOperator.AddParameter("equal", clsROperatorParameter:=clsDryMonthEqualOperator, iPosition:=0) + clsDryMonthAndOperator.AddParameter("sum", clsROperatorParameter:=clsLessOperator, iPosition:=1) + clsDryMonthAndOperator.bToScriptAsRString = True + clsDryMonthAndOperator.bBrackets = False + + clsDrySumFuction.SetRCommand("sum") + + clsDryTestAndOperator.SetOperation("&") + clsDryTestAndOperator.AddParameter("!is.na", clsRFunctionParameter:=clsNotIsNaFunction, iPosition:=0) + clsDryTestAndOperator.AddParameter("dry", strDryMonthTestCalc, iPosition:=1) + clsDryTestAndOperator.bToScriptAsRString = True + + clsNotIsNaFunction.SetRCommand("!is.na") + + clsDryMonthTestCalculationFunc.SetRCommand("instat_calculation$new") + clsDryMonthTestCalculationFunc.AddParameter("type", Chr(34) & "calculation" & Chr(34), iPosition:=0) + clsDryMonthTestCalculationFunc.AddParameter("function_exp", clsROperatorParameter:=clsDryTestAndOperator, iPosition:=1) + clsDryMonthTestCalculationFunc.AddParameter("sub_calculations", clsRFunctionParameter:=clsListTestFunction, iPosition:=3) + clsDryMonthTestCalculationFunc.AddParameter("result_name", Chr(34) & "dry_month" & Chr(34), iPosition:=4) + clsDryMonthTestCalculationFunc.SetAssignTo("dry_month_test_calculation") + + clsListTestFunction.SetRCommand("list") + clsListTestFunction.AddParameter("sub1", clsRFunctionParameter:=clsDryMonthCalculationFunc, bIncludeArgumentName:=False) + + ' Run Calc function clsRunCalcFunc.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$run_instat_calculation") clsRunCalcFunc.AddParameter("calc", clsRFunctionParameter:=clsRainFilterFunc) clsRunCalcFunc.AddParameter("display", "FALSE") @@ -420,11 +517,16 @@ Public Class dlgClimaticCheckDataRain ucrReceiverElement.AddAdditionalCodeParameterPair(clsRainyDaysOperator, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=6) ucrReceiverElement.AddAdditionalCodeParameterPair(clsLowerOutlierLimitFunc, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=7) ucrReceiverElement.AddAdditionalCodeParameterPair(clsLowerOutlierOperator, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=8) + ucrReceiverElement.AddAdditionalCodeParameterPair(clsSumFuction, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=9) + ucrReceiverElement.AddAdditionalCodeParameterPair(clsNotIsNaFunction, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=10) + ucrReceiverElement.AddAdditionalCodeParameterPair(clsDrySumFuction, New RParameter("rain", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=11) ucrChkLarge.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("large", strParamValue:=clsLargeTestCalcFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) ucrChkSame.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("same", strParamValue:=clsSameTestFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) ucrChkWetDays.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("wet_days", strParamValue:=clsCumulativeTestFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) ucrChkOutlier.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("outlier", clsOutliersOperator, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) + ucrChkDryMonth.AddAdditionalCodeParameterPair(clsListSubCalc, New RParameter("dry_month", clsDryMonthCalculationFunc, bNewIncludeArgumentName:=False), iAdditionalPairNo:=1) + 'ucrChkCalculatedColumns.AddAdditionalCodeParameterPair(, New RParameter("save"), iAdditionalPairNo:=1) ucrChkCalculatedColumns.AddAdditionalCodeParameterPair(clsUpperOutlierLimitValueCalcFunc, New RParameter("save"), iAdditionalPairNo:=1) ucrChkCalculatedColumns.AddAdditionalCodeParameterPair(clsLowerOutlierLimitValueCalcFunc, New RParameter("save"), iAdditionalPairNo:=2) @@ -433,18 +535,22 @@ Public Class dlgClimaticCheckDataRain ucrChkLogicalColumns.AddAdditionalCodeParameterPair(clsCumulativeTestFunc, New RParameter("save"), iAdditionalPairNo:=2) ucrChkLogicalColumns.AddAdditionalCodeParameterPair(clsUpperOutlierlimitTestFunc, New RParameter("save"), iAdditionalPairNo:=3) ucrChkLogicalColumns.AddAdditionalCodeParameterPair(clsLowerOutlierlimitTestFunc, New RParameter("save"), iAdditionalPairNo:=4) + 'ucrChkLogicalColumns.AddAdditionalCodeParameterPair(clsDryMonthCalculationFunc, New RParameter("save"), iAdditionalPairNo:=5) ucrReceiverElement.SetRCode(clsLargeOperator, bReset) ucrNudLarge.SetRCode(clsLargeOperator, bReset) ucrNudSame.SetRCode(clsGreaterSameOperator, bReset) ucrNudWetDays.SetRCode(clsGreatOperator, bReset) + 'ucrReceiverMonth.SetRCode(clsNotEqualToOperator, bReset) ucrChkLarge.SetRCode(clsOrOperator, bReset) ucrChkSame.SetRCode(clsOrOperator, bReset) ucrChkWetDays.SetRCode(clsOrOperator, bReset) + ucrChkDryMonth.SetRCode(clsOrOperator, bReset) ucrChkOmitZero.SetRCode(clsUpperOutlierLimitFunc, bReset) ucrInputThresholdValue.SetRCode(clsUpperOutlierLimitFunc, bReset) ucrNudCoeff.SetRCode(clsUpperOutlierLimitFunc, bReset) + ucrInputThreshold.SetRCode(clsLessOperator, bReset) ucrChkOutlier.SetRCode(clsOrOperator, bReset) ucrNudSkewnessWeight.SetRCode(clsUpperOutlierLimitFunc, bReset) @@ -454,7 +560,7 @@ Public Class dlgClimaticCheckDataRain End Sub Private Sub TestOkEnabled() - If Not ucrReceiverElement.IsEmpty AndAlso ((ucrChkLarge.Checked AndAlso ucrNudLarge.GetText <> "") OrElse (ucrChkSame.Checked AndAlso ucrNudSame.GetText <> "") OrElse (ucrChkWetDays.Checked AndAlso ucrNudWetDays.GetText <> "") OrElse (ucrChkOutlier.Checked AndAlso ucrNudSkewnessWeight.GetText <> "" AndAlso ucrNudCoeff.GetText <> "")) Then + If Not ucrReceiverElement.IsEmpty AndAlso ((ucrChkLarge.Checked AndAlso ucrNudLarge.GetText <> "") OrElse (ucrChkSame.Checked AndAlso ucrNudSame.GetText <> "") OrElse (ucrChkWetDays.Checked AndAlso ucrNudWetDays.GetText <> "") OrElse (ucrChkOutlier.Checked AndAlso ucrNudSkewnessWeight.GetText <> "" AndAlso ucrNudCoeff.GetText <> "") OrElse (ucrChkDryMonth.Checked AndAlso Not ucrInputThreshold.IsEmpty AndAlso Not ucrReceiverMonth.IsEmpty)) Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -471,7 +577,6 @@ Public Class dlgClimaticCheckDataRain clsUpperOutlierlimitTestFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "= " & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) clsLowerOutlierlimitTestFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "= " & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) clsLowerOutlierLimitValueCalcFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "= " & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) - End Sub Private Sub GroupByOptions() @@ -486,16 +591,31 @@ Public Class dlgClimaticCheckDataRain Private Sub GroupByMonth() If Not ucrReceiverMonth.IsEmpty Then clsGroupByMonth.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverMonth.GetVariableNames & ")", iPosition:=1) + clsFilterMonthFunction.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverMonth.GetVariableNames & ")", iPosition:=2) clsUpperOutlierLimitValueCalcFunc.AddParameter("manipulations", clsRFunctionParameter:=clsListForOutlierManipulations, iPosition:=3) clsLowerOutlierLimitValueCalcFunc.AddParameter("manipulations", clsRFunctionParameter:=clsListForOutlierManipulations, iPosition:=3) Else clsUpperOutlierLimitValueCalcFunc.RemoveParameterByName("manipulations") clsLowerOutlierLimitValueCalcFunc.RemoveParameterByName("manipulations") End If + If Not ucrReceiverMonth.IsEmpty AndAlso Not ucrReceiverYear.IsEmpty Then + clsGroupByMonthYearFunction.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverMonth.GetVariableNames & "," & strCurrDataName & "=" & ucrReceiverYear.GetVariableNames & ")", iPosition:=1) + End If + End Sub + + Private Sub cmdOmitMonths_Click(sender As Object, e As EventArgs) Handles cmdOmitMonths.Click + sdgSelectMonth.SetRCode(clsNewInOperator:=clsInOperator, ucrNewReceiverMonth:=ucrReceiverMonth, bReset:=bResetSubdialog) + sdgSelectMonth.ShowDialog() + bResetSubdialog = True End Sub Private Sub RainyDays() clsRainyDaysFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) + clsDryMonthCalculationFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) + End Sub + + Private Sub DryMonths() + clsDryMonthTestCalculationFunc.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverMonth.GetVariableNames & "," & strCurrDataName & "=" & ucrReceiverElement.GetVariableNames & ")", iPosition:=2) End Sub Private Sub OutlierLimitCalc() @@ -508,9 +628,11 @@ Public Class dlgClimaticCheckDataRain TestOkEnabled() End Sub - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged, ucrReceiverMonth.ControlValueChanged + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged, ucrReceiverMonth.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrReceiverElement.ControlValueChanged + clsNotOperator.AddParameter("Month", ucrReceiverMonth.GetVariableNames(False), iPosition:=1) GroupByOptions() GroupByMonth() + DryMonths() End Sub Private Sub ucrSelectorRain_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorRain.ControlValueChanged @@ -541,7 +663,7 @@ Public Class dlgClimaticCheckDataRain End If End Sub - Private Sub ucrReceiverElement_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrChkLarge.ControlContentsChanged, ucrChkSame.ControlContentsChanged, ucrChkWetDays.ControlContentsChanged, ucrNudLarge.ControlContentsChanged, ucrNudSame.ControlContentsChanged, ucrNudWetDays.ControlContentsChanged, ucrChkOutlier.ControlContentsChanged, ucrChkOmitZero.ControlContentsChanged, ucrInputThresholdValue.ControlContentsChanged + Private Sub ucrReceiverElement_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElement.ControlContentsChanged, ucrChkLarge.ControlContentsChanged, ucrChkSame.ControlContentsChanged, ucrChkWetDays.ControlContentsChanged, ucrNudLarge.ControlContentsChanged, ucrNudSame.ControlContentsChanged, ucrNudWetDays.ControlContentsChanged, ucrChkOutlier.ControlContentsChanged, ucrChkOmitZero.ControlContentsChanged, ucrInputThresholdValue.ControlContentsChanged, ucrChkDryMonth.ControlContentsChanged, ucrInputThreshold.ControlContentsChanged, ucrReceiverMonth.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file diff --git a/instat/dlgConversions.Designer.vb b/instat/dlgConversions.Designer.vb index 4cb0b7f0dd1..315a9b2f25b 100644 --- a/instat/dlgConversions.Designer.vb +++ b/instat/dlgConversions.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgConversions Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,29 +20,346 @@ Partial Class dlgConversions '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(dlgConversions)) - Me.UcrButtons1 = New instat.ucrButtons() + Me.rdoDayLength = New System.Windows.Forms.RadioButton() + Me.rdoUnits = New System.Windows.Forms.RadioButton() + Me.lblElement = New System.Windows.Forms.Label() + Me.lblFrom = New System.Windows.Forms.Label() + Me.lblTo = New System.Windows.Forms.Label() + Me.lblDate = New System.Windows.Forms.Label() + Me.rdoColumn = New System.Windows.Forms.RadioButton() + Me.rdoSingleValue = New System.Windows.Forms.RadioButton() + Me.grpLatitude = New System.Windows.Forms.GroupBox() + Me.grpElements = New System.Windows.Forms.GroupBox() + Me.lblDecimal = New System.Windows.Forms.Label() + Me.rdoWindSpeed = New System.Windows.Forms.RadioButton() + Me.rdoRain = New System.Windows.Forms.RadioButton() + Me.rdoTemperature = New System.Windows.Forms.RadioButton() + Me.ucrInputLatitude = New instat.ucrInputTextBox() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrPnlLatitude = New instat.UcrPanel() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrSaveConversions = New instat.ucrSave() + Me.ucrReceiverElement = New instat.ucrReceiverSingle() + Me.ucrPnlConversions = New instat.UcrPanel() + Me.ucrSelectorConversions = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() + Me.ucrNudDecimal = New instat.ucrNud() + Me.ucrInputFromTemperature = New instat.ucrInputComboBox() + Me.ucrInputToWindSpeed = New instat.ucrInputComboBox() + Me.ucrInputToTemperature = New instat.ucrInputComboBox() + Me.ucrPnlElements = New instat.UcrPanel() + Me.ucrInputFromWindSpeed = New instat.ucrInputComboBox() + Me.ucrInputFromPrecipitation = New instat.ucrInputComboBox() + Me.ucrInputToPrecipitation = New instat.ucrInputComboBox() + Me.grpLatitude.SuspendLayout() + Me.grpElements.SuspendLayout() Me.SuspendLayout() ' - 'UcrButtons1 + 'rdoDayLength ' - resources.ApplyResources(Me.UcrButtons1, "UcrButtons1") - Me.UcrButtons1.Name = "UcrButtons1" + resources.ApplyResources(Me.rdoDayLength, "rdoDayLength") + Me.rdoDayLength.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoDayLength.FlatAppearance.BorderSize = 2 + Me.rdoDayLength.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoDayLength.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoDayLength.Name = "rdoDayLength" + Me.rdoDayLength.UseVisualStyleBackColor = True + ' + 'rdoUnits + ' + resources.ApplyResources(Me.rdoUnits, "rdoUnits") + Me.rdoUnits.Cursor = System.Windows.Forms.Cursors.Default + Me.rdoUnits.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoUnits.FlatAppearance.BorderSize = 2 + Me.rdoUnits.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoUnits.ForeColor = System.Drawing.SystemColors.ControlText + Me.rdoUnits.Name = "rdoUnits" + Me.rdoUnits.UseVisualStyleBackColor = True + ' + 'lblElement + ' + resources.ApplyResources(Me.lblElement, "lblElement") + Me.lblElement.Name = "lblElement" + ' + 'lblFrom + ' + resources.ApplyResources(Me.lblFrom, "lblFrom") + Me.lblFrom.Name = "lblFrom" + ' + 'lblTo + ' + resources.ApplyResources(Me.lblTo, "lblTo") + Me.lblTo.Name = "lblTo" + ' + 'lblDate + ' + resources.ApplyResources(Me.lblDate, "lblDate") + Me.lblDate.Name = "lblDate" + ' + 'rdoColumn + ' + resources.ApplyResources(Me.rdoColumn, "rdoColumn") + Me.rdoColumn.Name = "rdoColumn" + Me.rdoColumn.TabStop = True + Me.rdoColumn.UseVisualStyleBackColor = True + ' + 'rdoSingleValue + ' + resources.ApplyResources(Me.rdoSingleValue, "rdoSingleValue") + Me.rdoSingleValue.Name = "rdoSingleValue" + Me.rdoSingleValue.TabStop = True + Me.rdoSingleValue.UseVisualStyleBackColor = True + ' + 'grpLatitude + ' + Me.grpLatitude.Controls.Add(Me.ucrInputLatitude) + Me.grpLatitude.Controls.Add(Me.ucrReceiverLatitude) + Me.grpLatitude.Controls.Add(Me.rdoColumn) + Me.grpLatitude.Controls.Add(Me.rdoSingleValue) + Me.grpLatitude.Controls.Add(Me.ucrPnlLatitude) + resources.ApplyResources(Me.grpLatitude, "grpLatitude") + Me.grpLatitude.Name = "grpLatitude" + Me.grpLatitude.TabStop = False + ' + 'grpElements + ' + Me.grpElements.Controls.Add(Me.lblDecimal) + Me.grpElements.Controls.Add(Me.ucrNudDecimal) + Me.grpElements.Controls.Add(Me.rdoWindSpeed) + Me.grpElements.Controls.Add(Me.ucrInputFromTemperature) + Me.grpElements.Controls.Add(Me.rdoRain) + Me.grpElements.Controls.Add(Me.ucrInputToWindSpeed) + Me.grpElements.Controls.Add(Me.rdoTemperature) + Me.grpElements.Controls.Add(Me.ucrInputToTemperature) + Me.grpElements.Controls.Add(Me.ucrPnlElements) + Me.grpElements.Controls.Add(Me.ucrInputFromWindSpeed) + Me.grpElements.Controls.Add(Me.lblFrom) + Me.grpElements.Controls.Add(Me.ucrInputFromPrecipitation) + Me.grpElements.Controls.Add(Me.ucrInputToPrecipitation) + Me.grpElements.Controls.Add(Me.lblTo) + resources.ApplyResources(Me.grpElements, "grpElements") + Me.grpElements.Name = "grpElements" + Me.grpElements.TabStop = False + ' + 'lblDecimal + ' + resources.ApplyResources(Me.lblDecimal, "lblDecimal") + Me.lblDecimal.Name = "lblDecimal" + ' + 'rdoWindSpeed + ' + resources.ApplyResources(Me.rdoWindSpeed, "rdoWindSpeed") + Me.rdoWindSpeed.BackColor = System.Drawing.SystemColors.Control + Me.rdoWindSpeed.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoWindSpeed.FlatAppearance.BorderSize = 2 + Me.rdoWindSpeed.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoWindSpeed.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoWindSpeed.Name = "rdoWindSpeed" + Me.rdoWindSpeed.UseVisualStyleBackColor = True + ' + 'rdoRain + ' + resources.ApplyResources(Me.rdoRain, "rdoRain") + Me.rdoRain.BackColor = System.Drawing.SystemColors.Control + Me.rdoRain.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoRain.FlatAppearance.BorderSize = 2 + Me.rdoRain.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoRain.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoRain.Name = "rdoRain" + Me.rdoRain.UseVisualStyleBackColor = True + ' + 'rdoTemperature + ' + resources.ApplyResources(Me.rdoTemperature, "rdoTemperature") + Me.rdoTemperature.BackColor = System.Drawing.SystemColors.Control + Me.rdoTemperature.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTemperature.FlatAppearance.BorderSize = 2 + Me.rdoTemperature.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTemperature.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoTemperature.Name = "rdoTemperature" + Me.rdoTemperature.UseVisualStyleBackColor = True + ' + 'ucrInputLatitude + ' + Me.ucrInputLatitude.AddQuotesIfUnrecognised = True + Me.ucrInputLatitude.IsMultiline = False + Me.ucrInputLatitude.IsReadOnly = False + resources.ApplyResources(Me.ucrInputLatitude, "ucrInputLatitude") + Me.ucrInputLatitude.Name = "ucrInputLatitude" + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.frmParent = Nothing + resources.ApplyResources(Me.ucrReceiverLatitude, "ucrReceiverLatitude") + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrPnlLatitude + ' + resources.ApplyResources(Me.ucrPnlLatitude, "ucrPnlLatitude") + Me.ucrPnlLatitude.Name = "ucrPnlLatitude" + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.frmParent = Me + resources.ApplyResources(Me.ucrReceiverDate, "ucrReceiverDate") + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.strNcFilePath = "" + Me.ucrReceiverDate.ucrSelector = Nothing + ' + 'ucrSaveConversions + ' + resources.ApplyResources(Me.ucrSaveConversions, "ucrSaveConversions") + Me.ucrSaveConversions.Name = "ucrSaveConversions" + ' + 'ucrReceiverElement + ' + Me.ucrReceiverElement.frmParent = Me + resources.ApplyResources(Me.ucrReceiverElement, "ucrReceiverElement") + Me.ucrReceiverElement.Name = "ucrReceiverElement" + Me.ucrReceiverElement.Selector = Nothing + Me.ucrReceiverElement.strNcFilePath = "" + Me.ucrReceiverElement.ucrSelector = Nothing + ' + 'ucrPnlConversions + ' + resources.ApplyResources(Me.ucrPnlConversions, "ucrPnlConversions") + Me.ucrPnlConversions.Name = "ucrPnlConversions" + ' + 'ucrSelectorConversions + ' + Me.ucrSelectorConversions.bDropUnusedFilterLevels = False + Me.ucrSelectorConversions.bShowHiddenColumns = False + Me.ucrSelectorConversions.bUseCurrentFilter = True + resources.ApplyResources(Me.ucrSelectorConversions, "ucrSelectorConversions") + Me.ucrSelectorConversions.Name = "ucrSelectorConversions" + ' + 'ucrBase + ' + resources.ApplyResources(Me.ucrBase, "ucrBase") + Me.ucrBase.Name = "ucrBase" + ' + 'ucrNudDecimal + ' + Me.ucrNudDecimal.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimal.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudDecimal, "ucrNudDecimal") + Me.ucrNudDecimal.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDecimal.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDecimal.Name = "ucrNudDecimal" + Me.ucrNudDecimal.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputFromTemperature + ' + Me.ucrInputFromTemperature.AddQuotesIfUnrecognised = True + Me.ucrInputFromTemperature.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFromTemperature, "ucrInputFromTemperature") + Me.ucrInputFromTemperature.Name = "ucrInputFromTemperature" + ' + 'ucrInputToWindSpeed + ' + Me.ucrInputToWindSpeed.AddQuotesIfUnrecognised = True + Me.ucrInputToWindSpeed.IsReadOnly = False + resources.ApplyResources(Me.ucrInputToWindSpeed, "ucrInputToWindSpeed") + Me.ucrInputToWindSpeed.Name = "ucrInputToWindSpeed" + ' + 'ucrInputToTemperature + ' + Me.ucrInputToTemperature.AddQuotesIfUnrecognised = True + Me.ucrInputToTemperature.IsReadOnly = False + resources.ApplyResources(Me.ucrInputToTemperature, "ucrInputToTemperature") + Me.ucrInputToTemperature.Name = "ucrInputToTemperature" + ' + 'ucrPnlElements + ' + resources.ApplyResources(Me.ucrPnlElements, "ucrPnlElements") + Me.ucrPnlElements.Name = "ucrPnlElements" + ' + 'ucrInputFromWindSpeed + ' + Me.ucrInputFromWindSpeed.AddQuotesIfUnrecognised = True + Me.ucrInputFromWindSpeed.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFromWindSpeed, "ucrInputFromWindSpeed") + Me.ucrInputFromWindSpeed.Name = "ucrInputFromWindSpeed" + ' + 'ucrInputFromPrecipitation + ' + Me.ucrInputFromPrecipitation.AddQuotesIfUnrecognised = True + Me.ucrInputFromPrecipitation.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFromPrecipitation, "ucrInputFromPrecipitation") + Me.ucrInputFromPrecipitation.Name = "ucrInputFromPrecipitation" + ' + 'ucrInputToPrecipitation + ' + Me.ucrInputToPrecipitation.AddQuotesIfUnrecognised = True + Me.ucrInputToPrecipitation.IsReadOnly = False + resources.ApplyResources(Me.ucrInputToPrecipitation, "ucrInputToPrecipitation") + Me.ucrInputToPrecipitation.Name = "ucrInputToPrecipitation" ' 'dlgConversions ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.UcrButtons1) + Me.Controls.Add(Me.grpLatitude) + Me.Controls.Add(Me.lblDate) + Me.Controls.Add(Me.ucrReceiverDate) + Me.Controls.Add(Me.ucrSaveConversions) + Me.Controls.Add(Me.lblElement) + Me.Controls.Add(Me.ucrReceiverElement) + Me.Controls.Add(Me.rdoDayLength) + Me.Controls.Add(Me.rdoUnits) + Me.Controls.Add(Me.ucrPnlConversions) + Me.Controls.Add(Me.ucrSelectorConversions) + Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.grpElements) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgConversions" + Me.grpLatitude.ResumeLayout(False) + Me.grpLatitude.PerformLayout() + Me.grpElements.ResumeLayout(False) + Me.grpElements.PerformLayout() Me.ResumeLayout(False) + Me.PerformLayout() End Sub - Friend WithEvents UcrButtons1 As ucrButtons -End Class + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrSelectorConversions As ucrSelectorByDataFrameAddRemove + Friend WithEvents rdoDayLength As RadioButton + Friend WithEvents rdoUnits As RadioButton + Friend WithEvents ucrPnlConversions As UcrPanel + Friend WithEvents ucrReceiverElement As ucrReceiverSingle + Friend WithEvents lblElement As Label + Friend WithEvents lblTo As Label + Friend WithEvents lblFrom As Label + Friend WithEvents ucrInputToPrecipitation As ucrInputComboBox + Friend WithEvents ucrInputFromPrecipitation As ucrInputComboBox + Friend WithEvents ucrSaveConversions As ucrSave + Friend WithEvents lblDate As Label + Friend WithEvents ucrReceiverDate As ucrReceiverSingle + Friend WithEvents rdoColumn As RadioButton + Friend WithEvents rdoSingleValue As RadioButton + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrInputLatitude As ucrInputTextBox + Friend WithEvents ucrPnlLatitude As UcrPanel + Friend WithEvents ucrInputFromTemperature As ucrInputComboBox + Friend WithEvents ucrInputToWindSpeed As ucrInputComboBox + Friend WithEvents ucrInputToTemperature As ucrInputComboBox + Friend WithEvents ucrInputFromWindSpeed As ucrInputComboBox + Friend WithEvents grpLatitude As GroupBox + Friend WithEvents grpElements As GroupBox + Friend WithEvents ucrPnlElements As UcrPanel + Friend WithEvents rdoWindSpeed As RadioButton + Friend WithEvents rdoRain As RadioButton + Friend WithEvents rdoTemperature As RadioButton + Friend WithEvents lblDecimal As Label + Friend WithEvents ucrNudDecimal As ucrNud +End Class \ No newline at end of file diff --git a/instat/dlgConversions.resx b/instat/dlgConversions.resx index 7783d05f5e3..2831de4d7d9 100644 --- a/instat/dlgConversions.resx +++ b/instat/dlgConversions.resx @@ -117,29 +117,705 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Button + + + None + - - 10, 262 + + MiddleCenter - - 410, 52 + + Flat + + + NoControl + + + 207, 21 + + + 91, 28 - + + 2 + + + Day Length + + + MiddleCenter + + + rdoDayLength + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + Button + + + Flat + + + NoControl + + + 119, 21 + + + 91, 28 + + + 1 + + + Units + + + MiddleCenter + + + rdoUnits + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + True + + + NoControl + + + 262, 97 + + + 48, 13 + + + 4 + + + Element: + + + lblElement + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + NoControl + + + 6, 59 + + + 33, 13 + + + 15 + + + From: + + + lblFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 10 + + + True + + + NoControl + + + 148, 59 + + + 23, 13 + + + 17 + + + To: + + + lblTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 13 + + + True + + + NoControl + + + 265, 97 + + + 33, 13 + + + 8 + + + Date: + + + lblDate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + NoControl + + + 7, 61 + + + 63, 17 + + + 28 + + + Column: + + + rdoColumn + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLatitude + + + 2 + + + True + + + NoControl + + + 7, 34 + + + 87, 17 + + + 27 + + + Single Value: + + + rdoSingleValue + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLatitude + + + 3 + + + 100, 34 + + + 67, 21 + + + 27 + + + ucrInputLatitude + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLatitude + + 0 - - UcrButtons1 + + 100, 61 - - instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 0, 0, 0, 0 + + + 138, 20 + + + 29 + + + ucrReceiverLatitude + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLatitude + + + 1 + + + 7, 34 + + + 87, 48 + + + 26 - + + ucrPnlLatitude + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLatitude + + + 4 + + + 10, 267 + + + 248, 100 + + + 25 + + + Latitude + + + grpLatitude + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - + 0 + + True + + + NoControl + + + 290, 78 + + + 45, 13 + + + 23 + + + Decimal + + + lblDecimal + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 0 + + + 345, 75 + + + 39, 20 + + + 24 + + + ucrNudDecimal + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 1 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 242, 17 + + + 91, 28 + + + 17 + + + Wind Speed + + + MiddleCenter + + + rdoWindSpeed + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 2 + + + 9, 75 + + + 117, 21 + + + 19 + + + ucrInputFromTemperature + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 3 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 64, 17 + + + 91, 28 + + + 15 + + + Rain + + + MiddleCenter + + + rdoRain + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 4 + + + 153, 75 + + + 117, 21 + + + 22 + + + ucrInputToWindSpeed + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 5 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 153, 17 + + + 91, 28 + + + 16 + + + Temperature + + + MiddleCenter + + + rdoTemperature + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpElements + + + 6 + + + 153, 75 + + + 117, 21 + + + 20 + + + ucrInputToTemperature + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 7 + + + 64, 12 + + + 269, 40 + + + 11 + + + ucrPnlElements + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 8 + + + 9, 75 + + + 117, 21 + + + 21 + + + ucrInputFromWindSpeed + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 9 + + + 9, 75 + + + 117, 21 + + + 16 + + + ucrInputFromPrecipitation + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 11 + + + 153, 75 + + + 117, 21 + + + 18 + + + ucrInputToPrecipitation + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 12 + + + 10, 268 + + + 397, 106 + + + 10 + + + Elements + + + grpElements + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 11 + True @@ -147,9 +823,122 @@ 6, 13 - 419, 314 + 418, 503 + + + 12, 410 + + + 230, 24 + + + 30 + + + ucrSaveConversions + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 3 + + + 265, 115 + + + 0, 0, 0, 0 + + + 120, 20 + + + 5 + + + ucrReceiverElement + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 5 + + + 109, 21 + + + 200, 28 + + + 0 + + + ucrPnlConversions + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 8 + + + 9, 69 + + + 0, 0, 0, 0 + + + 210, 180 + + + 3 + + + ucrSelectorConversions + + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 9 + + + 10, 447 + + + 410, 52 + + + 31 + + + ucrBase + + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 10 + + + NoControl - CenterScreen @@ -162,4 +951,28 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 265, 115 + + + 0, 0, 0, 0 + + + 120, 20 + + + 9 + + + ucrReceiverDate + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 2 + \ No newline at end of file diff --git a/instat/dlgConversions.vb b/instat/dlgConversions.vb index eaab16485d0..02ba0100b87 100644 --- a/instat/dlgConversions.vb +++ b/instat/dlgConversions.vb @@ -1,3 +1,282 @@ -Public Class dlgConversions +' 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 dlgConversions + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private clsPrecipitationFunction, clsTemperatureFunction, clsWindSpeedFunction As New RFunction + Private clsDayLengthFunction As New RFunction + + Private Sub dlgConversions_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeforControls(bReset) + bReset = False + autoTranslate(Me) + TestOkEnabled() + End Sub + + Private Sub InitialiseDialog() + Dim dctPrecipitationUnits As New Dictionary(Of String, String) + Dim dctTemperatureUnits As New Dictionary(Of String, String) + Dim dctWindSpeedUnits As New Dictionary(Of String, String) + + Dim lstLabels As New List(Of Control) + lstLabels.AddRange({lblFrom, lblTo, lblDecimal}) + + ucrPnlConversions.AddRadioButton(rdoUnits) + ucrPnlConversions.AddRadioButton(rdoDayLength) + + ucrPnlConversions.AddFunctionNamesCondition(rdoUnits, {"convert_precip", "convert_temperature", "convert_wind_speed"}) + ucrPnlConversions.AddFunctionNamesCondition(rdoDayLength, "daylength") + + ucrPnlLatitude.AddRadioButton(rdoSingleValue) + ucrPnlLatitude.AddRadioButton(rdoColumn) + + ucrPnlElements.AddRadioButton(rdoRain) + ucrPnlElements.AddRadioButton(rdoTemperature) + ucrPnlElements.AddRadioButton(rdoWindSpeed) + + ucrPnlElements.AddFunctionNamesCondition(rdoRain, "convert_precip") + ucrPnlElements.AddFunctionNamesCondition(rdoTemperature, "convert_temperature") + ucrPnlElements.AddFunctionNamesCondition(rdoWindSpeed, "convert_wind_speed") + + ucrReceiverElement.SetParameter(New RParameter("precip", 0)) + ucrReceiverElement.bWithQuotes = False + ucrReceiverElement.SetParameterIsRFunction() + ucrReceiverElement.Selector = ucrSelectorConversions + + ucrReceiverDate.SetParameter(New RParameter("doy", 2)) + ucrReceiverDate.SetParameterIsRFunction() + ucrReceiverDate.Selector = ucrSelectorConversions + + ucrReceiverLatitude.SetParameter(New RParameter("lat", 1)) + ucrReceiverLatitude.bWithQuotes = False + ucrReceiverLatitude.SetParameterIsRFunction() + ucrReceiverLatitude.Selector = ucrSelectorConversions + + ucrInputLatitude.SetValidationTypeAsNumeric(dcmMin:=-90, dcmMax:=90) + + + ucrInputFromPrecipitation.SetParameter(New RParameter("old_metric", 1)) + dctPrecipitationUnits.Add("cm", Chr(34) & "cm" & Chr(34)) + dctPrecipitationUnits.Add("inches", Chr(34) & "inches" & Chr(34)) + dctPrecipitationUnits.Add("mm", Chr(34) & "mm" & Chr(34)) + ucrInputFromPrecipitation.SetItems(dctPrecipitationUnits) + ucrInputFromPrecipitation.SetDropDownStyleAsNonEditable() + + ucrInputToPrecipitation.SetParameter(New RParameter("new_metric", 2)) + ucrInputToPrecipitation.SetItems(dctPrecipitationUnits) + ucrInputToPrecipitation.SetDropDownStyleAsNonEditable() + + ucrInputFromTemperature.SetParameter(New RParameter("old_metric", 1)) + dctTemperatureUnits.Add("Celsius", Chr(34) & "celsius" & Chr(34)) + dctTemperatureUnits.Add("Fahrenheit", Chr(34) & "fahrenheit" & Chr(34)) + dctTemperatureUnits.Add("Kelvin", Chr(34) & "kelvin" & Chr(34)) + ucrInputFromTemperature.SetItems(dctTemperatureUnits) + ucrInputFromTemperature.SetDropDownStyleAsNonEditable() + + ucrInputToTemperature.SetParameter(New RParameter("new_metric", 2)) + ucrInputToTemperature.SetItems(dctTemperatureUnits) + ucrInputToTemperature.SetDropDownStyleAsNonEditable() + + ucrInputFromWindSpeed.SetParameter(New RParameter("old_metric", 1)) + dctWindSpeedUnits.Add("Feet per second (ftps)", Chr(34) & "ftps" & Chr(34)) + dctWindSpeedUnits.Add("Kilometres per hour (kmph)", Chr(34) & "kmph" & Chr(34)) + dctWindSpeedUnits.Add("Knots", Chr(34) & "knots" & Chr(34)) + dctWindSpeedUnits.Add("Metres per second (mps)", Chr(34) & "mps" & Chr(34)) + dctWindSpeedUnits.Add("Miles per hour (mph)", Chr(34) & "mph" & Chr(34)) + ucrInputFromWindSpeed.SetItems(dctWindSpeedUnits) + ucrInputFromWindSpeed.SetDropDownStyleAsNonEditable() + + ucrInputToWindSpeed.SetParameter(New RParameter("new_metric", 2)) + ucrInputToWindSpeed.SetItems(dctWindSpeedUnits) + ucrInputToWindSpeed.SetDropDownStyleAsNonEditable() + + ucrNudDecimal.SetParameter(New RParameter("round", 3)) + ucrNudDecimal.SetMinMax(0, 5) + + ucrPnlConversions.AddToLinkedControls(ucrReceiverElement, {rdoUnits}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlConversions.AddToLinkedControls(ucrNudDecimal, {rdoUnits}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlConversions.AddToLinkedControls(ucrPnlElements, {rdoUnits}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoRain) + + ucrPnlConversions.AddToLinkedControls(ucrReceiverDate, {rdoDayLength}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlConversions.AddToLinkedControls(ucrPnlLatitude, {rdoDayLength}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=rdoSingleValue) + + ucrPnlLatitude.AddToLinkedControls(ucrInputLatitude, {rdoSingleValue}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlLatitude.AddToLinkedControls(ucrReceiverLatitude, {rdoColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrPnlElements.AddToLinkedControls(ucrInputFromPrecipitation, {rdoRain}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlElements.AddToLinkedControls(ucrInputToPrecipitation, {rdoRain}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlElements.AddToLinkedControls(ucrInputFromTemperature, {rdoTemperature}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Kelvin") + ucrPnlElements.AddToLinkedControls(ucrInputToTemperature, {rdoTemperature}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Celsius") + ucrPnlElements.AddToLinkedControls(ucrInputFromWindSpeed, {rdoWindSpeed}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Knots") + ucrPnlElements.AddToLinkedControls(ucrInputToWindSpeed, {rdoWindSpeed}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Metres per second (mps)") + + ucrReceiverElement.SetLinkedDisplayControl(lblElement) + ucrNudDecimal.SetLinkedDisplayControl(lstLabels) + ucrReceiverDate.SetLinkedDisplayControl(lblDate) + ucrPnlLatitude.SetLinkedDisplayControl(grpLatitude) + ucrPnlElements.SetLinkedDisplayControl(grpElements) + + ucrSaveConversions.SetLabelText("Result into:") + ucrSaveConversions.SetSaveTypeAsColumn() + ucrSaveConversions.SetIsTextBox() + ucrSaveConversions.SetDataFrameSelector(ucrSelectorConversions.ucrAvailableDataFrames) + ucrSaveConversions.SetPrefix("Conversion") + End Sub + + Private Sub SetDefaults() + clsPrecipitationFunction = New RFunction + clsTemperatureFunction = New RFunction + clsWindSpeedFunction = New RFunction + clsDayLengthFunction = New RFunction + + ucrSelectorConversions.Reset() + ucrSaveConversions.Reset() + ucrInputLatitude.SetName("") + ucrReceiverElement.SetMeAsReceiver() + + clsPrecipitationFunction.SetPackageName("weathermetrics") + clsPrecipitationFunction.SetRCommand("convert_precip") + clsPrecipitationFunction.AddParameter("round", 1, iPosition:=3) + clsPrecipitationFunction.AddParameter("old_metric", Chr(34) & "inches" & Chr(34), iPosition:=1) + clsPrecipitationFunction.AddParameter("new_metric", Chr(34) & "mm" & Chr(34), iPosition:=2) + + clsTemperatureFunction.SetPackageName("weathermetrics") + clsTemperatureFunction.SetRCommand("convert_temperature") + + clsWindSpeedFunction.SetPackageName("weathermetrics") + clsWindSpeedFunction.SetRCommand("convert_wind_speed") + + clsDayLengthFunction.SetPackageName("geosphere") + clsDayLengthFunction.SetRCommand("daylength") + + clsPrecipitationFunction.SetAssignTo(ucrSaveConversions.GetText, strTempDataframe:=ucrSelectorConversions.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveConversions.GetText, bAssignToIsPrefix:=True) + ucrBase.clsRsyntax.SetBaseRFunction(clsPrecipitationFunction) + End Sub + + Private Sub SetRCodeforControls(bReset As Boolean) + ucrReceiverElement.AddAdditionalCodeParameterPair(clsTemperatureFunction, (New RParameter("temperature", 0)), iAdditionalPairNo:=1) + ucrReceiverElement.AddAdditionalCodeParameterPair(clsWindSpeedFunction, (New RParameter("wind_speed", 0)), iAdditionalPairNo:=2) + ucrNudDecimal.AddAdditionalCodeParameterPair(clsTemperatureFunction, (New RParameter("round", 3)), iAdditionalPairNo:=1) + ucrNudDecimal.AddAdditionalCodeParameterPair(clsWindSpeedFunction, (New RParameter("round", 3)), iAdditionalPairNo:=2) + ucrSaveConversions.AddAdditionalRCode(clsTemperatureFunction, iAdditionalPairNo:=1) + ucrSaveConversions.AddAdditionalRCode(clsWindSpeedFunction, iAdditionalPairNo:=2) + ucrSaveConversions.AddAdditionalRCode(clsDayLengthFunction, iAdditionalPairNo:=3) + + ucrSaveConversions.SetRCode(clsPrecipitationFunction, bReset) + ucrReceiverElement.SetRCode(clsPrecipitationFunction, bReset) + ucrInputFromPrecipitation.SetRCode(clsPrecipitationFunction, bReset) + ucrInputToPrecipitation.SetRCode(clsPrecipitationFunction, bReset) + ucrInputFromTemperature.SetRCode(clsTemperatureFunction, bReset) + ucrInputToTemperature.SetRCode(clsTemperatureFunction, bReset) + ucrInputFromWindSpeed.SetRCode(clsWindSpeedFunction, bReset) + ucrInputToWindSpeed.SetRCode(clsWindSpeedFunction, bReset) + ucrNudDecimal.SetRCode(clsPrecipitationFunction, bReset) + If bReset Then + ucrPnlConversions.SetRCode(clsPrecipitationFunction, bReset) + End If + ucrReceiverDate.SetRCode(clsDayLengthFunction, bReset) + ucrReceiverLatitude.SetRCode(clsDayLengthFunction, bReset) + End Sub + + Private Sub TestOkEnabled() + If rdoUnits.Checked AndAlso Not ucrReceiverElement.IsEmpty AndAlso ucrNudDecimal.GetText <> "" AndAlso ucrSaveConversions.IsComplete Then + If rdoRain.Checked AndAlso ucrInputFromPrecipitation.GetText <> ucrInputToPrecipitation.GetText Then + ucrBase.OKEnabled(True) + ElseIf rdoTemperature.Checked AndAlso ucrInputFromTemperature.GetText <> ucrInputToTemperature.GetText Then + ucrBase.OKEnabled(True) + ElseIf rdoWindSpeed.Checked AndAlso ucrInputFromWindSpeed.GetText <> ucrInputToWindSpeed.GetText Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If + ElseIf rdoDayLength.Checked AndAlso Not ucrReceiverDate.IsEmpty AndAlso ((rdoSingleValue.Checked AndAlso Not ucrInputLatitude.IsEmpty) OrElse (rdoColumn.Checked AndAlso Not ucrReceiverLatitude.IsEmpty)) Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeforControls(True) + TestOkEnabled() + End Sub + + Private Sub SetBaseFunction() + If rdoRain.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsPrecipitationFunction) + ElseIf rdoTemperature.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsTemperatureFunction) + ElseIf rdoWindSpeed.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsWindSpeedFunction) + End If + End Sub + + Private Sub ucrPnlLatitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlLatitude.ControlValueChanged + If rdoDayLength.Checked Then + If rdoColumn.Checked Then + ucrReceiverLatitude.SetMeAsReceiver() + ElseIf rdoSingleValue.Checked Then + ucrReceiverDate.SetMeAsReceiver() + End If + End If + ChangeLatParameter() + End Sub + + Private Sub ucrPnlConversions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlConversions.ControlValueChanged + If rdoDayLength.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsDayLengthFunction) + ucrReceiverDate.SetMeAsReceiver() + ucrSaveConversions.SetPrefix("day_length") + ElseIf rdoUnits.Checked Then + SetBaseFunction() + ucrReceiverElement.SetMeAsReceiver() + ucrSaveConversions.SetPrefix("Conversion") + End If + ChangeLatParameter() + End Sub + + Private Sub ucrPnlElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlElements.ControlValueChanged + SetBaseFunction() + End Sub + + Private Sub ChangeLatParameter() + 'This is done since the "lat" parameter is being given by two controls (ucrReceiverLatitude and ucrInputLatitude) + 'TODO: There should be a better way to do this (setting same parameter by more than one control) + If rdoSingleValue.Checked AndAlso ucrInputLatitude.GetText <> "" Then + clsDayLengthFunction.AddParameter("lat", ucrInputLatitude.GetText, iPosition:=0) + ElseIf Not rdoSingleValue.Checked AndAlso ucrInputLatitude.IsEmpty Then + clsDayLengthFunction.RemoveParameterByPosition(0) + End If + End Sub + + Private Sub ucrInputLatitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputLatitude.ControlValueChanged, ucrPnlLatitude.ControlValueChanged + ChangeLatParameter() + End Sub + + Private Sub ucrPnlConversions_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlConversions.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrSaveConversions.ControlContentsChanged, ucrNudDecimal.ControlContentsChanged, ucrPnlLatitude.ControlContentsChanged, ucrInputLatitude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, ucrInputFromPrecipitation.ControlContentsChanged, ucrInputToPrecipitation.ControlContentsChanged, ucrInputFromTemperature.ControlContentsChanged, ucrInputToTemperature.ControlContentsChanged, ucrInputFromWindSpeed.ControlContentsChanged, ucrInputToWindSpeed.ControlContentsChanged, ucrPnlElements.ControlContentsChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgImportShapeFiles.vb b/instat/dlgImportShapeFiles.vb index f521bd4ca79..65a14639008 100644 --- a/instat/dlgImportShapeFiles.vb +++ b/instat/dlgImportShapeFiles.vb @@ -22,8 +22,10 @@ Public Class dlgImportShapeFiles Private bReset As Boolean = True Private bFromLibrary As Boolean = False Private strFilePath As String = "" + Private clsPipeOperator As New ROperator Private strLibraryPath As String = Path.Combine(frmMain.strStaticPath, "Library", "Climatic", "Shapefiles/") Private clsReadShapeFiles As New RFunction + Private clsMutateFunction, clsMapdblFunction, clsMapdbl2Function, clsStCentroidFunction As New RFunction Private Sub dlgImportShapeFiles_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -53,14 +55,44 @@ Public Class dlgImportShapeFiles Private Sub SetDefaults() clsReadShapeFiles = New RFunction + clsMapdblFunction = New RFunction + clsMutateFunction = New RFunction + clsStCentroidFunction = New RFunction + clsMapdbl2Function = New RFunction + clsPipeOperator = New ROperator ucrSaveDataframeName.SetName("") + + clsReadShapeFiles.SetPackageName("sf") clsReadShapeFiles.SetRCommand("st_read") clsReadShapeFiles.AddParameter("quiet", "TRUE", iPosition:=1) - ucrBase.clsRsyntax.SetBaseRFunction(clsReadShapeFiles) + clsMutateFunction.SetPackageName("dplyr") + clsMutateFunction.SetRCommand("mutate") + clsMutateFunction.AddParameter("lon", clsRFunctionParameter:=clsMapdblFunction, iPosition:=1) + clsMutateFunction.AddParameter("lat", clsRFunctionParameter:=clsMapdbl2Function, iPosition:=2) + + clsMapdblFunction.SetPackageName("purrr") + clsMapdblFunction.SetRCommand("map_dbl") + clsMapdblFunction.AddParameter("geometry", "geometry", bIncludeArgumentName:=False, iPosition:=0) + clsMapdblFunction.AddParameter("st_centroid", "~sf::st_centroid(.x)[[1]]", bIncludeArgumentName:=False, iPosition:=1) + + clsMapdbl2Function.SetPackageName("purrr") + clsMapdbl2Function.SetRCommand("map_dbl") + clsMapdbl2Function.AddParameter("geometry", "geometry", bIncludeArgumentName:=False, iPosition:=0) + clsMapdbl2Function.AddParameter("st_centroid", "~sf::st_centroid(.x)[[2]]", bIncludeArgumentName:=False, iPosition:=1) + + clsStCentroidFunction.SetPackageName("sf") + clsStCentroidFunction.SetRCommand("st_centroid") + + clsPipeOperator.SetOperation("%>%") + clsPipeOperator.AddParameter("st_read", clsRFunctionParameter:=clsReadShapeFiles, bIncludeArgumentName:=False, iPosition:=0) + clsPipeOperator.AddParameter("mutate", clsRFunctionParameter:=clsMutateFunction, bIncludeArgumentName:=False, iPosition:=1) + + + ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) End Sub Public Sub GetFileFromOpenDialog() @@ -97,7 +129,7 @@ Public Class dlgImportShapeFiles End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrSaveDataframeName.SetRCode(clsReadShapeFiles, bReset) + ucrSaveDataframeName.SetRCode(clsPipeOperator, bReset) End Sub Private Sub TestOkEnabled() diff --git a/instat/dlgOneWayFrequencies.Designer.vb b/instat/dlgOneWayFrequencies.Designer.vb index f65cc604938..da645124e38 100644 --- a/instat/dlgOneWayFrequencies.Designer.vb +++ b/instat/dlgOneWayFrequencies.Designer.vb @@ -59,7 +59,12 @@ Partial Class dlgOneWayFrequencies Me.ucrSelectorOneWayFreq = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverOneWayFreq = New instat.ucrReceiverMultiple() Me.ucrSaveGraph = New instat.ucrSave() + Me.grpOutput = New System.Windows.Forms.GroupBox() + Me.rdoAsHtml = New System.Windows.Forms.RadioButton() + Me.rdoAsText = New System.Windows.Forms.RadioButton() + Me.ucrPnlOutput = New instat.UcrPanel() Me.grpSort.SuspendLayout() + Me.grpOutput.SuspendLayout() Me.SuspendLayout() ' 'grpSort @@ -185,6 +190,7 @@ Partial Class dlgOneWayFrequencies ' 'ucrSelectorOneWayFreq ' + Me.ucrSelectorOneWayFreq.bDropUnusedFilterLevels = False Me.ucrSelectorOneWayFreq.bShowHiddenColumns = False Me.ucrSelectorOneWayFreq.bUseCurrentFilter = True resources.ApplyResources(Me.ucrSelectorOneWayFreq, "ucrSelectorOneWayFreq") @@ -204,10 +210,37 @@ Partial Class dlgOneWayFrequencies resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") Me.ucrSaveGraph.Name = "ucrSaveGraph" ' + 'grpOutput + ' + Me.grpOutput.Controls.Add(Me.rdoAsHtml) + Me.grpOutput.Controls.Add(Me.rdoAsText) + Me.grpOutput.Controls.Add(Me.ucrPnlOutput) + resources.ApplyResources(Me.grpOutput, "grpOutput") + Me.grpOutput.Name = "grpOutput" + Me.grpOutput.TabStop = False + ' + 'rdoAsHtml + ' + resources.ApplyResources(Me.rdoAsHtml, "rdoAsHtml") + Me.rdoAsHtml.Name = "rdoAsHtml" + Me.rdoAsHtml.UseVisualStyleBackColor = True + ' + 'rdoAsText + ' + resources.ApplyResources(Me.rdoAsText, "rdoAsText") + Me.rdoAsText.Name = "rdoAsText" + Me.rdoAsText.UseVisualStyleBackColor = True + ' + 'ucrPnlOutput + ' + resources.ApplyResources(Me.ucrPnlOutput, "ucrPnlOutput") + Me.ucrPnlOutput.Name = "ucrPnlOutput" + ' 'dlgOneWayFrequencies ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.grpOutput) Me.Controls.Add(Me.ucrSaveGraph) Me.Controls.Add(Me.ucrReceiverOneWayFreq) Me.Controls.Add(Me.rdoBoth) @@ -230,6 +263,8 @@ Partial Class dlgOneWayFrequencies Me.Name = "dlgOneWayFrequencies" Me.grpSort.ResumeLayout(False) Me.grpSort.PerformLayout() + Me.grpOutput.ResumeLayout(False) + Me.grpOutput.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -255,4 +290,8 @@ Partial Class dlgOneWayFrequencies Friend WithEvents rdoBoth As RadioButton Friend WithEvents ucrReceiverOneWayFreq As ucrReceiverMultiple Friend WithEvents ucrSaveGraph As ucrSave + Friend WithEvents grpOutput As GroupBox + Friend WithEvents rdoAsHtml As RadioButton + Friend WithEvents rdoAsText As RadioButton + Friend WithEvents ucrPnlOutput As UcrPanel End Class diff --git a/instat/dlgOneWayFrequencies.resx b/instat/dlgOneWayFrequencies.resx index 9d4d43a9f26..adb2696095b 100644 --- a/instat/dlgOneWayFrequencies.resx +++ b/instat/dlgOneWayFrequencies.resx @@ -222,10 +222,10 @@ 3 - 269, 201 + 258, 201 - 163, 95 + 153, 88 7 @@ -243,7 +243,7 @@ $this - 13 + 14 10, 228 @@ -267,7 +267,7 @@ $this - 12 + 13 True @@ -294,7 +294,7 @@ $this - 11 + 12 @@ -328,7 +328,7 @@ $this - 3 + 4 Button @@ -361,7 +361,7 @@ $this - 5 + 6 Button @@ -394,7 +394,7 @@ $this - 2 + 3 131, 279 @@ -415,7 +415,7 @@ $this - 4 + 5 53, 6 @@ -436,7 +436,7 @@ $this - 6 + 7 10, 280 @@ -457,7 +457,7 @@ $this - 7 + 8 True @@ -466,7 +466,112 @@ 6, 13 - 434, 408 + 447, 449 + + + True + + + NoControl + + + 10, 43 + + + 102, 17 + + + 2 + + + HTML (Browser) + + + rdoAsHtml + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpOutput + + + 0 + + + True + + + NoControl + + + 10, 21 + + + 129, 17 + + + 1 + + + Text (Output Window) + + + rdoAsText + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpOutput + + + 1 + + + 3, 16 + + + 143, 53 + + + 0 + + + ucrPnlOutput + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpOutput + + + 2 + + + 258, 302 + + + 153, 75 + + + 16 + + + Output + + + grpOutput + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 10, 328 @@ -487,7 +592,7 @@ $this - 0 + 1 269, 95 @@ -511,7 +616,7 @@ $this - 1 + 2 10, 256 @@ -532,7 +637,7 @@ $this - 9 + 10 10, 304 @@ -553,10 +658,10 @@ $this - 10 + 11 - 10, 352 + 10, 396 410, 52 @@ -574,7 +679,7 @@ $this - 14 + 15 10, 45 @@ -598,7 +703,7 @@ $this - 15 + 16 CenterScreen @@ -634,6 +739,6 @@ $this - 8 + 9 \ No newline at end of file diff --git a/instat/dlgOneWayFrequencies.vb b/instat/dlgOneWayFrequencies.vb index e4d498845ab..5d5846a76c3 100644 --- a/instat/dlgOneWayFrequencies.vb +++ b/instat/dlgOneWayFrequencies.vb @@ -14,14 +14,12 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports instat Imports instat.Translations - Public Class dlgOneWayFrequencies Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private bResetSubdialog As Boolean = False - Private clsSjTab As New RFunction + Private clsSjMiscFrq As New RFunction Private clsSjPlot, clsPlotGrid As New RFunction Public strDefaultDataFrame As String = "" Public strDefaultColumns() As String = Nothing @@ -44,7 +42,7 @@ Public Class dlgOneWayFrequencies Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 518 - ucrReceiverOneWayFreq.SetParameter(New RParameter("data", 0)) + ucrReceiverOneWayFreq.SetParameter(New RParameter("x", 0)) ucrReceiverOneWayFreq.SetParameterIsRFunction() ucrReceiverOneWayFreq.bForceAsDataFrame = True ucrReceiverOneWayFreq.Selector = ucrSelectorOneWayFreq @@ -59,7 +57,7 @@ Public Class dlgOneWayFrequencies ucrReceiverWeights.SetDataType("numeric") ucrReceiverWeights.strSelectorHeading = "Numerics" - ucrPnlSort.SetParameter(New RParameter("sort.frq", 3)) + ucrPnlSort.SetParameter(New RParameter("sort.frq", 2)) ucrPnlSort.AddRadioButton(rdoNone, Chr(34) & "none" & Chr(34)) ucrPnlSort.AddRadioButton(rdoAscendingFrequencies, Chr(34) & "asc" & Chr(34)) ucrPnlSort.AddRadioButton(rdoDescendingFrequencies, Chr(34) & "desc" & Chr(34)) @@ -74,14 +72,20 @@ Public Class dlgOneWayFrequencies ucrPnlFrequencies.AddRadioButton(rdoBoth) 'setting rdoGraph and rdoTable - ucrPnlFrequencies.AddFunctionNamesCondition(rdoTable, "sjtab") + ucrPnlFrequencies.AddFunctionNamesCondition(rdoTable, "frq") ucrPnlFrequencies.AddFunctionNamesCondition(rdoGraph, "plot_grid") 'TODO be able to have conditions across multiple functions + ucrPnlOutput.SetParameter(New RParameter("out", 7)) + ucrPnlOutput.AddRadioButton(rdoAsText, Chr(34) & "txt" & Chr(34)) + ucrPnlOutput.AddRadioButton(rdoAsHtml, Chr(34) & "viewer" & Chr(34)) + ucrPnlFrequencies.AddToLinkedControls(ucrChkFlip, {rdoGraph, rdoBoth}, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencies.AddToLinkedControls(ucrSaveGraph, {rdoGraph, rdoBoth}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencies.AddToLinkedControls(ucrPnlOutput, {rdoTable, rdoBoth}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOutput.SetLinkedDisplayControl(grpOutput) - ucrNudGroups.SetParameter(New RParameter("auto.group", 9)) + ucrNudGroups.SetParameter(New RParameter("auto.grp", 9)) ucrNudGroups.SetMinMax(2, 100) ucrNudGroups.Increment = 5 @@ -105,7 +109,7 @@ Public Class dlgOneWayFrequencies End Sub Private Sub SetDefaults() - clsSjTab = New RFunction + clsSjMiscFrq = New RFunction clsSjPlot = New RFunction clsPlotGrid = New RFunction @@ -118,18 +122,15 @@ Public Class dlgOneWayFrequencies clsPlotGrid.AddParameter("x", clsRFunctionParameter:=clsSjPlot) - clsSjTab.SetPackageName("sjPlot") - clsSjTab.SetRCommand("sjtab") + clsSjMiscFrq.SetPackageName("sjmisc") + clsSjMiscFrq.SetRCommand("frq") + clsSjMiscFrq.AddParameter("out", Chr(34) & "txt" & Chr(34), iPosition:=7) - clsSjTab.AddParameter("show.summary", "FALSE", iPosition:=7) - clsSjTab.AddParameter("digits", 0, iPosition:=10) - clsSjTab.AddParameter("ignore.strings", "FALSE", iPosition:=11) - clsSjTab.AddParameter("auto.grp.strings ", "FALSE", iPosition:=12) clsSjPlot.SetPackageName("sjPlot") clsSjPlot.SetRCommand("sjplot") clsPlotGrid.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorOneWayFreq.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - ucrBase.clsRsyntax.SetBaseRFunction(clsSjTab) + ucrBase.clsRsyntax.SetBaseRFunction(clsSjMiscFrq) bResetSubdialog = True End Sub @@ -137,21 +138,22 @@ Public Class dlgOneWayFrequencies ucrChkWeights.AddAdditionalCodeParameterPair(clsSjPlot, ucrReceiverWeights.GetParameter(), iAdditionalPairNo:=1) ucrReceiverWeights.AddAdditionalCodeParameterPair(clsSjPlot, ucrReceiverWeights.GetParameter(), iAdditionalPairNo:=1) ucrPnlSort.AddAdditionalCodeParameterPair(clsSjPlot, New RParameter("sort.frq", 3), iAdditionalPairNo:=1) - ucrNudGroups.AddAdditionalCodeParameterPair(clsSjPlot, ucrNudGroups.GetParameter(), iAdditionalPairNo:=1) - ucrChkGroupData.AddAdditionalCodeParameterPair(clsSjPlot, ucrNudGroups.GetParameter(), iAdditionalPairNo:=1) + ucrNudGroups.AddAdditionalCodeParameterPair(clsSjPlot, New RParameter("auto.group", 9), iAdditionalPairNo:=1) + ucrChkGroupData.AddAdditionalCodeParameterPair(clsSjPlot, New RParameter("auto.group", 9), iAdditionalPairNo:=1) ucrReceiverOneWayFreq.AddAdditionalCodeParameterPair(clsSjPlot, New RParameter("data", 0), iAdditionalPairNo:=1) - ucrReceiverWeights.SetRCode(clsSjTab, bReset) - ucrReceiverOneWayFreq.SetRCode(clsSjTab, bReset) + ucrReceiverWeights.SetRCode(clsSjMiscFrq, bReset) + ucrReceiverOneWayFreq.SetRCode(clsSjMiscFrq, bReset) If bReset OrElse Not rdoBoth.Checked Then ucrPnlFrequencies.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) End If - ucrChkWeights.SetRCode(clsSjTab, bReset) - ucrPnlSort.SetRCode(clsSjTab, bReset) + ucrPnlOutput.SetRCode(clsSjMiscFrq, bReset) + ucrChkWeights.SetRCode(clsSjMiscFrq, bReset) + ucrPnlSort.SetRCode(clsSjMiscFrq, bReset) ucrChkFlip.SetRCode(clsSjPlot, bReset) - ucrChkGroupData.SetRCode(clsSjTab, bReset) - ucrNudGroups.SetRCode(clsSjTab, bReset) + ucrChkGroupData.SetRCode(clsSjMiscFrq, bReset) + ucrNudGroups.SetRCode(clsSjMiscFrq, bReset) ucrSaveGraph.SetRCode(clsPlotGrid, bReset) End Sub @@ -220,27 +222,27 @@ Public Class dlgOneWayFrequencies End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click - sdgOneWayFrequencies.SetRFunction(clsSjTab, clsSjPlot, clsPlotGrid, bResetSubdialog) + sdgOneWayFrequencies.SetRFunction(clsSjMiscFrq, clsSjPlot, clsPlotGrid, bResetSubdialog) bResetSubdialog = False sdgOneWayFrequencies.ShowDialog() TestOkEnabled() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWeights.ControlContentsChanged, ucrChkWeights.ControlContentsChanged, ucrNudGroups.ControlContentsChanged, ucrChkGroupData.ControlContentsChanged, ucrReceiverOneWayFreq.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged - TestOkEnabled() - End Sub - Private Sub ucrPnlFrequencies_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlFrequencies.ControlValueChanged SetBaseFunction() End Sub Private Sub SetBaseFunction() If rdoTable.Checked OrElse rdoBoth.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsSjTab) + ucrBase.clsRsyntax.SetBaseRFunction(clsSjMiscFrq) ucrBase.clsRsyntax.iCallType = 2 ElseIf rdoGraph.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsPlotGrid) ucrBase.clsRsyntax.iCallType = 3 End If End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWeights.ControlContentsChanged, ucrChkWeights.ControlContentsChanged, ucrNudGroups.ControlContentsChanged, ucrChkGroupData.ControlContentsChanged, ucrReceiverOneWayFreq.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgOptions.Designer.vb b/instat/dlgOptions.Designer.vb index d4bae1135ed..1213a4ec96d 100644 --- a/instat/dlgOptions.Designer.vb +++ b/instat/dlgOptions.Designer.vb @@ -109,9 +109,18 @@ Partial Class dlgOptions Me.rdoDisplayinOutputWindow = New System.Windows.Forms.RadioButton() Me.ucrPnlGraphDisplay = New instat.UcrPanel() Me.tbpTailoredMenus = New System.Windows.Forms.TabPage() + Me.ucrChkViewOptionsByContextMenu = New instat.ucrCheck() Me.ucrChkViewProcurementMenu = New instat.ucrCheck() Me.ucrChkViewClimaticMenu = New instat.ucrCheck() - Me.ucrChkViewOptionsByContextMenu = New instat.ucrCheck() + Me.tbpClimsoft = New System.Windows.Forms.TabPage() + Me.ucrInputUserName = New instat.ucrInputTextBox() + Me.ucrInputPort = New instat.ucrInputTextBox() + Me.ucrInputHost = New instat.ucrInputTextBox() + Me.ucrInputDatabaseName = New instat.ucrInputTextBox() + Me.lblUserName = New System.Windows.Forms.Label() + Me.lblPort = New System.Windows.Forms.Label() + Me.lblHost = New System.Windows.Forms.Label() + Me.lblDatabaseName = New System.Windows.Forms.Label() CType(Me.spltControls, System.ComponentModel.ISupportInitialize).BeginInit() Me.spltControls.Panel1.SuspendLayout() Me.spltControls.Panel2.SuspendLayout() @@ -134,6 +143,7 @@ Partial Class dlgOptions Me.tbpWorkingDirectory.SuspendLayout() Me.tbpGraphDisplay.SuspendLayout() Me.tbpTailoredMenus.SuspendLayout() + Me.tbpClimsoft.SuspendLayout() Me.SuspendLayout() ' 'cmdApply @@ -203,6 +213,7 @@ Partial Class dlgOptions Me.tbcOptions.Controls.Add(Me.tbpWorkingDirectory) Me.tbcOptions.Controls.Add(Me.tbpGraphDisplay) Me.tbcOptions.Controls.Add(Me.tbpTailoredMenus) + Me.tbcOptions.Controls.Add(Me.tbpClimsoft) resources.ApplyResources(Me.tbcOptions, "tbcOptions") Me.tbcOptions.Name = "tbcOptions" Me.tbcOptions.SelectedIndex = 0 @@ -651,6 +662,12 @@ Partial Class dlgOptions Me.tbpTailoredMenus.Name = "tbpTailoredMenus" Me.tbpTailoredMenus.UseVisualStyleBackColor = True ' + 'ucrChkViewOptionsByContextMenu + ' + Me.ucrChkViewOptionsByContextMenu.Checked = False + resources.ApplyResources(Me.ucrChkViewOptionsByContextMenu, "ucrChkViewOptionsByContextMenu") + Me.ucrChkViewOptionsByContextMenu.Name = "ucrChkViewOptionsByContextMenu" + ' 'ucrChkViewProcurementMenu ' Me.ucrChkViewProcurementMenu.Checked = False @@ -663,11 +680,71 @@ Partial Class dlgOptions resources.ApplyResources(Me.ucrChkViewClimaticMenu, "ucrChkViewClimaticMenu") Me.ucrChkViewClimaticMenu.Name = "ucrChkViewClimaticMenu" ' - 'ucrChkViewOptionsByContextMenu + 'tbpClimsoft ' - Me.ucrChkViewOptionsByContextMenu.Checked = False - resources.ApplyResources(Me.ucrChkViewOptionsByContextMenu, "ucrChkViewOptionsByContextMenu") - Me.ucrChkViewOptionsByContextMenu.Name = "ucrChkViewOptionsByContextMenu" + Me.tbpClimsoft.Controls.Add(Me.lblUserName) + Me.tbpClimsoft.Controls.Add(Me.lblPort) + Me.tbpClimsoft.Controls.Add(Me.lblHost) + Me.tbpClimsoft.Controls.Add(Me.lblDatabaseName) + Me.tbpClimsoft.Controls.Add(Me.ucrInputUserName) + Me.tbpClimsoft.Controls.Add(Me.ucrInputPort) + Me.tbpClimsoft.Controls.Add(Me.ucrInputHost) + Me.tbpClimsoft.Controls.Add(Me.ucrInputDatabaseName) + resources.ApplyResources(Me.tbpClimsoft, "tbpClimsoft") + Me.tbpClimsoft.Name = "tbpClimsoft" + Me.tbpClimsoft.UseVisualStyleBackColor = True + ' + 'ucrInputUserName + ' + Me.ucrInputUserName.AddQuotesIfUnrecognised = True + Me.ucrInputUserName.IsMultiline = False + Me.ucrInputUserName.IsReadOnly = False + resources.ApplyResources(Me.ucrInputUserName, "ucrInputUserName") + Me.ucrInputUserName.Name = "ucrInputUserName" + ' + 'ucrInputPort + ' + Me.ucrInputPort.AddQuotesIfUnrecognised = True + Me.ucrInputPort.IsMultiline = False + Me.ucrInputPort.IsReadOnly = False + resources.ApplyResources(Me.ucrInputPort, "ucrInputPort") + Me.ucrInputPort.Name = "ucrInputPort" + ' + 'ucrInputHost + ' + Me.ucrInputHost.AddQuotesIfUnrecognised = True + Me.ucrInputHost.IsMultiline = False + Me.ucrInputHost.IsReadOnly = False + resources.ApplyResources(Me.ucrInputHost, "ucrInputHost") + Me.ucrInputHost.Name = "ucrInputHost" + ' + 'ucrInputDatabaseName + ' + Me.ucrInputDatabaseName.AddQuotesIfUnrecognised = True + Me.ucrInputDatabaseName.IsMultiline = False + Me.ucrInputDatabaseName.IsReadOnly = False + resources.ApplyResources(Me.ucrInputDatabaseName, "ucrInputDatabaseName") + Me.ucrInputDatabaseName.Name = "ucrInputDatabaseName" + ' + 'lblUserName + ' + resources.ApplyResources(Me.lblUserName, "lblUserName") + Me.lblUserName.Name = "lblUserName" + ' + 'lblPort + ' + resources.ApplyResources(Me.lblPort, "lblPort") + Me.lblPort.Name = "lblPort" + ' + 'lblHost + ' + resources.ApplyResources(Me.lblHost, "lblHost") + Me.lblHost.Name = "lblHost" + ' + 'lblDatabaseName + ' + resources.ApplyResources(Me.lblDatabaseName, "lblDatabaseName") + Me.lblDatabaseName.Name = "lblDatabaseName" ' 'dlgOptions ' @@ -719,6 +796,8 @@ Partial Class dlgOptions Me.tbpGraphDisplay.ResumeLayout(False) Me.tbpGraphDisplay.PerformLayout() Me.tbpTailoredMenus.ResumeLayout(False) + Me.tbpClimsoft.ResumeLayout(False) + Me.tbpClimsoft.PerformLayout() Me.ResumeLayout(False) End Sub @@ -795,4 +874,13 @@ Partial Class dlgOptions Friend WithEvents ucrChkViewProcurementMenu As ucrCheck Friend WithEvents ucrChkViewClimaticMenu As ucrCheck Friend WithEvents ucrChkViewOptionsByContextMenu As ucrCheck + Friend WithEvents tbpClimsoft As TabPage + Friend WithEvents ucrInputUserName As ucrInputTextBox + Friend WithEvents ucrInputPort As ucrInputTextBox + Friend WithEvents ucrInputHost As ucrInputTextBox + Friend WithEvents ucrInputDatabaseName As ucrInputTextBox + Friend WithEvents lblUserName As Label + Friend WithEvents lblPort As Label + Friend WithEvents lblHost As Label + Friend WithEvents lblDatabaseName As Label End Class diff --git a/instat/dlgOptions.resx b/instat/dlgOptions.resx index a3dc994acd7..36df38b0164 100644 --- a/instat/dlgOptions.resx +++ b/instat/dlgOptions.resx @@ -1944,6 +1944,237 @@ 9 + + True + + + NoControl + + + 6, 103 + + + 58, 13 + + + 19 + + + Username: + + + lblUserName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbpClimsoft + + + 0 + + + True + + + NoControl + + + 6, 76 + + + 29, 13 + + + 18 + + + Port: + + + lblPort + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbpClimsoft + + + 1 + + + True + + + NoControl + + + 6, 49 + + + 32, 13 + + + 17 + + + Host: + + + lblHost + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbpClimsoft + + + 2 + + + True + + + NoControl + + + 6, 21 + + + 87, 13 + + + 16 + + + Database Name: + + + lblDatabaseName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbpClimsoft + + + 3 + + + 99, 102 + + + 137, 21 + + + 15 + + + ucrInputUserName + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbpClimsoft + + + 4 + + + 99, 75 + + + 137, 21 + + + 14 + + + ucrInputPort + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbpClimsoft + + + 5 + + + 99, 48 + + + 137, 21 + + + 13 + + + ucrInputHost + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbpClimsoft + + + 6 + + + 99, 21 + + + 137, 21 + + + 12 + + + ucrInputDatabaseName + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbpClimsoft + + + 7 + + + 4, 22 + + + 3, 3, 3, 3 + + + 564, 291 + + + 14 + + + Climsoft + + + tbpClimsoft + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbcOptions + + + 10 + Fill diff --git a/instat/dlgOptions.vb b/instat/dlgOptions.vb index 361d85ab364..e80a82b288c 100644 --- a/instat/dlgOptions.vb +++ b/instat/dlgOptions.vb @@ -114,6 +114,10 @@ Public Class dlgOptions ucrChkShowDataonGrid.Checked = frmMain.clsInstatOptions.bChangeDataFrame ucrChkShowWaitDialog.Checked = frmMain.clsInstatOptions.bShowWaitDialog ucrNudWaitSeconds.Value = frmMain.clsInstatOptions.iWaitTimeDelaySeconds + ucrInputDatabaseName.SetName(frmMain.clsInstatOptions.strClimsoftDatabaseName) + ucrInputHost.SetName(frmMain.clsInstatOptions.strClimsoftHost) + ucrInputPort.SetName(frmMain.clsInstatOptions.strClimsoftPort) + ucrInputUserName.SetName(frmMain.clsInstatOptions.strClimsoftUsername) Select Case frmMain.clsInstatOptions.strLanguageCultureCode Case "en-GB" rdoEnglish.Checked = True @@ -163,6 +167,10 @@ Public Class dlgOptions frmMain.clsInstatOptions.SetChangeDataFrame(ucrChkShowDataonGrid.Checked) frmMain.clsInstatOptions.SetShowWaitDialog(ucrChkShowWaitDialog.Checked) frmMain.clsInstatOptions.SetWaitTimeDelaySeconds(ucrNudWaitSeconds.Value) + frmMain.clsInstatOptions.SetClimsoftDatabaseName(ucrInputDatabaseName.GetText()) + frmMain.clsInstatOptions.SetClimsoftHost(ucrInputHost.GetText()) + frmMain.clsInstatOptions.SetClimsoftPort(ucrInputPort.GetText()) + frmMain.clsInstatOptions.SetClimsoftUsername(ucrInputUserName.GetText()) End Sub Private Sub SetView() @@ -310,7 +318,7 @@ Public Class dlgOptions End Sub - Private Sub AllControls_ControlValueChanged() Handles ucrNudMaxCols.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrNudWaitSeconds.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged + Private Sub AllControls_ControlValueChanged() Handles ucrNudMaxCols.ControlValueChanged, ucrNudAutoSaveMinutes.ControlValueChanged, ucrNudPreviewRows.ControlValueChanged, ucrInputComment.ControlContentsChanged, ucrChkIncludeCommentsbyDefault.ControlValueChanged, ucrNudMaxRows.ControlValueChanged, ucrChkIncludeDefaultParams.ControlValueChanged, ucrChkShowRCommandsinOutputWindow.ControlValueChanged, ucrNudDigits.ControlValueChanged, ucrChkShowSignifStars.ControlValueChanged, ucrChkShowDataonGrid.ControlValueChanged, ucrChkAutoSave.ControlValueChanged, ucrChkShowWaitDialog.ControlValueChanged, ucrNudWaitSeconds.ControlValueChanged, ucrChkViewClimaticMenu.ControlValueChanged, ucrChkViewProcurementMenu.ControlValueChanged, ucrChkViewOptionsByContextMenu.ControlValueChanged, ucrInputDatabaseName.ControlValueChanged, ucrInputHost.ControlValueChanged, ucrInputPort.ControlValueChanged, ucrInputUserName.ControlValueChanged ApplyEnabled(True) End Sub diff --git a/instat/dlgPICSARainfall.vb b/instat/dlgPICSARainfall.vb index 3455ba4d00d..c3038ee125b 100644 --- a/instat/dlgPICSARainfall.vb +++ b/instat/dlgPICSARainfall.vb @@ -1,20 +1,22 @@ -' 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 . - +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + Imports instat.Translations +Imports RDotNet + Public Class dlgPICSARainfall Public bFirstLoad As Boolean = True Private clsRggplotFunction As New RFunction @@ -22,11 +24,9 @@ Public Class dlgPICSARainfall Private clsRaesFunction As New RFunction Private clsBaseOperator As New ROperator Private bReset As Boolean = True - Private clsLabsFunction As New RFunction - Private clsXlabsFunction As New RFunction - Private clsYlabFunction As New RFunction Private clsXScalecontinuousFunction As New RFunction Private clsYScalecontinuousFunction As New RFunction + Private clsYScaleDateFunction As New RFunction Private clsRFacetFunction As New RFunction Private clsThemeFunction As New RFunction Private dctThemeFunctions As New Dictionary(Of String, RFunction) @@ -36,7 +36,36 @@ Public Class dlgPICSARainfall 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 clsMeanLine, clsMedianLine, clsTretile As New RFunction + Private clsPnlBackgroundFunction, clsPnlGridLinesFunction As RFunction + Private clsFactorLevels As New RFunction + Private FactorLevel As RDotNet.SymbolicExpression + + Private clsDatePeriodOperator As New ROperator + + Private clsMeanFunction As New RFunction + Private clsMedianFunction As New RFunction + Private clsLowerTercileFunction As New RFunction + Private clsUpperTercileFunction As New RFunction + + Private clsGeomHlineMean As New RFunction + Private clsGeomHlineMedian As New RFunction + Private clsGeomHlineLowerTercile As New RFunction + Private clsGeomHlineUpperTercile As New RFunction + + Private clsGeomHlineAesMean As New RFunction + Private clsGeomHlineAesMedian As New RFunction + Private clsGeomHlineAesLowerTercile As New RFunction + Private clsGeomHlineAesUpperTercile As New RFunction + + Private clsAsDate As New RFunction + Private clsAsNumeric As New RFunction + Private clsAsNumericX As New RFunction + + Private strCalcColumn As String + Private Sub dlgPCSARainfall_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -74,7 +103,7 @@ Public Class dlgPICSARainfall ucrFactorOptionalReceiver.bWithQuotes = False ucrFactorOptionalReceiver.SetParameterIsString() - ucrVariablesAsFactorForPicsa.SetParameter(New RParameter("y", 1)) + ucrVariablesAsFactorForPicsa.SetParameter(New RParameter("x", 0)) ucrVariablesAsFactorForPicsa.SetFactorReceiver(ucrFactorOptionalReceiver) ucrVariablesAsFactorForPicsa.Selector = ucrPICSARainfallSelector ucrVariablesAsFactorForPicsa.strSelectorHeading = "Varibles" @@ -101,10 +130,52 @@ Public Class dlgPICSARainfall End Sub Private Sub SetDefaults() + Dim clsPanelBackgroundElementRect As New RFunction + Dim clsXElementLabels As New RFunction + Dim clsXElementTitle As New RFunction + Dim clsYElementTitle As New RFunction + Dim clsPanelGridMajorElementLine As New RFunction + Dim clsPanelGridMinorElementLine As New RFunction + Dim clsPanelBorderElementRect As New RFunction + Dim clsPlotElementTitle As New RFunction + Dim clsPlotElementSubTitle As New RFunction + Dim clsPlotElementCaption As New RFunction + clsRggplotFunction = New RFunction clsRgeomlineplotFunction = New RFunction clsRaesFunction = New RFunction clsBaseOperator = New ROperator + clsFactorLevels = New RFunction + + clsGeomHlineMean = New RFunction + clsGeomHlineAesMean = New RFunction + clsMeanFunction = New RFunction + clsGeomHlineMedian = New RFunction + clsGeomHlineAesMedian = New RFunction + clsMedianFunction = New RFunction + clsGeomHlineLowerTercile = New RFunction + clsGeomHlineAesLowerTercile = New RFunction + clsLowerTercileFunction = New RFunction + clsGeomHlineUpperTercile = New RFunction + clsGeomHlineAesUpperTercile = New RFunction + clsUpperTercileFunction = New RFunction + + clsDatePeriodOperator = New ROperator + + clsAsDate = New RFunction + clsAsNumeric = New RFunction + clsAsNumericX = New RFunction + + clsXLabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() + clsYLabsFunction = GgplotDefaults.clsYlabTitleFunction.Clone() + clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() + clsXScalecontinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() + clsYScalecontinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() + clsYScaleDateFunction = GgplotDefaults.clsYScaleDateFunction.Clone() + + clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction + clsLocalRaesFunction = GgplotDefaults.clsAesFunction.Clone() + dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) ucrPICSARainfallSelector.Reset() ucrPICSARainfallSelector.SetGgplotFunction(clsBaseOperator) @@ -126,18 +197,142 @@ Public Class dlgPICSARainfall clsRgeomlineplotFunction.SetPackageName("ggplot2") clsRgeomlineplotFunction.SetRCommand("geom_line") - clsBaseOperator.AddParameter(clsPointsParam) - - clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) - clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() - clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone - clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() - clsXScalecontinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() - clsYScalecontinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() - clsRFacetFunction = GgplotDefaults.clsFacetFunction.Clone() - dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) - clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction - clsLocalRaesFunction = GgplotDefaults.clsAesFunction.Clone() + clsRgeomlineplotFunction.AddParameter("colour", Chr(34) & "blue" & Chr(34)) + clsRgeomlineplotFunction.AddParameter("size", "0.8") + clsBaseOperator.AddParameter(clsPointsParam) + + 'Mean Line + clsGeomHlineMean.SetPackageName("ggplot2") + clsGeomHlineMean.SetRCommand("geom_hline") + clsGeomHlineMean.AddParameter("mapping", clsRFunctionParameter:=clsGeomHlineAesMean, iPosition:=0) + clsGeomHlineMean.AddParameter("size", "1.5", iPosition:=1) + + clsGeomHlineAesMean.SetPackageName("ggplot2") + clsGeomHlineAesMean.SetRCommand("aes") + clsGeomHlineAesMean.AddParameter("yintercept", clsRFunctionParameter:=clsMeanFunction) + + clsMeanFunction.SetRCommand("mean") + clsMeanFunction.AddParameter("na.rm", "TRUE") + + 'Median Line + clsGeomHlineMedian.SetPackageName("ggplot2") + clsGeomHlineMedian.SetRCommand("geom_hline") + clsGeomHlineMedian.AddParameter("mapping", clsRFunctionParameter:=clsGeomHlineAesMedian, iPosition:=0) + clsGeomHlineMedian.AddParameter("size", "1.5", iPosition:=1) + + clsGeomHlineAesMedian.SetPackageName("ggplot2") + clsGeomHlineAesMedian.SetRCommand("aes") + clsGeomHlineAesMedian.AddParameter("yintercept", clsRFunctionParameter:=clsMedianFunction) + + clsMedianFunction.SetRCommand("median") + clsMedianFunction.AddParameter("na.rm", "TRUE") + + 'Lower Tercile Line + clsGeomHlineLowerTercile.SetPackageName("ggplot2") + clsGeomHlineLowerTercile.SetRCommand("geom_hline") + clsGeomHlineLowerTercile.AddParameter("mapping", clsRFunctionParameter:=clsGeomHlineAesLowerTercile, iPosition:=0) + clsGeomHlineLowerTercile.AddParameter("size", "1.5", iPosition:=1) + + clsGeomHlineAesLowerTercile.SetPackageName("ggplot2") + clsGeomHlineAesLowerTercile.SetRCommand("aes") + clsGeomHlineAesLowerTercile.AddParameter("yintercept", clsRFunctionParameter:=clsLowerTercileFunction) + + clsLowerTercileFunction.SetRCommand("quantile") + clsLowerTercileFunction.AddParameter("probs", "1/3") + clsLowerTercileFunction.AddParameter("na.rm", "TRUE") + + 'Upper Tercile Line + clsGeomHlineUpperTercile.SetPackageName("ggplot2") + clsGeomHlineUpperTercile.SetRCommand("geom_hline") + clsGeomHlineUpperTercile.AddParameter("mapping", clsRFunctionParameter:=clsGeomHlineAesUpperTercile, iPosition:=0) + clsGeomHlineUpperTercile.AddParameter("size", "1.5", iPosition:=1) + + clsGeomHlineAesUpperTercile.SetPackageName("ggplot2") + clsGeomHlineAesUpperTercile.SetRCommand("aes") + clsGeomHlineAesUpperTercile.AddParameter("yintercept", clsRFunctionParameter:=clsUpperTercileFunction) + + clsUpperTercileFunction.SetRCommand("quantile") + clsUpperTercileFunction.AddParameter("probs", "2/3") + clsUpperTercileFunction.AddParameter("na.rm", "TRUE") + + If dctThemeFunctions.TryGetValue("panel.background", clsPanelBackgroundElementRect) Then + clsPanelBackgroundElementRect.AddParameter("colour", Chr(34) & "white" & Chr(34)) + clsPanelBackgroundElementRect.AddParameter("fill", Chr(34) & "white" & Chr(34)) + clsPanelBackgroundElementRect.AddParameter("size", "0.5") + clsPanelBackgroundElementRect.AddParameter("linetype", Chr(34) & "solid" & Chr(34)) + clsThemeFunction.AddParameter("panel.background", clsRFunctionParameter:=clsPanelBackgroundElementRect) + End If + + If dctThemeFunctions.TryGetValue("panel.grid.major", clsPanelGridMajorElementLine) Then + clsPanelGridMajorElementLine.AddParameter("colour", Chr(34) & "lightblue" & Chr(34)) + clsPanelGridMajorElementLine.AddParameter("linetype", Chr(34) & "longdash" & Chr(34)) + clsThemeFunction.AddParameter("panel.grid.major", clsRFunctionParameter:=clsPanelGridMajorElementLine) + End If + + If dctThemeFunctions.TryGetValue("panel.grid.minor", clsPanelGridMinorElementLine) Then + clsPanelGridMinorElementLine.AddParameter("colour", Chr(34) & "lightblue" & Chr(34)) + clsPanelGridMinorElementLine.AddParameter("linetype", Chr(34) & "longdash" & Chr(34)) + clsThemeFunction.AddParameter("panel.grid.minor", clsRFunctionParameter:=clsPanelGridMinorElementLine) + End If + + If dctThemeFunctions.TryGetValue("panel.border", clsPanelBorderElementRect) Then + clsPanelBorderElementRect.AddParameter("colour", Chr(34) & "black" & Chr(34)) + clsPanelBorderElementRect.AddParameter("fill", Chr(34) & "NA" & Chr(34)) + clsThemeFunction.AddParameter("panel.border", clsRFunctionParameter:=clsPanelBorderElementRect) + End If + + If dctThemeFunctions.TryGetValue("axis.text.x", clsXElementLabels) Then + clsXElementLabels.AddParameter("angle", "90") + clsThemeFunction.AddParameter("axis.text.x", clsRFunctionParameter:=clsXElementLabels) + End If + + If dctThemeFunctions.TryGetValue("axis.title.x", clsXElementTitle) Then + clsXElementTitle.AddParameter("size", 14) + clsThemeFunction.AddParameter("axis.title.x", clsRFunctionParameter:=clsXElementTitle) + End If + + If dctThemeFunctions.TryGetValue("axis.title.y", clsYElementTitle) Then + clsYElementTitle.AddParameter("size", 14) + clsThemeFunction.AddParameter("axis.title.y", clsRFunctionParameter:=clsYElementTitle) + End If + + If dctThemeFunctions.TryGetValue("title", clsPlotElementTitle) Then + clsPlotElementTitle.AddParameter("size", 20) + clsThemeFunction.AddParameter("title", clsRFunctionParameter:=clsPlotElementTitle) + End If + + If dctThemeFunctions.TryGetValue("sub.title", clsPlotElementSubTitle) Then + clsPlotElementSubTitle.AddParameter("size", 15) + clsThemeFunction.AddParameter("plot.subtitle", clsRFunctionParameter:=clsPlotElementSubTitle) + End If + + If dctThemeFunctions.TryGetValue("caption", clsPlotElementCaption) Then + clsPlotElementCaption.AddParameter("size", 8) + clsThemeFunction.AddParameter("plot.caption", clsRFunctionParameter:=clsPlotElementCaption) + End If + + clsFactorLevels.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_factor_levels") + + clsBaseOperator.AddParameter("xlab", clsRFunctionParameter:=clsXLabsFunction) + clsXLabsFunction.AddParameter("label", Chr(34) & Chr(34)) + + clsBaseOperator.AddParameter("ylab", clsRFunctionParameter:=clsYLabsFunction) + clsYLabsFunction.AddParameter("label", Chr(34) & Chr(34)) + + clsAsDate.SetRCommand("as.Date") + clsAsDate.AddParameter("origin", Chr(34) & "2015-12-31" & Chr(34), iPosition:=1) + + clsDatePeriodOperator.SetOperation(" ") + clsDatePeriodOperator.bSpaceAroundOperation = False + clsDatePeriodOperator.bToScriptAsRString = True + + clsAsNumeric.SetRCommand("as.numeric") + clsAsNumericX.SetRCommand("as.numeric") + + clsRaesFunction.AddParameter("x", clsRFunctionParameter:=clsAsNumericX, iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsAsNumeric, iPosition:=1) + + clsBaseOperator.AddParameter("theme", clsRFunctionParameter:=clsThemeFunction, iPosition:=100) clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrPICSARainfallSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) TempOptionsDisabledInMultipleVariablesCase() @@ -145,12 +340,14 @@ Public Class dlgPICSARainfall End Sub Public Sub SetRCodeForControls(bReset As Boolean) + ucrVariablesAsFactorForPicsa.AddAdditionalCodeParameterPair(clsAsDate, New RParameter("x", 0), iAdditionalPairNo:=1) + ucrPICSARainfallSelector.SetRCode(clsRggplotFunction, bReset) - ucrReceiverX.SetRCode(clsRaesFunction, bReset) + ucrReceiverX.SetRCode(clsAsNumericX, bReset) ucrFactorOptionalReceiver.SetRCode(clsRaesFunction, bReset) ucrSave.SetRCode(clsBaseOperator, bReset) ucrChkPoints.SetRCode(clsBaseOperator, bReset) - ucrVariablesAsFactorForPicsa.SetRCode(clsRaesFunction, bReset) + ucrVariablesAsFactorForPicsa.SetRCode(clsAsNumeric, bReset) End Sub Private Sub TestOkEnabled() @@ -168,7 +365,7 @@ Public Class dlgPICSARainfall Private Sub TempOptionsDisabledInMultipleVariablesCase() If ucrVariablesAsFactorForPicsa.bSingleVariable Then 'Added this because this sub is called on sed defaults and it over writes the enabled property - cmdPICSAOptions.Enabled = False + cmdPICSAOptions.Enabled = True cmdLineOptions.Enabled = True cmdOptions.Enabled = True Else @@ -181,16 +378,19 @@ Public Class dlgPICSARainfall TempOptionsDisabledInMultipleVariablesCase() End Sub + 'add more functions Private Sub cmdPICSAOptions_Click(sender As Object, e As EventArgs) Handles cmdPICSAOptions.Click - sdgPICSARainfallGraph.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewYLabTitleFunction:=clsYlabFunction, bReset:=bResetSubdialog) + sdgPICSARainfallGraph.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, 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, clsNewAsNumeric:=clsAsNumeric, clsNewYScaleDateFunction:=clsYScaleDateFunction, clsNewDatePeriodOperator:=clsDatePeriodOperator, bReset:=bResetSubdialog) sdgPICSARainfallGraph.ShowDialog() bResetSubdialog = False End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click - sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, ucrNewBaseSelector:=ucrPICSARainfallSelector, bReset:=bResetSubdialog) + sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction, clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewXLabsTitleFunction:=clsXLabsFunction, clsNewYLabTitleFunction:=clsYLabsFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsRaesFunction, ucrNewBaseSelector:=ucrPICSARainfallSelector, bReset:=bResetSubdialog) sdgPlots.ShowDialog() bResetSubdialog = False + + ucrVariablesAsFactorForPicsa.SetParameter(New RParameter("x")) End Sub Private Sub cmdLineOptions_Click(sender As Object, e As EventArgs) Handles cmdLineOptions.Click @@ -224,5 +424,23 @@ Public Class dlgPICSARainfall Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrVariablesAsFactorForPicsa.ControlContentsChanged, ucrSave.ControlContentsChanged, ucrReceiverX.ControlContentsChanged TestOkEnabled() - End Sub + End Sub + + Private Sub ucrVariablesAsFactorForPicsa_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrVariablesAsFactorForPicsa.ControlContentsChanged + 'TODO should be done automatically though linking + strCalcColumn = ucrVariablesAsFactorForPicsa.GetVariableNames(bWithQuotes:=False) + clsMeanFunction.AddParameter("x", strCalcColumn, iPosition:=0) + clsMedianFunction.AddParameter("x", strCalcColumn, iPosition:=0) + clsLowerTercileFunction.AddParameter("x", strCalcColumn, iPosition:=0) + clsUpperTercileFunction.AddParameter("x", strCalcColumn, iPosition:=0) + End Sub + + Private Sub ucrFactorOptionalReceiver_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrFactorOptionalReceiver.ControlValueChanged + 'TODO this should run when levels of factor >1 + If Not ucrFactorOptionalReceiver.IsEmpty Then + clsRgeomlineplotFunction.RemoveParameterByName("colour") + Else + clsRgeomlineplotFunction.AddParameter("colour", Chr(34) & "blue" & Chr(34)) + End If + End Sub End Class \ No newline at end of file diff --git a/instat/dlgSPI.Designer.vb b/instat/dlgSPI.Designer.vb index 51b55b20b33..87b9e7dfdbd 100644 --- a/instat/dlgSPI.Designer.vb +++ b/instat/dlgSPI.Designer.vb @@ -30,7 +30,6 @@ Partial Class dlgSPI Me.grpIndex = New System.Windows.Forms.GroupBox() Me.rdoSPEI = New System.Windows.Forms.RadioButton() Me.rdoSPI = New System.Windows.Forms.RadioButton() - Me.ucrPnlIndex = New instat.UcrPanel() Me.lblTimeScale = New System.Windows.Forms.Label() Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() Me.grpKernel = New System.Windows.Forms.GroupBox() @@ -40,12 +39,13 @@ Partial Class dlgSPI Me.rdoGaussian = New System.Windows.Forms.RadioButton() Me.rdoCircular = New System.Windows.Forms.RadioButton() Me.rdoTriangular = New System.Windows.Forms.RadioButton() + Me.ucrSaveIndex = New instat.ucrSave() Me.ucrPnlKernelType = New instat.UcrPanel() Me.ucrNudKernelShift = New instat.ucrNud() - Me.ucrSaveIndex = New instat.ucrSave() Me.ucrNudTimeScale = New instat.ucrNud() Me.ucrChkOmitMissingValues = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() + Me.ucrPnlIndex = New instat.UcrPanel() Me.ucrReceiverData = New instat.ucrReceiverSingle() Me.ucrReceiverMonth = New instat.ucrReceiverSingle() Me.ucrReceiverYear = New instat.ucrReceiverSingle() @@ -99,11 +99,6 @@ Partial Class dlgSPI Me.rdoSPI.TabStop = True Me.rdoSPI.UseVisualStyleBackColor = True ' - 'ucrPnlIndex - ' - resources.ApplyResources(Me.ucrPnlIndex, "ucrPnlIndex") - Me.ucrPnlIndex.Name = "ucrPnlIndex" - ' 'lblTimeScale ' resources.ApplyResources(Me.lblTimeScale, "lblTimeScale") @@ -162,6 +157,11 @@ Partial Class dlgSPI Me.rdoTriangular.TabStop = True Me.rdoTriangular.UseVisualStyleBackColor = True ' + 'ucrSaveIndex + ' + resources.ApplyResources(Me.ucrSaveIndex, "ucrSaveIndex") + Me.ucrSaveIndex.Name = "ucrSaveIndex" + ' 'ucrPnlKernelType ' resources.ApplyResources(Me.ucrPnlKernelType, "ucrPnlKernelType") @@ -177,11 +177,6 @@ Partial Class dlgSPI Me.ucrNudKernelShift.Name = "ucrNudKernelShift" Me.ucrNudKernelShift.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrSaveIndex - ' - resources.ApplyResources(Me.ucrSaveIndex, "ucrSaveIndex") - Me.ucrSaveIndex.Name = "ucrSaveIndex" - ' 'ucrNudTimeScale ' Me.ucrNudTimeScale.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -203,6 +198,11 @@ Partial Class dlgSPI resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' + 'ucrPnlIndex + ' + resources.ApplyResources(Me.ucrPnlIndex, "ucrPnlIndex") + Me.ucrPnlIndex.Name = "ucrPnlIndex" + ' 'ucrReceiverData ' Me.ucrReceiverData.frmParent = Me @@ -241,6 +241,7 @@ Partial Class dlgSPI ' 'ucrSelectorVariable ' + Me.ucrSelectorVariable.bDropUnusedFilterLevels = False Me.ucrSelectorVariable.bShowHiddenColumns = False Me.ucrSelectorVariable.bUseCurrentFilter = True resources.ApplyResources(Me.ucrSelectorVariable, "ucrSelectorVariable") diff --git a/instat/dlgSPI.resx b/instat/dlgSPI.resx index 5980810a2b4..7cc588b232e 100644 --- a/instat/dlgSPI.resx +++ b/instat/dlgSPI.resx @@ -240,66 +240,6 @@ 7 - - rdoSPEI - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpIndex - - - 0 - - - rdoSPI - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpIndex - - - 1 - - - ucrPnlIndex - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpIndex - - - 2 - - - 10, 230 - - - 149, 52 - - - 9 - - - Index - - - grpIndex - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 6 - True @@ -381,6 +321,30 @@ 2 + + 10, 230 + + + 149, 52 + + + 9 + + + Index + + + grpIndex + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + True @@ -414,66 +378,6 @@ 17, 17 - - lblShift - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernel - - - 0 - - - grpKernelType - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernel - - - 1 - - - ucrNudKernelShift - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpKernel - - - 2 - - - 191, 230 - - - 213, 129 - - - 10 - - - Kernel - - - grpKernel - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - True @@ -504,90 +408,6 @@ 0 - - rdoRectangular - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernelType - - - 0 - - - rdoGaussian - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernelType - - - 1 - - - rdoCircular - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernelType - - - 2 - - - rdoTriangular - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernelType - - - 3 - - - ucrPnlKernelType - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpKernelType - - - 4 - - - 10, 22 - - - 199, 70 - - - 25 - - - Type - - - grpKernelType - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpKernel - - - 1 - True @@ -729,6 +549,30 @@ 4 + + 10, 22 + + + 199, 70 + + + 25 + + + Type + + + grpKernelType + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpKernel + + + 1 + 41, 98 @@ -750,8 +594,29 @@ 2 - - False + + 191, 230 + + + 213, 129 + + + 10 + + + Kernel + + + grpKernel + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 10, 364 @@ -945,6 +810,9 @@ 15 + + NoControl + CenterScreen diff --git a/instat/dlgSPI.vb b/instat/dlgSPI.vb index 54079312c4c..16e0154a872 100644 --- a/instat/dlgSPI.vb +++ b/instat/dlgSPI.vb @@ -18,7 +18,8 @@ Imports instat.Translations Public Class dlgSPI Private bFirstload As Boolean = True Private bReset As Boolean = True - Private clsSpiFunction, clsSpeiFunction, clsListFunction As New RFunction + Private clsSpiFunction, clsSpeiFunction, clsListFunction, clsSummaryFunction, clsAsVectorFunction As New RFunction + Private clsDolarOperator As New ROperator Private Sub dlgSPI_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then @@ -39,8 +40,7 @@ Public Class dlgSPI ucrSelectorVariable.SetParameterIsString() - 'receivers: - ' by receivers + 'receivers ucrReceiverData.SetParameterIsRFunction() ucrReceiverData.SetParameter(New RParameter("data", 0)) ucrReceiverData.Selector = ucrSelectorVariable @@ -69,11 +69,10 @@ Public Class dlgSPI ucrNudTimeScale.SetParameter(New RParameter("scale", 1)) ucrNudTimeScale.SetMinMax(1, 24) - ' others + 'others ucrChkOmitMissingValues.SetParameter(New RParameter("na.rm", 5)) ucrChkOmitMissingValues.SetText("Omit Missing Values") ucrChkOmitMissingValues.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkOmitMissingValues.SetRDefault("FALSE") 'panel ucrPnlKernelType.SetParameter(New RParameter("type", 0)) @@ -89,22 +88,29 @@ Public Class dlgSPI 'ucrpnlInd ucrPnlIndex.AddRadioButton(rdoSPI) ucrPnlIndex.AddRadioButton(rdoSPEI) - ucrPnlIndex.AddFunctionNamesCondition(rdoSPI, "spi") - ucrPnlIndex.AddFunctionNamesCondition(rdoSPEI, "spei") + ucrPnlIndex.AddParameterValueFunctionNamesCondition(rdoSPI, "object", "spi") + ucrPnlIndex.AddParameterValueFunctionNamesCondition(rdoSPEI, "object", "spei") ucrSaveIndex.SetSaveTypeAsColumn() ucrSaveIndex.SetDataFrameSelector(ucrSelectorVariable.ucrAvailableDataFrames) ucrSaveIndex.SetLabelText("Save Index into:") ucrSaveIndex.SetIsTextBox() - ucrSaveIndex.SetAssignToBooleans(bTempAssignToIsPrefix:=True) + ucrSaveIndex.SetPrefix("spi") End Sub Private Sub SetDefaults() clsSpeiFunction = New RFunction clsSpiFunction = New RFunction clsListFunction = New RFunction + clsAsVectorFunction = New RFunction + clsSummaryFunction = New RFunction + + clsDolarOperator = New ROperator + + ucrBase.clsRsyntax.ClearCodes() ucrSelectorVariable.Reset() + ucrSaveIndex.Reset() ucrReceiverData.SetMeAsReceiver() clsListFunction.SetRCommand("list") @@ -114,14 +120,29 @@ Public Class dlgSPI clsSpiFunction.SetPackageName("SPEI") clsSpiFunction.SetRCommand("spi") clsSpiFunction.AddParameter("scale", 1, iPosition:=1) + clsSpiFunction.AddParameter("na.rm", "TRUE", iPosition:=5) clsSpiFunction.AddParameter("kernel", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsSpiFunction.SetAssignTo("last_model", strTempDataframe:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True) clsSpeiFunction.SetPackageName("SPEI") clsSpeiFunction.SetRCommand("spei") clsSpeiFunction.AddParameter("scale", 1, iPosition:=1) + clsSpeiFunction.AddParameter("na.rm", "TRUE", iPosition:=5) clsSpeiFunction.AddParameter("kernel", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsSpeiFunction.SetAssignTo("last_model", strTempDataframe:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model", bAssignToIsPrefix:=True) + + clsSummaryFunction.SetRCommand("summary") + clsSummaryFunction.AddParameter("object", clsRFunctionParameter:=clsSpiFunction) + + clsAsVectorFunction.SetRCommand("as.vector") + clsAsVectorFunction.AddParameter("x", clsROperatorParameter:=clsDolarOperator) + + clsDolarOperator.SetOperation("$") + clsDolarOperator.AddParameter("model", clsRFunctionParameter:=clsSpiFunction, iPosition:=0) + clsDolarOperator.AddParameter("fitted", "fitted", iPosition:=1) - ucrBase.clsRsyntax.SetBaseRFunction(clsSpiFunction) + ucrBase.clsRsyntax.SetBaseRFunction(clsSummaryFunction) + ucrBase.clsRsyntax.AddToAfterCodes(clsAsVectorFunction, iPosition:=0) End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -134,16 +155,15 @@ Public Class dlgSPI ucrNudTimeScale.SetRCode(clsSpiFunction, bReset) ucrPnlKernelType.SetRCode(clsListFunction, bReset) ucrNudKernelShift.SetRCode(clsListFunction, bReset) - ucrPnlIndex.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - 'ucrSaveIndex.AddAdditionalRCode(clsSpeiFunction, iAdditionalPairNo:=1) - 'ucrSaveIndex.SetRCode(clsSpiFunction, bReset) + ucrPnlIndex.SetRCode(clsSummaryFunction, bReset) + ucrSaveIndex.SetRCode(clsAsVectorFunction, bReset) End Sub Private Sub TestOKEnabled() - If ucrReceiverData.IsEmpty Then - ucrBase.OKEnabled(False) - Else + If Not ucrReceiverData.IsEmpty AndAlso ucrSaveIndex.IsComplete Then ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) End If End Sub @@ -155,17 +175,17 @@ Public Class dlgSPI Private Sub ucrPnlIndex_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlIndex.ControlContentsChanged If rdoSPI.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsSpiFunction) - 'clsSpiFunction.SetAssignTo("spi", strTempDataframe:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:="spi", bAssignToIsPrefix:=True) + clsSummaryFunction.AddParameter("object", clsRFunctionParameter:=clsSpiFunction) + clsDolarOperator.AddParameter("model", clsRFunctionParameter:=clsSpiFunction, iPosition:=0) ucrSaveIndex.SetPrefix("spi") ElseIf rdoSPEI.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsSpeiFunction) - 'clsSpeiFunction.SetAssignTo("spei", strTempDataframe:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:="spei", bAssignToIsPrefix:=True) + clsSummaryFunction.AddParameter("object", clsRFunctionParameter:=clsSpeiFunction) + clsDolarOperator.AddParameter("model", clsRFunctionParameter:=clsSpeiFunction, iPosition:=0) ucrSaveIndex.SetPrefix("spei") End If End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverData.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverData.ControlContentsChanged, ucrSaveIndex.ControlContentsChanged TestOKEnabled() End Sub End Class \ No newline at end of file diff --git a/instat/dlgTidyDailyData.vb b/instat/dlgTidyDailyData.vb index 476060f35b6..cd2533039d5 100644 --- a/instat/dlgTidyDailyData.vb +++ b/instat/dlgTidyDailyData.vb @@ -22,9 +22,13 @@ Public Class dlgTidyDailyData Private clsTidyClimaticFunction As New RFunction Private iTextBoxMaxY As Integer + Private iReceiverMaxY As Integer + Private iReceiverLabelMaxY As Integer Private Sub dlgTidyDailyData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then + iReceiverMaxY = ucrReceiverStation.Location.Y + iReceiverLabelMaxY = lblStation.Location.Y iTextBoxMaxY = grpElements.Location.Y InitialiseDialog() bFirstLoad = False @@ -103,8 +107,6 @@ Public Class dlgTidyDailyData ucrPnlReshapeClimaticData.AddToLinkedControls(ucrReceiverMonth, {rdoDay}, bNewLinkedHideIfParameterMissing:=True) ucrPnlReshapeClimaticData.AddToLinkedControls(ucrReceiverYear, {rdoDay, rdoMonth}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlReshapeClimaticData.AddToLinkedControls(ucrReceiverElement, {rdoDay, rdoMonth}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlReshapeClimaticData.AddToLinkedControls(ucrReceiverStation, {rdoDay, rdoMonth}, bNewLinkedHideIfParameterMissing:=True) ucrPnlReshapeClimaticData.AddParameterValuesCondition(rdoYear, "format", Chr(34) & "years" & Chr(34)) ucrPnlReshapeClimaticData.AddParameterValuesCondition(rdoMonth, "format", Chr(34) & "months" & Chr(34)) @@ -181,8 +183,7 @@ Public Class dlgTidyDailyData Private Sub ucrPnlReshapeClimaticData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlReshapeClimaticData.ControlValueChanged UpdateParameters() - ShowOr() - ElementGroupLocation() + ElementGroupStationLocation() ColumnstoStackText() ChangeCurrentReceiver() End Sub @@ -199,14 +200,6 @@ Public Class dlgTidyDailyData End Sub - Private Sub ShowOr() - If rdoYear.Checked Then - lblOr.Visible = False - Else - lblOr.Visible = True - End If - End Sub - Private Sub ColumnstoStackText() If rdoYear.Checked Then lblColumnstoStack.Text = "Year Columns:" @@ -217,10 +210,14 @@ Public Class dlgTidyDailyData End If End Sub - Private Sub ElementGroupLocation() + Private Sub ElementGroupStationLocation() If rdoYear.Checked Then - grpElements.Location = New Point(grpElements.Location.X, iTextBoxMaxY / 1.5) + ucrReceiverStation.Location = New Point(ucrReceiverStation.Location.X, iReceiverMaxY / 1.42) + lblStation.Location = New Point(lblStation.Location.X, iReceiverLabelMaxY / 1.45) + grpElements.Location = New Point(grpElements.Location.X, iTextBoxMaxY / 1.38) Else + ucrReceiverStation.Location = New Point(ucrReceiverStation.Location.X, iReceiverMaxY) + lblStation.Location = New Point(lblStation.Location.X, iReceiverLabelMaxY) grpElements.Location = New Point(grpElements.Location.X, iTextBoxMaxY) End If End Sub @@ -238,7 +235,7 @@ Public Class dlgTidyDailyData Private Sub ChangeCurrentReceiver() Dim CurrReceiver = ucrSelectorTidyDailyData.CurrentReceiver - If (CurrReceiver Is ucrReceiverDayofMonth AndAlso Not rdoMonth.Checked) OrElse (CurrReceiver Is ucrReceiverMonth AndAlso Not rdoDay.Checked) OrElse (rdoYear.Checked) Then + If (CurrReceiver Is ucrReceiverDayofMonth AndAlso Not rdoMonth.Checked) OrElse (CurrReceiver Is ucrReceiverMonth AndAlso Not rdoDay.Checked) Then ucrReceiverMultipleStack.SetMeAsReceiver() End If End Sub diff --git a/instat/sdgImportFromClimSoft.Designer.vb b/instat/sdgImportFromClimSoft.Designer.vb index 5c1f032bbce..6a9e06d3027 100644 --- a/instat/sdgImportFromClimSoft.Designer.vb +++ b/instat/sdgImportFromClimSoft.Designer.vb @@ -50,6 +50,7 @@ Partial Class sdgImportFromClimSoft Me.lblConnection = New System.Windows.Forms.Label() Me.ucrBaseSdgClimSoft = New instat.ucrButtonsSubdialogue() Me.cmdEnterPassword = New System.Windows.Forms.Button() + Me.cmdOptions = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'ucrInputDatabaseName @@ -120,10 +121,17 @@ Partial Class sdgImportFromClimSoft Me.cmdEnterPassword.Name = "cmdEnterPassword" Me.cmdEnterPassword.UseVisualStyleBackColor = True ' + 'cmdOptions + ' + resources.ApplyResources(Me.cmdOptions, "cmdOptions") + Me.cmdOptions.Name = "cmdOptions" + Me.cmdOptions.UseVisualStyleBackColor = True + ' 'sdgImportFromClimSoft ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.ucrBaseSdgClimSoft) Me.Controls.Add(Me.lblConnection) Me.Controls.Add(Me.cmdEnterPassword) @@ -155,4 +163,5 @@ Partial Class sdgImportFromClimSoft Friend WithEvents lblConnection As Label Friend WithEvents ucrBaseSdgClimSoft As ucrButtonsSubdialogue Friend WithEvents cmdEnterPassword As Button + Friend WithEvents cmdOptions As Button End Class diff --git a/instat/sdgImportFromClimSoft.resx b/instat/sdgImportFromClimSoft.resx index 1a739ca3068..abd4e7031bd 100644 --- a/instat/sdgImportFromClimSoft.resx +++ b/instat/sdgImportFromClimSoft.resx @@ -138,7 +138,7 @@ $this - 10 + 11 True @@ -165,7 +165,7 @@ $this - 9 + 10 103, 48 @@ -186,7 +186,7 @@ $this - 8 + 9 True @@ -213,7 +213,7 @@ $this - 7 + 8 103, 75 @@ -234,7 +234,7 @@ $this - 6 + 7 True @@ -261,7 +261,7 @@ $this - 5 + 6 103, 102 @@ -282,7 +282,7 @@ $this - 4 + 5 True @@ -309,7 +309,7 @@ $this - 3 + 4 True @@ -336,10 +336,10 @@ $this - 1 + 2 - 57, 168 + 55, 203 142, 30 @@ -357,7 +357,7 @@ $this - 0 + 1 12, 130 @@ -381,7 +381,31 @@ $this - 2 + 3 + + + 12, 158 + + + 107, 23 + + + 12 + + + Set as Defaults + + + cmdOptions + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 True @@ -390,7 +414,7 @@ 6, 13 - 257, 203 + 257, 239 diff --git a/instat/sdgImportFromClimSoft.vb b/instat/sdgImportFromClimSoft.vb index 3dd3a940af4..74c6f0824f0 100644 --- a/instat/sdgImportFromClimSoft.vb +++ b/instat/sdgImportFromClimSoft.vb @@ -31,6 +31,7 @@ Public Class sdgImportFromClimSoft If Not bControlsInitialised Then InitialiseControls() End If + CheckConnection() End Sub Private Sub InitialiseControls() @@ -61,10 +62,10 @@ Public Class sdgImportFromClimSoft Dim expTemp As SymbolicExpression cmdEnterPassword.Enabled = False If bConnected Then - frmMain.clsRLink.RunScript(clsRDatabaseDisconnect.ToScript(), strComment:="Disconnect database connection.") + frmMain.clsRLink.RunScript(clsRDatabaseDisconnect.ToScript(), strComment:="Disconnect database connection.", bSeparateThread:=False, bShowWaitDialogOverride:=False) bConnected = False Else - frmMain.clsRLink.RunScript(clsRDatabaseConnect.ToScript(), strComment:="Connect database connection.") + frmMain.clsRLink.RunScript(clsRDatabaseConnect.ToScript(), strComment:="Connect database connection.", bSeparateThread:=False, bShowWaitDialogOverride:=False) expTemp = frmMain.clsRLink.RunInternalScriptGetValue(clsHasConnection.ToScript()) If Not expTemp.Type = Internals.SymbolicExpressionType.Null Then bConnected = expTemp.AsLogical(0) @@ -72,6 +73,11 @@ Public Class sdgImportFromClimSoft bConnected = False End If End If + CheckConnection() + cmdEnterPassword.Enabled = True + End Sub + + Private Sub CheckConnection() If bConnected Then lblConnection.Text = strConnected cmdEnterPassword.Text = "Disconnnect" @@ -79,7 +85,6 @@ Public Class sdgImportFromClimSoft lblConnection.Text = strNoConnection cmdEnterPassword.Text = "Enter Password" End If - cmdEnterPassword.Enabled = True End Sub Private Sub ucrControlsContents_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputDatabaseName.ControlContentsChanged, ucrInputHost.ControlContentsChanged, ucrInputPort.ControlContentsChanged, ucrInputUserName.ControlContentsChanged @@ -121,4 +126,15 @@ Public Class sdgImportFromClimSoft cmdEnterPassword.Text = "Enter Password" End If End Sub + + Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + + frmMain.clsInstatOptions.SetClimsoftDatabaseName(ucrInputDatabaseName.GetText()) + frmMain.clsInstatOptions.SetClimsoftHost(ucrInputHost.GetText()) + frmMain.clsInstatOptions.SetClimsoftPort(ucrInputPort.GetText()) + frmMain.clsInstatOptions.SetClimsoftUsername(ucrInputUserName.GetText()) + + Dim msgSetDefaults = MsgBox("Climsoft defaults updated", MessageBoxButtons.OK, "Climsoft defaults") + + End Sub End Class \ No newline at end of file diff --git a/instat/sdgOneWayFrequencies.Designer.vb b/instat/sdgOneWayFrequencies.Designer.vb index 8c7ec7c5fd0..ab4202f0111 100644 --- a/instat/sdgOneWayFrequencies.Designer.vb +++ b/instat/sdgOneWayFrequencies.Designer.vb @@ -42,15 +42,9 @@ Partial Class sdgOneWayFrequencies Me.tbpOneWayFrequencies = New System.Windows.Forms.TabControl() Me.tbpTable = New System.Windows.Forms.TabPage() Me.grpTableOptions = New System.Windows.Forms.GroupBox() - Me.lblOmitZero = New System.Windows.Forms.Label() - Me.ucrInputOmitZero = New instat.ucrInputComboBox() - Me.ucrChkCountName = New instat.ucrCheck() - Me.ucrInputCountsName = New instat.ucrInputTextBox() - Me.Label1 = New System.Windows.Forms.Label() - Me.ucrNudDecimalPlaces = New instat.ucrNud() - Me.ucrChkHighlightedRows = New instat.ucrCheck() - Me.ucrChkMedian = New instat.ucrCheck() - Me.ucrChkShowSummary = New instat.ucrCheck() + Me.lblTableTitle = New System.Windows.Forms.Label() + Me.ucrInputTitle = New instat.ucrInputTextBox() + Me.ucrChkShowStrings = New instat.ucrCheck() Me.tbpGraph = New System.Windows.Forms.TabPage() Me.grpGraphOptions = New System.Windows.Forms.GroupBox() Me.lblTitle = New System.Windows.Forms.Label() @@ -93,77 +87,31 @@ Partial Class sdgOneWayFrequencies ' 'grpTableOptions ' - Me.grpTableOptions.Controls.Add(Me.lblOmitZero) - Me.grpTableOptions.Controls.Add(Me.ucrInputOmitZero) - Me.grpTableOptions.Controls.Add(Me.ucrChkCountName) - Me.grpTableOptions.Controls.Add(Me.ucrInputCountsName) - Me.grpTableOptions.Controls.Add(Me.Label1) - Me.grpTableOptions.Controls.Add(Me.ucrNudDecimalPlaces) - Me.grpTableOptions.Controls.Add(Me.ucrChkHighlightedRows) - Me.grpTableOptions.Controls.Add(Me.ucrChkMedian) - Me.grpTableOptions.Controls.Add(Me.ucrChkShowSummary) + Me.grpTableOptions.Controls.Add(Me.lblTableTitle) + Me.grpTableOptions.Controls.Add(Me.ucrInputTitle) + Me.grpTableOptions.Controls.Add(Me.ucrChkShowStrings) resources.ApplyResources(Me.grpTableOptions, "grpTableOptions") Me.grpTableOptions.Name = "grpTableOptions" Me.grpTableOptions.TabStop = False ' - 'lblOmitZero + 'lblTableTitle ' - resources.ApplyResources(Me.lblOmitZero, "lblOmitZero") - Me.lblOmitZero.Name = "lblOmitZero" + resources.ApplyResources(Me.lblTableTitle, "lblTableTitle") + Me.lblTableTitle.Name = "lblTableTitle" ' - 'ucrInputOmitZero + 'ucrInputTitle ' - Me.ucrInputOmitZero.AddQuotesIfUnrecognised = True - Me.ucrInputOmitZero.IsReadOnly = False - resources.ApplyResources(Me.ucrInputOmitZero, "ucrInputOmitZero") - Me.ucrInputOmitZero.Name = "ucrInputOmitZero" + Me.ucrInputTitle.AddQuotesIfUnrecognised = True + Me.ucrInputTitle.IsMultiline = False + Me.ucrInputTitle.IsReadOnly = False + resources.ApplyResources(Me.ucrInputTitle, "ucrInputTitle") + Me.ucrInputTitle.Name = "ucrInputTitle" ' - 'ucrChkCountName + 'ucrChkShowStrings ' - Me.ucrChkCountName.Checked = False - resources.ApplyResources(Me.ucrChkCountName, "ucrChkCountName") - Me.ucrChkCountName.Name = "ucrChkCountName" - ' - 'ucrInputCountsName - ' - Me.ucrInputCountsName.AddQuotesIfUnrecognised = True - Me.ucrInputCountsName.IsMultiline = False - Me.ucrInputCountsName.IsReadOnly = False - resources.ApplyResources(Me.ucrInputCountsName, "ucrInputCountsName") - Me.ucrInputCountsName.Name = "ucrInputCountsName" - ' - 'Label1 - ' - resources.ApplyResources(Me.Label1, "Label1") - Me.Label1.Name = "Label1" - ' - 'ucrNudDecimalPlaces - ' - Me.ucrNudDecimalPlaces.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudDecimalPlaces, "ucrNudDecimalPlaces") - Me.ucrNudDecimalPlaces.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDecimalPlaces.Name = "ucrNudDecimalPlaces" - Me.ucrNudDecimalPlaces.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkHighlightedRows - ' - Me.ucrChkHighlightedRows.Checked = False - resources.ApplyResources(Me.ucrChkHighlightedRows, "ucrChkHighlightedRows") - Me.ucrChkHighlightedRows.Name = "ucrChkHighlightedRows" - ' - 'ucrChkMedian - ' - Me.ucrChkMedian.Checked = False - resources.ApplyResources(Me.ucrChkMedian, "ucrChkMedian") - Me.ucrChkMedian.Name = "ucrChkMedian" - ' - 'ucrChkShowSummary - ' - Me.ucrChkShowSummary.Checked = False - resources.ApplyResources(Me.ucrChkShowSummary, "ucrChkShowSummary") - Me.ucrChkShowSummary.Name = "ucrChkShowSummary" + Me.ucrChkShowStrings.Checked = False + resources.ApplyResources(Me.ucrChkShowStrings, "ucrChkShowStrings") + Me.ucrChkShowStrings.Name = "ucrChkShowStrings" ' 'tbpGraph ' @@ -311,9 +259,7 @@ Partial Class sdgOneWayFrequencies Friend WithEvents tbpOneWayFrequencies As TabControl Friend WithEvents tbpTable As TabPage Friend WithEvents grpTableOptions As GroupBox - Friend WithEvents ucrChkHighlightedRows As ucrCheck - Friend WithEvents ucrChkMedian As ucrCheck - Friend WithEvents ucrChkShowSummary As ucrCheck + Friend WithEvents ucrChkShowStrings As ucrCheck Friend WithEvents tbpGraph As TabPage Friend WithEvents grpGraphOptions As GroupBox Friend WithEvents ucrChkShowMissing As ucrCheck @@ -322,7 +268,6 @@ Partial Class sdgOneWayFrequencies Friend WithEvents ucrInputHorizontalLabels As ucrInputComboBox Friend WithEvents ucrInputVerticalLabels As ucrInputComboBox Friend WithEvents ucrInputGraphTitle As ucrInputTextBox - Friend WithEvents ucrNudDecimalPlaces As ucrNud Friend WithEvents grpGraphType As GroupBox Friend WithEvents ucrPnlGraphType As UcrPanel Friend WithEvents rdoLine As RadioButton @@ -331,9 +276,6 @@ Partial Class sdgOneWayFrequencies Friend WithEvents lblTitle As Label Friend WithEvents lblHjust As Label Friend WithEvents lblVjust As Label - Friend WithEvents Label1 As Label - Friend WithEvents ucrInputCountsName As ucrInputTextBox - Friend WithEvents ucrChkCountName As ucrCheck - Friend WithEvents lblOmitZero As Label - Friend WithEvents ucrInputOmitZero As ucrInputComboBox + Friend WithEvents ucrInputTitle As ucrInputTextBox + Friend WithEvents lblTableTitle As Label End Class diff --git a/instat/sdgOneWayFrequencies.resx b/instat/sdgOneWayFrequencies.resx index 8590718afba..34c95b57e40 100644 --- a/instat/sdgOneWayFrequencies.resx +++ b/instat/sdgOneWayFrequencies.resx @@ -118,217 +118,85 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True + + + NoControl + - - 9, 121 + + 12, 56 - - 145, 13 + + 60, 13 - - 5 + + 1 - - Omit Zero Counts from Table: + + Table Title: - - lblOmitZero + + lblTableTitle - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpTableOptions - + 0 - - 164, 116 - - - - 21, 17, 21, 17 + + 76, 52 - + 137, 21 - - 6 - - - ucrInputOmitZero - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTableOptions - - - 1 - - - 12, 93 - - - 94, 20 - - - 3 - - - ucrChkCountName - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTableOptions - - + 2 - - 112, 92 - - - 137, 21 - - - 4 - - - ucrInputCountsName + + ucrInputTitle - + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpTableOptions - - - 3 - - - True - - - 9, 145 - - - 161, 13 - - - 7 - - - Decimal Places for Percentages: - - - Label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTableOptions - - - 4 - - - 199, 144 - - - 50, 20 - - - 8 - - - ucrNudDecimalPlaces - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - + grpTableOptions - - 5 - - - 12, 43 - - - 145, 20 - - + 1 - - ucrChkHighlightedRows - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTableOptions - - - 6 - - - 12, 68 - - - 145, 20 - - - 2 + + 12, 22 - - ucrChkMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpTableOptions - - - 7 - - - 12, 18 - - + 145, 20 - + 0 - - ucrChkShowSummary + + ucrChkShowStrings - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpTableOptions - - 8 + + 2 6, 7 - 327, 177 + 236, 101 0 diff --git a/instat/sdgOneWayFrequencies.vb b/instat/sdgOneWayFrequencies.vb index 3dc420dfeff..decb2e42a13 100644 --- a/instat/sdgOneWayFrequencies.vb +++ b/instat/sdgOneWayFrequencies.vb @@ -31,38 +31,11 @@ Public Class sdgOneWayFrequencies ucrInputGraphTitle.SetParameter(New RParameter("title", 2)) 'Table Only - ucrChkHighlightedRows.SetParameter(New RParameter("altr.row.col", 4), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") - ucrChkHighlightedRows.SetRDefault("FALSE") - ucrChkHighlightedRows.SetText("Alternate Rows Coloured") + ucrInputTitle.SetParameter(New RParameter("title", 5)) 'Table Only - ucrInputCountsName.SetParameter(New RParameter("string.cnt", 5)) - ucrInputCountsName.SetRDefault(Chr(34) & "N" & Chr(34)) - ucrChkCountName.SetParameter(ucrInputCountsName.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - ucrChkCountName.SetText("Count Name") - ucrChkCountName.AddToLinkedControls(ucrInputCountsName, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - 'Table Only - ucrChkMedian.SetParameter(New RParameter("emph.md", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") - ucrChkMedian.SetRDefault("FALSE") - ucrChkMedian.SetText("Emphasise Median") - - 'Table Only - ucrChkShowSummary.SetParameter(New RParameter("show.summary", 7), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") - ucrChkShowSummary.SetText("Show Summary") - - 'Table Only - ucrInputOmitZero.SetParameter(New RParameter("skip.zero", 8)) - dctOmitZero.Add("Auto", Chr(34) & "auto" & Chr(34)) - dctOmitZero.Add("True", Chr(34) & "TRUE" & Chr(34)) - dctOmitZero.Add("False", Chr(34) & "FALSE" & Chr(34)) - ucrInputOmitZero.SetItems(dctOmitZero) - ucrInputOmitZero.SetRDefault(Chr(34) & "auto" & Chr(34)) - ucrInputOmitZero.bUpdateRCodeFromControl = False - - 'Table Only - ucrNudDecimalPlaces.SetParameter(New RParameter("digits", 10)) - ucrNudDecimalPlaces.SetMinMax(0, 4) + ucrChkShowStrings.SetParameter(New RParameter("show.strings", 7), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") + ucrChkShowStrings.SetText("Show Strings") 'Graph Only ucrPnlGraphType.SetParameter(New RParameter("type", 4)) @@ -124,14 +97,8 @@ Public Class sdgOneWayFrequencies clsOneWayGraphFreq = clsNewSjpFrq clsOneWayPlotGrid = clsNewPlotGrid - ucrChkMedian.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - ucrChkShowSummary.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - ucrChkHighlightedRows.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - ucrNudDecimalPlaces.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - ucrInputOmitZero.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - ucrInputCountsName.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - ucrChkCountName.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) - + ucrChkShowStrings.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) + ucrInputTitle.SetRCode(clsOneWayTableFreq, bReset, bCloneIfNeeded:=True) ucrChkShowCount.SetRCode(clsOneWayGraphFreq, bReset, bCloneIfNeeded:=True) ucrChkShowPercentage.SetRCode(clsOneWayGraphFreq, bReset, bCloneIfNeeded:=True) ucrChkShowMissing.SetRCode(clsOneWayGraphFreq, bReset, bCloneIfNeeded:=True) diff --git a/instat/sdgPICSARainfallGraph.Designer.vb b/instat/sdgPICSARainfallGraph.Designer.vb index cf15c5e7acd..4b6882304c7 100644 --- a/instat/sdgPICSARainfallGraph.Designer.vb +++ b/instat/sdgPICSARainfallGraph.Designer.vb @@ -22,331 +22,939 @@ Partial Class sdgPICSARainfallGraph 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(sdgPICSARainfallGraph)) - Me.lblYAxisTitleSize = New System.Windows.Forms.Label() - Me.lblYInStepsOf = New System.Windows.Forms.Label() - Me.lblYFrom = New System.Windows.Forms.Label() - Me.lblYTo = New System.Windows.Forms.Label() - Me.lblXTo = New System.Windows.Forms.Label() - Me.lblXFrom = New System.Windows.Forms.Label() - Me.lblXInStepsOf = New System.Windows.Forms.Label() - Me.ucrInputXInStepsOf = New instat.ucrInputTextBox() - Me.ucrInputXTo = New instat.ucrInputTextBox() - Me.ucrInputYInStepsOf = New instat.ucrInputTextBox() - Me.ucrInputXFrom = New instat.ucrInputTextBox() - Me.ucrInputYTo = New instat.ucrInputTextBox() - Me.ucrInputYFrom = New instat.ucrInputTextBox() - Me.ucrNudXaxisLabelSize = New instat.ucrNud() - Me.ucrNudXAxisAngle = New instat.ucrNud() - Me.ucrNudYAxisLabelsSize = New instat.ucrNud() - Me.ucrNudYAxisTitleSize = New instat.ucrNud() - Me.ucrChkAddLabel = New instat.ucrCheck() - Me.ucrChkXaxisLabelSize = New instat.ucrCheck() - Me.ucrInputSubFootNote = New instat.ucrInputTextBox() - Me.ucrInputFootNote = New instat.ucrInputTextBox() - Me.ucrChkSubFootNote = New instat.ucrCheck() - Me.ucrInputYAxisTitle = New instat.ucrInputTextBox() - Me.ucrChkFootNote = New instat.ucrCheck() - Me.ucrChkXaxisAngle = New instat.ucrCheck() - Me.ucrSpecifyXAxisTickMarks = New instat.ucrCheck() - Me.ucrSpecifyYAxisTickMarks = New instat.ucrCheck() - Me.ucrChkYAxisTitle = New instat.ucrCheck() - Me.ucrChkAddTerciles = New instat.ucrCheck() - Me.ucrChkAddMedian = New instat.ucrCheck() - Me.ucrChkYAxisLabelsSize = New instat.ucrCheck() - Me.ucrChkAddMean = New instat.ucrCheck() - Me.ucrSdgPICSARainfalbuttons = New instat.ucrButtonsSubdialogue() - Me.SuspendLayout() - ' - 'lblYAxisTitleSize - ' - resources.ApplyResources(Me.lblYAxisTitleSize, "lblYAxisTitleSize") - Me.lblYAxisTitleSize.Name = "lblYAxisTitleSize" - ' - 'lblYInStepsOf - ' - resources.ApplyResources(Me.lblYInStepsOf, "lblYInStepsOf") - Me.lblYInStepsOf.Name = "lblYInStepsOf" - ' - 'lblYFrom - ' - resources.ApplyResources(Me.lblYFrom, "lblYFrom") - Me.lblYFrom.Name = "lblYFrom" - ' - 'lblYTo - ' - resources.ApplyResources(Me.lblYTo, "lblYTo") - Me.lblYTo.Name = "lblYTo" - ' - 'lblXTo - ' - resources.ApplyResources(Me.lblXTo, "lblXTo") - Me.lblXTo.Name = "lblXTo" - ' - 'lblXFrom - ' - resources.ApplyResources(Me.lblXFrom, "lblXFrom") - Me.lblXFrom.Name = "lblXFrom" - ' - 'lblXInStepsOf - ' - resources.ApplyResources(Me.lblXInStepsOf, "lblXInStepsOf") - Me.lblXInStepsOf.Name = "lblXInStepsOf" - ' - 'ucrInputXInStepsOf - ' - Me.ucrInputXInStepsOf.AddQuotesIfUnrecognised = True - Me.ucrInputXInStepsOf.IsMultiline = False - Me.ucrInputXInStepsOf.IsReadOnly = False - resources.ApplyResources(Me.ucrInputXInStepsOf, "ucrInputXInStepsOf") - Me.ucrInputXInStepsOf.Name = "ucrInputXInStepsOf" - ' - 'ucrInputXTo - ' - Me.ucrInputXTo.AddQuotesIfUnrecognised = True - Me.ucrInputXTo.IsMultiline = False - Me.ucrInputXTo.IsReadOnly = False - resources.ApplyResources(Me.ucrInputXTo, "ucrInputXTo") - Me.ucrInputXTo.Name = "ucrInputXTo" - ' - 'ucrInputYInStepsOf - ' - Me.ucrInputYInStepsOf.AddQuotesIfUnrecognised = True - Me.ucrInputYInStepsOf.IsMultiline = False - Me.ucrInputYInStepsOf.IsReadOnly = False - resources.ApplyResources(Me.ucrInputYInStepsOf, "ucrInputYInStepsOf") - Me.ucrInputYInStepsOf.Name = "ucrInputYInStepsOf" - ' - 'ucrInputXFrom - ' - Me.ucrInputXFrom.AddQuotesIfUnrecognised = True - Me.ucrInputXFrom.IsMultiline = False - Me.ucrInputXFrom.IsReadOnly = False - resources.ApplyResources(Me.ucrInputXFrom, "ucrInputXFrom") - Me.ucrInputXFrom.Name = "ucrInputXFrom" - ' - 'ucrInputYTo - ' - Me.ucrInputYTo.AddQuotesIfUnrecognised = True - Me.ucrInputYTo.IsMultiline = False - Me.ucrInputYTo.IsReadOnly = False - resources.ApplyResources(Me.ucrInputYTo, "ucrInputYTo") - Me.ucrInputYTo.Name = "ucrInputYTo" - ' - 'ucrInputYFrom - ' - Me.ucrInputYFrom.AddQuotesIfUnrecognised = True - Me.ucrInputYFrom.IsMultiline = False - Me.ucrInputYFrom.IsReadOnly = False - resources.ApplyResources(Me.ucrInputYFrom, "ucrInputYFrom") - Me.ucrInputYFrom.Name = "ucrInputYFrom" - ' - 'ucrNudXaxisLabelSize - ' - Me.ucrNudXaxisLabelSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudXaxisLabelSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudXaxisLabelSize, "ucrNudXaxisLabelSize") - Me.ucrNudXaxisLabelSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudXaxisLabelSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudXaxisLabelSize.Name = "ucrNudXaxisLabelSize" - Me.ucrNudXaxisLabelSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudXAxisAngle - ' - Me.ucrNudXAxisAngle.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudXAxisAngle.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudXAxisAngle, "ucrNudXAxisAngle") - Me.ucrNudXAxisAngle.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudXAxisAngle.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudXAxisAngle.Name = "ucrNudXAxisAngle" - Me.ucrNudXAxisAngle.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudYAxisLabelsSize - ' - Me.ucrNudYAxisLabelsSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudYAxisLabelsSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudYAxisLabelsSize, "ucrNudYAxisLabelsSize") - Me.ucrNudYAxisLabelsSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudYAxisLabelsSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudYAxisLabelsSize.Name = "ucrNudYAxisLabelsSize" - Me.ucrNudYAxisLabelsSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudYAxisTitleSize - ' - Me.ucrNudYAxisTitleSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudYAxisTitleSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudYAxisTitleSize, "ucrNudYAxisTitleSize") - Me.ucrNudYAxisTitleSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudYAxisTitleSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudYAxisTitleSize.Name = "ucrNudYAxisTitleSize" - Me.ucrNudYAxisTitleSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkAddLabel - ' - Me.ucrChkAddLabel.Checked = False - resources.ApplyResources(Me.ucrChkAddLabel, "ucrChkAddLabel") - Me.ucrChkAddLabel.Name = "ucrChkAddLabel" - ' - 'ucrChkXaxisLabelSize - ' - Me.ucrChkXaxisLabelSize.Checked = False - resources.ApplyResources(Me.ucrChkXaxisLabelSize, "ucrChkXaxisLabelSize") - Me.ucrChkXaxisLabelSize.Name = "ucrChkXaxisLabelSize" - ' - 'ucrInputSubFootNote - ' - Me.ucrInputSubFootNote.AddQuotesIfUnrecognised = True - Me.ucrInputSubFootNote.IsMultiline = False - Me.ucrInputSubFootNote.IsReadOnly = False - resources.ApplyResources(Me.ucrInputSubFootNote, "ucrInputSubFootNote") - Me.ucrInputSubFootNote.Name = "ucrInputSubFootNote" - ' - 'ucrInputFootNote - ' - Me.ucrInputFootNote.AddQuotesIfUnrecognised = True - Me.ucrInputFootNote.IsMultiline = False - Me.ucrInputFootNote.IsReadOnly = False - resources.ApplyResources(Me.ucrInputFootNote, "ucrInputFootNote") - Me.ucrInputFootNote.Name = "ucrInputFootNote" - ' - 'ucrChkSubFootNote - ' - Me.ucrChkSubFootNote.Checked = False - resources.ApplyResources(Me.ucrChkSubFootNote, "ucrChkSubFootNote") - Me.ucrChkSubFootNote.Name = "ucrChkSubFootNote" - ' - 'ucrInputYAxisTitle - ' - Me.ucrInputYAxisTitle.AddQuotesIfUnrecognised = True - Me.ucrInputYAxisTitle.IsMultiline = False - Me.ucrInputYAxisTitle.IsReadOnly = False - resources.ApplyResources(Me.ucrInputYAxisTitle, "ucrInputYAxisTitle") - Me.ucrInputYAxisTitle.Name = "ucrInputYAxisTitle" - ' - 'ucrChkFootNote - ' - Me.ucrChkFootNote.Checked = False - resources.ApplyResources(Me.ucrChkFootNote, "ucrChkFootNote") - Me.ucrChkFootNote.Name = "ucrChkFootNote" - ' - 'ucrChkXaxisAngle - ' - Me.ucrChkXaxisAngle.Checked = False - resources.ApplyResources(Me.ucrChkXaxisAngle, "ucrChkXaxisAngle") - Me.ucrChkXaxisAngle.Name = "ucrChkXaxisAngle" - ' - 'ucrSpecifyXAxisTickMarks - ' - Me.ucrSpecifyXAxisTickMarks.Checked = False - resources.ApplyResources(Me.ucrSpecifyXAxisTickMarks, "ucrSpecifyXAxisTickMarks") - Me.ucrSpecifyXAxisTickMarks.Name = "ucrSpecifyXAxisTickMarks" - ' - 'ucrSpecifyYAxisTickMarks - ' - Me.ucrSpecifyYAxisTickMarks.Checked = False - resources.ApplyResources(Me.ucrSpecifyYAxisTickMarks, "ucrSpecifyYAxisTickMarks") - Me.ucrSpecifyYAxisTickMarks.Name = "ucrSpecifyYAxisTickMarks" - ' - 'ucrChkYAxisTitle - ' - Me.ucrChkYAxisTitle.Checked = False - resources.ApplyResources(Me.ucrChkYAxisTitle, "ucrChkYAxisTitle") - Me.ucrChkYAxisTitle.Name = "ucrChkYAxisTitle" - ' - 'ucrChkAddTerciles - ' - Me.ucrChkAddTerciles.Checked = False - resources.ApplyResources(Me.ucrChkAddTerciles, "ucrChkAddTerciles") - Me.ucrChkAddTerciles.Name = "ucrChkAddTerciles" - ' - 'ucrChkAddMedian - ' - Me.ucrChkAddMedian.Checked = False - resources.ApplyResources(Me.ucrChkAddMedian, "ucrChkAddMedian") - Me.ucrChkAddMedian.Name = "ucrChkAddMedian" - ' - 'ucrChkYAxisLabelsSize - ' - Me.ucrChkYAxisLabelsSize.Checked = False - resources.ApplyResources(Me.ucrChkYAxisLabelsSize, "ucrChkYAxisLabelsSize") - Me.ucrChkYAxisLabelsSize.Name = "ucrChkYAxisLabelsSize" - ' - 'ucrChkAddMean - ' - Me.ucrChkAddMean.Checked = False - resources.ApplyResources(Me.ucrChkAddMean, "ucrChkAddMean") - Me.ucrChkAddMean.Name = "ucrChkAddMean" - ' - 'ucrSdgPICSARainfalbuttons - ' - resources.ApplyResources(Me.ucrSdgPICSARainfalbuttons, "ucrSdgPICSARainfalbuttons") - Me.ucrSdgPICSARainfalbuttons.Name = "ucrSdgPICSARainfalbuttons" - ' - 'sdgPICSARainfallGraph - ' - resources.ApplyResources(Me, "$this") - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.ucrInputXInStepsOf) - Me.Controls.Add(Me.ucrInputXTo) - Me.Controls.Add(Me.ucrInputYInStepsOf) - Me.Controls.Add(Me.ucrInputXFrom) - Me.Controls.Add(Me.ucrInputYTo) - Me.Controls.Add(Me.lblXInStepsOf) - Me.Controls.Add(Me.ucrInputYFrom) - Me.Controls.Add(Me.lblXFrom) - Me.Controls.Add(Me.lblYInStepsOf) - Me.Controls.Add(Me.lblXTo) - Me.Controls.Add(Me.lblYFrom) - Me.Controls.Add(Me.lblYTo) - Me.Controls.Add(Me.ucrNudXaxisLabelSize) - Me.Controls.Add(Me.ucrNudXAxisAngle) - Me.Controls.Add(Me.ucrNudYAxisLabelsSize) - Me.Controls.Add(Me.ucrNudYAxisTitleSize) - Me.Controls.Add(Me.lblYAxisTitleSize) - Me.Controls.Add(Me.ucrChkAddLabel) - Me.Controls.Add(Me.ucrChkXaxisLabelSize) - Me.Controls.Add(Me.ucrInputSubFootNote) - Me.Controls.Add(Me.ucrInputFootNote) - Me.Controls.Add(Me.ucrChkSubFootNote) - Me.Controls.Add(Me.ucrInputYAxisTitle) - Me.Controls.Add(Me.ucrChkFootNote) - Me.Controls.Add(Me.ucrChkXaxisAngle) - Me.Controls.Add(Me.ucrSpecifyXAxisTickMarks) - Me.Controls.Add(Me.ucrSpecifyYAxisTickMarks) - Me.Controls.Add(Me.ucrChkYAxisTitle) - Me.Controls.Add(Me.ucrChkAddTerciles) - Me.Controls.Add(Me.ucrChkAddMedian) - Me.Controls.Add(Me.ucrChkYAxisLabelsSize) - Me.Controls.Add(Me.ucrChkAddMean) - Me.Controls.Add(Me.ucrSdgPICSARainfalbuttons) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.MaximizeBox = False - Me.MinimizeBox = False - Me.Name = "sdgPICSARainfallGraph" - Me.ResumeLayout(False) - Me.PerformLayout() - + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(sdgPICSARainfallGraph)) + Me.lblYInStepsOf = New System.Windows.Forms.Label() + Me.lblYFrom = New System.Windows.Forms.Label() + Me.lblYTo = New System.Windows.Forms.Label() + Me.lblXTo = New System.Windows.Forms.Label() + Me.lblXFrom = New System.Windows.Forms.Label() + Me.lblXInStepsOf = New System.Windows.Forms.Label() + Me.tbPICSA = New System.Windows.Forms.TabControl() + Me.TabPage1 = New System.Windows.Forms.TabPage() + Me.grpyAxisTitle = New System.Windows.Forms.GroupBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.rdoAutoYAxis = New System.Windows.Forms.RadioButton() + Me.ucrInputYAxisTitle = New instat.ucrInputTextBox() + Me.rdoNoYAxisTitle = New System.Windows.Forms.RadioButton() + Me.ucrNudYAxisTitleSize = New instat.ucrNud() + Me.rdoSpecifyYAxisTitle = New System.Windows.Forms.RadioButton() + Me.UcrPnlYAxisTitle = New instat.UcrPanel() + Me.grpAxes = New System.Windows.Forms.GroupBox() + Me.lblXAxisTitleSize = New System.Windows.Forms.Label() + Me.rdoAutoXAxis = New System.Windows.Forms.RadioButton() + Me.ucrInputXAxisTitle = New instat.ucrInputTextBox() + Me.rdoNoTitleXAxisTitle = New System.Windows.Forms.RadioButton() + Me.rdoSpecifyXAxisTitle = New System.Windows.Forms.RadioButton() + Me.ucrPnlXAxisTitle = New instat.UcrPanel() + Me.ucrNudXAxisTitleSize = New instat.ucrNud() + Me.grpGraphTitles = New System.Windows.Forms.GroupBox() + Me.lblCaptionSize = New System.Windows.Forms.Label() + Me.lblSubTitleSize = New System.Windows.Forms.Label() + Me.lblTitleSize = New System.Windows.Forms.Label() + Me.lblCaption = New System.Windows.Forms.Label() + Me.lblSubTitle = New System.Windows.Forms.Label() + Me.lblTitle = New System.Windows.Forms.Label() + Me.ucrNudCaptionSize = New instat.ucrNud() + Me.ucrNudSubTitleSize = New instat.ucrNud() + Me.ucrNudTitleSize = New instat.ucrNud() + Me.ucrInputGraphcCaption = New instat.ucrInputTextBox() + Me.ucrInputGraphTitle = New instat.ucrInputTextBox() + Me.ucrInputGraphSubTitle = New instat.ucrInputTextBox() + Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.grpXAxisLabels = New System.Windows.Forms.GroupBox() + Me.ucrChkXAxisLabelSize = New instat.ucrCheck() + Me.ucrChkXAxisAngle = New instat.ucrCheck() + Me.ucrChkSpecifyXAxisTickMarks = New instat.ucrCheck() + Me.ucrInputXFrom = New instat.ucrInputTextBox() + Me.ucrInputXInStepsOf = New instat.ucrInputTextBox() + Me.ucrNudXaxisLabelSize = New instat.ucrNud() + Me.ucrInputXTo = New instat.ucrInputTextBox() + Me.ucrNudXAxisAngle = New instat.ucrNud() + Me.grpYAxisLabels = New System.Windows.Forms.GroupBox() + Me.ucrNudDateBreakNumber = New instat.ucrNud() + Me.ucrInputDateBreakTime = New instat.ucrInputComboBox() + Me.ucrChkSpecifyDateBreaks = New instat.ucrCheck() + Me.ucrInputLabelForDays = New instat.ucrInputComboBox() + Me.ucrNudYAxisAngle = New instat.ucrNud() + Me.ucrChkLabelForDays = New instat.ucrCheck() + Me.ucrChkYAxisAngle = New instat.ucrCheck() + Me.ucrChkYAxisLabelSize = New instat.ucrCheck() + Me.ucrChkSpecifyYAxisTickMarks = New instat.ucrCheck() + Me.ucrInputYFrom = New instat.ucrInputTextBox() + Me.ucrNudYAxisLabelSize = New instat.ucrNud() + Me.ucrInputYTo = New instat.ucrInputTextBox() + Me.ucrInputYInStepsOf = New instat.ucrInputTextBox() + Me.TabPage3 = New System.Windows.Forms.TabPage() + Me.ucrChkAddTercilesLabel = New instat.ucrCheck() + Me.ucrChkAddMedianLabel = New instat.ucrCheck() + Me.ucrChkAddMeanLabel = New instat.ucrCheck() + Me.ucrChkAddMean = New instat.ucrCheck() + Me.ucrChkAddMedian = New instat.ucrCheck() + Me.ucrChkAddTerciles = New instat.ucrCheck() + Me.TabPage4 = New System.Windows.Forms.TabPage() + Me.grpMinorGridLine = New System.Windows.Forms.GroupBox() + Me.UcrNudMinorGridLineSize = New instat.ucrNud() + Me.UcrChkMinorGridLineSize = New instat.ucrCheck() + Me.UcrInputMinorGridLineTpe = New instat.ucrInputComboBox() + Me.UcrInputMinorGridLineColour = New instat.ucrInputComboBox() + Me.UcrChkMinorGridLineType = New instat.ucrCheck() + Me.UcrChkMinorGridLineColour = New instat.ucrCheck() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.ucrNudBorderSize = New instat.ucrNud() + Me.UcrChkBorderSize = New instat.ucrCheck() + Me.ucrInputBorderLinetype = New instat.ucrInputComboBox() + Me.ucrInputBorderColour = New instat.ucrInputComboBox() + Me.ucrChkBorderLineType = New instat.ucrCheck() + Me.ucrChkBorderColour = New instat.ucrCheck() + Me.grpMajorGridLines = New System.Windows.Forms.GroupBox() + Me.UcrNudMajorGridLineSize = New instat.ucrNud() + Me.UcrChkMajorGridLineSize = New instat.ucrCheck() + Me.UcrInputMajorGridLineLinetype = New instat.ucrInputComboBox() + Me.UcrInputMajorGridLineColour = New instat.ucrInputComboBox() + Me.UcrChkMajorGridLinetype = New instat.ucrCheck() + Me.UcrChkMajorGridLineColour = New instat.ucrCheck() + Me.grpPnlBackground = New System.Windows.Forms.GroupBox() + Me.ucrNudPnlBackgroundSize = New instat.ucrNud() + Me.UcrInputPnlBackgroundFill = New instat.ucrInputComboBox() + Me.UcrInputPnlBackgroundLinetype = New instat.ucrInputComboBox() + Me.UcrInputPnlBackgroundColour = New instat.ucrInputComboBox() + Me.UcrChkPnlBackgroundSize = New instat.ucrCheck() + Me.UcrChkPnlBackgroundLineType = New instat.ucrCheck() + Me.UcrChkPnlBackgroundFill = New instat.ucrCheck() + Me.ucrChkPnlBackgroundColour = New instat.ucrCheck() + Me.ucrSdgPICSARainfalbuttons = New instat.ucrButtonsSubdialogue() + Me.tbPICSA.SuspendLayout() + Me.TabPage1.SuspendLayout() + Me.grpyAxisTitle.SuspendLayout() + Me.grpAxes.SuspendLayout() + Me.grpGraphTitles.SuspendLayout() + Me.TabPage2.SuspendLayout() + Me.grpXAxisLabels.SuspendLayout() + Me.grpYAxisLabels.SuspendLayout() + Me.TabPage3.SuspendLayout() + Me.TabPage4.SuspendLayout() + Me.grpMinorGridLine.SuspendLayout() + Me.GroupBox1.SuspendLayout() + Me.grpMajorGridLines.SuspendLayout() + Me.grpPnlBackground.SuspendLayout() + Me.SuspendLayout() + ' + 'lblYInStepsOf + ' + resources.ApplyResources(Me.lblYInStepsOf, "lblYInStepsOf") + Me.lblYInStepsOf.Name = "lblYInStepsOf" + ' + 'lblYFrom + ' + resources.ApplyResources(Me.lblYFrom, "lblYFrom") + Me.lblYFrom.Name = "lblYFrom" + ' + 'lblYTo + ' + resources.ApplyResources(Me.lblYTo, "lblYTo") + Me.lblYTo.Name = "lblYTo" + ' + 'lblXTo + ' + resources.ApplyResources(Me.lblXTo, "lblXTo") + Me.lblXTo.Name = "lblXTo" + ' + 'lblXFrom + ' + resources.ApplyResources(Me.lblXFrom, "lblXFrom") + Me.lblXFrom.Name = "lblXFrom" + ' + 'lblXInStepsOf + ' + resources.ApplyResources(Me.lblXInStepsOf, "lblXInStepsOf") + Me.lblXInStepsOf.Name = "lblXInStepsOf" + ' + 'tbPICSA + ' + Me.tbPICSA.Controls.Add(Me.TabPage1) + Me.tbPICSA.Controls.Add(Me.TabPage2) + Me.tbPICSA.Controls.Add(Me.TabPage3) + Me.tbPICSA.Controls.Add(Me.TabPage4) + resources.ApplyResources(Me.tbPICSA, "tbPICSA") + Me.tbPICSA.Name = "tbPICSA" + Me.tbPICSA.SelectedIndex = 0 + ' + 'TabPage1 + ' + Me.TabPage1.Controls.Add(Me.grpyAxisTitle) + Me.TabPage1.Controls.Add(Me.grpAxes) + Me.TabPage1.Controls.Add(Me.grpGraphTitles) + resources.ApplyResources(Me.TabPage1, "TabPage1") + Me.TabPage1.Name = "TabPage1" + Me.TabPage1.UseVisualStyleBackColor = True + ' + 'grpyAxisTitle + ' + Me.grpyAxisTitle.Controls.Add(Me.Label1) + Me.grpyAxisTitle.Controls.Add(Me.rdoAutoYAxis) + Me.grpyAxisTitle.Controls.Add(Me.ucrInputYAxisTitle) + Me.grpyAxisTitle.Controls.Add(Me.rdoNoYAxisTitle) + Me.grpyAxisTitle.Controls.Add(Me.ucrNudYAxisTitleSize) + Me.grpyAxisTitle.Controls.Add(Me.rdoSpecifyYAxisTitle) + Me.grpyAxisTitle.Controls.Add(Me.UcrPnlYAxisTitle) + resources.ApplyResources(Me.grpyAxisTitle, "grpyAxisTitle") + Me.grpyAxisTitle.Name = "grpyAxisTitle" + Me.grpyAxisTitle.TabStop = False + ' + 'Label1 + ' + resources.ApplyResources(Me.Label1, "Label1") + Me.Label1.Name = "Label1" + ' + 'rdoAutoYAxis + ' + resources.ApplyResources(Me.rdoAutoYAxis, "rdoAutoYAxis") + Me.rdoAutoYAxis.Name = "rdoAutoYAxis" + Me.rdoAutoYAxis.TabStop = True + Me.rdoAutoYAxis.UseVisualStyleBackColor = True + ' + 'ucrInputYAxisTitle + ' + Me.ucrInputYAxisTitle.AddQuotesIfUnrecognised = True + Me.ucrInputYAxisTitle.IsMultiline = False + Me.ucrInputYAxisTitle.IsReadOnly = False + resources.ApplyResources(Me.ucrInputYAxisTitle, "ucrInputYAxisTitle") + Me.ucrInputYAxisTitle.Name = "ucrInputYAxisTitle" + ' + 'rdoNoYAxisTitle + ' + resources.ApplyResources(Me.rdoNoYAxisTitle, "rdoNoYAxisTitle") + Me.rdoNoYAxisTitle.Name = "rdoNoYAxisTitle" + Me.rdoNoYAxisTitle.TabStop = True + Me.rdoNoYAxisTitle.UseVisualStyleBackColor = True + ' + 'ucrNudYAxisTitleSize + ' + Me.ucrNudYAxisTitleSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudYAxisTitleSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudYAxisTitleSize, "ucrNudYAxisTitleSize") + Me.ucrNudYAxisTitleSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudYAxisTitleSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudYAxisTitleSize.Name = "ucrNudYAxisTitleSize" + Me.ucrNudYAxisTitleSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'rdoSpecifyYAxisTitle + ' + resources.ApplyResources(Me.rdoSpecifyYAxisTitle, "rdoSpecifyYAxisTitle") + Me.rdoSpecifyYAxisTitle.Name = "rdoSpecifyYAxisTitle" + Me.rdoSpecifyYAxisTitle.TabStop = True + Me.rdoSpecifyYAxisTitle.UseVisualStyleBackColor = True + ' + 'UcrPnlYAxisTitle + ' + resources.ApplyResources(Me.UcrPnlYAxisTitle, "UcrPnlYAxisTitle") + Me.UcrPnlYAxisTitle.Name = "UcrPnlYAxisTitle" + ' + 'grpAxes + ' + Me.grpAxes.Controls.Add(Me.lblXAxisTitleSize) + Me.grpAxes.Controls.Add(Me.rdoAutoXAxis) + Me.grpAxes.Controls.Add(Me.ucrInputXAxisTitle) + Me.grpAxes.Controls.Add(Me.rdoNoTitleXAxisTitle) + Me.grpAxes.Controls.Add(Me.rdoSpecifyXAxisTitle) + Me.grpAxes.Controls.Add(Me.ucrPnlXAxisTitle) + Me.grpAxes.Controls.Add(Me.ucrNudXAxisTitleSize) + resources.ApplyResources(Me.grpAxes, "grpAxes") + Me.grpAxes.Name = "grpAxes" + Me.grpAxes.TabStop = False + ' + 'lblXAxisTitleSize + ' + resources.ApplyResources(Me.lblXAxisTitleSize, "lblXAxisTitleSize") + Me.lblXAxisTitleSize.Name = "lblXAxisTitleSize" + ' + 'rdoAutoXAxis + ' + resources.ApplyResources(Me.rdoAutoXAxis, "rdoAutoXAxis") + Me.rdoAutoXAxis.Name = "rdoAutoXAxis" + Me.rdoAutoXAxis.TabStop = True + Me.rdoAutoXAxis.UseVisualStyleBackColor = True + ' + 'ucrInputXAxisTitle + ' + Me.ucrInputXAxisTitle.AddQuotesIfUnrecognised = True + Me.ucrInputXAxisTitle.IsMultiline = False + Me.ucrInputXAxisTitle.IsReadOnly = False + resources.ApplyResources(Me.ucrInputXAxisTitle, "ucrInputXAxisTitle") + Me.ucrInputXAxisTitle.Name = "ucrInputXAxisTitle" + ' + 'rdoNoTitleXAxisTitle + ' + resources.ApplyResources(Me.rdoNoTitleXAxisTitle, "rdoNoTitleXAxisTitle") + Me.rdoNoTitleXAxisTitle.Name = "rdoNoTitleXAxisTitle" + Me.rdoNoTitleXAxisTitle.TabStop = True + Me.rdoNoTitleXAxisTitle.UseVisualStyleBackColor = True + ' + 'rdoSpecifyXAxisTitle + ' + resources.ApplyResources(Me.rdoSpecifyXAxisTitle, "rdoSpecifyXAxisTitle") + Me.rdoSpecifyXAxisTitle.Name = "rdoSpecifyXAxisTitle" + Me.rdoSpecifyXAxisTitle.TabStop = True + Me.rdoSpecifyXAxisTitle.UseVisualStyleBackColor = True + ' + 'ucrPnlXAxisTitle + ' + resources.ApplyResources(Me.ucrPnlXAxisTitle, "ucrPnlXAxisTitle") + Me.ucrPnlXAxisTitle.Name = "ucrPnlXAxisTitle" + ' + 'ucrNudXAxisTitleSize + ' + Me.ucrNudXAxisTitleSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudXAxisTitleSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudXAxisTitleSize, "ucrNudXAxisTitleSize") + Me.ucrNudXAxisTitleSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudXAxisTitleSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudXAxisTitleSize.Name = "ucrNudXAxisTitleSize" + Me.ucrNudXAxisTitleSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'grpGraphTitles + ' + Me.grpGraphTitles.Controls.Add(Me.lblCaptionSize) + Me.grpGraphTitles.Controls.Add(Me.lblSubTitleSize) + Me.grpGraphTitles.Controls.Add(Me.lblTitleSize) + Me.grpGraphTitles.Controls.Add(Me.lblCaption) + Me.grpGraphTitles.Controls.Add(Me.lblSubTitle) + Me.grpGraphTitles.Controls.Add(Me.lblTitle) + Me.grpGraphTitles.Controls.Add(Me.ucrNudCaptionSize) + Me.grpGraphTitles.Controls.Add(Me.ucrNudSubTitleSize) + Me.grpGraphTitles.Controls.Add(Me.ucrNudTitleSize) + Me.grpGraphTitles.Controls.Add(Me.ucrInputGraphcCaption) + Me.grpGraphTitles.Controls.Add(Me.ucrInputGraphTitle) + Me.grpGraphTitles.Controls.Add(Me.ucrInputGraphSubTitle) + resources.ApplyResources(Me.grpGraphTitles, "grpGraphTitles") + Me.grpGraphTitles.Name = "grpGraphTitles" + Me.grpGraphTitles.TabStop = False + ' + 'lblCaptionSize + ' + resources.ApplyResources(Me.lblCaptionSize, "lblCaptionSize") + Me.lblCaptionSize.Name = "lblCaptionSize" + ' + 'lblSubTitleSize + ' + resources.ApplyResources(Me.lblSubTitleSize, "lblSubTitleSize") + Me.lblSubTitleSize.Name = "lblSubTitleSize" + ' + 'lblTitleSize + ' + resources.ApplyResources(Me.lblTitleSize, "lblTitleSize") + Me.lblTitleSize.Name = "lblTitleSize" + ' + 'lblCaption + ' + resources.ApplyResources(Me.lblCaption, "lblCaption") + Me.lblCaption.Name = "lblCaption" + ' + 'lblSubTitle + ' + resources.ApplyResources(Me.lblSubTitle, "lblSubTitle") + Me.lblSubTitle.Name = "lblSubTitle" + ' + 'lblTitle + ' + resources.ApplyResources(Me.lblTitle, "lblTitle") + Me.lblTitle.Name = "lblTitle" + ' + 'ucrNudCaptionSize + ' + Me.ucrNudCaptionSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCaptionSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudCaptionSize, "ucrNudCaptionSize") + Me.ucrNudCaptionSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudCaptionSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCaptionSize.Name = "ucrNudCaptionSize" + Me.ucrNudCaptionSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudSubTitleSize + ' + Me.ucrNudSubTitleSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSubTitleSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudSubTitleSize, "ucrNudSubTitleSize") + Me.ucrNudSubTitleSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSubTitleSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSubTitleSize.Name = "ucrNudSubTitleSize" + Me.ucrNudSubTitleSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudTitleSize + ' + Me.ucrNudTitleSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTitleSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudTitleSize, "ucrNudTitleSize") + Me.ucrNudTitleSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudTitleSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTitleSize.Name = "ucrNudTitleSize" + Me.ucrNudTitleSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputGraphcCaption + ' + Me.ucrInputGraphcCaption.AddQuotesIfUnrecognised = True + Me.ucrInputGraphcCaption.IsMultiline = False + Me.ucrInputGraphcCaption.IsReadOnly = False + resources.ApplyResources(Me.ucrInputGraphcCaption, "ucrInputGraphcCaption") + Me.ucrInputGraphcCaption.Name = "ucrInputGraphcCaption" + ' + 'ucrInputGraphTitle + ' + Me.ucrInputGraphTitle.AddQuotesIfUnrecognised = True + Me.ucrInputGraphTitle.IsMultiline = False + Me.ucrInputGraphTitle.IsReadOnly = False + resources.ApplyResources(Me.ucrInputGraphTitle, "ucrInputGraphTitle") + Me.ucrInputGraphTitle.Name = "ucrInputGraphTitle" + ' + 'ucrInputGraphSubTitle + ' + Me.ucrInputGraphSubTitle.AddQuotesIfUnrecognised = True + Me.ucrInputGraphSubTitle.IsMultiline = False + Me.ucrInputGraphSubTitle.IsReadOnly = False + resources.ApplyResources(Me.ucrInputGraphSubTitle, "ucrInputGraphSubTitle") + Me.ucrInputGraphSubTitle.Name = "ucrInputGraphSubTitle" + ' + 'TabPage2 + ' + Me.TabPage2.Controls.Add(Me.grpXAxisLabels) + Me.TabPage2.Controls.Add(Me.grpYAxisLabels) + resources.ApplyResources(Me.TabPage2, "TabPage2") + Me.TabPage2.Name = "TabPage2" + Me.TabPage2.UseVisualStyleBackColor = True + ' + 'grpXAxisLabels + ' + Me.grpXAxisLabels.Controls.Add(Me.ucrChkXAxisLabelSize) + Me.grpXAxisLabels.Controls.Add(Me.ucrChkXAxisAngle) + Me.grpXAxisLabels.Controls.Add(Me.ucrChkSpecifyXAxisTickMarks) + Me.grpXAxisLabels.Controls.Add(Me.lblXFrom) + Me.grpXAxisLabels.Controls.Add(Me.ucrInputXFrom) + Me.grpXAxisLabels.Controls.Add(Me.ucrInputXInStepsOf) + Me.grpXAxisLabels.Controls.Add(Me.ucrNudXaxisLabelSize) + Me.grpXAxisLabels.Controls.Add(Me.ucrInputXTo) + Me.grpXAxisLabels.Controls.Add(Me.ucrNudXAxisAngle) + Me.grpXAxisLabels.Controls.Add(Me.lblXInStepsOf) + Me.grpXAxisLabels.Controls.Add(Me.lblXTo) + resources.ApplyResources(Me.grpXAxisLabels, "grpXAxisLabels") + Me.grpXAxisLabels.Name = "grpXAxisLabels" + Me.grpXAxisLabels.TabStop = False + ' + 'ucrChkXAxisLabelSize + ' + Me.ucrChkXAxisLabelSize.Checked = False + resources.ApplyResources(Me.ucrChkXAxisLabelSize, "ucrChkXAxisLabelSize") + Me.ucrChkXAxisLabelSize.Name = "ucrChkXAxisLabelSize" + ' + 'ucrChkXAxisAngle + ' + Me.ucrChkXAxisAngle.Checked = False + resources.ApplyResources(Me.ucrChkXAxisAngle, "ucrChkXAxisAngle") + Me.ucrChkXAxisAngle.Name = "ucrChkXAxisAngle" + ' + 'ucrChkSpecifyXAxisTickMarks + ' + Me.ucrChkSpecifyXAxisTickMarks.Checked = False + resources.ApplyResources(Me.ucrChkSpecifyXAxisTickMarks, "ucrChkSpecifyXAxisTickMarks") + Me.ucrChkSpecifyXAxisTickMarks.Name = "ucrChkSpecifyXAxisTickMarks" + ' + 'ucrInputXFrom + ' + Me.ucrInputXFrom.AddQuotesIfUnrecognised = True + Me.ucrInputXFrom.IsMultiline = False + Me.ucrInputXFrom.IsReadOnly = False + resources.ApplyResources(Me.ucrInputXFrom, "ucrInputXFrom") + Me.ucrInputXFrom.Name = "ucrInputXFrom" + ' + 'ucrInputXInStepsOf + ' + Me.ucrInputXInStepsOf.AddQuotesIfUnrecognised = True + Me.ucrInputXInStepsOf.IsMultiline = False + Me.ucrInputXInStepsOf.IsReadOnly = False + resources.ApplyResources(Me.ucrInputXInStepsOf, "ucrInputXInStepsOf") + Me.ucrInputXInStepsOf.Name = "ucrInputXInStepsOf" + ' + 'ucrNudXaxisLabelSize + ' + Me.ucrNudXaxisLabelSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudXaxisLabelSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudXaxisLabelSize, "ucrNudXaxisLabelSize") + Me.ucrNudXaxisLabelSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudXaxisLabelSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudXaxisLabelSize.Name = "ucrNudXaxisLabelSize" + Me.ucrNudXaxisLabelSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputXTo + ' + Me.ucrInputXTo.AddQuotesIfUnrecognised = True + Me.ucrInputXTo.IsMultiline = False + Me.ucrInputXTo.IsReadOnly = False + resources.ApplyResources(Me.ucrInputXTo, "ucrInputXTo") + Me.ucrInputXTo.Name = "ucrInputXTo" + ' + 'ucrNudXAxisAngle + ' + Me.ucrNudXAxisAngle.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudXAxisAngle.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudXAxisAngle, "ucrNudXAxisAngle") + Me.ucrNudXAxisAngle.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudXAxisAngle.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudXAxisAngle.Name = "ucrNudXAxisAngle" + Me.ucrNudXAxisAngle.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'grpYAxisLabels + ' + Me.grpYAxisLabels.Controls.Add(Me.ucrNudDateBreakNumber) + Me.grpYAxisLabels.Controls.Add(Me.ucrInputDateBreakTime) + Me.grpYAxisLabels.Controls.Add(Me.ucrChkSpecifyDateBreaks) + Me.grpYAxisLabels.Controls.Add(Me.ucrInputLabelForDays) + Me.grpYAxisLabels.Controls.Add(Me.ucrNudYAxisAngle) + Me.grpYAxisLabels.Controls.Add(Me.ucrChkLabelForDays) + Me.grpYAxisLabels.Controls.Add(Me.ucrChkYAxisAngle) + Me.grpYAxisLabels.Controls.Add(Me.ucrChkYAxisLabelSize) + Me.grpYAxisLabels.Controls.Add(Me.ucrChkSpecifyYAxisTickMarks) + Me.grpYAxisLabels.Controls.Add(Me.ucrInputYFrom) + Me.grpYAxisLabels.Controls.Add(Me.lblYFrom) + Me.grpYAxisLabels.Controls.Add(Me.ucrNudYAxisLabelSize) + Me.grpYAxisLabels.Controls.Add(Me.ucrInputYTo) + Me.grpYAxisLabels.Controls.Add(Me.lblYTo) + Me.grpYAxisLabels.Controls.Add(Me.lblYInStepsOf) + Me.grpYAxisLabels.Controls.Add(Me.ucrInputYInStepsOf) + resources.ApplyResources(Me.grpYAxisLabels, "grpYAxisLabels") + Me.grpYAxisLabels.Name = "grpYAxisLabels" + Me.grpYAxisLabels.TabStop = False + ' + 'ucrNudDateBreakNumber + ' + Me.ucrNudDateBreakNumber.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDateBreakNumber.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudDateBreakNumber, "ucrNudDateBreakNumber") + Me.ucrNudDateBreakNumber.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDateBreakNumber.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDateBreakNumber.Name = "ucrNudDateBreakNumber" + Me.ucrNudDateBreakNumber.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputDateBreakTime + ' + Me.ucrInputDateBreakTime.AddQuotesIfUnrecognised = True + Me.ucrInputDateBreakTime.IsReadOnly = False + resources.ApplyResources(Me.ucrInputDateBreakTime, "ucrInputDateBreakTime") + Me.ucrInputDateBreakTime.Name = "ucrInputDateBreakTime" + ' + 'ucrChkSpecifyDateBreaks + ' + Me.ucrChkSpecifyDateBreaks.Checked = False + resources.ApplyResources(Me.ucrChkSpecifyDateBreaks, "ucrChkSpecifyDateBreaks") + Me.ucrChkSpecifyDateBreaks.Name = "ucrChkSpecifyDateBreaks" + ' + 'ucrInputLabelForDays + ' + Me.ucrInputLabelForDays.AddQuotesIfUnrecognised = True + Me.ucrInputLabelForDays.IsReadOnly = False + resources.ApplyResources(Me.ucrInputLabelForDays, "ucrInputLabelForDays") + Me.ucrInputLabelForDays.Name = "ucrInputLabelForDays" + ' + 'ucrNudYAxisAngle + ' + Me.ucrNudYAxisAngle.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudYAxisAngle.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudYAxisAngle, "ucrNudYAxisAngle") + Me.ucrNudYAxisAngle.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudYAxisAngle.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudYAxisAngle.Name = "ucrNudYAxisAngle" + Me.ucrNudYAxisAngle.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkLabelForDays + ' + Me.ucrChkLabelForDays.Checked = False + resources.ApplyResources(Me.ucrChkLabelForDays, "ucrChkLabelForDays") + Me.ucrChkLabelForDays.Name = "ucrChkLabelForDays" + ' + 'ucrChkYAxisAngle + ' + Me.ucrChkYAxisAngle.Checked = False + resources.ApplyResources(Me.ucrChkYAxisAngle, "ucrChkYAxisAngle") + Me.ucrChkYAxisAngle.Name = "ucrChkYAxisAngle" + ' + 'ucrChkYAxisLabelSize + ' + Me.ucrChkYAxisLabelSize.Checked = False + resources.ApplyResources(Me.ucrChkYAxisLabelSize, "ucrChkYAxisLabelSize") + Me.ucrChkYAxisLabelSize.Name = "ucrChkYAxisLabelSize" + ' + 'ucrChkSpecifyYAxisTickMarks + ' + Me.ucrChkSpecifyYAxisTickMarks.Checked = False + resources.ApplyResources(Me.ucrChkSpecifyYAxisTickMarks, "ucrChkSpecifyYAxisTickMarks") + Me.ucrChkSpecifyYAxisTickMarks.Name = "ucrChkSpecifyYAxisTickMarks" + ' + 'ucrInputYFrom + ' + Me.ucrInputYFrom.AddQuotesIfUnrecognised = True + Me.ucrInputYFrom.IsMultiline = False + Me.ucrInputYFrom.IsReadOnly = False + resources.ApplyResources(Me.ucrInputYFrom, "ucrInputYFrom") + Me.ucrInputYFrom.Name = "ucrInputYFrom" + ' + 'ucrNudYAxisLabelSize + ' + Me.ucrNudYAxisLabelSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudYAxisLabelSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudYAxisLabelSize, "ucrNudYAxisLabelSize") + Me.ucrNudYAxisLabelSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudYAxisLabelSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudYAxisLabelSize.Name = "ucrNudYAxisLabelSize" + Me.ucrNudYAxisLabelSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputYTo + ' + Me.ucrInputYTo.AddQuotesIfUnrecognised = True + Me.ucrInputYTo.IsMultiline = False + Me.ucrInputYTo.IsReadOnly = False + resources.ApplyResources(Me.ucrInputYTo, "ucrInputYTo") + Me.ucrInputYTo.Name = "ucrInputYTo" + ' + 'ucrInputYInStepsOf + ' + Me.ucrInputYInStepsOf.AddQuotesIfUnrecognised = True + Me.ucrInputYInStepsOf.IsMultiline = False + Me.ucrInputYInStepsOf.IsReadOnly = False + resources.ApplyResources(Me.ucrInputYInStepsOf, "ucrInputYInStepsOf") + Me.ucrInputYInStepsOf.Name = "ucrInputYInStepsOf" + ' + 'TabPage3 + ' + Me.TabPage3.Controls.Add(Me.ucrChkAddTercilesLabel) + Me.TabPage3.Controls.Add(Me.ucrChkAddMedianLabel) + Me.TabPage3.Controls.Add(Me.ucrChkAddMeanLabel) + Me.TabPage3.Controls.Add(Me.ucrChkAddMean) + Me.TabPage3.Controls.Add(Me.ucrChkAddMedian) + Me.TabPage3.Controls.Add(Me.ucrChkAddTerciles) + resources.ApplyResources(Me.TabPage3, "TabPage3") + Me.TabPage3.Name = "TabPage3" + Me.TabPage3.UseVisualStyleBackColor = True + ' + 'ucrChkAddTercilesLabel + ' + Me.ucrChkAddTercilesLabel.Checked = False + resources.ApplyResources(Me.ucrChkAddTercilesLabel, "ucrChkAddTercilesLabel") + Me.ucrChkAddTercilesLabel.Name = "ucrChkAddTercilesLabel" + ' + 'ucrChkAddMedianLabel + ' + Me.ucrChkAddMedianLabel.Checked = False + resources.ApplyResources(Me.ucrChkAddMedianLabel, "ucrChkAddMedianLabel") + Me.ucrChkAddMedianLabel.Name = "ucrChkAddMedianLabel" + ' + 'ucrChkAddMeanLabel + ' + Me.ucrChkAddMeanLabel.Checked = False + resources.ApplyResources(Me.ucrChkAddMeanLabel, "ucrChkAddMeanLabel") + Me.ucrChkAddMeanLabel.Name = "ucrChkAddMeanLabel" + ' + 'ucrChkAddMean + ' + Me.ucrChkAddMean.Checked = False + resources.ApplyResources(Me.ucrChkAddMean, "ucrChkAddMean") + Me.ucrChkAddMean.Name = "ucrChkAddMean" + ' + 'ucrChkAddMedian + ' + Me.ucrChkAddMedian.Checked = False + resources.ApplyResources(Me.ucrChkAddMedian, "ucrChkAddMedian") + Me.ucrChkAddMedian.Name = "ucrChkAddMedian" + ' + 'ucrChkAddTerciles + ' + Me.ucrChkAddTerciles.Checked = False + resources.ApplyResources(Me.ucrChkAddTerciles, "ucrChkAddTerciles") + Me.ucrChkAddTerciles.Name = "ucrChkAddTerciles" + ' + 'TabPage4 + ' + Me.TabPage4.Controls.Add(Me.grpMinorGridLine) + Me.TabPage4.Controls.Add(Me.GroupBox1) + Me.TabPage4.Controls.Add(Me.grpMajorGridLines) + Me.TabPage4.Controls.Add(Me.grpPnlBackground) + resources.ApplyResources(Me.TabPage4, "TabPage4") + Me.TabPage4.Name = "TabPage4" + Me.TabPage4.UseVisualStyleBackColor = True + ' + 'grpMinorGridLine + ' + Me.grpMinorGridLine.Controls.Add(Me.UcrNudMinorGridLineSize) + Me.grpMinorGridLine.Controls.Add(Me.UcrChkMinorGridLineSize) + Me.grpMinorGridLine.Controls.Add(Me.UcrInputMinorGridLineTpe) + Me.grpMinorGridLine.Controls.Add(Me.UcrInputMinorGridLineColour) + Me.grpMinorGridLine.Controls.Add(Me.UcrChkMinorGridLineType) + Me.grpMinorGridLine.Controls.Add(Me.UcrChkMinorGridLineColour) + resources.ApplyResources(Me.grpMinorGridLine, "grpMinorGridLine") + Me.grpMinorGridLine.Name = "grpMinorGridLine" + Me.grpMinorGridLine.TabStop = False + ' + 'UcrNudMinorGridLineSize + ' + Me.UcrNudMinorGridLineSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudMinorGridLineSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.UcrNudMinorGridLineSize, "UcrNudMinorGridLineSize") + Me.UcrNudMinorGridLineSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.UcrNudMinorGridLineSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudMinorGridLineSize.Name = "UcrNudMinorGridLineSize" + Me.UcrNudMinorGridLineSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'UcrChkMinorGridLineSize + ' + Me.UcrChkMinorGridLineSize.Checked = False + resources.ApplyResources(Me.UcrChkMinorGridLineSize, "UcrChkMinorGridLineSize") + Me.UcrChkMinorGridLineSize.Name = "UcrChkMinorGridLineSize" + ' + 'UcrInputMinorGridLineTpe + ' + Me.UcrInputMinorGridLineTpe.AddQuotesIfUnrecognised = True + Me.UcrInputMinorGridLineTpe.IsReadOnly = False + resources.ApplyResources(Me.UcrInputMinorGridLineTpe, "UcrInputMinorGridLineTpe") + Me.UcrInputMinorGridLineTpe.Name = "UcrInputMinorGridLineTpe" + ' + 'UcrInputMinorGridLineColour + ' + Me.UcrInputMinorGridLineColour.AddQuotesIfUnrecognised = True + Me.UcrInputMinorGridLineColour.IsReadOnly = False + resources.ApplyResources(Me.UcrInputMinorGridLineColour, "UcrInputMinorGridLineColour") + Me.UcrInputMinorGridLineColour.Name = "UcrInputMinorGridLineColour" + ' + 'UcrChkMinorGridLineType + ' + Me.UcrChkMinorGridLineType.Checked = False + resources.ApplyResources(Me.UcrChkMinorGridLineType, "UcrChkMinorGridLineType") + Me.UcrChkMinorGridLineType.Name = "UcrChkMinorGridLineType" + ' + 'UcrChkMinorGridLineColour + ' + Me.UcrChkMinorGridLineColour.Checked = False + resources.ApplyResources(Me.UcrChkMinorGridLineColour, "UcrChkMinorGridLineColour") + Me.UcrChkMinorGridLineColour.Name = "UcrChkMinorGridLineColour" + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.ucrNudBorderSize) + Me.GroupBox1.Controls.Add(Me.UcrChkBorderSize) + Me.GroupBox1.Controls.Add(Me.ucrInputBorderLinetype) + Me.GroupBox1.Controls.Add(Me.ucrInputBorderColour) + Me.GroupBox1.Controls.Add(Me.ucrChkBorderLineType) + Me.GroupBox1.Controls.Add(Me.ucrChkBorderColour) + resources.ApplyResources(Me.GroupBox1, "GroupBox1") + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.TabStop = False + ' + 'ucrNudBorderSize + ' + Me.ucrNudBorderSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudBorderSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudBorderSize, "ucrNudBorderSize") + Me.ucrNudBorderSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudBorderSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudBorderSize.Name = "ucrNudBorderSize" + Me.ucrNudBorderSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'UcrChkBorderSize + ' + Me.UcrChkBorderSize.Checked = False + resources.ApplyResources(Me.UcrChkBorderSize, "UcrChkBorderSize") + Me.UcrChkBorderSize.Name = "UcrChkBorderSize" + ' + 'ucrInputBorderLinetype + ' + Me.ucrInputBorderLinetype.AddQuotesIfUnrecognised = True + Me.ucrInputBorderLinetype.IsReadOnly = False + resources.ApplyResources(Me.ucrInputBorderLinetype, "ucrInputBorderLinetype") + Me.ucrInputBorderLinetype.Name = "ucrInputBorderLinetype" + ' + 'ucrInputBorderColour + ' + Me.ucrInputBorderColour.AddQuotesIfUnrecognised = True + Me.ucrInputBorderColour.IsReadOnly = False + resources.ApplyResources(Me.ucrInputBorderColour, "ucrInputBorderColour") + Me.ucrInputBorderColour.Name = "ucrInputBorderColour" + ' + 'ucrChkBorderLineType + ' + Me.ucrChkBorderLineType.Checked = False + resources.ApplyResources(Me.ucrChkBorderLineType, "ucrChkBorderLineType") + Me.ucrChkBorderLineType.Name = "ucrChkBorderLineType" + ' + 'ucrChkBorderColour + ' + Me.ucrChkBorderColour.Checked = False + resources.ApplyResources(Me.ucrChkBorderColour, "ucrChkBorderColour") + Me.ucrChkBorderColour.Name = "ucrChkBorderColour" + ' + 'grpMajorGridLines + ' + Me.grpMajorGridLines.Controls.Add(Me.UcrNudMajorGridLineSize) + Me.grpMajorGridLines.Controls.Add(Me.UcrChkMajorGridLineSize) + Me.grpMajorGridLines.Controls.Add(Me.UcrInputMajorGridLineLinetype) + Me.grpMajorGridLines.Controls.Add(Me.UcrInputMajorGridLineColour) + Me.grpMajorGridLines.Controls.Add(Me.UcrChkMajorGridLinetype) + Me.grpMajorGridLines.Controls.Add(Me.UcrChkMajorGridLineColour) + resources.ApplyResources(Me.grpMajorGridLines, "grpMajorGridLines") + Me.grpMajorGridLines.Name = "grpMajorGridLines" + Me.grpMajorGridLines.TabStop = False + ' + 'UcrNudMajorGridLineSize + ' + Me.UcrNudMajorGridLineSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudMajorGridLineSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.UcrNudMajorGridLineSize, "UcrNudMajorGridLineSize") + Me.UcrNudMajorGridLineSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.UcrNudMajorGridLineSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.UcrNudMajorGridLineSize.Name = "UcrNudMajorGridLineSize" + Me.UcrNudMajorGridLineSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'UcrChkMajorGridLineSize + ' + Me.UcrChkMajorGridLineSize.Checked = False + resources.ApplyResources(Me.UcrChkMajorGridLineSize, "UcrChkMajorGridLineSize") + Me.UcrChkMajorGridLineSize.Name = "UcrChkMajorGridLineSize" + ' + 'UcrInputMajorGridLineLinetype + ' + Me.UcrInputMajorGridLineLinetype.AddQuotesIfUnrecognised = True + Me.UcrInputMajorGridLineLinetype.IsReadOnly = False + resources.ApplyResources(Me.UcrInputMajorGridLineLinetype, "UcrInputMajorGridLineLinetype") + Me.UcrInputMajorGridLineLinetype.Name = "UcrInputMajorGridLineLinetype" + ' + 'UcrInputMajorGridLineColour + ' + Me.UcrInputMajorGridLineColour.AddQuotesIfUnrecognised = True + Me.UcrInputMajorGridLineColour.IsReadOnly = False + resources.ApplyResources(Me.UcrInputMajorGridLineColour, "UcrInputMajorGridLineColour") + Me.UcrInputMajorGridLineColour.Name = "UcrInputMajorGridLineColour" + ' + 'UcrChkMajorGridLinetype + ' + Me.UcrChkMajorGridLinetype.Checked = False + resources.ApplyResources(Me.UcrChkMajorGridLinetype, "UcrChkMajorGridLinetype") + Me.UcrChkMajorGridLinetype.Name = "UcrChkMajorGridLinetype" + ' + 'UcrChkMajorGridLineColour + ' + Me.UcrChkMajorGridLineColour.Checked = False + resources.ApplyResources(Me.UcrChkMajorGridLineColour, "UcrChkMajorGridLineColour") + Me.UcrChkMajorGridLineColour.Name = "UcrChkMajorGridLineColour" + ' + 'grpPnlBackground + ' + Me.grpPnlBackground.Controls.Add(Me.ucrNudPnlBackgroundSize) + Me.grpPnlBackground.Controls.Add(Me.UcrInputPnlBackgroundFill) + Me.grpPnlBackground.Controls.Add(Me.UcrInputPnlBackgroundLinetype) + Me.grpPnlBackground.Controls.Add(Me.UcrInputPnlBackgroundColour) + Me.grpPnlBackground.Controls.Add(Me.UcrChkPnlBackgroundSize) + Me.grpPnlBackground.Controls.Add(Me.UcrChkPnlBackgroundLineType) + Me.grpPnlBackground.Controls.Add(Me.UcrChkPnlBackgroundFill) + Me.grpPnlBackground.Controls.Add(Me.ucrChkPnlBackgroundColour) + resources.ApplyResources(Me.grpPnlBackground, "grpPnlBackground") + Me.grpPnlBackground.Name = "grpPnlBackground" + Me.grpPnlBackground.TabStop = False + ' + 'ucrNudPnlBackgroundSize + ' + Me.ucrNudPnlBackgroundSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPnlBackgroundSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudPnlBackgroundSize, "ucrNudPnlBackgroundSize") + Me.ucrNudPnlBackgroundSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPnlBackgroundSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPnlBackgroundSize.Name = "ucrNudPnlBackgroundSize" + Me.ucrNudPnlBackgroundSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'UcrInputPnlBackgroundFill + ' + Me.UcrInputPnlBackgroundFill.AddQuotesIfUnrecognised = True + Me.UcrInputPnlBackgroundFill.IsReadOnly = False + resources.ApplyResources(Me.UcrInputPnlBackgroundFill, "UcrInputPnlBackgroundFill") + Me.UcrInputPnlBackgroundFill.Name = "UcrInputPnlBackgroundFill" + ' + 'UcrInputPnlBackgroundLinetype + ' + Me.UcrInputPnlBackgroundLinetype.AddQuotesIfUnrecognised = True + Me.UcrInputPnlBackgroundLinetype.IsReadOnly = False + resources.ApplyResources(Me.UcrInputPnlBackgroundLinetype, "UcrInputPnlBackgroundLinetype") + Me.UcrInputPnlBackgroundLinetype.Name = "UcrInputPnlBackgroundLinetype" + ' + 'UcrInputPnlBackgroundColour + ' + Me.UcrInputPnlBackgroundColour.AddQuotesIfUnrecognised = True + Me.UcrInputPnlBackgroundColour.IsReadOnly = False + resources.ApplyResources(Me.UcrInputPnlBackgroundColour, "UcrInputPnlBackgroundColour") + Me.UcrInputPnlBackgroundColour.Name = "UcrInputPnlBackgroundColour" + ' + 'UcrChkPnlBackgroundSize + ' + Me.UcrChkPnlBackgroundSize.Checked = False + resources.ApplyResources(Me.UcrChkPnlBackgroundSize, "UcrChkPnlBackgroundSize") + Me.UcrChkPnlBackgroundSize.Name = "UcrChkPnlBackgroundSize" + ' + 'UcrChkPnlBackgroundLineType + ' + Me.UcrChkPnlBackgroundLineType.Checked = False + resources.ApplyResources(Me.UcrChkPnlBackgroundLineType, "UcrChkPnlBackgroundLineType") + Me.UcrChkPnlBackgroundLineType.Name = "UcrChkPnlBackgroundLineType" + ' + 'UcrChkPnlBackgroundFill + ' + Me.UcrChkPnlBackgroundFill.Checked = False + resources.ApplyResources(Me.UcrChkPnlBackgroundFill, "UcrChkPnlBackgroundFill") + Me.UcrChkPnlBackgroundFill.Name = "UcrChkPnlBackgroundFill" + ' + 'ucrChkPnlBackgroundColour + ' + Me.ucrChkPnlBackgroundColour.Checked = False + resources.ApplyResources(Me.ucrChkPnlBackgroundColour, "ucrChkPnlBackgroundColour") + Me.ucrChkPnlBackgroundColour.Name = "ucrChkPnlBackgroundColour" + ' + 'ucrSdgPICSARainfalbuttons + ' + resources.ApplyResources(Me.ucrSdgPICSARainfalbuttons, "ucrSdgPICSARainfalbuttons") + Me.ucrSdgPICSARainfalbuttons.Name = "ucrSdgPICSARainfalbuttons" + ' + 'sdgPICSARainfallGraph + ' + resources.ApplyResources(Me, "$this") + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.tbPICSA) + Me.Controls.Add(Me.ucrSdgPICSARainfalbuttons) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgPICSARainfallGraph" + Me.tbPICSA.ResumeLayout(False) + Me.TabPage1.ResumeLayout(False) + Me.grpyAxisTitle.ResumeLayout(False) + Me.grpyAxisTitle.PerformLayout() + Me.grpAxes.ResumeLayout(False) + Me.grpAxes.PerformLayout() + Me.grpGraphTitles.ResumeLayout(False) + Me.grpGraphTitles.PerformLayout() + Me.TabPage2.ResumeLayout(False) + Me.grpXAxisLabels.ResumeLayout(False) + Me.grpXAxisLabels.PerformLayout() + Me.grpYAxisLabels.ResumeLayout(False) + Me.grpYAxisLabels.PerformLayout() + Me.TabPage3.ResumeLayout(False) + Me.TabPage4.ResumeLayout(False) + Me.grpMinorGridLine.ResumeLayout(False) + Me.GroupBox1.ResumeLayout(False) + Me.grpMajorGridLines.ResumeLayout(False) + Me.grpPnlBackground.ResumeLayout(False) + Me.ResumeLayout(False) + End Sub Friend WithEvents ucrSdgPICSARainfalbuttons As ucrButtonsSubdialogue Friend WithEvents ucrChkAddMean As ucrCheck Friend WithEvents ucrChkAddMedian As ucrCheck Friend WithEvents ucrChkAddTerciles As ucrCheck - Friend WithEvents ucrChkYAxisTitle As ucrCheck - Friend WithEvents ucrInputYAxisTitle As ucrInputTextBox - Friend WithEvents lblYAxisTitleSize As Label - Friend WithEvents ucrNudYAxisTitleSize As ucrNud - Friend WithEvents ucrChkXaxisAngle As ucrCheck + Friend WithEvents ucrNudYAxisLabelSize As ucrNud Friend WithEvents ucrNudXAxisAngle As ucrNud - Friend WithEvents ucrChkXaxisLabelSize As ucrCheck Friend WithEvents ucrNudXaxisLabelSize As ucrNud - Friend WithEvents ucrChkAddLabel As ucrCheck - Friend WithEvents ucrChkFootNote As ucrCheck - Friend WithEvents ucrInputFootNote As ucrInputTextBox - Friend WithEvents ucrChkSubFootNote As ucrCheck - Friend WithEvents ucrInputSubFootNote As ucrInputTextBox - Friend WithEvents ucrSpecifyYAxisTickMarks As ucrCheck - Friend WithEvents ucrSpecifyXAxisTickMarks As ucrCheck Friend WithEvents ucrInputYInStepsOf As ucrInputTextBox Friend WithEvents ucrInputYTo As ucrInputTextBox Friend WithEvents ucrInputYFrom As ucrInputTextBox @@ -359,6 +967,85 @@ Partial Class sdgPICSARainfallGraph Friend WithEvents ucrInputXFrom As ucrInputTextBox Friend WithEvents ucrInputXTo As ucrInputTextBox Friend WithEvents ucrInputXInStepsOf As ucrInputTextBox - Friend WithEvents ucrChkYAxisLabelsSize As ucrCheck - Friend WithEvents ucrNudYAxisLabelsSize As ucrNud + Friend WithEvents tbPICSA As TabControl + Friend WithEvents TabPage1 As TabPage + Friend WithEvents TabPage2 As TabPage + Friend WithEvents TabPage3 As TabPage + Friend WithEvents ucrInputGraphTitle As ucrInputTextBox + Friend WithEvents ucrInputGraphSubTitle As ucrInputTextBox + Friend WithEvents ucrInputYAxisTitle As ucrInputTextBox + Friend WithEvents grpGraphTitles As GroupBox + Friend WithEvents ucrInputGraphcCaption As ucrInputTextBox + Friend WithEvents grpYAxisLabels As GroupBox + Friend WithEvents grpXAxisLabels As GroupBox + Friend WithEvents TabPage4 As TabPage + Friend WithEvents ucrChkXAxisLabelSize As ucrCheck + Friend WithEvents ucrChkSpecifyXAxisTickMarks As ucrCheck + Friend WithEvents ucrNudYAxisAngle As ucrNud + Friend WithEvents ucrChkYAxisAngle As ucrCheck + Friend WithEvents ucrChkYAxisLabelSize As ucrCheck + Friend WithEvents ucrChkSpecifyYAxisTickMarks As ucrCheck + Friend WithEvents grpPnlBackground As GroupBox + Friend WithEvents grpMajorGridLines As GroupBox + Friend WithEvents UcrChkMajorGridLineColour As ucrCheck + Friend WithEvents UcrChkPnlBackgroundSize As ucrCheck + Friend WithEvents UcrChkPnlBackgroundLineType As ucrCheck + Friend WithEvents UcrChkPnlBackgroundFill As ucrCheck + Friend WithEvents ucrChkPnlBackgroundColour As ucrCheck + Friend WithEvents UcrChkMajorGridLinetype As ucrCheck + Friend WithEvents ucrInputLabelForDays As ucrInputComboBox + Friend WithEvents ucrChkLabelForDays As ucrCheck + Friend WithEvents UcrInputMajorGridLineLinetype As ucrInputComboBox + Friend WithEvents UcrInputMajorGridLineColour As ucrInputComboBox + Friend WithEvents ucrNudPnlBackgroundSize As ucrNud + Friend WithEvents UcrInputPnlBackgroundFill As ucrInputComboBox + Friend WithEvents UcrInputPnlBackgroundLinetype As ucrInputComboBox + Friend WithEvents UcrInputPnlBackgroundColour As ucrInputComboBox + Friend WithEvents ucrNudYAxisTitleSize As ucrNud + Friend WithEvents ucrNudCaptionSize As ucrNud + Friend WithEvents ucrNudSubTitleSize As ucrNud + Friend WithEvents ucrNudTitleSize As ucrNud + Friend WithEvents grpyAxisTitle As GroupBox + Friend WithEvents GroupBox1 As GroupBox + Friend WithEvents ucrInputBorderLinetype As ucrInputComboBox + Friend WithEvents ucrInputBorderColour As ucrInputComboBox + Friend WithEvents ucrChkBorderLineType As ucrCheck + Friend WithEvents ucrChkBorderColour As ucrCheck + Friend WithEvents grpMinorGridLine As GroupBox + Friend WithEvents UcrInputMinorGridLineTpe As ucrInputComboBox + Friend WithEvents UcrInputMinorGridLineColour As ucrInputComboBox + Friend WithEvents UcrChkMinorGridLineType As ucrCheck + Friend WithEvents UcrChkMinorGridLineColour As ucrCheck + Friend WithEvents ucrNudBorderSize As ucrNud + Friend WithEvents UcrChkBorderSize As ucrCheck + Friend WithEvents UcrNudMajorGridLineSize As ucrNud + Friend WithEvents UcrChkMajorGridLineSize As ucrCheck + Friend WithEvents UcrNudMinorGridLineSize As ucrNud + Friend WithEvents UcrChkMinorGridLineSize As ucrCheck + Friend WithEvents UcrPnlYAxisTitle As UcrPanel + Friend WithEvents rdoNoYAxisTitle As RadioButton + Friend WithEvents rdoSpecifyYAxisTitle As RadioButton + Friend WithEvents grpAxes As GroupBox + Friend WithEvents ucrInputXAxisTitle As ucrInputTextBox + Friend WithEvents rdoNoTitleXAxisTitle As RadioButton + Friend WithEvents rdoSpecifyXAxisTitle As RadioButton + Friend WithEvents ucrPnlXAxisTitle As UcrPanel + Friend WithEvents ucrNudXAxisTitleSize As ucrNud + Friend WithEvents rdoAutoYAxis As RadioButton + Friend WithEvents rdoAutoXAxis As RadioButton + Friend WithEvents ucrChkAddTercilesLabel As ucrCheck + Friend WithEvents ucrChkAddMedianLabel As ucrCheck + Friend WithEvents ucrChkAddMeanLabel As ucrCheck + Friend WithEvents lblCaption As Label + Friend WithEvents lblSubTitle As Label + Friend WithEvents lblTitle As Label + Friend WithEvents lblCaptionSize As Label + Friend WithEvents lblSubTitleSize As Label + Friend WithEvents lblTitleSize As Label + Friend WithEvents Label1 As Label + Friend WithEvents lblXAxisTitleSize As Label + Friend WithEvents ucrChkXAxisAngle As ucrCheck + Friend WithEvents ucrChkSpecifyDateBreaks As ucrCheck + Friend WithEvents ucrNudDateBreakNumber As ucrNud + Friend WithEvents ucrInputDateBreakTime As ucrInputComboBox End Class diff --git a/instat/sdgPICSARainfallGraph.resx b/instat/sdgPICSARainfallGraph.resx index 35cde2d5883..71bfc4d40d4 100644 --- a/instat/sdgPICSARainfallGraph.resx +++ b/instat/sdgPICSARainfallGraph.resx @@ -1,900 +1,2475 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - True - - - - NoControl - - - - 289, 89 - - - 30, 13 - - - 3 - - - Size: - - - lblYAxisTitleSize - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 16 - - - True - - - NoControl - - - 328, 111 - - - 61, 13 - - - 22 - - - In Steps of: - - - lblYInStepsOf - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 8 - - - True - - - NoControl - - - 172, 113 - - - 33, 13 - - - 20 - - - From: - - - lblYFrom - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 10 - - - True - - - NoControl - - - 250, 112 - - - 23, 13 - - - 21 - - - To: - - - lblYTo - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 11 - - - True - - - NoControl - - - 251, 165 - - - 23, 13 - - - 21 - - - To: - - - lblXTo - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 9 - - - True - - - NoControl - - - 173, 166 - - - 33, 13 - - - 20 - - - From: - - - lblXFrom - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - - - True - - - NoControl - - - 330, 165 - - - 61, 13 - - - 22 - - - In Steps of: - - - lblXInStepsOf - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - 393, 161 - - - 51, 21 - - - 23 - - - ucrInputXInStepsOf - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 - - - 276, 162 - - - 51, 21 - - - 24 - - - ucrInputXTo - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 1 - - - 391, 108 - - - 50, 21 - - - 23 - - - ucrInputYInStepsOf - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 2 - - - 203, 162 - - - 50, 21 - - - 25 - - - ucrInputXFrom - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 3 - - - 275, 109 - - - 52, 21 - - - 24 - - - ucrInputYTo - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 4 - - - 202, 109 - - - 50, 21 - - - 25 - - - ucrInputYFrom - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 6 - - - 404, 135 - - - 50, 20 - - - 4 - - - ucrNudXaxisLabelSize - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 12 - - - 141, 138 - - - 50, 20 - - - 4 - - - ucrNudXAxisAngle - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 13 - - - 525, 86 - - - 48, 20 - - - 4 - - - ucrNudYAxisLabelsSize - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 14 - - - 321, 86 - - - 50, 20 - - - 4 - - - ucrNudYAxisTitleSize - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 15 - - - 20, 190 - - - 121, 20 - - - 1 - - - ucrChkAddLabel - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 17 - - - 241, 138 - - - 147, 20 - - - 1 - - - ucrChkXaxisLabelSize - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 18 - - - 141, 242 - - - 243, 21 - - - 2 - - - ucrInputSubFootNote - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 19 - - - 141, 215 - - - 243, 21 - - - 2 - - - ucrInputFootNote - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 20 - - - 20, 243 - - - 100, 20 - - - 1 - - - ucrChkSubFootNote - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 21 - - - 141, 85 - - - 137, 21 - - - 2 - - - ucrInputYAxisTitle - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 22 - - - 20, 216 - - - 100, 20 - - - 1 - - - ucrChkFootNote - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 23 - - - 20, 138 - - - 100, 20 - - - 1 - - - ucrChkXaxisAngle - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 24 - - - 20, 164 - - - 155, 20 - - - 1 - - - ucrSpecifyXAxisTickMarks - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 25 - - - 20, 112 - - - 155, 20 - - - 1 - - - ucrSpecifyYAxisTickMarks - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 26 - - - 20, 86 - - - 100, 20 - - - 1 - - - ucrChkYAxisTitle - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 27 - - - 20, 60 - - - 100, 20 - - - 1 - - - ucrChkAddTerciles - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 28 - - - 20, 34 - - - 100, 20 - - - 1 - - - ucrChkAddMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 29 - - - 393, 86 - - - 129, 20 - - - 1 - - - ucrChkYAxisLabelsSize - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 30 - - - 20, 8 - - - 100, 20 - - - 1 - - - ucrChkAddMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 31 - - - 229, 274 - - - 142, 30 - - - 0 - - - ucrSdgPICSARainfalbuttons - - - instat.ucrButtonsSubdialogue, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 32 - - - True - - - 6, 13 - - - 590, 316 - - - CenterParent - - - PICSA Rainfall Graph - - - sdgPICSARainfallGraph - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + NoControl + + + + 369, 24 + + + 61, 13 + + + 22 + + + In Steps of: + + + lblYInStepsOf + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpYAxisLabels + + + 14 + + + True + + + NoControl + + + 123, 24 + + + 33, 13 + + + 20 + + + From: + + + lblYFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpYAxisLabels + + + 10 + + + True + + + NoControl + + + 248, 24 + + + 23, 13 + + + 21 + + + To: + + + lblYTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpYAxisLabels + + + 13 + + + True + + + NoControl + + + 248, 24 + + + 23, 13 + + + 21 + + + To: + + + lblXTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpXAxisLabels + + + 10 + + + True + + + NoControl + + + 122, 24 + + + 33, 13 + + + 20 + + + From: + + + lblXFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpXAxisLabels + + + 3 + + + True + + + NoControl + + + 368, 24 + + + 61, 13 + + + 22 + + + In Steps of: + + + lblXInStepsOf + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpXAxisLabels + + + 9 + + + True + + + NoControl + + + 6, 82 + + + 30, 13 + + + 45 + + + Size: + + + Label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpyAxisTitle + + + 0 + + + True + + + NoControl + + + 6, 21 + + + 50, 17 + + + 44 + + + Auto + + + rdoAutoYAxis + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpyAxisTitle + + + 1 + + + 6, 44 + + + 181, 21 + + + 14 + + + ucrInputYAxisTitle + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpyAxisTitle + + + 2 + + + True + + + NoControl + + + 142, 21 + + + 62, 17 + + + 42 + + + No Title + + + rdoNoYAxisTitle + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpyAxisTitle + + + 3 + + + 43, 79 + + + 50, 20 + + + 22 + + + ucrNudYAxisTitleSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpyAxisTitle + + + 4 + + + True + + + NoControl + + + 67, 21 + + + 60, 17 + + + 41 + + + Specify + + + rdoSpecifyYAxisTitle + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpyAxisTitle + + + 5 + + + 6, 15 + + + 204, 57 + + + 37 + + + UcrPnlYAxisTitle + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpyAxisTitle + + + 6 + + + 306, 129 + + + 228, 105 + + + 36 + + + Y-Axis Title + + + grpyAxisTitle + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage1 + + + 0 + + + True + + + NoControl + + + 6, 82 + + + 30, 13 + + + 44 + + + Size: + + + lblXAxisTitleSize + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpAxes + + + 0 + + + True + + + NoControl + + + 6, 21 + + + 50, 17 + + + 43 + + + Auto + + + rdoAutoXAxis + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpAxes + + + 1 + + + 6, 44 + + + 181, 21 + + + 42 + + + ucrInputXAxisTitle + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpAxes + + + 2 + + + True + + + NoControl + + + 142, 21 + + + 62, 17 + + + 41 + + + No Title + + + rdoNoTitleXAxisTitle + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpAxes + + + 3 + + + True + + + NoControl + + + 67, 21 + + + 62, 17 + + + 40 + + + Specifiy + + + rdoSpecifyXAxisTitle + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpAxes + + + 4 + + + 6, 15 + + + 204, 57 + + + 36 + + + ucrPnlXAxisTitle + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpAxes + + + 5 + + + 43, 79 + + + 50, 20 + + + 23 + + + ucrNudXAxisTitleSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpAxes + + + 6 + + + 9, 129 + + + 228, 105 + + + 18 + + + X-Axis Title + + + grpAxes + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage1 + + + 1 + + + True + + + NoControl + + + 360, 83 + + + 69, 13 + + + 26 + + + Caption Size: + + + lblCaptionSize + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraphTitles + + + 0 + + + True + + + NoControl + + + 360, 53 + + + 75, 13 + + + 27 + + + Sub Title Size: + + + lblSubTitleSize + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraphTitles + + + 1 + + + True + + + NoControl + + + 361, 23 + + + 53, 13 + + + 28 + + + Title Size: + + + lblTitleSize + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraphTitles + + + 2 + + + True + + + NoControl + + + 5, 83 + + + 78, 13 + + + 23 + + + Graph Caption: + + + lblCaption + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraphTitles + + + 3 + + + True + + + NoControl + + + 5, 53 + + + 84, 13 + + + 24 + + + Graph Sub Title: + + + lblSubTitle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraphTitles + + + 4 + + + True + + + NoControl + + + 6, 23 + + + 62, 13 + + + 25 + + + Graph Title: + + + lblTitle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraphTitles + + + 5 + + + 448, 78 + + + 50, 20 + + + 22 + + + ucrNudCaptionSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraphTitles + + + 6 + + + 448, 48 + + + 50, 20 + + + 21 + + + ucrNudSubTitleSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraphTitles + + + 7 + + + 448, 18 + + + 50, 20 + + + 20 + + + ucrNudTitleSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraphTitles + + + 8 + + + 119, 78 + + + 181, 21 + + + 16 + + + ucrInputGraphcCaption + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraphTitles + + + 9 + + + 119, 18 + + + 181, 21 + + + 12 + + + ucrInputGraphTitle + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraphTitles + + + 10 + + + 119, 48 + + + 181, 21 + + + 14 + + + ucrInputGraphSubTitle + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraphTitles + + + 11 + + + 9, 10 + + + 525, 110 + + + 17 + + + Graph + + + grpGraphTitles + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage1 + + + 2 + + + 4, 22 + + + 3, 3, 3, 3 + + + 567, 309 + + + 0 + + + Titles + + + TabPage1 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbPICSA + + + 0 + + + 251, 57 + + + 100, 20 + + + 30 + + + ucrChkXAxisLabelSize + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 0 + + + 6, 57 + + + 100, 20 + + + 29 + + + ucrChkXAxisAngle + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 1 + + + 6, 22 + + + 100, 20 + + + 28 + + + ucrChkSpecifyXAxisTickMarks + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 2 + + + 160, 21 + + + 50, 21 + + + 25 + + + ucrInputXFrom + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 4 + + + 433, 21 + + + 51, 21 + + + 23 + + + ucrInputXInStepsOf + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 5 + + + 357, 57 + + + 50, 20 + + + 4 + + + ucrNudXaxisLabelSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 6 + + + 275, 21 + + + 51, 21 + + + 24 + + + ucrInputXTo + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 7 + + + 125, 57 + + + 50, 20 + + + 4 + + + ucrNudXAxisAngle + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpXAxisLabels + + + 8 + + + 6, 8 + + + 504, 93 + + + 27 + + + X-Axis + + + grpXAxisLabels + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage2 + + + 0 + + + 357, 56 + + + 50, 20 + + + 36 + + + ucrNudDateBreakNumber + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 0 + + + 414, 55 + + + 70, 21 + + + 35 + + + ucrInputDateBreakTime + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 1 + + + 251, 55 + + + 100, 20 + + + 34 + + + ucrChkSpecifyDateBreaks + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 2 + + + 126, 55 + + + 96, 21 + + + 32 + + + ucrInputLabelForDays + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 3 + + + 126, 89 + + + 50, 20 + + + 33 + + + ucrNudYAxisAngle + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 4 + + + 6, 55 + + + 111, 20 + + + 31 + + + ucrChkLabelForDays + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 5 + + + 6, 89 + + + 111, 20 + + + 32 + + + ucrChkYAxisAngle + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 6 + + + 251, 89 + + + 100, 20 + + + 31 + + + ucrChkYAxisLabelSize + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 7 + + + 6, 21 + + + 111, 20 + + + 29 + + + ucrChkSpecifyYAxisTickMarks + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 8 + + + 160, 21 + + + 50, 21 + + + 25 + + + ucrInputYFrom + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 9 + + + 357, 89 + + + 50, 20 + + + 4 + + + ucrNudYAxisLabelSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 11 + + + 275, 21 + + + 52, 21 + + + 24 + + + ucrInputYTo + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 12 + + + 434, 21 + + + 50, 21 + + + 23 + + + ucrInputYInStepsOf + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpYAxisLabels + + + 15 + + + 6, 120 + + + 504, 118 + + + 26 + + + Y-Axis + + + grpYAxisLabels + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage2 + + + 1 + + + 4, 22 + + + 3, 3, 3, 3 + + + 567, 309 + + + 1 + + + Labels + + + TabPage2 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbPICSA + + + 1 + + + 203, 67 + + + 100, 20 + + + 2 + + + ucrChkAddTercilesLabel + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + TabPage3 + + + 0 + + + 203, 41 + + + 100, 20 + + + 2 + + + ucrChkAddMedianLabel + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + TabPage3 + + + 1 + + + 203, 15 + + + 100, 20 + + + 2 + + + ucrChkAddMeanLabel + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + TabPage3 + + + 2 + + + 15, 15 + + + 129, 20 + + + 1 + + + ucrChkAddMean + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + TabPage3 + + + 3 + + + 15, 41 + + + 129, 20 + + + 1 + + + ucrChkAddMedian + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + TabPage3 + + + 4 + + + 15, 67 + + + 129, 20 + + + 1 + + + ucrChkAddTerciles + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + TabPage3 + + + 5 + + + 4, 22 + + + 3, 3, 3, 3 + + + 567, 309 + + + 2 + + + Lines + + + TabPage3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbPICSA + + + 2 + + + 95, 85 + + + 50, 20 + + + 8 + + + UcrNudMinorGridLineSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMinorGridLine + + + 0 + + + 6, 85 + + + 83, 20 + + + 7 + + + UcrChkMinorGridLineSize + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMinorGridLine + + + 1 + + + 94, 56 + + + 106, 21 + + + 4 + + + UcrInputMinorGridLineTpe + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMinorGridLine + + + 2 + + + 94, 23 + + + 106, 21 + + + 3 + + + UcrInputMinorGridLineColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMinorGridLine + + + 3 + + + 6, 56 + + + 100, 20 + + + 2 + + + UcrChkMinorGridLineType + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMinorGridLine + + + 4 + + + 6, 23 + + + 100, 20 + + + 1 + + + UcrChkMinorGridLineColour + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMinorGridLine + + + 5 + + + 264, 183 + + + 226, 111 + + + 3 + + + Minor Grid Lines + + + grpMinorGridLine + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage4 + + + 0 + + + 95, 86 + + + 50, 20 + + + 6 + + + ucrNudBorderSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + GroupBox1 + + + 0 + + + 6, 88 + + + 83, 20 + + + 5 + + + UcrChkBorderSize + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + GroupBox1 + + + 1 + + + 94, 56 + + + 106, 21 + + + 4 + + + ucrInputBorderLinetype + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + GroupBox1 + + + 2 + + + 94, 23 + + + 106, 21 + + + 3 + + + ucrInputBorderColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + GroupBox1 + + + 3 + + + 6, 56 + + + 100, 20 + + + 2 + + + ucrChkBorderLineType + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + GroupBox1 + + + 4 + + + 6, 23 + + + 100, 20 + + + 1 + + + ucrChkBorderColour + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + GroupBox1 + + + 5 + + + 264, 9 + + + 226, 117 + + + 2 + + + Border + + + GroupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage4 + + + 1 + + + 95, 85 + + + 50, 20 + + + 7 + + + UcrNudMajorGridLineSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMajorGridLines + + + 0 + + + 6, 85 + + + 83, 20 + + + 6 + + + UcrChkMajorGridLineSize + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMajorGridLines + + + 1 + + + 94, 56 + + + 106, 21 + + + 4 + + + UcrInputMajorGridLineLinetype + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMajorGridLines + + + 2 + + + 94, 23 + + + 106, 21 + + + 3 + + + UcrInputMajorGridLineColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMajorGridLines + + + 3 + + + 6, 56 + + + 100, 20 + + + 2 + + + UcrChkMajorGridLinetype + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMajorGridLines + + + 4 + + + 6, 23 + + + 100, 20 + + + 1 + + + UcrChkMajorGridLineColour + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpMajorGridLines + + + 5 + + + 6, 183 + + + 226, 111 + + + 1 + + + Major Grid Lines + + + grpMajorGridLines + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage4 + + + 2 + + + 94, 120 + + + 50, 20 + + + 2 + + + ucrNudPnlBackgroundSize + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 0 + + + 94, 86 + + + 106, 21 + + + 5 + + + UcrInputPnlBackgroundFill + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 1 + + + 94, 54 + + + 106, 21 + + + 4 + + + UcrInputPnlBackgroundLinetype + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 2 + + + 94, 22 + + + 106, 21 + + + 2 + + + UcrInputPnlBackgroundColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 3 + + + 9, 120 + + + 83, 20 + + + 3 + + + UcrChkPnlBackgroundSize + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 4 + + + 9, 55 + + + 100, 20 + + + 2 + + + UcrChkPnlBackgroundLineType + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 5 + + + 9, 88 + + + 83, 20 + + + 1 + + + UcrChkPnlBackgroundFill + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 6 + + + 9, 23 + + + 100, 20 + + + 0 + + + ucrChkPnlBackgroundColour + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPnlBackground + + + 7 + + + 6, 9 + + + 226, 154 + + + 0 + + + Background + + + grpPnlBackground + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage4 + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 567, 309 + + + 3 + + + Panel + + + TabPage4 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbPICSA + + + 3 + + + 10, 4 + + + 575, 335 + + + 26 + + + tbPICSA + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 217, 338 + + + 142, 30 + + + 0 + + + ucrSdgPICSARainfalbuttons + + + instat.ucrButtonsSubdialogue, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + + + True + + + 6, 13 + + + 589, 367 + + + CenterParent + + + PICSA Rainfall Graph + + + sdgPICSARainfallGraph + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/instat/sdgPICSARainfallGraph.vb b/instat/sdgPICSARainfallGraph.vb index 7e76833ff07..2057d0ef1e1 100644 --- a/instat/sdgPICSARainfallGraph.vb +++ b/instat/sdgPICSARainfallGraph.vb @@ -1,87 +1,881 @@ -' 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 . - +' 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 Imports instat.Translations Public Class sdgPICSARainfallGraph Private bControlsInitialised As Boolean = False - Private clsBaseOperator As ROperator - Private clsYlabFunc As RFunction + Public clsBaseOperator As ROperator + Public clsLabsFunction, clsXLabsFunction, clsYLabsFunction As RFunction + Public clsXScaleContinuousFunction, clsYScaleContinuousFunction As New RFunction + Public clsXScalecontinuousSeqFunction, clsYScaleContinuousSeqFunction As New RFunction + Public clsYScaleDateFunction As New RFunction + Public clsGemoHLineMean As New RFunction + Public clsMeanLine, clsMedianLine, clsTretile As New RFunction + Public clsThemeFunction As RFunction + Public dctThemeFunctions As New Dictionary(Of String, RFunction) + Private bRCodeSet As Boolean = False + + Private clsPlotElementTitle As New RFunction + Private clsPlotElementSubTitle As New RFunction + Private clsPlotElementCaption As New RFunction + Private clsXElementTitle As New RFunction + Private clsYElementTitle As New RFunction + Private clsXElementLabels As New RFunction + Private clsYElementLabels As New RFunction + Private clsElementPanelGridMajor, clsElementPanelGridMinor As New RFunction + 'Private clsPnlBackgroundElementRect As New RFunction + Private clsPanelBackgroundElementRect As New RFunction + Private clsPanelBorderElementRect As New RFunction + Private dctLabelForDays As New Dictionary(Of String, String) + Private dctDateTimePeriods As New Dictionary(Of String, String) + + Private clsDatePeriodOperator As New ROperator + + Private clsGeomHlineMean As New RFunction + Private clsGeomHlineMedian As New RFunction + Private clsGeomHlineLowerTercile As New RFunction + Private clsGeomHlineUpperTercile As New RFunction + + Private clsRaesFunction As New RFunction + Private clsAsDate As New RFunction + Private clsAsNumeric As New RFunction + Private Sub sdgPICSARainfallGraph_Load(sender As Object, e As EventArgs) Handles MyBase.Load - autoTranslate(Me) - End Sub - - Private Sub InitialiseControls() - ucrChkAddMean.SetText("Add Mean") - ucrChkAddMedian.SetText("Add Median") - ucrChkAddTerciles.SetText("Add Terciles") - ucrChkYAxisTitle.SetText("Y Axis Title") - ucrChkXaxisAngle.SetText("X Axis Angle") - ucrChkXaxisLabelSize.SetText("X Axis Label Size") - ucrChkYAxisLabelsSize.SetText("Y Axis Labels Size") - - ucrChkYAxisTitle.AddToLinkedControls(ucrInputYAxisTitle, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkYAxisTitle.AddToLinkedControls(ucrNudYAxisTitleSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrNudYAxisTitleSize.SetLinkedDisplayControl(lblYAxisTitleSize) - ucrChkYAxisTitle.SetParameter(New RParameter("ylab", clsYlabFunc, 1), bNewChangeParameterValue:=False) - ucrChkYAxisTitle.AddParameterPresentCondition(True, "ylab") - ucrInputYAxisTitle.SetParameter(New RParameter("label")) - - ucrChkYAxisLabelsSize.AddToLinkedControls(ucrNudYAxisLabelsSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - - ucrChkXaxisAngle.AddToLinkedControls(ucrNudXAxisAngle, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkXaxisLabelSize.AddToLinkedControls(ucrNudXaxisLabelSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - ucrChkAddLabel.SetText("Add label") - - ucrChkFootNote.SetText("Foot Note") - ucrChkFootNote.AddToLinkedControls(ucrInputFootNote, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkSubFootNote.SetText("Sub Foot Note") - ucrChkSubFootNote.AddToLinkedControls(ucrInputSubFootNote, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - - ucrSpecifyYAxisTickMarks.SetText("Specify Y Axis Tick Marks") - ucrSpecifyYAxisTickMarks.AddToLinkedControls({ucrInputYFrom, ucrInputYTo, ucrInputYInStepsOf}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + autoTranslate(Me) + End Sub + + Public Sub InitialiseControls() + + ' Temp disabled until implemented + ucrChkAddMeanLabel.Enabled = False + ucrChkAddMedianLabel.Enabled = False + ucrChkAddTercilesLabel.Enabled = False + + ' Titles + ucrPnlXAxisTitle.AddRadioButton(rdoAutoXAxis) + ucrPnlXAxisTitle.AddRadioButton(rdoNoTitleXAxisTitle) + ucrPnlXAxisTitle.AddRadioButton(rdoSpecifyXAxisTitle) + + ucrPnlXAxisTitle.AddParameterPresentCondition(rdoAutoXAxis, "label", False) + + ucrPnlXAxisTitle.AddParameterPresentCondition(rdoNoTitleXAxisTitle, "label", True) + ucrPnlXAxisTitle.AddParameterValuesCondition(rdoNoTitleXAxisTitle, "label", Chr(34) & Chr(34), True) + + ucrPnlXAxisTitle.AddParameterPresentCondition(rdoSpecifyXAxisTitle, "label", True) + ucrPnlXAxisTitle.AddParameterValuesCondition(rdoSpecifyXAxisTitle, "label", Chr(34) & Chr(34), False) + + ucrPnlXAxisTitle.AddToLinkedControls(ucrInputXAxisTitle, {rdoSpecifyXAxisTitle}, bNewLinkedHideIfParameterMissing:=True) + + UcrPnlYAxisTitle.AddRadioButton(rdoAutoYAxis) + UcrPnlYAxisTitle.AddRadioButton(rdoNoYAxisTitle) + UcrPnlYAxisTitle.AddRadioButton(rdoSpecifyYAxisTitle) + + UcrPnlYAxisTitle.AddParameterPresentCondition(rdoAutoYAxis, "label", False) + + UcrPnlYAxisTitle.AddParameterPresentCondition(rdoNoYAxisTitle, "label", True) + UcrPnlYAxisTitle.AddParameterValuesCondition(rdoNoYAxisTitle, "label", Chr(34) & Chr(34), True) + + UcrPnlYAxisTitle.AddParameterPresentCondition(rdoSpecifyYAxisTitle, "label", True) + UcrPnlYAxisTitle.AddParameterValuesCondition(rdoSpecifyYAxisTitle, "label", Chr(34) & Chr(34), False) + + UcrPnlYAxisTitle.AddToLinkedControls(ucrInputYAxisTitle, {rdoSpecifyYAxisTitle}, bNewLinkedHideIfParameterMissing:=True) + + ucrInputXAxisTitle.SetParameter(New RParameter("label")) + ucrInputYAxisTitle.SetParameter(New RParameter("label")) + + ucrInputGraphTitle.SetParameter(New RParameter("title")) + + ucrInputGraphSubTitle.SetParameter(New RParameter("subtitle")) + + ucrInputGraphcCaption.SetParameter(New RParameter("caption")) + + ucrNudTitleSize.SetParameter(New RParameter("size")) + ucrNudTitleSize.Increment = 0.1 + ucrNudTitleSize.Minimum = 0 + + ucrNudSubTitleSize.SetParameter(New RParameter("size")) + ucrNudSubTitleSize.Increment = 0.1 + ucrNudSubTitleSize.Minimum = 0 + + ucrNudCaptionSize.SetParameter(New RParameter("size")) + ucrNudCaptionSize.Increment = 0.1 + ucrNudCaptionSize.Minimum = 0 + + ucrNudXAxisTitleSize.SetParameter(New RParameter("size")) + ucrNudXAxisTitleSize.Increment = 0.1 + ucrNudXAxisTitleSize.Minimum = 0 + + ucrNudYAxisTitleSize.SetParameter(New RParameter("size")) + ucrNudYAxisTitleSize.Increment = 0.1 + ucrNudYAxisTitleSize.Minimum = 0 + + ' Labels + ucrChkXAxisLabelSize.SetText("Size") + ucrChkXAxisLabelSize.SetParameter(New RParameter("size"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrNudXaxisLabelSize.SetParameter(New RParameter("size")) + ucrNudXaxisLabelSize.Increment = 0.1 + ucrNudXaxisLabelSize.Minimum = 0 + + ucrChkYAxisLabelSize.SetText("Size") + ucrChkYAxisLabelSize.SetParameter(New RParameter("size"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrNudYAxisLabelSize.SetParameter(New RParameter("size")) + ucrNudYAxisLabelSize.Increment = 0.1 + ucrNudYAxisLabelSize.Minimum = 0 + + ucrChkXAxisAngle.SetText("Angle") + ucrChkXAxisAngle.SetParameter(New RParameter("angle"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + + ucrNudXAxisAngle.SetMinMax(0, 360) + ucrNudXAxisAngle.SetParameter(New RParameter("angle")) + + ucrChkYAxisAngle.SetText("Angle") + ucrChkYAxisAngle.SetParameter(New RParameter("angle"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrNudYAxisAngle.SetMinMax(0, 360) + + ucrChkSpecifyXAxisTickMarks.SetText("Specify Breaks") + ucrChkSpecifyXAxisTickMarks.SetParameter(New RParameter("scale_x_continuous"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + + ucrInputXFrom.SetParameter(New RParameter("from")) + ucrInputXFrom.SetValidationTypeAsNumeric() + ucrInputXFrom.AddQuotesIfUnrecognised = False + + ucrInputXTo.SetParameter(New RParameter("to")) + ucrInputXTo.SetValidationTypeAsNumeric() + ucrInputXTo.AddQuotesIfUnrecognised = False + + ucrInputXInStepsOf.SetParameter(New RParameter("by")) + ucrInputXInStepsOf.SetValidationTypeAsNumeric() + ucrInputXInStepsOf.AddQuotesIfUnrecognised = False + + ucrChkSpecifyYAxisTickMarks.SetText("Numeric Breaks") + ucrChkSpecifyYAxisTickMarks.SetParameter(New RParameter("scale_y_continuous"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + + ucrInputYFrom.SetParameter(New RParameter("from")) + ucrInputYFrom.SetValidationTypeAsNumeric() + ucrInputYFrom.AddQuotesIfUnrecognised = False + + ucrInputYTo.SetParameter(New RParameter("to")) + ucrInputYTo.SetValidationTypeAsNumeric() + ucrInputYTo.AddQuotesIfUnrecognised = False + + ucrInputYInStepsOf.SetParameter(New RParameter("by")) + ucrInputYInStepsOf.SetValidationTypeAsNumeric() + ucrInputYInStepsOf.AddQuotesIfUnrecognised = False + + ucrChkLabelForDays.SetText("Format as Date") + ucrChkLabelForDays.SetParameter(New RParameter("scale_y_date"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrChkLabelForDays.AddToLinkedControls(ucrInputLabelForDays, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Day Month (1 Jan)") + ucrChkLabelForDays.AddToLinkedControls(ucrChkSpecifyDateBreaks, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrInputLabelForDays.SetParameter(New RParameter("date_label", 0)) + dctLabelForDays.Add("Day Number (1-366)", Chr(34) & "%j" & Chr(34)) + dctLabelForDays.Add("Day Month (1 Jan)", Chr(34) & "%d %b" & Chr(34)) + dctLabelForDays.Add("Day Month Full (1 January)", Chr(34) & "%d %B" & Chr(34)) + ucrInputLabelForDays.SetItems(dctLabelForDays) + ucrInputLabelForDays.SetDropDownStyleAsNonEditable() + + ucrChkSpecifyDateBreaks.SetText("Specify Breaks") + ucrChkSpecifyDateBreaks.SetParameter(New RParameter("date_breaks"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrChkSpecifyDateBreaks.AddToLinkedControls(ucrInputDateBreakTime, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Months") + ucrChkSpecifyDateBreaks.AddToLinkedControls(ucrNudDateBreakNumber, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) + + dctDateTimePeriods.Add("Days", "days") + dctDateTimePeriods.Add("Weeks", "weeks") + dctDateTimePeriods.Add("Months", "months") + dctDateTimePeriods.Add("Years", "years") + + ucrInputDateBreakTime.SetParameter(New RParameter("right", 1)) + ucrInputDateBreakTime.SetDropDownStyleAsNonEditable() + ucrInputDateBreakTime.SetItems(dctDateTimePeriods) + + ucrNudDateBreakNumber.Minimum = 1 + ucrNudDateBreakNumber.Increment = 1 + ucrNudDateBreakNumber.SetParameter(New RParameter("left", 0)) + + ucrChkYAxisAngle.AddToLinkedControls(ucrNudYAxisAngle, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkYAxisLabelSize.AddToLinkedControls(ucrNudYAxisLabelSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkSpecifyYAxisTickMarks.AddToLinkedControls({ucrInputYFrom, ucrInputYTo, ucrInputYInStepsOf}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputYFrom.SetLinkedDisplayControl(lblYFrom) ucrInputYTo.SetLinkedDisplayControl(lblYTo) - ucrInputYInStepsOf.SetLinkedDisplayControl(lblYInStepsOf) + ucrInputYInStepsOf.SetLinkedDisplayControl(lblYInStepsOf) - ucrSpecifyXAxisTickMarks.SetText("Specify x Axis Tick Marks") - ucrSpecifyXAxisTickMarks.AddToLinkedControls({ucrInputXFrom, ucrInputXTo, ucrInputXInStepsOf}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkXAxisAngle.AddToLinkedControls(ucrNudXAxisAngle, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkXAxisLabelSize.AddToLinkedControls(ucrNudXaxisLabelSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrChkSpecifyXAxisTickMarks.AddToLinkedControls({ucrInputXFrom, ucrInputXTo, ucrInputXInStepsOf}, {True}, bNewLinkedHideIfParameterMissing:=True) ucrInputXFrom.SetLinkedDisplayControl(lblXFrom) ucrInputXTo.SetLinkedDisplayControl(lblXTo) - ucrInputXInStepsOf.SetLinkedDisplayControl(lblXInStepsOf) + ucrInputXInStepsOf.SetLinkedDisplayControl(lblXInStepsOf) + + ' Background + ucrChkPnlBackgroundColour.SetText("Colour") + ucrChkPnlBackgroundColour.SetParameter(New RParameter("colour"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputPnlBackgroundColour.SetParameter(New RParameter("colour")) + UcrInputPnlBackgroundColour.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctColour)) + UcrInputPnlBackgroundColour.SetDropDownStyleAsNonEditable() + + UcrChkPnlBackgroundFill.SetText("Fill") + UcrChkPnlBackgroundFill.SetParameter(New RParameter("fill"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputPnlBackgroundFill.SetParameter(New RParameter("fill")) + UcrInputPnlBackgroundFill.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctColour)) + UcrInputPnlBackgroundFill.SetDropDownStyleAsNonEditable() + + UcrChkPnlBackgroundLineType.SetText("Line Type") + UcrChkPnlBackgroundLineType.SetParameter(New RParameter("linetype"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputPnlBackgroundLinetype.SetParameter(New RParameter("linetype")) + UcrInputPnlBackgroundLinetype.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctLineType)) + UcrInputPnlBackgroundLinetype.SetDropDownStyleAsNonEditable() + UcrChkPnlBackgroundSize.SetText("Size") + UcrChkPnlBackgroundSize.SetParameter(New RParameter("size"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrNudYAxisTitleSize.SetParameter(New RParameter("size")) + ucrNudPnlBackgroundSize.Increment = 0.1 + ucrNudPnlBackgroundSize.DecimalPlaces = 1 + ucrNudPnlBackgroundSize.Minimum = 0 + + UcrChkMajorGridLineColour.SetText("Colour") + UcrChkMajorGridLineColour.SetParameter(New RParameter("colour"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputMajorGridLineColour.SetParameter(New RParameter("colour")) + UcrInputMajorGridLineColour.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctColour)) + UcrInputMajorGridLineColour.SetDropDownStyleAsNonEditable() + + UcrChkMajorGridLinetype.SetText("Line Type") + UcrChkMajorGridLinetype.SetParameter(New RParameter("linetype"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputMajorGridLineLinetype.SetParameter(New RParameter("linetype")) + UcrInputMajorGridLineLinetype.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctLineType)) + UcrInputMajorGridLineLinetype.SetDropDownStyleAsNonEditable() + + UcrChkMajorGridLineSize.SetText("Size") + UcrChkMajorGridLineSize.SetParameter(New RParameter("size"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrNudMajorGridLineSize.SetParameter(New RParameter("size")) + UcrNudMajorGridLineSize.Increment = 0.1 + UcrNudMajorGridLineSize.DecimalPlaces = 1 + UcrNudMajorGridLineSize.Minimum = 0 + + UcrChkMinorGridLineColour.SetText("Colour") + UcrChkMinorGridLineColour.SetParameter(New RParameter("colour"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputMinorGridLineColour.SetParameter(New RParameter("colour")) + UcrInputMinorGridLineColour.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctColour)) + UcrInputMinorGridLineColour.SetDropDownStyleAsNonEditable() + + UcrChkMinorGridLineType.SetText("Line Type") + UcrChkMinorGridLineType.SetParameter(New RParameter("linetype"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrInputMinorGridLineTpe.SetParameter(New RParameter("linetype")) + UcrInputMinorGridLineTpe.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctLineType)) + UcrInputMinorGridLineTpe.SetDropDownStyleAsNonEditable() + + UcrChkMinorGridLineSize.SetText("Size") + UcrChkMinorGridLineSize.SetParameter(New RParameter("size"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + UcrNudMinorGridLineSize.SetParameter(New RParameter("size")) + UcrNudMinorGridLineSize.Increment = 0.1 + UcrNudMinorGridLineSize.DecimalPlaces = 1 + UcrNudMinorGridLineSize.Minimum = 0 + + ucrChkBorderColour.SetText("Colour") + ucrChkBorderColour.SetParameter(New RParameter("colour"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrInputBorderColour.SetParameter(New RParameter("colour")) + ucrInputBorderColour.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctColour)) + ucrInputBorderColour.SetDropDownStyleAsNonEditable() + + ucrChkBorderLineType.SetText("Line Type") + ucrChkBorderLineType.SetParameter(New RParameter("linetype"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrInputBorderLinetype.SetParameter(New RParameter("linetype")) + ucrInputBorderLinetype.SetItems(New Dictionary(Of String, String)(GgplotDefaults.dctLineType)) + ucrInputBorderLinetype.SetDropDownStyleAsNonEditable() + + UcrChkBorderSize.SetText("Size") + UcrChkBorderSize.SetParameter(New RParameter("size"), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrNudBorderSize.SetParameter(New RParameter("size")) + ucrNudBorderSize.Increment = 0.1 + ucrNudBorderSize.DecimalPlaces = 1 + ucrNudBorderSize.Minimum = 0 + + ucrChkPnlBackgroundColour.AddToLinkedControls(UcrInputPnlBackgroundColour, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkPnlBackgroundFill.AddToLinkedControls(UcrInputPnlBackgroundFill, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkPnlBackgroundLineType.AddToLinkedControls(UcrInputPnlBackgroundLinetype, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkPnlBackgroundSize.AddToLinkedControls(ucrNudPnlBackgroundSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + UcrChkMajorGridLineColour.AddToLinkedControls(UcrInputMajorGridLineColour, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkMajorGridLinetype.AddToLinkedControls(UcrInputMajorGridLineLinetype, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkMajorGridLineSize.AddToLinkedControls(UcrNudMajorGridLineSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + UcrChkMinorGridLineColour.AddToLinkedControls(UcrInputMinorGridLineColour, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkMinorGridLineType.AddToLinkedControls(UcrInputMinorGridLineTpe, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + UcrChkMinorGridLineSize.AddToLinkedControls(UcrNudMinorGridLineSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + ucrChkBorderColour.AddToLinkedControls(ucrInputBorderColour, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkBorderLineType.AddToLinkedControls(ucrInputBorderLinetype, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Solid") + UcrChkBorderSize.AddToLinkedControls(ucrNudBorderSize, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + + + ' Line tab + ' Mean Line + ucrChkAddMean.SetText("Add Mean Line") + ucrChkAddMean.AddParameterPresentCondition(True, "hlinemean", True) + ucrChkAddMean.AddParameterPresentCondition(False, "hlinemean", False) + ucrChkAddMean.AddToLinkedControls(ucrChkAddMeanLabel, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkAddMeanLabel.SetText("Include Label") + + ' Median Line + ucrChkAddMedian.SetText("Add Median Line") + ucrChkAddMedian.AddParameterPresentCondition(True, "hlinemedian", True) + ucrChkAddMedian.AddParameterPresentCondition(False, "hlinemedian", False) + ucrChkAddMedian.AddToLinkedControls(ucrChkAddMedianLabel, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkAddMedianLabel.SetText("Include Label") + + ' Tercile Lines + ucrChkAddTerciles.SetText("Add Tercile Lines") + ucrChkAddTerciles.AddParameterPresentCondition(True, "hlinelowertercile", True) + ucrChkAddTerciles.AddParameterPresentCondition(False, "hlinelowertercile", False) + ucrChkAddTerciles.AddToLinkedControls(ucrChkAddTercilesLabel, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkAddTercilesLabel.SetText("Include Labels") + bControlsInitialised = True End Sub - Public Sub SetRCode(clsNewOperator As ROperator, Optional clsNewYLabTitleFunction As RFunction = Nothing, Optional bReset As Boolean = False) - + Public Sub SetRCode(clsNewOperator 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 clsNewAsNumeric As RFunction = Nothing, Optional clsNewDatePeriodOperator As ROperator = Nothing, Optional bReset As Boolean = False) + bRCodeSet = False + clsBaseOperator = clsNewOperator + If Not bControlsInitialised Then InitialiseControls() - End If - - clsBaseOperator = clsNewOperator - clsYlabFunc = clsNewYLabTitleFunction - - If Not clsBaseOperator.ContainsParameter("ylab") Then - clsBaseOperator.AddParameter(clsRFunctionParameter:=GgplotDefaults.clsYlabTitleFunction.Clone) - End If - - ucrChkYAxisTitle.SetRCode(clsBaseOperator, bReset) - ucrInputYAxisTitle.SetRCode(clsYlabFunc, bReset) - End Sub + End If + + 'themes function + clsThemeFunction = clsNewThemeFunction + + clsGeomHlineMean = clsNewGeomhlineMean + clsGeomHlineMedian = clsNewGeomhlineMedian + clsGeomHlineLowerTercile = clsNewGeomhlineLowerTercile + clsGeomHlineUpperTercile = clsNewGeomhlineUpperTercile + + ' The position MUST be larger than the position of the theme_* argument + ' Otherwise the choice of theme will overwrite the options selected here. + ' Currently set to large value as no reason this cannot be at the end currently + 'clsBaseOperator.AddParameter("theme", clsRFunctionParameter:=clsThemeFunction, iPosition:=100) + + dctThemeFunctions = dctNewThemeFunctions + dctThemeFunctions.TryGetValue("axis.text.x", clsXElementLabels) + dctThemeFunctions.TryGetValue("axis.text.y", clsYElementLabels) + + dctThemeFunctions.TryGetValue("title", clsPlotElementTitle) + dctThemeFunctions.TryGetValue("sub.title", clsPlotElementSubTitle) + dctThemeFunctions.TryGetValue("caption", clsPlotElementCaption) + dctThemeFunctions.TryGetValue("axis.title.x", clsXElementTitle) + dctThemeFunctions.TryGetValue("axis.title.y", clsYElementTitle) + + dctThemeFunctions.TryGetValue("panel.grid.major", clsElementPanelGridMajor) + dctThemeFunctions.TryGetValue("panel.grid.minor", clsElementPanelGridMinor) + dctThemeFunctions.TryGetValue("panel.background", clsPanelBackgroundElementRect) + dctThemeFunctions.TryGetValue("panel.border", clsPanelBorderElementRect) + + 'Labels + + ucrNudTitleSize.SetRCode(clsPlotElementTitle, bCloneIfNeeded:=True) + ucrNudSubTitleSize.SetRCode(clsPlotElementSubTitle, bCloneIfNeeded:=True) + ucrNudCaptionSize.SetRCode(clsPlotElementCaption, bCloneIfNeeded:=True) + + ucrNudXAxisTitleSize.SetRCode(clsXElementTitle, bCloneIfNeeded:=True) + ucrNudYAxisTitleSize.SetRCode(clsYElementTitle, bCloneIfNeeded:=True) + + ucrChkXAxisAngle.SetRCode(clsXElementLabels, bCloneIfNeeded:=True) + ucrChkXAxisLabelSize.SetRCode(clsXElementLabels, bCloneIfNeeded:=True) + ucrNudXAxisAngle.SetRCode(clsXElementLabels, bCloneIfNeeded:=True) + ucrNudXaxisLabelSize.SetRCode(clsXElementLabels, bCloneIfNeeded:=True) + + ucrNudYAxisAngle.SetRCode(clsYElementLabels, bCloneIfNeeded:=True) + ucrNudYAxisLabelSize.SetRCode(clsYElementLabels, bCloneIfNeeded:=True) + ucrChkYAxisAngle.SetRCode(clsYElementLabels, bCloneIfNeeded:=True) + ucrChkYAxisLabelSize.SetRCode(clsYElementLabels, bCloneIfNeeded:=True) + + 'Background + ucrChkPnlBackgroundColour.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + UcrInputPnlBackgroundColour.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + UcrChkPnlBackgroundFill.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + UcrInputPnlBackgroundFill.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + UcrChkPnlBackgroundLineType.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + UcrInputPnlBackgroundLinetype.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + UcrChkPnlBackgroundSize.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + ucrNudPnlBackgroundSize.SetRCode(clsPanelBackgroundElementRect, bCloneIfNeeded:=True) + + UcrChkMajorGridLineColour.SetRCode(clsElementPanelGridMajor, bCloneIfNeeded:=True) + UcrInputMajorGridLineColour.SetRCode(clsElementPanelGridMajor, bCloneIfNeeded:=True) + UcrChkMajorGridLinetype.SetRCode(clsElementPanelGridMajor, bCloneIfNeeded:=True) + UcrInputMajorGridLineLinetype.SetRCode(clsElementPanelGridMajor, bCloneIfNeeded:=True) + UcrChkMajorGridLineSize.SetRCode(clsElementPanelGridMajor, bCloneIfNeeded:=True) + UcrNudMajorGridLineSize.SetRCode(clsElementPanelGridMajor, bCloneIfNeeded:=True) + + UcrChkMinorGridLineColour.SetRCode(clsElementPanelGridMinor, bCloneIfNeeded:=True) + UcrInputMinorGridLineColour.SetRCode(clsElementPanelGridMinor, bCloneIfNeeded:=True) + UcrChkMinorGridLineType.SetRCode(clsElementPanelGridMinor, bCloneIfNeeded:=True) + UcrInputMinorGridLineTpe.SetRCode(clsElementPanelGridMinor, bCloneIfNeeded:=True) + UcrChkMinorGridLineSize.SetRCode(clsElementPanelGridMinor, bCloneIfNeeded:=True) + UcrNudMinorGridLineSize.SetRCode(clsElementPanelGridMinor, bCloneIfNeeded:=True) + + ucrChkBorderColour.SetRCode(clsPanelBorderElementRect, bCloneIfNeeded:=True) + ucrInputBorderColour.SetRCode(clsPanelBorderElementRect, bCloneIfNeeded:=True) + ucrChkBorderLineType.SetRCode(clsPanelBorderElementRect, bCloneIfNeeded:=True) + ucrInputBorderLinetype.SetRCode(clsPanelBorderElementRect, bCloneIfNeeded:=True) + UcrChkBorderSize.SetRCode(clsPanelBorderElementRect, bCloneIfNeeded:=True) + ucrNudBorderSize.SetRCode(clsPanelBorderElementRect, bCloneIfNeeded:=True) + + ' other functions + clsRaesFunction = clsNewRaesFunction + + clsAsDate = clsNewAsDate + clsAsNumeric = clsNewAsNumeric + + clsDatePeriodOperator = clsNewDatePeriodOperator + + clsYScaleDateFunction = clsNewYScaleDateFunction + + ' Breaks for x-axis + If clsNewXScaleContinuousFunction IsNot Nothing Then + clsXScaleContinuousFunction = clsNewXScaleContinuousFunction + Else + clsXScaleContinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() + End If + + ' Breaks for y-axis + If clsNewYScaleContinuousFunction IsNot Nothing Then + clsYScaleContinuousFunction = clsNewYScaleContinuousFunction + Else + clsYScaleContinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() + End If + + ucrChkSpecifyXAxisTickMarks.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True) + ucrChkSpecifyYAxisTickMarks.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True) + + ' Seq function for Scales + Dim clsTempXBreaksParam As RParameter + If clsXScaleContinuousFunction.ContainsParameter("breaks") Then + clsTempXBreaksParam = clsXScaleContinuousFunction.GetParameter("breaks") + If clsTempXBreaksParam.clsArgumentCodeStructure IsNot Nothing Then + clsXScalecontinuousSeqFunction = clsTempXBreaksParam.clsArgumentCodeStructure + Else + 'TODO move to ggplot defaults + clsXScalecontinuousSeqFunction = New RFunction + clsXScalecontinuousSeqFunction.SetRCommand("seq") + End If + Else + clsXScalecontinuousSeqFunction = New RFunction + clsXScalecontinuousSeqFunction.SetRCommand("seq") + End If + + ucrInputXFrom.SetRCode(clsXScalecontinuousSeqFunction, bReset, bCloneIfNeeded:=True) + ucrInputXTo.SetRCode(clsXScalecontinuousSeqFunction, bReset, bCloneIfNeeded:=True) + ucrInputXInStepsOf.SetRCode(clsXScalecontinuousSeqFunction, bReset, bCloneIfNeeded:=True) + + Dim clsTempYBreaksParam As RParameter + If clsYScaleContinuousFunction.ContainsParameter("breaks") Then + clsTempYBreaksParam = clsYScaleContinuousFunction.GetParameter("breaks") + If clsTempYBreaksParam.clsArgumentCodeStructure IsNot Nothing Then + clsYScaleContinuousSeqFunction = clsTempYBreaksParam.clsArgumentCodeStructure + Else + 'TODO move to ggplot defaults + clsYScaleContinuousSeqFunction = New RFunction + clsYScaleContinuousSeqFunction.SetRCommand("seq") + End If + Else + clsYScaleContinuousSeqFunction = New RFunction + clsYScaleContinuousSeqFunction.SetRCommand("seq") + End If + clsYScaleContinuousFunction.AddParameter("breaks", clsRFunctionParameter:=clsYScaleContinuousSeqFunction) + + ucrInputYFrom.SetRCode(clsYScaleContinuousSeqFunction, bReset, bCloneIfNeeded:=True) + ucrInputYTo.SetRCode(clsYScaleContinuousSeqFunction, bReset, bCloneIfNeeded:=True) + ucrInputYInStepsOf.SetRCode(clsYScaleContinuousSeqFunction, bReset, bCloneIfNeeded:=True) + + ' Graph Titles + If clsNewLabsFunction IsNot Nothing Then + clsLabsFunction = clsNewLabsFunction + Else + clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() + End If + + If clsNewXLabsFunction IsNot Nothing Then + clsXLabsFunction = clsNewXLabsFunction + Else + clsXLabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() + End If + + If clsNewYLabsFunction IsNot Nothing Then + clsYLabsFunction = clsNewYLabsFunction + Else + clsYLabsFunction = GgplotDefaults.clsYlabTitleFunction.Clone() + End If + + ucrInputGraphTitle.SetRCode(clsLabsFunction, bReset, bCloneIfNeeded:=True) + ucrInputGraphSubTitle.SetRCode(clsLabsFunction, bReset, bCloneIfNeeded:=True) + ucrInputGraphcCaption.SetRCode(clsLabsFunction, bReset, bCloneIfNeeded:=True) + + ucrPnlXAxisTitle.SetRCode(clsXLabsFunction, bReset, bCloneIfNeeded:=True) + ucrInputXAxisTitle.SetRCode(clsXLabsFunction, bReset, bCloneIfNeeded:=True) + + UcrPnlYAxisTitle.SetRCode(clsYLabsFunction, bReset, bCloneIfNeeded:=True) + ucrInputYAxisTitle.SetRCode(clsYLabsFunction, bReset, bCloneIfNeeded:=True) + + If clsNewYScaleDateFunction IsNot Nothing Then + clsYScaleDateFunction = clsNewYScaleDateFunction + Else + clsYScaleDateFunction = GgplotDefaults.clsYScaleDateFunction.Clone() + End If + + ' scale_y_date function is used for the days lables - this function has been included in GGplot defaults + ' scale_y_date(date_label = %d %b) - for day/month option + ' scale_y_date(date_label = %j) - for day option - however this gives the day number like so 01-366, which isn't great + ' so maybe when day option is selected we could remove the code instead + ucrChkLabelForDays.SetRCode(clsBaseOperator, bCloneIfNeeded:=True) + ucrInputLabelForDays.SetRCode(clsYScaleDateFunction, bCloneIfNeeded:=True) + + ucrChkSpecifyDateBreaks.SetRCode(clsYScaleDateFunction, bCloneIfNeeded:=True) + ucrInputDateBreakTime.SetRCode(clsDatePeriodOperator, bCloneIfNeeded:=True) + ucrNudDateBreakNumber.SetRCode(clsDatePeriodOperator, bCloneIfNeeded:=True) + + ucrChkAddMean.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True) + ucrChkAddMedian.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True) + ucrChkAddTerciles.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True) + + bRCodeSet = True + AddRemoveTheme() + AddRemoveLabs() + AddRemoveXLabs() + AddRemoveYLabs() + AddRemoveSpecifyXAxisTickMarks() + AddRemoveSpecifyYAxisTickMarks() + AddRemoveHline() + AddRemovePanelBorder() + AddRemoveDateBreaks() + End Sub + + Private Sub AddRemoveHline() + If bRCodeSet Then + If ucrChkAddMean.Checked Then + clsBaseOperator.AddParameter("hlinemean", clsRFunctionParameter:=clsGeomHlineMean, iPosition:=20) + Else + clsBaseOperator.RemoveParameterByName("hlinemean") + End If + + If ucrChkAddMedian.Checked Then + clsBaseOperator.AddParameter("hlinemedian", clsRFunctionParameter:=clsGeomHlineMedian, iPosition:=21) + Else + clsBaseOperator.RemoveParameterByName("hlinemedian") + End If + + If ucrChkAddTerciles.Checked Then + clsBaseOperator.AddParameter("hlinelowertercile", clsRFunctionParameter:=clsGeomHlineLowerTercile, iPosition:=22) + clsBaseOperator.AddParameter("hlineuppertercile", clsRFunctionParameter:=clsGeomHlineUpperTercile, iPosition:=23) + Else + clsBaseOperator.RemoveParameterByName("hlinelowertercile") + clsBaseOperator.RemoveParameterByName("hlineuppertercile") + End If + End If + End Sub + + Private Sub ucrChkAddMean_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddMean.ControlValueChanged, ucrChkAddTerciles.ControlValueChanged, ucrChkAddMedian.ControlValueChanged + AddRemoveHline() + End Sub + + Private Sub AddRemoveTheme() + If clsThemeFunction.iParameterCount > 0 Then + ' The position MUST be larger than the position of the theme_* argument + ' Otherwise the choice of theme will overwrite the options selected here. + ' Currently set to large value as no reason this cannot be at the end currently + clsBaseOperator.AddParameter("theme", clsRFunctionParameter:=clsThemeFunction, iPosition:=100) + Else + clsBaseOperator.RemoveParameterByName("theme") + End If + End Sub + + Private Sub AddRemoveLabs() + If bRCodeSet Then + If Not ucrInputGraphTitle.IsEmpty() OrElse Not ucrInputGraphSubTitle.IsEmpty() OrElse Not ucrInputGraphcCaption.IsEmpty() Then + clsBaseOperator.AddParameter("labs", clsRFunctionParameter:=clsLabsFunction) + Else + clsBaseOperator.RemoveParameterByName("labs") + End If + End If + End Sub + + Private Sub AddRemoveXLabs() + If bRCodeSet Then + If rdoNoTitleXAxisTitle.Checked OrElse (rdoSpecifyXAxisTitle.Checked AndAlso Not ucrInputXAxisTitle.IsEmpty()) Then + clsBaseOperator.AddParameter("xlab", clsRFunctionParameter:=clsXLabsFunction) + Else + clsBaseOperator.RemoveParameterByName("xlab") + End If + End If + End Sub + + Private Sub AddRemoveYLabs() + If bRCodeSet Then + If rdoNoYAxisTitle.Checked OrElse (rdoSpecifyYAxisTitle.Checked AndAlso Not ucrInputYAxisTitle.IsEmpty()) Then + clsBaseOperator.AddParameter("ylab", clsRFunctionParameter:=clsYLabsFunction) + Else + clsBaseOperator.RemoveParameterByName("ylab") + End If + End If + End Sub + + Private Sub SetXLabel() + If bRCodeSet Then + If rdoAutoXAxis.Checked Then + clsXLabsFunction.RemoveParameterByName("label") + ElseIf rdoNoTitleXAxisTitle.Checked Then + clsXLabsFunction.AddParameter("label", Chr(34) & Chr(34)) + Else + clsXLabsFunction.AddParameter("label", Chr(34) & ucrInputXAxisTitle.GetText() & Chr(34)) + End If + AddRemoveXLabs() + End If + End Sub + + Private Sub SetYLabel() + If bRCodeSet Then + If rdoAutoYAxis.Checked Then + clsYLabsFunction.RemoveParameterByName("label") + ElseIf rdoNoYAxisTitle.Checked Then + clsYLabsFunction.AddParameter("label", Chr(34) & Chr(34)) + Else + clsYLabsFunction.AddParameter("label", Chr(34) & ucrInputYAxisTitle.GetText() & Chr(34)) + End If + AddRemoveYLabs() + End If + End Sub + + Private Sub ucrPnlXAxisTitle_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlXAxisTitle.ControlValueChanged, ucrInputXAxisTitle.ControlValueChanged + SetXLabel() + End Sub + + Private Sub ucrPnlYAxisTitle_ControlValueChanged(ucrChangedControl As ucrCore) Handles UcrPnlYAxisTitle.ControlValueChanged, ucrInputYAxisTitle.ControlValueChanged + SetYLabel() + End Sub + + Private Sub AddRemoveSpecifyXAxisTickMarks() + If bRCodeSet Then + If ucrChkSpecifyXAxisTickMarks.Checked AndAlso Not ucrInputXTo.IsEmpty AndAlso Not ucrInputXFrom.IsEmpty AndAlso Not ucrInputXInStepsOf.IsEmpty Then + clsBaseOperator.AddParameter("scale_x_continuous", clsRFunctionParameter:=clsXScaleContinuousFunction) + clsXScaleContinuousFunction.AddParameter("breaks", clsRFunctionParameter:=clsXScalecontinuousSeqFunction) + + Else + clsXScaleContinuousFunction.RemoveParameterByName("breaks") + clsBaseOperator.RemoveParameterByName("scale_x_continuous") + End If + End If + End Sub + + Private Sub AddRemoveSpecifyYAxisTickMarks() + If bRCodeSet Then + If ucrChkSpecifyYAxisTickMarks.Checked AndAlso Not ucrInputYTo.IsEmpty AndAlso Not ucrInputYFrom.IsEmpty AndAlso Not ucrInputYInStepsOf.IsEmpty Then + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsAsNumeric, iPosition:=1) + clsBaseOperator.AddParameter("scale_y_continuous", clsRFunctionParameter:=clsYScaleContinuousFunction) + clsBaseOperator.RemoveParameterByName("scale_y_date") + ElseIf ucrChkLabelForDays.Checked Then + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsAsDate, iPosition:=1) + clsBaseOperator.RemoveParameterByName("scale_y_continuous") + clsBaseOperator.AddParameter("scale_y_date", clsRFunctionParameter:=clsYScaleDateFunction) + Else + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsAsNumeric, iPosition:=1) + clsBaseOperator.RemoveParameterByName("scale_y_continuous") + clsBaseOperator.RemoveParameterByName("scale_y_date") + End If + End If + End Sub + + Private Sub ucrInputGraphTitle_ControlValueChanged() Handles ucrInputGraphTitle.ControlValueChanged, ucrInputGraphSubTitle.ControlValueChanged, ucrInputGraphcCaption.ControlValueChanged + AddRemoveLabs() + End Sub + + Private Sub AddRemoveGraphTitleSize() + If ucrNudTitleSize.GetText <> "" Then + clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementTitle) + Else + clsThemeFunction.RemoveParameterByName("plot.title") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemoveGraphSubTitleSize() + If ucrNudSubTitleSize.GetText <> "" Then + clsThemeFunction.AddParameter("plot.subtitle", clsRFunctionParameter:=clsPlotElementSubTitle) + Else + clsThemeFunction.RemoveParameterByName("plot.subtitle") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemoveGraphCaptionSize() + If ucrNudCaptionSize.GetText <> "" Then + clsThemeFunction.AddParameter("plot.caption", clsRFunctionParameter:=clsPlotElementCaption) + Else + clsThemeFunction.RemoveParameterByName("plot.caption") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemoveXAxisTitleSize() + If ucrNudXAxisTitleSize.GetText <> "" Then + clsThemeFunction.AddParameter("axis.title.x", clsRFunctionParameter:=clsXElementTitle) + Else + clsThemeFunction.RemoveParameterByName("axis.title.x") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemoveYAxisTitleSize() + If ucrNudYAxisTitleSize.GetText <> "" Then + clsThemeFunction.AddParameter("axis.title.y", clsRFunctionParameter:=clsYElementTitle) + Else + clsThemeFunction.RemoveParameterByName("axis.title.y") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemoveAngleSizeXAxis() + If bRCodeSet Then + If (ucrChkXAxisAngle.Checked AndAlso ucrNudXAxisAngle.GetText <> "") OrElse (ucrChkXAxisLabelSize.Checked AndAlso ucrNudXaxisLabelSize.GetText <> "") Then + clsThemeFunction.AddParameter("axis.text.x", clsRFunctionParameter:=clsXElementLabels) + Else + clsThemeFunction.RemoveParameterByName("axis.text.x") + End If + AddRemoveTheme() + End If + End Sub + + Private Sub AddRemoveAngleSizeYAxis() + If (ucrChkYAxisAngle.Checked AndAlso ucrNudYAxisAngle.GetText <> "") OrElse (ucrChkYAxisLabelSize.Checked AndAlso ucrNudYAxisLabelSize.GetText <> "") Then + clsThemeFunction.AddParameter("axis.text.y", clsRFunctionParameter:=clsYElementLabels) + Else + clsThemeFunction.RemoveParameterByName("axis.text.y") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemovePanelBackground() + If (ucrChkPnlBackgroundColour.Checked AndAlso Not UcrInputPnlBackgroundColour.IsEmpty()) OrElse (UcrChkPnlBackgroundFill.Checked AndAlso Not UcrInputPnlBackgroundFill.IsEmpty()) OrElse (UcrChkPnlBackgroundLineType.Checked AndAlso Not UcrInputPnlBackgroundLinetype.IsEmpty()) OrElse (UcrChkPnlBackgroundSize.Checked AndAlso ucrNudPnlBackgroundSize.GetText <> "") Then + clsThemeFunction.AddParameter("panel.background", clsRFunctionParameter:=clsPanelBackgroundElementRect) + Else + clsThemeFunction.RemoveParameterByName("panel.background") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemovePanelGridMajor() + If (UcrChkMajorGridLineColour.Checked AndAlso Not UcrInputMajorGridLineColour.IsEmpty()) OrElse (UcrChkMajorGridLinetype.Checked AndAlso Not UcrInputMajorGridLineLinetype.IsEmpty()) OrElse (UcrChkMajorGridLineSize.Checked AndAlso UcrNudMajorGridLineSize.GetText <> "") Then + clsThemeFunction.AddParameter("panel.grid.major", clsRFunctionParameter:=clsElementPanelGridMajor) + Else + clsThemeFunction.RemoveParameterByName("panel.grid.major") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemovePanelGridMinor() + If (UcrChkMinorGridLineColour.Checked AndAlso Not UcrInputMinorGridLineColour.IsEmpty()) OrElse (UcrChkMinorGridLineType.Checked AndAlso Not UcrInputMinorGridLineTpe.IsEmpty()) OrElse (UcrChkMinorGridLineSize.Checked AndAlso UcrNudMinorGridLineSize.GetText <> "") Then + clsThemeFunction.AddParameter("panel.grid.minor", clsRFunctionParameter:=clsElementPanelGridMinor) + Else + clsThemeFunction.RemoveParameterByName("panel.grid.minor") + End If + AddRemoveTheme() + End Sub + + Private Sub AddRemovePanelBorder() + If bRCodeSet Then + If (ucrChkBorderColour.Checked AndAlso Not ucrInputBorderColour.IsEmpty()) OrElse (ucrChkBorderLineType.Checked AndAlso Not ucrInputBorderLinetype.IsEmpty()) OrElse (UcrChkBorderSize.Checked AndAlso ucrNudBorderSize.GetText <> "") Then + clsThemeFunction.AddParameter("panel.border", clsRFunctionParameter:=clsPanelBorderElementRect) + Else + clsThemeFunction.RemoveParameterByName("panel.border") + End If + AddRemoveTheme() + End If + End Sub + + Private Sub ucrChkPnlBackgroundColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPnlBackgroundColour.ControlValueChanged, UcrChkPnlBackgroundFill.ControlValueChanged, UcrChkPnlBackgroundLineType.ControlValueChanged, UcrChkPnlBackgroundSize.ControlValueChanged + AddRemovePanelBackground() + End Sub + + Private Sub UcrChkMajorGridLineColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles UcrChkMajorGridLineColour.ControlValueChanged, UcrChkMajorGridLinetype.ControlValueChanged, UcrChkMajorGridLineSize.ControlValueChanged + AddRemovePanelGridMajor() + End Sub + + Private Sub UcrChkMinorGridLineColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles UcrChkMinorGridLineColour.ControlValueChanged, UcrChkMinorGridLineType.ControlValueChanged, UcrChkMinorGridLineSize.ControlValueChanged + AddRemovePanelGridMinor() + End Sub + + Private Sub UcrChkTitleSize_ControlValueChanged(ucrChangedControl As ucrCore) + AddRemoveGraphTitleSize() + End Sub + + Private Sub UcrChkSubTitleSize_ControlValueChanged(ucrChangedControl As ucrCore) + AddRemoveGraphSubTitleSize() + End Sub + + Private Sub UcrChkCaptionSize_ControlValueChanged(ucrChangedControl As ucrCore) + AddRemoveGraphCaptionSize() + End Sub + + Private Sub UcrChkXAxisTitleSzie_ControlValueChanged(ucrChangedControl As ucrCore) + AddRemoveXAxisTitleSize() + End Sub + + Private Sub UcrChkYAxisTitleSzie_ControlValueChanged(ucrChangedControl As ucrCore) + AddRemoveYAxisTitleSize() + End Sub + + Private Sub ucrChkXAxisLabelSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkXAxisLabelSize.ControlValueChanged, ucrChkXAxisAngle.ControlValueChanged + AddRemoveAngleSizeXAxis() + End Sub + + Private Sub ucrInputXFrom_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputXFrom.ControlContentsChanged, ucrInputXFrom.ControlContentsChanged, ucrInputXInStepsOf.ControlContentsChanged, ucrChkSpecifyXAxisTickMarks.ControlValueChanged + AddRemoveSpecifyXAxisTickMarks() + End Sub + Private Sub ucrChkYAxisLabelSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkYAxisLabelSize.ControlValueChanged, ucrChkYAxisAngle.ControlValueChanged + AddRemoveAngleSizeYAxis() + End Sub + + Private Sub ucrInputYFrom_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputYFrom.ControlContentsChanged, ucrInputYFrom.ControlContentsChanged, ucrInputYInStepsOf.ControlContentsChanged, ucrChkSpecifyYAxisTickMarks.ControlValueChanged, ucrChkLabelForDays.ControlValueChanged + AddRemoveSpecifyYAxisTickMarks() + End Sub + + Private Sub ucrChkBorderColour_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkBorderColour.ControlValueChanged, ucrChkBorderLineType.ControlValueChanged, UcrChkBorderSize.ControlValueChanged + AddRemovePanelBorder() + End Sub + + Private Sub ucrChkLabelForDays_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkLabelForDays.ControlValueChanged, ucrChkSpecifyYAxisTickMarks.ControlValueChanged + If ucrChangedControl.Equals(ucrChkSpecifyYAxisTickMarks) AndAlso ucrChkSpecifyYAxisTickMarks.Checked Then + ucrChkLabelForDays.Checked = False + ElseIf ucrChangedControl.Equals(ucrChkLabelForDays) AndAlso ucrChkLabelForDays.Checked Then + ucrChkSpecifyYAxisTickMarks.Checked = False + End If + End Sub + + Private Sub ucrChkSpecifyDateBreaks_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSpecifyDateBreaks.ControlValueChanged, ucrInputDateBreakTime.ControlValueChanged, ucrNudDateBreakNumber.ControlValueChanged + AddRemoveDateBreaks() + End Sub + + Private Sub AddRemoveDateBreaks() + If bRCodeSet Then + If ucrChkSpecifyDateBreaks.Checked AndAlso ucrNudDateBreakNumber.GetText <> "" AndAlso ucrInputDateBreakTime.GetText <> "" Then + clsYScaleDateFunction.AddParameter("date_breaks", clsROperatorParameter:=clsDatePeriodOperator) + Else + clsYScaleDateFunction.RemoveParameterByName("date_breaks") + End If + End If + End Sub End Class \ No newline at end of file diff --git a/instat/sdgSelectMonth.Designer.vb b/instat/sdgSelectMonth.Designer.vb index 7a119ec4026..ad8c0619bbe 100644 --- a/instat/sdgSelectMonth.Designer.vb +++ b/instat/sdgSelectMonth.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class sdgSelectMonth Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,14 +20,38 @@ Partial Class sdgSelectMonth 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() + Me.lblSelectMonth = New System.Windows.Forms.Label() + Me.ucrMonthAsFactor = New instat.ucrFactor() Me.ucrBaseSdg = New instat.ucrButtonsSubdialogue() Me.SuspendLayout() ' + 'lblSelectMonth + ' + Me.lblSelectMonth.AutoSize = True + Me.lblSelectMonth.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectMonth.Location = New System.Drawing.Point(18, 23) + Me.lblSelectMonth.Name = "lblSelectMonth" + Me.lblSelectMonth.Size = New System.Drawing.Size(120, 13) + Me.lblSelectMonth.TabIndex = 14 + Me.lblSelectMonth.Text = "Select Month(s) to Omit:" + ' + 'ucrMonthAsFactor + ' + Me.ucrMonthAsFactor.AutoSize = True + Me.ucrMonthAsFactor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.ucrMonthAsFactor.clsReceiver = Nothing + Me.ucrMonthAsFactor.Location = New System.Drawing.Point(14, 40) + Me.ucrMonthAsFactor.Name = "ucrMonthAsFactor" + Me.ucrMonthAsFactor.shtCurrSheet = Nothing + Me.ucrMonthAsFactor.Size = New System.Drawing.Size(231, 219) + Me.ucrMonthAsFactor.TabIndex = 3 + Me.ucrMonthAsFactor.ucrChkLevels = Nothing + ' 'ucrBaseSdg ' - Me.ucrBaseSdg.Location = New System.Drawing.Point(49, 188) + Me.ucrBaseSdg.Location = New System.Drawing.Point(58, 263) Me.ucrBaseSdg.Name = "ucrBaseSdg" Me.ucrBaseSdg.Size = New System.Drawing.Size(142, 30) Me.ucrBaseSdg.TabIndex = 0 @@ -36,7 +60,9 @@ Partial Class sdgSelectMonth ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(241, 230) + Me.ClientSize = New System.Drawing.Size(259, 298) + Me.Controls.Add(Me.lblSelectMonth) + Me.Controls.Add(Me.ucrMonthAsFactor) Me.Controls.Add(Me.ucrBaseSdg) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -45,8 +71,11 @@ Partial Class sdgSelectMonth Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Select Month" Me.ResumeLayout(False) + Me.PerformLayout() End Sub Friend WithEvents ucrBaseSdg As ucrButtonsSubdialogue + Friend WithEvents ucrMonthAsFactor As ucrFactor + Friend WithEvents lblSelectMonth As Label End Class diff --git a/instat/sdgSelectMonth.vb b/instat/sdgSelectMonth.vb index 62dee8eb918..0303e86f440 100644 --- a/instat/sdgSelectMonth.vb +++ b/instat/sdgSelectMonth.vb @@ -16,7 +16,28 @@ Imports instat.Translations Public Class sdgSelectMonth + Private ucrReceiverMonth As ucrReceiverSingle + Private clsInOperator As New ROperator + Private Sub sdgSelectMonth_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + InitialiseControls() + End Sub + + Private Sub InitialiseControls() + ucrMonthAsFactor.strSelectorColumnName = "Omit Level" + ucrMonthAsFactor.SetAsMultipleSelector() + ucrMonthAsFactor.SetReceiver(ucrReceiverMonth) + ucrMonthAsFactor.SetIncludeLevels(False) + ucrMonthAsFactor.bIncludeNA = False + End Sub + + Public Sub SetRCode(Optional clsNewInOperator As ROperator = Nothing, Optional ucrNewReceiverMonth As ucrReceiverSingle = Nothing, Optional bReset As Boolean = False) + ucrReceiverMonth = ucrNewReceiverMonth + clsInOperator = clsNewInOperator + End Sub + Private Sub ucrMonthAsFactor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrMonthAsFactor.ControlValueChanged + clsInOperator.AddParameter("months", ucrMonthAsFactor.GetSelectedLevels(), iPosition:=1) End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index a24bdb8d8c9..b1d87dff787 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1874,7 +1874,15 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, } else if(format == "years") { - if(nrow(x) != 366) stop("data must have exactly 366 rows when format = 'years'") + by_cols <- c() + if(!missing(station)) by_cols <- c(by_cols, station) + if(!missing(element)) by_cols <- c(by_cols, element) + + if(length(by_cols) > 0) { + group_lengths <- x %>% dplyr::group_by(!!! rlang::syms(by_cols)) %>% dplyr::summarise(n = n()) + if(any(group_lengths$n != 366)) stop("data must have exactly 366 rows per station per element when format = 'years'") + } + else if(nrow(x) != 366) stop("data must have exactly 366 rows for a single station and element when format = 'years'") if(!missing(stack_years) && length(year_list) != length(stack_cols)) stop("stack_years must be the same length as stack_cols") @@ -1900,11 +1908,11 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, y$year <- plyr::mapvalues(y$year, stack_cols, stack_years) y$year <- as.numeric(levels(y$year))[y$year] - #Replacing day 60 with 0 for non-leap years.This will result into NA dates + # Replacing day 60 with 0 for non-leap years. This will result in NA dates. y$doy[(!lubridate::leap_year(y$year)) & y$doy == 60] <- 0 y$doy[(!lubridate::leap_year(y$year)) & y$doy > 60] <- y$doy[(!lubridate::leap_year(y$year)) & y$doy > 60] - 1 y$date <- as.Date(paste(y$year, y$doy), format = paste("%Y", "%j")) - # Put day 0 back as 60 as needed in error displaying + # Put day 0 back as 60. Needed in error displaying only. y$doy[y$doy == 0] <- 60 } @@ -1918,22 +1926,22 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, invalid_data <- dplyr::filter(y, invalid_ind) if(format == "days" || format == "months") { invalid_data_display <- invalid_data %>% select(year, month, day) - if(!missing(station)) { - invalid_data_display <- data.frame(station = invalid_data$station, invalid_data_display) - } - if(!missing(element)) { - invalid_data_display <- data.frame(element = invalid_data$element, invalid_data_display) - } } else { invalid_data_display <- invalid_data %>% select(year, doy) } + if(!missing(station)) { + invalid_data_display <- data.frame(station = invalid_data$station, invalid_data_display) + } + if(!missing(element)) { + invalid_data_display <- data.frame(element = invalid_data$element, invalid_data_display) + } invalid_data_display[[element_name]] <- invalid_data[[element_name]] print(invalid_data_display, row.names = FALSE) } if(ignore_invalid) cat("Warning: These rows have been removed.\n") else { - # Not stop here for that output can be displayed by R-Instat + # Don't use a stop here so that output can be displayed by R-Instat cat("There are:", sum(invalid_ind), "measurement values on invalid dates. Correct these or specify ignore_invalid = TRUE to ignore them. See output for more details.") continue <- FALSE } @@ -1941,19 +1949,19 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(continue) { # Standard format of slowest varying structure variables first (station then date) followed by measurements - if(!missing(station) && format != "years") z <- data.frame(station = y$station, date = y$date) + if(!missing(station)) z <- data.frame(station = y$station, date = y$date) else z <- data.frame(date = y$date) z[[element_name]] <- y[[element_name]] - if(!missing(element) && format != "years") z$element <- y$element + if(!missing(element)) z$element <- y$element z <- dplyr::filter(z, !is.na(date)) # If data contains multiple elements, unstack the element column - if(!missing(element) && format != "years") { + if(!missing(element)) { z <- reshape2::dcast(z, ... ~ element, value.var = element_name) } - if(!missing(station) && format != "years") z <- z %>% dplyr::group_by(station) %>% dplyr::arrange(date, .by_group = TRUE) %>% ungroup() + if(!missing(station)) z <- z %>% dplyr::group_by(station) %>% dplyr::arrange(date, .by_group = TRUE) %>% ungroup() else z <- z %>% dplyr::arrange(date) if(missing(new_name) || new_name == "") new_name <- next_default_item("data", existing_names = self$get_data_names())