
#import "b4i_main.h"


@implementation b4i_main 


+ (instancetype)new {
    static b4i_main* shared = nil;
    if (shared == nil) {
        shared = [self alloc];
        shared.bi = [[B4IShellBI alloc] init:shared];
        shared.__c = [B4ICommon new];
    }
    return shared;
}
- (int)debugAppId {
    return 0;
}


- (NSString*)  _application_background{
[B4IRDebugUtils shared].currentModule=@"main";
if ([B4IDebug shouldDelegate: @"application_background"])
	return ((NSString*) [B4IDebug delegate:self.bi :@"application_background" :nil]);
[B4IRDebugUtils shared].currentLine=196608;
 //BA.debugLineNum = 196608;BA.debugLine="Private Sub Application_Background";
[B4IRDebugUtils shared].currentLine=196610;
 //BA.debugLineNum = 196610;BA.debugLine="End Sub";
return @"";
}
- (NSString*)  _application_start:(B4INavigationControllerWrapper*) _nav{
[B4IRDebugUtils shared].currentModule=@"main";
if ([B4IDebug shouldDelegate: @"application_start"])
	return ((NSString*) [B4IDebug delegate:self.bi :@"application_start:" :@[_nav]]);
[B4IRDebugUtils shared].currentLine=65536;
 //BA.debugLineNum = 65536;BA.debugLine="Private Sub Application_Start (Nav As NavigationCo";
[B4IRDebugUtils shared].currentLine=65537;
 //BA.debugLineNum = 65537;BA.debugLine="NavControl = Nav";
self._navcontrol = _nav;
[B4IRDebugUtils shared].currentLine=65538;
 //BA.debugLineNum = 65538;BA.debugLine="Page1.Initialize(\"Page1\")";
[self._page1 Initialize:self.bi :@"Page1"];
[B4IRDebugUtils shared].currentLine=65539;
 //BA.debugLineNum = 65539;BA.debugLine="Page1.Title = \"Page 1\"";
[self._page1 setTitle:@"Page 1"];
[B4IRDebugUtils shared].currentLine=65540;
 //BA.debugLineNum = 65540;BA.debugLine="Page1.RootPanel.Color = Colors.White";
[[self._page1 RootPanel] setColor:[[self.__c Colors] White]];
[B4IRDebugUtils shared].currentLine=65541;
 //BA.debugLineNum = 65541;BA.debugLine="Page1.RootPanel.LoadLayout(\"Main\")";
[[self._page1 RootPanel] LoadLayout:@"Main" :self.bi];
[B4IRDebugUtils shared].currentLine=65542;
 //BA.debugLineNum = 65542;BA.debugLine="NavControl.ShowPage(Page1)";
[self._navcontrol ShowPage:(UIViewController*)((self._page1).object)];
[B4IRDebugUtils shared].currentLine=65544;
 //BA.debugLineNum = 65544;BA.debugLine="cbtTest10.Initialize(Me, \"cbtTest\")";
[self._cbttest10 _initialize:self.bi :self :@"cbtTest"];
[B4IRDebugUtils shared].currentLine=65545;
 //BA.debugLineNum = 65545;BA.debugLine="cbtTest10.IconFont = lblDummy.Font";
[self._cbttest10 _seticonfont:[self._lbldummy Font]];
[B4IRDebugUtils shared].currentLine=65546;
 //BA.debugLineNum = 65546;BA.debugLine="cbtTest10.AddToParent(Page1.RootPanel, 20, 250, 6";
[self._cbttest10 _addtoparent:[self._page1 RootPanel] :(int) (20) :(int) (250) :(int) (60) :(int) (60) :[[self.__c Colors] RGB:(int) (0) :(int) (0) :(int) (139)] :[self.bi CharToString:[self.__c Chr:(int) (0xe05c)]] :@"Test 10"];
[B4IRDebugUtils shared].currentLine=65547;
 //BA.debugLineNum = 65547;BA.debugLine="cbtTest10.Tag = 10";
[self._cbttest10 _settag:(NSObject*)(@(10))];
[B4IRDebugUtils shared].currentLine=65548;
 //BA.debugLineNum = 65548;BA.debugLine="End Sub";
return @"";
}
- (NSString*)  _cbttest_click{
[B4IRDebugUtils shared].currentModule=@"main";
if ([B4IDebug shouldDelegate: @"cbttest_click"])
	return ((NSString*) [B4IDebug delegate:self.bi :@"cbttest_click" :nil]);
b4i_custombutton* _cbt = nil;
int _index = 0;
[B4IRDebugUtils shared].currentLine=262144;
 //BA.debugLineNum = 262144;BA.debugLine="Private Sub cbtTest_Click";
[B4IRDebugUtils shared].currentLine=262145;
 //BA.debugLineNum = 262145;BA.debugLine="Private cbt As CustomButton";
_cbt = [b4i_custombutton new];
[B4IRDebugUtils shared].currentLine=262146;
 //BA.debugLineNum = 262146;BA.debugLine="Private Index As Int";
_index = 0;
[B4IRDebugUtils shared].currentLine=262148;
 //BA.debugLineNum = 262148;BA.debugLine="cbt = Sender";
_cbt = (b4i_custombutton*)([self.__c Sender:self.bi]);
[B4IRDebugUtils shared].currentLine=262149;
 //BA.debugLineNum = 262149;BA.debugLine="Index = cbt.Tag";
_index = [self.bi ObjectToNumber:[_cbt _gettag]].intValue;
[B4IRDebugUtils shared].currentLine=262151;
 //BA.debugLineNum = 262151;BA.debugLine="Select Index";
switch (_index) {
case 1: {
[B4IRDebugUtils shared].currentLine=262153;
 //BA.debugLineNum = 262153;BA.debugLine="Log(\"cbtTest1_Click\")";
[self.__c Log:@"cbtTest1_Click"];
 break; }
case 2: {
[B4IRDebugUtils shared].currentLine=262155;
 //BA.debugLineNum = 262155;BA.debugLine="Log(\"cbtTest2_Click\")";
[self.__c Log:@"cbtTest2_Click"];
 break; }
case 10: {
[B4IRDebugUtils shared].currentLine=262157;
 //BA.debugLineNum = 262157;BA.debugLine="Log(\"cbtTest10_Click\")";
[self.__c Log:@"cbtTest10_Click"];
 break; }
default: {
[B4IRDebugUtils shared].currentLine=262159;
 //BA.debugLineNum = 262159;BA.debugLine="Log(\"cbtTest\" & Index & \"_Click\")";
[self.__c Log:[@[@"cbtTest",[self.bi NumberToString:@(_index)],@"_Click"] componentsJoinedByString:@""]];
 break; }
}
;
[B4IRDebugUtils shared].currentLine=262161;
 //BA.debugLineNum = 262161;BA.debugLine="End Sub";
return @"";
}
- (NSString*)  _cbttest_longclick{
[B4IRDebugUtils shared].currentModule=@"main";
if ([B4IDebug shouldDelegate: @"cbttest_longclick"])
	return ((NSString*) [B4IDebug delegate:self.bi :@"cbttest_longclick" :nil]);
b4i_custombutton* _cbt = nil;
int _index = 0;
[B4IRDebugUtils shared].currentLine=327680;
 //BA.debugLineNum = 327680;BA.debugLine="Private Sub cbtTest_LongClick";
[B4IRDebugUtils shared].currentLine=327681;
 //BA.debugLineNum = 327681;BA.debugLine="Private cbt As CustomButton";
_cbt = [b4i_custombutton new];
[B4IRDebugUtils shared].currentLine=327682;
 //BA.debugLineNum = 327682;BA.debugLine="Private Index As Int";
_index = 0;
[B4IRDebugUtils shared].currentLine=327684;
 //BA.debugLineNum = 327684;BA.debugLine="cbt = Sender";
_cbt = (b4i_custombutton*)([self.__c Sender:self.bi]);
[B4IRDebugUtils shared].currentLine=327685;
 //BA.debugLineNum = 327685;BA.debugLine="Index = cbt.Tag";
_index = [self.bi ObjectToNumber:[_cbt _gettag]].intValue;
[B4IRDebugUtils shared].currentLine=327687;
 //BA.debugLineNum = 327687;BA.debugLine="Select Index";
switch (_index) {
case 1: {
[B4IRDebugUtils shared].currentLine=327689;
 //BA.debugLineNum = 327689;BA.debugLine="Log(\"cbtTest1_LongClick\")";
[self.__c Log:@"cbtTest1_LongClick"];
 break; }
case 2: {
[B4IRDebugUtils shared].currentLine=327691;
 //BA.debugLineNum = 327691;BA.debugLine="Log(\"cbtTest2_LongClick\")";
[self.__c Log:@"cbtTest2_LongClick"];
 break; }
case 10: {
[B4IRDebugUtils shared].currentLine=327693;
 //BA.debugLineNum = 327693;BA.debugLine="Log(\"cbtTest10_LongClick\")";
[self.__c Log:@"cbtTest10_LongClick"];
 break; }
default: {
[B4IRDebugUtils shared].currentLine=327695;
 //BA.debugLineNum = 327695;BA.debugLine="Log(\"cbtTest\" & Index & \"_LongClick\")";
[self.__c Log:[@[@"cbtTest",[self.bi NumberToString:@(_index)],@"_LongClick"] componentsJoinedByString:@""]];
 break; }
}
;
[B4IRDebugUtils shared].currentLine=327697;
 //BA.debugLineNum = 327697;BA.debugLine="End Sub";
return @"";
}
- (NSString*)  _page1_resize:(int) _width :(int) _height{
[B4IRDebugUtils shared].currentModule=@"main";
if ([B4IDebug shouldDelegate: @"page1_resize"])
	return ((NSString*) [B4IDebug delegate:self.bi :@"page1_resize::" :@[@(_width),@(_height)]]);
[B4IRDebugUtils shared].currentLine=131072;
 //BA.debugLineNum = 131072;BA.debugLine="Private Sub Page1_Resize(Width As Int, Height As I";
[B4IRDebugUtils shared].currentLine=131074;
 //BA.debugLineNum = 131074;BA.debugLine="End Sub";
return @"";
}

- (void)initializeStaticModules {
    [[b4i_main new]initializeModule];

}
- (NSString*)  _process_globals{
[B4IRDebugUtils shared].currentModule=@"main";
if ([B4IDebug shouldDelegate: @"process_globals"])
	return ((NSString*) [B4IDebug delegate:self.bi :@"process_globals" :nil]);
[B4IRDebugUtils shared].currentLine=0;
 //BA.debugLineNum = 0;BA.debugLine="Sub Process_Globals";
[B4IRDebugUtils shared].currentLine=3;
 //BA.debugLineNum = 3;BA.debugLine="Public App As Application";
self._app = [B4IApplicationWrapper new];
[B4IRDebugUtils shared].currentLine=4;
 //BA.debugLineNum = 4;BA.debugLine="Public NavControl As NavigationController";
self._navcontrol = [B4INavigationControllerWrapper new];
[B4IRDebugUtils shared].currentLine=5;
 //BA.debugLineNum = 5;BA.debugLine="Private Page1 As Page";
self._page1 = [B4IPage new];
[B4IRDebugUtils shared].currentLine=7;
 //BA.debugLineNum = 7;BA.debugLine="Private cbtTest10 As CustomButton";
self._cbttest10 = [b4i_custombutton new];
[B4IRDebugUtils shared].currentLine=8;
 //BA.debugLineNum = 8;BA.debugLine="Private lblDummy As Label";
self._lbldummy = [B4ILabelWrapper new];
[B4IRDebugUtils shared].currentLine=9;
 //BA.debugLineNum = 9;BA.debugLine="End Sub";
return @"";
}
@end