Sub Activity_Keypress (KeyCode As Int)As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If Msgbox2("Exit?", "", "Yes", "", "No", Null) = DialogResponse.POSITIVE Then
:
Dim FileMover As FTP
FileMover.Initialize("FTP","192.168.1.164",22,"xxx","xxx")
FileMover.PassiveMode = True
FileMover.UseSSL = False
:
Dim ServerPath As String = "\\WDMYCLOUD\Public\LALogs"
Dim Success As Boolean = False
Dim sf As Object = FileMover.UploadFile(File.DirRootExternal, "LALog.txt", False, "\\WDMYCLOUD\Public\LALogs\LALogTest1.txt")
Wait For (sf) ftp_UploadCompleted (ServerPath As String, Success As Boolean)
Msgbox("Session Ending - please wait", "Session Ending")
LogFile.Close()
Return False
ExitApplication
Else
Return True
End If
Else
Return False
End If
End Sub