B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=StaticCode
Version=11
@EndOfDesignText@
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.
	Public PatID As String
	Public PID As String
	Public sURL As String=""
	Public ResettimerInterval As Int
	Public Jobname As String
	Public PatName As String
	Public JobEnabled As Boolean=False
	Public Searchstring As String
	
End Sub

Sub Get_Params(Param As String) As String
	Try
		Dim result As String
		Dim TR As TextReader
		Dim inp As InputStream
		inp=File.OpenInput(File.DirInternal , "DPM.ini")
		TR.Initialize(inp)
		If Param="URL" Then
			Try
				result= TR.Readline
			Catch
				result=""
			End Try
		End If
		If Param="TIMER" Then
			Try
			  result=TR.Readline
			  result=TR.ReadLine
			Catch
				result=""
			End Try
		End If
		TR.Close
		Return result
	Catch
	End Try
End Sub

Sub Save_Parameter(url As String,append As Boolean)
	Dim Tw As TextWriter
	Dim out As OutputStream
	
	out = File.OpenOutput(File.DirInternal , "DPM.ini",append)
	Tw.Initialize(out)
		
	Tw.WriteLine(url)
	Tw.Flush
	Tw.close
	
End Sub