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

Added Outfilling dialog #9381

Merged
merged 16 commits into from
Feb 24, 2025
498 changes: 498 additions & 0 deletions instat/dlgOutfillingStationData.Designer.vb

Large diffs are not rendered by default.

382 changes: 382 additions & 0 deletions instat/dlgOutfillingStationData.vb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions instat/dlgRestrict.vb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Public Class dlgRestrict

Private Sub cmdFilterFromFactors_Click(sender As Object, e As EventArgs) Handles cmdFilterFromFactors.Click
sdgFiltersFromFactor.SetRcodeAndDefaultDataFrame(ucrSelectorFilter, bReset:=bResetSubdialog)
sdgFiltersFromFactor.enumFactorMode = sdgFiltersFromFactor.FactorMode.Filter
sdgFiltersFromFactor.ShowDialog()
bResetSubdialog = False
ucrSelectorFilter.LoadList()
Expand Down
1 change: 0 additions & 1 deletion instat/frmMain.Designer.vb

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

6 changes: 3 additions & 3 deletions instat/instat.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@
<Compile Include="sdgSummaryThemes.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="static\InstatObject\R\dlgOutfillingStationData.Designer.vb">
<Compile Include="dlgOutfillingStationData.Designer.vb">
<DependentUpon>dlgOutfillingStationData.vb</DependentUpon>
</Compile>
<Compile Include="static\InstatObject\R\dlgOutfillingStationData.vb">
<Compile Include="dlgOutfillingStationData.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="UserTables\Cells\FootNotes\ucrCellsFootNotes.Designer.vb">
Expand Down Expand Up @@ -3450,7 +3450,7 @@
<EmbeddedResource Include="sdgSummaryThemes.resx">
<DependentUpon>sdgSummaryThemes.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="static\InstatObject\R\dlgOutfillingStationData.resx">
<EmbeddedResource Include="dlgOutfillingStationData.resx">
<DependentUpon>dlgOutfillingStationData.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserTables\Cells\FootNotes\ucrCellsFootNotes.resx">
Expand Down
39 changes: 37 additions & 2 deletions instat/sdgFiltersFromFactor.vb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ Public Class sdgFiltersFromFactor
Private bFirstLoad As Boolean
Private bReset As Boolean = True
Private clsAddFilterFromFactors As RFunction
Public enumFactorMode As String = FactorMode.Filter
Public Enum FactorMode
OutFilling
Filter
End Enum

Public Sub New()
'This call is required by the designer.
Expand All @@ -35,6 +40,7 @@ Public Class sdgFiltersFromFactor
InitialiseControls()
bFirstLoad = False
End If
OpeningMode()
autoTranslate(Me)
End Sub

Expand All @@ -55,18 +61,20 @@ Public Class sdgFiltersFromFactor
dctParamAndColNames:=dctParamAndColNames,
hiddenColNames:={ucrFactor.DefaultColumnNames.Level},
bIncludeNALevel:=False)
' Automatically select all rows by default
AddHandler ucrReceiverFactor.SelectionChanged, AddressOf SelectAllFactorLevels

End Sub

Public Sub SetRcodeAndDefaultDataFrame(ucrNewBaseSelector As ucrSelector, bReset As Boolean)
If ucrNewBaseSelector IsNot Nothing AndAlso ucrNewBaseSelector.strCurrentDataFrame <> "" Then
ucrSelectorFiltersFromFactors.SetDataframe(ucrNewBaseSelector.strCurrentDataFrame, False)
End If
ucrReceiverFactor.SetRCode(clsAddFilterFromFactors, bReset)
ucrFactorLevels.SetRCode(clsAddFilterFromFactors, bReset)

If bReset Then
ucrSelectorFiltersFromFactors.Reset()
ucrFactorLevels.SetRCode(clsAddFilterFromFactors, bReset)
ucrReceiverFactor.SetRCode(clsAddFilterFromFactors, bReset)
End If
End Sub

Expand All @@ -79,4 +87,31 @@ Public Class sdgFiltersFromFactor
Private Sub ucrSelectorFiltersFromFactors_DataFrameChanged() Handles ucrSelectorFiltersFromFactors.DataFrameChanged
clsAddFilterFromFactors.AddParameter("data_name", Chr(34) & ucrSelectorFiltersFromFactors.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34), iPosition:=0)
End Sub

Public Function GetSelectedStations() As String
Dim strSelectedLevels As String = mdlCoreControl.GetRVector(
ucrFactorLevels.GetSelectedCellValues(ucrFactor.DefaultColumnNames.Label, True)
)

If strSelectedLevels <> "" Then
Return strSelectedLevels
Else
Return ""
End If
End Function

Private Sub SelectAllFactorLevels()
If ucrFactorLevels.RowCount > 0 Then
ucrFactorLevels.SelectAllGridRows(True) ' Pass True to select all rows
End If
End Sub

Private Sub OpeningMode()
Select Case enumFactorMode
Case FactorMode.Filter
Me.Text = "Filters From Factor"
Case FactorMode.OutFilling
Me.Text = "Stations to Include"
End Select
End Sub
End Class
54 changes: 0 additions & 54 deletions instat/static/InstatObject/R/dlgOutfillingStationData.Designer.vb

This file was deleted.

3 changes: 0 additions & 3 deletions instat/static/InstatObject/R/dlgOutfillingStationData.vb

This file was deleted.

Binary file modified instat/translations/rInstatTranslations.db
Binary file not shown.
Loading