package shub.dpm;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class allgfnkt {
private static allgfnkt mostCurrent = new allgfnkt();
public static Object getObject() {
    throw new RuntimeException("Code module does not support this method.");
}
 public anywheresoftware.b4a.keywords.Common __c = null;
public static String _patid = "";
public static String _pid = "";
public static String _surl = "";
public static int _resettimerinterval = 0;
public static String _jobname = "";
public static String _patname = "";
public static boolean _jobenabled = false;
public static String _searchstring = "";
public shub.dpm.main _main = null;
public shub.dpm.parameter _parameter = null;
public shub.dpm.about _about = null;
public shub.dpm.barcodescanner _barcodescanner = null;
public shub.dpm.listdata _listdata = null;
public shub.dpm.starter _starter = null;
public shub.dpm.listpat _listpat = null;
public shub.dpm.b4xpages _b4xpages = null;
public shub.dpm.b4xcollections _b4xcollections = null;
public shub.dpm.httputils2service _httputils2service = null;
public static String  _get_params(anywheresoftware.b4a.BA _ba,String _param) throws Exception{
String _result = "";
anywheresoftware.b4a.objects.streams.File.TextReaderWrapper _tr = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _inp = null;
 //BA.debugLineNum = 17;BA.debugLine="Sub Get_Params(Param As String) As String";
 //BA.debugLineNum = 18;BA.debugLine="Try";
try { //BA.debugLineNum = 19;BA.debugLine="Dim result As String";
_result = "";
 //BA.debugLineNum = 20;BA.debugLine="Dim TR As TextReader";
_tr = new anywheresoftware.b4a.objects.streams.File.TextReaderWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Dim inp As InputStream";
_inp = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
 //BA.debugLineNum = 22;BA.debugLine="inp=File.OpenInput(File.DirInternal , \"DPM.ini\")";
_inp = anywheresoftware.b4a.keywords.Common.File.OpenInput(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),"DPM.ini");
 //BA.debugLineNum = 23;BA.debugLine="TR.Initialize(inp)";
_tr.Initialize((java.io.InputStream)(_inp.getObject()));
 //BA.debugLineNum = 24;BA.debugLine="If Param=\"URL\" Then";
if ((_param).equals("URL")) { 
 //BA.debugLineNum = 25;BA.debugLine="Try";
try { //BA.debugLineNum = 26;BA.debugLine="result= TR.Readline";
_result = _tr.ReadLine();
 } 
       catch (Exception e11) {
			(_ba.processBA == null ? _ba : _ba.processBA).setLastException(e11); //BA.debugLineNum = 28;BA.debugLine="result=\"\"";
_result = "";
 };
 };
 //BA.debugLineNum = 31;BA.debugLine="If Param=\"TIMER\" Then";
if ((_param).equals("TIMER")) { 
 //BA.debugLineNum = 32;BA.debugLine="Try";
try { //BA.debugLineNum = 33;BA.debugLine="result=TR.Readline";
_result = _tr.ReadLine();
 //BA.debugLineNum = 34;BA.debugLine="result=TR.ReadLine";
_result = _tr.ReadLine();
 } 
       catch (Exception e19) {
			(_ba.processBA == null ? _ba : _ba.processBA).setLastException(e19); //BA.debugLineNum = 36;BA.debugLine="result=\"\"";
_result = "";
 };
 };
 //BA.debugLineNum = 39;BA.debugLine="TR.Close";
_tr.Close();
 //BA.debugLineNum = 40;BA.debugLine="Return result";
if (true) return _result;
 } 
       catch (Exception e25) {
			(_ba.processBA == null ? _ba : _ba.processBA).setLastException(e25); };
 //BA.debugLineNum = 43;BA.debugLine="End Sub";
return "";
}
public static String  _process_globals() throws Exception{
 //BA.debugLineNum = 3;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 6;BA.debugLine="Public PatID As String";
_patid = "";
 //BA.debugLineNum = 7;BA.debugLine="Public PID As String";
_pid = "";
 //BA.debugLineNum = 8;BA.debugLine="Public sURL As String=\"\"";
_surl = "";
 //BA.debugLineNum = 9;BA.debugLine="Public ResettimerInterval As Int";
_resettimerinterval = 0;
 //BA.debugLineNum = 10;BA.debugLine="Public Jobname As String";
_jobname = "";
 //BA.debugLineNum = 11;BA.debugLine="Public PatName As String";
_patname = "";
 //BA.debugLineNum = 12;BA.debugLine="Public JobEnabled As Boolean=False";
_jobenabled = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 13;BA.debugLine="Public Searchstring As String";
_searchstring = "";
 //BA.debugLineNum = 15;BA.debugLine="End Sub";
return "";
}
public static String  _save_parameter(anywheresoftware.b4a.BA _ba,String _url,boolean _append) throws Exception{
anywheresoftware.b4a.objects.streams.File.TextWriterWrapper _tw = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
 //BA.debugLineNum = 45;BA.debugLine="Sub Save_Parameter(url As String,append As Boolean";
 //BA.debugLineNum = 46;BA.debugLine="Dim Tw As TextWriter";
_tw = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
 //BA.debugLineNum = 47;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 49;BA.debugLine="out = File.OpenOutput(File.DirInternal , \"DPM.ini";
_out = anywheresoftware.b4a.keywords.Common.File.OpenOutput(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),"DPM.ini",_append);
 //BA.debugLineNum = 50;BA.debugLine="Tw.Initialize(out)";
_tw.Initialize((java.io.OutputStream)(_out.getObject()));
 //BA.debugLineNum = 52;BA.debugLine="Tw.WriteLine(url)";
_tw.WriteLine(_url);
 //BA.debugLineNum = 53;BA.debugLine="Tw.Flush";
_tw.Flush();
 //BA.debugLineNum = 54;BA.debugLine="Tw.close";
_tw.Close();
 //BA.debugLineNum = 56;BA.debugLine="End Sub";
return "";
}
}
