Ejemplo n.º 1
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)
        {
            // Appearance
            UITableView.Appearance.BackgroundColor = Styles.RTDarkerBlue;
            UITableView.Appearance.SeparatorInset  = UIEdgeInsets.Zero;
            UITabBar.Appearance.BarTintColor       = Styles.RTDarkerBlue;

            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            var cs = new ConcurrencyService();

            _cs = cs;

            var logSource = new LogHub();

            _loggerFactory = new LoggerFactory(logSource);

#if DEBUG
            UIApplication.CheckForIllegalCrossThreadCalls = true;
            var logViewController = new LogViewController(cs, logSource);
#endif

            _reactiveTrader        = new Adaptive.ReactiveTrader.Client.Domain.ReactiveTrader();
            _startUpViewController = new StartUpView(Initalize);
            Initalize();


            _notificationHandler = new NotificationGenerator(_reactiveTrader, cs);
            _notificationHandler.Initialise();

            var tradesViewController = new TradesViewController(_reactiveTrader, cs);
            var pricesViewController = new PriceTilesViewController(_reactiveTrader, cs);
            var statusViewController = new StatusViewController(_reactiveTrader, cs, _notificationHandler.NotificationsEnabled);

            tabBarController = new UITabBarController();
            tabBarController.ViewControllers = new UIViewController[] {
                pricesViewController,
                tradesViewController,
                statusViewController
                                #if DEBUG
                , logViewController
                                #endif
            };

            tabBarController.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;

            window.RootViewController = _startUpViewController;
            window.MakeKeyAndVisible();

            new WormholeSender(_reactiveTrader);

            return(true);
        }
Ejemplo n.º 2
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)
		{
			// Appearance
			UITableView.Appearance.BackgroundColor = Styles.RTDarkerBlue;
			UITableView.Appearance.SeparatorInset = UIEdgeInsets.Zero;
			UITabBar.Appearance.BarTintColor = Styles.RTDarkerBlue;

			// create a new window instance based on the screen size
			window = new UIWindow(UIScreen.MainScreen.Bounds);

			var cs = new ConcurrencyService();
			_cs = cs;

			var logSource = new LogHub();
			_loggerFactory = new LoggerFactory(logSource);

#if DEBUG
			UIApplication.CheckForIllegalCrossThreadCalls = true;
			var logViewController = new LogViewController(cs, logSource);
#endif

			_reactiveTrader = new Adaptive.ReactiveTrader.Client.Domain.ReactiveTrader();
			_startUpViewController = new StartUpView(Initalize);
			Initalize();


			_notificationHandler = new NotificationGenerator(_reactiveTrader, cs);
			_notificationHandler.Initialise();

			var tradesViewController = new TradesViewController(_reactiveTrader, cs);
			var pricesViewController = new PriceTilesViewController(_reactiveTrader, cs);
			var statusViewController = new StatusViewController(_reactiveTrader, cs, _notificationHandler.NotificationsEnabled);

			tabBarController = new UITabBarController();
			tabBarController.ViewControllers = new UIViewController[] {
				pricesViewController,
				tradesViewController,
				statusViewController
				#if DEBUG
				, logViewController
				#endif
			};

			tabBarController.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;

			window.RootViewController = _startUpViewController;
			window.MakeKeyAndVisible();

			new WormholeSender(_reactiveTrader);

			return true;
		}