diff --git a/instat/DlgDefineClimaticData.Designer.vb b/instat/DlgDefineClimaticData.Designer.vb index 9b36b9bc27d..cfd7f27a21e 100644 --- a/instat/DlgDefineClimaticData.Designer.vb +++ b/instat/DlgDefineClimaticData.Designer.vb @@ -38,6 +38,42 @@ Partial Class DlgDefineClimaticData 'Do not modify it using the code editor. Private Sub InitializeComponent() + Me.ucrChkLinkedMetaData = New instat.ucrCheck() + Me.ucrSelectorLinkedDataFrame = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrInputCheckInput = New instat.ucrInputTextBox() + Me.cmdCheckUnique = New System.Windows.Forms.Button() + Me.ucrSelectorDefineClimaticData = New instat.ucrSelectorByDataFrameAddRemove() + Me.lblStationName = New System.Windows.Forms.Label() + Me.lblDOY = New System.Windows.Forms.Label() + Me.lblLongitude = New System.Windows.Forms.Label() + Me.lblLatitude = New System.Windows.Forms.Label() + Me.lblAltitude = New System.Windows.Forms.Label() + Me.grpStation = New System.Windows.Forms.GroupBox() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverAltitude = New instat.ucrReceiverSingle() + Me.ucrBase = New instat.ucrButtons() + Me.grpDateTime = New System.Windows.Forms.GroupBox() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.lblDate = New System.Windows.Forms.Label() + Me.lblMonth = New System.Windows.Forms.Label() + Me.ucrReceiverDOY = New instat.ucrReceiverSingle() + Me.lblYear = New System.Windows.Forms.Label() + Me.ucrReceiverDate = New instat.ucrReceiverSingle() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() + Me.ucrReceiverDay = New instat.ucrReceiverSingle() + Me.lblDay = New System.Windows.Forms.Label() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + Me.ucrReceiverStationMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverLonMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverLatMeta = New instat.ucrReceiverSingle() + Me.ucrReceiverAltMeta = New instat.ucrReceiverSingle() + Me.grpMeta = New System.Windows.Forms.GroupBox() + Me.lblRain = New System.Windows.Forms.Label() Me.grpElements = New System.Windows.Forms.GroupBox() Me.ucrReceiverMaxRH = New instat.ucrReceiverSingle() Me.lblMaxRH = New System.Windows.Forms.Label() @@ -46,7 +82,6 @@ Partial Class DlgDefineClimaticData 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() @@ -59,29 +94,443 @@ Partial Class DlgDefineClimaticData 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.lblDOY = New System.Windows.Forms.Label() - Me.lblDay = New System.Windows.Forms.Label() - Me.lblMonth = New System.Windows.Forms.Label() - Me.lblYear = New System.Windows.Forms.Label() - Me.lblDate = New System.Windows.Forms.Label() - Me.grpDateTime = New System.Windows.Forms.GroupBox() - Me.ucrReceiverYear = New instat.ucrReceiverSingle() - Me.ucrReceiverDOY = New instat.ucrReceiverSingle() - Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrReceiverMonth = New instat.ucrReceiverSingle() - Me.ucrReceiverDay = New instat.ucrReceiverSingle() - Me.grpStation = New System.Windows.Forms.GroupBox() - Me.ucrReceiverStationName = New instat.ucrReceiverSingle() - Me.cmdCheckUnique = New System.Windows.Forms.Button() - Me.ucrInputCheckInput = New instat.ucrInputTextBox() - Me.ucrBase = New instat.ucrButtons() - Me.ucrSelectorDefineClimaticData = New instat.ucrSelectorByDataFrameAddRemove() - Me.grpElements.SuspendLayout() - Me.grpDateTime.SuspendLayout() Me.grpStation.SuspendLayout() + Me.grpDateTime.SuspendLayout() + Me.grpMeta.SuspendLayout() + Me.grpElements.SuspendLayout() Me.SuspendLayout() ' + 'ucrChkLinkedMetaData + ' + Me.ucrChkLinkedMetaData.AutoSize = True + Me.ucrChkLinkedMetaData.Checked = False + Me.ucrChkLinkedMetaData.Location = New System.Drawing.Point(16, 204) + Me.ucrChkLinkedMetaData.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkLinkedMetaData.Name = "ucrChkLinkedMetaData" + Me.ucrChkLinkedMetaData.Size = New System.Drawing.Size(195, 23) + Me.ucrChkLinkedMetaData.TabIndex = 21 + ' + 'ucrSelectorLinkedDataFrame + ' + Me.ucrSelectorLinkedDataFrame.AutoSize = True + Me.ucrSelectorLinkedDataFrame.bDropUnusedFilterLevels = False + Me.ucrSelectorLinkedDataFrame.bShowHiddenColumns = False + Me.ucrSelectorLinkedDataFrame.bUseCurrentFilter = True + Me.ucrSelectorLinkedDataFrame.Location = New System.Drawing.Point(16, 224) + Me.ucrSelectorLinkedDataFrame.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorLinkedDataFrame.Name = "ucrSelectorLinkedDataFrame" + Me.ucrSelectorLinkedDataFrame.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorLinkedDataFrame.TabIndex = 20 + ' + 'ucrInputCheckInput + ' + Me.ucrInputCheckInput.AddQuotesIfUnrecognised = True + Me.ucrInputCheckInput.AutoSize = True + Me.ucrInputCheckInput.IsMultiline = False + Me.ucrInputCheckInput.IsReadOnly = False + Me.ucrInputCheckInput.Location = New System.Drawing.Point(147, 439) + Me.ucrInputCheckInput.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputCheckInput.Name = "ucrInputCheckInput" + Me.ucrInputCheckInput.Size = New System.Drawing.Size(253, 21) + Me.ucrInputCheckInput.TabIndex = 18 + ' + 'cmdCheckUnique + ' + Me.cmdCheckUnique.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdCheckUnique.Location = New System.Drawing.Point(6, 437) + Me.cmdCheckUnique.Name = "cmdCheckUnique" + Me.cmdCheckUnique.Size = New System.Drawing.Size(139, 23) + Me.cmdCheckUnique.TabIndex = 17 + Me.cmdCheckUnique.Text = "Check Duplicates" + Me.cmdCheckUnique.UseVisualStyleBackColor = True + ' + 'ucrSelectorDefineClimaticData + ' + Me.ucrSelectorDefineClimaticData.AutoSize = True + Me.ucrSelectorDefineClimaticData.bDropUnusedFilterLevels = False + Me.ucrSelectorDefineClimaticData.bShowHiddenColumns = False + Me.ucrSelectorDefineClimaticData.bUseCurrentFilter = True + Me.ucrSelectorDefineClimaticData.Location = New System.Drawing.Point(16, 9) + Me.ucrSelectorDefineClimaticData.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDefineClimaticData.Name = "ucrSelectorDefineClimaticData" + Me.ucrSelectorDefineClimaticData.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorDefineClimaticData.TabIndex = 13 + ' + 'lblStationName + ' + Me.lblStationName.AutoSize = True + Me.lblStationName.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblStationName.Location = New System.Drawing.Point(10, 14) + Me.lblStationName.Name = "lblStationName" + Me.lblStationName.Size = New System.Drawing.Size(38, 13) + Me.lblStationName.TabIndex = 0 + Me.lblStationName.Text = "Name:" + ' + 'lblDOY + ' + Me.lblDOY.AutoSize = True + Me.lblDOY.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDOY.Location = New System.Drawing.Point(12, 155) + Me.lblDOY.Name = "lblDOY" + Me.lblDOY.Size = New System.Drawing.Size(66, 13) + Me.lblDOY.TabIndex = 8 + Me.lblDOY.Text = "Day of Year:" + ' + 'lblLongitude + ' + Me.lblLongitude.AutoSize = True + Me.lblLongitude.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLongitude.Location = New System.Drawing.Point(10, 91) + Me.lblLongitude.Name = "lblLongitude" + Me.lblLongitude.Size = New System.Drawing.Size(57, 13) + Me.lblLongitude.TabIndex = 6 + Me.lblLongitude.Text = "Longitude:" + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblLatitude.Location = New System.Drawing.Point(10, 53) + Me.lblLatitude.Name = "lblLatitude" + Me.lblLatitude.Size = New System.Drawing.Size(48, 13) + Me.lblLatitude.TabIndex = 4 + Me.lblLatitude.Text = "Latitude:" + ' + 'lblAltitude + ' + Me.lblAltitude.AutoSize = True + Me.lblAltitude.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblAltitude.Location = New System.Drawing.Point(10, 130) + Me.lblAltitude.Name = "lblAltitude" + Me.lblAltitude.Size = New System.Drawing.Size(45, 13) + Me.lblAltitude.TabIndex = 2 + Me.lblAltitude.Text = "Altitude:" + ' + 'grpStation + ' + Me.grpStation.Controls.Add(Me.lblLongitude) + Me.grpStation.Controls.Add(Me.lblLatitude) + Me.grpStation.Controls.Add(Me.lblAltitude) + Me.grpStation.Controls.Add(Me.lblStationName) + Me.grpStation.Controls.Add(Me.ucrReceiverStation) + Me.grpStation.Controls.Add(Me.ucrReceiverLongitude) + Me.grpStation.Controls.Add(Me.ucrReceiverLatitude) + Me.grpStation.Controls.Add(Me.ucrReceiverAltitude) + Me.grpStation.Location = New System.Drawing.Point(242, 234) + Me.grpStation.Name = "grpStation" + Me.grpStation.Size = New System.Drawing.Size(112, 173) + Me.grpStation.TabIndex = 14 + Me.grpStation.TabStop = False + Me.grpStation.Tag = "" + Me.grpStation.Text = "Station" + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(10, 29) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 8 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverLongitude + ' + Me.ucrReceiverLongitude.AutoSize = True + Me.ucrReceiverLongitude.frmParent = Me + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(10, 106) + Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" + Me.ucrReceiverLongitude.Selector = Nothing + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLongitude.strNcFilePath = "" + Me.ucrReceiverLongitude.TabIndex = 10 + Me.ucrReceiverLongitude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(10, 68) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 9 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverAltitude + ' + Me.ucrReceiverAltitude.AutoSize = True + Me.ucrReceiverAltitude.frmParent = Me + Me.ucrReceiverAltitude.Location = New System.Drawing.Point(10, 145) + Me.ucrReceiverAltitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltitude.Name = "ucrReceiverAltitude" + Me.ucrReceiverAltitude.Selector = Nothing + Me.ucrReceiverAltitude.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverAltitude.strNcFilePath = "" + Me.ucrReceiverAltitude.TabIndex = 11 + Me.ucrReceiverAltitude.ucrSelector = Nothing + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(6, 476) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(408, 52) + Me.ucrBase.TabIndex = 19 + ' + '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(372, 234) + Me.grpDateTime.Name = "grpDateTime" + Me.grpDateTime.Size = New System.Drawing.Size(126, 196) + Me.grpDateTime.TabIndex = 15 + Me.grpDateTime.TabStop = False + Me.grpDateTime.Tag = "" + Me.grpDateTime.Text = "Date and Time" + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.AutoSize = True + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Location = New System.Drawing.Point(12, 62) + Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.TabIndex = 3 + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'lblDate + ' + Me.lblDate.AutoSize = True + Me.lblDate.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDate.Location = New System.Drawing.Point(12, 13) + Me.lblDate.Name = "lblDate" + Me.lblDate.Size = New System.Drawing.Size(33, 13) + Me.lblDate.TabIndex = 0 + Me.lblDate.Text = "Date:" + ' + 'lblMonth + ' + Me.lblMonth.AutoSize = True + Me.lblMonth.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMonth.Location = New System.Drawing.Point(12, 84) + Me.lblMonth.Name = "lblMonth" + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 4 + Me.lblMonth.Text = "Month:" + ' + 'ucrReceiverDOY + ' + Me.ucrReceiverDOY.AutoSize = True + Me.ucrReceiverDOY.frmParent = Me + Me.ucrReceiverDOY.Location = New System.Drawing.Point(12, 170) + Me.ucrReceiverDOY.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDOY.Name = "ucrReceiverDOY" + Me.ucrReceiverDOY.Selector = Nothing + Me.ucrReceiverDOY.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDOY.strNcFilePath = "" + Me.ucrReceiverDOY.TabIndex = 9 + Me.ucrReceiverDOY.ucrSelector = Nothing + ' + 'lblYear + ' + Me.lblYear.AutoSize = True + Me.lblYear.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblYear.Location = New System.Drawing.Point(12, 48) + Me.lblYear.Name = "lblYear" + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 2 + Me.lblYear.Text = "Year:" + ' + 'ucrReceiverDate + ' + Me.ucrReceiverDate.AutoSize = True + Me.ucrReceiverDate.frmParent = Me + Me.ucrReceiverDate.Location = New System.Drawing.Point(12, 26) + Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDate.Name = "ucrReceiverDate" + Me.ucrReceiverDate.Selector = Nothing + Me.ucrReceiverDate.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDate.strNcFilePath = "" + Me.ucrReceiverDate.TabIndex = 1 + Me.ucrReceiverDate.ucrSelector = Nothing + ' + 'ucrReceiverMonth + ' + Me.ucrReceiverMonth.AutoSize = True + Me.ucrReceiverMonth.frmParent = Me + Me.ucrReceiverMonth.Location = New System.Drawing.Point(12, 98) + Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMonth.Name = "ucrReceiverMonth" + Me.ucrReceiverMonth.Selector = Nothing + Me.ucrReceiverMonth.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverMonth.strNcFilePath = "" + Me.ucrReceiverMonth.TabIndex = 5 + Me.ucrReceiverMonth.ucrSelector = Nothing + ' + 'ucrReceiverDay + ' + Me.ucrReceiverDay.AutoSize = True + Me.ucrReceiverDay.frmParent = Me + Me.ucrReceiverDay.Location = New System.Drawing.Point(12, 133) + Me.ucrReceiverDay.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDay.Name = "ucrReceiverDay" + Me.ucrReceiverDay.Selector = Nothing + Me.ucrReceiverDay.Size = New System.Drawing.Size(98, 20) + Me.ucrReceiverDay.strNcFilePath = "" + Me.ucrReceiverDay.TabIndex = 7 + Me.ucrReceiverDay.ucrSelector = Nothing + ' + 'lblDay + ' + Me.lblDay.AutoSize = True + Me.lblDay.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDay.Location = New System.Drawing.Point(12, 120) + Me.lblDay.Name = "lblDay" + Me.lblDay.Size = New System.Drawing.Size(29, 13) + Me.lblDay.TabIndex = 6 + Me.lblDay.Text = "Day:" + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.Label1.Location = New System.Drawing.Point(9, 93) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(57, 13) + Me.Label1.TabIndex = 6 + Me.Label1.Text = "Longitude:" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.Label2.Location = New System.Drawing.Point(9, 55) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(48, 13) + Me.Label2.TabIndex = 4 + Me.Label2.Text = "Latitude:" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.Label3.Location = New System.Drawing.Point(9, 132) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(45, 13) + Me.Label3.TabIndex = 2 + Me.Label3.Text = "Altitude:" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.Label4.Location = New System.Drawing.Point(9, 16) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(38, 13) + Me.Label4.TabIndex = 0 + Me.Label4.Text = "Name:" + ' + 'ucrReceiverStationMeta + ' + Me.ucrReceiverStationMeta.AutoSize = True + Me.ucrReceiverStationMeta.frmParent = Me + Me.ucrReceiverStationMeta.Location = New System.Drawing.Point(11, 31) + Me.ucrReceiverStationMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStationMeta.Name = "ucrReceiverStationMeta" + Me.ucrReceiverStationMeta.Selector = Nothing + Me.ucrReceiverStationMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverStationMeta.strNcFilePath = "" + Me.ucrReceiverStationMeta.TabIndex = 8 + Me.ucrReceiverStationMeta.ucrSelector = Nothing + ' + 'ucrReceiverLonMeta + ' + Me.ucrReceiverLonMeta.AutoSize = True + Me.ucrReceiverLonMeta.frmParent = Me + Me.ucrReceiverLonMeta.Location = New System.Drawing.Point(9, 108) + Me.ucrReceiverLonMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLonMeta.Name = "ucrReceiverLonMeta" + Me.ucrReceiverLonMeta.Selector = Nothing + Me.ucrReceiverLonMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLonMeta.strNcFilePath = "" + Me.ucrReceiverLonMeta.TabIndex = 10 + Me.ucrReceiverLonMeta.ucrSelector = Nothing + ' + 'ucrReceiverLatMeta + ' + Me.ucrReceiverLatMeta.AutoSize = True + Me.ucrReceiverLatMeta.frmParent = Me + Me.ucrReceiverLatMeta.Location = New System.Drawing.Point(9, 70) + Me.ucrReceiverLatMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatMeta.Name = "ucrReceiverLatMeta" + Me.ucrReceiverLatMeta.Selector = Nothing + Me.ucrReceiverLatMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverLatMeta.strNcFilePath = "" + Me.ucrReceiverLatMeta.TabIndex = 9 + Me.ucrReceiverLatMeta.ucrSelector = Nothing + ' + 'ucrReceiverAltMeta + ' + Me.ucrReceiverAltMeta.AutoSize = True + Me.ucrReceiverAltMeta.frmParent = Me + Me.ucrReceiverAltMeta.Location = New System.Drawing.Point(9, 147) + Me.ucrReceiverAltMeta.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltMeta.Name = "ucrReceiverAltMeta" + Me.ucrReceiverAltMeta.Selector = Nothing + Me.ucrReceiverAltMeta.Size = New System.Drawing.Size(93, 20) + Me.ucrReceiverAltMeta.strNcFilePath = "" + Me.ucrReceiverAltMeta.TabIndex = 11 + Me.ucrReceiverAltMeta.ucrSelector = Nothing + ' + 'grpMeta + ' + Me.grpMeta.Controls.Add(Me.Label1) + Me.grpMeta.Controls.Add(Me.Label2) + Me.grpMeta.Controls.Add(Me.Label3) + Me.grpMeta.Controls.Add(Me.Label4) + Me.grpMeta.Controls.Add(Me.ucrReceiverStationMeta) + Me.grpMeta.Controls.Add(Me.ucrReceiverLonMeta) + Me.grpMeta.Controls.Add(Me.ucrReceiverLatMeta) + Me.grpMeta.Controls.Add(Me.ucrReceiverAltMeta) + Me.grpMeta.Location = New System.Drawing.Point(242, 234) + Me.grpMeta.Name = "grpMeta" + Me.grpMeta.Size = New System.Drawing.Size(112, 173) + Me.grpMeta.TabIndex = 22 + Me.grpMeta.TabStop = False + Me.grpMeta.Tag = "" + Me.grpMeta.Text = "Station" + ' + 'lblRain + ' + Me.lblRain.AutoSize = True + Me.lblRain.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblRain.Location = New System.Drawing.Point(15, 15) + Me.lblRain.Name = "lblRain" + Me.lblRain.Size = New System.Drawing.Size(32, 13) + Me.lblRain.TabIndex = 0 + Me.lblRain.Text = "Rain:" + ' 'grpElements ' Me.grpElements.Controls.Add(Me.ucrReceiverMaxRH) @@ -104,10 +553,10 @@ Partial Class DlgDefineClimaticData 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(306, 6) + Me.grpElements.Location = New System.Drawing.Point(238, 6) Me.grpElements.Name = "grpElements" - Me.grpElements.Size = New System.Drawing.Size(146, 424) - Me.grpElements.TabIndex = 3 + Me.grpElements.Size = New System.Drawing.Size(260, 225) + Me.grpElements.TabIndex = 16 Me.grpElements.TabStop = False Me.grpElements.Text = "Elements" ' @@ -115,11 +564,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverMaxRH.AutoSize = True Me.ucrReceiverMaxRH.frmParent = Me - Me.ucrReceiverMaxRH.Location = New System.Drawing.Point(16, 395) + Me.ucrReceiverMaxRH.Location = New System.Drawing.Point(144, 193) Me.ucrReceiverMaxRH.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMaxRH.Name = "ucrReceiverMaxRH" Me.ucrReceiverMaxRH.Selector = Nothing - Me.ucrReceiverMaxRH.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverMaxRH.Size = New System.Drawing.Size(99, 20) Me.ucrReceiverMaxRH.strNcFilePath = "" Me.ucrReceiverMaxRH.TabIndex = 19 Me.ucrReceiverMaxRH.ucrSelector = Nothing @@ -128,7 +577,7 @@ Partial Class DlgDefineClimaticData ' Me.lblMaxRH.AutoSize = True Me.lblMaxRH.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxRH.Location = New System.Drawing.Point(16, 379) + Me.lblMaxRH.Location = New System.Drawing.Point(141, 178) Me.lblMaxRH.Name = "lblMaxRH" Me.lblMaxRH.Size = New System.Drawing.Size(90, 13) Me.lblMaxRH.TabIndex = 18 @@ -138,11 +587,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverMinRH.AutoSize = True Me.ucrReceiverMinRH.frmParent = Me - Me.ucrReceiverMinRH.Location = New System.Drawing.Point(16, 354) + Me.ucrReceiverMinRH.Location = New System.Drawing.Point(144, 152) Me.ucrReceiverMinRH.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinRH.Name = "ucrReceiverMinRH" Me.ucrReceiverMinRH.Selector = Nothing - Me.ucrReceiverMinRH.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverMinRH.Size = New System.Drawing.Size(99, 20) Me.ucrReceiverMinRH.strNcFilePath = "" Me.ucrReceiverMinRH.TabIndex = 17 Me.ucrReceiverMinRH.ucrSelector = Nothing @@ -151,7 +600,7 @@ Partial Class DlgDefineClimaticData ' Me.lblMinimumRH.AutoSize = True Me.lblMinimumRH.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMinimumRH.Location = New System.Drawing.Point(16, 338) + Me.lblMinimumRH.Location = New System.Drawing.Point(141, 137) Me.lblMinimumRH.Name = "lblMinimumRH" Me.lblMinimumRH.Size = New System.Drawing.Size(87, 13) Me.lblMinimumRH.TabIndex = 16 @@ -161,11 +610,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverWindDirection.AutoSize = True Me.ucrReceiverWindDirection.frmParent = Me - Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(16, 193) + Me.ucrReceiverWindDirection.Location = New System.Drawing.Point(18, 193) 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.Size = New System.Drawing.Size(111, 20) Me.ucrReceiverWindDirection.strNcFilePath = "" Me.ucrReceiverWindDirection.TabIndex = 9 Me.ucrReceiverWindDirection.ucrSelector = Nothing @@ -174,11 +623,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(16, 31) + Me.ucrReceiverRain.Location = New System.Drawing.Point(18, 31) 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.Size = New System.Drawing.Size(111, 20) Me.ucrReceiverRain.strNcFilePath = "" Me.ucrReceiverRain.TabIndex = 1 Me.ucrReceiverRain.ucrSelector = Nothing @@ -187,34 +636,24 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverSunshine.AutoSize = True Me.ucrReceiverSunshine.frmParent = Me - Me.ucrReceiverSunshine.Location = New System.Drawing.Point(16, 231) + Me.ucrReceiverSunshine.Location = New System.Drawing.Point(144, 31) 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.Size = New System.Drawing.Size(99, 20) Me.ucrReceiverSunshine.strNcFilePath = "" Me.ucrReceiverSunshine.TabIndex = 11 Me.ucrReceiverSunshine.ucrSelector = Nothing ' - 'lblRain - ' - Me.lblRain.AutoSize = True - Me.lblRain.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblRain.Location = New System.Drawing.Point(16, 16) - Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(32, 13) - Me.lblRain.TabIndex = 0 - Me.lblRain.Text = "Rain:" - ' 'ucrReceiverRadiation ' Me.ucrReceiverRadiation.AutoSize = True Me.ucrReceiverRadiation.frmParent = Me - Me.ucrReceiverRadiation.Location = New System.Drawing.Point(16, 272) + Me.ucrReceiverRadiation.Location = New System.Drawing.Point(144, 70) 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.Size = New System.Drawing.Size(99, 20) Me.ucrReceiverRadiation.strNcFilePath = "" Me.ucrReceiverRadiation.TabIndex = 13 Me.ucrReceiverRadiation.ucrSelector = Nothing @@ -223,11 +662,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverMaxTemp.AutoSize = True Me.ucrReceiverMaxTemp.frmParent = Me - Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(16, 111) + Me.ucrReceiverMaxTemp.Location = New System.Drawing.Point(18, 111) 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.Size = New System.Drawing.Size(111, 20) Me.ucrReceiverMaxTemp.strNcFilePath = "" Me.ucrReceiverMaxTemp.TabIndex = 5 Me.ucrReceiverMaxTemp.ucrSelector = Nothing @@ -236,11 +675,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverCloudCover.AutoSize = True Me.ucrReceiverCloudCover.frmParent = Me - Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(16, 313) + Me.ucrReceiverCloudCover.Location = New System.Drawing.Point(144, 111) 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.Size = New System.Drawing.Size(99, 20) Me.ucrReceiverCloudCover.strNcFilePath = "" Me.ucrReceiverCloudCover.TabIndex = 15 Me.ucrReceiverCloudCover.ucrSelector = Nothing @@ -249,7 +688,7 @@ Partial Class DlgDefineClimaticData ' Me.lblMaxTemp.AutoSize = True Me.lblMaxTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxTemp.Location = New System.Drawing.Point(16, 96) + Me.lblMaxTemp.Location = New System.Drawing.Point(15, 96) Me.lblMaxTemp.Name = "lblMaxTemp" Me.lblMaxTemp.Size = New System.Drawing.Size(117, 13) Me.lblMaxTemp.TabIndex = 4 @@ -259,7 +698,7 @@ Partial Class DlgDefineClimaticData ' Me.lblCloudCover.AutoSize = True Me.lblCloudCover.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblCloudCover.Location = New System.Drawing.Point(16, 297) + Me.lblCloudCover.Location = New System.Drawing.Point(141, 96) Me.lblCloudCover.Name = "lblCloudCover" Me.lblCloudCover.Size = New System.Drawing.Size(68, 13) Me.lblCloudCover.TabIndex = 14 @@ -269,7 +708,7 @@ Partial Class DlgDefineClimaticData ' Me.lblMinTemp.AutoSize = True Me.lblMinTemp.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMinTemp.Location = New System.Drawing.Point(16, 55) + Me.lblMinTemp.Location = New System.Drawing.Point(15, 55) Me.lblMinTemp.Name = "lblMinTemp" Me.lblMinTemp.Size = New System.Drawing.Size(111, 13) Me.lblMinTemp.TabIndex = 2 @@ -279,7 +718,7 @@ Partial Class DlgDefineClimaticData ' Me.lblRadiation.AutoSize = True Me.lblRadiation.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblRadiation.Location = New System.Drawing.Point(16, 257) + Me.lblRadiation.Location = New System.Drawing.Point(141, 55) Me.lblRadiation.Name = "lblRadiation" Me.lblRadiation.Size = New System.Drawing.Size(55, 13) Me.lblRadiation.TabIndex = 12 @@ -289,11 +728,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverWindSpeed.AutoSize = True Me.ucrReceiverWindSpeed.frmParent = Me - Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(16, 152) + Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(18, 152) 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.Size = New System.Drawing.Size(111, 20) Me.ucrReceiverWindSpeed.strNcFilePath = "" Me.ucrReceiverWindSpeed.TabIndex = 7 Me.ucrReceiverWindSpeed.ucrSelector = Nothing @@ -302,7 +741,7 @@ Partial Class DlgDefineClimaticData ' Me.lblSunshine.AutoSize = True Me.lblSunshine.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSunshine.Location = New System.Drawing.Point(16, 217) + Me.lblSunshine.Location = New System.Drawing.Point(141, 15) Me.lblSunshine.Name = "lblSunshine" Me.lblSunshine.Size = New System.Drawing.Size(85, 13) Me.lblSunshine.TabIndex = 10 @@ -312,11 +751,11 @@ Partial Class DlgDefineClimaticData ' Me.ucrReceiverMinTemp.AutoSize = True Me.ucrReceiverMinTemp.frmParent = Me - Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(16, 70) + Me.ucrReceiverMinTemp.Location = New System.Drawing.Point(18, 70) 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.Size = New System.Drawing.Size(111, 20) Me.ucrReceiverMinTemp.strNcFilePath = "" Me.ucrReceiverMinTemp.TabIndex = 3 Me.ucrReceiverMinTemp.ucrSelector = Nothing @@ -325,7 +764,7 @@ Partial Class DlgDefineClimaticData ' Me.lblWindSpeed.AutoSize = True Me.lblWindSpeed.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblWindSpeed.Location = New System.Drawing.Point(16, 137) + Me.lblWindSpeed.Location = New System.Drawing.Point(15, 137) Me.lblWindSpeed.Name = "lblWindSpeed" Me.lblWindSpeed.Size = New System.Drawing.Size(69, 13) Me.lblWindSpeed.TabIndex = 6 @@ -335,291 +774,101 @@ Partial Class DlgDefineClimaticData ' Me.lblWindDirection.AutoSize = True Me.lblWindDirection.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblWindDirection.Location = New System.Drawing.Point(16, 178) + Me.lblWindDirection.Location = New System.Drawing.Point(15, 178) Me.lblWindDirection.Name = "lblWindDirection" Me.lblWindDirection.Size = New System.Drawing.Size(80, 13) Me.lblWindDirection.TabIndex = 8 Me.lblWindDirection.Text = "Wind Direction:" ' - 'lblStationName - ' - Me.lblStationName.AutoSize = True - Me.lblStationName.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblStationName.Location = New System.Drawing.Point(7, 16) - Me.lblStationName.Name = "lblStationName" - Me.lblStationName.Size = New System.Drawing.Size(38, 13) - Me.lblStationName.TabIndex = 0 - Me.lblStationName.Text = "Name:" - ' - 'lblDOY - ' - Me.lblDOY.AutoSize = True - Me.lblDOY.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDOY.Location = New System.Drawing.Point(15, 180) - Me.lblDOY.Name = "lblDOY" - Me.lblDOY.Size = New System.Drawing.Size(66, 13) - Me.lblDOY.TabIndex = 8 - Me.lblDOY.Text = "Day of Year:" - ' - 'lblDay - ' - Me.lblDay.AutoSize = True - Me.lblDay.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDay.Location = New System.Drawing.Point(15, 139) - Me.lblDay.Name = "lblDay" - Me.lblDay.Size = New System.Drawing.Size(29, 13) - Me.lblDay.TabIndex = 6 - Me.lblDay.Text = "Day:" - ' - 'lblMonth - ' - Me.lblMonth.AutoSize = True - Me.lblMonth.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMonth.Location = New System.Drawing.Point(15, 98) - Me.lblMonth.Name = "lblMonth" - Me.lblMonth.Size = New System.Drawing.Size(40, 13) - Me.lblMonth.TabIndex = 4 - Me.lblMonth.Text = "Month:" - ' - 'lblYear - ' - Me.lblYear.AutoSize = True - Me.lblYear.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblYear.Location = New System.Drawing.Point(15, 57) - Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(32, 13) - Me.lblYear.TabIndex = 2 - Me.lblYear.Text = "Year:" - ' - 'lblDate - ' - Me.lblDate.AutoSize = True - Me.lblDate.ImeMode = System.Windows.Forms.ImeMode.NoControl - 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 - Me.lblDate.Text = "Date:" - ' - '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, 207) - Me.grpDateTime.Name = "grpDateTime" - Me.grpDateTime.Size = New System.Drawing.Size(148, 223) - Me.grpDateTime.TabIndex = 2 - Me.grpDateTime.TabStop = False - Me.grpDateTime.Tag = "" - Me.grpDateTime.Text = "Date and Time" - ' - 'ucrReceiverYear - ' - Me.ucrReceiverYear.AutoSize = True - Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Location = New System.Drawing.Point(15, 72) - 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.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 3 - Me.ucrReceiverYear.ucrSelector = Nothing - ' - 'ucrReceiverDOY - ' - Me.ucrReceiverDOY.AutoSize = True - Me.ucrReceiverDOY.frmParent = Me - Me.ucrReceiverDOY.Location = New System.Drawing.Point(15, 195) - 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.strNcFilePath = "" - Me.ucrReceiverDOY.TabIndex = 9 - Me.ucrReceiverDOY.ucrSelector = Nothing - ' - 'ucrReceiverDate - ' - Me.ucrReceiverDate.AutoSize = True - Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(15, 31) - Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverDate.Name = "ucrReceiverDate" - Me.ucrReceiverDate.Selector = Nothing - Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverDate.strNcFilePath = "" - Me.ucrReceiverDate.TabIndex = 1 - Me.ucrReceiverDate.ucrSelector = Nothing - ' - 'ucrReceiverMonth - ' - Me.ucrReceiverMonth.AutoSize = True - Me.ucrReceiverMonth.frmParent = Me - Me.ucrReceiverMonth.Location = New System.Drawing.Point(15, 113) - 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.strNcFilePath = "" - Me.ucrReceiverMonth.TabIndex = 5 - Me.ucrReceiverMonth.ucrSelector = Nothing - ' - 'ucrReceiverDay - ' - Me.ucrReceiverDay.AutoSize = True - Me.ucrReceiverDay.frmParent = Me - Me.ucrReceiverDay.Location = New System.Drawing.Point(15, 154) - 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.strNcFilePath = "" - Me.ucrReceiverDay.TabIndex = 7 - Me.ucrReceiverDay.ucrSelector = Nothing - ' - 'grpStation - ' - Me.grpStation.Controls.Add(Me.lblStationName) - Me.grpStation.Controls.Add(Me.ucrReceiverStationName) - Me.grpStation.Location = New System.Drawing.Point(13, 208) - Me.grpStation.Name = "grpStation" - Me.grpStation.Size = New System.Drawing.Size(135, 57) - Me.grpStation.TabIndex = 1 - Me.grpStation.TabStop = False - Me.grpStation.Tag = "" - Me.grpStation.Text = "Station" - ' - 'ucrReceiverStationName - ' - Me.ucrReceiverStationName.AutoSize = True - Me.ucrReceiverStationName.frmParent = Me - Me.ucrReceiverStationName.Location = New System.Drawing.Point(7, 31) - 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.strNcFilePath = "" - Me.ucrReceiverStationName.TabIndex = 1 - Me.ucrReceiverStationName.ucrSelector = Nothing - ' - 'cmdCheckUnique - ' - Me.cmdCheckUnique.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdCheckUnique.Location = New System.Drawing.Point(9, 435) - Me.cmdCheckUnique.Name = "cmdCheckUnique" - Me.cmdCheckUnique.Size = New System.Drawing.Size(139, 23) - Me.cmdCheckUnique.TabIndex = 4 - Me.cmdCheckUnique.Text = "Check Duplicates" - Me.cmdCheckUnique.UseVisualStyleBackColor = True - ' - 'ucrInputCheckInput - ' - Me.ucrInputCheckInput.AddQuotesIfUnrecognised = True - Me.ucrInputCheckInput.AutoSize = True - Me.ucrInputCheckInput.IsMultiline = False - Me.ucrInputCheckInput.IsReadOnly = False - Me.ucrInputCheckInput.Location = New System.Drawing.Point(154, 437) - Me.ucrInputCheckInput.Name = "ucrInputCheckInput" - Me.ucrInputCheckInput.Size = New System.Drawing.Size(253, 21) - Me.ucrInputCheckInput.TabIndex = 5 - ' - 'ucrBase - ' - Me.ucrBase.AutoSize = True - Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(13, 464) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 6 - ' - 'ucrSelectorDefineClimaticData - ' - Me.ucrSelectorDefineClimaticData.AutoSize = True - Me.ucrSelectorDefineClimaticData.bDropUnusedFilterLevels = False - Me.ucrSelectorDefineClimaticData.bShowHiddenColumns = False - Me.ucrSelectorDefineClimaticData.bUseCurrentFilter = True - Me.ucrSelectorDefineClimaticData.Location = New System.Drawing.Point(13, 14) - Me.ucrSelectorDefineClimaticData.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorDefineClimaticData.Name = "ucrSelectorDefineClimaticData" - Me.ucrSelectorDefineClimaticData.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorDefineClimaticData.TabIndex = 0 - ' 'DlgDefineClimaticData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(464, 522) + Me.ClientSize = New System.Drawing.Size(502, 460) + Me.Controls.Add(Me.ucrChkLinkedMetaData) + Me.Controls.Add(Me.ucrSelectorLinkedDataFrame) Me.Controls.Add(Me.ucrInputCheckInput) Me.Controls.Add(Me.cmdCheckUnique) + Me.Controls.Add(Me.ucrSelectorDefineClimaticData) Me.Controls.Add(Me.grpStation) + Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.grpDateTime) Me.Controls.Add(Me.grpElements) - Me.Controls.Add(Me.ucrBase) - Me.Controls.Add(Me.ucrSelectorDefineClimaticData) + Me.Controls.Add(Me.grpMeta) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "DlgDefineClimaticData" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Define Climatic Data" - Me.grpElements.ResumeLayout(False) - Me.grpElements.PerformLayout() - Me.grpDateTime.ResumeLayout(False) - Me.grpDateTime.PerformLayout() Me.grpStation.ResumeLayout(False) Me.grpStation.PerformLayout() + Me.grpDateTime.ResumeLayout(False) + Me.grpDateTime.PerformLayout() + Me.grpMeta.ResumeLayout(False) + Me.grpMeta.PerformLayout() + Me.grpElements.ResumeLayout(False) + Me.grpElements.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub + Friend WithEvents ucrChkLinkedMetaData As ucrCheck + Friend WithEvents ucrSelectorLinkedDataFrame As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrInputCheckInput As ucrInputTextBox + Friend WithEvents cmdCheckUnique As Button Friend WithEvents ucrSelectorDefineClimaticData As ucrSelectorByDataFrameAddRemove - Friend WithEvents grpElements As GroupBox + Friend WithEvents lblStationName As Label + Friend WithEvents lblDOY As Label + Friend WithEvents lblLongitude As Label + Friend WithEvents lblLatitude As Label + Friend WithEvents lblAltitude As Label + Friend WithEvents grpStation As GroupBox + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents grpDateTime As GroupBox + Friend WithEvents ucrReceiverYear As ucrReceiverSingle + Friend WithEvents lblDate As Label + Friend WithEvents lblMonth As Label + Friend WithEvents ucrReceiverDOY As ucrReceiverSingle + Friend WithEvents lblYear As Label Friend WithEvents ucrReceiverDate As ucrReceiverSingle - Friend WithEvents ucrReceiverRain As ucrReceiverSingle - Friend WithEvents ucrReceiverMaxTemp As ucrReceiverSingle + Friend WithEvents ucrReceiverMonth As ucrReceiverSingle + Friend WithEvents ucrReceiverDay As ucrReceiverSingle + Friend WithEvents lblDay As Label + Friend WithEvents grpMeta As GroupBox + Friend WithEvents Label1 As Label + Friend WithEvents Label2 As Label + Friend WithEvents Label3 As Label + Friend WithEvents Label4 As Label + Friend WithEvents ucrReceiverStationMeta As ucrReceiverSingle + Friend WithEvents ucrReceiverLonMeta As ucrReceiverSingle + Friend WithEvents ucrReceiverLatMeta As ucrReceiverSingle + Friend WithEvents ucrReceiverAltMeta As ucrReceiverSingle + Friend WithEvents grpElements As GroupBox + Friend WithEvents ucrReceiverMaxRH As ucrReceiverSingle + Friend WithEvents lblMaxRH As Label + Friend WithEvents ucrReceiverMinRH As ucrReceiverSingle + Friend WithEvents lblMinimumRH As Label Friend WithEvents ucrReceiverWindDirection As ucrReceiverSingle + Friend WithEvents ucrReceiverRain As ucrReceiverSingle Friend WithEvents ucrReceiverSunshine As ucrReceiverSingle + Friend WithEvents lblRain As Label Friend WithEvents ucrReceiverRadiation As ucrReceiverSingle + Friend WithEvents ucrReceiverMaxTemp As ucrReceiverSingle Friend WithEvents ucrReceiverCloudCover As ucrReceiverSingle + Friend WithEvents lblMaxTemp As Label Friend WithEvents lblCloudCover As Label + Friend WithEvents lblMinTemp As Label Friend WithEvents lblRadiation As Label - Friend WithEvents lblWindDirection As Label + Friend WithEvents ucrReceiverWindSpeed As ucrReceiverSingle Friend WithEvents lblSunshine As Label - Friend WithEvents lblWindSpeed As Label Friend WithEvents ucrReceiverMinTemp As ucrReceiverSingle - Friend WithEvents ucrReceiverWindSpeed As ucrReceiverSingle - Friend WithEvents lblRain As Label - Friend WithEvents lblMinTemp As Label - Friend WithEvents lblMaxTemp As Label - Friend WithEvents lblDate As Label - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrReceiverDay As ucrReceiverSingle - Friend WithEvents lblDay As Label - Friend WithEvents ucrReceiverMonth As ucrReceiverSingle - Friend WithEvents lblMonth As Label - Friend WithEvents ucrReceiverYear As ucrReceiverSingle - Friend WithEvents lblYear 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 - Friend WithEvents ucrInputCheckInput As ucrInputTextBox - Friend WithEvents cmdCheckUnique As Button - Friend WithEvents ucrReceiverMinRH As ucrReceiverSingle - Friend WithEvents lblMinimumRH As Label - Friend WithEvents ucrReceiverMaxRH As ucrReceiverSingle - Friend WithEvents lblMaxRH As Label + Friend WithEvents lblWindSpeed As Label + Friend WithEvents lblWindDirection As Label + Friend WithEvents ucrReceiverLongitude As ucrReceiverSingle + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrReceiverAltitude As ucrReceiverSingle End Class diff --git a/instat/DlgDefineClimaticData.vb b/instat/DlgDefineClimaticData.vb index 3ad6acdc97b..f392852cd60 100644 --- a/instat/DlgDefineClimaticData.vb +++ b/instat/DlgDefineClimaticData.vb @@ -21,11 +21,13 @@ Imports RDotNet 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 clsDefaultFunction As New RFunction - Private clsAnyDuplicatesFunction, clsConcFunction, clsGetColFunction As New RFunction + Private clsTypesFunction, clsNewTypesFunction As New RFunction + Private lstReceivers As New List(Of ucrReceiverSingle) + Private lstNewReceivers As New List(Of ucrReceiverSingle) + Private lstRecognisedTypes As New List(Of KeyValuePair(Of String, List(Of String))) + Private lstNewRecognisedTypes As New List(Of KeyValuePair(Of String, List(Of String))) + Private clsDefaultFunction, clsNewDefautFunction As New RFunction + Private clsAnyDuplicatesFunction, clsConcFunction, clsNewConcFunction, clsGetColFunction, clsDummyFunction As New RFunction Private strCurrentDataframeName As String Private bIsUnique As Boolean = True @@ -45,12 +47,15 @@ Public Class DlgDefineClimaticData 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", "x5"}.ToList()) + 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()) + Dim kvpAltitude As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("alt", {"alt", "altitude", "elevation", "elev"}.ToList()) + Dim kvpLongitude As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("lon", {"lon", "lont", "longitude"}.ToList()) + Dim kvpLatitude As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("lat", {"lat", "latitude"}.ToList()) Dim kvpCloudCover As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("cloud_cover", {"cloud"}.ToList()) - Dim kvpTempMax As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_max", {"tmax", "tx", "tempmax", "tmp_max", "x2", "tmpmax"}.ToList()) - Dim kvpTempMin As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_min", {"tmin", "tn", "tempmin", "tmp_min", "x3", "tmpmin"}.ToList()) + Dim kvpTempMax As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_max", {"tmax", "tx", "tempmax", "tmp_max"}.ToList()) + Dim kvpTempMin As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("temp_min", {"tmin", "tn", "tempmin", "tmp_min"}.ToList()) Dim kvpRadiation As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("radiation", {"radiation", "rad"}.ToList()) Dim kvpSunshineHours As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("sunshine_hours", {"sunshine", "sunh", "sunhrs"}.ToList()) Dim kvpWindDirection As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("wind_direction", {"winddirection"}.ToList()) @@ -62,18 +67,28 @@ Public Class DlgDefineClimaticData Dim kvpMinRH As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("hum_min", {"minhum", "hmin", "hn"}.ToList()) Dim kvpMaxRH As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("hum_max", {"maxhum", "hmax", "hx"}.ToList()) - - lstRecognisedTypes.AddRange({kvpRain, kvpStation, kvpCloudCover, kvpTempMax, kvpTempMin, kvpRadiation, kvpSunshineHours, + lstRecognisedTypes.AddRange({kvpRain, kvpCloudCover, kvpTempMax, kvpTempMin, kvpRadiation, kvpSunshineHours, kvpStation, kvpAltitude, kvpLatitude, kvpLongitude, kvpWindDirection, kvpWindSpeed, kvpYear, kvpMonth, kvpDay, kvpDOY, kvpDate, kvpMinRH, kvpMaxRH}) + lstNewRecognisedTypes.AddRange({kvpStation, kvpAltitude, kvpLatitude, kvpLongitude}) lstReceivers.AddRange({ucrReceiverCloudCover, ucrReceiverDay, ucrReceiverMaxTemp, ucrReceiverMinTemp, ucrReceiverMonth, ucrReceiverRadiation, - ucrReceiverRain, ucrReceiverStationName, ucrReceiverSunshine, ucrReceiverWindDirection, ucrReceiverWindSpeed, - ucrReceiverYear, ucrReceiverDOY, ucrReceiverDate, ucrReceiverMinRH, ucrReceiverMaxRH}) + ucrReceiverRain, ucrReceiverStation, ucrReceiverAltitude, ucrReceiverLatitude, ucrReceiverLongitude, ucrReceiverSunshine, + ucrReceiverWindDirection, ucrReceiverWindSpeed, ucrReceiverYear, ucrReceiverDOY, ucrReceiverDate, ucrReceiverMinRH, ucrReceiverMaxRH}) + lstNewReceivers.AddRange({ucrReceiverStationMeta, ucrReceiverAltMeta, ucrReceiverLatMeta, ucrReceiverLonMeta}) ucrSelectorDefineClimaticData.SetParameter(New RParameter("data_name", 0)) ucrSelectorDefineClimaticData.SetParameterIsString() + ucrSelectorLinkedDataFrame.SetParameter(New RParameter("data_name", 1)) + ucrSelectorLinkedDataFrame.SetParameterIsString() ucrReceiverDate.Tag = "date" ucrReceiverCloudCover.Tag = "cloud_cover" - ucrReceiverStationName.Tag = "station" + ucrReceiverStation.Tag = "station" + ucrReceiverAltitude.Tag = "alt" + ucrReceiverLongitude.Tag = "lon" + ucrReceiverLatitude.Tag = "lat" + ucrReceiverStationMeta.Tag = "station" + ucrReceiverAltMeta.Tag = "alt" + ucrReceiverLonMeta.Tag = "lon" + ucrReceiverLatMeta.Tag = "lat" ucrReceiverMaxTemp.Tag = "temp_max" ucrReceiverMinTemp.Tag = "temp_min" ucrReceiverRadiation.Tag = "radiation" @@ -91,6 +106,12 @@ Public Class DlgDefineClimaticData ucrReceiverDate.SetIncludedDataTypes({"Date"}) SetRSelector() + NewSetRSelector() + + ucrChkLinkedMetaData.SetText("Linked Meta Data") + ucrChkLinkedMetaData.SetParameter(New RParameter("check", 0)) + ucrChkLinkedMetaData.SetValuesCheckedAndUnchecked("True", "False") + ucrBase.clsRsyntax.iCallType = 2 End Sub @@ -99,34 +120,60 @@ Public Class DlgDefineClimaticData clsGetColFunction = New RFunction clsAnyDuplicatesFunction = New RFunction clsConcFunction = New RFunction + clsNewConcFunction = New RFunction + clsDummyFunction = New RFunction + clsNewDefautFunction = New RFunction ucrSelectorDefineClimaticData.Reset() + ucrSelectorLinkedDataFrame.Reset() ucrInputCheckInput.Reset() ucrReceiverDate.SetMeAsReceiver() + ucrSelectorLinkedDataFrame.Visible = False + grpMeta.Visible = False + + ucrChkLinkedMetaData.SetParameter(New RParameter("y", 0)) clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$define_as_climatic") clsDefaultFunction.AddParameter("types", clsRFunctionParameter:=clsTypesFunction) clsDefaultFunction.AddParameter("key_col_names", clsRFunctionParameter:=clsConcFunction, iPosition:=2) + clsNewDefautFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$define_as_climatic") + clsNewDefautFunction.AddParameter("types", clsRFunctionParameter:=clsNewTypesFunction) + clsNewDefautFunction.AddParameter("key_col_names", clsRFunctionParameter:=clsNewConcFunction, iPosition:=2) + + clsDummyFunction.AddParameter("checked", "FALSE", iPosition:=0) + clsTypesFunction.SetRCommand("c") + clsNewTypesFunction.SetRCommand("c") clsConcFunction.SetRCommand("c") + clsNewConcFunction.SetRCommand("c") + clsAnyDuplicatesFunction.SetRCommand("anyDuplicated") clsAnyDuplicatesFunction.AddParameter("x", clsRFunctionParameter:=clsGetColFunction) + ucrBase.clsRsyntax.ClearCodes() clsGetColFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data") clsGetColFunction.AddParameter("data_name", Chr(34) & strCurrentDataframeName & Chr(34)) clsGetColFunction.AddParameter("col_names", clsRFunctionParameter:=clsConcFunction) ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction) + ucrBase.clsRsyntax.bSeparateThread = False AutoFillReceivers() EnableDisableCheckUniqueBtn() End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrSelectorDefineClimaticData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + If bReset Then + ucrSelectorDefineClimaticData.SetRCode(clsDefaultFunction, bReset) + ucrSelectorLinkedDataFrame.SetRCode(clsNewDefautFunction, bReset) + End If + SetRCodesforReceivers(bReset) + + ucrChkLinkedMetaData.SetRCode(clsDummyFunction, bReset) + End Sub Private Sub TestOKEnabled() @@ -148,6 +195,10 @@ Public Class DlgDefineClimaticData For Each ucrTempReceiver In lstReceivers ucrTempReceiver.SetRCode(clsTypesFunction, bReset) Next + + For Each ucrTempReceiver In lstNewReceivers + ucrTempReceiver.SetRCode(clsNewTypesFunction, bReset) + Next End Sub Private Sub SetRSelector() @@ -160,6 +211,16 @@ Public Class DlgDefineClimaticData Next End Sub + Private Sub NewSetRSelector() + Dim ucrTempReceiver As ucrReceiver + For Each ucrTempReceiver In lstNewReceivers + ucrTempReceiver.SetParameter(New RParameter(ucrTempReceiver.Tag)) + ucrTempReceiver.Selector = ucrSelectorLinkedDataFrame + ucrTempReceiver.SetParameterIsString() + ucrTempReceiver.bExcludeFromSelector = True + Next + End Sub + Private Sub AutoFillReceivers() Dim lstRecognisedValues As List(Of String) Dim ucrCurrentReceiver As ucrReceiver @@ -174,7 +235,6 @@ Public Class DlgDefineClimaticData If lstRecognisedValues.Count > 0 Then For Each lviTempVariable As ListViewItem In ucrSelectorDefineClimaticData.lstAvailableVariable.Items For Each strValue As String In lstRecognisedValues - 'To strip out any non-word characters and underscores If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]|_", String.Empty).Contains(strValue) Then ucrTempReceiver.Add(lviTempVariable.Text, ucrSelectorDefineClimaticData.ucrAvailableDataFrames.cboAvailableDataFrames.Text) bFound = True @@ -194,6 +254,39 @@ Public Class DlgDefineClimaticData End If End Sub + Private Sub NewAutoFillReceivers() + Dim lstRecognisedValues As List(Of String) + Dim ucrCurrentReceiver As ucrReceiver + Dim bFound As Boolean = False + + ucrCurrentReceiver = ucrSelectorLinkedDataFrame.CurrentReceiver + + For Each ucrTempReceiver As ucrReceiver In lstNewReceivers + ucrTempReceiver.SetMeAsReceiver() + lstRecognisedValues = GetNewRecognisedValues(ucrTempReceiver.Tag) + + If lstRecognisedValues.Count > 0 Then + For Each lviTempVariable As ListViewItem In ucrSelectorLinkedDataFrame.lstAvailableVariable.Items + For Each strValue As String In lstRecognisedValues + If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]|_", String.Empty).Contains(strValue) Then + ucrTempReceiver.Add(lviTempVariable.Text, ucrSelectorLinkedDataFrame.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + bFound = True + Exit For + End If + Next + If bFound Then + bFound = False + Exit For + End If + Next + End If + Next + + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + End Sub + Private Function GetRecognisedValues(strVariable As String) As List(Of String) Dim lstValues As New List(Of String) @@ -206,9 +299,17 @@ Public Class DlgDefineClimaticData Return lstValues End Function - Private Sub Selector_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDefineClimaticData.ControlContentsChanged - AutoFillReceivers() - End Sub + Private Function GetNewRecognisedValues(strVariable As String) As List(Of String) + Dim lstValues As New List(Of String) + + For Each kvpTemp As KeyValuePair(Of String, List(Of String)) In lstNewRecognisedTypes + If kvpTemp.Key = strVariable Then + lstValues = kvpTemp.Value + Exit For + End If + Next + Return lstValues + End Function Private Sub cmdCheckUnique_Click(sender As Object, e As EventArgs) Handles cmdCheckUnique.Click Dim iAnyDuplicated As Integer @@ -227,7 +328,7 @@ Public Class DlgDefineClimaticData ucrInputCheckInput.SetName("") ucrInputCheckInput.txtInput.BackColor = Color.LightCoral bIsUnique = False - If ucrReceiverStationName.IsEmpty Then + If ucrReceiverStation.IsEmpty Then ucrInputCheckInput.SetName("Duplicate dates found.") MsgBox("You have multiple rows with the same dates. Did you forget to add the station column? Otherwise, use the Climatic > Tidy and Examine > Duplicates dialog to investigate these issues.", MsgBoxStyle.Information, Title:="Duplicates") Else @@ -253,10 +354,10 @@ Public Class DlgDefineClimaticData bIsUnique = True End Sub - Private Sub ucrReceiverDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlValueChanged, ucrReceiverStationName.ControlValueChanged + Private Sub ucrReceiverDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlValueChanged, ucrReceiverStation.ControlContentsChanged EnableDisableCheckUniqueBtn() - If Not ucrReceiverStationName.IsEmpty Then - clsConcFunction.AddParameter("x1", ucrReceiverStationName.GetVariableNames, bIncludeArgumentName:=False) + If Not ucrReceiverStation.IsEmpty Then + clsConcFunction.AddParameter("x1", ucrReceiverStation.GetVariableNames, bIncludeArgumentName:=False) Else clsConcFunction.RemoveParameterByName("x1") End If @@ -270,9 +371,37 @@ Public Class DlgDefineClimaticData Private Sub ucrSelectorDefineClimaticData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDefineClimaticData.ControlValueChanged strCurrentDataframeName = ucrSelectorDefineClimaticData.strCurrentDataFrame clsGetColFunction.AddParameter("data_name", Chr(34) & strCurrentDataframeName & Chr(34), iPosition:=0) + AutoFillReceivers() + SetRSelector() + End Sub + + Private Sub ucrSelectorLinkedDataFrame_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorLinkedDataFrame.ControlValueChanged + clsGetColFunction.AddParameter("data_name", Chr(34) & ucrSelectorLinkedDataFrame.strCurrentDataFrame & Chr(34), iPosition:=1) + NewAutoFillReceivers() + NewSetRSelector() End Sub Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged TestOKEnabled() End Sub + + Private Sub ucrChkLinkedMetaData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkLinkedMetaData.ControlValueChanged, ucrReceiverAltMeta.ControlValueChanged, ucrReceiverLatMeta.ControlValueChanged, ucrReceiverLonMeta.ControlValueChanged, ucrReceiverStationMeta.ControlValueChanged + If ucrChkLinkedMetaData.Checked Then + ucrSelectorLinkedDataFrame.Visible = True + grpMeta.Visible = True + grpStation.Visible = False + ucrBase.clsRsyntax.AddToAfterCodes(clsNewDefautFunction, iPosition:=0) + clsNewDefautFunction.iCallType = 2 + Else + ucrSelectorLinkedDataFrame.Visible = False + grpMeta.Visible = False + grpStation.Visible = True + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsNewDefautFunction) + End If + If Not ucrReceiverStationMeta.IsEmpty Then + clsNewConcFunction.AddParameter("x1", ucrReceiverStationMeta.GetVariableNames, bIncludeArgumentName:=False) + Else + clsNewConcFunction.RemoveParameterByName("x1") + End If + End Sub End Class \ No newline at end of file diff --git a/instat/dlgEvapotranspiration.Designer.vb b/instat/dlgEvapotranspiration.Designer.vb index 144623d8381..dee08be68f1 100644 --- a/instat/dlgEvapotranspiration.Designer.vb +++ b/instat/dlgEvapotranspiration.Designer.vb @@ -22,20 +22,27 @@ Partial Class dlgEvapotranspiration 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.lblTmax = New System.Windows.Forms.Label() - Me.lblTmin = New System.Windows.Forms.Label() - Me.lblHumidityMax = New System.Windows.Forms.Label() - Me.lblHumidityMin = New System.Windows.Forms.Label() - Me.lblTimeStep = New System.Windows.Forms.Label() - Me.lblCrop = New System.Windows.Forms.Label() - Me.lblDate = New System.Windows.Forms.Label() - Me.lblMissingMethod = New System.Windows.Forms.Label() - Me.lblSolar = New System.Windows.Forms.Label() - Me.lblRadiation = New System.Windows.Forms.Label() + Me.cmdHSConstants = New System.Windows.Forms.Button() + Me.cmdLocation = New System.Windows.Forms.Button() + Me.cmdPMConstants = New System.Windows.Forms.Button() + Me.cmdHSMissingOptions = New System.Windows.Forms.Button() + Me.cmdEvapOptions = New System.Windows.Forms.Button() Me.rdoHargreavesSamani = New System.Windows.Forms.RadioButton() Me.rdoPenmanMonteith = New System.Windows.Forms.RadioButton() - Me.cmdEvapOptions = New System.Windows.Forms.Button() - Me.ucrInputMissingMethod = New instat.ucrInputComboBox() + Me.lblSolar = New System.Windows.Forms.Label() + Me.lblRadiation = New System.Windows.Forms.Label() + Me.lblDate = New System.Windows.Forms.Label() + Me.lblCrop = New System.Windows.Forms.Label() + Me.lblTimeStep = New System.Windows.Forms.Label() + Me.lblHumidityMin = New System.Windows.Forms.Label() + Me.lblHumidityMax = New System.Windows.Forms.Label() + Me.lblTmin = New System.Windows.Forms.Label() + Me.lblTmax = New System.Windows.Forms.Label() + Me.rdoPriestleyTaylor = New System.Windows.Forms.RadioButton() + Me.lblRA = New System.Windows.Forms.Label() + Me.lblAlpha = New System.Windows.Forms.Label() + Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() + Me.ucrChkWind = New instat.ucrCheck() Me.ucrInputSolar = New instat.ucrInputComboBox() Me.ucrReceiverRadiation = New instat.ucrReceiverSingle() Me.ucrInputCrop = New instat.ucrInputComboBox() @@ -49,99 +56,60 @@ Partial Class dlgEvapotranspiration Me.ucrReceiverTmax = New instat.ucrReceiverSingle() Me.ucrSelectorEvapotranspiration = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverWindSpeed = New instat.ucrReceiverSingle() - Me.ucrChkWind = New instat.ucrCheck() + Me.ucrReceiverExtraRadiation = New instat.ucrReceiverSingle() + Me.ucrNudAlpha = New instat.ucrNud() + Me.cmdPTConstants = New System.Windows.Forms.Button() Me.SuspendLayout() ' - 'lblTmax - ' - Me.lblTmax.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblTmax.Location = New System.Drawing.Point(311, 120) - Me.lblTmax.Name = "lblTmax" - Me.lblTmax.Size = New System.Drawing.Size(47, 13) - Me.lblTmax.TabIndex = 8 - Me.lblTmax.Text = "Tmax:" - ' - 'lblTmin - ' - Me.lblTmin.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblTmin.Location = New System.Drawing.Point(311, 85) - Me.lblTmin.Name = "lblTmin" - Me.lblTmin.Size = New System.Drawing.Size(42, 14) - Me.lblTmin.TabIndex = 6 - Me.lblTmin.Text = "Tmin:" - ' - 'lblHumidityMax - ' - Me.lblHumidityMax.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblHumidityMax.Location = New System.Drawing.Point(311, 156) - Me.lblHumidityMax.Name = "lblHumidityMax" - Me.lblHumidityMax.Size = New System.Drawing.Size(124, 19) - Me.lblHumidityMax.TabIndex = 10 - Me.lblHumidityMax.Text = "Humidity Max:" - ' - 'lblHumidityMin - ' - Me.lblHumidityMin.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblHumidityMin.Location = New System.Drawing.Point(311, 197) - Me.lblHumidityMin.Name = "lblHumidityMin" - Me.lblHumidityMin.Size = New System.Drawing.Size(123, 19) - Me.lblHumidityMin.TabIndex = 12 - Me.lblHumidityMin.Text = "Humidity Min:" - ' - 'lblTimeStep - ' - Me.lblTimeStep.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblTimeStep.Location = New System.Drawing.Point(2, 242) - Me.lblTimeStep.Name = "lblTimeStep" - Me.lblTimeStep.Size = New System.Drawing.Size(107, 20) - Me.lblTimeStep.TabIndex = 22 - Me.lblTimeStep.Text = "Time Step" - ' - 'lblCrop - ' - Me.lblCrop.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblCrop.Location = New System.Drawing.Point(2, 344) - Me.lblCrop.Name = "lblCrop" - Me.lblCrop.Size = New System.Drawing.Size(71, 20) - Me.lblCrop.TabIndex = 30 - Me.lblCrop.Text = "Crop" - ' - 'lblDate - ' - Me.lblDate.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblDate.Location = New System.Drawing.Point(311, 48) - Me.lblDate.Name = "lblDate" - Me.lblDate.Size = New System.Drawing.Size(43, 14) - Me.lblDate.TabIndex = 4 - Me.lblDate.Text = "Date:" - ' - 'lblMissingMethod - ' - Me.lblMissingMethod.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMissingMethod.Location = New System.Drawing.Point(2, 310) - Me.lblMissingMethod.Name = "lblMissingMethod" - Me.lblMissingMethod.Size = New System.Drawing.Size(107, 20) - Me.lblMissingMethod.TabIndex = 28 - Me.lblMissingMethod.Text = "Missing Method" + 'cmdHSConstants + ' + Me.cmdHSConstants.Location = New System.Drawing.Point(171, 342) + Me.cmdHSConstants.Name = "cmdHSConstants" + Me.cmdHSConstants.Size = New System.Drawing.Size(123, 23) + Me.cmdHSConstants.TabIndex = 69 + Me.cmdHSConstants.Tag = "Options" + Me.cmdHSConstants.Text = "Constants" + Me.cmdHSConstants.UseVisualStyleBackColor = True + ' + 'cmdLocation + ' + Me.cmdLocation.Location = New System.Drawing.Point(10, 341) + Me.cmdLocation.Name = "cmdLocation" + Me.cmdLocation.Size = New System.Drawing.Size(123, 23) + Me.cmdLocation.TabIndex = 68 + Me.cmdLocation.Tag = "Options" + Me.cmdLocation.Text = "Location" + Me.cmdLocation.UseVisualStyleBackColor = True + ' + 'cmdPMConstants + ' + Me.cmdPMConstants.Location = New System.Drawing.Point(171, 342) + Me.cmdPMConstants.Name = "cmdPMConstants" + Me.cmdPMConstants.Size = New System.Drawing.Size(123, 23) + Me.cmdPMConstants.TabIndex = 67 + Me.cmdPMConstants.Tag = "Options" + Me.cmdPMConstants.Text = "Constants" + Me.cmdPMConstants.UseVisualStyleBackColor = True + ' + 'cmdHSMissingOptions + ' + Me.cmdHSMissingOptions.Location = New System.Drawing.Point(319, 341) + Me.cmdHSMissingOptions.Name = "cmdHSMissingOptions" + Me.cmdHSMissingOptions.Size = New System.Drawing.Size(123, 23) + Me.cmdHSMissingOptions.TabIndex = 66 + Me.cmdHSMissingOptions.Tag = "Options" + Me.cmdHSMissingOptions.Text = "Missing Options" + Me.cmdHSMissingOptions.UseVisualStyleBackColor = True ' - 'lblSolar - ' - Me.lblSolar.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblSolar.Location = New System.Drawing.Point(2, 275) - Me.lblSolar.Name = "lblSolar" - Me.lblSolar.Size = New System.Drawing.Size(58, 18) - Me.lblSolar.TabIndex = 26 - Me.lblSolar.Text = "Solar" - ' - 'lblRadiation + 'cmdEvapOptions ' - Me.lblRadiation.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblRadiation.Location = New System.Drawing.Point(311, 237) - Me.lblRadiation.Name = "lblRadiation" - Me.lblRadiation.Size = New System.Drawing.Size(120, 17) - Me.lblRadiation.TabIndex = 14 - Me.lblRadiation.Text = "Solar:" + Me.cmdEvapOptions.Location = New System.Drawing.Point(319, 341) + Me.cmdEvapOptions.Name = "cmdEvapOptions" + Me.cmdEvapOptions.Size = New System.Drawing.Size(123, 23) + Me.cmdEvapOptions.TabIndex = 65 + Me.cmdEvapOptions.Tag = "Options" + Me.cmdEvapOptions.Text = "Missing Options" + Me.cmdEvapOptions.UseVisualStyleBackColor = True ' 'rdoHargreavesSamani ' @@ -151,10 +119,10 @@ Partial Class dlgEvapotranspiration Me.rdoHargreavesSamani.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoHargreavesSamani.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoHargreavesSamani.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoHargreavesSamani.Location = New System.Drawing.Point(210, 12) + Me.rdoHargreavesSamani.Location = New System.Drawing.Point(150, 10) Me.rdoHargreavesSamani.Name = "rdoHargreavesSamani" Me.rdoHargreavesSamani.Size = New System.Drawing.Size(131, 27) - Me.rdoHargreavesSamani.TabIndex = 2 + Me.rdoHargreavesSamani.TabIndex = 43 Me.rdoHargreavesSamani.TabStop = True Me.rdoHargreavesSamani.Text = "Hargreaves- Samani" Me.rdoHargreavesSamani.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -168,35 +136,153 @@ Partial Class dlgEvapotranspiration Me.rdoPenmanMonteith.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoPenmanMonteith.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoPenmanMonteith.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoPenmanMonteith.Location = New System.Drawing.Point(103, 12) + Me.rdoPenmanMonteith.Location = New System.Drawing.Point(43, 10) Me.rdoPenmanMonteith.Name = "rdoPenmanMonteith" Me.rdoPenmanMonteith.Size = New System.Drawing.Size(109, 27) - Me.rdoPenmanMonteith.TabIndex = 1 + Me.rdoPenmanMonteith.TabIndex = 41 Me.rdoPenmanMonteith.TabStop = True Me.rdoPenmanMonteith.Text = "Penman-Monteith" Me.rdoPenmanMonteith.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoPenmanMonteith.UseVisualStyleBackColor = True ' - 'cmdEvapOptions + 'lblSolar ' - Me.cmdEvapOptions.Location = New System.Drawing.Point(314, 343) - Me.cmdEvapOptions.Name = "cmdEvapOptions" - Me.cmdEvapOptions.Size = New System.Drawing.Size(123, 23) - Me.cmdEvapOptions.TabIndex = 34 - Me.cmdEvapOptions.Tag = "Options" - Me.cmdEvapOptions.Text = "Missing Options" - Me.cmdEvapOptions.UseVisualStyleBackColor = True + Me.lblSolar.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSolar.Location = New System.Drawing.Point(10, 269) + Me.lblSolar.Name = "lblSolar" + Me.lblSolar.Size = New System.Drawing.Size(58, 18) + Me.lblSolar.TabIndex = 59 + Me.lblSolar.Text = "Solar" + ' + 'lblRadiation + ' + Me.lblRadiation.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblRadiation.Location = New System.Drawing.Point(319, 240) + Me.lblRadiation.Name = "lblRadiation" + Me.lblRadiation.Size = New System.Drawing.Size(120, 13) + Me.lblRadiation.TabIndex = 55 + Me.lblRadiation.Text = "Solar:" + ' + 'lblDate + ' + Me.lblDate.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblDate.Location = New System.Drawing.Point(319, 45) + Me.lblDate.Name = "lblDate" + Me.lblDate.Size = New System.Drawing.Size(43, 13) + Me.lblDate.TabIndex = 45 + Me.lblDate.Text = "Date:" + ' + 'lblCrop + ' + Me.lblCrop.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblCrop.Location = New System.Drawing.Point(10, 297) + Me.lblCrop.Name = "lblCrop" + Me.lblCrop.Size = New System.Drawing.Size(71, 20) + Me.lblCrop.TabIndex = 61 + Me.lblCrop.Text = "Crop" + ' + 'lblTimeStep + ' + Me.lblTimeStep.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblTimeStep.Location = New System.Drawing.Point(10, 240) + Me.lblTimeStep.Name = "lblTimeStep" + Me.lblTimeStep.Size = New System.Drawing.Size(92, 20) + Me.lblTimeStep.TabIndex = 57 + Me.lblTimeStep.Text = "Time Step" + ' + 'lblHumidityMin ' - 'ucrInputMissingMethod + Me.lblHumidityMin.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblHumidityMin.Location = New System.Drawing.Point(319, 200) + Me.lblHumidityMin.Name = "lblHumidityMin" + Me.lblHumidityMin.Size = New System.Drawing.Size(123, 13) + Me.lblHumidityMin.TabIndex = 53 + Me.lblHumidityMin.Text = "Humidity Min:" + ' + 'lblHumidityMax + ' + Me.lblHumidityMax.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblHumidityMax.Location = New System.Drawing.Point(319, 161) + Me.lblHumidityMax.Name = "lblHumidityMax" + Me.lblHumidityMax.Size = New System.Drawing.Size(124, 13) + Me.lblHumidityMax.TabIndex = 51 + Me.lblHumidityMax.Text = "Humidity Max:" + ' + 'lblTmin ' - Me.ucrInputMissingMethod.AddQuotesIfUnrecognised = True - Me.ucrInputMissingMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrInputMissingMethod.GetSetSelectedIndex = -1 - Me.ucrInputMissingMethod.IsReadOnly = False - Me.ucrInputMissingMethod.Location = New System.Drawing.Point(109, 310) - Me.ucrInputMissingMethod.Name = "ucrInputMissingMethod" - Me.ucrInputMissingMethod.Size = New System.Drawing.Size(137, 21) - Me.ucrInputMissingMethod.TabIndex = 29 + Me.lblTmin.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblTmin.Location = New System.Drawing.Point(319, 84) + Me.lblTmin.Name = "lblTmin" + Me.lblTmin.Size = New System.Drawing.Size(42, 13) + Me.lblTmin.TabIndex = 47 + Me.lblTmin.Text = "Tmin:" + ' + 'lblTmax + ' + Me.lblTmax.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblTmax.Location = New System.Drawing.Point(319, 123) + Me.lblTmax.Name = "lblTmax" + Me.lblTmax.Size = New System.Drawing.Size(47, 13) + Me.lblTmax.TabIndex = 49 + Me.lblTmax.Text = "Tmax:" + ' + 'rdoPriestleyTaylor + ' + Me.rdoPriestleyTaylor.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoPriestleyTaylor.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPriestleyTaylor.FlatAppearance.BorderSize = 2 + Me.rdoPriestleyTaylor.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPriestleyTaylor.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoPriestleyTaylor.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoPriestleyTaylor.Location = New System.Drawing.Point(279, 10) + Me.rdoPriestleyTaylor.Name = "rdoPriestleyTaylor" + Me.rdoPriestleyTaylor.Size = New System.Drawing.Size(131, 27) + Me.rdoPriestleyTaylor.TabIndex = 70 + Me.rdoPriestleyTaylor.TabStop = True + Me.rdoPriestleyTaylor.Text = "Priestley-Taylor" + Me.rdoPriestleyTaylor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoPriestleyTaylor.UseVisualStyleBackColor = True + ' + 'lblRA + ' + Me.lblRA.AutoSize = True + Me.lblRA.Location = New System.Drawing.Point(319, 161) + Me.lblRA.Name = "lblRA" + Me.lblRA.Size = New System.Drawing.Size(124, 13) + Me.lblRA.TabIndex = 39 + Me.lblRA.Text = "Extraterrestrial Radiation:" + ' + 'lblAlpha + ' + Me.lblAlpha.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblAlpha.Location = New System.Drawing.Point(12, 297) + Me.lblAlpha.Name = "lblAlpha" + Me.lblAlpha.Size = New System.Drawing.Size(71, 20) + Me.lblAlpha.TabIndex = 37 + Me.lblAlpha.Text = "Alpha" + ' + 'ucrReceiverWindSpeed + ' + Me.ucrReceiverWindSpeed.AutoSize = True + Me.ucrReceiverWindSpeed.frmParent = Me + Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(319, 313) + Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" + Me.ucrReceiverWindSpeed.Selector = Nothing + Me.ucrReceiverWindSpeed.Size = New System.Drawing.Size(123, 20) + Me.ucrReceiverWindSpeed.strNcFilePath = "" + Me.ucrReceiverWindSpeed.TabIndex = 42 + Me.ucrReceiverWindSpeed.ucrSelector = Nothing + ' + 'ucrChkWind + ' + Me.ucrChkWind.AutoSize = True + Me.ucrChkWind.Checked = False + Me.ucrChkWind.Location = New System.Drawing.Point(319, 290) + Me.ucrChkWind.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkWind.Name = "ucrChkWind" + Me.ucrChkWind.Size = New System.Drawing.Size(123, 23) + Me.ucrChkWind.TabIndex = 39 ' 'ucrInputSolar ' @@ -204,22 +290,23 @@ Partial Class dlgEvapotranspiration Me.ucrInputSolar.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputSolar.GetSetSelectedIndex = -1 Me.ucrInputSolar.IsReadOnly = False - Me.ucrInputSolar.Location = New System.Drawing.Point(109, 275) + Me.ucrInputSolar.Location = New System.Drawing.Point(114, 266) + Me.ucrInputSolar.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputSolar.Name = "ucrInputSolar" Me.ucrInputSolar.Size = New System.Drawing.Size(137, 21) - Me.ucrInputSolar.TabIndex = 27 + Me.ucrInputSolar.TabIndex = 60 ' 'ucrReceiverRadiation ' Me.ucrReceiverRadiation.AutoSize = True Me.ucrReceiverRadiation.frmParent = Me - Me.ucrReceiverRadiation.Location = New System.Drawing.Point(314, 254) + Me.ucrReceiverRadiation.Location = New System.Drawing.Point(319, 256) Me.ucrReceiverRadiation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRadiation.Name = "ucrReceiverRadiation" Me.ucrReceiverRadiation.Selector = Nothing Me.ucrReceiverRadiation.Size = New System.Drawing.Size(123, 20) Me.ucrReceiverRadiation.strNcFilePath = "" - Me.ucrReceiverRadiation.TabIndex = 15 + Me.ucrReceiverRadiation.TabIndex = 56 Me.ucrReceiverRadiation.ucrSelector = Nothing ' 'ucrInputCrop @@ -228,40 +315,42 @@ Partial Class dlgEvapotranspiration Me.ucrInputCrop.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputCrop.GetSetSelectedIndex = -1 Me.ucrInputCrop.IsReadOnly = False - Me.ucrInputCrop.Location = New System.Drawing.Point(109, 343) + Me.ucrInputCrop.Location = New System.Drawing.Point(114, 292) + Me.ucrInputCrop.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputCrop.Name = "ucrInputCrop" Me.ucrInputCrop.Size = New System.Drawing.Size(137, 21) - Me.ucrInputCrop.TabIndex = 31 + Me.ucrInputCrop.TabIndex = 62 ' 'ucrNewColName ' Me.ucrNewColName.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrNewColName.Location = New System.Drawing.Point(5, 386) + Me.ucrNewColName.Location = New System.Drawing.Point(10, 384) Me.ucrNewColName.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrNewColName.Name = "ucrNewColName" Me.ucrNewColName.Size = New System.Drawing.Size(388, 24) - Me.ucrNewColName.TabIndex = 32 + Me.ucrNewColName.TabIndex = 63 ' 'ucrReceiverDate ' Me.ucrReceiverDate.AutoSize = True Me.ucrReceiverDate.frmParent = Me - Me.ucrReceiverDate.Location = New System.Drawing.Point(314, 63) + Me.ucrReceiverDate.Location = New System.Drawing.Point(319, 61) Me.ucrReceiverDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDate.Name = "ucrReceiverDate" Me.ucrReceiverDate.Selector = Nothing Me.ucrReceiverDate.Size = New System.Drawing.Size(123, 20) Me.ucrReceiverDate.strNcFilePath = "" - Me.ucrReceiverDate.TabIndex = 5 + Me.ucrReceiverDate.TabIndex = 46 Me.ucrReceiverDate.ucrSelector = Nothing ' 'ucrPnlMethod ' Me.ucrPnlMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlMethod.Location = New System.Drawing.Point(102, 10) + Me.ucrPnlMethod.Location = New System.Drawing.Point(41, 8) + Me.ucrPnlMethod.Margin = New System.Windows.Forms.Padding(6) Me.ucrPnlMethod.Name = "ucrPnlMethod" - Me.ucrPnlMethod.Size = New System.Drawing.Size(244, 37) - Me.ucrPnlMethod.TabIndex = 0 + Me.ucrPnlMethod.Size = New System.Drawing.Size(397, 37) + Me.ucrPnlMethod.TabIndex = 40 ' 'ucrInputTimeStep ' @@ -269,61 +358,62 @@ Partial Class dlgEvapotranspiration Me.ucrInputTimeStep.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrInputTimeStep.GetSetSelectedIndex = -1 Me.ucrInputTimeStep.IsReadOnly = False - Me.ucrInputTimeStep.Location = New System.Drawing.Point(109, 241) + Me.ucrInputTimeStep.Location = New System.Drawing.Point(114, 240) + Me.ucrInputTimeStep.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputTimeStep.Name = "ucrInputTimeStep" - Me.ucrInputTimeStep.Size = New System.Drawing.Size(113, 21) - Me.ucrInputTimeStep.TabIndex = 23 + Me.ucrInputTimeStep.Size = New System.Drawing.Size(137, 21) + Me.ucrInputTimeStep.TabIndex = 58 ' 'ucrReceiverHumidityMin ' Me.ucrReceiverHumidityMin.AutoSize = True Me.ucrReceiverHumidityMin.frmParent = Me - Me.ucrReceiverHumidityMin.Location = New System.Drawing.Point(314, 216) + Me.ucrReceiverHumidityMin.Location = New System.Drawing.Point(319, 216) Me.ucrReceiverHumidityMin.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverHumidityMin.Name = "ucrReceiverHumidityMin" Me.ucrReceiverHumidityMin.Selector = Nothing Me.ucrReceiverHumidityMin.Size = New System.Drawing.Size(123, 20) Me.ucrReceiverHumidityMin.strNcFilePath = "" - Me.ucrReceiverHumidityMin.TabIndex = 13 + Me.ucrReceiverHumidityMin.TabIndex = 54 Me.ucrReceiverHumidityMin.ucrSelector = Nothing ' 'ucrReceiverHumidityMax ' Me.ucrReceiverHumidityMax.AutoSize = True Me.ucrReceiverHumidityMax.frmParent = Me - Me.ucrReceiverHumidityMax.Location = New System.Drawing.Point(314, 175) + Me.ucrReceiverHumidityMax.Location = New System.Drawing.Point(319, 177) Me.ucrReceiverHumidityMax.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverHumidityMax.Name = "ucrReceiverHumidityMax" Me.ucrReceiverHumidityMax.Selector = Nothing Me.ucrReceiverHumidityMax.Size = New System.Drawing.Size(123, 20) Me.ucrReceiverHumidityMax.strNcFilePath = "" - Me.ucrReceiverHumidityMax.TabIndex = 11 + Me.ucrReceiverHumidityMax.TabIndex = 52 Me.ucrReceiverHumidityMax.ucrSelector = Nothing ' 'ucrReceiverTmin ' Me.ucrReceiverTmin.AutoSize = True Me.ucrReceiverTmin.frmParent = Me - Me.ucrReceiverTmin.Location = New System.Drawing.Point(314, 99) + Me.ucrReceiverTmin.Location = New System.Drawing.Point(319, 99) Me.ucrReceiverTmin.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverTmin.Name = "ucrReceiverTmin" Me.ucrReceiverTmin.Selector = Nothing Me.ucrReceiverTmin.Size = New System.Drawing.Size(123, 20) Me.ucrReceiverTmin.strNcFilePath = "" - Me.ucrReceiverTmin.TabIndex = 7 + Me.ucrReceiverTmin.TabIndex = 48 Me.ucrReceiverTmin.ucrSelector = Nothing ' 'ucrReceiverTmax ' Me.ucrReceiverTmax.AutoSize = True Me.ucrReceiverTmax.frmParent = Me - Me.ucrReceiverTmax.Location = New System.Drawing.Point(314, 133) + Me.ucrReceiverTmax.Location = New System.Drawing.Point(319, 138) Me.ucrReceiverTmax.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverTmax.Name = "ucrReceiverTmax" Me.ucrReceiverTmax.Selector = Nothing Me.ucrReceiverTmax.Size = New System.Drawing.Size(123, 20) Me.ucrReceiverTmax.strNcFilePath = "" - Me.ucrReceiverTmax.TabIndex = 9 + Me.ucrReceiverTmax.TabIndex = 50 Me.ucrReceiverTmax.ucrSelector = Nothing ' 'ucrSelectorEvapotranspiration @@ -332,42 +422,57 @@ Partial Class dlgEvapotranspiration Me.ucrSelectorEvapotranspiration.bDropUnusedFilterLevels = False Me.ucrSelectorEvapotranspiration.bShowHiddenColumns = False Me.ucrSelectorEvapotranspiration.bUseCurrentFilter = True - Me.ucrSelectorEvapotranspiration.Location = New System.Drawing.Point(5, 50) + Me.ucrSelectorEvapotranspiration.Location = New System.Drawing.Point(10, 48) Me.ucrSelectorEvapotranspiration.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorEvapotranspiration.Name = "ucrSelectorEvapotranspiration" Me.ucrSelectorEvapotranspiration.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorEvapotranspiration.TabIndex = 3 + Me.ucrSelectorEvapotranspiration.TabIndex = 44 ' 'ucrBase ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(5, 421) + Me.ucrBase.Location = New System.Drawing.Point(10, 419) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 33 - ' - 'ucrReceiverWindSpeed - ' - Me.ucrReceiverWindSpeed.AutoSize = True - Me.ucrReceiverWindSpeed.frmParent = Me - Me.ucrReceiverWindSpeed.Location = New System.Drawing.Point(314, 297) - Me.ucrReceiverWindSpeed.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverWindSpeed.Name = "ucrReceiverWindSpeed" - Me.ucrReceiverWindSpeed.Selector = Nothing - Me.ucrReceiverWindSpeed.Size = New System.Drawing.Size(123, 20) - Me.ucrReceiverWindSpeed.strNcFilePath = "" - Me.ucrReceiverWindSpeed.TabIndex = 2 - Me.ucrReceiverWindSpeed.ucrSelector = Nothing - ' - 'ucrChkWind - ' - Me.ucrChkWind.AutoSize = True - Me.ucrChkWind.Checked = False - Me.ucrChkWind.Location = New System.Drawing.Point(314, 277) - Me.ucrChkWind.Name = "ucrChkWind" - Me.ucrChkWind.Size = New System.Drawing.Size(123, 31) - Me.ucrChkWind.TabIndex = 0 + Me.ucrBase.TabIndex = 64 + ' + 'ucrReceiverExtraRadiation + ' + Me.ucrReceiverExtraRadiation.AutoSize = True + Me.ucrReceiverExtraRadiation.frmParent = Me + Me.ucrReceiverExtraRadiation.Location = New System.Drawing.Point(319, 177) + Me.ucrReceiverExtraRadiation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverExtraRadiation.Name = "ucrReceiverExtraRadiation" + Me.ucrReceiverExtraRadiation.Selector = Nothing + Me.ucrReceiverExtraRadiation.Size = New System.Drawing.Size(123, 20) + Me.ucrReceiverExtraRadiation.strNcFilePath = "" + Me.ucrReceiverExtraRadiation.TabIndex = 40 + Me.ucrReceiverExtraRadiation.ucrSelector = Nothing + ' + 'ucrNudAlpha + ' + Me.ucrNudAlpha.AutoSize = True + Me.ucrNudAlpha.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudAlpha.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudAlpha.Location = New System.Drawing.Point(114, 294) + Me.ucrNudAlpha.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudAlpha.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudAlpha.Name = "ucrNudAlpha" + Me.ucrNudAlpha.Size = New System.Drawing.Size(50, 23) + Me.ucrNudAlpha.TabIndex = 71 + Me.ucrNudAlpha.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'cmdPTConstants + ' + Me.cmdPTConstants.Location = New System.Drawing.Point(171, 341) + Me.cmdPTConstants.Name = "cmdPTConstants" + Me.cmdPTConstants.Size = New System.Drawing.Size(123, 23) + Me.cmdPTConstants.TabIndex = 72 + Me.cmdPTConstants.Tag = "Options" + Me.cmdPTConstants.Text = "Constants" + Me.cmdPTConstants.UseVisualStyleBackColor = True ' 'dlgEvapotranspiration ' @@ -375,13 +480,17 @@ Partial Class dlgEvapotranspiration Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(453, 478) + Me.Controls.Add(Me.ucrNudAlpha) + Me.Controls.Add(Me.rdoPriestleyTaylor) + Me.Controls.Add(Me.cmdHSConstants) + Me.Controls.Add(Me.cmdLocation) + Me.Controls.Add(Me.cmdPMConstants) + Me.Controls.Add(Me.cmdHSMissingOptions) Me.Controls.Add(Me.ucrReceiverWindSpeed) Me.Controls.Add(Me.ucrChkWind) Me.Controls.Add(Me.cmdEvapOptions) Me.Controls.Add(Me.rdoHargreavesSamani) Me.Controls.Add(Me.rdoPenmanMonteith) - Me.Controls.Add(Me.ucrInputMissingMethod) - Me.Controls.Add(Me.lblMissingMethod) Me.Controls.Add(Me.lblSolar) Me.Controls.Add(Me.ucrInputSolar) Me.Controls.Add(Me.lblRadiation) @@ -404,6 +513,10 @@ Partial Class dlgEvapotranspiration Me.Controls.Add(Me.ucrReceiverTmax) Me.Controls.Add(Me.ucrSelectorEvapotranspiration) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.lblRA) + Me.Controls.Add(Me.ucrReceiverExtraRadiation) + Me.Controls.Add(Me.lblAlpha) + Me.Controls.Add(Me.cmdPTConstants) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -415,33 +528,41 @@ Partial Class dlgEvapotranspiration End Sub - Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrSelectorEvapotranspiration As ucrSelectorByDataFrameAddRemove - Friend WithEvents lblTmax As Label + Friend WithEvents cmdHSConstants As Button + Friend WithEvents cmdLocation As Button + Friend WithEvents cmdPMConstants As Button + Friend WithEvents cmdHSMissingOptions As Button + Friend WithEvents ucrReceiverWindSpeed As ucrReceiverSingle + Friend WithEvents ucrChkWind As ucrCheck + Friend WithEvents cmdEvapOptions As Button + Friend WithEvents rdoHargreavesSamani As RadioButton + Friend WithEvents rdoPenmanMonteith As RadioButton + Friend WithEvents lblSolar As Label + Friend WithEvents ucrInputSolar As ucrInputComboBox + Friend WithEvents lblRadiation As Label + Friend WithEvents ucrReceiverRadiation As ucrReceiverSingle + Friend WithEvents ucrInputCrop As ucrInputComboBox + Friend WithEvents ucrNewColName As ucrSave + Friend WithEvents lblDate As Label + Friend WithEvents ucrReceiverDate As ucrReceiverSingle + Friend WithEvents ucrPnlMethod As UcrPanel + Friend WithEvents lblCrop As Label + Friend WithEvents lblTimeStep As Label + Friend WithEvents ucrInputTimeStep As ucrInputComboBox Friend WithEvents lblHumidityMin As Label Friend WithEvents ucrReceiverHumidityMin As ucrReceiverSingle Friend WithEvents lblHumidityMax As Label Friend WithEvents ucrReceiverHumidityMax As ucrReceiverSingle Friend WithEvents lblTmin As Label Friend WithEvents ucrReceiverTmin As ucrReceiverSingle - Friend WithEvents lblCrop As Label - Friend WithEvents ucrInputCrop As ucrInputComboBox - Friend WithEvents lblTimeStep As Label - Friend WithEvents ucrInputTimeStep As ucrInputComboBox - Friend WithEvents ucrPnlMethod As UcrPanel - Friend WithEvents ucrReceiverDate As ucrReceiverSingle - Friend WithEvents lblDate As Label - Friend WithEvents ucrInputMissingMethod As ucrInputComboBox - Friend WithEvents lblMissingMethod As Label - Friend WithEvents ucrNewColName As ucrSave + Friend WithEvents lblTmax As Label Friend WithEvents ucrReceiverTmax As ucrReceiverSingle - Friend WithEvents ucrInputSolar As ucrInputComboBox - Friend WithEvents lblSolar As Label - Friend WithEvents ucrReceiverRadiation As ucrReceiverSingle - Friend WithEvents lblRadiation As Label - Friend WithEvents rdoHargreavesSamani As RadioButton - Friend WithEvents rdoPenmanMonteith As RadioButton - Friend WithEvents cmdEvapOptions As Button - Friend WithEvents ucrReceiverWindSpeed As ucrReceiverSingle - Friend WithEvents ucrChkWind As ucrCheck + Friend WithEvents ucrSelectorEvapotranspiration As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents rdoPriestleyTaylor As RadioButton + Friend WithEvents ucrReceiverExtraRadiation As ucrReceiverSingle + Friend WithEvents lblRA As Label + Friend WithEvents ucrNudAlpha As ucrNud + Friend WithEvents lblAlpha As Label + Friend WithEvents cmdPTConstants As Button End Class \ No newline at end of file diff --git a/instat/dlgEvapotranspiration.vb b/instat/dlgEvapotranspiration.vb index f6aacfe15fd..13e70ffc238 100644 --- a/instat/dlgEvapotranspiration.vb +++ b/instat/dlgEvapotranspiration.vb @@ -18,22 +18,25 @@ Imports instat.Translations Public Class dlgEvapotranspiration Private bFirstload As Boolean = True Private bReset As Boolean = True - Private bResetSubdialog As Boolean = False + Private bResetSubdialog As Boolean = True Private iBasicHeight As Integer Private iBaseMaxY As Integer Private iSaveMaxY As Integer - Private iEvapOptions As Integer - Private clsETPenmanMonteith, clsHargreavesSamani, clsDataFunctionPM, clsDataFunctionHS, clsDataFunction, clsReadInputs, clsVector, clsMissingDataVector, clsVarnamesVectorPM, clsVarnamesVectorHS, clsLibraryEvap As New RFunction - Private clsDayFunc, clsMonthFunc, clsYearFunc As New RFunction - Private clsBaseOperator, clsDailyOperatorHS As New ROperator - Private bRcodeSet As Boolean = True + Private iEvapOptions, iHSConstants, iLocation As Integer + Private iHSMissingOptions As Integer + Private clsETPenmanMonteithFunction, clsHargreavesSamaniFunction, clsListFunction, clsDataFunctionPMFunction, clsDataFunctionHSFunction, clsDataFunctionPTFunction, clsETPriestleyTaylorFunction, clsReadInputsFunction, clsVectorFunction, clsMissingDataVectorFunction, clsVarnamesVectorPTFunction, clsVarnamesVectorPMFunction, clsVarnamesVectorHSFunction, clsLibraryEvapFunction As New RFunction + Private clsDayFuncFunction, clsMonthFuncFunction, clsYearFuncFunction As New RFunction + Private clsBaseOperator As New ROperator - Private Sub dlgdlgEvapotranspiration_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Private Sub dlgEvapotranspiration_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstload Then iBasicHeight = Me.Height iBaseMaxY = ucrBase.Location.Y iSaveMaxY = ucrNewColName.Location.Y iEvapOptions = cmdEvapOptions.Location.Y + iHSMissingOptions = cmdHSMissingOptions.Location.Y + iHSConstants = cmdHSConstants.Location.Y + iLocation = cmdLocation.Location.Y InitialiseDialog() bFirstload = False End If @@ -49,16 +52,15 @@ Public Class dlgEvapotranspiration Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 565 - ucrBase.clsRsyntax.iCallType = 2 Dim dctInputCrops As New Dictionary(Of String, String) Dim dctInputTimeStep As New Dictionary(Of String, String) Dim dctInputSolar As New Dictionary(Of String, String) - Dim dctInputMissingMethod As New Dictionary(Of String, String) ucrReceiverDate.Selector = ucrSelectorEvapotranspiration ucrReceiverTmax.Selector = ucrSelectorEvapotranspiration ucrReceiverTmin.Selector = ucrSelectorEvapotranspiration + ucrReceiverExtraRadiation.Selector = ucrSelectorEvapotranspiration ucrReceiverHumidityMax.Selector = ucrSelectorEvapotranspiration ucrReceiverHumidityMin.Selector = ucrSelectorEvapotranspiration ucrReceiverRadiation.Selector = ucrSelectorEvapotranspiration @@ -74,11 +76,18 @@ Public Class dlgEvapotranspiration ucrReceiverTmax.SetClimaticType("temp_max") ucrReceiverTmax.bAutoFill = True + ucrReceiverRadiation.SetParameter(New RParameter("radiation", 1)) + ucrReceiverRadiation.SetParameterIsRFunction() + ucrReceiverTmin.SetParameter(New RParameter("Tmin", 3)) ucrReceiverTmin.SetParameterIsRFunction() ucrReceiverTmin.SetClimaticType("temp_min") ucrReceiverTmin.bAutoFill = True + ucrReceiverExtraRadiation.SetParameter(New RParameter("R_a", 4)) + ucrReceiverExtraRadiation.SetParameterIsRFunction() + ucrReceiverExtraRadiation.SetClimaticType("R_a") + ucrReceiverHumidityMax.SetParameter(New RParameter("RHmax", 4)) ucrReceiverHumidityMax.SetParameterIsRFunction() ucrReceiverHumidityMax.SetClimaticType("hum_max") @@ -102,10 +111,9 @@ Public Class dlgEvapotranspiration ucrInputTimeStep.SetDropDownStyleAsNonEditable() ucrInputSolar.SetParameter(New RParameter("solar", 3)) - ucrInputSolar.SetRDefault(Chr(34) & "sunshine hours" & Chr(34)) dctInputSolar.Add("sunshine hours", Chr(34) & "sunshine hours" & Chr(34)) dctInputSolar.Add("cloud", Chr(34) & "cloud" & Chr(34)) - dctInputSolar.Add("radiation", Chr(34) & "radiation" & Chr(34)) + dctInputSolar.Add("radiation", Chr(34) & "data" & Chr(34)) ucrInputSolar.SetItems(dctInputSolar) ucrInputSolar.SetDropDownStyleAsNonEditable() @@ -121,37 +129,36 @@ Public Class dlgEvapotranspiration ucrChkWind.SetValuesCheckedAndUnchecked(Chr(34) & "yes" & Chr(34), Chr(34) & "no" & Chr(34)) ucrChkWind.SetRDefault(Chr(34) & "yes" & Chr(34)) - ' Missing Options - ucrInputMissingMethod.SetParameter(New RParameter("missing_method", 8)) - dctInputMissingMethod.Add("monthly average", Chr(34) & "monthly average" & Chr(34)) - dctInputMissingMethod.Add("seasonal average", Chr(34) & "seasonal average" & Chr(34)) - dctInputMissingMethod.Add("DoY average", Chr(34) & "DoY average" & Chr(34)) - dctInputMissingMethod.Add("neighbouring average", Chr(34) & "neighbouring average" & Chr(34)) - ucrInputMissingMethod.SetItems(dctInputMissingMethod) - ucrInputMissingMethod.SetDropDownStyleAsNonEditable() + ucrNudAlpha.SetParameter(New RParameter("alpha", 4)) + ucrNudAlpha.SetMinMax(0, 1) + ucrNudAlpha.DecimalPlaces = 2 + ucrNudAlpha.Increment = 0.05 + ucrNudAlpha.SetLinkedDisplayControl(lblAlpha) 'panel setting ucrPnlMethod.AddRadioButton(rdoPenmanMonteith) ucrPnlMethod.AddRadioButton(rdoHargreavesSamani) + ucrPnlMethod.AddRadioButton(rdoPriestleyTaylor) ucrPnlMethod.AddParameterValueFunctionNamesCondition(rdoPenmanMonteith, "ET.PenmanMonteith", "ET.PenmanMonteith") ucrPnlMethod.AddParameterValueFunctionNamesCondition(rdoHargreavesSamani, "ET.HargreavesSamani", "ET.HargreavesSamani") + ucrPnlMethod.AddParameterValueFunctionNamesCondition(rdoPriestleyTaylor, "ET.PriestleyTaylor", "ET.PriestleyTaylor") ucrPnlMethod.AddToLinkedControls(ucrInputCrop, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlMethod.AddToLinkedControls(ucrReceiverHumidityMax, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) - ucrPnlMethod.AddToLinkedControls(ucrReceiverHumidityMin, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) - ucrPnlMethod.AddToLinkedControls(ucrInputTimeStep, {rdoPenmanMonteith, rdoHargreavesSamani}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlMethod.AddToLinkedControls({ucrReceiverHumidityMax, ucrReceiverHumidityMin}, {rdoPenmanMonteith, rdoPriestleyTaylor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) + ucrPnlMethod.AddToLinkedControls(ucrInputTimeStep, {rdoPenmanMonteith, rdoHargreavesSamani, rdoPriestleyTaylor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkWind.AddToLinkedControls(ucrReceiverWindSpeed, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlMethod.AddToLinkedControls(ucrReceiverRadiation, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlMethod.AddToLinkedControls(ucrReceiverRadiation, {rdoPenmanMonteith, rdoPriestleyTaylor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlMethod.AddToLinkedControls(ucrChkWind, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlMethod.AddToLinkedControls(ucrInputSolar, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlMethod.AddToLinkedControls(ucrInputMissingMethod, {rdoPenmanMonteith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="monthly average") + ucrPnlMethod.AddToLinkedControls(ucrInputSolar, {rdoPenmanMonteith, rdoPriestleyTaylor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlMethod.AddToLinkedControls(ucrReceiverExtraRadiation, {rdoHargreavesSamani}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlMethod.AddToLinkedControls(ucrNudAlpha, {rdoPriestleyTaylor}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="0.23") + ucrReceiverExtraRadiation.SetLinkedDisplayControl(lblRa) ucrReceiverRadiation.SetLinkedDisplayControl(lblRadiation) ucrReceiverHumidityMax.SetLinkedDisplayControl(lblHumidityMax) ucrReceiverHumidityMin.SetLinkedDisplayControl(lblHumidityMin) ucrInputTimeStep.SetLinkedDisplayControl(lblTimeStep) ucrInputSolar.SetLinkedDisplayControl(lblSolar) - ucrInputMissingMethod.SetLinkedDisplayControl(lblMissingMethod) ucrInputCrop.SetLinkedDisplayControl(lblCrop) 'ucrSave Column @@ -163,132 +170,169 @@ Public Class dlgEvapotranspiration End Sub Private Sub SetDefaults() - clsETPenmanMonteith = New RFunction - clsHargreavesSamani = New RFunction - clsDataFunctionPM = New RFunction - clsDataFunctionHS = New RFunction + clsETPenmanMonteithFunction = New RFunction + clsHargreavesSamaniFunction = New RFunction + clsDataFunctionPMFunction = New RFunction + clsDataFunctionHSFunction = New RFunction + clsDataFunctionPTFunction = New RFunction + clsETPriestleyTaylorFunction = New RFunction clsBaseOperator = New ROperator - clsDailyOperatorHS = New ROperator - clsReadInputs = New RFunction - clsDayFunc = New RFunction - clsMonthFunc = New RFunction - clsYearFunc = New RFunction - clsLibraryEvap = New RFunction + clsReadInputsFunction = New RFunction + clsDayFuncFunction = New RFunction + clsMonthFuncFunction = New RFunction + clsYearFuncFunction = New RFunction + clsLibraryEvapFunction = New RFunction + clsListFunction = New RFunction ucrSelectorEvapotranspiration.Reset() ucrReceiverHumidityMax.SetMeAsReceiver() ucrNewColName.Reset() - clsLibraryEvap.SetRCommand("library") - clsLibraryEvap.AddParameter("Evapotranspiration", "Evapotranspiration", bIncludeArgumentName:=False) - ucrBase.clsRsyntax.AddToBeforeCodes(clsLibraryEvap, iPosition:=0) - - clsDataFunctionPM.SetRCommand("data.frame") - clsDataFunctionPM.AddParameter("Year", clsRFunctionParameter:=clsYearFunc) - clsDataFunctionPM.AddParameter("Month", clsRFunctionParameter:=clsMonthFunc) - clsDataFunctionPM.AddParameter("Day", clsRFunctionParameter:=clsDayFunc) - - clsDataFunctionHS.SetRCommand("data.frame") - clsDataFunctionHS.AddParameter("Year", clsRFunctionParameter:=clsYearFunc) - clsDataFunctionHS.AddParameter("Month", clsRFunctionParameter:=clsMonthFunc) - clsDataFunctionHS.AddParameter("Day", clsRFunctionParameter:=clsDayFunc) - - clsDayFunc.SetRCommand("day") - clsDayFunc.SetPackageName("lubridate") - - clsMonthFunc.SetRCommand("month") - clsMonthFunc.SetPackageName("lubridate") - - clsYearFunc.SetRCommand("year") - clsYearFunc.SetPackageName("lubridate") - - clsDataFunction.SetRCommand("data") - clsDataFunction.AddParameter("constants", Chr(34) & "constants" & Chr(34), bIncludeArgumentName:=False) - ucrBase.clsRsyntax.AddToBeforeCodes(clsDataFunction, iPosition:=1) - - clsReadInputs.SetPackageName("Evapotranspiration") - clsReadInputs.SetRCommand("ReadInputs") - clsReadInputs.AddParameter("constants", "constants", iPosition:=2, bIncludeArgumentName:=False) - clsReadInputs.AddParameter("stopmissing", clsRFunctionParameter:=clsMissingDataVector, iPosition:=3) - clsReadInputs.AddParameter("timestep", Chr(34) & "daily" & Chr(34), iPosition:=4) - clsReadInputs.AddParameter("interp_missing_days", "FALSE", iPosition:=5) - clsReadInputs.AddParameter("interp_missing_entries", "FALSE", iPosition:=6) - clsReadInputs.AddParameter("interp_abnormal", "FALSE", iPosition:=7) - clsReadInputs.AddParameter("abnormal_method", "NULL", iPosition:=9) - clsReadInputs.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPM, iPosition:=0) - clsReadInputs.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPM, iPosition:=1) - clsReadInputs.SetAssignTo("temp_data") - - clsVarnamesVectorPM.SetRCommand("c") - clsVarnamesVectorPM.AddParameter("Tmax", Chr(34) & "Tmax" & Chr(34), bIncludeArgumentName:=False) - clsVarnamesVectorPM.AddParameter("Tmin", Chr(34) & "Tmin" & Chr(34), bIncludeArgumentName:=False) - clsVarnamesVectorPM.AddParameter("RHmax", Chr(34) & "RHmax" & Chr(34), bIncludeArgumentName:=False) - clsVarnamesVectorPM.AddParameter("RHmin", Chr(34) & "RHmin" & Chr(34), bIncludeArgumentName:=False) - - - clsVarnamesVectorHS.SetRCommand("c") - clsVarnamesVectorHS.AddParameter("Tmax", Chr(34) & "Tmax" & Chr(34), bIncludeArgumentName:=False) - clsVarnamesVectorHS.AddParameter("Tmin", Chr(34) & "Tmin" & Chr(34), bIncludeArgumentName:=False) - - clsMissingDataVector.SetRCommand("c") - clsMissingDataVector.AddParameter("x", 1, bIncludeArgumentName:=False) - clsMissingDataVector.AddParameter("y", 1, bIncludeArgumentName:=False) - clsMissingDataVector.AddParameter("z", 1, bIncludeArgumentName:=False) - - clsVector.SetRCommand("c") - - clsETPenmanMonteith.SetPackageName("Evapotranspiration") - clsETPenmanMonteith.SetRCommand("ET.PenmanMonteith") - clsETPenmanMonteith.AddParameter("data", clsRFunctionParameter:=clsReadInputs, iPosition:=0) - clsETPenmanMonteith.AddParameter("constants", "constants", iPosition:=1, bIncludeArgumentName:=False) - clsETPenmanMonteith.AddParameter("ts", Chr(34) & "daily" & Chr(34), iPosition:=2) - clsETPenmanMonteith.AddParameter("message", Chr(34) & "yes" & Chr(34), iPosition:=3) - clsETPenmanMonteith.AddParameter("crops", Chr(34) & "short" & Chr(34), iPosition:=4) - clsETPenmanMonteith.AddParameter("save.csv", Chr(34) & "no" & Chr(34), iPosition:=5) - clsETPenmanMonteith.SetAssignTo("Penman_Monteith") - - clsHargreavesSamani.SetPackageName("Evapotranspiration") - clsHargreavesSamani.SetRCommand("ET.HargreavesSamani") - clsHargreavesSamani.AddParameter("data", clsRFunctionParameter:=clsReadInputs, iPosition:=0) - clsHargreavesSamani.AddParameter("constants", "constants", iPosition:=1, bIncludeArgumentName:=False) - clsHargreavesSamani.AddParameter("ts", Chr(34) & "daily" & Chr(34), iPosition:=2) - clsHargreavesSamani.AddParameter("message", Chr(34) & "yes" & Chr(34), iPosition:=3) - clsHargreavesSamani.AddParameter("save.csv", Chr(34) & "no" & Chr(34), iPosition:=4) - clsHargreavesSamani.SetAssignTo("Hargreaves_Samani") + bResetSubdialog = True + + clsDataFunctionPMFunction.SetRCommand("data.frame") + clsDataFunctionPMFunction.AddParameter("Year", clsRFunctionParameter:=clsYearFuncFunction) + clsDataFunctionPMFunction.AddParameter("Month", clsRFunctionParameter:=clsMonthFuncFunction) + clsDataFunctionPMFunction.AddParameter("Day", clsRFunctionParameter:=clsDayFuncFunction) + + clsDataFunctionHSFunction.SetRCommand("data.frame") + clsDataFunctionHSFunction.AddParameter("Year", clsRFunctionParameter:=clsYearFuncFunction) + clsDataFunctionHSFunction.AddParameter("Month", clsRFunctionParameter:=clsMonthFuncFunction) + clsDataFunctionHSFunction.AddParameter("Day", clsRFunctionParameter:=clsDayFuncFunction) + + clsDataFunctionPTFunction.SetRCommand("data.frame") + clsDataFunctionPTFunction.AddParameter("Year", clsRFunctionParameter:=clsYearFuncFunction) + clsDataFunctionPTFunction.AddParameter("Month", clsRFunctionParameter:=clsMonthFuncFunction) + clsDataFunctionPTFunction.AddParameter("Day", clsRFunctionParameter:=clsDayFuncFunction) + + clsDayFuncFunction.SetPackageName("lubridate") + clsDayFuncFunction.SetRCommand("day") + + clsMonthFuncFunction.SetPackageName("lubridate") + clsMonthFuncFunction.SetRCommand("month") + + clsYearFuncFunction.SetRCommand("year") + clsYearFuncFunction.SetPackageName("lubridate") + + clsReadInputsFunction.SetPackageName("Evapotranspiration") + clsReadInputsFunction.SetRCommand("ReadInputs") + clsReadInputsFunction.AddParameter("constants", "constants", iPosition:=2) + clsReadInputsFunction.AddParameter("stopmissing", clsRFunctionParameter:=clsMissingDataVectorFunction, iPosition:=3) + clsReadInputsFunction.AddParameter("timestep", Chr(34) & "daily" & Chr(34), iPosition:=4) + clsReadInputsFunction.AddParameter("interp_missing_days", "FALSE", iPosition:=5) + clsReadInputsFunction.AddParameter("interp_missing_entries", "FALSE", iPosition:=6) + clsReadInputsFunction.AddParameter("interp_abnormal", "FALSE", iPosition:=7) + clsReadInputsFunction.AddParameter("abnormal_method", "NULL", iPosition:=9) + clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPMFunction, iPosition:=0) + clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPMFunction, iPosition:=1) + clsReadInputsFunction.AddParameter("missing_method", Chr(34) & "monthly average" & Chr(34), iPosition:=8) + clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPTFunction, iPosition:=10) + clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPTFunction, iPosition:=11) + clsReadInputsFunction.SetAssignTo("temp_data") + + clsVarnamesVectorPTFunction.SetRCommand("c") + clsVarnamesVectorPTFunction.AddParameter("Tmax", Chr(34) & "Tmax" & Chr(34), iPosition:=0) + clsVarnamesVectorPTFunction.AddParameter("Tmin", Chr(34) & "Tmin" & Chr(34), iPosition:=1) + clsVarnamesVectorPTFunction.AddParameter("RHmax", Chr(34) & "RHmax" & Chr(34), iPosition:=2) + clsVarnamesVectorPTFunction.AddParameter("RHmin", Chr(34) & "RHmin" & Chr(34), iPosition:=3) + + clsVarnamesVectorPMFunction.SetRCommand("c") + clsVarnamesVectorPMFunction.AddParameter("Tmax", Chr(34) & "Tmax" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorPMFunction.AddParameter("Tmin", Chr(34) & "Tmin" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorPMFunction.AddParameter("RHmax", Chr(34) & "RHmax" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorPMFunction.AddParameter("RHmin", Chr(34) & "RHmin" & Chr(34), bIncludeArgumentName:=False) + + clsVarnamesVectorHSFunction.SetRCommand("c") + clsVarnamesVectorHSFunction.AddParameter("Tmax", Chr(34) & "Tmax" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorHSFunction.AddParameter("Tmin", Chr(34) & "Tmin" & Chr(34), bIncludeArgumentName:=False) + + clsMissingDataVectorFunction.SetRCommand("c") + clsMissingDataVectorFunction.AddParameter("x", 1, bIncludeArgumentName:=False) + clsMissingDataVectorFunction.AddParameter("y", 1, bIncludeArgumentName:=False) + clsMissingDataVectorFunction.AddParameter("z", 1, bIncludeArgumentName:=False) + + clsVectorFunction.SetRCommand("c") + + clsListFunction.ClearParameters() + clsListFunction.SetRCommand("list") + clsListFunction.SetAssignTo("constants") + + clsETPenmanMonteithFunction.SetPackageName("Evapotranspiration") + clsETPenmanMonteithFunction.SetRCommand("ET.PenmanMonteith") + clsETPenmanMonteithFunction.AddParameter("data", clsRFunctionParameter:=clsReadInputsFunction, iPosition:=0) + clsETPenmanMonteithFunction.AddParameter("constants", "constants", iPosition:=1) + clsETPenmanMonteithFunction.AddParameter("ts", Chr(34) & "daily" & Chr(34), iPosition:=2) + clsETPenmanMonteithFunction.AddParameter("solar", Chr(34) & "sunshine hours" & Chr(34), iPosition:=3) + clsETPenmanMonteithFunction.AddParameter("message", Chr(34) & "yes" & Chr(34), iPosition:=4) + clsETPenmanMonteithFunction.AddParameter("crops", Chr(34) & "short" & Chr(34), iPosition:=5) + clsETPenmanMonteithFunction.AddParameter("save.csv", Chr(34) & "no" & Chr(34), iPosition:=6) + clsETPenmanMonteithFunction.SetAssignTo("Penman_Monteith") + + clsHargreavesSamaniFunction.SetPackageName("Evapotranspiration") + clsHargreavesSamaniFunction.SetRCommand("ET.HargreavesSamani") + clsHargreavesSamaniFunction.AddParameter("data", clsRFunctionParameter:=clsReadInputsFunction, iPosition:=0) + clsHargreavesSamaniFunction.AddParameter("constants", "constants", iPosition:=1) + clsHargreavesSamaniFunction.AddParameter("ts", Chr(34) & "daily" & Chr(34), iPosition:=2) + clsHargreavesSamaniFunction.AddParameter("message", Chr(34) & "yes" & Chr(34), iPosition:=3) + clsHargreavesSamaniFunction.AddParameter("save.csv", Chr(34) & "no" & Chr(34), iPosition:=4) + clsHargreavesSamaniFunction.SetAssignTo("Hargreaves_Samani") + + clsETPriestleyTaylorFunction.SetPackageName("Evapotranspiration") + clsETPriestleyTaylorFunction.SetRCommand("ET.PriestleyTaylor") + clsETPriestleyTaylorFunction.AddParameter("data", clsRFunctionParameter:=clsReadInputsFunction, iPosition:=0) + clsETPriestleyTaylorFunction.AddParameter("constants", "constants", iPosition:=1, bIncludeArgumentName:=False) + clsETPriestleyTaylorFunction.AddParameter("ts", Chr(34) & "daily" & Chr(34), iPosition:=2) + clsETPriestleyTaylorFunction.AddParameter("message", Chr(34) & "yes" & Chr(34), iPosition:=3) + clsETPriestleyTaylorFunction.AddParameter("alpha", 0.23, iPosition:=4) + clsETPriestleyTaylorFunction.AddParameter("save.csv", Chr(34) & "no" & Chr(34), iPosition:=5) + clsETPriestleyTaylorFunction.SetAssignTo("Priestley_Taylor") clsBaseOperator.SetOperation("$") - clsBaseOperator.AddParameter("ET.PenmanMonteith", clsRFunctionParameter:=clsETPenmanMonteith, iPosition:=0) + clsBaseOperator.bSpaceAroundOperation = False + clsBaseOperator.AddParameter("ET.PenmanMonteith", clsRFunctionParameter:=clsETPenmanMonteithFunction, iPosition:=0) clsBaseOperator.AddParameter("ET.Daily", strParameterValue:="ET.Daily", iPosition:=1) - ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrNewColName.GetText, strTempDataframe:=ucrSelectorEvapotranspiration.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColName.GetText) + ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator) + ucrBase.clsRsyntax.AddToBeforeCodes(clsListFunction, iPosition:=1) End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrReceiverDate.AddAdditionalCodeParameterPair(clsMonthFunc, New RParameter("x", 0), iAdditionalPairNo:=1) - ucrReceiverDate.AddAdditionalCodeParameterPair(clsYearFunc, New RParameter("x", 0), iAdditionalPairNo:=2) - ucrReceiverTmax.AddAdditionalCodeParameterPair(clsDataFunctionHS, New RParameter("Tmax", 3), iAdditionalPairNo:=1) - ucrReceiverTmin.AddAdditionalCodeParameterPair(clsDataFunctionHS, New RParameter("Tmin", 4), iAdditionalPairNo:=1) - ucrInputTimeStep.AddAdditionalCodeParameterPair(clsHargreavesSamani, New RParameter("ts", 2), iAdditionalPairNo:=1) - - ucrPnlMethod.SetRCode(clsBaseOperator, bReset) - ucrReceiverDate.SetRCode(clsDayFunc, bReset) - ucrReceiverTmax.SetRCode(clsDataFunctionPM, bReset) - ucrReceiverTmin.SetRCode(clsDataFunctionPM, bReset) - ucrReceiverHumidityMax.SetRCode(clsDataFunctionPM, bReset) - ucrReceiverHumidityMin.SetRCode(clsDataFunctionPM, bReset) - ucrReceiverWindSpeed.SetRCode(clsDataFunctionPM, bReset) - ucrInputTimeStep.SetRCode(clsETPenmanMonteith, bReset) - ucrInputSolar.SetRCode(clsETPenmanMonteith, bReset) - ucrInputCrop.SetRCode(clsETPenmanMonteith, bReset) - ucrChkWind.SetRCode(clsETPenmanMonteith, bReset) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsMonthFuncFunction, New RParameter("x", 0), iAdditionalPairNo:=1) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsYearFuncFunction, New RParameter("x", 0), iAdditionalPairNo:=2) + ucrReceiverTmax.AddAdditionalCodeParameterPair(clsDataFunctionHSFunction, New RParameter("Tmax", 3), iAdditionalPairNo:=1) + ucrReceiverTmin.AddAdditionalCodeParameterPair(clsDataFunctionHSFunction, New RParameter("Tmin", 4), iAdditionalPairNo:=1) + ucrReceiverExtraRadiation.AddAdditionalCodeParameterPair(clsDataFunctionHSFunction, New RParameter("R_a", 6), iAdditionalPairNo:=1) + ucrReceiverTmax.AddAdditionalCodeParameterPair(clsDataFunctionPTFunction, New RParameter("Tmax", 3), iAdditionalPairNo:=2) + ucrReceiverTmin.AddAdditionalCodeParameterPair(clsDataFunctionPTFunction, New RParameter("Tmin", 4), iAdditionalPairNo:=2) + ucrInputTimeStep.AddAdditionalCodeParameterPair(clsHargreavesSamaniFunction, New RParameter("ts", 2), iAdditionalPairNo:=1) + ucrInputTimeStep.AddAdditionalCodeParameterPair(clsETPriestleyTaylorFunction, New RParameter("ts", 2), iAdditionalPairNo:=2) + ucrInputSolar.AddAdditionalCodeParameterPair(clsETPriestleyTaylorFunction, New RParameter("solar", 3), iAdditionalPairNo:=1) + ucrReceiverHumidityMax.AddAdditionalCodeParameterPair(clsDataFunctionPTFunction, New RParameter("RHmax", 4), iAdditionalPairNo:=1) + ucrReceiverHumidityMin.AddAdditionalCodeParameterPair(clsDataFunctionPTFunction, New RParameter("RHmin", 5), iAdditionalPairNo:=1) + + ucrReceiverDate.SetRCode(clsDayFuncFunction, bReset) + ucrReceiverTmax.SetRCode(clsDataFunctionPMFunction, bReset) + ucrReceiverTmin.SetRCode(clsDataFunctionPMFunction, bReset) + ucrReceiverHumidityMax.SetRCode(clsDataFunctionPMFunction, bReset) + ucrReceiverHumidityMin.SetRCode(clsDataFunctionPMFunction, bReset) + ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset) + ucrInputTimeStep.SetRCode(clsETPenmanMonteithFunction, bReset) + ucrInputCrop.SetRCode(clsETPenmanMonteithFunction, bReset) + ucrChkWind.SetRCode(clsETPenmanMonteithFunction, bReset) ucrNewColName.SetRCode(clsBaseOperator, bReset) - ucrInputMissingMethod.SetRCode(clsReadInputs, bReset) + ucrPnlMethod.SetRCode(clsBaseOperator, bReset) + ucrNudAlpha.SetRCode(clsETPriestleyTaylorFunction, bReset) + If bReset Then + ucrInputSolar.SetRCode(clsETPenmanMonteithFunction, bReset) + End If End Sub Private Sub TestOKEnabled() If rdoPenmanMonteith.Checked Then - If ucrNewColName.IsComplete AndAlso Not ucrReceiverDate.IsEmpty() AndAlso Not ucrReceiverTmax.IsEmpty() AndAlso Not ucrReceiverTmin.IsEmpty() AndAlso Not ucrReceiverHumidityMax.IsEmpty() AndAlso Not ucrReceiverHumidityMin.IsEmpty() AndAlso Not ucrReceiverRadiation.IsEmpty() AndAlso Not ucrInputTimeStep.IsEmpty Then + If ucrNewColName.IsComplete AndAlso Not ucrReceiverDate.IsEmpty() AndAlso Not ucrReceiverTmax.IsEmpty() AndAlso Not ucrReceiverTmin.IsEmpty() AndAlso + Not ucrReceiverHumidityMax.IsEmpty() AndAlso Not ucrReceiverHumidityMin.IsEmpty() AndAlso + Not ucrReceiverRadiation.IsEmpty() AndAlso Not ucrInputTimeStep.IsEmpty Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -302,6 +346,14 @@ Public Class dlgEvapotranspiration Else ucrBase.OKEnabled(False) End If + ElseIf rdoPriestleyTaylor.Checked Then + If ucrNewColName.IsComplete AndAlso Not ucrReceiverDate.IsEmpty() AndAlso Not ucrReceiverTmax.IsEmpty() AndAlso Not ucrReceiverTmin.IsEmpty() AndAlso + Not ucrReceiverHumidityMax.IsEmpty() AndAlso Not ucrReceiverHumidityMin.IsEmpty() AndAlso Not ucrReceiverRadiation.IsEmpty() AndAlso + Not ucrInputTimeStep.IsEmpty AndAlso Not ucrInputTimeStep.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End If End Sub @@ -312,91 +364,252 @@ Public Class dlgEvapotranspiration End Sub Private Sub cmdEvapOptions_Click(sender As Object, e As EventArgs) Handles cmdEvapOptions.Click - sdgMissingOptionsEvapotranspiration.SetRFunction(clsReadInputs, clsMissingDataVector, bResetSubdialog) + sdgMissingOptionsEvapotranspiration.SetRFunction(clsReadInputsFunction, clsMissingDataVectorFunction, bResetSubdialog) bResetSubdialog = False sdgMissingOptionsEvapotranspiration.ShowDialog() End Sub + Private Sub cmdHSMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdHSMissingOptions.Click + sdgHSMissingOptions.SetRFunction(clsReadInputsFunction, clsMissingDataVectorFunction, bResetSubdialog) + bResetSubdialog = False + sdgHSMissingOptions.ShowDialog() + End Sub + + Private Sub cmdPMConstants_Click(sender As Object, e As EventArgs) Handles cmdPMConstants.Click + sdgPMConstants.SetRFunction(clsNewListFunction:=clsListFunction, bReset:=bResetSubdialog) + sdgPMConstants.ShowDialog() + bResetSubdialog = False + TestOKEnabled() + End Sub + + Private Sub cmdHSConstants_Click(sender As Object, e As EventArgs) Handles cmdHSConstants.Click + sdgHSConstants.SetRFunction(clsNewListFunction:=clsListFunction, bReset:=bResetSubdialog) + sdgHSConstants.ShowDialog() + bResetSubdialog = False + TestOKEnabled() + End Sub + + Private Sub cmdPTConstants_Click(sender As Object, e As EventArgs) Handles cmdPTConstants.Click + sdgPTConstants.SetRFunction(clsNewListFunction:=clsListFunction, bReset:=bResetSubdialog) + sdgPTConstants.ShowDialog() + bResetSubdialog = False + TestOKEnabled() + End Sub + + Private Sub cmdLocation_Click(sender As Object, e As EventArgs) Handles cmdLocation.Click + sdgLocation.SetRFunction(clsNewVarnamesVectorHSFunction:=clsVarnamesVectorHSFunction, clsNewVarnamesVectorPMFunction:=clsVarnamesVectorPMFunction, clsNewVarnamesVectorPTFunction:=clsVarnamesVectorPTFunction, clsNewListFunction:=clsListFunction, bReset:=bResetSubdialog) + sdgLocation.ShowDialog() + bResetSubdialog = False + TestOKEnabled() + End Sub + Private Sub DialogSize() If rdoPenmanMonteith.Checked Then Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY) ucrNewColName.Location = New Point(ucrNewColName.Location.X, iSaveMaxY) cmdEvapOptions.Location = New Point(cmdEvapOptions.Location.X, iEvapOptions) + cmdLocation.Location = New Point(cmdLocation.Location.X, iLocation) ElseIf rdoHargreavesSamani.Checked Then ucrReceiverDate.SetMeAsReceiver() Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight * 0.9) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY / 1.15) ucrNewColName.Location = New Point(ucrNewColName.Location.X, iSaveMaxY / 1.183) - cmdEvapOptions.Location = New Point(cmdEvapOptions.Location.X, iEvapOptions / 1.187) + cmdHSMissingOptions.Location = New Point(cmdHSMissingOptions.Location.X, iHSMissingOptions / 1.187) + cmdHSConstants.Location = New Point(cmdHSConstants.Location.X, iHSConstants / 1.187) + cmdLocation.Location = New Point(cmdLocation.Location.X, iLocation / 1.187) + ElseIf rdoPriestleyTaylor.Checked Then + Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY / 1.01) + ucrNewColName.Location = New Point(ucrNewColName.Location.X, iSaveMaxY / 1.01) + cmdHSMissingOptions.Location = New Point(cmdHSMissingOptions.Location.X, iHSMissingOptions / 1.005) + cmdHSConstants.Location = New Point(cmdHSConstants.Location.X, iHSConstants / 1.005) + cmdLocation.Location = New Point(cmdLocation.Location.X, iLocation / 1.005) End If End Sub Private Sub Method() If rdoPenmanMonteith.Checked Then - clsReadInputs.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPM, iPosition:=0) - clsReadInputs.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPM, iPosition:=1) + clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPMFunction, iPosition:=0) + clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPMFunction, iPosition:=1) ElseIf rdoHargreavesSamani.Checked Then - clsReadInputs.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorHS, iPosition:=0) - clsReadInputs.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionHS, iPosition:=1) + clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorHSFunction, iPosition:=0) + clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionHSFunction, iPosition:=1) + ElseIf rdoPriestleyTaylor.Checked Then + clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPTFunction, iPosition:=0) + clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPTFunction, iPosition:=1) End If End Sub Private Sub ucrPnlMethod_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlValueChanged Method() + Solar() + Constants() DialogSize() + EnableDesableSubDialog() If rdoPenmanMonteith.Checked Then - clsBaseOperator.AddParameter("ET.PenmanMonteith", clsRFunctionParameter:=clsETPenmanMonteith, iPosition:=0) + clsBaseOperator.AddParameter("ET.PenmanMonteith", clsRFunctionParameter:=clsETPenmanMonteithFunction, iPosition:=0) Else clsBaseOperator.RemoveParameterByName("ET.PenmanMonteith") End If If rdoHargreavesSamani.Checked Then - clsBaseOperator.AddParameter("ET.HargreavesSamani", clsRFunctionParameter:=clsHargreavesSamani, iPosition:=0) + clsBaseOperator.AddParameter("ET.HargreavesSamani", clsRFunctionParameter:=clsHargreavesSamaniFunction, iPosition:=0) Else clsBaseOperator.RemoveParameterByName("ET.HargreavesSamani") End If + If rdoPriestleyTaylor.Checked Then + clsBaseOperator.AddParameter("ET.PriestleyTaylor", clsRFunctionParameter:=clsETPriestleyTaylorFunction, iPosition:=0) + Else + clsBaseOperator.RemoveParameterByName("ET.PriestleyTaylor") + End If + End Sub + + Private Sub EnableDesableSubDialog() + If rdoPenmanMonteith.Checked Then + cmdEvapOptions.Visible = True + cmdPMConstants.Visible = True + cmdHSMissingOptions.Visible = False + cmdHSConstants.Visible = False + cmdPTConstants.Visible = False + ElseIf rdoHargreavesSamani.Checked Then + cmdEvapOptions.Visible = False + cmdPMConstants.Visible = False + cmdPTConstants.Visible = False + cmdHSMissingOptions.Visible = True + cmdHSConstants.Visible = True + Else + cmdEvapOptions.Visible = False + cmdPMConstants.Visible = False + cmdHSMissingOptions.Visible = True + cmdPTConstants.Visible = True + cmdHSConstants.Visible = False + End If End Sub Private Sub ucrReceiverWindSpeed_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWindSpeed.ControlValueChanged, ucrChkWind.ControlValueChanged If ucrChkWind.Checked AndAlso Not ucrReceiverWindSpeed.IsEmpty Then - clsVarnamesVectorPM.AddParameter("u2", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False) + clsVarnamesVectorPMFunction.AddParameter("u2", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False) Else - clsVarnamesVectorPM.RemoveParameterByName("u2") + clsVarnamesVectorPMFunction.RemoveParameterByName("u2") ucrReceiverHumidityMax.SetMeAsReceiver() End If End Sub - Private Sub ucrInputSolar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSolar.ControlValueChanged, ucrReceiverRadiation.ControlValueChanged - Select Case ucrInputSolar.GetText - Case "sunshine hours" - ucrReceiverRadiation.SetClimaticType("sunshine_hours") - ucrReceiverRadiation.bAutoFill = True - clsVarnamesVectorPM.AddParameter("n", Chr(34) & "n" & Chr(34), bIncludeArgumentName:=False) - clsDataFunctionPM.AddParameter("n", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) - clsVarnamesVectorPM.RemoveParameterByName("Rs") - clsVarnamesVectorPM.RemoveParameterByName("Cd") - clsDataFunctionPM.RemoveParameterByName("Rs") - clsDataFunctionPM.RemoveParameterByName("cd") - Case "radiation" - ucrReceiverRadiation.SetClimaticType("radiation") - ucrReceiverRadiation.bAutoFill = True - clsVarnamesVectorPM.AddParameter("Rs", Chr(34) & "Rs" & Chr(34), bIncludeArgumentName:=False) - clsDataFunctionPM.AddParameter("Rs", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) - clsVarnamesVectorPM.RemoveParameterByName("n") - clsVarnamesVectorPM.RemoveParameterByName("Cd") - clsDataFunctionPM.RemoveParameterByName("n") - clsDataFunctionPM.RemoveParameterByName("cd") - Case "cloud" - ucrReceiverRadiation.SetClimaticType("cloud_cover") - ucrReceiverRadiation.bAutoFill = True - clsVarnamesVectorPM.AddParameter("Cd", Chr(34) & "Cd" & Chr(34), bIncludeArgumentName:=False) - clsDataFunctionPM.AddParameter("Cd", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) - clsVarnamesVectorPM.RemoveParameterByName("n") - clsVarnamesVectorPM.RemoveParameterByName("Rs") - clsDataFunctionPM.RemoveParameterByName("n") - clsDataFunctionPM.RemoveParameterByName("Rs") - End Select + Private Sub Constants() + If rdoPenmanMonteith.Checked Then + clsVarnamesVectorPMFunction.RemoveParameterByName("lon") + clsListFunction.AddParameter("sigma", 4.903 * 10 ^ -9, iPosition:=5) + clsListFunction.AddParameter("z", 2, iPosition:=4) + clsListFunction.AddParameter("G", 0, iPosition:=6) + clsListFunction.AddParameter("as", 0.25, iPosition:=7) + clsListFunction.AddParameter("bs", 0.5, iPosition:=8) + clsListFunction.AddParameter("lambda", 2.45, iPosition:=1) + clsListFunction.AddParameter("Gsc", 0.082, iPosition:=3) + clsListFunction.RemoveParameterByName("alphaPT") + ElseIf rdoHargreavesSamani.Checked Then + clsVarnamesVectorHSFunction.RemoveParameterByName("lon") + clsListFunction.AddParameter("lambda", 2.54, iPosition:=1) + clsListFunction.AddParameter("Gsc", 0.082, iPosition:=3) + clsListFunction.RemoveParameterByName("alphaPT") + clsListFunction.RemoveParameterByName("sigma") + clsListFunction.RemoveParameterByName("z") + clsListFunction.RemoveParameterByName("G") + clsListFunction.RemoveParameterByName("as") + clsListFunction.RemoveParameterByName("bs") + Else + clsVarnamesVectorPTFunction.RemoveParameterByName("lon") + clsListFunction.AddParameter("lambda", 2.54, iPosition:=1) + clsListFunction.AddParameter("Gsc", 0.082, iPosition:=3) + clsListFunction.AddParameter("sigma", 4.903 * 10 ^ -9, iPosition:=5) + clsListFunction.AddParameter("G", 0, iPosition:=6) + clsListFunction.AddParameter("as", 0.25, iPosition:=7) + clsListFunction.AddParameter("bs", 0.5, iPosition:=8) + clsListFunction.AddParameter("alphaPT", 1.26, iPosition:=9) + clsListFunction.RemoveParameterByName("z") + End If End Sub + + Private Sub Solar() + If rdoPenmanMonteith.Checked AndAlso ucrInputSolar.GetText = "sunshine hours" Then + ucrReceiverRadiation.SetClimaticType("sunshine_hours") + ucrReceiverRadiation.bAutoFill = True + clsETPenmanMonteithFunction.AddParameter("solar", Chr(34) & "sunshine hours" & Chr(34), iPosition:=3) + clsVarnamesVectorPMFunction.AddParameter("n", Chr(34) & "n" & Chr(34), bIncludeArgumentName:=False) + clsDataFunctionPMFunction.AddParameter("n", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) + clsVarnamesVectorPMFunction.RemoveParameterByName("Rs") + clsVarnamesVectorPMFunction.RemoveParameterByName("Cd") + clsDataFunctionPMFunction.RemoveParameterByName("Rs") + clsDataFunctionPMFunction.RemoveParameterByName("cd") + ElseIf rdoPenmanMonteith.Checked AndAlso ucrInputSolar.GetText = "radiation" Then + ucrReceiverRadiation.SetClimaticType("radiation") + ucrReceiverRadiation.bAutoFill = True + clsETPenmanMonteithFunction.AddParameter("solar", Chr(34) & "data" & Chr(34), iPosition:=3) + clsVarnamesVectorPMFunction.AddParameter("Rs", Chr(34) & "Rs" & Chr(34), bIncludeArgumentName:=False) + clsDataFunctionPMFunction.AddParameter("Rs", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) + clsVarnamesVectorPMFunction.RemoveParameterByName("n") + clsVarnamesVectorPMFunction.RemoveParameterByName("Cd") + clsDataFunctionPMFunction.RemoveParameterByName("n") + clsDataFunctionPMFunction.RemoveParameterByName("cd") + ElseIf rdoPenmanMonteith.Checked AndAlso ucrInputSolar.GetText = "cloud" Then + ucrReceiverRadiation.SetClimaticType("cloud_cover") + ucrReceiverRadiation.bAutoFill = True + clsETPenmanMonteithFunction.AddParameter("solar", Chr(34) & "cloud" & Chr(34), iPosition:=3) + clsVarnamesVectorPMFunction.AddParameter("Cd", Chr(34) & "Cd" & Chr(34), bIncludeArgumentName:=False) + clsDataFunctionPMFunction.AddParameter("Cd", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) + clsVarnamesVectorPMFunction.RemoveParameterByName("n") + clsVarnamesVectorPMFunction.RemoveParameterByName("Rs") + clsDataFunctionPMFunction.RemoveParameterByName("n") + clsDataFunctionPMFunction.RemoveParameterByName("Rs") + ElseIf rdoPriestleyTaylor.Checked AndAlso ucrInputSolar.GetText = "sunshine hours" Then + ucrReceiverRadiation.SetClimaticType("sunshine_hours") + ucrReceiverRadiation.bAutoFill = True + clsETPriestleyTaylorFunction.AddParameter("solar", Chr(34) & "sunshine hours" & Chr(34), iPosition:=3) + clsVarnamesVectorPTFunction.AddParameter("n", Chr(34) & "n" & Chr(34), bIncludeArgumentName:=False) + clsDataFunctionPTFunction.AddParameter("n", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) + clsVarnamesVectorPTFunction.RemoveParameterByName("Rs") + clsVarnamesVectorPTFunction.RemoveParameterByName("Cd") + clsDataFunctionPTFunction.RemoveParameterByName("Rs") + clsDataFunctionPTFunction.RemoveParameterByName("cd") + ElseIf rdoPriestleyTaylor.Checked AndAlso ucrInputSolar.GetText = "radiation" Then + ucrReceiverRadiation.SetClimaticType("radiation") + ucrReceiverRadiation.bAutoFill = True + clsETPriestleyTaylorFunction.AddParameter("solar", Chr(34) & "data" & Chr(34), iPosition:=3) + clsVarnamesVectorPTFunction.AddParameter("Rs", Chr(34) & "Rs" & Chr(34), bIncludeArgumentName:=False) + clsDataFunctionPTFunction.AddParameter("Rs", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) + clsDataFunctionPTFunction.RemoveParameterByName("n") + clsDataFunctionPTFunction.RemoveParameterByName("cd") + clsVarnamesVectorPTFunction.RemoveParameterByName("n") + clsVarnamesVectorPTFunction.RemoveParameterByName("cd") + ElseIf rdoPriestleyTaylor.Checked AndAlso ucrInputSolar.GetText = "cloud" Then + ucrReceiverRadiation.SetClimaticType("cloud_cover") + ucrReceiverRadiation.bAutoFill = True + clsETPriestleyTaylorFunction.AddParameter("solar", Chr(34) & "cloud" & Chr(34), iPosition:=3) + clsVarnamesVectorPTFunction.AddParameter("Cd", Chr(34) & "Cd" & Chr(34), bIncludeArgumentName:=False) + clsDataFunctionPTFunction.AddParameter("Cd", clsRFunctionParameter:=ucrReceiverRadiation.GetVariables(), iPosition:=6) + clsDataFunctionPTFunction.RemoveParameterByName("n") + clsDataFunctionPTFunction.RemoveParameterByName("Rs") + clsVarnamesVectorPTFunction.RemoveParameterByName("n") + clsVarnamesVectorPTFunction.RemoveParameterByName("Rs") + End If + End Sub + + Private Sub ucrInputSolar_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSolar.ControlValueChanged + Solar() + End Sub + + Private Sub ucrSelectorEvapotranspiration_DataFrameChanged() Handles ucrSelectorEvapotranspiration.DataFrameChanged + Method() + End Sub + + Private Sub ucrSelectorEvapotranspiration_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorEvapotranspiration.ControlValueChanged + ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrNewColName.GetText, strTempDataframe:=ucrSelectorEvapotranspiration.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrNewColName.GetText) + Method() + End Sub + + Private Sub ucrReceiverRadiation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRadiation.ControlValueChanged + Solar() + End Sub + Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged, ucrChkWind.ControlContentsChanged TestOKEnabled() End Sub diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 7715943d2db..305340244de 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -289,12 +289,42 @@ + + sdgHSConstants.vb + + + Form + + + sdgHSMissingOptions.vb + + + Form + + + sdgLocation.vb + + + Form + sdgPairPlotOptions.vb Form + + sdgPMConstants.vb + + + Form + + + sdgPTConstants.vb + + + Form + sdgSummaryThemes.vb @@ -3128,9 +3158,24 @@ dlgThreeVariablePivotTable.vb + + sdgHSConstants.vb + + + sdgHSMissingOptions.vb + + + sdgLocation.vb + sdgPairPlotOptions.vb + + sdgPMConstants.vb + + + sdgPTConstants.vb + sdgSummaryThemes.vb diff --git a/instat/sdgHSConstants.Designer.vb b/instat/sdgHSConstants.Designer.vb new file mode 100644 index 00000000000..96dd4ec9072 --- /dev/null +++ b/instat/sdgHSConstants.Designer.vb @@ -0,0 +1,133 @@ + _ +Partial Class sdgHSConstants + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + _ + 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 + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + _ + Private Sub InitializeComponent() + Me.lblGSCUnit = New System.Windows.Forms.Label() + Me.ucrInputSolarConstant = New instat.ucrInputTextBox() + Me.lblLambaUnit = New System.Windows.Forms.Label() + Me.ucrSdgButtons = New instat.ucrButtonsSubdialogue() + Me.ucrInputLambda = New instat.ucrInputTextBox() + Me.lbllambda = New System.Windows.Forms.Label() + Me.lblSolarConstant = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'lblGSCUnit + ' + Me.lblGSCUnit.AutoSize = True + Me.lblGSCUnit.Location = New System.Drawing.Point(177, 37) + Me.lblGSCUnit.Name = "lblGSCUnit" + Me.lblGSCUnit.Size = New System.Drawing.Size(81, 13) + Me.lblGSCUnit.TabIndex = 20 + Me.lblGSCUnit.Text = "MJ.m^-2.min^-1" + ' + 'ucrInputSolarConstant + ' + Me.ucrInputSolarConstant.AddQuotesIfUnrecognised = True + Me.ucrInputSolarConstant.AutoSize = True + Me.ucrInputSolarConstant.IsMultiline = False + Me.ucrInputSolarConstant.IsReadOnly = False + Me.ucrInputSolarConstant.Location = New System.Drawing.Point(113, 33) + Me.ucrInputSolarConstant.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSolarConstant.Name = "ucrInputSolarConstant" + Me.ucrInputSolarConstant.Size = New System.Drawing.Size(52, 21) + Me.ucrInputSolarConstant.TabIndex = 23 + ' + 'lblLambaUnit + ' + Me.lblLambaUnit.AutoSize = True + Me.lblLambaUnit.Location = New System.Drawing.Point(177, 11) + Me.lblLambaUnit.Name = "lblLambaUnit" + Me.lblLambaUnit.Size = New System.Drawing.Size(51, 13) + Me.lblLambaUnit.TabIndex = 19 + Me.lblLambaUnit.Text = "MJ.kg^-1" + ' + 'ucrSdgButtons + ' + Me.ucrSdgButtons.AutoSize = True + Me.ucrSdgButtons.Location = New System.Drawing.Point(5, 87) + Me.ucrSdgButtons.Margin = New System.Windows.Forms.Padding(4) + Me.ucrSdgButtons.Name = "ucrSdgButtons" + Me.ucrSdgButtons.Size = New System.Drawing.Size(259, 29) + Me.ucrSdgButtons.TabIndex = 21 + ' + 'ucrInputLambda + ' + Me.ucrInputLambda.AddQuotesIfUnrecognised = True + Me.ucrInputLambda.AutoSize = True + Me.ucrInputLambda.IsMultiline = False + Me.ucrInputLambda.IsReadOnly = False + Me.ucrInputLambda.Location = New System.Drawing.Point(113, 7) + Me.ucrInputLambda.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputLambda.Name = "ucrInputLambda" + Me.ucrInputLambda.Size = New System.Drawing.Size(52, 21) + Me.ucrInputLambda.TabIndex = 22 + ' + 'lbllambda + ' + Me.lbllambda.AutoSize = True + Me.lbllambda.Location = New System.Drawing.Point(2, 11) + Me.lbllambda.Name = "lbllambda" + Me.lbllambda.Size = New System.Drawing.Size(45, 13) + Me.lbllambda.TabIndex = 17 + Me.lbllambda.Text = "Lambda" + ' + 'lblSolarConstant + ' + Me.lblSolarConstant.AutoSize = True + Me.lblSolarConstant.Location = New System.Drawing.Point(2, 37) + Me.lblSolarConstant.Name = "lblSolarConstant" + Me.lblSolarConstant.Size = New System.Drawing.Size(101, 13) + Me.lblSolarConstant.TabIndex = 18 + Me.lblSolarConstant.Text = "Solar Constant(Gsc)" + ' + 'sdgHSConstants + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(267, 123) + Me.Controls.Add(Me.lblGSCUnit) + Me.Controls.Add(Me.ucrInputSolarConstant) + Me.Controls.Add(Me.lblLambaUnit) + Me.Controls.Add(Me.ucrSdgButtons) + Me.Controls.Add(Me.ucrInputLambda) + Me.Controls.Add(Me.lbllambda) + Me.Controls.Add(Me.lblSolarConstant) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgHSConstants" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Hargreaves Samani Constants" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents lblGSCUnit As Label + Friend WithEvents ucrInputSolarConstant As ucrInputTextBox + Friend WithEvents lblLambaUnit As Label + Friend WithEvents ucrSdgButtons As ucrButtonsSubdialogue + Friend WithEvents ucrInputLambda As ucrInputTextBox + Friend WithEvents lbllambda As Label + Friend WithEvents lblSolarConstant As Label +End Class diff --git a/instat/sdgHSConstants.resx b/instat/sdgHSConstants.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgHSConstants.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/instat/sdgHSConstants.vb b/instat/sdgHSConstants.vb new file mode 100644 index 00000000000..f3a19503bae --- /dev/null +++ b/instat/sdgHSConstants.vb @@ -0,0 +1,48 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations +Public Class sdgHSConstants + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private bControlsInitialised As Boolean = False + Private clsListFunction As New RFunction + Private Sub sdgHSConstants_Load(sender As Object, e As EventArgs) Handles ucrSdgButtons.Load + autoTranslate(Me) + End Sub + + Private Sub InitialiseControls() + ucrInputLambda.SetParameter(New RParameter("lambda", 1)) + ucrInputLambda.AddQuotesIfUnrecognised = False + ucrInputLambda.SetLinkedDisplayControl(lbllambda) + + ucrInputSolarConstant.SetParameter(New RParameter("Gsc", 3)) + ucrInputSolarConstant.AddQuotesIfUnrecognised = False + ucrInputSolarConstant.SetLinkedDisplayControl(lblSolarConstant) + + bControlsInitialised = True + End Sub + + Public Sub SetRFunction(clsNewListFunction As RFunction, Optional bReset As Boolean = False) + clsListFunction = clsNewListFunction + + If Not bControlsInitialised Then + InitialiseControls() + End If + ucrInputLambda.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSolarConstant.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + End Sub +End Class \ No newline at end of file diff --git a/instat/sdgHSMissingOptions.Designer.vb b/instat/sdgHSMissingOptions.Designer.vb new file mode 100644 index 00000000000..8308dadfad0 --- /dev/null +++ b/instat/sdgHSMissingOptions.Designer.vb @@ -0,0 +1,177 @@ + _ +Partial Class sdgHSMissingOptions + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + _ + 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 + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + _ + Private Sub InitializeComponent() + Me.gprMissingDataOptions = New System.Windows.Forms.GroupBox() + Me.ucrChkInterpMissingEntries = New instat.ucrCheck() + Me.ucrChkInterpMissingDays = New instat.ucrCheck() + Me.ucrNudMaxMissingData = New instat.ucrNud() + Me.ucrNudMaxDurationMissingData = New instat.ucrNud() + Me.lblMaxMissingData = New System.Windows.Forms.Label() + Me.lblMaxDurationMissingData = New System.Windows.Forms.Label() + Me.ucrSdgButtons = New instat.ucrButtonsSubdialogue() + Me.ucrNudMaxMissingDays = New instat.ucrNud() + Me.lblMaxMissingDays = New System.Windows.Forms.Label() + Me.gprMissingDataOptions.SuspendLayout() + Me.SuspendLayout() + ' + 'gprMissingDataOptions + ' + Me.gprMissingDataOptions.Controls.Add(Me.ucrChkInterpMissingEntries) + Me.gprMissingDataOptions.Controls.Add(Me.ucrChkInterpMissingDays) + Me.gprMissingDataOptions.Location = New System.Drawing.Point(11, 90) + Me.gprMissingDataOptions.Name = "gprMissingDataOptions" + Me.gprMissingDataOptions.Size = New System.Drawing.Size(200, 82) + Me.gprMissingDataOptions.TabIndex = 17 + Me.gprMissingDataOptions.TabStop = False + Me.gprMissingDataOptions.Text = "Missing Data Options" + ' + 'ucrChkInterpMissingEntries + ' + Me.ucrChkInterpMissingEntries.AutoSize = True + Me.ucrChkInterpMissingEntries.Checked = False + Me.ucrChkInterpMissingEntries.Location = New System.Drawing.Point(7, 53) + Me.ucrChkInterpMissingEntries.Name = "ucrChkInterpMissingEntries" + Me.ucrChkInterpMissingEntries.Size = New System.Drawing.Size(183, 23) + Me.ucrChkInterpMissingEntries.TabIndex = 1 + ' + 'ucrChkInterpMissingDays + ' + Me.ucrChkInterpMissingDays.AutoSize = True + Me.ucrChkInterpMissingDays.Checked = False + Me.ucrChkInterpMissingDays.Location = New System.Drawing.Point(7, 22) + Me.ucrChkInterpMissingDays.Name = "ucrChkInterpMissingDays" + Me.ucrChkInterpMissingDays.Size = New System.Drawing.Size(183, 23) + Me.ucrChkInterpMissingDays.TabIndex = 0 + ' + 'ucrNudMaxMissingData + ' + Me.ucrNudMaxMissingData.AutoSize = True + Me.ucrNudMaxMissingData.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxMissingData.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaxMissingData.Location = New System.Drawing.Point(151, 64) + Me.ucrNudMaxMissingData.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaxMissingData.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxMissingData.Name = "ucrNudMaxMissingData" + Me.ucrNudMaxMissingData.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMaxMissingData.TabIndex = 16 + Me.ucrNudMaxMissingData.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudMaxDurationMissingData + ' + Me.ucrNudMaxDurationMissingData.AutoSize = True + Me.ucrNudMaxDurationMissingData.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxDurationMissingData.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaxDurationMissingData.Location = New System.Drawing.Point(151, 38) + Me.ucrNudMaxDurationMissingData.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaxDurationMissingData.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxDurationMissingData.Name = "ucrNudMaxDurationMissingData" + Me.ucrNudMaxDurationMissingData.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMaxDurationMissingData.TabIndex = 15 + Me.ucrNudMaxDurationMissingData.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblMaxMissingData + ' + Me.lblMaxMissingData.AutoSize = True + Me.lblMaxMissingData.Location = New System.Drawing.Point(11, 64) + Me.lblMaxMissingData.Name = "lblMaxMissingData" + Me.lblMaxMissingData.Size = New System.Drawing.Size(91, 13) + Me.lblMaxMissingData.TabIndex = 14 + Me.lblMaxMissingData.Text = "Max Missing Data" + ' + 'lblMaxDurationMissingData + ' + Me.lblMaxDurationMissingData.AutoSize = True + Me.lblMaxDurationMissingData.Location = New System.Drawing.Point(11, 39) + Me.lblMaxDurationMissingData.Name = "lblMaxDurationMissingData" + Me.lblMaxDurationMissingData.Size = New System.Drawing.Size(134, 13) + Me.lblMaxDurationMissingData.TabIndex = 13 + Me.lblMaxDurationMissingData.Text = "Max Duration Missing Data" + ' + 'ucrSdgButtons + ' + Me.ucrSdgButtons.AutoSize = True + Me.ucrSdgButtons.Location = New System.Drawing.Point(11, 178) + Me.ucrSdgButtons.Name = "ucrSdgButtons" + Me.ucrSdgButtons.Size = New System.Drawing.Size(259, 29) + Me.ucrSdgButtons.TabIndex = 12 + ' + 'ucrNudMaxMissingDays + ' + Me.ucrNudMaxMissingDays.AutoSize = True + Me.ucrNudMaxMissingDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxMissingDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaxMissingDays.Location = New System.Drawing.Point(151, 11) + Me.ucrNudMaxMissingDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaxMissingDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaxMissingDays.Name = "ucrNudMaxMissingDays" + Me.ucrNudMaxMissingDays.Size = New System.Drawing.Size(50, 20) + Me.ucrNudMaxMissingDays.TabIndex = 11 + Me.ucrNudMaxMissingDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblMaxMissingDays + ' + Me.lblMaxMissingDays.AutoSize = True + Me.lblMaxMissingDays.Location = New System.Drawing.Point(11, 11) + Me.lblMaxMissingDays.Name = "lblMaxMissingDays" + Me.lblMaxMissingDays.Size = New System.Drawing.Size(92, 13) + Me.lblMaxMissingDays.TabIndex = 10 + Me.lblMaxMissingDays.Text = "Max Missing Days" + ' + 'sdgHSMissingOptions + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(235, 216) + Me.Controls.Add(Me.gprMissingDataOptions) + Me.Controls.Add(Me.ucrNudMaxMissingData) + Me.Controls.Add(Me.ucrNudMaxDurationMissingData) + Me.Controls.Add(Me.lblMaxMissingData) + Me.Controls.Add(Me.lblMaxDurationMissingData) + Me.Controls.Add(Me.ucrSdgButtons) + Me.Controls.Add(Me.ucrNudMaxMissingDays) + Me.Controls.Add(Me.lblMaxMissingDays) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgHSMissingOptions" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Hargreaves Samani Missing Options" + Me.gprMissingDataOptions.ResumeLayout(False) + Me.gprMissingDataOptions.PerformLayout() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents gprMissingDataOptions As GroupBox + Friend WithEvents ucrChkInterpMissingEntries As ucrCheck + Friend WithEvents ucrChkInterpMissingDays As ucrCheck + Friend WithEvents ucrNudMaxMissingData As ucrNud + Friend WithEvents ucrNudMaxDurationMissingData As ucrNud + Friend WithEvents lblMaxMissingData As Label + Friend WithEvents lblMaxDurationMissingData As Label + Friend WithEvents ucrSdgButtons As ucrButtonsSubdialogue + Friend WithEvents ucrNudMaxMissingDays As ucrNud + Friend WithEvents lblMaxMissingDays As Label +End Class diff --git a/instat/sdgHSMissingOptions.resx b/instat/sdgHSMissingOptions.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgHSMissingOptions.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/instat/sdgHSMissingOptions.vb b/instat/sdgHSMissingOptions.vb new file mode 100644 index 00000000000..45d79335242 --- /dev/null +++ b/instat/sdgHSMissingOptions.vb @@ -0,0 +1,65 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations +Public Class sdgHSMissingOptions + Public bFirstLoad As Boolean = True + Public bControlsInitialised As Boolean = False + Public clsReadInputsFunction, clsMissingDataVectorFunction As New RFunction + + Private Sub sdgMissingOptionsEvapotranspiration_Load(sender As Object, e As EventArgs) Handles ucrSdgButtons.Load + autoTranslate(Me) + End Sub + + Public Sub InitialiseControls() + Dim dctInputMissingMethod As New Dictionary(Of String, String) + + ucrChkInterpMissingDays.SetParameter(New RParameter("interp_missing_days", 5)) + ucrChkInterpMissingDays.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkInterpMissingDays.SetRDefault("FALSE") + ucrChkInterpMissingDays.SetText("Interpolate Missing Days") + + ucrChkInterpMissingEntries.SetParameter(New RParameter("interp_missing_entries", 6)) + ucrChkInterpMissingEntries.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkInterpMissingEntries.SetRDefault("FALSE") + ucrChkInterpMissingEntries.SetText("Interpolate Missing Entries") + + ucrNudMaxMissingData.SetParameter(New RParameter("x", bNewIncludeArgumentName:=False)) + ucrNudMaxMissingData.SetMinMax(1, 99) + + ucrNudMaxMissingDays.SetParameter(New RParameter("y", bNewIncludeArgumentName:=False)) + ucrNudMaxMissingDays.SetMinMax(1, 99) + + ucrNudMaxDurationMissingData.SetParameter(New RParameter("z", bNewIncludeArgumentName:=False)) + ucrNudMaxDurationMissingData.SetMinMax(1, 99) + End Sub + + Public Sub SetRFunction(clsNewReadInputsFunction As RFunction, clsNewMissingDataVectorFunction As RFunction, Optional bReset As Boolean = False) + If Not bControlsInitialised Then + InitialiseControls() + End If + + clsReadInputsFunction = clsNewReadInputsFunction + clsMissingDataVectorFunction = clsNewMissingDataVectorFunction + + ucrChkInterpMissingDays.SetRCode(clsReadInputsFunction, bReset, bCloneIfNeeded:=True) + ucrChkInterpMissingEntries.SetRCode(clsReadInputsFunction, bReset, bCloneIfNeeded:=True) + ucrNudMaxMissingData.SetRCode(clsMissingDataVectorFunction, bReset, bCloneIfNeeded:=True) + ucrNudMaxMissingDays.SetRCode(clsMissingDataVectorFunction, bReset, bCloneIfNeeded:=True) + ucrNudMaxDurationMissingData.SetRCode(clsMissingDataVectorFunction, bReset, bCloneIfNeeded:=True) + End Sub + +End Class diff --git a/instat/sdgLocation.Designer.vb b/instat/sdgLocation.Designer.vb new file mode 100644 index 00000000000..4ca1dde9cdc --- /dev/null +++ b/instat/sdgLocation.Designer.vb @@ -0,0 +1,313 @@ + _ +Partial Class sdgLocation + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + _ + 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 + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + _ + Private Sub InitializeComponent() + Me.lblAltitude1 = New System.Windows.Forms.Label() + Me.ucrInputElevation = New instat.ucrInputTextBox() + Me.ucrInputLatitude = New instat.ucrInputTextBox() + Me.lblLatitude1 = New System.Windows.Forms.Label() + Me.lblLongitude1 = New System.Windows.Forms.Label() + Me.ucrInputLongitude = New instat.ucrInputTextBox() + Me.lblDegreesLon = New System.Windows.Forms.Label() + Me.lblDegreesLat = New System.Windows.Forms.Label() + Me.lblElevationunit = New System.Windows.Forms.Label() + Me.ucrSubDialogueBase = New instat.ucrButtonsSubdialogue() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.Station = New System.Windows.Forms.Label() + Me.ucrReceiverLongitude = New instat.ucrReceiverSingle() + Me.lblLongitude = New System.Windows.Forms.Label() + Me.lblLatitude = New System.Windows.Forms.Label() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverAltitude = New instat.ucrReceiverSingle() + Me.lblAltitude = New System.Windows.Forms.Label() + Me.grpLocation = New System.Windows.Forms.GroupBox() + Me.ucrSelectorLocation = New instat.ucrSelectorByDataFrameAddRemove() + Me.grpLocation.SuspendLayout() + Me.SuspendLayout() + ' + 'lblAltitude1 + ' + Me.lblAltitude1.AutoSize = True + Me.lblAltitude1.Location = New System.Drawing.Point(9, 24) + Me.lblAltitude1.Name = "lblAltitude1" + Me.lblAltitude1.Size = New System.Drawing.Size(42, 13) + Me.lblAltitude1.TabIndex = 22 + Me.lblAltitude1.Text = "Altitude" + ' + 'ucrInputElevation + ' + Me.ucrInputElevation.AddQuotesIfUnrecognised = True + Me.ucrInputElevation.AutoSize = True + Me.ucrInputElevation.IsMultiline = False + Me.ucrInputElevation.IsReadOnly = False + Me.ucrInputElevation.Location = New System.Drawing.Point(67, 19) + Me.ucrInputElevation.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputElevation.Name = "ucrInputElevation" + Me.ucrInputElevation.Size = New System.Drawing.Size(89, 21) + Me.ucrInputElevation.TabIndex = 19 + ' + 'ucrInputLatitude + ' + Me.ucrInputLatitude.AddQuotesIfUnrecognised = True + Me.ucrInputLatitude.AutoSize = True + Me.ucrInputLatitude.IsMultiline = False + Me.ucrInputLatitude.IsReadOnly = False + Me.ucrInputLatitude.Location = New System.Drawing.Point(67, 48) + Me.ucrInputLatitude.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputLatitude.Name = "ucrInputLatitude" + Me.ucrInputLatitude.Size = New System.Drawing.Size(89, 20) + Me.ucrInputLatitude.TabIndex = 21 + ' + 'lblLatitude1 + ' + Me.lblLatitude1.AutoSize = True + Me.lblLatitude1.Location = New System.Drawing.Point(9, 52) + Me.lblLatitude1.Name = "lblLatitude1" + Me.lblLatitude1.Size = New System.Drawing.Size(45, 13) + Me.lblLatitude1.TabIndex = 20 + Me.lblLatitude1.Text = "Latitude" + ' + 'lblLongitude1 + ' + Me.lblLongitude1.AutoSize = True + Me.lblLongitude1.Location = New System.Drawing.Point(9, 81) + Me.lblLongitude1.Name = "lblLongitude1" + Me.lblLongitude1.Size = New System.Drawing.Size(54, 13) + Me.lblLongitude1.TabIndex = 19 + Me.lblLongitude1.Text = "Longitude" + ' + 'ucrInputLongitude + ' + Me.ucrInputLongitude.AddQuotesIfUnrecognised = True + Me.ucrInputLongitude.AutoSize = True + Me.ucrInputLongitude.IsMultiline = False + Me.ucrInputLongitude.IsReadOnly = False + Me.ucrInputLongitude.Location = New System.Drawing.Point(67, 75) + Me.ucrInputLongitude.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputLongitude.Name = "ucrInputLongitude" + Me.ucrInputLongitude.Size = New System.Drawing.Size(89, 21) + Me.ucrInputLongitude.TabIndex = 17 + ' + 'lblDegreesLon + ' + Me.lblDegreesLon.AutoSize = True + Me.lblDegreesLon.Location = New System.Drawing.Point(164, 81) + Me.lblDegreesLon.Name = "lblDegreesLon" + Me.lblDegreesLon.Size = New System.Drawing.Size(46, 13) + Me.lblDegreesLon.TabIndex = 8 + Me.lblDegreesLon.Text = "Radians" + ' + 'lblDegreesLat + ' + Me.lblDegreesLat.AutoSize = True + Me.lblDegreesLat.Location = New System.Drawing.Point(164, 52) + Me.lblDegreesLat.Name = "lblDegreesLat" + Me.lblDegreesLat.Size = New System.Drawing.Size(46, 13) + Me.lblDegreesLat.TabIndex = 7 + Me.lblDegreesLat.Text = "Radians" + ' + 'lblElevationunit + ' + Me.lblElevationunit.AutoSize = True + Me.lblElevationunit.Location = New System.Drawing.Point(164, 24) + Me.lblElevationunit.Name = "lblElevationunit" + Me.lblElevationunit.Size = New System.Drawing.Size(39, 13) + Me.lblElevationunit.TabIndex = 6 + Me.lblElevationunit.Text = "Meters" + ' + 'ucrSubDialogueBase + ' + Me.ucrSubDialogueBase.AutoSize = True + Me.ucrSubDialogueBase.Location = New System.Drawing.Point(57, 314) + Me.ucrSubDialogueBase.Name = "ucrSubDialogueBase" + Me.ucrSubDialogueBase.Size = New System.Drawing.Size(224, 30) + Me.ucrSubDialogueBase.TabIndex = 27 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(241, 23) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(89, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 26 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'Station + ' + Me.Station.AutoSize = True + Me.Station.Location = New System.Drawing.Point(241, 10) + Me.Station.Name = "Station" + Me.Station.Size = New System.Drawing.Size(40, 13) + Me.Station.TabIndex = 22 + Me.Station.Text = "Station" + ' + 'ucrReceiverLongitude + ' + Me.ucrReceiverLongitude.AutoSize = True + Me.ucrReceiverLongitude.frmParent = Me + Me.ucrReceiverLongitude.Location = New System.Drawing.Point(241, 133) + Me.ucrReceiverLongitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongitude.Name = "ucrReceiverLongitude" + Me.ucrReceiverLongitude.Selector = Nothing + Me.ucrReceiverLongitude.Size = New System.Drawing.Size(89, 20) + Me.ucrReceiverLongitude.strNcFilePath = "" + Me.ucrReceiverLongitude.TabIndex = 25 + Me.ucrReceiverLongitude.ucrSelector = Nothing + ' + 'lblLongitude + ' + Me.lblLongitude.AutoSize = True + Me.lblLongitude.Location = New System.Drawing.Point(241, 119) + Me.lblLongitude.Name = "lblLongitude" + Me.lblLongitude.Size = New System.Drawing.Size(54, 13) + Me.lblLongitude.TabIndex = 20 + Me.lblLongitude.Text = "Longitude" + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.Location = New System.Drawing.Point(241, 81) + Me.lblLatitude.Name = "lblLatitude" + Me.lblLatitude.Size = New System.Drawing.Size(45, 13) + Me.lblLatitude.TabIndex = 19 + Me.lblLatitude.Text = "Latitude" + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(241, 94) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(89, 20) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 24 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverAltitude + ' + Me.ucrReceiverAltitude.AutoSize = True + Me.ucrReceiverAltitude.frmParent = Me + Me.ucrReceiverAltitude.Location = New System.Drawing.Point(241, 57) + Me.ucrReceiverAltitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverAltitude.Name = "ucrReceiverAltitude" + Me.ucrReceiverAltitude.Selector = Nothing + Me.ucrReceiverAltitude.Size = New System.Drawing.Size(89, 20) + Me.ucrReceiverAltitude.strNcFilePath = "" + Me.ucrReceiverAltitude.TabIndex = 23 + Me.ucrReceiverAltitude.ucrSelector = Nothing + ' + 'lblAltitude + ' + Me.lblAltitude.AutoSize = True + Me.lblAltitude.Location = New System.Drawing.Point(241, 44) + Me.lblAltitude.Name = "lblAltitude" + Me.lblAltitude.Size = New System.Drawing.Size(42, 13) + Me.lblAltitude.TabIndex = 21 + Me.lblAltitude.Text = "Altitude" + ' + 'grpLocation + ' + Me.grpLocation.Controls.Add(Me.lblAltitude1) + Me.grpLocation.Controls.Add(Me.ucrInputElevation) + Me.grpLocation.Controls.Add(Me.ucrInputLatitude) + Me.grpLocation.Controls.Add(Me.lblLatitude1) + Me.grpLocation.Controls.Add(Me.lblLongitude1) + Me.grpLocation.Controls.Add(Me.ucrInputLongitude) + Me.grpLocation.Controls.Add(Me.lblDegreesLon) + Me.grpLocation.Controls.Add(Me.lblDegreesLat) + Me.grpLocation.Controls.Add(Me.lblElevationunit) + Me.grpLocation.Location = New System.Drawing.Point(12, 198) + Me.grpLocation.Name = "grpLocation" + Me.grpLocation.Size = New System.Drawing.Size(212, 109) + Me.grpLocation.TabIndex = 29 + Me.grpLocation.TabStop = False + Me.grpLocation.Text = "Location" + ' + 'ucrSelectorLocation + ' + Me.ucrSelectorLocation.AutoSize = True + Me.ucrSelectorLocation.bDropUnusedFilterLevels = False + Me.ucrSelectorLocation.bShowHiddenColumns = False + Me.ucrSelectorLocation.bUseCurrentFilter = True + Me.ucrSelectorLocation.Location = New System.Drawing.Point(8, 10) + Me.ucrSelectorLocation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorLocation.Name = "ucrSelectorLocation" + Me.ucrSelectorLocation.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorLocation.TabIndex = 28 + ' + 'sdgLocation + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(339, 351) + Me.Controls.Add(Me.ucrSubDialogueBase) + Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.Station) + Me.Controls.Add(Me.ucrReceiverLongitude) + Me.Controls.Add(Me.lblLongitude) + Me.Controls.Add(Me.lblLatitude) + Me.Controls.Add(Me.ucrReceiverLatitude) + Me.Controls.Add(Me.ucrReceiverAltitude) + Me.Controls.Add(Me.lblAltitude) + Me.Controls.Add(Me.grpLocation) + Me.Controls.Add(Me.ucrSelectorLocation) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgLocation" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Location" + Me.grpLocation.ResumeLayout(False) + Me.grpLocation.PerformLayout() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents lblAltitude1 As Label + Friend WithEvents ucrInputElevation As ucrInputTextBox + Friend WithEvents ucrInputLatitude As ucrInputTextBox + Friend WithEvents lblLatitude1 As Label + Friend WithEvents lblLongitude1 As Label + Friend WithEvents ucrInputLongitude As ucrInputTextBox + Friend WithEvents lblDegreesLon As Label + Friend WithEvents lblDegreesLat As Label + Friend WithEvents lblElevationunit As Label + Friend WithEvents ucrSubDialogueBase As ucrButtonsSubdialogue + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents Station As Label + Friend WithEvents ucrReceiverLongitude As ucrReceiverSingle + Friend WithEvents lblLongitude As Label + Friend WithEvents lblLatitude As Label + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrReceiverAltitude As ucrReceiverSingle + Friend WithEvents lblAltitude As Label + Friend WithEvents grpLocation As GroupBox + Friend WithEvents ucrSelectorLocation As ucrSelectorByDataFrameAddRemove +End Class diff --git a/instat/sdgLocation.resx b/instat/sdgLocation.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgLocation.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/instat/sdgLocation.vb b/instat/sdgLocation.vb new file mode 100644 index 00000000000..ad902300c93 --- /dev/null +++ b/instat/sdgLocation.vb @@ -0,0 +1,133 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations +Public Class sdgLocation + Private bFirstLoad As Boolean = True + Private bControlsInitialised As Boolean = False + Private clsVarnamesVectorPMFunction, clsVarnamesVectorHSFunction, clsVarnamesVectorPTFunction, clsListFunction As New RFunction + + Private Sub sdgLocation_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + If bFirstLoad Then + InitialiseDialog() + ucrSelectorLocation.Reset() + EnableDesableSelector() + bFirstLoad = False + End If + End Sub + + Private Sub InitialiseDialog() + ucrSelectorLocation.SetParameter(New RParameter("station_df", 0)) + ucrSelectorLocation.SetParameterIsrfunction() + + ucrReceiverStation.SetParameter(New RParameter("name", 1)) + ucrReceiverStation.SetParameterIsRFunction() + ucrReceiverStation.Selector = ucrSelectorLocation + ucrReceiverStation.SetClimaticType("station") + ucrReceiverStation.bAutoFill = True + + ucrReceiverLatitude.SetParameter(New RParameter("lat_rad", 2)) + ucrReceiverLatitude.SetParameterIsRFunction() + ucrReceiverLatitude.Selector = ucrSelectorLocation + ucrReceiverLatitude.SetClimaticType("lat") + ucrReceiverLatitude.bAutoFill = True + + ucrInputLatitude.SetParameter(New RParameter("lat_rad", 2)) + ucrInputLatitude.AddQuotesIfUnrecognised = False + ucrInputLatitude.SetLinkedDisplayControl(lblLatitude) + ucrInputLatitude.SetRDefault("0") + + ucrReceiverLongitude.SetParameter(New RParameter("lon", 3)) + ucrReceiverLongitude.SetParameterIsRFunction() + ucrReceiverLongitude.Selector = ucrSelectorLocation + ucrReceiverLongitude.SetClimaticType("lon") + ucrReceiverLongitude.bAutoFill = True + + ucrInputLongitude.SetParameter(New RParameter("lon", 3)) + ucrInputLongitude.AddQuotesIfUnrecognised = False + ucrInputLongitude.SetLinkedDisplayControl(lblLongitude) + ucrInputLongitude.SetRDefault(0) + + ucrReceiverAltitude.SetParameter(New RParameter("Elev", 4)) + ucrReceiverAltitude.SetParameterIsRFunction() + ucrReceiverAltitude.Selector = ucrSelectorLocation + ucrReceiverAltitude.SetClimaticType("alt") + ucrReceiverAltitude.bAutoFill = True + + ucrInputElevation.SetParameter(New RParameter("Elev", 4)) + ucrInputElevation.AddQuotesIfUnrecognised = False + ucrInputElevation.SetLinkedDisplayControl(lblLatitude) + ucrInputElevation.SetRDefault("0") + + bControlsInitialised = True + End Sub + + Public Sub SetRFunction(clsNewVarnamesVectorHSFunction As RFunction, clsNewVarnamesVectorPMFunction As RFunction, clsNewListFunction As RFunction, clsNewVarnamesVectorPTFunction As RFunction, Optional bReset As Boolean = False) + clsListFunction = clsNewListFunction + clsVarnamesVectorPMFunction = clsNewVarnamesVectorPMFunction + clsVarnamesVectorHSFunction = clsNewVarnamesVectorHSFunction + clsVarnamesVectorPMFunction = clsNewVarnamesVectorPTFunction + + If Not bControlsInitialised Then + InitialiseDialog() + End If + + ucrReceiverLongitude.AddAdditionalCodeParameterPair(clsVarnamesVectorHSFunction, New RParameter("lon", 3), iAdditionalPairNo:=1) + ucrInputLongitude.AddAdditionalCodeParameterPair(clsVarnamesVectorHSFunction, New RParameter("lon", 3), iAdditionalPairNo:=1) + ucrReceiverLongitude.AddAdditionalCodeParameterPair(clsVarnamesVectorPTFunction, New RParameter("lon", 3), iAdditionalPairNo:=2) + ucrInputLongitude.AddAdditionalCodeParameterPair(clsVarnamesVectorPTFunction, New RParameter("lon", 3), iAdditionalPairNo:=2) + + ucrSelectorLocation.SetRCode(clsVarnamesVectorPMFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverStation.SetRCode(clsVarnamesVectorPMFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverLatitude.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverAltitude.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + + If bReset Then + ucrInputElevation.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputLongitude.SetRCode(clsVarnamesVectorPMFunction, bReset, bCloneIfNeeded:=True) + ucrInputLatitude.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverLongitude.SetRCode(clsVarnamesVectorPMFunction, bReset, bCloneIfNeeded:=True) + End If + End Sub + + Private Sub EnableDesableSelector() + Dim bEnableControl As Boolean = ucrReceiverLatitude.IsEmpty AndAlso ucrReceiverAltitude.IsEmpty + ucrInputLatitude.Enabled = bEnableControl + ucrInputElevation.Enabled = bEnableControl + ucrInputLongitude.Enabled = bEnableControl + End Sub + + Private Sub ucrReceiverAltitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverAltitude.ControlValueChanged, ucrReceiverLatitude.ControlValueChanged, ucrReceiverLongitude.ControlValueChanged + EnableDesableSelector() + End Sub + + Private Sub ucrInputElevation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputElevation.ControlValueChanged + EnableDesableSelector() + End Sub + + Private Sub ucrSelectorLocation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorLocation.ControlValueChanged + EnableDesableSelector() + End Sub + + Private Sub ucrInputLatitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputLatitude.ControlValueChanged + EnableDesableSelector() + End Sub + + Private Sub ucrInputLongitude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputLongitude.ControlValueChanged + EnableDesableSelector() + End Sub +End Class \ No newline at end of file diff --git a/instat/sdgMissingOptionsEvapotranspiration.Designer.vb b/instat/sdgMissingOptionsEvapotranspiration.Designer.vb index 89002ae7927..3333d1423ac 100644 --- a/instat/sdgMissingOptionsEvapotranspiration.Designer.vb +++ b/instat/sdgMissingOptionsEvapotranspiration.Designer.vb @@ -28,6 +28,8 @@ Partial Class sdgMissingOptionsEvapotranspiration Me.grpMissingDataOpts = New System.Windows.Forms.GroupBox() Me.ucrChkInterpMissingEntries = New instat.ucrCheck() Me.ucrChkInterpMissingDays = New instat.ucrCheck() + Me.ucrInputMissingMethod = New instat.ucrInputComboBox() + Me.lblMissingMethod = New System.Windows.Forms.Label() Me.ucrNudMaxDurationMissingData = New instat.ucrNud() Me.ucrNudMaxMissingDays = New instat.ucrNud() Me.ucrNudMaxMissingData = New instat.ucrNud() @@ -38,38 +40,38 @@ Partial Class sdgMissingOptionsEvapotranspiration 'lblMaxPerctMissindData ' Me.lblMaxPerctMissindData.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxPerctMissindData.Location = New System.Drawing.Point(9, 69) + Me.lblMaxPerctMissindData.Location = New System.Drawing.Point(5, 60) Me.lblMaxPerctMissindData.Name = "lblMaxPerctMissindData" Me.lblMaxPerctMissindData.Size = New System.Drawing.Size(169, 19) - Me.lblMaxPerctMissindData.TabIndex = 29 + Me.lblMaxPerctMissindData.TabIndex = 39 Me.lblMaxPerctMissindData.Text = "Max Missing Data" ' 'lblMaxDurationMissingData ' Me.lblMaxDurationMissingData.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxDurationMissingData.Location = New System.Drawing.Point(9, 45) + Me.lblMaxDurationMissingData.Location = New System.Drawing.Point(5, 36) Me.lblMaxDurationMissingData.Name = "lblMaxDurationMissingData" Me.lblMaxDurationMissingData.Size = New System.Drawing.Size(160, 20) - Me.lblMaxDurationMissingData.TabIndex = 27 + Me.lblMaxDurationMissingData.TabIndex = 37 Me.lblMaxDurationMissingData.Text = "Max Duration Missing Data" ' 'lblMaxMissingDays ' Me.lblMaxMissingDays.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblMaxMissingDays.Location = New System.Drawing.Point(9, 22) + Me.lblMaxMissingDays.Location = New System.Drawing.Point(5, 13) Me.lblMaxMissingDays.Name = "lblMaxMissingDays" Me.lblMaxMissingDays.Size = New System.Drawing.Size(169, 20) - Me.lblMaxMissingDays.TabIndex = 25 + Me.lblMaxMissingDays.TabIndex = 35 Me.lblMaxMissingDays.Text = "Max Missing Days" ' 'grpMissingDataOpts ' Me.grpMissingDataOpts.Controls.Add(Me.ucrChkInterpMissingEntries) Me.grpMissingDataOpts.Controls.Add(Me.ucrChkInterpMissingDays) - Me.grpMissingDataOpts.Location = New System.Drawing.Point(9, 106) + Me.grpMissingDataOpts.Location = New System.Drawing.Point(5, 121) Me.grpMissingDataOpts.Name = "grpMissingDataOpts" Me.grpMissingDataOpts.Size = New System.Drawing.Size(198, 66) - Me.grpMissingDataOpts.TabIndex = 31 + Me.grpMissingDataOpts.TabIndex = 41 Me.grpMissingDataOpts.TabStop = False Me.grpMissingDataOpts.Text = "Missing Data Options" ' @@ -77,7 +79,7 @@ Partial Class sdgMissingOptionsEvapotranspiration ' Me.ucrChkInterpMissingEntries.AutoSize = True Me.ucrChkInterpMissingEntries.Checked = False - Me.ucrChkInterpMissingEntries.Location = New System.Drawing.Point(2, 38) + Me.ucrChkInterpMissingEntries.Location = New System.Drawing.Point(5, 36) Me.ucrChkInterpMissingEntries.Name = "ucrChkInterpMissingEntries" Me.ucrChkInterpMissingEntries.Size = New System.Drawing.Size(188, 23) Me.ucrChkInterpMissingEntries.TabIndex = 5 @@ -86,22 +88,42 @@ Partial Class sdgMissingOptionsEvapotranspiration ' Me.ucrChkInterpMissingDays.AutoSize = True Me.ucrChkInterpMissingDays.Checked = False - Me.ucrChkInterpMissingDays.Location = New System.Drawing.Point(2, 16) + Me.ucrChkInterpMissingDays.Location = New System.Drawing.Point(5, 14) Me.ucrChkInterpMissingDays.Name = "ucrChkInterpMissingDays" Me.ucrChkInterpMissingDays.Size = New System.Drawing.Size(168, 23) Me.ucrChkInterpMissingDays.TabIndex = 6 ' + 'ucrInputMissingMethod + ' + Me.ucrInputMissingMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMissingMethod.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputMissingMethod.GetSetSelectedIndex = -1 + Me.ucrInputMissingMethod.IsReadOnly = False + Me.ucrInputMissingMethod.Location = New System.Drawing.Point(93, 88) + Me.ucrInputMissingMethod.Name = "ucrInputMissingMethod" + Me.ucrInputMissingMethod.Size = New System.Drawing.Size(137, 21) + Me.ucrInputMissingMethod.TabIndex = 43 + ' + 'lblMissingMethod + ' + Me.lblMissingMethod.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblMissingMethod.Location = New System.Drawing.Point(2, 90) + Me.lblMissingMethod.Name = "lblMissingMethod" + Me.lblMissingMethod.Size = New System.Drawing.Size(90, 19) + Me.lblMissingMethod.TabIndex = 42 + Me.lblMissingMethod.Text = "Missing Method" + ' 'ucrNudMaxDurationMissingData ' Me.ucrNudMaxDurationMissingData.AutoSize = True Me.ucrNudMaxDurationMissingData.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxDurationMissingData.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxDurationMissingData.Location = New System.Drawing.Point(184, 69) + Me.ucrNudMaxDurationMissingData.Location = New System.Drawing.Point(180, 60) Me.ucrNudMaxDurationMissingData.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaxDurationMissingData.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxDurationMissingData.Name = "ucrNudMaxDurationMissingData" Me.ucrNudMaxDurationMissingData.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMaxDurationMissingData.TabIndex = 30 + Me.ucrNudMaxDurationMissingData.TabIndex = 40 Me.ucrNudMaxDurationMissingData.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrNudMaxMissingDays @@ -109,12 +131,12 @@ Partial Class sdgMissingOptionsEvapotranspiration Me.ucrNudMaxMissingDays.AutoSize = True Me.ucrNudMaxMissingDays.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxMissingDays.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxMissingDays.Location = New System.Drawing.Point(184, 22) + Me.ucrNudMaxMissingDays.Location = New System.Drawing.Point(180, 13) Me.ucrNudMaxMissingDays.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaxMissingDays.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxMissingDays.Name = "ucrNudMaxMissingDays" Me.ucrNudMaxMissingDays.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMaxMissingDays.TabIndex = 26 + Me.ucrNudMaxMissingDays.TabIndex = 36 Me.ucrNudMaxMissingDays.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrNudMaxMissingData @@ -122,34 +144,36 @@ Partial Class sdgMissingOptionsEvapotranspiration Me.ucrNudMaxMissingData.AutoSize = True Me.ucrNudMaxMissingData.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxMissingData.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaxMissingData.Location = New System.Drawing.Point(184, 45) + Me.ucrNudMaxMissingData.Location = New System.Drawing.Point(180, 36) Me.ucrNudMaxMissingData.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaxMissingData.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaxMissingData.Name = "ucrNudMaxMissingData" Me.ucrNudMaxMissingData.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMaxMissingData.TabIndex = 28 + Me.ucrNudMaxMissingData.TabIndex = 38 Me.ucrNudMaxMissingData.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrSdgButtons ' Me.ucrSdgButtons.AutoSize = True - Me.ucrSdgButtons.Location = New System.Drawing.Point(0, 189) + Me.ucrSdgButtons.Location = New System.Drawing.Point(-4, 198) Me.ucrSdgButtons.Name = "ucrSdgButtons" Me.ucrSdgButtons.Size = New System.Drawing.Size(259, 29) - Me.ucrSdgButtons.TabIndex = 3 + Me.ucrSdgButtons.TabIndex = 34 ' 'sdgMissingOptionsEvapotranspiration ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(245, 229) + Me.ClientSize = New System.Drawing.Size(238, 229) Me.Controls.Add(Me.lblMaxPerctMissindData) - Me.Controls.Add(Me.ucrNudMaxDurationMissingData) - Me.Controls.Add(Me.ucrNudMaxMissingDays) Me.Controls.Add(Me.lblMaxDurationMissingData) Me.Controls.Add(Me.lblMaxMissingDays) - Me.Controls.Add(Me.ucrNudMaxMissingData) Me.Controls.Add(Me.grpMissingDataOpts) + Me.Controls.Add(Me.ucrInputMissingMethod) + Me.Controls.Add(Me.lblMissingMethod) + Me.Controls.Add(Me.ucrNudMaxDurationMissingData) + Me.Controls.Add(Me.ucrNudMaxMissingDays) + Me.Controls.Add(Me.ucrNudMaxMissingData) Me.Controls.Add(Me.ucrSdgButtons) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -164,14 +188,16 @@ Partial Class sdgMissingOptionsEvapotranspiration End Sub - Friend WithEvents ucrSdgButtons As ucrButtonsSubdialogue Friend WithEvents lblMaxPerctMissindData As Label - Friend WithEvents ucrNudMaxDurationMissingData As ucrNud - Friend WithEvents ucrNudMaxMissingDays As ucrNud Friend WithEvents lblMaxDurationMissingData As Label Friend WithEvents lblMaxMissingDays As Label - Friend WithEvents ucrNudMaxMissingData As ucrNud Friend WithEvents grpMissingDataOpts As GroupBox Friend WithEvents ucrChkInterpMissingEntries As ucrCheck Friend WithEvents ucrChkInterpMissingDays As ucrCheck + Friend WithEvents ucrInputMissingMethod As ucrInputComboBox + Friend WithEvents lblMissingMethod As Label + Friend WithEvents ucrNudMaxDurationMissingData As ucrNud + Friend WithEvents ucrNudMaxMissingDays As ucrNud + Friend WithEvents ucrNudMaxMissingData As ucrNud + Friend WithEvents ucrSdgButtons As ucrButtonsSubdialogue End Class diff --git a/instat/sdgMissingOptionsEvapotranspiration.vb b/instat/sdgMissingOptionsEvapotranspiration.vb index 19373554b6f..7c87ea8b77e 100644 --- a/instat/sdgMissingOptionsEvapotranspiration.vb +++ b/instat/sdgMissingOptionsEvapotranspiration.vb @@ -18,12 +18,23 @@ Imports instat.Translations Public Class sdgMissingOptionsEvapotranspiration Public bFirstLoad As Boolean = True Public bControlsInitialised As Boolean = False - Public clsReadInputs, clsMissingDataVector As New RFunction + Public clsReadInputsFunction, clsMissingDataVectorFunction As New RFunction Private Sub sdgMissingOptionsEvapotranspiration_Load(sender As Object, e As EventArgs) Handles ucrSdgButtons.Load autoTranslate(Me) End Sub Public Sub InitialiseControls() + Dim dctInputMissingMethod As New Dictionary(Of String, String) + + ucrInputMissingMethod.SetParameter(New RParameter("missing_method", 8)) + dctInputMissingMethod.Add("monthly average", Chr(34) & "monthly average" & Chr(34)) + dctInputMissingMethod.Add("seasonal average", Chr(34) & "seasonal average" & Chr(34)) + dctInputMissingMethod.Add("DoY average", Chr(34) & "DoY average" & Chr(34)) + dctInputMissingMethod.Add("neighbouring average", Chr(34) & "neighbouring average" & Chr(34)) + ucrInputMissingMethod.SetItems(dctInputMissingMethod) + ucrInputMissingMethod.SetDropDownStyleAsNonEditable() + ucrInputMissingMethod.SetLinkedDisplayControl(lblMissingMethod) + ucrChkInterpMissingDays.SetParameter(New RParameter("interp_missing_days", 5)) ucrChkInterpMissingDays.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkInterpMissingDays.SetRDefault("FALSE") @@ -49,13 +60,14 @@ Public Class sdgMissingOptionsEvapotranspiration InitialiseControls() End If - clsReadInputs = clsNewReadInputs - clsMissingDataVector = clsNewMissingDataVector + clsReadInputsFunction = clsNewReadInputs + clsMissingDataVectorFunction = clsNewMissingDataVector - ucrChkInterpMissingDays.SetRCode(clsReadInputs, bReset, bCloneIfNeeded:=True) - ucrChkInterpMissingEntries.SetRCode(clsReadInputs, bReset, bCloneIfNeeded:=True) - ucrNudMaxMissingData.SetRCode(clsMissingDataVector, bReset, bCloneIfNeeded:=True) - ucrNudMaxMissingDays.SetRCode(clsMissingDataVector, bReset, bCloneIfNeeded:=True) - ucrNudMaxDurationMissingData.SetRCode(clsMissingDataVector, bReset, bCloneIfNeeded:=True) + ucrInputMissingMethod.SetRCode(clsReadInputsFunction, bReset, bCloneIfNeeded:=True) + ucrChkInterpMissingDays.SetRCode(clsReadInputsFunction, bReset, bCloneIfNeeded:=True) + ucrChkInterpMissingEntries.SetRCode(clsReadInputsFunction, bReset, bCloneIfNeeded:=True) + ucrNudMaxMissingData.SetRCode(clsMissingDataVectorFunction, bReset, bCloneIfNeeded:=True) + ucrNudMaxMissingDays.SetRCode(clsMissingDataVectorFunction, bReset, bCloneIfNeeded:=True) + ucrNudMaxDurationMissingData.SetRCode(clsMissingDataVectorFunction, bReset, bCloneIfNeeded:=True) End Sub End Class \ No newline at end of file diff --git a/instat/sdgPMConstants.Designer.vb b/instat/sdgPMConstants.Designer.vb new file mode 100644 index 00000000000..b822e8799ab --- /dev/null +++ b/instat/sdgPMConstants.Designer.vb @@ -0,0 +1,306 @@ + _ +Partial Class sdgPMConstants + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + _ + 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 + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + _ + Private Sub InitializeComponent() + Me.ucrInputAs = New instat.ucrInputTextBox() + Me.ucrInputBS = New instat.ucrInputTextBox() + Me.lblBS = New System.Windows.Forms.Label() + Me.lblAS = New System.Windows.Forms.Label() + Me.ucrNudHeigth = New instat.ucrNud() + Me.ucrInputSoilFlux = New instat.ucrInputTextBox() + Me.ucrInputSolarConstant = New instat.ucrInputTextBox() + Me.ucrInputLambda = New instat.ucrInputTextBox() + Me.ucrInputSigma = New instat.ucrInputTextBox() + Me.lblSoilUnit = New System.Windows.Forms.Label() + Me.lblSoilFlux = New System.Windows.Forms.Label() + Me.lblSigma = New System.Windows.Forms.Label() + Me.lblHeigthUnit = New System.Windows.Forms.Label() + Me.lblSolarUnit = New System.Windows.Forms.Label() + Me.lblSigmaUnit = New System.Windows.Forms.Label() + Me.lblHeigth = New System.Windows.Forms.Label() + Me.lblLambdaUnit = New System.Windows.Forms.Label() + Me.lblSolarConstant = New System.Windows.Forms.Label() + Me.lblLambda = New System.Windows.Forms.Label() + Me.UcrButtonsSubdialogue1 = New instat.ucrButtonsSubdialogue() + Me.SuspendLayout() + ' + 'ucrInputAs + ' + Me.ucrInputAs.AddQuotesIfUnrecognised = True + Me.ucrInputAs.AutoSize = True + Me.ucrInputAs.IsMultiline = False + Me.ucrInputAs.IsReadOnly = False + Me.ucrInputAs.Location = New System.Drawing.Point(135, 149) + Me.ucrInputAs.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputAs.Name = "ucrInputAs" + Me.ucrInputAs.Size = New System.Drawing.Size(63, 21) + Me.ucrInputAs.TabIndex = 62 + ' + 'ucrInputBS + ' + Me.ucrInputBS.AddQuotesIfUnrecognised = True + Me.ucrInputBS.AutoSize = True + Me.ucrInputBS.IsMultiline = False + Me.ucrInputBS.IsReadOnly = False + Me.ucrInputBS.Location = New System.Drawing.Point(135, 178) + Me.ucrInputBS.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputBS.Name = "ucrInputBS" + Me.ucrInputBS.Size = New System.Drawing.Size(63, 21) + Me.ucrInputBS.TabIndex = 61 + ' + 'lblBS + ' + Me.lblBS.AutoSize = True + Me.lblBS.Location = New System.Drawing.Point(5, 186) + Me.lblBS.Name = "lblBS" + Me.lblBS.Size = New System.Drawing.Size(18, 13) + Me.lblBS.TabIndex = 60 + Me.lblBS.Text = "bs" + ' + 'lblAS + ' + Me.lblAS.AutoSize = True + Me.lblAS.Location = New System.Drawing.Point(5, 153) + Me.lblAS.Name = "lblAS" + Me.lblAS.Size = New System.Drawing.Size(18, 13) + Me.lblAS.TabIndex = 59 + Me.lblAS.Text = "as" + ' + 'ucrNudHeigth + ' + Me.ucrNudHeigth.AutoSize = True + Me.ucrNudHeigth.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHeigth.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHeigth.Location = New System.Drawing.Point(135, 71) + Me.ucrNudHeigth.Margin = New System.Windows.Forms.Padding(6) + Me.ucrNudHeigth.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHeigth.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHeigth.Name = "ucrNudHeigth" + Me.ucrNudHeigth.Size = New System.Drawing.Size(63, 20) + Me.ucrNudHeigth.TabIndex = 58 + Me.ucrNudHeigth.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputSoilFlux + ' + Me.ucrInputSoilFlux.AddQuotesIfUnrecognised = True + Me.ucrInputSoilFlux.AutoSize = True + Me.ucrInputSoilFlux.IsMultiline = False + Me.ucrInputSoilFlux.IsReadOnly = False + Me.ucrInputSoilFlux.Location = New System.Drawing.Point(135, 122) + Me.ucrInputSoilFlux.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSoilFlux.Name = "ucrInputSoilFlux" + Me.ucrInputSoilFlux.Size = New System.Drawing.Size(63, 21) + Me.ucrInputSoilFlux.TabIndex = 57 + ' + 'ucrInputSolarConstant + ' + Me.ucrInputSolarConstant.AddQuotesIfUnrecognised = True + Me.ucrInputSolarConstant.AutoSize = True + Me.ucrInputSolarConstant.IsMultiline = False + Me.ucrInputSolarConstant.IsReadOnly = False + Me.ucrInputSolarConstant.Location = New System.Drawing.Point(135, 43) + Me.ucrInputSolarConstant.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSolarConstant.Name = "ucrInputSolarConstant" + Me.ucrInputSolarConstant.Size = New System.Drawing.Size(63, 21) + Me.ucrInputSolarConstant.TabIndex = 56 + ' + 'ucrInputLambda + ' + Me.ucrInputLambda.AddQuotesIfUnrecognised = True + Me.ucrInputLambda.AutoSize = True + Me.ucrInputLambda.IsMultiline = False + Me.ucrInputLambda.IsReadOnly = False + Me.ucrInputLambda.Location = New System.Drawing.Point(135, 11) + Me.ucrInputLambda.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputLambda.Name = "ucrInputLambda" + Me.ucrInputLambda.Size = New System.Drawing.Size(63, 21) + Me.ucrInputLambda.TabIndex = 55 + ' + 'ucrInputSigma + ' + Me.ucrInputSigma.AddQuotesIfUnrecognised = True + Me.ucrInputSigma.AutoSize = True + Me.ucrInputSigma.IsMultiline = False + Me.ucrInputSigma.IsReadOnly = False + Me.ucrInputSigma.Location = New System.Drawing.Point(135, 96) + Me.ucrInputSigma.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSigma.Name = "ucrInputSigma" + Me.ucrInputSigma.Size = New System.Drawing.Size(63, 21) + Me.ucrInputSigma.TabIndex = 54 + ' + 'lblSoilUnit + ' + Me.lblSoilUnit.AutoSize = True + Me.lblSoilUnit.Location = New System.Drawing.Point(213, 126) + Me.lblSoilUnit.Name = "lblSoilUnit" + Me.lblSoilUnit.Size = New System.Drawing.Size(82, 13) + Me.lblSoilUnit.TabIndex = 53 + Me.lblSoilUnit.Text = "MJ.m^-2.day^-1" + ' + 'lblSoilFlux + ' + Me.lblSoilFlux.AutoSize = True + Me.lblSoilFlux.Location = New System.Drawing.Point(5, 127) + Me.lblSoilFlux.Name = "lblSoilFlux" + Me.lblSoilFlux.Size = New System.Drawing.Size(72, 13) + Me.lblSoilFlux.TabIndex = 52 + Me.lblSoilFlux.Text = "Soil Heat Flux" + ' + 'lblSigma + ' + Me.lblSigma.AutoSize = True + Me.lblSigma.Location = New System.Drawing.Point(5, 101) + Me.lblSigma.Name = "lblSigma" + Me.lblSigma.Size = New System.Drawing.Size(36, 13) + Me.lblSigma.TabIndex = 51 + Me.lblSigma.Text = "Sigma" + ' + 'lblHeigthUnit + ' + Me.lblHeigthUnit.AutoSize = True + Me.lblHeigthUnit.Location = New System.Drawing.Point(213, 73) + Me.lblHeigthUnit.Name = "lblHeigthUnit" + Me.lblHeigthUnit.Size = New System.Drawing.Size(39, 13) + Me.lblHeigthUnit.TabIndex = 50 + Me.lblHeigthUnit.Text = "Meters" + ' + 'lblSolarUnit + ' + Me.lblSolarUnit.AutoSize = True + Me.lblSolarUnit.Location = New System.Drawing.Point(213, 47) + Me.lblSolarUnit.Name = "lblSolarUnit" + Me.lblSolarUnit.Size = New System.Drawing.Size(81, 13) + Me.lblSolarUnit.TabIndex = 49 + Me.lblSolarUnit.Text = "MJ.m^-2.min^-1" + ' + 'lblSigmaUnit + ' + Me.lblSigmaUnit.AutoSize = True + Me.lblSigmaUnit.Location = New System.Drawing.Point(213, 100) + Me.lblSigmaUnit.Name = "lblSigmaUnit" + Me.lblSigmaUnit.Size = New System.Drawing.Size(107, 13) + Me.lblSigmaUnit.TabIndex = 48 + Me.lblSigmaUnit.Text = "MJ.K^-4.m^-2.day^-1" + ' + 'lblHeigth + ' + Me.lblHeigth.AutoSize = True + Me.lblHeigth.Location = New System.Drawing.Point(5, 73) + Me.lblHeigth.Name = "lblHeigth" + Me.lblHeigth.Size = New System.Drawing.Size(130, 13) + Me.lblHeigth.TabIndex = 47 + Me.lblHeigth.Text = "Height of Wind Instrument" + ' + 'lblLambdaUnit + ' + Me.lblLambdaUnit.AutoSize = True + Me.lblLambdaUnit.Location = New System.Drawing.Point(213, 15) + Me.lblLambdaUnit.Name = "lblLambdaUnit" + Me.lblLambdaUnit.Size = New System.Drawing.Size(51, 13) + Me.lblLambdaUnit.TabIndex = 46 + Me.lblLambdaUnit.Text = "MJ.kg^-1" + ' + 'lblSolarConstant + ' + Me.lblSolarConstant.AutoSize = True + Me.lblSolarConstant.Location = New System.Drawing.Point(5, 48) + Me.lblSolarConstant.Name = "lblSolarConstant" + Me.lblSolarConstant.Size = New System.Drawing.Size(101, 13) + Me.lblSolarConstant.TabIndex = 45 + Me.lblSolarConstant.Text = "Solar Constant(Gsc)" + ' + 'lblLambda + ' + Me.lblLambda.AutoSize = True + Me.lblLambda.Location = New System.Drawing.Point(5, 16) + Me.lblLambda.Name = "lblLambda" + Me.lblLambda.Size = New System.Drawing.Size(45, 13) + Me.lblLambda.TabIndex = 44 + Me.lblLambda.Text = "Lambda" + ' + 'UcrButtonsSubdialogue1 + ' + Me.UcrButtonsSubdialogue1.AutoSize = True + Me.UcrButtonsSubdialogue1.Location = New System.Drawing.Point(28, 207) + Me.UcrButtonsSubdialogue1.Margin = New System.Windows.Forms.Padding(4) + Me.UcrButtonsSubdialogue1.Name = "UcrButtonsSubdialogue1" + Me.UcrButtonsSubdialogue1.Size = New System.Drawing.Size(259, 29) + Me.UcrButtonsSubdialogue1.TabIndex = 43 + ' + 'sdgPMConstants + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(325, 246) + Me.Controls.Add(Me.ucrInputAs) + Me.Controls.Add(Me.ucrInputBS) + Me.Controls.Add(Me.lblBS) + Me.Controls.Add(Me.lblAS) + Me.Controls.Add(Me.ucrNudHeigth) + Me.Controls.Add(Me.ucrInputSoilFlux) + Me.Controls.Add(Me.ucrInputSolarConstant) + Me.Controls.Add(Me.ucrInputLambda) + Me.Controls.Add(Me.ucrInputSigma) + Me.Controls.Add(Me.lblSoilUnit) + Me.Controls.Add(Me.lblSoilFlux) + Me.Controls.Add(Me.lblSigma) + Me.Controls.Add(Me.lblHeigthUnit) + Me.Controls.Add(Me.lblSolarUnit) + Me.Controls.Add(Me.lblSigmaUnit) + Me.Controls.Add(Me.lblHeigth) + Me.Controls.Add(Me.lblLambdaUnit) + Me.Controls.Add(Me.lblSolarConstant) + Me.Controls.Add(Me.lblLambda) + Me.Controls.Add(Me.UcrButtonsSubdialogue1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgPMConstants" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Penman Monteith Constants" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ucrInputAs As ucrInputTextBox + Friend WithEvents ucrInputBS As ucrInputTextBox + Friend WithEvents lblBS As Label + Friend WithEvents lblAS As Label + Friend WithEvents ucrNudHeigth As ucrNud + Friend WithEvents ucrInputSoilFlux As ucrInputTextBox + Friend WithEvents ucrInputSolarConstant As ucrInputTextBox + Friend WithEvents ucrInputLambda As ucrInputTextBox + Friend WithEvents ucrInputSigma As ucrInputTextBox + Friend WithEvents lblSoilUnit As Label + Friend WithEvents lblSoilFlux As Label + Friend WithEvents lblSigma As Label + Friend WithEvents lblHeigthUnit As Label + Friend WithEvents lblSolarUnit As Label + Friend WithEvents lblSigmaUnit As Label + Friend WithEvents lblHeigth As Label + Friend WithEvents lblLambdaUnit As Label + Friend WithEvents lblSolarConstant As Label + Friend WithEvents lblLambda As Label + Friend WithEvents UcrButtonsSubdialogue1 As ucrButtonsSubdialogue +End Class diff --git a/instat/sdgPMConstants.resx b/instat/sdgPMConstants.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgPMConstants.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/instat/sdgPMConstants.vb b/instat/sdgPMConstants.vb new file mode 100644 index 00000000000..4d64e7c2380 --- /dev/null +++ b/instat/sdgPMConstants.vb @@ -0,0 +1,72 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations +Public Class sdgPMConstants + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private bControlsInitialised As Boolean = False + Private clsListFunction As New RFunction + + Private Sub sdgPMConstants_Load(sender As Object, e As EventArgs) Handles UcrButtonsSubdialogue1.Load + autoTranslate(Me) + End Sub + + Private Sub InitialiseControls() + ucrInputLambda.SetParameter(New RParameter("lambda", 1)) + ucrInputLambda.AddQuotesIfUnrecognised = False + ucrInputLambda.SetLinkedDisplayControl(lblLambda) + + ucrInputSigma.SetParameter(New RParameter("sigma", 5)) + ucrInputSigma.AddQuotesIfUnrecognised = False + + ucrInputSolarConstant.SetParameter(New RParameter("Gsc", 3)) + ucrInputSolarConstant.AddQuotesIfUnrecognised = False + ucrInputSolarConstant.SetLinkedDisplayControl(lblSolarConstant) + + ucrNudHeigth.SetParameter(New RParameter("z", 4)) + ucrNudHeigth.SetMinMax(0, 10) + ucrNudHeigth.Increment = 1 + + ucrInputSoilFlux.SetParameter(New RParameter("G", 6)) + ucrInputSoilFlux.AddQuotesIfUnrecognised = False + ucrInputSoilFlux.SetLinkedDisplayControl(lblSoilFlux) + + ucrInputAs.SetParameter(New RParameter("as", 7)) + ucrInputAs.AddQuotesIfUnrecognised = False + ucrInputAs.SetLinkedDisplayControl(lblAS) + + ucrInputBS.SetParameter(New RParameter("bs", 8)) + ucrInputBS.AddQuotesIfUnrecognised = False + ucrInputBS.SetLinkedDisplayControl(lblBS) + + bControlsInitialised = True + End Sub + + Public Sub SetRFunction(clsNewListFunction As RFunction, Optional bReset As Boolean = False) + clsListFunction = clsNewListFunction + If Not bControlsInitialised Then + InitialiseControls() + End If + ucrNudHeigth.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputLambda.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSigma.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSoilFlux.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSolarConstant.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputAs.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputBS.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + End Sub +End Class \ No newline at end of file diff --git a/instat/sdgPTConstants.Designer.vb b/instat/sdgPTConstants.Designer.vb new file mode 100644 index 00000000000..6b687eb9083 --- /dev/null +++ b/instat/sdgPTConstants.Designer.vb @@ -0,0 +1,292 @@ + _ +Partial Class sdgPTConstants + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + _ + 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 + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + _ + Private Sub InitializeComponent() + Me.ucrInputAs = New instat.ucrInputTextBox() + Me.ucrInputBS = New instat.ucrInputTextBox() + Me.lblBS = New System.Windows.Forms.Label() + Me.lblAS = New System.Windows.Forms.Label() + Me.ucrInputSoilFlux = New instat.ucrInputTextBox() + Me.ucrInputSolarConstant = New instat.ucrInputTextBox() + Me.ucrInputLambda = New instat.ucrInputTextBox() + Me.ucrInputSigma = New instat.ucrInputTextBox() + Me.lblSoilUnit = New System.Windows.Forms.Label() + Me.lblSoilFlux = New System.Windows.Forms.Label() + Me.lblSigma = New System.Windows.Forms.Label() + Me.lblSolarUnit = New System.Windows.Forms.Label() + Me.lblSigmaUnit = New System.Windows.Forms.Label() + Me.lblAlphaPT = New System.Windows.Forms.Label() + Me.lblLambdaUnit = New System.Windows.Forms.Label() + Me.lblSolarConstant = New System.Windows.Forms.Label() + Me.lblLambda = New System.Windows.Forms.Label() + Me.UcrButtonsSubdialogue1 = New instat.ucrButtonsSubdialogue() + Me.ucrInputAlphaPT = New instat.ucrInputTextBox() + Me.SuspendLayout() + ' + 'ucrInputAs + ' + Me.ucrInputAs.AddQuotesIfUnrecognised = True + Me.ucrInputAs.AutoSize = True + Me.ucrInputAs.IsMultiline = False + Me.ucrInputAs.IsReadOnly = False + Me.ucrInputAs.Location = New System.Drawing.Point(141, 149) + Me.ucrInputAs.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputAs.Name = "ucrInputAs" + Me.ucrInputAs.Size = New System.Drawing.Size(63, 21) + Me.ucrInputAs.TabIndex = 82 + ' + 'ucrInputBS + ' + Me.ucrInputBS.AddQuotesIfUnrecognised = True + Me.ucrInputBS.AutoSize = True + Me.ucrInputBS.IsMultiline = False + Me.ucrInputBS.IsReadOnly = False + Me.ucrInputBS.Location = New System.Drawing.Point(141, 178) + Me.ucrInputBS.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputBS.Name = "ucrInputBS" + Me.ucrInputBS.Size = New System.Drawing.Size(63, 21) + Me.ucrInputBS.TabIndex = 81 + ' + 'lblBS + ' + Me.lblBS.AutoSize = True + Me.lblBS.Location = New System.Drawing.Point(11, 186) + Me.lblBS.Name = "lblBS" + Me.lblBS.Size = New System.Drawing.Size(18, 13) + Me.lblBS.TabIndex = 80 + Me.lblBS.Text = "bs" + ' + 'lblAS + ' + Me.lblAS.AutoSize = True + Me.lblAS.Location = New System.Drawing.Point(11, 153) + Me.lblAS.Name = "lblAS" + Me.lblAS.Size = New System.Drawing.Size(18, 13) + Me.lblAS.TabIndex = 79 + Me.lblAS.Text = "as" + ' + 'ucrInputSoilFlux + ' + Me.ucrInputSoilFlux.AddQuotesIfUnrecognised = True + Me.ucrInputSoilFlux.AutoSize = True + Me.ucrInputSoilFlux.IsMultiline = False + Me.ucrInputSoilFlux.IsReadOnly = False + Me.ucrInputSoilFlux.Location = New System.Drawing.Point(141, 122) + Me.ucrInputSoilFlux.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSoilFlux.Name = "ucrInputSoilFlux" + Me.ucrInputSoilFlux.Size = New System.Drawing.Size(63, 21) + Me.ucrInputSoilFlux.TabIndex = 77 + ' + 'ucrInputSolarConstant + ' + Me.ucrInputSolarConstant.AddQuotesIfUnrecognised = True + Me.ucrInputSolarConstant.AutoSize = True + Me.ucrInputSolarConstant.IsMultiline = False + Me.ucrInputSolarConstant.IsReadOnly = False + Me.ucrInputSolarConstant.Location = New System.Drawing.Point(141, 41) + Me.ucrInputSolarConstant.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSolarConstant.Name = "ucrInputSolarConstant" + Me.ucrInputSolarConstant.Size = New System.Drawing.Size(63, 21) + Me.ucrInputSolarConstant.TabIndex = 76 + ' + 'ucrInputLambda + ' + Me.ucrInputLambda.AddQuotesIfUnrecognised = True + Me.ucrInputLambda.AutoSize = True + Me.ucrInputLambda.IsMultiline = False + Me.ucrInputLambda.IsReadOnly = False + Me.ucrInputLambda.Location = New System.Drawing.Point(141, 11) + Me.ucrInputLambda.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputLambda.Name = "ucrInputLambda" + Me.ucrInputLambda.Size = New System.Drawing.Size(63, 21) + Me.ucrInputLambda.TabIndex = 75 + ' + 'ucrInputSigma + ' + Me.ucrInputSigma.AddQuotesIfUnrecognised = True + Me.ucrInputSigma.AutoSize = True + Me.ucrInputSigma.IsMultiline = False + Me.ucrInputSigma.IsReadOnly = False + Me.ucrInputSigma.Location = New System.Drawing.Point(141, 96) + Me.ucrInputSigma.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputSigma.Name = "ucrInputSigma" + Me.ucrInputSigma.Size = New System.Drawing.Size(63, 21) + Me.ucrInputSigma.TabIndex = 74 + ' + 'lblSoilUnit + ' + Me.lblSoilUnit.AutoSize = True + Me.lblSoilUnit.Location = New System.Drawing.Point(219, 126) + Me.lblSoilUnit.Name = "lblSoilUnit" + Me.lblSoilUnit.Size = New System.Drawing.Size(82, 13) + Me.lblSoilUnit.TabIndex = 73 + Me.lblSoilUnit.Text = "MJ.m^-2.day^-1" + ' + 'lblSoilFlux + ' + Me.lblSoilFlux.AutoSize = True + Me.lblSoilFlux.Location = New System.Drawing.Point(11, 127) + Me.lblSoilFlux.Name = "lblSoilFlux" + Me.lblSoilFlux.Size = New System.Drawing.Size(72, 13) + Me.lblSoilFlux.TabIndex = 72 + Me.lblSoilFlux.Text = "Soil Heat Flux" + ' + 'lblSigma + ' + Me.lblSigma.AutoSize = True + Me.lblSigma.Location = New System.Drawing.Point(11, 101) + Me.lblSigma.Name = "lblSigma" + Me.lblSigma.Size = New System.Drawing.Size(36, 13) + Me.lblSigma.TabIndex = 71 + Me.lblSigma.Text = "Sigma" + ' + 'lblSolarUnit + ' + Me.lblSolarUnit.AutoSize = True + Me.lblSolarUnit.Location = New System.Drawing.Point(219, 45) + Me.lblSolarUnit.Name = "lblSolarUnit" + Me.lblSolarUnit.Size = New System.Drawing.Size(81, 13) + Me.lblSolarUnit.TabIndex = 69 + Me.lblSolarUnit.Text = "MJ.m^-2.min^-1" + ' + 'lblSigmaUnit + ' + Me.lblSigmaUnit.AutoSize = True + Me.lblSigmaUnit.Location = New System.Drawing.Point(219, 100) + Me.lblSigmaUnit.Name = "lblSigmaUnit" + Me.lblSigmaUnit.Size = New System.Drawing.Size(107, 13) + Me.lblSigmaUnit.TabIndex = 68 + Me.lblSigmaUnit.Text = "MJ.K^-4.m^-2.day^-1" + ' + 'lblAlphaPT + ' + Me.lblAlphaPT.AutoSize = True + Me.lblAlphaPT.Location = New System.Drawing.Point(11, 73) + Me.lblAlphaPT.Name = "lblAlphaPT" + Me.lblAlphaPT.Size = New System.Drawing.Size(48, 13) + Me.lblAlphaPT.TabIndex = 67 + Me.lblAlphaPT.Text = "AlphaPT" + ' + 'lblLambdaUnit + ' + Me.lblLambdaUnit.AutoSize = True + Me.lblLambdaUnit.Location = New System.Drawing.Point(219, 15) + Me.lblLambdaUnit.Name = "lblLambdaUnit" + Me.lblLambdaUnit.Size = New System.Drawing.Size(51, 13) + Me.lblLambdaUnit.TabIndex = 66 + Me.lblLambdaUnit.Text = "MJ.kg^-1" + ' + 'lblSolarConstant + ' + Me.lblSolarConstant.AutoSize = True + Me.lblSolarConstant.Location = New System.Drawing.Point(11, 46) + Me.lblSolarConstant.Name = "lblSolarConstant" + Me.lblSolarConstant.Size = New System.Drawing.Size(101, 13) + Me.lblSolarConstant.TabIndex = 65 + Me.lblSolarConstant.Text = "Solar Constant(Gsc)" + ' + 'lblLambda + ' + Me.lblLambda.AutoSize = True + Me.lblLambda.Location = New System.Drawing.Point(11, 16) + Me.lblLambda.Name = "lblLambda" + Me.lblLambda.Size = New System.Drawing.Size(45, 13) + Me.lblLambda.TabIndex = 64 + Me.lblLambda.Text = "Lambda" + ' + 'UcrButtonsSubdialogue1 + ' + Me.UcrButtonsSubdialogue1.AutoSize = True + Me.UcrButtonsSubdialogue1.Location = New System.Drawing.Point(34, 207) + Me.UcrButtonsSubdialogue1.Margin = New System.Windows.Forms.Padding(4) + Me.UcrButtonsSubdialogue1.Name = "UcrButtonsSubdialogue1" + Me.UcrButtonsSubdialogue1.Size = New System.Drawing.Size(259, 29) + Me.UcrButtonsSubdialogue1.TabIndex = 63 + ' + 'ucrInputAlphaPT + ' + Me.ucrInputAlphaPT.AddQuotesIfUnrecognised = True + Me.ucrInputAlphaPT.AutoSize = True + Me.ucrInputAlphaPT.IsMultiline = False + Me.ucrInputAlphaPT.IsReadOnly = False + Me.ucrInputAlphaPT.Location = New System.Drawing.Point(141, 69) + Me.ucrInputAlphaPT.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputAlphaPT.Name = "ucrInputAlphaPT" + Me.ucrInputAlphaPT.Size = New System.Drawing.Size(63, 21) + Me.ucrInputAlphaPT.TabIndex = 83 + ' + 'sdgPTConstants + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(325, 246) + Me.Controls.Add(Me.ucrInputAlphaPT) + Me.Controls.Add(Me.ucrInputAs) + Me.Controls.Add(Me.ucrInputBS) + Me.Controls.Add(Me.lblBS) + Me.Controls.Add(Me.lblAS) + Me.Controls.Add(Me.ucrInputSoilFlux) + Me.Controls.Add(Me.ucrInputSolarConstant) + Me.Controls.Add(Me.ucrInputLambda) + Me.Controls.Add(Me.ucrInputSigma) + Me.Controls.Add(Me.lblSoilUnit) + Me.Controls.Add(Me.lblSoilFlux) + Me.Controls.Add(Me.lblSigma) + Me.Controls.Add(Me.lblSolarUnit) + Me.Controls.Add(Me.lblSigmaUnit) + Me.Controls.Add(Me.lblAlphaPT) + Me.Controls.Add(Me.lblLambdaUnit) + Me.Controls.Add(Me.lblSolarConstant) + Me.Controls.Add(Me.lblLambda) + Me.Controls.Add(Me.UcrButtonsSubdialogue1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgPTConstants" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Priestley Taylor Constants" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ucrInputAs As ucrInputTextBox + Friend WithEvents ucrInputBS As ucrInputTextBox + Friend WithEvents lblBS As Label + Friend WithEvents lblAS As Label + Friend WithEvents ucrInputSoilFlux As ucrInputTextBox + Friend WithEvents ucrInputSolarConstant As ucrInputTextBox + Friend WithEvents ucrInputLambda As ucrInputTextBox + Friend WithEvents ucrInputSigma As ucrInputTextBox + Friend WithEvents lblSoilUnit As Label + Friend WithEvents lblSoilFlux As Label + Friend WithEvents lblSigma As Label + Friend WithEvents lblSolarUnit As Label + Friend WithEvents lblSigmaUnit As Label + Friend WithEvents lblAlphaPT As Label + Friend WithEvents lblLambdaUnit As Label + Friend WithEvents lblSolarConstant As Label + Friend WithEvents lblLambda As Label + Friend WithEvents UcrButtonsSubdialogue1 As ucrButtonsSubdialogue + Friend WithEvents ucrInputAlphaPT As ucrInputTextBox +End Class diff --git a/instat/sdgPTConstants.resx b/instat/sdgPTConstants.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgPTConstants.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/instat/sdgPTConstants.vb b/instat/sdgPTConstants.vb new file mode 100644 index 00000000000..d520b9608c4 --- /dev/null +++ b/instat/sdgPTConstants.vb @@ -0,0 +1,72 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations +Public Class sdgPTConstants + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + Private bControlsInitialised As Boolean = False + Private clsListFunction As New RFunction + + Private Sub sdgPTConstants_Load(sender As Object, e As EventArgs) Handles UcrButtonsSubdialogue1.Load + autoTranslate(Me) + End Sub + + Private Sub InitialiseControls() + ucrInputLambda.SetParameter(New RParameter("lambda", 1)) + ucrInputLambda.AddQuotesIfUnrecognised = False + ucrInputLambda.SetLinkedDisplayControl(lblLambda) + + ucrInputSigma.SetParameter(New RParameter("sigma", 4)) + ucrInputSigma.AddQuotesIfUnrecognised = False + + ucrInputSolarConstant.SetParameter(New RParameter("Gsc", 3)) + ucrInputSolarConstant.AddQuotesIfUnrecognised = False + ucrInputSolarConstant.SetLinkedDisplayControl(lblSolarConstant) + + ucrInputAlphaPT.SetParameter(New RParameter("alphaPT", 5)) + ucrInputAlphaPT.AddQuotesIfUnrecognised = False + ucrInputAlphaPT.SetLinkedDisplayControl(lblAlphaPT) + + ucrInputSoilFlux.SetParameter(New RParameter("G", 6)) + ucrInputSoilFlux.AddQuotesIfUnrecognised = False + ucrInputSoilFlux.SetLinkedDisplayControl(lblSoilFlux) + + ucrInputAs.SetParameter(New RParameter("as", 7)) + ucrInputAs.AddQuotesIfUnrecognised = False + ucrInputAs.SetLinkedDisplayControl(lblAS) + + ucrInputBS.SetParameter(New RParameter("bs", 8)) + ucrInputBS.AddQuotesIfUnrecognised = False + ucrInputBS.SetLinkedDisplayControl(lblBS) + + bControlsInitialised = True + End Sub + + Public Sub SetRFunction(clsNewListFunction As RFunction, Optional bReset As Boolean = False) + clsListFunction = clsNewListFunction + If Not bControlsInitialised Then + InitialiseControls() + End If + ucrInputAlphaPT.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputLambda.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSigma.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSoilFlux.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputSolarConstant.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputAs.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + ucrInputBS.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) + End Sub +End Class \ No newline at end of file