Skip to content

Commit

Permalink
Merge pull request #6 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
new version
  • Loading branch information
stevenndungu authored Oct 13, 2016
2 parents 9a5e0de + 2240b7c commit ed67c90
Show file tree
Hide file tree
Showing 22 changed files with 409 additions and 111 deletions.
27 changes: 27 additions & 0 deletions instat/My Project/Resources.Designer.vb

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

9 changes: 9 additions & 0 deletions instat/My Project/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1513,4 +1513,13 @@
<data name="Location" xml:space="preserve">
<value>Location</value>
</data>
<data name="Beta" xml:space="preserve">
<value>Beta</value>
</data>
<data name="Negative_Binomial" xml:space="preserve">
<value>Negative Binomial</value>
</data>
<data name="Students_t" xml:space="preserve">
<value>Students t</value>
</data>
</root>
53 changes: 30 additions & 23 deletions instat/dlgMakeDate.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Imports instat.Translations
Public Class dlgMakeDate
Public clsPaste As New RFunction
Public bFirstLoad As Boolean = True
Private Sub ucrSeclectorMakeDate_Load(sender As Object, e As EventArgs) Handles ucrSeclectorMakeDate.Load
Private Sub dlgMakeDate_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
InitialiseDialog()
InitialiseDialog()
SetDefaults()
bFirstLoad = False
Else
ReopenDialog()
End If
TestOKEnabled()
autoTranslate(Me)
bFirstLoad = False
Else
ReopenDialog()
End If
TestOKEnabled()
autoTranslate(Me)

End Sub

Expand All @@ -46,7 +46,7 @@ Public Class dlgMakeDate
ucrInputComboBoxTearThree.SetItems({"4 digits", "2 digits"})
ucrInputOrigin.SetItems({"30-12-1899 (Excel)", "01-03-1600 (Gregorian)"})

ucrBase.clsRsyntax.SetFunction("as.Date")
ucrBase.clsRsyntax.SetFunction("as.Date")
ucrBase.clsRsyntax.AddParameter("x")

End Sub
Expand Down Expand Up @@ -79,8 +79,20 @@ Public Class dlgMakeDate
ucrBase.OKEnabled(False)
End If
End Sub
Private Sub DateFormat()
Select Case ucrInputOrigin.GetText
Case "30-12-1899 (Excel)"
ucrBase.clsRsyntax.AddParameter("origin", Chr(34) & "1899-12-30" & Chr(34))
Case Else
ucrBase.clsRsyntax.AddParameter("origin", Chr(34) & "1600-01-03" & Chr(34))
End Select
End Sub

Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
setHistory()
End Sub

Private Sub setHistory()
If Not ucrInputFormat.cboInput.Items.Contains(ucrInputFormat.GetText) Then
ucrInputFormat.cboInput.Items.Insert(0, ucrInputFormat.GetText)
Else
Expand Down Expand Up @@ -124,10 +136,6 @@ Public Class dlgMakeDate
End If
End Sub

Private Sub ucrReceiverForDate_Load(sender As Object, e As EventArgs)

End Sub

Private Sub rdoSingleColumn_CheckedChanged(sender As Object, e As EventArgs) Handles rdoSingleColumn.CheckedChanged, rdoYearandDayofYear.CheckedChanged, rdoYearMonthDay.CheckedChanged
ShowGroups()
End Sub
Expand Down Expand Up @@ -186,26 +194,24 @@ Public Class dlgMakeDate
Formats()
End Sub

Private Sub ucrSeclectorMakeDate_DataFrameChanged() Handles ucrSeclectorMakeDate.DataFrameChanged

End Sub


Private Sub ucrInputOrigin_NameChanged() Handles ucrInputOrigin.NameChanged
Formats()
If Not ucrInputOrigin.IsEmpty Then
DateFormat()
Else
ucrBase.clsRsyntax.RemoveParameter("origin")
End If

End Sub

Private Sub Formats()
If rdoSpecifyOrigin.Checked Then
ucrReceiverForDate.SetIncludedDataTypes({"numeric"})
ucrInputFormat.Visible = False
ucrBase.clsRsyntax.RemoveParameter("format")
If Not ucrInputOrigin.IsEmpty Then
ucrBase.clsRsyntax.AddParameter("origin", Chr(34) & ucrInputOrigin.GetText & Chr(34))
Else
ucrBase.clsRsyntax.RemoveParameter("origin")

End If
ElseIf rdoSpecifyFormat.Checked Then
ucrReceiverForDate.SetIncludedDataTypes({"numeric", "character", "factor", "integer"})
ucrBase.clsRsyntax.RemoveParameter("origin")
ucrInputFormat.Visible = True
If Not ucrInputFormat.IsEmpty Then
Expand All @@ -215,6 +221,7 @@ Public Class dlgMakeDate
End If
Else
ucrInputFormat.Visible = False
ucrReceiverForDate.SetIncludedDataTypes({"numeric", "character", "factor", "integer"})
ucrBase.clsRsyntax.RemoveParameter("format")
ucrBase.clsRsyntax.RemoveParameter("origin")
End If
Expand Down
7 changes: 5 additions & 2 deletions instat/dlgOneVarFitModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ Public Class dlgOneVarFitModel

Private Sub chkSaveModel_CheckedChanged(sender As Object, e As EventArgs) Handles chkSaveModel.CheckedChanged
If chkSaveModel.Checked Then
ucrSaveModel.Enabled = True
ucrSaveModel.Visible = True
Else
ucrSaveModel.Enabled = False
ucrSaveModel.Visible = False
End If
AssignSaveModel()
TestOKEnabled()
Expand Down Expand Up @@ -171,6 +171,9 @@ Public Class dlgOneVarFitModel
If sdgOneVarFitModel.rdoMle.Checked AndAlso (sdgOneVarFitModDisplay.rdoLoglik.Checked Or sdgOneVarFitModDisplay.rdoLik.Checked) Then
sdgOneVarFitModDisplay.RunLikelihoods()
End If
' If Not sdgOneVarFitModel.rdoMle.Checked AndAlso (sdgOneVarFitModDisplay.rdoLoglik.Checked Or sdgOneVarFitModDisplay.rdoLik.Checked) Then
'message to say likelihood won't be displayed
' End If
End Sub

End Class
2 changes: 1 addition & 1 deletion instat/dlgOneVarUseModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Public Class dlgOneVarUseModel
End Sub

Private Sub ucrSelector_DataFrameChanged() Handles ucrSelector.DataFrameChanged
' AssignSaveModel()
AssignSavetoDataFrame()
' AssignSaveObjects()
End Sub

Expand Down
2 changes: 1 addition & 1 deletion instat/dlgOneVariableGraph.vb
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ Public Class dlgOneVariableGraph
rdoCombineGraph.Enabled = False
End If
End Sub
End Class
End Class
4 changes: 0 additions & 4 deletions instat/frmMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,4 @@ Public Class frmMain
Private Sub mnuOrganiseColumnMakeDate_Click(sender As Object, e As EventArgs) Handles mnuOrganiseColumnMakeDate.Click
dlgMakeDate.ShowDialog()
End Sub

Private Sub mnuOrganiseColumnMakeDate_Click_1(sender As Object, e As EventArgs) Handles mnuOrganiseColumnMakeDate.Click
dlgMakeDate.ShowDialog()
End Sub
End Class
9 changes: 9 additions & 0 deletions instat/instat.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@
<Compile Include="sdgDescribeTwoVarGraph.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="sdgFactorDataFrame.Designer.vb">
<DependentUpon>sdgFactorDataFrame.vb</DependentUpon>
</Compile>
<Compile Include="sdgFactorDataFrame.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="sdgMerge.Designer.vb">
<DependentUpon>sdgMerge.vb</DependentUpon>
</Compile>
Expand Down Expand Up @@ -2763,6 +2769,9 @@
<EmbeddedResource Include="sdgDescribeTwoVarGraph.sw-KE.resx">
<DependentUpon>sdgDescribeTwoVarGraph.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="sdgFactorDataFrame.resx">
<DependentUpon>sdgFactorDataFrame.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="sdgMerge.fr-FR.resx">
<DependentUpon>sdgMerge.vb</DependentUpon>
</EmbeddedResource>
Expand Down
48 changes: 48 additions & 0 deletions instat/sdgFactorDataFrame.Designer.vb

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

Loading

0 comments on commit ed67c90

Please sign in to comment.