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

update #199

Merged
merged 20 commits into from
Jan 5, 2024
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
22 changes: 8 additions & 14 deletions instat/dlgAddLink.vb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Public Class dlgAddLink
If bFirstLoad Then
InitialiseDialog()
bFirstLoad = False
Else
ReopenDialog()
End If
If bReset Then
SetDefaults()
Expand Down Expand Up @@ -68,8 +66,6 @@ Public Class dlgAddLink
ucrDataSelectorTo.Reset()
ucrSaveLink.Reset()

UpdateKeys()

clsAddLink.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$add_link")
clsAddLink.AddParameter("type", Chr(34) & "keyed_link" & Chr(34), iPosition:=3)

Expand All @@ -95,11 +91,7 @@ Public Class dlgAddLink
TestOKEnabled()
End Sub

Private Sub ReopenDialog()
UpdateKeys() ' currently I may open the dialog, then realise I haven't set my keys, make my key, reopen this dlg and my key doesn't show up until I reset it.
End Sub

Public Sub UpdateKeys()
Private Sub UpdateKeys()
Dim clsColumnNames As New RFunction
Dim lstKeys As GenericVector
Dim chrKeyColumns As CharacterVector
Expand All @@ -108,17 +100,19 @@ Public Class dlgAddLink
Dim bCanAutoLink As Boolean
Dim strColumnNames As String()
Dim clsGetKeys As New RFunction
Dim strDataFrameTo As String = ucrDataSelectorTo.cboAvailableDataFrames.Text
Dim strDataFrameFrom As String = ucrDataSelectorFrom.cboAvailableDataFrames.Text

If ucrDataSelectorTo.cboAvailableDataFrames.Text <> "" Then
If Not String.IsNullOrEmpty(strDataFrameFrom) AndAlso Not String.IsNullOrEmpty(strDataFrameTo) Then
lvwLinkViewBox.Items.Clear()

lblKeys.Text = ucrDataSelectorTo.cboAvailableDataFrames.SelectedItem & GetTranslation(" Keys:")
lblKeys.Text = strDataFrameTo & GetTranslation(" Keys:")
clsGetKeys.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_keys")
clsGetKeys.AddParameter("data_name", Chr(34) & ucrDataSelectorTo.cboAvailableDataFrames.SelectedItem & Chr(34))
clsGetKeys.AddParameter("data_name", Chr(34) & strDataFrameTo & Chr(34))
lstKeys = frmMain.clsRLink.RunInternalScriptGetValue(clsGetKeys.ToScript).AsList

clsColumnNames.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_names")
clsColumnNames.AddParameter("data_name", Chr(34) & ucrDataSelectorFrom.cboAvailableDataFrames.SelectedItem & Chr(34))
clsColumnNames.AddParameter("data_name", Chr(34) & strDataFrameFrom & Chr(34))
strColumnNames = frmMain.clsRLink.RunInternalScriptGetValue(clsColumnNames.ToScript).AsCharacter().ToArray

For i = 0 To lstKeys.Count - 1
Expand Down Expand Up @@ -169,7 +163,7 @@ Public Class dlgAddLink
End If
End Function

Private Sub ucrDataSelectorTo_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDataSelectorTo.ControlValueChanged
Private Sub ucrDataSelectorTo_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDataSelectorTo.ControlValueChanged, ucrDataSelectorFrom.ControlValueChanged
UpdateKeys()
End Sub

Expand Down
132 changes: 66 additions & 66 deletions instat/dlgAutoSaveRecovery.Designer.vb

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

Loading
Loading