diff --git a/instat/dlgClimSoft.Designer.vb b/instat/dlgClimSoft.Designer.vb index aa14f7e0879..1c5b32afda8 100644 --- a/instat/dlgClimSoft.Designer.vb +++ b/instat/dlgClimSoft.Designer.vb @@ -39,202 +39,311 @@ Partial Class dlgClimSoft Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Me.cmdEstablishConnection = New System.Windows.Forms.Button() - Me.lblElements = New System.Windows.Forms.Label() - Me.lblStations = New System.Windows.Forms.Label() - Me.lblStartDate = New System.Windows.Forms.Label() - Me.lblEndDate = New System.Windows.Forms.Label() + Me.btnConnection = New System.Windows.Forms.Button() + Me.lblSelectElements = New System.Windows.Forms.Label() + Me.lblSelectStations = New System.Windows.Forms.Label() Me.ttClimsoft = New System.Windows.Forms.ToolTip(Me.components) - Me.ucrChkUnstackData = New instat.ucrCheck() - Me.ucrChkFlagsData = New instat.ucrCheck() - Me.ucrChkElements = New instat.ucrCheck() - Me.ucrChkDateRange = New instat.ucrCheck() - Me.ucrDtpEndDate = New instat.ucrDateTimePicker() - Me.ucrDtpStartdate = New instat.ucrDateTimePicker() - Me.ucrChkObservationData = New instat.ucrCheck() + Me.ucrChkImportElementsMetadata = New instat.ucrCheck() + Me.ucrChkImportStationsMetadata = New instat.ucrCheck() + Me.ucrChkDataDate = New instat.ucrCheck() + Me.ucrDtpEndDataDate = New instat.ucrDateTimePicker() + Me.ucrDtpStartDataDate = New instat.ucrDateTimePicker() + Me.ucrChkImportFlagsMetadata = New instat.ucrCheck() Me.lblConnection = New System.Windows.Forms.Label() - Me.ucrComboBoxElements = New instat.ucrInputComboBox() - Me.ucrComboBoxStations = New instat.ucrInputComboBox() + Me.lblToDataDate = New System.Windows.Forms.Label() + Me.lblSelectTable = New System.Windows.Forms.Label() + Me.lblSelectQCStatus = New System.Windows.Forms.Label() + Me.btnCheckRecords = New System.Windows.Forms.Button() + Me.lblRecordsNum = New System.Windows.Forms.Label() + Me.btnMoreOptions = New System.Windows.Forms.Button() + Me.rdoMetadata = New System.Windows.Forms.RadioButton() + Me.rdoData = New System.Windows.Forms.RadioButton() + Me.ucrPnlOptions = New instat.UcrPanel() + Me.ucrCboQCStatus = New instat.ucrInputComboBox() + Me.ucrCboTable = New instat.ucrInputComboBox() + Me.ucrCboElements = New instat.ucrInputComboBox() + Me.ucrCboStations = New instat.ucrInputComboBox() Me.ucrSelectorForClimSoft = New instat.ucrSelectorAddRemove() Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() Me.ucrReceiverMultipleStations = New instat.ucrReceiverMultiple() Me.ucrBase = New instat.ucrButtons() + Me.ucrChKUnstackData = New instat.ucrCheck() Me.SuspendLayout() ' - 'cmdEstablishConnection - ' - Me.cmdEstablishConnection.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.cmdEstablishConnection.Location = New System.Drawing.Point(8, 8) - Me.cmdEstablishConnection.Name = "cmdEstablishConnection" - Me.cmdEstablishConnection.Size = New System.Drawing.Size(142, 23) - Me.cmdEstablishConnection.TabIndex = 1 - Me.cmdEstablishConnection.Text = "Establish Connection..." - Me.cmdEstablishConnection.UseVisualStyleBackColor = True - ' - 'lblElements - ' - Me.lblElements.AutoSize = True - Me.lblElements.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblElements.Location = New System.Drawing.Point(256, 194) - Me.lblElements.Name = "lblElements" - Me.lblElements.Size = New System.Drawing.Size(98, 13) - Me.lblElements.TabIndex = 4 - Me.lblElements.Text = "Selected Elements:" - ' - 'lblStations - ' - Me.lblStations.AutoSize = True - Me.lblStations.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblStations.Location = New System.Drawing.Point(256, 38) - Me.lblStations.Name = "lblStations" - Me.lblStations.Size = New System.Drawing.Size(93, 13) - Me.lblStations.TabIndex = 2 - Me.lblStations.Text = "Selected Stations:" - Me.lblStations.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - ' - 'lblStartDate - ' - Me.lblStartDate.AutoSize = True - Me.lblStartDate.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblStartDate.Location = New System.Drawing.Point(32, 307) - Me.lblStartDate.Name = "lblStartDate" - Me.lblStartDate.Size = New System.Drawing.Size(58, 13) - Me.lblStartDate.TabIndex = 7 - Me.lblStartDate.Text = "Start Date:" - ' - 'lblEndDate - ' - Me.lblEndDate.AutoSize = True - Me.lblEndDate.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblEndDate.Location = New System.Drawing.Point(34, 349) - Me.lblEndDate.Name = "lblEndDate" - Me.lblEndDate.Size = New System.Drawing.Size(55, 13) - Me.lblEndDate.TabIndex = 9 - Me.lblEndDate.Text = "End Date:" - ' - 'ucrChkUnstackData - ' - Me.ucrChkUnstackData.AutoSize = True - Me.ucrChkUnstackData.Checked = True - Me.ucrChkUnstackData.Location = New System.Drawing.Point(8, 235) - Me.ucrChkUnstackData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkUnstackData.Name = "ucrChkUnstackData" - Me.ucrChkUnstackData.Size = New System.Drawing.Size(178, 23) - Me.ucrChkUnstackData.TabIndex = 9 - Me.ttClimsoft.SetToolTip(Me.ucrChkUnstackData, "Select Observation Data Date Range") - ' - 'ucrChkFlagsData - ' - Me.ucrChkFlagsData.AutoSize = True - Me.ucrChkFlagsData.Checked = False - Me.ucrChkFlagsData.Location = New System.Drawing.Point(8, 212) - Me.ucrChkFlagsData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkFlagsData.Name = "ucrChkFlagsData" - Me.ucrChkFlagsData.Size = New System.Drawing.Size(213, 23) - Me.ucrChkFlagsData.TabIndex = 8 - Me.ttClimsoft.SetToolTip(Me.ucrChkFlagsData, "Select Observation Data Date Range") - ' - 'ucrChkElements - ' - Me.ucrChkElements.AutoSize = True - Me.ucrChkElements.Checked = False - Me.ucrChkElements.Location = New System.Drawing.Point(8, 258) - Me.ucrChkElements.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkElements.Name = "ucrChkElements" - Me.ucrChkElements.Size = New System.Drawing.Size(230, 23) - Me.ucrChkElements.TabIndex = 10 - Me.ttClimsoft.SetToolTip(Me.ucrChkElements, "Select Observation Data Date Range") - ' - 'ucrChkDateRange - ' - Me.ucrChkDateRange.AutoSize = True - Me.ucrChkDateRange.Checked = False - Me.ucrChkDateRange.Location = New System.Drawing.Point(8, 283) - Me.ucrChkDateRange.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkDateRange.Name = "ucrChkDateRange" - Me.ucrChkDateRange.Size = New System.Drawing.Size(178, 23) - Me.ucrChkDateRange.TabIndex = 11 - Me.ttClimsoft.SetToolTip(Me.ucrChkDateRange, "Select Observation Data Date Range") - ' - 'ucrDtpEndDate - ' - Me.ucrDtpEndDate.AutoSize = True - Me.ucrDtpEndDate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 379) - Me.ucrDtpEndDate.Format = "dd MMM yyyy" - Me.ucrDtpEndDate.Location = New System.Drawing.Point(36, 367) - Me.ucrDtpEndDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrDtpEndDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.ucrDtpEndDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.ucrDtpEndDate.Name = "ucrDtpEndDate" - Me.ucrDtpEndDate.Size = New System.Drawing.Size(163, 20) - Me.ucrDtpEndDate.TabIndex = 13 - Me.ttClimsoft.SetToolTip(Me.ucrDtpEndDate, "End Date (To)") - ' - 'ucrDtpStartdate - ' - Me.ucrDtpStartdate.AutoSize = True - Me.ucrDtpStartdate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 408) - Me.ucrDtpStartdate.Format = "dd MMM yyyy" - Me.ucrDtpStartdate.Location = New System.Drawing.Point(35, 322) - Me.ucrDtpStartdate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrDtpStartdate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.ucrDtpStartdate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.ucrDtpStartdate.Name = "ucrDtpStartdate" - Me.ucrDtpStartdate.Size = New System.Drawing.Size(163, 20) - Me.ucrDtpStartdate.TabIndex = 12 - Me.ttClimsoft.SetToolTip(Me.ucrDtpStartdate, "Start Date (From)") - ' - 'ucrChkObservationData - ' - Me.ucrChkObservationData.AutoSize = True - Me.ucrChkObservationData.Checked = False - Me.ucrChkObservationData.Location = New System.Drawing.Point(8, 188) - Me.ucrChkObservationData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) - Me.ucrChkObservationData.Name = "ucrChkObservationData" - Me.ucrChkObservationData.Size = New System.Drawing.Size(202, 23) - Me.ucrChkObservationData.TabIndex = 7 - Me.ttClimsoft.SetToolTip(Me.ucrChkObservationData, "Select Observation Data Date Range") + 'btnConnection + ' + Me.btnConnection.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.btnConnection.Location = New System.Drawing.Point(7, 45) + Me.btnConnection.Name = "btnConnection" + Me.btnConnection.Size = New System.Drawing.Size(147, 23) + Me.btnConnection.TabIndex = 1 + Me.btnConnection.Text = "Connect to Database" + Me.btnConnection.UseVisualStyleBackColor = True + ' + 'lblSelectElements + ' + Me.lblSelectElements.AutoSize = True + Me.lblSelectElements.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectElements.Location = New System.Drawing.Point(285, 226) + Me.lblSelectElements.Name = "lblSelectElements" + Me.lblSelectElements.Size = New System.Drawing.Size(86, 13) + Me.lblSelectElements.TabIndex = 4 + Me.lblSelectElements.Text = "Select Elements:" + ' + 'lblSelectStations + ' + Me.lblSelectStations.AutoSize = True + Me.lblSelectStations.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectStations.Location = New System.Drawing.Point(285, 70) + Me.lblSelectStations.Name = "lblSelectStations" + Me.lblSelectStations.Size = New System.Drawing.Size(81, 13) + Me.lblSelectStations.TabIndex = 2 + Me.lblSelectStations.Text = "Select Stations:" + Me.lblSelectStations.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'ucrChkImportElementsMetadata + ' + Me.ucrChkImportElementsMetadata.AutoSize = True + Me.ucrChkImportElementsMetadata.Checked = True + Me.ucrChkImportElementsMetadata.Location = New System.Drawing.Point(10, 110) + Me.ucrChkImportElementsMetadata.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkImportElementsMetadata.Name = "ucrChkImportElementsMetadata" + Me.ucrChkImportElementsMetadata.Size = New System.Drawing.Size(213, 23) + Me.ucrChkImportElementsMetadata.TabIndex = 36 + Me.ttClimsoft.SetToolTip(Me.ucrChkImportElementsMetadata, "Unstack elements") + ' + 'ucrChkImportStationsMetadata + ' + Me.ucrChkImportStationsMetadata.AutoSize = True + Me.ucrChkImportStationsMetadata.Checked = True + Me.ucrChkImportStationsMetadata.Location = New System.Drawing.Point(10, 85) + Me.ucrChkImportStationsMetadata.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkImportStationsMetadata.Name = "ucrChkImportStationsMetadata" + Me.ucrChkImportStationsMetadata.Size = New System.Drawing.Size(213, 23) + Me.ucrChkImportStationsMetadata.TabIndex = 35 + Me.ttClimsoft.SetToolTip(Me.ucrChkImportStationsMetadata, "Unstack elements") + ' + 'ucrChkDataDate + ' + Me.ucrChkDataDate.AutoSize = True + Me.ucrChkDataDate.Checked = False + Me.ucrChkDataDate.Location = New System.Drawing.Point(9, 317) + Me.ucrChkDataDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkDataDate.Name = "ucrChkDataDate" + Me.ucrChkDataDate.Size = New System.Drawing.Size(169, 23) + Me.ucrChkDataDate.TabIndex = 21 + Me.ttClimsoft.SetToolTip(Me.ucrChkDataDate, "Select Observation Data Date Range") + ' + 'ucrDtpEndDataDate + ' + Me.ucrDtpEndDataDate.AutoSize = True + Me.ucrDtpEndDataDate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 379) + Me.ucrDtpEndDataDate.Format = "dd MMM yyyy" + Me.ucrDtpEndDataDate.Location = New System.Drawing.Point(156, 340) + Me.ucrDtpEndDataDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrDtpEndDataDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpEndDataDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpEndDataDate.Name = "ucrDtpEndDataDate" + Me.ucrDtpEndDataDate.Size = New System.Drawing.Size(102, 20) + Me.ucrDtpEndDataDate.TabIndex = 23 + Me.ttClimsoft.SetToolTip(Me.ucrDtpEndDataDate, "End Date (To)") + ' + 'ucrDtpStartDataDate + ' + Me.ucrDtpStartDataDate.AutoSize = True + Me.ucrDtpStartDataDate.DateValue = New Date(2021, 5, 18, 16, 45, 8, 408) + Me.ucrDtpStartDataDate.Format = "dd MMM yyyy" + Me.ucrDtpStartDataDate.Location = New System.Drawing.Point(23, 341) + Me.ucrDtpStartDataDate.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrDtpStartDataDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpStartDataDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpStartDataDate.Name = "ucrDtpStartDataDate" + Me.ucrDtpStartDataDate.Size = New System.Drawing.Size(102, 20) + Me.ucrDtpStartDataDate.TabIndex = 22 + Me.ttClimsoft.SetToolTip(Me.ucrDtpStartDataDate, "Start Date (From)") + ' + 'ucrChkImportFlagsMetadata + ' + Me.ucrChkImportFlagsMetadata.AutoSize = True + Me.ucrChkImportFlagsMetadata.Checked = True + Me.ucrChkImportFlagsMetadata.Location = New System.Drawing.Point(10, 135) + Me.ucrChkImportFlagsMetadata.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChkImportFlagsMetadata.Name = "ucrChkImportFlagsMetadata" + Me.ucrChkImportFlagsMetadata.Size = New System.Drawing.Size(213, 23) + Me.ucrChkImportFlagsMetadata.TabIndex = 37 + Me.ttClimsoft.SetToolTip(Me.ucrChkImportFlagsMetadata, "Unstack elements") ' 'lblConnection ' Me.lblConnection.AutoSize = True Me.lblConnection.ForeColor = System.Drawing.Color.Red Me.lblConnection.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblConnection.Location = New System.Drawing.Point(153, 14) + Me.lblConnection.Location = New System.Drawing.Point(164, 51) Me.lblConnection.Name = "lblConnection" Me.lblConnection.Size = New System.Drawing.Size(78, 13) Me.lblConnection.TabIndex = 16 Me.lblConnection.Text = "No Connection" ' - 'ucrComboBoxElements - ' - Me.ucrComboBoxElements.AddQuotesIfUnrecognised = True - Me.ucrComboBoxElements.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrComboBoxElements.GetSetSelectedIndex = -1 - Me.ucrComboBoxElements.IsReadOnly = False - Me.ucrComboBoxElements.Location = New System.Drawing.Point(259, 210) - Me.ucrComboBoxElements.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) - Me.ucrComboBoxElements.Name = "ucrComboBoxElements" - Me.ucrComboBoxElements.Size = New System.Drawing.Size(137, 21) - Me.ucrComboBoxElements.TabIndex = 5 - ' - 'ucrComboBoxStations - ' - Me.ucrComboBoxStations.AddQuotesIfUnrecognised = True - Me.ucrComboBoxStations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrComboBoxStations.GetSetSelectedIndex = -1 - Me.ucrComboBoxStations.IsReadOnly = False - Me.ucrComboBoxStations.Location = New System.Drawing.Point(256, 53) - Me.ucrComboBoxStations.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) - Me.ucrComboBoxStations.Name = "ucrComboBoxStations" - Me.ucrComboBoxStations.Size = New System.Drawing.Size(137, 21) - Me.ucrComboBoxStations.TabIndex = 3 + 'lblToDataDate + ' + Me.lblToDataDate.AutoSize = True + Me.lblToDataDate.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblToDataDate.Location = New System.Drawing.Point(130, 345) + Me.lblToDataDate.Name = "lblToDataDate" + Me.lblToDataDate.Size = New System.Drawing.Size(20, 13) + Me.lblToDataDate.TabIndex = 20 + Me.lblToDataDate.Text = "To" + ' + 'lblSelectTable + ' + Me.lblSelectTable.AutoSize = True + Me.lblSelectTable.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectTable.Location = New System.Drawing.Point(5, 238) + Me.lblSelectTable.Name = "lblSelectTable" + Me.lblSelectTable.Size = New System.Drawing.Size(96, 13) + Me.lblSelectTable.TabIndex = 24 + Me.lblSelectTable.Text = "Select Data Table:" + Me.lblSelectTable.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'lblSelectQCStatus + ' + Me.lblSelectQCStatus.AutoSize = True + Me.lblSelectQCStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblSelectQCStatus.Location = New System.Drawing.Point(5, 265) + Me.lblSelectQCStatus.Name = "lblSelectQCStatus" + Me.lblSelectQCStatus.Size = New System.Drawing.Size(117, 13) + Me.lblSelectQCStatus.TabIndex = 26 + Me.lblSelectQCStatus.Text = "Select Data QC Status:" + Me.lblSelectQCStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'btnCheckRecords + ' + Me.btnCheckRecords.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.btnCheckRecords.Location = New System.Drawing.Point(6, 404) + Me.btnCheckRecords.Name = "btnCheckRecords" + Me.btnCheckRecords.Size = New System.Drawing.Size(139, 23) + Me.btnCheckRecords.TabIndex = 28 + Me.btnCheckRecords.Text = "Check Records" + Me.btnCheckRecords.UseVisualStyleBackColor = True + ' + 'lblRecordsNum + ' + Me.lblRecordsNum.AutoSize = True + Me.lblRecordsNum.ForeColor = System.Drawing.Color.Red + Me.lblRecordsNum.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblRecordsNum.Location = New System.Drawing.Point(156, 408) + Me.lblRecordsNum.Name = "lblRecordsNum" + Me.lblRecordsNum.Size = New System.Drawing.Size(64, 13) + Me.lblRecordsNum.TabIndex = 29 + Me.lblRecordsNum.Text = "No Records" + ' + 'btnMoreOptions + ' + Me.btnMoreOptions.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.btnMoreOptions.Location = New System.Drawing.Point(5, 373) + Me.btnMoreOptions.Name = "btnMoreOptions" + Me.btnMoreOptions.Size = New System.Drawing.Size(139, 23) + Me.btnMoreOptions.TabIndex = 31 + Me.btnMoreOptions.Text = "Options" + Me.btnMoreOptions.UseVisualStyleBackColor = True + ' + 'rdoMetadata + ' + Me.rdoMetadata.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoMetadata.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMetadata.FlatAppearance.BorderSize = 2 + Me.rdoMetadata.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMetadata.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoMetadata.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoMetadata.Location = New System.Drawing.Point(197, 5) + Me.rdoMetadata.Name = "rdoMetadata" + Me.rdoMetadata.Size = New System.Drawing.Size(145, 28) + Me.rdoMetadata.TabIndex = 34 + Me.rdoMetadata.TabStop = True + Me.rdoMetadata.Tag = "" + Me.rdoMetadata.Text = "Metadata" + Me.rdoMetadata.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoMetadata.UseVisualStyleBackColor = True + ' + 'rdoData + ' + Me.rdoData.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoData.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoData.FlatAppearance.BorderSize = 2 + Me.rdoData.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoData.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoData.Location = New System.Drawing.Point(55, 5) + Me.rdoData.Name = "rdoData" + Me.rdoData.Size = New System.Drawing.Size(145, 28) + Me.rdoData.TabIndex = 33 + Me.rdoData.TabStop = True + Me.rdoData.Tag = "" + Me.rdoData.Text = "Observation Data" + Me.rdoData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoData.UseVisualStyleBackColor = True + ' + 'ucrPnlOptions + ' + Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrPnlOptions.Location = New System.Drawing.Point(6, 4) + Me.ucrPnlOptions.Margin = New System.Windows.Forms.Padding(5) + Me.ucrPnlOptions.Name = "ucrPnlOptions" + Me.ucrPnlOptions.Size = New System.Drawing.Size(428, 30) + Me.ucrPnlOptions.TabIndex = 32 + ' + 'ucrCboQCStatus + ' + Me.ucrCboQCStatus.AddQuotesIfUnrecognised = True + Me.ucrCboQCStatus.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboQCStatus.GetSetSelectedIndex = -1 + Me.ucrCboQCStatus.IsReadOnly = False + Me.ucrCboQCStatus.Location = New System.Drawing.Point(154, 259) + Me.ucrCboQCStatus.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboQCStatus.Name = "ucrCboQCStatus" + Me.ucrCboQCStatus.Size = New System.Drawing.Size(104, 21) + Me.ucrCboQCStatus.TabIndex = 27 + ' + 'ucrCboTable + ' + Me.ucrCboTable.AddQuotesIfUnrecognised = True + Me.ucrCboTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboTable.GetSetSelectedIndex = -1 + Me.ucrCboTable.IsReadOnly = False + Me.ucrCboTable.Location = New System.Drawing.Point(154, 233) + Me.ucrCboTable.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboTable.Name = "ucrCboTable" + Me.ucrCboTable.Size = New System.Drawing.Size(104, 21) + Me.ucrCboTable.TabIndex = 25 + ' + 'ucrCboElements + ' + Me.ucrCboElements.AddQuotesIfUnrecognised = True + Me.ucrCboElements.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboElements.GetSetSelectedIndex = -1 + Me.ucrCboElements.IsReadOnly = False + Me.ucrCboElements.Location = New System.Drawing.Point(288, 242) + Me.ucrCboElements.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboElements.Name = "ucrCboElements" + Me.ucrCboElements.Size = New System.Drawing.Size(137, 21) + Me.ucrCboElements.TabIndex = 5 + ' + 'ucrCboStations + ' + Me.ucrCboStations.AddQuotesIfUnrecognised = True + Me.ucrCboStations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrCboStations.GetSetSelectedIndex = -1 + Me.ucrCboStations.IsReadOnly = False + Me.ucrCboStations.Location = New System.Drawing.Point(285, 85) + Me.ucrCboStations.Margin = New System.Windows.Forms.Padding(9, 12, 9, 12) + Me.ucrCboStations.Name = "ucrCboStations" + Me.ucrCboStations.Size = New System.Drawing.Size(137, 21) + Me.ucrCboStations.TabIndex = 3 ' 'ucrSelectorForClimSoft ' Me.ucrSelectorForClimSoft.AutoSize = True Me.ucrSelectorForClimSoft.bShowHiddenColumns = False - Me.ucrSelectorForClimSoft.Location = New System.Drawing.Point(8, 43) + Me.ucrSelectorForClimSoft.Location = New System.Drawing.Point(7, 84) Me.ucrSelectorForClimSoft.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorForClimSoft.Name = "ucrSelectorForClimSoft" Me.ucrSelectorForClimSoft.Size = New System.Drawing.Size(216, 147) @@ -244,7 +353,7 @@ Partial Class dlgClimSoft ' Me.ucrReceiverMultipleElements.AutoSize = True Me.ucrReceiverMultipleElements.frmParent = Me - Me.ucrReceiverMultipleElements.Location = New System.Drawing.Point(259, 234) + Me.ucrReceiverMultipleElements.Location = New System.Drawing.Point(288, 266) Me.ucrReceiverMultipleElements.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMultipleElements.Name = "ucrReceiverMultipleElements" Me.ucrReceiverMultipleElements.Selector = Nothing @@ -257,7 +366,7 @@ Partial Class dlgClimSoft ' Me.ucrReceiverMultipleStations.AutoSize = True Me.ucrReceiverMultipleStations.frmParent = Me - Me.ucrReceiverMultipleStations.Location = New System.Drawing.Point(256, 77) + Me.ucrReceiverMultipleStations.Location = New System.Drawing.Point(285, 109) Me.ucrReceiverMultipleStations.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMultipleStations.Name = "ucrReceiverMultipleStations" Me.ucrReceiverMultipleStations.Selector = Nothing @@ -270,36 +379,56 @@ Partial Class dlgClimSoft ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(8, 402) + Me.ucrBase.Location = New System.Drawing.Point(9, 444) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(405, 52) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 14 ' + 'ucrChKUnstackData + ' + Me.ucrChKUnstackData.AutoSize = True + Me.ucrChKUnstackData.Checked = False + Me.ucrChKUnstackData.Location = New System.Drawing.Point(8, 289) + Me.ucrChKUnstackData.Margin = New System.Windows.Forms.Padding(6, 8, 6, 8) + Me.ucrChKUnstackData.Name = "ucrChKUnstackData" + Me.ucrChKUnstackData.Size = New System.Drawing.Size(169, 23) + Me.ucrChKUnstackData.TabIndex = 38 + Me.ttClimsoft.SetToolTip(Me.ucrChKUnstackData, "Select Observation Data Date Range") + ' 'dlgClimSoft ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(408, 459) - Me.Controls.Add(Me.ucrChkUnstackData) - Me.Controls.Add(Me.ucrChkFlagsData) + Me.ClientSize = New System.Drawing.Size(438, 505) + Me.Controls.Add(Me.ucrChKUnstackData) + Me.Controls.Add(Me.ucrChkImportFlagsMetadata) + Me.Controls.Add(Me.ucrChkImportElementsMetadata) + Me.Controls.Add(Me.ucrChkImportStationsMetadata) + Me.Controls.Add(Me.rdoMetadata) + Me.Controls.Add(Me.rdoData) + Me.Controls.Add(Me.ucrPnlOptions) + Me.Controls.Add(Me.btnMoreOptions) + Me.Controls.Add(Me.lblRecordsNum) + Me.Controls.Add(Me.btnCheckRecords) + Me.Controls.Add(Me.ucrCboQCStatus) + Me.Controls.Add(Me.lblSelectQCStatus) + Me.Controls.Add(Me.ucrCboTable) + Me.Controls.Add(Me.lblSelectTable) + Me.Controls.Add(Me.ucrChkDataDate) + Me.Controls.Add(Me.ucrDtpEndDataDate) + Me.Controls.Add(Me.ucrDtpStartDataDate) + Me.Controls.Add(Me.lblToDataDate) Me.Controls.Add(Me.lblConnection) - Me.Controls.Add(Me.ucrChkElements) - Me.Controls.Add(Me.ucrComboBoxElements) - Me.Controls.Add(Me.ucrComboBoxStations) - Me.Controls.Add(Me.ucrChkDateRange) - Me.Controls.Add(Me.ucrDtpEndDate) - Me.Controls.Add(Me.ucrDtpStartdate) - Me.Controls.Add(Me.ucrChkObservationData) - Me.Controls.Add(Me.lblEndDate) + Me.Controls.Add(Me.ucrCboElements) + Me.Controls.Add(Me.ucrCboStations) Me.Controls.Add(Me.ucrSelectorForClimSoft) - Me.Controls.Add(Me.lblStartDate) Me.Controls.Add(Me.ucrReceiverMultipleElements) - Me.Controls.Add(Me.lblStations) - Me.Controls.Add(Me.lblElements) + Me.Controls.Add(Me.lblSelectStations) + Me.Controls.Add(Me.lblSelectElements) Me.Controls.Add(Me.ucrReceiverMultipleStations) - Me.Controls.Add(Me.cmdEstablishConnection) + Me.Controls.Add(Me.btnConnection) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -313,23 +442,32 @@ Partial Class dlgClimSoft End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents cmdEstablishConnection As Button + Friend WithEvents btnConnection As Button Friend WithEvents ucrReceiverMultipleStations As ucrReceiverMultiple Friend WithEvents ucrReceiverMultipleElements As ucrReceiverMultiple - Friend WithEvents lblStations As Label - Friend WithEvents lblElements As Label - Friend WithEvents lblStartDate As Label + Friend WithEvents lblSelectStations As Label + Friend WithEvents lblSelectElements As Label Friend WithEvents ucrSelectorForClimSoft As ucrSelectorAddRemove - Friend WithEvents lblEndDate As Label Friend WithEvents ttClimsoft As ToolTip - Friend WithEvents ucrDtpEndDate As ucrDateTimePicker - Friend WithEvents ucrDtpStartdate As ucrDateTimePicker - Friend WithEvents ucrChkObservationData As ucrCheck - Friend WithEvents ucrChkDateRange As ucrCheck - Friend WithEvents ucrComboBoxStations As ucrInputComboBox - Friend WithEvents ucrComboBoxElements As ucrInputComboBox - Friend WithEvents ucrChkElements As ucrCheck + Friend WithEvents ucrCboStations As ucrInputComboBox + Friend WithEvents ucrCboElements As ucrInputComboBox Friend WithEvents lblConnection As Label - Friend WithEvents ucrChkFlagsData As ucrCheck - Friend WithEvents ucrChkUnstackData As ucrCheck -End Class + Friend WithEvents ucrChkDataDate As ucrCheck + Friend WithEvents ucrDtpEndDataDate As ucrDateTimePicker + Friend WithEvents ucrDtpStartDataDate As ucrDateTimePicker + Friend WithEvents lblToDataDate As Label + Friend WithEvents ucrCboTable As ucrInputComboBox + Friend WithEvents lblSelectTable As Label + Friend WithEvents ucrCboQCStatus As ucrInputComboBox + Friend WithEvents lblSelectQCStatus As Label + Friend WithEvents lblRecordsNum As Label + Friend WithEvents btnCheckRecords As Button + Friend WithEvents btnMoreOptions As Button + Friend WithEvents rdoMetadata As RadioButton + Friend WithEvents rdoData As RadioButton + Friend WithEvents ucrPnlOptions As UcrPanel + Friend WithEvents ucrChkImportElementsMetadata As ucrCheck + Friend WithEvents ucrChkImportStationsMetadata As ucrCheck + Friend WithEvents ucrChkImportFlagsMetadata As ucrCheck + Friend WithEvents ucrChKUnstackData As ucrCheck +End Class \ No newline at end of file diff --git a/instat/dlgClimSoft.vb b/instat/dlgClimSoft.vb index fd5aeac8f7a..b448a049de6 100644 --- a/instat/dlgClimSoft.vb +++ b/instat/dlgClimSoft.vb @@ -14,28 +14,22 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports instat + Imports instat.Translations +Imports RDotNet Public Class dlgClimSoft Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsRImportFromClimsoft As New RFunction + Private clsRImportClimsoftData, clsRImportClimsoftMetaData As New RFunction - 'the 2 dictionaries hold data for the station and elements comboboxes + 'the 4 dictionaries hold data for the station, elements, tables and QC comboboxes 'As of 28th August 2020, there is no direct way of getting the selected value from the custom combobox 'these are declared here to be used in getting the selected value - Private dctStationColumns As New Dictionary(Of String, String) - Private dctElementsColumns As New Dictionary(Of String, String) - - 'flag used by elements receiver to determine when not to clear itself and change its sql query - 'useful when form is reloaded, to let the elements reciever retain the elements selected - Private bIgnoreReceiverChanges As Boolean = False + Private dctStationCols, dctElementsCols, dctTables, dctQCStatuses As New Dictionary(Of String, String) Private Sub dlgClimSoft_Load(sender As Object, e As EventArgs) Handles MyBase.Load - bIgnoreReceiverChanges = True If bFirstLoad Then - bIgnoreReceiverChanges = False InitialiseDialog() bFirstLoad = False End If @@ -44,7 +38,6 @@ Public Class dlgClimSoft End If SetRCodeForControls(bReset) bReset = False - bIgnoreReceiverChanges = False CheckAndUpdateConnectionStatus() 'autoTranslate(Me) ' temporary commented, affects the connected text by overwriting it with wrong text End Sub @@ -52,221 +45,296 @@ Public Class dlgClimSoft Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 329 - 'stations combobox - dctStationColumns.Add("Station IDs", Chr(34) & "stationId" & Chr(34)) - dctStationColumns.Add("Station Names", Chr(34) & "stationName" & Chr(34)) - dctStationColumns.Add("Station Qualifiers", Chr(34) & "qualifier" & Chr(34)) - ucrComboBoxStations.SetParameter(New RParameter("stationfiltercolumn", 0)) - ucrComboBoxStations.SetItems(dctStationColumns) - ucrComboBoxStations.SetRDefault(Chr(34) & "stationId" & Chr(34)) - ucrComboBoxStations.bAllowNonConditionValues = False - ucrComboBoxStations.SetDropDownStyleAsNonEditable() - - 'stations receiver - ucrReceiverMultipleStations.SetParameter(New RParameter("stations", 1)) + '--------------------------------------- + 'tables + dctTables.Add("Initial", Chr(34) & "observationinitial" & Chr(34)) + dctTables.Add("Final", Chr(34) & "observationfinal" & Chr(34)) + ucrCboTable.SetParameter(New RParameter("table", 0)) + ucrCboTable.SetItems(dctTables) + ucrCboTable.bAllowNonConditionValues = False + ucrCboTable.SetDropDownStyleAsNonEditable() + ucrCboTable.SetLinkedDisplayControl(lblSelectTable) + '--------------------------------------- + + 'stations + '--------------------------------------- + dctStationCols.Add("Station IDs", Chr(34) & "stationId" & Chr(34)) + dctStationCols.Add("Station Names", Chr(34) & "stationName" & Chr(34)) + dctStationCols.Add("Station Qualifiers", Chr(34) & "qualifier" & Chr(34)) + ucrCboStations.SetParameter(New RParameter("station_filter_column", 1)) + ucrCboStations.SetItems(dctStationCols) + ucrCboStations.bAllowNonConditionValues = False + ucrCboStations.SetDropDownStyleAsNonEditable() + ucrCboElements.SetLinkedDisplayControl(lblSelectElements) + + ucrReceiverMultipleStations.SetParameter(New RParameter("stations", 2)) ucrReceiverMultipleStations.SetParameterIsString() ucrReceiverMultipleStations.Selector = ucrSelectorForClimSoft ucrReceiverMultipleStations.SetItemType("database_variables") ucrReceiverMultipleStations.strSelectorHeading = "Stations" - ucrReceiverMultipleStations.SetLinkedDisplayControl(lblStations) - - 'elements combobox - dctElementsColumns.Add("Element IDs", Chr(34) & "elementId" & Chr(34)) - dctElementsColumns.Add("Element Names", Chr(34) & "elementName" & Chr(34)) - dctElementsColumns.Add("Element Abbreviation", Chr(34) & "abbreviation" & Chr(34)) - dctElementsColumns.Add("Element Types", Chr(34) & "elementtype" & Chr(34)) - ucrComboBoxElements.SetParameter(New RParameter("elementfiltercolumn", 2)) - ucrComboBoxElements.SetItems(dctElementsColumns) - ucrComboBoxElements.SetRDefault(Chr(34) & "elementId" & Chr(34)) - ucrComboBoxElements.bAllowNonConditionValues = False - ucrComboBoxElements.SetDropDownStyleAsNonEditable() - - 'elements receiver - ucrReceiverMultipleElements.SetParameter(New RParameter("elements", 3)) + ucrReceiverMultipleStations.SetLinkedDisplayControl(lblSelectStations) + '--------------------------------------- + + 'elements + '--------------------------------------- + dctElementsCols.Add("Element IDs", Chr(34) & "elementId" & Chr(34)) + dctElementsCols.Add("Element Names", Chr(34) & "elementName" & Chr(34)) + dctElementsCols.Add("Element Abbreviation", Chr(34) & "abbreviation" & Chr(34)) + dctElementsCols.Add("Element Types", Chr(34) & "elementtype" & Chr(34)) + ucrCboElements.SetParameter(New RParameter("element_filter_column", 3)) + ucrCboElements.SetItems(dctElementsCols) + ucrCboElements.bAllowNonConditionValues = False + ucrCboElements.SetDropDownStyleAsNonEditable() + ucrCboElements.SetLinkedDisplayControl(lblSelectElements) + + ucrReceiverMultipleElements.SetParameter(New RParameter("elements", 4)) ucrReceiverMultipleElements.SetParameterIsString() ucrReceiverMultipleElements.Selector = ucrSelectorForClimSoft ucrReceiverMultipleElements.SetItemType("database_variables") ucrReceiverMultipleElements.strSelectorHeading = "Elements" - ucrReceiverMultipleElements.SetLinkedDisplayControl(lblElements) - - 'include observation data checkbox - ucrChkObservationData.SetText("Include Observation Data") - ucrChkObservationData.SetParameter(New RParameter("include_observation_data", 4)) - ucrChkObservationData.SetRDefault("FALSE") - - 'include flags data checkbox - ucrChkFlagsData.SetText("Include Observation Flags") - ucrChkFlagsData.SetParameter(New RParameter("include_observation_flags", 5)) - ucrChkFlagsData.SetRDefault("FALSE") - - 'include Unstack data checkbox. - 'parameter attached to it is determined by elements receiver no. of contents. Thus not directly set by the control - ucrChkUnstackData.SetText("Unstack Data") - 'ucrChkUnstackData.Checked = True - - 'include elements info checkbox - ucrChkElements.SetText("Include Elements Information") - ucrChkElements.SetParameter(New RParameter("include_elements_info", 7)) - ucrChkElements.SetRDefault("FALSE") - - 'date range checkbox - ucrChkDateRange.SetText("Select Date Range") - - 'start date datepicker - ucrDtpStartdate.SetParameter(New RParameter("start_date", 8)) - ucrDtpStartdate.SetParameterIsRDate() - ucrDtpStartdate.SetLinkedDisplayControl(lblStartDate) - - 'end date datepicker - ucrDtpEndDate.SetParameter(New RParameter("end_date", 9)) - ucrDtpEndDate.SetParameterIsRDate() - ucrDtpEndDate.SetLinkedDisplayControl(lblEndDate) - - 'linking observation data related controls to include observation data checkbox - ucrChkObservationData.AddToLinkedControls({ucrChkFlagsData, ucrChkUnstackData, ucrChkElements, ucrComboBoxElements, ucrReceiverMultipleElements}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'link date range checkbox - ucrChkObservationData.AddToLinkedControls({ucrChkDateRange}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - 'linking date pickers to date range checkbox - ucrChkDateRange.AddToLinkedControls({ucrDtpStartdate, ucrDtpEndDate}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrReceiverMultipleElements.SetLinkedDisplayControl(lblSelectElements) + '--------------------------------------- + + 'qc status + '--------------------------------------- + dctQCStatuses.Add("All", "-1") + dctQCStatuses.Add("Zero", "0") + dctQCStatuses.Add("One", "1") + dctQCStatuses.Add("Two", "2") + ucrCboQCStatus.SetParameter(New RParameter("qc_status", 5)) + ucrCboQCStatus.SetItems(dctQCStatuses) + ucrCboQCStatus.SetRDefault("-1") + ucrCboQCStatus.bAllowNonConditionValues = False + ucrCboQCStatus.SetDropDownStyleAsNonEditable() + ucrCboQCStatus.SetLinkedDisplayControl(lblSelectQCStatus) + '--------------------------------------- + + 'Unstack data + '--------------------------------------- + ucrChKUnstackData.SetText("Unstack Data") + ucrChKUnstackData.SetParameter(New RParameter("unstack_data", 13)) + ucrChKUnstackData.SetRDefault("FALSE") + '--------------------------------------- + + 'date range + '--------------------------------------- + ucrChkDataDate.SetText("Select Dates") + + ucrDtpStartDataDate.SetParameter(New RParameter("start_date", 6)) + ucrDtpStartDataDate.SetParameterIsRDate() + ucrDtpStartDataDate.SetLinkedDisplayControl(lblToDataDate) + + ucrDtpEndDataDate.SetParameter(New RParameter("end_date", 7)) + ucrDtpEndDataDate.SetParameterIsRDate() + + ucrChkDataDate.AddToLinkedControls({ucrDtpStartDataDate, ucrDtpEndDataDate}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + '--------------------------------------- + + 'metadata controls + '--------------------------------------- + ucrChkImportStationsMetadata.SetText("Import All Stations Metadata") + ucrChkImportStationsMetadata.SetParameter(New RParameter("import_stations", 0)) + ucrChkImportStationsMetadata.SetRDefault("FALSE") + + ucrChkImportElementsMetadata.SetText("Import All Elements Metadata") + ucrChkImportElementsMetadata.SetParameter(New RParameter("import_elements", 2)) + ucrChkImportElementsMetadata.SetRDefault("FALSE") + + ucrChkImportFlagsMetadata.SetText("Import All Flags Metadata") + ucrChkImportFlagsMetadata.SetParameter(New RParameter("import_flags", 3)) + ucrChkImportFlagsMetadata.SetRDefault("FALSE") + '--------------------------------------- + + 'dialog options + '--------------------------------------- + ucrPnlOptions.AddRadioButton(rdoData) + ucrPnlOptions.AddRadioButton(rdoMetadata) + + ucrPnlOptions.AddFunctionNamesCondition(rdoData, frmMain.clsRLink.strInstatDataObject & "$import_climsoft_data") + ucrPnlOptions.AddFunctionNamesCondition(rdoMetadata, frmMain.clsRLink.strInstatDataObject & "$import_climsoft_metadata") + + + ucrPnlOptions.AddToLinkedControls({ucrCboTable, ucrCboQCStatus, ucrSelectorForClimSoft, ucrReceiverMultipleStations, ucrReceiverMultipleElements, ucrCboStations, ucrCboElements, ucrChkDataDate, ucrChKUnstackData}, + {rdoData}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrChkImportStationsMetadata, ucrChkImportElementsMetadata, ucrChkImportFlagsMetadata}, + {rdoMetadata}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + + '--------------------------------------- End Sub Private Sub SetDefaults() - clsRImportFromClimsoft = New RFunction - clsRImportFromClimsoft.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_from_climsoft") - ucrBase.clsRsyntax.SetBaseRFunction(clsRImportFromClimsoft) + clsRImportClimsoftData = New RFunction + clsRImportClimsoftMetaData = New RFunction + + 'data command + '--------------------------------------- + clsRImportClimsoftData.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_climsoft_data") + clsRImportClimsoftData.AddParameter(strParameterName:="table", strParameterValue:=Chr(34) & "observationfinal" & Chr(34), iPosition:=0) + clsRImportClimsoftData.AddParameter(strParameterName:="station_filter_column", strParameterValue:=Chr(34) & "stationId" & Chr(34), iPosition:=1) + clsRImportClimsoftData.AddParameter(strParameterName:="element_filter_column", strParameterValue:=Chr(34) & "elementId" & Chr(34), iPosition:=3) + '--------------------------------------- + + 'metadata command + '--------------------------------------- + clsRImportClimsoftMetaData.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_climsoft_metadata") + '--------------------------------------- + + ucrBase.clsRsyntax.SetBaseRFunction(clsRImportClimsoftData) - ucrReceiverMultipleStations.SetMeAsReceiver() ucrSelectorForClimSoft.Reset() - ucrChkUnstackData.Checked = True - ucrChkDateRange.Checked = False + ucrReceiverMultipleStations.SetMeAsReceiver() + ucrChkDataDate.Checked = False + rdoData.Checked = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrComboBoxStations.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrReceiverMultipleStations.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrComboBoxElements.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrReceiverMultipleElements.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrChkObservationData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrChkFlagsData.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrChkElements.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrDtpStartdate.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrDtpEndDate.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - End Sub - Private Sub TestOKEnabled() - ucrBase.OKEnabled((Not ucrReceiverMultipleStations.IsEmpty() AndAlso Not ucrChkObservationData.Checked) OrElse (Not ucrReceiverMultipleElements.IsEmpty() AndAlso ucrChkObservationData.Checked)) - End Sub + 'data option + '--------------------------------------- + ucrCboStations.SetRCode(clsRImportClimsoftData, bReset) + ucrReceiverMultipleStations.SetRCode(clsRImportClimsoftData, bReset) - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaults() - SetRCodeForControls(True) - sdgImportFromClimSoft.Reset() - CheckAndUpdateConnectionStatus() - TestOKEnabled() + ucrCboElements.SetRCode(clsRImportClimsoftData, bReset) + ucrReceiverMultipleElements.SetRCode(clsRImportClimsoftData, bReset) + + ucrCboTable.SetRCode(clsRImportClimsoftData, bReset) + + ucrChKUnstackData.SetRCode(clsRImportClimsoftData, bReset) + + ucrCboQCStatus.SetRCode(clsRImportClimsoftData, bReset) + + ucrDtpStartDataDate.SetRCode(clsRImportClimsoftData, bReset) + ucrDtpEndDataDate.SetRCode(clsRImportClimsoftData, bReset) + + 'data sub dialog + sdgClimsoft.SetRCode(clsRImportClimsoftData, bReset) + '--------------------------------------- + + 'metadata option + '--------------------------------------- + ucrChkImportStationsMetadata.SetRCode(clsRImportClimsoftMetaData, bReset) + ucrChkImportElementsMetadata.SetRCode(clsRImportClimsoftMetaData, bReset) + ucrChkImportFlagsMetadata.SetRCode(clsRImportClimsoftMetaData, bReset) + '--------------------------------------- End Sub - Private Sub btnEstablishConnection_Click(sender As Object, e As EventArgs) Handles cmdEstablishConnection.Click + Private Sub btnConnection_Click(sender As Object, e As EventArgs) Handles btnConnection.Click 'shows the database connect sub dialog and checks if connection has been established sdgImportFromClimSoft.ShowDialog() CheckAndUpdateConnectionStatus() ucrReceiverMultipleStations.Clear() + ucrReceiverMultipleElements.Clear() ucrReceiverMultipleStations.SetMeAsReceiver() End Sub - ''' - ''' constructs and sets the stations reciver SQL query - ''' - ''' returns true if receivers query was changed - Private Function SetStationsReceiverQuery() As Boolean - If dctStationColumns.Count < 1 Then - Return False - End If - - 'sql query to get station values of the selected column from station table - Dim strQuery As String - Dim strSelectedColumn As String = dctStationColumns.Item(ucrComboBoxStations.GetText).Trim("""") - - strQuery = "SELECT DISTINCT " & strSelectedColumn & " FROM station WHERE " & strSelectedColumn & " IS NOT NULL AND " & strSelectedColumn & " <> '';" - If ucrReceiverMultipleStations.strDatabaseQuery = strQuery Then - Return False - End If - ucrReceiverMultipleStations.Clear() - ucrReceiverMultipleStations.strDatabaseQuery = strQuery - Return True - End Function - - ''' - ''' constructs and sets elements receiver SQL query - ''' - ''' returns true if receivers query was changed - Private Function SetElementsRecieverQuery() As Boolean - If dctElementsColumns.Count < 1 Then - Return False - End If + Private Sub ucrPnlOption_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged + btnMoreOptions.Visible = rdoData.Checked + btnCheckRecords.Visible = rdoData.Checked + lblRecordsNum.Visible = rdoData.Checked + ucrBase.clsRsyntax.SetBaseRFunction(If(rdoData.Checked, clsRImportClimsoftData, clsRImportClimsoftMetaData)) + End Sub - 'sql query to get distinct element values of the selected column(obselement TABLE COLUMN) from the observationfinal table - Dim strQuery As String - strQuery = "SELECT DISTINCT obselement." & dctElementsColumns.Item(ucrComboBoxElements.GetText).Trim("""") & - " FROM observationfinal" & - " INNER JOIN obselement ON observationfinal.describedBy = obselement.elementId" & - " INNER JOIN station ON observationfinal.recordedFrom = station.stationId" - 'if stations have been specified, then get elements for those stations only - If Not ucrReceiverMultipleStations.IsEmpty Then - strQuery = strQuery & " WHERE " & "station." & dctStationColumns.Item(ucrComboBoxStations.GetText).Trim("""") & " IN (" & - String.Join(",", ucrReceiverMultipleStations.GetVariableNamesList(strQuotes:=Chr(39))) & ")" + Private Sub ucrCboStations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboStations.ControlValueChanged + If dctStationCols.Count < 1 Then + Exit Sub End If - strQuery &= ";" + SetRecieverQuery("station", dctStationCols.Item(ucrCboStations.GetText).Trim(""""), ucrReceiverMultipleStations) + 'set as selected receiver. will also execute the receiver's sql query + ucrReceiverMultipleStations.SetMeAsReceiver() + End Sub - If ucrReceiverMultipleElements.strDatabaseQuery = strQuery Then - Return False - End If - ucrReceiverMultipleElements.Clear() - ucrReceiverMultipleElements.strDatabaseQuery = strQuery - Return True - End Function - - Private Sub ucrComboBoxStations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrComboBoxStations.ControlValueChanged - If SetStationsReceiverQuery() Then - 'set as selected receiver. will also execute the receiver's sql query - ucrReceiverMultipleStations.SetMeAsReceiver() + Private Sub ucrCboElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrCboElements.ControlValueChanged + If dctElementsCols.Count < 1 Then + Exit Sub End If + SetRecieverQuery("obselement", dctElementsCols.Item(ucrCboElements.GetText).Trim(""""), ucrReceiverMultipleElements) + 'set as selected receiver. will also execute receiver's sql the query + ucrReceiverMultipleElements.SetMeAsReceiver() End Sub - Private Sub ucrReceiverMultipleStations_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStations.ControlValueChanged - If Not bIgnoreReceiverChanges Then - SetElementsRecieverQuery() + + Private Sub ucrChkDataDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDataDate.ControlValueChanged + 'this forces the date pickers to write default parameter values to the Rfunction. + 'date picker controls have a problem of default date. + 'its not set by default until the user changes selected date + 'todo. in future, this may not be needed + If ucrChkDataDate.Checked Then + ucrDtpEndDataDate.OnControlValueChanged() + ucrDtpStartDataDate.OnControlValueChanged() End If End Sub - Private Sub ucrComboBoxElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrComboBoxElements.ControlValueChanged - If SetElementsRecieverQuery() Then - 'set as selected receiver. will also execute receiver's sql the query - ucrReceiverMultipleElements.SetMeAsReceiver() - End If + Private Sub btnMoreOptions_Click(sender As Object, e As EventArgs) Handles btnMoreOptions.Click + sdgClimsoft.ShowDialog() + lblRecordsNum.Text = "" End Sub - Private Sub ucrUnstackDataControlsValueChanged_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkUnstackData.ControlValueChanged, ucrReceiverMultipleElements.ControlValueChanged, ucrChkObservationData.ControlValueChanged - 'only change the receivers if the event was raised by ucrChkObservationData checkbox - If TypeOf ucrChangedControl Is ucrCheck Then - If ucrChkObservationData.Checked Then - ucrReceiverMultipleElements.SetMeAsReceiver() - Else - ucrReceiverMultipleStations.SetMeAsReceiver() + Private Sub btnCheckRecords_Click(sender As Object, e As EventArgs) Handles btnCheckRecords.Click + Try + lblRecordsNum.Text = "" + Dim strTableName As String = dctTables.Item(ucrCboTable.GetText).Trim("""") + Dim strStationColumn As String = dctStationCols.Item(ucrCboStations.GetText).Trim("""") + Dim strElementsColumn As String = dctElementsCols.Item(ucrCboElements.GetText).Trim("""") + Dim strStationsValues As String = String.Join(",", ucrReceiverMultipleStations.GetVariableNamesList(bWithQuotes:=True, strQuotes:="'")) + Dim strElementsValues As String = String.Join(",", ucrReceiverMultipleElements.GetVariableNamesList(bWithQuotes:=True, strQuotes:="'")) + Dim strQueryCondition As String = " INNER JOIN station ON " & strTableName & ".recordedFrom = station.stationId" & + " INNER JOIN obselement ON " & strTableName & ".describedBy = obselement.elementId WHERE" & + " station." & strStationColumn & " IN (" & strStationsValues & ")" & + " AND obselement." & strElementsColumn & " IN (" & strElementsValues & ")" + + Dim strQCStatus As String = If(dctQCStatuses.Item(ucrCboQCStatus.GetText) = "-1", "", dctQCStatuses.Item(ucrCboQCStatus.GetText)) + + If dctQCStatuses.Item(ucrCboQCStatus.GetText) <> "-1" Then + strQueryCondition = strQueryCondition & " AND qcStatus = " & dctQCStatuses.Item(ucrCboQCStatus.GetText) End If - End If - 'unstack observation data only when more than 1 element is selected - If ucrChkObservationData.Checked AndAlso ucrReceiverMultipleElements.GetVariableNamesAsList.Count > 1 Then - ucrChkUnstackData.Enabled = True - clsRImportFromClimsoft.AddParameter("unstack_data", If(ucrChkUnstackData.Checked, "TRUE", "FALSE"), iPosition:=6) - Else - ucrChkUnstackData.Enabled = False - clsRImportFromClimsoft.RemoveParameterByName("unstack_data") + If ucrChkDataDate.Checked Then + strQueryCondition = strQueryCondition & " AND obsDatetime >= '" & ucrDtpStartDataDate.DateValue.ToString("yyyy-MM-dd") & "' AND obsDatetime <= '" & ucrDtpEndDataDate.DateValue.ToString("yyyy-MM-dd") & "'" + End If + + Dim clsRowsCountRFunction As New RFunction + clsRowsCountRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_db_table_row_count") + clsRowsCountRFunction.AddParameter(strParameterName:="tableName", strParameterValue:=Chr(34) & strTableName & Chr(34)) + clsRowsCountRFunction.AddParameter(strParameterName:="query_condition", strParameterValue:=Chr(34) & strQueryCondition & Chr(34)) + + Dim expTemp As SymbolicExpression = frmMain.clsRLink.RunInternalScriptGetValue(clsRowsCountRFunction.ToScript()) + If expTemp IsNot Nothing Then + Dim recordsNum As Integer = expTemp.AsNumeric().FirstOrDefault() + lblRecordsNum.Text = recordsNum & " records found" + lblRecordsNum.ForeColor = If(recordsNum > 0, Color.Green, Color.Red) + End If + Catch ex As Exception + MessageBox.Show(Me, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End Try + End Sub + + Private Sub ucrControlsContents_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStations.ControlContentsChanged, ucrReceiverMultipleElements.ControlContentsChanged, ucrCboTable.ControlContentsChanged, ucrCboQCStatus.ControlContentsChanged, ucrDtpStartDataDate.ControlContentsChanged, ucrDtpEndDataDate.ControlContentsChanged, ucrPnlOptions.ControlContentsChanged, ucrChkImportStationsMetadata.ControlContentsChanged, ucrChkImportElementsMetadata.ControlContentsChanged, ucrChkImportFlagsMetadata.ControlContentsChanged + Dim bValid As Boolean = False + If rdoData.Checked Then + bValid = Not ucrReceiverMultipleStations.IsEmpty() AndAlso Not ucrReceiverMultipleElements.IsEmpty() AndAlso Not ucrCboTable.IsEmpty() + btnCheckRecords.Enabled = bValid + lblRecordsNum.Text = "" + ElseIf rdoMetadata.Checked Then + bValid = ucrChkImportStationsMetadata.Checked OrElse ucrChkImportElementsMetadata.Checked OrElse ucrChkImportFlagsMetadata.Checked End If + ucrBase.OKEnabled(bValid) End Sub - Private Sub ucrControlsContents_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStations.ControlContentsChanged, ucrReceiverMultipleElements.ControlContentsChanged, ucrChkObservationData.ControlContentsChanged, ucrChkUnstackData.ControlContentsChanged - TestOKEnabled() + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) + sdgImportFromClimSoft.Reset() + CheckAndUpdateConnectionStatus() + End Sub + + Private Sub SetRecieverQuery(strTable As String, strSelectedColumn As String, ucrReceiverControl As ucrReceiverMultiple) + 'sql query to get values of the selected column from the table + Dim strQuery As String = "SELECT DISTINCT " & strSelectedColumn & " FROM " & strTable & " WHERE " & strSelectedColumn & " IS NOT NULL AND " & strSelectedColumn & " <> '';" + If ucrReceiverControl.strDatabaseQuery = strQuery Then + Exit Sub + End If + ucrReceiverControl.Clear() + ucrReceiverControl.strDatabaseQuery = strQuery End Sub Private Sub CheckAndUpdateConnectionStatus() @@ -277,18 +345,9 @@ Public Class dlgClimSoft lblConnection.Text = "No Connection" lblConnection.ForeColor = Color.Red ucrReceiverMultipleStations.Clear() + ucrReceiverMultipleElements.Clear() End If - autoTranslate(Me) End Sub - Private Sub ucrChkDateRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDateRange.ControlValueChanged - 'this forces the date pickers to write default parameter values to the Rfunction. - 'date picker controls have a problem of default date. - 'its not set by default until the user changes selected date - 'todo. in future, this may not be needed - If ucrChkDateRange.Checked Then - ucrDtpEndDate.OnControlValueChanged() - ucrDtpStartdate.OnControlValueChanged() - End If - End Sub -End Class + +End Class \ No newline at end of file diff --git a/instat/dlgExportClimaticDefinitions.Designer.vb b/instat/dlgExportClimaticDefinitions.Designer.vb index d29ab990892..feadbea35c8 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,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) @@ -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 diff --git a/instat/dlgImportOpenAppBuilder.Designer.vb b/instat/dlgImportOpenAppBuilder.Designer.vb new file mode 100644 index 00000000000..22b34703456 --- /dev/null +++ b/instat/dlgImportOpenAppBuilder.Designer.vb @@ -0,0 +1,53 @@ + _ +Partial Class dlgImportOpenAppBuilder + 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.ucrButtons() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrBase.Location = New System.Drawing.Point(19, 276) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'dlgImportOpenAppBuilder + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(450, 341) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgImportOpenAppBuilder" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Import From OpenAppBuilder" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents ucrBase As ucrButtons +End Class diff --git a/instat/dlgImportOpenAppBuilder.resx b/instat/dlgImportOpenAppBuilder.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgImportOpenAppBuilder.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/dlgImportOpenAppBuilder.vb b/instat/dlgImportOpenAppBuilder.vb new file mode 100644 index 00000000000..88073b55296 --- /dev/null +++ b/instat/dlgImportOpenAppBuilder.vb @@ -0,0 +1,3 @@ +Public Class dlgImportOpenAppBuilder + +End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 4b5909ef8c6..a7bf5ad1fa8 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -185,6 +185,7 @@ Partial Class frmMain Me.mnuHelpGlossary = New System.Windows.Forms.ToolStripMenuItem() Me.mnuHelpLicence = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator29 = New System.Windows.Forms.ToolStripSeparator() + Me.RInstatResourcesSiteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.mnuHelpPackagesDocumentation = New System.Windows.Forms.ToolStripMenuItem() Me.OpenFile = New System.Windows.Forms.OpenFileDialog() Me.ToolStripSeparator16 = New System.Windows.Forms.ToolStripSeparator() @@ -439,6 +440,7 @@ Partial Class frmMain Me.mnuFileImportFromPostgres = New System.Windows.Forms.ToolStripMenuItem() Me.mnuFileImportFromRapidPro = New System.Windows.Forms.ToolStripMenuItem() Me.mnuFileImportandTidyNetCDFFile = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuImportFromOpenAppBuilder = New System.Windows.Forms.ToolStripMenuItem() Me.mnuFileConvert = New System.Windows.Forms.ToolStripMenuItem() Me.tlSeparatorFile = New System.Windows.Forms.ToolStripSeparator() Me.mnuFileExport = New System.Windows.Forms.ToolStripMenuItem() @@ -700,7 +702,6 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.RInstatResourcesSiteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -1559,42 +1560,42 @@ Partial Class frmMain 'mnuHelpHelpIntroduction ' Me.mnuHelpHelpIntroduction.Name = "mnuHelpHelpIntroduction" - Me.mnuHelpHelpIntroduction.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpHelpIntroduction.Size = New System.Drawing.Size(230, 22) Me.mnuHelpHelpIntroduction.Text = "Introduction..." ' 'mnuHelpFAQ ' Me.mnuHelpFAQ.Name = "mnuHelpFAQ" - Me.mnuHelpFAQ.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpFAQ.Size = New System.Drawing.Size(230, 22) Me.mnuHelpFAQ.Text = "FAQ..." ' 'mnuHelpGetingStarted ' Me.mnuHelpGetingStarted.Name = "mnuHelpGetingStarted" - Me.mnuHelpGetingStarted.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpGetingStarted.Size = New System.Drawing.Size(230, 22) Me.mnuHelpGetingStarted.Text = "Getting Started..." ' 'mnuHelpData ' Me.mnuHelpData.Name = "mnuHelpData" - Me.mnuHelpData.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpData.Size = New System.Drawing.Size(230, 22) Me.mnuHelpData.Text = "Data..." ' 'ToolStripSeparator28 ' Me.ToolStripSeparator28.Name = "ToolStripSeparator28" - Me.ToolStripSeparator28.Size = New System.Drawing.Size(215, 6) + Me.ToolStripSeparator28.Size = New System.Drawing.Size(227, 6) ' 'mnuHelpWindows ' Me.mnuHelpWindows.Name = "mnuHelpWindows" - Me.mnuHelpWindows.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpWindows.Size = New System.Drawing.Size(230, 22) Me.mnuHelpWindows.Text = "Windows..." ' 'ToolStripSeparator81 ' Me.ToolStripSeparator81.Name = "ToolStripSeparator81" - Me.ToolStripSeparator81.Size = New System.Drawing.Size(215, 6) + Me.ToolStripSeparator81.Size = New System.Drawing.Size(227, 6) ' 'mnuHelpMenus ' @@ -1688,40 +1689,46 @@ Partial Class frmMain 'mnuHelpAboutR ' Me.mnuHelpAboutR.Name = "mnuHelpAboutR" - Me.mnuHelpAboutR.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpAboutR.Size = New System.Drawing.Size(230, 22) Me.mnuHelpAboutR.Text = "About R..." Me.mnuHelpAboutR.Visible = False ' 'mnuHelpLearningStatistics ' Me.mnuHelpLearningStatistics.Name = "mnuHelpLearningStatistics" - Me.mnuHelpLearningStatistics.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpLearningStatistics.Size = New System.Drawing.Size(230, 22) Me.mnuHelpLearningStatistics.Text = "Learning Statistics..." Me.mnuHelpLearningStatistics.Visible = False ' 'mnuHelpRPackages ' Me.mnuHelpRPackages.Name = "mnuHelpRPackages" - Me.mnuHelpRPackages.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpRPackages.Size = New System.Drawing.Size(230, 22) Me.mnuHelpRPackages.Text = "R Packages..." ' 'mnuHelpGlossary ' Me.mnuHelpGlossary.Name = "mnuHelpGlossary" - Me.mnuHelpGlossary.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpGlossary.Size = New System.Drawing.Size(230, 22) Me.mnuHelpGlossary.Text = "Glossary..." ' 'mnuHelpLicence ' Me.mnuHelpLicence.Name = "mnuHelpLicence" - Me.mnuHelpLicence.Size = New System.Drawing.Size(218, 22) + Me.mnuHelpLicence.Size = New System.Drawing.Size(230, 22) Me.mnuHelpLicence.Tag = "Licence..." Me.mnuHelpLicence.Text = "Licence..." ' 'ToolStripSeparator29 ' Me.ToolStripSeparator29.Name = "ToolStripSeparator29" - Me.ToolStripSeparator29.Size = New System.Drawing.Size(215, 6) + Me.ToolStripSeparator29.Size = New System.Drawing.Size(227, 6) + ' + 'RInstatResourcesSiteToolStripMenuItem + ' + Me.RInstatResourcesSiteToolStripMenuItem.Name = "RInstatResourcesSiteToolStripMenuItem" + Me.RInstatResourcesSiteToolStripMenuItem.Size = New System.Drawing.Size(230, 22) + Me.RInstatResourcesSiteToolStripMenuItem.Text = "R-Instat Resources Site" ' 'mnuHelpPackagesDocumentation ' @@ -2936,7 +2943,7 @@ Partial Class frmMain ' Me.mnuFileSave.Name = "mnuFileSave" Me.mnuFileSave.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.S), System.Windows.Forms.Keys) - Me.mnuFileSave.Size = New System.Drawing.Size(232, 22) + Me.mnuFileSave.Size = New System.Drawing.Size(241, 22) Me.mnuFileSave.Tag = "Save" Me.mnuFileSave.Text = "Save..." ' @@ -2944,7 +2951,7 @@ Partial Class frmMain ' Me.mnuFileSaveAs.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuFileSaveAsDataAs, Me.mnuFileSaveAsOutputAs, Me.mnuFileSaveAsLogAs, Me.mnuFileSaveAsScriptAs}) Me.mnuFileSaveAs.Name = "mnuFileSaveAs" - Me.mnuFileSaveAs.Size = New System.Drawing.Size(232, 22) + Me.mnuFileSaveAs.Size = New System.Drawing.Size(241, 22) Me.mnuFileSaveAs.Tag = "Save_As" Me.mnuFileSaveAs.Text = "Save As" ' @@ -2977,7 +2984,7 @@ Partial Class frmMain Me.mnuFilePrint.Enabled = False Me.mnuFilePrint.Name = "mnuFilePrint" Me.mnuFilePrint.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.P), System.Windows.Forms.Keys) - Me.mnuFilePrint.Size = New System.Drawing.Size(232, 22) + Me.mnuFilePrint.Size = New System.Drawing.Size(241, 22) Me.mnuFilePrint.Tag = "Print" Me.mnuFilePrint.Text = "Print..." Me.mnuFilePrint.Visible = False @@ -2986,7 +2993,7 @@ Partial Class frmMain ' Me.mnuFilePrintPreview.Enabled = False Me.mnuFilePrintPreview.Name = "mnuFilePrintPreview" - Me.mnuFilePrintPreview.Size = New System.Drawing.Size(232, 22) + Me.mnuFilePrintPreview.Size = New System.Drawing.Size(241, 22) Me.mnuFilePrintPreview.Tag = "Print_Preview" Me.mnuFilePrintPreview.Text = "Print Preview..." Me.mnuFilePrintPreview.Visible = False @@ -2994,12 +3001,12 @@ Partial Class frmMain 'tlSeparatorFile3 ' Me.tlSeparatorFile3.Name = "tlSeparatorFile3" - Me.tlSeparatorFile3.Size = New System.Drawing.Size(229, 6) + Me.tlSeparatorFile3.Size = New System.Drawing.Size(238, 6) ' 'mnuFIleExit ' Me.mnuFIleExit.Name = "mnuFIleExit" - Me.mnuFIleExit.Size = New System.Drawing.Size(232, 22) + Me.mnuFIleExit.Size = New System.Drawing.Size(241, 22) Me.mnuFIleExit.Tag = "Exit" Me.mnuFIleExit.Text = "Exit" ' @@ -3381,7 +3388,7 @@ Partial Class frmMain ' 'mnuFile ' - Me.mnuFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuFileNewDataFrame, Me.mnuFileImportFromFile, Me.mnuFileImportFromLibrary, Me.ToolStripSeparator35, Me.mnuFileImportFromODK, Me.mnuFileImportFromCSPRO, Me.mnuFileImportFromDatabases, Me.mnuFileImportFromPostgres, Me.mnuFileImportFromRapidPro, Me.mnuFileImportandTidyNetCDFFile, Me.mnuFileConvert, Me.tlSeparatorFile, Me.mnuFileSave, Me.mnuFileSaveAs, Me.mnuFileExport, Me.mnuFilePrint, Me.mnuFilePrintPreview, Me.tlSeparatorFile3, Me.mnuFileCloseData, Me.ToolStripSeparator8, Me.mnuFIleExit}) + Me.mnuFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuFileNewDataFrame, Me.mnuFileImportFromFile, Me.mnuFileImportFromLibrary, Me.ToolStripSeparator35, Me.mnuFileImportFromODK, Me.mnuFileImportFromCSPRO, Me.mnuFileImportFromDatabases, Me.mnuFileImportFromPostgres, Me.mnuFileImportFromRapidPro, Me.mnuFileImportandTidyNetCDFFile, Me.mnuImportFromOpenAppBuilder, Me.mnuFileConvert, Me.tlSeparatorFile, Me.mnuFileSave, Me.mnuFileSaveAs, Me.mnuFileExport, Me.mnuFilePrint, Me.mnuFilePrintPreview, Me.tlSeparatorFile3, Me.mnuFileCloseData, Me.ToolStripSeparator8, Me.mnuFIleExit}) Me.mnuFile.Name = "mnuFile" Me.mnuFile.Size = New System.Drawing.Size(37, 22) Me.mnuFile.Tag = "File" @@ -3391,7 +3398,7 @@ Partial Class frmMain ' Me.mnuFileNewDataFrame.Name = "mnuFileNewDataFrame" Me.mnuFileNewDataFrame.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.N), System.Windows.Forms.Keys) - Me.mnuFileNewDataFrame.Size = New System.Drawing.Size(232, 22) + Me.mnuFileNewDataFrame.Size = New System.Drawing.Size(241, 22) Me.mnuFileNewDataFrame.Tag = "New_Data_Frame" Me.mnuFileNewDataFrame.Text = "New Data Frame..." ' @@ -3399,33 +3406,33 @@ Partial Class frmMain ' Me.mnuFileImportFromFile.Name = "mnuFileImportFromFile" Me.mnuFileImportFromFile.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.O), System.Windows.Forms.Keys) - Me.mnuFileImportFromFile.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromFile.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromFile.Tag = "Import_From_File" Me.mnuFileImportFromFile.Text = "Import From File..." ' 'mnuFileImportFromLibrary ' Me.mnuFileImportFromLibrary.Name = "mnuFileImportFromLibrary" - Me.mnuFileImportFromLibrary.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromLibrary.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromLibrary.Tag = "Open_From_Library" Me.mnuFileImportFromLibrary.Text = "Import From Library..." ' 'ToolStripSeparator35 ' Me.ToolStripSeparator35.Name = "ToolStripSeparator35" - Me.ToolStripSeparator35.Size = New System.Drawing.Size(229, 6) + Me.ToolStripSeparator35.Size = New System.Drawing.Size(238, 6) ' 'mnuFileImportFromODK ' Me.mnuFileImportFromODK.Name = "mnuFileImportFromODK" - Me.mnuFileImportFromODK.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromODK.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromODK.Text = "Import From ODK..." ' 'mnuFileImportFromCSPRO ' Me.mnuFileImportFromCSPRO.Enabled = False Me.mnuFileImportFromCSPRO.Name = "mnuFileImportFromCSPRO" - Me.mnuFileImportFromCSPRO.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromCSPRO.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromCSPRO.Text = "Import From CSPRO..." Me.mnuFileImportFromCSPRO.Visible = False ' @@ -3433,7 +3440,7 @@ Partial Class frmMain ' Me.mnuFileImportFromDatabases.Enabled = False Me.mnuFileImportFromDatabases.Name = "mnuFileImportFromDatabases" - Me.mnuFileImportFromDatabases.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromDatabases.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromDatabases.Text = "Import From Databases..." Me.mnuFileImportFromDatabases.Visible = False ' @@ -3441,40 +3448,47 @@ Partial Class frmMain ' Me.mnuFileImportFromPostgres.Enabled = False Me.mnuFileImportFromPostgres.Name = "mnuFileImportFromPostgres" - Me.mnuFileImportFromPostgres.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromPostgres.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromPostgres.Text = "Import From Postgres" Me.mnuFileImportFromPostgres.Visible = False ' 'mnuFileImportFromRapidPro ' Me.mnuFileImportFromRapidPro.Name = "mnuFileImportFromRapidPro" - Me.mnuFileImportFromRapidPro.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportFromRapidPro.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportFromRapidPro.Text = "Import From RapidPro" ' 'mnuFileImportandTidyNetCDFFile ' Me.mnuFileImportandTidyNetCDFFile.Name = "mnuFileImportandTidyNetCDFFile" - Me.mnuFileImportandTidyNetCDFFile.Size = New System.Drawing.Size(232, 22) + Me.mnuFileImportandTidyNetCDFFile.Size = New System.Drawing.Size(241, 22) Me.mnuFileImportandTidyNetCDFFile.Text = "Import and Tidy NetCDF File..." ' + 'mnuImportFromOpenAppBuilder + ' + Me.mnuImportFromOpenAppBuilder.Enabled = False + Me.mnuImportFromOpenAppBuilder.Name = "mnuImportFromOpenAppBuilder" + Me.mnuImportFromOpenAppBuilder.Size = New System.Drawing.Size(241, 22) + Me.mnuImportFromOpenAppBuilder.Text = "Import From OpenAppBuilder..." + ' 'mnuFileConvert ' Me.mnuFileConvert.Enabled = False Me.mnuFileConvert.Name = "mnuFileConvert" - Me.mnuFileConvert.Size = New System.Drawing.Size(232, 22) + Me.mnuFileConvert.Size = New System.Drawing.Size(241, 22) Me.mnuFileConvert.Text = "Convert..." Me.mnuFileConvert.Visible = False ' 'tlSeparatorFile ' Me.tlSeparatorFile.Name = "tlSeparatorFile" - Me.tlSeparatorFile.Size = New System.Drawing.Size(229, 6) + Me.tlSeparatorFile.Size = New System.Drawing.Size(238, 6) ' 'mnuFileExport ' Me.mnuFileExport.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuFileExportExportDataSet, Me.mnuFileExportExportRObjectsToolStripMenuItem, Me.mnuFileExportExportRWorkspace, Me.mnuFileExportExportGraphAsImage}) Me.mnuFileExport.Name = "mnuFileExport" - Me.mnuFileExport.Size = New System.Drawing.Size(232, 22) + Me.mnuFileExport.Size = New System.Drawing.Size(241, 22) Me.mnuFileExport.Text = "Export" ' 'mnuFileExportExportDataSet @@ -3504,13 +3518,13 @@ Partial Class frmMain 'mnuFileCloseData ' Me.mnuFileCloseData.Name = "mnuFileCloseData" - Me.mnuFileCloseData.Size = New System.Drawing.Size(232, 22) + Me.mnuFileCloseData.Size = New System.Drawing.Size(241, 22) Me.mnuFileCloseData.Text = "Close Data Book" ' 'ToolStripSeparator8 ' Me.ToolStripSeparator8.Name = "ToolStripSeparator8" - Me.ToolStripSeparator8.Size = New System.Drawing.Size(229, 6) + Me.ToolStripSeparator8.Size = New System.Drawing.Size(238, 6) ' 'mnuPrepare ' @@ -5226,12 +5240,6 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' - 'RInstatResourcesSiteToolStripMenuItem - ' - Me.RInstatResourcesSiteToolStripMenuItem.Name = "RInstatResourcesSiteToolStripMenuItem" - Me.RInstatResourcesSiteToolStripMenuItem.Size = New System.Drawing.Size(230, 22) - Me.RInstatResourcesSiteToolStripMenuItem.Text = "R-Instat Resources Site" - ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -5245,9 +5253,7 @@ Partial Class frmMain Me.IsMdiContainer = True Me.MainMenuStrip = Me.mnuBar Me.Name = "frmMain" - Me.Text = "R-Instat " + My.Application.Info.Version.Major.ToString + "." + - My.Application.Info.Version.Minor.ToString + "." + - My.Application.Info.Version.Build.ToString + Me.Text = "R-Instat .." Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.stsStrip.ResumeLayout(False) Me.stsStrip.PerformLayout() @@ -5954,4 +5960,5 @@ Partial Class frmMain Friend WithEvents mnuSwapDataLogScript As ToolStripMenuItem Friend WithEvents mnuSwapDataMetadata As ToolStripMenuItem Friend WithEvents RInstatResourcesSiteToolStripMenuItem As ToolStripMenuItem + Friend WithEvents mnuImportFromOpenAppBuilder As ToolStripMenuItem End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 5dcc43a4420..c6b67b8acdd 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2847,4 +2847,8 @@ Public Class frmMain Private Sub RInstatResourcesSiteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RInstatResourcesSiteToolStripMenuItem.Click Process.Start("https://ecampus.r-instat.org/course/view.php?id=14") End Sub + + Private Sub mnuImportFromOpenAppBuilder_Click(sender As Object, e As EventArgs) Handles mnuImportFromOpenAppBuilder.Click + dlgImportOpenAppBuilder.ShowDialog() + End Sub End Class diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 741d4f7da58..78fbab2eb1a 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -281,6 +281,12 @@ Form + + dlgImportOpenAppBuilder.vb + + + Form + dlgRandomSplit.vb @@ -313,6 +319,12 @@ + + sdgClimsoft.vb + + + Form + sdgDefineAnnualRainfall.vb @@ -3131,6 +3143,9 @@ dlgImportFromRapidPro.vb + + dlgImportOpenAppBuilder.vb + dlgInfillMissingValues.vb @@ -3200,6 +3215,9 @@ dlgThreeVariablePivotTable.vb + + sdgClimsoft.vb + sdgDefineAnnualRainfall.vb diff --git a/instat/sdgClimsoft.Designer.vb b/instat/sdgClimsoft.Designer.vb new file mode 100644 index 00000000000..a615738425c --- /dev/null +++ b/instat/sdgClimsoft.Designer.vb @@ -0,0 +1,307 @@ + +Partial Class sdgClimsoft + 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.tbpTitles = New System.Windows.Forms.TabPage() + Me.grpMetadataToImport = New System.Windows.Forms.GroupBox() + Me.ucrChkImportElementsMetadata = New instat.ucrCheck() + Me.ucrChkImportStationsMetadata = New instat.ucrCheck() + Me.tbColumns = New System.Windows.Forms.TabPage() + Me.grpColumnsToInclude = New System.Windows.Forms.GroupBox() + Me.ucrChkIncludeElementName = New instat.ucrCheck() + Me.ucrChkIncludeDateTime = New instat.ucrCheck() + Me.ucrChkIncludeElementId = New instat.ucrCheck() + Me.ucrChkIncludeStationId = New instat.ucrCheck() + Me.ucrChkIncludeQCLog = New instat.ucrCheck() + Me.ucrChkIncludeCapturedBy = New instat.ucrCheck() + Me.ucrChkIncludeQCStatus = New instat.ucrCheck() + Me.ucrChkIncludeLevel = New instat.ucrCheck() + Me.ucrChkIncludeElementAbbrv = New instat.ucrCheck() + Me.ucrChkIncludeStationName = New instat.ucrCheck() + Me.ucrChkIncludeAquistion = New instat.ucrCheck() + Me.ucrChkIncludeEntryForm = New instat.ucrCheck() + Me.ucrChkIncludeFlag = New instat.ucrCheck() + Me.tbpMoreOptions = New System.Windows.Forms.TabControl() + Me.ucrBaseSubdialog = New instat.ucrButtonsSubdialogue() + Me.tbpTitles.SuspendLayout() + Me.grpMetadataToImport.SuspendLayout() + Me.tbColumns.SuspendLayout() + Me.grpColumnsToInclude.SuspendLayout() + Me.tbpMoreOptions.SuspendLayout() + Me.SuspendLayout() + ' + 'tbpTitles + ' + Me.tbpTitles.Controls.Add(Me.grpMetadataToImport) + Me.tbpTitles.Location = New System.Drawing.Point(4, 22) + Me.tbpTitles.Name = "tbpTitles" + Me.tbpTitles.Padding = New System.Windows.Forms.Padding(3) + Me.tbpTitles.Size = New System.Drawing.Size(409, 367) + Me.tbpTitles.TabIndex = 2 + Me.tbpTitles.Tag = "" + Me.tbpTitles.Text = "Metadata" + Me.tbpTitles.UseVisualStyleBackColor = True + ' + 'grpMetadataToImport + ' + Me.grpMetadataToImport.Controls.Add(Me.ucrChkImportElementsMetadata) + Me.grpMetadataToImport.Controls.Add(Me.ucrChkImportStationsMetadata) + Me.grpMetadataToImport.Location = New System.Drawing.Point(6, 6) + Me.grpMetadataToImport.Name = "grpMetadataToImport" + Me.grpMetadataToImport.Size = New System.Drawing.Size(384, 243) + Me.grpMetadataToImport.TabIndex = 8 + Me.grpMetadataToImport.TabStop = False + Me.grpMetadataToImport.Text = "Metadata to Import" + ' + 'ucrChkImportElementsMetadata + ' + Me.ucrChkImportElementsMetadata.AutoSize = True + Me.ucrChkImportElementsMetadata.Checked = False + Me.ucrChkImportElementsMetadata.Location = New System.Drawing.Point(0, 46) + Me.ucrChkImportElementsMetadata.Name = "ucrChkImportElementsMetadata" + Me.ucrChkImportElementsMetadata.Size = New System.Drawing.Size(315, 23) + Me.ucrChkImportElementsMetadata.TabIndex = 20 + ' + 'ucrChkImportStationsMetadata + ' + Me.ucrChkImportStationsMetadata.AutoSize = True + Me.ucrChkImportStationsMetadata.Checked = False + Me.ucrChkImportStationsMetadata.Location = New System.Drawing.Point(0, 22) + Me.ucrChkImportStationsMetadata.Name = "ucrChkImportStationsMetadata" + Me.ucrChkImportStationsMetadata.Size = New System.Drawing.Size(315, 23) + Me.ucrChkImportStationsMetadata.TabIndex = 19 + ' + 'tbColumns + ' + Me.tbColumns.Controls.Add(Me.grpColumnsToInclude) + Me.tbColumns.Location = New System.Drawing.Point(4, 22) + Me.tbColumns.Name = "tbColumns" + Me.tbColumns.Padding = New System.Windows.Forms.Padding(3) + Me.tbColumns.Size = New System.Drawing.Size(409, 367) + Me.tbColumns.TabIndex = 3 + Me.tbColumns.Tag = "" + Me.tbColumns.Text = "Data" + Me.tbColumns.UseVisualStyleBackColor = True + ' + 'grpColumnsToInclude + ' + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeElementName) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeDateTime) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeElementId) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeStationId) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeQCLog) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeCapturedBy) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeQCStatus) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeLevel) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeElementAbbrv) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeStationName) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeAquistion) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeEntryForm) + Me.grpColumnsToInclude.Controls.Add(Me.ucrChkIncludeFlag) + Me.grpColumnsToInclude.Location = New System.Drawing.Point(8, 10) + Me.grpColumnsToInclude.Name = "grpColumnsToInclude" + Me.grpColumnsToInclude.Size = New System.Drawing.Size(394, 351) + Me.grpColumnsToInclude.TabIndex = 32 + Me.grpColumnsToInclude.TabStop = False + Me.grpColumnsToInclude.Text = "Columns to Include" + ' + 'ucrChkIncludeElementName + ' + Me.ucrChkIncludeElementName.AutoSize = True + Me.ucrChkIncludeElementName.Checked = False + Me.ucrChkIncludeElementName.Location = New System.Drawing.Point(7, 141) + Me.ucrChkIncludeElementName.Name = "ucrChkIncludeElementName" + Me.ucrChkIncludeElementName.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeElementName.TabIndex = 25 + ' + 'ucrChkIncludeDateTime + ' + Me.ucrChkIncludeDateTime.AutoSize = True + Me.ucrChkIncludeDateTime.Checked = True + Me.ucrChkIncludeDateTime.Location = New System.Drawing.Point(7, 89) + Me.ucrChkIncludeDateTime.Name = "ucrChkIncludeDateTime" + Me.ucrChkIncludeDateTime.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeDateTime.TabIndex = 24 + ' + 'ucrChkIncludeElementId + ' + Me.ucrChkIncludeElementId.AutoSize = True + Me.ucrChkIncludeElementId.Checked = False + Me.ucrChkIncludeElementId.Location = New System.Drawing.Point(7, 116) + Me.ucrChkIncludeElementId.Name = "ucrChkIncludeElementId" + Me.ucrChkIncludeElementId.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeElementId.TabIndex = 23 + ' + 'ucrChkIncludeStationId + ' + Me.ucrChkIncludeStationId.AutoSize = True + Me.ucrChkIncludeStationId.Checked = True + Me.ucrChkIncludeStationId.Location = New System.Drawing.Point(7, 19) + Me.ucrChkIncludeStationId.Name = "ucrChkIncludeStationId" + Me.ucrChkIncludeStationId.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeStationId.TabIndex = 22 + ' + 'ucrChkIncludeQCLog + ' + Me.ucrChkIncludeQCLog.AutoSize = True + Me.ucrChkIncludeQCLog.Checked = False + Me.ucrChkIncludeQCLog.Location = New System.Drawing.Point(6, 294) + Me.ucrChkIncludeQCLog.Name = "ucrChkIncludeQCLog" + Me.ucrChkIncludeQCLog.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeQCLog.TabIndex = 21 + ' + 'ucrChkIncludeCapturedBy + ' + Me.ucrChkIncludeCapturedBy.AutoSize = True + Me.ucrChkIncludeCapturedBy.Checked = False + Me.ucrChkIncludeCapturedBy.Location = New System.Drawing.Point(6, 243) + Me.ucrChkIncludeCapturedBy.Name = "ucrChkIncludeCapturedBy" + Me.ucrChkIncludeCapturedBy.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeCapturedBy.TabIndex = 20 + ' + 'ucrChkIncludeQCStatus + ' + Me.ucrChkIncludeQCStatus.AutoSize = True + Me.ucrChkIncludeQCStatus.Checked = False + Me.ucrChkIncludeQCStatus.Location = New System.Drawing.Point(6, 269) + Me.ucrChkIncludeQCStatus.Name = "ucrChkIncludeQCStatus" + Me.ucrChkIncludeQCStatus.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeQCStatus.TabIndex = 0 + ' + 'ucrChkIncludeLevel + ' + Me.ucrChkIncludeLevel.AutoSize = True + Me.ucrChkIncludeLevel.Checked = False + Me.ucrChkIncludeLevel.Location = New System.Drawing.Point(6, 196) + Me.ucrChkIncludeLevel.Name = "ucrChkIncludeLevel" + Me.ucrChkIncludeLevel.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeLevel.TabIndex = 19 + ' + 'ucrChkIncludeElementAbbrv + ' + Me.ucrChkIncludeElementAbbrv.AutoSize = True + Me.ucrChkIncludeElementAbbrv.Checked = True + Me.ucrChkIncludeElementAbbrv.Location = New System.Drawing.Point(6, 65) + Me.ucrChkIncludeElementAbbrv.Name = "ucrChkIncludeElementAbbrv" + Me.ucrChkIncludeElementAbbrv.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeElementAbbrv.TabIndex = 18 + ' + 'ucrChkIncludeStationName + ' + Me.ucrChkIncludeStationName.AutoSize = True + Me.ucrChkIncludeStationName.Checked = True + Me.ucrChkIncludeStationName.Location = New System.Drawing.Point(6, 43) + Me.ucrChkIncludeStationName.Name = "ucrChkIncludeStationName" + Me.ucrChkIncludeStationName.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeStationName.TabIndex = 17 + ' + 'ucrChkIncludeAquistion + ' + Me.ucrChkIncludeAquistion.AutoSize = True + Me.ucrChkIncludeAquistion.Checked = False + Me.ucrChkIncludeAquistion.Location = New System.Drawing.Point(6, 168) + Me.ucrChkIncludeAquistion.Name = "ucrChkIncludeAquistion" + Me.ucrChkIncludeAquistion.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeAquistion.TabIndex = 16 + ' + 'ucrChkIncludeEntryForm + ' + Me.ucrChkIncludeEntryForm.AutoSize = True + Me.ucrChkIncludeEntryForm.Checked = False + Me.ucrChkIncludeEntryForm.Location = New System.Drawing.Point(6, 220) + Me.ucrChkIncludeEntryForm.Name = "ucrChkIncludeEntryForm" + Me.ucrChkIncludeEntryForm.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeEntryForm.TabIndex = 15 + ' + 'ucrChkIncludeFlag + ' + Me.ucrChkIncludeFlag.AutoSize = True + Me.ucrChkIncludeFlag.Checked = False + Me.ucrChkIncludeFlag.Location = New System.Drawing.Point(7, 321) + Me.ucrChkIncludeFlag.Name = "ucrChkIncludeFlag" + Me.ucrChkIncludeFlag.Size = New System.Drawing.Size(295, 23) + Me.ucrChkIncludeFlag.TabIndex = 14 + ' + 'tbpMoreOptions + ' + Me.tbpMoreOptions.Controls.Add(Me.tbColumns) + Me.tbpMoreOptions.Controls.Add(Me.tbpTitles) + Me.tbpMoreOptions.Location = New System.Drawing.Point(-1, 4) + Me.tbpMoreOptions.Name = "tbpMoreOptions" + Me.tbpMoreOptions.SelectedIndex = 0 + Me.tbpMoreOptions.Size = New System.Drawing.Size(417, 393) + Me.tbpMoreOptions.TabIndex = 2 + ' + 'ucrBaseSubdialog + ' + Me.ucrBaseSubdialog.AutoSize = True + Me.ucrBaseSubdialog.Location = New System.Drawing.Point(88, 397) + Me.ucrBaseSubdialog.Name = "ucrBaseSubdialog" + Me.ucrBaseSubdialog.Size = New System.Drawing.Size(224, 29) + Me.ucrBaseSubdialog.TabIndex = 3 + ' + 'sdgClimsoft + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(417, 434) + Me.Controls.Add(Me.ucrBaseSubdialog) + Me.Controls.Add(Me.tbpMoreOptions) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "sdgClimsoft" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent + Me.Text = "More Climsoft Options" + Me.tbpTitles.ResumeLayout(False) + Me.grpMetadataToImport.ResumeLayout(False) + Me.grpMetadataToImport.PerformLayout() + Me.tbColumns.ResumeLayout(False) + Me.grpColumnsToInclude.ResumeLayout(False) + Me.grpColumnsToInclude.PerformLayout() + Me.tbpMoreOptions.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ucrBaseSubdialog As ucrButtonsSubdialogue + Friend WithEvents tbpTitles As TabPage + Friend WithEvents grpMetadataToImport As GroupBox + Friend WithEvents tbColumns As TabPage + Friend WithEvents ucrChkIncludeQCStatus As ucrCheck + Friend WithEvents tbpMoreOptions As TabControl + Friend WithEvents grpColumnsToInclude As GroupBox + Friend WithEvents ucrChkIncludeFlag As ucrCheck + Friend WithEvents ucrChkIncludeAquistion As ucrCheck + Friend WithEvents ucrChkIncludeEntryForm As ucrCheck + Friend WithEvents ucrChkIncludeElementAbbrv As ucrCheck + Friend WithEvents ucrChkIncludeStationName As ucrCheck + Friend WithEvents ucrChkImportElementsMetadata As ucrCheck + Friend WithEvents ucrChkImportStationsMetadata As ucrCheck + Friend WithEvents ucrChkIncludeCapturedBy As ucrCheck + Friend WithEvents ucrChkIncludeLevel As ucrCheck + Friend WithEvents ucrChkIncludeQCLog As ucrCheck + Friend WithEvents ucrChkIncludeElementId As ucrCheck + Friend WithEvents ucrChkIncludeStationId As ucrCheck + Friend WithEvents ucrChkIncludeDateTime As ucrCheck + Friend WithEvents ucrChkIncludeElementName As ucrCheck +End Class \ No newline at end of file diff --git a/instat/sdgClimsoft.resx b/instat/sdgClimsoft.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgClimsoft.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/sdgClimsoft.vb b/instat/sdgClimsoft.vb new file mode 100644 index 00000000000..e23c63a5b8f --- /dev/null +++ b/instat/sdgClimsoft.vb @@ -0,0 +1,124 @@ +' 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 sdgClimsoft + + Private bControlsInitialised As Boolean = False + Private Sub sdgClimsoft_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + End Sub + + Private Sub InitialiseControls() + + If bControlsInitialised Then + Exit Sub + End If + + 'Columns to include + '--------------------------------------- + ucrChkIncludeStationId.SetText("Station Id") + ucrChkIncludeStationId.Enabled = False + + ucrChkIncludeStationName.SetText("Station Name") + ucrChkIncludeStationName.Enabled = False + + ucrChkIncludeElementAbbrv.SetText("Element Abbreviation") + ucrChkIncludeElementAbbrv.Enabled = False + + ucrChkIncludeDateTime.SetText("Date Time") + ucrChkIncludeDateTime.Enabled = False + + ucrChkIncludeElementId.SetText("Element Id") + ucrChkIncludeElementId.SetParameter(New RParameter("include_element_id", 14)) + ucrChkIncludeElementId.SetRDefault("FALSE") + + ucrChkIncludeElementName.SetText("Element Name") + ucrChkIncludeElementName.SetParameter(New RParameter("include_element_name", 15)) + ucrChkIncludeElementName.SetRDefault("FALSE") + + ucrChkIncludeAquistion.SetText("Acquisition Type") + ucrChkIncludeAquistion.SetParameter(New RParameter("include_acquisition_type", 16)) + ucrChkIncludeAquistion.SetRDefault("FALSE") + + ucrChkIncludeLevel.SetText("Level") + ucrChkIncludeLevel.SetParameter(New RParameter("include_level", 17)) + ucrChkIncludeLevel.SetRDefault("FALSE") + + ucrChkIncludeEntryForm.SetText("Entry Form") + ucrChkIncludeEntryForm.SetParameter(New RParameter("include_entry_form", 18)) + ucrChkIncludeEntryForm.SetRDefault("FALSE") + + ucrChkIncludeCapturedBy.SetText("Captured By (user)") + ucrChkIncludeCapturedBy.SetParameter(New RParameter("include_captured_by", 19)) + ucrChkIncludeCapturedBy.SetRDefault("FALSE") + + ucrChkIncludeQCStatus.SetText("QC Status") + ucrChkIncludeQCStatus.SetParameter(New RParameter("include_qc_status", 20)) + ucrChkIncludeQCStatus.SetRDefault("FALSE") + + ucrChkIncludeQCLog.SetText("QC Log") + ucrChkIncludeQCLog.SetParameter(New RParameter("include_qc_log", 21)) + ucrChkIncludeQCLog.SetRDefault("FALSE") + + ucrChkIncludeFlag.SetText("Flag") + ucrChkIncludeFlag.SetParameter(New RParameter("include_flag", 22)) + ucrChkIncludeFlag.SetRDefault("FALSE") + + '--------------------------------------- + + 'Metadata + '--------------------------------------- + ucrChkImportStationsMetadata.SetText("Selected Stations") + ucrChkImportStationsMetadata.SetParameter(New RParameter("import_selected_stations_metadata", 23)) + ucrChkImportStationsMetadata.SetRDefault("FALSE") + + ucrChkImportElementsMetadata.SetText("Selected Elements") + ucrChkImportElementsMetadata.SetParameter(New RParameter("import_selected_elements_metadata", 24)) + ucrChkImportElementsMetadata.SetRDefault("FALSE") + '--------------------------------------- + + bControlsInitialised = True + + End Sub + + Public Sub SetRCode(clsRFunction As RFunction, Optional bReset As Boolean = True) + 'initialise controls if not initialised + InitialiseControls() + + 'Columns + '--------------------------------------- + ucrChkIncludeElementId.SetRCode(clsRFunction, bReset) + ucrChkIncludeElementName.SetRCode(clsRFunction, bReset) + ucrChkIncludeAquistion.SetRCode(clsRFunction, bReset) + ucrChkIncludeLevel.SetRCode(clsRFunction, bReset) + ucrChkIncludeEntryForm.SetRCode(clsRFunction, bReset) + ucrChkIncludeCapturedBy.SetRCode(clsRFunction, bReset) + ucrChkIncludeQCStatus.SetRCode(clsRFunction, bReset) + ucrChkIncludeQCLog.SetRCode(clsRFunction, bReset) + ucrChkIncludeFlag.SetRCode(clsRFunction, bReset) + '--------------------------------------- + + 'Metadata + '--------------------------------------- + ucrChkImportStationsMetadata.SetRCode(clsRFunction, bReset) + ucrChkImportElementsMetadata.SetRCode(clsRFunction, bReset) + '--------------------------------------- + + End Sub + + +End Class \ No newline at end of file diff --git a/instat/sdgDefineAnnualRainfall.Designer.vb b/instat/sdgDefineAnnualRainfall.Designer.vb index 91bb5b1cb29..b44111f4361 100644 --- a/instat/sdgDefineAnnualRainfall.Designer.vb +++ b/instat/sdgDefineAnnualRainfall.Designer.vb @@ -22,22 +22,13 @@ Partial Class sdgDefineAnnualRainfall 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrReceiverMaxMinMonthly = New instat.ucrReceiverSingle() - Me.ucrReceiverYearMonthly = New instat.ucrReceiverSingle() - Me.ucrReceiverMonthlyTemp = New instat.ucrReceiverSingle() - Me.ucrSelecetorMonthlyTemp = New instat.ucrSelectorByDataFrame() Me.lblSeasonPlantingDay = New System.Windows.Forms.Label() - Me.ucrSelectorSeasonStartProp = New instat.ucrSelectorByDataFrame() Me.tbSummaries = New System.Windows.Forms.TabControl() Me.tbAnnualRainfall = New System.Windows.Forms.TabPage() Me.lblStartRainStatus = New System.Windows.Forms.Label() - Me.ucrReceiverStartRainStatus = New instat.ucrReceiverSingle() Me.lblEndRainStatus = New System.Windows.Forms.Label() - Me.ucrReceiverEndRainStatus = New instat.ucrReceiverSingle() Me.lblEndSeasonStatus = New System.Windows.Forms.Label() - Me.ucrReceiverEndSeasonStatus = New instat.ucrReceiverSingle() Me.lblRainyDaysYear = New System.Windows.Forms.Label() - Me.ucrReceiverRainDaysYear = New instat.ucrReceiverSingle() Me.lblNoRainDaysSeason = New System.Windows.Forms.Label() Me.lblSeasonalLength = New System.Windows.Forms.Label() Me.lblSeasonalRain = New System.Windows.Forms.Label() @@ -50,6 +41,39 @@ Partial Class sdgDefineAnnualRainfall Me.lblStartRainDOY = New System.Windows.Forms.Label() Me.lblYear = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() + Me.tbCropSuccessProp = New System.Windows.Forms.TabPage() + Me.lblPlantingLength = New System.Windows.Forms.Label() + Me.lblPlantingDay = New System.Windows.Forms.Label() + Me.lblProbSuccess = New System.Windows.Forms.Label() + Me.lblTotalRain = New System.Windows.Forms.Label() + Me.lblCropStation = New System.Windows.Forms.Label() + Me.tbSeasonStartProb = New System.Windows.Forms.TabPage() + Me.lblPlantingDayCond = New System.Windows.Forms.Label() + Me.lblSeasonYear = New System.Windows.Forms.Label() + Me.lblStationSeasonProb = New System.Windows.Forms.Label() + Me.tbAnnualTempSummaries = New System.Windows.Forms.TabPage() + Me.lblMinMinAnnual = New System.Windows.Forms.Label() + Me.lblMeanAnnualTemp = New System.Windows.Forms.Label() + Me.lblMaxMinAnnual = New System.Windows.Forms.Label() + Me.lblAnnualTempYear = New System.Windows.Forms.Label() + Me.lblAnnualTempStation = New System.Windows.Forms.Label() + Me.lblMaxMaxAnnual = New System.Windows.Forms.Label() + Me.lblMinMaxAnnual = New System.Windows.Forms.Label() + Me.lblMeanMaxAnnual = New System.Windows.Forms.Label() + Me.tbMonthlyTemp = New System.Windows.Forms.TabPage() + Me.lblMonth = New System.Windows.Forms.Label() + Me.lblMinMInMonthly = New System.Windows.Forms.Label() + Me.lblMeanMinMonthly = New System.Windows.Forms.Label() + Me.lblMaxMinMonthly = New System.Windows.Forms.Label() + Me.lblYearMonthTemp = New System.Windows.Forms.Label() + Me.lblStationMonthTemp = New System.Windows.Forms.Label() + Me.lblMaxMaxMonthly = New System.Windows.Forms.Label() + Me.lblMinMaxMonthly = New System.Windows.Forms.Label() + Me.lblMeanMaxMonthly = New System.Windows.Forms.Label() + Me.ucrReceiverStartRainStatus = New instat.ucrReceiverSingle() + Me.ucrReceiverEndRainStatus = New instat.ucrReceiverSingle() + Me.ucrReceiverEndSeasonStatus = New instat.ucrReceiverSingle() + Me.ucrReceiverRainDaysYear = New instat.ucrReceiverSingle() Me.ucrReceiverStartRainDate = New instat.ucrReceiverSingle() Me.ucrReceiverStartRainDOY = New instat.ucrReceiverSingle() Me.ucrReceiverYear = New instat.ucrReceiverSingle() @@ -63,35 +87,17 @@ Partial Class sdgDefineAnnualRainfall Me.ucrReceiverSeasonalRain = New instat.ucrReceiverSingle() Me.ucrReceiverAnnualRain = New instat.ucrReceiverSingle() Me.ucrSelectorDefineAnnualRain = New instat.ucrSelectorByDataFrame() - Me.tbCropSuccessProp = New System.Windows.Forms.TabPage() - Me.lblPlantingLength = New System.Windows.Forms.Label() - Me.lblPlantingDay = New System.Windows.Forms.Label() - Me.lblProbSuccess = New System.Windows.Forms.Label() - Me.lblTotalRain = New System.Windows.Forms.Label() - Me.lblCropStation = New System.Windows.Forms.Label() Me.ucrReceiverPlantingLenghth = New instat.ucrReceiverSingle() Me.ucrReceiverPropSuccess = New instat.ucrReceiverSingle() Me.ucrReceiverPlantingDay = New instat.ucrReceiverSingle() Me.ucrReceiverTotalRain = New instat.ucrReceiverSingle() Me.ucrReceiverStationCrop = New instat.ucrReceiverSingle() Me.ucrSelectorCropProp = New instat.ucrSelectorByDataFrame() - Me.tbSeasonStartProb = New System.Windows.Forms.TabPage() - Me.lblPlantingDayCond = New System.Windows.Forms.Label() - Me.lblSeasonYear = New System.Windows.Forms.Label() - Me.lblStationSeasonProb = New System.Windows.Forms.Label() Me.ucrReceiverPlantingDayCondition = New instat.ucrReceiverSingle() Me.ucrReceiverSeasonPlantingDay = New instat.ucrReceiverSingle() Me.ucrReceiverSeasonYear = New instat.ucrReceiverSingle() Me.ucrReceiverSeasonStationProb = New instat.ucrReceiverSingle() - Me.tbAnnualTempSummaries = New System.Windows.Forms.TabPage() - Me.lblMinMinAnnual = New System.Windows.Forms.Label() - Me.lblMeanAnnualTemp = New System.Windows.Forms.Label() - Me.lblMaxMinAnnual = New System.Windows.Forms.Label() - Me.lblAnnualTempYear = New System.Windows.Forms.Label() - Me.lblAnnualTempStation = New System.Windows.Forms.Label() - Me.lblMaxMaxAnnual = New System.Windows.Forms.Label() - Me.lblMinMaxAnnual = New System.Windows.Forms.Label() - Me.lblMeanMaxAnnual = New System.Windows.Forms.Label() + Me.ucrSelectorSeasonStartProp = New instat.ucrSelectorByDataFrame() Me.ucrReceiverMinMinAnnual = New instat.ucrReceiverSingle() Me.ucrReceiverMaxMaxAnnual = New instat.ucrReceiverSingle() Me.ucrReceiverMeanMaxAnnual = New instat.ucrReceiverSingle() @@ -101,22 +107,16 @@ Partial Class sdgDefineAnnualRainfall Me.ucrReceiverAnnualTempYr = New instat.ucrReceiverSingle() Me.ucrReceiverAnnualTempStation = New instat.ucrReceiverSingle() Me.ucrSelectorAnnualTemp = New instat.ucrSelectorByDataFrame() - Me.tbMonthlyTemp = New System.Windows.Forms.TabPage() - Me.lblMonth = New System.Windows.Forms.Label() - Me.lblMinMInMonthly = New System.Windows.Forms.Label() - Me.lblMeanMinMonthly = New System.Windows.Forms.Label() - Me.lblMaxMinMonthly = New System.Windows.Forms.Label() - Me.lblYearMonthTemp = New System.Windows.Forms.Label() - Me.lblStationMonthTemp = New System.Windows.Forms.Label() - Me.lblMaxMaxMonthly = New System.Windows.Forms.Label() - Me.lblMinMaxMonthly = New System.Windows.Forms.Label() - Me.lblMeanMaxMonthly = New System.Windows.Forms.Label() Me.ucrReceiverMonthMonthly = New instat.ucrReceiverSingle() Me.ucrReceiverMinMinMonthly = New instat.ucrReceiverSingle() Me.ucrReceiverMaxMaxMonthly = New instat.ucrReceiverSingle() Me.ucrReceiverMeanmaxMonthly = New instat.ucrReceiverSingle() Me.ucrReceiverMinMaxMonthly = New instat.ucrReceiverSingle() + Me.ucrReceiverMaxMinMonthly = New instat.ucrReceiverSingle() Me.ucrReceiverMeanminMontly = New instat.ucrReceiverSingle() + Me.ucrReceiverYearMonthly = New instat.ucrReceiverSingle() + Me.ucrReceiverMonthlyTemp = New instat.ucrReceiverSingle() + Me.ucrSelecetorMonthlyTemp = New instat.ucrSelectorByDataFrame() Me.ucrBase = New instat.ucrButtonsSubdialogue() Me.tbSummaries.SuspendLayout() Me.tbAnnualRainfall.SuspendLayout() @@ -126,79 +126,15 @@ Partial Class sdgDefineAnnualRainfall Me.tbMonthlyTemp.SuspendLayout() Me.SuspendLayout() ' - 'ucrReceiverMaxMinMonthly - ' - Me.ucrReceiverMaxMinMonthly.AutoSize = True - Me.ucrReceiverMaxMinMonthly.frmParent = Nothing - Me.ucrReceiverMaxMinMonthly.Location = New System.Drawing.Point(372, 366) - Me.ucrReceiverMaxMinMonthly.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMaxMinMonthly.Name = "ucrReceiverMaxMinMonthly" - Me.ucrReceiverMaxMinMonthly.Selector = Nothing - Me.ucrReceiverMaxMinMonthly.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverMaxMinMonthly.strNcFilePath = "" - Me.ucrReceiverMaxMinMonthly.TabIndex = 12 - Me.ucrReceiverMaxMinMonthly.ucrSelector = Nothing - ' - 'ucrReceiverYearMonthly - ' - Me.ucrReceiverYearMonthly.AutoSize = True - Me.ucrReceiverYearMonthly.frmParent = Nothing - Me.ucrReceiverYearMonthly.Location = New System.Drawing.Point(369, 109) - Me.ucrReceiverYearMonthly.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverYearMonthly.Name = "ucrReceiverYearMonthly" - Me.ucrReceiverYearMonthly.Selector = Nothing - Me.ucrReceiverYearMonthly.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverYearMonthly.strNcFilePath = "" - Me.ucrReceiverYearMonthly.TabIndex = 4 - Me.ucrReceiverYearMonthly.ucrSelector = Nothing - ' - 'ucrReceiverMonthlyTemp - ' - Me.ucrReceiverMonthlyTemp.AutoSize = True - Me.ucrReceiverMonthlyTemp.frmParent = Nothing - Me.ucrReceiverMonthlyTemp.Location = New System.Drawing.Point(368, 49) - Me.ucrReceiverMonthlyTemp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverMonthlyTemp.Name = "ucrReceiverMonthlyTemp" - Me.ucrReceiverMonthlyTemp.Selector = Nothing - Me.ucrReceiverMonthlyTemp.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverMonthlyTemp.strNcFilePath = "" - Me.ucrReceiverMonthlyTemp.TabIndex = 2 - Me.ucrReceiverMonthlyTemp.ucrSelector = Nothing - ' - 'ucrSelecetorMonthlyTemp - ' - Me.ucrSelecetorMonthlyTemp.AutoSize = True - Me.ucrSelecetorMonthlyTemp.bDropUnusedFilterLevels = False - Me.ucrSelecetorMonthlyTemp.bShowHiddenColumns = False - Me.ucrSelecetorMonthlyTemp.bUseCurrentFilter = True - Me.ucrSelecetorMonthlyTemp.Location = New System.Drawing.Point(15, 18) - Me.ucrSelecetorMonthlyTemp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelecetorMonthlyTemp.Name = "ucrSelecetorMonthlyTemp" - Me.ucrSelecetorMonthlyTemp.Size = New System.Drawing.Size(339, 412) - Me.ucrSelecetorMonthlyTemp.TabIndex = 0 - ' 'lblSeasonPlantingDay ' Me.lblSeasonPlantingDay.AutoSize = True - Me.lblSeasonPlantingDay.Location = New System.Drawing.Point(370, 149) - Me.lblSeasonPlantingDay.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSeasonPlantingDay.Location = New System.Drawing.Point(250, 97) Me.lblSeasonPlantingDay.Name = "lblSeasonPlantingDay" - Me.lblSeasonPlantingDay.Size = New System.Drawing.Size(102, 20) + Me.lblSeasonPlantingDay.Size = New System.Drawing.Size(70, 13) Me.lblSeasonPlantingDay.TabIndex = 5 Me.lblSeasonPlantingDay.Text = "Planting Day:" ' - 'ucrSelectorSeasonStartProp - ' - Me.ucrSelectorSeasonStartProp.AutoSize = True - Me.ucrSelectorSeasonStartProp.bDropUnusedFilterLevels = False - Me.ucrSelectorSeasonStartProp.bShowHiddenColumns = False - Me.ucrSelectorSeasonStartProp.bUseCurrentFilter = True - Me.ucrSelectorSeasonStartProp.Location = New System.Drawing.Point(20, 15) - Me.ucrSelectorSeasonStartProp.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorSeasonStartProp.Name = "ucrSelectorSeasonStartProp" - Me.ucrSelectorSeasonStartProp.Size = New System.Drawing.Size(339, 412) - Me.ucrSelectorSeasonStartProp.TabIndex = 0 - ' 'tbSummaries ' Me.tbSummaries.Controls.Add(Me.tbAnnualRainfall) @@ -206,11 +142,10 @@ Partial Class sdgDefineAnnualRainfall Me.tbSummaries.Controls.Add(Me.tbSeasonStartProb) Me.tbSummaries.Controls.Add(Me.tbAnnualTempSummaries) Me.tbSummaries.Controls.Add(Me.tbMonthlyTemp) - Me.tbSummaries.Location = New System.Drawing.Point(18, 21) - Me.tbSummaries.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.tbSummaries.Location = New System.Drawing.Point(12, 14) Me.tbSummaries.Name = "tbSummaries" Me.tbSummaries.SelectedIndex = 0 - Me.tbSummaries.Size = New System.Drawing.Size(784, 728) + Me.tbSummaries.Size = New System.Drawing.Size(523, 473) Me.tbSummaries.TabIndex = 34 ' 'tbAnnualRainfall @@ -248,11 +183,10 @@ Partial Class sdgDefineAnnualRainfall Me.tbAnnualRainfall.Controls.Add(Me.ucrReceiverSeasonalRain) Me.tbAnnualRainfall.Controls.Add(Me.ucrReceiverAnnualRain) Me.tbAnnualRainfall.Controls.Add(Me.ucrSelectorDefineAnnualRain) - Me.tbAnnualRainfall.Location = New System.Drawing.Point(4, 29) - Me.tbAnnualRainfall.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.tbAnnualRainfall.Location = New System.Drawing.Point(4, 22) Me.tbAnnualRainfall.Name = "tbAnnualRainfall" - Me.tbAnnualRainfall.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbAnnualRainfall.Size = New System.Drawing.Size(776, 695) + Me.tbAnnualRainfall.Padding = New System.Windows.Forms.Padding(3, 3, 3, 3) + Me.tbAnnualRainfall.Size = New System.Drawing.Size(515, 447) Me.tbAnnualRainfall.TabIndex = 0 Me.tbAnnualRainfall.Text = "Annual Rainfall" Me.tbAnnualRainfall.UseVisualStyleBackColor = True @@ -260,289 +194,594 @@ Partial Class sdgDefineAnnualRainfall 'lblStartRainStatus ' Me.lblStartRainStatus.AutoSize = True - Me.lblStartRainStatus.Location = New System.Drawing.Point(398, 501) - Me.lblStartRainStatus.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblStartRainStatus.Location = New System.Drawing.Point(264, 326) Me.lblStartRainStatus.Name = "lblStartRainStatus" - Me.lblStartRainStatus.Size = New System.Drawing.Size(144, 20) + Me.lblStartRainStatus.Size = New System.Drawing.Size(95, 13) Me.lblStartRainStatus.TabIndex = 27 Me.lblStartRainStatus.Text = "Start Rains Status:" ' - 'ucrReceiverStartRainStatus - ' - Me.ucrReceiverStartRainStatus.AutoSize = True - Me.ucrReceiverStartRainStatus.frmParent = Nothing - Me.ucrReceiverStartRainStatus.Location = New System.Drawing.Point(392, 527) - Me.ucrReceiverStartRainStatus.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStartRainStatus.Name = "ucrReceiverStartRainStatus" - Me.ucrReceiverStartRainStatus.Selector = Nothing - Me.ucrReceiverStartRainStatus.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverStartRainStatus.strNcFilePath = "" - Me.ucrReceiverStartRainStatus.TabIndex = 28 - Me.ucrReceiverStartRainStatus.ucrSelector = Nothing - ' 'lblEndRainStatus ' Me.lblEndRainStatus.AutoSize = True - Me.lblEndRainStatus.Location = New System.Drawing.Point(396, 565) - Me.lblEndRainStatus.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEndRainStatus.Location = New System.Drawing.Point(264, 367) Me.lblEndRainStatus.Name = "lblEndRainStatus" - Me.lblEndRainStatus.Size = New System.Drawing.Size(138, 20) + Me.lblEndRainStatus.Size = New System.Drawing.Size(92, 13) Me.lblEndRainStatus.TabIndex = 29 Me.lblEndRainStatus.Text = "End Rains Status:" ' - 'ucrReceiverEndRainStatus - ' - Me.ucrReceiverEndRainStatus.AutoSize = True - Me.ucrReceiverEndRainStatus.frmParent = Nothing - Me.ucrReceiverEndRainStatus.Location = New System.Drawing.Point(392, 590) - Me.ucrReceiverEndRainStatus.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverEndRainStatus.Name = "ucrReceiverEndRainStatus" - Me.ucrReceiverEndRainStatus.Selector = Nothing - Me.ucrReceiverEndRainStatus.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverEndRainStatus.strNcFilePath = "" - Me.ucrReceiverEndRainStatus.TabIndex = 30 - Me.ucrReceiverEndRainStatus.ucrSelector = Nothing - ' 'lblEndSeasonStatus ' Me.lblEndSeasonStatus.AutoSize = True - Me.lblEndSeasonStatus.Location = New System.Drawing.Point(396, 627) - Me.lblEndSeasonStatus.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEndSeasonStatus.Location = New System.Drawing.Point(264, 408) Me.lblEndSeasonStatus.Name = "lblEndSeasonStatus" - Me.lblEndSeasonStatus.Size = New System.Drawing.Size(152, 20) + Me.lblEndSeasonStatus.Size = New System.Drawing.Size(101, 13) Me.lblEndSeasonStatus.TabIndex = 31 Me.lblEndSeasonStatus.Text = "End Season Status:" ' - 'ucrReceiverEndSeasonStatus - ' - Me.ucrReceiverEndSeasonStatus.AutoSize = True - Me.ucrReceiverEndSeasonStatus.frmParent = Nothing - Me.ucrReceiverEndSeasonStatus.Location = New System.Drawing.Point(392, 649) - Me.ucrReceiverEndSeasonStatus.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverEndSeasonStatus.Name = "ucrReceiverEndSeasonStatus" - Me.ucrReceiverEndSeasonStatus.Selector = Nothing - Me.ucrReceiverEndSeasonStatus.Size = New System.Drawing.Size(180, 39) - Me.ucrReceiverEndSeasonStatus.strNcFilePath = "" - Me.ucrReceiverEndSeasonStatus.TabIndex = 32 - Me.ucrReceiverEndSeasonStatus.ucrSelector = Nothing - ' 'lblRainyDaysYear ' Me.lblRainyDaysYear.AutoSize = True - Me.lblRainyDaysYear.Location = New System.Drawing.Point(396, 132) - Me.lblRainyDaysYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblRainyDaysYear.Location = New System.Drawing.Point(264, 86) Me.lblRainyDaysYear.Name = "lblRainyDaysYear" - Me.lblRainyDaysYear.Size = New System.Drawing.Size(151, 20) + Me.lblRainyDaysYear.Size = New System.Drawing.Size(103, 13) Me.lblRainyDaysYear.TabIndex = 15 Me.lblRainyDaysYear.Text = " Rainy Days in Year:" ' - 'ucrReceiverRainDaysYear - ' - Me.ucrReceiverRainDaysYear.AutoSize = True - Me.ucrReceiverRainDaysYear.frmParent = Nothing - Me.ucrReceiverRainDaysYear.Location = New System.Drawing.Point(392, 156) - Me.ucrReceiverRainDaysYear.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverRainDaysYear.Name = "ucrReceiverRainDaysYear" - Me.ucrReceiverRainDaysYear.Selector = Nothing - Me.ucrReceiverRainDaysYear.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverRainDaysYear.strNcFilePath = "" - Me.ucrReceiverRainDaysYear.TabIndex = 16 - Me.ucrReceiverRainDaysYear.ucrSelector = Nothing - ' 'lblNoRainDaysSeason ' Me.lblNoRainDaysSeason.AutoSize = True - Me.lblNoRainDaysSeason.Location = New System.Drawing.Point(396, 63) - Me.lblNoRainDaysSeason.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblNoRainDaysSeason.Location = New System.Drawing.Point(264, 41) Me.lblNoRainDaysSeason.Name = "lblNoRainDaysSeason" - Me.lblNoRainDaysSeason.Size = New System.Drawing.Size(172, 20) + Me.lblNoRainDaysSeason.Size = New System.Drawing.Size(117, 13) Me.lblNoRainDaysSeason.TabIndex = 13 Me.lblNoRainDaysSeason.Text = " Rainy Days in Season:" ' 'lblSeasonalLength ' Me.lblSeasonalLength.AutoSize = True - Me.lblSeasonalLength.Location = New System.Drawing.Point(396, 191) - Me.lblSeasonalLength.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSeasonalLength.Location = New System.Drawing.Point(264, 124) Me.lblSeasonalLength.Name = "lblSeasonalLength" - Me.lblSeasonalLength.Size = New System.Drawing.Size(134, 20) + Me.lblSeasonalLength.Size = New System.Drawing.Size(90, 13) Me.lblSeasonalLength.TabIndex = 17 Me.lblSeasonalLength.Text = "Seasonal Length:" ' 'lblSeasonalRain ' Me.lblSeasonalRain.AutoSize = True - Me.lblSeasonalRain.Location = New System.Drawing.Point(18, 615) - Me.lblSeasonalRain.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSeasonalRain.Location = New System.Drawing.Point(12, 400) Me.lblSeasonalRain.Name = "lblSeasonalRain" - Me.lblSeasonalRain.Size = New System.Drawing.Size(117, 20) + Me.lblSeasonalRain.Size = New System.Drawing.Size(79, 13) Me.lblSeasonalRain.TabIndex = 11 Me.lblSeasonalRain.Text = "Seasonal Rain:" ' 'lblAnnualRain ' Me.lblAnnualRain.AutoSize = True - Me.lblAnnualRain.Location = New System.Drawing.Point(19, 547) - Me.lblAnnualRain.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblAnnualRain.Location = New System.Drawing.Point(13, 356) Me.lblAnnualRain.Name = "lblAnnualRain" - Me.lblAnnualRain.Size = New System.Drawing.Size(100, 20) + Me.lblAnnualRain.Size = New System.Drawing.Size(68, 13) Me.lblAnnualRain.TabIndex = 9 Me.lblAnnualRain.Text = "Annual Rain:" ' 'lblEndSeasonDate ' Me.lblEndSeasonDate.AutoSize = True - Me.lblEndSeasonDate.Location = New System.Drawing.Point(396, 439) - Me.lblEndSeasonDate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEndSeasonDate.Location = New System.Drawing.Point(264, 285) Me.lblEndSeasonDate.Name = "lblEndSeasonDate" - Me.lblEndSeasonDate.Size = New System.Drawing.Size(146, 20) + Me.lblEndSeasonDate.Size = New System.Drawing.Size(97, 13) Me.lblEndSeasonDate.TabIndex = 25 Me.lblEndSeasonDate.Text = "End Season(Date):" ' 'lblEndSeasonDOY ' Me.lblEndSeasonDOY.AutoSize = True - Me.lblEndSeasonDOY.Location = New System.Drawing.Point(396, 384) - Me.lblEndSeasonDOY.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEndSeasonDOY.Location = New System.Drawing.Point(264, 250) Me.lblEndSeasonDOY.Name = "lblEndSeasonDOY" - Me.lblEndSeasonDOY.Size = New System.Drawing.Size(146, 20) + Me.lblEndSeasonDOY.Size = New System.Drawing.Size(97, 13) Me.lblEndSeasonDOY.TabIndex = 23 Me.lblEndSeasonDOY.Text = "End Season(DOY):" ' 'lblEndRainDate ' Me.lblEndRainDate.AutoSize = True - Me.lblEndRainDate.Location = New System.Drawing.Point(396, 318) - Me.lblEndRainDate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEndRainDate.Location = New System.Drawing.Point(264, 207) Me.lblEndRainDate.Name = "lblEndRainDate" - Me.lblEndRainDate.Size = New System.Drawing.Size(124, 20) + Me.lblEndRainDate.Size = New System.Drawing.Size(83, 13) Me.lblEndRainDate.TabIndex = 21 Me.lblEndRainDate.Text = "End Rain(Date):" ' 'lblEndRainsDOY ' Me.lblEndRainsDOY.AutoSize = True - Me.lblEndRainsDOY.Location = New System.Drawing.Point(396, 257) - Me.lblEndRainsDOY.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEndRainsDOY.Location = New System.Drawing.Point(264, 167) Me.lblEndRainsDOY.Name = "lblEndRainsDOY" - Me.lblEndRainsDOY.Size = New System.Drawing.Size(124, 20) + Me.lblEndRainsDOY.Size = New System.Drawing.Size(83, 13) Me.lblEndRainsDOY.TabIndex = 19 Me.lblEndRainsDOY.Text = "End Rain(DOY):" ' 'lblStartRainDate ' Me.lblStartRainDate.AutoSize = True - Me.lblStartRainDate.Location = New System.Drawing.Point(16, 486) - Me.lblStartRainDate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblStartRainDate.Location = New System.Drawing.Point(11, 316) Me.lblStartRainDate.Name = "lblStartRainDate" - Me.lblStartRainDate.Size = New System.Drawing.Size(130, 20) + Me.lblStartRainDate.Size = New System.Drawing.Size(86, 13) Me.lblStartRainDate.TabIndex = 7 Me.lblStartRainDate.Text = "Start Rain(Date):" ' 'lblStartRainDOY ' Me.lblStartRainDOY.AutoSize = True - Me.lblStartRainDOY.Location = New System.Drawing.Point(18, 422) - Me.lblStartRainDOY.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblStartRainDOY.Location = New System.Drawing.Point(12, 274) Me.lblStartRainDOY.Name = "lblStartRainDOY" - Me.lblStartRainDOY.Size = New System.Drawing.Size(130, 20) + Me.lblStartRainDOY.Size = New System.Drawing.Size(86, 13) Me.lblStartRainDOY.TabIndex = 5 Me.lblStartRainDOY.Text = "Start Rain(DOY):" ' 'lblYear ' Me.lblYear.AutoSize = True - Me.lblYear.Location = New System.Drawing.Point(21, 355) - Me.lblYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblYear.Location = New System.Drawing.Point(14, 231) Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(47, 20) + Me.lblYear.Size = New System.Drawing.Size(32, 13) Me.lblYear.TabIndex = 3 Me.lblYear.Text = "Year:" ' 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(22, 288) - Me.lblStation.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblStation.Location = New System.Drawing.Point(15, 187) Me.lblStation.Name = "lblStation" - Me.lblStation.Size = New System.Drawing.Size(64, 20) + Me.lblStation.Size = New System.Drawing.Size(43, 13) Me.lblStation.TabIndex = 1 Me.lblStation.Text = "Station:" ' - 'ucrReceiverStartRainDate + 'tbCropSuccessProp ' - Me.ucrReceiverStartRainDate.AutoSize = True - Me.ucrReceiverStartRainDate.frmParent = Nothing - Me.ucrReceiverStartRainDate.Location = New System.Drawing.Point(14, 513) - Me.ucrReceiverStartRainDate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStartRainDate.Name = "ucrReceiverStartRainDate" - Me.ucrReceiverStartRainDate.Selector = Nothing - Me.ucrReceiverStartRainDate.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverStartRainDate.strNcFilePath = "" - Me.ucrReceiverStartRainDate.TabIndex = 8 - Me.ucrReceiverStartRainDate.ucrSelector = Nothing + Me.tbCropSuccessProp.Controls.Add(Me.lblPlantingLength) + Me.tbCropSuccessProp.Controls.Add(Me.lblPlantingDay) + Me.tbCropSuccessProp.Controls.Add(Me.lblProbSuccess) + Me.tbCropSuccessProp.Controls.Add(Me.lblTotalRain) + Me.tbCropSuccessProp.Controls.Add(Me.lblCropStation) + Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverPlantingLenghth) + Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverPropSuccess) + Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverPlantingDay) + Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverTotalRain) + Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverStationCrop) + Me.tbCropSuccessProp.Controls.Add(Me.ucrSelectorCropProp) + Me.tbCropSuccessProp.Location = New System.Drawing.Point(4, 22) + Me.tbCropSuccessProp.Name = "tbCropSuccessProp" + Me.tbCropSuccessProp.Padding = New System.Windows.Forms.Padding(3, 3, 3, 3) + Me.tbCropSuccessProp.Size = New System.Drawing.Size(515, 447) + Me.tbCropSuccessProp.TabIndex = 1 + Me.tbCropSuccessProp.Text = "Crop Success Prop" + Me.tbCropSuccessProp.UseVisualStyleBackColor = True ' - 'ucrReceiverStartRainDOY + 'lblPlantingLength ' - Me.ucrReceiverStartRainDOY.AutoSize = True - Me.ucrReceiverStartRainDOY.frmParent = Nothing - Me.ucrReceiverStartRainDOY.Location = New System.Drawing.Point(14, 449) - Me.ucrReceiverStartRainDOY.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStartRainDOY.Name = "ucrReceiverStartRainDOY" - Me.ucrReceiverStartRainDOY.Selector = Nothing - Me.ucrReceiverStartRainDOY.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverStartRainDOY.strNcFilePath = "" - Me.ucrReceiverStartRainDOY.TabIndex = 6 - Me.ucrReceiverStartRainDOY.ucrSelector = Nothing + Me.lblPlantingLength.AutoSize = True + Me.lblPlantingLength.Location = New System.Drawing.Point(248, 137) + Me.lblPlantingLength.Name = "lblPlantingLength" + Me.lblPlantingLength.Size = New System.Drawing.Size(84, 13) + Me.lblPlantingLength.TabIndex = 7 + Me.lblPlantingLength.Text = "Planting Length:" ' - 'ucrReceiverYear + 'lblPlantingDay ' - Me.ucrReceiverYear.AutoSize = True - Me.ucrReceiverYear.frmParent = Nothing - Me.ucrReceiverYear.Location = New System.Drawing.Point(14, 382) - 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, 38) - Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 4 - Me.ucrReceiverYear.ucrSelector = Nothing + Me.lblPlantingDay.AutoSize = True + Me.lblPlantingDay.Location = New System.Drawing.Point(248, 95) + Me.lblPlantingDay.Name = "lblPlantingDay" + Me.lblPlantingDay.Size = New System.Drawing.Size(70, 13) + Me.lblPlantingDay.TabIndex = 5 + Me.lblPlantingDay.Text = "Planting Day:" ' - 'ucrReceiverStation + 'lblProbSuccess ' - Me.ucrReceiverStation.AutoSize = True - Me.ucrReceiverStation.frmParent = Nothing - Me.ucrReceiverStation.Location = New System.Drawing.Point(16, 314) - 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, 38) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 2 - Me.ucrReceiverStation.ucrSelector = Nothing + Me.lblProbSuccess.AutoSize = True + Me.lblProbSuccess.Location = New System.Drawing.Point(248, 176) + Me.lblProbSuccess.Name = "lblProbSuccess" + Me.lblProbSuccess.Size = New System.Drawing.Size(117, 13) + Me.lblProbSuccess.TabIndex = 9 + Me.lblProbSuccess.Text = "Proportion of Success :" ' - 'ucrReceiverEndSeasonDate + 'lblTotalRain ' - Me.ucrReceiverEndSeasonDate.AutoSize = True - Me.ucrReceiverEndSeasonDate.frmParent = Nothing - Me.ucrReceiverEndSeasonDate.Location = New System.Drawing.Point(392, 465) - Me.ucrReceiverEndSeasonDate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverEndSeasonDate.Name = "ucrReceiverEndSeasonDate" - Me.ucrReceiverEndSeasonDate.Selector = Nothing - Me.ucrReceiverEndSeasonDate.Size = New System.Drawing.Size(180, 38) - Me.ucrReceiverEndSeasonDate.strNcFilePath = "" - Me.ucrReceiverEndSeasonDate.TabIndex = 26 - Me.ucrReceiverEndSeasonDate.ucrSelector = Nothing + Me.lblTotalRain.AutoSize = True + Me.lblTotalRain.Location = New System.Drawing.Point(248, 54) + Me.lblTotalRain.Name = "lblTotalRain" + Me.lblTotalRain.Size = New System.Drawing.Size(59, 13) + Me.lblTotalRain.TabIndex = 3 + Me.lblTotalRain.Text = "Total Rain:" ' - 'ucrReceiverEndSeasonDOY + 'lblCropStation ' - Me.ucrReceiverEndSeasonDOY.AutoSize = True - Me.ucrReceiverEndSeasonDOY.frmParent = Nothing - Me.ucrReceiverEndSeasonDOY.Location = New System.Drawing.Point(392, 404) - Me.ucrReceiverEndSeasonDOY.Margin = New System.Windows.Forms.Padding(0) + Me.lblCropStation.AutoSize = True + Me.lblCropStation.Location = New System.Drawing.Point(248, 11) + Me.lblCropStation.Name = "lblCropStation" + Me.lblCropStation.Size = New System.Drawing.Size(43, 13) + Me.lblCropStation.TabIndex = 1 + Me.lblCropStation.Text = "Station:" + ' + 'tbSeasonStartProb + ' + Me.tbSeasonStartProb.Controls.Add(Me.lblPlantingDayCond) + Me.tbSeasonStartProb.Controls.Add(Me.lblSeasonPlantingDay) + Me.tbSeasonStartProb.Controls.Add(Me.lblSeasonYear) + Me.tbSeasonStartProb.Controls.Add(Me.lblStationSeasonProb) + Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverPlantingDayCondition) + Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverSeasonPlantingDay) + Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverSeasonYear) + Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverSeasonStationProb) + Me.tbSeasonStartProb.Controls.Add(Me.ucrSelectorSeasonStartProp) + Me.tbSeasonStartProb.Location = New System.Drawing.Point(4, 22) + Me.tbSeasonStartProb.Name = "tbSeasonStartProb" + Me.tbSeasonStartProb.Padding = New System.Windows.Forms.Padding(3, 3, 3, 3) + Me.tbSeasonStartProb.Size = New System.Drawing.Size(515, 447) + Me.tbSeasonStartProb.TabIndex = 2 + Me.tbSeasonStartProb.Text = "Season Start Prob" + Me.tbSeasonStartProb.UseVisualStyleBackColor = True + ' + 'lblPlantingDayCond + ' + Me.lblPlantingDayCond.AutoSize = True + Me.lblPlantingDayCond.Location = New System.Drawing.Point(250, 139) + Me.lblPlantingDayCond.Name = "lblPlantingDayCond" + Me.lblPlantingDayCond.Size = New System.Drawing.Size(117, 13) + Me.lblPlantingDayCond.TabIndex = 7 + Me.lblPlantingDayCond.Text = "Planting Day Condition:" + ' + 'lblSeasonYear + ' + Me.lblSeasonYear.AutoSize = True + Me.lblSeasonYear.Location = New System.Drawing.Point(250, 56) + Me.lblSeasonYear.Name = "lblSeasonYear" + Me.lblSeasonYear.Size = New System.Drawing.Size(32, 13) + Me.lblSeasonYear.TabIndex = 3 + Me.lblSeasonYear.Text = "Year:" + ' + 'lblStationSeasonProb + ' + Me.lblStationSeasonProb.AutoSize = True + Me.lblStationSeasonProb.Location = New System.Drawing.Point(250, 13) + Me.lblStationSeasonProb.Name = "lblStationSeasonProb" + Me.lblStationSeasonProb.Size = New System.Drawing.Size(43, 13) + Me.lblStationSeasonProb.TabIndex = 1 + Me.lblStationSeasonProb.Text = "Station:" + ' + 'tbAnnualTempSummaries + ' + Me.tbAnnualTempSummaries.Controls.Add(Me.lblMinMinAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblMeanAnnualTemp) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblMaxMinAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblAnnualTempYear) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblAnnualTempStation) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblMaxMaxAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblMinMaxAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.lblMeanMaxAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMinMinAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMaxMaxAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMeanMaxAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMinMaxAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMaxMinAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMeanAnnual) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverAnnualTempYr) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverAnnualTempStation) + Me.tbAnnualTempSummaries.Controls.Add(Me.ucrSelectorAnnualTemp) + Me.tbAnnualTempSummaries.Location = New System.Drawing.Point(4, 22) + Me.tbAnnualTempSummaries.Name = "tbAnnualTempSummaries" + Me.tbAnnualTempSummaries.Padding = New System.Windows.Forms.Padding(3, 3, 3, 3) + Me.tbAnnualTempSummaries.Size = New System.Drawing.Size(515, 447) + Me.tbAnnualTempSummaries.TabIndex = 3 + Me.tbAnnualTempSummaries.Text = "Annual Temperature" + Me.tbAnnualTempSummaries.UseVisualStyleBackColor = True + ' + 'lblMinMinAnnual + ' + Me.lblMinMinAnnual.AutoSize = True + Me.lblMinMinAnnual.Location = New System.Drawing.Point(248, 135) + Me.lblMinMinAnnual.Name = "lblMinMinAnnual" + Me.lblMinMinAnnual.Size = New System.Drawing.Size(98, 13) + Me.lblMinMinAnnual.TabIndex = 7 + Me.lblMinMinAnnual.Text = "Min Minimum Temp" + ' + 'lblMeanAnnualTemp + ' + Me.lblMeanAnnualTemp.AutoSize = True + Me.lblMeanAnnualTemp.Location = New System.Drawing.Point(248, 93) + Me.lblMeanAnnualTemp.Name = "lblMeanAnnualTemp" + Me.lblMeanAnnualTemp.Size = New System.Drawing.Size(108, 13) + Me.lblMeanAnnualTemp.TabIndex = 5 + Me.lblMeanAnnualTemp.Text = "Mean Minimum Temp" + ' + 'lblMaxMinAnnual + ' + Me.lblMaxMinAnnual.AutoSize = True + Me.lblMaxMinAnnual.Location = New System.Drawing.Point(248, 174) + Me.lblMaxMinAnnual.Name = "lblMaxMinAnnual" + Me.lblMaxMinAnnual.Size = New System.Drawing.Size(101, 13) + Me.lblMaxMinAnnual.TabIndex = 9 + Me.lblMaxMinAnnual.Text = "Max Minimum Temp" + ' + 'lblAnnualTempYear + ' + Me.lblAnnualTempYear.AutoSize = True + Me.lblAnnualTempYear.Location = New System.Drawing.Point(248, 52) + Me.lblAnnualTempYear.Name = "lblAnnualTempYear" + Me.lblAnnualTempYear.Size = New System.Drawing.Size(32, 13) + Me.lblAnnualTempYear.TabIndex = 3 + Me.lblAnnualTempYear.Text = "Year:" + ' + 'lblAnnualTempStation + ' + Me.lblAnnualTempStation.AutoSize = True + Me.lblAnnualTempStation.Location = New System.Drawing.Point(248, 9) + Me.lblAnnualTempStation.Name = "lblAnnualTempStation" + Me.lblAnnualTempStation.Size = New System.Drawing.Size(43, 13) + Me.lblAnnualTempStation.TabIndex = 1 + Me.lblAnnualTempStation.Text = "Station:" + ' + 'lblMaxMaxAnnual + ' + Me.lblMaxMaxAnnual.AutoSize = True + Me.lblMaxMaxAnnual.Location = New System.Drawing.Point(248, 295) + Me.lblMaxMaxAnnual.Name = "lblMaxMaxAnnual" + Me.lblMaxMaxAnnual.Size = New System.Drawing.Size(104, 13) + Me.lblMaxMaxAnnual.TabIndex = 15 + Me.lblMaxMaxAnnual.Text = "Max Maximum Temp" + ' + 'lblMinMaxAnnual + ' + Me.lblMinMaxAnnual.AutoSize = True + Me.lblMinMaxAnnual.Location = New System.Drawing.Point(248, 253) + Me.lblMinMaxAnnual.Name = "lblMinMaxAnnual" + Me.lblMinMaxAnnual.Size = New System.Drawing.Size(104, 13) + Me.lblMinMaxAnnual.TabIndex = 13 + Me.lblMinMaxAnnual.Text = "Min Maximum Temp:" + ' + 'lblMeanMaxAnnual + ' + Me.lblMeanMaxAnnual.AutoSize = True + Me.lblMeanMaxAnnual.Location = New System.Drawing.Point(248, 214) + Me.lblMeanMaxAnnual.Name = "lblMeanMaxAnnual" + Me.lblMeanMaxAnnual.Size = New System.Drawing.Size(111, 13) + Me.lblMeanMaxAnnual.TabIndex = 11 + Me.lblMeanMaxAnnual.Text = "Mean Maximum Temp" + ' + 'tbMonthlyTemp + ' + Me.tbMonthlyTemp.Controls.Add(Me.lblMonth) + Me.tbMonthlyTemp.Controls.Add(Me.lblMinMInMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.lblMeanMinMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.lblMaxMinMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.lblYearMonthTemp) + Me.tbMonthlyTemp.Controls.Add(Me.lblStationMonthTemp) + Me.tbMonthlyTemp.Controls.Add(Me.lblMaxMaxMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.lblMinMaxMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.lblMeanMaxMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMonthMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMinMinMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMaxMaxMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMeanmaxMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMinMaxMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMaxMinMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMeanminMontly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverYearMonthly) + Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMonthlyTemp) + Me.tbMonthlyTemp.Controls.Add(Me.ucrSelecetorMonthlyTemp) + Me.tbMonthlyTemp.Location = New System.Drawing.Point(4, 22) + Me.tbMonthlyTemp.Name = "tbMonthlyTemp" + Me.tbMonthlyTemp.Padding = New System.Windows.Forms.Padding(3, 3, 3, 3) + Me.tbMonthlyTemp.Size = New System.Drawing.Size(515, 447) + Me.tbMonthlyTemp.TabIndex = 4 + Me.tbMonthlyTemp.Text = "Monthly Temperature" + Me.tbMonthlyTemp.UseVisualStyleBackColor = True + ' + 'lblMonth + ' + Me.lblMonth.AutoSize = True + Me.lblMonth.Location = New System.Drawing.Point(247, 95) + Me.lblMonth.Name = "lblMonth" + Me.lblMonth.Size = New System.Drawing.Size(40, 13) + Me.lblMonth.TabIndex = 5 + Me.lblMonth.Text = "Month:" + ' + 'lblMinMInMonthly + ' + Me.lblMinMInMonthly.AutoSize = True + Me.lblMinMInMonthly.Location = New System.Drawing.Point(247, 181) + Me.lblMinMInMonthly.Name = "lblMinMInMonthly" + Me.lblMinMInMonthly.Size = New System.Drawing.Size(98, 13) + Me.lblMinMInMonthly.TabIndex = 9 + Me.lblMinMInMonthly.Text = "Min Minimum Temp" + ' + 'lblMeanMinMonthly + ' + Me.lblMeanMinMonthly.AutoSize = True + Me.lblMeanMinMonthly.Location = New System.Drawing.Point(247, 139) + Me.lblMeanMinMonthly.Name = "lblMeanMinMonthly" + Me.lblMeanMinMonthly.Size = New System.Drawing.Size(108, 13) + Me.lblMeanMinMonthly.TabIndex = 7 + Me.lblMeanMinMonthly.Text = "Mean Minimum Temp" + ' + 'lblMaxMinMonthly + ' + Me.lblMaxMinMonthly.AutoSize = True + Me.lblMaxMinMonthly.Location = New System.Drawing.Point(247, 220) + Me.lblMaxMinMonthly.Name = "lblMaxMinMonthly" + Me.lblMaxMinMonthly.Size = New System.Drawing.Size(101, 13) + Me.lblMaxMinMonthly.TabIndex = 11 + Me.lblMaxMinMonthly.Text = "Max Minimum Temp" + ' + 'lblYearMonthTemp + ' + Me.lblYearMonthTemp.AutoSize = True + Me.lblYearMonthTemp.Location = New System.Drawing.Point(247, 54) + Me.lblYearMonthTemp.Name = "lblYearMonthTemp" + Me.lblYearMonthTemp.Size = New System.Drawing.Size(32, 13) + Me.lblYearMonthTemp.TabIndex = 3 + Me.lblYearMonthTemp.Text = "Year:" + ' + 'lblStationMonthTemp + ' + Me.lblStationMonthTemp.AutoSize = True + Me.lblStationMonthTemp.Location = New System.Drawing.Point(247, 15) + Me.lblStationMonthTemp.Name = "lblStationMonthTemp" + Me.lblStationMonthTemp.Size = New System.Drawing.Size(43, 13) + Me.lblStationMonthTemp.TabIndex = 1 + Me.lblStationMonthTemp.Text = "Station:" + ' + 'lblMaxMaxMonthly + ' + Me.lblMaxMaxMonthly.AutoSize = True + Me.lblMaxMaxMonthly.Location = New System.Drawing.Point(247, 341) + Me.lblMaxMaxMonthly.Name = "lblMaxMaxMonthly" + Me.lblMaxMaxMonthly.Size = New System.Drawing.Size(104, 13) + Me.lblMaxMaxMonthly.TabIndex = 17 + Me.lblMaxMaxMonthly.Text = "Max Maximum Temp" + ' + 'lblMinMaxMonthly + ' + Me.lblMinMaxMonthly.AutoSize = True + Me.lblMinMaxMonthly.Location = New System.Drawing.Point(247, 299) + Me.lblMinMaxMonthly.Name = "lblMinMaxMonthly" + Me.lblMinMaxMonthly.Size = New System.Drawing.Size(104, 13) + Me.lblMinMaxMonthly.TabIndex = 15 + Me.lblMinMaxMonthly.Text = "Min Maximum Temp:" + ' + 'lblMeanMaxMonthly + ' + Me.lblMeanMaxMonthly.AutoSize = True + Me.lblMeanMaxMonthly.Location = New System.Drawing.Point(247, 260) + Me.lblMeanMaxMonthly.Name = "lblMeanMaxMonthly" + Me.lblMeanMaxMonthly.Size = New System.Drawing.Size(111, 13) + Me.lblMeanMaxMonthly.TabIndex = 13 + Me.lblMeanMaxMonthly.Text = "Mean Maximum Temp" + ' + 'ucrReceiverStartRainStatus + ' + Me.ucrReceiverStartRainStatus.AutoSize = True + Me.ucrReceiverStartRainStatus.frmParent = Nothing + Me.ucrReceiverStartRainStatus.Location = New System.Drawing.Point(264, 343) + Me.ucrReceiverStartRainStatus.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStartRainStatus.Name = "ucrReceiverStartRainStatus" + Me.ucrReceiverStartRainStatus.Selector = Nothing + Me.ucrReceiverStartRainStatus.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverStartRainStatus.strNcFilePath = "" + Me.ucrReceiverStartRainStatus.TabIndex = 28 + Me.ucrReceiverStartRainStatus.ucrSelector = Nothing + ' + 'ucrReceiverEndRainStatus + ' + Me.ucrReceiverEndRainStatus.AutoSize = True + Me.ucrReceiverEndRainStatus.frmParent = Nothing + Me.ucrReceiverEndRainStatus.Location = New System.Drawing.Point(264, 383) + Me.ucrReceiverEndRainStatus.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEndRainStatus.Name = "ucrReceiverEndRainStatus" + Me.ucrReceiverEndRainStatus.Selector = Nothing + Me.ucrReceiverEndRainStatus.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverEndRainStatus.strNcFilePath = "" + Me.ucrReceiverEndRainStatus.TabIndex = 30 + Me.ucrReceiverEndRainStatus.ucrSelector = Nothing + ' + 'ucrReceiverEndSeasonStatus + ' + Me.ucrReceiverEndSeasonStatus.AutoSize = True + Me.ucrReceiverEndSeasonStatus.frmParent = Nothing + Me.ucrReceiverEndSeasonStatus.Location = New System.Drawing.Point(261, 422) + Me.ucrReceiverEndSeasonStatus.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEndSeasonStatus.Name = "ucrReceiverEndSeasonStatus" + Me.ucrReceiverEndSeasonStatus.Selector = Nothing + Me.ucrReceiverEndSeasonStatus.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverEndSeasonStatus.strNcFilePath = "" + Me.ucrReceiverEndSeasonStatus.TabIndex = 32 + Me.ucrReceiverEndSeasonStatus.ucrSelector = Nothing + ' + 'ucrReceiverRainDaysYear + ' + Me.ucrReceiverRainDaysYear.AutoSize = True + Me.ucrReceiverRainDaysYear.frmParent = Nothing + Me.ucrReceiverRainDaysYear.Location = New System.Drawing.Point(264, 101) + Me.ucrReceiverRainDaysYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverRainDaysYear.Name = "ucrReceiverRainDaysYear" + Me.ucrReceiverRainDaysYear.Selector = Nothing + Me.ucrReceiverRainDaysYear.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverRainDaysYear.strNcFilePath = "" + Me.ucrReceiverRainDaysYear.TabIndex = 16 + Me.ucrReceiverRainDaysYear.ucrSelector = Nothing + ' + 'ucrReceiverStartRainDate + ' + Me.ucrReceiverStartRainDate.AutoSize = True + Me.ucrReceiverStartRainDate.frmParent = Nothing + Me.ucrReceiverStartRainDate.Location = New System.Drawing.Point(9, 333) + Me.ucrReceiverStartRainDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStartRainDate.Name = "ucrReceiverStartRainDate" + Me.ucrReceiverStartRainDate.Selector = Nothing + Me.ucrReceiverStartRainDate.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverStartRainDate.strNcFilePath = "" + Me.ucrReceiverStartRainDate.TabIndex = 8 + Me.ucrReceiverStartRainDate.ucrSelector = Nothing + ' + 'ucrReceiverStartRainDOY + ' + Me.ucrReceiverStartRainDOY.AutoSize = True + Me.ucrReceiverStartRainDOY.frmParent = Nothing + Me.ucrReceiverStartRainDOY.Location = New System.Drawing.Point(9, 292) + Me.ucrReceiverStartRainDOY.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStartRainDOY.Name = "ucrReceiverStartRainDOY" + Me.ucrReceiverStartRainDOY.Selector = Nothing + Me.ucrReceiverStartRainDOY.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverStartRainDOY.strNcFilePath = "" + Me.ucrReceiverStartRainDOY.TabIndex = 6 + Me.ucrReceiverStartRainDOY.ucrSelector = Nothing + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.AutoSize = True + Me.ucrReceiverYear.frmParent = Nothing + Me.ucrReceiverYear.Location = New System.Drawing.Point(9, 248) + 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, 25) + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.TabIndex = 4 + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.AutoSize = True + Me.ucrReceiverStation.frmParent = Nothing + Me.ucrReceiverStation.Location = New System.Drawing.Point(11, 204) + 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, 25) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 2 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverEndSeasonDate + ' + Me.ucrReceiverEndSeasonDate.AutoSize = True + Me.ucrReceiverEndSeasonDate.frmParent = Nothing + Me.ucrReceiverEndSeasonDate.Location = New System.Drawing.Point(264, 302) + Me.ucrReceiverEndSeasonDate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEndSeasonDate.Name = "ucrReceiverEndSeasonDate" + Me.ucrReceiverEndSeasonDate.Selector = Nothing + Me.ucrReceiverEndSeasonDate.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverEndSeasonDate.strNcFilePath = "" + Me.ucrReceiverEndSeasonDate.TabIndex = 26 + Me.ucrReceiverEndSeasonDate.ucrSelector = Nothing + ' + 'ucrReceiverEndSeasonDOY + ' + Me.ucrReceiverEndSeasonDOY.AutoSize = True + Me.ucrReceiverEndSeasonDOY.frmParent = Nothing + Me.ucrReceiverEndSeasonDOY.Location = New System.Drawing.Point(264, 263) + Me.ucrReceiverEndSeasonDOY.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEndSeasonDOY.Name = "ucrReceiverEndSeasonDOY" Me.ucrReceiverEndSeasonDOY.Selector = Nothing - Me.ucrReceiverEndSeasonDOY.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverEndSeasonDOY.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverEndSeasonDOY.strNcFilePath = "" Me.ucrReceiverEndSeasonDOY.TabIndex = 24 Me.ucrReceiverEndSeasonDOY.ucrSelector = Nothing @@ -551,11 +790,11 @@ Partial Class sdgDefineAnnualRainfall ' Me.ucrReceiverEndRainsDOY.AutoSize = True Me.ucrReceiverEndRainsDOY.frmParent = Nothing - Me.ucrReceiverEndRainsDOY.Location = New System.Drawing.Point(392, 283) + Me.ucrReceiverEndRainsDOY.Location = New System.Drawing.Point(264, 184) Me.ucrReceiverEndRainsDOY.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEndRainsDOY.Name = "ucrReceiverEndRainsDOY" Me.ucrReceiverEndRainsDOY.Selector = Nothing - Me.ucrReceiverEndRainsDOY.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverEndRainsDOY.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverEndRainsDOY.strNcFilePath = "" Me.ucrReceiverEndRainsDOY.TabIndex = 20 Me.ucrReceiverEndRainsDOY.ucrSelector = Nothing @@ -564,11 +803,11 @@ Partial Class sdgDefineAnnualRainfall ' Me.ucrReceiverEndRainsDate.AutoSize = True Me.ucrReceiverEndRainsDate.frmParent = Nothing - Me.ucrReceiverEndRainsDate.Location = New System.Drawing.Point(392, 346) + Me.ucrReceiverEndRainsDate.Location = New System.Drawing.Point(264, 225) Me.ucrReceiverEndRainsDate.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverEndRainsDate.Name = "ucrReceiverEndRainsDate" Me.ucrReceiverEndRainsDate.Selector = Nothing - Me.ucrReceiverEndRainsDate.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverEndRainsDate.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverEndRainsDate.strNcFilePath = "" Me.ucrReceiverEndRainsDate.TabIndex = 22 Me.ucrReceiverEndRainsDate.ucrSelector = Nothing @@ -577,11 +816,11 @@ Partial Class sdgDefineAnnualRainfall ' Me.ucrReceiverSeasonalLength.AutoSize = True Me.ucrReceiverSeasonalLength.frmParent = Nothing - Me.ucrReceiverSeasonalLength.Location = New System.Drawing.Point(392, 218) + Me.ucrReceiverSeasonalLength.Location = New System.Drawing.Point(264, 142) Me.ucrReceiverSeasonalLength.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSeasonalLength.Name = "ucrReceiverSeasonalLength" Me.ucrReceiverSeasonalLength.Selector = Nothing - Me.ucrReceiverSeasonalLength.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverSeasonalLength.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverSeasonalLength.strNcFilePath = "" Me.ucrReceiverSeasonalLength.TabIndex = 18 Me.ucrReceiverSeasonalLength.ucrSelector = Nothing @@ -590,11 +829,11 @@ Partial Class sdgDefineAnnualRainfall ' Me.ucrReceiverRainDaysSeason.AutoSize = True Me.ucrReceiverRainDaysSeason.frmParent = Nothing - Me.ucrReceiverRainDaysSeason.Location = New System.Drawing.Point(392, 90) + Me.ucrReceiverRainDaysSeason.Location = New System.Drawing.Point(264, 58) Me.ucrReceiverRainDaysSeason.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverRainDaysSeason.Name = "ucrReceiverRainDaysSeason" Me.ucrReceiverRainDaysSeason.Selector = Nothing - Me.ucrReceiverRainDaysSeason.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverRainDaysSeason.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverRainDaysSeason.strNcFilePath = "" Me.ucrReceiverRainDaysSeason.TabIndex = 14 Me.ucrReceiverRainDaysSeason.ucrSelector = Nothing @@ -603,11 +842,11 @@ Partial Class sdgDefineAnnualRainfall ' Me.ucrReceiverSeasonalRain.AutoSize = True Me.ucrReceiverSeasonalRain.frmParent = Nothing - Me.ucrReceiverSeasonalRain.Location = New System.Drawing.Point(14, 641) + Me.ucrReceiverSeasonalRain.Location = New System.Drawing.Point(9, 417) Me.ucrReceiverSeasonalRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSeasonalRain.Name = "ucrReceiverSeasonalRain" Me.ucrReceiverSeasonalRain.Selector = Nothing - Me.ucrReceiverSeasonalRain.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverSeasonalRain.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverSeasonalRain.strNcFilePath = "" Me.ucrReceiverSeasonalRain.TabIndex = 12 Me.ucrReceiverSeasonalRain.ucrSelector = Nothing @@ -616,11 +855,11 @@ Partial Class sdgDefineAnnualRainfall ' Me.ucrReceiverAnnualRain.AutoSize = True Me.ucrReceiverAnnualRain.frmParent = Nothing - Me.ucrReceiverAnnualRain.Location = New System.Drawing.Point(16, 573) + Me.ucrReceiverAnnualRain.Location = New System.Drawing.Point(11, 372) Me.ucrReceiverAnnualRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverAnnualRain.Name = "ucrReceiverAnnualRain" Me.ucrReceiverAnnualRain.Selector = Nothing - Me.ucrReceiverAnnualRain.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverAnnualRain.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverAnnualRain.strNcFilePath = "" Me.ucrReceiverAnnualRain.TabIndex = 10 Me.ucrReceiverAnnualRain.ucrSelector = Nothing @@ -630,94 +869,22 @@ Partial Class sdgDefineAnnualRainfall Me.ucrSelectorDefineAnnualRain.AutoSize = True Me.ucrSelectorDefineAnnualRain.bDropUnusedFilterLevels = False Me.ucrSelectorDefineAnnualRain.bShowHiddenColumns = False - Me.ucrSelectorDefineAnnualRain.bUseCurrentFilter = True - Me.ucrSelectorDefineAnnualRain.Location = New System.Drawing.Point(10, 7) - Me.ucrSelectorDefineAnnualRain.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorDefineAnnualRain.Name = "ucrSelectorDefineAnnualRain" - Me.ucrSelectorDefineAnnualRain.Size = New System.Drawing.Size(339, 293) - Me.ucrSelectorDefineAnnualRain.TabIndex = 0 - ' - 'tbCropSuccessProp - ' - Me.tbCropSuccessProp.Controls.Add(Me.lblPlantingLength) - Me.tbCropSuccessProp.Controls.Add(Me.lblPlantingDay) - Me.tbCropSuccessProp.Controls.Add(Me.lblProbSuccess) - Me.tbCropSuccessProp.Controls.Add(Me.lblTotalRain) - Me.tbCropSuccessProp.Controls.Add(Me.lblCropStation) - Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverPlantingLenghth) - Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverPropSuccess) - Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverPlantingDay) - Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverTotalRain) - Me.tbCropSuccessProp.Controls.Add(Me.ucrReceiverStationCrop) - Me.tbCropSuccessProp.Controls.Add(Me.ucrSelectorCropProp) - Me.tbCropSuccessProp.Location = New System.Drawing.Point(4, 29) - Me.tbCropSuccessProp.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbCropSuccessProp.Name = "tbCropSuccessProp" - Me.tbCropSuccessProp.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbCropSuccessProp.Size = New System.Drawing.Size(776, 695) - Me.tbCropSuccessProp.TabIndex = 1 - Me.tbCropSuccessProp.Text = "Crop Success Prop" - Me.tbCropSuccessProp.UseVisualStyleBackColor = True - ' - 'lblPlantingLength - ' - Me.lblPlantingLength.AutoSize = True - Me.lblPlantingLength.Location = New System.Drawing.Point(378, 211) - Me.lblPlantingLength.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblPlantingLength.Name = "lblPlantingLength" - Me.lblPlantingLength.Size = New System.Drawing.Size(124, 20) - Me.lblPlantingLength.TabIndex = 7 - Me.lblPlantingLength.Text = "Planting Length:" - ' - 'lblPlantingDay - ' - Me.lblPlantingDay.AutoSize = True - Me.lblPlantingDay.Location = New System.Drawing.Point(368, 146) - Me.lblPlantingDay.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblPlantingDay.Name = "lblPlantingDay" - Me.lblPlantingDay.Size = New System.Drawing.Size(102, 20) - Me.lblPlantingDay.TabIndex = 5 - Me.lblPlantingDay.Text = "Planting Day:" - ' - 'lblProbSuccess - ' - Me.lblProbSuccess.AutoSize = True - Me.lblProbSuccess.Location = New System.Drawing.Point(376, 271) - Me.lblProbSuccess.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblProbSuccess.Name = "lblProbSuccess" - Me.lblProbSuccess.Size = New System.Drawing.Size(173, 20) - Me.lblProbSuccess.TabIndex = 9 - Me.lblProbSuccess.Text = "Proportion of Success :" - ' - 'lblTotalRain - ' - Me.lblTotalRain.AutoSize = True - Me.lblTotalRain.Location = New System.Drawing.Point(374, 83) - Me.lblTotalRain.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblTotalRain.Name = "lblTotalRain" - Me.lblTotalRain.Size = New System.Drawing.Size(85, 20) - Me.lblTotalRain.TabIndex = 3 - Me.lblTotalRain.Text = "Total Rain:" - ' - 'lblCropStation - ' - Me.lblCropStation.AutoSize = True - Me.lblCropStation.Location = New System.Drawing.Point(372, 17) - Me.lblCropStation.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblCropStation.Name = "lblCropStation" - Me.lblCropStation.Size = New System.Drawing.Size(64, 20) - Me.lblCropStation.TabIndex = 1 - Me.lblCropStation.Text = "Station:" + Me.ucrSelectorDefineAnnualRain.bUseCurrentFilter = True + Me.ucrSelectorDefineAnnualRain.Location = New System.Drawing.Point(7, 5) + Me.ucrSelectorDefineAnnualRain.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDefineAnnualRain.Name = "ucrSelectorDefineAnnualRain" + Me.ucrSelectorDefineAnnualRain.Size = New System.Drawing.Size(226, 190) + Me.ucrSelectorDefineAnnualRain.TabIndex = 0 ' 'ucrReceiverPlantingLenghth ' Me.ucrReceiverPlantingLenghth.AutoSize = True - Me.ucrReceiverPlantingLenghth.frmParent = Nothing - Me.ucrReceiverPlantingLenghth.Location = New System.Drawing.Point(375, 235) + Me.ucrReceiverPlantingLenghth.frmParent = Me + Me.ucrReceiverPlantingLenghth.Location = New System.Drawing.Point(248, 153) Me.ucrReceiverPlantingLenghth.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPlantingLenghth.Name = "ucrReceiverPlantingLenghth" Me.ucrReceiverPlantingLenghth.Selector = Nothing - Me.ucrReceiverPlantingLenghth.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverPlantingLenghth.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverPlantingLenghth.strNcFilePath = "" Me.ucrReceiverPlantingLenghth.TabIndex = 8 Me.ucrReceiverPlantingLenghth.ucrSelector = Nothing @@ -725,12 +892,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverPropSuccess ' Me.ucrReceiverPropSuccess.AutoSize = True - Me.ucrReceiverPropSuccess.frmParent = Nothing - Me.ucrReceiverPropSuccess.Location = New System.Drawing.Point(374, 298) + Me.ucrReceiverPropSuccess.frmParent = Me + Me.ucrReceiverPropSuccess.Location = New System.Drawing.Point(248, 194) Me.ucrReceiverPropSuccess.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPropSuccess.Name = "ucrReceiverPropSuccess" Me.ucrReceiverPropSuccess.Selector = Nothing - Me.ucrReceiverPropSuccess.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverPropSuccess.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverPropSuccess.strNcFilePath = "" Me.ucrReceiverPropSuccess.TabIndex = 10 Me.ucrReceiverPropSuccess.ucrSelector = Nothing @@ -738,12 +905,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverPlantingDay ' Me.ucrReceiverPlantingDay.AutoSize = True - Me.ucrReceiverPlantingDay.frmParent = Nothing - Me.ucrReceiverPlantingDay.Location = New System.Drawing.Point(372, 175) + Me.ucrReceiverPlantingDay.frmParent = Me + Me.ucrReceiverPlantingDay.Location = New System.Drawing.Point(248, 114) Me.ucrReceiverPlantingDay.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPlantingDay.Name = "ucrReceiverPlantingDay" Me.ucrReceiverPlantingDay.Selector = Nothing - Me.ucrReceiverPlantingDay.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverPlantingDay.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverPlantingDay.strNcFilePath = "" Me.ucrReceiverPlantingDay.TabIndex = 6 Me.ucrReceiverPlantingDay.ucrSelector = Nothing @@ -751,12 +918,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverTotalRain ' Me.ucrReceiverTotalRain.AutoSize = True - Me.ucrReceiverTotalRain.frmParent = Nothing - Me.ucrReceiverTotalRain.Location = New System.Drawing.Point(370, 109) + Me.ucrReceiverTotalRain.frmParent = Me + Me.ucrReceiverTotalRain.Location = New System.Drawing.Point(248, 71) Me.ucrReceiverTotalRain.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverTotalRain.Name = "ucrReceiverTotalRain" Me.ucrReceiverTotalRain.Selector = Nothing - Me.ucrReceiverTotalRain.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverTotalRain.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverTotalRain.strNcFilePath = "" Me.ucrReceiverTotalRain.TabIndex = 4 Me.ucrReceiverTotalRain.ucrSelector = Nothing @@ -764,12 +931,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverStationCrop ' Me.ucrReceiverStationCrop.AutoSize = True - Me.ucrReceiverStationCrop.frmParent = Nothing - Me.ucrReceiverStationCrop.Location = New System.Drawing.Point(369, 43) + Me.ucrReceiverStationCrop.frmParent = Me + Me.ucrReceiverStationCrop.Location = New System.Drawing.Point(248, 28) Me.ucrReceiverStationCrop.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverStationCrop.Name = "ucrReceiverStationCrop" Me.ucrReceiverStationCrop.Selector = Nothing - Me.ucrReceiverStationCrop.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverStationCrop.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverStationCrop.strNcFilePath = "" Me.ucrReceiverStationCrop.TabIndex = 2 Me.ucrReceiverStationCrop.ucrSelector = Nothing @@ -780,71 +947,21 @@ Partial Class sdgDefineAnnualRainfall Me.ucrSelectorCropProp.bDropUnusedFilterLevels = False Me.ucrSelectorCropProp.bShowHiddenColumns = False Me.ucrSelectorCropProp.bUseCurrentFilter = True - Me.ucrSelectorCropProp.Location = New System.Drawing.Point(16, 12) + Me.ucrSelectorCropProp.Location = New System.Drawing.Point(11, 8) Me.ucrSelectorCropProp.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorCropProp.Name = "ucrSelectorCropProp" - Me.ucrSelectorCropProp.Size = New System.Drawing.Size(339, 412) + Me.ucrSelectorCropProp.Size = New System.Drawing.Size(226, 268) Me.ucrSelectorCropProp.TabIndex = 0 ' - 'tbSeasonStartProb - ' - Me.tbSeasonStartProb.Controls.Add(Me.lblPlantingDayCond) - Me.tbSeasonStartProb.Controls.Add(Me.lblSeasonPlantingDay) - Me.tbSeasonStartProb.Controls.Add(Me.lblSeasonYear) - Me.tbSeasonStartProb.Controls.Add(Me.lblStationSeasonProb) - Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverPlantingDayCondition) - Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverSeasonPlantingDay) - Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverSeasonYear) - Me.tbSeasonStartProb.Controls.Add(Me.ucrReceiverSeasonStationProb) - Me.tbSeasonStartProb.Controls.Add(Me.ucrSelectorSeasonStartProp) - Me.tbSeasonStartProb.Location = New System.Drawing.Point(4, 29) - Me.tbSeasonStartProb.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbSeasonStartProb.Name = "tbSeasonStartProb" - Me.tbSeasonStartProb.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbSeasonStartProb.Size = New System.Drawing.Size(776, 695) - Me.tbSeasonStartProb.TabIndex = 2 - Me.tbSeasonStartProb.Text = "Season Start Prob" - Me.tbSeasonStartProb.UseVisualStyleBackColor = True - ' - 'lblPlantingDayCond - ' - Me.lblPlantingDayCond.AutoSize = True - Me.lblPlantingDayCond.Location = New System.Drawing.Point(381, 214) - Me.lblPlantingDayCond.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblPlantingDayCond.Name = "lblPlantingDayCond" - Me.lblPlantingDayCond.Size = New System.Drawing.Size(173, 20) - Me.lblPlantingDayCond.TabIndex = 7 - Me.lblPlantingDayCond.Text = "Planting Day Condition:" - ' - 'lblSeasonYear - ' - Me.lblSeasonYear.AutoSize = True - Me.lblSeasonYear.Location = New System.Drawing.Point(376, 86) - Me.lblSeasonYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblSeasonYear.Name = "lblSeasonYear" - Me.lblSeasonYear.Size = New System.Drawing.Size(47, 20) - Me.lblSeasonYear.TabIndex = 3 - Me.lblSeasonYear.Text = "Year:" - ' - 'lblStationSeasonProb - ' - Me.lblStationSeasonProb.AutoSize = True - Me.lblStationSeasonProb.Location = New System.Drawing.Point(375, 20) - Me.lblStationSeasonProb.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblStationSeasonProb.Name = "lblStationSeasonProb" - Me.lblStationSeasonProb.Size = New System.Drawing.Size(64, 20) - Me.lblStationSeasonProb.TabIndex = 1 - Me.lblStationSeasonProb.Text = "Station:" - ' 'ucrReceiverPlantingDayCondition ' Me.ucrReceiverPlantingDayCondition.AutoSize = True - Me.ucrReceiverPlantingDayCondition.frmParent = Nothing - Me.ucrReceiverPlantingDayCondition.Location = New System.Drawing.Point(378, 238) + Me.ucrReceiverPlantingDayCondition.frmParent = Me + Me.ucrReceiverPlantingDayCondition.Location = New System.Drawing.Point(250, 155) Me.ucrReceiverPlantingDayCondition.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverPlantingDayCondition.Name = "ucrReceiverPlantingDayCondition" Me.ucrReceiverPlantingDayCondition.Selector = Nothing - Me.ucrReceiverPlantingDayCondition.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverPlantingDayCondition.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverPlantingDayCondition.strNcFilePath = "" Me.ucrReceiverPlantingDayCondition.TabIndex = 8 Me.ucrReceiverPlantingDayCondition.ucrSelector = Nothing @@ -852,12 +969,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverSeasonPlantingDay ' Me.ucrReceiverSeasonPlantingDay.AutoSize = True - Me.ucrReceiverSeasonPlantingDay.frmParent = Nothing - Me.ucrReceiverSeasonPlantingDay.Location = New System.Drawing.Point(375, 178) + Me.ucrReceiverSeasonPlantingDay.frmParent = Me + Me.ucrReceiverSeasonPlantingDay.Location = New System.Drawing.Point(250, 116) Me.ucrReceiverSeasonPlantingDay.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSeasonPlantingDay.Name = "ucrReceiverSeasonPlantingDay" Me.ucrReceiverSeasonPlantingDay.Selector = Nothing - Me.ucrReceiverSeasonPlantingDay.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverSeasonPlantingDay.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverSeasonPlantingDay.strNcFilePath = "" Me.ucrReceiverSeasonPlantingDay.TabIndex = 6 Me.ucrReceiverSeasonPlantingDay.ucrSelector = Nothing @@ -865,12 +982,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverSeasonYear ' Me.ucrReceiverSeasonYear.AutoSize = True - Me.ucrReceiverSeasonYear.frmParent = Nothing - Me.ucrReceiverSeasonYear.Location = New System.Drawing.Point(374, 112) + Me.ucrReceiverSeasonYear.frmParent = Me + Me.ucrReceiverSeasonYear.Location = New System.Drawing.Point(250, 73) Me.ucrReceiverSeasonYear.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSeasonYear.Name = "ucrReceiverSeasonYear" Me.ucrReceiverSeasonYear.Selector = Nothing - Me.ucrReceiverSeasonYear.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverSeasonYear.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverSeasonYear.strNcFilePath = "" Me.ucrReceiverSeasonYear.TabIndex = 4 Me.ucrReceiverSeasonYear.ucrSelector = Nothing @@ -878,133 +995,37 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverSeasonStationProb ' Me.ucrReceiverSeasonStationProb.AutoSize = True - Me.ucrReceiverSeasonStationProb.frmParent = Nothing - Me.ucrReceiverSeasonStationProb.Location = New System.Drawing.Point(372, 46) + Me.ucrReceiverSeasonStationProb.frmParent = Me + Me.ucrReceiverSeasonStationProb.Location = New System.Drawing.Point(250, 30) Me.ucrReceiverSeasonStationProb.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSeasonStationProb.Name = "ucrReceiverSeasonStationProb" Me.ucrReceiverSeasonStationProb.Selector = Nothing - Me.ucrReceiverSeasonStationProb.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverSeasonStationProb.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverSeasonStationProb.strNcFilePath = "" Me.ucrReceiverSeasonStationProb.TabIndex = 2 Me.ucrReceiverSeasonStationProb.ucrSelector = Nothing ' - 'tbAnnualTempSummaries - ' - Me.tbAnnualTempSummaries.Controls.Add(Me.lblMinMinAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblMeanAnnualTemp) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblMaxMinAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblAnnualTempYear) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblAnnualTempStation) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblMaxMaxAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblMinMaxAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.lblMeanMaxAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMinMinAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMaxMaxAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMeanMaxAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMinMaxAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMaxMinAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverMeanAnnual) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverAnnualTempYr) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrReceiverAnnualTempStation) - Me.tbAnnualTempSummaries.Controls.Add(Me.ucrSelectorAnnualTemp) - Me.tbAnnualTempSummaries.Location = New System.Drawing.Point(4, 29) - Me.tbAnnualTempSummaries.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbAnnualTempSummaries.Name = "tbAnnualTempSummaries" - Me.tbAnnualTempSummaries.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbAnnualTempSummaries.Size = New System.Drawing.Size(776, 695) - Me.tbAnnualTempSummaries.TabIndex = 3 - Me.tbAnnualTempSummaries.Text = "Annual Temperature" - Me.tbAnnualTempSummaries.UseVisualStyleBackColor = True - ' - 'lblMinMinAnnual - ' - Me.lblMinMinAnnual.AutoSize = True - Me.lblMinMinAnnual.Location = New System.Drawing.Point(374, 208) - Me.lblMinMinAnnual.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMinMinAnnual.Name = "lblMinMinAnnual" - Me.lblMinMinAnnual.Size = New System.Drawing.Size(145, 20) - Me.lblMinMinAnnual.TabIndex = 7 - Me.lblMinMinAnnual.Text = "Min Minimum Temp" - ' - 'lblMeanAnnualTemp - ' - Me.lblMeanAnnualTemp.AutoSize = True - Me.lblMeanAnnualTemp.Location = New System.Drawing.Point(368, 143) - Me.lblMeanAnnualTemp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMeanAnnualTemp.Name = "lblMeanAnnualTemp" - Me.lblMeanAnnualTemp.Size = New System.Drawing.Size(160, 20) - Me.lblMeanAnnualTemp.TabIndex = 5 - Me.lblMeanAnnualTemp.Text = "Mean Minimum Temp" - ' - 'lblMaxMinAnnual - ' - Me.lblMaxMinAnnual.AutoSize = True - Me.lblMaxMinAnnual.Location = New System.Drawing.Point(376, 268) - Me.lblMaxMinAnnual.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMaxMinAnnual.Name = "lblMaxMinAnnual" - Me.lblMaxMinAnnual.Size = New System.Drawing.Size(149, 20) - Me.lblMaxMinAnnual.TabIndex = 9 - Me.lblMaxMinAnnual.Text = "Max Minimum Temp" - ' - 'lblAnnualTempYear - ' - Me.lblAnnualTempYear.AutoSize = True - Me.lblAnnualTempYear.Location = New System.Drawing.Point(374, 80) - Me.lblAnnualTempYear.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblAnnualTempYear.Name = "lblAnnualTempYear" - Me.lblAnnualTempYear.Size = New System.Drawing.Size(47, 20) - Me.lblAnnualTempYear.TabIndex = 3 - Me.lblAnnualTempYear.Text = "Year:" - ' - 'lblAnnualTempStation - ' - Me.lblAnnualTempStation.AutoSize = True - Me.lblAnnualTempStation.Location = New System.Drawing.Point(372, 14) - Me.lblAnnualTempStation.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblAnnualTempStation.Name = "lblAnnualTempStation" - Me.lblAnnualTempStation.Size = New System.Drawing.Size(64, 20) - Me.lblAnnualTempStation.TabIndex = 1 - Me.lblAnnualTempStation.Text = "Station:" - ' - 'lblMaxMaxAnnual - ' - Me.lblMaxMaxAnnual.AutoSize = True - Me.lblMaxMaxAnnual.Location = New System.Drawing.Point(382, 454) - Me.lblMaxMaxAnnual.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMaxMaxAnnual.Name = "lblMaxMaxAnnual" - Me.lblMaxMaxAnnual.Size = New System.Drawing.Size(153, 20) - Me.lblMaxMaxAnnual.TabIndex = 15 - Me.lblMaxMaxAnnual.Text = "Max Maximum Temp" - ' - 'lblMinMaxAnnual - ' - Me.lblMinMaxAnnual.AutoSize = True - Me.lblMinMaxAnnual.Location = New System.Drawing.Point(381, 389) - Me.lblMinMaxAnnual.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMinMaxAnnual.Name = "lblMinMaxAnnual" - Me.lblMinMaxAnnual.Size = New System.Drawing.Size(153, 20) - Me.lblMinMaxAnnual.TabIndex = 13 - Me.lblMinMaxAnnual.Text = "Min Maximum Temp:" - ' - 'lblMeanMaxAnnual + 'ucrSelectorSeasonStartProp ' - Me.lblMeanMaxAnnual.AutoSize = True - Me.lblMeanMaxAnnual.Location = New System.Drawing.Point(381, 329) - Me.lblMeanMaxAnnual.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMeanMaxAnnual.Name = "lblMeanMaxAnnual" - Me.lblMeanMaxAnnual.Size = New System.Drawing.Size(164, 20) - Me.lblMeanMaxAnnual.TabIndex = 11 - Me.lblMeanMaxAnnual.Text = "Mean Maximum Temp" + Me.ucrSelectorSeasonStartProp.AutoSize = True + Me.ucrSelectorSeasonStartProp.bDropUnusedFilterLevels = False + Me.ucrSelectorSeasonStartProp.bShowHiddenColumns = False + Me.ucrSelectorSeasonStartProp.bUseCurrentFilter = True + Me.ucrSelectorSeasonStartProp.Location = New System.Drawing.Point(13, 10) + Me.ucrSelectorSeasonStartProp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorSeasonStartProp.Name = "ucrSelectorSeasonStartProp" + Me.ucrSelectorSeasonStartProp.Size = New System.Drawing.Size(226, 268) + Me.ucrSelectorSeasonStartProp.TabIndex = 0 ' 'ucrReceiverMinMinAnnual ' Me.ucrReceiverMinMinAnnual.AutoSize = True - Me.ucrReceiverMinMinAnnual.frmParent = Nothing - Me.ucrReceiverMinMinAnnual.Location = New System.Drawing.Point(375, 232) + Me.ucrReceiverMinMinAnnual.frmParent = Me + Me.ucrReceiverMinMinAnnual.Location = New System.Drawing.Point(248, 151) Me.ucrReceiverMinMinAnnual.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinMinAnnual.Name = "ucrReceiverMinMinAnnual" Me.ucrReceiverMinMinAnnual.Selector = Nothing - Me.ucrReceiverMinMinAnnual.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMinMinAnnual.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMinMinAnnual.strNcFilePath = "" Me.ucrReceiverMinMinAnnual.TabIndex = 8 Me.ucrReceiverMinMinAnnual.ucrSelector = Nothing @@ -1012,12 +1033,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMaxMaxAnnual ' Me.ucrReceiverMaxMaxAnnual.AutoSize = True - Me.ucrReceiverMaxMaxAnnual.frmParent = Nothing - Me.ucrReceiverMaxMaxAnnual.Location = New System.Drawing.Point(381, 474) + Me.ucrReceiverMaxMaxAnnual.frmParent = Me + Me.ucrReceiverMaxMaxAnnual.Location = New System.Drawing.Point(248, 308) Me.ucrReceiverMaxMaxAnnual.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMaxMaxAnnual.Name = "ucrReceiverMaxMaxAnnual" Me.ucrReceiverMaxMaxAnnual.Selector = Nothing - Me.ucrReceiverMaxMaxAnnual.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMaxMaxAnnual.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMaxMaxAnnual.strNcFilePath = "" Me.ucrReceiverMaxMaxAnnual.TabIndex = 16 Me.ucrReceiverMaxMaxAnnual.ucrSelector = Nothing @@ -1025,12 +1046,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMeanMaxAnnual ' Me.ucrReceiverMeanMaxAnnual.AutoSize = True - Me.ucrReceiverMeanMaxAnnual.frmParent = Nothing - Me.ucrReceiverMeanMaxAnnual.Location = New System.Drawing.Point(380, 355) + Me.ucrReceiverMeanMaxAnnual.frmParent = Me + Me.ucrReceiverMeanMaxAnnual.Location = New System.Drawing.Point(248, 231) Me.ucrReceiverMeanMaxAnnual.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMeanMaxAnnual.Name = "ucrReceiverMeanMaxAnnual" Me.ucrReceiverMeanMaxAnnual.Selector = Nothing - Me.ucrReceiverMeanMaxAnnual.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMeanMaxAnnual.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMeanMaxAnnual.strNcFilePath = "" Me.ucrReceiverMeanMaxAnnual.TabIndex = 12 Me.ucrReceiverMeanMaxAnnual.ucrSelector = Nothing @@ -1038,12 +1059,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMinMaxAnnual ' Me.ucrReceiverMinMaxAnnual.AutoSize = True - Me.ucrReceiverMinMaxAnnual.frmParent = Nothing - Me.ucrReceiverMinMaxAnnual.Location = New System.Drawing.Point(376, 417) + Me.ucrReceiverMinMaxAnnual.frmParent = Me + Me.ucrReceiverMinMaxAnnual.Location = New System.Drawing.Point(248, 271) Me.ucrReceiverMinMaxAnnual.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinMaxAnnual.Name = "ucrReceiverMinMaxAnnual" Me.ucrReceiverMinMaxAnnual.Selector = Nothing - Me.ucrReceiverMinMaxAnnual.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMinMaxAnnual.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMinMaxAnnual.strNcFilePath = "" Me.ucrReceiverMinMaxAnnual.TabIndex = 14 Me.ucrReceiverMinMaxAnnual.ucrSelector = Nothing @@ -1051,12 +1072,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMaxMinAnnual ' Me.ucrReceiverMaxMinAnnual.AutoSize = True - Me.ucrReceiverMaxMinAnnual.frmParent = Nothing - Me.ucrReceiverMaxMinAnnual.Location = New System.Drawing.Point(374, 295) + Me.ucrReceiverMaxMinAnnual.frmParent = Me + Me.ucrReceiverMaxMinAnnual.Location = New System.Drawing.Point(248, 192) Me.ucrReceiverMaxMinAnnual.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMaxMinAnnual.Name = "ucrReceiverMaxMinAnnual" Me.ucrReceiverMaxMinAnnual.Selector = Nothing - Me.ucrReceiverMaxMinAnnual.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMaxMinAnnual.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMaxMinAnnual.strNcFilePath = "" Me.ucrReceiverMaxMinAnnual.TabIndex = 10 Me.ucrReceiverMaxMinAnnual.ucrSelector = Nothing @@ -1064,12 +1085,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMeanAnnual ' Me.ucrReceiverMeanAnnual.AutoSize = True - Me.ucrReceiverMeanAnnual.frmParent = Nothing - Me.ucrReceiverMeanAnnual.Location = New System.Drawing.Point(372, 172) + Me.ucrReceiverMeanAnnual.frmParent = Me + Me.ucrReceiverMeanAnnual.Location = New System.Drawing.Point(248, 112) Me.ucrReceiverMeanAnnual.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMeanAnnual.Name = "ucrReceiverMeanAnnual" Me.ucrReceiverMeanAnnual.Selector = Nothing - Me.ucrReceiverMeanAnnual.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMeanAnnual.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMeanAnnual.strNcFilePath = "" Me.ucrReceiverMeanAnnual.TabIndex = 6 Me.ucrReceiverMeanAnnual.ucrSelector = Nothing @@ -1077,12 +1098,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverAnnualTempYr ' Me.ucrReceiverAnnualTempYr.AutoSize = True - Me.ucrReceiverAnnualTempYr.frmParent = Nothing - Me.ucrReceiverAnnualTempYr.Location = New System.Drawing.Point(370, 106) + Me.ucrReceiverAnnualTempYr.frmParent = Me + Me.ucrReceiverAnnualTempYr.Location = New System.Drawing.Point(248, 69) Me.ucrReceiverAnnualTempYr.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverAnnualTempYr.Name = "ucrReceiverAnnualTempYr" Me.ucrReceiverAnnualTempYr.Selector = Nothing - Me.ucrReceiverAnnualTempYr.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverAnnualTempYr.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverAnnualTempYr.strNcFilePath = "" Me.ucrReceiverAnnualTempYr.TabIndex = 4 Me.ucrReceiverAnnualTempYr.ucrSelector = Nothing @@ -1090,12 +1111,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverAnnualTempStation ' Me.ucrReceiverAnnualTempStation.AutoSize = True - Me.ucrReceiverAnnualTempStation.frmParent = Nothing - Me.ucrReceiverAnnualTempStation.Location = New System.Drawing.Point(369, 40) + Me.ucrReceiverAnnualTempStation.frmParent = Me + Me.ucrReceiverAnnualTempStation.Location = New System.Drawing.Point(248, 26) Me.ucrReceiverAnnualTempStation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverAnnualTempStation.Name = "ucrReceiverAnnualTempStation" Me.ucrReceiverAnnualTempStation.Selector = Nothing - Me.ucrReceiverAnnualTempStation.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverAnnualTempStation.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverAnnualTempStation.strNcFilePath = "" Me.ucrReceiverAnnualTempStation.TabIndex = 2 Me.ucrReceiverAnnualTempStation.ucrSelector = Nothing @@ -1106,141 +1127,21 @@ Partial Class sdgDefineAnnualRainfall Me.ucrSelectorAnnualTemp.bDropUnusedFilterLevels = False Me.ucrSelectorAnnualTemp.bShowHiddenColumns = False Me.ucrSelectorAnnualTemp.bUseCurrentFilter = True - Me.ucrSelectorAnnualTemp.Location = New System.Drawing.Point(16, 9) + Me.ucrSelectorAnnualTemp.Location = New System.Drawing.Point(11, 6) Me.ucrSelectorAnnualTemp.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorAnnualTemp.Name = "ucrSelectorAnnualTemp" - Me.ucrSelectorAnnualTemp.Size = New System.Drawing.Size(339, 412) + Me.ucrSelectorAnnualTemp.Size = New System.Drawing.Size(226, 268) Me.ucrSelectorAnnualTemp.TabIndex = 0 ' - 'tbMonthlyTemp - ' - Me.tbMonthlyTemp.Controls.Add(Me.lblMonth) - Me.tbMonthlyTemp.Controls.Add(Me.lblMinMInMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.lblMeanMinMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.lblMaxMinMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.lblYearMonthTemp) - Me.tbMonthlyTemp.Controls.Add(Me.lblStationMonthTemp) - Me.tbMonthlyTemp.Controls.Add(Me.lblMaxMaxMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.lblMinMaxMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.lblMeanMaxMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMonthMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMinMinMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMaxMaxMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMeanmaxMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMinMaxMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMaxMinMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMeanminMontly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverYearMonthly) - Me.tbMonthlyTemp.Controls.Add(Me.ucrReceiverMonthlyTemp) - Me.tbMonthlyTemp.Controls.Add(Me.ucrSelecetorMonthlyTemp) - Me.tbMonthlyTemp.Location = New System.Drawing.Point(4, 29) - Me.tbMonthlyTemp.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbMonthlyTemp.Name = "tbMonthlyTemp" - Me.tbMonthlyTemp.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.tbMonthlyTemp.Size = New System.Drawing.Size(776, 695) - Me.tbMonthlyTemp.TabIndex = 4 - Me.tbMonthlyTemp.Text = "Monthly Temperature" - Me.tbMonthlyTemp.UseVisualStyleBackColor = True - ' - 'lblMonth - ' - Me.lblMonth.AutoSize = True - Me.lblMonth.Location = New System.Drawing.Point(370, 146) - 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:" - ' - 'lblMinMInMonthly - ' - Me.lblMinMInMonthly.AutoSize = True - Me.lblMinMInMonthly.Location = New System.Drawing.Point(372, 278) - Me.lblMinMInMonthly.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMinMInMonthly.Name = "lblMinMInMonthly" - Me.lblMinMInMonthly.Size = New System.Drawing.Size(145, 20) - Me.lblMinMInMonthly.TabIndex = 9 - Me.lblMinMInMonthly.Text = "Min Minimum Temp" - ' - 'lblMeanMinMonthly - ' - Me.lblMeanMinMonthly.AutoSize = True - Me.lblMeanMinMonthly.Location = New System.Drawing.Point(366, 214) - Me.lblMeanMinMonthly.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMeanMinMonthly.Name = "lblMeanMinMonthly" - Me.lblMeanMinMonthly.Size = New System.Drawing.Size(160, 20) - Me.lblMeanMinMonthly.TabIndex = 7 - Me.lblMeanMinMonthly.Text = "Mean Minimum Temp" - ' - 'lblMaxMinMonthly - ' - Me.lblMaxMinMonthly.AutoSize = True - Me.lblMaxMinMonthly.Location = New System.Drawing.Point(375, 338) - Me.lblMaxMinMonthly.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMaxMinMonthly.Name = "lblMaxMinMonthly" - Me.lblMaxMinMonthly.Size = New System.Drawing.Size(149, 20) - Me.lblMaxMinMonthly.TabIndex = 11 - Me.lblMaxMinMonthly.Text = "Max Minimum Temp" - ' - 'lblYearMonthTemp - ' - Me.lblYearMonthTemp.AutoSize = True - Me.lblYearMonthTemp.Location = New System.Drawing.Point(372, 83) - Me.lblYearMonthTemp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblYearMonthTemp.Name = "lblYearMonthTemp" - Me.lblYearMonthTemp.Size = New System.Drawing.Size(47, 20) - Me.lblYearMonthTemp.TabIndex = 3 - Me.lblYearMonthTemp.Text = "Year:" - ' - 'lblStationMonthTemp - ' - Me.lblStationMonthTemp.AutoSize = True - Me.lblStationMonthTemp.Location = New System.Drawing.Point(370, 23) - Me.lblStationMonthTemp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblStationMonthTemp.Name = "lblStationMonthTemp" - Me.lblStationMonthTemp.Size = New System.Drawing.Size(64, 20) - Me.lblStationMonthTemp.TabIndex = 1 - Me.lblStationMonthTemp.Text = "Station:" - ' - 'lblMaxMaxMonthly - ' - Me.lblMaxMaxMonthly.AutoSize = True - Me.lblMaxMaxMonthly.Location = New System.Drawing.Point(381, 525) - Me.lblMaxMaxMonthly.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMaxMaxMonthly.Name = "lblMaxMaxMonthly" - Me.lblMaxMaxMonthly.Size = New System.Drawing.Size(153, 20) - Me.lblMaxMaxMonthly.TabIndex = 17 - Me.lblMaxMaxMonthly.Text = "Max Maximum Temp" - ' - 'lblMinMaxMonthly - ' - Me.lblMinMaxMonthly.AutoSize = True - Me.lblMinMaxMonthly.Location = New System.Drawing.Point(380, 460) - Me.lblMinMaxMonthly.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMinMaxMonthly.Name = "lblMinMaxMonthly" - Me.lblMinMaxMonthly.Size = New System.Drawing.Size(153, 20) - Me.lblMinMaxMonthly.TabIndex = 15 - Me.lblMinMaxMonthly.Text = "Min Maximum Temp:" - ' - 'lblMeanMaxMonthly - ' - Me.lblMeanMaxMonthly.AutoSize = True - Me.lblMeanMaxMonthly.Location = New System.Drawing.Point(380, 400) - Me.lblMeanMaxMonthly.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblMeanMaxMonthly.Name = "lblMeanMaxMonthly" - Me.lblMeanMaxMonthly.Size = New System.Drawing.Size(164, 20) - Me.lblMeanMaxMonthly.TabIndex = 13 - Me.lblMeanMaxMonthly.Text = "Mean Maximum Temp" - ' 'ucrReceiverMonthMonthly ' Me.ucrReceiverMonthMonthly.AutoSize = True - Me.ucrReceiverMonthMonthly.frmParent = Nothing - Me.ucrReceiverMonthMonthly.Location = New System.Drawing.Point(368, 172) + Me.ucrReceiverMonthMonthly.frmParent = Me + Me.ucrReceiverMonthMonthly.Location = New System.Drawing.Point(247, 112) Me.ucrReceiverMonthMonthly.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMonthMonthly.Name = "ucrReceiverMonthMonthly" Me.ucrReceiverMonthMonthly.Selector = Nothing - Me.ucrReceiverMonthMonthly.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMonthMonthly.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMonthMonthly.strNcFilePath = "" Me.ucrReceiverMonthMonthly.TabIndex = 6 Me.ucrReceiverMonthMonthly.ucrSelector = Nothing @@ -1248,12 +1149,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMinMinMonthly ' Me.ucrReceiverMinMinMonthly.AutoSize = True - Me.ucrReceiverMinMinMonthly.frmParent = Nothing - Me.ucrReceiverMinMinMonthly.Location = New System.Drawing.Point(374, 303) + Me.ucrReceiverMinMinMonthly.frmParent = Me + Me.ucrReceiverMinMinMonthly.Location = New System.Drawing.Point(247, 197) Me.ucrReceiverMinMinMonthly.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinMinMonthly.Name = "ucrReceiverMinMinMonthly" Me.ucrReceiverMinMinMonthly.Selector = Nothing - Me.ucrReceiverMinMinMonthly.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMinMinMonthly.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMinMinMonthly.strNcFilePath = "" Me.ucrReceiverMinMinMonthly.TabIndex = 10 Me.ucrReceiverMinMinMonthly.ucrSelector = Nothing @@ -1261,12 +1162,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMaxMaxMonthly ' Me.ucrReceiverMaxMaxMonthly.AutoSize = True - Me.ucrReceiverMaxMaxMonthly.frmParent = Nothing - Me.ucrReceiverMaxMaxMonthly.Location = New System.Drawing.Point(380, 545) + Me.ucrReceiverMaxMaxMonthly.frmParent = Me + Me.ucrReceiverMaxMaxMonthly.Location = New System.Drawing.Point(247, 354) Me.ucrReceiverMaxMaxMonthly.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMaxMaxMonthly.Name = "ucrReceiverMaxMaxMonthly" Me.ucrReceiverMaxMaxMonthly.Selector = Nothing - Me.ucrReceiverMaxMaxMonthly.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMaxMaxMonthly.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMaxMaxMonthly.strNcFilePath = "" Me.ucrReceiverMaxMaxMonthly.TabIndex = 18 Me.ucrReceiverMaxMaxMonthly.ucrSelector = Nothing @@ -1274,12 +1175,12 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMeanmaxMonthly ' Me.ucrReceiverMeanmaxMonthly.AutoSize = True - Me.ucrReceiverMeanmaxMonthly.frmParent = Nothing - Me.ucrReceiverMeanmaxMonthly.Location = New System.Drawing.Point(378, 426) + Me.ucrReceiverMeanmaxMonthly.frmParent = Me + Me.ucrReceiverMeanmaxMonthly.Location = New System.Drawing.Point(247, 277) Me.ucrReceiverMeanmaxMonthly.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMeanmaxMonthly.Name = "ucrReceiverMeanmaxMonthly" Me.ucrReceiverMeanmaxMonthly.Selector = Nothing - Me.ucrReceiverMeanmaxMonthly.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMeanmaxMonthly.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMeanmaxMonthly.strNcFilePath = "" Me.ucrReceiverMeanmaxMonthly.TabIndex = 14 Me.ucrReceiverMeanmaxMonthly.ucrSelector = Nothing @@ -1287,48 +1188,98 @@ Partial Class sdgDefineAnnualRainfall 'ucrReceiverMinMaxMonthly ' Me.ucrReceiverMinMaxMonthly.AutoSize = True - Me.ucrReceiverMinMaxMonthly.frmParent = Nothing - Me.ucrReceiverMinMaxMonthly.Location = New System.Drawing.Point(375, 488) + Me.ucrReceiverMinMaxMonthly.frmParent = Me + Me.ucrReceiverMinMaxMonthly.Location = New System.Drawing.Point(247, 317) Me.ucrReceiverMinMaxMonthly.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMinMaxMonthly.Name = "ucrReceiverMinMaxMonthly" Me.ucrReceiverMinMaxMonthly.Selector = Nothing - Me.ucrReceiverMinMaxMonthly.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMinMaxMonthly.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMinMaxMonthly.strNcFilePath = "" Me.ucrReceiverMinMaxMonthly.TabIndex = 16 Me.ucrReceiverMinMaxMonthly.ucrSelector = Nothing ' + 'ucrReceiverMaxMinMonthly + ' + Me.ucrReceiverMaxMinMonthly.AutoSize = True + Me.ucrReceiverMaxMinMonthly.frmParent = Me + Me.ucrReceiverMaxMinMonthly.Location = New System.Drawing.Point(247, 238) + Me.ucrReceiverMaxMinMonthly.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMaxMinMonthly.Name = "ucrReceiverMaxMinMonthly" + Me.ucrReceiverMaxMinMonthly.Selector = Nothing + Me.ucrReceiverMaxMinMonthly.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverMaxMinMonthly.strNcFilePath = "" + Me.ucrReceiverMaxMinMonthly.TabIndex = 12 + Me.ucrReceiverMaxMinMonthly.ucrSelector = Nothing + ' 'ucrReceiverMeanminMontly ' Me.ucrReceiverMeanminMontly.AutoSize = True - Me.ucrReceiverMeanminMontly.frmParent = Nothing - Me.ucrReceiverMeanminMontly.Location = New System.Drawing.Point(370, 243) + Me.ucrReceiverMeanminMontly.frmParent = Me + Me.ucrReceiverMeanminMontly.Location = New System.Drawing.Point(247, 158) Me.ucrReceiverMeanminMontly.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverMeanminMontly.Name = "ucrReceiverMeanminMontly" Me.ucrReceiverMeanminMontly.Selector = Nothing - Me.ucrReceiverMeanminMontly.Size = New System.Drawing.Size(180, 38) + Me.ucrReceiverMeanminMontly.Size = New System.Drawing.Size(120, 25) Me.ucrReceiverMeanminMontly.strNcFilePath = "" Me.ucrReceiverMeanminMontly.TabIndex = 8 Me.ucrReceiverMeanminMontly.ucrSelector = Nothing ' + 'ucrReceiverYearMonthly + ' + Me.ucrReceiverYearMonthly.AutoSize = True + Me.ucrReceiverYearMonthly.frmParent = Me + Me.ucrReceiverYearMonthly.Location = New System.Drawing.Point(247, 71) + Me.ucrReceiverYearMonthly.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYearMonthly.Name = "ucrReceiverYearMonthly" + Me.ucrReceiverYearMonthly.Selector = Nothing + Me.ucrReceiverYearMonthly.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverYearMonthly.strNcFilePath = "" + Me.ucrReceiverYearMonthly.TabIndex = 4 + Me.ucrReceiverYearMonthly.ucrSelector = Nothing + ' + 'ucrReceiverMonthlyTemp + ' + Me.ucrReceiverMonthlyTemp.AutoSize = True + Me.ucrReceiverMonthlyTemp.frmParent = Me + Me.ucrReceiverMonthlyTemp.Location = New System.Drawing.Point(247, 32) + Me.ucrReceiverMonthlyTemp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverMonthlyTemp.Name = "ucrReceiverMonthlyTemp" + Me.ucrReceiverMonthlyTemp.Selector = Nothing + Me.ucrReceiverMonthlyTemp.Size = New System.Drawing.Size(120, 25) + Me.ucrReceiverMonthlyTemp.strNcFilePath = "" + Me.ucrReceiverMonthlyTemp.TabIndex = 2 + Me.ucrReceiverMonthlyTemp.ucrSelector = Nothing + ' + 'ucrSelecetorMonthlyTemp + ' + Me.ucrSelecetorMonthlyTemp.AutoSize = True + Me.ucrSelecetorMonthlyTemp.bDropUnusedFilterLevels = False + Me.ucrSelecetorMonthlyTemp.bShowHiddenColumns = False + Me.ucrSelecetorMonthlyTemp.bUseCurrentFilter = True + Me.ucrSelecetorMonthlyTemp.Location = New System.Drawing.Point(10, 12) + Me.ucrSelecetorMonthlyTemp.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelecetorMonthlyTemp.Name = "ucrSelecetorMonthlyTemp" + Me.ucrSelecetorMonthlyTemp.Size = New System.Drawing.Size(226, 268) + Me.ucrSelecetorMonthlyTemp.TabIndex = 0 + ' 'ucrBase ' Me.ucrBase.AutoSize = True - Me.ucrBase.Location = New System.Drawing.Point(236, 751) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(6) + Me.ucrBase.Location = New System.Drawing.Point(157, 488) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(336, 46) + Me.ucrBase.Size = New System.Drawing.Size(224, 30) Me.ucrBase.TabIndex = 35 ' 'sdgDefineAnnualRainfall ' - 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(820, 819) + Me.ClientSize = New System.Drawing.Size(547, 456) Me.Controls.Add(Me.tbSummaries) Me.Controls.Add(Me.ucrBase) 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 = "sdgDefineAnnualRainfall" diff --git a/instat/sdgDefineAnnualRainfall.vb b/instat/sdgDefineAnnualRainfall.vb index 6c09e8f7df9..1227f25560c 100644 --- a/instat/sdgDefineAnnualRainfall.vb +++ b/instat/sdgDefineAnnualRainfall.vb @@ -15,17 +15,83 @@ ' along with this program. If not, see . Imports instat.Translations +Imports System.Text.RegularExpressions +Imports RDotNet Public Class sdgDefineAnnualRainfall - + Private isFilling As Boolean = False Public clsReforMattAnnualSummariesFunction, clsExportRinstatToBucketFunction, clsReformatCropSuccessFunction, clsReformatSeasonStartFunction, clsReformatTempSummariesFunction, clsReformatMonthlyTempSummaries As New RFunction Public clsRsyntax As New RSyntax Public bControlsInitialised As Boolean = False + Dim lstReceivers As New List(Of ucrReceiverSingle) + Dim lstReceiversCrop As New List(Of ucrReceiverSingle) + Dim lstReceiversMonthTemp As New List(Of ucrReceiverSingle) + Dim lstReceiversAnnualTemp As New List(Of ucrReceiverSingle) + Dim lstReceiversProp As New List(Of ucrReceiverSingle) + + Dim lstRecognisedTypes As New List(Of KeyValuePair(Of String, List(Of String))) + Dim lstRecognisedCropTypes As New List(Of KeyValuePair(Of String, List(Of String))) + Dim lstRecognisedPropTypes As New List(Of KeyValuePair(Of String, List(Of String))) + Dim lstRecognisedAnnTempTypes As New List(Of KeyValuePair(Of String, List(Of String))) + Dim lstRecognisedMonthTempTypes As New List(Of KeyValuePair(Of String, List(Of String))) Private Sub sdgDefineAnnualRainfall_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) + AutoFillReceivers() + AutoFillReceiversCrop() + AutoFillReceiversForAnnualTemp() + AutoFillReceiversForMonthlyTemp() + AutoFillReceiversForSeasonsStart() + End Sub Public Sub InitialiseControls() + Dim kvpAnnualRain As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("annual_rain_col", {"annual_rainfall", "annual_rain", "annual_precip", "annual_precipitation", "annual_rr", "annual_prec", "annual_prcp", "sum_rainfall", "sum_rain", "sum_precip", "sum_precipitation", "sum_rr", "sum_pre", "sum_prcp"}.ToList()) + Dim kvpSeasonalRain As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("seasonal_rain_col", {"seasonal_rainfall", "seasonal_rain", "seasonal_precip", "seasonal_precipitation", "seasonal_rr", "seasonal_prec", "seasonal_prcp"}.ToList()) + Dim kvpRainDaysYear As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("n_rain_col", {"annual_rainday", "sum_rainday"}.ToList()) + Dim kvpRainDaysSeason As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("n_seasonal_rain_col", {"seasonal_rainday"}.ToList()) + Dim kvpSeasonalLength As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("season_length_col", {"length"}.ToList()) + Dim kvpStartRainDOY As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("start_rains_doy_col", {"start_rain"}.ToList()) + Dim kvpStartRainDate As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("start_rains_date_col", {"start_rain_date"}.ToList()) + Dim kvpEndRainDOY As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("end_rains_doy_col", {"end_rains"}.ToList()) + Dim kvpEndRainDate As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("end_rains_date_col", {"end_rains_date"}.ToList()) + Dim kvpEndSeasonDOY As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("end_season_doy_col", {"end_season"}.ToList()) + Dim kvpEndSeasonDate As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("end_season_date_col", {"end_season_date"}.ToList()) + Dim kvpStartRainStatus As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("start_rains_status_column", {"start_rain_status"}.ToList()) + Dim kvpEndRainStatus As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("end_rains_status_column", {"end_rains_status"}.ToList()) + Dim kvpEndSeasonStatus As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("end_season_status_column", {"end_season_status"}.ToList()) + + Dim kvpMeanMinTemp As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("mean_tmin_col", {"mean_tmin", "mean_tn", "mean_tempmin", "mean_tmp_min", "mean_tmpmin", "mean_temperature_min", "mean_min_temperature"}.ToList()) + Dim kvpMinMinTemp As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("min_tmin_col", {"min_tmin", "min_tn", "min_tempmin", "min_tmp_min", "min_tmpmin", "min_temperature_min", "min_min_temperature"}.ToList()) + Dim kvpMaxMinTemp As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("max_tmin_col", {"max_tmin", "max_tn", "max_tempmin", "max_tmp_min", "max_tmpmin", "max_temperature_min", "max_min_temperature"}.ToList()) + Dim kvpMeanMaxTemp As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("mean_tmax_col", {"mean_tmax", "mean_tx", "mean_tempmax", "mean_tmp_max", "mean_tmpmax", "mean_temperature_max", "mean_max_temperature"}.ToList()) + Dim kvpMinMaxTemp As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("min_tmax_col", {"min_tmax", "min_tx", "min_tempmax", "min_tmp_max", "min_tmpmax", "min_temperature_max", "min_max_temperature"}.ToList()) + Dim kvpMaxMaxTemp As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("max_tmax_col", {"max_tmax", "max_tx", "max_tempmax", "max_tmp_max", "max_tmpmax", "max_temperature_max", "max_max_temperature"}.ToList()) + + Dim kvpTotalRain As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("total_rain_col", {"rain_total"}.ToList()) + Dim kvpPlantDay As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("plant_day_col", {"plant_day"}.ToList()) + Dim kvpPlantLength As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("plant_length_col", {"plant_length"}.ToList()) + Dim kvpPropSuccess As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("prop_success_col", {"prop_success"}.ToList()) + Dim kvpStationCrop As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("station", {"station", "id", "name"}.ToList()) + + Dim kvpPlantingDay As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("plant_day_col", {"plant_day"}.ToList()) + Dim kvpPlantDayCond As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("plant_day_cond_col", {"plant_day_cond"}.ToList()) + Dim kvpStationProb As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("station", {"station", "id", "name"}.ToList()) + Dim kvpYear As KeyValuePair(Of String, List(Of String)) = New KeyValuePair(Of String, List(Of String))("year", {"year", "s_year"}.ToList()) + + lstRecognisedTypes.AddRange({kvpAnnualRain, kvpEndRainDate, kvpEndRainDOY, kvpEndRainStatus, kvpEndSeasonDate, kvpEndSeasonDOY, kvpEndSeasonStatus, + kvpRainDaysSeason, kvpRainDaysYear, kvpSeasonalLength, kvpSeasonalRain, kvpStartRainDate, + kvpStartRainDOY, kvpStartRainStatus}) + lstRecognisedCropTypes.AddRange({kvpTotalRain, kvpStationCrop, kvpPlantDay, kvpPlantLength, kvpPropSuccess}) + lstRecognisedPropTypes.AddRange({kvpPlantingDay, kvpYear, kvpStationProb, kvpPlantDayCond}) + lstRecognisedMonthTempTypes.AddRange({kvpMeanMinTemp, kvpMinMinTemp, kvpMaxMinTemp, kvpMeanMaxTemp, kvpMinMaxTemp, kvpMaxMaxTemp}) + lstRecognisedAnnTempTypes.AddRange({kvpMeanMinTemp, kvpMinMinTemp, kvpMaxMinTemp, kvpMeanMaxTemp, kvpMinMaxTemp, kvpMaxMaxTemp}) + + lstReceivers.AddRange({ucrReceiverAnnualRain, ucrReceiverEndRainsDate, ucrReceiverEndRainsDOY, ucrReceiverEndRainStatus, ucrReceiverEndSeasonDate, ucrReceiverEndSeasonDOY, ucrReceiverEndSeasonStatus, ucrReceiverRainDaysSeason, ucrReceiverRainDaysYear, ucrReceiverSeasonalLength, ucrReceiverSeasonalRain, ucrReceiverStartRainDate, ucrReceiverStartRainDOY, ucrReceiverStartRainStatus}) + lstReceiversAnnualTemp.AddRange({ucrReceiverMaxMaxAnnual, ucrReceiverMaxMaxMonthly, ucrReceiverMaxMinAnnual, ucrReceiverMaxMinMonthly, ucrReceiverMeanAnnual, ucrReceiverMeanMaxAnnual, ucrReceiverMeanmaxMonthly, ucrReceiverMeanminMontly, ucrReceiverMinMaxAnnual, ucrReceiverMinMaxMonthly, ucrReceiverMinMinAnnual, ucrReceiverMinMinMonthly}) + lstReceiversMonthTemp.AddRange({ucrReceiverMaxMaxAnnual, ucrReceiverMaxMaxMonthly, ucrReceiverMaxMinAnnual, ucrReceiverMaxMinMonthly, ucrReceiverMeanAnnual, ucrReceiverMeanMaxAnnual, ucrReceiverMeanmaxMonthly, ucrReceiverMeanminMontly, ucrReceiverMinMaxAnnual, ucrReceiverMinMaxMonthly, ucrReceiverMinMinAnnual, ucrReceiverMinMinMonthly}) + lstReceiversCrop.AddRange({ucrReceiverPlantingDay, ucrReceiverStationCrop, ucrReceiverPlantingLenghth, ucrReceiverPropSuccess, ucrReceiverTotalRain}) + lstReceiversProp.AddRange({ucrReceiverPlantingDayCondition, ucrReceiverSeasonYear, ucrReceiverSeasonStationProb, ucrReceiverSeasonPlantingDay}) + ucrSelectorDefineAnnualRain.SetParameter(New RParameter("data", 0)) ucrSelectorDefineAnnualRain.SetParameterIsrfunction() @@ -46,111 +112,153 @@ Public Class sdgDefineAnnualRainfall ucrReceiverStation.SetParameterIsString() ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True + ucrReceiverStation.bExcludeFromSelector = True ucrReceiverYear.SetParameter(New RParameter("year_col", 2)) ucrReceiverYear.Selector = ucrSelectorDefineAnnualRain ucrReceiverYear.SetParameterIsString() ucrReceiverYear.SetClimaticType("year") ucrReceiverYear.bAutoFill = True + ucrReceiverYear.bExcludeFromSelector = True ucrReceiverStartRainDOY.SetParameter(New RParameter("start_rains_doy_col", 3)) ucrReceiverStartRainDOY.Selector = ucrSelectorDefineAnnualRain ucrReceiverStartRainDOY.SetParameterIsString() + ucrReceiverStartRainDOY.Tag = "start_rains_doy_col" + ucrReceiverStartRainDOY.bExcludeFromSelector = True ucrReceiverStartRainDate.SetParameter(New RParameter("start_rains_date_col", 4)) ucrReceiverStartRainDate.Selector = ucrSelectorDefineAnnualRain ucrReceiverStartRainDate.SetParameterIsString() + ucrReceiverStartRainDate.Tag = "start_rains_date_col" + ucrReceiverStartRainDate.bExcludeFromSelector = True ucrReceiverEndRainsDOY.SetParameter(New RParameter("end_rains_doy_col", 5)) ucrReceiverEndRainsDOY.Selector = ucrSelectorDefineAnnualRain ucrReceiverEndRainsDOY.SetParameterIsString() + ucrReceiverEndRainsDOY.Tag = "end_rains_doy_col" + ucrReceiverEndRainsDOY.bExcludeFromSelector = True ucrReceiverEndRainsDate.SetParameter(New RParameter("end_rains_date_col", 6)) ucrReceiverEndRainsDate.Selector = ucrSelectorDefineAnnualRain ucrReceiverEndRainsDate.SetParameterIsString() + ucrReceiverEndRainsDate.Tag = "end_rains_date_col" + ucrReceiverEndRainsDate.bExcludeFromSelector = True ucrReceiverEndSeasonDOY.SetParameter(New RParameter("end_season_doy_col", 7)) ucrReceiverEndSeasonDOY.Selector = ucrSelectorDefineAnnualRain ucrReceiverEndSeasonDOY.SetParameterIsString() + ucrReceiverEndSeasonDOY.Tag = "end_season_doy_col" + ucrReceiverEndSeasonDOY.bExcludeFromSelector = True ucrReceiverEndSeasonDate.SetParameter(New RParameter("end_season_date_col", 8)) ucrReceiverEndSeasonDate.Selector = ucrSelectorDefineAnnualRain ucrReceiverEndSeasonDate.SetParameterIsString() + ucrReceiverEndSeasonDate.Tag = "end_season_date_col" + ucrReceiverEndSeasonDate.bExcludeFromSelector = True ucrReceiverSeasonalRain.SetParameter(New RParameter("seasonal_rain_col", 9)) ucrReceiverSeasonalRain.Selector = ucrSelectorDefineAnnualRain ucrReceiverSeasonalRain.SetParameterIsString() + ucrReceiverSeasonalRain.Tag = "seasonal_rain_col" + ucrReceiverSeasonalRain.bExcludeFromSelector = True ucrReceiverRainDaysSeason.SetParameter(New RParameter("n_seasonal_rain_col", 10)) ucrReceiverRainDaysSeason.Selector = ucrSelectorDefineAnnualRain ucrReceiverRainDaysSeason.SetParameterIsString() + ucrReceiverRainDaysSeason.Tag = "n_seasonal_rain_col" + ucrReceiverRainDaysSeason.bExcludeFromSelector = True ucrReceiverRainDaysYear.SetParameter(New RParameter("n_rain_col", 11)) ucrReceiverRainDaysYear.Selector = ucrSelectorDefineAnnualRain ucrReceiverRainDaysYear.SetParameterIsString() + ucrReceiverRainDaysYear.Tag = "n_rain_col" + ucrReceiverRainDaysYear.bExcludeFromSelector = True ucrReceiverSeasonalLength.SetParameter(New RParameter("season_length_col", 12)) ucrReceiverSeasonalLength.Selector = ucrSelectorDefineAnnualRain ucrReceiverSeasonalLength.SetParameterIsString() + ucrReceiverSeasonalLength.Tag = "season_length_col" + ucrReceiverSeasonalLength.bExcludeFromSelector = True ucrReceiverAnnualRain.SetParameter(New RParameter("annual_rain_col", 13)) ucrReceiverAnnualRain.Selector = ucrSelectorDefineAnnualRain ucrReceiverAnnualRain.SetParameterIsString() + ucrReceiverAnnualRain.Tag = "annual_rain_col" + ucrReceiverAnnualRain.bExcludeFromSelector = True ucrReceiverStartRainStatus.SetParameter(New RParameter("start_rains_status_column", 14)) ucrReceiverStartRainStatus.Selector = ucrSelectorDefineAnnualRain ucrReceiverStartRainStatus.SetParameterIsString() + ucrReceiverStartRainStatus.Tag = "start_rains_status_column" + ucrReceiverStartRainStatus.bExcludeFromSelector = True ucrReceiverEndRainStatus.SetParameter(New RParameter("end_rains_status_column", 15)) ucrReceiverEndRainStatus.Selector = ucrSelectorDefineAnnualRain ucrReceiverEndRainStatus.SetParameterIsString() + ucrReceiverEndRainStatus.Tag = "end_rains_status_column" + ucrReceiverEndRainStatus.bExcludeFromSelector = True ucrReceiverEndSeasonStatus.SetParameter(New RParameter("end_season_status_column", 16)) ucrReceiverEndSeasonStatus.Selector = ucrSelectorDefineAnnualRain ucrReceiverEndSeasonStatus.SetParameterIsString() + ucrReceiverEndSeasonStatus.Tag = "end_season_status_column" + ucrReceiverEndSeasonStatus.bExcludeFromSelector = True ucrReceiverStationCrop.SetParameter(New RParameter("station_col", 1)) ucrReceiverStationCrop.Selector = ucrSelectorCropProp ucrReceiverStationCrop.SetParameterIsString() - ucrReceiverStationCrop.SetClimaticType("station") - ucrReceiverStationCrop.bAutoFill = True + ucrReceiverStationCrop.Tag = "station" + ucrReceiverStationCrop.bExcludeFromSelector = True ucrReceiverTotalRain.SetParameter(New RParameter("total_rain_col", 2)) ucrReceiverTotalRain.Selector = ucrSelectorCropProp ucrReceiverTotalRain.SetParameterIsString() + ucrReceiverTotalRain.Tag = "total_rain_col" + ucrReceiverTotalRain.bExcludeFromSelector = True ucrReceiverPlantingDay.SetParameter(New RParameter("plant_day_col", 3)) ucrReceiverPlantingDay.Selector = ucrSelectorCropProp ucrReceiverPlantingDay.SetParameterIsString() + ucrReceiverPlantingDay.Tag = "plant_day_col" + ucrReceiverPlantingDay.bExcludeFromSelector = True ucrReceiverPlantingLenghth.SetParameter(New RParameter("plant_length_col", 4)) ucrReceiverPlantingLenghth.Selector = ucrSelectorCropProp ucrReceiverPlantingLenghth.SetParameterIsString() + ucrReceiverPlantingLenghth.Tag = "plant_length_col" + ucrReceiverPlantingLenghth.bExcludeFromSelector = True ucrReceiverPropSuccess.SetParameter(New RParameter("prop_success_col", 5)) ucrReceiverPropSuccess.Selector = ucrSelectorCropProp ucrReceiverPropSuccess.SetParameterIsString() + ucrReceiverPropSuccess.Tag = "prop_success_col" + ucrReceiverPropSuccess.bExcludeFromSelector = True 'Season start ucrReceiverSeasonStationProb.SetParameter(New RParameter("station_col", 1)) ucrReceiverSeasonStationProb.Selector = ucrSelectorSeasonStartProp ucrReceiverSeasonStationProb.SetParameterIsString() - ucrReceiverSeasonStationProb.SetClimaticType("station") - ucrReceiverSeasonStationProb.bAutoFill = True + ucrReceiverSeasonStationProb.Tag = "station" + ucrReceiverSeasonStationProb.bExcludeFromSelector = True ucrReceiverSeasonYear.SetParameter(New RParameter("year_col", 2)) ucrReceiverSeasonYear.Selector = ucrSelectorSeasonStartProp ucrReceiverSeasonYear.SetParameterIsString() - ucrReceiverSeasonYear.SetClimaticType("year") - ucrReceiverSeasonYear.bAutoFill = True + ucrReceiverSeasonYear.Tag = "year" + ucrReceiverSeasonYear.bExcludeFromSelector = True ucrReceiverSeasonPlantingDay.SetParameter(New RParameter("plant_day_col", 3)) ucrReceiverSeasonPlantingDay.Selector = ucrSelectorSeasonStartProp ucrReceiverSeasonPlantingDay.SetParameterIsString() + ucrReceiverSeasonPlantingDay.Tag = "plant_day_col" + ucrReceiverSeasonPlantingDay.bExcludeFromSelector = True ucrReceiverPlantingDayCondition.SetParameter(New RParameter("plant_day_cond_col", 5)) ucrReceiverPlantingDayCondition.Selector = ucrSelectorSeasonStartProp ucrReceiverPlantingDayCondition.SetParameterIsString() + ucrReceiverPlantingDayCondition.Tag = "plant_day_cond_col" + ucrReceiverPlantingDayCondition.bExcludeFromSelector = True 'Annual Temp ucrReceiverAnnualTempStation.SetParameter(New RParameter("station_col", 1)) @@ -158,36 +266,50 @@ Public Class sdgDefineAnnualRainfall ucrReceiverAnnualTempStation.SetParameterIsString() ucrReceiverAnnualTempStation.SetClimaticType("station") ucrReceiverAnnualTempStation.bAutoFill = True + ucrReceiverAnnualTempStation.bExcludeFromSelector = True ucrReceiverAnnualTempYr.SetParameter(New RParameter("year_col", 2)) ucrReceiverAnnualTempYr.Selector = ucrSelectorAnnualTemp ucrReceiverAnnualTempYr.SetParameterIsString() ucrReceiverAnnualTempYr.SetClimaticType("year") ucrReceiverAnnualTempYr.bAutoFill = True + ucrReceiverAnnualTempYr.bExcludeFromSelector = True ucrReceiverMeanAnnual.SetParameter(New RParameter("mean_tmin_col", 3)) ucrReceiverMeanAnnual.Selector = ucrSelectorAnnualTemp ucrReceiverMeanAnnual.SetParameterIsString() + ucrReceiverMeanAnnual.Tag = "mean_tmin_col" + ucrReceiverMeanAnnual.bExcludeFromSelector = True ucrReceiverMinMinAnnual.SetParameter(New RParameter("min_tmin_col", 4)) ucrReceiverMinMinAnnual.Selector = ucrSelectorAnnualTemp ucrReceiverMinMinAnnual.SetParameterIsString() + ucrReceiverMinMinAnnual.Tag = "min_tmin_col" + ucrReceiverMinMinAnnual.bExcludeFromSelector = True ucrReceiverMaxMinAnnual.SetParameter(New RParameter("max_tmin_col", 5)) ucrReceiverMaxMinAnnual.Selector = ucrSelectorAnnualTemp ucrReceiverMaxMinAnnual.SetParameterIsString() + ucrReceiverMaxMinAnnual.Tag = "max_tmin_col" + ucrReceiverMaxMinAnnual.bExcludeFromSelector = True ucrReceiverMeanMaxAnnual.SetParameter(New RParameter("mean_tmax_col", 6)) ucrReceiverMeanMaxAnnual.Selector = ucrSelectorAnnualTemp ucrReceiverMeanMaxAnnual.SetParameterIsString() + ucrReceiverMeanMaxAnnual.Tag = "mean_tmax_col" + ucrReceiverMeanMaxAnnual.bExcludeFromSelector = True ucrReceiverMinMaxAnnual.SetParameter(New RParameter("min_tmax_col", 7)) ucrReceiverMinMaxAnnual.Selector = ucrSelectorAnnualTemp ucrReceiverMinMaxAnnual.SetParameterIsString() + ucrReceiverMinMaxAnnual.Tag = "min_tmax_col" + ucrReceiverMinMaxAnnual.bExcludeFromSelector = True ucrReceiverMaxMaxAnnual.SetParameter(New RParameter("max_tmax_col", 8)) ucrReceiverMaxMaxAnnual.Selector = ucrSelectorAnnualTemp ucrReceiverMaxMaxAnnual.SetParameterIsString() + ucrReceiverMaxMaxAnnual.Tag = "max_tmax_col" + ucrReceiverMaxMaxAnnual.bExcludeFromSelector = True 'Monthly Temp ucrReceiverMonthlyTemp.SetParameter(New RParameter("station_col", 1)) @@ -195,42 +317,58 @@ Public Class sdgDefineAnnualRainfall ucrReceiverMonthlyTemp.SetParameterIsString() ucrReceiverMonthlyTemp.SetClimaticType("station") ucrReceiverMonthlyTemp.bAutoFill = True + ucrReceiverMonthlyTemp.bExcludeFromSelector = True ucrReceiverYearMonthly.SetParameter(New RParameter("year_col", 2)) ucrReceiverYearMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverYearMonthly.SetParameterIsString() ucrReceiverYearMonthly.SetClimaticType("year") ucrReceiverYearMonthly.bAutoFill = True + ucrReceiverYearMonthly.bExcludeFromSelector = True ucrReceiverMonthMonthly.SetParameter(New RParameter("month_col", 3)) ucrReceiverMonthMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMonthMonthly.SetParameterIsString() ucrReceiverMonthMonthly.SetClimaticType("month") ucrReceiverMonthMonthly.bAutoFill = True + ucrReceiverMonthMonthly.bExcludeFromSelector = True ucrReceiverMeanminMontly.SetParameter(New RParameter("mean_tmin_col", 4)) ucrReceiverMeanminMontly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMeanminMontly.SetParameterIsString() + ucrReceiverMeanminMontly.Tag = "mean_tmin_col" + ucrReceiverMeanminMontly.bExcludeFromSelector = True ucrReceiverMinMinMonthly.SetParameter(New RParameter("min_tmin_col", 5)) ucrReceiverMinMinMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMinMinMonthly.SetParameterIsString() + ucrReceiverMinMinMonthly.Tag = "min_tmin_col" + ucrReceiverMinMinMonthly.bExcludeFromSelector = True ucrReceiverMaxMinMonthly.SetParameter(New RParameter("max_tmin_col", 6)) ucrReceiverMaxMinMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMaxMinMonthly.SetParameterIsString() + ucrReceiverMaxMinMonthly.Tag = "max_tmin_col" + ucrReceiverMaxMinMonthly.bExcludeFromSelector = True ucrReceiverMeanmaxMonthly.SetParameter(New RParameter("mean_tmax_col", 7)) ucrReceiverMeanmaxMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMeanmaxMonthly.SetParameterIsString() + ucrReceiverMeanmaxMonthly.Tag = "mean_tmax_col" + ucrReceiverMeanmaxMonthly.bExcludeFromSelector = True ucrReceiverMinMaxMonthly.SetParameter(New RParameter("min_tmax_col", 8)) ucrReceiverMinMaxMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMinMaxMonthly.SetParameterIsString() + ucrReceiverMinMaxMonthly.Tag = "min_tmax_col" + ucrReceiverMinMaxMonthly.bExcludeFromSelector = True ucrReceiverMaxMaxMonthly.SetParameter(New RParameter("max_tmax_col", 9)) ucrReceiverMaxMaxMonthly.Selector = ucrSelecetorMonthlyTemp ucrReceiverMaxMaxMonthly.SetParameterIsString() + ucrReceiverMaxMaxMonthly.Tag = "max_tmax_col" + ucrReceiverMaxMaxMonthly.bExcludeFromSelector = True + bControlsInitialised = True End Sub Public Sub SetRCode(clsNewReforMattAnnualSummaries As RFunction, clsNewExportRinstatToBucketFunction As RFunction, clsNewReformatCropSuccessFunction As RFunction, clsNewReformatMonthlyTempSummaries As RFunction, clsNewReformatSeasonStartFunction As RFunction, clsNewReformatTempSummariesFunction As RFunction, Optional bReset As Boolean = False) @@ -308,17 +446,27 @@ Public Class sdgDefineAnnualRainfall ucrReceiverMinMinMonthly.SetRCode(clsReformatMonthlyTempSummaries, bReset) ucrReceiverMeanminMontly.SetRCode(clsReformatMonthlyTempSummaries, bReset) ucrSelecetorMonthlyTemp.SetRCode(clsReformatMonthlyTempSummaries, bReset) + AutoFillReceivers() + AutoFillReceiversCrop() + AutoFillReceiversForAnnualTemp() + AutoFillReceiversForMonthlyTemp() + AutoFillReceiversForSeasonsStart() End Sub Private Sub ucrReceiverAnnualRain_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverAnnualRain.ControlValueChanged, ucrReceiverEndRainsDate.ControlValueChanged, ucrReceiverEndRainsDOY.ControlValueChanged, ucrReceiverEndSeasonDate.ControlValueChanged, ucrReceiverEndSeasonDOY.ControlValueChanged, ucrReceiverRainDaysSeason.ControlValueChanged, ucrReceiverRainDaysYear.ControlValueChanged, ucrReceiverSeasonalLength.ControlValueChanged, ucrReceiverSeasonalRain.ControlValueChanged, ucrReceiverStartRainDate.ControlValueChanged, ucrReceiverStartRainDOY.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrReceiverYear.ControlValueChanged - If Not (ucrReceiverAnnualRain.IsEmpty AndAlso ucrReceiverEndRainsDate.IsEmpty AndAlso ucrReceiverEndRainsDOY.IsEmpty AndAlso ucrReceiverSeasonalLength.IsEmpty AndAlso ucrReceiverSeasonalRain.IsEmpty AndAlso - ucrReceiverEndSeasonDate.IsEmpty AndAlso ucrReceiverEndSeasonDOY.IsEmpty AndAlso ucrReceiverRainDaysSeason.IsEmpty AndAlso ucrReceiverRainDaysYear.IsEmpty AndAlso ucrReceiverStartRainDate.IsEmpty AndAlso - ucrReceiverStartRainDOY.IsEmpty AndAlso ucrReceiverStation.IsEmpty AndAlso ucrReceiverYear.IsEmpty) Then - clsExportRinstatToBucketFunction.AddParameter("annual_rainfall_data", clsRFunctionParameter:=clsReforMattAnnualSummariesFunction, iPosition:=1) + If dlgExportClimaticDefinitions.ucrChkAnnualRainfall.Checked Then + If Not ucrReceiverStation.IsEmpty AndAlso Not ucrReceiverYear.IsEmpty AndAlso (Not ucrReceiverAnnualRain.IsEmpty OrElse Not ucrReceiverEndRainsDate.IsEmpty OrElse Not ucrReceiverEndRainsDOY.IsEmpty OrElse ucrReceiverSeasonalLength.IsEmpty OrElse Not ucrReceiverSeasonalRain.IsEmpty OrElse + Not ucrReceiverEndSeasonDate.IsEmpty OrElse Not ucrReceiverEndSeasonDOY.IsEmpty OrElse Not ucrReceiverRainDaysSeason.IsEmpty OrElse Not ucrReceiverRainDaysYear.IsEmpty OrElse Not ucrReceiverStartRainDate.IsEmpty OrElse + Not ucrReceiverStartRainDOY.IsEmpty) Then + clsExportRinstatToBucketFunction.AddParameter("annual_rainfall_data", clsRFunctionParameter:=clsReforMattAnnualSummariesFunction, iPosition:=1) + + Else + clsExportRinstatToBucketFunction.RemoveParameterByName("annual_rainfall_data") + End If Else clsExportRinstatToBucketFunction.RemoveParameterByName("annual_rainfall_data") End If @@ -327,37 +475,366 @@ Public Class sdgDefineAnnualRainfall Private Sub ucrReceiverStationCrop_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStationCrop.ControlValueChanged, ucrReceiverTotalRain.ControlValueChanged, ucrReceiverPlantingDay.ControlValueChanged, ucrReceiverPlantingLenghth.ControlValueChanged, ucrReceiverPropSuccess.ControlValueChanged - If Not (ucrReceiverStationCrop.IsEmpty AndAlso ucrReceiverTotalRain.IsEmpty AndAlso ucrReceiverPlantingDay.IsEmpty AndAlso ucrReceiverPlantingLenghth.IsEmpty AndAlso ucrReceiverPropSuccess.IsEmpty) Then - clsExportRinstatToBucketFunction.AddParameter("crop_success_data", clsRFunctionParameter:=clsReformatCropSuccessFunction, iPosition:=9) + If dlgExportClimaticDefinitions.ucrChkCropSuccessProp.Checked Then + + If Not ucrReceiverStationCrop.IsEmpty AndAlso (Not ucrReceiverTotalRain.IsEmpty OrElse Not ucrReceiverPlantingDay.IsEmpty OrElse Not ucrReceiverPlantingLenghth.IsEmpty OrElse Not ucrReceiverPropSuccess.IsEmpty) Then + clsExportRinstatToBucketFunction.AddParameter("crop_success_data", clsRFunctionParameter:=clsReformatCropSuccessFunction, iPosition:=9) + Else + clsExportRinstatToBucketFunction.RemoveParameterByName("crop_success_data") + End If Else clsExportRinstatToBucketFunction.RemoveParameterByName("crop_success_data") End If End Sub Private Sub ucrReceiverSeasonStationProb_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverSeasonStationProb.ControlValueChanged, ucrReceiverSeasonPlantingDay.ControlValueChanged, ucrReceiverPlantingDayCondition.ControlValueChanged, ucrReceiverSeasonYear.ControlValueChanged - - If Not (ucrReceiverSeasonStationProb.IsEmpty AndAlso ucrReceiverSeasonPlantingDay.IsEmpty AndAlso ucrReceiverPlantingDayCondition.IsEmpty AndAlso ucrReceiverSeasonYear.IsEmpty) Then - clsExportRinstatToBucketFunction.AddParameter("season_start_data", clsRFunctionParameter:=clsReformatSeasonStartFunction, iPosition:=10) + If dlgExportClimaticDefinitions.ucrChkSeasonStartProp.Checked Then + If Not ucrReceiverSeasonStationProb.IsEmpty AndAlso Not ucrReceiverSeasonYear.IsEmpty AndAlso (Not ucrReceiverSeasonPlantingDay.IsEmpty OrElse Not ucrReceiverPlantingDayCondition.IsEmpty) Then + clsExportRinstatToBucketFunction.AddParameter("season_start_data", clsRFunctionParameter:=clsReformatSeasonStartFunction, iPosition:=10) + Else + clsExportRinstatToBucketFunction.RemoveParameterByName("season_start_data") + End If Else clsExportRinstatToBucketFunction.RemoveParameterByName("season_start_data") End If End Sub Private Sub ucrReceiverAnnualTempStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverAnnualTempStation.ControlValueChanged, ucrReceiverAnnualTempYr.ControlValueChanged, ucrReceiverMaxMaxAnnual.ControlValueChanged, ucrReceiverMaxMinAnnual.ControlValueChanged, ucrReceiverMeanAnnual.ControlValueChanged, ucrReceiverMeanMaxAnnual.ControlValueChanged, ucrReceiverMinMaxAnnual.ControlValueChanged, ucrReceiverMinMinAnnual.ControlValueChanged - If Not (ucrReceiverAnnualTempStation.IsEmpty AndAlso ucrReceiverAnnualTempYr.IsEmpty AndAlso ucrReceiverMaxMaxAnnual.IsEmpty AndAlso - ucrReceiverMaxMinAnnual.IsEmpty AndAlso ucrReceiverMeanAnnual.IsEmpty AndAlso ucrReceiverMeanMaxAnnual.IsEmpty AndAlso ucrReceiverMinMaxAnnual.IsEmpty AndAlso ucrReceiverMinMinAnnual.IsEmpty) Then - clsExportRinstatToBucketFunction.AddParameter("annual_temperature_data", clsRFunctionParameter:=clsReformatTempSummariesFunction, iPosition:=11) + + If dlgExportClimaticDefinitions.ucrChkAnnualTemp.Checked Then + If Not ucrReceiverAnnualTempStation.IsEmpty AndAlso Not ucrReceiverAnnualTempYr.IsEmpty AndAlso (Not ucrReceiverMaxMaxAnnual.IsEmpty OrElse + Not ucrReceiverMaxMinAnnual.IsEmpty OrElse Not ucrReceiverMeanAnnual.IsEmpty OrElse Not ucrReceiverMeanMaxAnnual.IsEmpty OrElse Not ucrReceiverMinMaxAnnual.IsEmpty OrElse Not ucrReceiverMinMinAnnual.IsEmpty) Then + clsExportRinstatToBucketFunction.AddParameter("annual_temperature_data", clsRFunctionParameter:=clsReformatTempSummariesFunction, iPosition:=11) + Else + clsExportRinstatToBucketFunction.RemoveParameterByName("annual_temperature_data") + End If Else clsExportRinstatToBucketFunction.RemoveParameterByName("annual_temperature_data") End If End Sub Private Sub ucrReceiverMonthlyTemp_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMonthlyTemp.ControlValueChanged, ucrReceiverYearMonthly.ControlValueChanged, ucrReceiverMonthMonthly.ControlValueChanged, ucrReceiverMeanmaxMonthly.ControlValueChanged, ucrReceiverMeanminMontly.ControlValueChanged, ucrReceiverMinMaxMonthly.ControlValueChanged, ucrReceiverMinMinMonthly.ControlValueChanged, ucrReceiverMaxMinMonthly.ControlValueChanged, ucrReceiverMaxMaxMonthly.ControlValueChanged - If Not (ucrReceiverMonthlyTemp.IsEmpty AndAlso ucrReceiverYearMonthly.IsEmpty AndAlso ucrReceiverMonthMonthly.IsEmpty AndAlso ucrReceiverMeanmaxMonthly.IsEmpty AndAlso ucrReceiverMeanminMontly.IsEmpty AndAlso ucrReceiverMinMaxMonthly.IsEmpty AndAlso ucrReceiverMinMinMonthly.IsEmpty AndAlso ucrReceiverMaxMinMonthly.IsEmpty AndAlso ucrReceiverMaxMaxMonthly.IsEmpty) Then - clsExportRinstatToBucketFunction.AddParameter("monthly_temperature_data", clsRFunctionParameter:=clsReformatMonthlyTempSummaries, iPosition:=18) + If dlgExportClimaticDefinitions.ucrChkMonthlyTemp.Checked Then + If Not ucrReceiverMonthlyTemp.IsEmpty AndAlso Not ucrReceiverYearMonthly.IsEmpty AndAlso Not ucrReceiverMonthMonthly.IsEmpty AndAlso (Not ucrReceiverMeanmaxMonthly.IsEmpty OrElse Not ucrReceiverMeanminMontly.IsEmpty OrElse Not ucrReceiverMinMaxMonthly.IsEmpty OrElse Not ucrReceiverMinMinMonthly.IsEmpty OrElse Not ucrReceiverMaxMinMonthly.IsEmpty OrElse Not ucrReceiverMaxMaxMonthly.IsEmpty) Then + clsExportRinstatToBucketFunction.AddParameter("monthly_temperature_data", clsRFunctionParameter:=clsReformatMonthlyTempSummaries, iPosition:=18) + Else + clsExportRinstatToBucketFunction.RemoveParameterByName("monthly_temperature_data") + End If Else clsExportRinstatToBucketFunction.RemoveParameterByName("monthly_temperature_data") End If End Sub + Private Sub AutoFillReceivers() + If isFilling Then + Exit Sub + End If + isFilling = True + + ' Temporarily remove the event handler + RemoveHandler ucrSelectorDefineAnnualRain.ControlValueChanged, AddressOf AutoFillReceivers + + Dim lstRecognisedValues As List(Of String) + Dim ucrCurrentReceiver As ucrReceiver + Dim bFound As Boolean = False + + ucrCurrentReceiver = ucrSelectorDefineAnnualRain.CurrentReceiver + + For Each ucrTempReceiver As ucrReceiver In lstReceivers + ucrTempReceiver.SetMeAsReceiver() + lstRecognisedValues = GetRecognisedValues(ucrTempReceiver.Tag) + + If lstRecognisedValues.Count > 0 Then + For Each lviTempVariable As ListViewItem In ucrSelectorDefineAnnualRain.lstAvailableVariable.Items + For Each strValue As String In lstRecognisedValues + If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]", String.Empty).Equals(strValue) Then + ucrTempReceiver.Add(lviTempVariable.Text, ucrSelectorDefineAnnualRain.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + bFound = True + Exit For + End If + Next + If bFound Then + bFound = False + Exit For + End If + Next + End If + Next + + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + + ' Re-enable the event handler + AddHandler ucrSelectorDefineAnnualRain.ControlValueChanged, AddressOf AutoFillReceivers + + isFilling = False + End Sub + + Private Sub AutoFillReceiversCrop() + If isFilling Then + Exit Sub + End If + isFilling = True + + ' Temporarily remove the event handler + RemoveHandler ucrSelectorCropProp.ControlValueChanged, AddressOf AutoFillReceiversCrop + + Dim lstRecognisedValues As List(Of String) + Dim ucrCurrentReceiver As ucrReceiver + Dim bFound As Boolean = False + + ucrCurrentReceiver = ucrSelectorCropProp.CurrentReceiver + + For Each ucrTempReceiver As ucrReceiver In lstReceiversCrop + ucrTempReceiver.SetMeAsReceiver() + lstRecognisedValues = GetRecognisedValuesCrop(ucrTempReceiver.Tag) + + If lstRecognisedValues.Count > 0 Then + For Each lviTempVariable As ListViewItem In ucrSelectorCropProp.lstAvailableVariable.Items + For Each strValue As String In lstRecognisedValues + If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]", String.Empty).Equals(strValue) Then + ucrTempReceiver.Add(lviTempVariable.Text, ucrSelectorCropProp.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + bFound = True + Exit For + End If + Next + If bFound Then + bFound = False + Exit For + End If + Next + End If + Next + + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + + ' Re-enable the event handler + AddHandler ucrSelectorCropProp.ControlValueChanged, AddressOf AutoFillReceiversCrop + + isFilling = False + End Sub + + Private Sub AutoFillReceiversForSeasonsStart() + If isFilling Then + Exit Sub + End If + isFilling = True + + ' Temporarily remove the event handler + RemoveHandler ucrSelectorSeasonStartProp.ControlValueChanged, AddressOf AutoFillReceiversForSeasonsStart + + Dim lstRecognisedValues As List(Of String) + Dim ucrCurrentReceiver As ucrReceiver + Dim bFound As Boolean = False + + ucrCurrentReceiver = ucrSelectorSeasonStartProp.CurrentReceiver + + For Each ucrTempReceiver As ucrReceiver In lstReceiversProp + ucrTempReceiver.SetMeAsReceiver() + lstRecognisedValues = GetRecognisedValuesProp(ucrTempReceiver.Tag) + + If lstRecognisedValues.Count > 0 Then + For Each lviTempVariable As ListViewItem In ucrSelectorSeasonStartProp.lstAvailableVariable.Items + For Each strValue As String In lstRecognisedValues + If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]", String.Empty).Equals(strValue) Then + ucrTempReceiver.Add(lviTempVariable.Text, ucrSelectorSeasonStartProp.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + bFound = True + Exit For + End If + Next + If bFound Then + bFound = False + Exit For + End If + Next + End If + Next + + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + + ' Re-enable the event handler + AddHandler ucrSelectorSeasonStartProp.ControlValueChanged, AddressOf AutoFillReceiversForSeasonsStart + + isFilling = False + End Sub + + Private Sub AutoFillReceiversForAnnualTemp() + If isFilling Then + Exit Sub + End If + isFilling = True + + ' Temporarily remove the event handler + RemoveHandler ucrSelectorAnnualTemp.ControlValueChanged, AddressOf AutoFillReceiversForAnnualTemp + + Dim lstRecognisedValues As List(Of String) + Dim ucrCurrentReceiver As ucrReceiver + Dim bFound As Boolean = False + + ucrCurrentReceiver = ucrSelectorAnnualTemp.CurrentReceiver + + For Each ucrTempReceiver As ucrReceiver In lstReceiversAnnualTemp + ucrTempReceiver.SetMeAsReceiver() + lstRecognisedValues = GetRecognisedValuesAnnTemp(ucrTempReceiver.Tag) + + If lstRecognisedValues.Count > 0 Then + For Each lviTempVariable As ListViewItem In ucrSelectorAnnualTemp.lstAvailableVariable.Items + For Each strValue As String In lstRecognisedValues + If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]", String.Empty).Equals(strValue) Then + ucrTempReceiver.Add(lviTempVariable.Text, ucrSelectorAnnualTemp.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + bFound = True + Exit For + End If + Next + If bFound Then + bFound = False + Exit For + End If + Next + End If + Next + + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + + ' Re-enable the event handler + AddHandler ucrSelectorAnnualTemp.ControlValueChanged, AddressOf AutoFillReceiversForAnnualTemp + + isFilling = False + End Sub + + Private Sub AutoFillReceiversForMonthlyTemp() + If isFilling Then + Exit Sub + End If + isFilling = True + + Me.SuspendLayout() + ' Temporarily remove the event handler + RemoveHandler ucrSelecetorMonthlyTemp.ControlValueChanged, AddressOf AutoFillReceiversForMonthlyTemp + + Dim lstRecognisedValues As List(Of String) + Dim ucrCurrentReceiver As ucrReceiver + Dim bFound As Boolean = False + + ucrCurrentReceiver = ucrSelecetorMonthlyTemp.CurrentReceiver + + For Each ucrTempReceiver As ucrReceiver In lstReceiversMonthTemp + ucrTempReceiver.SetMeAsReceiver() + lstRecognisedValues = GetRecognisedValuesMothTemp(ucrTempReceiver.Tag) + + If lstRecognisedValues.Count > 0 Then + For Each lviTempVariable As ListViewItem In ucrSelecetorMonthlyTemp.lstAvailableVariable.Items + For Each strValue As String In lstRecognisedValues + If Regex.Replace(lviTempVariable.Text.ToLower(), "[^\w]", String.Empty).Equals(strValue) Then + ucrTempReceiver.Add(lviTempVariable.Text, ucrSelecetorMonthlyTemp.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + bFound = True + Exit For + End If + Next + If bFound Then + bFound = False + Exit For + End If + Next + End If + Next + + If ucrCurrentReceiver IsNot Nothing Then + ucrCurrentReceiver.SetMeAsReceiver() + End If + + ' Re-enable the event handler + AddHandler ucrSelecetorMonthlyTemp.ControlValueChanged, AddressOf AutoFillReceiversForMonthlyTemp + + Me.ResumeLayout() + + isFilling = False + End Sub + + Private Function GetRecognisedValues(strVariable As String) As List(Of String) + Dim lstValues As New List(Of String) + + For Each kvpTemp As KeyValuePair(Of String, List(Of String)) In lstRecognisedTypes + If kvpTemp.Key = strVariable Then + lstValues = kvpTemp.Value + Exit For + End If + Next + Return lstValues + End Function + + Private Function GetRecognisedValuesCrop(strVariable As String) As List(Of String) + Dim lstValues As New List(Of String) + + For Each kvpTemp As KeyValuePair(Of String, List(Of String)) In lstRecognisedCropTypes + If kvpTemp.Key = strVariable Then + lstValues = kvpTemp.Value + Exit For + End If + Next + Return lstValues + End Function + + Private Function GetRecognisedValuesProp(strVariable As String) As List(Of String) + Dim lstValues As New List(Of String) + + For Each kvpTemp As KeyValuePair(Of String, List(Of String)) In lstRecognisedPropTypes + If kvpTemp.Key = strVariable Then + lstValues = kvpTemp.Value + Exit For + End If + Next + Return lstValues + End Function + + Private Function GetRecognisedValuesAnnTemp(strVariable As String) As List(Of String) + Dim lstValues As New List(Of String) + + For Each kvpTemp As KeyValuePair(Of String, List(Of String)) In lstRecognisedAnnTempTypes + If kvpTemp.Key = strVariable Then + lstValues = kvpTemp.Value + Exit For + End If + Next + Return lstValues + End Function + + Private Function GetRecognisedValuesMothTemp(strVariable As String) As List(Of String) + Dim lstValues As New List(Of String) + + For Each kvpTemp As KeyValuePair(Of String, List(Of String)) In lstRecognisedMonthTempTypes + If kvpTemp.Key = strVariable Then + lstValues = kvpTemp.Value + Exit For + End If + Next + Return lstValues + End Function + Private Sub ucrSelecetorMonthlyTemp_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelecetorMonthlyTemp.ControlValueChanged + AutoFillReceiversForMonthlyTemp() + End Sub + + Private Sub ucrSelectorAnnualTemp_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorAnnualTemp.ControlValueChanged + AutoFillReceiversForAnnualTemp() + End Sub + + Private Sub ucrSelectorCropProp_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorCropProp.ControlValueChanged + AutoFillReceiversCrop() + End Sub + + Private Sub ucrSelectorDefineAnnualRain_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDefineAnnualRain.ControlValueChanged + AutoFillReceivers() + End Sub + + Private Sub ucrSelectorSeasonStartProp_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorSeasonStartProp.ControlValueChanged + AutoFillReceiversForSeasonsStart() + End Sub + End Class \ No newline at end of file diff --git a/instat/static/Help/R-Instat.chm b/instat/static/Help/R-Instat.chm index 24fca5f21b7..20e9de1bc37 100644 Binary files a/instat/static/Help/R-Instat.chm and b/instat/static/Help/R-Instat.chm differ diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 7bf6274f247..ee580e5519a 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1848,6 +1848,265 @@ DataBook$set("public", "database_disconnect", function() { } ) +#Gets the row count of the table. +DataBook$set("public", "get_db_table_row_count", function(tableName, query_condition = NULL) { + con <- self$get_database_connection() + if(is.null(con)){ + stop("No database connection") + } + + if(is.null(query_condition)){ + query_condition <- "" + } + + out <- DBI::dbGetQuery(con, paste0("SELECT COUNT(*) as result FROM ",tableName," ", query_condition, ";" )) + return(out$result) + +}) + +#Imports Climsoft metadata. +DataBook$set("public", "import_climsoft_metadata", function(import_stations = FALSE, import_elements = FALSE, import_flags = FALSE) { + + if(!import_stations && !import_elements){ + stop("No metadata selected for import") + } + + con <- self$get_database_connection() + if(is.null(con)){ + stop("No database connection") + } + + #imports metadata + #-------------------------------- + data_list <- list() + + if(import_stations){ + # TODO.(22/03/2023) 2 fields have been intentionally left out because they are yet to be released to Climsoft users. Namely; wsi and gtsWSI + # include them once the new Climsoft release has been supplied to users + stations_df <- DBI::dbGetQuery(con, "SELECT stationId AS station_id, stationName AS station_name, wmoid, icaoid, latitude, longitude, elevation, qualifier, geoLocationMethod AS geo_location_method, geoLocationAccuracy AS geo_location_accuracy, openingDatetime AS opening_date_time, closingDatetime AS closing_date_time, wacaSelection AS waca_selection, cptSelection AS cpt_selection, stationOperational AS station_operational, drainageBasin AS drainage_basin, country AS country, authority, adminRegion AS admin_region_1, adminRegion2 AS admin_region_2, adminRegion3 AS admin_region_3, adminRegion4 AS admin_region_4 FROM station;") + + columns_to_convert <- c("station_id","station_name","qualifier", "station_operational", "drainage_basin", "country", "authority", "admin_region_1", "admin_region_2", "admin_region_3", "admin_region_4") + stations_df[columns_to_convert] <- lapply(stations_df[columns_to_convert], as.factor) + + stations_df_name <- next_default_item("stations_metadata", self$get_data_names(), include_index = FALSE) + data_list[[stations_df_name]] <- stations_df + } + + if(import_elements){ + elements_df <- DBI::dbGetQuery(con, "SELECT elementId AS element_id, elementName AS element_name, abbreviation, description, elementtype AS element_type, upperLimit AS upper_limit , lowerLimit AS lower_limit, units FROM obselement;") + + columns_to_convert <- c("element_id","element_name","abbreviation","element_type") + elements_df[columns_to_convert] <- lapply(elements_df[columns_to_convert], as.factor) + + elements_df_name <- next_default_item("elements_metadata", self$get_data_names(), include_index = FALSE) + data_list[[elements_df_name]] <- elements_df + } + + if(import_flags){ + flags_df <- DBI::dbGetQuery(con, "SELECT characterSymbol AS flag_name, description FROM flags;") + + flags_df$flag_name <- as.factor(flags_df$flag_name) + + flags_df_name <- next_default_item("flags_metadata", self$get_data_names(), include_index = FALSE) + data_list[[flags_df_name]] <- flags_df + } + + # Import the data frames into the data book + self$import_data(data_tables = data_list) + +}) + +#imports data from Climsoft observation tables; initial or final. +#imports selected stations and elements metadata +DataBook$set("public", "import_climsoft_data", function(tableName, + station_filter_column, stations = c(), + element_filter_column, elements = c(), + qc_status = -1, start_date = NULL, end_date = NULL, unstack_data = FALSE, + include_element_id = FALSE, include_element_name = FALSE, + include_acquisition_type = FALSE, include_level = FALSE, include_entry_form = FALSE, include_captured_by = FALSE, + include_qc_status = FALSE, include_qc_log = FALSE, include_flag = FALSE, + import_selected_stations_metadata = FALSE, import_selected_elements_metadata = FALSE) { + #connection and parameter checks + #-------------------------------- + con <- self$get_database_connection() + if(is.null(con)){ + stop("No database connection") + } + + if(missing(tableName) || missing(station_filter_column) || missing(element_filter_column) || length(stations) == 0 || length(elements) == 0){ + stop("Missing parameters. tableName, station_filter_column, element_filter_column, stations and elements must be supplied") + } + + if (!is.null(start_date) && !lubridate::is.Date(start_date) ) { + stop("start_date must be of type Date.") + } + + if (!is.null(end_date) && !lubridate::is.Date(end_date) ) { + stop("start_date must be of type Date.") + } + #-------------------------------- + + #selects + #-------------------------------- + + sql_select<- paste0(tableName,".recordedFrom AS station_id",", station.stationName AS station_name") + + if(include_element_id){ + sql_select <-paste0(sql_select, ", ", tableName,".describedBy AS element_id") + } + + sql_select <-paste0(sql_select,", obselement.abbreviation AS element_abbrv") + + if(include_element_name){ + sql_select <-paste0(sql_select,", obselement.elementName AS element_name") + } + + if(include_acquisition_type){ + sql_select <-paste0(sql_select,", ", tableName,".acquisitionType"," AS acquisition_type") + } + + if(include_level){ + sql_select <-paste0(sql_select,", ", tableName,".obsLevel"," AS level") + } + + if(include_entry_form){ + sql_select <-paste0(sql_select,", ", tableName,".dataForm"," AS entry_form") + } + + if(include_captured_by){ + sql_select <-paste0(sql_select,", ", tableName,".capturedBy"," AS captured_by") + } + + if(include_qc_status){ + sql_select <-paste0(sql_select,", ", tableName,".qcStatus"," AS qc_status") + } + + sql_select <-paste0(sql_select,", ", tableName,".obsDatetime AS date_time") + sql_select <-paste0(sql_select,", DATE(", tableName,".obsDatetime) AS date") + + if(include_qc_log){ + sql_select <-paste0(sql_select,", ", tableName,".qcTypeLog"," AS qc_log") + } + + if(include_flag){ + sql_select <-paste0(sql_select,", ", tableName,".flag"," AS flag") + } + + sql_select <-paste0(sql_select,", ", tableName,".obsValue AS value") + + sql_select<- paste0("SELECT ", sql_select, " FROM ", tableName, + " INNER JOIN station ON ", tableName, ".recordedFrom = station.stationId", + " INNER JOIN obselement ON ",tableName,".describedBy = obselement.elementId") + #-------------------------------- + + #filters + #-------------------------------- + sql_stations_filter <- paste0(" station.", station_filter_column, " IN ", paste0("(", paste0("'", stations, "'", collapse = ", "), ")")) + sql_elements_filter <- paste0(" obselement.", element_filter_column, " IN ", paste0("(", paste0("'", elements, "'", collapse = ", "), ")")) + + sql_filter <- sql_stations_filter + sql_filter <- paste0(sql_filter," AND ",sql_elements_filter) + + if(qc_status>-1){ + sql_filter <- paste0(sql_filter," AND qcStatus = ", qc_status) + } + + if (!is.null(start_date)) { + sql_filter = paste0(sql_filter," AND obsDatetime >= ", sQuote(format(start_date, format = "%Y-%m-%d"))) + } + + if (!is.null(end_date)) { + sql_filter <- paste0(sql_filter," AND obsDatetime <=", sQuote(format(end_date, format = "%Y-%m-%d"))) + } + + sql_filter<- paste0(" WHERE ",sql_filter) + #-------------------------------- + + #order by + #-------------------------------- + sql_order_by <- paste0(" ORDER BY ",tableName,".recordedFrom, ",tableName, ".describedBy, ",tableName, ".obsDatetime",";") + #-------------------------------- + + # Data list to store all the imported data frames + data_list <- list() + + #import metadata + #-------------------------------- + + if(import_selected_stations_metadata){ + stations_metadata_name <- next_default_item("stations_metadata", self$get_data_names(), include_index = FALSE) + data_list[[stations_metadata_name]] <- DBI::dbGetQuery(con, paste0("SELECT * FROM station WHERE", sql_stations_filter)) + } + + if(import_selected_elements_metadata){ + elements_metadata_name <- next_default_item("elements_metadata", self$get_data_names(), include_index = FALSE) + data_list[[elements_metadata_name]] <- DBI::dbGetQuery(con, paste0("SELECT * FROM obselement WHERE", sql_elements_filter)) + } + + #-------------------------------- + + # import and transform observations data data + # -------------------------------- + + # Get observations data from database + observations_df <- DBI::dbGetQuery(con, paste0(sql_select, sql_filter, sql_order_by)) + + # Convert station name and abbreviation columns to factor + columns_to_convert <- c("station_id", "station_name", "element_abbrv") + observations_df[columns_to_convert] <- lapply(observations_df[columns_to_convert], as.factor) + + # Convert the date_time column to POSIXct (date-time) format + observations_df$date_time <- as.POSIXct(observations_df$date_time, format = "%Y-%m-%d %H:%M:%S") + + # convert the date column to date format + observations_df$date <- as.Date(x = observations_df$date) + + if(include_element_id){ + observations_df$element_id <- as.factor(observations_df$element_id) + } + + if(include_element_name){ + observations_df$element_name <- as.factor(observations_df$element_name) + } + + if(include_qc_status){ + observations_df$qc_status <- as.factor(observations_df$qc_status) + } + + if(include_acquisition_type){ + observations_df$acquisition_type <- as.factor(observations_df$acquisition_type) + } + + if(include_level){ + observations_df$level <- as.factor(observations_df$level) + } + + if(include_flag){ + observations_df$flag <- as.factor(observations_df$flag) + } + + if(include_entry_form){ + observations_df$entry_form <- as.factor(observations_df$entry_form) + } + + #-------------------------------- + + # Add observations data to list of data to be imported + # -------------------------------- + observations_data_name <- next_default_item("observations_data", self$get_data_names(), include_index = FALSE) + data_list[[observations_data_name]] <- observations_df + + if(unstack_data){ + observations_unstacked_data_name <- next_default_item("observations_unstacked_data", self$get_data_names(), include_index = FALSE) + data_list[[observations_unstacked_data_name]] <- tidyr::pivot_wider(data = observations_df, names_from=element_abbrv, values_from=value) + } + + # Import list of data frames to data book + self$import_data(data_tables = data_list) + +}) + +#TODO. Deprecated. Delete this after after deleting the import from Climsoft wizard dialog DataBook$set("public", "import_from_climsoft", function(stationfiltercolumn = "stationId", stations = c(), elementfiltercolumn = "elementId", elements = c(), include_observation_data = FALSE, include_observation_flags = FALSE, unstack_data = FALSE, include_elements_info = FALSE, start_date = NULL, end_date = NULL) { #need to perform checks here con <- self$get_database_connection() diff --git a/instat/ucrScript.vb b/instat/ucrScript.vb index ebfb3d73b3e..8f1cad6613d 100644 --- a/instat/ucrScript.vb +++ b/instat/ucrScript.vb @@ -214,12 +214,10 @@ Public Class ucrScript Using dlgSave As New SaveFileDialog dlgSave.Title = "Save " & If(bIsLog, "Log", "Script") & " To File" - dlgSave.Filter = "R Script File (*.R)|*.R|Text File (*.txt)|*.txt" + dlgSave.Filter = "R Script File (*.R)|*.R|Text File (*.txt)|*.txt|JSON File (*.json)|*.json" dlgSave.FileName = Path.GetFileName(TabControl.SelectedTab.Text) - 'Ensure that dialog opens in correct folder. - 'In theory, we should be able to use `dlgLoad.RestoreDirectory = True` but this does - 'not work (I think a bug in WinForms).So we need to use static variables instead. + ' Ensure that dialog opens in the correct folder. Static strInitialDirectory As String = frmMain.clsInstatOptions.strWorkingDirectory Static strInitialDirectoryLog As String = frmMain.clsInstatOptions.strWorkingDirectory dlgSave.InitialDirectory = If(bIsLog, strInitialDirectoryLog, strInitialDirectory) @@ -232,6 +230,7 @@ Public Class ucrScript TabControl.SelectedTab.Text = System.IO.Path.GetFileNameWithoutExtension(dlgSave.FileName) frmMain.clsRecentItems.addToMenu(Replace(Path.Combine(Path.GetFullPath(strInitialDirectory), System.IO.Path.GetFileName(dlgSave.FileName)), "\", "/")) frmMain.bDataSaved = True + If bIsLog Then strInitialDirectoryLog = Path.GetDirectoryName(dlgSave.FileName) Else @@ -239,8 +238,8 @@ Public Class ucrScript End If Catch MsgBox("Could not save the " & If(bIsLog, "Log", "Script") & " file." & Environment.NewLine & - "The file may be in use by another program or you may not have access to write to the specified location.", - vbExclamation, "Save " & If(bIsLog, "Log", "Script")) + "The file may be in use by another program or you may not have access to write to the specified location.", + vbExclamation, "Save " & If(bIsLog, "Log", "Script")) End Try End If End Using @@ -530,9 +529,9 @@ Public Class ucrScript Using dlgLoad As New OpenFileDialog dlgLoad.Title = "Load Script From Text File" - dlgLoad.Filter = "Text & R Script Files (*.txt,*.R)|*.txt;*.R|R Script File (*.R)|*.R|Text File (*.txt)|*.txt" + dlgLoad.Filter = "Text & R Script Files (*.txt, *.R, *.json)|*.txt;*.R;*.json|R Script File (*.R)|*.R|Text File (*.txt)|*.txt|JSON File (*.json)|*.json" - 'Ensure that dialog opens in correct folder. + ' Ensure that dialog opens in the correct folder. 'In theory, we should be able to use `dlgLoad.RestoreDirectory = True` but this does 'not work (I think a bug in WinForms).So we need to use a static variable instead. Static strInitialDirectory As String = frmMain.clsInstatOptions.strWorkingDirectory