//
        // 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)
        {
            Xamarin.Forms.Forms.Init();

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

            //Line needed so platform specific DLL is included.
            var platform = new Microsoft.WindowsAzure.MobileServices.CurrentPlatform();

            var mainForm = App.GetMainPage();

            window.RootViewController = mainForm.CreateViewController();

            window.MakeKeyAndVisible();

            return(true);
        }
Пример #2
0
        private async Task LoadListAsync()
        {
            try
            {
                //Line needed so platform specific DLL is included.
                var platform      = new Microsoft.WindowsAzure.MobileServices.CurrentPlatform();
                var registrations = await AzureTable.GetRegistrationsAsync();

                InvokeOnMainThread(() => {
                    ((RegistrationViewSource)grdRegistrations.Source).SetSource(registrations);
                    grdRegistrations.ReloadData();
                });
            }
            catch (Exception ex)
            {
                var alert = new UIAlertView("Error!",
                                            string.Format("We don't like errors but there it is: {0}", ex.Message), new UIAlertViewDelegate(), "OK");
                alert.Show();
            }
        }