commit 28/12/2024 13_08
This commit is contained in:
408
Objects/shell/src/b4a/example/main_subs_0.java
Normal file
408
Objects/shell/src/b4a/example/main_subs_0.java
Normal file
@@ -0,0 +1,408 @@
|
||||
package b4a.example;
|
||||
|
||||
import anywheresoftware.b4a.BA;
|
||||
import anywheresoftware.b4a.pc.*;
|
||||
|
||||
public class main_subs_0 {
|
||||
|
||||
|
||||
public static RemoteObject _activity_create(RemoteObject _firsttime) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Activity_Create (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,48);
|
||||
if (RapidSub.canDelegate("activity_create")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);}
|
||||
Debug.locals.put("FirstTime", _firsttime);
|
||||
BA.debugLineNum = 48;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
|
||||
Debug.ShouldStop(32768);
|
||||
BA.debugLineNum = 49;BA.debugLine="Activity.LoadLayout(\"Main_Layout\")";
|
||||
Debug.ShouldStop(65536);
|
||||
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("Main_Layout")),main.mostCurrent.activityBA);
|
||||
BA.debugLineNum = 50;BA.debugLine="Log(\"Layout caricato correttamente.\")";
|
||||
Debug.ShouldStop(131072);
|
||||
main.mostCurrent.__c.runVoidMethod ("LogImpl","3131074",RemoteObject.createImmutable("Layout caricato correttamente."),0);
|
||||
BA.debugLineNum = 53;BA.debugLine="myClock.Initialize(pnlClock, 50) ' L'orologio avr";
|
||||
Debug.ShouldStop(1048576);
|
||||
main.mostCurrent._myclock.runClassMethod (b4a.example.analogclock.class, "_initialize" /*RemoteObject*/ ,main.mostCurrent.activityBA,(Object)(main.mostCurrent._pnlclock),(Object)(BA.numberCast(float.class, 50)));
|
||||
BA.debugLineNum = 56;BA.debugLine="Timer1.Initialize(\"Timer1\", 1000) ' Aggiornamento";
|
||||
Debug.ShouldStop(8388608);
|
||||
main._timer1.runVoidMethod ("Initialize",main.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, 1000)));
|
||||
BA.debugLineNum = 57;BA.debugLine="Timer1.Enabled = True";
|
||||
Debug.ShouldStop(16777216);
|
||||
main._timer1.runMethod(true,"setEnabled",main.mostCurrent.__c.getField(true,"True"));
|
||||
BA.debugLineNum = 73;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(256);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _activity_pause(RemoteObject _userclosed) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Activity_Pause (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,86);
|
||||
if (RapidSub.canDelegate("activity_pause")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);}
|
||||
Debug.locals.put("UserClosed", _userclosed);
|
||||
BA.debugLineNum = 86;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
|
||||
Debug.ShouldStop(2097152);
|
||||
BA.debugLineNum = 88;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(8388608);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _activity_resume() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Activity_Resume (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,82);
|
||||
if (RapidSub.canDelegate("activity_resume")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_resume");}
|
||||
BA.debugLineNum = 82;BA.debugLine="Sub Activity_Resume";
|
||||
Debug.ShouldStop(131072);
|
||||
BA.debugLineNum = 84;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(524288);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnpause_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnPause_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,169);
|
||||
if (RapidSub.canDelegate("btnpause_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnpause_click");}
|
||||
BA.debugLineNum = 169;BA.debugLine="Sub BtnPause_Click";
|
||||
Debug.ShouldStop(256);
|
||||
BA.debugLineNum = 170;BA.debugLine="Running = False";
|
||||
Debug.ShouldStop(512);
|
||||
main._running = main.mostCurrent.__c.getField(true,"False");
|
||||
BA.debugLineNum = 171;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(1024);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnreset_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnReset_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,174);
|
||||
if (RapidSub.canDelegate("btnreset_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnreset_click");}
|
||||
BA.debugLineNum = 174;BA.debugLine="Sub BtnReset_Click";
|
||||
Debug.ShouldStop(8192);
|
||||
BA.debugLineNum = 175;BA.debugLine="Running = False";
|
||||
Debug.ShouldStop(16384);
|
||||
main._running = main.mostCurrent.__c.getField(true,"False");
|
||||
BA.debugLineNum = 176;BA.debugLine="ElapsedTime = 0";
|
||||
Debug.ShouldStop(32768);
|
||||
main._elapsedtime = BA.numberCast(long.class, 0);
|
||||
BA.debugLineNum = 177;BA.debugLine="lblElapsedTime.Text = \"Tempo: 00:00:00\"";
|
||||
Debug.ShouldStop(65536);
|
||||
main.mostCurrent._lblelapsedtime.runMethod(true,"setText",BA.ObjectToCharSequence("Tempo: 00:00:00"));
|
||||
BA.debugLineNum = 178;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(131072);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnstart_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnStart_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,157);
|
||||
if (RapidSub.canDelegate("btnstart_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnstart_click");}
|
||||
BA.debugLineNum = 157;BA.debugLine="Sub BtnStart_Click";
|
||||
Debug.ShouldStop(268435456);
|
||||
BA.debugLineNum = 158;BA.debugLine="If Not(Running) Then";
|
||||
Debug.ShouldStop(536870912);
|
||||
if (main.mostCurrent.__c.runMethod(true,"Not",(Object)(main._running)).<Boolean>get().booleanValue()) {
|
||||
BA.debugLineNum = 159;BA.debugLine="Running = True";
|
||||
Debug.ShouldStop(1073741824);
|
||||
main._running = main.mostCurrent.__c.getField(true,"True");
|
||||
BA.debugLineNum = 161;BA.debugLine="Timer1.Initialize(\"Timer1\",1000)";
|
||||
Debug.ShouldStop(1);
|
||||
main._timer1.runVoidMethod ("Initialize",main.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, 1000)));
|
||||
BA.debugLineNum = 163;BA.debugLine="Timer1.Enabled = True";
|
||||
Debug.ShouldStop(4);
|
||||
main._timer1.runMethod(true,"setEnabled",main.mostCurrent.__c.getField(true,"True"));
|
||||
BA.debugLineNum = 164;BA.debugLine="StartTime = DateTime.Now - ElapsedTime";
|
||||
Debug.ShouldStop(8);
|
||||
main._starttime = RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),main._elapsedtime}, "-",1, 2);
|
||||
};
|
||||
BA.debugLineNum = 166;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(32);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnsync_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnSync_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,181);
|
||||
if (RapidSub.canDelegate("btnsync_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnsync_click");}
|
||||
BA.debugLineNum = 181;BA.debugLine="Sub BtnSync_Click";
|
||||
Debug.ShouldStop(1048576);
|
||||
BA.debugLineNum = 182;BA.debugLine="SynchronizeClock";
|
||||
Debug.ShouldStop(2097152);
|
||||
_synchronizeclock();
|
||||
BA.debugLineNum = 183;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(4194304);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawclock() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawClock (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,91);
|
||||
if (RapidSub.canDelegate("drawclock")) { return b4a.example.main.remoteMe.runUserSub(false, "main","drawclock");}
|
||||
RemoteObject _now = RemoteObject.createImmutable(0L);
|
||||
RemoteObject _hours = RemoteObject.createImmutable(0);
|
||||
RemoteObject _minutes = RemoteObject.createImmutable(0);
|
||||
RemoteObject _seconds = RemoteObject.createImmutable(0);
|
||||
RemoteObject _x = RemoteObject.createImmutable(0);
|
||||
RemoteObject _y = RemoteObject.createImmutable(0);
|
||||
RemoteObject _radius = RemoteObject.createImmutable(0);
|
||||
RemoteObject _hourangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _minuteangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _secondangle = RemoteObject.createImmutable(0f);
|
||||
BA.debugLineNum = 91;BA.debugLine="Sub DrawClock";
|
||||
Debug.ShouldStop(67108864);
|
||||
BA.debugLineNum = 92;BA.debugLine="Canvas1.Initialize(Activity)";
|
||||
Debug.ShouldStop(134217728);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("Initialize",(Object)((main.mostCurrent._activity.getObject())));
|
||||
BA.debugLineNum = 93;BA.debugLine="Dim now As Long = DateTime.Now";
|
||||
Debug.ShouldStop(268435456);
|
||||
_now = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow");Debug.locals.put("now", _now);Debug.locals.put("now", _now);
|
||||
BA.debugLineNum = 94;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1";
|
||||
Debug.ShouldStop(536870912);
|
||||
_hours = RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetHour",(Object)(_now)),RemoteObject.createImmutable(12)}, "%",0, 1);Debug.locals.put("Hours", _hours);Debug.locals.put("Hours", _hours);
|
||||
BA.debugLineNum = 95;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
|
||||
Debug.ShouldStop(1073741824);
|
||||
_minutes = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetMinute",(Object)(_now));Debug.locals.put("Minutes", _minutes);Debug.locals.put("Minutes", _minutes);
|
||||
BA.debugLineNum = 96;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
_seconds = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetSecond",(Object)(_now));Debug.locals.put("Seconds", _seconds);Debug.locals.put("Seconds", _seconds);
|
||||
BA.debugLineNum = 99;BA.debugLine="Dim x As Int = Activity.Width / 2";
|
||||
Debug.ShouldStop(4);
|
||||
_x = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._activity.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
|
||||
BA.debugLineNum = 100;BA.debugLine="Dim y As Int = Activity.Height / 2";
|
||||
Debug.ShouldStop(8);
|
||||
_y = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._activity.runMethod(true,"getHeight"),RemoteObject.createImmutable(2)}, "/",0, 0));Debug.locals.put("y", _y);Debug.locals.put("y", _y);
|
||||
BA.debugLineNum = 101;BA.debugLine="Dim Radius As Int = Min(x, y) - 10";
|
||||
Debug.ShouldStop(16);
|
||||
_radius = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.runMethod(true,"Min",(Object)(BA.numberCast(double.class, _x)),(Object)(BA.numberCast(double.class, _y))),RemoteObject.createImmutable(10)}, "-",1, 0));Debug.locals.put("Radius", _radius);Debug.locals.put("Radius", _radius);
|
||||
BA.debugLineNum = 104;BA.debugLine="Canvas1.DrawColor(Colors.White)";
|
||||
Debug.ShouldStop(128);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("DrawColor",(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"White")));
|
||||
BA.debugLineNum = 107;BA.debugLine="Canvas1.DrawCircle(x, y, Radius, Colors.Black,";
|
||||
Debug.ShouldStop(1024);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("DrawCircle",(Object)(BA.numberCast(float.class, _x)),(Object)(BA.numberCast(float.class, _y)),(Object)(BA.numberCast(float.class, _radius)),(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"Black")),(Object)(main.mostCurrent.__c.getField(true,"False")),(Object)(BA.numberCast(float.class, 5)));
|
||||
BA.debugLineNum = 110;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
|
||||
Debug.ShouldStop(8192);
|
||||
_hourangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _hours.<Integer>get().intValue())*(double) (0 + 30)+(double) (0 + _minutes.<Integer>get().intValue())/(double)(double) (0 + 2));Debug.locals.put("HourAngle", _hourangle);Debug.locals.put("HourAngle", _hourangle);
|
||||
BA.debugLineNum = 111;BA.debugLine="DrawHand(x, y, Radius * 0.5, HourAngle, 8, Col";
|
||||
Debug.ShouldStop(16384);
|
||||
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.5)}, "*",0, 0)),_hourangle,BA.numberCast(int.class, 8),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Black"));
|
||||
BA.debugLineNum = 114;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
|
||||
Debug.ShouldStop(131072);
|
||||
_minuteangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _minutes.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("MinuteAngle", _minuteangle);Debug.locals.put("MinuteAngle", _minuteangle);
|
||||
BA.debugLineNum = 115;BA.debugLine="DrawHand(x, y, Radius * 0.7, MinuteAngle, 5, C";
|
||||
Debug.ShouldStop(262144);
|
||||
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.7)}, "*",0, 0)),_minuteangle,BA.numberCast(int.class, 5),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
|
||||
BA.debugLineNum = 118;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
|
||||
Debug.ShouldStop(2097152);
|
||||
_secondangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _seconds.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("SecondAngle", _secondangle);Debug.locals.put("SecondAngle", _secondangle);
|
||||
BA.debugLineNum = 119;BA.debugLine="DrawHand(x, y, Radius * 0.9, SecondAngle, 2, C";
|
||||
Debug.ShouldStop(4194304);
|
||||
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.9)}, "*",0, 0)),_secondangle,BA.numberCast(int.class, 2),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
|
||||
BA.debugLineNum = 120;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(8388608);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawhand(RemoteObject _x,RemoteObject _y,RemoteObject _length,RemoteObject _angle,RemoteObject _width,RemoteObject _color) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawHand (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,122);
|
||||
if (RapidSub.canDelegate("drawhand")) { return b4a.example.main.remoteMe.runUserSub(false, "main","drawhand", _x, _y, _length, _angle, _width, _color);}
|
||||
RemoteObject _endx = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _endy = RemoteObject.createImmutable(0f);
|
||||
Debug.locals.put("x", _x);
|
||||
Debug.locals.put("y", _y);
|
||||
Debug.locals.put("length", _length);
|
||||
Debug.locals.put("angle", _angle);
|
||||
Debug.locals.put("width", _width);
|
||||
Debug.locals.put("color", _color);
|
||||
BA.debugLineNum = 122;BA.debugLine="Sub DrawHand(x As Int, y As Int, length As Float,";
|
||||
Debug.ShouldStop(33554432);
|
||||
BA.debugLineNum = 123;BA.debugLine="Dim endX As Float = x + length * CosD(angle)";
|
||||
Debug.ShouldStop(67108864);
|
||||
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_x,_length,main.mostCurrent.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);Debug.locals.put("endX", _endx);
|
||||
BA.debugLineNum = 124;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
|
||||
Debug.ShouldStop(134217728);
|
||||
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_y,_length,main.mostCurrent.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);Debug.locals.put("endY", _endy);
|
||||
BA.debugLineNum = 125;BA.debugLine="Canvas1.DrawLine(x, y, endX, endY, color, widt";
|
||||
Debug.ShouldStop(268435456);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("DrawLine",(Object)(BA.numberCast(float.class, _x)),(Object)(BA.numberCast(float.class, _y)),(Object)(_endx),(Object)(_endy),(Object)(_color),(Object)(BA.numberCast(float.class, _width)));
|
||||
BA.debugLineNum = 126;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(536870912);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _formatelapsedtime(RemoteObject _ms) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("FormatElapsedTime (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,147);
|
||||
if (RapidSub.canDelegate("formatelapsedtime")) { return b4a.example.main.remoteMe.runUserSub(false, "main","formatelapsedtime", _ms);}
|
||||
RemoteObject _seconds = RemoteObject.createImmutable(0);
|
||||
RemoteObject _minutes = RemoteObject.createImmutable(0);
|
||||
RemoteObject _hours = RemoteObject.createImmutable(0);
|
||||
Debug.locals.put("ms", _ms);
|
||||
BA.debugLineNum = 147;BA.debugLine="Sub FormatElapsedTime(ms As Long) As String";
|
||||
Debug.ShouldStop(262144);
|
||||
BA.debugLineNum = 148;BA.debugLine="Dim seconds As Int = ms / 1000";
|
||||
Debug.ShouldStop(524288);
|
||||
_seconds = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_ms,RemoteObject.createImmutable(1000)}, "/",0, 0));Debug.locals.put("seconds", _seconds);Debug.locals.put("seconds", _seconds);
|
||||
BA.debugLineNum = 149;BA.debugLine="Dim minutes As Int = seconds / 60";
|
||||
Debug.ShouldStop(1048576);
|
||||
_minutes = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_seconds,RemoteObject.createImmutable(60)}, "/",0, 0));Debug.locals.put("minutes", _minutes);Debug.locals.put("minutes", _minutes);
|
||||
BA.debugLineNum = 150;BA.debugLine="Dim hours As Int = minutes / 60";
|
||||
Debug.ShouldStop(2097152);
|
||||
_hours = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_minutes,RemoteObject.createImmutable(60)}, "/",0, 0));Debug.locals.put("hours", _hours);Debug.locals.put("hours", _hours);
|
||||
BA.debugLineNum = 151;BA.debugLine="seconds = seconds Mod 60";
|
||||
Debug.ShouldStop(4194304);
|
||||
_seconds = RemoteObject.solve(new RemoteObject[] {_seconds,RemoteObject.createImmutable(60)}, "%",0, 1);Debug.locals.put("seconds", _seconds);
|
||||
BA.debugLineNum = 152;BA.debugLine="minutes = minutes Mod 60";
|
||||
Debug.ShouldStop(8388608);
|
||||
_minutes = RemoteObject.solve(new RemoteObject[] {_minutes,RemoteObject.createImmutable(60)}, "%",0, 1);Debug.locals.put("minutes", _minutes);
|
||||
BA.debugLineNum = 153;BA.debugLine="Return NumberFormat(hours, 2, 0) & \":\" & Numbe";
|
||||
Debug.ShouldStop(16777216);
|
||||
if (true) return RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _hours)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(":"),main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _minutes)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(":"),main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _seconds)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))));
|
||||
BA.debugLineNum = 154;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(33554432);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _globals() throws Exception{
|
||||
//BA.debugLineNum = 21;BA.debugLine="Sub Globals";
|
||||
//BA.debugLineNum = 22;BA.debugLine="Private Canvas1 As Canvas";
|
||||
main.mostCurrent._canvas1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.CanvasWrapper");
|
||||
//BA.debugLineNum = 23;BA.debugLine="Private Panel1 As Panel";
|
||||
main.mostCurrent._panel1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
//BA.debugLineNum = 24;BA.debugLine="Private BtnStart As Button";
|
||||
main.mostCurrent._btnstart = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 25;BA.debugLine="Private BtnPause As Button";
|
||||
main.mostCurrent._btnpause = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 26;BA.debugLine="Private BtnReset As Button";
|
||||
main.mostCurrent._btnreset = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 27;BA.debugLine="Private BtnSync As Button";
|
||||
main.mostCurrent._btnsync = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 29;BA.debugLine="Private lblElapsedTime As Label";
|
||||
main.mostCurrent._lblelapsedtime = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
|
||||
//BA.debugLineNum = 30;BA.debugLine="Private pnlClock As Panel";
|
||||
main.mostCurrent._pnlclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
//BA.debugLineNum = 31;BA.debugLine="Private Timer1 As Timer";
|
||||
main._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
|
||||
//BA.debugLineNum = 32;BA.debugLine="Private myClock As AnalogClock";
|
||||
main.mostCurrent._myclock = RemoteObject.createNew ("b4a.example.analogclock");
|
||||
//BA.debugLineNum = 33;BA.debugLine="Log(\"lblElapsedTime nel Sub Globals: \" & lblElaps";
|
||||
main.mostCurrent.__c.runVoidMethod ("LogImpl","365548",RemoteObject.concat(RemoteObject.createImmutable("lblElapsedTime nel Sub Globals: "),main.mostCurrent._lblelapsedtime.runMethod(true,"IsInitialized")),0);
|
||||
//BA.debugLineNum = 34;BA.debugLine="End Sub";
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
|
||||
public static void initializeProcessGlobals() {
|
||||
|
||||
if (main.processGlobalsRun == false) {
|
||||
main.processGlobalsRun = true;
|
||||
try {
|
||||
main_subs_0._process_globals();
|
||||
starter_subs_0._process_globals();
|
||||
main.myClass = BA.getDeviceClass ("b4a.example.main");
|
||||
starter.myClass = BA.getDeviceClass ("b4a.example.starter");
|
||||
analogclock.myClass = BA.getDeviceClass ("b4a.example.analogclock");
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}public static RemoteObject _process_globals() throws Exception{
|
||||
//BA.debugLineNum = 13;BA.debugLine="Sub Process_Globals";
|
||||
//BA.debugLineNum = 14;BA.debugLine="Private Timer1 As Timer";
|
||||
main._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
|
||||
//BA.debugLineNum = 15;BA.debugLine="Private Running As Boolean = False";
|
||||
main._running = main.mostCurrent.__c.getField(true,"False");
|
||||
//BA.debugLineNum = 16;BA.debugLine="Private StartTime As Long = 0";
|
||||
main._starttime = BA.numberCast(long.class, 0);
|
||||
//BA.debugLineNum = 17;BA.debugLine="Private ElapsedTime As Long = 0";
|
||||
main._elapsedtime = BA.numberCast(long.class, 0);
|
||||
//BA.debugLineNum = 19;BA.debugLine="End Sub";
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
public static RemoteObject _synchronizeclock() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("SynchronizeClock (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,186);
|
||||
if (RapidSub.canDelegate("synchronizeclock")) { return b4a.example.main.remoteMe.runUserSub(false, "main","synchronizeclock");}
|
||||
BA.debugLineNum = 186;BA.debugLine="Sub SynchronizeClock";
|
||||
Debug.ShouldStop(33554432);
|
||||
BA.debugLineNum = 187;BA.debugLine="DrawClock";
|
||||
Debug.ShouldStop(67108864);
|
||||
_drawclock();
|
||||
BA.debugLineNum = 188;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(134217728);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _timer1_tick() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Timer1_Tick (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,78);
|
||||
if (RapidSub.canDelegate("timer1_tick")) { return b4a.example.main.remoteMe.runUserSub(false, "main","timer1_tick");}
|
||||
BA.debugLineNum = 78;BA.debugLine="Sub Timer1_Tick";
|
||||
Debug.ShouldStop(8192);
|
||||
BA.debugLineNum = 79;BA.debugLine="myClock.DrawClock";
|
||||
Debug.ShouldStop(16384);
|
||||
main.mostCurrent._myclock.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 80;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(32768);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user