Ejemplo n.º 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)
        {
            var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret);

            DBAccountManager.SharedManager = manager;

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

            viewController            = new DropboxPaintViewController();
            window.RootViewController = viewController;

            Task.Factory.StartNew(() => {
                this.BeginInvokeOnMainThread(() => {
                    var account = DBAccountManager.SharedManager.LinkedAccount;
                    if (account != null)
                    {
                        SetupDropbox();
                    }
                    else
                    {
                        manager.LinkFromController(window.RootViewController);
                    }
                });
            });

            window.MakeKeyAndVisible();

            return(true);
        }
Ejemplo 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)
        {
            var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret);
            DBAccountManager.SharedManager = manager;

            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            window.RootViewController = new UINavigationController (new PlaygroundViewController ());

            Task.Factory.StartNew (() => {
                this.BeginInvokeOnMainThread (() => {
                    var account = DBAccountManager.SharedManager.LinkedAccount;
                    if (account != null) {
                        SetupDropbox ();
                    } else
                        manager.LinkFromController (window.RootViewController);
                });
            });
            // make the window visible
            window.MakeKeyAndVisible ();

            app.ApplicationSupportsShakeToEdit = true;
            return true;
        }
Ejemplo n.º 3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB (29, 131, 219);

            window = new UIWindow (UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;
            window.Bounds = UIScreen.MainScreen.Bounds;

            var u = new TaskListScreen();
            navController = new UINavigationController();
            navController.PushViewController (u, false);

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

            // DROPBOX STUFF
            // The account manager stores all the account info. Create this when your app launches
            var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret);
            DBAccountManager.SharedManager = manager;

            var account = manager.LinkedAccount;
            if (account != null) {
                SetupDropbox ();
            } else
                manager.LinkFromController (window.RootViewController);
            //--

            return true;
        }
Ejemplo n.º 4
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)
        {
            var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret);
            DBAccountManager.SharedManager = manager;

            Xamarin.Forms.Forms.Init();

            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            Task.Factory.StartNew (() => {
                this.BeginInvokeOnMainThread (() => {
                    var account = DBAccountManager.SharedManager.LinkedAccount;
                    if (account != null) {
                        var filesystem = new DBFilesystem (account);
                        DBFilesystem.SharedFilesystem = filesystem;
                        SetupDropbox ();
                    } else
                        manager.LinkFromController (window.RootViewController);
                });
            });

            // If you have defined a root view controller, set it here:
            window.RootViewController = RacePickerPage.Create(DropboxDatabase.Shared).CreateViewController();;

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

            return true;
        }
Ejemplo n.º 5
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)
        {
            var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret);

            DBAccountManager.SharedManager = manager;

            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            window.RootViewController = new UINavigationController(new PlaygroundViewController());

            Task.Factory.StartNew(() => {
                this.BeginInvokeOnMainThread(() => {
                    var account = DBAccountManager.SharedManager.LinkedAccount;
                    if (account != null)
                    {
                        SetupDropbox();
                    }
                    else
                    {
                        manager.LinkFromController(window.RootViewController);
                    }
                });
            });
            // make the window visible
            window.MakeKeyAndVisible();

            app.ApplicationSupportsShakeToEdit = true;
            return(true);
        }
Ejemplo n.º 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)
        {
            var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret);

            DBAccountManager.SharedManager = manager;

            Xamarin.Forms.Forms.Init();

            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            Task.Factory.StartNew(() => {
                this.BeginInvokeOnMainThread(() => {
                    var account = DBAccountManager.SharedManager.LinkedAccount;
                    if (account != null)
                    {
                        var filesystem = new DBFilesystem(account);
                        DBFilesystem.SharedFilesystem = filesystem;
                        SetupDropbox();
                    }
                    else
                    {
                        manager.LinkFromController(window.RootViewController);
                    }
                });
            });

            // If you have defined a root view controller, set it here:
            window.RootViewController = RacePickerPage.Create(DropboxDatabase.Shared).CreateViewController();;

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

            return(true);
        }
Ejemplo n.º 7
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB(29, 131, 219);

            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;
            window.Bounds          = UIScreen.MainScreen.Bounds;

            var u = new TaskListScreen();

            navController = new UINavigationController();
            navController.PushViewController(u, false);

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



            // DROPBOX STUFF
            // The account manager stores all the account info. Create this when your app launches
            var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret);

            DBAccountManager.SharedManager = manager;

            var account = manager.LinkedAccount;

            if (account != null)
            {
                SetupDropbox();
            }
            else
            {
                manager.LinkFromController(window.RootViewController);
            }
            //--


            return(true);
        }
Ejemplo n.º 8
0
        public void Init(string appKey, string appSecret)
        {
            _dropboxSyncKey    = appKey;
            _dropboxSyncSecret = appSecret;

            var manager = new DBAccountManager(_dropboxSyncKey, _dropboxSyncSecret);

            DBAccountManager.SharedManager = manager;
            var account = DBAccountManager.SharedManager.LinkedAccount;

            if (account != null)
            {
                StartApp(account);
            }
            else
            {
                var window = UIApplication.SharedApplication.KeyWindow;
                manager.LinkFromController(window.RootViewController);
            }

            throw new NotImplementedException();
        }