Files
Medicomed_Preventa/B4A/Objects/src/keymon/lat/medicomed/c_updateavailable.java
IsR0d f9f3ff7d6e Version: 4:11:02
Se arrglo el resumen dia, ahora puedes entrar sin necesidad de hacer algun pedido sin que truene, se muestra la cantidad de clientes visitados sin importar si tienen o no tienen venta y tambien se le agrego la cantidad de clientes que si tienen venta.
2024-11-04 12:41:26 -06:00

251 lines
9.3 KiB
Java

package keymon.lat.medicomed;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class c_updateavailable 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 BA(_ba, this, htSubs, "keymon.lat.medicomed.c_updateavailable");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", keymon.lat.medicomed.c_updateavailable.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public b4a.example.dateutils _dateutils = null;
public keymon.lat.medicomed.main _main = null;
public keymon.lat.medicomed.starter _starter = null;
public keymon.lat.medicomed.subs _subs = null;
public keymon.lat.medicomed.appupdater _appupdater = null;
public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null;
public keymon.lat.medicomed.tracker _tracker = null;
public keymon.lat.medicomed.newinst2 _newinst2 = null;
public keymon.lat.medicomed.b4xpages _b4xpages = null;
public keymon.lat.medicomed.b4xcollections _b4xcollections = null;
public keymon.lat.medicomed.httputils2service _httputils2service = null;
public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null;
public void _b4xpage_appear() throws Exception{
ResumableSub_B4XPage_Appear rsub = new ResumableSub_B4XPage_Appear(this);
rsub.resume(ba, null);
}
public static class ResumableSub_B4XPage_Appear extends BA.ResumableSub {
public ResumableSub_B4XPage_Appear(keymon.lat.medicomed.c_updateavailable parent) {
this.parent = parent;
}
keymon.lat.medicomed.c_updateavailable parent;
int _result = 0;
anywheresoftware.b4a.objects.IntentWrapper _in = null;
@Override
public void resume(BA ba, Object[] result) throws Exception{
while (true) {
try {
switch (state) {
case -1:
return;
case 0:
//C
this.state = 1;
//BA.debugLineNum = 19;BA.debugLine="Try";
if (true) break;
case 1:
//try
this.state = 10;
this.catchState = 9;
this.state = 3;
if (true) break;
case 3:
//C
this.state = 4;
this.catchState = 9;
//BA.debugLineNum = 20;BA.debugLine="Do While Not(CanRequestPackageInstalls)";
if (true) break;
case 4:
//do while
this.state = 7;
while (parent.__c.Not(parent._canrequestpackageinstalls())) {
this.state = 6;
if (true) break;
}
if (true) break;
case 6:
//C
this.state = 4;
//BA.debugLineNum = 21;BA.debugLine="MsgboxAsync($\"Por favor permita que ${Applicati";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence(("Por favor permita que "+parent.__c.SmartStringFormatter("",(Object)(parent.__c.Application.getPackageName()))+" instale actualizaciones")),BA.ObjectToCharSequence("Instalar actualización"),ba);
//BA.debugLineNum = 22;BA.debugLine="Wait For Msgbox_Result(Result As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 16;
return;
case 16:
//C
this.state = 4;
_result = (Integer) result[0];
;
//BA.debugLineNum = 23;BA.debugLine="Dim in As Intent";
_in = new anywheresoftware.b4a.objects.IntentWrapper();
//BA.debugLineNum = 24;BA.debugLine="in.Initialize(\"android.settings.\", \"package:\" &";
_in.Initialize("android.settings.","package:"+parent.__c.Application.getPackageName());
//BA.debugLineNum = 25;BA.debugLine="StartActivity(in)";
parent.__c.StartActivity(ba,(Object)(_in.getObject()));
if (true) break;
case 7:
//C
this.state = 10;
;
if (true) break;
case 9:
//C
this.state = 10;
this.catchState = 0;
//BA.debugLineNum = 28;BA.debugLine="Log(\"updateAvailable() Error - \" & LastException";
parent.__c.LogImpl("359768842","updateAvailable() Error - "+parent.__c.LastException(ba).getMessage(),0);
if (true) break;
if (true) break;
;
//BA.debugLineNum = 30;BA.debugLine="If appUpdater.newApp.update Then";
case 10:
//if
this.state = 15;
this.catchState = 0;
if (parent._appupdater._newapp /*keymon.lat.medicomed.appupdater._mnewversion*/ .update /*boolean*/ ) {
this.state = 12;
}else {
this.state = 14;
}if (true) break;
case 12:
//C
this.state = 15;
//BA.debugLineNum = 31;BA.debugLine="ofreceActualizacion";
parent._ofreceactualizacion();
if (true) break;
case 14:
//C
this.state = 15;
//BA.debugLineNum = 33;BA.debugLine="sinActualizacion";
parent._sinactualizacion();
if (true) break;
case 15:
//C
this.state = -1;
;
//BA.debugLineNum = 35;BA.debugLine="End Sub";
if (true) break;
}}
catch (Exception e0) {
if (catchState == 0)
throw e0;
else {
state = catchState;
ba.setLastException(e0);}
}
}
}
}
public void _msgbox_result(int _result) throws Exception{
}
public String _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
//BA.debugLineNum = 12;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
//BA.debugLineNum = 13;BA.debugLine="Root = Root1";
_root = _root1;
//BA.debugLineNum = 15;BA.debugLine="Root.Color = Colors.Transparent";
_root.setColor(__c.Colors.Transparent);
//BA.debugLineNum = 16;BA.debugLine="End Sub";
return "";
}
public boolean _canrequestpackageinstalls() throws Exception{
anywheresoftware.b4j.object.JavaObject _ctxt = null;
anywheresoftware.b4j.object.JavaObject _packagemanager = null;
//BA.debugLineNum = 43;BA.debugLine="public Sub CanRequestPackageInstalls As Boolean";
//BA.debugLineNum = 45;BA.debugLine="Dim ctxt As JavaObject";
_ctxt = new anywheresoftware.b4j.object.JavaObject();
//BA.debugLineNum = 46;BA.debugLine="ctxt.InitializeContext";
_ctxt.InitializeContext(ba);
//BA.debugLineNum = 47;BA.debugLine="Dim PackageManager As JavaObject = ctxt.RunMethod";
_packagemanager = new anywheresoftware.b4j.object.JavaObject();
_packagemanager = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(_ctxt.RunMethod("getPackageManager",(Object[])(__c.Null))));
//BA.debugLineNum = 48;BA.debugLine="Return PackageManager.RunMethod(\"canRequestPackag";
if (true) return BA.ObjectToBoolean(_packagemanager.RunMethod("canRequestPackageInstalls",(Object[])(__c.Null)));
//BA.debugLineNum = 49;BA.debugLine="End Sub";
return false;
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
//BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
//BA.debugLineNum = 4;BA.debugLine="End Sub";
return "";
}
public Object _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 7;BA.debugLine="Public Sub Initialize As Object";
//BA.debugLineNum = 8;BA.debugLine="Return Me";
if (true) return this;
//BA.debugLineNum = 9;BA.debugLine="End Sub";
return null;
}
public String _ofreceactualizacion() throws Exception{
//BA.debugLineNum = 51;BA.debugLine="Sub ofreceActualizacion";
//BA.debugLineNum = 52;BA.debugLine="If Msgbox2(appUpdater.newApp.newMsg,\"Actualizació";
if (__c.Msgbox2(BA.ObjectToCharSequence(_appupdater._newapp /*keymon.lat.medicomed.appupdater._mnewversion*/ .newMsg /*String*/ ),BA.ObjectToCharSequence("Actualización disponible"),"Si","","No",(android.graphics.Bitmap)(__c.Null),ba)==__c.DialogResponse.POSITIVE) {
//BA.debugLineNum = 54;BA.debugLine="CallSubDelayed(appUpdater, \"download_newApk\")";
__c.CallSubDelayed(ba,(Object)(_appupdater.getObject()),"download_newApk");
};
//BA.debugLineNum = 57;BA.debugLine="B4XPages.MainPage.ocultaProgreso";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._ocultaprogreso /*String*/ ();
//BA.debugLineNum = 58;BA.debugLine="StartActivity(Main)";
__c.StartActivity(ba,(Object)(_main.getObject()));
//BA.debugLineNum = 60;BA.debugLine="B4XPages.ShowPage(\"Login\")";
_b4xpages._showpage /*String*/ (ba,"Login");
//BA.debugLineNum = 61;BA.debugLine="End Sub";
return "";
}
public String _sinactualizacion() throws Exception{
//BA.debugLineNum = 63;BA.debugLine="Sub sinActualizacion";
//BA.debugLineNum = 64;BA.debugLine="Msgbox(appUpdater.newApp.okMsg, \"Aplicación al co";
__c.Msgbox(BA.ObjectToCharSequence(_appupdater._newapp /*keymon.lat.medicomed.appupdater._mnewversion*/ .okMsg /*String*/ ),BA.ObjectToCharSequence("Aplicación al corriente"),ba);
//BA.debugLineNum = 66;BA.debugLine="B4XPages.MainPage.ocultaProgreso";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._ocultaprogreso /*String*/ ();
//BA.debugLineNum = 67;BA.debugLine="B4XPages.ShowPage(\"Login\")";
_b4xpages._showpage /*String*/ (ba,"Login");
//BA.debugLineNum = 68;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
return BA.SubDelegator.SubNotFound;
}
}