Exemple #1
0
        //
        // 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);


            Util.VisualMode = VisualMode.None;
            //Util.VisualMode = VisualMode.TintColor;
            //Util.VisualMode = VisualMode.UIAppearance;
            AppearanceManager.SetAppearance();

            UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque;
            
            tabBar = new UITabBarController();
            loginDvc = new LoginDialogViewController();


            //have a look at the ExpenseModel class to see why it's hard to do 
            // theming on MonoTouch.Dialog auto-generated stuff
            var expense = new ExpenseModel();
            var context = new BindingContext(null, expense, "Expenses");
            expenseDvc = new BaseDialogViewController(context.Root);
            expenseDvc.Title = "Expenses";
            
            var tabControllers = new UINavigationController[] {
            

                new UINavigationController(loginDvc) {
                    TabBarItem = new UITabBarItem("Login", Resources.Padlock, 1)
                },
                new UINavigationController(expenseDvc) {
                    TabBarItem = new UITabBarItem("Expenses", Resources.Expense, 2)
                }


                /*
                new UINavigationController(deadlines) {
                    TabBarItem = new UITabBarItem("Deadlines", Resources.Deadlines, 2)
                },
                new UINavigationController(reports) {
                    TabBarItem = new UITabBarItem("Reports", Resources.Deadlines, 4)
                },
                new UINavigationController(you) {
                    TabBarItem = new UITabBarItem("You", Resources.You, 3)
                }
                */

                
            };
            
            tabBar.SetViewControllers(tabControllers, false);
            

            window.RootViewController = tabBar;
            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)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);


            Util.VisualMode = VisualMode.None;
            //Util.VisualMode = VisualMode.TintColor;
            //Util.VisualMode = VisualMode.UIAppearance;
            AppearanceManager.SetAppearance();

            UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque;

            tabBar   = new UITabBarController();
            loginDvc = new LoginDialogViewController();


            //have a look at the ExpenseModel class to see why it's hard to do
            // theming on MonoTouch.Dialog auto-generated stuff
            var expense = new ExpenseModel();
            var context = new BindingContext(null, expense, "Expenses");

            expenseDvc       = new BaseDialogViewController(context.Root);
            expenseDvc.Title = "Expenses";

            var tabControllers = new UINavigationController[] {
                new UINavigationController(loginDvc)
                {
                    TabBarItem = new UITabBarItem("Login", Resources.Padlock, 1)
                },
                new UINavigationController(expenseDvc)
                {
                    TabBarItem = new UITabBarItem("Expenses", Resources.Expense, 2)
                }


                /*
                 * new UINavigationController(deadlines) {
                 *  TabBarItem = new UITabBarItem("Deadlines", Resources.Deadlines, 2)
                 * },
                 * new UINavigationController(reports) {
                 *  TabBarItem = new UITabBarItem("Reports", Resources.Deadlines, 4)
                 * },
                 * new UINavigationController(you) {
                 *  TabBarItem = new UITabBarItem("You", Resources.You, 3)
                 * }
                 */
            };

            tabBar.SetViewControllers(tabControllers, false);


            window.RootViewController = tabBar;
            window.MakeKeyAndVisible();

            return(true);
        }