Example #1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            using (var repo = new Repo ()) {
                repo.Initialize ();

                //
                // Load initial data
                //
                var services = repo.GetActiveServices();
                if (services.Count == 0) {

                    repo.InsertDefaultServices();

                }
            }

            _services = new ServicesController ();
            _nav = new UINavigationController (_services);

            window.AddSubview (_nav.View);

            window.MakeKeyAndVisible ();

            return true;
        }
 void BeginLoadingServices()
 {
     App.RunInBackground(delegate {
         List <UserService> services = null;
         using (var repo = new Repo()) {
             services = repo.GetActiveServices();
         }
         App.RunInForeground(delegate { Services = services; });
     });
 }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            using (var repo = new Repo()) {
                repo.Initialize();

                //
                // Load initial data
                //
                var services = repo.GetActiveServices();
                if (services.Count == 0)
                {
                    repo.InsertDefaultServices();
                }
            }

            _services = new ServicesController();
            _nav      = new UINavigationController(_services);

            window.AddSubview(_nav.View);

            window.MakeKeyAndVisible();

            return(true);
        }