/// <summary>
        /// Initializes the app.
        /// </summary>
        private void InitializeApp()
        {
            // Initialize SVG
            XamSvg.Setup.InitSvgLib();
            //Tells XamSvg in which assembly to search for svg when "res:" is used
            XamSvg.Shared.Config.ResourceAssembly = typeof(SVGImages).GetTypeInfo().Assembly;

            // If not required for your application you can safely delete this method
            var setup = new AppSetup();

            AppContainer.Container = setup.CreateContainer();
            setup.InitObjectMapping();

            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var viewController = new LoginViewController();
            // Add the Navigation Controller and initialize it
            var navController = new UINavigationController(viewController);

            Window.RootViewController = navController;
            Window.MakeKeyAndVisible();
        }
Esempio n. 2
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // Initialize Automapper
            var setup = new AppSetup();

            setup.InitObjectMapping();

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }