package reparto_intmex.keymon.lat;


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

public class c_foto extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "reparto_intmex.keymon.lat.c_foto");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_intmex.keymon.lat.c_foto.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public boolean _frontcamera = false;
public anywheresoftware.b4a.gps.GPS _g = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_camara = null;
public reparto_intmex.keymon.lat.cameraexclass _camex = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btntakepicture = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public String _cuenta = "";
public String _lat_gps = "";
public String _usuario = "";
public String _motivo = "";
public b4a.example.dateutils _dateutils = null;
public reparto_intmex.keymon.lat.main _main = null;
public reparto_intmex.keymon.lat.appupdater _appupdater = null;
public reparto_intmex.keymon.lat.foto _foto = null;
public reparto_intmex.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_intmex.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_intmex.keymon.lat.starter _starter = null;
public reparto_intmex.keymon.lat.subs _subs = null;
public reparto_intmex.keymon.lat.tracker _tracker = null;
public reparto_intmex.keymon.lat.newinst2 _newinst2 = null;
public reparto_intmex.keymon.lat.b4xpages _b4xpages = null;
public reparto_intmex.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_intmex.keymon.lat.httputils2service _httputils2service = null;
public reparto_intmex.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _activity_pause(reparto_intmex.keymon.lat.c_foto __ref,boolean _userclosed) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
RDebugUtils.currentLine=48693248;
 //BA.debugLineNum = 48693248;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
RDebugUtils.currentLine=48693250;
 //BA.debugLineNum = 48693250;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
RDebugUtils.currentLine=48562176;
 //BA.debugLineNum = 48562176;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=48562177;
 //BA.debugLineNum = 48562177;BA.debugLine="InitializeCamera";
__ref._initializecamera /*String*/ (null);
RDebugUtils.currentLine=48562178;
 //BA.debugLineNum = 48562178;BA.debugLine="End Sub";
return "";
}
public String  _initializecamera(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "initializecamera", false))
	 {return ((String) Debug.delegate(ba, "initializecamera", null));}
RDebugUtils.currentLine=48627712;
 //BA.debugLineNum = 48627712;BA.debugLine="Private Sub InitializeCamera";
RDebugUtils.currentLine=48627713;
 //BA.debugLineNum = 48627713;BA.debugLine="camEx.Initialize(p_camara, frontCamera, Me, \"Came";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._initialize /*String*/ (null,ba,__ref._p_camara /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._frontcamera /*boolean*/ ,this,"Camera1");
RDebugUtils.currentLine=48627714;
 //BA.debugLineNum = 48627714;BA.debugLine="frontCamera = camEx.Front";
__ref._frontcamera /*boolean*/  = __ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._front /*boolean*/ ;
RDebugUtils.currentLine=48627715;
 //BA.debugLineNum = 48627715;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(reparto_intmex.keymon.lat.c_foto parent,reparto_intmex.keymon.lat.c_foto __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_intmex.keymon.lat.c_foto __ref;
reparto_intmex.keymon.lat.c_foto parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_foto";

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = -1;
RDebugUtils.currentLine=49348611;
 //BA.debugLineNum = 49348611;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=49348613;
 //BA.debugLineNum = 49348613;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=49348614;
 //BA.debugLineNum = 49348614;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(reparto_intmex.keymon.lat.c_foto __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=48496640;
 //BA.debugLineNum = 48496640;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=48496641;
 //BA.debugLineNum = 48496641;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=48496643;
 //BA.debugLineNum = 48496643;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=48496644;
 //BA.debugLineNum = 48496644;BA.debugLine="Root.LoadLayout(\"foto\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("foto",ba);
RDebugUtils.currentLine=48496645;
 //BA.debugLineNum = 48496645;BA.debugLine="c=Starter.skmt.ExecQuery(\"select cuenta from cuen";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select cuenta from cuentaa")));
RDebugUtils.currentLine=48496646;
 //BA.debugLineNum = 48496646;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=48496647;
 //BA.debugLineNum = 48496647;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=48496648;
 //BA.debugLineNum = 48496648;BA.debugLine="End Sub";
return "";
}
public String  _btneffect_click(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "btneffect_click", false))
	 {return ((String) Debug.delegate(ba, "btneffect_click", null));}
anywheresoftware.b4a.objects.collections.List _effects = null;
String _effect = "";
RDebugUtils.currentLine=49152000;
 //BA.debugLineNum = 49152000;BA.debugLine="Sub btnEffect_Click";
RDebugUtils.currentLine=49152001;
 //BA.debugLineNum = 49152001;BA.debugLine="Dim effects As List = camEx.GetSupportedColorEffe";
_effects = new anywheresoftware.b4a.objects.collections.List();
_effects = __ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getsupportedcoloreffects /*anywheresoftware.b4a.objects.collections.List*/ (null);
RDebugUtils.currentLine=49152002;
 //BA.debugLineNum = 49152002;BA.debugLine="If effects.IsInitialized = False Then";
if (_effects.IsInitialized()==__c.False) { 
RDebugUtils.currentLine=49152003;
 //BA.debugLineNum = 49152003;BA.debugLine="ToastMessageShow(\"Effects not supported.\", False";
__c.ToastMessageShow(BA.ObjectToCharSequence("Effects not supported."),__c.False);
RDebugUtils.currentLine=49152004;
 //BA.debugLineNum = 49152004;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=49152006;
 //BA.debugLineNum = 49152006;BA.debugLine="Dim effect As String = effects.Get((effects.Index";
_effect = BA.ObjectToString(_effects.Get((int) ((_effects.IndexOf((Object)(__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getcoloreffect /*String*/ (null)))+1)%_effects.getSize())));
RDebugUtils.currentLine=49152007;
 //BA.debugLineNum = 49152007;BA.debugLine="camEx.SetColorEffect(effect)";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._setcoloreffect /*String*/ (null,_effect);
RDebugUtils.currentLine=49152008;
 //BA.debugLineNum = 49152008;BA.debugLine="ToastMessageShow(effect, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_effect),__c.False);
RDebugUtils.currentLine=49152009;
 //BA.debugLineNum = 49152009;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=49152010;
 //BA.debugLineNum = 49152010;BA.debugLine="End Sub";
return "";
}
public String  _btnflash_click(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "btnflash_click", false))
	 {return ((String) Debug.delegate(ba, "btnflash_click", null));}
float[] _f = null;
anywheresoftware.b4a.objects.collections.List _flashmodes = null;
String _flash = "";
RDebugUtils.currentLine=49217536;
 //BA.debugLineNum = 49217536;BA.debugLine="Sub btnFlash_Click";
RDebugUtils.currentLine=49217537;
 //BA.debugLineNum = 49217537;BA.debugLine="Dim f() As Float = camEx.GetFocusDistances";
_f = __ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getfocusdistances /*float[]*/ (null);
RDebugUtils.currentLine=49217538;
 //BA.debugLineNum = 49217538;BA.debugLine="Log(f(0) & \", \" & f(1) & \", \" & f(2))";
__c.LogImpl("249217538",BA.NumberToString(_f[(int) (0)])+", "+BA.NumberToString(_f[(int) (1)])+", "+BA.NumberToString(_f[(int) (2)]),0);
RDebugUtils.currentLine=49217539;
 //BA.debugLineNum = 49217539;BA.debugLine="Dim flashModes As List = camEx.GetSupportedFlashM";
_flashmodes = new anywheresoftware.b4a.objects.collections.List();
_flashmodes = __ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getsupportedflashmodes /*anywheresoftware.b4a.objects.collections.List*/ (null);
RDebugUtils.currentLine=49217540;
 //BA.debugLineNum = 49217540;BA.debugLine="If flashModes.IsInitialized = False Then";
if (_flashmodes.IsInitialized()==__c.False) { 
RDebugUtils.currentLine=49217541;
 //BA.debugLineNum = 49217541;BA.debugLine="ToastMessageShow(\"Flash not supported.\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Flash not supported."),__c.False);
RDebugUtils.currentLine=49217542;
 //BA.debugLineNum = 49217542;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=49217544;
 //BA.debugLineNum = 49217544;BA.debugLine="Dim flash As String = flashModes.Get((flashModes.";
_flash = BA.ObjectToString(_flashmodes.Get((int) ((_flashmodes.IndexOf((Object)(__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getflashmode /*String*/ (null)))+1)%_flashmodes.getSize())));
RDebugUtils.currentLine=49217545;
 //BA.debugLineNum = 49217545;BA.debugLine="camEx.SetFlashMode(flash)";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._setflashmode /*String*/ (null,_flash);
RDebugUtils.currentLine=49217546;
 //BA.debugLineNum = 49217546;BA.debugLine="ToastMessageShow(flash, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_flash),__c.False);
RDebugUtils.currentLine=49217547;
 //BA.debugLineNum = 49217547;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=49217548;
 //BA.debugLineNum = 49217548;BA.debugLine="End Sub";
return "";
}
public String  _btnfocus_click(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "btnfocus_click", false))
	 {return ((String) Debug.delegate(ba, "btnfocus_click", null));}
RDebugUtils.currentLine=48955392;
 //BA.debugLineNum = 48955392;BA.debugLine="Sub btnFocus_Click";
RDebugUtils.currentLine=48955393;
 //BA.debugLineNum = 48955393;BA.debugLine="camEx.FocusAndTakePicture";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._focusandtakepicture /*String*/ (null);
RDebugUtils.currentLine=48955394;
 //BA.debugLineNum = 48955394;BA.debugLine="End Sub";
return "";
}
public String  _btnpicturesize_click(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "btnpicturesize_click", false))
	 {return ((String) Debug.delegate(ba, "btnpicturesize_click", null));}
reparto_intmex.keymon.lat.cameraexclass._camerasize[] _picturesizes = null;
reparto_intmex.keymon.lat.cameraexclass._camerasize _current = null;
int _i = 0;
reparto_intmex.keymon.lat.cameraexclass._camerasize _ps = null;
RDebugUtils.currentLine=49283072;
 //BA.debugLineNum = 49283072;BA.debugLine="Sub btnPictureSize_Click";
RDebugUtils.currentLine=49283073;
 //BA.debugLineNum = 49283073;BA.debugLine="Dim pictureSizes() As CameraSize = camEx.GetSuppo";
_picturesizes = __ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getsupportedpicturessizes /*reparto_intmex.keymon.lat.cameraexclass._camerasize[]*/ (null);
RDebugUtils.currentLine=49283074;
 //BA.debugLineNum = 49283074;BA.debugLine="Dim current As CameraSize = camEx.GetPictureSize";
_current = __ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getpicturesize /*reparto_intmex.keymon.lat.cameraexclass._camerasize*/ (null);
RDebugUtils.currentLine=49283075;
 //BA.debugLineNum = 49283075;BA.debugLine="For i = 0 To pictureSizes.Length - 1";
{
final int step3 = 1;
final int limit3 = (int) (_picturesizes.length /*int*/ -1);
_i = (int) (0) ;
for (;_i <= limit3 ;_i = _i + step3 ) {
RDebugUtils.currentLine=49283076;
 //BA.debugLineNum = 49283076;BA.debugLine="If pictureSizes(i).Width = current.Width And pic";
if (_picturesizes[_i].Width /*int*/ ==_current.Width /*int*/  && _picturesizes[_i].Height /*int*/ ==_current.Height /*int*/ ) { 
if (true) break;};
 }
};
RDebugUtils.currentLine=49283078;
 //BA.debugLineNum = 49283078;BA.debugLine="Dim ps As CameraSize = pictureSizes((i + 1) Mod p";
_ps = _picturesizes[(int) ((_i+1)%_picturesizes.length /*int*/ )];
RDebugUtils.currentLine=49283079;
 //BA.debugLineNum = 49283079;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._setpicturesize /*String*/ (null,_ps.Width /*int*/ ,_ps.Height /*int*/ );
RDebugUtils.currentLine=49283080;
 //BA.debugLineNum = 49283080;BA.debugLine="ToastMessageShow(ps.Width & \"x\" & ps.Height & i,";
__c.ToastMessageShow(BA.ObjectToCharSequence(BA.NumberToString(_ps.Width /*int*/ )+"x"+BA.NumberToString(_ps.Height /*int*/ )+BA.NumberToString(_i)),__c.False);
RDebugUtils.currentLine=49283081;
 //BA.debugLineNum = 49283081;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=49283082;
 //BA.debugLineNum = 49283082;BA.debugLine="End Sub";
return "";
}
public String  _btntakepicture_click(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "btntakepicture_click", false))
	 {return ((String) Debug.delegate(ba, "btntakepicture_click", null));}
reparto_intmex.keymon.lat.cameraexclass._camerasize _ps = null;
RDebugUtils.currentLine=48889856;
 //BA.debugLineNum = 48889856;BA.debugLine="Sub btnTakePicture_Click";
RDebugUtils.currentLine=48889857;
 //BA.debugLineNum = 48889857;BA.debugLine="Dim ps As CameraSize";
_ps = new reparto_intmex.keymon.lat.cameraexclass._camerasize();
RDebugUtils.currentLine=48889858;
 //BA.debugLineNum = 48889858;BA.debugLine="ps.Width =640";
_ps.Width /*int*/  = (int) (640);
RDebugUtils.currentLine=48889859;
 //BA.debugLineNum = 48889859;BA.debugLine="ps.Height =480";
_ps.Height /*int*/  = (int) (480);
RDebugUtils.currentLine=48889860;
 //BA.debugLineNum = 48889860;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._setpicturesize /*String*/ (null,_ps.Width /*int*/ ,_ps.Height /*int*/ );
RDebugUtils.currentLine=48889862;
 //BA.debugLineNum = 48889862;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=48889863;
 //BA.debugLineNum = 48889863;BA.debugLine="camEx.TakePicture";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._takepicture /*String*/ (null);
RDebugUtils.currentLine=48889864;
 //BA.debugLineNum = 48889864;BA.debugLine="End Sub";
return "";
}
public String  _camera1_picturetaken(reparto_intmex.keymon.lat.c_foto __ref,byte[] _data) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "camera1_picturetaken", false))
	 {return ((String) Debug.delegate(ba, "camera1_picturetaken", new Object[] {_data}));}
String _filename = "";
String _dir = "";
String _sdate = "";
String _stime = "";
int _i = 0;
RDebugUtils.currentLine=49020928;
 //BA.debugLineNum = 49020928;BA.debugLine="Sub Camera1_PictureTaken (Data() As Byte)";
RDebugUtils.currentLine=49020929;
 //BA.debugLineNum = 49020929;BA.debugLine="Dim filename As String = \"1.jpg\"";
_filename = "1.jpg";
RDebugUtils.currentLine=49020930;
 //BA.debugLineNum = 49020930;BA.debugLine="Dim dir As String = File.DirInternal";
_dir = __c.File.getDirInternal();
RDebugUtils.currentLine=49020932;
 //BA.debugLineNum = 49020932;BA.debugLine="camEx.SavePictureToFile(Data, dir, filename)";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._savepicturetofile /*String*/ (null,_data,_dir,_filename);
RDebugUtils.currentLine=49020933;
 //BA.debugLineNum = 49020933;BA.debugLine="camEx.StartPreview 'restart preview";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._startpreview /*String*/ (null);
RDebugUtils.currentLine=49020935;
 //BA.debugLineNum = 49020935;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=49020936;
 //BA.debugLineNum = 49020936;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=49020937;
 //BA.debugLineNum = 49020937;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=49020938;
 //BA.debugLineNum = 49020938;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=49020939;
 //BA.debugLineNum = 49020939;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
RDebugUtils.currentLine=49020940;
 //BA.debugLineNum = 49020940;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=49020941;
 //BA.debugLineNum = 49020941;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=49020942;
 //BA.debugLineNum = 49020942;BA.debugLine="c=Starter.skmt.ExecQuery(\"select USUARIO from usu";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=49020943;
 //BA.debugLineNum = 49020943;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=49020944;
 //BA.debugLineNum = 49020944;BA.debugLine="USUARIO = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=49020945;
 //BA.debugLineNum = 49020945;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=49020946;
 //BA.debugLineNum = 49020946;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM NOVENTA WH";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)");
RDebugUtils.currentLine=49020947;
 //BA.debugLineNum = 49020947;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_CLIENTE,HVD_";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=49020948;
 //BA.debugLineNum = 49020948;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=49020949;
 //BA.debugLineNum = 49020949;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step19 = 1;
final int limit19 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit19 ;_i = _i + step19 ) {
RDebugUtils.currentLine=49020950;
 //BA.debugLineNum = 49020950;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=49020951;
 //BA.debugLineNum = 49020951;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into reparto";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT) select HVD_CLIENTE, HVD_PRONOMBRE, HVD_CANT, HVD_COSTO_TOT from hist_ventas where HVD_PRONOMBRE = ? and HVD_cliente in (Select CUENTA from cuentaa) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE")}));
RDebugUtils.currentLine=49020952;
 //BA.debugLineNum = 49020952;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunaprod";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_nombre = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"))}));
 }
};
 };
RDebugUtils.currentLine=49020956;
 //BA.debugLineNum = 49020956;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  NOVENTA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cuenta /*String*/ ),(Object)(_sdate+_stime),(Object)(__ref._usuario /*String*/ ),(Object)("CERRADO"),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._noventa /*reparto_intmex.keymon.lat.c_noventa*/ ._comentario /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_data)}));
RDebugUtils.currentLine=49020957;
 //BA.debugLineNum = 49020957;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 3, HORAENT = '"+__c.SmartStringFormatter("",(Object)(_sdate+" "+_stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa)"));
RDebugUtils.currentLine=49020958;
 //BA.debugLineNum = 49020958;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS SET";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_RECHAZO = 1 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=49020959;
 //BA.debugLineNum = 49020959;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=49020960;
 //BA.debugLineNum = 49020960;BA.debugLine="End Sub";
return "";
}
public String  _camera1_ready(reparto_intmex.keymon.lat.c_foto __ref,boolean _success) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "camera1_ready", false))
	 {return ((String) Debug.delegate(ba, "camera1_ready", new Object[] {_success}));}
RDebugUtils.currentLine=48824320;
 //BA.debugLineNum = 48824320;BA.debugLine="Sub Camera1_Ready (Success As Boolean)";
RDebugUtils.currentLine=48824321;
 //BA.debugLineNum = 48824321;BA.debugLine="If Success Then";
if (_success) { 
RDebugUtils.currentLine=48824322;
 //BA.debugLineNum = 48824322;BA.debugLine="camEx.SetJpegQuality(90)";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._setjpegquality /*String*/ (null,(int) (90));
RDebugUtils.currentLine=48824323;
 //BA.debugLineNum = 48824323;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=48824324;
 //BA.debugLineNum = 48824324;BA.debugLine="camEx.StartPreview";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._startpreview /*String*/ (null);
RDebugUtils.currentLine=48824325;
 //BA.debugLineNum = 48824325;BA.debugLine="Log(camEx.GetPreviewSize)";
__c.LogImpl("248824325",BA.ObjectToString(__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._getpreviewsize /*reparto_intmex.keymon.lat.cameraexclass._camerasize*/ (null)),0);
 }else {
RDebugUtils.currentLine=48824327;
 //BA.debugLineNum = 48824327;BA.debugLine="ToastMessageShow(\"Cannot open camera.\", True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Cannot open camera."),__c.True);
 };
RDebugUtils.currentLine=48824329;
 //BA.debugLineNum = 48824329;BA.debugLine="End Sub";
return "";
}
public String  _changecamera_click(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "changecamera_click", false))
	 {return ((String) Debug.delegate(ba, "changecamera_click", null));}
RDebugUtils.currentLine=49086464;
 //BA.debugLineNum = 49086464;BA.debugLine="Sub ChangeCamera_Click";
RDebugUtils.currentLine=49086465;
 //BA.debugLineNum = 49086465;BA.debugLine="camEx.Release";
__ref._camex /*reparto_intmex.keymon.lat.cameraexclass*/ ._release /*String*/ (null);
RDebugUtils.currentLine=49086466;
 //BA.debugLineNum = 49086466;BA.debugLine="frontCamera = Not(frontCamera)";
__ref._frontcamera /*boolean*/  = __c.Not(__ref._frontcamera /*boolean*/ );
RDebugUtils.currentLine=49086467;
 //BA.debugLineNum = 49086467;BA.debugLine="InitializeCamera";
__ref._initializecamera /*String*/ (null);
RDebugUtils.currentLine=49086468;
 //BA.debugLineNum = 49086468;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_intmex.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
RDebugUtils.currentLine=48365568;
 //BA.debugLineNum = 48365568;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=48365569;
 //BA.debugLineNum = 48365569;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=48365570;
 //BA.debugLineNum = 48365570;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=48365571;
 //BA.debugLineNum = 48365571;BA.debugLine="Private frontCamera As Boolean = False";
_frontcamera = __c.False;
RDebugUtils.currentLine=48365572;
 //BA.debugLineNum = 48365572;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=48365573;
 //BA.debugLineNum = 48365573;BA.debugLine="Private p_camara As Panel";
_p_camara = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=48365574;
 //BA.debugLineNum = 48365574;BA.debugLine="Private camEx As CameraExClass";
_camex = new reparto_intmex.keymon.lat.cameraexclass();
RDebugUtils.currentLine=48365575;
 //BA.debugLineNum = 48365575;BA.debugLine="Dim btnTakePicture As Button";
_btntakepicture = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=48365576;
 //BA.debugLineNum = 48365576;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=48365577;
 //BA.debugLineNum = 48365577;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=48365578;
 //BA.debugLineNum = 48365578;BA.debugLine="Dim lat_gps As String";
_lat_gps = "";
RDebugUtils.currentLine=48365579;
 //BA.debugLineNum = 48365579;BA.debugLine="Dim USUARIO As String";
_usuario = "";
RDebugUtils.currentLine=48365580;
 //BA.debugLineNum = 48365580;BA.debugLine="Dim MOTIVO As String";
_motivo = "";
RDebugUtils.currentLine=48365581;
 //BA.debugLineNum = 48365581;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(reparto_intmex.keymon.lat.c_foto __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=48758784;
 //BA.debugLineNum = 48758784;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=48758786;
 //BA.debugLineNum = 48758786;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(reparto_intmex.keymon.lat.c_foto __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_foto";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=48431104;
 //BA.debugLineNum = 48431104;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=48431105;
 //BA.debugLineNum = 48431105;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=48431106;
 //BA.debugLineNum = 48431106;BA.debugLine="End Sub";
return null;
}
}