Esempio n. 1
0
        // Code to execute when the application is launching (eg, from Start)
        // This code will not execute when the application is reactivated
        private void Application_Launching(object sender, LaunchingEventArgs e)
        {
            var source             = new PropertyDataSource(new JsonWebPropertySearch());
            var geolocationService = new GeoLocationService();

            var statePersistence = new StatePersistenceService();
            PropertyFinderPersistentState state = statePersistence.LoadState();

            var viewModel = new PropertyFinderViewModel(state, source,
                                                        new NavigationService(null), geolocationService);

            RootFrame.DataContext = viewModel;
        }
    protected override void OnNavigatedTo(NavigationEventArgs e)
    {
      base.OnNavigatedTo(e);

      if (e.NavigationMode != NavigationMode.Back)
      {
        var source = new PropertyDataSource(new JsonWebPropertySearch(new MarshalInvokeService()));
        var geolocationService = new GeoLocationService();

        var statePersistence = new StatePersistenceService();
        PropertyFinderPersistentState state = statePersistence.LoadState();

        _presenter = new PropertyFinderPresenter(state, source,
          new NavigationService(NavigationService), geolocationService);
        _presenter.SetView(this);
      }
    }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (e.NavigationMode != NavigationMode.Back)
            {
                var source             = new PropertyDataSource(new JsonWebPropertySearch(new MarshalInvokeService()));
                var geolocationService = new GeoLocationService();

                var statePersistence = new StatePersistenceService();
                PropertyFinderPersistentState state = statePersistence.LoadState();

                _presenter = new PropertyFinderPresenter(state, source,
                                                         new NavigationService(NavigationService), geolocationService);
                _presenter.SetView(this);
            }
        }
Esempio 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)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            navigationController = new UINavigationController();

            var source             = new PropertyDataSource(new JsonWebPropertySearch(new MarshalInvokeService()));
            var geolocationService = new GeoLocationService();

            var statePersistence = new StatePersistenceService();
            PropertyFinderPersistentState state = statePersistence.LoadState();

            var presenter = new PropertyFinderPresenter(state, source,
                                                        new NavigationService(navigationController), geolocationService);
            var controller = new PropertyFinderViewController(presenter);

            navigationController.PushViewController(controller, false);
            window.RootViewController = navigationController;

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

            return(true);
        }
Esempio 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)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);

              navigationController = new UINavigationController ();

              var source = new PropertyDataSource (new JsonWebPropertySearch (new MarshalInvokeService()));
              var geolocationService = new GeoLocationService ();

              var statePersistence = new StatePersistenceService ();
              PropertyFinderPersistentState state = statePersistence.LoadState ();

              var presenter = new PropertyFinderPresenter (state, source,
              new NavigationService (navigationController), geolocationService);
              		var controller = new PropertyFinderViewController (presenter);

              navigationController.PushViewController(controller, false);
            window.RootViewController = navigationController;

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

            return true;
        }
Esempio n. 6
0
        // Code to execute when the application is launching (eg, from Start)
        // This code will not execute when the application is reactivated
        private void Application_Launching(object sender, LaunchingEventArgs e)
        {
            var source = new PropertyDataSource(new JsonWebPropertySearch());
              var geolocationService = new GeoLocationService();

              var statePersistence = new StatePersistenceService();
              PropertyFinderPersistentState state = statePersistence.LoadState();

              var viewModel = new PropertyFinderViewModel(state, source,
            new NavigationService(null), geolocationService);

              RootFrame.DataContext = viewModel;
        }