Skip to content

Commit

Permalink
Fixing correlation dialogue and subdialogue
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekogo committed Mar 7, 2016
1 parent 7fa2956 commit c0f25f5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
10 changes: 9 additions & 1 deletion instat/dlgCorrelation.vb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Public Class dlgCorrelation
ucrBase.clsRsyntax.AddParameter("alternative", Chr(34) & "two.sided" & Chr(34))
ucrBase.clsRsyntax.AddParameter("exact", "NULL")
bIsTwoColumnFunction = True
TestOKEnabled()
End Sub

Private Sub SetMultipleColumnAsFunction()
Expand All @@ -147,6 +148,7 @@ Public Class dlgCorrelation
SetUseParameter()
ucrBase.clsRsyntax.AddParameter("x", clsRFunctionParameter:=ucrReceiverMultipleColumns.GetVariables())
bIsTwoColumnFunction = False
TestOKEnabled()
End Sub

Private Sub ColumnTypeChanged(sender As Object, e As EventArgs) Handles rdoTwoColumns.CheckedChanged, rdoMultipleColumns.CheckedChanged
Expand All @@ -173,17 +175,23 @@ Public Class dlgCorrelation
If (rdoTwoColumns.Checked = True) Then
If ucrReceiverFirstColumn.IsEmpty() = False And ucrReceiverSecondColumn.IsEmpty() = False And (rdoPearson.Checked = True Or rdoKendall.Checked = True Or rdoSpearman.Checked = True) Then
ucrBase.OKEnabled(True)
Else
ucrBase.OKEnabled(False)
End If
ElseIf (rdoMultipleColumns.Checked = True) Then
If ucrReceiverMultipleColumns.IsEmpty() = False And ucrReceiverMultipleColumns.lstSelectedVariables.Items.Count > 1 And (rdoCompleteRowsOnly.Checked = True Or rdoPairwise.Checked = True) AndAlso (rdoPearson.Checked = True Or rdoKendall.Checked = True Or rdoSpearman.Checked = True) Then
ucrBase.OKEnabled(True)
Else
ucrBase.OKEnabled(False)
End If
Else
ucrBase.OKEnabled(False)
End If
End Sub

Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
sdgCorrPlot.RegOptions()
If (rdoMultipleColumns.Checked) Then
sdgCorrPlot.RegOptions()
End If
End Sub
End Class
40 changes: 20 additions & 20 deletions instat/sdgCorrPlot.Designer.vb

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

0 comments on commit c0f25f5

Please sign in to comment.