'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim SQL1 As SQL
Dim MediaPlayer1 As MediaPlayer
Dim timer1 As Timer
'----------------------------Start SQLite--------------------------------------------------------------------------------------------------
Dim DBFileName As String :DBFileName = "edbmo.db3"
Dim DBTableName As String :DBTableName = "issues"
Dim DBFileDir As String :DBFileDir = File.DirInternal
Dim DBFileDirEx As String :DBFileDirEx = File.DirDefaultExternal
'------------------------------End SQLite -----------------------------------------------------------------------------------------------
Dim IssueID As Int
Dim ProductID As Int
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim btnIntro As Button
Dim btnAudio As Button
Dim btnIssues As Button
Dim btnProducts As Button
Dim btnDocuments As Button
'-----------------------------Start Audio Player -----------------------------------------------------------------------------------------
Dim barPosition As SeekBar
Dim barVolume As SeekBar
Dim lblPosition As Label
Dim Looping As ToggleButton
'-----------------------------End Audio Player -----------------------------------------------------------------------------------------
End Sub
Sub Activity_Create(FirstTime As Boolean)
File.Delete(File.DirDefaultExternal, DBFileName) ' for testing
'Copy and Initialize database
If File.Exists(File.DirDefaultExternal, DBFileName) = False Then
DBFileDir = DBUtils.CopyDBFromAssets(DBFileName)
End If
SQL1.Initialize(DBFileDir, DBFileName, True)
Activity.LoadLayout("Main") ' Loads "Main" layout file
'Msgbox(DBFileDir,"Path Info")
End Sub
Sub btnIssues_Click
If btnIssues.Text="Issues" Then
'Msgbox("Issues Selected","INFO")
StartActivity(IssueList)
End If
End Sub
Sub btnAudio_Click
If btnAudio.Text="Audio" Then
StartActivity(AudioPlayer)
End If
End Sub
Sub btnProducts_Click
If btnProducts.Text="Products" Then
StartActivity(ProductList)
End If
End Sub
Sub btnIntro_Click
If btnIntro.Text="Introduction to Essential Oils" Then
StartActivity(Intro)
End If
End Sub
Sub btnDocuments_Click
If btnDocuments.Text="Documents" Then
StartActivity(Documents)
End If
End Sub