package b4a.ClsCustomButton;

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,24);
if (RapidSub.canDelegate("activity_create")) return main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 24;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 25;BA.debugLine="Activity.LoadLayout(\"Main\")";
Debug.ShouldStop(16777216);
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("Main")),main.mostCurrent.activityBA);
 BA.debugLineNum = 27;BA.debugLine="cbtTest10.Initialize(Me, \"cbtTest\")";
Debug.ShouldStop(67108864);
main.mostCurrent._cbttest10.runVoidMethod ("_initialize",main.mostCurrent.activityBA,(Object)(main.getObject()),(Object)(RemoteObject.createImmutable("cbtTest")));
 BA.debugLineNum = 28;BA.debugLine="cbtTest10.IconTypeface = lblDummy.Typeface";
Debug.ShouldStop(134217728);
main.mostCurrent._cbttest10.runVoidMethod ("_seticontypeface",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.constants.TypefaceWrapper"), main.mostCurrent._lbldummy.runMethod(false,"getTypeface")));
 BA.debugLineNum = 29;BA.debugLine="cbtTest10.AddToParent(Activity, 20dip, 200dip, 60";
Debug.ShouldStop(268435456);
main.mostCurrent._cbttest10.runVoidMethod ("_addtoparent",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.PanelWrapper"), main.mostCurrent._activity.getObject()),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 20)))),(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, 60)))),(Object)(main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60)))),(Object)(main.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 139)))),(Object)(BA.ObjectToString(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 0xe149))))),(Object)(RemoteObject.createImmutable("Test 10")));
 BA.debugLineNum = 30;BA.debugLine="cbtTest10.Tag = 10";
Debug.ShouldStop(536870912);
main.mostCurrent._cbttest10.runMethod(false,"_settag",RemoteObject.createImmutable((10)));
 BA.debugLineNum = 31;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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,37);
if (RapidSub.canDelegate("activity_pause")) return main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 37;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(16);
 BA.debugLineNum = 39;BA.debugLine="End Sub";
Debug.ShouldStop(64);
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,33);
if (RapidSub.canDelegate("activity_resume")) return main.remoteMe.runUserSub(false, "main","activity_resume");
 BA.debugLineNum = 33;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(1);
 BA.debugLineNum = 35;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _cbttest_click() throws Exception{
try {
		Debug.PushSubsStack("cbtTest_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,41);
if (RapidSub.canDelegate("cbttest_click")) return main.remoteMe.runUserSub(false, "main","cbttest_click");
RemoteObject _cbt = RemoteObject.declareNull("b4a.ClsCustomButton.custombutton");
RemoteObject _index = RemoteObject.createImmutable(0);
 BA.debugLineNum = 41;BA.debugLine="Private Sub cbtTest_Click";
Debug.ShouldStop(256);
 BA.debugLineNum = 42;BA.debugLine="Private cbt As CustomButton";
Debug.ShouldStop(512);
_cbt = RemoteObject.createNew ("b4a.ClsCustomButton.custombutton");Debug.locals.put("cbt", _cbt);
 BA.debugLineNum = 43;BA.debugLine="Private Index As Int";
Debug.ShouldStop(1024);
_index = RemoteObject.createImmutable(0);Debug.locals.put("Index", _index);
 BA.debugLineNum = 45;BA.debugLine="cbt = Sender";
Debug.ShouldStop(4096);
_cbt = (main.mostCurrent.__c.runMethod(false,"Sender",main.mostCurrent.activityBA));Debug.locals.put("cbt", _cbt);
 BA.debugLineNum = 46;BA.debugLine="Index = cbt.Tag";
Debug.ShouldStop(8192);
_index = BA.numberCast(int.class, _cbt.runMethod(false,"_gettag"));Debug.locals.put("Index", _index);
 BA.debugLineNum = 48;BA.debugLine="Select Index";
Debug.ShouldStop(32768);
switch (BA.switchObjectToInt(_index,BA.numberCast(int.class, 1),BA.numberCast(int.class, 2),BA.numberCast(int.class, 10))) {
case 0: {
 BA.debugLineNum = 50;BA.debugLine="Log(\"cbtTest1_Click\")";
Debug.ShouldStop(131072);
main.mostCurrent.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest1_Click")));
 break; }
case 1: {
 BA.debugLineNum = 52;BA.debugLine="Log(\"cbtTest2_Click\")";
Debug.ShouldStop(524288);
main.mostCurrent.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest2_Click")));
 break; }
case 2: {
 BA.debugLineNum = 54;BA.debugLine="Log(\"cbtTest10_Click\")";
Debug.ShouldStop(2097152);
main.mostCurrent.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest10_Click")));
 break; }
default: {
 BA.debugLineNum = 56;BA.debugLine="Log(\"cbtTest\" & Index & \"_Click\")";
Debug.ShouldStop(8388608);
main.mostCurrent.__c.runVoidMethod ("Log",(Object)(RemoteObject.concat(RemoteObject.createImmutable("cbtTest"),_index,RemoteObject.createImmutable("_Click"))));
 break; }
}
;
 BA.debugLineNum = 58;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 19;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 20;BA.debugLine="Private cbtTest10 As CustomButton";
main.mostCurrent._cbttest10 = RemoteObject.createNew ("b4a.ClsCustomButton.custombutton");
 //BA.debugLineNum = 21;BA.debugLine="Private lblDummy As Label";
main.mostCurrent._lbldummy = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
 //BA.debugLineNum = 22;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}

public static void initializeProcessGlobals() {
    
    if (main.processGlobalsRun == false) {
	    main.processGlobalsRun = true;
		try {
		        main_subs_0._process_globals();
main.myClass = BA.getDeviceClass ("b4a.ClsCustomButton.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 = 17;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}