diff --git a/instat/dlgExportClimaticDefinitions.Designer.vb b/instat/dlgExportClimaticDefinitions.Designer.vb index d29ab990892..e93f8fc506f 100644 --- a/instat/dlgExportClimaticDefinitions.Designer.vb +++ b/instat/dlgExportClimaticDefinitions.Designer.vb @@ -24,89 +24,133 @@ Partial Class dlgExportClimaticDefinitions Private Sub InitializeComponent() Me.lblStation = New System.Windows.Forms.Label() Me.lblCountry = New System.Windows.Forms.Label() - Me.ucrInputCountry = New instat.ucrInputTextBox() + Me.lblMonth = New System.Windows.Forms.Label() + Me.lblYear = New System.Windows.Forms.Label() + Me.grpSummaries = New System.Windows.Forms.GroupBox() + Me.ucrChkMonthlyTemp = New instat.ucrCheck() Me.ucrChkSeasonStartProp = New instat.ucrCheck() Me.ucrChkExtremes = New instat.ucrCheck() Me.ucrChkCropSuccessProp = New instat.ucrCheck() Me.ucrChkAnnualTemp = New instat.ucrCheck() Me.ucrChkAnnualRainfall = New instat.ucrCheck() - Me.lblMonth = New System.Windows.Forms.Label() - Me.lblYear = New System.Windows.Forms.Label() - Me.ucrReceiverMonth = New instat.ucrReceiverSingle() - Me.ucrReceiverYear = New instat.ucrReceiverSingle() - Me.ucrChkIncludeSummaryData = New instat.ucrCheck() - Me.grpSummaries = New System.Windows.Forms.GroupBox() - Me.ucrChkMonthlyTemp = New instat.ucrCheck() Me.lblCropData = New System.Windows.Forms.Label() Me.lblDataByYearMonth = New System.Windows.Forms.Label() Me.lblDataByYear = New System.Windows.Forms.Label() Me.lblRain = New System.Windows.Forms.Label() + Me.cmdDefine = New System.Windows.Forms.Button() + Me.lblDefinitionsID = New System.Windows.Forms.Label() + Me.rdoUploadSummaries = New System.Windows.Forms.RadioButton() + Me.rdoUpdateMetadata = New System.Windows.Forms.RadioButton() + Me.lblDistrict = New System.Windows.Forms.Label() + Me.lblElavation = New System.Windows.Forms.Label() + Me.lblLatitude = New System.Windows.Forms.Label() + Me.lblLongitude = New System.Windows.Forms.Label() + Me.lblStationName = New System.Windows.Forms.Label() + Me.ucrPnlExportGoogle = New instat.UcrPanel() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrInputDefinitionsID = New instat.ucrInputTextBox() + Me.ucrInputCountry = New instat.ucrInputTextBox() + Me.ucrReceiverMonth = New instat.ucrReceiverSingle() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.ucrChkIncludeSummaryData = New instat.ucrCheck() Me.ucrReceiverRain = New instat.ucrReceiverSingle() Me.ucrSelectorExportDefinitions = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverDataYear = New instat.ucrReceiverSingle() Me.ucrReceiverDataYearMonth = New instat.ucrReceiverSingle() Me.ucrReceiverCropData = New instat.ucrReceiverSingle() + Me.ucrReceiverLongititude = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverElavation = New instat.ucrReceiverSingle() + Me.ucrReceiverDistrict = New instat.ucrReceiverSingle() + Me.ucrReceiverStationName = New instat.ucrReceiverSingle() Me.lblExport = New System.Windows.Forms.Label() Me.cmdChooseFile = New System.Windows.Forms.Button() Me.ucrInputTokenPath = New instat.ucrInputTextBox() - Me.cmdDefine = New System.Windows.Forms.Button() - Me.lblDefinitionsID = New System.Windows.Forms.Label() - Me.ucrInputDefinitionsID = New instat.ucrInputTextBox() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrInputCountryMetadata = New instat.ucrInputTextBox() + Me.lblCountryMetada = New System.Windows.Forms.Label() Me.grpSummaries.SuspendLayout() Me.SuspendLayout() ' 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(498, 25) - Me.lblStation.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblStation.Location = New System.Drawing.Point(332, 75) Me.lblStation.Name = "lblStation" - Me.lblStation.Size = New System.Drawing.Size(64, 20) - Me.lblStation.TabIndex = 1 + Me.lblStation.Size = New System.Drawing.Size(43, 13) + Me.lblStation.TabIndex = 4 Me.lblStation.Text = "Station:" ' 'lblCountry ' Me.lblCountry.AutoSize = True - Me.lblCountry.Location = New System.Drawing.Point(498, 492) - Me.lblCountry.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblCountry.Location = New System.Drawing.Point(332, 380) Me.lblCountry.Name = "lblCountry" - Me.lblCountry.Size = New System.Drawing.Size(68, 20) - Me.lblCountry.TabIndex = 17 + Me.lblCountry.Size = New System.Drawing.Size(46, 13) + Me.lblCountry.TabIndex = 20 Me.lblCountry.Text = "Country:" ' - 'ucrInputCountry + 'lblMonth ' - Me.ucrInputCountry.AddQuotesIfUnrecognised = True - Me.ucrInputCountry.AutoSize = True - Me.ucrInputCountry.IsMultiline = False - Me.ucrInputCountry.IsReadOnly = False - Me.ucrInputCountry.Location = New System.Drawing.Point(498, 517) - Me.ucrInputCountry.Margin = New System.Windows.Forms.Padding(14) - Me.ucrInputCountry.Name = "ucrInputCountry" - Me.ucrInputCountry.Size = New System.Drawing.Size(177, 32) - Me.ucrInputCountry.TabIndex = 18 + Me.lblMonth.AutoSize = True + Me.lblMonth.Location = New System.Drawing.Point(332, 147) + Me.lblMonth.Name = "lblMonth" + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 8 + Me.lblMonth.Text = "Month:" + ' + 'lblYear + ' + Me.lblYear.AutoSize = True + Me.lblYear.Location = New System.Drawing.Point(332, 107) + Me.lblYear.Name = "lblYear" + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 6 + Me.lblYear.Text = "Year:" + ' + 'grpSummaries + ' + Me.grpSummaries.Controls.Add(Me.ucrChkMonthlyTemp) + Me.grpSummaries.Controls.Add(Me.ucrChkSeasonStartProp) + Me.grpSummaries.Controls.Add(Me.ucrChkExtremes) + Me.grpSummaries.Controls.Add(Me.ucrChkCropSuccessProp) + Me.grpSummaries.Controls.Add(Me.ucrChkAnnualTemp) + Me.grpSummaries.Controls.Add(Me.ucrChkAnnualRainfall) + Me.grpSummaries.Location = New System.Drawing.Point(4, 260) + Me.grpSummaries.Name = "grpSummaries" + Me.grpSummaries.Size = New System.Drawing.Size(313, 125) + Me.grpSummaries.TabIndex = 22 + Me.grpSummaries.TabStop = False + Me.grpSummaries.Text = "Summaries" + ' + 'ucrChkMonthlyTemp + ' + Me.ucrChkMonthlyTemp.AutoSize = True + Me.ucrChkMonthlyTemp.Checked = False + Me.ucrChkMonthlyTemp.Location = New System.Drawing.Point(8, 96) + Me.ucrChkMonthlyTemp.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkMonthlyTemp.Name = "ucrChkMonthlyTemp" + Me.ucrChkMonthlyTemp.Size = New System.Drawing.Size(147, 34) + Me.ucrChkMonthlyTemp.TabIndex = 4 ' 'ucrChkSeasonStartProp ' Me.ucrChkSeasonStartProp.AutoSize = True Me.ucrChkSeasonStartProp.Checked = False - Me.ucrChkSeasonStartProp.Location = New System.Drawing.Point(236, 71) - Me.ucrChkSeasonStartProp.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkSeasonStartProp.Location = New System.Drawing.Point(157, 64) + Me.ucrChkSeasonStartProp.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkSeasonStartProp.Name = "ucrChkSeasonStartProp" - Me.ucrChkSeasonStartProp.Size = New System.Drawing.Size(226, 52) + Me.ucrChkSeasonStartProp.Size = New System.Drawing.Size(151, 34) Me.ucrChkSeasonStartProp.TabIndex = 3 ' 'ucrChkExtremes ' Me.ucrChkExtremes.AutoSize = True Me.ucrChkExtremes.Checked = False - Me.ucrChkExtremes.Location = New System.Drawing.Point(236, 120) - Me.ucrChkExtremes.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkExtremes.Location = New System.Drawing.Point(157, 96) + Me.ucrChkExtremes.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkExtremes.Name = "ucrChkExtremes" - Me.ucrChkExtremes.Size = New System.Drawing.Size(220, 52) + Me.ucrChkExtremes.Size = New System.Drawing.Size(147, 34) Me.ucrChkExtremes.TabIndex = 5 Me.ucrChkExtremes.Visible = False ' @@ -114,166 +158,262 @@ Partial Class dlgExportClimaticDefinitions ' Me.ucrChkCropSuccessProp.AutoSize = True Me.ucrChkCropSuccessProp.Checked = False - Me.ucrChkCropSuccessProp.Location = New System.Drawing.Point(236, 28) - Me.ucrChkCropSuccessProp.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkCropSuccessProp.Location = New System.Drawing.Point(157, 36) + Me.ucrChkCropSuccessProp.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkCropSuccessProp.Name = "ucrChkCropSuccessProp" - Me.ucrChkCropSuccessProp.Size = New System.Drawing.Size(230, 52) + Me.ucrChkCropSuccessProp.Size = New System.Drawing.Size(153, 34) Me.ucrChkCropSuccessProp.TabIndex = 1 ' 'ucrChkAnnualTemp ' Me.ucrChkAnnualTemp.AutoSize = True Me.ucrChkAnnualTemp.Checked = False - Me.ucrChkAnnualTemp.Location = New System.Drawing.Point(12, 71) - Me.ucrChkAnnualTemp.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkAnnualTemp.Location = New System.Drawing.Point(8, 64) + Me.ucrChkAnnualTemp.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkAnnualTemp.Name = "ucrChkAnnualTemp" - Me.ucrChkAnnualTemp.Size = New System.Drawing.Size(224, 52) + Me.ucrChkAnnualTemp.Size = New System.Drawing.Size(149, 34) Me.ucrChkAnnualTemp.TabIndex = 2 ' 'ucrChkAnnualRainfall ' Me.ucrChkAnnualRainfall.AutoSize = True Me.ucrChkAnnualRainfall.Checked = False - Me.ucrChkAnnualRainfall.Location = New System.Drawing.Point(12, 28) - Me.ucrChkAnnualRainfall.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkAnnualRainfall.Location = New System.Drawing.Point(8, 36) + Me.ucrChkAnnualRainfall.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkAnnualRainfall.Name = "ucrChkAnnualRainfall" - Me.ucrChkAnnualRainfall.Size = New System.Drawing.Size(224, 52) + Me.ucrChkAnnualRainfall.Size = New System.Drawing.Size(149, 34) Me.ucrChkAnnualRainfall.TabIndex = 0 ' - 'lblMonth + 'lblCropData ' - Me.lblMonth.AutoSize = True - Me.lblMonth.Location = New System.Drawing.Point(498, 136) - Me.lblMonth.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMonth.Name = "lblMonth" - Me.lblMonth.Size = New System.Drawing.Size(58, 20) - Me.lblMonth.TabIndex = 5 - Me.lblMonth.Text = "Month:" + Me.lblCropData.AutoSize = True + Me.lblCropData.Location = New System.Drawing.Point(332, 303) + Me.lblCropData.Name = "lblCropData" + Me.lblCropData.Size = New System.Drawing.Size(58, 13) + Me.lblCropData.TabIndex = 16 + Me.lblCropData.Text = "Crop Data:" ' - 'lblYear + 'lblDataByYearMonth ' - Me.lblYear.AutoSize = True - Me.lblYear.Location = New System.Drawing.Point(498, 75) - Me.lblYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(47, 20) - Me.lblYear.TabIndex = 3 - Me.lblYear.Text = "Year:" + Me.lblDataByYearMonth.AutoSize = True + Me.lblDataByYearMonth.Location = New System.Drawing.Point(332, 263) + Me.lblDataByYearMonth.Name = "lblDataByYearMonth" + Me.lblDataByYearMonth.Size = New System.Drawing.Size(127, 13) + Me.lblDataByYearMonth.TabIndex = 14 + Me.lblDataByYearMonth.Text = "Data By Year and Month:" + ' + 'lblDataByYear + ' + Me.lblDataByYear.AutoSize = True + Me.lblDataByYear.Location = New System.Drawing.Point(332, 223) + Me.lblDataByYear.Name = "lblDataByYear" + Me.lblDataByYear.Size = New System.Drawing.Size(73, 13) + Me.lblDataByYear.TabIndex = 12 + Me.lblDataByYear.Text = "Data By Year:" + ' + 'lblRain + ' + Me.lblRain.AutoSize = True + Me.lblRain.Location = New System.Drawing.Point(332, 187) + Me.lblRain.Name = "lblRain" + Me.lblRain.Size = New System.Drawing.Size(32, 13) + Me.lblRain.TabIndex = 10 + Me.lblRain.Text = "Rain:" + ' + 'cmdDefine + ' + Me.cmdDefine.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdDefine.Location = New System.Drawing.Point(225, 393) + Me.cmdDefine.Name = "cmdDefine" + Me.cmdDefine.Size = New System.Drawing.Size(80, 29) + Me.cmdDefine.TabIndex = 24 + Me.cmdDefine.Text = "Define" + Me.cmdDefine.UseVisualStyleBackColor = True + ' + 'lblDefinitionsID + ' + Me.lblDefinitionsID.AutoSize = True + Me.lblDefinitionsID.Location = New System.Drawing.Point(337, 340) + Me.lblDefinitionsID.Name = "lblDefinitionsID" + Me.lblDefinitionsID.Size = New System.Drawing.Size(73, 13) + Me.lblDefinitionsID.TabIndex = 18 + Me.lblDefinitionsID.Text = "Definitions ID:" + ' + 'rdoUploadSummaries + ' + Me.rdoUploadSummaries.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoUploadSummaries.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoUploadSummaries.FlatAppearance.BorderSize = 2 + Me.rdoUploadSummaries.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoUploadSummaries.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoUploadSummaries.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoUploadSummaries.Location = New System.Drawing.Point(229, 3) + Me.rdoUploadSummaries.Name = "rdoUploadSummaries" + Me.rdoUploadSummaries.Size = New System.Drawing.Size(122, 27) + Me.rdoUploadSummaries.TabIndex = 2 + Me.rdoUploadSummaries.Text = "Upload Summaries" + Me.rdoUploadSummaries.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoUploadSummaries.UseVisualStyleBackColor = True + ' + 'rdoUpdateMetadata + ' + Me.rdoUpdateMetadata.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoUpdateMetadata.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoUpdateMetadata.FlatAppearance.BorderSize = 2 + Me.rdoUpdateMetadata.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoUpdateMetadata.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoUpdateMetadata.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoUpdateMetadata.Location = New System.Drawing.Point(116, 3) + Me.rdoUpdateMetadata.Name = "rdoUpdateMetadata" + Me.rdoUpdateMetadata.Size = New System.Drawing.Size(116, 27) + Me.rdoUpdateMetadata.TabIndex = 1 + Me.rdoUpdateMetadata.Text = "Update Metadata" + Me.rdoUpdateMetadata.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoUpdateMetadata.UseVisualStyleBackColor = True + ' + 'lblDistrict + ' + Me.lblDistrict.AutoSize = True + Me.lblDistrict.Location = New System.Drawing.Point(326, 266) + Me.lblDistrict.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblDistrict.Name = "lblDistrict" + Me.lblDistrict.Size = New System.Drawing.Size(39, 13) + Me.lblDistrict.TabIndex = 38 + Me.lblDistrict.Text = "District" + ' + 'lblElavation + ' + Me.lblElavation.AutoSize = True + Me.lblElavation.Location = New System.Drawing.Point(325, 218) + Me.lblElavation.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblElavation.Name = "lblElavation" + Me.lblElavation.Size = New System.Drawing.Size(51, 13) + Me.lblElavation.TabIndex = 36 + Me.lblElavation.Text = "Elevation" + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.Location = New System.Drawing.Point(324, 169) + Me.lblLatitude.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblLatitude.Name = "lblLatitude" + Me.lblLatitude.Size = New System.Drawing.Size(45, 13) + Me.lblLatitude.TabIndex = 34 + Me.lblLatitude.Text = "Latitude" + ' + 'lblLongitude + ' + Me.lblLongitude.AutoSize = True + Me.lblLongitude.Location = New System.Drawing.Point(323, 119) + Me.lblLongitude.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblLongitude.Name = "lblLongitude" + Me.lblLongitude.Size = New System.Drawing.Size(57, 13) + Me.lblLongitude.TabIndex = 32 + Me.lblLongitude.Text = "Longitude " + ' + 'lblStationName + ' + Me.lblStationName.AutoSize = True + Me.lblStationName.Location = New System.Drawing.Point(323, 74) + Me.lblStationName.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblStationName.Name = "lblStationName" + Me.lblStationName.Size = New System.Drawing.Size(71, 13) + Me.lblStationName.TabIndex = 30 + Me.lblStationName.Text = "Station Name" + ' + 'ucrPnlExportGoogle + ' + Me.ucrPnlExportGoogle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlExportGoogle.Location = New System.Drawing.Point(113, -2) + Me.ucrPnlExportGoogle.Margin = New System.Windows.Forms.Padding(6) + Me.ucrPnlExportGoogle.Name = "ucrPnlExportGoogle" + Me.ucrPnlExportGoogle.Size = New System.Drawing.Size(249, 33) + Me.ucrPnlExportGoogle.TabIndex = 0 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(332, 88) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 5 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrInputDefinitionsID + ' + Me.ucrInputDefinitionsID.AddQuotesIfUnrecognised = True + Me.ucrInputDefinitionsID.AutoSize = True + Me.ucrInputDefinitionsID.IsMultiline = False + Me.ucrInputDefinitionsID.IsReadOnly = False + Me.ucrInputDefinitionsID.Location = New System.Drawing.Point(333, 355) + Me.ucrInputDefinitionsID.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputDefinitionsID.Name = "ucrInputDefinitionsID" + Me.ucrInputDefinitionsID.Size = New System.Drawing.Size(118, 21) + Me.ucrInputDefinitionsID.TabIndex = 19 + ' + 'ucrInputCountry + ' + Me.ucrInputCountry.AddQuotesIfUnrecognised = True + Me.ucrInputCountry.AutoSize = True + Me.ucrInputCountry.IsMultiline = False + Me.ucrInputCountry.IsReadOnly = False + Me.ucrInputCountry.Location = New System.Drawing.Point(332, 396) + Me.ucrInputCountry.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputCountry.Name = "ucrInputCountry" + Me.ucrInputCountry.Size = New System.Drawing.Size(118, 21) + Me.ucrInputCountry.TabIndex = 21 ' 'ucrReceiverMonth ' Me.ucrReceiverMonth.AutoSize = True Me.ucrReceiverMonth.frmParent = Me - Me.ucrReceiverMonth.Location = New System.Drawing.Point(498, 161) + Me.ucrReceiverMonth.Location = New System.Drawing.Point(332, 163) Me.ucrReceiverMonth.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMonth.Name = "ucrReceiverMonth" Me.ucrReceiverMonth.Selector = Nothing - Me.ucrReceiverMonth.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverMonth.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverMonth.strNcFilePath = "" - Me.ucrReceiverMonth.TabIndex = 6 + Me.ucrReceiverMonth.TabIndex = 9 Me.ucrReceiverMonth.ucrSelector = Nothing ' 'ucrReceiverYear ' Me.ucrReceiverYear.AutoSize = True Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Location = New System.Drawing.Point(498, 100) + Me.ucrReceiverYear.Location = New System.Drawing.Point(332, 122) Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverYear.Name = "ucrReceiverYear" Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 4 + Me.ucrReceiverYear.TabIndex = 7 Me.ucrReceiverYear.ucrSelector = Nothing ' 'ucrChkIncludeSummaryData ' Me.ucrChkIncludeSummaryData.AutoSize = True Me.ucrChkIncludeSummaryData.Checked = False - Me.ucrChkIncludeSummaryData.Location = New System.Drawing.Point(6, 513) - Me.ucrChkIncludeSummaryData.Margin = New System.Windows.Forms.Padding(9) + Me.ucrChkIncludeSummaryData.Location = New System.Drawing.Point(4, 394) + Me.ucrChkIncludeSummaryData.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkIncludeSummaryData.Name = "ucrChkIncludeSummaryData" - Me.ucrChkIncludeSummaryData.Size = New System.Drawing.Size(332, 48) - Me.ucrChkIncludeSummaryData.TabIndex = 20 - ' - 'grpSummaries - ' - Me.grpSummaries.Controls.Add(Me.ucrChkMonthlyTemp) - Me.grpSummaries.Controls.Add(Me.ucrChkSeasonStartProp) - Me.grpSummaries.Controls.Add(Me.ucrChkExtremes) - Me.grpSummaries.Controls.Add(Me.ucrChkCropSuccessProp) - Me.grpSummaries.Controls.Add(Me.ucrChkAnnualTemp) - Me.grpSummaries.Controls.Add(Me.ucrChkAnnualRainfall) - Me.grpSummaries.Location = New System.Drawing.Point(6, 325) - Me.grpSummaries.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.grpSummaries.Size = New System.Drawing.Size(470, 177) - Me.grpSummaries.TabIndex = 19 - Me.grpSummaries.TabStop = False - Me.grpSummaries.Text = "Summaries" - ' - 'ucrChkMonthlyTemp - ' - Me.ucrChkMonthlyTemp.AutoSize = True - Me.ucrChkMonthlyTemp.Checked = False - Me.ucrChkMonthlyTemp.Location = New System.Drawing.Point(12, 120) - Me.ucrChkMonthlyTemp.Margin = New System.Windows.Forms.Padding(9) - Me.ucrChkMonthlyTemp.Name = "ucrChkMonthlyTemp" - Me.ucrChkMonthlyTemp.Size = New System.Drawing.Size(220, 52) - Me.ucrChkMonthlyTemp.TabIndex = 4 - ' - 'lblCropData - ' - Me.lblCropData.AutoSize = True - Me.lblCropData.Location = New System.Drawing.Point(498, 376) - Me.lblCropData.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblCropData.Name = "lblCropData" - Me.lblCropData.Size = New System.Drawing.Size(86, 20) - Me.lblCropData.TabIndex = 13 - Me.lblCropData.Text = "Crop Data:" - ' - 'lblDataByYearMonth - ' - Me.lblDataByYearMonth.AutoSize = True - Me.lblDataByYearMonth.Location = New System.Drawing.Point(498, 315) - Me.lblDataByYearMonth.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblDataByYearMonth.Name = "lblDataByYearMonth" - Me.lblDataByYearMonth.Size = New System.Drawing.Size(188, 20) - Me.lblDataByYearMonth.TabIndex = 11 - Me.lblDataByYearMonth.Text = "Data By Year and Month:" - ' - 'lblDataByYear - ' - Me.lblDataByYear.AutoSize = True - Me.lblDataByYear.Location = New System.Drawing.Point(498, 254) - Me.lblDataByYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblDataByYear.Name = "lblDataByYear" - Me.lblDataByYear.Size = New System.Drawing.Size(108, 20) - Me.lblDataByYear.TabIndex = 9 - Me.lblDataByYear.Text = "Data By Year:" - ' - 'lblRain - ' - Me.lblRain.AutoSize = True - Me.lblRain.Location = New System.Drawing.Point(498, 198) - Me.lblRain.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(46, 20) - Me.lblRain.TabIndex = 7 - Me.lblRain.Text = "Rain:" + Me.ucrChkIncludeSummaryData.Size = New System.Drawing.Size(221, 31) + Me.ucrChkIncludeSummaryData.TabIndex = 23 ' 'ucrReceiverRain ' Me.ucrReceiverRain.AutoSize = True Me.ucrReceiverRain.frmParent = Me - Me.ucrReceiverRain.Location = New System.Drawing.Point(498, 223) + Me.ucrReceiverRain.Location = New System.Drawing.Point(332, 203) Me.ucrReceiverRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRain.Name = "ucrReceiverRain" Me.ucrReceiverRain.Selector = Nothing - Me.ucrReceiverRain.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverRain.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverRain.strNcFilePath = "" - Me.ucrReceiverRain.TabIndex = 8 + Me.ucrReceiverRain.TabIndex = 11 Me.ucrReceiverRain.ucrSelector = Nothing ' 'ucrSelectorExportDefinitions @@ -282,79 +422,142 @@ Partial Class dlgExportClimaticDefinitions Me.ucrSelectorExportDefinitions.bDropUnusedFilterLevels = False Me.ucrSelectorExportDefinitions.bShowHiddenColumns = False Me.ucrSelectorExportDefinitions.bUseCurrentFilter = True - Me.ucrSelectorExportDefinitions.Location = New System.Drawing.Point(6, 12) + Me.ucrSelectorExportDefinitions.Location = New System.Drawing.Point(4, 74) Me.ucrSelectorExportDefinitions.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorExportDefinitions.Name = "ucrSelectorExportDefinitions" - Me.ucrSelectorExportDefinitions.Size = New System.Drawing.Size(320, 282) - Me.ucrSelectorExportDefinitions.TabIndex = 0 + Me.ucrSelectorExportDefinitions.Size = New System.Drawing.Size(213, 183) + Me.ucrSelectorExportDefinitions.TabIndex = 3 ' 'ucrBase ' Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(6, 622) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) + Me.ucrBase.Location = New System.Drawing.Point(4, 434) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(615, 92) + Me.ucrBase.Size = New System.Drawing.Size(410, 60) Me.ucrBase.TabIndex = 25 ' 'ucrReceiverDataYear ' Me.ucrReceiverDataYear.AutoSize = True Me.ucrReceiverDataYear.frmParent = Me - Me.ucrReceiverDataYear.Location = New System.Drawing.Point(498, 279) + Me.ucrReceiverDataYear.Location = New System.Drawing.Point(332, 240) Me.ucrReceiverDataYear.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDataYear.Name = "ucrReceiverDataYear" Me.ucrReceiverDataYear.Selector = Nothing - Me.ucrReceiverDataYear.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverDataYear.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDataYear.strNcFilePath = "" - Me.ucrReceiverDataYear.TabIndex = 10 + Me.ucrReceiverDataYear.TabIndex = 13 Me.ucrReceiverDataYear.ucrSelector = Nothing ' 'ucrReceiverDataYearMonth ' Me.ucrReceiverDataYearMonth.AutoSize = True Me.ucrReceiverDataYearMonth.frmParent = Me - Me.ucrReceiverDataYearMonth.Location = New System.Drawing.Point(498, 340) + Me.ucrReceiverDataYearMonth.Location = New System.Drawing.Point(332, 279) Me.ucrReceiverDataYearMonth.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverDataYearMonth.Name = "ucrReceiverDataYearMonth" Me.ucrReceiverDataYearMonth.Selector = Nothing - Me.ucrReceiverDataYearMonth.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverDataYearMonth.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDataYearMonth.strNcFilePath = "" - Me.ucrReceiverDataYearMonth.TabIndex = 12 + Me.ucrReceiverDataYearMonth.TabIndex = 15 Me.ucrReceiverDataYearMonth.ucrSelector = Nothing ' 'ucrReceiverCropData ' Me.ucrReceiverCropData.AutoSize = True Me.ucrReceiverCropData.frmParent = Me - Me.ucrReceiverCropData.Location = New System.Drawing.Point(498, 401) + Me.ucrReceiverCropData.Location = New System.Drawing.Point(332, 319) Me.ucrReceiverCropData.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverCropData.Name = "ucrReceiverCropData" Me.ucrReceiverCropData.Selector = Nothing - Me.ucrReceiverCropData.Size = New System.Drawing.Size(180, 31) + Me.ucrReceiverCropData.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverCropData.strNcFilePath = "" - Me.ucrReceiverCropData.TabIndex = 14 + Me.ucrReceiverCropData.TabIndex = 17 Me.ucrReceiverCropData.ucrSelector = Nothing ' + 'ucrReceiverLongititude + ' + Me.ucrReceiverLongititude.AutoSize = True + Me.ucrReceiverLongititude.frmParent = Me + Me.ucrReceiverLongititude.Location = New System.Drawing.Point(321, 136) + Me.ucrReceiverLongititude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongititude.Name = "ucrReceiverLongititude" + Me.ucrReceiverLongititude.Selector = Nothing + Me.ucrReceiverLongititude.Size = New System.Drawing.Size(120, 23) + Me.ucrReceiverLongititude.strNcFilePath = "" + Me.ucrReceiverLongititude.TabIndex = 33 + Me.ucrReceiverLongititude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(321, 188) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 35 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverElavation + ' + Me.ucrReceiverElavation.AutoSize = True + Me.ucrReceiverElavation.frmParent = Me + Me.ucrReceiverElavation.Location = New System.Drawing.Point(321, 236) + Me.ucrReceiverElavation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverElavation.Name = "ucrReceiverElavation" + Me.ucrReceiverElavation.Selector = Nothing + Me.ucrReceiverElavation.Size = New System.Drawing.Size(120, 23) + Me.ucrReceiverElavation.strNcFilePath = "" + Me.ucrReceiverElavation.TabIndex = 37 + Me.ucrReceiverElavation.ucrSelector = Nothing + ' + 'ucrReceiverDistrict + ' + Me.ucrReceiverDistrict.AutoSize = True + Me.ucrReceiverDistrict.frmParent = Me + Me.ucrReceiverDistrict.Location = New System.Drawing.Point(321, 285) + Me.ucrReceiverDistrict.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDistrict.Name = "ucrReceiverDistrict" + Me.ucrReceiverDistrict.Selector = Nothing + Me.ucrReceiverDistrict.Size = New System.Drawing.Size(120, 28) + Me.ucrReceiverDistrict.strNcFilePath = "" + Me.ucrReceiverDistrict.TabIndex = 39 + Me.ucrReceiverDistrict.ucrSelector = Nothing + ' + 'ucrReceiverStationName + ' + Me.ucrReceiverStationName.AutoSize = True + Me.ucrReceiverStationName.frmParent = Me + Me.ucrReceiverStationName.Location = New System.Drawing.Point(321, 89) + 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, 27) + Me.ucrReceiverStationName.strNcFilePath = "" + Me.ucrReceiverStationName.TabIndex = 31 + Me.ucrReceiverStationName.ucrSelector = Nothing + ' 'lblExport ' Me.lblExport.AutoSize = True Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblExport.Location = New System.Drawing.Point(14, 579) - Me.lblExport.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblExport.Location = New System.Drawing.Point(66, 42) Me.lblExport.Name = "lblExport" - Me.lblExport.Size = New System.Drawing.Size(57, 20) - Me.lblExport.TabIndex = 22 + Me.lblExport.Size = New System.Drawing.Size(41, 13) + Me.lblExport.TabIndex = 40 Me.lblExport.Text = "Token:" ' 'cmdChooseFile ' Me.cmdChooseFile.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdChooseFile.Location = New System.Drawing.Point(384, 571) - Me.cmdChooseFile.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.cmdChooseFile.Location = New System.Drawing.Point(313, 36) Me.cmdChooseFile.Name = "cmdChooseFile" - Me.cmdChooseFile.Size = New System.Drawing.Size(120, 35) - Me.cmdChooseFile.TabIndex = 24 + Me.cmdChooseFile.Size = New System.Drawing.Size(80, 23) + Me.cmdChooseFile.TabIndex = 42 Me.cmdChooseFile.Text = "Browse" Me.cmdChooseFile.UseVisualStyleBackColor = True ' @@ -364,78 +567,56 @@ Partial Class dlgExportClimaticDefinitions Me.ucrInputTokenPath.AutoSize = True Me.ucrInputTokenPath.IsMultiline = False Me.ucrInputTokenPath.IsReadOnly = False - Me.ucrInputTokenPath.Location = New System.Drawing.Point(84, 575) - Me.ucrInputTokenPath.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrInputTokenPath.Location = New System.Drawing.Point(113, 39) + Me.ucrInputTokenPath.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) Me.ucrInputTokenPath.Name = "ucrInputTokenPath" - Me.ucrInputTokenPath.Size = New System.Drawing.Size(287, 32) - Me.ucrInputTokenPath.TabIndex = 23 - ' - 'cmdDefine - ' - Me.cmdDefine.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdDefine.Location = New System.Drawing.Point(338, 512) - Me.cmdDefine.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.cmdDefine.Name = "cmdDefine" - Me.cmdDefine.Size = New System.Drawing.Size(120, 45) - Me.cmdDefine.TabIndex = 21 - Me.cmdDefine.Text = "Define" - Me.cmdDefine.UseVisualStyleBackColor = True - ' - 'lblDefinitionsID - ' - Me.lblDefinitionsID.AutoSize = True - Me.lblDefinitionsID.Location = New System.Drawing.Point(505, 433) - Me.lblDefinitionsID.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblDefinitionsID.Name = "lblDefinitionsID" - Me.lblDefinitionsID.Size = New System.Drawing.Size(109, 20) - Me.lblDefinitionsID.TabIndex = 15 - Me.lblDefinitionsID.Text = "Definitions ID:" - ' - 'ucrInputDefinitionsID - ' - Me.ucrInputDefinitionsID.AddQuotesIfUnrecognised = True - Me.ucrInputDefinitionsID.AutoSize = True - Me.ucrInputDefinitionsID.IsMultiline = False - Me.ucrInputDefinitionsID.IsReadOnly = False - Me.ucrInputDefinitionsID.Location = New System.Drawing.Point(500, 457) - Me.ucrInputDefinitionsID.Margin = New System.Windows.Forms.Padding(14) - Me.ucrInputDefinitionsID.Name = "ucrInputDefinitionsID" - Me.ucrInputDefinitionsID.Size = New System.Drawing.Size(177, 32) - Me.ucrInputDefinitionsID.TabIndex = 16 - ' - 'ucrReceiverStation - ' - Me.ucrReceiverStation.AutoSize = True - Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(498, 45) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(180, 31) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 2 - Me.ucrReceiverStation.ucrSelector = Nothing + Me.ucrInputTokenPath.Size = New System.Drawing.Size(191, 21) + Me.ucrInputTokenPath.TabIndex = 41 + ' + 'ucrInputCountryMetadata + ' + Me.ucrInputCountryMetadata.AddQuotesIfUnrecognised = True + Me.ucrInputCountryMetadata.AutoSize = True + Me.ucrInputCountryMetadata.IsMultiline = False + Me.ucrInputCountryMetadata.IsReadOnly = False + Me.ucrInputCountryMetadata.Location = New System.Drawing.Point(321, 330) + Me.ucrInputCountryMetadata.Margin = New System.Windows.Forms.Padding(9) + Me.ucrInputCountryMetadata.Name = "ucrInputCountryMetadata" + Me.ucrInputCountryMetadata.Size = New System.Drawing.Size(118, 21) + Me.ucrInputCountryMetadata.TabIndex = 43 + ' + 'lblCountryMetada + ' + Me.lblCountryMetada.AutoSize = True + Me.lblCountryMetada.Location = New System.Drawing.Point(325, 312) + Me.lblCountryMetada.Name = "lblCountryMetada" + Me.lblCountryMetada.Size = New System.Drawing.Size(46, 13) + Me.lblCountryMetada.TabIndex = 44 + Me.lblCountryMetada.Text = "Country:" ' 'dlgExportClimaticDefinitions ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(688, 713) + Me.ClientSize = New System.Drawing.Size(459, 500) + Me.Controls.Add(Me.ucrReceiverYear) + Me.Controls.Add(Me.lblExport) + Me.Controls.Add(Me.cmdChooseFile) + Me.Controls.Add(Me.ucrInputTokenPath) + Me.Controls.Add(Me.rdoUploadSummaries) + Me.Controls.Add(Me.rdoUpdateMetadata) + Me.Controls.Add(Me.ucrPnlExportGoogle) Me.Controls.Add(Me.ucrReceiverStation) Me.Controls.Add(Me.lblDefinitionsID) Me.Controls.Add(Me.ucrInputDefinitionsID) Me.Controls.Add(Me.cmdDefine) - Me.Controls.Add(Me.lblExport) - Me.Controls.Add(Me.cmdChooseFile) - Me.Controls.Add(Me.ucrInputTokenPath) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.lblCountry) Me.Controls.Add(Me.ucrInputCountry) Me.Controls.Add(Me.lblMonth) Me.Controls.Add(Me.lblYear) Me.Controls.Add(Me.ucrReceiverMonth) - Me.Controls.Add(Me.ucrReceiverYear) Me.Controls.Add(Me.ucrChkIncludeSummaryData) Me.Controls.Add(Me.grpSummaries) Me.Controls.Add(Me.lblCropData) @@ -448,13 +629,24 @@ Partial Class dlgExportClimaticDefinitions Me.Controls.Add(Me.ucrReceiverDataYear) Me.Controls.Add(Me.ucrReceiverDataYearMonth) Me.Controls.Add(Me.ucrReceiverCropData) + Me.Controls.Add(Me.lblDistrict) + Me.Controls.Add(Me.lblElavation) + Me.Controls.Add(Me.lblLatitude) + Me.Controls.Add(Me.lblLongitude) + Me.Controls.Add(Me.ucrReceiverLongititude) + Me.Controls.Add(Me.ucrReceiverLatitude) + Me.Controls.Add(Me.ucrReceiverElavation) + Me.Controls.Add(Me.ucrReceiverDistrict) + Me.Controls.Add(Me.ucrReceiverStationName) + Me.Controls.Add(Me.lblStationName) + Me.Controls.Add(Me.lblCountryMetada) + Me.Controls.Add(Me.ucrInputCountryMetadata) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgExportClimaticDefinitions" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Export Climatic Definitions" + Me.Text = "Export to Google Buckets" Me.grpSummaries.ResumeLayout(False) Me.grpSummaries.PerformLayout() Me.ResumeLayout(False) @@ -487,11 +679,26 @@ Partial Class dlgExportClimaticDefinitions Friend WithEvents ucrReceiverDataYear As ucrReceiverSingle Friend WithEvents ucrReceiverDataYearMonth As ucrReceiverSingle Friend WithEvents ucrReceiverCropData As ucrReceiverSingle - Friend WithEvents lblExport As Label - Friend WithEvents cmdChooseFile As Button - Friend WithEvents ucrInputTokenPath As ucrInputTextBox Friend WithEvents cmdDefine As Button Friend WithEvents lblDefinitionsID As Label Friend WithEvents ucrInputDefinitionsID As ucrInputTextBox Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents rdoUploadSummaries As RadioButton + Friend WithEvents rdoUpdateMetadata As RadioButton + Friend WithEvents ucrPnlExportGoogle As UcrPanel + Friend WithEvents lblDistrict As Label + Friend WithEvents lblElavation As Label + Friend WithEvents lblLatitude As Label + Friend WithEvents lblLongitude As Label + Friend WithEvents lblStationName As Label + Friend WithEvents ucrReceiverLongititude As ucrReceiverSingle + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrReceiverElavation As ucrReceiverSingle + Friend WithEvents ucrReceiverDistrict As ucrReceiverSingle + Friend WithEvents ucrReceiverStationName As ucrReceiverSingle + Friend WithEvents lblExport As Label + Friend WithEvents cmdChooseFile As Button + Friend WithEvents ucrInputTokenPath As ucrInputTextBox + Friend WithEvents lblCountryMetada As Label + Friend WithEvents ucrInputCountryMetadata As ucrInputTextBox End Class diff --git a/instat/dlgExportClimaticDefinitions.vb b/instat/dlgExportClimaticDefinitions.vb index 723aba5fe08..93cd7a95217 100644 --- a/instat/dlgExportClimaticDefinitions.vb +++ b/instat/dlgExportClimaticDefinitions.vb @@ -21,7 +21,9 @@ Public Class dlgExportClimaticDefinitions Private bReset As Boolean = True Private bResetSubdialog As Boolean = False Private clsDummyFunction As New RFunction - Public clsExportRinstatToBucketFunction, ClsGcsAuthFileFunction, clsSummariesFunction As New RFunction + Private clsGetDataFrameFunction As New RFunction + Public clsRsyntax As New RSyntax + Public clsExportRinstatToBucketFunction, clsUpdateMetadataInfoFunction, ClsGcsAuthFileFunction, clsSummariesFunction As New RFunction Public clsReforMattAnnualSummariesFunction, clsReformatCropSuccessFunction, clsReformatSeasonStartFunction, clsReformatTempSummariesFunction, clsReformatMonthlyTempSummaries As New RFunction Private Sub dlgExportClimaticDefinitions_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -36,15 +38,21 @@ Public Class dlgExportClimaticDefinitions bReset = False TestOkEnabled() autoTranslate(Me) + DialogSize() End Sub Private Sub InitialiseDialog() + ucrPnlExportGoogle.AddRadioButton(rdoUpdateMetadata) + ucrPnlExportGoogle.AddRadioButton(rdoUploadSummaries) + ucrPnlExportGoogle.AddParameterValuesCondition(rdoUpdateMetadata, "checked", "metadata") + ucrPnlExportGoogle.AddParameterValuesCondition(rdoUploadSummaries, "checked", "summary") + ucrReceiverStation.SetParameter(New RParameter("station", 0)) ucrReceiverStation.Selector = ucrSelectorExportDefinitions ucrReceiverStation.SetParameterIsString() - ucrReceiverStation.SetMeAsReceiver() ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True + ucrReceiverStation.SetLinkedDisplayControl(lblStation) ucrReceiverDataYear.SetParameter(New RParameter("data_by_year", 1)) ucrReceiverDataYear.Selector = ucrSelectorExportDefinitions @@ -118,10 +126,56 @@ Public Class dlgExportClimaticDefinitions ucrChkIncludeSummaryData.SetRDefault("FALSE") ucrInputDefinitionsID.SetParameter(New RParameter("definitions_id", 19)) + ucrInputDefinitionsID.SetLinkedDisplayControl(lblDefinitionsID) + ucrInputCountry.SetParameter(New RParameter("country", 20)) + ucrInputCountry.SetLinkedDisplayControl(lblCountry) ucrInputTokenPath.SetParameter(New RParameter("filename", 0)) - + ucrInputTokenPath.SetLinkedDisplayControl(lblExport) + + ucrReceiverStationName.SetParameter(New RParameter("station_var", 1)) + ucrReceiverStationName.Selector = ucrSelectorExportDefinitions + ucrReceiverStationName.SetParameterIsString() + ucrReceiverStationName.SetClimaticType("station") + ucrReceiverStationName.bAutoFill = True + ucrReceiverStationName.SetLinkedDisplayControl(lblStationName) + + ucrReceiverLongititude.SetParameter(New RParameter("longitude_var", 2)) + ucrReceiverLongititude.Selector = ucrSelectorExportDefinitions + ucrReceiverLongititude.SetParameterIsString() + ucrReceiverLongititude.SetClimaticType("lon") + ucrReceiverLongititude.bAutoFill = True + ucrReceiverLongititude.SetLinkedDisplayControl(lblLongitude) + + ucrReceiverLatitude.SetParameter(New RParameter("latitude_var", 3)) + ucrReceiverLatitude.Selector = ucrSelectorExportDefinitions + ucrReceiverLatitude.SetParameterIsString() + ucrReceiverLatitude.SetClimaticType("lat") + ucrReceiverLatitude.bAutoFill = True + ucrReceiverLatitude.SetLinkedDisplayControl(lblLatitude) + + ucrReceiverElavation.SetParameter(New RParameter("elevation_var", 4)) + ucrReceiverElavation.Selector = ucrSelectorExportDefinitions + ucrReceiverElavation.SetParameterIsString() + ucrReceiverElavation.SetClimaticType("alt") + ucrReceiverElavation.bAutoFill = True + ucrReceiverElavation.SetLinkedDisplayControl(lblElavation) + + ucrReceiverDistrict.SetParameter(New RParameter("district_var", 5)) + ucrReceiverDistrict.Selector = ucrSelectorExportDefinitions + ucrReceiverDistrict.SetParameterIsString() + ucrReceiverDistrict.SetClimaticType("district") + ucrReceiverDistrict.bAutoFill = True + ucrReceiverDistrict.SetLinkedDisplayControl(lblDistrict) + + ucrInputCountryMetadata.SetParameter(New RParameter("country", 6)) + ucrInputCountryMetadata.SetLinkedDisplayControl(lblCountryMetada) + + ucrPnlExportGoogle.AddToLinkedControls({ucrReceiverMonth, ucrReceiverYear, ucrReceiverStation}, {rdoUploadSummaries}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlExportGoogle.AddToLinkedControls({ucrReceiverDistrict, ucrReceiverElavation, ucrReceiverLatitude, ucrInputCountryMetadata, ucrReceiverLongititude, ucrReceiverStationName}, {rdoUpdateMetadata}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlExportGoogle.AddToLinkedControls({ucrInputCountry, ucrChkIncludeSummaryData, ucrInputDefinitionsID}, {rdoUploadSummaries}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + DialogSize() End Sub Private Sub SetDefaults() @@ -133,7 +187,9 @@ Public Class dlgExportClimaticDefinitions clsReforMattAnnualSummariesFunction = New RFunction clsReformatTempSummariesFunction = New RFunction ClsGcsAuthFileFunction = New RFunction + clsUpdateMetadataInfoFunction = New RFunction clsDummyFunction = New RFunction + clsGetDataFrameFunction = New RFunction bResetSubdialog = True ucrSelectorExportDefinitions.Reset() @@ -144,6 +200,9 @@ Public Class dlgExportClimaticDefinitions clsDummyFunction.AddParameter("extrem", "False", iPosition:=3) clsDummyFunction.AddParameter("season", "False", iPosition:=4) clsDummyFunction.AddParameter("crop", "False", iPosition:=5) + clsDummyFunction.AddParameter("checked", "metadata", iPosition:=6) + + clsGetDataFrameFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_data_frame") clsReformatTempSummariesFunction.SetPackageName("epicsawrap") clsReformatTempSummariesFunction.SetRCommand("reformat_temperature_summaries") @@ -173,9 +232,9 @@ Public Class dlgExportClimaticDefinitions ClsGcsAuthFileFunction.SetPackageName("epicsawrap") ClsGcsAuthFileFunction.SetRCommand("gcs_auth_file") + clsUpdateMetadataInfoFunction.SetPackageName("epicsawrap") + clsUpdateMetadataInfoFunction.SetRCommand("update_metadata_info") ucrBase.clsRsyntax.ClearCodes() - ucrBase.clsRsyntax.AddToBeforeCodes(ClsGcsAuthFileFunction, 0) - ucrBase.clsRsyntax.SetBaseRFunction(clsExportRinstatToBucketFunction) End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -192,6 +251,14 @@ Public Class dlgExportClimaticDefinitions ucrInputDefinitionsID.SetRCode(clsExportRinstatToBucketFunction, bReset) ucrInputCountry.SetRCode(clsExportRinstatToBucketFunction, bReset) ucrChkIncludeSummaryData.SetRCode(clsExportRinstatToBucketFunction, bReset) + + ucrReceiverDistrict.SetRCode(clsUpdateMetadataInfoFunction, bReset) + ucrReceiverElavation.SetRCode(clsUpdateMetadataInfoFunction, bReset) + ucrReceiverLatitude.SetRCode(clsUpdateMetadataInfoFunction, bReset) + ucrReceiverLongititude.SetRCode(clsUpdateMetadataInfoFunction, bReset) + ucrReceiverStationName.SetRCode(clsUpdateMetadataInfoFunction, bReset) + ucrInputCountryMetadata.SetRCode(clsUpdateMetadataInfoFunction, bReset) + If bReset Then ucrChkAnnualRainfall.SetRCode(clsDummyFunction, bReset) ucrChkAnnualTemp.SetRCode(clsDummyFunction, bReset) @@ -199,36 +266,45 @@ Public Class dlgExportClimaticDefinitions ucrChkExtremes.SetRCode(clsDummyFunction, bReset) ucrChkMonthlyTemp.SetRCode(clsDummyFunction, bReset) ucrChkSeasonStartProp.SetRCode(clsDummyFunction, bReset) + ucrPnlExportGoogle.SetRCode(clsDummyFunction, bReset) End If AddRemoveSummary() EnableDisableDefineButton() End Sub Private Sub TestOkEnabled() - If Not ucrReceiverStation.IsEmpty AndAlso + If rdoUploadSummaries.Checked Then + If Not ucrReceiverStation.IsEmpty AndAlso Not ucrReceiverYear.IsEmpty AndAlso Not ucrInputCountry.IsEmpty AndAlso Not ucrInputDefinitionsID.IsEmpty AndAlso Not ucrInputTokenPath.IsEmpty Then - If (ucrChkCropSuccessProp.Checked OrElse ucrChkSeasonStartProp.Checked) AndAlso - Not ucrReceiverCropData.IsEmpty Then - ucrBase.OKEnabled(True) - ElseIf ucrChkAnnualRainfall.Checked AndAlso - Not ucrReceiverRain.IsEmpty Then - ucrBase.OKEnabled(True) - ElseIf (ucrChkAnnualRainfall.Checked OrElse ucrChkAnnualTemp.Checked) AndAlso - Not ucrReceiverDataYear.IsEmpty Then - ucrBase.OKEnabled(True) - ElseIf ucrChkMonthlyTemp.Checked AndAlso - Not ucrReceiverMonth.IsEmpty AndAlso - Not ucrReceiverDataYearMonth.IsEmpty Then - ucrBase.OKEnabled(True) + If (ucrChkCropSuccessProp.Checked OrElse ucrChkSeasonStartProp.Checked) AndAlso + Not ucrReceiverCropData.IsEmpty Then + ucrBase.OKEnabled(True) + ElseIf ucrChkAnnualRainfall.Checked AndAlso + Not ucrReceiverRain.IsEmpty Then + ucrBase.OKEnabled(True) + ElseIf (ucrChkAnnualRainfall.Checked OrElse ucrChkAnnualTemp.Checked) AndAlso + Not ucrReceiverDataYear.IsEmpty Then + ucrBase.OKEnabled(True) + ElseIf ucrChkMonthlyTemp.Checked AndAlso + Not ucrReceiverMonth.IsEmpty AndAlso + Not ucrReceiverDataYearMonth.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If Else ucrBase.OKEnabled(False) End If Else - ucrBase.OKEnabled(False) + If Not ucrReceiverStationName.IsEmpty AndAlso Not ucrInputTokenPath.IsEmpty AndAlso Not ucrInputCountryMetadata.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End If End Sub @@ -336,18 +412,21 @@ Public Class dlgExportClimaticDefinitions End Sub Private Sub EnableDisableDefineButton() - ucrReceiverDataYearMonth.Visible = ucrChkMonthlyTemp.Checked - ucrReceiverDataYear.Visible = ucrChkAnnualRainfall.Checked OrElse ucrChkAnnualTemp.Checked - ucrReceiverRain.Visible = ucrChkAnnualRainfall.Checked - ucrReceiverCropData.Visible = ucrChkCropSuccessProp.Checked OrElse ucrChkSeasonStartProp.Checked - - End Sub + If rdoUploadSummaries.Checked Then + ucrReceiverDataYearMonth.Visible = ucrChkMonthlyTemp.Checked + ucrReceiverDataYear.Visible = ucrChkAnnualRainfall.Checked OrElse ucrChkAnnualTemp.Checked + ucrReceiverRain.Visible = ucrChkAnnualRainfall.Checked + ucrReceiverCropData.Visible = ucrChkCropSuccessProp.Checked OrElse ucrChkSeasonStartProp.Checked + Else + ucrReceiverDataYearMonth.Visible = False + ucrReceiverDataYear.Visible = False + ucrReceiverRain.Visible = False + ucrReceiverCropData.Visible = False + End If - Private Sub ucrChkIncludeSummaryData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkIncludeSummaryData.ControlValueChanged - EnableDisableDefineButton() End Sub - Private Sub cmdChooseFile_Click(sender As Object, e As EventArgs) Handles cmdChooseFile.Click + Private Sub cmdChooseFile_Click_1(sender As Object, e As EventArgs) Handles cmdChooseFile.Click Using dlgOpen As New OpenFileDialog dlgOpen.Filter = "JSON Files|*.json" dlgOpen.Title = "Import JSON File" @@ -358,16 +437,61 @@ Public Class dlgExportClimaticDefinitions ucrInputTokenPath.SetName(Replace(dlgOpen.FileName, "\", "/")) End If End Using + End Sub + Private Sub ucrChkIncludeSummaryData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkIncludeSummaryData.ControlValueChanged + EnableDisableDefineButton() End Sub - Private Sub ucrReceiverData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRain.ControlContentsChanged, ucrReceiverCropData.ControlContentsChanged, ucrReceiverDataYearMonth.ControlContentsChanged, ucrReceiverDataYear.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged, - ucrReceiverMonth.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrChkSeasonStartProp.ControlContentsChanged, ucrInputCountry.ControlContentsChanged, ucrInputDefinitionsID.ControlContentsChanged, ucrChkIncludeSummaryData.ControlContentsChanged, - ucrChkMonthlyTemp.ControlContentsChanged, ucrChkCropSuccessProp.ControlContentsChanged, ucrChkAnnualTemp.ControlContentsChanged, ucrChkAnnualRainfall.ControlContentsChanged, ucrInputTokenPath.ControlContentsChanged, ucrSelectorExportDefinitions.ControlContentsChanged + Private Sub ucrSelectorExportDefinitions_DataFrameChanged() Handles ucrSelectorExportDefinitions.DataFrameChanged TestOkEnabled() End Sub - Private Sub ucrSelectorExportDefinitions_DataFrameChanged() Handles ucrSelectorExportDefinitions.DataFrameChanged + Private Sub ucrPnlExportGoogle_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlExportGoogle.ControlValueChanged, ucrInputTokenPath.ControlValueChanged + ucrBase.clsRsyntax.AddToBeforeCodes(ClsGcsAuthFileFunction, 0) + If rdoUpdateMetadata.Checked Then + grpSummaries.Visible = False + cmdDefine.Visible = False + ucrBase.clsRsyntax.SetBaseRFunction(clsUpdateMetadataInfoFunction) + ucrReceiverStationName.SetMeAsReceiver() + Else + grpSummaries.Visible = True + cmdDefine.Visible = True + ucrBase.clsRsyntax.SetBaseRFunction(clsExportRinstatToBucketFunction) + ucrReceiverStation.SetMeAsReceiver() + End If + EnableDisableDefineButton() + DialogSize() TestOkEnabled() End Sub + + Private Sub DialogSize() + If rdoUpdateMetadata.Checked Then + Me.Size = New Size(475, 455) + Me.ucrBase.Location = New Point(4, 355) + Else + Me.Size = New Size(475, 539) + Me.ucrBase.Location = New Point(4, 434) + End If + End Sub + + Private Sub ucrSelectorExportDefinitions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorExportDefinitions.ControlValueChanged + clsGetDataFrameFunction.AddParameter("data_name", Chr(34) & ucrSelectorExportDefinitions.strCurrentDataFrame & Chr(34), iPosition:=0) + clsGetDataFrameFunction.SetAssignTo(ucrSelectorExportDefinitions.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + clsUpdateMetadataInfoFunction.AddParameter("metadata_data", clsRFunctionParameter:=clsGetDataFrameFunction, iPosition:=0) + End Sub + + Private Sub ucrReceiverData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRain.ControlContentsChanged, ucrReceiverCropData.ControlContentsChanged, ucrReceiverDataYearMonth.ControlContentsChanged, ucrReceiverDataYear.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged, ucrInputTokenPath.ControlContentsChanged, ucrInputCountryMetadata.ControlContentsChanged, + ucrReceiverMonth.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrChkSeasonStartProp.ControlContentsChanged, ucrInputCountry.ControlContentsChanged, ucrInputDefinitionsID.ControlContentsChanged, ucrChkIncludeSummaryData.ControlContentsChanged, ucrReceiverLongititude.ControlContentsChanged, ucrReceiverLatitude.ControlContentsChanged, + ucrChkMonthlyTemp.ControlContentsChanged, ucrChkCropSuccessProp.ControlContentsChanged, ucrChkAnnualTemp.ControlContentsChanged, ucrChkAnnualRainfall.ControlContentsChanged, ucrSelectorExportDefinitions.ControlContentsChanged, ucrReceiverElavation.ControlContentsChanged, ucrReceiverDistrict.ControlContentsChanged, ucrReceiverStationName.ControlContentsChanged + TestOkEnabled() + End Sub + + Private Sub ucrInputCountryMetadata_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputCountryMetadata.ControlValueChanged + If Not ucrInputCountryMetadata.IsEmpty Then + clsUpdateMetadataInfoFunction.AddParameter("country", Chr(34) & ucrInputCountryMetadata.GetText & Chr(34), iPosition:=6) + Else + clsUpdateMetadataInfoFunction.RemoveParameterByName("country") + End If + End Sub End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 741d4f7da58..0d06bc51c66 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -337,6 +337,12 @@ Form + + sdgMetadataGoogleBuckets.vb + + + Form + sdgPairPlotOptions.vb @@ -3212,6 +3218,9 @@ sdgLocation.vb + + sdgMetadataGoogleBuckets.vb + sdgPairPlotOptions.vb diff --git a/instat/sdgMetadataGoogleBuckets.Designer.vb b/instat/sdgMetadataGoogleBuckets.Designer.vb new file mode 100644 index 00000000000..447bbd04727 --- /dev/null +++ b/instat/sdgMetadataGoogleBuckets.Designer.vb @@ -0,0 +1,210 @@ + _ +Partial Class sdgMetadataGoogleBuckets + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtonsSubdialogue() + Me.ucrSelectorMetadata = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverDistrict = New instat.ucrReceiverSingle() + Me.ucrReceiverElavation = New instat.ucrReceiverSingle() + Me.ucrReceiverLatitude = New instat.ucrReceiverSingle() + Me.ucrReceiverLongititude = New instat.ucrReceiverSingle() + Me.lblStation = New System.Windows.Forms.Label() + Me.lblLongitude = New System.Windows.Forms.Label() + Me.lblLatitude = New System.Windows.Forms.Label() + Me.lblElavation = New System.Windows.Forms.Label() + Me.lblDistrict = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.AutoSize = True + Me.ucrBase.Location = New System.Drawing.Point(90, 441) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(335, 42) + Me.ucrBase.TabIndex = 11 + ' + 'ucrSelectorMetadata + ' + Me.ucrSelectorMetadata.AutoSize = True + Me.ucrSelectorMetadata.bDropUnusedFilterLevels = False + Me.ucrSelectorMetadata.bShowHiddenColumns = False + Me.ucrSelectorMetadata.bUseCurrentFilter = True + Me.ucrSelectorMetadata.Location = New System.Drawing.Point(15, 24) + Me.ucrSelectorMetadata.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorMetadata.Name = "ucrSelectorMetadata" + Me.ucrSelectorMetadata.Size = New System.Drawing.Size(318, 274) + Me.ucrSelectorMetadata.TabIndex = 0 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(436, 57) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(180, 41) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 2 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverDistrict + ' + Me.ucrReceiverDistrict.AutoSize = True + Me.ucrReceiverDistrict.frmParent = Me + Me.ucrReceiverDistrict.Location = New System.Drawing.Point(436, 358) + Me.ucrReceiverDistrict.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDistrict.Name = "ucrReceiverDistrict" + Me.ucrReceiverDistrict.Selector = Nothing + Me.ucrReceiverDistrict.Size = New System.Drawing.Size(180, 43) + Me.ucrReceiverDistrict.strNcFilePath = "" + Me.ucrReceiverDistrict.TabIndex = 10 + Me.ucrReceiverDistrict.ucrSelector = Nothing + ' + 'ucrReceiverElavation + ' + Me.ucrReceiverElavation.AutoSize = True + Me.ucrReceiverElavation.frmParent = Me + Me.ucrReceiverElavation.Location = New System.Drawing.Point(436, 284) + Me.ucrReceiverElavation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverElavation.Name = "ucrReceiverElavation" + Me.ucrReceiverElavation.Selector = Nothing + Me.ucrReceiverElavation.Size = New System.Drawing.Size(180, 36) + Me.ucrReceiverElavation.strNcFilePath = "" + Me.ucrReceiverElavation.TabIndex = 8 + Me.ucrReceiverElavation.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(436, 209) + Me.ucrReceiverLatitude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLatitude.Name = "ucrReceiverLatitude" + Me.ucrReceiverLatitude.Selector = Nothing + Me.ucrReceiverLatitude.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverLatitude.strNcFilePath = "" + Me.ucrReceiverLatitude.TabIndex = 6 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverLongititude + ' + Me.ucrReceiverLongititude.AutoSize = True + Me.ucrReceiverLongititude.frmParent = Me + Me.ucrReceiverLongititude.Location = New System.Drawing.Point(436, 130) + Me.ucrReceiverLongititude.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverLongititude.Name = "ucrReceiverLongititude" + Me.ucrReceiverLongititude.Selector = Nothing + Me.ucrReceiverLongititude.Size = New System.Drawing.Size(180, 36) + Me.ucrReceiverLongititude.strNcFilePath = "" + Me.ucrReceiverLongititude.TabIndex = 4 + Me.ucrReceiverLongititude.ucrSelector = Nothing + ' + 'lblStation + ' + Me.lblStation.AutoSize = True + Me.lblStation.Location = New System.Drawing.Point(439, 34) + Me.lblStation.Name = "lblStation" + Me.lblStation.Size = New System.Drawing.Size(106, 20) + Me.lblStation.TabIndex = 1 + Me.lblStation.Text = "Station Name" + ' + 'lblLongitude + ' + Me.lblLongitude.AutoSize = True + Me.lblLongitude.Location = New System.Drawing.Point(439, 103) + Me.lblLongitude.Name = "lblLongitude" + Me.lblLongitude.Size = New System.Drawing.Size(84, 20) + Me.lblLongitude.TabIndex = 3 + Me.lblLongitude.Text = "Longitude " + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.Location = New System.Drawing.Point(440, 180) + Me.lblLatitude.Name = "lblLatitude" + Me.lblLatitude.Size = New System.Drawing.Size(67, 20) + Me.lblLatitude.TabIndex = 5 + Me.lblLatitude.Text = "Latitude" + ' + 'lblElavation + ' + Me.lblElavation.AutoSize = True + Me.lblElavation.Location = New System.Drawing.Point(442, 255) + Me.lblElavation.Name = "lblElavation" + Me.lblElavation.Size = New System.Drawing.Size(74, 20) + Me.lblElavation.TabIndex = 7 + Me.lblElavation.Text = "Elevation" + ' + 'lblDistrict + ' + Me.lblDistrict.AutoSize = True + Me.lblDistrict.Location = New System.Drawing.Point(443, 329) + Me.lblDistrict.Name = "lblDistrict" + Me.lblDistrict.Size = New System.Drawing.Size(58, 20) + Me.lblDistrict.TabIndex = 9 + Me.lblDistrict.Text = "District" + ' + 'sdgMetadataGoogleBuckets + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(637, 511) + Me.Controls.Add(Me.lblDistrict) + Me.Controls.Add(Me.lblElavation) + Me.Controls.Add(Me.lblLatitude) + Me.Controls.Add(Me.lblLongitude) + Me.Controls.Add(Me.lblStation) + Me.Controls.Add(Me.ucrReceiverLongititude) + Me.Controls.Add(Me.ucrReceiverLatitude) + Me.Controls.Add(Me.ucrReceiverElavation) + Me.Controls.Add(Me.ucrReceiverDistrict) + Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.ucrSelectorMetadata) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgMetadataGoogleBuckets" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Metadata Information" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ucrBase As ucrButtonsSubdialogue + Friend WithEvents ucrSelectorMetadata As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents lblDistrict As Label + Friend WithEvents lblElavation As Label + Friend WithEvents lblLatitude As Label + Friend WithEvents lblLongitude As Label + Friend WithEvents lblStation As Label + Friend WithEvents ucrReceiverLongititude As ucrReceiverSingle + Friend WithEvents ucrReceiverLatitude As ucrReceiverSingle + Friend WithEvents ucrReceiverElavation As ucrReceiverSingle + Friend WithEvents ucrReceiverDistrict As ucrReceiverSingle +End Class diff --git a/instat/sdgMetadataGoogleBuckets.resx b/instat/sdgMetadataGoogleBuckets.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgMetadataGoogleBuckets.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/sdgMetadataGoogleBuckets.vb b/instat/sdgMetadataGoogleBuckets.vb new file mode 100644 index 00000000000..f98cf0dd4d2 --- /dev/null +++ b/instat/sdgMetadataGoogleBuckets.vb @@ -0,0 +1,82 @@ +'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 sdgMetadataGoogleBuckets + Public clsUpdateMetadataInfoFunction As New RFunction + Public clsRsyntax As New RSyntax + Public bControlsInitialised As Boolean = False + + Private Sub sdgMetadataGoogleBuckets_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + End Sub + Public Sub InitialiseControls() + ucrSelectorMetadata.SetParameter(New RParameter("metadata_data", 0)) + ucrSelectorMetadata.SetParameterIsrfunction() + + ucrReceiverStation.SetParameter(New RParameter("station_var", 1)) + ucrReceiverStation.Selector = ucrSelectorMetadata + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.SetClimaticType("station") + ucrReceiverStation.bAutoFill = True + + ucrReceiverLongititude.SetParameter(New RParameter("longitude_var", 2)) + ucrReceiverLongititude.Selector = ucrSelectorMetadata + ucrReceiverLongititude.SetParameterIsString() + ucrReceiverLongititude.SetClimaticType("lon") + ucrReceiverLongititude.bAutoFill = True + + ucrReceiverLatitude.SetParameter(New RParameter("latitude_var", 3)) + ucrReceiverLatitude.Selector = ucrSelectorMetadata + ucrReceiverLatitude.SetParameterIsString() + ucrReceiverLatitude.SetClimaticType("lat") + ucrReceiverLatitude.bAutoFill = True + + ucrReceiverElavation.SetParameter(New RParameter("elevation_var", 4)) + ucrReceiverElavation.Selector = ucrSelectorMetadata + ucrReceiverElavation.SetParameterIsString() + ucrReceiverElavation.SetClimaticType("alt") + ucrReceiverElavation.bAutoFill = True + + ucrReceiverDistrict.SetParameter(New RParameter("district_var", 5)) + ucrReceiverDistrict.Selector = ucrSelectorMetadata + ucrReceiverDistrict.SetParameterIsString() + ucrReceiverDistrict.SetClimaticType("district") + ucrReceiverDistrict.bAutoFill = True + End Sub + Public Sub SetRCode(clsNewRSyntax As RSyntax, clsNewUpdateMetadataInfoFunction As RFunction, Optional bReset As Boolean = False) + If Not bControlsInitialised Then + InitialiseControls() + End If + clsRsyntax = clsNewRSyntax + clsUpdateMetadataInfoFunction = clsNewUpdateMetadataInfoFunction + + ucrReceiverDistrict.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverElavation.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverLatitude.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverLongititude.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) + ucrReceiverStation.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) + ucrSelectorMetadata.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) + End Sub + + Private Sub ucrReceiverLongititude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverLongititude.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrReceiverLatitude.ControlValueChanged, ucrReceiverElavation.ControlValueChanged, ucrReceiverDistrict.ControlValueChanged, ucrSelectorMetadata.ControlValueChanged + If Not (ucrReceiverElavation.IsEmpty OrElse ucrReceiverDistrict.IsEmpty OrElse ucrReceiverLatitude.IsEmpty OrElse ucrReceiverLongititude.IsEmpty OrElse ucrReceiverStation.IsEmpty) Then + clsRsyntax.AddToBeforeCodes(clsUpdateMetadataInfoFunction, 1) + Else + clsRsyntax.RemoveFromBeforeCodes(clsUpdateMetadataInfoFunction) + End If + End Sub +End Class \ No newline at end of file