package b4a.limitbardemo;

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,31);
if (RapidSub.canDelegate("activity_create")) return main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 31;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 32;BA.debugLine="Activity.LoadLayout(\"main\")";
Debug.ShouldStop(-2147483648);
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("main")),main.mostCurrent.activityBA);
 BA.debugLineNum = 35;BA.debugLine="ltbTest1.Initialize(Me, \"ltbTest1\")";
Debug.ShouldStop(4);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_initialize",main.mostCurrent.activityBA,(Object)(main.getObject()),(Object)(RemoteObject.createImmutable("ltbTest1")));
 BA.debugLineNum = 36;BA.debugLine="ltbTest1.FrontLineColor = Colors.Blue";
Debug.ShouldStop(8);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setfrontlinecolor",main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 37;BA.debugLine="ltbTest1.AddToParent(Activity, 40dip, 100dip, 100";
Debug.ShouldStop(16);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_addtoparent",(Object)(main.mostCurrent._activity),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 40)))),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 100)))),(Object)(RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.runMethod(true,"PerXToCurrent",(Object)(BA.numberCast(float.class, 100)),main.mostCurrent.activityBA),main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 80)))}, "-",1, 1)),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 30)))),(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"Red")),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))));
 BA.debugLineNum = 38;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw 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,50);
if (RapidSub.canDelegate("activity_pause")) return main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 50;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(131072);
 BA.debugLineNum = 51;BA.debugLine="MaxValue = ltbTest.Max";
Debug.ShouldStop(262144);
main._maxvalue = main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_getmax");
 BA.debugLineNum = 52;BA.debugLine="LeftLimit = ltbTest.LimitLeft";
Debug.ShouldStop(524288);
main._leftlimit = main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_getlimitleft");
 BA.debugLineNum = 53;BA.debugLine="RightLimit = ltbTest.LimitRight";
Debug.ShouldStop(1048576);
main._rightlimit = main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_getlimitright");
 BA.debugLineNum = 54;BA.debugLine="ltbTestInit = True";
Debug.ShouldStop(2097152);
main._ltbtestinit = main.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 55;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_resume() throws Exception{
try {
		Debug.PushSubsStack("Activity_Resume (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,40);
if (RapidSub.canDelegate("activity_resume")) return main.remoteMe.runUserSub(false, "main","activity_resume");
 BA.debugLineNum = 40;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(128);
 BA.debugLineNum = 41;BA.debugLine="If ltbTestInit = True Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",main._ltbtestinit,main.mostCurrent.__c.getField(true,"True"))) { 
 BA.debugLineNum = 42;BA.debugLine="ltbTest.Max = MaxValue";
Debug.ShouldStop(512);
main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_setmax",main._maxvalue);
 BA.debugLineNum = 43;BA.debugLine="ltbTest.LimitLeft = LeftLimit";
Debug.ShouldStop(1024);
main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_setlimitleft",main._leftlimit);
 BA.debugLineNum = 44;BA.debugLine="ltbTest.LimitRight = RightLimit";
Debug.ShouldStop(2048);
main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_setlimitright",main._rightlimit);
 BA.debugLineNum = 45;BA.debugLine="lblLimitLeft.Text = ltbTest.LimitLeft";
Debug.ShouldStop(4096);
main.mostCurrent._lbllimitleft.runMethod(true,"setText",(main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_getlimitleft")));
 BA.debugLineNum = 46;BA.debugLine="lblLimitRight.Text = ltbTest.LimitRight";
Debug.ShouldStop(8192);
main.mostCurrent._lbllimitright.runMethod(true,"setText",(main.mostCurrent._ltbtest.runClassMethod (b4a.limitbardemo.limitbar.class, "_getlimitright")));
 };
 BA.debugLineNum = 48;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnchangeproperties_click() throws Exception{
try {
		Debug.PushSubsStack("btnChangeProperties_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,62);
if (RapidSub.canDelegate("btnchangeproperties_click")) return main.remoteMe.runUserSub(false, "main","btnchangeproperties_click");
 BA.debugLineNum = 62;BA.debugLine="Private Sub btnChangeProperties_Click";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 63;BA.debugLine="ltbTest1.Left = 60dip";
Debug.ShouldStop(1073741824);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setleft",main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60))));
 BA.debugLineNum = 64;BA.debugLine="ltbTest1.Width = 250dip";
Debug.ShouldStop(-2147483648);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setwidth",main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 250))));
 BA.debugLineNum = 65;BA.debugLine="ltbTest1.Height = 60dip";
Debug.ShouldStop(1);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setheight",main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60))));
 BA.debugLineNum = 66;BA.debugLine="ltbTest1.BackLineColor = Colors.Blue";
Debug.ShouldStop(2);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setbacklinecolor",main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 67;BA.debugLine="ltbTest1.FrontLineColor = Colors.Green";
Debug.ShouldStop(4);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setfrontlinecolor",main.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 68;BA.debugLine="ltbTest1.Max = 150";
Debug.ShouldStop(8);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setmax",BA.numberCast(int.class, 150));
 BA.debugLineNum = 69;BA.debugLine="ltbTest1.LimitLeft = 20";
Debug.ShouldStop(16);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setlimitleft",BA.numberCast(int.class, 20));
 BA.debugLineNum = 70;BA.debugLine="ltbTest1.LimitRight = 120";
Debug.ShouldStop(32);
main.mostCurrent._ltbtest1.runClassMethod (b4a.limitbardemo.limitbar.class, "_setlimitright",BA.numberCast(int.class, 120));
 BA.debugLineNum = 71;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 26;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 27;BA.debugLine="Private ltbTest, ltbTest1 As LimitBar";
main.mostCurrent._ltbtest = RemoteObject.createNew ("b4a.limitbardemo.limitbar");
main.mostCurrent._ltbtest1 = RemoteObject.createNew ("b4a.limitbardemo.limitbar");
 //BA.debugLineNum = 28;BA.debugLine="Private lblLimitLeft, lblLimitRight As Label";
main.mostCurrent._lbllimitleft = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
main.mostCurrent._lbllimitright = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
 //BA.debugLineNum = 29;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _ltbtest_valueschanged(RemoteObject _limitleft,RemoteObject _limitright) throws Exception{
try {
		Debug.PushSubsStack("ltbTest_ValuesChanged (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,57);
if (RapidSub.canDelegate("ltbtest_valueschanged")) return main.remoteMe.runUserSub(false, "main","ltbtest_valueschanged", _limitleft, _limitright);
Debug.locals.put("LimitLeft", _limitleft);
Debug.locals.put("LimitRight", _limitright);
 BA.debugLineNum = 57;BA.debugLine="Sub ltbTest_ValuesChanged(LimitLeft As Int, LimitR";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 58;BA.debugLine="lblLimitLeft.Text = LimitLeft";
Debug.ShouldStop(33554432);
main.mostCurrent._lbllimitleft.runMethod(true,"setText",(_limitleft));
 BA.debugLineNum = 59;BA.debugLine="lblLimitRight.Text = LimitRight";
Debug.ShouldStop(67108864);
main.mostCurrent._lbllimitright.runMethod(true,"setText",(_limitright));
 BA.debugLineNum = 60;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}

public static void initializeProcessGlobals() {
    
    if (main.processGlobalsRun == false) {
	    main.processGlobalsRun = true;
		try {
		        main_subs_0._process_globals();
main.myClass = BA.getDeviceClass ("b4a.limitbardemo.main");
limitbar.myClass = BA.getDeviceClass ("b4a.limitbardemo.limitbar");
		
        } catch (Exception e) {
			throw new RuntimeException(e);
		}
    }
}public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 19;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 20;BA.debugLine="Public MaxValue = 100 As Int";
main._maxvalue = BA.numberCast(int.class, 100);
 //BA.debugLineNum = 21;BA.debugLine="Public LeftLimit = 0 As Int";
main._leftlimit = BA.numberCast(int.class, 0);
 //BA.debugLineNum = 22;BA.debugLine="Public RightLimit = MaxValue As Int";
main._rightlimit = main._maxvalue;
 //BA.debugLineNum = 23;BA.debugLine="Public ltbTestInit = False As Boolean";
main._ltbtestinit = main.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 24;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}