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
		public ApplicationContext (NavigationController controller, BitMobile.Application.ApplicationSettings settings, CustomExceptionHandler exceptionHandler)
		{
			GlobalVariables = new Dictionary<string, object> ();

			BitMobile.Application.ApplicationContext.InitContext (this);

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

			LocationProvider = new GPSProvider ();
			LocationTracker = new GPSTracker ();
			GalleryProvider = new GalleryProvider (controller, this);
			CameraProvider = new CameraProvider (controller, this);
			DialogProvider = new DialogProvider (this);
			ClipboardProvider = new ClipboardProvider ();

		}
示例#3
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			AppDomain.CurrentDomain.UnhandledException += OnException;

			UIApplication.SharedApplication.SetStatusBarHidden (true, false);

			UIApplication.SharedApplication.ApplicationSupportsShakeToEdit = true;

			window = new UIWindow (UIScreen.MainScreen.Bounds);	
			rootController = new NavigationController ();
			window.RootViewController = rootController;
			window.MakeKeyAndVisible ();

			BeginInvokeOnMainThread (() => {
				InitApplication ();
			});

			return true;
		}
示例#4
0
		public ApplicationContext (NavigationController controller, BitMobile.Application.ApplicationSettings settings, CustomExceptionHandler exceptionHandler)
		{
			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 ();

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

			StyleSheetContext.Current.Scale = UIScreen.MainScreen.Scale;
		}