diff --git a/instat/DlgDefineClimaticData.Designer.vb b/instat/DlgDefineClimaticData.Designer.vb index 4c662a54ad0..519e7e7087d 100644 --- a/instat/DlgDefineClimaticData.Designer.vb +++ b/instat/DlgDefineClimaticData.Designer.vb @@ -22,8 +22,25 @@ Partial Class DlgDefineClimaticData 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.grpClimaticType = New System.Windows.Forms.GroupBox() - Me.panClimateType = New System.Windows.Forms.Panel() + Me.grpElements = New System.Windows.Forms.GroupBox() + Me.ucrReceiverWindDirection = New instat.ucrReceiverSingle() + Me.ucrReceiverRain = New instat.ucrReceiverSingle() + Me.ucrReceiverSunshine = New instat.ucrReceiverSingle() + Me.lblRain = New System.Windows.Forms.Label() + Me.ucrReceiverRadiation = New instat.ucrReceiverSingle() + Me.ucrReceiverMaxTemp = New instat.ucrReceiverSingle() + Me.ucrReceiverCloudCover = New instat.ucrReceiverSingle() + Me.lblMaxTemp = New System.Windows.Forms.Label() + Me.lblCloudCover = New System.Windows.Forms.Label() + Me.lblMinTemp = New System.Windows.Forms.Label() + Me.lblRadiation = New System.Windows.Forms.Label() + Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() + Me.lblSunshine = New System.Windows.Forms.Label() + Me.ucrReceiverMinTemp = New instat.ucrReceiverSingle() + Me.lblWindSpeed = New System.Windows.Forms.Label() + Me.lblWindDirection = New System.Windows.Forms.Label() + Me.lblStationName = New System.Windows.Forms.Label() + Me.ucrReceiverStationName = New instat.ucrReceiverSingle() Me.lblDOY = New System.Windows.Forms.Label() Me.ucrReceiverDOY = New instat.ucrReceiverSingle() Me.ucrReceiverDay = New instat.ucrReceiverSingle() @@ -32,325 +49,331 @@ Partial Class DlgDefineClimaticData Me.lblMonth = New System.Windows.Forms.Label() Me.ucrReceiverYear = New instat.ucrReceiverSingle() Me.lblYear = New System.Windows.Forms.Label() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.lblStation = New System.Windows.Forms.Label() Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrReceiverRain = New instat.ucrReceiverSingle() - Me.ucrReceiverMaxTemp = New instat.ucrReceiverSingle() - Me.ucrReceiverWindDirection = New instat.ucrReceiverSingle() - Me.ucrReceiverSunshine = New instat.ucrReceiverSingle() - Me.ucrReceiverRadiation = New instat.ucrReceiverSingle() - Me.ucrReceiverCloudCover = New instat.ucrReceiverSingle() - Me.lblCloudCover = New System.Windows.Forms.Label() - Me.lblRadiation = New System.Windows.Forms.Label() - Me.lblWindDirection = New System.Windows.Forms.Label() - Me.lblSunshine = New System.Windows.Forms.Label() - Me.lblWindSpeed = New System.Windows.Forms.Label() - Me.ucrReceiverMinTemp = New instat.ucrReceiverSingle() - Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() - Me.lblRain = New System.Windows.Forms.Label() - Me.lblMinTemp = New System.Windows.Forms.Label() - Me.lblMaxTemp = New System.Windows.Forms.Label() Me.lblDate = New System.Windows.Forms.Label() Me.ucrSelectorDefineClimaticData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.grpClimaticType.SuspendLayout() - Me.panClimateType.SuspendLayout() + Me.grpDateTime = New System.Windows.Forms.GroupBox() + Me.grpStation = New System.Windows.Forms.GroupBox() + Me.grpElements.SuspendLayout() + Me.grpDateTime.SuspendLayout() + Me.grpStation.SuspendLayout() Me.SuspendLayout() ' - 'grpClimaticType - ' - Me.grpClimaticType.Controls.Add(Me.panClimateType) - Me.grpClimaticType.Location = New System.Drawing.Point(237, 9) - Me.grpClimaticType.Name = "grpClimaticType" - Me.grpClimaticType.Size = New System.Drawing.Size(187, 310) - Me.grpClimaticType.TabIndex = 1 - Me.grpClimaticType.TabStop = False - Me.grpClimaticType.Text = "Climatic Type" - ' - 'panClimateType - ' - Me.panClimateType.AutoScroll = True - Me.panClimateType.Controls.Add(Me.lblDOY) - Me.panClimateType.Controls.Add(Me.ucrReceiverDOY) - Me.panClimateType.Controls.Add(Me.ucrReceiverDay) - Me.panClimateType.Controls.Add(Me.lblDay) - Me.panClimateType.Controls.Add(Me.ucrReceiverMonth) - Me.panClimateType.Controls.Add(Me.lblMonth) - Me.panClimateType.Controls.Add(Me.ucrReceiverYear) - Me.panClimateType.Controls.Add(Me.lblYear) - Me.panClimateType.Controls.Add(Me.ucrReceiverStation) - Me.panClimateType.Controls.Add(Me.lblStation) - Me.panClimateType.Controls.Add(Me.ucrReceiverDate) - Me.panClimateType.Controls.Add(Me.ucrReceiverRain) - Me.panClimateType.Controls.Add(Me.ucrReceiverMaxTemp) - Me.panClimateType.Controls.Add(Me.ucrReceiverWindDirection) - Me.panClimateType.Controls.Add(Me.ucrReceiverSunshine) - Me.panClimateType.Controls.Add(Me.ucrReceiverRadiation) - Me.panClimateType.Controls.Add(Me.ucrReceiverCloudCover) - Me.panClimateType.Controls.Add(Me.lblCloudCover) - Me.panClimateType.Controls.Add(Me.lblRadiation) - Me.panClimateType.Controls.Add(Me.lblWindDirection) - Me.panClimateType.Controls.Add(Me.lblSunshine) - Me.panClimateType.Controls.Add(Me.lblWindSpeed) - Me.panClimateType.Controls.Add(Me.ucrReceiverMinTemp) - Me.panClimateType.Controls.Add(Me.ucrReceiverWindSpeed) - Me.panClimateType.Controls.Add(Me.lblRain) - Me.panClimateType.Controls.Add(Me.lblMinTemp) - Me.panClimateType.Controls.Add(Me.lblMaxTemp) - Me.panClimateType.Controls.Add(Me.lblDate) - Me.panClimateType.Location = New System.Drawing.Point(8, 13) - Me.panClimateType.Name = "panClimateType" - Me.panClimateType.Size = New System.Drawing.Size(172, 280) - Me.panClimateType.TabIndex = 0 - ' - 'lblDOY - ' - Me.lblDOY.AutoSize = True - Me.lblDOY.Location = New System.Drawing.Point(15, 570) - Me.lblDOY.Name = "lblDOY" - Me.lblDOY.Size = New System.Drawing.Size(66, 13) - Me.lblDOY.TabIndex = 26 - Me.lblDOY.Text = "Day of Year:" - ' - 'ucrReceiverDOY - ' - Me.ucrReceiverDOY.Location = New System.Drawing.Point(14, 590) - Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDOY.Name = "ucrReceiverDOY" - Me.ucrReceiverDOY.Selector = Nothing - Me.ucrReceiverDOY.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverDOY.TabIndex = 27 - ' - 'ucrReceiverDay - ' - Me.ucrReceiverDay.Location = New System.Drawing.Point(13, 545) - Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDay.Name = "ucrReceiverDay" - Me.ucrReceiverDay.Selector = Nothing - Me.ucrReceiverDay.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverDay.TabIndex = 25 - ' - 'lblDay - ' - Me.lblDay.AutoSize = True - Me.lblDay.Location = New System.Drawing.Point(14, 525) - Me.lblDay.Name = "lblDay" - Me.lblDay.Size = New System.Drawing.Size(29, 13) - Me.lblDay.TabIndex = 24 - Me.lblDay.Text = "Day:" - ' - 'ucrReceiverMonth - ' - Me.ucrReceiverMonth.Location = New System.Drawing.Point(14, 500) - Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMonth.Name = "ucrReceiverMonth" - Me.ucrReceiverMonth.Selector = Nothing - Me.ucrReceiverMonth.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverMonth.TabIndex = 23 - ' - 'lblMonth - ' - Me.lblMonth.AutoSize = True - Me.lblMonth.Location = New System.Drawing.Point(14, 482) - Me.lblMonth.Name = "lblMonth" - Me.lblMonth.Size = New System.Drawing.Size(40, 13) - Me.lblMonth.TabIndex = 22 - Me.lblMonth.Text = "Month:" - ' - 'ucrReceiverYear - ' - Me.ucrReceiverYear.Location = New System.Drawing.Point(14, 457) - Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverYear.Name = "ucrReceiverYear" - Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverYear.TabIndex = 21 - ' - 'lblYear - ' - Me.lblYear.AutoSize = True - Me.lblYear.Location = New System.Drawing.Point(14, 439) - Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(32, 13) - Me.lblYear.TabIndex = 20 - Me.lblYear.Text = "Year:" - ' - 'ucrReceiverStation - ' - Me.ucrReceiverStation.Location = New System.Drawing.Point(14, 70) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverStation.TabIndex = 3 - ' - 'lblStation + 'grpElements + ' + Me.grpElements.Controls.Add(Me.ucrReceiverWindDirection) + Me.grpElements.Controls.Add(Me.ucrReceiverRain) + Me.grpElements.Controls.Add(Me.ucrReceiverSunshine) + Me.grpElements.Controls.Add(Me.lblRain) + Me.grpElements.Controls.Add(Me.ucrReceiverRadiation) + Me.grpElements.Controls.Add(Me.ucrReceiverMaxTemp) + Me.grpElements.Controls.Add(Me.ucrReceiverCloudCover) + Me.grpElements.Controls.Add(Me.lblMaxTemp) + Me.grpElements.Controls.Add(Me.lblCloudCover) + Me.grpElements.Controls.Add(Me.lblMinTemp) + Me.grpElements.Controls.Add(Me.lblRadiation) + Me.grpElements.Controls.Add(Me.ucrReceiverWindSpeed) + Me.grpElements.Controls.Add(Me.lblSunshine) + Me.grpElements.Controls.Add(Me.ucrReceiverMinTemp) + Me.grpElements.Controls.Add(Me.lblWindSpeed) + Me.grpElements.Controls.Add(Me.lblWindDirection) + Me.grpElements.Location = New System.Drawing.Point(308, 3) + Me.grpElements.Name = "grpElements" + Me.grpElements.Size = New System.Drawing.Size(146, 411) + Me.grpElements.TabIndex = 3 + Me.grpElements.TabStop = False + Me.grpElements.Text = "Elements" ' - Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(14, 52) - Me.lblStation.Name = "lblStation" - Me.lblStation.Size = New System.Drawing.Size(43, 13) - Me.lblStation.TabIndex = 2 - Me.lblStation.Text = "Station:" - ' - 'ucrReceiverDate + 'ucrReceiverWindDirection ' - Me.ucrReceiverDate.Location = New System.Drawing.Point(14, 27) - Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDate.Name = "ucrReceiverDate" - Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverDate.TabIndex = 1 + Me.ucrReceiverWindDirection.bAddRemoveParameter = True + Me.ucrReceiverWindDirection.bChangeParameterValue = True + Me.ucrReceiverWindDirection.frmParent = Me + Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(14, 217) + Me.ucrReceiverWindDirection.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverWindDirection.Name = "ucrReceiverWindDirection" + Me.ucrReceiverWindDirection.Selector = Nothing + Me.ucrReceiverWindDirection.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverWindDirection.TabIndex = 9 ' 'ucrReceiverRain ' - Me.ucrReceiverRain.Location = New System.Drawing.Point(14, 113) + Me.ucrReceiverRain.bAddRemoveParameter = True + Me.ucrReceiverRain.bChangeParameterValue = True + Me.ucrReceiverRain.frmParent = Me + Me.ucrReceiverRain.Location = New System.Drawing.Point(14, 37) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing Me.ucrReceiverRain.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverRain.TabIndex = 5 - ' - 'ucrReceiverMaxTemp - ' - Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(14, 199) - Me.ucrReceiverMaxTemp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMaxTemp.Name = "ucrReceiverMaxTemp" - Me.ucrReceiverMaxTemp.Selector = Nothing - Me.ucrReceiverMaxTemp.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverMaxTemp.TabIndex = 9 - ' - 'ucrReceiverWindDirection - ' - Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(14, 285) - Me.ucrReceiverWindDirection.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverWindDirection.Name = "ucrReceiverWindDirection" - Me.ucrReceiverWindDirection.Selector = Nothing - Me.ucrReceiverWindDirection.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverWindDirection.TabIndex = 13 + Me.ucrReceiverRain.TabIndex = 1 ' 'ucrReceiverSunshine ' - Me.ucrReceiverSunshine.Location = New System.Drawing.Point(14, 328) + Me.ucrReceiverSunshine.bAddRemoveParameter = True + Me.ucrReceiverSunshine.bChangeParameterValue = True + Me.ucrReceiverSunshine.frmParent = Me + Me.ucrReceiverSunshine.Location = New System.Drawing.Point(14, 262) Me.ucrReceiverSunshine.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSunshine.Name = "ucrReceiverSunshine" Me.ucrReceiverSunshine.Selector = Nothing Me.ucrReceiverSunshine.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverSunshine.TabIndex = 15 + Me.ucrReceiverSunshine.TabIndex = 11 + ' + 'lblRain + ' + Me.lblRain.AutoSize = True + Me.lblRain.Location = New System.Drawing.Point(14, 18) + Me.lblRain.Name = "lblRain" + Me.lblRain.Size = New System.Drawing.Size(32, 13) + Me.lblRain.TabIndex = 0 + Me.lblRain.Text = "Rain:" ' 'ucrReceiverRadiation ' - Me.ucrReceiverRadiation.Location = New System.Drawing.Point(14, 371) + Me.ucrReceiverRadiation.bAddRemoveParameter = True + Me.ucrReceiverRadiation.bChangeParameterValue = True + Me.ucrReceiverRadiation.frmParent = Me + Me.ucrReceiverRadiation.Location = New System.Drawing.Point(14, 309) Me.ucrReceiverRadiation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRadiation.Name = "ucrReceiverRadiation" Me.ucrReceiverRadiation.Selector = Nothing Me.ucrReceiverRadiation.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverRadiation.TabIndex = 17 + Me.ucrReceiverRadiation.TabIndex = 13 + ' + 'ucrReceiverMaxTemp + ' + Me.ucrReceiverMaxTemp.bAddRemoveParameter = True + Me.ucrReceiverMaxTemp.bChangeParameterValue = True + Me.ucrReceiverMaxTemp.frmParent = Me + Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(14, 127) + Me.ucrReceiverMaxTemp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMaxTemp.Name = "ucrReceiverMaxTemp" + Me.ucrReceiverMaxTemp.Selector = Nothing + Me.ucrReceiverMaxTemp.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverMaxTemp.TabIndex = 5 ' 'ucrReceiverCloudCover ' - Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(14, 414) + Me.ucrReceiverCloudCover.bAddRemoveParameter = True + Me.ucrReceiverCloudCover.bChangeParameterValue = True + Me.ucrReceiverCloudCover.frmParent = Me + Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(14, 351) Me.ucrReceiverCloudCover.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverCloudCover.Name = "ucrReceiverCloudCover" Me.ucrReceiverCloudCover.Selector = Nothing Me.ucrReceiverCloudCover.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverCloudCover.TabIndex = 19 + Me.ucrReceiverCloudCover.TabIndex = 15 + ' + 'lblMaxTemp + ' + Me.lblMaxTemp.AutoSize = True + Me.lblMaxTemp.Location = New System.Drawing.Point(14, 108) + Me.lblMaxTemp.Name = "lblMaxTemp" + Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) + Me.lblMaxTemp.TabIndex = 4 + Me.lblMaxTemp.Text = "Maximum Temperature:" ' 'lblCloudCover ' Me.lblCloudCover.AutoSize = True - Me.lblCloudCover.Location = New System.Drawing.Point(14, 396) + Me.lblCloudCover.Location = New System.Drawing.Point(14, 333) Me.lblCloudCover.Name = "lblCloudCover" Me.lblCloudCover.Size = New System.Drawing.Size(68, 13) - Me.lblCloudCover.TabIndex = 18 + Me.lblCloudCover.TabIndex = 14 Me.lblCloudCover.Text = "Cloud Cover:" ' + 'lblMinTemp + ' + Me.lblMinTemp.AutoSize = True + Me.lblMinTemp.Location = New System.Drawing.Point(14, 63) + Me.lblMinTemp.Name = "lblMinTemp" + Me.lblMinTemp.Size = New System.Drawing.Size(111, 13) + Me.lblMinTemp.TabIndex = 2 + Me.lblMinTemp.Text = "Minimum Temperature" + ' 'lblRadiation ' Me.lblRadiation.AutoSize = True - Me.lblRadiation.Location = New System.Drawing.Point(14, 353) + Me.lblRadiation.Location = New System.Drawing.Point(14, 288) Me.lblRadiation.Name = "lblRadiation" Me.lblRadiation.Size = New System.Drawing.Size(55, 13) - Me.lblRadiation.TabIndex = 16 + Me.lblRadiation.TabIndex = 12 Me.lblRadiation.Text = "Radiation:" ' - 'lblWindDirection + 'ucrReceiverWindSpeed ' - Me.lblWindDirection.AutoSize = True - Me.lblWindDirection.Location = New System.Drawing.Point(14, 267) - Me.lblWindDirection.Name = "lblWindDirection" - Me.lblWindDirection.Size = New System.Drawing.Size(80, 13) - Me.lblWindDirection.TabIndex = 12 - Me.lblWindDirection.Text = "Wind Direction:" + Me.ucrReceiverWindSpeed.bAddRemoveParameter = True + Me.ucrReceiverWindSpeed.bChangeParameterValue = True + Me.ucrReceiverWindSpeed.frmParent = Me + Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(14, 172) + Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" + Me.ucrReceiverWindSpeed.Selector = Nothing + Me.ucrReceiverWindSpeed.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverWindSpeed.TabIndex = 7 ' 'lblSunshine ' Me.lblSunshine.AutoSize = True - Me.lblSunshine.Location = New System.Drawing.Point(14, 310) + Me.lblSunshine.Location = New System.Drawing.Point(14, 243) Me.lblSunshine.Name = "lblSunshine" Me.lblSunshine.Size = New System.Drawing.Size(85, 13) - Me.lblSunshine.TabIndex = 14 + Me.lblSunshine.TabIndex = 10 Me.lblSunshine.Text = "Sunshine Hours:" ' + 'ucrReceiverMinTemp + ' + Me.ucrReceiverMinTemp.bAddRemoveParameter = True + Me.ucrReceiverMinTemp.bChangeParameterValue = True + Me.ucrReceiverMinTemp.frmParent = Me + Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(14, 82) + Me.ucrReceiverMinTemp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMinTemp.Name = "ucrReceiverMinTemp" + Me.ucrReceiverMinTemp.Selector = Nothing + Me.ucrReceiverMinTemp.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverMinTemp.TabIndex = 3 + ' 'lblWindSpeed ' Me.lblWindSpeed.AutoSize = True - Me.lblWindSpeed.Location = New System.Drawing.Point(14, 224) + Me.lblWindSpeed.Location = New System.Drawing.Point(14, 153) Me.lblWindSpeed.Name = "lblWindSpeed" Me.lblWindSpeed.Size = New System.Drawing.Size(69, 13) - Me.lblWindSpeed.TabIndex = 10 + Me.lblWindSpeed.TabIndex = 6 Me.lblWindSpeed.Text = "Wind Speed:" ' - 'ucrReceiverMinTemp + 'lblWindDirection ' - Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(14, 156) - Me.ucrReceiverMinTemp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMinTemp.Name = "ucrReceiverMinTemp" - Me.ucrReceiverMinTemp.Selector = Nothing - Me.ucrReceiverMinTemp.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverMinTemp.TabIndex = 7 + Me.lblWindDirection.AutoSize = True + Me.lblWindDirection.Location = New System.Drawing.Point(14, 198) + Me.lblWindDirection.Name = "lblWindDirection" + Me.lblWindDirection.Size = New System.Drawing.Size(80, 13) + Me.lblWindDirection.TabIndex = 8 + Me.lblWindDirection.Text = "Wind Direction:" ' - 'ucrReceiverWindSpeed + 'lblStationName ' - Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(14, 242) - Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" - Me.ucrReceiverWindSpeed.Selector = Nothing - Me.ucrReceiverWindSpeed.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverWindSpeed.TabIndex = 11 + Me.lblStationName.AutoSize = True + Me.lblStationName.Location = New System.Drawing.Point(7, 18) + Me.lblStationName.Name = "lblStationName" + Me.lblStationName.Size = New System.Drawing.Size(38, 13) + Me.lblStationName.TabIndex = 0 + Me.lblStationName.Text = "Name:" ' - 'lblRain + 'ucrReceiverStationName ' - Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(14, 95) - Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(32, 13) - Me.lblRain.TabIndex = 4 - Me.lblRain.Text = "Rain:" + Me.ucrReceiverStationName.bAddRemoveParameter = True + Me.ucrReceiverStationName.bChangeParameterValue = True + Me.ucrReceiverStationName.frmParent = Me + Me.ucrReceiverStationName.Location = New System.Drawing.Point(7, 34) + Me.ucrReceiverStationName.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationName.Name = "ucrReceiverStationName" + Me.ucrReceiverStationName.Selector = Nothing + Me.ucrReceiverStationName.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStationName.TabIndex = 1 ' - 'lblMinTemp + 'lblDOY ' - Me.lblMinTemp.AutoSize = True - Me.lblMinTemp.Location = New System.Drawing.Point(14, 138) - Me.lblMinTemp.Name = "lblMinTemp" - Me.lblMinTemp.Size = New System.Drawing.Size(111, 13) - Me.lblMinTemp.TabIndex = 6 - Me.lblMinTemp.Text = "Minimum Temperature" + Me.lblDOY.AutoSize = True + Me.lblDOY.Location = New System.Drawing.Point(15, 181) + Me.lblDOY.Name = "lblDOY" + Me.lblDOY.Size = New System.Drawing.Size(66, 13) + Me.lblDOY.TabIndex = 8 + Me.lblDOY.Text = "Day of Year:" ' - 'lblMaxTemp + 'ucrReceiverDOY ' - Me.lblMaxTemp.AutoSize = True - Me.lblMaxTemp.Location = New System.Drawing.Point(14, 181) - Me.lblMaxTemp.Name = "lblMaxTemp" - Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) - Me.lblMaxTemp.TabIndex = 8 - Me.lblMaxTemp.Text = "Maximum Temperature:" + Me.ucrReceiverDOY.bAddRemoveParameter = True + Me.ucrReceiverDOY.bChangeParameterValue = True + Me.ucrReceiverDOY.frmParent = Me + Me.ucrReceiverDOY.Location = New System.Drawing.Point(15, 198) + Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDOY.Name = "ucrReceiverDOY" + Me.ucrReceiverDOY.Selector = Nothing + Me.ucrReceiverDOY.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDOY.TabIndex = 9 + ' + 'ucrReceiverDay + ' + Me.ucrReceiverDay.bAddRemoveParameter = True + Me.ucrReceiverDay.bChangeParameterValue = True + Me.ucrReceiverDay.frmParent = Me + Me.ucrReceiverDay.Location = New System.Drawing.Point(15, 157) + Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDay.Name = "ucrReceiverDay" + Me.ucrReceiverDay.Selector = Nothing + Me.ucrReceiverDay.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDay.TabIndex = 7 + ' + 'lblDay + ' + Me.lblDay.AutoSize = True + Me.lblDay.Location = New System.Drawing.Point(15, 140) + Me.lblDay.Name = "lblDay" + Me.lblDay.Size = New System.Drawing.Size(29, 13) + Me.lblDay.TabIndex = 6 + Me.lblDay.Text = "Day:" + ' + 'ucrReceiverMonth + ' + Me.ucrReceiverMonth.bAddRemoveParameter = True + Me.ucrReceiverMonth.bChangeParameterValue = True + Me.ucrReceiverMonth.frmParent = Me + Me.ucrReceiverMonth.Location = New System.Drawing.Point(15, 116) + Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMonth.Name = "ucrReceiverMonth" + Me.ucrReceiverMonth.Selector = Nothing + Me.ucrReceiverMonth.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverMonth.TabIndex = 5 + ' + 'lblMonth + ' + Me.lblMonth.AutoSize = True + Me.lblMonth.Location = New System.Drawing.Point(15, 99) + Me.lblMonth.Name = "lblMonth" + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 4 + Me.lblMonth.Text = "Month:" + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.bAddRemoveParameter = True + Me.ucrReceiverYear.bChangeParameterValue = True + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Location = New System.Drawing.Point(15, 75) + Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverYear.TabIndex = 3 + ' + 'lblYear + ' + Me.lblYear.AutoSize = True + Me.lblYear.Location = New System.Drawing.Point(15, 58) + Me.lblYear.Name = "lblYear" + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 2 + Me.lblYear.Text = "Year:" + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.bAddRemoveParameter = True + Me.ucrReceiverDate.bChangeParameterValue = True + Me.ucrReceiverDate.frmParent = Me + Me.ucrReceiverDate.Location = New System.Drawing.Point(15, 34) + Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverDate.TabIndex = 1 ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(14, 9) + Me.lblDate.Location = New System.Drawing.Point(15, 17) Me.lblDate.Name = "lblDate" Me.lblDate.Size = New System.Drawing.Size(33, 13) Me.lblDate.TabIndex = 0 @@ -358,9 +381,11 @@ Partial Class DlgDefineClimaticData ' 'ucrSelectorDefineClimaticData ' + Me.ucrSelectorDefineClimaticData.bAddRemoveParameter = True + Me.ucrSelectorDefineClimaticData.bChangeParameterValue = True Me.ucrSelectorDefineClimaticData.bShowHiddenColumns = False Me.ucrSelectorDefineClimaticData.bUseCurrentFilter = True - Me.ucrSelectorDefineClimaticData.Location = New System.Drawing.Point(9, 9) + Me.ucrSelectorDefineClimaticData.Location = New System.Drawing.Point(13, 2) Me.ucrSelectorDefineClimaticData.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorDefineClimaticData.Name = "ucrSelectorDefineClimaticData" Me.ucrSelectorDefineClimaticData.Size = New System.Drawing.Size(210, 180) @@ -368,17 +393,51 @@ Partial Class DlgDefineClimaticData ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(8, 331) + Me.ucrBase.Location = New System.Drawing.Point(13, 419) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(423, 52) - Me.ucrBase.TabIndex = 2 + Me.ucrBase.TabIndex = 4 + ' + 'grpDateTime + ' + Me.grpDateTime.Controls.Add(Me.lblDOY) + Me.grpDateTime.Controls.Add(Me.ucrReceiverYear) + Me.grpDateTime.Controls.Add(Me.lblDate) + Me.grpDateTime.Controls.Add(Me.lblMonth) + Me.grpDateTime.Controls.Add(Me.ucrReceiverDOY) + Me.grpDateTime.Controls.Add(Me.lblYear) + Me.grpDateTime.Controls.Add(Me.ucrReceiverDate) + Me.grpDateTime.Controls.Add(Me.ucrReceiverMonth) + Me.grpDateTime.Controls.Add(Me.ucrReceiverDay) + Me.grpDateTime.Controls.Add(Me.lblDay) + Me.grpDateTime.Location = New System.Drawing.Point(154, 192) + Me.grpDateTime.Name = "grpDateTime" + Me.grpDateTime.Size = New System.Drawing.Size(148, 222) + Me.grpDateTime.TabIndex = 2 + Me.grpDateTime.TabStop = False + Me.grpDateTime.Tag = "" + Me.grpDateTime.Text = "Date and time" + ' + 'grpStation + ' + Me.grpStation.Controls.Add(Me.lblStationName) + Me.grpStation.Controls.Add(Me.ucrReceiverStationName) + Me.grpStation.Location = New System.Drawing.Point(13, 192) + Me.grpStation.Name = "grpStation" + Me.grpStation.Size = New System.Drawing.Size(137, 61) + Me.grpStation.TabIndex = 1 + Me.grpStation.TabStop = False + Me.grpStation.Tag = "" + Me.grpStation.Text = "Station" ' 'DlgDefineClimaticData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(434, 389) - Me.Controls.Add(Me.grpClimaticType) + Me.ClientSize = New System.Drawing.Size(466, 480) + Me.Controls.Add(Me.grpStation) + Me.Controls.Add(Me.grpDateTime) + Me.Controls.Add(Me.grpElements) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrSelectorDefineClimaticData) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog @@ -387,16 +446,18 @@ Partial Class DlgDefineClimaticData Me.Name = "DlgDefineClimaticData" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Define Climatic Data" - Me.grpClimaticType.ResumeLayout(False) - Me.panClimateType.ResumeLayout(False) - Me.panClimateType.PerformLayout() + Me.grpElements.ResumeLayout(False) + Me.grpElements.PerformLayout() + Me.grpDateTime.ResumeLayout(False) + Me.grpDateTime.PerformLayout() + Me.grpStation.ResumeLayout(False) + Me.grpStation.PerformLayout() Me.ResumeLayout(False) End Sub Friend WithEvents ucrSelectorDefineClimaticData As ucrSelectorByDataFrameAddRemove - Friend WithEvents grpClimaticType As GroupBox - Friend WithEvents panClimateType As Panel + Friend WithEvents grpElements As GroupBox Friend WithEvents ucrReceiverDate As ucrReceiverSingle Friend WithEvents ucrReceiverRain As ucrReceiverSingle Friend WithEvents ucrReceiverMaxTemp As ucrReceiverSingle @@ -422,8 +483,10 @@ Partial Class DlgDefineClimaticData Friend WithEvents lblMonth As Label Friend WithEvents ucrReceiverYear As ucrReceiverSingle Friend WithEvents lblYear As Label - Friend WithEvents ucrReceiverStation As ucrReceiverSingle - Friend WithEvents lblStation As Label + Friend WithEvents ucrReceiverStationName As ucrReceiverSingle + Friend WithEvents lblStationName As Label Friend WithEvents lblDOY As Label Friend WithEvents ucrReceiverDOY As ucrReceiverSingle + Friend WithEvents grpDateTime As GroupBox + Friend WithEvents grpStation As GroupBox End Class diff --git a/instat/DlgDefineClimaticData.vb b/instat/DlgDefineClimaticData.vb index 4341b650de7..649ad3d8b91 100644 --- a/instat/DlgDefineClimaticData.vb +++ b/instat/DlgDefineClimaticData.vb @@ -19,21 +19,32 @@ Imports System.Text.RegularExpressions Public Class DlgDefineClimaticData Public bFirstLoad As Boolean = True + Private bReset As Boolean = True Dim clsTypesFunction As New RFunction Dim lstReceivers As New List(Of ucrReceiverSingle) Dim lstRecognisedTypes As New List(Of KeyValuePair(Of String, List(Of String))) Private Sub DlgDefineClimaticData_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) If bFirstLoad Then InitialiseDialog() - SetDefaults() bFirstLoad = False End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + ReopenDialog() TestOKEnabled() - autoTranslate(Me) + End Sub + + Private Sub ReopenDialog() + End Sub Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 328 Dim kvpRain As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("rain", {"rain", "prec", "rr", "prcp"}.ToList()) Dim kvpDate As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("date", {"date", "record"}.ToList()) Dim kvpStation As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("station", {"station", "id", "name"}.ToList()) @@ -47,55 +58,66 @@ Public Class DlgDefineClimaticData Dim kvpYear As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("year", {"year"}.ToList()) Dim kvpMonth As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("month", {"month"}.ToList()) Dim kvpDay As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("day", {"day"}.ToList()) - Dim kvpDOY As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("doy", {"doy"}.ToList()) + Dim kvpDOY As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("doy", {"doy", "doy_366"}.ToList()) - lstRecognisedTypes.AddRange({kvpRain, kvpDate, kvpStation, kvpCloudCover, kvpTempMax, kvpTempMin, kvpRadiation, kvpSunshineHours, kvpWindDirection, kvpWindSpeed, kvpYear, kvpMonth, kvpDay}) + lstRecognisedTypes.AddRange({kvpRain, kvpStation, kvpCloudCover, kvpTempMax, kvpTempMin, kvpRadiation, kvpSunshineHours, kvpWindDirection, kvpWindSpeed, kvpYear, kvpMonth, kvpDay, kvpDOY, kvpDate}) + lstReceivers.AddRange({ucrReceiverCloudCover, ucrReceiverDay, ucrReceiverMaxTemp, ucrReceiverMinTemp, ucrReceiverMonth, ucrReceiverRadiation, ucrReceiverRain, ucrReceiverStationName, ucrReceiverSunshine, ucrReceiverWindDirection, ucrReceiverWindSpeed, ucrReceiverYear, ucrReceiverDOY, ucrReceiverDate}) - ucrBase.iHelpTopicID = 328 - ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$define_as_climatic") - clsTypesFunction.SetRCommand("c") - ucrBase.clsRsyntax.AddParameter("types", clsRFunctionParameter:=clsTypesFunction) - ucrReceiverDate.Selector = ucrSelectorDefineClimaticData + ucrSelectorDefineClimaticData.SetParameter(New RParameter("data_name", 0)) + ucrSelectorDefineClimaticData.SetParameterIsString() ucrReceiverDate.Tag = "date" - ucrReceiverCloudCover.Selector = ucrSelectorDefineClimaticData ucrReceiverCloudCover.Tag = "cloud_cover" - ucrReceiverStation.Selector = ucrSelectorDefineClimaticData - ucrReceiverStation.Tag = "station" - ucrReceiverMaxTemp.Selector = ucrSelectorDefineClimaticData + ucrReceiverStationName.Tag = "station" ucrReceiverMaxTemp.Tag = "temp_max" - ucrReceiverMinTemp.Selector = ucrSelectorDefineClimaticData ucrReceiverMinTemp.Tag = "temp_min" - ucrReceiverRadiation.Selector = ucrSelectorDefineClimaticData ucrReceiverRadiation.Tag = "radiation" - ucrReceiverRain.Selector = ucrSelectorDefineClimaticData ucrReceiverRain.Tag = "rain" - ucrReceiverSunshine.Selector = ucrSelectorDefineClimaticData ucrReceiverSunshine.Tag = "sunshine_hours" - ucrReceiverWindDirection.Selector = ucrSelectorDefineClimaticData ucrReceiverWindDirection.Tag = "wind_direction" - ucrReceiverWindSpeed.Selector = ucrSelectorDefineClimaticData ucrReceiverWindSpeed.Tag = "wind_speed" - ucrReceiverYear.Selector = ucrSelectorDefineClimaticData ucrReceiverYear.Tag = "year" - ucrReceiverMonth.Selector = ucrSelectorDefineClimaticData ucrReceiverMonth.Tag = "month" - ucrReceiverDay.Selector = ucrSelectorDefineClimaticData ucrReceiverDay.Tag = "day" - ucrReceiverDOY.Selector = ucrSelectorDefineClimaticData ucrReceiverDOY.Tag = "doy" - lstReceivers.AddRange({ucrReceiverCloudCover, ucrReceiverDate, ucrReceiverDay, ucrReceiverMaxTemp, ucrReceiverMinTemp, ucrReceiverMonth, ucrReceiverRadiation, ucrReceiverRain, ucrReceiverStation, ucrReceiverSunshine, ucrReceiverWindDirection, ucrReceiverWindSpeed, ucrReceiverYear, ucrReceiverDOY}) - For Each ucrTempReceiver As ucrReceiver In lstReceivers - ucrTempReceiver.bExcludeFromSelector = True - Next + + SetRSelector() End Sub Private Sub SetDefaults() - ucrReceiverDate.SetMeAsReceiver() + Dim clsDefaultFunction As New RFunction + ucrSelectorDefineClimaticData.Reset() - TestOKEnabled() + ucrReceiverDate.SetMeAsReceiver() + clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$define_as_climatic") + clsTypesFunction.SetRCommand("c") + ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) + ucrBase.clsRsyntax.AddParameter("types", clsRFunctionParameter:=clsTypesFunction) + AutoFillReceivers() End Sub + Public Sub SetRCodeForControls(bReset As Boolean) + ucrSelectorDefineClimaticData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + SetRcodesforReceivers(bReset) + End Sub + + Private Sub SetRcodesforReceivers(bReset As Boolean) + Dim ucrTempReceiver As ucrReceiver + For Each ucrTempReceiver In lstReceivers + ucrTempReceiver.SetRCode(clsTypesFunction, bReset) + Next + End Sub + + Private Sub SetRSelector() + Dim ucrTempReceiver As ucrReceiver + For Each ucrTempReceiver In lstReceivers + ucrTempReceiver.SetParameter(New RParameter(ucrTempReceiver.Tag)) + ucrTempReceiver.Selector = ucrSelectorDefineClimaticData + ucrTempReceiver.SetParameterIsString() + ucrTempReceiver.bExcludeFromSelector = True + Next + End Sub + Private Sub TestOKEnabled() If Not ucrReceiverDate.IsEmpty Then ucrBase.OKEnabled(True) @@ -106,30 +128,10 @@ Public Class DlgDefineClimaticData Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() + SetRCodeForControls(True) TestOKEnabled() End Sub - Private Sub ucrReceiverDate_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverDate.SelectionChanged, ucrReceiverCloudCover.SelectionChanged, ucrReceiverDate.SelectionChanged, ucrReceiverDay.SelectionChanged, ucrReceiverMaxTemp.SelectionChanged, ucrReceiverMinTemp.SelectionChanged, ucrReceiverMonth.SelectionChanged, ucrReceiverRadiation.SelectionChanged, ucrReceiverRain.SelectionChanged, ucrReceiverStation.SelectionChanged, ucrReceiverSunshine.SelectionChanged, ucrReceiverWindDirection.SelectionChanged, ucrReceiverWindSpeed.SelectionChanged, ucrReceiverYear.SelectionChanged - FillClimaticTypes() - TestOKEnabled() - End Sub - - Private Sub ucrSelectorDefineClimaticData_DataFrameChanged() Handles ucrSelectorDefineClimaticData.DataFrameChanged - ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorDefineClimaticData.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) - AutoFillReceivers() - End Sub - - Private Sub FillClimaticTypes() - Dim ucrTempReceiver As ucrReceiver - For Each ucrTempReceiver In lstReceivers - If Not ucrTempReceiver.IsEmpty Then - clsTypesFunction.AddParameter(ucrTempReceiver.Tag, ucrTempReceiver.GetVariableNames) - Else - clsTypesFunction.RemoveParameterByName(ucrTempReceiver.Tag) - End If - Next - End Sub - Private Sub AutoFillReceivers() Dim lstRecognisedValues As List(Of String) Dim ucrCurrentReceiver As ucrReceiver @@ -174,4 +176,12 @@ Public Class DlgDefineClimaticData Next Return lstValues End Function + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged + TestOKEnabled() + End Sub + + Private Sub Selector_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDefineClimaticData.ControlContentsChanged + AutoFillReceivers() + End Sub End Class \ No newline at end of file diff --git a/instat/clsCondition.vb b/instat/clsCondition.vb index 3eb3df6e4ca..c8e8311b600 100644 --- a/instat/clsCondition.vb +++ b/instat/clsCondition.vb @@ -1,16 +1,20 @@ Public Class Condition Private bIsParameterValues As Boolean = False - Private bIsParameterPresenet As Boolean = False + Private bIsParameterPresent As Boolean = False Private bIsFunctionNames As Boolean = False + Private bIsParameterType As Boolean = False + Private strParameterType As String = "" Private strParameterName As String = "" Private lstValues As List(Of String) = New List(Of String) Private bIsPositive As Boolean = True Public Sub SetParameterPresentName(strParamName As String, Optional bNewIsPositive As Boolean = True) strParameterName = strParamName - bIsParameterPresenet = True + bIsParameterPresent = True bIsParameterValues = False bIsFunctionNames = False + bIsParameterType = False + strParameterType = "" bIsPositive = bNewIsPositive End Sub @@ -18,8 +22,10 @@ strParameterName = strParamName lstValues = lstParamValues bIsParameterValues = True - bIsParameterPresenet = False + bIsParameterPresent = False bIsFunctionNames = False + bIsParameterType = False + strParameterType = "" bIsPositive = bNewIsPositive End Sub @@ -35,8 +41,24 @@ lstValues = lstFuncNames bIsFunctionNames = True bIsParameterValues = False - bIsParameterPresenet = False + bIsParameterPresent = False + bIsParameterType = False + strParameterType = "" bIsPositive = bNewIsPositive + End Sub + + Public Sub SetParameterType(strType As String, strParamName As String, Optional bNewIsPositive As Boolean = True) + bIsFunctionNames = False + bIsParameterValues = False + bIsParameterPresent = False + bIsParameterType = True + strParameterName = strParamName + If Not {"string", "RFunction", "ROperator"}.Contains(strType) Then + MsgBox("Developer error: strType must be either string, RFunction or ROperator.") + strParameterType = "" + Else + strParameterType = strType + End If End Sub Public Function IsSatisfied(clsRCode As RCodeStructure, Optional clsParameter As RParameter = Nothing) As Boolean @@ -50,7 +72,7 @@ clsTempParam = clsRCode.GetParameter(strParameterName) End If Return (clsTempParam IsNot Nothing AndAlso clsTempParam.bIsString AndAlso clsTempParam.strArgumentValue IsNot Nothing AndAlso (bIsPositive = lstValues.Contains(clsTempParam.strArgumentValue))) - ElseIf bIsParameterPresenet Then + ElseIf bIsParameterPresent Then Return (bIsPositive = clsRCode.ContainsParameter(strParameterName)) ElseIf bIsFunctionNames Then If TypeOf clsRCode Is RFunction Then @@ -58,6 +80,23 @@ Return (bIsPositive = lstValues.Contains(clsTempFunc.strRCommand)) Else Return False + End If + ElseIf bIsParameterType Then + If Not clsRCode.ContainsParameter(strParameterName) Then + Return Not bIsPositive + Else + clsTempParam = clsRCode.GetParameter(strParameterName) + Select Case strParameterType + Case "string" + Return (bIsPositive = clsTempParam.bIsString) + Case "RFunction" + Return (bIsPositive = clsTempParam.bIsFunction) + Case "ROperator" + Return (bIsPositive = clsTempParam.bIsOperator) + Case Else + MsgBox("Developer error: strType must be either string, RFunction or ROperator.") + Return False + End Select End If Else Return True diff --git a/instat/dlgAddKey.Designer.vb b/instat/dlgAddKey.Designer.vb index 6c9ce94c39f..8d6d84bbdd3 100644 --- a/instat/dlgAddKey.Designer.vb +++ b/instat/dlgAddKey.Designer.vb @@ -22,25 +22,16 @@ Partial Class dlgAddKey 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.lblKeyName = New System.Windows.Forms.Label() Me.cmdCheckUnique = New System.Windows.Forms.Button() Me.lblKeyColumns = New System.Windows.Forms.Label() - Me.ucrInputCheckInput = New instat.ucrInputTextBox() + Me.lblKeyName = New System.Windows.Forms.Label() Me.ucrInputKeyName = New instat.ucrInputTextBox() + Me.ucrInputCheckInput = New instat.ucrInputTextBox() Me.ucrBase = New instat.ucrButtons() Me.ucrSelectorKeyColumns = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverKeyColumns = New instat.ucrReceiverMultiple() Me.SuspendLayout() ' - 'lblKeyName - ' - Me.lblKeyName.AutoSize = True - Me.lblKeyName.Location = New System.Drawing.Point(10, 215) - Me.lblKeyName.Name = "lblKeyName" - Me.lblKeyName.Size = New System.Drawing.Size(59, 13) - Me.lblKeyName.TabIndex = 4 - Me.lblKeyName.Text = "Key Name:" - ' 'cmdCheckUnique ' Me.cmdCheckUnique.Location = New System.Drawing.Point(10, 249) @@ -53,34 +44,45 @@ Partial Class dlgAddKey 'lblKeyColumns ' Me.lblKeyColumns.AutoSize = True - Me.lblKeyColumns.Location = New System.Drawing.Point(270, 32) + Me.lblKeyColumns.Location = New System.Drawing.Point(254, 47) Me.lblKeyColumns.Name = "lblKeyColumns" Me.lblKeyColumns.Size = New System.Drawing.Size(71, 13) - Me.lblKeyColumns.TabIndex = 7 + Me.lblKeyColumns.TabIndex = 1 Me.lblKeyColumns.Text = "Key Columns:" ' - 'ucrInputCheckInput + 'lblKeyName ' - Me.ucrInputCheckInput.IsReadOnly = False - Me.ucrInputCheckInput.Location = New System.Drawing.Point(114, 250) - Me.ucrInputCheckInput.Name = "ucrInputCheckInput" - Me.ucrInputCheckInput.Size = New System.Drawing.Size(288, 21) - Me.ucrInputCheckInput.TabIndex = 6 + Me.lblKeyName.AutoSize = True + Me.lblKeyName.Location = New System.Drawing.Point(10, 218) + Me.lblKeyName.Name = "lblKeyName" + Me.lblKeyName.Size = New System.Drawing.Size(59, 13) + Me.lblKeyName.TabIndex = 3 + Me.lblKeyName.Text = "Key Name:" ' 'ucrInputKeyName ' + Me.ucrInputKeyName.IsMultiline = False Me.ucrInputKeyName.IsReadOnly = False - Me.ucrInputKeyName.Location = New System.Drawing.Point(77, 214) + Me.ucrInputKeyName.Location = New System.Drawing.Point(114, 215) Me.ucrInputKeyName.Name = "ucrInputKeyName" Me.ucrInputKeyName.Size = New System.Drawing.Size(137, 21) - Me.ucrInputKeyName.TabIndex = 3 + Me.ucrInputKeyName.TabIndex = 4 + ' + 'ucrInputCheckInput + ' + Me.ucrInputCheckInput.IsMultiline = False + Me.ucrInputCheckInput.IsReadOnly = False + Me.ucrInputCheckInput.Location = New System.Drawing.Point(114, 250) + Me.ucrInputCheckInput.Name = "ucrInputCheckInput" + Me.ucrInputCheckInput.Size = New System.Drawing.Size(294, 21) + Me.ucrInputCheckInput.TabIndex = 6 ' 'ucrBase ' Me.ucrBase.Location = New System.Drawing.Point(10, 285) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(438, 52) - Me.ucrBase.TabIndex = 2 + Me.ucrBase.Size = New System.Drawing.Size(405, 52) + Me.ucrBase.TabIndex = 7 ' 'ucrSelectorKeyColumns ' @@ -90,27 +92,28 @@ Partial Class dlgAddKey Me.ucrSelectorKeyColumns.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorKeyColumns.Name = "ucrSelectorKeyColumns" Me.ucrSelectorKeyColumns.Size = New System.Drawing.Size(241, 180) - Me.ucrSelectorKeyColumns.TabIndex = 1 + Me.ucrSelectorKeyColumns.TabIndex = 0 ' 'ucrReceiverKeyColumns ' - Me.ucrReceiverKeyColumns.Location = New System.Drawing.Point(273, 56) + Me.ucrReceiverKeyColumns.frmParent = Me + Me.ucrReceiverKeyColumns.Location = New System.Drawing.Point(255, 62) Me.ucrReceiverKeyColumns.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverKeyColumns.Name = "ucrReceiverKeyColumns" Me.ucrReceiverKeyColumns.Selector = Nothing Me.ucrReceiverKeyColumns.Size = New System.Drawing.Size(132, 133) - Me.ucrReceiverKeyColumns.TabIndex = 0 + Me.ucrReceiverKeyColumns.TabIndex = 2 ' 'dlgAddKey ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(414, 340) + Me.Controls.Add(Me.ucrInputKeyName) Me.Controls.Add(Me.lblKeyColumns) Me.Controls.Add(Me.ucrInputCheckInput) Me.Controls.Add(Me.cmdCheckUnique) Me.Controls.Add(Me.lblKeyName) - Me.Controls.Add(Me.ucrInputKeyName) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrSelectorKeyColumns) Me.Controls.Add(Me.ucrReceiverKeyColumns) @@ -127,9 +130,9 @@ Partial Class dlgAddKey Friend WithEvents ucrReceiverKeyColumns As instat.ucrReceiverMultiple Friend WithEvents ucrSelectorKeyColumns As instat.ucrSelectorByDataFrameAddRemove Friend WithEvents ucrBase As instat.ucrButtons - Friend WithEvents ucrInputKeyName As instat.ucrInputTextBox - Friend WithEvents lblKeyName As System.Windows.Forms.Label Friend WithEvents cmdCheckUnique As System.Windows.Forms.Button Friend WithEvents ucrInputCheckInput As instat.ucrInputTextBox Friend WithEvents lblKeyColumns As System.Windows.Forms.Label + Friend WithEvents lblKeyName As Label + Friend WithEvents ucrInputKeyName As ucrInputTextBox End Class \ No newline at end of file diff --git a/instat/dlgAddKey.vb b/instat/dlgAddKey.vb index 86c03c221c1..89f955ac170 100644 --- a/instat/dlgAddKey.vb +++ b/instat/dlgAddKey.vb @@ -18,45 +18,61 @@ Imports instat.Translations Imports RDotNet Public Class dlgAddKey - Dim bFirstLoad As Boolean = True - Dim clsAnyDuplicatesFunction As New RFunction - Dim clsSumFunction As New RFunction - Dim clsIsNAFunction As New RFunction - Dim bUniqueChecked As Boolean = False + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private clsDefaultRFunction As New RFunction + Private clsAnyDuplicatesFunction As New RFunction + Private clsSumFunction As New RFunction + Private clsIsNAFunction As New RFunction + Private bUniqueChecked As Boolean = False Private Sub dlgAddKey_Load(sender As Object, e As EventArgs) Handles MyBase.Load - ucrBase.iHelpTopicID = 504 autoTranslate(Me) If bFirstLoad Then InitialiseDialog() - SetDefaults() bFirstLoad = False - Else - ReOpenDialog() End If + + If bReset Then + SetDefaults() + End If + + SetRCodeForControls(bReset) + bReset = False bUniqueChecked = False TestOKEnabled() End Sub + Private Sub SetRCodeForControls(bReset As Boolean) + SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + TestOKEnabled() + End Sub + Private Sub InitialiseDialog() + ucrBase.iHelpTopicID = 504 + ucrReceiverKeyColumns.Selector = ucrSelectorKeyColumns ucrReceiverKeyColumns.SetMeAsReceiver() - ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$add_key") + + ucrSelectorKeyColumns.SetParameter(New RParameter("data_name", 0)) + ucrSelectorKeyColumns.SetParameterIsString() + + ucrReceiverKeyColumns.SetParameter(New RParameter("col_names", 1)) + ucrReceiverKeyColumns.SetParameterIsString() + + ucrInputKeyName.SetParameter(New RParameter("key_name", 2)) ucrInputKeyName.SetValidationTypeAsRVariable() - clsAnyDuplicatesFunction.SetRCommand("anyDuplicated") - clsSumFunction.SetRCommand("sum") - clsIsNAFunction.SetRCommand("is.na") - clsSumFunction.AddParameter("x", clsRFunctionParameter:=clsIsNAFunction) End Sub Private Sub SetDefaults() ucrSelectorKeyColumns.Reset() - ucrInputKeyName.ResetText() - ucrInputCheckInput.ResetText() + ucrInputKeyName.Reset() + ucrInputCheckInput.Reset() bUniqueChecked = False - End Sub - Private Sub ReOpenDialog() + clsDefaultRFunction = New RFunction + clsDefaultRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$add_key") + ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) End Sub Private Sub TestOKEnabled() @@ -67,37 +83,25 @@ Public Class dlgAddKey End If End Sub - Private Sub ucrReceiverKeyColumns_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverKeyColumns.SelectionChanged + Private Sub ucrReceiverKeyColumns_ControlValueChanged() Handles ucrReceiverKeyColumns.ControlValueChanged If ucrReceiverKeyColumns.IsEmpty Then - ucrBase.clsRsyntax.RemoveParameter("col_names") cmdCheckUnique.Enabled = False Else - ucrBase.clsRsyntax.AddParameter("col_names", ucrReceiverKeyColumns.GetVariableNames()) cmdCheckUnique.Enabled = True End If bUniqueChecked = False - TestOKEnabled() ucrInputCheckInput.SetName("") ucrInputCheckInput.txtInput.BackColor = SystemColors.Window End Sub - - Private Sub ucrSelectorKeyColumns_DataFrameChanged() Handles ucrSelectorKeyColumns.DataFrameChanged - ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorKeyColumns.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34)) - End Sub - - Private Sub ucrInputKeyName_NameChanged() Handles ucrInputKeyName.NameChanged - If ucrInputKeyName.IsEmpty Then - ucrBase.clsRsyntax.RemoveParameter("key_name") - Else - ucrBase.clsRsyntax.AddParameter("key_name", Chr(34) & ucrInputKeyName.GetText() & Chr(34)) - End If - TestOKEnabled() - End Sub - Private Sub cmdCheckUnique_Click(sender As Object, e As EventArgs) Handles cmdCheckUnique.Click Dim iAnyDuplicated As Integer Dim iSumNA As Integer + clsAnyDuplicatesFunction.SetRCommand("anyDuplicated") + clsSumFunction.SetRCommand("sum") + clsIsNAFunction.SetRCommand("is.na") + clsSumFunction.AddParameter("x", clsRFunctionParameter:=clsIsNAFunction) + clsAnyDuplicatesFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverKeyColumns.GetVariables()) clsIsNAFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverKeyColumns.GetVariables()) Try @@ -125,7 +129,13 @@ Public Class dlgAddKey TestOKEnabled() End Sub - Private Sub ucrInputKeyName_ContentsChanged() Handles ucrInputKeyName.ContentsChanged + Private Sub AllControls_ControlContentsChanged() Handles ucrInputKeyName.ControlContentsChanged, ucrReceiverKeyColumns.ControlContentsChanged + TestOKEnabled() + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) TestOKEnabled() End Sub End Class \ No newline at end of file diff --git a/instat/dlgClimdex.Designer.vb b/instat/dlgClimdex.Designer.vb index d03bf75900b..cb849046b52 100644 --- a/instat/dlgClimdex.Designer.vb +++ b/instat/dlgClimdex.Designer.vb @@ -26,48 +26,20 @@ Partial Class dlgClimdex Me.lblTmin = New System.Windows.Forms.Label() Me.lblPrec = New System.Windows.Forms.Label() Me.cmdIndices = New System.Windows.Forms.Button() - Me.lblBaseRangeFrom = New System.Windows.Forms.Label() - Me.nudYearFrom = New System.Windows.Forms.NumericUpDown() - Me.nudYearTo = New System.Windows.Forms.NumericUpDown() - Me.lblBaseRangeTo = New System.Windows.Forms.Label() - Me.lblN = New System.Windows.Forms.Label() - Me.nudN = New System.Windows.Forms.NumericUpDown() - Me.chkNHemisphere = New System.Windows.Forms.CheckBox() - Me.lblAnnual = New System.Windows.Forms.Label() - Me.nudMothlyMissingDays = New System.Windows.Forms.NumericUpDown() - Me.nudAnnualMissingDays = New System.Windows.Forms.NumericUpDown() - Me.lblMonthly = New System.Windows.Forms.Label() - Me.grpBaseRange = New System.Windows.Forms.GroupBox() - Me.grpMaxMissingDays = New System.Windows.Forms.GroupBox() - Me.lblMinBaseData = New System.Windows.Forms.Label() - Me.nudMinBaseData = New System.Windows.Forms.NumericUpDown() - Me.lblTempQuantiles = New System.Windows.Forms.Label() - Me.lblPrecQuantiles = New System.Windows.Forms.Label() - Me.lblFreq = New System.Windows.Forms.Label() Me.lblDate = New System.Windows.Forms.Label() Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrInputFreq = New instat.ucrInputComboBox() - Me.ucrMultipleInputTempQtiles = New instat.ucrMultipleInput() - Me.ucrMultipleInputPrecQtiles = New instat.ucrMultipleInput() Me.ucrReceiverPrec = New instat.ucrReceiverSingle() Me.ucrReceiverTmin = New instat.ucrReceiverSingle() Me.ucrReceiverTmax = New instat.ucrReceiverSingle() Me.ucrSelectorClimdex = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBaseClimdex = New instat.ucrButtons() - CType(Me.nudYearFrom, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.nudYearTo, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.nudN, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.nudMothlyMissingDays, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.nudAnnualMissingDays, System.ComponentModel.ISupportInitialize).BeginInit() - Me.grpBaseRange.SuspendLayout() - Me.grpMaxMissingDays.SuspendLayout() - CType(Me.nudMinBaseData, System.ComponentModel.ISupportInitialize).BeginInit() + Me.ucrChkSave = New instat.ucrCheck() Me.SuspendLayout() ' 'lblTmax ' Me.lblTmax.AutoSize = True - Me.lblTmax.Location = New System.Drawing.Point(332, 46) + Me.lblTmax.Location = New System.Drawing.Point(286, 63) Me.lblTmax.Name = "lblTmax" Me.lblTmax.Size = New System.Drawing.Size(33, 13) Me.lblTmax.TabIndex = 3 @@ -77,7 +49,7 @@ Partial Class dlgClimdex 'lblTmin ' Me.lblTmin.AutoSize = True - Me.lblTmin.Location = New System.Drawing.Point(333, 83) + Me.lblTmin.Location = New System.Drawing.Point(286, 100) Me.lblTmin.Name = "lblTmin" Me.lblTmin.Size = New System.Drawing.Size(30, 13) Me.lblTmin.TabIndex = 5 @@ -87,216 +59,27 @@ Partial Class dlgClimdex 'lblPrec ' Me.lblPrec.AutoSize = True - Me.lblPrec.Location = New System.Drawing.Point(334, 122) + Me.lblPrec.Location = New System.Drawing.Point(286, 139) Me.lblPrec.Name = "lblPrec" Me.lblPrec.Size = New System.Drawing.Size(29, 13) - Me.lblPrec.TabIndex = 8 + Me.lblPrec.TabIndex = 7 Me.lblPrec.Tag = "Prec" Me.lblPrec.Text = "Prec" ' 'cmdIndices ' - Me.cmdIndices.Location = New System.Drawing.Point(316, 321) + Me.cmdIndices.Location = New System.Drawing.Point(286, 193) Me.cmdIndices.Name = "cmdIndices" Me.cmdIndices.Size = New System.Drawing.Size(62, 23) - Me.cmdIndices.TabIndex = 23 + Me.cmdIndices.TabIndex = 10 Me.cmdIndices.Tag = "Indices..." Me.cmdIndices.Text = "Indices..." Me.cmdIndices.UseVisualStyleBackColor = True ' - 'lblBaseRangeFrom - ' - Me.lblBaseRangeFrom.AutoSize = True - Me.lblBaseRangeFrom.Location = New System.Drawing.Point(7, 22) - Me.lblBaseRangeFrom.Name = "lblBaseRangeFrom" - Me.lblBaseRangeFrom.Size = New System.Drawing.Size(30, 13) - Me.lblBaseRangeFrom.TabIndex = 0 - Me.lblBaseRangeFrom.Tag = "From" - Me.lblBaseRangeFrom.Text = "From" - ' - 'nudYearFrom - ' - Me.nudYearFrom.Location = New System.Drawing.Point(43, 20) - Me.nudYearFrom.Maximum = New Decimal(New Integer() {9999, 0, 0, 0}) - Me.nudYearFrom.Minimum = New Decimal(New Integer() {1900, 0, 0, 0}) - Me.nudYearFrom.Name = "nudYearFrom" - Me.nudYearFrom.Size = New System.Drawing.Size(47, 20) - Me.nudYearFrom.TabIndex = 1 - Me.nudYearFrom.Value = New Decimal(New Integer() {1961, 0, 0, 0}) - ' - 'nudYearTo - ' - Me.nudYearTo.Location = New System.Drawing.Point(121, 19) - Me.nudYearTo.Maximum = New Decimal(New Integer() {9999, 0, 0, 0}) - Me.nudYearTo.Minimum = New Decimal(New Integer() {1900, 0, 0, 0}) - Me.nudYearTo.Name = "nudYearTo" - Me.nudYearTo.Size = New System.Drawing.Size(47, 20) - Me.nudYearTo.TabIndex = 3 - Me.nudYearTo.Value = New Decimal(New Integer() {1990, 0, 0, 0}) - ' - 'lblBaseRangeTo - ' - Me.lblBaseRangeTo.AutoSize = True - Me.lblBaseRangeTo.Location = New System.Drawing.Point(96, 22) - Me.lblBaseRangeTo.Name = "lblBaseRangeTo" - Me.lblBaseRangeTo.Size = New System.Drawing.Size(20, 13) - Me.lblBaseRangeTo.TabIndex = 2 - Me.lblBaseRangeTo.Tag = "To" - Me.lblBaseRangeTo.Text = "To" - ' - 'lblN - ' - Me.lblN.AutoSize = True - Me.lblN.Location = New System.Drawing.Point(278, 204) - Me.lblN.Name = "lblN" - Me.lblN.Size = New System.Drawing.Size(93, 13) - Me.lblN.TabIndex = 13 - Me.lblN.Tag = "Days_for_Quantiles" - Me.lblN.Text = "Days for Quantiles" - ' - 'nudN - ' - Me.nudN.Location = New System.Drawing.Point(381, 201) - Me.nudN.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) - Me.nudN.Name = "nudN" - Me.nudN.Size = New System.Drawing.Size(36, 20) - Me.nudN.TabIndex = 14 - Me.nudN.Value = New Decimal(New Integer() {5, 0, 0, 0}) - ' - 'chkNHemisphere - ' - Me.chkNHemisphere.AutoSize = True - Me.chkNHemisphere.Location = New System.Drawing.Point(10, 297) - Me.chkNHemisphere.Name = "chkNHemisphere" - Me.chkNHemisphere.Size = New System.Drawing.Size(126, 17) - Me.chkNHemisphere.TabIndex = 18 - Me.chkNHemisphere.Tag = "Northern_Hemisphere" - Me.chkNHemisphere.Text = "Northern Hemisphere" - Me.chkNHemisphere.UseVisualStyleBackColor = True - ' - 'lblAnnual - ' - Me.lblAnnual.AutoSize = True - Me.lblAnnual.Location = New System.Drawing.Point(7, 19) - Me.lblAnnual.Name = "lblAnnual" - Me.lblAnnual.Size = New System.Drawing.Size(40, 13) - Me.lblAnnual.TabIndex = 0 - Me.lblAnnual.Tag = "Annual" - Me.lblAnnual.Text = "Annual" - ' - 'nudMothlyMissingDays - ' - Me.nudMothlyMissingDays.Location = New System.Drawing.Point(156, 17) - Me.nudMothlyMissingDays.Maximum = New Decimal(New Integer() {31, 0, 0, 0}) - Me.nudMothlyMissingDays.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) - Me.nudMothlyMissingDays.Name = "nudMothlyMissingDays" - Me.nudMothlyMissingDays.Size = New System.Drawing.Size(47, 20) - Me.nudMothlyMissingDays.TabIndex = 3 - Me.nudMothlyMissingDays.Value = New Decimal(New Integer() {3, 0, 0, 0}) - ' - 'nudAnnualMissingDays - ' - Me.nudAnnualMissingDays.Location = New System.Drawing.Point(53, 17) - Me.nudAnnualMissingDays.Maximum = New Decimal(New Integer() {366, 0, 0, 0}) - Me.nudAnnualMissingDays.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) - Me.nudAnnualMissingDays.Name = "nudAnnualMissingDays" - Me.nudAnnualMissingDays.Size = New System.Drawing.Size(47, 20) - Me.nudAnnualMissingDays.TabIndex = 1 - Me.nudAnnualMissingDays.Value = New Decimal(New Integer() {15, 0, 0, 0}) - ' - 'lblMonthly - ' - Me.lblMonthly.AutoSize = True - Me.lblMonthly.Location = New System.Drawing.Point(106, 19) - Me.lblMonthly.Name = "lblMonthly" - Me.lblMonthly.Size = New System.Drawing.Size(44, 13) - Me.lblMonthly.TabIndex = 2 - Me.lblMonthly.Tag = "Monthly" - Me.lblMonthly.Text = "Monthly" - ' - 'grpBaseRange - ' - Me.grpBaseRange.Controls.Add(Me.nudYearFrom) - Me.grpBaseRange.Controls.Add(Me.nudYearTo) - Me.grpBaseRange.Controls.Add(Me.lblBaseRangeTo) - Me.grpBaseRange.Controls.Add(Me.lblBaseRangeFrom) - Me.grpBaseRange.Location = New System.Drawing.Point(10, 194) - Me.grpBaseRange.Name = "grpBaseRange" - Me.grpBaseRange.Size = New System.Drawing.Size(174, 46) - Me.grpBaseRange.TabIndex = 12 - Me.grpBaseRange.TabStop = False - Me.grpBaseRange.Tag = "Base_Range" - Me.grpBaseRange.Text = "Base Range" - ' - 'grpMaxMissingDays - ' - Me.grpMaxMissingDays.Controls.Add(Me.nudMothlyMissingDays) - Me.grpMaxMissingDays.Controls.Add(Me.lblMonthly) - Me.grpMaxMissingDays.Controls.Add(Me.lblAnnual) - Me.grpMaxMissingDays.Controls.Add(Me.nudAnnualMissingDays) - Me.grpMaxMissingDays.Location = New System.Drawing.Point(10, 245) - Me.grpMaxMissingDays.Name = "grpMaxMissingDays" - Me.grpMaxMissingDays.Size = New System.Drawing.Size(216, 46) - Me.grpMaxMissingDays.TabIndex = 16 - Me.grpMaxMissingDays.TabStop = False - Me.grpMaxMissingDays.Tag = "Maximum_Missing_Days" - Me.grpMaxMissingDays.Text = "Maximum Missing Days" - ' - 'lblMinBaseData - ' - Me.lblMinBaseData.AutoSize = True - Me.lblMinBaseData.Location = New System.Drawing.Point(10, 326) - Me.lblMinBaseData.Name = "lblMinBaseData" - Me.lblMinBaseData.Size = New System.Drawing.Size(193, 13) - Me.lblMinBaseData.TabIndex = 21 - Me.lblMinBaseData.Tag = "Minimum_Fraction_of_Base_Data_ Present" - Me.lblMinBaseData.Text = "Minimum Fraction of Base Data Present" - ' - 'nudMinBaseData - ' - Me.nudMinBaseData.DecimalPlaces = 1 - Me.nudMinBaseData.Increment = New Decimal(New Integer() {1, 0, 0, 65536}) - Me.nudMinBaseData.Location = New System.Drawing.Point(216, 322) - Me.nudMinBaseData.Maximum = New Decimal(New Integer() {1, 0, 0, 0}) - Me.nudMinBaseData.Name = "nudMinBaseData" - Me.nudMinBaseData.Size = New System.Drawing.Size(36, 20) - Me.nudMinBaseData.TabIndex = 22 - Me.nudMinBaseData.Value = New Decimal(New Integer() {1, 0, 0, 65536}) - ' - 'lblTempQuantiles - ' - Me.lblTempQuantiles.AutoSize = True - Me.lblTempQuantiles.Location = New System.Drawing.Point(291, 228) - Me.lblTempQuantiles.Name = "lblTempQuantiles" - Me.lblTempQuantiles.Size = New System.Drawing.Size(114, 13) - Me.lblTempQuantiles.TabIndex = 15 - Me.lblTempQuantiles.Tag = "Temperature_Quantiles" - Me.lblTempQuantiles.Text = "Temperature Quantiles" - ' - 'lblPrecQuantiles - ' - Me.lblPrecQuantiles.AutoSize = True - Me.lblPrecQuantiles.Location = New System.Drawing.Point(292, 276) - Me.lblPrecQuantiles.Name = "lblPrecQuantiles" - Me.lblPrecQuantiles.Size = New System.Drawing.Size(112, 13) - Me.lblPrecQuantiles.TabIndex = 19 - Me.lblPrecQuantiles.Tag = "Precipitation_Quantiles" - Me.lblPrecQuantiles.Text = "Precipitation Quantiles" - ' - 'lblFreq - ' - Me.lblFreq.AutoSize = True - Me.lblFreq.Location = New System.Drawing.Point(320, 160) - Me.lblFreq.Name = "lblFreq" - Me.lblFreq.Size = New System.Drawing.Size(57, 13) - Me.lblFreq.TabIndex = 10 - Me.lblFreq.Tag = "Frequency" - Me.lblFreq.Text = "Frequency" - ' 'lblDate ' Me.lblDate.AutoSize = True - Me.lblDate.Location = New System.Drawing.Point(333, 3) + Me.lblDate.Location = New System.Drawing.Point(286, 20) Me.lblDate.Name = "lblDate" Me.lblDate.Size = New System.Drawing.Size(30, 13) Me.lblDate.TabIndex = 1 @@ -306,49 +89,27 @@ Partial Class dlgClimdex 'ucrReceiverDate ' Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(289, 22) + Me.ucrReceiverDate.Location = New System.Drawing.Point(286, 39) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDate.TabIndex = 2 ' - 'ucrInputFreq - ' - Me.ucrInputFreq.IsReadOnly = False - Me.ucrInputFreq.Location = New System.Drawing.Point(280, 176) - Me.ucrInputFreq.Name = "ucrInputFreq" - Me.ucrInputFreq.Size = New System.Drawing.Size(137, 21) - Me.ucrInputFreq.TabIndex = 11 - ' - 'ucrMultipleInputTempQtiles - ' - Me.ucrMultipleInputTempQtiles.Location = New System.Drawing.Point(273, 246) - Me.ucrMultipleInputTempQtiles.Name = "ucrMultipleInputTempQtiles" - Me.ucrMultipleInputTempQtiles.Size = New System.Drawing.Size(150, 29) - Me.ucrMultipleInputTempQtiles.TabIndex = 17 - ' - 'ucrMultipleInputPrecQtiles - ' - Me.ucrMultipleInputPrecQtiles.Location = New System.Drawing.Point(273, 293) - Me.ucrMultipleInputPrecQtiles.Name = "ucrMultipleInputPrecQtiles" - Me.ucrMultipleInputPrecQtiles.Size = New System.Drawing.Size(150, 29) - Me.ucrMultipleInputPrecQtiles.TabIndex = 20 - ' 'ucrReceiverPrec ' Me.ucrReceiverPrec.frmParent = Me - Me.ucrReceiverPrec.Location = New System.Drawing.Point(288, 139) + Me.ucrReceiverPrec.Location = New System.Drawing.Point(286, 156) Me.ucrReceiverPrec.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPrec.Name = "ucrReceiverPrec" Me.ucrReceiverPrec.Selector = Nothing Me.ucrReceiverPrec.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverPrec.TabIndex = 9 + Me.ucrReceiverPrec.TabIndex = 8 ' 'ucrReceiverTmin ' Me.ucrReceiverTmin.frmParent = Me - Me.ucrReceiverTmin.Location = New System.Drawing.Point(288, 99) + Me.ucrReceiverTmin.Location = New System.Drawing.Point(286, 116) Me.ucrReceiverTmin.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverTmin.Name = "ucrReceiverTmin" Me.ucrReceiverTmin.Selector = Nothing @@ -358,7 +119,7 @@ Partial Class dlgClimdex 'ucrReceiverTmax ' Me.ucrReceiverTmax.frmParent = Me - Me.ucrReceiverTmax.Location = New System.Drawing.Point(288, 62) + Me.ucrReceiverTmax.Location = New System.Drawing.Point(286, 79) Me.ucrReceiverTmax.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverTmax.Name = "ucrReceiverTmax" Me.ucrReceiverTmax.Selector = Nothing @@ -369,7 +130,7 @@ Partial Class dlgClimdex ' Me.ucrSelectorClimdex.bShowHiddenColumns = False Me.ucrSelectorClimdex.bUseCurrentFilter = True - Me.ucrSelectorClimdex.Location = New System.Drawing.Point(10, 5) + Me.ucrSelectorClimdex.Location = New System.Drawing.Point(10, 3) Me.ucrSelectorClimdex.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorClimdex.Name = "ucrSelectorClimdex" Me.ucrSelectorClimdex.Size = New System.Drawing.Size(210, 180) @@ -377,31 +138,27 @@ Partial Class dlgClimdex ' 'ucrBaseClimdex ' - Me.ucrBaseClimdex.Location = New System.Drawing.Point(10, 346) + Me.ucrBaseClimdex.Location = New System.Drawing.Point(10, 222) Me.ucrBaseClimdex.Name = "ucrBaseClimdex" Me.ucrBaseClimdex.Size = New System.Drawing.Size(410, 52) - Me.ucrBaseClimdex.TabIndex = 0 + Me.ucrBaseClimdex.TabIndex = 11 + ' + 'ucrChkSave + ' + Me.ucrChkSave.Checked = False + Me.ucrChkSave.Location = New System.Drawing.Point(10, 196) + Me.ucrChkSave.Name = "ucrChkSave" + Me.ucrChkSave.Size = New System.Drawing.Size(107, 20) + Me.ucrChkSave.TabIndex = 9 ' 'dlgClimdex ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(424, 402) + Me.ClientSize = New System.Drawing.Size(424, 278) + Me.Controls.Add(Me.ucrChkSave) Me.Controls.Add(Me.lblDate) Me.Controls.Add(Me.ucrReceiverDate) - Me.Controls.Add(Me.ucrInputFreq) - Me.Controls.Add(Me.lblFreq) - Me.Controls.Add(Me.ucrMultipleInputTempQtiles) - Me.Controls.Add(Me.ucrMultipleInputPrecQtiles) - Me.Controls.Add(Me.lblPrecQuantiles) - Me.Controls.Add(Me.lblTempQuantiles) - Me.Controls.Add(Me.lblMinBaseData) - Me.Controls.Add(Me.nudMinBaseData) - Me.Controls.Add(Me.grpMaxMissingDays) - Me.Controls.Add(Me.grpBaseRange) - Me.Controls.Add(Me.chkNHemisphere) - Me.Controls.Add(Me.lblN) - Me.Controls.Add(Me.nudN) Me.Controls.Add(Me.cmdIndices) Me.Controls.Add(Me.lblPrec) Me.Controls.Add(Me.lblTmin) @@ -418,16 +175,6 @@ Partial Class dlgClimdex Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Climdex Indices" Me.Text = "Climdex Indices" - CType(Me.nudYearFrom, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.nudYearTo, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.nudN, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.nudMothlyMissingDays, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.nudAnnualMissingDays, System.ComponentModel.ISupportInitialize).EndInit() - Me.grpBaseRange.ResumeLayout(False) - Me.grpBaseRange.PerformLayout() - Me.grpMaxMissingDays.ResumeLayout(False) - Me.grpMaxMissingDays.PerformLayout() - CType(Me.nudMinBaseData, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -443,27 +190,7 @@ Partial Class dlgClimdex Friend WithEvents lblTmin As Label Friend WithEvents lblPrec As Label Friend WithEvents cmdIndices As Button - Friend WithEvents lblBaseRangeFrom As Label - Friend WithEvents nudYearFrom As NumericUpDown - Friend WithEvents nudYearTo As NumericUpDown - Friend WithEvents lblBaseRangeTo As Label - Friend WithEvents lblN As Label - Friend WithEvents nudN As NumericUpDown - Friend WithEvents chkNHemisphere As CheckBox - Friend WithEvents lblAnnual As Label - Friend WithEvents nudMothlyMissingDays As NumericUpDown - Friend WithEvents nudAnnualMissingDays As NumericUpDown - Friend WithEvents lblMonthly As Label - Friend WithEvents grpBaseRange As GroupBox - Friend WithEvents grpMaxMissingDays As GroupBox - Friend WithEvents lblMinBaseData As Label - Friend WithEvents nudMinBaseData As NumericUpDown - Friend WithEvents lblTempQuantiles As Label - Friend WithEvents lblPrecQuantiles As Label - Friend WithEvents ucrMultipleInputPrecQtiles As ucrMultipleInput - Friend WithEvents ucrMultipleInputTempQtiles As ucrMultipleInput - Friend WithEvents lblFreq As Label - Friend WithEvents ucrInputFreq As ucrInputComboBox Friend WithEvents lblDate As Label Friend WithEvents ucrReceiverDate As ucrReceiverSingle + Friend WithEvents ucrChkSave As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgClimdex.vb b/instat/dlgClimdex.vb index cebbaf22d36..14cfd7f506e 100644 --- a/instat/dlgClimdex.vb +++ b/instat/dlgClimdex.vb @@ -13,46 +13,39 @@ ' ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . +Imports instat Imports instat.Translations Public Class dlgClimdex - Public clsRClimdexInput, clsRMaxMisingDays, clsRTmax, clsRTmin, clsRPrec, clsRDate, clsRPCIct, clsRChar As New RFunction Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Public bSaveIndex As Boolean = True + Private bResetSubdialog As Boolean = False + Public clsDefaultFunction As New RFunction + Public clsRDataName, clsRTmax, clsRTmin, clsRPrec, clsRDate, clsRPCIct, clsRChar As New RFunction Private Sub dlgClimdex_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then InitialiseDialog() - SetDefaults() bFirstLoad = False - Else - ReopenDialog() End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + ReopenDialog() + TestOkEnabled() End Sub Private Sub SetDefaults() ucrSelectorClimdex.Reset() ucrSelectorClimdex.Focus() ucrReceiverDate.SetMeAsReceiver() - sdgClimdexIndices.SetDefaults() - chkNHemisphere.Checked = True - nudYearFrom.Value = 1961 - nudYearTo.Value = 1990 - nudN.Value = 5 - nudAnnualMissingDays.Value = 15 - nudMothlyMissingDays.Value = 3 - nudMinBaseData.Value = 0.1 - ucrInputFreq.cboInput.SelectedItem = "annual" - ucrMultipleInputPrecQtiles.txtNumericItems.Text = "0.95, 0.99" - ucrMultipleInputTempQtiles.txtNumericItems.Text = "0.1, 0.9" - TestOkEnabled() - End Sub + ucrChkSave.Checked = True - Private Sub InitialiseDialog() - ucrBaseClimdex.clsRsyntax.iCallType = 0 - ucrBaseClimdex.iHelpTopicID = 190 - clsRClimdexInput.SetRCommand("climdexInput.raw") - ucrBaseClimdex.clsRsyntax.SetBaseRFunction(clsRClimdexInput) - clsRMaxMisingDays.SetRCommand("c") + 'Define the default RFunction + clsDefaultFunction.SetRCommand("climdexInput.raw") clsRTmax.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") clsRTmin.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") clsRPrec.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") @@ -60,19 +53,64 @@ Public Class dlgClimdex clsRPCIct.SetRCommand("as.PCICt") clsRChar.SetRCommand("as.character") clsRPCIct.AddParameter("cal", Chr(34) & "gregorian" & Chr(34)) - ucrReceiverDate.SetDataType("Date") - ucrMultipleInputTempQtiles.bIsNumericInput = True - ucrMultipleInputPrecQtiles.bIsNumericInput = True + + clsRChar.AddParameter("x", clsRFunctionParameter:=clsRDate) + clsRPCIct.AddParameter("x", clsRFunctionParameter:=clsRChar) + clsDefaultFunction.SetAssignTo("climdex_input") + + ' Set default RFunction as the base function + ucrBaseClimdex.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) + 'add rfunction as parameters of the main function here + ucrBaseClimdex.clsRsyntax.AddParameter("tmax", clsRFunctionParameter:=clsRTmax) + ucrBaseClimdex.clsRsyntax.AddParameter("tmax.dates", clsRFunctionParameter:=clsRPCIct) + ucrBaseClimdex.clsRsyntax.AddParameter("tmin", clsRFunctionParameter:=clsRTmin) + ucrBaseClimdex.clsRsyntax.AddParameter("tmin.dates", clsRFunctionParameter:=clsRPCIct) + ucrBaseClimdex.clsRsyntax.AddParameter("prec", clsRFunctionParameter:=clsRPrec) + ucrBaseClimdex.clsRsyntax.AddParameter("prec.dates", clsRFunctionParameter:=clsRPCIct) + 'ucrBaseClimdex.clsRsyntax.AddParameter("temp.qtiles", "c(0.1,0.9)") + 'ucrBaseClimdex.clsRsyntax.AddParameter("prec.qtiles", "c(0.95, 0.99)") + bResetSubdialog = True + End Sub + + Private Sub InitialiseDialog() + ucrBaseClimdex.iHelpTopicID = 190 + ucrBaseClimdex.clsRsyntax.iCallType = 0 + + ucrSelectorClimdex.SetParameter(New RParameter("data_name", 0)) + ucrSelectorClimdex.SetParameterIsString() + ucrReceiverDate.Selector = ucrSelectorClimdex + ucrReceiverDate.SetClimaticType("date") + 'ucrReceiverDate.AddIncludedMetadataProperty("Climatic_Type", {"date"}) + ucrReceiverDate.bAutoFill = True + ucrReceiverDate.SetParameter(New RParameter("col_name")) + ucrReceiverDate.SetParameterIsString() + ucrReceiverTmax.Selector = ucrSelectorClimdex + ucrReceiverTmax.SetClimaticType("temp_max") + ucrReceiverTmax.bAutoFill = True + ucrReceiverTmax.SetParameter(New RParameter("col_name")) + ucrReceiverTmax.SetParameterIsString() + ucrReceiverTmin.Selector = ucrSelectorClimdex + ucrReceiverTmin.SetClimaticType("temp_min") + ucrReceiverTmin.bAutoFill = True + ucrReceiverTmin.SetParameter(New RParameter("col_name")) + ucrReceiverTmin.SetParameterIsString() + ucrReceiverPrec.Selector = ucrSelectorClimdex - ucrInputFreq.SetItems({"monthly", "annual"}) - AssignName() + ucrReceiverPrec.SetClimaticType("rain") + ucrReceiverPrec.bAutoFill = True + ucrReceiverPrec.SetParameter(New RParameter("col_name")) + ucrReceiverPrec.SetParameterIsString() + + ucrChkSave.SetText("Save indices") + ucrChkSave.bChangeParameterValue = False End Sub Private Sub TestOkEnabled() If Not ucrReceiverDate.IsEmpty AndAlso (Not ucrReceiverTmax.IsEmpty OrElse Not ucrReceiverTmin.IsEmpty OrElse Not ucrReceiverPrec.IsEmpty) Then + AddRemoveDates() ucrBaseClimdex.OKEnabled(True) Else ucrBaseClimdex.OKEnabled(False) @@ -80,151 +118,75 @@ Public Class dlgClimdex End Sub Private Sub ReopenDialog() - End Sub - Private Sub ucrBaseClimdex_ClickReset(sender As Object, e As EventArgs) Handles ucrBaseClimdex.ClickReset - SetDefaults() End Sub - Private Sub ucrSelectorClimdex_DataFrameChanged() Handles ucrSelectorClimdex.DataFrameChanged - clsRDate.AddParameter("data_name", Chr(34) & ucrSelectorClimdex.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) - AssignName() + Public Sub SetRCodeForControls(bReset As Boolean) + ucrSelectorClimdex.SetRCode(clsRDate, bReset) + ucrSelectorClimdex.SetRCode(clsRTmax, bReset) + ucrSelectorClimdex.SetRCode(clsRTmin, bReset) + ucrSelectorClimdex.SetRCode(clsRPrec, bReset) + ucrSelectorClimdex.SetRCode(sdgClimdexIndices.clsRWriteDf, bReset) + ucrReceiverDate.SetRCode(clsRDate, bReset) + ucrReceiverTmax.SetRCode(clsRTmax, bReset) + ucrReceiverTmin.SetRCode(clsRTmin, bReset) + ucrReceiverPrec.SetRCode(clsRPrec, bReset) End Sub - Private Sub ucrReceiverDate_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverDate.SelectionChanged - clsRDate.AddParameter("col_name", ucrReceiverDate.GetVariableNames()) - clsRChar.AddParameter("x", clsRFunctionParameter:=clsRDate) - clsRPCIct.AddParameter("x", clsRFunctionParameter:=clsRChar) + Private Sub ucrBaseClimdex_ClickReset(sender As Object, e As EventArgs) Handles ucrBaseClimdex.ClickReset + SetDefaults() + SetRCodeForControls(True) TestOkEnabled() End Sub - Private Sub ucrReceiverTmax_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverTmax.SelectionChanged - clsRTmax.AddParameter("data_name", Chr(34) & ucrSelectorClimdex.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) - + Private Sub AddRemoveDates() If Not ucrReceiverTmax.IsEmpty Then - clsRTmax.AddParameter("col_name", ucrReceiverTmax.GetVariableNames()) - clsRClimdexInput.AddParameter("tmax", clsRFunctionParameter:=clsRTmax) - clsRClimdexInput.AddParameter("tmax.dates", clsRFunctionParameter:=clsRPCIct) + ucrBaseClimdex.clsRsyntax.AddParameter("tmax", clsRFunctionParameter:=clsRTmax) + ucrBaseClimdex.clsRsyntax.AddParameter("tmax.dates", clsRFunctionParameter:=clsRPCIct) Else - clsRClimdexInput.RemoveParameterByName("tmax") - clsRClimdexInput.RemoveParameterByName("tmax.dates") + ucrBaseClimdex.clsRsyntax.RemoveParameter("tmax.dates") + ucrBaseClimdex.clsRsyntax.RemoveParameter("tmax") End If - TestOkEnabled() - End Sub - - Private Sub ucrReceiverTmin_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverTmin.SelectionChanged - clsRTmin.AddParameter("data_name", Chr(34) & ucrSelectorClimdex.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) If Not ucrReceiverTmin.IsEmpty Then - clsRTmin.AddParameter("col_name", ucrReceiverTmin.GetVariableNames()) - clsRClimdexInput.AddParameter("tmin", clsRFunctionParameter:=clsRTmin) - clsRClimdexInput.AddParameter("tmin.dates", clsRFunctionParameter:=clsRPCIct) + ucrBaseClimdex.clsRsyntax.AddParameter("tmin", clsRFunctionParameter:=clsRTmin) + ucrBaseClimdex.clsRsyntax.AddParameter("tmin.dates", clsRFunctionParameter:=clsRPCIct) Else - clsRClimdexInput.RemoveParameterByName("tmin") - clsRClimdexInput.RemoveParameterByName("tmin.dates") + ucrBaseClimdex.clsRsyntax.RemoveParameter("tmin") + ucrBaseClimdex.clsRsyntax.RemoveParameter("tmin.dates") End If - TestOkEnabled() - End Sub - - Private Sub ucrReceiverPrec_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverPrec.SelectionChanged - clsRPrec.AddParameter("data_name", Chr(34) & ucrSelectorClimdex.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34)) If Not ucrReceiverPrec.IsEmpty Then - clsRPrec.AddParameter("col_name", ucrReceiverPrec.GetVariableNames()) - clsRClimdexInput.AddParameter("prec", clsRFunctionParameter:=clsRPrec) - clsRClimdexInput.AddParameter("prec.dates", clsRFunctionParameter:=clsRPCIct) + ucrBaseClimdex.clsRsyntax.AddParameter("prec", clsRFunctionParameter:=clsRPrec) + ucrBaseClimdex.clsRsyntax.AddParameter("prec.dates", clsRFunctionParameter:=clsRPCIct) Else - clsRClimdexInput.RemoveParameterByName("prec") - clsRClimdexInput.RemoveParameterByName("prec.dates") + ucrBaseClimdex.clsRsyntax.RemoveParameter("prec") + ucrBaseClimdex.clsRsyntax.RemoveParameter("prec.dates") End If - TestOkEnabled() End Sub Private Sub cmdIndices_Click(sender As Object, e As EventArgs) Handles cmdIndices.Click + sdgClimdexIndices.SetRFunction(ucrBaseClimdex.clsRsyntax.clsBaseFunction, bResetSubdialog) + bResetSubdialog = False sdgClimdexIndices.ShowDialog() End Sub Private Sub ucrBaseClimdex_clickok(sender As Object, e As EventArgs) Handles ucrBaseClimdex.ClickOk - sdgClimdexIndices.IndicesOptions() - End Sub - - Private Sub nudYearFromTo_ValueChanged(sender As Object, e As EventArgs) Handles nudYearFrom.ValueChanged, nudYearTo.ValueChanged - clsRClimdexInput.AddParameter("base.range", "c(" & nudYearFrom.Value & "," & nudYearTo.Value & ")") - If nudYearFrom.Value = 1961 AndAlso nudYearTo.Value = 1990 Then - clsRClimdexInput.RemoveParameterByName("base.range") - End If - End Sub - - Private Sub nudN_ValueChanged(sender As Object, e As EventArgs) Handles nudN.ValueChanged - clsRClimdexInput.AddParameter("n", nudN.Value) - If nudN.Value = 5 Then - clsRClimdexInput.RemoveParameterByName("n") - End If - End Sub - - Private Sub chkNHemisphere_CheckedChanged(sender As Object, e As EventArgs) Handles chkNHemisphere.CheckedChanged - If chkNHemisphere.Checked Then - clsRClimdexInput.RemoveParameterByName("northern.hemisphere") - Else - clsRClimdexInput.AddParameter("northern.hemisphere", "FALSE") - End If - End Sub - - Private Sub nudAnnualMaxMissingDays_ValueChanged(sender As Object, e As EventArgs) Handles nudAnnualMissingDays.ValueChanged - clsRMaxMisingDays.AddParameter("annual", nudAnnualMissingDays.Value) - If nudAnnualMissingDays.Value = 15 AndAlso nudMothlyMissingDays.Value = 3 Then - clsRClimdexInput.RemoveParameterByName("max.missing.days") - Else - clsRClimdexInput.AddParameter("max.missing.days", clsRFunctionParameter:=clsRMaxMisingDays) - End If - End Sub - - Private Sub nudMonthlyMaxMissingDays_ValueChanged(sender As Object, e As EventArgs) Handles nudMothlyMissingDays.ValueChanged - clsRMaxMisingDays.AddParameter("monthly", nudMothlyMissingDays.Value) - If nudAnnualMissingDays.Value = 15 AndAlso nudMothlyMissingDays.Value = 3 Then - clsRClimdexInput.RemoveParameterByName("max.missing.days") - Else - clsRClimdexInput.AddParameter("max.missing.days", clsRFunctionParameter:=clsRMaxMisingDays) - End If + sdgClimdexIndices.IndicesOptions(bSaveIndex) End Sub - Private Sub ucrInputFreq_Load(sender As Object, e As EventArgs) - - End Sub - - Private Sub nudMinBaseData_ValueChanged(sender As Object, e As EventArgs) Handles nudMinBaseData.ValueChanged - clsRClimdexInput.AddParameter("min.base.data.fraction.present ", nudMinBaseData.Value) - If nudMinBaseData.Value = 0.1 Then - clsRClimdexInput.RemoveParameterByName("min.base.data.fraction.present ") - End If + Private Sub AssignName() + ucrBaseClimdex.clsRsyntax.SetAssignTo("climdex_input") End Sub - Private Sub ucrMultipleInputPrecQtiles_Leave(sender As Object, e As EventArgs) Handles ucrMultipleInputPrecQtiles.Leave - If ucrMultipleInputPrecQtiles.txtNumericItems.Text <> "0.95, 0.99" Then - clsRClimdexInput.AddParameter("prec.qtiles", ucrMultipleInputPrecQtiles.clsNumericList.ToScript) - Else - clsRClimdexInput.RemoveParameterByName("prec.qtiles") - End If + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorClimdex.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverPrec.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged + TestOkEnabled() + sdgClimdexIndices.IndicesType() 'is this the right implementation? End Sub - Private Sub ucrMultipleInputTempQtiles_Leave(sender As Object, e As EventArgs) Handles ucrMultipleInputTempQtiles.Leave - If ucrMultipleInputTempQtiles.txtNumericItems.Text <> "0.1, 0.9" Then - clsRClimdexInput.AddParameter("temp.qtiles", ucrMultipleInputTempQtiles.clsNumericList.ToScript) + Private Sub ucrChkSave_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkSave.ControlContentsChanged + If ucrChkSave.Checked Then + bSaveIndex = True Else - clsRClimdexInput.RemoveParameterByName("temp.qtiles") + bSaveIndex = False End If End Sub - - Private Sub ucrInputFreq_Leave(sender As Object, e As EventArgs) Handles ucrInputFreq.Leave - Select Case ucrInputFreq.GetText - Case "annual" - sdgClimdexIndices.clsRTwoArg1.AddParameter("freq", Chr(34) & "annual" & Chr(34)) - sdgClimdexIndices.clsRThreeArg.AddParameter("freq", Chr(34) & "annual" & Chr(34)) - Case "monthly" - sdgClimdexIndices.clsRTwoArg1.AddParameter("freq", Chr(34) & "monthly" & Chr(34)) - sdgClimdexIndices.clsRThreeArg.AddParameter("freq", Chr(34) & "monthly" & Chr(34)) - End Select - End Sub - - Private Sub AssignName() - ucrBaseClimdex.clsRsyntax.SetAssignTo("climdex_input") - End Sub End Class \ No newline at end of file diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 4a7ce96d27c..56d5261431a 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -18,17 +18,16 @@ Imports instat.Translations Public Class dlgColumnStats Public bFirstLoad As Boolean = True Private bReset As Boolean = True - + Private clsSummariesList As New RFunction + Private bResetSubdialog As Boolean = False Private Sub dlgColumnStats_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) @@ -51,15 +50,20 @@ Public Class dlgColumnStats Private Sub SetDefaults() Dim clsDefaultFunction As New RFunction + clsSummariesList = New RFunction + + clsSummariesList.SetRCommand("c") + clsSummariesList.AddParameter("summary_count_non_missing", Chr(34) & "summary_count_non_missing" & Chr(34), bIncludeArgumentName:=False) + clsSummariesList.AddParameter("summary_count", Chr(34) & "summary_count" & Chr(34), bIncludeArgumentName:=False) + clsSummariesList.AddParameter("summary_sum", Chr(34) & "summary_sum" & Chr(34), bIncludeArgumentName:=False) + ucrSelectorForColumnStatistics.Reset() ucrReceiverSelectedVariables.SetMeAsReceiver() clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$calculate_summary") - clsDefaultFunction.AddParameter("summaries", "c(" & Chr(34) & "summary_count" & Chr(34) & "," & Chr(34) & "summary_count_non_missing" & Chr(34) & "," & Chr(34) & "summary_sum" & Chr(34) & ")") + clsDefaultFunction.AddParameter("summaries", clsRFunctionParameter:=clsSummariesList) ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) - - 'TODO get the subdilog stuff working - ' TestOKEnabled() + bResetSubdialog = True End Sub Private Sub InitialiseDialog() @@ -85,7 +89,6 @@ Public Class dlgColumnStats ucrChkStoreResults.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkStoreResults.SetRDefault("TRUE") - ucrChkPrintOutput.SetText("Print Results to Output Window") ucrChkPrintOutput.SetParameter(New RParameter("return_output", 4)) ucrChkPrintOutput.SetValuesCheckedAndUnchecked("TRUE", "FALSE") @@ -96,17 +99,10 @@ Public Class dlgColumnStats ucrChkdropUnusedLevels.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkdropUnusedLevels.SetRDefault("FALSE") - ucrChkOmitMissing.SetText("Omit Missing Values") ucrChkOmitMissing.SetParameter(New RParameter("na.rm", 6)) ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitMissing.SetRDefault("FALSE") - - 'disbling the cmdSummaries for the moment - cmdSummaries.Enabled = False - 'i leave the subdialog stuff for now - 'sdgSummaries.SetMyRFunction(clsDefaultFunction) - 'ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction) End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -115,9 +111,10 @@ Public Class dlgColumnStats TestOKEnabled() End Sub Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click - 'sdgSummaries.ShowDialog() - 'sdgSummaries.TestSummaries() - 'TestOKEnabled() + sdgSummaries.SetRFunction(clsSummariesList, bResetSubdialog) + bResetSubdialog = False + sdgSummaries.ShowDialog() + TestOKEnabled() End Sub Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSelectedVariables.ControlContentsChanged TestOKEnabled() diff --git a/instat/dlgCumulativeDistribution.Designer.vb b/instat/dlgCumulativeDistribution.Designer.vb index 49590c4437a..ba52f0dbe4c 100644 --- a/instat/dlgCumulativeDistribution.Designer.vb +++ b/instat/dlgCumulativeDistribution.Designer.vb @@ -102,6 +102,7 @@ Partial Class dlgCumulativeDistribution ' 'ucrFactorReceiver ' + Me.ucrFactorReceiver.frmParent = Me Me.ucrFactorReceiver.Location = New System.Drawing.Point(255, 188) Me.ucrFactorReceiver.Margin = New System.Windows.Forms.Padding(0) Me.ucrFactorReceiver.Name = "ucrFactorReceiver" @@ -163,7 +164,7 @@ Partial Class dlgCumulativeDistribution Me.Name = "dlgCumulativeDistribution" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Cumulative_Distribution" - Me.Text = "Cumulative Distribution" + Me.Text = "Cumulative/Exceedance Graphs" Me.ResumeLayout(False) Me.PerformLayout() diff --git a/instat/dlgCumulativeDistribution.vb b/instat/dlgCumulativeDistribution.vb index 507e76d4c94..43a13411200 100644 --- a/instat/dlgCumulativeDistribution.vb +++ b/instat/dlgCumulativeDistribution.vb @@ -64,7 +64,7 @@ Public Class dlgCumulativeDistribution ucrCumDistSelector.Focus() ucrVariablesAsFactorforCumDist.ResetControl() chkCountsOnYAxis.Checked = False - chkExceedancePlots.Checked = False + chkExceedancePlots.Checked = True chkIncludePoints.Checked = False ucrSaveCumDist.Reset() sdgPlots.Reset() diff --git a/instat/dlgExportToOpenRefine.Designer.vb b/instat/dlgExportToOpenRefine.Designer.vb index 152cca9efc0..e766012002a 100644 --- a/instat/dlgExportToOpenRefine.Designer.vb +++ b/instat/dlgExportToOpenRefine.Designer.vb @@ -23,7 +23,7 @@ Partial Class dlgExportToOpenRefine Private Sub InitializeComponent() Me.lblNameDataSet = New System.Windows.Forms.Label() - Me.chkRefineBrowser = New System.Windows.Forms.CheckBox() + Me.ucrchkOpenBrowser = New instat.ucrCheck() Me.ucrBase = New instat.ucrButtons() Me.ucrInputDatasetName = New instat.ucrInputTextBox() Me.ucrOpenRefineDataFrame = New instat.ucrDataFrame() @@ -36,33 +36,32 @@ Partial Class dlgExportToOpenRefine Me.lblNameDataSet.Location = New System.Drawing.Point(218, 14) Me.lblNameDataSet.Name = "lblNameDataSet" Me.lblNameDataSet.Size = New System.Drawing.Size(78, 13) - Me.lblNameDataSet.TabIndex = 8 + Me.lblNameDataSet.TabIndex = 1 Me.lblNameDataSet.Text = "Dataset Name:" ' - 'chkRefineBrowser + 'ucrchkOpenBrowser ' - Me.chkRefineBrowser.AutoSize = True - Me.chkRefineBrowser.Location = New System.Drawing.Point(10, 76) - Me.chkRefineBrowser.Name = "chkRefineBrowser" - Me.chkRefineBrowser.Size = New System.Drawing.Size(93, 17) - Me.chkRefineBrowser.TabIndex = 9 - Me.chkRefineBrowser.Text = "Open Browser" - Me.chkRefineBrowser.UseVisualStyleBackColor = True + Me.ucrchkOpenBrowser.Checked = False + Me.ucrchkOpenBrowser.Location = New System.Drawing.Point(10, 73) + Me.ucrchkOpenBrowser.Name = "ucrchkOpenBrowser" + Me.ucrchkOpenBrowser.Size = New System.Drawing.Size(100, 20) + Me.ucrchkOpenBrowser.TabIndex = 3 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 99) + Me.ucrBase.Location = New System.Drawing.Point(10, 111) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(407, 52) - Me.ucrBase.TabIndex = 7 + Me.ucrBase.TabIndex = 4 ' 'ucrInputDatasetName ' + Me.ucrInputDatasetName.IsMultiline = False Me.ucrInputDatasetName.IsReadOnly = False Me.ucrInputDatasetName.Location = New System.Drawing.Point(217, 29) Me.ucrInputDatasetName.Name = "ucrInputDatasetName" Me.ucrInputDatasetName.Size = New System.Drawing.Size(149, 21) - Me.ucrInputDatasetName.TabIndex = 5 + Me.ucrInputDatasetName.TabIndex = 2 ' 'ucrOpenRefineDataFrame ' @@ -76,18 +75,18 @@ Partial Class dlgExportToOpenRefine 'UcrDialogDisabled1 ' Me.UcrDialogDisabled1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.UcrDialogDisabled1.Location = New System.Drawing.Point(91, 46) + Me.UcrDialogDisabled1.Location = New System.Drawing.Point(92, 55) Me.UcrDialogDisabled1.Name = "UcrDialogDisabled1" Me.UcrDialogDisabled1.Size = New System.Drawing.Size(240, 50) - Me.UcrDialogDisabled1.TabIndex = 10 + Me.UcrDialogDisabled1.TabIndex = 5 ' 'dlgExportToOpenRefine ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(425, 162) + Me.ClientSize = New System.Drawing.Size(422, 173) Me.Controls.Add(Me.UcrDialogDisabled1) - Me.Controls.Add(Me.chkRefineBrowser) + Me.Controls.Add(Me.ucrchkOpenBrowser) Me.Controls.Add(Me.lblNameDataSet) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.ucrInputDatasetName) @@ -107,6 +106,6 @@ Partial Class dlgExportToOpenRefine Friend WithEvents ucrInputDatasetName As ucrInputTextBox Friend WithEvents ucrBase As ucrButtons Friend WithEvents lblNameDataSet As Label - Friend WithEvents chkRefineBrowser As CheckBox + Friend WithEvents ucrchkOpenBrowser As ucrCheck Friend WithEvents UcrDialogDisabled1 As ucrDialogDisabled End Class diff --git a/instat/dlgExportToOpenRefine.vb b/instat/dlgExportToOpenRefine.vb index 52cca173280..4720572dedf 100644 --- a/instat/dlgExportToOpenRefine.vb +++ b/instat/dlgExportToOpenRefine.vb @@ -8,73 +8,100 @@ '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 k +'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 dlgExportToOpenRefine - Public bFirstLoad As Boolean = True - Public clsWriteToCSV As New RFunction - Private Sub dlgExportToOpenRefine_Load(sender As Object, e As EventArgs) Handles MyBase.Load - autoTranslate(Me) - If bFirstLoad Then - InitialiseDialog() - SetDefaults() - bFirstLoad = False - Else - - End If - TestOKEnabled() - End Sub - - Private Sub SetDefaults() - chkRefineBrowser.Checked = False + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private clsWriteToCSV As New RFunction + Private Sub dlgExportToOpenRefine_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + If bFirstLoad Then + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + End Sub + + Private Sub SetDefaults() + Dim clsDefaultRefine, clsDefaultWrite As New RFunction + ucrOpenRefineDataFrame.Reset() ucrInputDatasetName.Reset() - ucrBase.OKEnabled(False) - TestOKEnabled() - End Sub + + NewDefaultName() + clsDefaultWrite.SetRCommand("write.csv") + clsDefaultWrite.AddParameter("x", ucrOpenRefineDataFrame.cboAvailableDataFrames.SelectedItem) + clsDefaultWrite.AddParameter("row.names", "FALSE") + clsDefaultWrite.AddParameter("file", Chr(34) & ucrInputDatasetName.GetText() & ".csv" & Chr(34)) + + clsWriteToCSV = clsDefaultWrite.Clone + + clsDefaultRefine.SetRCommand("rrefine::refine_upload") + clsDefaultRefine.AddParameter("file", Chr(34) & ucrInputDatasetName.GetText() & ".csv" & Chr(34)) + clsDefaultRefine.AddParameter("project.name", Chr(34) & ucrInputDatasetName.GetText() & Chr(34)) + clsDefaultRefine.AddParameter("open.browser", "FALSE") + + ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRefine.Clone()) + + ' ucrBase.OKEnabled(False) + End Sub + + Public Sub SetRCodeForControls(bReset As Boolean) + SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + End Sub + + Private Sub NewDefaultName() + If (ucrOpenRefineDataFrame.cboAvailableDataFrames.Text <> "") AndAlso (Not ucrInputDatasetName.bUserTyped) Then + ucrInputDatasetName.SetName(ucrOpenRefineDataFrame.cboAvailableDataFrames.SelectedItem & "_clean_up") + End If + End Sub Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 466 - clsWriteToCSV.SetRCommand("write.csv") - ucrBase.clsRsyntax.SetFunction("rrefine::refine_upload") - clsWriteToCSV.AddParameter("row.names", "FALSE") + + ucrInputDatasetName.SetParameter(New RParameter("project.name", 1)) + ucrInputDatasetName.SetValidationTypeAsRVariable() + + ucrchkOpenBrowser.SetParameter(New RParameter("open.browser", 2)) + ucrchkOpenBrowser.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrchkOpenBrowser.SetRDefault("FALSE") + ucrchkOpenBrowser.SetText("Open Browser") + End Sub + Private Sub TestOKEnabled() - ' If ucrInputDatasetName.IsEmpty = True Then - ' ucrBase.OKEnabled(False) + ' If Not ucrInputDatasetName.IsEmpty Then + ' ucrBase.OKEnabled(True) ' Else - ' ucrBase.OKEnabled(True) + ' ucrBase.OKEnabled(False) ' End If End Sub - Private Sub ucrInputDatasetName_NameChanged() Handles ucrInputDatasetName.NameChanged - ucrBase.clsRsyntax.AddParameter("project.name", Chr(34) & ucrInputDatasetName.GetText() & Chr(34)) - clsWriteToCSV.AddParameter("file", Chr(34) & ucrInputDatasetName.GetText & ".csv" & Chr(34)) - ucrBase.clsRsyntax.AddParameter("file", Chr(34) & ucrInputDatasetName.GetText() & ".csv" & Chr(34)) + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) TestOKEnabled() - End Sub - - Private Sub ucrOpenRefineDataFrame_DataFrameChanged() Handles ucrOpenRefineDataFrame.DataFrameChanged - clsWriteToCSV.AddParameter("x", ucrOpenRefineDataFrame.cboAvailableDataFrames.SelectedItem) - ucrInputDatasetName.SetName(ucrOpenRefineDataFrame.cboAvailableDataFrames.SelectedItem & "_clean_up") End Sub - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaults() - End Sub + Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) Handles ucrBase.BeforeClickOk + frmMain.clsRLink.RunScript(clsWriteToCSV.ToScript(), strComment:="Convert the data set to csv") + End Sub - Private Sub chkOpenRefineBrowser_CheckedChanged(sender As Object, e As EventArgs) Handles chkRefineBrowser.CheckedChanged - If chkRefineBrowser.Checked Then - ucrBase.clsRsyntax.AddParameter("open.browser", "TRUE") - Else - ucrBase.clsRsyntax.AddParameter("open.browser", "FALSE") - End If + Private Sub ucrOpenRefineDataFrame_ControlValueChaed(ucrChangedControl As ucrCore) Handles ucrOpenRefineDataFrame.ControlValueChanged + NewDefaultName() End Sub - Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) Handles ucrBase.BeforeClickOk - frmMain.clsRLink.RunScript(clsWriteToCSV.ToScript(), strComment:="Convert the data set to csv") + Private Sub ucrOpenRefineDataFrame_ContentsChanged() Handles ucrOpenRefineDataFrame.ControlContentsChanged, ucrInputDatasetName.ControlContentsChanged + TestOKEnabled() End Sub -End Class + +End Class \ No newline at end of file diff --git a/instat/dlgExtremes.Designer.vb b/instat/dlgExtremes.Designer.vb index f28e9154540..c6fc3fbb90a 100644 --- a/instat/dlgExtremes.Designer.vb +++ b/instat/dlgExtremes.Designer.vb @@ -1,60 +1,83 @@  -Partial Class dlgExtremes - Inherits System.Windows.Forms.Form - - 'Form overrides dispose to clean up the component list. +Partial Class dlgExtremes + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. - Private Sub InitializeComponent() + Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtons() + Me.ucrAddRemove = New instat.ucrSelectorAddRemove() + Me.ucrReceiverDataToFit = New instat.ucrReceiverSingle() Me.lblDataToFit = New System.Windows.Forms.Label() Me.grpDistributions = New System.Windows.Forms.GroupBox() Me.rdoGEV = New System.Windows.Forms.RadioButton() Me.rdoGumbel = New System.Windows.Forms.RadioButton() Me.grpEstimationMethods = New System.Windows.Forms.GroupBox() - Me.ucrInputMLE = New instat.ucrInputComboBox() - Me.lblSaveInMOM = New System.Windows.Forms.Label() - Me.ucrInputMOM = New instat.ucrInputComboBox() - Me.ucrChkMOM = New instat.ucrCheck() - Me.ucrChkMLE = New instat.ucrCheck() - Me.lblSaveInMLE = New System.Windows.Forms.Label() + Me.cboMethodOfMoments = New System.Windows.Forms.ComboBox() + Me.cboMaximumLikelihood = New System.Windows.Forms.ComboBox() + Me.lblSaveEstimates = New System.Windows.Forms.Label() + Me.chkMethodOfMoments = New System.Windows.Forms.CheckBox() + Me.chkMaximumLikelihood = New System.Windows.Forms.CheckBox() + Me.chkRestrictValues = New System.Windows.Forms.CheckBox() Me.lblBetween = New System.Windows.Forms.Label() + Me.txtBetween = New System.Windows.Forms.TextBox() Me.lblAnd = New System.Windows.Forms.Label() - Me.ucrInputTo = New instat.ucrInputTextBox() - Me.ucrInputFrom = New instat.ucrInputTextBox() + Me.txtAnd = New System.Windows.Forms.TextBox() + Me.chkProbabilityPlot = New System.Windows.Forms.CheckBox() Me.UcrDialogDisabled1 = New instat.ucrDialogDisabled() - Me.ucrChkProbPlot = New instat.ucrCheck() - Me.ucrChkRestrictDataValues = New instat.ucrCheck() - Me.ucrReceiverDataToFit = New instat.ucrReceiverSingle() - Me.ucrAddRemove = New instat.ucrSelectorAddRemove() - Me.ucrBase = New instat.ucrButtons() - Me.ucrPnlDistributions = New instat.UcrPanel() Me.grpDistributions.SuspendLayout() Me.grpEstimationMethods.SuspendLayout() Me.SuspendLayout() ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(9, 290) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(405, 51) + Me.ucrBase.TabIndex = 0 + ' + 'ucrAddRemove + ' + Me.ucrAddRemove.bShowHiddenColumns = False + Me.ucrAddRemove.Location = New System.Drawing.Point(9, 24) + Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) + Me.ucrAddRemove.Name = "ucrAddRemove" + Me.ucrAddRemove.Size = New System.Drawing.Size(206, 127) + Me.ucrAddRemove.TabIndex = 1 + ' + 'ucrReceiverDataToFit + ' + Me.ucrReceiverDataToFit.Location = New System.Drawing.Point(224, 39) + Me.ucrReceiverDataToFit.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDataToFit.Name = "ucrReceiverDataToFit" + Me.ucrReceiverDataToFit.Selector = Nothing + Me.ucrReceiverDataToFit.Size = New System.Drawing.Size(106, 26) + Me.ucrReceiverDataToFit.TabIndex = 2 + ' 'lblDataToFit ' Me.lblDataToFit.AutoSize = True Me.lblDataToFit.Location = New System.Drawing.Point(224, 24) Me.lblDataToFit.Name = "lblDataToFit" Me.lblDataToFit.Size = New System.Drawing.Size(89, 13) - Me.lblDataToFit.TabIndex = 1 + Me.lblDataToFit.TabIndex = 3 Me.lblDataToFit.Tag = "Data_to_be_fitted" Me.lblDataToFit.Text = "Data to be Fitted:" ' @@ -62,10 +85,10 @@ Partial Class dlgExtremes ' Me.grpDistributions.Controls.Add(Me.rdoGEV) Me.grpDistributions.Controls.Add(Me.rdoGumbel) - Me.grpDistributions.Location = New System.Drawing.Point(308, 192) + Me.grpDistributions.Location = New System.Drawing.Point(267, 194) Me.grpDistributions.Name = "grpDistributions" Me.grpDistributions.Size = New System.Drawing.Size(100, 91) - Me.grpDistributions.TabIndex = 10 + Me.grpDistributions.TabIndex = 4 Me.grpDistributions.TabStop = False Me.grpDistributions.Tag = "Distributions" Me.grpDistributions.Text = "Distributions" @@ -73,7 +96,7 @@ Partial Class dlgExtremes 'rdoGEV ' Me.rdoGEV.AutoSize = True - Me.rdoGEV.Location = New System.Drawing.Point(12, 47) + Me.rdoGEV.Location = New System.Drawing.Point(6, 48) Me.rdoGEV.Name = "rdoGEV" Me.rdoGEV.Size = New System.Drawing.Size(47, 17) Me.rdoGEV.TabIndex = 1 @@ -85,7 +108,7 @@ Partial Class dlgExtremes 'rdoGumbel ' Me.rdoGumbel.AutoSize = True - Me.rdoGumbel.Location = New System.Drawing.Point(11, 24) + Me.rdoGumbel.Location = New System.Drawing.Point(6, 25) Me.rdoGumbel.Name = "rdoGumbel" Me.rdoGumbel.Size = New System.Drawing.Size(61, 17) Me.rdoGumbel.TabIndex = 0 @@ -96,187 +119,150 @@ Partial Class dlgExtremes ' 'grpEstimationMethods ' - Me.grpEstimationMethods.Controls.Add(Me.ucrInputMLE) - Me.grpEstimationMethods.Controls.Add(Me.lblSaveInMOM) - Me.grpEstimationMethods.Controls.Add(Me.ucrInputMOM) - Me.grpEstimationMethods.Controls.Add(Me.ucrChkMOM) - Me.grpEstimationMethods.Controls.Add(Me.ucrChkMLE) - Me.grpEstimationMethods.Controls.Add(Me.lblSaveInMLE) + Me.grpEstimationMethods.Controls.Add(Me.cboMethodOfMoments) + Me.grpEstimationMethods.Controls.Add(Me.cboMaximumLikelihood) + Me.grpEstimationMethods.Controls.Add(Me.lblSaveEstimates) + Me.grpEstimationMethods.Controls.Add(Me.chkMethodOfMoments) + Me.grpEstimationMethods.Controls.Add(Me.chkMaximumLikelihood) Me.grpEstimationMethods.Location = New System.Drawing.Point(9, 193) Me.grpEstimationMethods.Name = "grpEstimationMethods" - Me.grpEstimationMethods.Size = New System.Drawing.Size(290, 91) - Me.grpEstimationMethods.TabIndex = 9 + Me.grpEstimationMethods.Size = New System.Drawing.Size(241, 91) + Me.grpEstimationMethods.TabIndex = 6 Me.grpEstimationMethods.TabStop = False - Me.grpEstimationMethods.Tag = "Estimation_Methods" + Me.grpEstimationMethods.Tag = "Estimation_methods" Me.grpEstimationMethods.Text = "Estimation methods" ' - 'ucrInputMLE - ' - Me.ucrInputMLE.IsReadOnly = False - Me.ucrInputMLE.Location = New System.Drawing.Point(184, 22) - Me.ucrInputMLE.Name = "ucrInputMLE" - Me.ucrInputMLE.Size = New System.Drawing.Size(100, 21) - Me.ucrInputMLE.TabIndex = 2 - ' - 'lblSaveInMOM - ' - Me.lblSaveInMOM.AutoSize = True - Me.lblSaveInMOM.Location = New System.Drawing.Point(132, 62) - Me.lblSaveInMOM.Name = "lblSaveInMOM" - Me.lblSaveInMOM.Size = New System.Drawing.Size(46, 13) - Me.lblSaveInMOM.TabIndex = 4 - Me.lblSaveInMOM.Tag = "" - Me.lblSaveInMOM.Text = "Save in:" - ' - 'ucrInputMOM - ' - Me.ucrInputMOM.IsReadOnly = False - Me.ucrInputMOM.Location = New System.Drawing.Point(184, 58) - Me.ucrInputMOM.Name = "ucrInputMOM" - Me.ucrInputMOM.Size = New System.Drawing.Size(100, 21) - Me.ucrInputMOM.TabIndex = 5 - ' - 'ucrChkMOM - ' - Me.ucrChkMOM.Checked = False - Me.ucrChkMOM.Location = New System.Drawing.Point(6, 59) - Me.ucrChkMOM.Name = "ucrChkMOM" - Me.ucrChkMOM.Size = New System.Drawing.Size(121, 20) - Me.ucrChkMOM.TabIndex = 3 - ' - 'ucrChkMLE - ' - Me.ucrChkMLE.Checked = False - Me.ucrChkMLE.Location = New System.Drawing.Point(6, 23) - Me.ucrChkMLE.Name = "ucrChkMLE" - Me.ucrChkMLE.Size = New System.Drawing.Size(121, 20) - Me.ucrChkMLE.TabIndex = 0 - ' - 'lblSaveInMLE - ' - Me.lblSaveInMLE.AutoSize = True - Me.lblSaveInMLE.Location = New System.Drawing.Point(132, 25) - Me.lblSaveInMLE.Name = "lblSaveInMLE" - Me.lblSaveInMLE.Size = New System.Drawing.Size(46, 13) - Me.lblSaveInMLE.TabIndex = 1 - Me.lblSaveInMLE.Tag = "" - Me.lblSaveInMLE.Text = "Save in:" + 'cboMethodOfMoments + ' + Me.cboMethodOfMoments.FormattingEnabled = True + Me.cboMethodOfMoments.Location = New System.Drawing.Point(147, 59) + Me.cboMethodOfMoments.Name = "cboMethodOfMoments" + Me.cboMethodOfMoments.Size = New System.Drawing.Size(84, 21) + Me.cboMethodOfMoments.TabIndex = 4 + ' + 'cboMaximumLikelihood + ' + Me.cboMaximumLikelihood.FormattingEnabled = True + Me.cboMaximumLikelihood.Location = New System.Drawing.Point(147, 32) + Me.cboMaximumLikelihood.Name = "cboMaximumLikelihood" + Me.cboMaximumLikelihood.Size = New System.Drawing.Size(84, 21) + Me.cboMaximumLikelihood.TabIndex = 3 + ' + 'lblSaveEstimates + ' + Me.lblSaveEstimates.AutoSize = True + Me.lblSaveEstimates.Location = New System.Drawing.Point(143, 16) + Me.lblSaveEstimates.Name = "lblSaveEstimates" + Me.lblSaveEstimates.Size = New System.Drawing.Size(94, 13) + Me.lblSaveEstimates.TabIndex = 2 + Me.lblSaveEstimates.Tag = "Save_estimates_in" + Me.lblSaveEstimates.Text = "Save Estimates in:" + ' + 'chkMethodOfMoments + ' + Me.chkMethodOfMoments.AutoSize = True + Me.chkMethodOfMoments.Location = New System.Drawing.Point(6, 62) + Me.chkMethodOfMoments.Name = "chkMethodOfMoments" + Me.chkMethodOfMoments.Size = New System.Drawing.Size(120, 17) + Me.chkMethodOfMoments.TabIndex = 1 + Me.chkMethodOfMoments.Tag = "Method_of_moments" + Me.chkMethodOfMoments.Text = "Method of Moments" + Me.chkMethodOfMoments.UseVisualStyleBackColor = True + ' + 'chkMaximumLikelihood + ' + Me.chkMaximumLikelihood.AutoSize = True + Me.chkMaximumLikelihood.Location = New System.Drawing.Point(6, 34) + Me.chkMaximumLikelihood.Name = "chkMaximumLikelihood" + Me.chkMaximumLikelihood.Size = New System.Drawing.Size(121, 17) + Me.chkMaximumLikelihood.TabIndex = 0 + Me.chkMaximumLikelihood.Tag = "Maximum_likelihood_" + Me.chkMaximumLikelihood.Text = "Maximum Likelihood" + Me.chkMaximumLikelihood.UseVisualStyleBackColor = True + ' + 'chkRestrictValues + ' + Me.chkRestrictValues.AutoSize = True + Me.chkRestrictValues.Location = New System.Drawing.Point(224, 77) + Me.chkRestrictValues.Name = "chkRestrictValues" + Me.chkRestrictValues.Size = New System.Drawing.Size(123, 17) + Me.chkRestrictValues.TabIndex = 7 + Me.chkRestrictValues.Tag = "Restrict_data_values" + Me.chkRestrictValues.Text = "Restrict Data Values" + Me.chkRestrictValues.UseVisualStyleBackColor = True ' 'lblBetween ' Me.lblBetween.AutoSize = True - Me.lblBetween.Location = New System.Drawing.Point(269, 101) + Me.lblBetween.Location = New System.Drawing.Point(232, 101) Me.lblBetween.Name = "lblBetween" - Me.lblBetween.Size = New System.Drawing.Size(33, 13) - Me.lblBetween.TabIndex = 4 + Me.lblBetween.Size = New System.Drawing.Size(30, 13) + Me.lblBetween.TabIndex = 8 Me.lblBetween.Tag = "between" - Me.lblBetween.Text = "From:" + Me.lblBetween.Text = "From" Me.lblBetween.TextAlign = System.Drawing.ContentAlignment.TopRight ' + 'txtBetween + ' + Me.txtBetween.Location = New System.Drawing.Point(267, 97) + Me.txtBetween.Name = "txtBetween" + Me.txtBetween.Size = New System.Drawing.Size(33, 20) + Me.txtBetween.TabIndex = 10 + ' 'lblAnd ' Me.lblAnd.AutoSize = True - Me.lblAnd.Location = New System.Drawing.Point(271, 124) + Me.lblAnd.Location = New System.Drawing.Point(234, 124) Me.lblAnd.Name = "lblAnd" - Me.lblAnd.Size = New System.Drawing.Size(23, 13) - Me.lblAnd.TabIndex = 6 + Me.lblAnd.Size = New System.Drawing.Size(20, 13) + Me.lblAnd.TabIndex = 11 Me.lblAnd.Tag = "and" - Me.lblAnd.Text = "To:" + Me.lblAnd.Text = "To" ' - 'ucrInputTo + 'txtAnd ' - Me.ucrInputTo.IsMultiline = False - Me.ucrInputTo.IsReadOnly = False - Me.ucrInputTo.Location = New System.Drawing.Point(311, 121) - Me.ucrInputTo.Name = "ucrInputTo" - Me.ucrInputTo.Size = New System.Drawing.Size(56, 21) - Me.ucrInputTo.TabIndex = 7 + Me.txtAnd.Location = New System.Drawing.Point(267, 123) + Me.txtAnd.Name = "txtAnd" + Me.txtAnd.Size = New System.Drawing.Size(33, 20) + Me.txtAnd.TabIndex = 12 ' - 'ucrInputFrom + 'chkProbabilityPlot ' - Me.ucrInputFrom.IsMultiline = False - Me.ucrInputFrom.IsReadOnly = False - Me.ucrInputFrom.Location = New System.Drawing.Point(311, 98) - Me.ucrInputFrom.Name = "ucrInputFrom" - Me.ucrInputFrom.Size = New System.Drawing.Size(56, 21) - Me.ucrInputFrom.TabIndex = 5 + Me.chkProbabilityPlot.AutoSize = True + Me.chkProbabilityPlot.Location = New System.Drawing.Point(9, 168) + Me.chkProbabilityPlot.Name = "chkProbabilityPlot" + Me.chkProbabilityPlot.Size = New System.Drawing.Size(94, 17) + Me.chkProbabilityPlot.TabIndex = 13 + Me.chkProbabilityPlot.Tag = "Probability_plot" + Me.chkProbabilityPlot.Text = "Probability plot" + Me.chkProbabilityPlot.UseVisualStyleBackColor = True ' 'UcrDialogDisabled1 ' Me.UcrDialogDisabled1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.UcrDialogDisabled1.Location = New System.Drawing.Point(65, 103) + Me.UcrDialogDisabled1.Location = New System.Drawing.Point(80, 140) Me.UcrDialogDisabled1.Name = "UcrDialogDisabled1" - Me.UcrDialogDisabled1.Size = New System.Drawing.Size(240, 89) + Me.UcrDialogDisabled1.Size = New System.Drawing.Size(240, 50) Me.UcrDialogDisabled1.TabIndex = 14 ' - 'ucrChkProbPlot - ' - Me.ucrChkProbPlot.Checked = False - Me.ucrChkProbPlot.Location = New System.Drawing.Point(15, 167) - Me.ucrChkProbPlot.Name = "ucrChkProbPlot" - Me.ucrChkProbPlot.Size = New System.Drawing.Size(100, 20) - Me.ucrChkProbPlot.TabIndex = 8 - ' - 'ucrChkRestrictDataValues - ' - Me.ucrChkRestrictDataValues.Checked = False - Me.ucrChkRestrictDataValues.Location = New System.Drawing.Point(224, 77) - Me.ucrChkRestrictDataValues.Name = "ucrChkRestrictDataValues" - Me.ucrChkRestrictDataValues.Size = New System.Drawing.Size(123, 20) - Me.ucrChkRestrictDataValues.TabIndex = 3 - ' - 'ucrReceiverDataToFit - ' - Me.ucrReceiverDataToFit.frmParent = Me - Me.ucrReceiverDataToFit.Location = New System.Drawing.Point(224, 39) - Me.ucrReceiverDataToFit.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDataToFit.Name = "ucrReceiverDataToFit" - Me.ucrReceiverDataToFit.Selector = Nothing - Me.ucrReceiverDataToFit.Size = New System.Drawing.Size(143, 26) - Me.ucrReceiverDataToFit.TabIndex = 2 - ' - 'ucrAddRemove - ' - Me.ucrAddRemove.bShowHiddenColumns = False - Me.ucrAddRemove.Location = New System.Drawing.Point(9, 24) - Me.ucrAddRemove.Margin = New System.Windows.Forms.Padding(0) - Me.ucrAddRemove.Name = "ucrAddRemove" - Me.ucrAddRemove.Size = New System.Drawing.Size(206, 135) - Me.ucrAddRemove.TabIndex = 0 - ' - 'ucrBase - ' - Me.ucrBase.Location = New System.Drawing.Point(9, 290) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(405, 51) - Me.ucrBase.TabIndex = 12 - ' - 'ucrPnlDistributions - ' - Me.ucrPnlDistributions.Location = New System.Drawing.Point(311, 212) - Me.ucrPnlDistributions.Name = "ucrPnlDistributions" - Me.ucrPnlDistributions.Size = New System.Drawing.Size(88, 66) - Me.ucrPnlDistributions.TabIndex = 11 - ' 'dlgExtremes ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(500, 353) - Me.Controls.Add(Me.ucrInputTo) - Me.Controls.Add(Me.ucrInputFrom) + Me.ClientSize = New System.Drawing.Size(416, 353) Me.Controls.Add(Me.UcrDialogDisabled1) - Me.Controls.Add(Me.ucrChkProbPlot) - Me.Controls.Add(Me.ucrChkRestrictDataValues) + Me.Controls.Add(Me.chkProbabilityPlot) + Me.Controls.Add(Me.txtAnd) Me.Controls.Add(Me.lblAnd) + Me.Controls.Add(Me.txtBetween) Me.Controls.Add(Me.lblBetween) + Me.Controls.Add(Me.chkRestrictValues) Me.Controls.Add(Me.grpEstimationMethods) + Me.Controls.Add(Me.grpDistributions) Me.Controls.Add(Me.lblDataToFit) Me.Controls.Add(Me.ucrReceiverDataToFit) Me.Controls.Add(Me.ucrAddRemove) Me.Controls.Add(Me.ucrBase) - Me.Controls.Add(Me.grpDistributions) - Me.Controls.Add(Me.ucrPnlDistributions) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -291,28 +277,26 @@ Partial Class dlgExtremes Me.ResumeLayout(False) Me.PerformLayout() - End Sub - - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrAddRemove As ucrSelectorAddRemove - Friend WithEvents ucrReceiverDataToFit As ucrReceiverSingle - Friend WithEvents lblDataToFit As Label - Friend WithEvents grpDistributions As GroupBox - Friend WithEvents rdoGEV As RadioButton - Friend WithEvents rdoGumbel As RadioButton - Friend WithEvents grpEstimationMethods As GroupBox - Friend WithEvents lblSaveInMLE As Label - Friend WithEvents lblBetween As Label + End Sub + + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrAddRemove As ucrSelectorAddRemove + Friend WithEvents ucrReceiverDataToFit As ucrReceiverSingle + Friend WithEvents lblDataToFit As Label + Friend WithEvents grpDistributions As GroupBox + Friend WithEvents rdoGEV As RadioButton + Friend WithEvents rdoGumbel As RadioButton + Friend WithEvents grpEstimationMethods As GroupBox + Friend WithEvents cboMethodOfMoments As ComboBox + Friend WithEvents cboMaximumLikelihood As ComboBox + Friend WithEvents lblSaveEstimates As Label + Friend WithEvents chkMethodOfMoments As CheckBox + Friend WithEvents chkMaximumLikelihood As CheckBox + Friend WithEvents chkRestrictValues As CheckBox + Friend WithEvents lblBetween As Label + Friend WithEvents txtBetween As TextBox Friend WithEvents lblAnd As Label + Friend WithEvents txtAnd As TextBox + Friend WithEvents chkProbabilityPlot As CheckBox Friend WithEvents UcrDialogDisabled1 As ucrDialogDisabled - Friend WithEvents ucrChkProbPlot As ucrCheck - Friend WithEvents ucrChkMOM As ucrCheck - Friend WithEvents ucrChkMLE As ucrCheck - Friend WithEvents ucrChkRestrictDataValues As ucrCheck - Friend WithEvents lblSaveInMOM As Label - Friend WithEvents ucrInputTo As ucrInputTextBox - Friend WithEvents ucrInputFrom As ucrInputTextBox - Friend WithEvents ucrInputMLE As ucrInputComboBox - Friend WithEvents ucrInputMOM As ucrInputComboBox - Friend WithEvents ucrPnlDistributions As UcrPanel End Class diff --git a/instat/dlgExtremes.resx b/instat/dlgExtremes.resx index 29dcb1b3a35..1af7de150c9 100644 --- a/instat/dlgExtremes.resx +++ b/instat/dlgExtremes.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + \ No newline at end of file diff --git a/instat/dlgExtremes.vb b/instat/dlgExtremes.vb index d72bd6f7099..d93d1155444 100644 --- a/instat/dlgExtremes.vb +++ b/instat/dlgExtremes.vb @@ -16,108 +16,61 @@ Imports instat.Translations Public Class dlgExtremes - Private bFirstLoad As Boolean = True - Private bReset As Boolean = True - Private Sub dlgExtremes_Load(sender As Object, e As EventArgs) Handles MyBase.Load - autoTranslate(Me) - If bFirstLoad Then - InitialiseDialog() - bFirstLoad = False - End If - If bReset Then - SetDefaults() - End If - SetRCodeForControls(bReset) - bReset = False - TestOKEnabled() - End Sub + chkRestrictValues.Checked = False + lblBetween.Visible = False + txtBetween.Visible = False + lblAnd.Visible = False + txtAnd.Visible = False + chkMaximumLikelihood.Checked = False + chkMethodOfMoments.Checked = False + cboMaximumLikelihood.Visible = True + + cboMethodOfMoments.Visible = False + chkProbabilityPlot.Checked = False - Private Sub InitialiseDialog() - ucrBase.iHelpTopicID = 488 - ucrBase.clsRsyntax.iCallType = 1 ucrBase.OKEnabled(False) ' temporarily for beta - 'ucrReceiverDataToFit - ucrReceiverDataToFit.SetParameter(New RParameter("xdat", 0)) - ucrReceiverDataToFit.SetParameterIsRFunction() + ucrBase.clsRsyntax.SetFunction("gev.fit") + ucrBase.clsRsyntax.iCallType = 1 + autoTranslate(Me) ucrReceiverDataToFit.Selector = ucrAddRemove ucrReceiverDataToFit.SetMeAsReceiver() - - 'ucrChkRestrictDataValues - ' ucrInputTo.SetParameter(New RParameter(" ")) - ucrChkRestrictDataValues.SetParameter(ucrInputTo.GetParameter(), bNewChangeParameterValue:=False) ' bNewAddRemoveParameter:=True) - ucrInputTo.bAddRemoveParameter = False - ucrInputTo.SetLinkedDisplayControl(lblBetween) - 'set default value - - ' ucrInputFrom.SetParameter(New RParameter(" ")) - ucrChkRestrictDataValues.SetParameter(ucrInputFrom.GetParameter(), bNewChangeParameterValue:=False) ' bNewAddRemoveParameter:=True) - ucrInputFrom.bAddRemoveParameter = False - ucrInputFrom.SetLinkedDisplayControl(lblAnd) - - ucrChkRestrictDataValues.SetText("Restrict Data Values") - ucrChkRestrictDataValues.bChangeParameterValue = False - ucrChkRestrictDataValues.AddToLinkedControls(ucrLinked:=ucrInputTo, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkRestrictDataValues.AddToLinkedControls(ucrLinked:=ucrInputFrom, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkRestrictDataValues.SetRDefault("FALSE") - - 'ucrChkProbabilityPlot - ' ucrChkProbPlot.SetParameter(New RParameter(" ")) - ucrChkProbPlot.SetText("Probability Plot") - ucrChkProbPlot.SetRDefault("FALSE") - - 'ucrChkMLE - ' ucrChkMLE.SetParameter(New RParameter(" ")) - ucrChkMLE.SetText("Maximum Likelihood") - ucrChkMLE.SetRDefault("FALSE") - ucrChkMLE.SetParameter(ucrInputMLE.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - ucrChkMLE.AddToLinkedControls(ucrLinked:=ucrInputMLE, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrInputMLE.bAddRemoveParameter = False - ucrInputMLE.SetLinkedDisplayControl(lblSaveInMLE) - - 'ucrChkMOM - ' ucrChkMOM.SetParameter(New RParameter(" ")) - ucrChkMOM.SetText("Method of Moments") - ucrChkMOM.SetRDefault("FALSE") - ucrChkMOM.SetParameter(ucrInputMOM.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - ucrChkMOM.AddToLinkedControls(ucrLinked:=ucrInputMOM, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrInputMOM.bAddRemoveParameter = False - ucrInputMOM.SetLinkedDisplayControl(lblSaveInMOM) - - ' not sure if "Save in" for the cbos refers to where to display the output (i.e., output window, column) or something else. - ' Kept it as cbo for the time being. - - 'rdos - ' ucrPnlDistributions.SetParameter(New RParameter(" ")) - ' ucrPnlDistributions.AddRadioButton(rdoGEV, Chr(34) & "" & Chr(34)) - ' ucrPnlDistributions.AddRadioButton(rdoGumbel, Chr(34) & " " & Chr(34)) - ' ucrPnlDistributions.SetRDefault(Chr(34) & " " & Chr(34)) ' gumbel as default - + ucrBase.iHelpTopicID = 488 End Sub Private Sub SetDefaults() - Dim clsDefaultFunction As New RFunction - - ucrAddRemove.Reset() - - ucrBase.clsRsyntax.SetFunction("gev.fit") - ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) End Sub - Private Sub TestOKEnabled() - + Private Sub chkRestrictValues_CheckedChanged(sender As Object, e As EventArgs) Handles chkRestrictValues.CheckedChanged + If chkRestrictValues.Checked = True Then + lblBetween.Visible = True + txtBetween.Visible = True + lblAnd.Visible = True + txtAnd.Visible = True + Else + lblBetween.Visible = False + txtBetween.Visible = False + lblAnd.Visible = False + txtAnd.Visible = False + End If End Sub - 'ControlContentsChanged sub + Private Sub chkMaximumLikelihood_CheckedChanged(sender As Object, e As EventArgs) Handles chkMaximumLikelihood.CheckedChanged + If chkMaximumLikelihood.Checked = True Then + cboMaximumLikelihood.Visible = True + End If + End Sub - Public Sub SetRCodeForControls(bReset As Boolean) - SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + Private Sub chkMethodofMoments_CheckedChanged(sender As Object, e As EventArgs) Handles chkMethodOfMoments.CheckedChanged + If chkMethodOfMoments.Checked = True Then + cboMethodOfMoments.Visible = True + Else + cboMethodOfMoments.Visible = False + End If End Sub - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaults() - SetRCodeForControls(True) - TestOKEnabled() + Private Sub ucrReceiverDataToFit_Leave(sender As Object, e As EventArgs) Handles ucrReceiverDataToFit.Leave + ucrBase.clsRsyntax.AddParameter("xdat", clsRFunctionParameter:=ucrReceiverDataToFit.GetVariables()) End Sub End Class \ No newline at end of file diff --git a/instat/dlgPermuteColumn.Designer.vb b/instat/dlgPermuteColumn.Designer.vb index 17e02ca6724..b9957c31177 100644 --- a/instat/dlgPermuteColumn.Designer.vb +++ b/instat/dlgPermuteColumn.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgPermuteColumn 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,74 +20,82 @@ Partial Class dlgPermuteColumn '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.lblSelected = New System.Windows.Forms.Label() - Me.chkSetSeed = New System.Windows.Forms.CheckBox() Me.lblNumberOfColumns = New System.Windows.Forms.Label() - Me.lblNewColumnName = New System.Windows.Forms.Label() - Me.ucrInputPermuteRows = New instat.ucrInputComboBox() + Me.ucrChkSetSeed = New instat.ucrCheck() + Me.ucrNudSetSeed = New instat.ucrNud() + Me.ucrNudNumberofColumns = New instat.ucrNud() + Me.ucrSavePermute = New instat.ucrSave() Me.ucrReceiverPermuteRows = New instat.ucrReceiverSingle() Me.ucrPermuteRowsSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.nudSetSeed = New System.Windows.Forms.NumericUpDown() - Me.nudNumberofColumns = New System.Windows.Forms.NumericUpDown() - CType(Me.nudSetSeed, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.nudNumberofColumns, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'lblSelected ' Me.lblSelected.AutoSize = True - Me.lblSelected.Location = New System.Drawing.Point(249, 46) + Me.lblSelected.Location = New System.Drawing.Point(246, 42) Me.lblSelected.Name = "lblSelected" Me.lblSelected.Size = New System.Drawing.Size(93, 13) Me.lblSelected.TabIndex = 1 Me.lblSelected.Tag = "Selected_Variable:" Me.lblSelected.Text = "Selected Variable:" ' - 'chkSetSeed - ' - Me.chkSetSeed.AutoSize = True - Me.chkSetSeed.Location = New System.Drawing.Point(247, 97) - Me.chkSetSeed.Name = "chkSetSeed" - Me.chkSetSeed.Size = New System.Drawing.Size(70, 17) - Me.chkSetSeed.TabIndex = 3 - Me.chkSetSeed.Tag = "Set_Seed" - Me.chkSetSeed.Text = "Set Seed" - Me.chkSetSeed.UseVisualStyleBackColor = True - ' 'lblNumberOfColumns ' Me.lblNumberOfColumns.AutoSize = True - Me.lblNumberOfColumns.Location = New System.Drawing.Point(245, 125) + Me.lblNumberOfColumns.Location = New System.Drawing.Point(244, 124) Me.lblNumberOfColumns.Name = "lblNumberOfColumns" Me.lblNumberOfColumns.Size = New System.Drawing.Size(102, 13) Me.lblNumberOfColumns.TabIndex = 5 Me.lblNumberOfColumns.Tag = "Number_of_Colums" Me.lblNumberOfColumns.Text = "Number of Columns:" ' - 'lblNewColumnName - ' - Me.lblNewColumnName.AutoSize = True - Me.lblNewColumnName.Location = New System.Drawing.Point(10, 205) - Me.lblNewColumnName.Name = "lblNewColumnName" - Me.lblNewColumnName.Size = New System.Drawing.Size(101, 13) - Me.lblNewColumnName.TabIndex = 7 - Me.lblNewColumnName.Tag = "New_Column_Name:" - Me.lblNewColumnName.Text = "New Column Name:" - ' - 'ucrInputPermuteRows - ' - Me.ucrInputPermuteRows.IsReadOnly = False - Me.ucrInputPermuteRows.Location = New System.Drawing.Point(130, 202) - Me.ucrInputPermuteRows.Name = "ucrInputPermuteRows" - Me.ucrInputPermuteRows.Size = New System.Drawing.Size(145, 21) - Me.ucrInputPermuteRows.TabIndex = 8 + 'ucrChkSetSeed + ' + Me.ucrChkSetSeed.Checked = False + Me.ucrChkSetSeed.Location = New System.Drawing.Point(247, 90) + Me.ucrChkSetSeed.Name = "ucrChkSetSeed" + Me.ucrChkSetSeed.Size = New System.Drawing.Size(100, 20) + Me.ucrChkSetSeed.TabIndex = 3 + ' + 'ucrNudSetSeed + ' + Me.ucrNudSetSeed.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSetSeed.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSetSeed.Location = New System.Drawing.Point(352, 88) + Me.ucrNudSetSeed.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSetSeed.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSetSeed.Name = "ucrNudSetSeed" + Me.ucrNudSetSeed.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSetSeed.TabIndex = 4 + Me.ucrNudSetSeed.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudNumberofColumns + ' + Me.ucrNudNumberofColumns.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberofColumns.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudNumberofColumns.Location = New System.Drawing.Point(352, 120) + Me.ucrNudNumberofColumns.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudNumberofColumns.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberofColumns.Name = "ucrNudNumberofColumns" + Me.ucrNudNumberofColumns.Size = New System.Drawing.Size(50, 20) + Me.ucrNudNumberofColumns.TabIndex = 6 + Me.ucrNudNumberofColumns.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrSavePermute + ' + Me.ucrSavePermute.Location = New System.Drawing.Point(10, 197) + Me.ucrSavePermute.Name = "ucrSavePermute" + Me.ucrSavePermute.Size = New System.Drawing.Size(294, 24) + Me.ucrSavePermute.TabIndex = 7 ' 'ucrReceiverPermuteRows ' - Me.ucrReceiverPermuteRows.Location = New System.Drawing.Point(247, 61) + Me.ucrReceiverPermuteRows.frmParent = Me + Me.ucrReceiverPermuteRows.Location = New System.Drawing.Point(247, 60) Me.ucrReceiverPermuteRows.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPermuteRows.Name = "ucrReceiverPermuteRows" Me.ucrReceiverPermuteRows.Selector = Nothing @@ -106,36 +114,21 @@ Partial Class dlgPermuteColumn ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(13, 229) + Me.ucrBase.Location = New System.Drawing.Point(10, 229) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 9 - ' - 'nudSetSeed - ' - Me.nudSetSeed.Location = New System.Drawing.Point(323, 95) - Me.nudSetSeed.Name = "nudSetSeed" - Me.nudSetSeed.Size = New System.Drawing.Size(44, 20) - Me.nudSetSeed.TabIndex = 10 - ' - 'nudNumberofColumns - ' - Me.nudNumberofColumns.Location = New System.Drawing.Point(353, 123) - Me.nudNumberofColumns.Name = "nudNumberofColumns" - Me.nudNumberofColumns.Size = New System.Drawing.Size(44, 20) - Me.nudNumberofColumns.TabIndex = 11 + Me.ucrBase.TabIndex = 8 ' 'dlgPermuteColumn ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(419, 289) - Me.Controls.Add(Me.nudNumberofColumns) - Me.Controls.Add(Me.nudSetSeed) - Me.Controls.Add(Me.lblNewColumnName) - Me.Controls.Add(Me.ucrInputPermuteRows) + Me.Controls.Add(Me.ucrChkSetSeed) + Me.Controls.Add(Me.ucrNudSetSeed) + Me.Controls.Add(Me.ucrNudNumberofColumns) + Me.Controls.Add(Me.ucrSavePermute) Me.Controls.Add(Me.lblNumberOfColumns) - Me.Controls.Add(Me.chkSetSeed) Me.Controls.Add(Me.lblSelected) Me.Controls.Add(Me.ucrReceiverPermuteRows) Me.Controls.Add(Me.ucrPermuteRowsSelector) @@ -147,8 +140,6 @@ Partial Class dlgPermuteColumn Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Permute_Column" Me.Text = "Permute Column" - CType(Me.nudSetSeed, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.nudNumberofColumns, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -158,10 +149,9 @@ Partial Class dlgPermuteColumn Friend WithEvents ucrPermuteRowsSelector As ucrSelectorByDataFrameAddRemove Friend WithEvents ucrReceiverPermuteRows As ucrReceiverSingle Friend WithEvents lblSelected As Label - Friend WithEvents chkSetSeed As CheckBox Friend WithEvents lblNumberOfColumns As Label - Friend WithEvents ucrInputPermuteRows As ucrInputComboBox - Friend WithEvents lblNewColumnName As Label - Friend WithEvents nudSetSeed As NumericUpDown - Friend WithEvents nudNumberofColumns As NumericUpDown + Friend WithEvents ucrSavePermute As ucrSave + Friend WithEvents ucrNudNumberofColumns As ucrNud + Friend WithEvents ucrNudSetSeed As ucrNud + Friend WithEvents ucrChkSetSeed As ucrCheck End Class diff --git a/instat/dlgPermuteColumn.vb b/instat/dlgPermuteColumn.vb index 098061a3c8f..01a4d8ac47d 100644 --- a/instat/dlgPermuteColumn.vb +++ b/instat/dlgPermuteColumn.vb @@ -1,141 +1,145 @@ -' Instat-R -' Copyright (C) 2015 -' -' 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 k -' along with this program. If not, see . - -Imports instat.Translations -Public Class dlgPermuteColumn - Public clsSetSampleFunc As New RFunction - Public clsSetSeedFunc As New RFunction - Public bFirstLoad As Boolean = True - - Private Sub dlgPermuteRows_Load(sender As Object, e As EventArgs) Handles MyBase.Load - If bFirstLoad Then - SetDefaults() - InitialiseDialog() - bFirstLoad = False - Else - ReopenDialog() - End If - - autoTranslate(Me) - - End Sub - Private Sub SetDefaults() - ucrReceiverPermuteRows.Selector = ucrPermuteRowsSelector - ucrReceiverPermuteRows.SetMeAsReceiver() - ucrPermuteRowsSelector.Reset() - nudNumberofColumns.Value = 1 - nudSetSeed.Value = 5 - chkSetSeed.Checked = False - nudSetSeed.Visible = False - TestOkEnabled() - End Sub - - Private Sub ReopenDialog() - - End Sub - - Private Sub InitialiseDialog() - ucrReceiverPermuteRows.Selector = ucrPermuteRowsSelector - ucrReceiverPermuteRows.SetMeAsReceiver() - ucrReceiverPermuteRows.bUseFilteredData = False - clsSetSeedFunc.SetRCommand("set.seed") - ucrBase.clsRsyntax.SetFunction("replicate") - ucrBase.clsRsyntax.AddParameter("expr", clsRFunctionParameter:=clsSetSampleFunc) - clsSetSampleFunc.SetRCommand("sample") - clsSetSampleFunc.AddParameter("x", clsRFunctionParameter:=ucrReceiverPermuteRows.GetVariables()) - clsSetSampleFunc.AddParameter("replace", "FALSE") - ucrBase.iHelpTopicID = 66 - ucrInputPermuteRows.SetItemsTypeAsColumns() - ucrInputPermuteRows.SetDefaultTypeAsColumn() - ucrInputPermuteRows.SetDataFrameSelector(ucrPermuteRowsSelector.ucrAvailableDataFrames) - ucrInputPermuteRows.SetValidationTypeAsRVariable() - nudSetSeed.Minimum = Integer.MinValue - nudSetSeed.Maximum = Integer.MaxValue - nudNumberofColumns.Minimum = 1 - SetSize() - End Sub - - Private Sub TestOkEnabled() - If Not ucrReceiverPermuteRows.IsEmpty AndAlso Not ucrInputPermuteRows.IsEmpty Then - ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) - End If - End Sub - - Private Sub ucrReceiverPermuteRows_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverPermuteRows.SelectionChanged - If Not ucrReceiverPermuteRows.IsEmpty Then - clsSetSampleFunc.AddParameter("x", clsRFunctionParameter:=ucrReceiverPermuteRows.GetVariables()) - Else - clsSetSampleFunc.RemoveParameterByName("x") - End If - TestOkEnabled() - End Sub - - Private Sub chkSetSeed_CheckedChanged(sender As Object, e As EventArgs) Handles chkSetSeed.CheckedChanged - If chkSetSeed.Checked = True Then - nudSetSeed.Visible = True - Else - nudSetSeed.Visible = False - End If - End Sub - - Private Sub nudSetSeed_TextChanged(sender As Object, e As EventArgs) Handles nudSetSeed.TextChanged - clsSetSeedFunc.AddParameter("seed", nudSetSeed.Value) - End Sub - - Private Sub nudNumberOfColumns_TextChanged(sender As Object, e As EventArgs) Handles nudNumberofColumns.TextChanged - ucrBase.clsRsyntax.AddParameter("n", nudNumberofColumns.Value) - If nudNumberofColumns.Value = 1 Then - lblNewColumnName.Text = "New Column Name:" - If Not ucrInputPermuteRows.bUserTyped Then - ucrInputPermuteRows.SetPrefix("Permute") - End If - Else - lblNewColumnName.Text = "Prefix for New Columns:" - If Not ucrInputPermuteRows.bUserTyped Then - ucrInputPermuteRows.SetPrefix("") - ucrInputPermuteRows.SetName("Permute") - End If - End If - SetAssignTo() - End Sub - - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaults() - End Sub - - Private Sub ucrInputPermuteRows_nameChanged() Handles ucrInputPermuteRows.NameChanged - SetAssignTo() - TestOkEnabled() - End Sub - - Private Sub SetAssignTo() - Dim bIsPrefix As Boolean - - bIsPrefix = (nudNumberofColumns.Value > 1) - ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrInputPermuteRows.GetText, strTempDataframe:=ucrPermuteRowsSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrInputPermuteRows.GetText, bAssignToIsPrefix:=bIsPrefix) - End Sub - - Private Sub ucrPermuteRowsSelector_DataFrameChanged() Handles ucrPermuteRowsSelector.DataFrameChanged - SetSize() - End Sub - - Private Sub SetSize() - clsSetSampleFunc.AddParameter("size", ucrPermuteRowsSelector.ucrAvailableDataFrames.iDataFrameLength) - End Sub - +'Instat-R +' Copyright (C) 2015 +' +' 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 k +' along with this program. If not, see . + +Imports instat.Translations +Public Class dlgPermuteColumn + Private clsSetSampleFunc, clsSetSeedFunc, clsOverallFunction As New RFunction + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + + Private Sub dlgPermuteRows_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + If bFirstLoad Then + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + TestOkEnabled() + End Sub + + Public Sub SetRCodeForControls(bReset As Boolean) + ucrNudNumberofColumns.SetRCode(clsOverallFunction, bReset) + ucrReceiverPermuteRows.SetRCode(clsSetSampleFunc, bReset) + ucrNudSetSeed.SetRCode(clsSetSeedFunc, bReset) + ucrChkSetSeed.SetRCode(clsSetSeedFunc, bReset) + ucrSavePermute.SetRCode(clsOverallFunction, bReset) + End Sub + + Public Sub SetDefaults() + Dim clsDefaultFunction, clsDefaultSample, clsDefaultSetSeed As New RFunction + ucrPermuteRowsSelector.Reset() + ucrSavePermute.Reset() + SetNewColumName() + clsDefaultSample.SetRCommand("sample") + clsDefaultSample.AddParameter("replace", "FALSE") + clsDefaultSample.AddParameter("size", ucrPermuteRowsSelector.ucrAvailableDataFrames.iDataFrameLength) + clsDefaultSetSeed.SetRCommand("set.seed") + clsDefaultSetSeed.AddParameter("seed", 5) + clsDefaultFunction.SetRCommand("replicate") + ucrChkSetSeed.Checked = False + clsSetSeedFunc = clsDefaultSetSeed.Clone + clsSetSampleFunc = clsDefaultSample.Clone + clsOverallFunction = clsDefaultFunction.Clone + clsOverallFunction.AddParameter("expr", clsRFunctionParameter:=clsSetSampleFunc) + clsOverallFunction.AddParameter("n", 1) + ucrBase.clsRsyntax.SetBaseRFunction(clsOverallFunction) + ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrSavePermute.GetText, strTempDataframe:=ucrPermuteRowsSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSavePermute.GetText, bAssignToIsPrefix:=True) + End Sub + + Private Sub InitialiseDialog() + + ucrBase.iHelpTopicID = 66 + ucrReceiverPermuteRows.Selector = ucrPermuteRowsSelector + ucrReceiverPermuteRows.SetMeAsReceiver() + ucrPermuteRowsSelector.ucrAvailableDataFrames.SetParameter(New RParameter("size", 1)) + ucrPermuteRowsSelector.SetParameterIsrfunction() + ucrReceiverPermuteRows.bUseFilteredData = False + ucrReceiverPermuteRows.SetParameter(New RParameter("x", 0)) + ucrReceiverPermuteRows.SetParameterIsRFunction() + + ucrNudNumberofColumns.SetParameter(New RParameter("n", 1)) + ucrNudNumberofColumns.Maximum = Integer.MaxValue + ucrNudNumberofColumns.Minimum = 1 + + ucrChkSetSeed.AddToLinkedControls(ucrNudSetSeed, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkSetSeed.SetText("Set Seed") + ucrNudSetSeed.SetParameter(New RParameter("seed", 0)) + ucrNudSetSeed.Maximum = Integer.MaxValue + + ucrSavePermute.SetSaveTypeAsColumn() + ucrSavePermute.SetDataFrameSelector(ucrPermuteRowsSelector.ucrAvailableDataFrames) + ucrSavePermute.SetIsComboBox() + + End Sub + + Private Sub TestOkEnabled() + If Not ucrReceiverPermuteRows.IsEmpty AndAlso ucrSavePermute.IsComplete 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 ucrReceiverPermuteRows_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverPermuteRows.ControlContentsChanged, ucrSavePermute.ControlContentsChanged + TestOkEnabled() + End Sub + + Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) Handles ucrBase.BeforeClickOk + If ucrChkSetSeed.Checked Then + frmMain.clsRLink.RunScript(clsSetSeedFunc.ToScript, strComment:="dlgPermuteColumn:Setting the seed for the random generator") + End If + End Sub + + Private Sub SetNewColumName() + If ucrNudNumberofColumns.Value = 1 Then + ucrSavePermute.SetAssignToBooleans(bTempAssignToIsPrefix:=False) + ucrSavePermute.SetLabelText("New Column Name:") + If Not ucrSavePermute.bUserTyped Then + ucrSavePermute.SetPrefix("permute") + End If + Else + ucrSavePermute.SetAssignToBooleans(bTempAssignToIsPrefix:=True) + ucrSavePermute.SetLabelText("Prefix for New Columns:") + If Not ucrSavePermute.bUserTyped Then + ucrSavePermute.SetPrefix("") + ucrSavePermute.SetName("permute") + End If + End If + End Sub + + Private Sub DataFrameLength() + clsSetSampleFunc.AddParameter("size", ucrPermuteRowsSelector.ucrAvailableDataFrames.iDataFrameLength) + End Sub + + Private Sub ucrPermuteRowsSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPermuteRowsSelector.ControlValueChanged + DataFrameLength() + End Sub + + Private Sub ucrNudNumberofColumns_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudNumberofColumns.ControlValueChanged + SetNewColumName() + End Sub + End Class \ No newline at end of file diff --git a/instat/dlgReorderLevels.Designer.vb b/instat/dlgReorderLevels.Designer.vb index e6635be2d23..e8a39210431 100644 --- a/instat/dlgReorderLevels.Designer.vb +++ b/instat/dlgReorderLevels.Designer.vb @@ -35,7 +35,7 @@ Partial Class dlgReorderLevels Me.lblFactor.Location = New System.Drawing.Point(258, 27) Me.lblFactor.Name = "lblFactor" Me.lblFactor.Size = New System.Drawing.Size(85, 13) - Me.lblFactor.TabIndex = 4 + Me.lblFactor.TabIndex = 1 Me.lblFactor.Tag = "Factor_Selected:" Me.lblFactor.Text = "Factor Selected:" ' @@ -50,6 +50,7 @@ Partial Class dlgReorderLevels ' 'ucrReceiverFactor ' + Me.ucrReceiverFactor.frmParent = Me Me.ucrReceiverFactor.Location = New System.Drawing.Point(259, 42) Me.ucrReceiverFactor.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverFactor.Name = "ucrReceiverFactor" @@ -65,14 +66,14 @@ Partial Class dlgReorderLevels Me.ucrSelectorFactorLevelsToReorder.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorFactorLevelsToReorder.Name = "ucrSelectorFactorLevelsToReorder" Me.ucrSelectorFactorLevelsToReorder.Size = New System.Drawing.Size(242, 193) - Me.ucrSelectorFactorLevelsToReorder.TabIndex = 1 + Me.ucrSelectorFactorLevelsToReorder.TabIndex = 0 ' 'ucrBase ' Me.ucrBase.Location = New System.Drawing.Point(13, 211) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 53) - Me.ucrBase.TabIndex = 0 + Me.ucrBase.TabIndex = 4 ' 'dlgReorderLevels ' diff --git a/instat/dlgReorderLevels.vb b/instat/dlgReorderLevels.vb index 43c4ce339d1..1e40254c09d 100644 --- a/instat/dlgReorderLevels.vb +++ b/instat/dlgReorderLevels.vb @@ -16,47 +16,57 @@ Imports instat.Translations Public Class dlgReorderLevels - Public bFirstLoad As Boolean = True + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private clsReorder As New RFunction + Private Sub dlgReorderLevels_Load(sender As Object, e As EventArgs) Handles MyBase.Load - autoTranslate(Me) If bFirstLoad Then - InitialiseDialog() - 'SetDefaultSettings() - SetDefaultSettings() - bFirstLoad = False + bFirstLoad = False End If - - TestOKEnabled() + If bReset Then + SetDefaults() + End If + SetRCodeforControls(bReset) + bReset = False + autoTranslate(Me) End Sub + Private Sub InitialiseDialog() - ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$reorder_factor_levels") + ucrBase.iHelpTopicID = 36 + 'Set Receivers and column parameter ucrReceiverFactor.Selector = ucrSelectorFactorLevelsToReorder ucrReceiverFactor.SetMeAsReceiver() ucrReceiverFactor.SetIncludedDataTypes({"factor"}) - ucrReorderFactor.setReceiver(ucrReceiverFactor) + ucrReceiverFactor.SetParameter(New RParameter("col_name", 1)) + ucrReceiverFactor.SetParameterIsString() + + 'Set reorder scroll list view & datatype accepted + ucrReorderFactor.setReceiver(ucrReceiverFactor) ucrReorderFactor.setDataType("factor") - ucrBase.iHelpTopicID = 36 - End Sub - Private Sub SetDefaultSettings() - ucrSelectorFactorLevelsToReorder.Reset() - ucrSelectorFactorLevelsToReorder.Focus() - ucrReorderFactor.Reset() - TestOKEnabled() - End Sub - Private Sub ucrSelectorFactorLevelsToReorder_DataFrameChanged() Handles ucrSelectorFactorLevelsToReorder.DataFrameChanged - ucrBase.clsRsyntax.AddParameter("data_name", Chr(34) & ucrSelectorFactorLevelsToReorder.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34)) + 'Set data frame paramater + ucrSelectorFactorLevelsToReorder.SetParameter(New RParameter("data_name", 0)) + ucrSelectorFactorLevelsToReorder.SetParameterIsString() + + 'Set column Parameter + ucrReorderFactor.SetParameter(New RParameter("new_level_names", 2)) + End Sub - Private Sub ucrReceiverFactor_SelectionChanged(sender As Object, e As EventArgs) Handles ucrReceiverFactor.SelectionChanged - ucrBase.clsRsyntax.AddParameter("col_name", ucrReceiverFactor.GetVariableNames) - TestOKEnabled() + Private Sub SetDefaults() + 'reset + ucrSelectorFactorLevelsToReorder.Reset() + ' Set default function + clsReorder.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$reorder_factor_levels") + ucrBase.clsRsyntax.SetBaseRFunction(clsReorder) End Sub - Private Sub ucrReorderFactor_Leave(sender As Object, e As EventArgs) Handles ucrReorderFactor.Leave - ucrBase.clsRsyntax.AddParameter("new_level_names", ucrReorderFactor.GetVariableNames) + Private Sub SetRCodeforControls(bReset As Boolean) + SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub + Private Sub TestOKEnabled() If Not ucrReceiverFactor.IsEmpty Then ucrBase.OKEnabled(True) @@ -66,6 +76,12 @@ Public Class dlgReorderLevels End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaultSettings() + SetDefaults() + SetRCodeforControls(True) + TestOKEnabled() + End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFactor.ControlContentsChanged + TestOKEnabled() End Sub End Class \ No newline at end of file diff --git a/instat/dlgReplace.Designer.vb b/instat/dlgReplace.Designer.vb index 851eec4290d..2e88b0b78e6 100644 --- a/instat/dlgReplace.Designer.vb +++ b/instat/dlgReplace.Designer.vb @@ -23,27 +23,27 @@ Partial Class dlgReplace Private Sub InitializeComponent() Me.grpOld = New System.Windows.Forms.GroupBox() - Me.lblRangeMax = New System.Windows.Forms.Label() - Me.lblRangeMin = New System.Windows.Forms.Label() - Me.grpNew = New System.Windows.Forms.GroupBox() - Me.lblSelectedColumns = New System.Windows.Forms.Label() Me.rdoOldValue = New System.Windows.Forms.RadioButton() + Me.lblRangeMax = New System.Windows.Forms.Label() Me.rdoOldMissing = New System.Windows.Forms.RadioButton() Me.rdoOldInterval = New System.Windows.Forms.RadioButton() - Me.rdoNewMissing = New System.Windows.Forms.RadioButton() - Me.rdoNewValue = New System.Windows.Forms.RadioButton() + Me.lblRangeMin = New System.Windows.Forms.Label() Me.ucrChkMax = New instat.ucrCheck() Me.ucrInputRangeTo = New instat.ucrInputTextBox() Me.ucrChkMin = New instat.ucrCheck() Me.ucrInputRangeFrom = New instat.ucrInputTextBox() Me.ucrInputOldValue = New instat.ucrInputTextBox() Me.ucrPnlOld = New instat.UcrPanel() + Me.grpNew = New System.Windows.Forms.GroupBox() + Me.rdoNewFromAbove = New System.Windows.Forms.RadioButton() Me.ucrInputNewValue = New instat.ucrInputTextBox() + Me.rdoNewMissing = New System.Windows.Forms.RadioButton() + Me.rdoNewValue = New System.Windows.Forms.RadioButton() Me.ucrPnlNew = New instat.UcrPanel() + Me.lblSelectedColumns = New System.Windows.Forms.Label() Me.ucrReceiverReplace = New instat.ucrReceiverMultiple() Me.ucrSelectorReplace = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.rdoNewFromAbove = New System.Windows.Forms.RadioButton() Me.grpOld.SuspendLayout() Me.grpNew.SuspendLayout() Me.SuspendLayout() @@ -69,69 +69,34 @@ Partial Class dlgReplace Me.grpOld.Tag = "Old" Me.grpOld.Text = "Old" ' - 'lblRangeMax - ' - Me.lblRangeMax.AutoSize = True - Me.lblRangeMax.Location = New System.Drawing.Point(14, 117) - Me.lblRangeMax.Name = "lblRangeMax" - Me.lblRangeMax.Size = New System.Drawing.Size(54, 13) - Me.lblRangeMax.TabIndex = 9 - Me.lblRangeMax.Tag = "Maximum" - Me.lblRangeMax.Text = "Maximum:" - ' - 'lblRangeMin - ' - Me.lblRangeMin.AutoSize = True - Me.lblRangeMin.Location = New System.Drawing.Point(14, 96) - Me.lblRangeMin.Name = "lblRangeMin" - Me.lblRangeMin.Size = New System.Drawing.Size(51, 13) - Me.lblRangeMin.TabIndex = 6 - Me.lblRangeMin.Tag = "Minimum" - Me.lblRangeMin.Text = "Minimum:" - ' - 'grpNew - ' - Me.grpNew.Controls.Add(Me.rdoNewFromAbove) - Me.grpNew.Controls.Add(Me.ucrInputNewValue) - Me.grpNew.Controls.Add(Me.rdoNewMissing) - Me.grpNew.Controls.Add(Me.rdoNewValue) - Me.grpNew.Controls.Add(Me.ucrPnlNew) - Me.grpNew.Location = New System.Drawing.Point(253, 194) - Me.grpNew.Name = "grpNew" - Me.grpNew.Size = New System.Drawing.Size(176, 161) - Me.grpNew.TabIndex = 4 - Me.grpNew.TabStop = False - Me.grpNew.Tag = "New" - Me.grpNew.Text = "New" - ' - 'lblSelectedColumns - ' - Me.lblSelectedColumns.AutoSize = True - Me.lblSelectedColumns.Location = New System.Drawing.Point(249, 46) - Me.lblSelectedColumns.Name = "lblSelectedColumns" - Me.lblSelectedColumns.Size = New System.Drawing.Size(101, 13) - Me.lblSelectedColumns.TabIndex = 1 - Me.lblSelectedColumns.Tag = "Selected_Column(s)" - Me.lblSelectedColumns.Text = "Selected Column(s):" - ' 'rdoOldValue ' Me.rdoOldValue.AutoSize = True Me.rdoOldValue.Location = New System.Drawing.Point(12, 27) Me.rdoOldValue.Name = "rdoOldValue" Me.rdoOldValue.Size = New System.Drawing.Size(52, 17) - Me.rdoOldValue.TabIndex = 8 + Me.rdoOldValue.TabIndex = 1 Me.rdoOldValue.TabStop = True Me.rdoOldValue.Text = "Value" Me.rdoOldValue.UseVisualStyleBackColor = True ' + 'lblRangeMax + ' + Me.lblRangeMax.AutoSize = True + Me.lblRangeMax.Location = New System.Drawing.Point(14, 117) + Me.lblRangeMax.Name = "lblRangeMax" + Me.lblRangeMax.Size = New System.Drawing.Size(54, 13) + Me.lblRangeMax.TabIndex = 8 + Me.lblRangeMax.Tag = "Maximum" + Me.lblRangeMax.Text = "Maximum:" + ' 'rdoOldMissing ' Me.rdoOldMissing.AutoSize = True Me.rdoOldMissing.Location = New System.Drawing.Point(12, 49) Me.rdoOldMissing.Name = "rdoOldMissing" Me.rdoOldMissing.Size = New System.Drawing.Size(90, 17) - Me.rdoOldMissing.TabIndex = 9 + Me.rdoOldMissing.TabIndex = 3 Me.rdoOldMissing.TabStop = True Me.rdoOldMissing.Text = "Missing Value" Me.rdoOldMissing.UseVisualStyleBackColor = True @@ -142,119 +107,151 @@ Partial Class dlgReplace Me.rdoOldInterval.Location = New System.Drawing.Point(12, 72) Me.rdoOldInterval.Name = "rdoOldInterval" Me.rdoOldInterval.Size = New System.Drawing.Size(60, 17) - Me.rdoOldInterval.TabIndex = 10 + Me.rdoOldInterval.TabIndex = 4 Me.rdoOldInterval.TabStop = True Me.rdoOldInterval.Text = "Interval" Me.rdoOldInterval.UseVisualStyleBackColor = True ' - 'rdoNewMissing - ' - Me.rdoNewMissing.AutoSize = True - Me.rdoNewMissing.Location = New System.Drawing.Point(14, 53) - Me.rdoNewMissing.Name = "rdoNewMissing" - Me.rdoNewMissing.Size = New System.Drawing.Size(90, 17) - Me.rdoNewMissing.TabIndex = 15 - Me.rdoNewMissing.TabStop = True - Me.rdoNewMissing.Text = "Missing Value" - Me.rdoNewMissing.UseVisualStyleBackColor = True - ' - 'rdoNewValue + 'lblRangeMin ' - Me.rdoNewValue.AutoSize = True - Me.rdoNewValue.Location = New System.Drawing.Point(14, 30) - Me.rdoNewValue.Name = "rdoNewValue" - Me.rdoNewValue.Size = New System.Drawing.Size(52, 17) - Me.rdoNewValue.TabIndex = 14 - Me.rdoNewValue.TabStop = True - Me.rdoNewValue.Text = "Value" - Me.rdoNewValue.UseVisualStyleBackColor = True + Me.lblRangeMin.AutoSize = True + Me.lblRangeMin.Location = New System.Drawing.Point(14, 96) + Me.lblRangeMin.Name = "lblRangeMin" + Me.lblRangeMin.Size = New System.Drawing.Size(51, 13) + Me.lblRangeMin.TabIndex = 5 + Me.lblRangeMin.Tag = "Minimum" + Me.lblRangeMin.Text = "Minimum:" ' 'ucrChkMax ' - Me.ucrChkMax.bAddRemoveParameter = True - Me.ucrChkMax.bChangeParameterValue = True Me.ucrChkMax.Checked = False Me.ucrChkMax.Location = New System.Drawing.Point(151, 116) Me.ucrChkMax.Name = "ucrChkMax" Me.ucrChkMax.Size = New System.Drawing.Size(80, 20) - Me.ucrChkMax.TabIndex = 13 + Me.ucrChkMax.TabIndex = 10 ' 'ucrInputRangeTo ' - Me.ucrInputRangeTo.bAddRemoveParameter = True - Me.ucrInputRangeTo.bChangeParameterValue = True + Me.ucrInputRangeTo.AddQuotesIfUnrecognised = True Me.ucrInputRangeTo.IsMultiline = False Me.ucrInputRangeTo.IsReadOnly = False Me.ucrInputRangeTo.Location = New System.Drawing.Point(71, 114) Me.ucrInputRangeTo.Name = "ucrInputRangeTo" Me.ucrInputRangeTo.Size = New System.Drawing.Size(74, 21) - Me.ucrInputRangeTo.TabIndex = 8 + Me.ucrInputRangeTo.TabIndex = 9 ' 'ucrChkMin ' - Me.ucrChkMin.bAddRemoveParameter = True - Me.ucrChkMin.bChangeParameterValue = True Me.ucrChkMin.Checked = False Me.ucrChkMin.Location = New System.Drawing.Point(151, 93) Me.ucrChkMin.Name = "ucrChkMin" Me.ucrChkMin.Size = New System.Drawing.Size(80, 20) - Me.ucrChkMin.TabIndex = 12 + Me.ucrChkMin.TabIndex = 7 ' 'ucrInputRangeFrom ' - Me.ucrInputRangeFrom.bAddRemoveParameter = True - Me.ucrInputRangeFrom.bChangeParameterValue = True + Me.ucrInputRangeFrom.AddQuotesIfUnrecognised = True Me.ucrInputRangeFrom.IsMultiline = False Me.ucrInputRangeFrom.IsReadOnly = False Me.ucrInputRangeFrom.Location = New System.Drawing.Point(71, 93) Me.ucrInputRangeFrom.Name = "ucrInputRangeFrom" Me.ucrInputRangeFrom.Size = New System.Drawing.Size(74, 21) - Me.ucrInputRangeFrom.TabIndex = 9 + Me.ucrInputRangeFrom.TabIndex = 6 ' 'ucrInputOldValue ' - Me.ucrInputOldValue.bAddRemoveParameter = True - Me.ucrInputOldValue.bChangeParameterValue = True + Me.ucrInputOldValue.AddQuotesIfUnrecognised = True Me.ucrInputOldValue.IsMultiline = False Me.ucrInputOldValue.IsReadOnly = False Me.ucrInputOldValue.Location = New System.Drawing.Point(70, 25) Me.ucrInputOldValue.Name = "ucrInputOldValue" Me.ucrInputOldValue.Size = New System.Drawing.Size(92, 21) - Me.ucrInputOldValue.TabIndex = 10 + Me.ucrInputOldValue.TabIndex = 2 ' 'ucrPnlOld ' - Me.ucrPnlOld.bAddRemoveParameter = True - Me.ucrPnlOld.bChangeParameterValue = True Me.ucrPnlOld.Location = New System.Drawing.Point(3, 17) Me.ucrPnlOld.Name = "ucrPnlOld" Me.ucrPnlOld.Size = New System.Drawing.Size(228, 131) - Me.ucrPnlOld.TabIndex = 6 + Me.ucrPnlOld.TabIndex = 0 + ' + 'grpNew + ' + Me.grpNew.Controls.Add(Me.rdoNewFromAbove) + Me.grpNew.Controls.Add(Me.ucrInputNewValue) + Me.grpNew.Controls.Add(Me.rdoNewMissing) + Me.grpNew.Controls.Add(Me.rdoNewValue) + Me.grpNew.Controls.Add(Me.ucrPnlNew) + Me.grpNew.Location = New System.Drawing.Point(253, 194) + Me.grpNew.Name = "grpNew" + Me.grpNew.Size = New System.Drawing.Size(176, 161) + Me.grpNew.TabIndex = 4 + Me.grpNew.TabStop = False + Me.grpNew.Tag = "New" + Me.grpNew.Text = "New" + ' + 'rdoNewFromAbove + ' + Me.rdoNewFromAbove.AutoSize = True + Me.rdoNewFromAbove.Location = New System.Drawing.Point(14, 76) + Me.rdoNewFromAbove.Name = "rdoNewFromAbove" + Me.rdoNewFromAbove.Size = New System.Drawing.Size(82, 17) + Me.rdoNewFromAbove.TabIndex = 4 + Me.rdoNewFromAbove.TabStop = True + Me.rdoNewFromAbove.Text = "From Above" + Me.rdoNewFromAbove.UseVisualStyleBackColor = True ' 'ucrInputNewValue ' - Me.ucrInputNewValue.bAddRemoveParameter = True - Me.ucrInputNewValue.bChangeParameterValue = True + Me.ucrInputNewValue.AddQuotesIfUnrecognised = True Me.ucrInputNewValue.IsMultiline = False Me.ucrInputNewValue.IsReadOnly = False Me.ucrInputNewValue.Location = New System.Drawing.Point(74, 28) Me.ucrInputNewValue.Name = "ucrInputNewValue" Me.ucrInputNewValue.Size = New System.Drawing.Size(93, 21) - Me.ucrInputNewValue.TabIndex = 11 + Me.ucrInputNewValue.TabIndex = 2 + ' + 'rdoNewMissing + ' + Me.rdoNewMissing.AutoSize = True + Me.rdoNewMissing.Location = New System.Drawing.Point(14, 53) + Me.rdoNewMissing.Name = "rdoNewMissing" + Me.rdoNewMissing.Size = New System.Drawing.Size(90, 17) + Me.rdoNewMissing.TabIndex = 3 + Me.rdoNewMissing.TabStop = True + Me.rdoNewMissing.Text = "Missing Value" + Me.rdoNewMissing.UseVisualStyleBackColor = True + ' + 'rdoNewValue + ' + Me.rdoNewValue.AutoSize = True + Me.rdoNewValue.Location = New System.Drawing.Point(14, 30) + Me.rdoNewValue.Name = "rdoNewValue" + Me.rdoNewValue.Size = New System.Drawing.Size(52, 17) + Me.rdoNewValue.TabIndex = 1 + Me.rdoNewValue.TabStop = True + Me.rdoNewValue.Text = "Value" + Me.rdoNewValue.UseVisualStyleBackColor = True ' 'ucrPnlNew ' - Me.ucrPnlNew.bAddRemoveParameter = True - Me.ucrPnlNew.bChangeParameterValue = True Me.ucrPnlNew.Location = New System.Drawing.Point(6, 19) Me.ucrPnlNew.Name = "ucrPnlNew" Me.ucrPnlNew.Size = New System.Drawing.Size(164, 87) - Me.ucrPnlNew.TabIndex = 7 + Me.ucrPnlNew.TabIndex = 0 + ' + 'lblSelectedColumns + ' + Me.lblSelectedColumns.AutoSize = True + Me.lblSelectedColumns.Location = New System.Drawing.Point(249, 46) + Me.lblSelectedColumns.Name = "lblSelectedColumns" + Me.lblSelectedColumns.Size = New System.Drawing.Size(101, 13) + Me.lblSelectedColumns.TabIndex = 1 + Me.lblSelectedColumns.Tag = "Selected_Column(s)" + Me.lblSelectedColumns.Text = "Selected Column(s):" ' 'ucrReceiverReplace ' - Me.ucrReceiverReplace.bAddRemoveParameter = True - Me.ucrReceiverReplace.bChangeParameterValue = True Me.ucrReceiverReplace.frmParent = Me Me.ucrReceiverReplace.Location = New System.Drawing.Point(247, 61) Me.ucrReceiverReplace.Margin = New System.Windows.Forms.Padding(0) @@ -265,8 +262,6 @@ Partial Class dlgReplace ' 'ucrSelectorReplace ' - Me.ucrSelectorReplace.bAddRemoveParameter = True - Me.ucrSelectorReplace.bChangeParameterValue = True Me.ucrSelectorReplace.bShowHiddenColumns = False Me.ucrSelectorReplace.bUseCurrentFilter = True Me.ucrSelectorReplace.Location = New System.Drawing.Point(10, 10) @@ -282,17 +277,6 @@ Partial Class dlgReplace Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 5 ' - 'rdoNewFromAbove - ' - Me.rdoNewFromAbove.AutoSize = True - Me.rdoNewFromAbove.Location = New System.Drawing.Point(14, 76) - Me.rdoNewFromAbove.Name = "rdoNewFromAbove" - Me.rdoNewFromAbove.Size = New System.Drawing.Size(82, 17) - Me.rdoNewFromAbove.TabIndex = 16 - Me.rdoNewFromAbove.TabStop = True - Me.rdoNewFromAbove.Text = "From Above" - Me.rdoNewFromAbove.UseVisualStyleBackColor = True - ' 'dlgReplace ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/instat/dlgReplace.vb b/instat/dlgReplace.vb index e0c55374d0d..702b1249d94 100644 --- a/instat/dlgReplace.vb +++ b/instat/dlgReplace.vb @@ -13,9 +13,7 @@ ' ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . -Imports instat Imports instat.Translations -'Imports RDotNet Public Class dlgReplace Public bFirstLoad As Boolean = True @@ -48,11 +46,6 @@ Public Class dlgReplace ucrReceiverReplace.SetSingleTypeStatus(True) ucrReceiverReplace.SetParameterIsString() ucrReceiverReplace.SetExcludedDataTypes({"Date"}) - - ' Want: InstatDataObject$replace_value_in_data(old_value= 1, new_value=2, data_name="Damango", col_names="Year") - ' Want: InstatDataObject$replace_value_in_data(col_names= "Year", old_value=2, new_value = NA, data_name="Damango") - ' Want: InstatDataObject$replace_value_in_data(data_name= "Damango", col_names="Year", end_value="200", start_value="12", new_value="NA") - rdoNewFromAbove.Enabled = False '' Old: @@ -60,29 +53,25 @@ Public Class dlgReplace ucrPnlOld.AddRadioButton(rdoOldMissing) ucrPnlOld.AddRadioButton(rdoOldInterval) - 'ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "old_value") - ucrPnlOld.AddParameterValuesCondition(rdoOldValue, "old_value", "NA", bNewIsPositive:=False) - 'ucrPnlOld.AddParameterPresentCondition(rdoOldMissing, "old_value") - ucrPnlOld.AddParameterValuesCondition(rdoOldMissing, "old_value", "NA") + ucrPnlOld.AddParameterPresentCondition(rdoOldValue, "old_value") + ucrPnlOld.AddParameterValuesCondition(rdoOldMissing, "old_is_missing", "TRUE") ucrPnlOld.AddParameterPresentCondition(rdoOldInterval, "start_value") ucrPnlOld.AddParameterPresentCondition(rdoOldInterval, "end_value") - ucrPnlOld.AddToLinkedControls(ucrInputOldValue, {rdoOldValue}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOld.AddToLinkedControls(ucrInputRangeFrom, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOld.AddToLinkedControls(ucrInputRangeTo, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOld.AddToLinkedControls(ucrInputOldValue, {rdoOldValue}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) + ucrPnlOld.AddToLinkedControls(ucrInputRangeFrom, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrPnlOld.AddToLinkedControls(ucrInputRangeTo, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) ucrPnlOld.AddToLinkedControls(ucrChkMin, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOld.AddToLinkedControls(ucrChkMax, {rdoOldInterval}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) 'ucrInputOldValue - ucrInputOldValue.SetParameter(New RParameter("old_value")) - ucrInputOldValue.SetName("1") + ucrInputOldValue.SetParameter(New RParameter("old_value", 2)) ucrInputOldValue.bAddRemoveParameter = False 'ucrInputRangeFrom - ucrInputRangeFrom.SetParameter(New RParameter("start_value")) - ' no quotation marks for this - ucrInputRangeFrom.SetName("0") - ucrInputRangeFrom.bChangeParameterValue = False + ucrInputRangeFrom.SetParameter(New RParameter("start_value", 2)) + ucrInputRangeFrom.AddQuotesIfUnrecognised = False + ucrInputRangeFrom.bAddRemoveParameter = False ucrInputRangeFrom.SetLinkedDisplayControl(lblRangeMin) ucrChkMin.SetParameter(New RParameter("closed_start_value")) @@ -92,9 +81,9 @@ Public Class dlgReplace ucrChkMin.SetRDefault("FALSE") 'ucrInputRangeTo - ucrInputRangeTo.SetParameter(New RParameter("end_value")) - ucrInputRangeTo.SetName("1") - ucrInputRangeTo.bChangeParameterValue = False + ucrInputRangeTo.SetParameter(New RParameter("end_value", 3)) + ucrInputRangeTo.AddQuotesIfUnrecognised = False + ucrInputRangeTo.bAddRemoveParameter = False ucrInputRangeTo.SetLinkedDisplayControl(lblRangeMax) ucrChkMax.SetParameter(New RParameter("closed_end_value")) @@ -103,23 +92,18 @@ Public Class dlgReplace ucrChkMax.bAddRemoveParameter = False ucrChkMax.SetRDefault("FALSE") - '' NEW VALUES: ucrPnlNew.AddRadioButton(rdoNewValue) ucrPnlNew.AddRadioButton(rdoNewMissing) - ucrPnlNew.AddRadioButton(rdoNewFromAbove) + 'ucrPnlNew.AddRadioButton(rdoNewFromAbove) - ' ucrPnlNew.AddParameterPresentCondition(rdoNewValue, "new_value") - ucrPnlNew.AddParameterValuesCondition(rdoNewValue, "new_value", "NA", bNewIsPositive:=False) - ' ucrPnlNew.AddParameterPresentCondition(rdoNewMissing, "new_value") - ucrPnlNew.AddParameterValuesCondition(rdoNewMissing, "new_value", "NA") - ucrPnlNew.AddParameterPresentCondition(rdoNewFromAbove, " ") + ucrPnlNew.AddParameterPresentCondition(rdoNewValue, "new_value") + ucrPnlNew.AddParameterValuesCondition(rdoNewMissing, "new_is_missing", "TRUE") - ucrPnlNew.AddToLinkedControls(ucrInputNewValue, {rdoNewValue}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlNew.AddToLinkedControls(ucrInputNewValue, {rdoNewValue}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) ''ucrInputNewValue - ucrInputNewValue.SetParameter(New RParameter("new_value")) - ucrInputNewValue.SetName("1") + ucrInputNewValue.SetParameter(New RParameter("new_value", 4)) ucrInputNewValue.bAddRemoveParameter = False End Sub @@ -129,6 +113,8 @@ Public Class dlgReplace EnableRange() clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$replace_value_in_data") + clsDefaultFunction.AddParameter("old_value", "-99") + clsDefaultFunction.AddParameter("new_is_missing", "TRUE") ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) End Sub @@ -142,13 +128,13 @@ Public Class dlgReplace Private Sub TestOKEnabled() If (Not ucrReceiverReplace.IsEmpty()) Then - ' If (rdoOldValue.Checked AndAlso ucrInputOldValue.IsEmpty()) OrElse (rdoRange.Checked AndAlso ucrInputRangeFrom.IsEmpty() AndAlso ucrInputRangeTo.IsEmpty()) OrElse (rdoNewValue.Checked AndAlso ucrInputNewValue.IsEmpty()) Then - ' ucrBase.OKEnabled(False) - ' Else - ucrBase.OKEnabled(True) - ' End If + If ((rdoOldValue.Checked AndAlso Not ucrInputOldValue.IsEmpty) OrElse (rdoOldInterval.Checked AndAlso Not ucrInputRangeFrom.IsEmpty() AndAlso Not ucrInputRangeTo.IsEmpty()) OrElse rdoOldMissing.Checked) AndAlso ((rdoNewValue.Checked AndAlso Not ucrInputNewValue.IsEmpty) OrElse rdoNewMissing.Checked) Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If Else - ucrBase.OKEnabled(False) + ucrBase.OKEnabled(False) End If End Sub @@ -158,75 +144,34 @@ Public Class dlgReplace TestOKEnabled() End Sub - Private Sub ucrPnlOld_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOld.ControlContentsChanged - If rdoOldValue.Checked Then - ucrBase.clsRsyntax.RemoveParameter("old_value") - ucrBase.clsRsyntax.RemoveParameter("start_value") - ucrBase.clsRsyntax.RemoveParameter("end_value") - InputOldValue() - ElseIf rdoOldMissing.Checked Then - ucrBase.clsRsyntax.RemoveParameter("start_value") - ucrBase.clsRsyntax.RemoveParameter("end_value") - ucrBase.clsRsyntax.RemoveParameter("old_value") - ucrBase.clsRsyntax.AddParameter("old_value", "NA") - Else - ucrBase.clsRsyntax.RemoveParameter("old_value") - ucrBase.clsRsyntax.RemoveParameter("start_value") - ucrBase.clsRsyntax.RemoveParameter("end_value") - ucrBase.clsRsyntax.AddParameter("start_value", ucrInputNewValue.GetText()) - ucrBase.clsRsyntax.AddParameter("end_value", ucrInputNewValue.GetText()) - End If - End Sub - - Private Sub InputOldValue() + Private Sub InputValue() Dim strVarType As String - If ucrInputOldValue.IsEmpty() Then - ucrBase.clsRsyntax.RemoveParameter("old_value") - Else - If Not ucrReceiverReplace.IsEmpty Then - strVarType = ucrReceiverReplace.GetCurrentItemTypes(True)(0) - Else - strVarType = "" - End If - If (strVarType = "numeric" OrElse strVarType = "integer") Then - ucrBase.clsRsyntax.RemoveParameter("old_value") - ucrBase.clsRsyntax.AddParameter("old_value", ucrInputOldValue.GetText) - Else - ucrBase.clsRsyntax.RemoveParameter("old_value") - ucrBase.clsRsyntax.AddParameter("old_value", Chr(34) & ucrInputOldValue.GetText() & Chr(34)) - End If - End If - End Sub - - Private Sub ucrPnlNew_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlNew.ControlContentsChanged - If rdoNewValue.Checked Then - ucrBase.clsRsyntax.RemoveParameter("new_value") - InputNewValue() - ElseIf rdoNewMissing.Checked Then - ucrBase.clsRsyntax.RemoveParameter("new_value") - ucrBase.clsRsyntax.AddParameter("new_value", "NA") - End If - End Sub - - Private Sub InputNewValue() - Dim strVarType As String - - If ucrInputNewValue.IsEmpty() Then - ucrBase.clsRsyntax.RemoveParameter("new_value") - Else - If Not ucrReceiverReplace.IsEmpty Then - strVarType = ucrReceiverReplace.GetCurrentItemTypes(True)(0) + If Not ucrReceiverReplace.IsEmpty Then + strVarType = ucrReceiverReplace.GetCurrentItemTypes(True)(0) + If rdoOldValue.Checked Then + If (strVarType = "numeric" OrElse strVarType = "integer") Then + ucrInputOldValue.AddQuotesIfUnrecognised = False + Else + ucrInputOldValue.AddQuotesIfUnrecognised = True + End If + ucrBase.clsRsyntax.RemoveParameter("old_is_missing") + ElseIf rdoOldMissing.Checked Then + ucrBase.clsRsyntax.AddParameter("old_is_missing", "TRUE") Else - strVarType = "" + ucrBase.clsRsyntax.RemoveParameter("old_is_missing") End If - - If (strVarType = "numeric" OrElse strVarType = "integer") Then - ucrBase.clsRsyntax.RemoveParameter("new_value") - ucrBase.clsRsyntax.AddParameter("new_value", ucrInputNewValue.GetText()) + If rdoNewValue.Checked Then + If (strVarType = "numeric" OrElse strVarType = "integer") Then + ucrInputNewValue.AddQuotesIfUnrecognised = False + Else + ucrInputNewValue.AddQuotesIfUnrecognised = True + End If + ucrBase.clsRsyntax.RemoveParameter("new_is_missing") + ElseIf rdoNewMissing.Checked Then + ucrBase.clsRsyntax.AddParameter("new_is_missing", "TRUE") Else - ucrBase.clsRsyntax.RemoveParameter("new_value") - ucrBase.clsRsyntax.AddParameter("new_value", Chr(34) & ucrInputNewValue.GetText & Chr(34)) + ucrBase.clsRsyntax.RemoveParameter("new_is_missing") End If End If End Sub @@ -253,10 +198,17 @@ Public Class dlgReplace End If End Sub - Private Sub ucrReceiverReplace_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReplace.ControlContentsChanged, ucrSelectorReplace.ControlContentsChanged, ucrInputOldValue.ControlValueChanged, ucrInputNewValue.ControlValueChanged, ucrInputRangeFrom.ControlValueChanged, ucrInputRangeTo.ControlValueChanged - EnableRange() - InputOldValue() - InputNewValue() + Private Sub ucrReceiverReplace_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReplace.ControlContentsChanged, ucrPnlNew.ControlContentsChanged, ucrPnlOld.ControlContentsChanged, ucrInputNewValue.ControlContentsChanged, ucrInputOldValue.ControlContentsChanged, ucrInputRangeFrom.ControlContentsChanged, ucrInputRangeTo.ControlContentsChanged TestOKEnabled() End Sub + + Private Sub ucrPnlOld_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOld.ControlValueChanged, ucrPnlNew.ControlValueChanged + InputValue() + EnableRange() + End Sub + + Private Sub ucrReceiverReplace_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReplace.ControlValueChanged + InputValue() + EnableRange() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgStartofRains.Designer.vb b/instat/dlgStartofRains.Designer.vb index fe8c82031c1..b9bb1fa4f75 100644 --- a/instat/dlgStartofRains.Designer.vb +++ b/instat/dlgStartofRains.Designer.vb @@ -102,7 +102,7 @@ Partial Class dlgStartofRains ' 'nudMinimum ' - Me.nudMinimum.Location = New System.Drawing.Point(56, 8) + Me.nudMinimum.Location = New System.Drawing.Point(64, 7) Me.nudMinimum.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) Me.nudMinimum.Name = "nudMinimum" Me.nudMinimum.Size = New System.Drawing.Size(47, 20) @@ -566,7 +566,7 @@ Partial Class dlgStartofRains ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(594, 489) + Me.ClientSize = New System.Drawing.Size(594, 459) Me.Controls.Add(Me.ucrReceiverYear) Me.Controls.Add(Me.lblYear) Me.Controls.Add(Me.lblDate) @@ -663,4 +663,4 @@ Partial Class dlgStartofRains Friend WithEvents pnlDryPeriod As Panel Friend WithEvents pnlDrySpell As Panel Friend WithEvents pnlTotalRainfall As Panel -End Class +End Class \ No newline at end of file diff --git a/instat/dlgStartofRains.vb b/instat/dlgStartofRains.vb index 869066e3970..b0ea54af574 100644 --- a/instat/dlgStartofRains.vb +++ b/instat/dlgStartofRains.vb @@ -12,7 +12,9 @@ ' ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . + Imports instat.Translations + Public Class dlgStartofRains Public clsAddKey, clsDayFromAndTo, clsRainyDays, clsRollingSum, clsMinimumRainfall, clsRollingRainDays, clsFirstDOYPerYear, clsDryPeriodTen, clsWithinThirtyDays, clsDrySpell, clsYearGroupDaily, clsManipulationFirstDOYPerYear As New RFunction Public clsDryPeriodTenList, clsSubRainDays1, clsSubRainDays2, clsCombinedFilter, clsCombinedList, clsWetSpell, clsWetSpellList, clsDPOverallInterval, clsDPOverallIntervalList, clsDPRain, clsDPRainList, clsDPRainInDays As New RFunction @@ -83,7 +85,7 @@ Public Class dlgStartofRains ucrReceiverDate.Selector = ucrSelectorForStartofRains ucrReceiverDOY.Selector = ucrSelectorForStartofRains ucrReceiverDate.SetMeAsReceiver() - + nudPercentile.Minimum = 0 nudPercentile.Maximum = 1 nudPercentile.DecimalPlaces = 2 @@ -95,10 +97,19 @@ Public Class dlgStartofRains clsDPRain.SetAssignTo("Above_Threshold") clsDPRainInDays.SetRCommand("instat_calculation$new") clsDPRainInDays.SetAssignTo("Rain_Period_Length") - + clsDPOverallIntervalList.SetRCommand("list") clsDPRainList.SetRCommand("list") + ucrReceiverDate.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "date" & Chr(34)}) + ucrReceiverDOY.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "doy" & Chr(34)}) + ucrReceiverRainfall.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "rain" & Chr(34)}) + ucrReceiverYear.AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & "year" & Chr(34)}) + ucrReceiverDate.bAutoFill = True + ucrReceiverDOY.bAutoFill = True + ucrReceiverRainfall.bAutoFill = True + ucrReceiverYear.bAutoFill = True + chkDryPeriod.Enabled = False End Sub @@ -315,10 +326,10 @@ Public Class dlgStartofRains ' If we have 'Percentile' checked Private Sub WetSpell() - If rdoPercentile.checked Then - clsWetSpell.AddParameter("type", chr(34) & "calculation" & chr(34)) + If rdoPercentile.Checked Then + clsWetSpell.AddParameter("type", Chr(34) & "calculation" & Chr(34)) clsWetSpell.AddParameter("function_exp", Chr(34) & "quantile(roll_sum_Rain, c(" & nudPercentile.Value & "), na.rm=T)" & Chr(34)) - clsWetSpell.AddParameter("result_name", chr(34) & "wet_spell" & chr(34)) + clsWetSpell.AddParameter("result_name", Chr(34) & "wet_spell" & Chr(34)) clsWetSpell.AddParameter("sub_calculations", clsRFunctionParameter:=clsWetSpellList) clsWetSpellList.AddParameter("sub1", clsRFunctionParameter:=clsRollingSum, bIncludeArgumentName:=False) clsWetSpell.AddParameter("save", "0") @@ -331,7 +342,7 @@ Public Class dlgStartofRains clsWetSpell.RemoveParameterByName("save") End If End Sub - + Private Sub RollingOfRainDays() ' If rolling of rain days one is checked Then clsRollingRainDays.AddParameter("type", Chr(34) & "calculation" & Chr(34)) @@ -351,7 +362,7 @@ Public Class dlgStartofRains clsSubRainDays2.AddParameter("sub1", clsRFunctionParameter:=clsRainyDays, bIncludeArgumentName:=False) clsDrySpell.AddParameter("save", 0) clsDryPeriodTen.AddParameter("type", Chr(34) & "calculation" & Chr(34)) - clsDryPeriodTen.AddParameter("function_exp", Chr(34) & "rollapply(data = Dry_Spell, width=" & nudLengthofTime.Value & ", FUN=max, na.rm = FALSE, align='right', fill=NA)" & Chr(34)) + clsDryPeriodTen.AddParameter("function_exp", Chr(34) & "rollapply(data = Dry_Spell, width=" & nudLengthofTime.Value & ", FUN=max, na.rm = FALSE, align='left', fill=NA)" & Chr(34)) clsDryPeriodTen.AddParameter("result_name", Chr(34) & "Dry_Spell" & Chr(34)) clsDryPeriodTen.AddParameter("sub_calculations", clsRFunctionParameter:=clsDryPeriodTenList) clsDryPeriodTenList.AddParameter("sub1", clsRFunctionParameter:=clsDrySpell, bIncludeArgumentName:=False) @@ -374,21 +385,21 @@ Public Class dlgStartofRains Private Sub DryPeriodRainPeriod() If Not ucrReceiverRainfall.IsEmpty Then - clsDPRainInDays.AddParameter("type", chr(34) & "calculation" & chr(34)) + clsDPRainInDays.AddParameter("type", Chr(34) & "calculation" & Chr(34)) clsDPRainInDays.AddParameter("function_exp", Chr(34) & "rollapply(data = " & ucrReceiverRainfall.GetVariableNames(False) & " ,width = " & nudDPRainPeriod.Value & ", FUN = sum, na.rm = FALSE, align='left', fill=NA)" & Chr(34)) - clsDPRainInDays.AddParameter("result_name", chr(34) & "Rain_in_Days" & chr(34)) - clsDPRainInDays.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverRainfall.GetVariableNames & ")") - clsDPRainInDays.AddParameter("save", "0") - Else - clsDPRainInDays.RemoveParameterByName("type") - clsDPRainInDays.RemoveParameterByName("function_exp") - clsDPRainInDays.RemoveParameterByName("result_name") - clsDPRainInDays.RemoveParameterByName("calculated_from") - clsDPRainInDays.RemoveParameterByName("save") - End If - End Sub - - Private Sub DryPeriodAboveThreshold() + clsDPRainInDays.AddParameter("result_name", Chr(34) & "Rain_in_Days" & Chr(34)) + clsDPRainInDays.AddParameter("calculated_from", "list(" & strCurrDataName & "=" & ucrReceiverRainfall.GetVariableNames & ")") + clsDPRainInDays.AddParameter("save", "0") + Else + clsDPRainInDays.RemoveParameterByName("type") + clsDPRainInDays.RemoveParameterByName("function_exp") + clsDPRainInDays.RemoveParameterByName("result_name") + clsDPRainInDays.RemoveParameterByName("calculated_from") + clsDPRainInDays.RemoveParameterByName("save") + End If + End Sub + + Private Sub DryPeriodAboveThreshold() ' If this value is above 40mm, then give it a 0. Otherwise, give it a 1. (i.e., if there is a 20 day period of under 40mm of rain, it is "1") If chkDryPeriod.Checked Then clsDPRain.AddParameter("type", Chr(34) & "calculation" & Chr(34)) @@ -400,32 +411,32 @@ Public Class dlgStartofRains ' clsSubRainDays.AddParameter("sub1", clsRFunctionParameter:=clsRainyDays, bIncludeArgumentName:=False) Else clsDPRain.RemoveParameterByName("type") - clsDPRain.RemoveParameterByName("function_exp") - clsDPRain.RemoveParameterByName("result_name") - clsDPRain.RemoveParameterByName("sub_calculations") - clsDPRainList.RemoveParameterByName("sub1") - clsDPRain.RemoveParameterByName("save") - End If - End Sub + clsDPRain.RemoveParameterByName("function_exp") + clsDPRain.RemoveParameterByName("result_name") + clsDPRain.RemoveParameterByName("sub_calculations") + clsDPRainList.RemoveParameterByName("sub1") + clsDPRain.RemoveParameterByName("save") + End If + End Sub - Private Sub DryPeriodOverallInterval() - ' # Rolling sum of that ^ of a 45 day period (i.e., for the next 45 days, how many times does rainfall over 20 days not reach 40mm?) + Private Sub DryPeriodOverallInterval() + ' # Rolling sum of that ^ of a 45 day period (i.e., for the next 45 days, how many times does rainfall over 20 days not reach 40mm?) If Not ucrReceiverRainfall.IsEmpty Then - clsDPOverallInterval.AddParameter("type", chr(34) & "calculation" & chr(34)) + clsDPOverallInterval.AddParameter("type", Chr(34) & "calculation" & Chr(34)) clsDPOverallInterval.AddParameter("function_exp", Chr(34) & "rollapply(data = Above_Threshold ,width = (" & nudDPOverallInterval.Value & "-" & nudDPRainPeriod.Value & "+ 1), FUN = sum, na.rm = FALSE, align='left', fill=NA)" & Chr(34)) - clsDPOverallInterval.AddParameter("result_name", chr(34) & "DP_Overall_Interval_Rain" & chr(34)) - clsDPOverallInterval.AddParameter("sub_calculations", clsRFunctionParameter:=clsDPOverallIntervalList) - clsDPOverallIntervalList.AddParameter("sub1", clsRFunctionParameter:=clsDPRain, bIncludeArgumentName:=False) - clsDPOverallInterval.AddParameter("save", "2") - Else - clsDPOverallInterval.RemoveParameterByName("type") - clsDPOverallInterval.RemoveParameterByName("function_exp") - clsDPOverallInterval.RemoveParameterByName("result_name") - clsDPOverallInterval.RemoveParameterByName("sub_calculations") - clsDPOverallInterval.RemoveParameterByName("sub1") - clsDPOverallInterval.RemoveParameterByName("save") - End If - End Sub + clsDPOverallInterval.AddParameter("result_name", Chr(34) & "DP_Overall_Interval_Rain" & Chr(34)) + clsDPOverallInterval.AddParameter("sub_calculations", clsRFunctionParameter:=clsDPOverallIntervalList) + clsDPOverallIntervalList.AddParameter("sub1", clsRFunctionParameter:=clsDPRain, bIncludeArgumentName:=False) + clsDPOverallInterval.AddParameter("save", "2") + Else + clsDPOverallInterval.RemoveParameterByName("type") + clsDPOverallInterval.RemoveParameterByName("function_exp") + clsDPOverallInterval.RemoveParameterByName("result_name") + clsDPOverallInterval.RemoveParameterByName("sub_calculations") + clsDPOverallInterval.RemoveParameterByName("sub1") + clsDPOverallInterval.RemoveParameterByName("save") + End If + End Sub Private Sub CombinedFilter() clsCombinedFilter.AddParameter("type", Chr(34) & "filter" & Chr(34)) @@ -437,10 +448,10 @@ Public Class dlgStartofRains If chkConsecutiveRainyDays.Checked AndAlso chkTotalRainfall.Checked AndAlso chkDrySpell.Checked Then clsCombinedFilter.RemoveParameterByName("function_exp") If rdoAmount.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell < " & nudMaximumDays.Value & "& Rolling_Rain_Days >=" & nudMinimum.Value & "& roll_sum_Rain >20 & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell < " & nudMaximumDays.Value & "& Rolling_Rain_Days >=" & nudMinimum.Value & "& roll_sum_Rain >20 & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.RemoveParameterByName("sub4") ElseIf rdoPercentile.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & "& Rolling_Rain_Days >=" & nudMinimum.Value & "& roll_sum_Rain > wet_spell & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & "& Rolling_Rain_Days >=" & nudMinimum.Value & "& roll_sum_Rain > wet_spell & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.AddParameter("sub4", clsRFunctionParameter:=clsWetSpell, bIncludeArgumentName:=False) End If clsCombinedList.AddParameter("sub1", clsRFunctionParameter:=clsDryPeriodTen, bIncludeArgumentName:=False) @@ -452,10 +463,10 @@ Public Class dlgStartofRains clsCombinedFilter.RemoveParameterByName("function_exp") If rdoAmount.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & roll_sum_Rain >20 & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & roll_sum_Rain >20 & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.RemoveParameterByName("sub4") ElseIf rdoPercentile.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & roll_sum_Rain >wet_spell & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & roll_sum_Rain >wet_spell & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.AddParameter(“sub4”, clsRFunctionParameter:=clsWetSpell, bIncludeArgumentName:=False) clsCombinedList.AddParameter("sub4", clsRFunctionParameter:=clsWetSpell, bIncludeArgumentName:=False) End If @@ -467,7 +478,7 @@ Public Class dlgStartofRains ElseIf chkConsecutiveRainyDays.Checked AndAlso chkDrySpell.Checked Then clsCombinedFilter.RemoveParameterByName("function_exp") - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & Rolling_Rain_Days >= " & Chr(34) & nudMinimum.Value & Chr(34) & " & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & Rolling_Rain_Days >= " & Chr(34) & nudMinimum.Value & Chr(34) & "&" & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.AddParameter("sub1", clsRFunctionParameter:=clsDryPeriodTen, bIncludeArgumentName:=False) clsCombinedList.RemoveParameterByName("sub3") clsCombinedList.AddParameter("sub2", clsRFunctionParameter:=clsRollingRainDays, bIncludeArgumentName:=False) @@ -475,11 +486,11 @@ Public Class dlgStartofRains ElseIf chkConsecutiveRainyDays.Checked AndAlso chkTotalRainfall.Checked Then clsCombinedFilter.RemoveParameterByName("function_exp") - If rdoAmount.checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Rolling_Rain_Days >= " & nudMinimum.Value & " & roll_sum_Rain >20 & Rain>0.85" & Chr(34)) + If rdoAmount.Checked Then + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Rolling_Rain_Days >= " & nudMinimum.Value & " & roll_sum_Rain >20 & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.RemoveParameterByName("sub4") ElseIf rdoPercentile.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Rolling_Rain_Days >= " & nudMinimum.Value & " & roll_sum_Rain > wet_spell & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Rolling_Rain_Days >= " & nudMinimum.Value & " & roll_sum_Rain > wet_spell & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.AddParameter("sub4", clsRFunctionParameter:=clsWetSpell, bIncludeArgumentName:=False) End If clsCombinedList.RemoveParameterByName("sub1") @@ -488,7 +499,7 @@ Public Class dlgStartofRains ElseIf chkConsecutiveRainyDays.Checked Then clsCombinedFilter.RemoveParameterByName("function_exp") - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Rolling_Rain_Days >= " & nudMinimum.Value & " & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Rolling_Rain_Days >= " & nudMinimum.Value & "&" & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.RemoveParameterByName("sub1") clsCombinedList.RemoveParameterByName("sub3") clsCombinedList.AddParameter("sub2", clsRFunctionParameter:=clsRollingRainDays, bIncludeArgumentName:=False) @@ -496,10 +507,10 @@ Public Class dlgStartofRains ElseIf chkTotalRainfall.Checked Then clsCombinedFilter.RemoveParameterByName("function_exp") If rdoAmount.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "roll_sum_Rain >20 & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "roll_sum_Rain >20 &" & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.RemoveParameterByName("sub4") ElseIf rdoPercentile.Checked Then - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "roll_sum_Rain > wet_spell & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "roll_sum_Rain > wet_spell & " & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.AddParameter("sub4", clsRFunctionParameter:=clsWetSpell, bIncludeArgumentName:=False) End If @@ -509,7 +520,7 @@ Public Class dlgStartofRains ElseIf chkDrySpell.Checked Then clsCombinedFilter.RemoveParameterByName("function_exp") - clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & " & Rain>0.85" & Chr(34)) + clsCombinedFilter.AddParameter("function_exp", Chr(34) & "Dry_Spell <" & nudMaximumDays.Value & "&" & ucrReceiverRainfall.GetVariableNames(False) & ">0.85" & Chr(34)) clsCombinedList.AddParameter("sub1", clsRFunctionParameter:=clsDryPeriodTen, bIncludeArgumentName:=False) clsCombinedList.RemoveParameterByName("sub3") clsCombinedList.RemoveParameterByName("sub2") @@ -525,7 +536,7 @@ Public Class dlgStartofRains ' If chkDryPeriod.Checked Then ' clsCombinedFilter.RemoveParameterByName("function_exp") - ' clsCombinedFilter.AddParameter("function_exp", Chr(34) & "DP_Overall_Interval_Rain == 0 & Rain>0.85" & Chr(34)) + ' clsCombinedFilter.AddParameter("function_exp", Chr(34) & "DP_Overall_Interval_Rain == 0 & ucrReceiverRainfall.GetVariableNames(False)>0.85" & Chr(34)) End Sub Private Sub FirstDOYPerYear() @@ -566,6 +577,4 @@ Public Class dlgStartofRains Private Sub ucrBase_BeforeClickOk(sender As Object, e As EventArgs) Handles ucrBase.BeforeClickOk frmMain.clsRLink.RunScript(clsAddKey.ToScript, strComment:="Start of Rains: Defining Date column as key") End Sub - - -End Class +End Class \ No newline at end of file diff --git a/instat/dlgTransformText.Designer.vb b/instat/dlgTransformText.Designer.vb index 65cb8a34b80..b5629c32b2c 100644 --- a/instat/dlgTransformText.Designer.vb +++ b/instat/dlgTransformText.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class dlgTransformText 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,7 +20,7 @@ Partial Class dlgTransformText '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.lblColumnToTransform = New System.Windows.Forms.Label() Me.grpOperation = New System.Windows.Forms.GroupBox() @@ -72,7 +72,7 @@ Partial Class dlgTransformText Me.lblColumnToTransform.Location = New System.Drawing.Point(250, 43) Me.lblColumnToTransform.Name = "lblColumnToTransform" Me.lblColumnToTransform.Size = New System.Drawing.Size(107, 13) - Me.lblColumnToTransform.TabIndex = 3 + Me.lblColumnToTransform.TabIndex = 1 Me.lblColumnToTransform.Text = "Column to Transform:" ' 'grpOperation @@ -84,10 +84,10 @@ Partial Class dlgTransformText Me.grpOperation.Controls.Add(Me.rdoPad) Me.grpOperation.Controls.Add(Me.rdoLength) Me.grpOperation.Controls.Add(Me.ucrPnlOperation) - Me.grpOperation.Location = New System.Drawing.Point(10, 205) + Me.grpOperation.Location = New System.Drawing.Point(11, 205) Me.grpOperation.Name = "grpOperation" Me.grpOperation.Size = New System.Drawing.Size(108, 181) - Me.grpOperation.TabIndex = 6 + Me.grpOperation.TabIndex = 3 Me.grpOperation.TabStop = False Me.grpOperation.Text = "Operation" ' @@ -97,7 +97,7 @@ Partial Class dlgTransformText Me.rdoSubstring.Location = New System.Drawing.Point(8, 138) Me.rdoSubstring.Name = "rdoSubstring" Me.rdoSubstring.Size = New System.Drawing.Size(69, 17) - Me.rdoSubstring.TabIndex = 21 + Me.rdoSubstring.TabIndex = 6 Me.rdoSubstring.TabStop = True Me.rdoSubstring.Text = "Substring" Me.rdoSubstring.UseVisualStyleBackColor = True @@ -108,7 +108,7 @@ Partial Class dlgTransformText Me.rdoWords.Location = New System.Drawing.Point(8, 115) Me.rdoWords.Name = "rdoWords" Me.rdoWords.Size = New System.Drawing.Size(56, 17) - Me.rdoWords.TabIndex = 4 + Me.rdoWords.TabIndex = 5 Me.rdoWords.TabStop = True Me.rdoWords.Text = "Words" Me.rdoWords.UseVisualStyleBackColor = True @@ -119,7 +119,7 @@ Partial Class dlgTransformText Me.rdoTrim.Location = New System.Drawing.Point(8, 92) Me.rdoTrim.Name = "rdoTrim" Me.rdoTrim.Size = New System.Drawing.Size(45, 17) - Me.rdoTrim.TabIndex = 3 + Me.rdoTrim.TabIndex = 4 Me.rdoTrim.TabStop = True Me.rdoTrim.Text = "Trim" Me.rdoTrim.UseVisualStyleBackColor = True @@ -130,7 +130,7 @@ Partial Class dlgTransformText Me.rdoConvertCase.Location = New System.Drawing.Point(8, 23) Me.rdoConvertCase.Name = "rdoConvertCase" Me.rdoConvertCase.Size = New System.Drawing.Size(89, 17) - Me.rdoConvertCase.TabIndex = 0 + Me.rdoConvertCase.TabIndex = 1 Me.rdoConvertCase.TabStop = True Me.rdoConvertCase.Text = "Convert Case" Me.rdoConvertCase.UseVisualStyleBackColor = True @@ -141,7 +141,7 @@ Partial Class dlgTransformText Me.rdoPad.Location = New System.Drawing.Point(8, 69) Me.rdoPad.Name = "rdoPad" Me.rdoPad.Size = New System.Drawing.Size(44, 17) - Me.rdoPad.TabIndex = 2 + Me.rdoPad.TabIndex = 3 Me.rdoPad.TabStop = True Me.rdoPad.Text = "Pad" Me.rdoPad.UseVisualStyleBackColor = True @@ -152,19 +152,17 @@ Partial Class dlgTransformText Me.rdoLength.Location = New System.Drawing.Point(8, 46) Me.rdoLength.Name = "rdoLength" Me.rdoLength.Size = New System.Drawing.Size(58, 17) - Me.rdoLength.TabIndex = 1 + Me.rdoLength.TabIndex = 2 Me.rdoLength.TabStop = True Me.rdoLength.Text = "Length" Me.rdoLength.UseVisualStyleBackColor = True ' 'ucrPnlOperation ' - Me.ucrPnlOperation.bAddRemoveParameter = True - Me.ucrPnlOperation.bChangeParameterValue = True Me.ucrPnlOperation.Location = New System.Drawing.Point(4, 15) Me.ucrPnlOperation.Name = "ucrPnlOperation" - Me.ucrPnlOperation.Size = New System.Drawing.Size(104, 156) - Me.ucrPnlOperation.TabIndex = 9 + Me.ucrPnlOperation.Size = New System.Drawing.Size(98, 156) + Me.ucrPnlOperation.TabIndex = 0 ' 'lblToSubstring ' @@ -214,10 +212,10 @@ Partial Class dlgTransformText 'grpParameters ' Me.grpParameters.Controls.Add(Me.pnlWords) - Me.grpParameters.Location = New System.Drawing.Point(118, 205) + Me.grpParameters.Location = New System.Drawing.Point(127, 205) Me.grpParameters.Name = "grpParameters" Me.grpParameters.Size = New System.Drawing.Size(267, 181) - Me.grpParameters.TabIndex = 8 + Me.grpParameters.TabIndex = 4 Me.grpParameters.TabStop = False Me.grpParameters.Text = "Options" ' @@ -265,8 +263,6 @@ Partial Class dlgTransformText ' 'ucrInputTo ' - Me.ucrInputTo.bAddRemoveParameter = True - Me.ucrInputTo.bChangeParameterValue = True Me.ucrInputTo.IsReadOnly = False Me.ucrInputTo.Location = New System.Drawing.Point(84, 10) Me.ucrInputTo.Name = "ucrInputTo" @@ -306,8 +302,6 @@ Partial Class dlgTransformText ' 'ucrNudTo ' - Me.ucrNudTo.bAddRemoveParameter = True - Me.ucrNudTo.bChangeParameterValue = True Me.ucrNudTo.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTo.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudTo.Location = New System.Drawing.Point(84, 38) @@ -320,8 +314,6 @@ Partial Class dlgTransformText ' 'ucrPnlPad ' - Me.ucrPnlPad.bAddRemoveParameter = True - Me.ucrPnlPad.bChangeParameterValue = True Me.ucrPnlPad.Location = New System.Drawing.Point(3, 8) Me.ucrPnlPad.Name = "ucrPnlPad" Me.ucrPnlPad.Size = New System.Drawing.Size(217, 30) @@ -329,8 +321,6 @@ Partial Class dlgTransformText ' 'ucrNudFrom ' - Me.ucrNudFrom.bAddRemoveParameter = True - Me.ucrNudFrom.bChangeParameterValue = True Me.ucrNudFrom.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudFrom.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudFrom.Location = New System.Drawing.Point(84, 12) @@ -343,10 +333,8 @@ Partial Class dlgTransformText ' 'ucrInputPad ' - Me.ucrInputPad.bAddRemoveParameter = True - Me.ucrInputPad.bChangeParameterValue = True Me.ucrInputPad.IsReadOnly = False - Me.ucrInputPad.Location = New System.Drawing.Point(84, 125) + Me.ucrInputPad.Location = New System.Drawing.Point(84, 126) Me.ucrInputPad.Name = "ucrInputPad" Me.ucrInputPad.Size = New System.Drawing.Size(107, 25) Me.ucrInputPad.TabIndex = 13 @@ -362,18 +350,14 @@ Partial Class dlgTransformText ' 'ucrChkFirstOr ' - Me.ucrChkFirstOr.bAddRemoveParameter = True - Me.ucrChkFirstOr.bChangeParameterValue = True Me.ucrChkFirstOr.Checked = False Me.ucrChkFirstOr.Location = New System.Drawing.Point(3, 38) Me.ucrChkFirstOr.Name = "ucrChkFirstOr" - Me.ucrChkFirstOr.Size = New System.Drawing.Size(100, 20) + Me.ucrChkFirstOr.Size = New System.Drawing.Size(75, 20) Me.ucrChkFirstOr.TabIndex = 42 ' 'ucrNudWidth ' - Me.ucrNudWidth.bAddRemoveParameter = True - Me.ucrNudWidth.bChangeParameterValue = True Me.ucrNudWidth.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudWidth.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudWidth.Location = New System.Drawing.Point(84, 38) @@ -386,18 +370,14 @@ Partial Class dlgTransformText ' 'ucrChkLastOr ' - Me.ucrChkLastOr.bAddRemoveParameter = True - Me.ucrChkLastOr.bChangeParameterValue = True Me.ucrChkLastOr.Checked = False Me.ucrChkLastOr.Location = New System.Drawing.Point(3, 95) Me.ucrChkLastOr.Name = "ucrChkLastOr" - Me.ucrChkLastOr.Size = New System.Drawing.Size(88, 20) + Me.ucrChkLastOr.Size = New System.Drawing.Size(75, 20) Me.ucrChkLastOr.TabIndex = 43 ' 'ucrNudLastWord ' - Me.ucrNudLastWord.bAddRemoveParameter = True - Me.ucrNudLastWord.bChangeParameterValue = True Me.ucrNudLastWord.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudLastWord.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudLastWord.Location = New System.Drawing.Point(84, 66) @@ -419,8 +399,6 @@ Partial Class dlgTransformText ' 'ucrNudFirstWord ' - Me.ucrNudFirstWord.bAddRemoveParameter = True - Me.ucrNudFirstWord.bChangeParameterValue = True Me.ucrNudFirstWord.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudFirstWord.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudFirstWord.Location = New System.Drawing.Point(84, 12) @@ -433,8 +411,6 @@ Partial Class dlgTransformText ' 'ucrInputSeparator ' - Me.ucrInputSeparator.bAddRemoveParameter = True - Me.ucrInputSeparator.bChangeParameterValue = True Me.ucrInputSeparator.IsReadOnly = False Me.ucrInputSeparator.Location = New System.Drawing.Point(84, 126) Me.ucrInputSeparator.Name = "ucrInputSeparator" @@ -443,8 +419,6 @@ Partial Class dlgTransformText ' 'ucrReceiverLastWord ' - Me.ucrReceiverLastWord.bAddRemoveParameter = True - Me.ucrReceiverLastWord.bChangeParameterValue = True Me.ucrReceiverLastWord.frmParent = Me Me.ucrReceiverLastWord.Location = New System.Drawing.Point(84, 95) Me.ucrReceiverLastWord.Margin = New System.Windows.Forms.Padding(0) @@ -455,8 +429,6 @@ Partial Class dlgTransformText ' 'ucrReceiverFirstWord ' - Me.ucrReceiverFirstWord.bAddRemoveParameter = True - Me.ucrReceiverFirstWord.bChangeParameterValue = True Me.ucrReceiverFirstWord.frmParent = Me Me.ucrReceiverFirstWord.Location = New System.Drawing.Point(84, 38) Me.ucrReceiverFirstWord.Margin = New System.Windows.Forms.Padding(0) @@ -467,8 +439,6 @@ Partial Class dlgTransformText ' 'ucrReceiverTransformText ' - Me.ucrReceiverTransformText.bAddRemoveParameter = True - Me.ucrReceiverTransformText.bChangeParameterValue = True Me.ucrReceiverTransformText.frmParent = Me Me.ucrReceiverTransformText.Location = New System.Drawing.Point(252, 58) Me.ucrReceiverTransformText.Margin = New System.Windows.Forms.Padding(0) @@ -486,24 +456,20 @@ Partial Class dlgTransformText ' 'ucrNewColName ' - Me.ucrNewColName.bAddRemoveParameter = True - Me.ucrNewColName.bChangeParameterValue = True Me.ucrNewColName.Location = New System.Drawing.Point(10, 399) Me.ucrNewColName.Name = "ucrNewColName" Me.ucrNewColName.Size = New System.Drawing.Size(272, 24) - Me.ucrNewColName.TabIndex = 1 + Me.ucrNewColName.TabIndex = 5 ' 'ucrSelectorForTransformText ' - Me.ucrSelectorForTransformText.bAddRemoveParameter = True - Me.ucrSelectorForTransformText.bChangeParameterValue = True Me.ucrSelectorForTransformText.bShowHiddenColumns = False Me.ucrSelectorForTransformText.bUseCurrentFilter = True Me.ucrSelectorForTransformText.Location = New System.Drawing.Point(10, 10) Me.ucrSelectorForTransformText.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForTransformText.Name = "ucrSelectorForTransformText" Me.ucrSelectorForTransformText.Size = New System.Drawing.Size(242, 185) - Me.ucrSelectorForTransformText.TabIndex = 1 + Me.ucrSelectorForTransformText.TabIndex = 0 ' 'dlgTransformText ' diff --git a/instat/dlgTransformText.vb b/instat/dlgTransformText.vb index abb7d0f3d58..7808c4c0027 100644 --- a/instat/dlgTransformText.vb +++ b/instat/dlgTransformText.vb @@ -13,16 +13,16 @@ ' ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . -Imports instat Imports instat.Translations Public Class dlgTransformText Public bFirstLoad As Boolean = True Private bReset As Boolean = True + Private clsConvertFunction, clsLengthFunction, clsPadFunction, clsTrimFunction, clsWordsFunction, clsSubStringFunction As New RFunction Private Sub dlgTransformText_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) - If bFirstLoad Then + If bFirstLoad Then InitialiseDialog() bFirstLoad = False End If @@ -32,14 +32,9 @@ Public Class dlgTransformText End If SetRCodeForControls(bReset) bReset = False - ReopenDialog() TestOkEnabled() End Sub - Private Sub ReopenDialog() - - End Sub - Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 343 ucrBase.clsRsyntax.bUseBaseFunction = True @@ -60,21 +55,21 @@ Public Class dlgTransformText ucrPnlOperation.AddRadioButton(rdoWords) ucrPnlOperation.AddRadioButton(rdoSubstring) - ucrPnlOperation.AddFunctionNamesCondition(rdoConvertCase, "stringr::str_to_lower") ' put in all three' this changes depending which rdo is checked - ucrPnlOperation.AddFunctionNamesCondition(rdoLength, "stringr::str_length") - ucrPnlOperation.AddFunctionNamesCondition(rdoPad, "stringr::str_pad") - ucrPnlOperation.AddFunctionNamesCondition(rdoTrim, "stringr::str_trim") - ucrPnlOperation.AddFunctionNamesCondition(rdoWords, "stringr::word") - ucrPnlOperation.AddFunctionNamesCondition(rdoSubstring, "stringr::str_sub") + ucrPnlOperation.AddFunctionNamesCondition(rdoConvertCase, {"str_to_lower", "str_to_upper", "str_to_title"}) + ucrPnlOperation.AddFunctionNamesCondition(rdoLength, "str_length") + ucrPnlOperation.AddFunctionNamesCondition(rdoPad, "str_pad") + ucrPnlOperation.AddFunctionNamesCondition(rdoTrim, "str_trim") + ucrPnlOperation.AddFunctionNamesCondition(rdoWords, "word") + ucrPnlOperation.AddFunctionNamesCondition(rdoSubstring, "str_sub") 'rdoConvertCase ucrPnlOperation.AddToLinkedControls(ucrInputTo, {rdoConvertCase}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) 'ucrInputTo ucrInputTo.SetItems({"Lower", "Upper", "Title"}) - ucrInputTo.AddFunctionNamesCondition("Lower", "stringr::str_to_lower") - ucrInputTo.AddFunctionNamesCondition("Upper", "stringr::str_to_upper") - ucrInputTo.AddFunctionNamesCondition("Title", "stringr::str_to_title") + ucrInputTo.AddFunctionNamesCondition("Lower", "str_to_lower") + ucrInputTo.AddFunctionNamesCondition("Upper", "str_to_upper") + ucrInputTo.AddFunctionNamesCondition("Title", "str_to_title") ucrInputTo.SetLinkedDisplayControl(lblTo) 'rdoPad @@ -83,7 +78,7 @@ Public Class dlgTransformText 'ucrInputPad Dim dctInputPad As New Dictionary(Of String, String) - ucrInputPad.SetParameter(New RParameter("pad", )) + ucrInputPad.SetParameter(New RParameter("pad", 3)) dctInputPad.Add("Space", Chr(34) & " " & Chr(34)) dctInputPad.Add("Hash", Chr(34) & "#" & Chr(34)) dctInputPad.Add("Hyphen", Chr(34) & "-" & Chr(34)) @@ -91,117 +86,121 @@ Public Class dlgTransformText dctInputPad.Add("Underscore", Chr(34) & "_" & Chr(34)) ucrInputPad.SetItems(dctInputPad) ucrInputPad.SetLinkedDisplayControl(lblPad) - ucrInputPad.bAllowNonConditionValues = True + ucrInputPad.SetRDefault(Chr(34) & " " & Chr(34)) 'ucrNudWidth - ucrNudWidth.SetParameter(New RParameter("width")) + ucrNudWidth.SetParameter(New RParameter("width", 1)) ucrNudWidth.SetLinkedDisplayControl(lblWidth) - ucrNudWidth.SetRDefault(1) - 'rdoTrim and pnl + 'rdoTrim, rdoPad ucrPnlOperation.AddToLinkedControls(ucrPnlPad, {rdoPad, rdoTrim}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'ucrPnlPad - ucrPnlPad.SetParameter(New RParameter("side")) + ucrPnlPad.SetParameter(New RParameter("side", 2)) ucrPnlPad.AddRadioButton(rdoLeftPad, Chr(34) & "left" & Chr(34)) ucrPnlPad.AddRadioButton(rdoRightPad, Chr(34) & "right" & Chr(34)) ucrPnlPad.AddRadioButton(rdoBothPad, Chr(34) & "both" & Chr(34)) - ucrPnlPad.SetRDefault(Chr(34) & "left" & Chr(34)) ' left is the R default + ucrPnlPad.SetRDefault(Chr(34) & "left" & Chr(34)) 'rdoWords - ' ucrPnlOperation.AddToLinkedControls(ucrChkFirstOr, {rdoWords}, bNewLinkedHideIfParameterMissing:=True) - ' ucrPnlOperation.AddToLinkedControls(ucrChkLastOr, {rdoWords}, bNewLinkedHideIfParameterMissing:=True) - ' ucrPnlOperation.AddToLinkedControls(ucrNudFirstWord, {rdoWords}, bNewLinkedHideIfParameterMissing:=True) - ' ucrPnlOperation.AddToLinkedControls(ucrNudLastWord, {rdoWords}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOperation.AddToLinkedControls(ucrChkFirstOr, {rdoWords}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOperation.AddToLinkedControls(ucrChkLastOr, {rdoWords}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkFirstOr.AddToLinkedControls(ucrNudFirstWord, {False}, bNewLinkedDisabledIfParameterMissing:=True) + ucrChkFirstOr.AddToLinkedControls(ucrReceiverFirstWord, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkLastOr.AddToLinkedControls(ucrNudLastWord, {False}, bNewLinkedDisabledIfParameterMissing:=True) + ucrChkLastOr.AddToLinkedControls(ucrReceiverLastWord, {True}, bNewLinkedHideIfParameterMissing:=True) ucrPnlOperation.AddToLinkedControls(ucrInputSeparator, {rdoWords}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'if ucrChkFirstOrCol - ' ucrReceiverFirstWord.SetParameter(New RParameter("start")) - ' ucrChkFirstOr.SetParameter(ucrReceiverFirstWord.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - ' ucrReceiverFirstWord.SetParameterIsRFunction() + 'ucrChkFirstOr + ucrNudFirstWord.SetParameter(New RParameter("start", 1)) + ucrNudFirstWord.SetLinkedDisplayControl(lblFirstWord) + + ucrReceiverFirstWord.SetParameter(New RParameter("start", 1)) + ucrReceiverFirstWord.SetParameterIsRFunction() ucrReceiverFirstWord.Selector = ucrSelectorForTransformText ucrReceiverFirstWord.bUseFilteredData = False ucrReceiverFirstWord.SetIncludedDataTypes({"numeric"}) ucrChkFirstOr.SetText("Or Column") - 'ucrChkFirstOr.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ' ucrChkFirstOr.bChangeParameterValue = False - 'ucrChkFirstOr.SetRDefault("FALSE") - ' ucrChkFirstOr.AddToLinkedControls(ucrLinked:=ucrReceiverFirstWord, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkFirstOr.AddParameterIsStringCondition(False, "start", True) + ucrChkFirstOr.AddParameterIsRFunctionCondition(True, "start", True) - ' ucrNudFirstWord.SetParameter(New RParameter("start")) - ' ucrNudFirstWord.SetLinkedDisplayControl(lblFirstWord) - 'ucrNudFirstWord.SetRDefault(1) + 'ucrChkLastOr + ucrNudLastWord.SetParameter(New RParameter("end", 2)) + ucrNudLastWord.SetLinkedDisplayControl(lblLastWord) - ' ucrBase.clsRsyntax.AddParameter("end", clsRFunctionParameter:=ucrReceiverLastWord.GetVariables()) - ucrReceiverLastWord.Selector = ucrSelectorForTransformText - ucrReceiverLastWord.bUseFilteredData = False - ucrReceiverLastWord.SetIncludedDataTypes({"numeric"}) - - - 'if ucrChkorCol - ' ucrReceiverLastWord.SetParameter(New RParameter("end")) - ' ucrChkLastOr.SetParameter(ucrReceiverLastWord.GetParameter(), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) - 'ucrReceiverLastWord.SetParameterIsRFunction() 'getvariables() + ucrReceiverLastWord.SetParameter(New RParameter("end", 2)) + ucrReceiverLastWord.SetParameterIsRFunction() ucrReceiverLastWord.Selector = ucrSelectorForTransformText ucrReceiverLastWord.bUseFilteredData = False ucrReceiverLastWord.SetIncludedDataTypes({"numeric"}) ucrChkLastOr.SetText("Or Column") - 'ucrChkLastOr.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ' ucrChkLastOr.bChangeParameterValue = False - 'ucrChkLastOr.SetRDefault("FALSE") - ' ucrChkLastOr.AddToLinkedControls(ucrLinked:=ucrReceiverLastWord, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - ' ucrNudLastWord.SetParameter(New RParameter("end")) - ' ucrNudLastWord.SetLinkedDisplayControl(lblLastWord) - 'ucrNudLastWord.SetRDefault(1) + ucrChkLastOr.AddParameterIsStringCondition(False, "start", True) + ucrChkLastOr.AddParameterIsRFunctionCondition(True, "start", True) ' ucrInputSeparator Dim dctInputSeparator As New Dictionary(Of String, String) - ucrInputSeparator.SetParameter(New RParameter("sep")) - dctInputSeparator.Add("Space", Chr(34) & " " & Chr(34)) + ucrInputSeparator.SetParameter(New RParameter("sep", 3)) + dctInputSeparator.Add("Space", "fixed(" & Chr(34) & " " & Chr(34) & ")") dctInputSeparator.Add("Colon", Chr(34) & ":" & Chr(34)) - dctInputSeparator.Add("Period", Chr(34) & "." & Chr(34)) + dctInputSeparator.Add("Period", "fixed(" & Chr(34) & "." & Chr(34) & ")") dctInputSeparator.Add("Underscore", Chr(34) & "_" & Chr(34)) ucrInputSeparator.SetItems(dctInputSeparator) ucrInputSeparator.SetLinkedDisplayControl(lblSeparator) - ucrInputSeparator.SetRDefault(Chr(34) & " " & Chr(34)) + ucrInputSeparator.SetRDefault("fixed(" & Chr(34) & " " & Chr(34) & ")") 'rdoSubstring ucrPnlOperation.AddToLinkedControls(ucrNudFrom, {rdoSubstring}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOperation.AddToLinkedControls(ucrNudTo, {rdoSubstring}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'ucrNud - ucrNudFrom.SetParameter(New RParameter("start")) + 'ucrNuds + ucrNudFrom.SetParameter(New RParameter("start", 1)) ucrNudFrom.SetLinkedDisplayControl(lblFrom) - ucrNudFrom.SetRDefault(1) - ucrNudTo.SetParameter(New RParameter("end")) + ucrNudTo.SetParameter(New RParameter("end", 2)) ucrNudTo.SetLinkedDisplayControl(lblToSubstring) - ucrNudTo.SetRDefault(1) 'ucrNewColName ucrNewColName.SetIsTextBox() ucrNewColName.SetSaveTypeAsColumn() ucrNewColName.SetDataFrameSelector(ucrSelectorForTransformText.ucrAvailableDataFrames) ucrNewColName.SetLabelText("Column Name:") - ucrNewColName.SetPrefix("New_Text") End Sub Private Sub SetDefaults() - Dim clsDefaultFunction As New RFunction + clsConvertFunction = New RFunction + clsLengthFunction = New RFunction + clsPadFunction = New RFunction + clsTrimFunction = New RFunction + clsWordsFunction = New RFunction + clsSubStringFunction = New RFunction + ucrNewColName.Reset() ucrSelectorForTransformText.Reset() - ucrChkFirstOr.Checked = False - ucrChkLastOr.Checked = False - 'reset receiver in words tab - WordsTab() + NewDefaultName() + clsConvertFunction.SetRCommand("str_to_lower") + clsConvertFunction.SetAssignTo(ucrNewColName.GetText(), strTempDataframe:=ucrSelectorForTransformText.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColName.GetText) + + clsLengthFunction.SetRCommand("str_length") + + clsPadFunction.SetRCommand("str_pad") + clsPadFunction.AddParameter("pad", Chr(34) & " " & Chr(34)) + clsPadFunction.AddParameter("side", Chr(34) & "left" & Chr(34)) + clsPadFunction.AddParameter("width", 1) - clsDefaultFunction.SetRCommand("stringr::str_to_lower") - clsDefaultFunction.SetAssignTo(strTemp:=ucrNewColName.GetText, strTempDataframe:=ucrSelectorForTransformText.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColName.GetText) + clsTrimFunction.SetRCommand("str_trim") + clsTrimFunction.AddParameter("side", Chr(34) & "left" & Chr(34)) - ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) + clsWordsFunction.SetRCommand("word") + clsWordsFunction.AddParameter("start", 1) + clsWordsFunction.AddParameter("end", 2) + clsWordsFunction.AddParameter("sep", "fixed(" & Chr(34) & " " & Chr(34) & ")") + + clsSubStringFunction.SetRCommand("str_sub") + clsSubStringFunction.AddParameter("start", 1) + clsSubStringFunction.AddParameter("end", 2) + + ucrBase.clsRsyntax.SetBaseRFunction(clsConvertFunction) End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset @@ -212,30 +211,49 @@ Public Class dlgTransformText Private Sub ucrPnl_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOperation.ControlValueChanged, ucrInputTo.ControlValueChanged If rdoLength.Checked Then - ucrBase.clsRsyntax.SetFunction("stringr::str_length") + ucrBase.clsRsyntax.SetBaseRFunction(clsLengthFunction) ElseIf rdoPad.Checked Then - ucrBase.clsRsyntax.SetFunction("stringr::str_pad") + ucrBase.clsRsyntax.SetBaseRFunction(clsPadFunction) ElseIf rdoTrim.Checked Then - ucrBase.clsRsyntax.SetFunction("stringr::str_trim") + ucrBase.clsRsyntax.SetBaseRFunction(clsTrimFunction) ElseIf rdoWords.Checked Then - ucrBase.clsRsyntax.SetFunction("stringr::word") + ucrBase.clsRsyntax.SetBaseRFunction(clsWordsFunction) ElseIf rdoSubstring.Checked Then - ucrBase.clsRsyntax.SetFunction("stringr::str_sub") + ucrBase.clsRsyntax.SetBaseRFunction(clsSubStringFunction) ElseIf rdoConvertCase.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsConvertFunction) Select Case ucrInputTo.GetText Case "Lower" - ucrBase.clsRsyntax.SetFunction("stringr::str_to_lower") + ucrBase.clsRsyntax.SetFunction("str_to_lower") Case "Upper" - ucrBase.clsRsyntax.SetFunction("stringr::str_to_upper") + ucrBase.clsRsyntax.SetFunction("str_to_upper") Case "Title" - ucrBase.clsRsyntax.SetFunction("stringr::str_to_title") + ucrBase.clsRsyntax.SetFunction("str_to_title") End Select End If TestOkEnabled() + SetRCodeForControls(False) End Sub Public Sub SetRCodeForControls(bReset As Boolean) - SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrReceiverTransformText.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrNewColName.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrPnlOperation.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + + ucrInputTo.SetRCode(clsConvertFunction, bReset) + ucrInputPad.SetRCode(clsPadFunction, bReset) + ucrPnlPad.SetRCode(clsPadFunction, bReset) + ucrNudWidth.SetRCode(clsPadFunction, bReset) + ucrPnlPad.SetRCode(clsTrimFunction, bReset) + ucrChkFirstOr.SetRCode(clsWordsFunction, bReset) + ucrChkLastOr.SetRCode(clsWordsFunction, bReset) + ucrReceiverFirstWord.SetRCode(clsWordsFunction, bReset) + ucrReceiverLastWord.SetRCode(clsWordsFunction, bReset) + ucrNudFirstWord.SetRCode(clsWordsFunction, bReset) + ucrNudLastWord.SetRCode(clsWordsFunction, bReset) + ucrInputSeparator.SetRCode(clsWordsFunction, bReset) + ucrNudFrom.SetRCode(clsSubStringFunction, bReset) + ucrNudTo.SetRCode(clsSubStringFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -276,62 +294,57 @@ Public Class dlgTransformText End If End Sub - Private Sub ucrReceiverTransformText_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstWord.ControlContentsChanged, ucrNudWidth.ControlContentsChanged, ucrNudFirstWord.ControlContentsChanged, ucrNudLastWord.ControlContentsChanged, ucrNudFrom.ControlContentsChanged, ucrNudTo.ControlContentsChanged, ucrReceiverLastWord.ControlContentsChanged, ucrReceiverTransformText.ControlContentsChanged, ucrPnlOperation.ControlContentsChanged, ucrInputPad.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrInputSeparator.ControlContentsChanged, ucrInputPad.ControlContentsChanged - WordsTab() + Private Sub ucrReceiverTransformText_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFirstWord.ControlContentsChanged, ucrNudWidth.ControlContentsChanged, ucrNudFirstWord.ControlContentsChanged, ucrNudLastWord.ControlContentsChanged, ucrNudFrom.ControlContentsChanged, ucrNudTo.ControlContentsChanged, ucrReceiverLastWord.ControlContentsChanged, ucrReceiverTransformText.ControlContentsChanged, ucrPnlOperation.ControlContentsChanged, ucrInputPad.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrInputSeparator.ControlContentsChanged, ucrInputTo.ControlContentsChanged, ucrChkFirstOr.ControlContentsChanged, ucrChkLastOr.ControlContentsChanged TestOkEnabled() End Sub - Private Sub ucrChkFirstOr_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkFirstOr.ControlValueChanged, ucrChkLastOr.ControlValueChanged - WordsTab() - End Sub - ' and nuds? - - Private Sub WordsTab() + Private Sub ucrWordsTab_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkFirstOr.ControlValueChanged, ucrChkLastOr.ControlValueChanged, ucrPnlOperation.ControlValueChanged If rdoWords.Checked Then - lblFirstWord.Visible = True ucrNudFirstWord.Visible = True - ucrChkFirstOr.Visible = True - lblLastWord.Visible = True ucrNudLastWord.Visible = True - ucrChkLastOr.Visible = True If ucrChkFirstOr.Checked Then ucrBase.clsRsyntax.RemoveParameter("start") - ucrNudFirstWord.Enabled = False - ucrReceiverFirstWord.Visible = True ucrReceiverFirstWord.SetMeAsReceiver() ucrBase.clsRsyntax.AddParameter("start", clsRFunctionParameter:=ucrReceiverFirstWord.GetVariables()) Else ucrBase.clsRsyntax.RemoveParameter("start") - ucrNudFirstWord.Enabled = True - ucrReceiverFirstWord.Visible = False - ucrReceiverTransformText.SetMeAsReceiver() + If ucrChkLastOr.Checked Then + ucrReceiverLastWord.SetMeAsReceiver() + Else + ucrReceiverTransformText.SetMeAsReceiver() + End If ucrBase.clsRsyntax.AddParameter("start", ucrNudFirstWord.Value) End If If ucrChkLastOr.Checked Then ucrBase.clsRsyntax.RemoveParameter("end") - ucrNudLastWord.Enabled = False - ucrReceiverLastWord.Visible = True ucrReceiverLastWord.SetMeAsReceiver() ucrBase.clsRsyntax.AddParameter("end", clsRFunctionParameter:=ucrReceiverLastWord.GetVariables()) Else ucrBase.clsRsyntax.RemoveParameter("end") - ucrReceiverLastWord.Visible = False - ucrReceiverTransformText.SetMeAsReceiver() - ucrNudLastWord.Enabled = True ucrBase.clsRsyntax.AddParameter("end", ucrNudLastWord.Value) + If ucrChkFirstOr.Checked Then + ucrReceiverFirstWord.SetMeAsReceiver() + Else + ucrReceiverTransformText.SetMeAsReceiver() + End If End If Else - lblFirstWord.Visible = False + ucrReceiverTransformText.SetMeAsReceiver() ucrNudFirstWord.Visible = False - ucrChkFirstOr.Visible = False - lblLastWord.Visible = False ucrNudLastWord.Visible = False - ucrChkLastOr.Visible = False - ucrReceiverFirstWord.Visible = False - ucrReceiverLastWord.Visible = False ucrBase.clsRsyntax.RemoveParameter("start") ucrBase.clsRsyntax.RemoveParameter("end") End If End Sub + + Private Sub NewDefaultName() + If (Not ucrNewColName.bUserTyped) AndAlso ucrSelectorForTransformText.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then + ucrNewColName.SetName(ucrSelectorForTransformText.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_Transformed") + End If + End Sub + + Private Sub ucrSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorForTransformText.ControlValueChanged + NewDefaultName() + End Sub End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index a4aac646ee5..4bb2785da19 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -214,6 +214,7 @@ Partial Class frmMain Me.mnuClimaticSCFSupportCorrelations = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticSCFSupportPrincipalComponents = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticSCFSupportCanonicalCorrelations = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticSCFSupportCumulativeExceedanceGraphs = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimateMethods = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimateMethodsDataManipulation = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimateMethodsDataManipulationStartOfRain = New System.Windows.Forms.ToolStripMenuItem() @@ -412,6 +413,7 @@ Partial Class frmMain Me.mnuPrepareRObjectsDelete = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCorruption = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCorruptionFile = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuCorruptionDefineCorruptionData = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCorruptionPrepare = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCorruptionDescribe = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCorruptionModel = New System.Windows.Forms.ToolStripMenuItem() @@ -424,7 +426,6 @@ Partial Class frmMain Me.mnuToolsSaveCurrentOptions = New System.Windows.Forms.ToolStripMenuItem() Me.mnuToolsLoadOptions = New System.Windows.Forms.ToolStripMenuItem() Me.mnuToolsOptions = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuCorruptionDefineCorruptionData = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -1446,7 +1447,6 @@ Partial Class frmMain ' 'mnuClimaticPrepareEventsStartoftheRains ' - Me.mnuClimaticPrepareEventsStartoftheRains.Enabled = False Me.mnuClimaticPrepareEventsStartoftheRains.Name = "mnuClimaticPrepareEventsStartoftheRains" Me.mnuClimaticPrepareEventsStartoftheRains.Size = New System.Drawing.Size(172, 22) Me.mnuClimaticPrepareEventsStartoftheRains.Text = "Start of the Rains..." @@ -1705,7 +1705,7 @@ Partial Class frmMain ' 'mnuClimaticSCF ' - Me.mnuClimaticSCF.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticSCFSupportOpenSST, Me.mnuClimaticSCFSupportExporttoCPT, Me.ToolStripSeparator32, Me.mnuClimaticSCFSupportCorrelations, Me.mnuClimaticSCFSupportPrincipalComponents, Me.mnuClimaticSCFSupportCanonicalCorrelations}) + Me.mnuClimaticSCF.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticSCFSupportOpenSST, Me.mnuClimaticSCFSupportExporttoCPT, Me.ToolStripSeparator32, Me.mnuClimaticSCFSupportCorrelations, Me.mnuClimaticSCFSupportPrincipalComponents, Me.mnuClimaticSCFSupportCanonicalCorrelations, Me.mnuClimaticSCFSupportCumulativeExceedanceGraphs}) Me.mnuClimaticSCF.Name = "mnuClimaticSCF" Me.mnuClimaticSCF.Size = New System.Drawing.Size(191, 22) Me.mnuClimaticSCF.Text = "SCF Support" @@ -1713,39 +1713,45 @@ Partial Class frmMain 'mnuClimaticSCFSupportOpenSST ' Me.mnuClimaticSCFSupportOpenSST.Name = "mnuClimaticSCFSupportOpenSST" - Me.mnuClimaticSCFSupportOpenSST.Size = New System.Drawing.Size(203, 22) + Me.mnuClimaticSCFSupportOpenSST.Size = New System.Drawing.Size(250, 22) Me.mnuClimaticSCFSupportOpenSST.Text = "Open SST..." ' 'mnuClimaticSCFSupportExporttoCPT ' Me.mnuClimaticSCFSupportExporttoCPT.Name = "mnuClimaticSCFSupportExporttoCPT" - Me.mnuClimaticSCFSupportExporttoCPT.Size = New System.Drawing.Size(203, 22) + Me.mnuClimaticSCFSupportExporttoCPT.Size = New System.Drawing.Size(250, 22) Me.mnuClimaticSCFSupportExporttoCPT.Tag = "Export_to_CPT" Me.mnuClimaticSCFSupportExporttoCPT.Text = "Export to CPT..." ' 'ToolStripSeparator32 ' Me.ToolStripSeparator32.Name = "ToolStripSeparator32" - Me.ToolStripSeparator32.Size = New System.Drawing.Size(200, 6) + Me.ToolStripSeparator32.Size = New System.Drawing.Size(247, 6) ' 'mnuClimaticSCFSupportCorrelations ' Me.mnuClimaticSCFSupportCorrelations.Name = "mnuClimaticSCFSupportCorrelations" - Me.mnuClimaticSCFSupportCorrelations.Size = New System.Drawing.Size(203, 22) + Me.mnuClimaticSCFSupportCorrelations.Size = New System.Drawing.Size(250, 22) Me.mnuClimaticSCFSupportCorrelations.Text = "Correlations..." ' 'mnuClimaticSCFSupportPrincipalComponents ' Me.mnuClimaticSCFSupportPrincipalComponents.Name = "mnuClimaticSCFSupportPrincipalComponents" - Me.mnuClimaticSCFSupportPrincipalComponents.Size = New System.Drawing.Size(203, 22) + Me.mnuClimaticSCFSupportPrincipalComponents.Size = New System.Drawing.Size(250, 22) Me.mnuClimaticSCFSupportPrincipalComponents.Text = "Principal Components..." ' 'mnuClimaticSCFSupportCanonicalCorrelations ' Me.mnuClimaticSCFSupportCanonicalCorrelations.Name = "mnuClimaticSCFSupportCanonicalCorrelations" - Me.mnuClimaticSCFSupportCanonicalCorrelations.Size = New System.Drawing.Size(203, 22) + Me.mnuClimaticSCFSupportCanonicalCorrelations.Size = New System.Drawing.Size(250, 22) Me.mnuClimaticSCFSupportCanonicalCorrelations.Text = "Canonical Correlations..." ' + 'mnuClimaticSCFSupportCumulativeExceedanceGraphs + ' + Me.mnuClimaticSCFSupportCumulativeExceedanceGraphs.Name = "mnuClimaticSCFSupportCumulativeExceedanceGraphs" + Me.mnuClimaticSCFSupportCumulativeExceedanceGraphs.Size = New System.Drawing.Size(250, 22) + Me.mnuClimaticSCFSupportCumulativeExceedanceGraphs.Text = "Cumulative/Exceedance Graphs..." + ' 'mnuClimateMethods ' Me.mnuClimateMethods.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimateMethodsDataManipulation, Me.mnuClimateMethodsGraphics, Me.mnuClimateMethodsModel, Me.mnuClimateMethodsAdditional, Me.mnuClimateMethodsCreateClimateObject}) @@ -3178,6 +3184,12 @@ Partial Class frmMain Me.mnuCorruptionFile.Size = New System.Drawing.Size(205, 22) Me.mnuCorruptionFile.Text = "File..." ' + 'mnuCorruptionDefineCorruptionData + ' + Me.mnuCorruptionDefineCorruptionData.Name = "mnuCorruptionDefineCorruptionData" + Me.mnuCorruptionDefineCorruptionData.Size = New System.Drawing.Size(205, 22) + Me.mnuCorruptionDefineCorruptionData.Text = "Define Corruption Data..." + ' 'mnuCorruptionPrepare ' Me.mnuCorruptionPrepare.Name = "mnuCorruptionPrepare" @@ -3262,12 +3274,6 @@ Partial Class frmMain Me.mnuToolsOptions.Tag = "Options..." Me.mnuToolsOptions.Text = "Options..." ' - 'mnuCorruptionDefineCorruptionData - ' - Me.mnuCorruptionDefineCorruptionData.Name = "mnuCorruptionDefineCorruptionData" - Me.mnuCorruptionDefineCorruptionData.Size = New System.Drawing.Size(205, 22) - Me.mnuCorruptionDefineCorruptionData.Text = "Define Corruption Data..." - ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -3694,4 +3700,5 @@ Partial Class frmMain Friend WithEvents ToolStripSeparator18 As ToolStripSeparator Friend WithEvents Extremes As ToolStripMenuItem Friend WithEvents mnuCorruptionDefineCorruptionData As ToolStripMenuItem + Friend WithEvents mnuClimaticSCFSupportCumulativeExceedanceGraphs As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 366f1855d22..3805c208881 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1147,6 +1147,10 @@ Public Class frmMain dlgDefineCorruption.ShowDialog() End Sub + Private Sub mnuClimaticSCFSupportCumulativeExceedanceGraphs_Click(sender As Object, e As EventArgs) Handles mnuClimaticSCFSupportCumulativeExceedanceGraphs.Click + dlgCumulativeDistribution.ShowDialog() + End Sub + 'Private Sub TESTToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TESTToolStripMenuItem.Click ' 'TEST temporary diff --git a/instat/sdgClimdexIndices.Designer.vb b/instat/sdgClimdexIndices.Designer.vb index d11adba6ca8..793be9ecb0c 100644 --- a/instat/sdgClimdexIndices.Designer.vb +++ b/instat/sdgClimdexIndices.Designer.vb @@ -23,785 +23,825 @@ Partial Class sdgClimdexIndices Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Me.chkFrostDays = New System.Windows.Forms.CheckBox() - Me.chkTropicalNights = New System.Windows.Forms.CheckBox() - Me.chkIcingDays = New System.Windows.Forms.CheckBox() - Me.chkSummerDays = New System.Windows.Forms.CheckBox() - Me.panIndices = New System.Windows.Forms.Panel() - Me.lbl26 = New System.Windows.Forms.Label() - Me.lbl27 = New System.Windows.Forms.Label() - Me.lbl24 = New System.Windows.Forms.Label() - Me.lbl25 = New System.Windows.Forms.Label() - Me.lbl21 = New System.Windows.Forms.Label() - Me.lbl22 = New System.Windows.Forms.Label() - Me.lbl23 = New System.Windows.Forms.Label() - Me.lbl20 = New System.Windows.Forms.Label() - Me.lbl14 = New System.Windows.Forms.Label() - Me.lbl18 = New System.Windows.Forms.Label() - Me.lbl19 = New System.Windows.Forms.Label() - Me.lbl17 = New System.Windows.Forms.Label() - Me.lbl16 = New System.Windows.Forms.Label() - Me.lbl15 = New System.Windows.Forms.Label() - Me.lbl6 = New System.Windows.Forms.Label() - Me.lbl8 = New System.Windows.Forms.Label() - Me.lbl12 = New System.Windows.Forms.Label() - Me.lbl9 = New System.Windows.Forms.Label() - Me.lbl13 = New System.Windows.Forms.Label() - Me.lbl7 = New System.Windows.Forms.Label() - Me.lbl11 = New System.Windows.Forms.Label() - Me.lbl10 = New System.Windows.Forms.Label() - Me.lbl2 = New System.Windows.Forms.Label() - Me.lbl3 = New System.Windows.Forms.Label() - Me.lbl4 = New System.Windows.Forms.Label() - Me.lbl5 = New System.Windows.Forms.Label() - Me.lbl1 = New System.Windows.Forms.Label() - Me.chkPrecExceed99Percent = New System.Windows.Forms.CheckBox() - Me.chkMaxWetSpell = New System.Windows.Forms.CheckBox() - Me.chkPrecExceedSpecifiedA = New System.Windows.Forms.CheckBox() - Me.chkMonthlyMax5dayPrec = New System.Windows.Forms.CheckBox() - Me.chkTmaxAbove90Percent = New System.Windows.Forms.CheckBox() - Me.chkTminAbove90Percent = New System.Windows.Forms.CheckBox() - Me.chkPrecExceed95Percent = New System.Windows.Forms.CheckBox() - Me.chkMonthlyMinDailyTMin = New System.Windows.Forms.CheckBox() - Me.chkMonthlyMaxDailyTMax = New System.Windows.Forms.CheckBox() - Me.chkMaxDrySpell = New System.Windows.Forms.CheckBox() - Me.chkPrecExceed20mm = New System.Windows.Forms.CheckBox() - Me.chkSimplePrecII = New System.Windows.Forms.CheckBox() - Me.chkTotalDailyPrec = New System.Windows.Forms.CheckBox() - Me.chkColdSpellDI = New System.Windows.Forms.CheckBox() - Me.chkTmaxBelow10Percent = New System.Windows.Forms.CheckBox() - Me.chkTminBelow10Percent = New System.Windows.Forms.CheckBox() - Me.chkMonthlyMinDailyTMax = New System.Windows.Forms.CheckBox() - Me.chkPrecExceed10mm = New System.Windows.Forms.CheckBox() - Me.chkMonthlyMax1dayPrec = New System.Windows.Forms.CheckBox() - Me.chkMeanDiurnalTempRange = New System.Windows.Forms.CheckBox() - Me.chkWarmSpellDI = New System.Windows.Forms.CheckBox() - Me.chkMonthlyMaxDailyTMin = New System.Windows.Forms.CheckBox() - Me.chkGrowingSeasonLength = New System.Windows.Forms.CheckBox() Me.ttClimdexIndices = New System.Windows.Forms.ToolTip(Me.components) - Me.grpClimdexIndices = New System.Windows.Forms.GroupBox() - Me.ucrButtonsClimdexIndices = New instat.ucrButtonsSubdialogue() + Me.cmdHelp = New System.Windows.Forms.Button() + Me.tbPrecipitation = New System.Windows.Forms.TabPage() + Me.grpPrecAnnual = New System.Windows.Forms.GroupBox() + Me.ucrChkPrecExceedSpecifiedA = New instat.ucrCheck() + Me.ucrChkMaxDrySpell = New instat.ucrCheck() + Me.ucrChkPrecExceed95Percent = New instat.ucrCheck() + Me.ucrChkPrecExceed10mm = New instat.ucrCheck() + Me.ucrChkMaxWetSpell = New instat.ucrCheck() + Me.ucrChkPrecExceed20mm = New instat.ucrCheck() + Me.ucrChkPrecExceed99Percent = New instat.ucrCheck() + Me.ucrChkTotalDailyPrec = New instat.ucrCheck() + Me.ucrChkSimplePrecII = New instat.ucrCheck() + Me.grpPrecAnnualMonthly = New System.Windows.Forms.GroupBox() + Me.ucrChkMonthlyMax5dayPrec = New instat.ucrCheck() + Me.ucrChkMonthlyMax1dayPrec = New instat.ucrCheck() + Me.tbTemperature = New System.Windows.Forms.TabPage() + Me.grpTmaxTmin = New System.Windows.Forms.GroupBox() + Me.grpTmaxTminAnnualMonthly = New System.Windows.Forms.GroupBox() + Me.ucrChkMeanDiurnalTempRange = New instat.ucrCheck() + Me.grpTmaxTminAnnual = New System.Windows.Forms.GroupBox() + Me.ucrChkGrowingSeasonLength = New instat.ucrCheck() + Me.grpTmax = New System.Windows.Forms.GroupBox() + Me.grpTmaxAnnualMonthly = New System.Windows.Forms.GroupBox() + Me.ucrChkMonthlyMaxDailyTMax = New instat.ucrCheck() + Me.ucrChkTmaxAbove90Percent = New instat.ucrCheck() + Me.ucrChkTmaxBelow10Percent = New instat.ucrCheck() + Me.ucrChkMonthlyMinDailyTMax = New instat.ucrCheck() + Me.grpTmaxAnnual = New System.Windows.Forms.GroupBox() + Me.ucrChkSummerDays = New instat.ucrCheck() + Me.ucrChkWarmSpellDI = New instat.ucrCheck() + Me.ucrChkIcingDays = New instat.ucrCheck() + Me.grpTmin = New System.Windows.Forms.GroupBox() + Me.grpTminAnnualMonthly = New System.Windows.Forms.GroupBox() + Me.ucrChkMonthlyMinDailyTMin = New instat.ucrCheck() + Me.ucrChkMonthlyMaxDailyTMin = New instat.ucrCheck() + Me.ucrChkTminBelow10Percent = New instat.ucrCheck() + Me.ucrChkTminAbove90Percent = New instat.ucrCheck() + Me.grpTminAnnual = New System.Windows.Forms.GroupBox() + Me.ucrChkColdSpellDI = New instat.ucrCheck() + Me.ucrChkTropicalNights = New instat.ucrCheck() + Me.ucrChkFrostDays = New instat.ucrCheck() + Me.TbSettings = New System.Windows.Forms.TabPage() + Me.ucrInputPrecQtiles = New instat.ucrInputTextBox() + Me.ucrInputTempQtiles = New instat.ucrInputTextBox() + Me.lblGSLMode = New System.Windows.Forms.Label() + Me.ucrInputGSLMode = New instat.ucrInputComboBox() + Me.grpBaseRange = New System.Windows.Forms.GroupBox() + Me.lblBaseTo = New System.Windows.Forms.Label() + Me.ucrNudUpperBase = New instat.ucrNud() + Me.lblBaseFrom = New System.Windows.Forms.Label() + Me.ucrNudLowerBase = New instat.ucrNud() + Me.ucrChkCenterMean = New instat.ucrCheck() + Me.ucrChkSpellDISpanYear = New instat.ucrCheck() + Me.ucrChkNHemisphere = New instat.ucrCheck() + Me.ucrChkMaxSpellSpanYears = New instat.ucrCheck() + Me.ucrNudN = New instat.ucrNud() + Me.ucrNudThreshold = New instat.ucrNud() + Me.ucrNudMinBaseData = New instat.ucrNud() + Me.lblFreq = New System.Windows.Forms.Label() + Me.lblMinBaseData = New System.Windows.Forms.Label() + Me.ucrInputFreq = New instat.ucrInputComboBox() + Me.lblPrecQuantiles = New System.Windows.Forms.Label() + Me.lblTempQuantiles = New System.Windows.Forms.Label() + Me.grpMaxMissingDays = New System.Windows.Forms.GroupBox() + Me.lblMonthly = New System.Windows.Forms.Label() + Me.lblAnnual = New System.Windows.Forms.Label() + Me.ucrNudMothlyMissingDays = New instat.ucrNud() + Me.ucrNudAnnualMissingDays = New instat.ucrNud() + Me.lblN = New System.Windows.Forms.Label() Me.lblThreshold = New System.Windows.Forms.Label() - Me.nudThreshold = New System.Windows.Forms.NumericUpDown() - Me.chkCenterMean = New System.Windows.Forms.CheckBox() - Me.chkMaxSpellSpanYears = New System.Windows.Forms.CheckBox() - Me.chkSpellDISpanYear = New System.Windows.Forms.CheckBox() - Me.panIndices.SuspendLayout() - Me.grpClimdexIndices.SuspendLayout() - CType(Me.nudThreshold, System.ComponentModel.ISupportInitialize).BeginInit() + Me.tbClimdex = New System.Windows.Forms.TabControl() + Me.ucrButtonsClimdexIndices = New instat.ucrButtonsSubdialogue() + Me.tbPrecipitation.SuspendLayout() + Me.grpPrecAnnual.SuspendLayout() + Me.grpPrecAnnualMonthly.SuspendLayout() + Me.tbTemperature.SuspendLayout() + Me.grpTmaxTmin.SuspendLayout() + Me.grpTmaxTminAnnualMonthly.SuspendLayout() + Me.grpTmaxTminAnnual.SuspendLayout() + Me.grpTmax.SuspendLayout() + Me.grpTmaxAnnualMonthly.SuspendLayout() + Me.grpTmaxAnnual.SuspendLayout() + Me.grpTmin.SuspendLayout() + Me.grpTminAnnualMonthly.SuspendLayout() + Me.grpTminAnnual.SuspendLayout() + Me.TbSettings.SuspendLayout() + Me.grpBaseRange.SuspendLayout() + Me.grpMaxMissingDays.SuspendLayout() + Me.tbClimdex.SuspendLayout() Me.SuspendLayout() ' - 'chkFrostDays - ' - Me.chkFrostDays.AutoSize = True - Me.chkFrostDays.Location = New System.Drawing.Point(27, 8) - Me.chkFrostDays.Name = "chkFrostDays" - Me.chkFrostDays.Size = New System.Drawing.Size(76, 17) - Me.chkFrostDays.TabIndex = 1 - Me.chkFrostDays.Tag = "Frost_Days" - Me.chkFrostDays.Text = "Frost Days" - Me.chkFrostDays.UseVisualStyleBackColor = True - ' - 'chkTropicalNights - ' - Me.chkTropicalNights.AutoSize = True - Me.chkTropicalNights.Location = New System.Drawing.Point(27, 62) - Me.chkTropicalNights.Name = "chkTropicalNights" - Me.chkTropicalNights.Size = New System.Drawing.Size(97, 17) - Me.chkTropicalNights.TabIndex = 7 - Me.chkTropicalNights.Tag = "Tropical_Nights" - Me.chkTropicalNights.Text = "Tropical Nights" - Me.chkTropicalNights.UseVisualStyleBackColor = True - ' - 'chkIcingDays - ' - Me.chkIcingDays.AutoSize = True - Me.chkIcingDays.Location = New System.Drawing.Point(27, 44) - Me.chkIcingDays.Name = "chkIcingDays" - Me.chkIcingDays.Size = New System.Drawing.Size(76, 17) - Me.chkIcingDays.TabIndex = 5 - Me.chkIcingDays.Tag = "Icing_Days" - Me.chkIcingDays.Text = "Icing Days" - Me.chkIcingDays.UseVisualStyleBackColor = True - ' - 'chkSummerDays - ' - Me.chkSummerDays.AutoSize = True - Me.chkSummerDays.Location = New System.Drawing.Point(27, 26) - Me.chkSummerDays.Name = "chkSummerDays" - Me.chkSummerDays.Size = New System.Drawing.Size(91, 17) - Me.chkSummerDays.TabIndex = 3 - Me.chkSummerDays.Tag = "Summer_Days" - Me.chkSummerDays.Text = "Summer Days" - Me.chkSummerDays.UseVisualStyleBackColor = True - ' - 'panIndices - ' - Me.panIndices.AutoScroll = True - Me.panIndices.Controls.Add(Me.lbl26) - Me.panIndices.Controls.Add(Me.lbl27) - Me.panIndices.Controls.Add(Me.lbl24) - Me.panIndices.Controls.Add(Me.lbl25) - Me.panIndices.Controls.Add(Me.lbl21) - Me.panIndices.Controls.Add(Me.lbl22) - Me.panIndices.Controls.Add(Me.lbl23) - Me.panIndices.Controls.Add(Me.lbl20) - Me.panIndices.Controls.Add(Me.lbl14) - Me.panIndices.Controls.Add(Me.lbl18) - Me.panIndices.Controls.Add(Me.lbl19) - Me.panIndices.Controls.Add(Me.lbl17) - Me.panIndices.Controls.Add(Me.lbl16) - Me.panIndices.Controls.Add(Me.lbl15) - Me.panIndices.Controls.Add(Me.lbl6) - Me.panIndices.Controls.Add(Me.lbl8) - Me.panIndices.Controls.Add(Me.lbl12) - Me.panIndices.Controls.Add(Me.lbl9) - Me.panIndices.Controls.Add(Me.lbl13) - Me.panIndices.Controls.Add(Me.lbl7) - Me.panIndices.Controls.Add(Me.lbl11) - Me.panIndices.Controls.Add(Me.lbl10) - Me.panIndices.Controls.Add(Me.lbl2) - Me.panIndices.Controls.Add(Me.lbl3) - Me.panIndices.Controls.Add(Me.lbl4) - Me.panIndices.Controls.Add(Me.lbl5) - Me.panIndices.Controls.Add(Me.lbl1) - Me.panIndices.Controls.Add(Me.chkPrecExceed99Percent) - Me.panIndices.Controls.Add(Me.chkMaxWetSpell) - Me.panIndices.Controls.Add(Me.chkPrecExceedSpecifiedA) - Me.panIndices.Controls.Add(Me.chkMonthlyMax5dayPrec) - Me.panIndices.Controls.Add(Me.chkTmaxAbove90Percent) - Me.panIndices.Controls.Add(Me.chkTminAbove90Percent) - Me.panIndices.Controls.Add(Me.chkPrecExceed95Percent) - Me.panIndices.Controls.Add(Me.chkMonthlyMinDailyTMin) - Me.panIndices.Controls.Add(Me.chkMonthlyMaxDailyTMax) - Me.panIndices.Controls.Add(Me.chkMaxDrySpell) - Me.panIndices.Controls.Add(Me.chkPrecExceed20mm) - Me.panIndices.Controls.Add(Me.chkSimplePrecII) - Me.panIndices.Controls.Add(Me.chkTotalDailyPrec) - Me.panIndices.Controls.Add(Me.chkColdSpellDI) - Me.panIndices.Controls.Add(Me.chkTmaxBelow10Percent) - Me.panIndices.Controls.Add(Me.chkTminBelow10Percent) - Me.panIndices.Controls.Add(Me.chkMonthlyMinDailyTMax) - Me.panIndices.Controls.Add(Me.chkPrecExceed10mm) - Me.panIndices.Controls.Add(Me.chkMonthlyMax1dayPrec) - Me.panIndices.Controls.Add(Me.chkMeanDiurnalTempRange) - Me.panIndices.Controls.Add(Me.chkWarmSpellDI) - Me.panIndices.Controls.Add(Me.chkMonthlyMaxDailyTMin) - Me.panIndices.Controls.Add(Me.chkGrowingSeasonLength) - Me.panIndices.Controls.Add(Me.chkFrostDays) - Me.panIndices.Controls.Add(Me.chkIcingDays) - Me.panIndices.Controls.Add(Me.chkSummerDays) - Me.panIndices.Controls.Add(Me.chkTropicalNights) - Me.panIndices.Location = New System.Drawing.Point(6, 19) - Me.panIndices.Name = "panIndices" - Me.panIndices.Size = New System.Drawing.Size(372, 130) - Me.panIndices.TabIndex = 0 - ' - 'lbl26 - ' - Me.lbl26.AutoSize = True - Me.lbl26.Location = New System.Drawing.Point(5, 456) - Me.lbl26.Name = "lbl26" - Me.lbl26.Size = New System.Drawing.Size(22, 13) - Me.lbl26.TabIndex = 50 - Me.lbl26.Tag = "26." - Me.lbl26.Text = "26." - ' - 'lbl27 - ' - Me.lbl27.AutoSize = True - Me.lbl27.Location = New System.Drawing.Point(5, 473) - Me.lbl27.Name = "lbl27" - Me.lbl27.Size = New System.Drawing.Size(22, 13) - Me.lbl27.TabIndex = 52 - Me.lbl27.Tag = "27." - Me.lbl27.Text = "27." - ' - 'lbl24 - ' - Me.lbl24.AutoSize = True - Me.lbl24.Location = New System.Drawing.Point(5, 422) - Me.lbl24.Name = "lbl24" - Me.lbl24.Size = New System.Drawing.Size(22, 13) - Me.lbl24.TabIndex = 46 - Me.lbl24.Tag = "24." - Me.lbl24.Text = "24." - ' - 'lbl25 - ' - Me.lbl25.AutoSize = True - Me.lbl25.Location = New System.Drawing.Point(5, 439) - Me.lbl25.Name = "lbl25" - Me.lbl25.Size = New System.Drawing.Size(22, 13) - Me.lbl25.TabIndex = 48 - Me.lbl25.Tag = "25." - Me.lbl25.Text = "25." - ' - 'lbl21 - ' - Me.lbl21.AutoSize = True - Me.lbl21.Location = New System.Drawing.Point(5, 370) - Me.lbl21.Name = "lbl21" - Me.lbl21.Size = New System.Drawing.Size(22, 13) - Me.lbl21.TabIndex = 40 - Me.lbl21.Tag = "21." - Me.lbl21.Text = "21." - ' - 'lbl22 - ' - Me.lbl22.AutoSize = True - Me.lbl22.Location = New System.Drawing.Point(5, 389) - Me.lbl22.Name = "lbl22" - Me.lbl22.Size = New System.Drawing.Size(22, 13) - Me.lbl22.TabIndex = 42 - Me.lbl22.Tag = "22." - Me.lbl22.Text = "22." - ' - 'lbl23 - ' - Me.lbl23.AutoSize = True - Me.lbl23.Location = New System.Drawing.Point(5, 405) - Me.lbl23.Name = "lbl23" - Me.lbl23.Size = New System.Drawing.Size(22, 13) - Me.lbl23.TabIndex = 44 - Me.lbl23.Tag = "23." - Me.lbl23.Text = "23." - ' - 'lbl20 - ' - Me.lbl20.AutoSize = True - Me.lbl20.Location = New System.Drawing.Point(5, 350) - Me.lbl20.Name = "lbl20" - Me.lbl20.Size = New System.Drawing.Size(22, 13) - Me.lbl20.TabIndex = 38 - Me.lbl20.Tag = "20." - Me.lbl20.Text = "20." - ' - 'lbl14 - ' - Me.lbl14.AutoSize = True - Me.lbl14.Location = New System.Drawing.Point(5, 242) - Me.lbl14.Name = "lbl14" - Me.lbl14.Size = New System.Drawing.Size(22, 13) - Me.lbl14.TabIndex = 26 - Me.lbl14.Tag = "14." - Me.lbl14.Text = "14." - ' - 'lbl18 - ' - Me.lbl18.AutoSize = True - Me.lbl18.Location = New System.Drawing.Point(5, 314) - Me.lbl18.Name = "lbl18" - Me.lbl18.Size = New System.Drawing.Size(22, 13) - Me.lbl18.TabIndex = 34 - Me.lbl18.Tag = "18." - Me.lbl18.Text = "18." - ' - 'lbl19 - ' - Me.lbl19.AutoSize = True - Me.lbl19.Location = New System.Drawing.Point(5, 333) - Me.lbl19.Name = "lbl19" - Me.lbl19.Size = New System.Drawing.Size(22, 13) - Me.lbl19.TabIndex = 36 - Me.lbl19.Tag = "19." - Me.lbl19.Text = "19." - ' - 'lbl17 - ' - Me.lbl17.AutoSize = True - Me.lbl17.Location = New System.Drawing.Point(5, 296) - Me.lbl17.Name = "lbl17" - Me.lbl17.Size = New System.Drawing.Size(22, 13) - Me.lbl17.TabIndex = 32 - Me.lbl17.Tag = "17." - Me.lbl17.Text = "17." - ' - 'lbl16 - ' - Me.lbl16.AutoSize = True - Me.lbl16.Location = New System.Drawing.Point(5, 279) - Me.lbl16.Name = "lbl16" - Me.lbl16.Size = New System.Drawing.Size(22, 13) - Me.lbl16.TabIndex = 30 - Me.lbl16.Tag = "16." - Me.lbl16.Text = "16." - ' - 'lbl15 - ' - Me.lbl15.AutoSize = True - Me.lbl15.Location = New System.Drawing.Point(5, 261) - Me.lbl15.Name = "lbl15" - Me.lbl15.Size = New System.Drawing.Size(22, 13) - Me.lbl15.TabIndex = 28 - Me.lbl15.Tag = "15." - Me.lbl15.Text = "15." - ' - 'lbl6 - ' - Me.lbl6.AutoSize = True - Me.lbl6.Location = New System.Drawing.Point(10, 99) - Me.lbl6.Name = "lbl6" - Me.lbl6.Size = New System.Drawing.Size(16, 13) - Me.lbl6.TabIndex = 10 - Me.lbl6.Tag = "6." - Me.lbl6.Text = "6." - ' - 'lbl8 - ' - Me.lbl8.AutoSize = True - Me.lbl8.Location = New System.Drawing.Point(10, 135) - Me.lbl8.Name = "lbl8" - Me.lbl8.Size = New System.Drawing.Size(16, 13) - Me.lbl8.TabIndex = 14 - Me.lbl8.Tag = "8." - Me.lbl8.Text = "8." - ' - 'lbl12 - ' - Me.lbl12.AutoSize = True - Me.lbl12.Location = New System.Drawing.Point(5, 207) - Me.lbl12.Name = "lbl12" - Me.lbl12.Size = New System.Drawing.Size(22, 13) - Me.lbl12.TabIndex = 22 - Me.lbl12.Tag = "12." - Me.lbl12.Text = "12." - ' - 'lbl9 - ' - Me.lbl9.AutoSize = True - Me.lbl9.Location = New System.Drawing.Point(10, 151) - Me.lbl9.Name = "lbl9" - Me.lbl9.Size = New System.Drawing.Size(16, 13) - Me.lbl9.TabIndex = 16 - Me.lbl9.Tag = "9." - Me.lbl9.Text = "9." - ' - 'lbl13 - ' - Me.lbl13.AutoSize = True - Me.lbl13.Location = New System.Drawing.Point(5, 225) - Me.lbl13.Name = "lbl13" - Me.lbl13.Size = New System.Drawing.Size(22, 13) - Me.lbl13.TabIndex = 24 - Me.lbl13.Tag = "13." - Me.lbl13.Text = "13." - ' - 'lbl7 - ' - Me.lbl7.AutoSize = True - Me.lbl7.Location = New System.Drawing.Point(10, 117) - Me.lbl7.Name = "lbl7" - Me.lbl7.Size = New System.Drawing.Size(16, 13) - Me.lbl7.TabIndex = 12 - Me.lbl7.Tag = "7." - Me.lbl7.Text = "7." - ' - 'lbl11 - ' - Me.lbl11.AutoSize = True - Me.lbl11.Location = New System.Drawing.Point(5, 188) - Me.lbl11.Name = "lbl11" - Me.lbl11.Size = New System.Drawing.Size(22, 13) - Me.lbl11.TabIndex = 20 - Me.lbl11.Tag = "11." - Me.lbl11.Text = "11." - ' - 'lbl10 - ' - Me.lbl10.AutoSize = True - Me.lbl10.Location = New System.Drawing.Point(5, 171) - Me.lbl10.Name = "lbl10" - Me.lbl10.Size = New System.Drawing.Size(22, 13) - Me.lbl10.TabIndex = 18 - Me.lbl10.Tag = "10." - Me.lbl10.Text = "10." - ' - 'lbl2 - ' - Me.lbl2.AutoSize = True - Me.lbl2.Location = New System.Drawing.Point(10, 26) - Me.lbl2.Name = "lbl2" - Me.lbl2.Size = New System.Drawing.Size(16, 13) - Me.lbl2.TabIndex = 2 - Me.lbl2.Tag = "2." - Me.lbl2.Text = "2." - ' - 'lbl3 - ' - Me.lbl3.AutoSize = True - Me.lbl3.Location = New System.Drawing.Point(10, 44) - Me.lbl3.Name = "lbl3" - Me.lbl3.Size = New System.Drawing.Size(16, 13) - Me.lbl3.TabIndex = 4 - Me.lbl3.Tag = "3." - Me.lbl3.Text = "3." - ' - 'lbl4 - ' - Me.lbl4.AutoSize = True - Me.lbl4.Location = New System.Drawing.Point(10, 62) - Me.lbl4.Name = "lbl4" - Me.lbl4.Size = New System.Drawing.Size(16, 13) - Me.lbl4.TabIndex = 6 - Me.lbl4.Tag = "4." - Me.lbl4.Text = "4." - ' - 'lbl5 - ' - Me.lbl5.AutoSize = True - Me.lbl5.Location = New System.Drawing.Point(10, 80) - Me.lbl5.Name = "lbl5" - Me.lbl5.Size = New System.Drawing.Size(16, 13) - Me.lbl5.TabIndex = 8 - Me.lbl5.Tag = "5." - Me.lbl5.Text = "5." - ' - 'lbl1 - ' - Me.lbl1.AutoSize = True - Me.lbl1.Location = New System.Drawing.Point(10, 9) - Me.lbl1.Name = "lbl1" - Me.lbl1.Size = New System.Drawing.Size(16, 13) - Me.lbl1.TabIndex = 0 - Me.lbl1.Tag = "1." - Me.lbl1.Text = "1." - ' - 'chkPrecExceed99Percent - ' - Me.chkPrecExceed99Percent.AutoSize = True - Me.chkPrecExceed99Percent.Location = New System.Drawing.Point(27, 456) - Me.chkPrecExceed99Percent.Name = "chkPrecExceed99Percent" - Me.chkPrecExceed99Percent.Size = New System.Drawing.Size(317, 17) - Me.chkPrecExceed99Percent.TabIndex = 51 - Me.chkPrecExceed99Percent.Tag = "Total_Daily_Precipitation_Exceeding_99th_Percentile_Threshold " - Me.chkPrecExceed99Percent.Text = "Total Daily Precipitation Exceeding 99th Percentile Threshold " - Me.chkPrecExceed99Percent.UseVisualStyleBackColor = True - ' - 'chkMaxWetSpell - ' - Me.chkMaxWetSpell.AutoSize = True - Me.chkMaxWetSpell.Location = New System.Drawing.Point(27, 422) - Me.chkMaxWetSpell.Name = "chkMaxWetSpell" - Me.chkMaxWetSpell.Size = New System.Drawing.Size(170, 17) - Me.chkMaxWetSpell.TabIndex = 47 - Me.chkMaxWetSpell.Tag = "Maximum_Length_of_Wet_Spell" - Me.chkMaxWetSpell.Text = "Maximum Length of Wet Spell " - Me.chkMaxWetSpell.UseVisualStyleBackColor = True - ' - 'chkPrecExceedSpecifiedA - ' - Me.chkPrecExceedSpecifiedA.AutoSize = True - Me.chkPrecExceedSpecifiedA.Location = New System.Drawing.Point(27, 388) - Me.chkPrecExceedSpecifiedA.Name = "chkPrecExceedSpecifiedA" - Me.chkPrecExceedSpecifiedA.Size = New System.Drawing.Size(276, 17) - Me.chkPrecExceedSpecifiedA.TabIndex = 43 - Me.chkPrecExceedSpecifiedA.Tag = "Precipitation_Exceeding_a_Specified_Amount_Per_Day" - Me.chkPrecExceedSpecifiedA.Text = "Precipitation Exceeding a Specified Amount Per Day" - Me.chkPrecExceedSpecifiedA.UseVisualStyleBackColor = True - ' - 'chkMonthlyMax5dayPrec - ' - Me.chkMonthlyMax5dayPrec.AutoSize = True - Me.chkMonthlyMax5dayPrec.Location = New System.Drawing.Point(27, 314) - Me.chkMonthlyMax5dayPrec.Name = "chkMonthlyMax5dayPrec" - Me.chkMonthlyMax5dayPrec.Size = New System.Drawing.Size(265, 17) - Me.chkMonthlyMax5dayPrec.TabIndex = 35 - Me.chkMonthlyMax5dayPrec.Tag = "Monthly_Maximum_Consecutive_5-day_Precipitation" - Me.chkMonthlyMax5dayPrec.Text = "Monthly Maximum Consecutive 5-day Precipitation " - Me.chkMonthlyMax5dayPrec.UseVisualStyleBackColor = True - ' - 'chkTmaxAbove90Percent - ' - Me.chkTmaxAbove90Percent.AutoSize = True - Me.chkTmaxAbove90Percent.Location = New System.Drawing.Point(27, 225) - Me.chkTmaxAbove90Percent.Name = "chkTmaxAbove90Percent" - Me.chkTmaxAbove90Percent.Size = New System.Drawing.Size(302, 17) - Me.chkTmaxAbove90Percent.TabIndex = 25 - Me.chkTmaxAbove90Percent.Tag = "Percentage_of_Days_When_Tmax_is_Above_90th_Percentile" - Me.chkTmaxAbove90Percent.Text = "Percentage of Days When Tmax is Above 90th Percentile " - Me.chkTmaxAbove90Percent.UseVisualStyleBackColor = True - ' - 'chkTminAbove90Percent - ' - Me.chkTminAbove90Percent.AutoSize = True - Me.chkTminAbove90Percent.Location = New System.Drawing.Point(27, 207) - Me.chkTminAbove90Percent.Name = "chkTminAbove90Percent" - Me.chkTminAbove90Percent.Size = New System.Drawing.Size(299, 17) - Me.chkTminAbove90Percent.TabIndex = 23 - Me.chkTminAbove90Percent.Tag = "Percentage_of_Days_When_Tmin_is_above_90th_Percentile" - Me.chkTminAbove90Percent.Text = "Percentage of Days When Tmin is Above 90th Percentile " - Me.chkTminAbove90Percent.UseVisualStyleBackColor = True - ' - 'chkPrecExceed95Percent - ' - Me.chkPrecExceed95Percent.AutoSize = True - Me.chkPrecExceed95Percent.Location = New System.Drawing.Point(27, 438) - Me.chkPrecExceed95Percent.Name = "chkPrecExceed95Percent" - Me.chkPrecExceed95Percent.Size = New System.Drawing.Size(317, 17) - Me.chkPrecExceed95Percent.TabIndex = 49 - Me.chkPrecExceed95Percent.Tag = "Total_Daily_Precipitation_Exceeding_95th_Percentile_Threshold " - Me.chkPrecExceed95Percent.Text = "Total Daily Precipitation Exceeding 95th Percentile Threshold " - Me.chkPrecExceed95Percent.UseVisualStyleBackColor = True - ' - 'chkMonthlyMinDailyTMin - ' - Me.chkMonthlyMinDailyTMin.AutoSize = True - Me.chkMonthlyMinDailyTMin.Location = New System.Drawing.Point(27, 152) - Me.chkMonthlyMinDailyTMin.Name = "chkMonthlyMinDailyTMin" - Me.chkMonthlyMinDailyTMin.Size = New System.Drawing.Size(255, 17) - Me.chkMonthlyMinDailyTMin.TabIndex = 17 - Me.chkMonthlyMinDailyTMin.Tag = "Monthly_Minimum_of_Daily_Minimum_Temperature" - Me.chkMonthlyMinDailyTMin.Text = "Monthly Minimum of Daily Minimum Temperature " - Me.chkMonthlyMinDailyTMin.UseVisualStyleBackColor = True - ' - 'chkMonthlyMaxDailyTMax - ' - Me.chkMonthlyMaxDailyTMax.AutoSize = True - Me.chkMonthlyMaxDailyTMax.Location = New System.Drawing.Point(27, 98) - Me.chkMonthlyMaxDailyTMax.Name = "chkMonthlyMaxDailyTMax" - Me.chkMonthlyMaxDailyTMax.Size = New System.Drawing.Size(261, 17) - Me.chkMonthlyMaxDailyTMax.TabIndex = 11 - Me.chkMonthlyMaxDailyTMax.Tag = "Monthly_Maximum_of_Daily_Maximum_Temperature " - Me.chkMonthlyMaxDailyTMax.Text = "Monthly Maximum of Daily Maximum Temperature " - Me.chkMonthlyMaxDailyTMax.UseVisualStyleBackColor = True - ' - 'chkMaxDrySpell - ' - Me.chkMaxDrySpell.AutoSize = True - Me.chkMaxDrySpell.Location = New System.Drawing.Point(27, 404) - Me.chkMaxDrySpell.Name = "chkMaxDrySpell" - Me.chkMaxDrySpell.Size = New System.Drawing.Size(166, 17) - Me.chkMaxDrySpell.TabIndex = 45 - Me.chkMaxDrySpell.Tag = "Maximum_Length_of_Dry_Spell" - Me.chkMaxDrySpell.Text = "Maximum Length of Dry Spell " - Me.chkMaxDrySpell.UseVisualStyleBackColor = True - ' - 'chkPrecExceed20mm - ' - Me.chkPrecExceed20mm.AutoSize = True - Me.chkPrecExceed20mm.Location = New System.Drawing.Point(27, 370) - Me.chkPrecExceed20mm.Name = "chkPrecExceed20mm" - Me.chkPrecExceed20mm.Size = New System.Drawing.Size(212, 17) - Me.chkPrecExceed20mm.TabIndex = 41 - Me.chkPrecExceed20mm.Tag = "Precipitation_Exceeding_20mm_Per_Day " - Me.chkPrecExceed20mm.Text = "Precipitation Exceeding 20mm Per Day " - Me.chkPrecExceed20mm.UseVisualStyleBackColor = True - ' - 'chkSimplePrecII - ' - Me.chkSimplePrecII.AutoSize = True - Me.chkSimplePrecII.Location = New System.Drawing.Point(27, 332) - Me.chkSimplePrecII.Name = "chkSimplePrecII" - Me.chkSimplePrecII.Size = New System.Drawing.Size(189, 17) - Me.chkSimplePrecII.TabIndex = 37 - Me.chkSimplePrecII.Tag = "Simple_Precipitation_Intensity_Index" - Me.chkSimplePrecII.Text = "Simple Precipitation Intensity Index" - Me.chkSimplePrecII.UseVisualStyleBackColor = True - ' - 'chkTotalDailyPrec - ' - Me.chkTotalDailyPrec.AutoSize = True - Me.chkTotalDailyPrec.Location = New System.Drawing.Point(27, 472) - Me.chkTotalDailyPrec.Name = "chkTotalDailyPrec" - Me.chkTotalDailyPrec.Size = New System.Drawing.Size(137, 17) - Me.chkTotalDailyPrec.TabIndex = 53 - Me.chkTotalDailyPrec.Tag = "Total_Daily_Precipitation" - Me.chkTotalDailyPrec.Text = "Total Daily Precipitation" - Me.chkTotalDailyPrec.UseVisualStyleBackColor = True - ' - 'chkColdSpellDI - ' - Me.chkColdSpellDI.AutoSize = True - Me.chkColdSpellDI.Location = New System.Drawing.Point(27, 260) - Me.chkColdSpellDI.Name = "chkColdSpellDI" - Me.chkColdSpellDI.Size = New System.Drawing.Size(148, 17) - Me.chkColdSpellDI.TabIndex = 29 - Me.chkColdSpellDI.Tag = "Cold_Spell_Duration_Index " - Me.chkColdSpellDI.Text = "Cold Spell Duration Index " - Me.chkColdSpellDI.UseVisualStyleBackColor = True - ' - 'chkTmaxBelow10Percent - ' - Me.chkTmaxBelow10Percent.AutoSize = True - Me.chkTmaxBelow10Percent.Location = New System.Drawing.Point(27, 188) - Me.chkTmaxBelow10Percent.Name = "chkTmaxBelow10Percent" - Me.chkTmaxBelow10Percent.Size = New System.Drawing.Size(300, 17) - Me.chkTmaxBelow10Percent.TabIndex = 21 - Me.chkTmaxBelow10Percent.Tag = "Percentage_of_Days_When_Tmax_is_Below_10th_Percentile" - Me.chkTmaxBelow10Percent.Text = "Percentage of Days When Tmax is Below 10th Percentile " - Me.chkTmaxBelow10Percent.UseVisualStyleBackColor = True - ' - 'chkTminBelow10Percent - ' - Me.chkTminBelow10Percent.AutoSize = True - Me.chkTminBelow10Percent.Location = New System.Drawing.Point(27, 170) - Me.chkTminBelow10Percent.Name = "chkTminBelow10Percent" - Me.chkTminBelow10Percent.Size = New System.Drawing.Size(297, 17) - Me.chkTminBelow10Percent.TabIndex = 19 - Me.chkTminBelow10Percent.Tag = "Percentage_of_Days_When_Tmin_is_Below_10th_Percentile" - Me.chkTminBelow10Percent.Text = "Percentage of Days When Tmin is Below 10th Percentile " - Me.chkTminBelow10Percent.UseVisualStyleBackColor = True - ' - 'chkMonthlyMinDailyTMax - ' - Me.chkMonthlyMinDailyTMax.AutoSize = True - Me.chkMonthlyMinDailyTMax.Location = New System.Drawing.Point(27, 134) - Me.chkMonthlyMinDailyTMax.Name = "chkMonthlyMinDailyTMax" - Me.chkMonthlyMinDailyTMax.Size = New System.Drawing.Size(258, 17) - Me.chkMonthlyMinDailyTMax.TabIndex = 15 - Me.chkMonthlyMinDailyTMax.Tag = "Monthly_Minimum_of_Daily_Maximum_Temperature " - Me.chkMonthlyMinDailyTMax.Text = "Monthly Minimum of Daily Maximum Temperature " - Me.chkMonthlyMinDailyTMax.UseVisualStyleBackColor = True - ' - 'chkPrecExceed10mm - ' - Me.chkPrecExceed10mm.AutoSize = True - Me.chkPrecExceed10mm.Location = New System.Drawing.Point(27, 350) - Me.chkPrecExceed10mm.Name = "chkPrecExceed10mm" - Me.chkPrecExceed10mm.Size = New System.Drawing.Size(212, 17) - Me.chkPrecExceed10mm.TabIndex = 39 - Me.chkPrecExceed10mm.Tag = "Precipitation_Exceeding_10mm_Per_Day " - Me.chkPrecExceed10mm.Text = "Precipitation Exceeding 10mm Per Day " - Me.chkPrecExceed10mm.UseVisualStyleBackColor = True - ' - 'chkMonthlyMax1dayPrec - ' - Me.chkMonthlyMax1dayPrec.AutoSize = True - Me.chkMonthlyMax1dayPrec.Location = New System.Drawing.Point(27, 296) - Me.chkMonthlyMax1dayPrec.Name = "chkMonthlyMax1dayPrec" - Me.chkMonthlyMax1dayPrec.Size = New System.Drawing.Size(203, 17) - Me.chkMonthlyMax1dayPrec.TabIndex = 33 - Me.chkMonthlyMax1dayPrec.Tag = "Monthly_Maximum_1-day_Precipitation" - Me.chkMonthlyMax1dayPrec.Text = "Monthly Maximum 1-day Precipitation " - Me.chkMonthlyMax1dayPrec.UseVisualStyleBackColor = True - ' - 'chkMeanDiurnalTempRange - ' - Me.chkMeanDiurnalTempRange.AutoSize = True - Me.chkMeanDiurnalTempRange.Location = New System.Drawing.Point(27, 278) - Me.chkMeanDiurnalTempRange.Name = "chkMeanDiurnalTempRange" - Me.chkMeanDiurnalTempRange.Size = New System.Drawing.Size(187, 17) - Me.chkMeanDiurnalTempRange.TabIndex = 31 - Me.chkMeanDiurnalTempRange.Tag = "Mean_Diurnal_Temperature_Range" - Me.chkMeanDiurnalTempRange.Text = "Mean Diurnal Temperature Range" - Me.chkMeanDiurnalTempRange.UseVisualStyleBackColor = True - ' - 'chkWarmSpellDI - ' - Me.chkWarmSpellDI.AutoSize = True - Me.chkWarmSpellDI.Location = New System.Drawing.Point(27, 242) - Me.chkWarmSpellDI.Name = "chkWarmSpellDI" - Me.chkWarmSpellDI.Size = New System.Drawing.Size(155, 17) - Me.chkWarmSpellDI.TabIndex = 27 - Me.chkWarmSpellDI.Tag = "Warm_Spell_Duration_Index " - Me.chkWarmSpellDI.Text = "Warm Spell Duration Index " - Me.chkWarmSpellDI.UseVisualStyleBackColor = True - ' - 'chkMonthlyMaxDailyTMin - ' - Me.chkMonthlyMaxDailyTMin.AutoSize = True - Me.chkMonthlyMaxDailyTMin.Location = New System.Drawing.Point(27, 116) - Me.chkMonthlyMaxDailyTMin.Name = "chkMonthlyMaxDailyTMin" - Me.chkMonthlyMaxDailyTMin.Size = New System.Drawing.Size(255, 17) - Me.chkMonthlyMaxDailyTMin.TabIndex = 13 - Me.chkMonthlyMaxDailyTMin.Tag = "Monthly_Maximum_of_Daily_Minimum_Temperature" - Me.chkMonthlyMaxDailyTMin.Text = "Monthly Maximum of Daily Minimum Temperature" - Me.chkMonthlyMaxDailyTMin.UseVisualStyleBackColor = True - ' - 'chkGrowingSeasonLength - ' - Me.chkGrowingSeasonLength.AutoSize = True - Me.chkGrowingSeasonLength.Location = New System.Drawing.Point(27, 80) - Me.chkGrowingSeasonLength.Name = "chkGrowingSeasonLength" - Me.chkGrowingSeasonLength.Size = New System.Drawing.Size(140, 17) - Me.chkGrowingSeasonLength.TabIndex = 9 - Me.chkGrowingSeasonLength.Tag = "Growing_Season_Length" - Me.chkGrowingSeasonLength.Text = "Growing Season Length" - Me.chkGrowingSeasonLength.UseVisualStyleBackColor = True - ' - 'grpClimdexIndices - ' - Me.grpClimdexIndices.Controls.Add(Me.panIndices) - Me.grpClimdexIndices.Location = New System.Drawing.Point(10, 11) - Me.grpClimdexIndices.Name = "grpClimdexIndices" - Me.grpClimdexIndices.Size = New System.Drawing.Size(388, 165) - Me.grpClimdexIndices.TabIndex = 0 - Me.grpClimdexIndices.TabStop = False - Me.grpClimdexIndices.Tag = "Climdex_Indices" - Me.grpClimdexIndices.Text = "Climdex Indices" - ' - 'ucrButtonsClimdexIndices - ' - Me.ucrButtonsClimdexIndices.Location = New System.Drawing.Point(119, 243) - Me.ucrButtonsClimdexIndices.Name = "ucrButtonsClimdexIndices" - Me.ucrButtonsClimdexIndices.Size = New System.Drawing.Size(142, 30) - Me.ucrButtonsClimdexIndices.TabIndex = 6 + 'cmdHelp + ' + Me.cmdHelp.Location = New System.Drawing.Point(8, 511) + Me.cmdHelp.Name = "cmdHelp" + Me.cmdHelp.Size = New System.Drawing.Size(75, 23) + Me.cmdHelp.TabIndex = 1 + Me.cmdHelp.Text = "Indices Help" + Me.cmdHelp.UseVisualStyleBackColor = True + ' + 'tbPrecipitation + ' + Me.tbPrecipitation.Controls.Add(Me.grpPrecAnnual) + Me.tbPrecipitation.Controls.Add(Me.grpPrecAnnualMonthly) + Me.tbPrecipitation.Location = New System.Drawing.Point(4, 22) + Me.tbPrecipitation.Name = "tbPrecipitation" + Me.tbPrecipitation.Padding = New System.Windows.Forms.Padding(3) + Me.tbPrecipitation.Size = New System.Drawing.Size(468, 473) + Me.tbPrecipitation.TabIndex = 3 + Me.tbPrecipitation.Text = "Precipitation" + Me.tbPrecipitation.UseVisualStyleBackColor = True + ' + 'grpPrecAnnual + ' + Me.grpPrecAnnual.Controls.Add(Me.ucrChkPrecExceedSpecifiedA) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkMaxDrySpell) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkPrecExceed95Percent) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkPrecExceed10mm) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkMaxWetSpell) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkPrecExceed20mm) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkPrecExceed99Percent) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkTotalDailyPrec) + Me.grpPrecAnnual.Controls.Add(Me.ucrChkSimplePrecII) + Me.grpPrecAnnual.Location = New System.Drawing.Point(11, 7) + Me.grpPrecAnnual.Name = "grpPrecAnnual" + Me.grpPrecAnnual.Size = New System.Drawing.Size(445, 228) + Me.grpPrecAnnual.TabIndex = 0 + Me.grpPrecAnnual.TabStop = False + Me.grpPrecAnnual.Text = "Annual" + ' + 'ucrChkPrecExceedSpecifiedA + ' + Me.ucrChkPrecExceedSpecifiedA.Checked = False + Me.ucrChkPrecExceedSpecifiedA.Location = New System.Drawing.Point(6, 88) + Me.ucrChkPrecExceedSpecifiedA.Name = "ucrChkPrecExceedSpecifiedA" + Me.ucrChkPrecExceedSpecifiedA.Size = New System.Drawing.Size(378, 18) + Me.ucrChkPrecExceedSpecifiedA.TabIndex = 3 + ' + 'ucrChkMaxDrySpell + ' + Me.ucrChkMaxDrySpell.Checked = False + Me.ucrChkMaxDrySpell.Location = New System.Drawing.Point(6, 111) + Me.ucrChkMaxDrySpell.Name = "ucrChkMaxDrySpell" + Me.ucrChkMaxDrySpell.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMaxDrySpell.TabIndex = 4 + ' + 'ucrChkPrecExceed95Percent + ' + Me.ucrChkPrecExceed95Percent.Checked = False + Me.ucrChkPrecExceed95Percent.Location = New System.Drawing.Point(6, 157) + Me.ucrChkPrecExceed95Percent.Name = "ucrChkPrecExceed95Percent" + Me.ucrChkPrecExceed95Percent.Size = New System.Drawing.Size(378, 18) + Me.ucrChkPrecExceed95Percent.TabIndex = 6 + ' + 'ucrChkPrecExceed10mm + ' + Me.ucrChkPrecExceed10mm.Checked = False + Me.ucrChkPrecExceed10mm.Location = New System.Drawing.Point(6, 42) + Me.ucrChkPrecExceed10mm.Name = "ucrChkPrecExceed10mm" + Me.ucrChkPrecExceed10mm.Size = New System.Drawing.Size(378, 18) + Me.ucrChkPrecExceed10mm.TabIndex = 1 + ' + 'ucrChkMaxWetSpell + ' + Me.ucrChkMaxWetSpell.Checked = False + Me.ucrChkMaxWetSpell.Location = New System.Drawing.Point(6, 134) + Me.ucrChkMaxWetSpell.Name = "ucrChkMaxWetSpell" + Me.ucrChkMaxWetSpell.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMaxWetSpell.TabIndex = 5 + ' + 'ucrChkPrecExceed20mm + ' + Me.ucrChkPrecExceed20mm.Checked = False + Me.ucrChkPrecExceed20mm.Location = New System.Drawing.Point(6, 65) + Me.ucrChkPrecExceed20mm.Name = "ucrChkPrecExceed20mm" + Me.ucrChkPrecExceed20mm.Size = New System.Drawing.Size(378, 18) + Me.ucrChkPrecExceed20mm.TabIndex = 2 + ' + 'ucrChkPrecExceed99Percent + ' + Me.ucrChkPrecExceed99Percent.Checked = False + Me.ucrChkPrecExceed99Percent.Location = New System.Drawing.Point(6, 180) + Me.ucrChkPrecExceed99Percent.Name = "ucrChkPrecExceed99Percent" + Me.ucrChkPrecExceed99Percent.Size = New System.Drawing.Size(378, 18) + Me.ucrChkPrecExceed99Percent.TabIndex = 7 + ' + 'ucrChkTotalDailyPrec + ' + Me.ucrChkTotalDailyPrec.Checked = False + Me.ucrChkTotalDailyPrec.Location = New System.Drawing.Point(6, 203) + Me.ucrChkTotalDailyPrec.Name = "ucrChkTotalDailyPrec" + Me.ucrChkTotalDailyPrec.Size = New System.Drawing.Size(378, 18) + Me.ucrChkTotalDailyPrec.TabIndex = 8 + ' + 'ucrChkSimplePrecII + ' + Me.ucrChkSimplePrecII.Checked = False + Me.ucrChkSimplePrecII.Location = New System.Drawing.Point(6, 19) + Me.ucrChkSimplePrecII.Name = "ucrChkSimplePrecII" + Me.ucrChkSimplePrecII.Size = New System.Drawing.Size(378, 18) + Me.ucrChkSimplePrecII.TabIndex = 0 + ' + 'grpPrecAnnualMonthly + ' + Me.grpPrecAnnualMonthly.Controls.Add(Me.ucrChkMonthlyMax5dayPrec) + Me.grpPrecAnnualMonthly.Controls.Add(Me.ucrChkMonthlyMax1dayPrec) + Me.grpPrecAnnualMonthly.Location = New System.Drawing.Point(11, 237) + Me.grpPrecAnnualMonthly.Name = "grpPrecAnnualMonthly" + Me.grpPrecAnnualMonthly.Size = New System.Drawing.Size(445, 63) + Me.grpPrecAnnualMonthly.TabIndex = 1 + Me.grpPrecAnnualMonthly.TabStop = False + Me.grpPrecAnnualMonthly.Text = "Annual/Monthly" + ' + 'ucrChkMonthlyMax5dayPrec + ' + Me.ucrChkMonthlyMax5dayPrec.Checked = False + Me.ucrChkMonthlyMax5dayPrec.Location = New System.Drawing.Point(7, 38) + Me.ucrChkMonthlyMax5dayPrec.Name = "ucrChkMonthlyMax5dayPrec" + Me.ucrChkMonthlyMax5dayPrec.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMonthlyMax5dayPrec.TabIndex = 1 + ' + 'ucrChkMonthlyMax1dayPrec + ' + Me.ucrChkMonthlyMax1dayPrec.Checked = False + Me.ucrChkMonthlyMax1dayPrec.Location = New System.Drawing.Point(7, 15) + Me.ucrChkMonthlyMax1dayPrec.Name = "ucrChkMonthlyMax1dayPrec" + Me.ucrChkMonthlyMax1dayPrec.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMonthlyMax1dayPrec.TabIndex = 0 + ' + 'tbTemperature + ' + Me.tbTemperature.Controls.Add(Me.grpTmaxTmin) + Me.tbTemperature.Controls.Add(Me.grpTmax) + Me.tbTemperature.Controls.Add(Me.grpTmin) + Me.tbTemperature.Location = New System.Drawing.Point(4, 22) + Me.tbTemperature.Name = "tbTemperature" + Me.tbTemperature.Padding = New System.Windows.Forms.Padding(3) + Me.tbTemperature.Size = New System.Drawing.Size(468, 473) + Me.tbTemperature.TabIndex = 2 + Me.tbTemperature.Text = "Temperature" + Me.tbTemperature.UseVisualStyleBackColor = True + ' + 'grpTmaxTmin + ' + Me.grpTmaxTmin.Controls.Add(Me.grpTmaxTminAnnualMonthly) + Me.grpTmaxTmin.Controls.Add(Me.grpTmaxTminAnnual) + Me.grpTmaxTmin.Location = New System.Drawing.Point(6, 369) + Me.grpTmaxTmin.Name = "grpTmaxTmin" + Me.grpTmaxTmin.Size = New System.Drawing.Size(445, 96) + Me.grpTmaxTmin.TabIndex = 2 + Me.grpTmaxTmin.TabStop = False + Me.grpTmaxTmin.Text = "Tmax/Tmin" + ' + 'grpTmaxTminAnnualMonthly + ' + Me.grpTmaxTminAnnualMonthly.Controls.Add(Me.ucrChkMeanDiurnalTempRange) + Me.grpTmaxTminAnnualMonthly.Location = New System.Drawing.Point(4, 52) + Me.grpTmaxTminAnnualMonthly.Name = "grpTmaxTminAnnualMonthly" + Me.grpTmaxTminAnnualMonthly.Size = New System.Drawing.Size(423, 38) + Me.grpTmaxTminAnnualMonthly.TabIndex = 1 + Me.grpTmaxTminAnnualMonthly.TabStop = False + Me.grpTmaxTminAnnualMonthly.Text = "Annual/Monthly" + ' + 'ucrChkMeanDiurnalTempRange + ' + Me.ucrChkMeanDiurnalTempRange.Checked = False + Me.ucrChkMeanDiurnalTempRange.Location = New System.Drawing.Point(8, 15) + Me.ucrChkMeanDiurnalTempRange.Name = "ucrChkMeanDiurnalTempRange" + Me.ucrChkMeanDiurnalTempRange.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMeanDiurnalTempRange.TabIndex = 0 + ' + 'grpTmaxTminAnnual + ' + Me.grpTmaxTminAnnual.Controls.Add(Me.ucrChkGrowingSeasonLength) + Me.grpTmaxTminAnnual.Location = New System.Drawing.Point(4, 14) + Me.grpTmaxTminAnnual.Name = "grpTmaxTminAnnual" + Me.grpTmaxTminAnnual.Size = New System.Drawing.Size(423, 37) + Me.grpTmaxTminAnnual.TabIndex = 0 + Me.grpTmaxTminAnnual.TabStop = False + Me.grpTmaxTminAnnual.Text = "Annual" + ' + 'ucrChkGrowingSeasonLength + ' + Me.ucrChkGrowingSeasonLength.Checked = False + Me.ucrChkGrowingSeasonLength.Location = New System.Drawing.Point(8, 12) + Me.ucrChkGrowingSeasonLength.Name = "ucrChkGrowingSeasonLength" + Me.ucrChkGrowingSeasonLength.Size = New System.Drawing.Size(378, 18) + Me.ucrChkGrowingSeasonLength.TabIndex = 0 + ' + 'grpTmax + ' + Me.grpTmax.Controls.Add(Me.grpTmaxAnnualMonthly) + Me.grpTmax.Controls.Add(Me.grpTmaxAnnual) + Me.grpTmax.Location = New System.Drawing.Point(6, 1) + Me.grpTmax.Name = "grpTmax" + Me.grpTmax.Size = New System.Drawing.Size(445, 183) + Me.grpTmax.TabIndex = 0 + Me.grpTmax.TabStop = False + Me.grpTmax.Text = "Tmax" + ' + 'grpTmaxAnnualMonthly + ' + Me.grpTmaxAnnualMonthly.Controls.Add(Me.ucrChkMonthlyMaxDailyTMax) + Me.grpTmaxAnnualMonthly.Controls.Add(Me.ucrChkTmaxAbove90Percent) + Me.grpTmaxAnnualMonthly.Controls.Add(Me.ucrChkTmaxBelow10Percent) + Me.grpTmaxAnnualMonthly.Controls.Add(Me.ucrChkMonthlyMinDailyTMax) + Me.grpTmaxAnnualMonthly.Location = New System.Drawing.Point(4, 80) + Me.grpTmaxAnnualMonthly.Name = "grpTmaxAnnualMonthly" + Me.grpTmaxAnnualMonthly.Size = New System.Drawing.Size(423, 93) + Me.grpTmaxAnnualMonthly.TabIndex = 1 + Me.grpTmaxAnnualMonthly.TabStop = False + Me.grpTmaxAnnualMonthly.Text = "Annual/Monthly" + ' + 'ucrChkMonthlyMaxDailyTMax + ' + Me.ucrChkMonthlyMaxDailyTMax.Checked = False + Me.ucrChkMonthlyMaxDailyTMax.Location = New System.Drawing.Point(8, 14) + Me.ucrChkMonthlyMaxDailyTMax.Name = "ucrChkMonthlyMaxDailyTMax" + Me.ucrChkMonthlyMaxDailyTMax.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMonthlyMaxDailyTMax.TabIndex = 0 + ' + 'ucrChkTmaxAbove90Percent + ' + Me.ucrChkTmaxAbove90Percent.Checked = False + Me.ucrChkTmaxAbove90Percent.Location = New System.Drawing.Point(8, 69) + Me.ucrChkTmaxAbove90Percent.Name = "ucrChkTmaxAbove90Percent" + Me.ucrChkTmaxAbove90Percent.Size = New System.Drawing.Size(378, 18) + Me.ucrChkTmaxAbove90Percent.TabIndex = 3 + ' + 'ucrChkTmaxBelow10Percent + ' + Me.ucrChkTmaxBelow10Percent.Checked = False + Me.ucrChkTmaxBelow10Percent.Location = New System.Drawing.Point(8, 50) + Me.ucrChkTmaxBelow10Percent.Name = "ucrChkTmaxBelow10Percent" + Me.ucrChkTmaxBelow10Percent.Size = New System.Drawing.Size(378, 18) + Me.ucrChkTmaxBelow10Percent.TabIndex = 2 + ' + 'ucrChkMonthlyMinDailyTMax + ' + Me.ucrChkMonthlyMinDailyTMax.Checked = False + Me.ucrChkMonthlyMinDailyTMax.Location = New System.Drawing.Point(8, 33) + Me.ucrChkMonthlyMinDailyTMax.Name = "ucrChkMonthlyMinDailyTMax" + Me.ucrChkMonthlyMinDailyTMax.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMonthlyMinDailyTMax.TabIndex = 1 + ' + 'grpTmaxAnnual + ' + Me.grpTmaxAnnual.Controls.Add(Me.ucrChkSummerDays) + Me.grpTmaxAnnual.Controls.Add(Me.ucrChkWarmSpellDI) + Me.grpTmaxAnnual.Controls.Add(Me.ucrChkIcingDays) + Me.grpTmaxAnnual.Location = New System.Drawing.Point(4, 10) + Me.grpTmaxAnnual.Name = "grpTmaxAnnual" + Me.grpTmaxAnnual.Size = New System.Drawing.Size(421, 69) + Me.grpTmaxAnnual.TabIndex = 0 + Me.grpTmaxAnnual.TabStop = False + Me.grpTmaxAnnual.Text = "Annual" + ' + 'ucrChkSummerDays + ' + Me.ucrChkSummerDays.Checked = False + Me.ucrChkSummerDays.Location = New System.Drawing.Point(8, 12) + Me.ucrChkSummerDays.Name = "ucrChkSummerDays" + Me.ucrChkSummerDays.Size = New System.Drawing.Size(150, 18) + Me.ucrChkSummerDays.TabIndex = 0 + ' + 'ucrChkWarmSpellDI + ' + Me.ucrChkWarmSpellDI.Checked = False + Me.ucrChkWarmSpellDI.Location = New System.Drawing.Point(8, 48) + Me.ucrChkWarmSpellDI.Name = "ucrChkWarmSpellDI" + Me.ucrChkWarmSpellDI.Size = New System.Drawing.Size(200, 18) + Me.ucrChkWarmSpellDI.TabIndex = 2 + ' + 'ucrChkIcingDays + ' + Me.ucrChkIcingDays.Checked = False + Me.ucrChkIcingDays.Location = New System.Drawing.Point(8, 30) + Me.ucrChkIcingDays.Name = "ucrChkIcingDays" + Me.ucrChkIcingDays.Size = New System.Drawing.Size(150, 18) + Me.ucrChkIcingDays.TabIndex = 1 + ' + 'grpTmin + ' + Me.grpTmin.Controls.Add(Me.grpTminAnnualMonthly) + Me.grpTmin.Controls.Add(Me.grpTminAnnual) + Me.grpTmin.Location = New System.Drawing.Point(6, 185) + Me.grpTmin.Name = "grpTmin" + Me.grpTmin.Size = New System.Drawing.Size(445, 181) + Me.grpTmin.TabIndex = 1 + Me.grpTmin.TabStop = False + Me.grpTmin.Text = "Tmin" + ' + 'grpTminAnnualMonthly + ' + Me.grpTminAnnualMonthly.Controls.Add(Me.ucrChkMonthlyMinDailyTMin) + Me.grpTminAnnualMonthly.Controls.Add(Me.ucrChkMonthlyMaxDailyTMin) + Me.grpTminAnnualMonthly.Controls.Add(Me.ucrChkTminBelow10Percent) + Me.grpTminAnnualMonthly.Controls.Add(Me.ucrChkTminAbove90Percent) + Me.grpTminAnnualMonthly.Location = New System.Drawing.Point(4, 85) + Me.grpTminAnnualMonthly.Name = "grpTminAnnualMonthly" + Me.grpTminAnnualMonthly.Size = New System.Drawing.Size(423, 90) + Me.grpTminAnnualMonthly.TabIndex = 0 + Me.grpTminAnnualMonthly.TabStop = False + Me.grpTminAnnualMonthly.Text = "Annual/Monthly" + ' + 'ucrChkMonthlyMinDailyTMin + ' + Me.ucrChkMonthlyMinDailyTMin.Checked = False + Me.ucrChkMonthlyMinDailyTMin.Location = New System.Drawing.Point(8, 35) + Me.ucrChkMonthlyMinDailyTMin.Name = "ucrChkMonthlyMinDailyTMin" + Me.ucrChkMonthlyMinDailyTMin.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMonthlyMinDailyTMin.TabIndex = 1 + ' + 'ucrChkMonthlyMaxDailyTMin + ' + Me.ucrChkMonthlyMaxDailyTMin.Checked = False + Me.ucrChkMonthlyMaxDailyTMin.Location = New System.Drawing.Point(8, 17) + Me.ucrChkMonthlyMaxDailyTMin.Name = "ucrChkMonthlyMaxDailyTMin" + Me.ucrChkMonthlyMaxDailyTMin.Size = New System.Drawing.Size(378, 18) + Me.ucrChkMonthlyMaxDailyTMin.TabIndex = 0 + ' + 'ucrChkTminBelow10Percent + ' + Me.ucrChkTminBelow10Percent.Checked = False + Me.ucrChkTminBelow10Percent.Location = New System.Drawing.Point(8, 53) + Me.ucrChkTminBelow10Percent.Name = "ucrChkTminBelow10Percent" + Me.ucrChkTminBelow10Percent.Size = New System.Drawing.Size(378, 18) + Me.ucrChkTminBelow10Percent.TabIndex = 2 + ' + 'ucrChkTminAbove90Percent + ' + Me.ucrChkTminAbove90Percent.Checked = False + Me.ucrChkTminAbove90Percent.Location = New System.Drawing.Point(8, 71) + Me.ucrChkTminAbove90Percent.Name = "ucrChkTminAbove90Percent" + Me.ucrChkTminAbove90Percent.Size = New System.Drawing.Size(378, 18) + Me.ucrChkTminAbove90Percent.TabIndex = 3 + ' + 'grpTminAnnual + ' + Me.grpTminAnnual.Controls.Add(Me.ucrChkColdSpellDI) + Me.grpTminAnnual.Controls.Add(Me.ucrChkTropicalNights) + Me.grpTminAnnual.Controls.Add(Me.ucrChkFrostDays) + Me.grpTminAnnual.Location = New System.Drawing.Point(4, 10) + Me.grpTminAnnual.Name = "grpTminAnnual" + Me.grpTminAnnual.Size = New System.Drawing.Size(423, 69) + Me.grpTminAnnual.TabIndex = 1 + Me.grpTminAnnual.TabStop = False + Me.grpTminAnnual.Text = "Annual" + ' + 'ucrChkColdSpellDI + ' + Me.ucrChkColdSpellDI.Checked = False + Me.ucrChkColdSpellDI.Location = New System.Drawing.Point(8, 48) + Me.ucrChkColdSpellDI.Name = "ucrChkColdSpellDI" + Me.ucrChkColdSpellDI.Size = New System.Drawing.Size(200, 18) + Me.ucrChkColdSpellDI.TabIndex = 2 + ' + 'ucrChkTropicalNights + ' + Me.ucrChkTropicalNights.Checked = False + Me.ucrChkTropicalNights.Location = New System.Drawing.Point(8, 30) + Me.ucrChkTropicalNights.Name = "ucrChkTropicalNights" + Me.ucrChkTropicalNights.Size = New System.Drawing.Size(150, 18) + Me.ucrChkTropicalNights.TabIndex = 1 + ' + 'ucrChkFrostDays + ' + Me.ucrChkFrostDays.Checked = False + Me.ucrChkFrostDays.Location = New System.Drawing.Point(8, 12) + Me.ucrChkFrostDays.Name = "ucrChkFrostDays" + Me.ucrChkFrostDays.Size = New System.Drawing.Size(150, 18) + Me.ucrChkFrostDays.TabIndex = 0 + ' + 'TbSettings + ' + Me.TbSettings.Controls.Add(Me.ucrInputPrecQtiles) + Me.TbSettings.Controls.Add(Me.ucrInputTempQtiles) + Me.TbSettings.Controls.Add(Me.lblGSLMode) + Me.TbSettings.Controls.Add(Me.ucrInputGSLMode) + Me.TbSettings.Controls.Add(Me.grpBaseRange) + Me.TbSettings.Controls.Add(Me.ucrChkCenterMean) + Me.TbSettings.Controls.Add(Me.ucrChkSpellDISpanYear) + Me.TbSettings.Controls.Add(Me.ucrChkNHemisphere) + Me.TbSettings.Controls.Add(Me.ucrChkMaxSpellSpanYears) + Me.TbSettings.Controls.Add(Me.ucrNudN) + Me.TbSettings.Controls.Add(Me.ucrNudThreshold) + Me.TbSettings.Controls.Add(Me.ucrNudMinBaseData) + Me.TbSettings.Controls.Add(Me.lblFreq) + Me.TbSettings.Controls.Add(Me.lblMinBaseData) + Me.TbSettings.Controls.Add(Me.ucrInputFreq) + Me.TbSettings.Controls.Add(Me.lblPrecQuantiles) + Me.TbSettings.Controls.Add(Me.lblTempQuantiles) + Me.TbSettings.Controls.Add(Me.grpMaxMissingDays) + Me.TbSettings.Controls.Add(Me.lblN) + Me.TbSettings.Controls.Add(Me.lblThreshold) + Me.TbSettings.Location = New System.Drawing.Point(4, 22) + Me.TbSettings.Name = "TbSettings" + Me.TbSettings.Padding = New System.Windows.Forms.Padding(3) + Me.TbSettings.Size = New System.Drawing.Size(468, 473) + Me.TbSettings.TabIndex = 0 + Me.TbSettings.Tag = "" + Me.TbSettings.Text = "Settings" + Me.TbSettings.UseVisualStyleBackColor = True + ' + 'ucrInputPrecQtiles + ' + Me.ucrInputPrecQtiles.IsMultiline = False + Me.ucrInputPrecQtiles.IsReadOnly = False + Me.ucrInputPrecQtiles.Location = New System.Drawing.Point(265, 179) + Me.ucrInputPrecQtiles.Name = "ucrInputPrecQtiles" + Me.ucrInputPrecQtiles.Size = New System.Drawing.Size(137, 21) + Me.ucrInputPrecQtiles.TabIndex = 14 + ' + 'ucrInputTempQtiles + ' + Me.ucrInputTempQtiles.IsMultiline = False + Me.ucrInputTempQtiles.IsReadOnly = False + Me.ucrInputTempQtiles.Location = New System.Drawing.Point(265, 131) + Me.ucrInputTempQtiles.Name = "ucrInputTempQtiles" + Me.ucrInputTempQtiles.Size = New System.Drawing.Size(137, 21) + Me.ucrInputTempQtiles.TabIndex = 10 + ' + 'lblGSLMode + ' + Me.lblGSLMode.AutoSize = True + Me.lblGSLMode.Location = New System.Drawing.Point(11, 56) + Me.lblGSLMode.Name = "lblGSLMode" + Me.lblGSLMode.Size = New System.Drawing.Size(58, 13) + Me.lblGSLMode.TabIndex = 3 + Me.lblGSLMode.Tag = "" + Me.lblGSLMode.Text = "GSL Mode" + ' + 'ucrInputGSLMode + ' + Me.ucrInputGSLMode.IsReadOnly = False + Me.ucrInputGSLMode.Location = New System.Drawing.Point(11, 73) + Me.ucrInputGSLMode.Margin = New System.Windows.Forms.Padding(21, 17, 21, 17) + Me.ucrInputGSLMode.Name = "ucrInputGSLMode" + Me.ucrInputGSLMode.Size = New System.Drawing.Size(145, 21) + Me.ucrInputGSLMode.TabIndex = 4 + ' + 'grpBaseRange + ' + Me.grpBaseRange.Controls.Add(Me.lblBaseTo) + Me.grpBaseRange.Controls.Add(Me.ucrNudUpperBase) + Me.grpBaseRange.Controls.Add(Me.lblBaseFrom) + Me.grpBaseRange.Controls.Add(Me.ucrNudLowerBase) + Me.grpBaseRange.Location = New System.Drawing.Point(265, 57) + Me.grpBaseRange.Name = "grpBaseRange" + Me.grpBaseRange.Size = New System.Drawing.Size(190, 45) + Me.grpBaseRange.TabIndex = 5 + Me.grpBaseRange.TabStop = False + Me.grpBaseRange.Tag = "" + Me.grpBaseRange.Text = "Base Range" + ' + 'lblBaseTo + ' + Me.lblBaseTo.AutoSize = True + Me.lblBaseTo.Location = New System.Drawing.Point(99, 19) + Me.lblBaseTo.Name = "lblBaseTo" + Me.lblBaseTo.Size = New System.Drawing.Size(20, 13) + Me.lblBaseTo.TabIndex = 2 + Me.lblBaseTo.Tag = "" + Me.lblBaseTo.Text = "To" + ' + 'ucrNudUpperBase + ' + Me.ucrNudUpperBase.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudUpperBase.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudUpperBase.Location = New System.Drawing.Point(125, 15) + Me.ucrNudUpperBase.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudUpperBase.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudUpperBase.Name = "ucrNudUpperBase" + Me.ucrNudUpperBase.Size = New System.Drawing.Size(50, 20) + Me.ucrNudUpperBase.TabIndex = 3 + Me.ucrNudUpperBase.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblBaseFrom + ' + Me.lblBaseFrom.AutoSize = True + Me.lblBaseFrom.Location = New System.Drawing.Point(7, 19) + Me.lblBaseFrom.Name = "lblBaseFrom" + Me.lblBaseFrom.Size = New System.Drawing.Size(30, 13) + Me.lblBaseFrom.TabIndex = 0 + Me.lblBaseFrom.Tag = "" + Me.lblBaseFrom.Text = "From" + ' + 'ucrNudLowerBase + ' + Me.ucrNudLowerBase.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLowerBase.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudLowerBase.Location = New System.Drawing.Point(43, 15) + Me.ucrNudLowerBase.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudLowerBase.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudLowerBase.Name = "ucrNudLowerBase" + Me.ucrNudLowerBase.Size = New System.Drawing.Size(50, 20) + Me.ucrNudLowerBase.TabIndex = 1 + Me.ucrNudLowerBase.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkCenterMean + ' + Me.ucrChkCenterMean.Checked = False + Me.ucrChkCenterMean.Location = New System.Drawing.Point(11, 185) + Me.ucrChkCenterMean.Name = "ucrChkCenterMean" + Me.ucrChkCenterMean.Size = New System.Drawing.Size(212, 20) + Me.ucrChkCenterMean.TabIndex = 13 + ' + 'ucrChkSpellDISpanYear + ' + Me.ucrChkSpellDISpanYear.Checked = False + Me.ucrChkSpellDISpanYear.Location = New System.Drawing.Point(11, 158) + Me.ucrChkSpellDISpanYear.Name = "ucrChkSpellDISpanYear" + Me.ucrChkSpellDISpanYear.Size = New System.Drawing.Size(212, 20) + Me.ucrChkSpellDISpanYear.TabIndex = 11 + ' + 'ucrChkNHemisphere + ' + Me.ucrChkNHemisphere.Checked = False + Me.ucrChkNHemisphere.Location = New System.Drawing.Point(11, 211) + Me.ucrChkNHemisphere.Name = "ucrChkNHemisphere" + Me.ucrChkNHemisphere.Size = New System.Drawing.Size(212, 20) + Me.ucrChkNHemisphere.TabIndex = 15 + ' + 'ucrChkMaxSpellSpanYears + ' + Me.ucrChkMaxSpellSpanYears.Checked = False + Me.ucrChkMaxSpellSpanYears.Location = New System.Drawing.Point(11, 132) + Me.ucrChkMaxSpellSpanYears.Name = "ucrChkMaxSpellSpanYears" + Me.ucrChkMaxSpellSpanYears.Size = New System.Drawing.Size(212, 20) + Me.ucrChkMaxSpellSpanYears.TabIndex = 9 + ' + 'ucrNudN + ' + Me.ucrNudN.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudN.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudN.Location = New System.Drawing.Point(379, 210) + Me.ucrNudN.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudN.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudN.Name = "ucrNudN" + Me.ucrNudN.Size = New System.Drawing.Size(50, 20) + Me.ucrNudN.TabIndex = 17 + Me.ucrNudN.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudThreshold + ' + Me.ucrNudThreshold.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudThreshold.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudThreshold.Location = New System.Drawing.Point(93, 110) + Me.ucrNudThreshold.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudThreshold.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudThreshold.Name = "ucrNudThreshold" + Me.ucrNudThreshold.Size = New System.Drawing.Size(50, 20) + Me.ucrNudThreshold.TabIndex = 7 + Me.ucrNudThreshold.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudMinBaseData + ' + Me.ucrNudMinBaseData.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMinBaseData.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMinBaseData.Location = New System.Drawing.Point(157, 240) + Me.ucrNudMinBaseData.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMinBaseData.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMinBaseData.Name = "ucrNudMinBaseData" + Me.ucrNudMinBaseData.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMinBaseData.TabIndex = 19 + Me.ucrNudMinBaseData.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblFreq + ' + Me.lblFreq.AutoSize = True + Me.lblFreq.Location = New System.Drawing.Point(11, 6) + Me.lblFreq.Name = "lblFreq" + Me.lblFreq.Size = New System.Drawing.Size(57, 13) + Me.lblFreq.TabIndex = 0 + Me.lblFreq.Tag = "Frequency" + Me.lblFreq.Text = "Frequency" + ' + 'lblMinBaseData + ' + Me.lblMinBaseData.AutoSize = True + Me.lblMinBaseData.Location = New System.Drawing.Point(11, 240) + Me.lblMinBaseData.Name = "lblMinBaseData" + Me.lblMinBaseData.Size = New System.Drawing.Size(140, 13) + Me.lblMinBaseData.TabIndex = 18 + Me.lblMinBaseData.Tag = "Minimum_Base_Data_ Present" + Me.lblMinBaseData.Text = "Minimum Base Data Present" + ' + 'ucrInputFreq + ' + Me.ucrInputFreq.IsReadOnly = False + Me.ucrInputFreq.Location = New System.Drawing.Point(11, 24) + Me.ucrInputFreq.Name = "ucrInputFreq" + Me.ucrInputFreq.Size = New System.Drawing.Size(145, 21) + Me.ucrInputFreq.TabIndex = 1 + ' + 'lblPrecQuantiles + ' + Me.lblPrecQuantiles.AutoSize = True + Me.lblPrecQuantiles.Location = New System.Drawing.Point(265, 159) + Me.lblPrecQuantiles.Name = "lblPrecQuantiles" + Me.lblPrecQuantiles.Size = New System.Drawing.Size(112, 13) + Me.lblPrecQuantiles.TabIndex = 12 + Me.lblPrecQuantiles.Tag = "Precipitation_Quantiles" + Me.lblPrecQuantiles.Text = "Precipitation Quantiles" + ' + 'lblTempQuantiles + ' + Me.lblTempQuantiles.AutoSize = True + Me.lblTempQuantiles.Location = New System.Drawing.Point(265, 112) + Me.lblTempQuantiles.Name = "lblTempQuantiles" + Me.lblTempQuantiles.Size = New System.Drawing.Size(114, 13) + Me.lblTempQuantiles.TabIndex = 8 + Me.lblTempQuantiles.Tag = "Temperature_Quantiles" + Me.lblTempQuantiles.Text = "Temperature Quantiles" + ' + 'grpMaxMissingDays + ' + Me.grpMaxMissingDays.Controls.Add(Me.lblMonthly) + Me.grpMaxMissingDays.Controls.Add(Me.lblAnnual) + Me.grpMaxMissingDays.Controls.Add(Me.ucrNudMothlyMissingDays) + Me.grpMaxMissingDays.Controls.Add(Me.ucrNudAnnualMissingDays) + Me.grpMaxMissingDays.Location = New System.Drawing.Point(265, 6) + Me.grpMaxMissingDays.Name = "grpMaxMissingDays" + Me.grpMaxMissingDays.Size = New System.Drawing.Size(190, 45) + Me.grpMaxMissingDays.TabIndex = 2 + Me.grpMaxMissingDays.TabStop = False + Me.grpMaxMissingDays.Tag = "Maximum_Missing_Days" + Me.grpMaxMissingDays.Text = "Maximum Missing Days" + ' + 'lblMonthly + ' + Me.lblMonthly.AutoSize = True + Me.lblMonthly.Location = New System.Drawing.Point(99, 19) + Me.lblMonthly.Name = "lblMonthly" + Me.lblMonthly.Size = New System.Drawing.Size(44, 13) + Me.lblMonthly.TabIndex = 2 + Me.lblMonthly.Tag = "Monthly" + Me.lblMonthly.Text = "Monthly" + ' + 'lblAnnual + ' + Me.lblAnnual.AutoSize = True + Me.lblAnnual.Location = New System.Drawing.Point(7, 19) + Me.lblAnnual.Name = "lblAnnual" + Me.lblAnnual.Size = New System.Drawing.Size(40, 13) + Me.lblAnnual.TabIndex = 0 + Me.lblAnnual.Tag = "Annual" + Me.lblAnnual.Text = "Annual" + ' + 'ucrNudMothlyMissingDays + ' + Me.ucrNudMothlyMissingDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMothlyMissingDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMothlyMissingDays.Location = New System.Drawing.Point(144, 15) + Me.ucrNudMothlyMissingDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMothlyMissingDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMothlyMissingDays.Name = "ucrNudMothlyMissingDays" + Me.ucrNudMothlyMissingDays.Size = New System.Drawing.Size(41, 20) + Me.ucrNudMothlyMissingDays.TabIndex = 3 + Me.ucrNudMothlyMissingDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudAnnualMissingDays + ' + Me.ucrNudAnnualMissingDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudAnnualMissingDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudAnnualMissingDays.Location = New System.Drawing.Point(49, 15) + Me.ucrNudAnnualMissingDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudAnnualMissingDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudAnnualMissingDays.Name = "ucrNudAnnualMissingDays" + Me.ucrNudAnnualMissingDays.Size = New System.Drawing.Size(44, 20) + Me.ucrNudAnnualMissingDays.TabIndex = 1 + Me.ucrNudAnnualMissingDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblN + ' + Me.lblN.AutoSize = True + Me.lblN.Location = New System.Drawing.Point(265, 210) + Me.lblN.Name = "lblN" + Me.lblN.Size = New System.Drawing.Size(93, 13) + Me.lblN.TabIndex = 16 + Me.lblN.Tag = "Days_for_Quantiles" + Me.lblN.Text = "Days for Quantiles" ' 'lblThreshold ' Me.lblThreshold.AutoSize = True - Me.lblThreshold.Location = New System.Drawing.Point(10, 187) + Me.lblThreshold.Location = New System.Drawing.Point(11, 110) Me.lblThreshold.Name = "lblThreshold" Me.lblThreshold.Size = New System.Drawing.Size(54, 13) - Me.lblThreshold.TabIndex = 1 + Me.lblThreshold.TabIndex = 6 Me.lblThreshold.Tag = "Threshold" Me.lblThreshold.Text = "Threshold" ' - 'nudThreshold - ' - Me.nudThreshold.DecimalPlaces = 2 - Me.nudThreshold.Increment = New Decimal(New Integer() {1, 0, 0, 131072}) - Me.nudThreshold.Location = New System.Drawing.Point(80, 184) - Me.nudThreshold.Name = "nudThreshold" - Me.nudThreshold.Size = New System.Drawing.Size(42, 20) - Me.nudThreshold.TabIndex = 2 - Me.nudThreshold.Value = New Decimal(New Integer() {100, 0, 0, 131072}) - ' - 'chkCenterMean - ' - Me.chkCenterMean.AutoSize = True - Me.chkCenterMean.Location = New System.Drawing.Point(10, 216) - Me.chkCenterMean.Name = "chkCenterMean" - Me.chkCenterMean.Size = New System.Drawing.Size(147, 17) - Me.chkCenterMean.TabIndex = 4 - Me.chkCenterMean.Tag = "Center_Mean_ on_Last_Day" - Me.chkCenterMean.Text = "Center Mean on Last Day" - Me.chkCenterMean.UseVisualStyleBackColor = True - ' - 'chkMaxSpellSpanYears - ' - Me.chkMaxSpellSpanYears.AutoSize = True - Me.chkMaxSpellSpanYears.Location = New System.Drawing.Point(199, 185) - Me.chkMaxSpellSpanYears.Name = "chkMaxSpellSpanYears" - Me.chkMaxSpellSpanYears.Size = New System.Drawing.Size(190, 17) - Me.chkMaxSpellSpanYears.TabIndex = 3 - Me.chkMaxSpellSpanYears.Tag = "Maximum_Spell_Length_Span_Years" - Me.chkMaxSpellSpanYears.Text = "Maximum Spell Length Span Years" - Me.chkMaxSpellSpanYears.UseVisualStyleBackColor = True - ' - 'chkSpellDISpanYear - ' - Me.chkSpellDISpanYear.AutoSize = True - Me.chkSpellDISpanYear.Location = New System.Drawing.Point(199, 216) - Me.chkSpellDISpanYear.Name = "chkSpellDISpanYear" - Me.chkSpellDISpanYear.Size = New System.Drawing.Size(179, 17) - Me.chkSpellDISpanYear.TabIndex = 5 - Me.chkSpellDISpanYear.Tag = "Spell_Duration_Index_Span_Years" - Me.chkSpellDISpanYear.Text = "Spell Duration Index Span Years" - Me.chkSpellDISpanYear.UseVisualStyleBackColor = True + 'tbClimdex + ' + Me.tbClimdex.Controls.Add(Me.TbSettings) + Me.tbClimdex.Controls.Add(Me.tbTemperature) + Me.tbClimdex.Controls.Add(Me.tbPrecipitation) + Me.tbClimdex.Location = New System.Drawing.Point(8, 6) + Me.tbClimdex.Name = "tbClimdex" + Me.tbClimdex.SelectedIndex = 0 + Me.tbClimdex.Size = New System.Drawing.Size(476, 499) + Me.tbClimdex.TabIndex = 0 + ' + 'ucrButtonsClimdexIndices + ' + Me.ucrButtonsClimdexIndices.Location = New System.Drawing.Point(169, 522) + Me.ucrButtonsClimdexIndices.Name = "ucrButtonsClimdexIndices" + Me.ucrButtonsClimdexIndices.Size = New System.Drawing.Size(142, 30) + Me.ucrButtonsClimdexIndices.TabIndex = 2 ' 'sdgClimdexIndices ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(405, 274) - Me.Controls.Add(Me.chkSpellDISpanYear) - Me.Controls.Add(Me.chkMaxSpellSpanYears) - Me.Controls.Add(Me.chkCenterMean) - Me.Controls.Add(Me.nudThreshold) - Me.Controls.Add(Me.lblThreshold) - Me.Controls.Add(Me.grpClimdexIndices) + Me.ClientSize = New System.Drawing.Size(488, 557) + Me.Controls.Add(Me.cmdHelp) + Me.Controls.Add(Me.tbClimdex) Me.Controls.Add(Me.ucrButtonsClimdexIndices) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False @@ -810,76 +850,105 @@ Partial Class sdgClimdexIndices Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Tag = "Indices" Me.Text = "Indices" - Me.panIndices.ResumeLayout(False) - Me.panIndices.PerformLayout() - Me.grpClimdexIndices.ResumeLayout(False) - CType(Me.nudThreshold, System.ComponentModel.ISupportInitialize).EndInit() + Me.tbPrecipitation.ResumeLayout(False) + Me.grpPrecAnnual.ResumeLayout(False) + Me.grpPrecAnnualMonthly.ResumeLayout(False) + Me.tbTemperature.ResumeLayout(False) + Me.grpTmaxTmin.ResumeLayout(False) + Me.grpTmaxTminAnnualMonthly.ResumeLayout(False) + Me.grpTmaxTminAnnual.ResumeLayout(False) + Me.grpTmax.ResumeLayout(False) + Me.grpTmaxAnnualMonthly.ResumeLayout(False) + Me.grpTmaxAnnual.ResumeLayout(False) + Me.grpTmin.ResumeLayout(False) + Me.grpTminAnnualMonthly.ResumeLayout(False) + Me.grpTminAnnual.ResumeLayout(False) + Me.TbSettings.ResumeLayout(False) + Me.TbSettings.PerformLayout() + Me.grpBaseRange.ResumeLayout(False) + Me.grpBaseRange.PerformLayout() + Me.grpMaxMissingDays.ResumeLayout(False) + Me.grpMaxMissingDays.PerformLayout() + Me.tbClimdex.ResumeLayout(False) Me.ResumeLayout(False) - Me.PerformLayout() End Sub Friend WithEvents ucrButtonsClimdexIndices As ucrButtonsSubdialogue - Friend WithEvents chkFrostDays As CheckBox - Friend WithEvents chkTropicalNights As CheckBox - Friend WithEvents chkIcingDays As CheckBox - Friend WithEvents chkSummerDays As CheckBox - Friend WithEvents panIndices As Panel Friend WithEvents ttClimdexIndices As ToolTip - Friend WithEvents chkPrecExceed95Percent As CheckBox - Friend WithEvents chkMonthlyMinDailyTMin As CheckBox - Friend WithEvents chkMonthlyMaxDailyTMax As CheckBox - Friend WithEvents chkMaxDrySpell As CheckBox - Friend WithEvents chkPrecExceed20mm As CheckBox - Friend WithEvents chkSimplePrecII As CheckBox - Friend WithEvents chkTotalDailyPrec As CheckBox - Friend WithEvents chkColdSpellDI As CheckBox - Friend WithEvents chkTmaxBelow10Percent As CheckBox - Friend WithEvents chkTminBelow10Percent As CheckBox - Friend WithEvents chkMonthlyMinDailyTMax As CheckBox - Friend WithEvents chkPrecExceed10mm As CheckBox - Friend WithEvents chkMonthlyMax1dayPrec As CheckBox - Friend WithEvents chkMeanDiurnalTempRange As CheckBox - Friend WithEvents chkWarmSpellDI As CheckBox - Friend WithEvents chkMonthlyMaxDailyTMin As CheckBox - Friend WithEvents chkGrowingSeasonLength As CheckBox - Friend WithEvents chkTmaxAbove90Percent As CheckBox - Friend WithEvents chkTminAbove90Percent As CheckBox - Friend WithEvents chkMonthlyMax5dayPrec As CheckBox - Friend WithEvents chkPrecExceedSpecifiedA As CheckBox - Friend WithEvents chkMaxWetSpell As CheckBox - Friend WithEvents chkPrecExceed99Percent As CheckBox - Friend WithEvents grpClimdexIndices As GroupBox + + Private Sub ucrChkColdSpellDI_Load(sender As Object, e As EventArgs) Handles ucrChkColdSpellDI.Load + + End Sub + Friend WithEvents cmdHelp As Button + Friend WithEvents tbPrecipitation As TabPage + Friend WithEvents grpPrecAnnual As GroupBox + Friend WithEvents ucrChkPrecExceedSpecifiedA As ucrCheck + Friend WithEvents ucrChkMaxDrySpell As ucrCheck + Friend WithEvents ucrChkPrecExceed95Percent As ucrCheck + Friend WithEvents ucrChkPrecExceed10mm As ucrCheck + Friend WithEvents ucrChkMaxWetSpell As ucrCheck + Friend WithEvents ucrChkPrecExceed20mm As ucrCheck + Friend WithEvents ucrChkPrecExceed99Percent As ucrCheck + Friend WithEvents ucrChkTotalDailyPrec As ucrCheck + Friend WithEvents ucrChkSimplePrecII As ucrCheck + Friend WithEvents grpPrecAnnualMonthly As GroupBox + Friend WithEvents ucrChkMonthlyMax5dayPrec As ucrCheck + Friend WithEvents ucrChkMonthlyMax1dayPrec As ucrCheck + Friend WithEvents tbTemperature As TabPage + Friend WithEvents grpTmaxTmin As GroupBox + Friend WithEvents grpTmaxTminAnnualMonthly As GroupBox + Friend WithEvents ucrChkMeanDiurnalTempRange As ucrCheck + Friend WithEvents grpTmaxTminAnnual As GroupBox + Friend WithEvents ucrChkGrowingSeasonLength As ucrCheck + Friend WithEvents grpTmax As GroupBox + Friend WithEvents grpTmaxAnnualMonthly As GroupBox + Friend WithEvents ucrChkMonthlyMaxDailyTMax As ucrCheck + Friend WithEvents ucrChkTmaxAbove90Percent As ucrCheck + Friend WithEvents ucrChkTmaxBelow10Percent As ucrCheck + Friend WithEvents ucrChkMonthlyMinDailyTMax As ucrCheck + Friend WithEvents grpTmaxAnnual As GroupBox + Friend WithEvents ucrChkSummerDays As ucrCheck + Friend WithEvents ucrChkWarmSpellDI As ucrCheck + Friend WithEvents ucrChkIcingDays As ucrCheck + Friend WithEvents grpTmin As GroupBox + Friend WithEvents grpTminAnnualMonthly As GroupBox + Friend WithEvents ucrChkMonthlyMinDailyTMin As ucrCheck + Friend WithEvents ucrChkMonthlyMaxDailyTMin As ucrCheck + Friend WithEvents ucrChkTminBelow10Percent As ucrCheck + Friend WithEvents ucrChkTminAbove90Percent As ucrCheck + Friend WithEvents grpTminAnnual As GroupBox + Friend WithEvents ucrChkColdSpellDI As ucrCheck + Friend WithEvents ucrChkTropicalNights As ucrCheck + Friend WithEvents ucrChkFrostDays As ucrCheck + Friend WithEvents TbSettings As TabPage + Friend WithEvents lblGSLMode As Label + Friend WithEvents ucrInputGSLMode As ucrInputComboBox + Friend WithEvents grpBaseRange As GroupBox + Friend WithEvents lblBaseTo As Label + Friend WithEvents ucrNudUpperBase As ucrNud + Friend WithEvents lblBaseFrom As Label + Friend WithEvents ucrNudLowerBase As ucrNud + Friend WithEvents ucrChkCenterMean As ucrCheck + Friend WithEvents ucrChkSpellDISpanYear As ucrCheck + Friend WithEvents ucrChkNHemisphere As ucrCheck + Friend WithEvents ucrChkMaxSpellSpanYears As ucrCheck + Friend WithEvents ucrNudN As ucrNud + Friend WithEvents ucrNudThreshold As ucrNud + Friend WithEvents ucrNudMinBaseData As ucrNud + Friend WithEvents lblFreq As Label + Friend WithEvents lblMinBaseData As Label + Friend WithEvents ucrInputFreq As ucrInputComboBox + Friend WithEvents lblPrecQuantiles As Label + Friend WithEvents lblTempQuantiles As Label + Friend WithEvents grpMaxMissingDays As GroupBox + Friend WithEvents lblMonthly As Label + Friend WithEvents lblAnnual As Label + Friend WithEvents ucrNudMothlyMissingDays As ucrNud + Friend WithEvents ucrNudAnnualMissingDays As ucrNud + Friend WithEvents lblN As Label Friend WithEvents lblThreshold As Label - Friend WithEvents nudThreshold As NumericUpDown - Friend WithEvents chkCenterMean As CheckBox - Friend WithEvents chkMaxSpellSpanYears As CheckBox - Friend WithEvents chkSpellDISpanYear As CheckBox - Friend WithEvents lbl26 As Label - Friend WithEvents lbl27 As Label - Friend WithEvents lbl24 As Label - Friend WithEvents lbl25 As Label - Friend WithEvents lbl21 As Label - Friend WithEvents lbl22 As Label - Friend WithEvents lbl23 As Label - Friend WithEvents lbl20 As Label - Friend WithEvents lbl14 As Label - Friend WithEvents lbl18 As Label - Friend WithEvents lbl19 As Label - Friend WithEvents lbl17 As Label - Friend WithEvents lbl16 As Label - Friend WithEvents lbl15 As Label - Friend WithEvents lbl6 As Label - Friend WithEvents lbl8 As Label - Friend WithEvents lbl12 As Label - Friend WithEvents lbl9 As Label - Friend WithEvents lbl13 As Label - Friend WithEvents lbl7 As Label - Friend WithEvents lbl11 As Label - Friend WithEvents lbl10 As Label - Friend WithEvents lbl2 As Label - Friend WithEvents lbl3 As Label - Friend WithEvents lbl4 As Label - Friend WithEvents lbl5 As Label - Friend WithEvents lbl1 As Label -End Class + Friend WithEvents tbClimdex As TabControl + Friend WithEvents ucrInputTempQtiles As ucrInputTextBox + Friend WithEvents ucrInputPrecQtiles As ucrInputTextBox +End Class \ No newline at end of file diff --git a/instat/sdgClimdexIndices.resx b/instat/sdgClimdexIndices.resx index 8ff9684afac..2cc6cd36a71 100644 --- a/instat/sdgClimdexIndices.resx +++ b/instat/sdgClimdexIndices.resx @@ -120,4 +120,7 @@ 17, 17 + + 25 + \ No newline at end of file diff --git a/instat/sdgClimdexIndices.vb b/instat/sdgClimdexIndices.vb index 913ee1561fc..3de211ef94c 100644 --- a/instat/sdgClimdexIndices.vb +++ b/instat/sdgClimdexIndices.vb @@ -13,228 +13,555 @@ ' ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . - +Imports instat Imports instat.Translations Public Class sdgClimdexIndices - Public clsROneArg, clsRTwoArg1, clsRTwoArg2, clsRTwoArg3, clsRTwoArg4, clsRTwoArg5, clsRThreeArg As New RFunction - Public bFirstLoad As Boolean = True + Public bControlsInitialised As Boolean = False + Public clsNewClimdexInput, clsRWriteDf As New RFunction + Public clsRMaxMisingDays, clsRBaseRange, clsRTempQTiles, clsRPrecQTiles, clsROneArg, clsRTwoArg1, clsRTwoArg2, clsRTwoArg3, clsRTwoArg4, clsRTwoArg5, clsRThreeArg As New RFunction + Dim lstGroupboxes As List(Of GroupBox) + Dim dctInputindicesTriples As New Dictionary(Of String, List(Of String)) Private Sub sdgClimdexIndices_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) - If bFirstLoad Then - SetDefaults() - bFirstLoad = False - End If - End Sub - - Public Sub SetDefaults() - chkFrostDays.Checked = True - chkSummerDays.Checked = False - chkIcingDays.Checked = False - chkTropicalNights.Checked = False - chkGrowingSeasonLength.Checked = False - chkMonthlyMaxDailyTMax.Checked = False - chkMonthlyMaxDailyTMin.Checked = False - chkMonthlyMinDailyTMax.Checked = False - chkMonthlyMinDailyTMin.Checked = False - chkTminBelow10Percent.Checked = False - chkTmaxBelow10Percent.Checked = False - chkTminAbove90Percent.Checked = False - chkTmaxAbove90Percent.Checked = False - chkWarmSpellDI.Checked = False - chkColdSpellDI.Checked = False - chkMeanDiurnalTempRange.Checked = False - chkMonthlyMax1dayPrec.Checked = False - chkMonthlyMax5dayPrec.Checked = False - chkSimplePrecII.Checked = False - chkPrecExceed10mm.Checked = False - chkPrecExceed20mm.Checked = False - chkPrecExceedSpecifiedA.Checked = False - chkMaxDrySpell.Checked = False - chkMaxWetSpell.Checked = False - chkPrecExceed95Percent.Checked = False - chkPrecExceed99Percent.Checked = False - chkTotalDailyPrec.Checked = False - chkCenterMean.Checked = False - chkMaxSpellSpanYears.Checked = True - chkSpellDISpanYear.Checked = False - nudThreshold.Value = 1.0 - ttClimdexIndices.SetToolTip(chkFrostDays, "The annual count of days where daily minimum temperature drops below 0 degrees Celsius") - ttClimdexIndices.SetToolTip(chkSummerDays, "The annual count of days where daily maximum temperature exceeds 25 degrees Celsius") - ttClimdexIndices.SetToolTip(chkIcingDays, "The annual count of days where daily maximum temperature is below 0 degrees Celsius") - ttClimdexIndices.SetToolTip(chkTropicalNights, "Annual count of days where daily minimum temperature stays above 20 degrees Celsius. ") - ttClimdexIndices.SetToolTip(chkGrowingSeasonLength, "Is the number of days between the start of the first spell of warm days in the first half of the year, and the start of the first spell of cold days in the second half of the year") - ttClimdexIndices.SetToolTip(chkMonthlyMaxDailyTMax, "Computes the monthly or annual maximum of daily maximum temperature") - ttClimdexIndices.SetToolTip(chkMonthlyMaxDailyTMin, "Computes the monthly or annual maximum of daily minimum temperature") - ttClimdexIndices.SetToolTip(chkMonthlyMinDailyTMax, "Computes the monthly or annual minimum of daily maximum temperature") - ttClimdexIndices.SetToolTip(chkMonthlyMinDailyTMin, "Computes the monthly or annual minimum of daily minimum temperature") - ttClimdexIndices.SetToolTip(chkTminBelow10Percent, "Computes the monthly or annual proportion of minimum temperature below 10th percentile") - ttClimdexIndices.SetToolTip(chkTmaxBelow10Percent, "Computes the monthly or annual proportion of maximum temperature below 10th percentile") - ttClimdexIndices.SetToolTip(chkTminAbove90Percent, "Computes the monthly or annual proportion of minimum temperature above 90th percentile") - ttClimdexIndices.SetToolTip(chkTmaxAbove90Percent, "Computes the monthly or annual proportion of maximum temperature above 90th percentile") - ttClimdexIndices.SetToolTip(chkWarmSpellDI, "Warm spell is defined as a sequence of 6 or more days in which the daily maximum temperature exceeds the 90th percentile of daily maximum temperature for a 5-day running window surrounding this day during the baseline period") - ttClimdexIndices.SetToolTip(chkColdSpellDI, "Cold spell is defined as a sequence of 6 or more days in which the daily minimum temperature is below the 10th percentile of daily minimum temperature for a 5-day running window surrounding this day during the baseline period.") - ttClimdexIndices.SetToolTip(chkMeanDiurnalTempRange, "Computes the mean daily diurnal temperature range. The frequency of observation can be either monthly or annual") - ttClimdexIndices.SetToolTip(chkMonthlyMax1dayPrec, "Computes the climdex index Rx1day: monthly or annual maximum 1-day precipitation") - ttClimdexIndices.SetToolTip(chkMonthlyMax5dayPrec, "Computes the monthly or annual maximum consecutive 5-day precipitation") - ttClimdexIndices.SetToolTip(chkSimplePrecII, "This is defined as the sum of precipitation in wet days (days with preciptitation over 1mm) during the year divided by the number of wet days in the year.") - ttClimdexIndices.SetToolTip(chkPrecExceed10mm, "Computes the annual count of days where daily precipitation is more than 10mm per day") - ttClimdexIndices.SetToolTip(chkPrecExceed20mm, "Computes the annual count of days where daily precipitation is more than 20mm per day") - ttClimdexIndices.SetToolTip(chkPrecExceedSpecifiedA, "Computes the climdex index Rnnmm: the annual count of days where daily precipitation is more than nn mm per day") - ttClimdexIndices.SetToolTip(chkMaxDrySpell, "Maximum number of days when precipitation is less than 1mm.") - ttClimdexIndices.SetToolTip(chkMaxWetSpell, "Maximum number of days when precipitation is greater than 1mm") - ttClimdexIndices.SetToolTip(chkPrecExceed95Percent, "Computes the annual sum of precipitation in days where daily precipitation exceeds the 95th percentile of daily precipitation in the base period ") - ttClimdexIndices.SetToolTip(chkPrecExceed99Percent, "Computes the annual sum of precipitation in days where daily precipitation exceeds the 99th percentile of daily precipitation in the base period ") - ttClimdexIndices.SetToolTip(chkTotalDailyPrec, "Computes the annual sum of precipitation in wet days (days where precipitation is at least 1mm). ") - clsROneArg.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - clsRTwoArg1.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - clsRTwoArg2.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - clsRTwoArg2.AddParameter("gsl.mode", Chr(34) & "GSL" & Chr(34)) - clsRTwoArg3.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - clsRTwoArg4.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - clsRTwoArg5.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - clsRThreeArg.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsRClimdexInput) - End Sub - - Private Sub nudThreshold_ValueChanged(sender As Object, e As EventArgs) Handles nudThreshold.ValueChanged - If nudThreshold.Value = 1.0 Then - clsRTwoArg3.RemoveParameterByName("threshold") - Else - clsRTwoArg3.AddParameter("threshold", nudThreshold.Value) - End If End Sub - Private Sub chkCenterMean_CheckedChanged(sender As Object, e As EventArgs) Handles chkCenterMean.CheckedChanged - If chkCenterMean.Checked Then - clsRThreeArg.AddParameter("center.mean.on.last.day", "TRUE") - Else - clsRThreeArg.RemoveParameterByName("center.mean.on.last.day") - End If - End Sub + Public Sub InitialiseControls() + Dim dctInputFreqPairs As New Dictionary(Of String, String) + Dim dctNumericPairs As New Dictionary(Of String, String) + Dim dctCategoricalPairs As New Dictionary(Of String, String) + clsRMaxMisingDays.SetRCommand("c") + clsRBaseRange.SetRCommand("c") + clsRTempQTiles.SetRCommand("c") + clsRPrecQTiles.SetRCommand("c") + 'we may need to have the climdex object created by default then the user specifies the indices to display. + 'ucrChkFrostDays.Checked = True + ucrChkFrostDays.SetText("Frost Days [1]") + dctInputindicesTriples.Add(ucrChkFrostDays.chkCheck.Text, {"Frost_Days", "climdex.fd"}.ToList) + ucrChkFrostDays.bChangeParameterValue = False + ucrChkSummerDays.Checked = False + ucrChkSummerDays.SetText("Summer Days [2]") + dctInputindicesTriples.Add(ucrChkSummerDays.chkCheck.Text, {"Summer_Days", "climdex.su"}.ToList) + ucrChkSummerDays.bChangeParameterValue = False + ucrChkIcingDays.Checked = False + ucrChkIcingDays.SetText("Icing Days [3]") + dctInputindicesTriples.Add(ucrChkIcingDays.chkCheck.Text, {"Icing_Days", "climdex.id"}.ToList) + ucrChkIcingDays.bChangeParameterValue = False + ucrChkTropicalNights.Checked = False + ucrChkTropicalNights.SetText("Tropical Nights [4]") + dctInputindicesTriples.Add(ucrChkTropicalNights.chkCheck.Text, {"Tropical_Nights", "climdex.tr"}.ToList) + ucrChkTropicalNights.bChangeParameterValue = False + ucrChkGrowingSeasonLength.Checked = False + ucrChkGrowingSeasonLength.SetText("Growing Season Length [5]") + dctInputindicesTriples.Add(ucrChkGrowingSeasonLength.chkCheck.Text, {"Growing_Season_Length", "climdex.gsl"}.ToList) + ucrChkGrowingSeasonLength.bChangeParameterValue = False + ucrChkMonthlyMaxDailyTMax.Checked = False + ucrChkMonthlyMaxDailyTMax.SetText("Monthly Maximum of Daily Maximum Temperature [6]") + dctInputindicesTriples.Add(ucrChkMonthlyMaxDailyTMax.chkCheck.Text, {"Monthly_Maximum_of_Daily_Maximum_Temperature", "climdex.txx"}.ToList) + ucrChkMonthlyMaxDailyTMax.bChangeParameterValue = False + ucrChkMonthlyMaxDailyTMin.Checked = False + ucrChkMonthlyMaxDailyTMin.SetText("Monthly Maximum of Daily Minimum Temperature [7]") + dctInputindicesTriples.Add(ucrChkMonthlyMaxDailyTMin.chkCheck.Text, {"Monthly_Maximum_of_Daily_Minimum_Temperature", "climdex.txn"}.ToList) + ucrChkMonthlyMaxDailyTMin.bChangeParameterValue = False + ucrChkMonthlyMinDailyTMax.Checked = False + ucrChkMonthlyMinDailyTMax.SetText("Monthly Minimum of Daily Maximum Temperature [8]") + dctInputindicesTriples.Add(ucrChkMonthlyMinDailyTMax.chkCheck.Text, {"Monthly_Minimum_of_Daily_Maximum_Temperature", "climdex.tnx"}.ToList) + ucrChkMonthlyMinDailyTMax.bChangeParameterValue = False + ucrChkMonthlyMinDailyTMin.Checked = False + ucrChkMonthlyMinDailyTMin.SetText("Monthly Minimum of Daily Minimum Temperature [9]") + dctInputindicesTriples.Add(ucrChkMonthlyMinDailyTMin.chkCheck.Text, {"Monthly_Minimum_of_Daily_Minimum_Temperature", "climdex.tnn"}.ToList) + ucrChkMonthlyMinDailyTMin.bChangeParameterValue = False + ucrChkTminBelow10Percent.Checked = False + ucrChkTminBelow10Percent.SetText("Percentage of Days When Tmin is Below 10th Percentile [10]") + dctInputindicesTriples.Add(ucrChkTminBelow10Percent.chkCheck.Text, {"Percentage_of_Days_When_Tmin_is_Below_10th_Percentile", "climdex.tn10p"}.ToList) + ucrChkTminBelow10Percent.bChangeParameterValue = False + ucrChkTmaxBelow10Percent.Checked = False + ucrChkTmaxBelow10Percent.SetText("Percentage of Days When Tmax is Below 10th Percentile [11]") + dctInputindicesTriples.Add(ucrChkTmaxBelow10Percent.chkCheck.Text, {"Percentage_of_Days_When_Tmax_is_Below_10th_Percentile", "climdex.tx10p"}.ToList) + ucrChkTmaxBelow10Percent.bChangeParameterValue = False + ucrChkTminAbove90Percent.Checked = False + ucrChkTminAbove90Percent.SetText("Percentage of Days When Tmin is Above 90th Percentile [12]") + dctInputindicesTriples.Add(ucrChkTminAbove90Percent.chkCheck.Text, {"Percentage_of_Days_When_Tmin_is_Above_90th_Percentile", "climdex.tn90p"}.ToList) + ucrChkTminAbove90Percent.bChangeParameterValue = False + ucrChkTmaxAbove90Percent.Checked = False + ucrChkTmaxAbove90Percent.SetText("Percentage of Days When Tmax is Above 90th Percentile [13]") + dctInputindicesTriples.Add(ucrChkTmaxAbove90Percent.chkCheck.Text, {"Percentage_of_Days_When_Tmax_is_Above_90th_Percentile", "climdex.tx90p"}.ToList) + ucrChkTmaxAbove90Percent.bChangeParameterValue = False + ucrChkWarmSpellDI.Checked = False + ucrChkWarmSpellDI.SetText("Warm Spell Duration Index [14]") + dctInputindicesTriples.Add(ucrChkWarmSpellDI.chkCheck.Text, {"Warm_Spell_Duration_Index", "climdex.wsdi"}.ToList) + ucrChkWarmSpellDI.bChangeParameterValue = False + ucrChkColdSpellDI.Checked = False + ucrChkColdSpellDI.SetText("Cold Spell Duration Index [15]") + dctInputindicesTriples.Add(ucrChkColdSpellDI.chkCheck.Text, {"Cold_Spell_Duration_Index", "climdex.csdi"}.ToList) + ucrChkColdSpellDI.bChangeParameterValue = False + ucrChkMeanDiurnalTempRange.Checked = False + ucrChkMeanDiurnalTempRange.SetText("Mean Diurnal Temperature Range [16]") + dctInputindicesTriples.Add(ucrChkMeanDiurnalTempRange.chkCheck.Text, {"Mean_Diurnal_Temperature_Range", "climdex.dtr"}.ToList) + ucrChkMeanDiurnalTempRange.bChangeParameterValue = False + ucrChkMonthlyMax1dayPrec.Checked = False + ucrChkMonthlyMax1dayPrec.SetText("Monthly Maximum 1-day Precipitation [17]") + dctInputindicesTriples.Add(ucrChkMonthlyMax1dayPrec.chkCheck.Text, {"Monthly_Maximum_1day_Precipitation", "climdex.rx1day"}.ToList) + ucrChkMonthlyMax1dayPrec.bChangeParameterValue = False + ucrChkMonthlyMax5dayPrec.Checked = False + ucrChkMonthlyMax5dayPrec.SetText("Monthly Maximum Consecutive 5-day Precipitation [18]") + dctInputindicesTriples.Add(ucrChkMonthlyMax5dayPrec.chkCheck.Text, {"Monthly_Maximum_Consecutive_5day_Precipitation", "climdex.rx5day"}.ToList) + ucrChkMonthlyMax5dayPrec.bChangeParameterValue = False + ucrChkSimplePrecII.Checked = False + ucrChkSimplePrecII.SetText("Simple Precipitation Intensity Index [19]") + dctInputindicesTriples.Add(ucrChkSimplePrecII.chkCheck.Text, {"Simple_Precipitation_Intensity_Index", "climdex.sdii"}.ToList) + ucrChkSimplePrecII.bChangeParameterValue = False + ucrChkPrecExceed10mm.Checked = False + ucrChkPrecExceed10mm.SetText("Precipitation Exceeding 10mm Per Day [20]") + dctInputindicesTriples.Add(ucrChkPrecExceed10mm.chkCheck.Text, {"Precipitation_Exceeding_10mm_Per_Day", "climdex.r10mm"}.ToList) + ucrChkPrecExceed10mm.bChangeParameterValue = False + ucrChkPrecExceed20mm.Checked = False + ucrChkPrecExceed20mm.SetText("Precipitation Exceeding 20mm Per Day [21]") + dctInputindicesTriples.Add(ucrChkPrecExceed20mm.chkCheck.Text, {"Precipitation_Exceeding_20mm_Per_Day", "climdex.r20mm"}.ToList) + ucrChkPrecExceed20mm.bChangeParameterValue = False + ucrChkPrecExceedSpecifiedA.Checked = False + ucrChkPrecExceedSpecifiedA.SetText("Precipitation Exceeding a Specified Amount Per Day [22]") + dctInputindicesTriples.Add(ucrChkPrecExceedSpecifiedA.chkCheck.Text, {"Precipitation_Exceeding_a_Specified_Amount_Per_Day", "climdex.rnnmm"}.ToList) + ucrChkPrecExceedSpecifiedA.bChangeParameterValue = False + ucrChkMaxDrySpell.Checked = False + ucrChkMaxDrySpell.SetText("Maximum Length of Dry Spell [23]") + dctInputindicesTriples.Add(ucrChkMaxDrySpell.chkCheck.Text, {"Maximum_Length_of_Dry_Spell", "climdex.cdd"}.ToList) + ucrChkMaxDrySpell.bChangeParameterValue = False + ucrChkMaxWetSpell.Checked = False + ucrChkMaxWetSpell.SetText("Maximum Length of Wet Spell [24]") + dctInputindicesTriples.Add(ucrChkMaxWetSpell.chkCheck.Text, {"Maximum_Length_of_Wet_Spell", "climdex.cwd"}.ToList) + ucrChkMaxWetSpell.bChangeParameterValue = False + ucrChkPrecExceed95Percent.Checked = False + ucrChkPrecExceed95Percent.SetText("Total Daily Precipitation Exceeding 95th Percentile Threshold [25]") + dctInputindicesTriples.Add(ucrChkPrecExceed95Percent.chkCheck.Text, {"Total_Daily_Precipitation_Exceeding_95th_Percentile_Threshold", "climdex.r95ptot"}.ToList) + ucrChkPrecExceed95Percent.bChangeParameterValue = False + ucrChkPrecExceed99Percent.Checked = False + ucrChkPrecExceed99Percent.SetText("Total Daily Precipitation Exceeding 99th Percentile Threshold [26]") + dctInputindicesTriples.Add(ucrChkPrecExceed99Percent.chkCheck.Text, {"Total_Daily_Precipitation_Exceeding_99th_Percentile_Threshold", "climdex.r99ptot"}.ToList) + ucrChkPrecExceed99Percent.bChangeParameterValue = False + ucrChkTotalDailyPrec.Checked = False + ucrChkTotalDailyPrec.SetText("Total Daily Precipitation [27]") + dctInputindicesTriples.Add(ucrChkTotalDailyPrec.chkCheck.Text, {"Total_Daily_Precipitation", "climdex.prcptot"}.ToList) + ucrChkTotalDailyPrec.bChangeParameterValue = False - Private Sub chkSpellDISpanYear_CheckedChanged(sender As Object, e As EventArgs) Handles chkSpellDISpanYear.CheckedChanged - If chkSpellDISpanYear.Checked Then - clsRTwoArg5.AddParameter("spells.can.span.years", "TRUE") - Else - clsRTwoArg5.RemoveParameterByName("spells.can.span.years") - End If + ucrNudThreshold.SetParameter(New RParameter("threshold")) + ucrNudThreshold.SetRDefault(1) + ucrNudThreshold.DecimalPlaces = 2 + ucrNudThreshold.SetMinMax(0, 1) + ucrNudThreshold.Increment = 0.01 + + ucrNudN.SetParameter(New RParameter("n")) + ucrNudN.SetRDefault(5) + ucrNudN.SetMinMax(1, 100) + + ucrNudMinBaseData.SetParameter(New RParameter("min.base.data.fraction.present")) + ucrNudMinBaseData.SetRDefault(0.1) + ucrNudMinBaseData.DecimalPlaces = 2 + ucrNudMinBaseData.SetMinMax(0, 1) + ucrNudMinBaseData.Increment = 0.01 + + ucrNudAnnualMissingDays.SetParameter(New RParameter("annual")) + ucrNudAnnualMissingDays.SetRDefault(15) + ucrNudAnnualMissingDays.SetMinMax(1, 366) + + ucrNudMothlyMissingDays.SetParameter(New RParameter("monthly")) + ucrNudMothlyMissingDays.SetRDefault(3) + ucrNudMothlyMissingDays.SetMinMax(1, 31) + + ucrNudLowerBase.SetParameter(New RParameter("lower_base", 0)) + ucrNudLowerBase.clsParameter.bIncludeArgumentName = False + ucrNudLowerBase.SetRDefault(1961) + ucrNudLowerBase.SetMinMax(1900, 9999) + + ucrNudUpperBase.SetParameter(New RParameter("upper_base", 1)) + ucrNudUpperBase.clsParameter.bIncludeArgumentName = False + ucrNudUpperBase.SetRDefault(1990) + ucrNudUpperBase.SetMinMax(1900, 9999) + + clsNewClimdexInput.AddParameter("base.range", clsRFunctionParameter:=clsRBaseRange) + clsNewClimdexInput.AddParameter("max.missing.days", clsRFunctionParameter:=clsRMaxMisingDays) + ucrInputFreq.SetParameter(New RParameter("freq")) + dctInputFreqPairs.Add("annual", Chr(34) & "annual" & Chr(34)) + dctInputFreqPairs.Add("monthly", Chr(34) & "monthly" & Chr(34)) + ucrInputFreq.SetItems(dctInputFreqPairs) + ucrInputFreq.cboInput.SelectedItem = "annual" + + ucrInputTempQtiles.SetParameter(New RParameter("x")) + ucrInputTempQtiles.SetValidationTypeAsNumericList() + ucrInputTempQtiles.bAddQuotesIfUnrecognised = False + ucrInputTempQtiles.clsParameter.bIncludeArgumentName = False + ucrInputTempQtiles.SetRDefault("0.1, 0.9") + + ucrInputPrecQtiles.SetParameter(New RParameter("x")) + ucrInputPrecQtiles.SetValidationTypeAsNumericList() + ucrInputPrecQtiles.bAddQuotesIfUnrecognised = False + ucrInputPrecQtiles.clsParameter.bIncludeArgumentName = False + ucrInputPrecQtiles.SetRDefault("0.95, 0.99") + + clsNewClimdexInput.AddParameter("temp.qtiles", clsRFunctionParameter:=clsRTempQTiles) + clsNewClimdexInput.AddParameter("prec.qtiles", clsRFunctionParameter:=clsRPrecQTiles) + + ucrChkNHemisphere.SetText("Northern Hemisphere") + ucrChkNHemisphere.SetParameter(New RParameter("northern.hemisphere"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") + ucrChkNHemisphere.SetRDefault("TRUE") + + ucrChkCenterMean.SetText("Center Mean on Last Day") + ucrChkCenterMean.SetParameter(New RParameter("center.mean.on.last.day"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") + ucrChkCenterMean.SetRDefault("FALSE") + + ucrChkMaxSpellSpanYears.SetText("Maximum Spell Length Span Years") + ucrChkMaxSpellSpanYears.SetParameter(New RParameter("spells.can.span.years"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") + ucrChkMaxSpellSpanYears.SetRDefault("TRUE") + + ucrChkSpellDISpanYear.SetText("Spell Duration Index Span Years") + ucrChkSpellDISpanYear.SetParameter(New RParameter("spells.can.span.years"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") + ucrChkSpellDISpanYear.SetRDefault("FALSE") + + ucrInputGSLMode.SetParameter(New RParameter("gsl.mode")) + dctNumericPairs.Add("GSL", Chr(34) & "GSL" & Chr(34)) + dctNumericPairs.Add("GSL_first", Chr(34) & "GSL_first" & Chr(34)) + dctNumericPairs.Add("GSL_max", Chr(34) & "GSL_max" & Chr(34)) + dctNumericPairs.Add("GSL_sum", Chr(34) & "GSL_sum" & Chr(34)) + ucrInputGSLMode.SetItems(dctNumericPairs) + ucrInputGSLMode.cboInput.SelectedItem = "GSL" + + lstGroupboxes = New List(Of GroupBox) + lstGroupboxes.AddRange({grpPrecAnnual, grpPrecAnnualMonthly, grpTmaxAnnual, grpTmaxAnnualMonthly, grpTminAnnual, grpTminAnnualMonthly, grpTmaxTminAnnual, grpTmaxTminAnnualMonthly}) + + ttClimdexIndices.SetToolTip(ucrChkFrostDays.chkCheck, "The annual count of days where daily minimum temperature drops below 0 degrees Celsius") + ttClimdexIndices.SetToolTip(ucrChkSummerDays.chkCheck, "The annual count of days where daily maximum temperature exceeds 25 degrees Celsius") + ttClimdexIndices.SetToolTip(ucrChkIcingDays.chkCheck, "The annual count of days where daily maximum temperature is below 0 degrees Celsius") + ttClimdexIndices.SetToolTip(ucrChkTropicalNights.chkCheck, "Annual count of days where daily minimum temperature stays above 20 degrees Celsius. ") + ttClimdexIndices.SetToolTip(ucrChkGrowingSeasonLength.chkCheck, "Is the number of days between the start of the first spell of warm days in the first half of the year, and the start of the first spell of cold days in the second half of the year") + ttClimdexIndices.SetToolTip(ucrChkMonthlyMaxDailyTMax.chkCheck, "Computes the monthly or annual maximum of daily maximum temperature") + ttClimdexIndices.SetToolTip(ucrChkMonthlyMaxDailyTMin.chkCheck, "Computes the monthly or annual maximum of daily minimum temperature") + ttClimdexIndices.SetToolTip(ucrChkMonthlyMinDailyTMax.chkCheck, "Computes the monthly or annual minimum of daily maximum temperature") + ttClimdexIndices.SetToolTip(ucrChkMonthlyMinDailyTMin.chkCheck, "Computes the monthly or annual minimum of daily minimum temperature") + ttClimdexIndices.SetToolTip(ucrChkTminBelow10Percent.chkCheck, "Computes the monthly or annual proportion of minimum temperature below 10th percentile") + ttClimdexIndices.SetToolTip(ucrChkTmaxBelow10Percent.chkCheck, "Computes the monthly or annual proportion of maximum temperature below 10th percentile") + ttClimdexIndices.SetToolTip(ucrChkTminAbove90Percent.chkCheck, "Computes the monthly or annual proportion of minimum temperature above 90th percentile") + ttClimdexIndices.SetToolTip(ucrChkTmaxAbove90Percent.chkCheck, "Computes the monthly or annual proportion of maximum temperature above 90th percentile") + ttClimdexIndices.SetToolTip(ucrChkWarmSpellDI.chkCheck, "Warm spell is defined as a sequence of 6 or more days in which the daily maximum temperature exceeds the 90th percentile of daily maximum temperature for a 5-day running window surrounding this day during the baseline period") + ttClimdexIndices.SetToolTip(ucrChkColdSpellDI.chkCheck, "Cold spell is defined as a sequence of 6 or more days in which the daily minimum temperature is below the 10th percentile of daily minimum temperature for a 5-day running window surrounding this day during the baseline period.") + ttClimdexIndices.SetToolTip(ucrChkMeanDiurnalTempRange.chkCheck, "Computes the mean daily diurnal temperature range. The frequency of observation can be either monthly or annual") + ttClimdexIndices.SetToolTip(ucrChkMonthlyMax1dayPrec.chkCheck, "Computes the climdex index Rx1day: monthly or annual maximum 1-day precipitation") + ttClimdexIndices.SetToolTip(ucrChkMonthlyMax5dayPrec.chkCheck, "Computes the monthly or annual maximum consecutive 5-day precipitation") + ttClimdexIndices.SetToolTip(ucrChkSimplePrecII.chkCheck, "This is defined as the sum of precipitation in wet days (days with preciptitation over 1mm) during the year divided by the number of wet days in the year.") + ttClimdexIndices.SetToolTip(ucrChkPrecExceed10mm.chkCheck, "Computes the annual count of days where daily precipitation is more than 10mm per day") + ttClimdexIndices.SetToolTip(ucrChkPrecExceed20mm.chkCheck, "Computes the annual count of days where daily precipitation is more than 20mm per day") + ttClimdexIndices.SetToolTip(ucrChkPrecExceedSpecifiedA.chkCheck, "Computes the climdex index Rnnmm: the annual count of days where daily precipitation is more than nn mm per day") + ttClimdexIndices.SetToolTip(ucrChkMaxDrySpell.chkCheck, "Maximum number of days when precipitation is less than 1mm.") + ttClimdexIndices.SetToolTip(ucrChkMaxWetSpell.chkCheck, "Maximum number of days when precipitation is greater than 1mm") + ttClimdexIndices.SetToolTip(ucrChkPrecExceed95Percent.chkCheck, "Computes the annual sum of precipitation in days where daily precipitation exceeds the 95th percentile of daily precipitation in the base period ") + ttClimdexIndices.SetToolTip(ucrChkPrecExceed99Percent.chkCheck, "Computes the annual sum of precipitation in days where daily precipitation exceeds the 99th percentile of daily precipitation in the base period ") + ttClimdexIndices.SetToolTip(ucrChkTotalDailyPrec.chkCheck, "Computes the annual sum of precipitation in wet days (days where precipitation is at least 1mm). ") + + clsROneArg.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + clsRTwoArg1.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + clsRTwoArg2.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + clsRTwoArg3.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + clsRTwoArg4.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + clsRTwoArg5.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + clsRThreeArg.AddParameter("ci", clsRFunctionParameter:=dlgClimdex.clsDefaultFunction) + bControlsInitialised = True End Sub - Private Sub chkMaxSpellSpanYears_CheckedChanged(sender As Object, e As EventArgs) Handles chkMaxSpellSpanYears.CheckedChanged - If chkMaxSpellSpanYears.Checked Then - clsRTwoArg4.RemoveParameterByName("spells.can.span.years") + Private Sub SaveIndices(ucrchkTemp As ucrCheck, clsIndex As RFunction, bSave As Boolean) + Dim clsRListDF, clsRConvertDF As New RFunction + clsRWriteDf.SetRCommand("InstatDataObject$add_climdex_indices") + clsRListDF.SetRCommand("list") + clsRListDF.AddParameter(dctInputindicesTriples.Item(ucrchkTemp.chkCheck.Text)(0), clsRFunctionParameter:=clsIndex) + clsRWriteDf.AddParameter("indices", clsRFunctionParameter:=clsRListDF) + If bSave Then + frmMain.clsRLink.RunScript(clsRWriteDf.ToScript(), 0) Else - clsRTwoArg4.AddParameter("spells.can.span.years", "FALSE") + frmMain.clsRLink.RunScript(clsIndex.ToScript(), 2) End If End Sub - Public Sub IndicesOptions() - If (chkFrostDays.Checked = True) Then - clsROneArg.SetRCommand("climdex.fd") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + Public Sub IndicesOptions(bSaveIndex As Boolean) + If (ucrChkFrostDays.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkFrostDays.chkCheck.Text)(1)) + SaveIndices(ucrChkFrostDays, clsROneArg, bSaveIndex) End If - If (chkSummerDays.Checked = True) Then - clsROneArg.SetRCommand("climdex.su") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkSummerDays.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkSummerDays.chkCheck.Text)(1)) + SaveIndices(ucrChkSummerDays, clsROneArg, bSaveIndex) End If - If (chkIcingDays.Checked = True) Then - clsROneArg.SetRCommand("climdex.id") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkIcingDays.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkIcingDays.chkCheck.Text)(1)) + SaveIndices(ucrChkIcingDays, clsROneArg, bSaveIndex) End If - If (chkTropicalNights.Checked = True) Then - clsROneArg.SetRCommand("climdex.tr") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkTropicalNights.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkTropicalNights.chkCheck.Text)(1)) + SaveIndices(ucrChkTropicalNights, clsROneArg, bSaveIndex) End If - If (chkGrowingSeasonLength.Checked = True) Then - clsRTwoArg2.SetRCommand("climdex.gsl") - frmMain.clsRLink.RunScript(clsRTwoArg2.ToScript(), 2) + If (ucrChkGrowingSeasonLength.Checked = True) Then + clsRTwoArg2.SetRCommand(dctInputindicesTriples.Item(ucrChkGrowingSeasonLength.chkCheck.Text)(1)) + SaveIndices(ucrChkGrowingSeasonLength, clsRTwoArg2, bSaveIndex) End If - If (chkMonthlyMaxDailyTMax.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.txx") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkMonthlyMaxDailyTMax.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkMonthlyMaxDailyTMax.chkCheck.Text)(1)) + SaveIndices(ucrChkMonthlyMaxDailyTMax, clsRTwoArg1, bSaveIndex) End If - If (chkMonthlyMaxDailyTMin.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.tnx") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkMonthlyMaxDailyTMin.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkMonthlyMaxDailyTMin.chkCheck.Text)(1)) + SaveIndices(ucrChkMonthlyMaxDailyTMin, clsRTwoArg1, bSaveIndex) End If - If (chkMonthlyMinDailyTMax.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.txn") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkMonthlyMinDailyTMax.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkMonthlyMinDailyTMax.chkCheck.Text)(1)) + SaveIndices(ucrChkMonthlyMinDailyTMax, clsRTwoArg1, bSaveIndex) End If - If (chkMonthlyMinDailyTMin.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.tnn") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkMonthlyMinDailyTMin.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkMonthlyMinDailyTMin.chkCheck.Text)(1)) + SaveIndices(ucrChkMonthlyMinDailyTMin, clsRTwoArg1, bSaveIndex) End If - If (chkTminBelow10Percent.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.tn10p") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkTminBelow10Percent.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkTminBelow10Percent.chkCheck.Text)(1)) + SaveIndices(ucrChkTminBelow10Percent, clsRTwoArg1, bSaveIndex) End If - If (chkTmaxBelow10Percent.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.tx10p") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkTmaxBelow10Percent.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkTmaxBelow10Percent.chkCheck.Text)(1)) + SaveIndices(ucrChkTmaxBelow10Percent, clsRTwoArg1, bSaveIndex) End If - If (chkTminAbove90Percent.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.tn90p") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkTminAbove90Percent.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkTminAbove90Percent.chkCheck.Text)(1)) + SaveIndices(ucrChkTminAbove90Percent, clsRTwoArg1, bSaveIndex) End If - If (chkTmaxAbove90Percent.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.tx90p") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkTmaxAbove90Percent.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkTmaxAbove90Percent.chkCheck.Text)(1)) + SaveIndices(ucrChkTmaxAbove90Percent, clsRTwoArg1, bSaveIndex) End If - If (chkWarmSpellDI.Checked = True) Then - clsRTwoArg5.SetRCommand("climdex.wsdi") - frmMain.clsRLink.RunScript(clsRTwoArg5.ToScript(), 2) + If (ucrChkWarmSpellDI.Checked = True) Then + clsRTwoArg5.SetRCommand(dctInputindicesTriples.Item(ucrChkWarmSpellDI.chkCheck.Text)(1)) + SaveIndices(ucrChkWarmSpellDI, clsRTwoArg5, bSaveIndex) End If - If (chkColdSpellDI.Checked = True) Then - clsRTwoArg5.SetRCommand("climdex.csdi") - frmMain.clsRLink.RunScript(clsRTwoArg5.ToScript(), 2) + If (ucrChkColdSpellDI.Checked = True) Then + clsRTwoArg5.SetRCommand(dctInputindicesTriples.Item(ucrChkColdSpellDI.chkCheck.Text)(1)) + SaveIndices(ucrChkColdSpellDI, clsRTwoArg5, bSaveIndex) End If - If (chkMeanDiurnalTempRange.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.dtr") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkMeanDiurnalTempRange.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkMeanDiurnalTempRange.chkCheck.Text)(1)) + SaveIndices(ucrChkMeanDiurnalTempRange, clsRTwoArg1, bSaveIndex) End If - If (chkMonthlyMax1dayPrec.Checked = True) Then - clsRTwoArg1.SetRCommand("climdex.rx1day") - frmMain.clsRLink.RunScript(clsRTwoArg1.ToScript(), 2) + If (ucrChkMonthlyMax1dayPrec.Checked = True) Then + clsRTwoArg1.SetRCommand(dctInputindicesTriples.Item(ucrChkMonthlyMax1dayPrec.chkCheck.Text)(1)) + SaveIndices(ucrChkMonthlyMax1dayPrec, clsRTwoArg1, bSaveIndex) End If - If (chkMonthlyMax5dayPrec.Checked = True) Then - clsRThreeArg.SetRCommand("climdex.rx5day") - frmMain.clsRLink.RunScript(clsRThreeArg.ToScript(), 2) + If (ucrChkMonthlyMax5dayPrec.Checked = True) Then + clsRThreeArg.SetRCommand(dctInputindicesTriples.Item(ucrChkMonthlyMax5dayPrec.chkCheck.Text)(1)) + SaveIndices(ucrChkMonthlyMax5dayPrec, clsRThreeArg, bSaveIndex) End If - If (chkSimplePrecII.Checked = True) Then - clsROneArg.SetRCommand("climdex.sdii") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkSimplePrecII.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkSimplePrecII.chkCheck.Text)(1)) + SaveIndices(ucrChkSimplePrecII, clsROneArg, bSaveIndex) End If - If (chkPrecExceed10mm.Checked = True) Then - clsROneArg.SetRCommand("climdex.r10mm") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkPrecExceed10mm.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkPrecExceed10mm.chkCheck.Text)(1)) + SaveIndices(ucrChkPrecExceed10mm, clsROneArg, bSaveIndex) End If - If (chkPrecExceed20mm.Checked = True) Then - clsROneArg.SetRCommand("climdex.r20mm") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkPrecExceed20mm.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkPrecExceed20mm.chkCheck.Text)(1)) + SaveIndices(ucrChkPrecExceed20mm, clsROneArg, bSaveIndex) End If - If (chkPrecExceedSpecifiedA.Checked = True) Then - clsRTwoArg3.SetRCommand("climdex.rnnmm") - frmMain.clsRLink.RunScript(clsRTwoArg3.ToScript(), 2) + If (ucrChkPrecExceedSpecifiedA.Checked = True) Then + clsRTwoArg3.SetRCommand(dctInputindicesTriples.Item(ucrChkPrecExceedSpecifiedA.chkCheck.Text)(1)) + SaveIndices(ucrChkPrecExceedSpecifiedA, clsRTwoArg3, bSaveIndex) End If - If (chkMaxDrySpell.Checked = True) Then - clsRTwoArg4.SetRCommand("climdex.cdd") - frmMain.clsRLink.RunScript(clsRTwoArg4.ToScript(), 2) + If (ucrChkMaxDrySpell.Checked = True) Then + clsRTwoArg4.SetRCommand(dctInputindicesTriples.Item(ucrChkMaxDrySpell.chkCheck.Text)(1)) + SaveIndices(ucrChkMaxDrySpell, clsRTwoArg4, bSaveIndex) End If - If (chkMaxWetSpell.Checked = True) Then - clsRTwoArg4.SetRCommand("climdex.cwd") - frmMain.clsRLink.RunScript(clsRTwoArg4.ToScript(), 2) + If (ucrChkMaxWetSpell.Checked = True) Then + clsRTwoArg4.SetRCommand(dctInputindicesTriples.Item(ucrChkMaxWetSpell.chkCheck.Text)(1)) + SaveIndices(ucrChkMaxWetSpell, clsRTwoArg4, bSaveIndex) End If - If (chkPrecExceed95Percent.Checked = True) Then - clsROneArg.SetRCommand("climdex.r95ptot") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkPrecExceed95Percent.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkPrecExceed95Percent.chkCheck.Text)(1)) + SaveIndices(ucrChkPrecExceed95Percent, clsROneArg, bSaveIndex) End If - If (chkPrecExceed99Percent.Checked = True) Then - clsROneArg.SetRCommand("climdex.r99ptot") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkPrecExceed99Percent.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkPrecExceed99Percent.chkCheck.Text)(1)) + SaveIndices(ucrChkPrecExceed99Percent, clsROneArg, bSaveIndex) End If - If (chkTotalDailyPrec.Checked = True) Then - clsROneArg.SetRCommand("climdex.prcptot") - frmMain.clsRLink.RunScript(clsROneArg.ToScript(), 2) + If (ucrChkTotalDailyPrec.Checked = True) Then + clsROneArg.SetRCommand(dctInputindicesTriples.Item(ucrChkTotalDailyPrec.chkCheck.Text)(1)) + SaveIndices(ucrChkTotalDailyPrec, clsROneArg, bSaveIndex) End If End Sub + + Private Sub lblN_Click(sender As Object, e As EventArgs) Handles lblN.Click + + End Sub + + Private Sub ucrInputPrecQtiles_Load(sender As Object, e As EventArgs) Handles ucrInputPrecQtiles.Load + + End Sub + + Private Sub lblPrecQuantiles_Click(sender As Object, e As EventArgs) Handles lblPrecQuantiles.Click + + End Sub + + Private Sub ucrInputTempQtiles_Load(sender As Object, e As EventArgs) Handles ucrInputTempQtiles.Load + + End Sub + + Private Sub lblTempQuantiles_Click(sender As Object, e As EventArgs) Handles lblTempQuantiles.Click + + End Sub + + Private Sub grpBaseRange_Enter(sender As Object, e As EventArgs) Handles grpBaseRange.Enter + + End Sub + + Public Sub SetRFunction(clsNewRFunction As RFunction, Optional bReset As Boolean = False) + If Not bControlsInitialised Then + InitialiseControls() + End If + clsNewClimdexInput = clsNewRFunction + ucrNudN.SetRCode(clsNewClimdexInput, bReset) + ucrNudThreshold.SetRCode(clsRTwoArg3, bReset) + ucrNudAnnualMissingDays.SetRCode(clsRMaxMisingDays, bReset) + ucrNudMothlyMissingDays.SetRCode(clsRMaxMisingDays, bReset) + ucrNudLowerBase.SetRCode(clsRBaseRange, bReset) + ucrNudUpperBase.SetRCode(clsRBaseRange, bReset) + ucrNudMinBaseData.SetRCode(clsNewClimdexInput, bReset) + ucrInputFreq.SetRCode(clsRTwoArg1, bReset) + ucrInputFreq.SetRCode(clsRThreeArg, bReset) + ucrInputFreq.SetRCode(clsRWriteDf, bReset) + ucrInputTempQtiles.SetRCode(clsRTempQTiles, bReset) + ucrInputPrecQtiles.SetRCode(clsRPrecQTiles, bReset) + ucrChkNHemisphere.SetRCode(clsNewClimdexInput, bReset) + ucrChkCenterMean.SetRCode(clsRThreeArg, bReset) + ucrChkMaxSpellSpanYears.SetRCode(clsRTwoArg4, bReset) + ucrChkSpellDISpanYear.SetRCode(clsRTwoArg5, bReset) + ucrInputGSLMode.SetRCode(clsRTwoArg2, bReset) + IndicesType() + End Sub + + Private Sub GroupBoxControl(TempGroupBox As GroupBox) + For Each ChkBox As ucrCheck In TempGroupBox.Controls + ChkBox.Checked = False + Next + End Sub + + Public Sub IndicesType() + If dlgClimdex.ucrReceiverPrec.IsEmpty Then + GroupBoxControl(grpPrecAnnual) + GroupBoxControl(grpPrecAnnualMonthly) + grpPrecAnnualMonthly.Enabled = False + grpPrecAnnual.Enabled = False + Else + If ucrInputFreq.cboInput.SelectedItem = "monthly" Then + GroupBoxControl(grpPrecAnnual) + grpPrecAnnual.Enabled = False + ElseIf ucrInputFreq.cboInput.SelectedItem = "annual" Then + grpPrecAnnual.Enabled = True + End If + grpPrecAnnualMonthly.Enabled = True + End If + + If dlgClimdex.ucrReceiverTmax.IsEmpty Then + GroupBoxControl(grpTmaxAnnual) + GroupBoxControl(grpTmaxAnnualMonthly) + grpTmaxAnnualMonthly.Enabled = False + grpTmaxAnnual.Enabled = False + Else + If ucrInputFreq.cboInput.SelectedItem = "monthly" Then + GroupBoxControl(grpTmaxAnnual) + grpTmaxAnnual.Enabled = False + ElseIf ucrInputFreq.cboInput.SelectedItem = "annual" Then + grpTmaxAnnual.Enabled = True + End If + grpTmaxAnnualMonthly.Enabled = True + End If + + If dlgClimdex.ucrReceiverTmin.IsEmpty Then + GroupBoxControl(grpTminAnnual) + GroupBoxControl(grpTminAnnualMonthly) + grpTminAnnualMonthly.Enabled = False + grpTminAnnual.Enabled = False + Else + If ucrInputFreq.cboInput.SelectedItem = "monthly" Then + GroupBoxControl(grpTminAnnual) + grpTminAnnual.Enabled = False + ElseIf ucrInputFreq.cboInput.SelectedItem = "annual" Then + grpTminAnnual.Enabled = True + End If + grpTminAnnualMonthly.Enabled = True + End If + + If dlgClimdex.ucrReceiverTmin.IsEmpty OrElse dlgClimdex.ucrReceiverTmax.IsEmpty Then + GroupBoxControl(grpTmaxTminAnnual) + GroupBoxControl(grpTmaxTminAnnualMonthly) + grpTmaxTminAnnualMonthly.Enabled = False + grpTmaxTminAnnual.Enabled = False + Else + If ucrInputFreq.cboInput.SelectedItem = "monthly" Then + GroupBoxControl(grpTmaxTminAnnual) + grpTmaxTminAnnual.Enabled = False + ElseIf ucrInputFreq.cboInput.SelectedItem = "annual" Then + grpTmaxTminAnnual.Enabled = True + End If + grpTmaxTminAnnualMonthly.Enabled = True + End If + End Sub + + Private Sub cmdHelp_Click(sender As Object, e As EventArgs) Handles cmdHelp.Click + IndicesHelp() + End Sub + + Private Sub IndicesHelp() + Dim clsHelp As New RFunction + clsHelp.SetRCommand("help") + clsHelp.AddParameter("package", Chr(34) & "climdex.pcic" & Chr(34)) + If IndicesCount = 1 Then + clsHelp.AddParameter("topic", Chr(34) & CheckedBoxFunction() & Chr(34)) + Else + clsHelp.RemoveParameterByName("topic") + End If + clsHelp.AddParameter("help_type", Chr(34) & "html" & Chr(34)) + frmMain.clsRLink.RunScript(clsHelp.ToScript, strComment:=" dlgClimdexIndices Opening help page climdex indices") + End Sub + + Public ReadOnly Property IndicesCount As Integer + Get + Dim iCount As Integer = 0 + For Each grpTemp As GroupBox In lstGroupboxes + For Each TempChkBox As ucrCheck In grpTemp.Controls + If TempChkBox.Checked Then + iCount = iCount + 1 + End If + Next + Next + Return iCount + End Get + End Property + + Private Function CheckedBoxFunction() + Dim strCheckedBox As String = "" + For Each grpTemp As GroupBox In lstGroupboxes + For Each TempChkBox As ucrCheck In grpTemp.Controls + If TempChkBox.Checked Then + strCheckedBox = dctInputindicesTriples.Item(TempChkBox.chkCheck.Text)(1) + End If + Next + Next + Return strCheckedBox + End Function + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrNudLowerBase.ControlContentsChanged, ucrNudUpperBase.ControlContentsChanged + clsNewClimdexInput.AddParameter("base.range", clsRFunctionParameter:=clsRBaseRange) + End Sub + + Private Sub TempQTiles_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputTempQtiles.ControlContentsChanged + clsNewClimdexInput.AddParameter("temp.qtiles", clsRFunctionParameter:=clsRTempQTiles) + End Sub + + Private Sub PrecQTiles_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputPrecQtiles.ControlContentsChanged + clsNewClimdexInput.AddParameter("prec.qtiles", clsRFunctionParameter:=clsRPrecQTiles) + End Sub + + Private Sub ucrInputFreq_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputFreq.ControlContentsChanged + IndicesType() + End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 127e1eea482..7ff4811b494 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -561,7 +561,7 @@ data_object$set("public", "remove_columns_in_data", function(cols=c()) { } ) -data_object$set("public", "replace_value_in_data", function(col_names, rows, old_value, start_value = NA, end_value = NA, new_value, closed_start_value = TRUE, closed_end_value = TRUE) { +data_object$set("public", "replace_value_in_data", function(col_names, rows, old_value, old_is_missing = FALSE, start_value = NA, end_value = NA, new_value, new_is_missing = FALSE, closed_start_value = TRUE, closed_end_value = TRUE) { curr_data <- self$get_data_frame(use_current_filter = FALSE) # Column name must be character if(!all(is.character(col_names))) stop("Column name must be of type: character") @@ -569,6 +569,14 @@ data_object$set("public", "replace_value_in_data", function(col_names, rows, old if(!missing(rows) && !all(rows %in% row.names(curr_data))) stop("Not all rows found in the data.") if(!is.na(start_value) && !is.numeric(start_value)) stop("start_value must be numeric") if(!is.na(end_value) && !is.numeric(end_value)) stop("start_value must be numeric") + if(old_is_missing) { + if(!missing(old_value)) stop("Specify only one of old_value and old_is_missing") + old_value <- NA + } + if(new_is_missing) { + if(!missing(new_value)) stop("Specify only one of new_value and new_is_missing") + new_value <- NA + } data_row_names <- row.names(curr_data) filter_applied <- self$filter_applied() if(filter_applied) curr_filter <- self$current_filter @@ -586,7 +594,7 @@ data_object$set("public", "replace_value_in_data", function(col_names, rows, old else { if(filter_applied) stop("Cannot replace values in a factor column when a filter is applied. Remove the filter to do this replacement.") if(is.na(old_value)) { - if(!new_value %in% levels(self$get_columns_from_data(col_name, use_current_filter = FALSE))) stop(new_value, " is not a level of this factor. Add this as a level of the factor before using replace.") + if(!is.na(new_value) && !new_value %in% levels(self$get_columns_from_data(col_name, use_current_filter = FALSE))) stop(new_value, " is not a level of this factor. Add this as a level of the factor before using replace.") replace_rows <- (is.na(curr_column)) } else { diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 720290c6bc8..a03ec7c54ae 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -615,8 +615,8 @@ instat_object$set("public", "filter_string", function(data_name, filter_name) { } ) -instat_object$set("public", "replace_value_in_data", function(data_name, col_names, rows, old_value, start_value = NA, end_value = NA, new_value, closed_start_value = TRUE, closed_end_value = TRUE) { - self$get_data_objects(data_name)$replace_value_in_data(col_names, rows, old_value, start_value, end_value, new_value, closed_start_value, closed_end_value) +instat_object$set("public", "replace_value_in_data", function(data_name, col_names, rows, old_value, old_is_missing = FALSE, start_value = NA, end_value = NA, new_value, new_is_missing = FALSE, closed_start_value = TRUE, closed_end_value = TRUE) { + self$get_data_objects(data_name)$replace_value_in_data(col_names, rows, old_value, old_is_missing, start_value, end_value, new_value, new_is_missing, closed_start_value, closed_end_value) } ) # instat_object$set("public", "replace_value_in_data", function(data_name, col_name, row, new_value) { @@ -746,7 +746,7 @@ instat_object$set("public", "rename_dataframe", function(data_name, new_value = names(private$.data_objects)[names(private$.data_objects) == data_name] <- new_value data_obj$append_to_metadata(data_name_label, new_value) data_obj$set_data_changed(TRUE) -} + } ) instat_object$set("public", "convert_column_to_type", function(data_name, col_names = c(), to_type, factor_numeric = "by_levels", set_digits, set_decimals = FALSE) { @@ -1108,4 +1108,75 @@ instat_object$set("public", "get_link_names", function(data_name, include_overal instat_object$set("public", "remove_key", function(data_name, key_name) { self$get_data_objects(data_name)$remove_key(key_name) } +) + +instat_object$set("public", "add_climdex_indices", function(data_name, indices = list(), freq = "annual") { + if(!self$get_data_objects(data_name)$get_metadata(is_climatic_label))stop("Define data as climatic.") + mix_monthly_annual = c("Monthly_Minimum_of_Daily_Minimum_Temperature", "Percentage_of_Days_When_Tmax_is_Above_90th_Percentile","Percentage_of_Days_When_Tmin_is_Above_90th_Percentile","Percentage_of_Days_When_Tmax_is_Below_10th_Percentile","Percentage_of_Days_When_Tmin_is_Below_10th_Percentile", "Monthly_Maximum_Consecutive_5day_Precipitation", "Monthly_Maximum_1day_Precipitation","Monthly_Maximum_of_Daily_Maximum_Temperature", "Monthly_Maximum_of_Daily_Minimum_Temperature","Monthly_Minimum_of_Daily_Maximum_Temperature", "Mean_Diurnal_Temperature_Range") + + if(((names(indices) %in% mix_monthly_annual) && freq=="monthly")){ + yy = as.data.frame(indices[[1]],row.names = NULL) + yy1 <- cbind(Row.Names = rownames(yy), yy) + split_data = str_split_fixed(string=yy1[,1], n=2, pattern="-") + my_data = cbind(yy1, split_data) + names(my_data) = c("Year_month", names(indices), "Year", "Month") + my_data <- my_data[c(1,3,4,2)] + my_data$Year = as.integer(as.character(my_data$Year)) + my_data$Month = as.integer(as.character(my_data$Month)) + year_col = self$get_climatic_column_name(data_name, year_label) + month_col = self$get_climatic_column_name(data_name, month_label) + key_list = list("Year", "Month") + names(key_list) = c(as.name(year_col), as.name(month_col)) + if(self$get_linked_to_data_name(data_name, key_list)==""){ + data_list = list(my_data) + names(data_list) = paste(data_name, "monthly", sep = "_") + self$import_data(data_tables = data_list) + self$add_key(paste(data_name, "monthly", sep = "_"), c("Year", "Month")) + self$add_link(from_data_frame = data_name, to_data_frame = paste(data_name, "monthly", sep = "_"), link_pairs = key_list, type = keyed_link_label) + } + else{ + #self$merge_data(by=c("Year_month","Year", "Month"), data_name = self$get_linked_to_data_name(data_name, key_list), new_data = my_data ) + self$merge_data(data_name = self$get_linked_to_data_name(data_name, key_list), new_data = my_data ) + } + } + else{ + yy = as.data.frame(indices[[1]],row.names = NULL) + my_data <- cbind(Row.Names = rownames(yy), yy) + names(my_data) = c("Year", names(indices)) + my_data$Year = as.integer(as.character(my_data$Year)) + year_col = self$get_climatic_column_name(data_name, year_label) + key_list = list("Year") + names(key_list) = c(as.name(year_col)) + if(self$get_linked_to_data_name(data_name, key_list)==""){ + warning("Yearly_data is missing, it will be created.") + data_list = list(my_data) + names(data_list) = paste(data_name, "yearly", sep = "_") + self$import_data(data_tables = data_list) + self$add_key(paste(data_name, "yearly", sep = "_"), c("Year")) + self$add_link(from_data_frame = data_name, to_data_frame = paste(data_name, "yearly", sep = "_"), link_pairs = key_list, type = keyed_link_label) + } + else{ + #self$merge_data(by=c("Year"), data_name=self$get_linked_to_data_name(data_name, key_list), new_data = my_data ) + self$merge_data(data_name=self$get_linked_to_data_name(data_name, key_list), new_data = my_data ) + } + } + +} +) + +instat_object$set("public", "is_metadata", function(data_name, str) { + self$get_data_objects(data_name)$is_metadata(str = str) +} +) + +instat_object$set("public", "get_climatic_column_name", function(data_name, col_name) { + new_data = subset(InstatDataObject$get_variables_metadata(data_name), Climatic_Type==col_name, select = Name) + if(!nrow(new_data==1))stop(paste(col_name, " column cannot be found in the data.")) + return(as.character(new_data)) +} +) + +instat_object$set("public", "merge_data", function(data_name, new_data, by = NULL, type = "left", match = "all") { + self$get_data_objects(data_name)$merge_data(new_data = new_data, by = by, type = type, match = match) +} ) \ No newline at end of file diff --git a/instat/ucrCore.vb b/instat/ucrCore.vb index 1a889a70d98..99e9d9a8770 100644 --- a/instat/ucrCore.vb +++ b/instat/ucrCore.vb @@ -163,14 +163,14 @@ Public Class ucrCore If ucrControl.bLinkedUpdateFunction AndAlso bTemp Then ucrControl.SetRCode(clsRCode) End If - If ucrControl.bLinkedAddRemoveParameter Then - ucrControl.AddOrRemoveParameter(bTemp) - End If If ucrControl.bLinkedChangeToDefaultState AndAlso bReset Then If ucrControl.clsRCode Is Nothing OrElse ucrControl.clsParameter Is Nothing OrElse (ucrControl.clsRCode IsNot Nothing AndAlso ucrControl.clsParameter IsNot Nothing AndAlso ucrControl.clsParameter.strArgumentName IsNot Nothing AndAlso (Not ucrControl.clsRCode.ContainsParameter(ucrControl.clsParameter.strArgumentName))) Then ucrControl.SetToDefaultState() End If End If + If ucrControl.bLinkedAddRemoveParameter Then + ucrControl.AddOrRemoveParameter(bTemp) + End If If ucrControl.bLinkedHideIfParameterMissing Then ucrControl.SetVisible(bTemp) End If @@ -183,7 +183,9 @@ Public Class ucrCore 'Update the RCode based on the contents of the control (reverse of above) Public Overridable Sub UpdateRCode(Optional bReset As Boolean = False) - AddOrRemoveParameter(CanAddParameter()) + If bAddRemoveParameter Then + AddOrRemoveParameter(CanAddParameter()) + End If UpdateLinkedControls(bReset) End Sub @@ -383,6 +385,27 @@ Public Class ucrCore clsTempCond.SetFunctionNamesMultiple(lstFunctionNames.ToList(), bNewIsPositive) AddCondition(objControlState, clsTempCond) + End Sub + + Public Sub AddParameterIsStringCondition(objControlState As Object, strParameterName As String, Optional bNewIsPositive As Boolean = True) + Dim clsTempCond As New Condition + + clsTempCond.SetParameterType(strType:="string", strParamName:=strParameterName, bNewIsPositive:=bNewIsPositive) + AddCondition(objControlState, clsTempCond) + End Sub + + Public Sub AddParameterIsRFunctionCondition(objControlState As Object, strParameterName As String, Optional bNewIsPositive As Boolean = True) + Dim clsTempCond As New Condition + + clsTempCond.SetParameterType(strType:="RFunction", strParamName:=strParameterName, bNewIsPositive:=bNewIsPositive) + AddCondition(objControlState, clsTempCond) + End Sub + + Public Sub AddParameterIsROperatorCondition(objControlState As Object, strParameterName As String, Optional bNewIsPositive As Boolean = True) + Dim clsTempCond As New Condition + + clsTempCond.SetParameterType(strType:="ROperator", strParamName:=strParameterName, bNewIsPositive:=bNewIsPositive) + AddCondition(objControlState, clsTempCond) End Sub Public Sub SetVisible(bVisible As Boolean) diff --git a/instat/ucrInput.vb b/instat/ucrInput.vb index 7d4059f72b4..346e2fc9865 100644 --- a/instat/ucrInput.vb +++ b/instat/ucrInput.vb @@ -32,7 +32,7 @@ Public Class ucrInput Protected bIsReadOnly As Boolean = False Public bAutoChangeOnLeave As Boolean = False Private bLastSilent As Boolean = False - Public bAddQuotesIfUnrecognised As Boolean = True + Private bPrivateAddQuotesIfUnrecognised As Boolean = True Protected dctDisplayParameterValues As New Dictionary(Of String, String) Public Sub New() @@ -62,7 +62,7 @@ Public Class ucrInput If dctDisplayParameterValues.ContainsKey(GetText()) Then clsParameter.SetArgumentValue(dctDisplayParameterValues(GetText())) Else - If bAddQuotesIfUnrecognised Then + If AddQuotesIfUnrecognised Then clsParameter.SetArgumentValue(Chr(34) & GetText() & Chr(34)) Else clsParameter.SetArgumentValue(GetText()) @@ -413,7 +413,7 @@ Public Class ucrInput If dctDisplayParameterValues.ContainsKey(clsParameter.strArgumentValue) Then Return clsParameter.strArgumentValue Else - If bAddQuotesIfUnrecognised Then + If AddQuotesIfUnrecognised Then Return clsParameter.strArgumentValue.Trim(Chr(34)) Else Return clsParameter.strArgumentValue @@ -442,4 +442,16 @@ Public Class ucrInput Public Sub AddToParameterValueItemsPairs(strDisplayValue As String, strParameterValue As String) dctDisplayParameterValues.Add(strDisplayValue, strParameterValue) End Sub + + Public Property AddQuotesIfUnrecognised As Boolean + Get + Return bPrivateAddQuotesIfUnrecognised + End Get + Set(bValue As Boolean) + bPrivateAddQuotesIfUnrecognised = bValue + If GetText() IsNot Nothing Then + SetName(GetText().Trim(Chr(34))) + End If + End Set + End Property End Class \ No newline at end of file diff --git a/instat/ucrMultipleInput.Designer.vb b/instat/ucrMultipleInput.Designer.vb index e95a4a9efd8..0f45d2152aa 100644 --- a/instat/ucrMultipleInput.Designer.vb +++ b/instat/ucrMultipleInput.Designer.vb @@ -1,6 +1,6 @@  Partial Class ucrMultipleInput - Inherits System.Windows.Forms.UserControl + Inherits instat.ucrCore 'UserControl overrides dispose to clean up the component list. diff --git a/instat/ucrReceiver.vb b/instat/ucrReceiver.vb index fe2fef3fda8..3769a09d641 100644 --- a/instat/ucrReceiver.vb +++ b/instat/ucrReceiver.vb @@ -163,8 +163,8 @@ Public Class ucrReceiver 'TODO remove this method and replace with SetIncludedDataTypes Public Sub SetDataType(strTemp As String) AddIncludedMetadataProperty("class", {Chr(34) & strTemp & Chr(34)}) - End Sub - + End Sub + Public Sub SetIncludedDataTypes(strInclude As String()) Dim strTypes(strInclude.Count - 1) As String @@ -380,4 +380,8 @@ Public Class ucrReceiver Return IsEmpty() End If End Function + + Public Sub SetClimaticType(strTemp As String) + AddIncludedMetadataProperty("Climatic_Type", {Chr(34) & strTemp & Chr(34)}) + End Sub End Class \ No newline at end of file diff --git a/instat/ucrReceiverSingle.vb b/instat/ucrReceiverSingle.vb index ebd2731d538..86ff1c678f3 100644 --- a/instat/ucrReceiverSingle.vb +++ b/instat/ucrReceiverSingle.vb @@ -131,7 +131,7 @@ Public Class ucrReceiverSingle Select Case strCurrentType Case "column" clsGetVariablesFunc.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") - clsGetVariablesFunc.AddParameter("col_name", GetVariableNames()) + clsGetVariablesFunc.AddParameter("col_names", GetVariableNames()) If bForceAsDataFrame Then clsGetVariablesFunc.AddParameter("force_as_data_frame", "TRUE") Else diff --git a/instat/ucrReorder.Designer.vb b/instat/ucrReorder.Designer.vb index a51a6556839..5178e680644 100644 --- a/instat/ucrReorder.Designer.vb +++ b/instat/ucrReorder.Designer.vb @@ -1,114 +1,114 @@ - _ -Partial Class ucrReorder - Inherits instat.ucrCore - - 'UserControl overrides dispose to clean up the component list. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ - Private Sub InitializeComponent() - Me.cmdTop = New System.Windows.Forms.Button() - Me.cmdUp = New System.Windows.Forms.Button() - Me.cmdDown = New System.Windows.Forms.Button() - Me.cmdBottom = New System.Windows.Forms.Button() - Me.lstAvailableData = New System.Windows.Forms.ListView() - Me.SuspendLayout() - ' - 'cmdTop - ' - Me.cmdTop.Anchor = System.Windows.Forms.AnchorStyles.Right - Me.cmdTop.AutoSize = True - Me.cmdTop.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.cmdTop.Image = Global.instat.My.Resources.Resources.arrows_top - Me.cmdTop.Location = New System.Drawing.Point(130, 14) - Me.cmdTop.Name = "cmdTop" - Me.cmdTop.Size = New System.Drawing.Size(22, 22) - Me.cmdTop.TabIndex = 0 - Me.cmdTop.UseVisualStyleBackColor = True - ' - 'cmdUp - ' - Me.cmdUp.Anchor = System.Windows.Forms.AnchorStyles.Right - Me.cmdUp.AutoSize = True - Me.cmdUp.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.cmdUp.Image = Global.instat.My.Resources.Resources.arrows_up - Me.cmdUp.Location = New System.Drawing.Point(130, 43) - Me.cmdUp.Name = "cmdUp" - Me.cmdUp.Size = New System.Drawing.Size(22, 22) - Me.cmdUp.TabIndex = 1 - Me.cmdUp.UseVisualStyleBackColor = True - ' - 'cmdDown - ' - Me.cmdDown.Anchor = System.Windows.Forms.AnchorStyles.Right - Me.cmdDown.AutoSize = True - Me.cmdDown.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.cmdDown.Image = Global.instat.My.Resources.Resources.arrows_down - Me.cmdDown.Location = New System.Drawing.Point(130, 72) - Me.cmdDown.Name = "cmdDown" - Me.cmdDown.Size = New System.Drawing.Size(22, 22) - Me.cmdDown.TabIndex = 2 - Me.cmdDown.UseVisualStyleBackColor = True - ' - 'cmdBottom - ' - Me.cmdBottom.Anchor = System.Windows.Forms.AnchorStyles.Right - Me.cmdBottom.AutoSize = True - Me.cmdBottom.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.cmdBottom.Image = Global.instat.My.Resources.Resources.arrows_bottom - Me.cmdBottom.Location = New System.Drawing.Point(130, 101) - Me.cmdBottom.Name = "cmdBottom" - Me.cmdBottom.Size = New System.Drawing.Size(22, 22) - Me.cmdBottom.TabIndex = 3 - Me.cmdBottom.UseVisualStyleBackColor = True - ' - 'lstAvailableData - ' - Me.lstAvailableData.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.lstAvailableData.Location = New System.Drawing.Point(3, 3) - Me.lstAvailableData.Name = "lstAvailableData" - Me.lstAvailableData.Size = New System.Drawing.Size(121, 133) - Me.lstAvailableData.FullRowSelect = True - Me.lstAvailableData.TabIndex = 5 - Me.lstAvailableData.UseCompatibleStateImageBehavior = False - Me.lstAvailableData.View = System.Windows.Forms.View.Details - ' - 'ucrReorder - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.lstAvailableData) - Me.Controls.Add(Me.cmdBottom) - Me.Controls.Add(Me.cmdDown) - Me.Controls.Add(Me.cmdUp) - Me.Controls.Add(Me.cmdTop) - Me.Name = "ucrReorder" - Me.Size = New System.Drawing.Size(154, 139) - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - - Friend WithEvents cmdTop As Button - Friend WithEvents cmdUp As Button - Friend WithEvents cmdDown As Button - Friend WithEvents cmdBottom As Button - Friend WithEvents lstAvailableData As ListView -End Class + +Partial Class ucrReorder + Inherits instat.ucrCore + + 'UserControl overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.cmdTop = New System.Windows.Forms.Button() + Me.cmdUp = New System.Windows.Forms.Button() + Me.cmdDown = New System.Windows.Forms.Button() + Me.cmdBottom = New System.Windows.Forms.Button() + Me.lstAvailableData = New System.Windows.Forms.ListView() + Me.SuspendLayout() + ' + 'cmdTop + ' + Me.cmdTop.Anchor = System.Windows.Forms.AnchorStyles.Right + Me.cmdTop.AutoSize = True + Me.cmdTop.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.cmdTop.Image = Global.instat.My.Resources.Resources.arrows_top + Me.cmdTop.Location = New System.Drawing.Point(130, 14) + Me.cmdTop.Name = "cmdTop" + Me.cmdTop.Size = New System.Drawing.Size(22, 22) + Me.cmdTop.TabIndex = 0 + Me.cmdTop.UseVisualStyleBackColor = True + ' + 'cmdUp + ' + Me.cmdUp.Anchor = System.Windows.Forms.AnchorStyles.Right + Me.cmdUp.AutoSize = True + Me.cmdUp.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.cmdUp.Image = Global.instat.My.Resources.Resources.arrows_up + Me.cmdUp.Location = New System.Drawing.Point(130, 43) + Me.cmdUp.Name = "cmdUp" + Me.cmdUp.Size = New System.Drawing.Size(22, 22) + Me.cmdUp.TabIndex = 1 + Me.cmdUp.UseVisualStyleBackColor = True + ' + 'cmdDown + ' + Me.cmdDown.Anchor = System.Windows.Forms.AnchorStyles.Right + Me.cmdDown.AutoSize = True + Me.cmdDown.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.cmdDown.Image = Global.instat.My.Resources.Resources.arrows_down + Me.cmdDown.Location = New System.Drawing.Point(130, 72) + Me.cmdDown.Name = "cmdDown" + Me.cmdDown.Size = New System.Drawing.Size(22, 22) + Me.cmdDown.TabIndex = 2 + Me.cmdDown.UseVisualStyleBackColor = True + ' + 'cmdBottom + ' + Me.cmdBottom.Anchor = System.Windows.Forms.AnchorStyles.Right + Me.cmdBottom.AutoSize = True + Me.cmdBottom.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.cmdBottom.Image = Global.instat.My.Resources.Resources.arrows_bottom + Me.cmdBottom.Location = New System.Drawing.Point(130, 101) + Me.cmdBottom.Name = "cmdBottom" + Me.cmdBottom.Size = New System.Drawing.Size(22, 22) + Me.cmdBottom.TabIndex = 3 + Me.cmdBottom.UseVisualStyleBackColor = True + ' + 'lstAvailableData + ' + Me.lstAvailableData.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lstAvailableData.Location = New System.Drawing.Point(3, 3) + Me.lstAvailableData.Name = "lstAvailableData" + Me.lstAvailableData.Size = New System.Drawing.Size(121, 133) + Me.lstAvailableData.FullRowSelect = True + Me.lstAvailableData.TabIndex = 5 + Me.lstAvailableData.UseCompatibleStateImageBehavior = False + Me.lstAvailableData.View = System.Windows.Forms.View.Details + ' + 'ucrReorder + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lstAvailableData) + Me.Controls.Add(Me.cmdBottom) + Me.Controls.Add(Me.cmdDown) + Me.Controls.Add(Me.cmdUp) + Me.Controls.Add(Me.cmdTop) + Me.Name = "ucrReorder" + Me.Size = New System.Drawing.Size(154, 139) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents cmdTop As Button + Friend WithEvents cmdUp As Button + Friend WithEvents cmdDown As Button + Friend WithEvents cmdBottom As Button + Friend WithEvents lstAvailableData As ListView +End Class