package b4a.LibLimitBarDemo;

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,26);
if (RapidSub.canDelegate("activity_create")) return main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 26;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 27;BA.debugLine="Activity.LoadLayout(\"main\")";
Debug.ShouldStop(67108864);
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("main")),main.mostCurrent.activityBA);
 BA.debugLineNum = 30;BA.debugLine="ltbTest1.Initialize(Me, \"ltbTest1\")";
Debug.ShouldStop(536870912);
main.mostCurrent._ltbtest1.runVoidMethod ("_initialize",main.mostCurrent.activityBA,(Object)(main.getObject()),(Object)(RemoteObject.createImmutable("ltbTest1")));
 BA.debugLineNum = 31;BA.debugLine="ltbTest1.FrontLineColor = Colors.Blue";
Debug.ShouldStop(1073741824);
main.mostCurrent._ltbtest1.runVoidMethod ("_setfrontlinecolor",main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 32;BA.debugLine="ltbTest1.AddToParent(Activity, 30dip, 100dip, 200";
Debug.ShouldStop(-2147483648);
main.mostCurrent._ltbtest1.runVoidMethod ("_addtoparent",(Object)(main.mostCurrent._activity),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 30)))),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 100)))),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 200)))),(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 = 33;BA.debugLine="End Sub";
Debug.ShouldStop(1);
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,43);
if (RapidSub.canDelegate("activity_pause")) return main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 43;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(1024);
 BA.debugLineNum = 44;BA.debugLine="MaxValue = ltbTest.Max";
Debug.ShouldStop(2048);
main._maxvalue = main.mostCurrent._ltbtest.runMethod(true,"_getmax");
 BA.debugLineNum = 45;BA.debugLine="LeftLimit = ltbTest.LimitLeft";
Debug.ShouldStop(4096);
main._leftlimit = main.mostCurrent._ltbtest.runMethod(true,"_getlimitleft");
 BA.debugLineNum = 46;BA.debugLine="RightLimit = ltbTest.LimitRight";
Debug.ShouldStop(8192);
main._rightlimit = main.mostCurrent._ltbtest.runMethod(true,"_getlimitright");
 BA.debugLineNum = 47;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
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,35);
if (RapidSub.canDelegate("activity_resume")) return main.remoteMe.runUserSub(false, "main","activity_resume");
 BA.debugLineNum = 35;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(4);
 BA.debugLineNum = 36;BA.debugLine="ltbTest.Max = MaxValue";
Debug.ShouldStop(8);
main.mostCurrent._ltbtest.runMethod(true,"_setmax",main._maxvalue);
 BA.debugLineNum = 37;BA.debugLine="ltbTest.LimitLeft = LeftLimit";
Debug.ShouldStop(16);
main.mostCurrent._ltbtest.runMethod(true,"_setlimitleft",main._leftlimit);
 BA.debugLineNum = 38;BA.debugLine="ltbTest.LimitRight = RightLimit";
Debug.ShouldStop(32);
main.mostCurrent._ltbtest.runMethod(true,"_setlimitright",main._rightlimit);
 BA.debugLineNum = 39;BA.debugLine="lblLimitLeft.Text = LeftLimit";
Debug.ShouldStop(64);
main.mostCurrent._lbllimitleft.runMethod(true,"setText",(main._leftlimit));
 BA.debugLineNum = 40;BA.debugLine="lblLimitRight.Text = RightLimit";
Debug.ShouldStop(128);
main.mostCurrent._lbllimitright.runMethod(true,"setText",(main._rightlimit));
 BA.debugLineNum = 41;BA.debugLine="End Sub";
Debug.ShouldStop(256);
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,54);
if (RapidSub.canDelegate("btnchangeproperties_click")) return main.remoteMe.runUserSub(false, "main","btnchangeproperties_click");
 BA.debugLineNum = 54;BA.debugLine="Private Sub btnChangeProperties_Click";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 55;BA.debugLine="ltbTest1.Left = 60dip";
Debug.ShouldStop(4194304);
main.mostCurrent._ltbtest1.runMethod(true,"_setleft",main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60))));
 BA.debugLineNum = 56;BA.debugLine="ltbTest1.Width = 250dip";
Debug.ShouldStop(8388608);
main.mostCurrent._ltbtest1.runMethod(true,"_setwidth",main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 250))));
 BA.debugLineNum = 57;BA.debugLine="ltbTest1.Height = 60dip";
Debug.ShouldStop(16777216);
main.mostCurrent._ltbtest1.runMethod(true,"_setheight",main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60))));
 BA.debugLineNum = 58;BA.debugLine="ltbTest1.BackLineColor = Colors.Blue";
Debug.ShouldStop(33554432);
main.mostCurrent._ltbtest1.runMethod(true,"_setbacklinecolor",main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 59;BA.debugLine="ltbTest1.FrontLineColor = Colors.Green";
Debug.ShouldStop(67108864);
main.mostCurrent._ltbtest1.runVoidMethod ("_setfrontlinecolor",main.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 60;BA.debugLine="ltbTest1.Max = 150";
Debug.ShouldStop(134217728);
main.mostCurrent._ltbtest1.runMethod(true,"_setmax",BA.numberCast(int.class, 150));
 BA.debugLineNum = 61;BA.debugLine="ltbTest1.LimitLeft = 20";
Debug.ShouldStop(268435456);
main.mostCurrent._ltbtest1.runMethod(true,"_setlimitleft",BA.numberCast(int.class, 20));
 BA.debugLineNum = 62;BA.debugLine="ltbTest1.LimitRight = 120";
Debug.ShouldStop(536870912);
main.mostCurrent._ltbtest1.runMethod(true,"_setlimitright",BA.numberCast(int.class, 120));
 BA.debugLineNum = 63;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 21;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 22;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 = 23;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 = 24;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,49);
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 = 49;BA.debugLine="Sub ltbTest_ValuesChanged(LimitLeft As Int, LimitR";
Debug.ShouldStop(65536);
 BA.debugLineNum = 50;BA.debugLine="lblLimitLeft.Text = LimitLeft";
Debug.ShouldStop(131072);
main.mostCurrent._lbllimitleft.runMethod(true,"setText",(_limitleft));
 BA.debugLineNum = 51;BA.debugLine="lblLimitRight.Text = LimitRight";
Debug.ShouldStop(262144);
main.mostCurrent._lbllimitright.runMethod(true,"setText",(_limitright));
 BA.debugLineNum = 52;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
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.LibLimitBarDemo.main");
		
        } catch (Exception e) {
			throw new RuntimeException(e);
		}
    }
}public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 15;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 16;BA.debugLine="Public MaxValue = 100 As Int";
main._maxvalue = BA.numberCast(int.class, 100);
 //BA.debugLineNum = 17;BA.debugLine="Public LeftLimit = 0 As Int";
main._leftlimit = BA.numberCast(int.class, 0);
 //BA.debugLineNum = 18;BA.debugLine="Public RightLimit = MaxValue As Int";
main._rightlimit = main._maxvalue;
 //BA.debugLineNum = 19;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}