protected override void OnCreate(Bundle bundle) { TinyIoCContainer.Current.Register<WebMarco.Backend.App.Common.BaseAppDelegate, AppDelegate>(AppDelegate.Instance); TinyIoCContainer.Current.Register<AppHelper.Data.Manager, Manager>(new Manager((Context)this)); AppHelper.Data.ConnectDatabase(); base.OnCreate(bundle); /// Program entry point is here MainView = new MainView(this); SetContentView((View)MainView); MainView.Load(); }
public override void MakeKeyAndVisible() { ///Is not necessary //TinyIoCContainer.Current.Register<WebMarco.Backend.App.Common.BaseAppDelegate, AppDelegate>((AppDelegate)(AppDelegate.Instance)); //TinyIoCContainer.Current.Register<AppHelper.Data.Manager, Manager>(new Manager()); //AppHelper.Data.ConnectDatabase();//TODO: noo has to be done async - otherwise will kill the app on huge db load due to timeout MainView = new MainView(this); MainView.CurrentFrame = Rectangle.GetWithRectangleF(UIScreen.MainScreen.Bounds); //SetContentView((View)MainView); UIViewController rootViewController = new UIViewController(); rootViewController.View = (UIView)MainView; //MainView.Load(); //TODO: or here RootViewController = rootViewController; base.MakeKeyAndVisible(); MainView.Load(); //TODO: or here /// Program entry point is here }