Skip to content

Commit

Permalink
Merge pull request #394 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
updated my master
  • Loading branch information
conlooptechnologies authored Apr 1, 2023
2 parents 8305a93 + de98fd8 commit 1b294ef
Show file tree
Hide file tree
Showing 46 changed files with 1,795 additions and 1,968 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,4 @@ installer/Output/
/packages/jacobslusser.ScintillaNET.*/

/packages/NLog.*/
/packages/Newtonsoft.Json.*/
/packages/Newtonsoft.Json.*/
2 changes: 0 additions & 2 deletions instat/Translations.vb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ Public Class Translations
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrColumnMeta.Name, frmMain.ucrColumnMeta.statusColumnMenu.Items, strDbPath, strLanguageCode))
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrDataFrameMeta.Name, frmMain.ucrDataFrameMeta.cellContextMenuStrip.Items, strDbPath, strLanguageCode))
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrDataFrameMeta.Name, frmMain.ucrDataFrameMeta.rowRightClickMenu.Items, strDbPath, strLanguageCode))
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrLogWindow.Name, frmMain.ucrLogWindow.mnuContextLogFile.Items, strDbPath, strLanguageCode))
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrScriptWindow.Name, frmMain.ucrScriptWindow.mnuContextScript.Items, strDbPath, strLanguageCode))
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrDataViewer.Name, frmMain.ucrDataViewer.rowContextMenu.Items, strDbPath, strLanguageCode))
HandleError(TranslateWinForm.clsTranslateWinForm.TranslateMenuItems(frmMain.ucrDataViewer.Name, frmMain.ucrDataViewer.ColumnContextMenu.Items, strDbPath, strLanguageCode))
Expand Down Expand Up @@ -202,7 +201,6 @@ Public Class Translations
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrColumnMeta, frmMain.ucrColumnMeta.statusColumnMenu.Items)
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrDataFrameMeta, frmMain.ucrDataFrameMeta.cellContextMenuStrip.Items)
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrDataFrameMeta, frmMain.ucrDataFrameMeta.rowRightClickMenu.Items)
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrLogWindow, frmMain.ucrLogWindow.mnuContextLogFile.Items)
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrScriptWindow, frmMain.ucrScriptWindow.mnuContextScript.Items)
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrDataViewer, frmMain.ucrDataViewer.RowContextMenu.Items)
strControlsAsCsv &= TranslateWinForm.clsTranslateWinForm.GetMenuItemsAsCsv(frmMain.ucrDataViewer, frmMain.ucrDataViewer.ColumnContextMenu.Items)
Expand Down
26 changes: 1 addition & 25 deletions instat/clsRLink.vb
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@ Public Class RLink
''' <summary> True if the link to the R environment is initialised. </summary>
Public bREngineInitialised As Boolean = False

''' The log window.
Public txtLog As New TextBox

''' <summary>
''' Is set to True when the log window is defined.
''' If set to False, R scripts will not be logged.
''' </summary>
Public bLogRScripts As Boolean = False

''' <summary> True to climate object exists. </summary>
Public bClimateObjectExists As Boolean = False 'TODO SJL 23/04/20 Not used. Delete?

Expand Down Expand Up @@ -134,7 +125,6 @@ Public Class RLink
''' The time in seconds to wait before showing the waiting dialog
Private iWaitDelay As Integer = 2


''' <summary> The R version major required. </summary>
Private strRVersionMajorRequired As String = "4"

Expand Down Expand Up @@ -474,16 +464,6 @@ Public Class RLink
End Sub


'''--------------------------------------------------------------------------------------------
''' <summary> Sets the log window. </summary>
'''
''' <param name="tempLog"> The log window. </param>
'''--------------------------------------------------------------------------------------------
Public Sub SetLog(tempLog As TextBox)
txtLog = tempLog
bLogRScripts = True
End Sub

'''--------------------------------------------------------------------------------------------
''' <summary> Gets a list of data frame names. </summary>
'''
Expand Down Expand Up @@ -801,11 +781,7 @@ Public Class RLink
'Prefix comment to script, e.g. "# Code generated by the dialog, Import Dataset" & vbCrLf & "new_RDS <- readRDS(file=""C:/Users/myName ...
Dim strScriptWithComment As String = If(String.IsNullOrEmpty(strComment), strScript, GetFormattedComment(strComment) & Environment.NewLine & strScript)

If bLogRScripts Then
'todo. adding a lot of text to the text control can raise an out of memory exception.
'change this to only display the text when the audit log is visible.
txtLog.Text = txtLog.Text & strScriptWithComment & Environment.NewLine
End If
frmMain.ucrScriptWindow.LogText(strScriptWithComment & Environment.NewLine)

'TODO SJL 20/04/20 - is the commented out check below needed?
'If strScript.Length > 2000 Then
Expand Down
19 changes: 16 additions & 3 deletions instat/dlgDeleteDataFrames.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/dlgDeleteDataFrames.vb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Public Class dlgDeleteDataFrames
SetRCodeForControls(bReset)
bReset = False
TestOKEnabled()
CountLevels()
autoTranslate(Me)
End Sub

Expand All @@ -49,6 +50,8 @@ Public Class dlgDeleteDataFrames
ucrReceiverDataFrames.SetMeAsReceiver()
ucrReceiverDataFrames.SetItemType("dataframe")
ucrReceiverDataFrames.strSelectorHeading = "Data Frames"

lblDeleteNumber.ForeColor = Color.Red
End Sub

Private Sub SetDefaults()
Expand Down Expand Up @@ -107,5 +110,11 @@ Public Class dlgDeleteDataFrames

Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDataFrames.ControlContentsChanged
TestOKEnabled()
CountLevels()
End Sub

Private Sub CountLevels()
lblDeleteNumber.Text = " " & ucrReceiverDataFrames.Count
lblDeleteNumber.Visible = ucrReceiverDataFrames.Count > 0
End Sub
End Class
15 changes: 14 additions & 1 deletion instat/dlgDeleteObjects.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/dlgDeleteObjects.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Public Class dlgDeleteObjects
SetRCodeforControls(bReset)
bReset = False
autoTranslate(Me)
CountLevels()
TestOKEnabled()
End Sub

Expand All @@ -60,6 +61,8 @@ Public Class dlgDeleteObjects
dctTypes.Add("Models", Chr(34) & "model" & Chr(34))
ucrInputComboType.SetItems(dctTypes)
ucrInputComboType.SetDropDownStyleAsNonEditable()

lblDeleteNumber.ForeColor = Color.Red
End Sub

Private Sub SetDefaults()
Expand Down Expand Up @@ -107,5 +110,11 @@ Public Class dlgDeleteObjects

Private Sub ucrReceiverObjectsToDelete_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverObjectsToDelete.ControlContentsChanged
TestOKEnabled()
CountLevels()
End Sub

Private Sub CountLevels()
lblDeleteNumber.Text = " " & ucrReceiverObjectsToDelete.Count
lblDeleteNumber.Visible = ucrReceiverObjectsToDelete.Count > 0
End Sub
End Class
35 changes: 34 additions & 1 deletion instat/dlgEnter.Designer.vb

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

5 changes: 4 additions & 1 deletion instat/dlgEnter.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
<value>17, 5</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
<value>124</value>
</metadata>
<metadata name="ContextMenuStripBase.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>519, 24</value>
</metadata>
</root>
8 changes: 8 additions & 0 deletions instat/dlgEnter.vb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Public Class dlgEnter
Dim clsLength As New RFunction
Public bFirstLoad As Boolean = True
Public strOutput As String
Private strPackageName As String
Public clsCommands As New RFunction

Private Sub dlgEnter_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Expand Down Expand Up @@ -375,4 +376,11 @@ Public Class dlgEnter
Private Sub cmdRunif_Click(sender As Object, e As EventArgs)
ucrReceiverForEnterCalculation.AddToReceiverAtCursorPosition("runif( )", 2)
End Sub

Private Sub cmdRHelp_Click(sender As Object, e As EventArgs) Handles cmdRHelp.Click, ToolStripMenuBase.Click
strPackageName = "base"
If Not String.IsNullOrEmpty(strPackageName) Then
frmMaximiseOutput.Show(strFileName:=clsFileUrlUtilities.GetHelpFileURL(strPackageName:=strPackageName), bReplace:=False)
End If
End Sub
End Class
5 changes: 1 addition & 4 deletions instat/dlgFind.vb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ Public Class dlgFind
Private Sub cmdFindNext_Click(sender As Object, e As EventArgs) Handles cmdFindNext.Click

Select Case currWindow.Name
Case "frmLog"
searchTextBox(frmLog.txtLog, targetPos)

Case "frmCommand"
searchTextBox(frmCommand.txtCommand, targetPos)

Expand Down Expand Up @@ -103,7 +100,7 @@ Public Class dlgFind
cmdFindNext.Enabled = True
Me.AcceptButton = cmdFindNext
cmdFindAll.Enabled = False
ElseIf currWindow.Name = "frmCommand" Or currWindow.Name = "frmLog" Then
ElseIf currWindow.Name = "frmCommand" Then
cmdFindNext.Enabled = True
Me.AcceptButton = cmdFindNext
cmdFindAll.Enabled = False
Expand Down
Loading

0 comments on commit 1b294ef

Please sign in to comment.