protected virtual void StartMvvmCross(MvxIosViewPresenter presenter, MvxAsyncIosSetup setup)
        {
            Task.Run(async() =>
            {
                try
                {
                    await setup.InitializeAsync();

                    var startup = Mvx.Resolve <IMvxAppStart>();

                    InvokeOnMainThread(() =>
                    {
                        startup.Start();

                        RequestNotificationAuthorization();

                        Initialized = true;

                        OnInitialized?.Invoke();
                    });
#if DEBUG
                    MvxTrace.TaggedTrace(MvxTraceLevel.Diagnostic, this.GetType().FullName, $"Ellapsed milliseconds after MvvmCross setup {Base.Core.ServicesDebug.StartupTimerService.Instance.EllapsedMilliseconds()}");
                    Base.Core.ServicesDebug.StartupTimerService.Instance.StopTimer();
#endif
                }
                catch (Exception ex)
                {
                    MvxTrace.TaggedTrace(MvxTraceLevel.Error, this.GetType().FullName, ex.BuildAllMessagesAndStackTrace());
                }
            });
        }
Beispiel #2
0
        /// <summary>
        /// MvvmCross Mods:
        /// - Creates a new presenter, which determines how Views are shown
        /// - This example uses a standard presenter.
        /// </summary>
        /// <param name="application"></param>
        /// <param name="launchOptions"></param>
        /// <returns></returns>
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            // MvvmCross Mod Start---------------------------------------------

            // This class will determine how Views are shown - standard in this example.
            var presenter = new MvxIosViewPresenter(this, Window);

            // Init the Setup object, which initializes App.cs
            var setup = new Setup(this, presenter);

            setup.Initialize();

            // Use IoC to find and start the IMvxAppStart object.
            // Remember, TipViewModel, inherited from MvxViewModel, was registered as the start object for IMvxAppStart in Core.App.cs
            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            // MvvmCross Mod End--------------------------------------------------

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

            return(true);
        }
Beispiel #3
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            var presenter = new MvxIosViewPresenter(this, Window);
            var setup     = new Setup(this, presenter);

            setup.Initialize();
            Mvx.Resolve <IMvxAppStart>().Start();

            return(true);
        }
Beispiel #4
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var presenter = new MvxIosViewPresenter(this, Window);
            var setup     = new Setup(this, presenter);

            setup.Initialize();
            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            Window.MakeKeyAndVisible();

            return(true);
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            //MvxIosViewPresenter is the class that will determine how Views are shown - for this sample, we choose a 'standard' one
            var presenter = new MvxIosViewPresenter(this, Window);

            //Calls Mvx Setups.
            var setup = new TipCalc.UI.iOS.Setup(this, presenter);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>(); //Returns TipCalc.Core.App, as defined by TipCalc.UI.iOS.CreateApp();

            startup.Start();

            this.Window.MakeKeyAndVisible();
            return(true);
        }
Beispiel #6
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);

            var presenter = new MvxIosViewPresenter(this, _window);
            var setup     = new Setup(this, presenter);

            setup.Initialize();

            var start = Mvx.Resolve <IMvxAppStart>();

            start.Start();

            _window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #7
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);

            // initialize app for single screen iPhone display
            var presenter = new MvxIosViewPresenter(this, _window);
            var setup     = new Setup(this, presenter);

            setup.Initialize();

            // start the app
            var start = Mvx.Resolve <IMvxAppStart>();

            start.Start();

            _window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #8
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);

            var presenter = new MvxIosViewPresenter(this, window);
            var setup     = new Setup(this, presenter);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            presenter.MasterNavigationController.NavigationBarHidden = true;

            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #9
0
        /// <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;

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            // MVX Setup
            var presenter = new MvxIosViewPresenter(this, Window);
            var setup     = new Mobile.iOS.Mvx.Setup(this, presenter);

            setup.Initialize();
            var startup = MvvmCross.Platform.Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            Window.MakeKeyAndVisible();
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var viewPresenter = new MvxIosViewPresenter(this, Window);
            var setup         = new AppSetup(this, viewPresenter);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            Window.MakeKeyAndVisible();
            Window.BackgroundColor = UIColor.White;

            return(true);
        }
Beispiel #11
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            // If you have defined a root view controller, set it here:
            // Window.RootViewController = myViewController;
            var presenter = new MvxIosViewPresenter(this, window);

            var setup = new Setup(this, presenter);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

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

            return(true);
        }
Beispiel #12
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var presenter = new MvxIosViewPresenter(this, Window);

            var setup = new Setup(this, presenter);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            // Code to start the Xamarin Test Cloud Agent
            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            #endif

            return(true);
        }
Beispiel #13
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            //mvvmcross
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var presenter = new MvxIosViewPresenter(this, Window);

            var setup = new Setup(this, presenter);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            Window.MakeKeyAndVisible();

            AVAuthorizationStatus authStatus = AVCaptureDevice.GetAuthorizationStatus(AVMediaType.Video);

            return(true);
        }
Beispiel #14
0
        protected override IMvxIosViewPresenter CreatePresenter()
        {
            var presenter = new MvxIosViewPresenter(ApplicationDelegate, Window);

            return(presenter);
        }
Beispiel #15
0
 public AppSetup(IMvxApplicationDelegate applicationDelegate, MvxIosViewPresenter presenter) : base(applicationDelegate, presenter)
 {
 }
 protected override MvxAsyncIosSetup CreateSetup(IMvxApplicationDelegate appDelegate, MvxIosViewPresenter presenter)
 {
     return(new MenuSetup(appDelegate, presenter));
 }
 public SegmentedControlPresenter(MvxIosViewPresenter touchViewPresenter)
 {
     _appPresenter = touchViewPresenter;
 }
 protected abstract MvxAsyncIosSetup CreateSetup(IMvxApplicationDelegate appDelegate, MvxIosViewPresenter presenter);