package gunav2.keymon.com.mx;

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

public class c_historico2_subs_0 {


public static RemoteObject  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,60);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_historico2","b4xpage_appear", __ref);}
int _i = 0;
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
int _sfdf = 0;
 BA.debugLineNum = 60;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 61;BA.debugLine="p_nota.Height = Root.Height * 0.9";
Debug.ShouldStop(268435456);
__ref.getField(false,"_p_nota" /*RemoteObject*/ ).runMethod(true,"setHeight",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getHeight"),RemoteObject.createImmutable(0.9)}, "*",0, 0)));
 BA.debugLineNum = 62;BA.debugLine="p_nota.Width = Root.Width * 0.9";
Debug.ShouldStop(536870912);
__ref.getField(false,"_p_nota" /*RemoteObject*/ ).runMethod(true,"setWidth",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"),RemoteObject.createImmutable(0.9)}, "*",0, 0)));
 BA.debugLineNum = 63;BA.debugLine="Panel1.Visible = False";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_panel1" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"False"));
 BA.debugLineNum = 64;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
Debug.ShouldStop(-2147483648);
if (c_historico2.__c.runMethod(true,"Not",(Object)(c_historico2._starter._gps /*RemoteObject*/ .runMethod(true,"getGPSEnabled"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 65;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
Debug.ShouldStop(1);
c_historico2.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Es necesario tener el GPS encendido")),(Object)(c_historico2.__c.getField(true,"True")));
 BA.debugLineNum = 66;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
Debug.ShouldStop(2);
c_historico2.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((c_historico2._starter._gps /*RemoteObject*/ .runMethod(false,"getLocationSettingsIntent"))));
 };
 BA.debugLineNum = 68;BA.debugLine="L_CANT.Text =\"\"";
Debug.ShouldStop(8);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 69;BA.debugLine="L_TOTAL.Text=\"\"";
Debug.ShouldStop(16);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 70;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
Debug.ShouldStop(32);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico2._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as EXISTE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 71;BA.debugLine="C.Position=0";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 72;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
Debug.ShouldStop(128);
__ref.setField ("_existe" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("EXISTE"))));
 BA.debugLineNum = 73;BA.debugLine="C.Close";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 74;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select HVD_CL";
Debug.ShouldStop(512);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico2._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_FECHA asc"))));
 BA.debugLineNum = 75;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(1024);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 76;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 77;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(4096);
{
final int step17 = 1;
final int limit17 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step17 > 0 && _i <= limit17) || (step17 < 0 && _i >= limit17) ;_i = ((int)(0 + _i + step17))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 78;BA.debugLine="c.Position=i";
Debug.ShouldStop(8192);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 79;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(16384);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 80;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(32768);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 81;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(65536);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 82;BA.debugLine="label1.TextColor = Colors.White";
Debug.ShouldStop(131072);
_label1.runMethod(true,"setTextColor",c_historico2.__c.getField(false,"Colors").getField(true,"White"));
 BA.debugLineNum = 83;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(262144);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 84;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(524288);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 85;BA.debugLine="label2.TextSize = 15";
Debug.ShouldStop(1048576);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 86;BA.debugLine="label2.TextColor = Colors.White";
Debug.ShouldStop(2097152);
_label2.runMethod(true,"setTextColor",c_historico2.__c.getField(false,"Colors").getField(true,"White"));
 BA.debugLineNum = 87;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"HVD_PRONOMBR";
Debug.ShouldStop(4194304);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Cantidad #"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT"))),RemoteObject.createImmutable(" SubTotal $"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_COSTO_TOT"))),RemoteObject.createImmutable("      Fecha: "),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_FECHA")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 90;BA.debugLine="If Existe <> 0 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("!",__ref.getField(true,"_existe" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 91;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select SUM(H";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico2._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select SUM(HVD_CANT) AS PC_NOART, SUM(HVD_COSTO_TOT) AS PC_MONTO from HIST_VENTAS where HVD_CLIENTE in (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 92;BA.debugLine="C.Position=0";
Debug.ShouldStop(134217728);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 93;BA.debugLine="L_CANT.Text = c.GetString(\"PC_NOART\")";
Debug.ShouldStop(268435456);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_NOART")))));
 BA.debugLineNum = 94;BA.debugLine="L_TOTAL.Text = c.GetString(\"PC_MONTO\")";
Debug.ShouldStop(536870912);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_MONTO")))));
 };
 BA.debugLineNum = 100;BA.debugLine="For sfdf = 0 To  1";
Debug.ShouldStop(8);
{
final int step36 = 1;
final int limit36 = 1;
_sfdf = 0 ;
for (;(step36 > 0 && _sfdf <= limit36) || (step36 < 0 && _sfdf >= limit36) ;_sfdf = ((int)(0 + _sfdf + step36))  ) {
Debug.locals.put("sfdf", _sfdf);
 BA.debugLineNum = 101;BA.debugLine="CustomListView1.Add(CreateListItem(\"ejemplo\",\"1\"";
Debug.ShouldStop(16);
__ref.getField(false,"_customlistview1" /*RemoteObject*/ ).runVoidMethod ("_add",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.runClassMethod (gunav2.keymon.com.mx.c_historico2.class, "_createlistitem" /*RemoteObject*/ ,(Object)(BA.ObjectToString("ejemplo")),(Object)(BA.numberCast(int.class, "1")),(Object)(BA.numberCast(int.class, "2")),(Object)(BA.numberCast(int.class, "3")),(Object)(BA.numberCast(int.class, "4")),(Object)(BA.numberCast(int.class, 284)),(Object)(BA.numberCast(int.class, 144))).getObject()),(Object)(RemoteObject.createImmutable((_sfdf))));
 }
}Debug.locals.put("sfdf", _sfdf);
;
 BA.debugLineNum = 107;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_closerequest(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,139);
if (RapidSub.canDelegate("b4xpage_closerequest")) { return __ref.runUserSub(false, "c_historico2","b4xpage_closerequest", __ref);}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(null,__ref);
rsub.remoteResumableSub = anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSubForFilter();
rsub.resume(null, null);
return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.Common.ResumableSubWrapper"), rsub.remoteResumableSub);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(gunav2.keymon.com.mx.c_historico2 parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
gunav2.keymon.com.mx.c_historico2 parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,139);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,RemoteObject.createImmutable(null));return;}
case 0:
//C
this.state = -1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 142;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(8192);
parent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 143;BA.debugLine="Return False";
Debug.ShouldStop(16384);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.__c.getField(true,"False")));return;};
 BA.debugLineNum = 144;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,44);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_historico2","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 44;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(2048);
 BA.debugLineNum = 45;BA.debugLine="Root = Root1";
Debug.ShouldStop(4096);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 47;BA.debugLine="ruta = File.DirInternal";
Debug.ShouldStop(16384);
__ref.setField ("_ruta" /*RemoteObject*/ ,c_historico2.__c.getField(false,"File").runMethod(true,"getDirInternal"));
 BA.debugLineNum = 48;BA.debugLine="Root.LoadLayout(\"nota2\")";
Debug.ShouldStop(32768);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("nota2")),__ref.getField(false, "ba"));
 BA.debugLineNum = 49;BA.debugLine="borra.Visible = False";
Debug.ShouldStop(65536);
__ref.getField(false,"_borra" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"False"));
 BA.debugLineNum = 50;BA.debugLine="Titulo.Text = \"Acumulado\"";
Debug.ShouldStop(131072);
__ref.getField(false,"_titulo" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("Acumulado"));
 BA.debugLineNum = 51;BA.debugLine="b_desc.Visible = False";
Debug.ShouldStop(262144);
__ref.getField(false,"_b_desc" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"False"));
 BA.debugLineNum = 52;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
Debug.ShouldStop(524288);
if (RemoteObject.solveBoolean("=",c_historico2.__c.getField(false,"File").runMethod(true,"Exists",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db"))),c_historico2.__c.getField(true,"False"))) { 
 BA.debugLineNum = 53;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
Debug.ShouldStop(1048576);
c_historico2.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(c_historico2.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db")));
 };
 BA.debugLineNum = 56;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
c_historico2._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_historico2._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_historico2._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_historico2._xui);
 //BA.debugLineNum = 5;BA.debugLine="Dim g As GPS";
c_historico2._g = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");__ref.setField("_g",c_historico2._g);
 //BA.debugLineNum = 6;BA.debugLine="Dim clie_id As String";
c_historico2._clie_id = RemoteObject.createImmutable("");__ref.setField("_clie_id",c_historico2._clie_id);
 //BA.debugLineNum = 7;BA.debugLine="Dim sDate,sTime As String";
c_historico2._sdate = RemoteObject.createImmutable("");__ref.setField("_sdate",c_historico2._sdate);
c_historico2._stime = RemoteObject.createImmutable("");__ref.setField("_stime",c_historico2._stime);
 //BA.debugLineNum = 8;BA.debugLine="Dim usuario As String";
c_historico2._usuario = RemoteObject.createImmutable("");__ref.setField("_usuario",c_historico2._usuario);
 //BA.debugLineNum = 10;BA.debugLine="Dim c As Cursor";
c_historico2._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_historico2._c);
 //BA.debugLineNum = 11;BA.debugLine="Dim ruta As String";
c_historico2._ruta = RemoteObject.createImmutable("");__ref.setField("_ruta",c_historico2._ruta);
 //BA.debugLineNum = 12;BA.debugLine="Dim Regresar As Button";
c_historico2._regresar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_regresar",c_historico2._regresar);
 //BA.debugLineNum = 15;BA.debugLine="Dim ListView1 As ListView";
c_historico2._listview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_listview1",c_historico2._listview1);
 //BA.debugLineNum = 16;BA.debugLine="Dim L_CANT As Label";
c_historico2._l_cant = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_cant",c_historico2._l_cant);
 //BA.debugLineNum = 17;BA.debugLine="Dim L_TOTAL As Label";
c_historico2._l_total = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_total",c_historico2._l_total);
 //BA.debugLineNum = 18;BA.debugLine="Dim borra As Button";
c_historico2._borra = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_borra",c_historico2._borra);
 //BA.debugLineNum = 19;BA.debugLine="Dim Existe As String";
c_historico2._existe = RemoteObject.createImmutable("");__ref.setField("_existe",c_historico2._existe);
 //BA.debugLineNum = 20;BA.debugLine="Dim result As String";
c_historico2._result = RemoteObject.createImmutable("");__ref.setField("_result",c_historico2._result);
 //BA.debugLineNum = 23;BA.debugLine="Private Titulo As Label";
c_historico2._titulo = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_titulo",c_historico2._titulo);
 //BA.debugLineNum = 24;BA.debugLine="Private b_desc As Button";
c_historico2._b_desc = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_desc",c_historico2._b_desc);
 //BA.debugLineNum = 25;BA.debugLine="Private ListView2 As ListView";
c_historico2._listview2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_listview2",c_historico2._listview2);
 //BA.debugLineNum = 26;BA.debugLine="Dim tgl As Toggle";
c_historico2._tgl = RemoteObject.createNew ("com.rootsoft.togglelibrary.ToggleLibrary");__ref.setField("_tgl",c_historico2._tgl);
 //BA.debugLineNum = 27;BA.debugLine="Private p_nota As Panel";
c_historico2._p_nota = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_nota",c_historico2._p_nota);
 //BA.debugLineNum = 28;BA.debugLine="Private Panel1 As Panel";
c_historico2._panel1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_panel1",c_historico2._panel1);
 //BA.debugLineNum = 29;BA.debugLine="Private l_productohist As Label";
c_historico2._l_productohist = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_productohist",c_historico2._l_productohist);
 //BA.debugLineNum = 30;BA.debugLine="Private l_s1 As Label";
c_historico2._l_s1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_s1",c_historico2._l_s1);
 //BA.debugLineNum = 31;BA.debugLine="Private l_s2 As Label";
c_historico2._l_s2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_s2",c_historico2._l_s2);
 //BA.debugLineNum = 32;BA.debugLine="Private l_s3 As Label";
c_historico2._l_s3 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_s3",c_historico2._l_s3);
 //BA.debugLineNum = 33;BA.debugLine="Private l_s4 As Label";
c_historico2._l_s4 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_s4",c_historico2._l_s4);
 //BA.debugLineNum = 34;BA.debugLine="Private CustomListView1 As CustomListView";
c_historico2._customlistview1 = RemoteObject.createNew ("b4a.example3.customlistview");__ref.setField("_customlistview1",c_historico2._customlistview1);
 //BA.debugLineNum = 36;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _createlistitem(RemoteObject __ref,RemoteObject _prodhis,RemoteObject _s1,RemoteObject _s2,RemoteObject _s3,RemoteObject _s4,RemoteObject _width,RemoteObject _height) throws Exception{
try {
		Debug.PushSubsStack("CreateListItem (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,110);
if (RapidSub.canDelegate("createlistitem")) { return __ref.runUserSub(false, "c_historico2","createlistitem", __ref, _prodhis, _s1, _s2, _s3, _s4, _width, _height);}
RemoteObject _p = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
Debug.locals.put("prodhis", _prodhis);
Debug.locals.put("s1", _s1);
Debug.locals.put("s2", _s2);
Debug.locals.put("s3", _s3);
Debug.locals.put("s4", _s4);
Debug.locals.put("Width", _width);
Debug.locals.put("Height", _height);
 BA.debugLineNum = 110;BA.debugLine="Sub CreateListItem(prodhis As String, s1 As Int, s";
Debug.ShouldStop(8192);
 BA.debugLineNum = 111;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
Debug.ShouldStop(16384);
_p = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_p = __ref.getField(false,"_xui" /*RemoteObject*/ ).runMethod(false,"CreatePanel",__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("")));Debug.locals.put("p", _p);Debug.locals.put("p", _p);
 BA.debugLineNum = 112;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
Debug.ShouldStop(32768);
_p.runVoidMethod ("SetLayoutAnimated",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(_width),(Object)(_height));
 BA.debugLineNum = 113;BA.debugLine="p.LoadLayout(\"historicobat\")";
Debug.ShouldStop(65536);
_p.runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("historicobat")),__ref.getField(false, "ba"));
 BA.debugLineNum = 127;BA.debugLine="Return p";
Debug.ShouldStop(1073741824);
if (true) return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.PanelWrapper"), _p.getObject());
 BA.debugLineNum = 128;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _gps_locationchanged(RemoteObject __ref,RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,130);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "c_historico2","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 130;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(2);
 BA.debugLineNum = 133;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _listview1_itemclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("ListView1_ItemClick (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,151);
if (RapidSub.canDelegate("listview1_itemclick")) { return __ref.runUserSub(false, "c_historico2","listview1_itemclick", __ref, _position, _value);}
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
int _i = 0;
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 151;BA.debugLine="Sub ListView1_ItemClick (Position As Int, Value As";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 152;BA.debugLine="ListView2.Visible = True";
Debug.ShouldStop(8388608);
__ref.getField(false,"_listview2" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"True"));
 BA.debugLineNum = 153;BA.debugLine="ListView1.Visible = False";
Debug.ShouldStop(16777216);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"False"));
 BA.debugLineNum = 154;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(33554432);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 155;BA.debugLine="For i=0 To 20";
Debug.ShouldStop(67108864);
{
final int step4 = 1;
final int limit4 = 20;
_i = 0 ;
for (;(step4 > 0 && _i <= limit4) || (step4 < 0 && _i >= limit4) ;_i = ((int)(0 + _i + step4))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 156;BA.debugLine="label1 = ListView2.SingleLineLayout.Label";
Debug.ShouldStop(134217728);
_label1 = __ref.getField(false,"_listview2" /*RemoteObject*/ ).runMethod(false,"getSingleLineLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 157;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(268435456);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 158;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(536870912);
_label1.runMethod(true,"setTextColor",c_historico2.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 159;BA.debugLine="ListView2.AddSingleLine(i)";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_listview2" /*RemoteObject*/ ).runVoidMethod ("AddSingleLine",(Object)(BA.ObjectToCharSequence(_i)));
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 161;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _listview2_itemclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("ListView2_ItemClick (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,146);
if (RapidSub.canDelegate("listview2_itemclick")) { return __ref.runUserSub(false, "c_historico2","listview2_itemclick", __ref, _position, _value);}
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 146;BA.debugLine="Sub ListView2_ItemClick (Position As Int, Value As";
Debug.ShouldStop(131072);
 BA.debugLineNum = 147;BA.debugLine="ListView2.Visible = False";
Debug.ShouldStop(262144);
__ref.getField(false,"_listview2" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"False"));
 BA.debugLineNum = 148;BA.debugLine="ListView1.Visible = True";
Debug.ShouldStop(524288);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico2.__c.getField(true,"True"));
 BA.debugLineNum = 149;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _regresar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("Regresar_Click (c_historico2) ","c_historico2",18,__ref.getField(false, "ba"),__ref,135);
if (RapidSub.canDelegate("regresar_click")) { return __ref.runUserSub(false, "c_historico2","regresar_click", __ref);}
 BA.debugLineNum = 135;BA.debugLine="Sub Regresar_Click";
Debug.ShouldStop(64);
 BA.debugLineNum = 136;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(128);
c_historico2._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 137;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}