From ffc8089c7497974957c76c533e8326686dd4082a Mon Sep 17 00:00:00 2001 From: KWAMBAI VITALIS Date: Thu, 8 Aug 2024 13:43:38 +0300 Subject: [PATCH] changes to the code --- .../dlgExportClimaticDefinitions.Designer.vb | 699 ++++++++++++------ instat/dlgExportClimaticDefinitions.vb | 190 ++++- 2 files changed, 610 insertions(+), 279 deletions(-) diff --git a/instat/dlgExportClimaticDefinitions.Designer.vb b/instat/dlgExportClimaticDefinitions.Designer.vb index d29ab990892..a699e015eac 100644 --- a/instat/dlgExportClimaticDefinitions.Designer.vb +++ b/instat/dlgExportClimaticDefinitions.Designer.vb @@ -22,21 +22,31 @@ Partial Class dlgExportClimaticDefinitions 'Do not modify it using the code editor. _ Private Sub InitializeComponent() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.lblExport = New System.Windows.Forms.Label() + Me.cmdChooseFile = New System.Windows.Forms.Button() + Me.ucrInputTokenPath = New instat.ucrInputTextBox() + Me.rdoUploadSummaries = New System.Windows.Forms.RadioButton() + Me.rdoUpdateMetadata = New System.Windows.Forms.RadioButton() + Me.ucrPnlExportGoogle = New instat.UcrPanel() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.lblDefinitionsID = New System.Windows.Forms.Label() + Me.ucrInputDefinitionsID = New instat.ucrInputTextBox() + Me.cmdDefine = New System.Windows.Forms.Button() Me.lblStation = New System.Windows.Forms.Label() Me.lblCountry = New System.Windows.Forms.Label() Me.ucrInputCountry = New instat.ucrInputTextBox() - 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.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.lblCropData = New System.Windows.Forms.Label() Me.lblDataByYearMonth = New System.Windows.Forms.Label() Me.lblDataByYear = New System.Windows.Forms.Label() @@ -47,34 +57,167 @@ Partial Class dlgExportClimaticDefinitions Me.ucrReceiverDataYear = New instat.ucrReceiverSingle() Me.ucrReceiverDataYearMonth = New instat.ucrReceiverSingle() Me.ucrReceiverCropData = 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.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.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.lblStationName = New System.Windows.Forms.Label() + Me.lblCountryMetada = New System.Windows.Forms.Label() + Me.ucrInputCountryMetadata = New instat.ucrInputTextBox() Me.grpSummaries.SuspendLayout() Me.SuspendLayout() ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.AutoSize = True + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Location = New System.Drawing.Point(330, 126) + 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 = 52 + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'lblExport + ' + Me.lblExport.AutoSize = True + Me.lblExport.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblExport.Location = New System.Drawing.Point(64, 46) + Me.lblExport.Name = "lblExport" + Me.lblExport.Size = New System.Drawing.Size(41, 13) + Me.lblExport.TabIndex = 81 + Me.lblExport.Text = "Token:" + ' + 'cmdChooseFile + ' + Me.cmdChooseFile.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdChooseFile.Location = New System.Drawing.Point(311, 40) + Me.cmdChooseFile.Name = "cmdChooseFile" + Me.cmdChooseFile.Size = New System.Drawing.Size(80, 23) + Me.cmdChooseFile.TabIndex = 83 + Me.cmdChooseFile.Text = "Browse" + Me.cmdChooseFile.UseVisualStyleBackColor = True + ' + 'ucrInputTokenPath + ' + Me.ucrInputTokenPath.AddQuotesIfUnrecognised = True + Me.ucrInputTokenPath.AutoSize = True + Me.ucrInputTokenPath.IsMultiline = False + Me.ucrInputTokenPath.IsReadOnly = False + Me.ucrInputTokenPath.Location = New System.Drawing.Point(111, 43) + Me.ucrInputTokenPath.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrInputTokenPath.Name = "ucrInputTokenPath" + Me.ucrInputTokenPath.Size = New System.Drawing.Size(191, 21) + Me.ucrInputTokenPath.TabIndex = 82 + ' + '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(227, 7) + Me.rdoUploadSummaries.Name = "rdoUploadSummaries" + Me.rdoUploadSummaries.Size = New System.Drawing.Size(122, 27) + Me.rdoUploadSummaries.TabIndex = 47 + 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(114, 7) + Me.rdoUpdateMetadata.Name = "rdoUpdateMetadata" + Me.rdoUpdateMetadata.Size = New System.Drawing.Size(116, 27) + Me.rdoUpdateMetadata.TabIndex = 46 + Me.rdoUpdateMetadata.Text = "Update Metadata" + Me.rdoUpdateMetadata.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoUpdateMetadata.UseVisualStyleBackColor = True + ' + 'ucrPnlExportGoogle + ' + Me.ucrPnlExportGoogle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlExportGoogle.Location = New System.Drawing.Point(111, 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 = 45 + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(330, 92) + 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 = 50 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'lblDefinitionsID + ' + Me.lblDefinitionsID.AutoSize = True + Me.lblDefinitionsID.Location = New System.Drawing.Point(335, 344) + Me.lblDefinitionsID.Name = "lblDefinitionsID" + Me.lblDefinitionsID.Size = New System.Drawing.Size(73, 13) + Me.lblDefinitionsID.TabIndex = 63 + 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(331, 359) + 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 = 64 + ' + 'cmdDefine + ' + Me.cmdDefine.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.cmdDefine.Location = New System.Drawing.Point(223, 397) + Me.cmdDefine.Name = "cmdDefine" + Me.cmdDefine.Size = New System.Drawing.Size(80, 29) + Me.cmdDefine.TabIndex = 69 + Me.cmdDefine.Text = "Define" + Me.cmdDefine.UseVisualStyleBackColor = True + ' '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(330, 79) 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 = 49 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(330, 384) 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 = 65 Me.lblCountry.Text = "Country:" ' 'ucrInputCountry @@ -83,118 +226,52 @@ Partial Class dlgExportClimaticDefinitions 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.Location = New System.Drawing.Point(330, 400) + Me.ucrInputCountry.Margin = New System.Windows.Forms.Padding(9) Me.ucrInputCountry.Name = "ucrInputCountry" - Me.ucrInputCountry.Size = New System.Drawing.Size(177, 32) - Me.ucrInputCountry.TabIndex = 18 - ' - '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.Name = "ucrChkSeasonStartProp" - Me.ucrChkSeasonStartProp.Size = New System.Drawing.Size(226, 52) - 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.Name = "ucrChkExtremes" - Me.ucrChkExtremes.Size = New System.Drawing.Size(220, 52) - Me.ucrChkExtremes.TabIndex = 5 - Me.ucrChkExtremes.Visible = False - ' - 'ucrChkCropSuccessProp - ' - 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.Name = "ucrChkCropSuccessProp" - Me.ucrChkCropSuccessProp.Size = New System.Drawing.Size(230, 52) - 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.Name = "ucrChkAnnualTemp" - Me.ucrChkAnnualTemp.Size = New System.Drawing.Size(224, 52) - 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.Name = "ucrChkAnnualRainfall" - Me.ucrChkAnnualRainfall.Size = New System.Drawing.Size(224, 52) - Me.ucrChkAnnualRainfall.TabIndex = 0 + Me.ucrInputCountry.Size = New System.Drawing.Size(118, 21) + Me.ucrInputCountry.TabIndex = 66 ' 'lblMonth ' 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.Location = New System.Drawing.Point(330, 151) Me.lblMonth.Name = "lblMonth" - Me.lblMonth.Size = New System.Drawing.Size(58, 20) - Me.lblMonth.TabIndex = 5 + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 53 Me.lblMonth.Text = "Month:" ' 'lblYear ' 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.Location = New System.Drawing.Point(330, 111) Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(47, 20) - Me.lblYear.TabIndex = 3 + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 51 Me.lblYear.Text = "Year:" ' '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(330, 167) 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 = 54 Me.ucrReceiverMonth.ucrSelector = Nothing ' - 'ucrReceiverYear - ' - Me.ucrReceiverYear.AutoSize = True - Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Location = New System.Drawing.Point(498, 100) - 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.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 4 - 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(2, 398) + 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 + Me.ucrChkIncludeSummaryData.Size = New System.Drawing.Size(221, 31) + Me.ucrChkIncludeSummaryData.TabIndex = 68 ' 'grpSummaries ' @@ -204,12 +281,10 @@ Partial Class dlgExportClimaticDefinitions 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.Location = New System.Drawing.Point(2, 264) 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.Size = New System.Drawing.Size(313, 116) + Me.grpSummaries.TabIndex = 67 Me.grpSummaries.TabStop = False Me.grpSummaries.Text = "Summaries" ' @@ -217,63 +292,110 @@ Partial Class dlgExportClimaticDefinitions ' 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.Location = New System.Drawing.Point(8, 77) + Me.ucrChkMonthlyTemp.Margin = New System.Windows.Forms.Padding(6) Me.ucrChkMonthlyTemp.Name = "ucrChkMonthlyTemp" - Me.ucrChkMonthlyTemp.Size = New System.Drawing.Size(220, 52) + 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(157, 44) + Me.ucrChkSeasonStartProp.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkSeasonStartProp.Name = "ucrChkSeasonStartProp" + 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(157, 77) + Me.ucrChkExtremes.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkExtremes.Name = "ucrChkExtremes" + Me.ucrChkExtremes.Size = New System.Drawing.Size(147, 34) + Me.ucrChkExtremes.TabIndex = 5 + Me.ucrChkExtremes.Visible = False + ' + 'ucrChkCropSuccessProp + ' + Me.ucrChkCropSuccessProp.AutoSize = True + Me.ucrChkCropSuccessProp.Checked = False + Me.ucrChkCropSuccessProp.Location = New System.Drawing.Point(157, 13) + Me.ucrChkCropSuccessProp.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkCropSuccessProp.Name = "ucrChkCropSuccessProp" + 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(8, 45) + Me.ucrChkAnnualTemp.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkAnnualTemp.Name = "ucrChkAnnualTemp" + 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(8, 13) + Me.ucrChkAnnualRainfall.Margin = New System.Windows.Forms.Padding(6) + Me.ucrChkAnnualRainfall.Name = "ucrChkAnnualRainfall" + Me.ucrChkAnnualRainfall.Size = New System.Drawing.Size(149, 34) + Me.ucrChkAnnualRainfall.TabIndex = 0 + ' '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.Location = New System.Drawing.Point(330, 307) Me.lblCropData.Name = "lblCropData" - Me.lblCropData.Size = New System.Drawing.Size(86, 20) - Me.lblCropData.TabIndex = 13 + Me.lblCropData.Size = New System.Drawing.Size(58, 13) + Me.lblCropData.TabIndex = 61 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.Location = New System.Drawing.Point(330, 267) Me.lblDataByYearMonth.Name = "lblDataByYearMonth" - Me.lblDataByYearMonth.Size = New System.Drawing.Size(188, 20) - Me.lblDataByYearMonth.TabIndex = 11 + Me.lblDataByYearMonth.Size = New System.Drawing.Size(127, 13) + Me.lblDataByYearMonth.TabIndex = 59 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.Location = New System.Drawing.Point(330, 227) Me.lblDataByYear.Name = "lblDataByYear" - Me.lblDataByYear.Size = New System.Drawing.Size(108, 20) - Me.lblDataByYear.TabIndex = 9 + Me.lblDataByYear.Size = New System.Drawing.Size(73, 13) + Me.lblDataByYear.TabIndex = 57 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.Location = New System.Drawing.Point(330, 191) Me.lblRain.Name = "lblRain" - Me.lblRain.Size = New System.Drawing.Size(46, 20) - Me.lblRain.TabIndex = 7 + Me.lblRain.Size = New System.Drawing.Size(32, 13) + Me.lblRain.TabIndex = 55 Me.lblRain.Text = "Rain:" ' '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(330, 207) 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 = 56 Me.ucrReceiverRain.ucrSelector = Nothing ' 'ucrSelectorExportDefinitions @@ -282,160 +404,219 @@ 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(2, 78) 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 = 48 ' '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(2, 438) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(615, 92) - Me.ucrBase.TabIndex = 25 + Me.ucrBase.Size = New System.Drawing.Size(410, 60) + Me.ucrBase.TabIndex = 70 ' '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(330, 244) 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 = 58 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(330, 283) 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 = 60 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(330, 323) 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 = 62 Me.ucrReceiverCropData.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.Name = "lblExport" - Me.lblExport.Size = New System.Drawing.Size(57, 20) - Me.lblExport.TabIndex = 22 - 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.Name = "cmdChooseFile" - Me.cmdChooseFile.Size = New System.Drawing.Size(120, 35) - Me.cmdChooseFile.TabIndex = 24 - Me.cmdChooseFile.Text = "Browse" - Me.cmdChooseFile.UseVisualStyleBackColor = True - ' - 'ucrInputTokenPath - ' - Me.ucrInputTokenPath.AddQuotesIfUnrecognised = True - 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.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 + 'lblDistrict + ' + Me.lblDistrict.AutoSize = True + Me.lblDistrict.Location = New System.Drawing.Point(324, 270) + 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 = 79 + Me.lblDistrict.Text = "District" + ' + 'lblElavation + ' + Me.lblElavation.AutoSize = True + Me.lblElavation.Location = New System.Drawing.Point(323, 222) + 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 = 77 + Me.lblElavation.Text = "Elevation" + ' + 'lblLatitude + ' + Me.lblLatitude.AutoSize = True + Me.lblLatitude.Location = New System.Drawing.Point(322, 173) + 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 = 75 + Me.lblLatitude.Text = "Latitude" + ' + 'lblLongitude + ' + Me.lblLongitude.AutoSize = True + Me.lblLongitude.Location = New System.Drawing.Point(321, 123) + 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 = 73 + Me.lblLongitude.Text = "Longitude " + ' + 'ucrReceiverLongititude + ' + Me.ucrReceiverLongititude.AutoSize = True + Me.ucrReceiverLongititude.frmParent = Me + Me.ucrReceiverLongititude.Location = New System.Drawing.Point(319, 140) + 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 = 74 + Me.ucrReceiverLongititude.ucrSelector = Nothing + ' + 'ucrReceiverLatitude + ' + Me.ucrReceiverLatitude.AutoSize = True + Me.ucrReceiverLatitude.frmParent = Me + Me.ucrReceiverLatitude.Location = New System.Drawing.Point(319, 192) + 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 = 76 + Me.ucrReceiverLatitude.ucrSelector = Nothing + ' + 'ucrReceiverElavation + ' + Me.ucrReceiverElavation.AutoSize = True + Me.ucrReceiverElavation.frmParent = Me + Me.ucrReceiverElavation.Location = New System.Drawing.Point(319, 240) + 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 = 78 + Me.ucrReceiverElavation.ucrSelector = Nothing + ' + 'ucrReceiverDistrict + ' + Me.ucrReceiverDistrict.AutoSize = True + Me.ucrReceiverDistrict.frmParent = Me + Me.ucrReceiverDistrict.Location = New System.Drawing.Point(319, 289) + 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 = 80 + Me.ucrReceiverDistrict.ucrSelector = Nothing + ' + 'ucrReceiverStationName + ' + Me.ucrReceiverStationName.AutoSize = True + Me.ucrReceiverStationName.frmParent = Me + Me.ucrReceiverStationName.Location = New System.Drawing.Point(319, 93) + 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 = 72 + Me.ucrReceiverStationName.ucrSelector = Nothing + ' + 'lblStationName + ' + Me.lblStationName.AutoSize = True + Me.lblStationName.Location = New System.Drawing.Point(321, 78) + 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 = 71 + Me.lblStationName.Text = "Station Name" + ' + 'lblCountryMetada + ' + Me.lblCountryMetada.AutoSize = True + Me.lblCountryMetada.Location = New System.Drawing.Point(323, 316) + Me.lblCountryMetada.Name = "lblCountryMetada" + Me.lblCountryMetada.Size = New System.Drawing.Size(46, 13) + Me.lblCountryMetada.TabIndex = 85 + Me.lblCountryMetada.Text = "Country:" + ' + 'ucrInputCountryMetadata + ' + Me.ucrInputCountryMetadata.AddQuotesIfUnrecognised = True + Me.ucrInputCountryMetadata.AutoSize = True + Me.ucrInputCountryMetadata.IsMultiline = False + Me.ucrInputCountryMetadata.IsReadOnly = False + Me.ucrInputCountryMetadata.Location = New System.Drawing.Point(319, 334) + 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 = 84 ' '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,8 +629,19 @@ 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" @@ -462,21 +654,31 @@ Partial Class dlgExportClimaticDefinitions End Sub + Friend WithEvents ucrReceiverYear As ucrReceiverSingle + Friend WithEvents lblExport As Label + Friend WithEvents cmdChooseFile As Button + Friend WithEvents ucrInputTokenPath As ucrInputTextBox + Friend WithEvents rdoUploadSummaries As RadioButton + Friend WithEvents rdoUpdateMetadata As RadioButton + Friend WithEvents ucrPnlExportGoogle As UcrPanel + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents lblDefinitionsID As Label + Friend WithEvents ucrInputDefinitionsID As ucrInputTextBox + Friend WithEvents cmdDefine As Button Friend WithEvents lblStation As Label Friend WithEvents lblCountry As Label Friend WithEvents ucrInputCountry As ucrInputTextBox - Friend WithEvents ucrChkSeasonStartProp As ucrCheck - Friend WithEvents ucrChkExtremes As ucrCheck - Friend WithEvents ucrChkCropSuccessProp As ucrCheck - Friend WithEvents ucrChkAnnualTemp As ucrCheck - Friend WithEvents ucrChkAnnualRainfall As ucrCheck Friend WithEvents lblMonth As Label Friend WithEvents lblYear As Label Friend WithEvents ucrReceiverMonth As ucrReceiverSingle - Friend WithEvents ucrReceiverYear As ucrReceiverSingle Friend WithEvents ucrChkIncludeSummaryData As ucrCheck Friend WithEvents grpSummaries As GroupBox Friend WithEvents ucrChkMonthlyTemp As ucrCheck + Friend WithEvents ucrChkSeasonStartProp As ucrCheck + Friend WithEvents ucrChkExtremes As ucrCheck + Friend WithEvents ucrChkCropSuccessProp As ucrCheck + Friend WithEvents ucrChkAnnualTemp As ucrCheck + Friend WithEvents ucrChkAnnualRainfall As ucrCheck Friend WithEvents lblCropData As Label Friend WithEvents lblDataByYearMonth As Label Friend WithEvents lblDataByYear As Label @@ -487,11 +689,16 @@ 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 lblDistrict As Label + Friend WithEvents lblElavation As Label + Friend WithEvents lblLatitude As Label + Friend WithEvents lblLongitude 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 lblStationName As Label + Friend WithEvents lblCountryMetada As Label + Friend WithEvents ucrInputCountryMetadata As ucrInputTextBox End Class diff --git a/instat/dlgExportClimaticDefinitions.vb b/instat/dlgExportClimaticDefinitions.vb index 723aba5fe08..2ca03ba31ea 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, clsUpdateMetadataInfoFunction, ClsGcsAuthFileFunction As New RFunction + Public clsRsyntax As New RSyntax + Public clsExportRinstatToBucketFunction, 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, 360) + 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