// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow(UIScreen.MainScreen.Bounds); var accountManager = new DBAccountManager(key: "t3ow4tvu36zlh5s", secret: "w4nmqlk5ul1uiw8"); DBAccountManager.SetSharedManager(accountManager); settingsController = new SettingsController(accountManager); var initialControllers = new List <UIViewController>(); initialControllers.Add(settingsController); var account = accountManager.LinkedAccount; if (account != null) { var fileSystem = new DBFilesystem(account); var folderController = new FolderListController(fileSystem, DBPath.Root); initialControllers.Add(folderController); } navController = new UINavigationController(); navController.ViewControllers = initialControllers.ToArray(); window.RootViewController = navController; window.BackgroundColor = UIColor.White; window.MakeKeyAndVisible(); return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // The account manager stores all the account info. Create this when your app launches var accountMgr = new DBAccountManager(key: appKey, secret: appSecret); DBAccountManager.SetSharedManager(accountMgr); var account = accountMgr.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem(account); DBFilesystem.SetSharedFilesystem(filesystem); } window = new UIWindow(UIScreen.MainScreen.Bounds); loginController = new DVCLogin(); navController = new UINavigationController(loginController); window.RootViewController = navController; window.MakeKeyAndVisible(); return(true); }