package shub.dpm;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class param_subs_0 {


public static RemoteObject  _activity_create(RemoteObject _firsttime) throws Exception{
try {
		Debug.PushSubsStack("Activity_Create (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,23);
if (RapidSub.canDelegate("activity_create")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","activity_create", _firsttime);}
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 23;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 26;BA.debugLine="Activity.LoadLayout(\"Parameter\")";
Debug.ShouldStop(33554432);
param.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("Parameter")),param.mostCurrent.activityBA);
 BA.debugLineNum = 27;BA.debugLine="If File.Exists(File.DirInternal ,\"DPM.ini\") = Tru";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",param.mostCurrent.__c.getField(false,"File").runMethod(true,"Exists",(Object)(param.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("DPM.ini"))),param.mostCurrent.__c.getField(true,"True"))) { 
 BA.debugLineNum = 28;BA.debugLine="Get_Params";
Debug.ShouldStop(134217728);
_get_params();
 };
 BA.debugLineNum = 30;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_pause(RemoteObject _userclosed) throws Exception{
try {
		Debug.PushSubsStack("Activity_Pause (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,57);
if (RapidSub.canDelegate("activity_pause")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","activity_pause", _userclosed);}
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 57;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 59;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_resume() throws Exception{
try {
		Debug.PushSubsStack("Activity_Resume (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,53);
if (RapidSub.canDelegate("activity_resume")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","activity_resume");}
 BA.debugLineNum = 53;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 55;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnparamcancel_click() throws Exception{
try {
		Debug.PushSubsStack("btnParamCancel_Click (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,69);
if (RapidSub.canDelegate("btnparamcancel_click")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","btnparamcancel_click");}
 BA.debugLineNum = 69;BA.debugLine="Private Sub btnParamCancel_Click";
Debug.ShouldStop(16);
 BA.debugLineNum = 70;BA.debugLine="txtUrl.ForceDoneButton=False";
Debug.ShouldStop(32);
param.mostCurrent._txturl.runVoidMethod ("setForceDoneButton",param.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 71;BA.debugLine="Activity.Finish";
Debug.ShouldStop(64);
param.mostCurrent._activity.runVoidMethod ("Finish");
 BA.debugLineNum = 72;BA.debugLine="StartActivity(\"main\")";
Debug.ShouldStop(128);
param.mostCurrent.__c.runVoidMethod ("StartActivity",param.processBA,(Object)((RemoteObject.createImmutable("main"))));
 BA.debugLineNum = 75;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnparamsave_click() throws Exception{
try {
		Debug.PushSubsStack("btnParamSave_Click (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,61);
if (RapidSub.canDelegate("btnparamsave_click")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","btnparamsave_click");}
 BA.debugLineNum = 61;BA.debugLine="Private Sub btnParamSave_Click";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 62;BA.debugLine="txtUrl.ForceDoneButton=False";
Debug.ShouldStop(536870912);
param.mostCurrent._txturl.runVoidMethod ("setForceDoneButton",param.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 63;BA.debugLine="Save_Parameter(txtUrl.Text,False)";
Debug.ShouldStop(1073741824);
_save_parameter(param.mostCurrent._txturl.runMethod(true,"getText"),param.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 64;BA.debugLine="Save_Parameter(txtTimeout.Text,True)";
Debug.ShouldStop(-2147483648);
_save_parameter(param.mostCurrent._txttimeout.runMethod(true,"getText"),param.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 65;BA.debugLine="Activity.Finish";
Debug.ShouldStop(1);
param.mostCurrent._activity.runVoidMethod ("Finish");
 BA.debugLineNum = 66;BA.debugLine="StartActivity(\"main\")";
Debug.ShouldStop(2);
param.mostCurrent.__c.runVoidMethod ("StartActivity",param.processBA,(Object)((RemoteObject.createImmutable("main"))));
 BA.debugLineNum = 67;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _get_params() throws Exception{
try {
		Debug.PushSubsStack("Get_Params (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,32);
if (RapidSub.canDelegate("get_params")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","get_params");}
RemoteObject _tr = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.TextReaderWrapper");
RemoteObject _inp = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
 BA.debugLineNum = 32;BA.debugLine="Sub Get_Params";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 33;BA.debugLine="Try";
Debug.ShouldStop(1);
try { BA.debugLineNum = 34;BA.debugLine="Dim TR As TextReader";
Debug.ShouldStop(2);
_tr = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.TextReaderWrapper");Debug.locals.put("TR", _tr);
 BA.debugLineNum = 35;BA.debugLine="Dim inp As InputStream";
Debug.ShouldStop(4);
_inp = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");Debug.locals.put("inp", _inp);
 BA.debugLineNum = 36;BA.debugLine="inp=File.OpenInput(File.DirInternal , \"DPM.ini\")";
Debug.ShouldStop(8);
_inp = param.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(param.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("DPM.ini")));Debug.locals.put("inp", _inp);
 BA.debugLineNum = 37;BA.debugLine="TR.Initialize(inp)";
Debug.ShouldStop(16);
_tr.runVoidMethod ("Initialize",(Object)((_inp.getObject())));
 BA.debugLineNum = 38;BA.debugLine="Try";
Debug.ShouldStop(32);
try { BA.debugLineNum = 39;BA.debugLine="txtUrl.Text=TR.Readline";
Debug.ShouldStop(64);
param.mostCurrent._txturl.runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_tr.runMethod(true,"ReadLine")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e9) {
			BA.rdebugUtils.runVoidMethod("setLastException",param.processBA, e9.toString()); BA.debugLineNum = 41;BA.debugLine="txtUrl.Text=\"\"";
Debug.ShouldStop(256);
param.mostCurrent._txturl.runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 };
 BA.debugLineNum = 43;BA.debugLine="Try";
Debug.ShouldStop(1024);
try { BA.debugLineNum = 44;BA.debugLine="txtTimeout.Text=TR.ReadLine";
Debug.ShouldStop(2048);
param.mostCurrent._txttimeout.runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_tr.runMethod(true,"ReadLine")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e14) {
			BA.rdebugUtils.runVoidMethod("setLastException",param.processBA, e14.toString()); BA.debugLineNum = 46;BA.debugLine="txtTimeout.Text=30000";
Debug.ShouldStop(8192);
param.mostCurrent._txttimeout.runMethodAndSync(true,"setText",BA.ObjectToCharSequence(30000));
 };
 BA.debugLineNum = 48;BA.debugLine="TR.Close";
Debug.ShouldStop(32768);
_tr.runVoidMethod ("Close");
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e18) {
			BA.rdebugUtils.runVoidMethod("setLastException",param.processBA, e18.toString()); };
 BA.debugLineNum = 51;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 13;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 17;BA.debugLine="Private txtUrl As EditText";
param.mostCurrent._txturl = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");
 //BA.debugLineNum = 18;BA.debugLine="Private btnParamSave As Button";
param.mostCurrent._btnparamsave = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
 //BA.debugLineNum = 19;BA.debugLine="Private btnParamCancel As Button";
param.mostCurrent._btnparamcancel = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
 //BA.debugLineNum = 20;BA.debugLine="Private txtTimeout As EditText";
param.mostCurrent._txttimeout = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");
 //BA.debugLineNum = 21;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _save_parameter(RemoteObject _url,RemoteObject _append) throws Exception{
try {
		Debug.PushSubsStack("Save_Parameter (param) ","param",2,param.mostCurrent.activityBA,param.mostCurrent,77);
if (RapidSub.canDelegate("save_parameter")) { return shub.dpm.param.remoteMe.runUserSub(false, "param","save_parameter", _url, _append);}
RemoteObject _tw = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.TextWriterWrapper");
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
Debug.locals.put("url", _url);
Debug.locals.put("append", _append);
 BA.debugLineNum = 77;BA.debugLine="Sub Save_Parameter(url As String,append As Boolean";
Debug.ShouldStop(4096);
 BA.debugLineNum = 78;BA.debugLine="Dim Tw As TextWriter";
Debug.ShouldStop(8192);
_tw = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.TextWriterWrapper");Debug.locals.put("Tw", _tw);
 BA.debugLineNum = 79;BA.debugLine="Dim out As OutputStream";
Debug.ShouldStop(16384);
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");Debug.locals.put("out", _out);
 BA.debugLineNum = 81;BA.debugLine="out = File.OpenOutput(File.DirInternal , \"DPM.ini";
Debug.ShouldStop(65536);
_out = param.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(param.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("DPM.ini")),(Object)(_append));Debug.locals.put("out", _out);
 BA.debugLineNum = 82;BA.debugLine="Tw.Initialize(out)";
Debug.ShouldStop(131072);
_tw.runVoidMethod ("Initialize",(Object)((_out.getObject())));
 BA.debugLineNum = 84;BA.debugLine="Tw.WriteLine(url)";
Debug.ShouldStop(524288);
_tw.runVoidMethod ("WriteLine",(Object)(_url));
 BA.debugLineNum = 85;BA.debugLine="Tw.Flush";
Debug.ShouldStop(1048576);
_tw.runVoidMethod ("Flush");
 BA.debugLineNum = 86;BA.debugLine="Tw.close";
Debug.ShouldStop(2097152);
_tw.runVoidMethod ("Close");
 BA.debugLineNum = 88;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}