package reparto_mazapa.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_mazapa.keymon.lat.c_foto");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_mazapa.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_mazapa.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_mazapa.keymon.lat.main _main = null;
public reparto_mazapa.keymon.lat.appupdater _appupdater = null;
public reparto_mazapa.keymon.lat.tracker _tracker = null;
public reparto_mazapa.keymon.lat.starter _starter = null;
public reparto_mazapa.keymon.lat.subs _subs = null;
public reparto_mazapa.keymon.lat.firebasemessaging _firebasemessaging = null;
public reparto_mazapa.keymon.lat.foto _foto = null;
public reparto_mazapa.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_mazapa.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_mazapa.keymon.lat.newinst2 _newinst2 = null;
public reparto_mazapa.keymon.lat.b4xpages _b4xpages = null;
public reparto_mazapa.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_mazapa.keymon.lat.httputils2service _httputils2service = null;
public reparto_mazapa.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _gps_locationchanged(reparto_mazapa.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=58851328;
 //BA.debugLineNum = 58851328;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=58851330;
 //BA.debugLineNum = 58851330;BA.debugLine="End Sub";
return "";
}
public String  _activity_pause(reparto_mazapa.keymon.lat.c_foto __ref,boolean _userclosed) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
RDebugUtils.currentLine=58785792;
 //BA.debugLineNum = 58785792;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
RDebugUtils.currentLine=58785794;
 //BA.debugLineNum = 58785794;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_mazapa.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=58654720;
 //BA.debugLineNum = 58654720;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=58654721;
 //BA.debugLineNum = 58654721;BA.debugLine="InitializeCamera";
__ref._initializecamera /*String*/ (null);
RDebugUtils.currentLine=58654722;
 //BA.debugLineNum = 58654722;BA.debugLine="End Sub";
return "";
}
public String  _initializecamera(reparto_mazapa.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=58720256;
 //BA.debugLineNum = 58720256;BA.debugLine="Private Sub InitializeCamera";
RDebugUtils.currentLine=58720257;
 //BA.debugLineNum = 58720257;BA.debugLine="camEx.Initialize(p_camara, frontCamera, Me, \"Came";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._initialize /*String*/ (null,ba,__ref._p_camara /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._frontcamera /*boolean*/ ,this,"Camera1");
RDebugUtils.currentLine=58720258;
 //BA.debugLineNum = 58720258;BA.debugLine="frontCamera = camEx.Front";
__ref._frontcamera /*boolean*/  = __ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._front /*boolean*/ ;
RDebugUtils.currentLine=58720259;
 //BA.debugLineNum = 58720259;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_mazapa.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_mazapa.keymon.lat.c_foto parent,reparto_mazapa.keymon.lat.c_foto __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_foto __ref;
reparto_mazapa.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=59441155;
 //BA.debugLineNum = 59441155;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=59441157;
 //BA.debugLineNum = 59441157;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=59441158;
 //BA.debugLineNum = 59441158;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(reparto_mazapa.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=58589184;
 //BA.debugLineNum = 58589184;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=58589185;
 //BA.debugLineNum = 58589185;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=58589187;
 //BA.debugLineNum = 58589187;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=58589188;
 //BA.debugLineNum = 58589188;BA.debugLine="Root.LoadLayout(\"foto\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("foto",ba);
RDebugUtils.currentLine=58589189;
 //BA.debugLineNum = 58589189;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=58589190;
 //BA.debugLineNum = 58589190;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=58589191;
 //BA.debugLineNum = 58589191;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=58589192;
 //BA.debugLineNum = 58589192;BA.debugLine="End Sub";
return "";
}
public String  _btneffect_click(reparto_mazapa.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=59244544;
 //BA.debugLineNum = 59244544;BA.debugLine="Sub btnEffect_Click";
RDebugUtils.currentLine=59244545;
 //BA.debugLineNum = 59244545;BA.debugLine="Dim effects As List = camEx.GetSupportedColorEffe";
_effects = new anywheresoftware.b4a.objects.collections.List();
_effects = __ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getsupportedcoloreffects /*anywheresoftware.b4a.objects.collections.List*/ (null);
RDebugUtils.currentLine=59244546;
 //BA.debugLineNum = 59244546;BA.debugLine="If effects.IsInitialized = False Then";
if (_effects.IsInitialized()==__c.False) { 
RDebugUtils.currentLine=59244547;
 //BA.debugLineNum = 59244547;BA.debugLine="ToastMessageShow(\"Effects not supported.\", False";
__c.ToastMessageShow(BA.ObjectToCharSequence("Effects not supported."),__c.False);
RDebugUtils.currentLine=59244548;
 //BA.debugLineNum = 59244548;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=59244550;
 //BA.debugLineNum = 59244550;BA.debugLine="Dim effect As String = effects.Get((effects.Index";
_effect = BA.ObjectToString(_effects.Get((int) ((_effects.IndexOf((Object)(__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getcoloreffect /*String*/ (null)))+1)%_effects.getSize())));
RDebugUtils.currentLine=59244551;
 //BA.debugLineNum = 59244551;BA.debugLine="camEx.SetColorEffect(effect)";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._setcoloreffect /*String*/ (null,_effect);
RDebugUtils.currentLine=59244552;
 //BA.debugLineNum = 59244552;BA.debugLine="ToastMessageShow(effect, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_effect),__c.False);
RDebugUtils.currentLine=59244553;
 //BA.debugLineNum = 59244553;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=59244554;
 //BA.debugLineNum = 59244554;BA.debugLine="End Sub";
return "";
}
public String  _btnflash_click(reparto_mazapa.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=59310080;
 //BA.debugLineNum = 59310080;BA.debugLine="Sub btnFlash_Click";
RDebugUtils.currentLine=59310081;
 //BA.debugLineNum = 59310081;BA.debugLine="Dim f() As Float = camEx.GetFocusDistances";
_f = __ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getfocusdistances /*float[]*/ (null);
RDebugUtils.currentLine=59310082;
 //BA.debugLineNum = 59310082;BA.debugLine="Log(f(0) & \", \" & f(1) & \", \" & f(2))";
__c.LogImpl("359310082",BA.NumberToString(_f[(int) (0)])+", "+BA.NumberToString(_f[(int) (1)])+", "+BA.NumberToString(_f[(int) (2)]),0);
RDebugUtils.currentLine=59310083;
 //BA.debugLineNum = 59310083;BA.debugLine="Dim flashModes As List = camEx.GetSupportedFlashM";
_flashmodes = new anywheresoftware.b4a.objects.collections.List();
_flashmodes = __ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getsupportedflashmodes /*anywheresoftware.b4a.objects.collections.List*/ (null);
RDebugUtils.currentLine=59310084;
 //BA.debugLineNum = 59310084;BA.debugLine="If flashModes.IsInitialized = False Then";
if (_flashmodes.IsInitialized()==__c.False) { 
RDebugUtils.currentLine=59310085;
 //BA.debugLineNum = 59310085;BA.debugLine="ToastMessageShow(\"Flash not supported.\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Flash not supported."),__c.False);
RDebugUtils.currentLine=59310086;
 //BA.debugLineNum = 59310086;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=59310088;
 //BA.debugLineNum = 59310088;BA.debugLine="Dim flash As String = flashModes.Get((flashModes.";
_flash = BA.ObjectToString(_flashmodes.Get((int) ((_flashmodes.IndexOf((Object)(__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getflashmode /*String*/ (null)))+1)%_flashmodes.getSize())));
RDebugUtils.currentLine=59310089;
 //BA.debugLineNum = 59310089;BA.debugLine="camEx.SetFlashMode(flash)";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._setflashmode /*String*/ (null,_flash);
RDebugUtils.currentLine=59310090;
 //BA.debugLineNum = 59310090;BA.debugLine="ToastMessageShow(flash, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_flash),__c.False);
RDebugUtils.currentLine=59310091;
 //BA.debugLineNum = 59310091;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=59310092;
 //BA.debugLineNum = 59310092;BA.debugLine="End Sub";
return "";
}
public String  _btnfocus_click(reparto_mazapa.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=59047936;
 //BA.debugLineNum = 59047936;BA.debugLine="Sub btnFocus_Click";
RDebugUtils.currentLine=59047937;
 //BA.debugLineNum = 59047937;BA.debugLine="camEx.FocusAndTakePicture";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._focusandtakepicture /*String*/ (null);
RDebugUtils.currentLine=59047938;
 //BA.debugLineNum = 59047938;BA.debugLine="End Sub";
return "";
}
public String  _btnpicturesize_click(reparto_mazapa.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_mazapa.keymon.lat.cameraexclass._camerasize[] _picturesizes = null;
reparto_mazapa.keymon.lat.cameraexclass._camerasize _current = null;
int _i = 0;
reparto_mazapa.keymon.lat.cameraexclass._camerasize _ps = null;
RDebugUtils.currentLine=59375616;
 //BA.debugLineNum = 59375616;BA.debugLine="Sub btnPictureSize_Click";
RDebugUtils.currentLine=59375617;
 //BA.debugLineNum = 59375617;BA.debugLine="Dim pictureSizes() As CameraSize = camEx.GetSuppo";
_picturesizes = __ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getsupportedpicturessizes /*reparto_mazapa.keymon.lat.cameraexclass._camerasize[]*/ (null);
RDebugUtils.currentLine=59375618;
 //BA.debugLineNum = 59375618;BA.debugLine="Dim current As CameraSize = camEx.GetPictureSize";
_current = __ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getpicturesize /*reparto_mazapa.keymon.lat.cameraexclass._camerasize*/ (null);
RDebugUtils.currentLine=59375619;
 //BA.debugLineNum = 59375619;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=59375620;
 //BA.debugLineNum = 59375620;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=59375622;
 //BA.debugLineNum = 59375622;BA.debugLine="Dim ps As CameraSize = pictureSizes((i + 1) Mod p";
_ps = _picturesizes[(int) ((_i+1)%_picturesizes.length /*int*/ )];
RDebugUtils.currentLine=59375623;
 //BA.debugLineNum = 59375623;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._setpicturesize /*String*/ (null,_ps.Width /*int*/ ,_ps.Height /*int*/ );
RDebugUtils.currentLine=59375624;
 //BA.debugLineNum = 59375624;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=59375625;
 //BA.debugLineNum = 59375625;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=59375626;
 //BA.debugLineNum = 59375626;BA.debugLine="End Sub";
return "";
}
public String  _btntakepicture_click(reparto_mazapa.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_mazapa.keymon.lat.cameraexclass._camerasize _ps = null;
RDebugUtils.currentLine=58982400;
 //BA.debugLineNum = 58982400;BA.debugLine="Sub btnTakePicture_Click";
RDebugUtils.currentLine=58982401;
 //BA.debugLineNum = 58982401;BA.debugLine="Dim ps As CameraSize";
_ps = new reparto_mazapa.keymon.lat.cameraexclass._camerasize();
RDebugUtils.currentLine=58982402;
 //BA.debugLineNum = 58982402;BA.debugLine="ps.Width =640";
_ps.Width /*int*/  = (int) (640);
RDebugUtils.currentLine=58982403;
 //BA.debugLineNum = 58982403;BA.debugLine="ps.Height =480";
_ps.Height /*int*/  = (int) (480);
RDebugUtils.currentLine=58982404;
 //BA.debugLineNum = 58982404;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._setpicturesize /*String*/ (null,_ps.Width /*int*/ ,_ps.Height /*int*/ );
RDebugUtils.currentLine=58982406;
 //BA.debugLineNum = 58982406;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=58982407;
 //BA.debugLineNum = 58982407;BA.debugLine="camEx.TakePicture";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._takepicture /*String*/ (null);
RDebugUtils.currentLine=58982408;
 //BA.debugLineNum = 58982408;BA.debugLine="End Sub";
return "";
}
public String  _camera1_picturetaken(reparto_mazapa.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=59113472;
 //BA.debugLineNum = 59113472;BA.debugLine="Sub Camera1_PictureTaken (Data() As Byte)";
RDebugUtils.currentLine=59113473;
 //BA.debugLineNum = 59113473;BA.debugLine="Dim filename As String = \"1.jpg\"";
_filename = "1.jpg";
RDebugUtils.currentLine=59113474;
 //BA.debugLineNum = 59113474;BA.debugLine="Dim dir As String = File.DirInternal";
_dir = __c.File.getDirInternal();
RDebugUtils.currentLine=59113476;
 //BA.debugLineNum = 59113476;BA.debugLine="camEx.SavePictureToFile(Data, dir, filename)";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._savepicturetofile /*String*/ (null,_data,_dir,_filename);
RDebugUtils.currentLine=59113477;
 //BA.debugLineNum = 59113477;BA.debugLine="camEx.StartPreview 'restart preview";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._startpreview /*String*/ (null);
RDebugUtils.currentLine=59113479;
 //BA.debugLineNum = 59113479;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=59113480;
 //BA.debugLineNum = 59113480;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=59113481;
 //BA.debugLineNum = 59113481;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=59113482;
 //BA.debugLineNum = 59113482;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=59113483;
 //BA.debugLineNum = 59113483;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=59113484;
 //BA.debugLineNum = 59113484;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=59113485;
 //BA.debugLineNum = 59113485;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=59113486;
 //BA.debugLineNum = 59113486;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=59113487;
 //BA.debugLineNum = 59113487;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=59113488;
 //BA.debugLineNum = 59113488;BA.debugLine="USUARIO = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=59113489;
 //BA.debugLineNum = 59113489;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=59113490;
 //BA.debugLineNum = 59113490;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=59113491;
 //BA.debugLineNum = 59113491;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=59113492;
 //BA.debugLineNum = 59113492;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=59113493;
 //BA.debugLineNum = 59113493;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=59113494;
 //BA.debugLineNum = 59113494;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=59113495;
 //BA.debugLineNum = 59113495;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=59113496;
 //BA.debugLineNum = 59113496;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=59113500;
 //BA.debugLineNum = 59113500;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_mazapa.keymon.lat.b4xmainpage*/ (ba)._noventa /*reparto_mazapa.keymon.lat.c_noventa*/ ._comentario /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_data)}));
RDebugUtils.currentLine=59113501;
 //BA.debugLineNum = 59113501;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=59113502;
 //BA.debugLineNum = 59113502;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=59113503;
 //BA.debugLineNum = 59113503;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=59113504;
 //BA.debugLineNum = 59113504;BA.debugLine="End Sub";
return "";
}
public String  _camera1_ready(reparto_mazapa.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=58916864;
 //BA.debugLineNum = 58916864;BA.debugLine="Sub Camera1_Ready (Success As Boolean)";
RDebugUtils.currentLine=58916865;
 //BA.debugLineNum = 58916865;BA.debugLine="If Success Then";
if (_success) { 
RDebugUtils.currentLine=58916866;
 //BA.debugLineNum = 58916866;BA.debugLine="camEx.SetJpegQuality(90)";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._setjpegquality /*String*/ (null,(int) (90));
RDebugUtils.currentLine=58916867;
 //BA.debugLineNum = 58916867;BA.debugLine="camEx.CommitParameters";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._commitparameters /*String*/ (null);
RDebugUtils.currentLine=58916868;
 //BA.debugLineNum = 58916868;BA.debugLine="camEx.StartPreview";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._startpreview /*String*/ (null);
RDebugUtils.currentLine=58916869;
 //BA.debugLineNum = 58916869;BA.debugLine="Log(camEx.GetPreviewSize)";
__c.LogImpl("358916869",BA.ObjectToString(__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._getpreviewsize /*reparto_mazapa.keymon.lat.cameraexclass._camerasize*/ (null)),0);
 }else {
RDebugUtils.currentLine=58916871;
 //BA.debugLineNum = 58916871;BA.debugLine="ToastMessageShow(\"Cannot open camera.\", True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Cannot open camera."),__c.True);
 };
RDebugUtils.currentLine=58916873;
 //BA.debugLineNum = 58916873;BA.debugLine="End Sub";
return "";
}
public String  _changecamera_click(reparto_mazapa.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=59179008;
 //BA.debugLineNum = 59179008;BA.debugLine="Sub ChangeCamera_Click";
RDebugUtils.currentLine=59179009;
 //BA.debugLineNum = 59179009;BA.debugLine="camEx.Release";
__ref._camex /*reparto_mazapa.keymon.lat.cameraexclass*/ ._release /*String*/ (null);
RDebugUtils.currentLine=59179010;
 //BA.debugLineNum = 59179010;BA.debugLine="frontCamera = Not(frontCamera)";
__ref._frontcamera /*boolean*/  = __c.Not(__ref._frontcamera /*boolean*/ );
RDebugUtils.currentLine=59179011;
 //BA.debugLineNum = 59179011;BA.debugLine="InitializeCamera";
__ref._initializecamera /*String*/ (null);
RDebugUtils.currentLine=59179012;
 //BA.debugLineNum = 59179012;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_mazapa.keymon.lat.c_foto __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_foto";
RDebugUtils.currentLine=58458112;
 //BA.debugLineNum = 58458112;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=58458113;
 //BA.debugLineNum = 58458113;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=58458114;
 //BA.debugLineNum = 58458114;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=58458115;
 //BA.debugLineNum = 58458115;BA.debugLine="Private frontCamera As Boolean = False";
_frontcamera = __c.False;
RDebugUtils.currentLine=58458116;
 //BA.debugLineNum = 58458116;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=58458117;
 //BA.debugLineNum = 58458117;BA.debugLine="Private p_camara As Panel";
_p_camara = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=58458118;
 //BA.debugLineNum = 58458118;BA.debugLine="Private camEx As CameraExClass";
_camex = new reparto_mazapa.keymon.lat.cameraexclass();
RDebugUtils.currentLine=58458119;
 //BA.debugLineNum = 58458119;BA.debugLine="Dim btnTakePicture As Button";
_btntakepicture = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=58458120;
 //BA.debugLineNum = 58458120;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=58458121;
 //BA.debugLineNum = 58458121;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=58458122;
 //BA.debugLineNum = 58458122;BA.debugLine="Dim lat_gps As String";
_lat_gps = "";
RDebugUtils.currentLine=58458123;
 //BA.debugLineNum = 58458123;BA.debugLine="Dim USUARIO As String";
_usuario = "";
RDebugUtils.currentLine=58458124;
 //BA.debugLineNum = 58458124;BA.debugLine="Dim MOTIVO As String";
_motivo = "";
RDebugUtils.currentLine=58458125;
 //BA.debugLineNum = 58458125;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(reparto_mazapa.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=58523648;
 //BA.debugLineNum = 58523648;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=58523649;
 //BA.debugLineNum = 58523649;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=58523650;
 //BA.debugLineNum = 58523650;BA.debugLine="End Sub";
return null;
}
}