Пример #1
0
        public IOSApplicationContext(AppDelegate appDelegate, NavigationController controller,
            ApplicationSettings settings, CustomExceptionHandler exceptionHandler)
        {
            ApplicationBackground += () => { };
            ApplicationRestore += () => { };

            GlobalVariables = new Dictionary<string, object>();

            Settings = settings;
            _controller = controller;
            _exceptionHandler = exceptionHandler;

			LocationProvider = new GpsProvider ();
            LocationTracker = new GPSTracker();
            GalleryProvider = new GalleryProvider(controller, this);
            CameraProvider = new CameraProvider(controller, this);
            DialogProvider = new DialogProvider(this);
            DisplayProvider = new DisplayProvider();
            ClipboardProvider = new ClipboardProvider();
            EmailProvider = new EmailProvider(settings, appDelegate);
            JokeProviderInternal = new JokeProvider();
            LocalNotificationProvider = new LocalNotificationProvider();
            WebProvider = new WebProvider();

            var builder = new SolutionBuilder(this);
            builder.Build();

            StyleSheetContext.Current.Scale = UIScreen.MainScreen.Scale;
        }
Пример #2
0
        private void InitApplication()
        {
            _settings = new Settings();
            _settings.ReadSettings();

            D.Init(_settings.Language);

            _exceptionHandler = new ExceptionHandler(_settings, this);

            _context = new IOSApplicationContext(this, _rootController, _settings, _exceptionHandler);

			NotificationManager.SetApplicationContext (_context);
            NotificationManager.InitRemoteNotifications();

            HandleLastError(StartApplication);
        }