public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        // ...
        var success = base.FinishedLaunching(app, options);

        if (success)
        {
            SessionManager.Instance.SessionDuration   = TimeSpan.FromSeconds(10);
            SessionManager.Instance.OnSessionExpired += HandleSessionExpired;
            var allGesturesRecognizer = new AllGesturesRecognizer(delegate
            {
                SessionManager.Instance.ExtendSession();
            });
            this.Window.AddGestureRecognizer(allGesturesRecognizer);
        }
        return(success);
    }
Exemple #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            var allGesturesRecognizer = new AllGesturesRecognizer(delegate
            {
                SessionManager.Instance.ExtendSession();
            });


            var result = base.FinishedLaunching(app, options);

            this.Window.AddGestureRecognizer(allGesturesRecognizer);

            return(result);
        }
Exemple #3
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)
        {
            global::Xamarin.Forms.Forms.Init();
            XamForms.Controls.iOS.Calendar.Init();
            CachedImageRenderer.Init();
            LoadApplication(new App());
            var success = base.FinishedLaunching(app, options);

            if (success)
            {
                SessionManager.Instance.SessionDuration   = TimeSpan.FromSeconds(20);
                SessionManager.Instance.OnSessionExpired += HandleSessionExpired;

                var allGesturesRecognizer = new AllGesturesRecognizer(delegate
                {
                    SessionManager.Instance.ExtendSession();
                });

                this.Window.AddGestureRecognizer(allGesturesRecognizer);
            }
            return(success);
        }