Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add day preview textbox to climatic dialogs #4494

Merged
merged 4 commits into from
Apr 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions instat/dlgClimaticSummary.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 46 additions & 25 deletions instat/dlgClimaticSummary.resx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rdoAnnual.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="rdoAnnualVariable.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
Expand Down Expand Up @@ -184,7 +184,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rdoAnnualVariable.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="rdoWithinYear.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
Expand Down Expand Up @@ -217,7 +217,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rdoWithinYear.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<data name="lblStation.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
Expand All @@ -244,7 +244,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblStation.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="lblDate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
Expand All @@ -271,7 +271,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblDate.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="lblYear.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
Expand All @@ -298,7 +298,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblYear.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="lblDay.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
Expand All @@ -325,7 +325,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblDay.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="lblElement.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
Expand All @@ -352,10 +352,10 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblElement.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="cmdSummary.Location" type="System.Drawing.Point, System.Drawing">
<value>302, 325</value>
<value>274, 326</value>
</data>
<data name="cmdSummary.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 26</value>
Expand All @@ -376,7 +376,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;cmdSummary.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="lblWithinYear.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
Expand All @@ -403,7 +403,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblWithinYear.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="ucrSelectorVariable.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 48</value>
Expand All @@ -427,7 +427,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrSelectorVariable.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
Expand All @@ -436,13 +436,34 @@
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>415, 421</value>
<value>415, 450</value>
</data>
<data name="ucrInputFilterPreview.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 362</value>
</data>
<data name="ucrInputFilterPreview.Size" type="System.Drawing.Size, System.Drawing">
<value>242, 22</value>
</data>
<data name="ucrInputFilterPreview.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="&gt;&gt;ucrInputFilterPreview.Name" xml:space="preserve">
<value>ucrInputFilterPreview</value>
</data>
<data name="&gt;&gt;ucrInputFilterPreview.Type" xml:space="preserve">
<value>instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;ucrInputFilterPreview.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;ucrInputFilterPreview.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmdDoyRange.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cmdDoyRange.Location" type="System.Drawing.Point, System.Drawing">
<value>184, 325</value>
<value>10, 358</value>
</data>
<data name="cmdDoyRange.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 26</value>
Expand All @@ -463,7 +484,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;cmdDoyRange.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;ucrChkOmitMissingValues.Name" xml:space="preserve">
<value>ucrChkOmitMissingValues</value>
Expand Down Expand Up @@ -535,7 +556,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;grpOptions.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="ucrReceiverElement.Location" type="System.Drawing.Point, System.Drawing">
<value>259, 166</value>
Expand All @@ -559,7 +580,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrReceiverElement.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="ucrReceiverDOY.Location" type="System.Drawing.Point, System.Drawing">
<value>259, 248</value>
Expand All @@ -583,7 +604,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrReceiverDOY.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="ucrReceiverYear.Location" type="System.Drawing.Point, System.Drawing">
<value>259, 207</value>
Expand All @@ -607,7 +628,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrReceiverYear.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="ucrReceiverDate.Location" type="System.Drawing.Point, System.Drawing">
<value>259, 125</value>
Expand All @@ -631,7 +652,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrReceiverDate.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="ucrReceiverStation.Location" type="System.Drawing.Point, System.Drawing">
<value>259, 84</value>
Expand All @@ -655,10 +676,10 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrReceiverStation.ZOrder" xml:space="preserve">
<value>15</value>
<value>16</value>
</data>
<data name="ucrBase.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 363</value>
<value>10, 394</value>
</data>
<data name="ucrBase.Size" type="System.Drawing.Size, System.Drawing">
<value>399, 52</value>
Expand All @@ -676,7 +697,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrBase.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="ucrPnlAnnualWithin.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 10</value>
Expand All @@ -697,7 +718,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrPnlAnnualWithin.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
Expand Down Expand Up @@ -733,7 +754,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ucrReceiverWithinYear.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="ucrChkOmitMissingValues.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 93</value>
Expand Down
12 changes: 12 additions & 0 deletions instat/dlgClimaticSummary.vb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Public Class dlgClimaticSummary
'ucrReceiverFrom.SetLinkedDisplayControl(lblReceiverFrom)
'ucrReceiverTo.SetLinkedDisplayControl(lblReceiverTo)
ucrReceiverWithinYear.SetLinkedDisplayControl(lblWithinYear)

ucrInputFilterPreview.IsReadOnly = True
End Sub

Private Sub SetDefaults()
Expand Down Expand Up @@ -262,6 +264,7 @@ Public Class dlgClimaticSummary
Private Sub cmdDoyRange_Click(sender As Object, e As EventArgs) Handles cmdDoyRange.Click
sdgDoyRange.Setup(clsNewDoyFilterCalc:=clsDayFilterCalc, clsNewDayFromOperator:=clsFromConditionOperator, clsNewDayToOperator:=clsToConditionOperator, clsNewCalcFromList:=clsDayFilterCalcFromList, strNewMainDataFrame:=ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strNewDoyColumn:=ucrReceiverDOY.GetVariableNames(False))
sdgDoyRange.ShowDialog()
UpdateDayFilterPreview()
End Sub

Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDOY.ControlValueChanged, ucrSelectorVariable.ControlValueChanged
Expand All @@ -270,6 +273,7 @@ Public Class dlgClimaticSummary
Else
clsDayFilterCalcFromList.RemoveParameterByName(ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text)
End If
UpdateDayFilterPreview()
End Sub

Private Sub ucrPnlAnnualWithin_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlAnnualWithin.ControlValueChanged, ucrReceiverWithinYear.ControlValueChanged
Expand All @@ -296,4 +300,12 @@ Public Class dlgClimaticSummary
Private Sub ucrSelectorVariable_DataFrameChanged() Handles ucrSelectorVariable.DataFrameChanged
clsDayFilterCalcFromList.ClearParameters()
End Sub

Private Sub UpdateDayFilterPreview()
If ucrReceiverDOY.IsEmpty Then
ucrInputFilterPreview.SetName("")
Else
ucrInputFilterPreview.SetName(clsFromAndToConditionOperator.ToScript())
End If
End Sub
End Class
2 changes: 2 additions & 0 deletions instat/dlgExtremesClimatic.vb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ Public Class dlgExtremesClimatic
ucrPnlExtremesType.AddToLinkedControls(ucrChkNDates, {rdoMinMax}, bNewLinkedHideIfParameterMissing:=True)

ucrPnlMaxMin.SetLinkedDisplayControl(lblNewColName)

ucrInputFilterPreview.IsReadOnly = True
End Sub

Private Sub SetDefaults()
Expand Down
Loading