Esempio 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)
		{
			userDao = new UserDao ();
			courseDao = new CourseDao ();
			this.window = new UIWindow (UIScreen.MainScreen.Bounds);
			var rootNavigationController = new UINavigationController ();

			if (userDao.tokenExists () && courseDao.existCourses ()) 
			{
				CoursesViewController courseView = new CoursesViewController();
				rootNavigationController.PushViewController(courseView,false);
			} 
			else 
			{
				MonoMobilisViewController loginView = new MonoMobilisViewController();
				rootNavigationController.PushViewController(loginView,false);
			}

			//MonoMobilisViewController loginView = new MonoMobilisViewController();
			//rootNavigationController.PushViewController(loginView,false);

			this.window.RootViewController = rootNavigationController;
			this.window.MakeKeyAndVisible();
			ServiceLocator.Dispatcher = new DispatchAdapter(this);
			return true;
		}
Esempio n. 2
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create our window
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.MakeKeyAndVisible ();
			
			// are we running an iPhone or an iPad?
			DetermineCurrentDevice ();

			// instantiate our main navigatin controller and add it's view to the window
			mainNavController = new UINavigationController ();
			
			switch (CurrentDevice)
			{
				case DeviceType.iPhone:
					iPhoneHome = new HandlingRotation.Screens.iPhone.Home.HomeScreen ();
					mainNavController.PushViewController (iPhoneHome, false);
					break;
				
				case DeviceType.iPad:
					iPadHome = new HandlingRotation.Screens.iPad.Home.HomeScreenPad ();
					mainNavController.PushViewController (iPadHome, false);
					break;
			}

			window.RootViewController = mainNavController;

			return true;
		}
Esempio n. 3
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)
        {
            exampleInfoList = ExampleLibrary.Examples.GetList();

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

            navigation = new UINavigationController();

            var root = new RootElement ("OxyPlot Example Browser");
            var section = new Section ();
            section.AddAll (exampleInfoList
                .GroupBy (e => e.Category)
                .OrderBy (g => g.Key)
                .Select (g =>
                    (Element)new StyledStringElement (g.Key, delegate {
                        DisplayCategory (g.Key);
                    }) { Accessory = UITableViewCellAccessory.DisclosureIndicator }));
            root.Add (section);

            var dvc = new DialogViewController (root, true);

            navigation.PushViewController(dvc, true);

            window.RootViewController = navigation;

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

            return true;
        }
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            // If you have defined a view, add it here:
            // window.AddSubview (navigationController.View);

            //---- instantiate a new navigation controller
            var rootNavigationController = new UINavigationController();

            //---- instantiate a new home screen
            HomeScreen homeScreen = new HomeScreen();

            //---- add the home screen to the navigation controller
            // (it'll be the top most screen)
            rootNavigationController.PushViewController(homeScreen,false);

            //---- set the root view controller on the window. the nav
            // controller will handle the rest
            this.window.RootViewController = rootNavigationController;
            // make the window visible
            this.window.MakeKeyAndVisible ();
            return true;
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            root = new RootElement ("Dropbox Chooser Demo") {
                new Section{
                    new StringElement("Preview", delegate {
                        ChooseFile(DBChooserLinkType.Preview);
                }),
                    new StringElement("Direct Dowload", delegate {
                        ChooseFile(DBChooserLinkType.Direct);
                })
                },

                //This section is used to show results metadata
                new Section("Metadata"),

                //This section used to show link and thumbnails
                new Section("Links and Thumbnails")

            };

            var dv = new DialogViewController (root);
            navigation = new UINavigationController ();
            navigation.PushViewController (dv, true);

            if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0))
                window.RootViewController = navigation;
            else
                window.AddSubview (navigation.View);

            window.MakeKeyAndVisible ();

            return true;
        }
		//
		// 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)
		{
			/*
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			// If you have defined a root view controller, set it here:
			window.RootViewController = new RottenTomatoesTableViewController (new UINavigationController());

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

			return true;
			*/


			var navigationController = new UINavigationController();
		
			window = new UIWindow(UIScreen.MainScreen.Bounds)
			{
				RootViewController = navigationController,
				BackgroundColor = UIColor.White
			};

			navigationController.PushViewController(new RottenTomatoesTableViewController(navigationController), false);
			window.MakeKeyAndVisible();

			return true;

		}
Esempio n. 7
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)
        {
            //  home = new HomeController();
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            // If you have defined a view, add it here:
            // window.RootViewController  = rootNavController;

            //var controller = new UIViewController();
            //controller.View.BackgroundColor = UIColor.Gray;

            //Creating custom controller
            customController = new SurveyController();

            //adding it to navigation controller
            UINavigationController rootNavController = new UINavigationController();
            rootNavController.PushViewController(customController, false);

            window.RootViewController  = rootNavController;
            // make the window visible
            window.MakeKeyAndVisible();

            return true;
        }
		protected async override void OnElementChanged (VisualElementChangedEventArgs e)
		{
			base.OnElementChanged (e);

			navigation = NavigationController;

			window = new UIWindow(UIScreen.MainScreen.Bounds);

			//This is the class which actually implements the component a couple of elements to make it work
			viewController = new JSQmessages(); 


			//sender is a public field of JSQmessages and it is populated using the public fields we defined in the orginal forms ChatPage.
			viewController.sender = new User (){ Id = ChatPage.senderID, DisplayName = ChatPage.senderName };

			viewController.View.Frame = this.View.Frame;

			navigationController = new UINavigationController();
			navigationController.PushViewController(viewController, false);

			AddChildViewController (viewController);

			/*the Frame is smaller than the entire screen, this lets us still retain the original Navigation bar from Xamarin Forms, 
			 * so it's easy to dismiss the page from the view hierarchy if we retain the navbar that forms created for us */
			viewController.View.Frame = new CGRect(this.View.Frame.X,this.View.Frame.Y,this.View.Bounds.Width,this.View.Bounds.Height - 64f);
			this.View.AddSubview (viewController.View);
			this.DidMoveToParentViewController (viewController); 



		} 
Esempio n. 9
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);

            viewController = new UINavigationController ();
            viewController.PushViewController(new MainScreenGroup(), true);
            viewController.NavigationBar.Opaque = true;

            window.MakeKeyAndVisible ();

            #if LITE
            AdManager.LoadBanner();
            #endif

            // On iOS5 we use the new window.RootViewController, on older versions, we add the subview
            if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0))
                window.RootViewController = viewController;
            else
                window.AddSubview (viewController.View);

            #if LITE
            Apprater = new Appirater(527002436);
            #else
            Apprater = new Appirater(526844540);
            #endif
            Apprater.AppLaunched();
            return true;
        }
Esempio n. 10
0
        public override void ViewDidLoad()
        {
            _favoritesViewController = new FavoritesViewController();

            UINavigationController favoritesNavController = new UINavigationController();
            favoritesNavController.TabBarItem = new UITabBarItem(UITabBarSystemItem.Favorites, 0);
            favoritesNavController.PushViewController(_favoritesViewController, false);

            _mostRecentViewController = new MostRecentViewController();
            UINavigationController mostRecentNavController = new UINavigationController();
            mostRecentNavController.TabBarItem = new UITabBarItem(UITabBarSystemItem.MostRecent, 1);
            mostRecentNavController.PushViewController(_mostRecentViewController, false);

            _allStopsViewController = new AllStopsViewController();

            UINavigationController allStopsNavController = new UINavigationController();
            allStopsNavController.TabBarItem = new UITabBarItem("Alle stopp", null, 2);
            allStopsNavController.PushViewController(_allStopsViewController, false);

            var tablist = new UIViewController[]
            {
               favoritesNavController, mostRecentNavController, allStopsNavController
            };

            ViewControllers = tablist;
        }
Esempio n. 11
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)
        {
            // Prevent screen lock
            app.IdleTimerDisabled = true;

            // Load settings
            var conn = NSUserDefaults.StandardUserDefaults.StringForKey("connType");
            var connType = conn == null ? ConnectionType.Registrar : (ConnectionType) Enum.Parse(typeof(ConnectionType), conn);
            var connString = NSUserDefaults.StandardUserDefaults.StringForKey("connString");

            // Init config controller
            var webController = new iOSWebViewController(connType, connString);

            // init the root controller
            var rootController = new UINavigationController();
            rootController.NavigationBarHidden = true;
            rootController.PushViewController(webController, false);

            // init the window, add the root controller
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.RootViewController = rootController;
            window.MakeKeyAndVisible();

            return true;
        }
Esempio n. 12
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			Current = this;

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


			// Create the database file
			var sqliteFilename = "TodoItemDB.db3";
			// we need to put in /Library/ on iOS5.1 to meet Apple's iCloud terms
			// (they don't want non-user-generated data in Documents)
			string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal); // Documents folder
			string libraryPath = Path.Combine (documentsPath, "..", "Library"); // Library folder
			var path = Path.Combine(libraryPath, sqliteFilename);
			conn = new SQLiteConnection(path);
			TodoManager = new TodoItemManager(conn);


			// create our nav controller
			navController = new UINavigationController ();

			// create our Todo list screen
			homeViewController = new Screens.HomeScreen ();

			// push the view controller onto the nav controller and show the window
			navController.PushViewController(homeViewController, false);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
Esempio n. 13
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)
		{

			FBSettings.DefaultAppID = AppId;
			FBSettings.DefaultDisplayName = DisplayName;
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			rootNavigationController = new UINavigationController ();
			CAGradientLayer degradado = new CAGradientLayer ();
			degradado.Frame = (rootNavigationController.NavigationBar.Bounds);
			UIGraphics.BeginImageContext (rootNavigationController.NavigationBar.Bounds.Size);
			degradado.Colors = new CGColor[] { UIColor.FromRGB (62, 92, 41).CGColor, UIColor.FromRGB (132, 194, 71).CGColor };
			degradado.RenderInContext (UIGraphics.GetCurrentContext());
			UIImage bgDegradado = UIGraphics.GetImageFromCurrentImageContext ();
			UIGraphics.EndImageContext ();
			rootNavigationController.NavigationBar.TintColor = UIColor.White;
			UIStringAttributes atributes = new UIStringAttributes();
			atributes.ForegroundColor = UIColor.White;
			rootNavigationController.NavigationBar.TitleTextAttributes = atributes;

			rootNavigationController.NavigationBar.SetBackgroundImage (bgDegradado, UIBarMetrics.Default);

			// If you have defined a root view controller, set it here:
			// window.RootViewController = myViewController;
			mainView = new MainView ();
			rootNavigationController.PushViewController (mainView,false);

			// make the window visible
			window.RootViewController = rootNavigationController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
Esempio n. 14
0
        // This method is invoked when the application has loaded its UI and its ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Console.WriteLine ("AppDelegate.FinishedLaunching");
            window = new UIWindow (UIScreen.MainScreen.Bounds);
            var nc = new UINavigationController ();
            navigation_controller = nc;
            var lvc = new LoginSettingsViewController () { AppDelegate = this };
            nc.PushViewController (lvc, false);

            room_list_controller = new UITableViewController ();
            room_controller = new UITableViewController ();

            nc.TopViewController.Title = "MonoTouchLingr";
            window.AddSubview (nc.View);
            window.MakeKeyAndVisible ();

            if (File.Exists (cfgfile)) {
                string [] lines = File.ReadAllLines (cfgfile);
                //Login (lines [0], lines [1]);
                lvc.ViewLoaded += delegate {
                    lvc.UserName = lines [0];
                    lvc.Password = lines [1];
                };
            }
            return true;
        }
Esempio n. 15
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			// make the window visible
			window.MakeKeyAndVisible ();
			// create our nav controller
			navController = new UINavigationController ();
			// create our Todo list screen
			homeViewController = new Screens.HomeScreen ();
			//			UIApplication.SharedApplication.KeyWindow.TintColor = UIColor.White;
			//			navController.NavigationBar.BarTintColor = UIColor.FromRGB (0x91, 0xCA, 0x47);
			// green theme
			//			navController.NavigationBar.TintColor = UIColor.White;
			//			navController.NavigationBar.BarTintColor = UIColor.FromRGB (0x6F, 0xA2, 0x2E);
			navController.NavigationBar.TintColor = UIColor.FromRGB (0x6F, 0xA2, 0x2E);
			// 6FA22E dark-green
			navController.NavigationBar.BarTintColor = UIColor.FromRGB (0xCF, 0xEF, 0xA7);
			// CFEFA7 light-green
			UINavigationBar.Appearance.SetTitleTextAttributes (new UITextAttributes () {
				//				TextColor = UIColor.White,
				TextColor = UIColor.FromRGB (0x6F, 0xA2, 0x2E),
				// 6FA22E dark-green
				TextShadowColor = UIColor.Clear
			});
			// push the view controller onto the nav controller and show the window
			navController.PushViewController (homeViewController, false);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			return true;
		}
Esempio n. 16
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)
        {

            UITabBarController tabBarController;

            window = new UIWindow (UIScreen.MainScreen.Bounds);

            viewController = new Pubnub_MessagingMain ();

            var dv = new Pubnub_MessagingMain () {
                Autorotate = true
            };

            navigation = new UINavigationController ();
            navigation.PushViewController (dv, true);

            window = new UIWindow (UIScreen.MainScreen.Bounds);
            window.MakeKeyAndVisible ();
            window.RootViewController = navigation;    
            /*            if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0))
                window.RootViewController = navigation;    
            else
                window.AddSubview (navigation.View);*/

            return true;
        }
Esempio n. 17
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)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			var web = new WebElement ();
			web.HtmlFile = "instructions";

			var root = new RootElement ("Kannada Keyboard") {
				new Section{
					new UIViewElement("Instruction", web.View, false)
				}
			};
		
			var dv = new DialogViewController (root) {
				Autorotate = true
			};
			var navigation = new UINavigationController ();
			navigation.PushViewController (dv, true);				

			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.MakeKeyAndVisible ();
			window.AddSubview (navigation.View);
			
			return true;
		}
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			
			// make the window visible
			window.MakeKeyAndVisible ();
			
			// create our nav controller
			navController = new UINavigationController ();

			// create our home controller based on the device
			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
				homeViewController = new Tasky.Screens.iPhone.Home.controller_iPhone();
			} else {
//				homeViewController = new Hello_UniversalViewController ("Hello_UniversalViewController_iPad", null);
			}
			
			// Styling
			UINavigationBar.Appearance.TintColor = UIColor.FromRGB (38, 117 ,255); // nice blue
			UITextAttributes ta = new UITextAttributes();
			ta.Font = UIFont.FromName ("AmericanTypewriter-Bold", 0f);
			UINavigationBar.Appearance.SetTitleTextAttributes(ta);
			ta.Font = UIFont.FromName ("AmericanTypewriter", 0f);
			UIBarButtonItem.Appearance.SetTitleTextAttributes(ta, UIControlState.Normal);
			

			// push the view controller onto the nav controller and show the window
			navController.PushViewController(homeViewController, false);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
Esempio n. 19
0
        public BigItemMasterView()
            : base()
        {
            masterView = new BigItemsScreen();
            detailview = new BigItemDetailScreen();

            masterView.ActivateDetail += (object sender, BigItemDetailClickedEventArgs e) => detailview.ShowDetails (e.lagerobject);

            detailview.BigItemSaved += (object sender, BigItemSavedEventArgs e) => masterView.Refresh ();

            //			detailview.Derezzy += (object sender, DerezLargeObjectEventArgs e) => {
            //                detailnav.PopViewControllerAnimated(true);
            //                masterView.Refresh();
            //            };

            detailview.GotPicture += (object sender, GotPictureEventArgs e) => masterView.Refresh ();

            masternav = new UINavigationController();
            masternav.PushViewController(masterView, false);

            detailnav = new UINavigationController();
            detailnav.PushViewController(detailview, false);

            //always last
            ViewControllers = new UIViewController[] {masternav, detailnav};
        }
Esempio n. 20
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
			if(Game == null)
				throw new InvalidOperationException("Please set 'Game' to a valid instance of Game before calling this method.");
				
            var bounds = UIScreen.MainScreen.Bounds;

            // create the game main windows
            MainWindow = new UIWindow(bounds);

            var xenkoGameView = CreateView(bounds);

            var xenkoGameController = CreateViewController(xenkoGameView);

            // create the game context
            var gameContext = new GameContextiOS(new iOSWindow(MainWindow, xenkoGameView, xenkoGameController));

            // Force fullscreen
            UIApplication.SharedApplication.SetStatusBarHidden(true, false);

            // Added UINavigationController to switch between UIViewController because the game is killed if the FinishedLaunching (in the AppDelegate) method doesn't return true in 10 sec.
            var navigationController = new UINavigationController {NavigationBarHidden = true};
            navigationController.PushViewController(gameContext.Control.GameViewController, false);
            MainWindow.RootViewController = navigationController;

            // launch the main window
            MainWindow.MakeKeyAndVisible();

            // launch the game
            Game.Run(gameContext);

            return Game.IsRunning;
        }
Esempio n. 21
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)
        {

            UITabBarController tabBarController;

            window = new UIWindow (UIScreen.MainScreen.Bounds);

            //viewController = new TrafficDialogViewController();

            var dv = new TrafficDialogViewController (){
                Autorotate = true
            };

            var tap = new UITapGestureRecognizer ();
            tap.AddTarget (() =>{
                dv.View.EndEditing (true);
            });
            dv.View.AddGestureRecognizer (tap);

            tap.CancelsTouchesInView = false;


            navigation = new UINavigationController ();
            navigation.PushViewController (dv, true);

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

            return true;
        }
Esempio n. 22
0
        public LagerMasterView()
            : base()
        {
            LagerList primaryview;
            TheStorageScreen secondaryview;

            UINavigationController primarynav;
            UINavigationController secondarynav;

            primaryview = new LagerList();
            secondaryview = new TheStorageScreen();

            primaryview.LagerClicked += (object sender, LagerClickedEventArgs e) => secondaryview.ShowDetails (e.Lager);

            secondaryview.LagerSaved += delegate(object sender, LagerClickedEventArgs e) {
                primaryview.Refresh();
            };

            primarynav = new UINavigationController();
            primarynav.PushViewController(primaryview, false);

            secondarynav = new UINavigationController();
            secondarynav.PushViewController(secondaryview, false);

            ViewControllers = new UIViewController[] {primarynav, secondarynav};
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Current = this;

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

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

            TodoContractMngr = new TodoContractManager("http://40.118.255.235:8000",
                "http://40.118.255.235/eth/v1.2");

            // create our nav controller
            navController = new UINavigationController ();

            // create our Todo list screen
            homeViewController = new Screens.HomeScreen ();

            // push the view controller onto the nav controller and show the window
            navController.PushViewController(homeViewController, false);
            window.RootViewController = navController;
            window.MakeKeyAndVisible ();

            return true;
        }
Esempio n. 24
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            try
            {
                window = new UIWindow(UIScreen.MainScreen.Bounds);

                SettingsMobile.Instance.User = new SqlFactory().CreateTables().GetProfile();
                if (SettingsMobile.Instance.User == null)
                    SettingsMobile.Instance.User = new Portable.Account.UserMobile();

                if (SettingsMobile.Instance.User.LastMobileLoginDate.AddDays(30) > DateTime.UtcNow)
                    SettingsMobile.Instance.User.IsLoggedIn = false;

                viewController = new MainViewController();
                var rootNavigationController = new UINavigationController();
                rootNavigationController.PushViewController(viewController, false);
                window.RootViewController = rootNavigationController;

                window.MakeKeyAndVisible();
               
            }
            catch (Exception exception)
            {
                ErrorHandler.Save(exception, MobileTypeEnum.iPhone);
            }
            return true;
        }
Esempio n. 25
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)
		{
			exampleInfoList = ExampleLibrary.Examples.GetList();

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

			navigation = new UINavigationController();

			var root = new RootElement ("OxyPlot Demo") {
				new Section() {
					from e in exampleInfoList
					group e by e.Category into g
					orderby g.Key
					select (Element)new StyledStringElement (g.Key, delegate {
							DisplayCategory(g.Key);
						}) { Accessory = UITableViewCellAccessory.DisclosureIndicator }
				}
			};

			var dvc = new DialogViewController (root, true);

			navigation.PushViewController(dvc, true);

			window.RootViewController = navigation;

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

			return true;
		}
Esempio n. 26
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB (29, 131, 219);

            window = new UIWindow (UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;
            window.Bounds = UIScreen.MainScreen.Bounds;

            var u = new TaskListScreen();
            navController = new UINavigationController();
            navController.PushViewController (u, false);

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

            // DROPBOX STUFF
            // The account manager stores all the account info. Create this when your app launches
            var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret);
            DBAccountManager.SharedManager = manager;

            var account = manager.LinkedAccount;
            if (account != null) {
                SetupDropbox ();
            } else
                manager.LinkFromController (window.RootViewController);
            //--

            return true;
        }
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			
			// make the window visible
			window.MakeKeyAndVisible ();
			
			// create our nav controller
			navController = new UINavigationController ();

			// create our home controller based on the device
			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
				homeViewController = new Screens.HomeScreen();
			} else {
// sample does not contain an iPad UI
//				homeViewController = new Screens.iPadHomeScreen ();
			}
			
			// push the view controller onto the nav controller and show the window
			navController.PushViewController(homeViewController, false);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
Esempio n. 28
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            MainPageViewController viewController = new MainPageViewController();

            //---- instantiate a new navigation controller
            var rootNavigationController = new UINavigationController();

            //---- add the home screen to the navigation controller
            // (it'll be the top most screen)
            rootNavigationController.PushViewController(viewController, false);

            //---- set the root view controller on the window. the nav
            // controller will handle the rest
            this.window.RootViewController = rootNavigationController;
            this.window.MakeKeyAndVisible ();
            return true;

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

            return true;
        }
Esempio n. 29
0
		// from Stuart Lodge N+1-25
		private UIViewController CreateViewFor(IMvxViewModel viewModel, bool navBarHidden)
		{
			var controller = new UINavigationController();
			var screen = this.CreateViewControllerFor(viewModel) as UIViewController;
			controller.PushViewController(screen, false);
			controller.NavigationBarHidden = navBarHidden;
			return controller;
		}
Esempio n. 30
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create our window
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.MakeKeyAndVisible();

            // instantiate our main navigatin controller and add it's view to the window
            mainNavController = new UINavigationController();
            mainNavController.NavigationBar.Translucent = false;

            iPadHome = new Example_Drawing.Screens.iPad.Home.HomeScreen();
            mainNavController.PushViewController(iPadHome, false);

            window.RootViewController = mainNavController;

            //
            return(true);
        }
        public virtual void Show(IMvxTouchView view)
        {
            var viewController = view as UIViewController;

            if (viewController == null)
            {
                throw new MvxException("Passed in IMvxTouchView is not a UIViewController");
            }

            if (_masterNavigationController == null)
            {
                ShowFirstView(viewController);
            }
            else
            {
                _masterNavigationController.PushViewController(viewController, true /*animated*/);
            }
        }
Esempio n. 32
0
        private UIViewController CreateTabFor(int index, string title, string imageName, IMvxViewModel viewModel)
        {
            var controller = new UINavigationController();

            var viewController = this.CreateViewControllerFor(viewModel) as UIViewController;

            viewModel.Start();
            //var request = new MvxViewModelRequest ( viewModelType, null, null );
            //var viewModel = Mvx.Resolve<IMvxViewModelLoader> ().LoadViewModel ( request, null );
            //var screen = this.CreateViewControllerFor ( viewModel ) as MvxViewController;

            controller.PushViewController(viewController, true);
            controller.TabBarItem = new UITabBarItem(title, UIImage.FromBundle(imageName), index);

            SetNavigationBarFor(controller);

            return(controller);
        }
Esempio n. 33
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB(11, 97, 206);

            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;
            window.Bounds          = UIScreen.MainScreen.Bounds;

            var u = new TaskListScreen();

            navController = new UINavigationController();
            navController.PushViewController(u, false);

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

            return(true);
        }
Esempio n. 34
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.MakeKeyAndVisible();

            iPhoneHome            = new HomeScreen();
            iPhoneHome.Title      = "Pass Library";
            iPhoneHome.View.Frame = new CoreGraphics.CGRect(0
                                                            , UIApplication.SharedApplication.StatusBarFrame.Height
                                                            , UIScreen.MainScreen.ApplicationFrame.Width
                                                            , UIScreen.MainScreen.ApplicationFrame.Height);

            navigation = new UINavigationController();
            navigation.PushViewController(iPhoneHome, false);
            window.RootViewController = navigation;

            return(true);
        }
Esempio n. 35
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create our window
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.MakeKeyAndVisible();

            // create our navigation controller
            navController = new UINavigationController();

            // create the home screen and add it to the nav controller
            iPhoneHome = new Example_TableAndCellStyles.Screens.iPhone.Home.HomeNavController();
            navController.PushViewController(iPhoneHome, false);

            window.RootViewController = navController;

            //
            return(true);
        }
Esempio n. 36
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            viewController = new ImageViewController();

            navigationController = new UINavigationController();
            navigationController.PushViewController(viewController, false);

            // If you have defined a view, add it here:
            window.AddSubview(navigationController.View);

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

            return(true);
        }
Esempio n. 37
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            viewController = new ProductViewController();

            navigationController = new UINavigationController();
            navigationController.NavigationBar.Translucent = false;
            navigationController.PushViewController(viewController, false);

            window.RootViewController = navigationController;

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

            return(true);
        }
Esempio n. 38
0
        public MainTabBarController()
        {
            ViewControllers = ViewModel.Tabs.Select(createTabFor).ToArray();

            UIViewController createTabFor(IMvxViewModel viewModel)
            {
                var controller = new UINavigationController();
                var screen     = this.CreateViewControllerFor(viewModel) as UIViewController;
                var item       = new UITabBarItem();

                item.Title        = "";
                item.Image        = UIImage.FromBundle(imageNameForType[viewModel.GetType()]);
                item.ImageInsets  = new UIEdgeInsets(6, 0, -6, 0);
                screen.TabBarItem = item;
                controller.PushViewController(screen, true);
                return(controller);
            }
        }
Esempio n. 39
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            var        rootNavigationController = new UINavigationController();
            HomeScreen homeScreen = new HomeScreen();

            rootNavigationController.PushViewController(homeScreen, false);

            // If you have defined a root view controller, set it here:
            window.RootViewController = rootNavigationController;

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

            return(true);
        }
        //
        // 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)
        {
            // create a new window instance based on the screen size
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            var login = new LoginSampleController();

            _rootNavigationController  = new UINavigationController();
            _window.RootViewController = _rootNavigationController;

            _rootNavigationController.PushViewController(login, false);
            _rootNavigationController.Title = "Log in";

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

            return(true);
        }
Esempio n. 41
0
        private void Push <TViewModel>(NavigationOptions options)
            where TViewModel : ViewModel
        {
            this.EnsureCurrentController();

            UINavigationController navigationController = currentController.NavigationController;

            if (navigationController == null)
            {
                throw new InvalidOperationException(
                          "The current view is not currently presented as part of a navigation controller. " +
                          "If the view was originally shown modally, use the ShowModalWithNavigation method to enable forward navigation.");
            }

            UIViewController <TViewModel> viewControllerToPresent = this.viewControllerFactory.InstantiateViewController <TViewModel>(options.Parameter);

            navigationController.PushViewController(viewControllerToPresent, options.AnimateTransitionToNextView);
        }
Esempio n. 42
0
        //========================================================================

        //========================================================================
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            //---- create our window
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.MakeKeyAndVisible();

            //---- instantiate our main navigatin controller and add it's view to the window
            mainNavController = new UINavigationController();

            iPhoneHome = new Example_SharedResources.Screens.iPhone.Home.HomeNavController();
            mainNavController.PushViewController(iPhoneHome, false);


            window.RootViewController = mainNavController;

            //----
            return(true);
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            currentIndex = indexPath.Row;
            try
            {
                //if (_checkedRows.ContainsKey(indexPath))
                //{
                //    var removeValue = selectedIndexes.First(x => x == indexPath.Row);
                //    selectedIndexes.Remove(removeValue);
                //    _checkedRows.Remove(indexPath);
                //}
                //else
                //{
                //    _checkedRows.Add(indexPath, string.Empty);
                //    selectedIndexes.Add(indexPath.Row);
                //}
                _indexPathOfSelectedRow = indexPath;
            }
            catch { }
            TableView.ReloadRows(new[] { indexPath }, UITableViewRowAnimation.Right);

            var  id = SocialNetworkData.SampleData()[indexPath.Row].Id;
            bool link_exists_in_users_social_list = false;
            int  i = 0;

            foreach (var item in socialNetworkListWithMyUrl)
            {
                if (item.SocialNetworkID == id)
                {
                    WebViewSocialToChooseViewController.urlString = socialNetworkListWithMyUrl[i].ContactUrl;
                    link_exists_in_users_social_list = true;
                    break;
                }
                i++;
            }
            if (!link_exists_in_users_social_list)
            {
                WebViewSocialToChooseViewController.urlString = null;
            }
            WebViewSocialToChooseViewController.urlRoot     = SocialNetworkData.SampleData()[indexPath.Row].ContactUrl;
            WebViewSocialToChooseViewController.headerValue = SocialNetworkData.SampleData()[indexPath.Row].NameNetworkLabel;

            navigationController.PushViewController(storyboard.InstantiateViewController(nameof(WebViewSocialToChooseViewController)), true);
        }
Esempio n. 44
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            //Load application data
            LoadAppData();

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

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

            //create our nave controller
            navController = new UINavigationController();

            //create our home controller based on the device
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone)
            {
                homeViewController = new HomeScreen();
            }
            else
            {
                homeViewController = new HomeScreen(); //TODO: replace it with iPad screen if we implement for iPad
            }


            //Styling
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB(38, 117, 255); //blue shade
            UITextAttributes ta = new UITextAttributes();

            ta.Font = UIFont.FromName("AmericanTypewriter-Bold", 0f);
            UINavigationBar.Appearance.SetTitleTextAttributes(ta);
            ta.Font = UIFont.FromName("AmericanTypewriter", 0f);
            UIBarButtonItem.Appearance.SetTitleTextAttributes(ta, UIControlState.Normal);

            //push the view controller on the nav controller and show the window
            navController.PushViewController(homeViewController, false);
            Window.RootViewController = navController;
            Window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 45
0
        public void PushViewController()
        {
            // trace event
            TraceHelper.AddMessage("ListPicker: PushViewController");

            // if the sublist hasn't been created, do so now
            if (valueList.ID == Guid.Empty)
            {
                Guid id = Guid.NewGuid();
                valueList.ID = id;
                // fix the pickList's ParentID's to this new list ID (otherwise they stay Guid.Empty)
                foreach (var i in pickList.Items)
                {
                    i.ParentID = id;
                }

                // enqueue the Web Request Record
                RequestQueue.EnqueueRequestRecord(RequestQueue.UserQueue,
                                                  new RequestQueue.RequestRecord()
                {
                    ReqType = RequestQueue.RequestRecord.RequestType.Insert,
                    Body    = valueList
                });

                // add the list to the folder
                Folder folder = App.ViewModel.Folders.Single(f => f.ID == valueList.FolderID);
                folder.Items.Add(valueList);
                StorageHelper.WriteFolder(folder);

                // store the list's Guid in the item's property
                pi.SetValue(container, id.ToString(), null);

                // save the item change, which will queue up the update item operation
                //itemPage.SaveButton_Click(null, null);
            }

            // build the current picker list and render it
            currentList = BuildCurrentList(valueList, pickList);
            root        = RenderPicker(valueList, pickList);
            dvc         = new DialogViewController(root, true);
            dvc.TableView.BackgroundColor = UIColorHelper.FromString(App.ViewModel.Theme.PageBackground);
            controller.PushViewController(dvc, true);
        }
Esempio n. 46
0
        private void ShowView(UIViewController vc)
        {
            if (MasterNavigationController == null)
            {
                MasterNavigationController = new UINavigationController();
                var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                appDelegate.Window.RootViewController = MasterNavigationController;
                appDelegate.NavigationController      = MasterNavigationController;
            }

            if (_showAsPresentView)
            {
                MasterNavigationController.PresentViewController(vc, true, null);
            }
            else
            {
                MasterNavigationController.PushViewController(vc, true);
            }
        }
Esempio n. 47
0
        private UIViewController CreateTabFor(int index, string title, string imageName, IMvxViewModel viewModel)
        {
            //If you know only the viewmodel type, you need to instantiate it
            //var request = new MvxViewModelRequest(viewModelType, null, null, null);
            //var viewModel = Mvx.Resolve<IMvxViewModelLoader>().LoadViewModel(request, null);

            var controller = new UINavigationController();
            var screen     = this.CreateViewControllerFor(viewModel) as UIViewController;

            screen.Title = title;

            //screen.TabBarItem = new UITabBarItem(title, UIImage.FromBundle(imageName), index);

            //Just for example, use the previous line
            screen.TabBarItem = new UITabBarItem(UITabBarSystemItem.Search, index);

            controller.PushViewController(screen, true);
            return(controller);
        }
Esempio n. 48
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;

            viewController = new ActionSheetViewController();

            navigationController = new UINavigationController();
            navigationController.PushViewController(viewController, false);

            // If you have defined a view, add it here:
            window.RootViewController = navigationController;

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

            return(true);
        }
Esempio n. 49
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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            rootNavigationController = new UINavigationController();
            MainView mainView = new MainView();

            rootNavigationController.NavigationBar.TintColor = UIColor.FromRGB(62, 150, 15);

            rootNavigationController.PushViewController(mainView, false);
            // If you have defined a view, add it here:
            // window.AddSubview (navigationController.View);

            // make the window visible
            window.RootViewController = this.rootNavigationController;
            window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 50
0
        /// <summary>
        /// Finisheds the launching.
        /// </summary>
        /// <returns>The launching.</returns>
        /// <param name="app">App.</param>
        /// <param name="options">Options.</param>
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            _navigationController = new UINavigationController();

            var state = new ApplicationState();

            var presenter  = new LoginPresenter(state, new NavigationService(_navigationController));
            var controller = new LoginViewController(presenter);

            _navigationController.PushViewController(controller, false);
            _window.RootViewController = _navigationController;

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

            return(true);
        }
        //
        // 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)
        {
            //MonkeyArms framewokr configuration
            BaseAppContext.Init();
            DI.MapClassToInterface <GetContactsDelegate, IGetContactsDelegate>();

            window = new UIWindow(UIScreen.MainScreen.Bounds);

            rootController = new UINavigationController();
            rootController.NavigationBar.SetBackgroundImage(UIImage.FromBundle("Images/background/header_background"), UIBarMetrics.Default);


            window.RootViewController = rootController;

            rootController.PushViewController(new PasswordViewController(), false);
            window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 52
0
        // This method is invoked when the application has loaded its UI and it is ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            this.window = new UIWindow(UIScreen.MainScreen.Bounds);

            //---- instantiate a new navigation controller
            var rootNavigationController = new UINavigationController();
            //---- instantiate a new home screen
            HomeScreen homeScreen = new HomeScreen();

            //---- add the home screen to the navigation controller (it'll be the top most screen)
            rootNavigationController.PushViewController(homeScreen, false);

            //---- set the root view controller on the window. the nav controller will handle the rest
            this.window.RootViewController = rootNavigationController;

            this.window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 53
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            AppCenter.Start("ad7624fb-a1d1-4252-a608-cb8ad4b10883",
                            typeof(Analytics), typeof(Crashes));

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

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

            // create our nav controller
            navController = new UINavigationController();

            // create our Todo list screen
            homeViewController = new Screens.HomeScreen();


//			UIApplication.SharedApplication.KeyWindow.TintColor = UIColor.White;
//			navController.NavigationBar.BarTintColor = UIColor.FromRGB (0x91, 0xCA, 0x47);
            // green theme

//			navController.NavigationBar.TintColor = UIColor.White;
//			navController.NavigationBar.BarTintColor = UIColor.FromRGB (0x6F, 0xA2, 0x2E);

            navController.NavigationBar.TintColor    = UIColor.FromRGB(0x6F, 0xA2, 0x2E);           // 6FA22E dark-green
            navController.NavigationBar.BarTintColor = UIColor.FromRGB(0xCF, 0xEF, 0xA7);           // CFEFA7 light-green

            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
//				TextColor = UIColor.White,
                TextColor       = UIColor.FromRGB(0x6F, 0xA2, 0x2E),            // 6FA22E dark-green
                TextShadowColor = UIColor.Clear
            });

            // push the view controller onto the nav controller and show the window
            navController.PushViewController(homeViewController, false);
            window.RootViewController = navController;
            window.MakeKeyAndVisible();

            return(true);
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            // If you have defined a root view controller, set it here:
            //ViewController controller = new ViewController();
            //Window.RootViewController = myViewController;

            navigationController = new UINavigationController();
            navigationController.NavigationBar.TitleTextAttributes =
                new UIStringAttributes()
            {
                ForegroundColor = UIColor.White
            };
            navigationController.NavigationBar.BarTintColor = UIColor.White;
            navigationController.NavigationBar.TintColor    = UIColor.White;
            navigationController.NavigationBar.BarStyle     = UIBarStyle.Black;
            navigationController.NavigationBar.Translucent  = false;
            navigationController.NavigationBar.ShadowImage  = new UIImage();
            navigationController.NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);

            Window.RootViewController = navigationController;

            ViewController tabController = new ViewController();

            tabController.Title = "Awesome app";
            //tabController.NavigationItem.Title = "Back";
            tabController.NavigationItem.BackBarButtonItem = new UIBarButtonItem("Back", UIBarButtonItemStyle.Plain, null);

            navigationController.PushViewController(tabController, false);

            UIColor crimson = UIColor.FromRGB(165, 16, 129);

            UINavigationBar.Appearance.BarTintColor = crimson;
            //UIApplication.SharedApplication.KeyWindow.TintColor = crimson;

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

            return(true);
        }
Esempio n. 55
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Current = this;

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

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

            // create our nav controller
            navController = new UINavigationController();

            // create our home controller based on the device
            homeViewController = new Tasky.Screens.iPhone.Home.PhoneHomeScreen();

            // Styling
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB(38, 117, 255);              // nice blue
            UITextAttributes ta = new UITextAttributes();

            ta.Font = UIFont.FromName("AmericanTypewriter-Bold", (nfloat)0f);
            UINavigationBar.Appearance.SetTitleTextAttributes(ta);
            ta.Font = UIFont.FromName("AmericanTypewriter", (nfloat)0f);
            UIBarButtonItem.Appearance.SetTitleTextAttributes(ta, UIControlState.Normal);


            var sqliteFilename = "TaskDB.xml";
            // we need to put in /Library/ on iOS5.1 to meet Apple's iCloud terms
            // (they don't want non-user-generated data in Documents)
            string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder
            string libraryPath   = Path.Combine(documentsPath, "../Library/");                    // Library folder
            var    path          = Path.Combine(libraryPath, sqliteFilename);

            TaskMgr = new TodoItemManager(path);

            // push the view controller onto the nav controller and show the window
            navController.PushViewController(homeViewController, false);
            window.RootViewController = navController;
            window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 56
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            navCtrlr = new UINavigationController();
            navCtrlr.NavigationBar.Translucent = false;

            blue    = new BlueButtonViewController();
            glossy  = new GlossyButtonViewController();
            lineart = new DrawingViewController();

            news = new NewsDialogViewController();
//			news.View.Frame = new System.Drawing.RectangleF (0
//						, UIApplication.SharedApplication.StatusBarFrame.Height
//						, UIScreen.MainScreen.ApplicationFrame.Width
//						, UIScreen.MainScreen.ApplicationFrame.Height);

            navCtrlr.PushViewController(news, false);


            navCtrlr.TabBarItem = new UITabBarItem("Calendar", UIImage.FromBundle("Images/about.png"), 0);
            blue.TabBarItem     = new UITabBarItem("Blue Button", UIImage.FromBundle("Images/about.png"), 0);
            glossy.TabBarItem   = new UITabBarItem("Glossy Button", UIImage.FromBundle("Images/about.png"), 0);
            lineart.TabBarItem  = new UITabBarItem("Line Art", UIImage.FromBundle("Images/about.png"), 0);

            tabBarController = new UITabBarController();
            tabBarController.ViewControllers = new UIViewController [] {
                navCtrlr,
                blue,
                glossy,
                lineart
            };


            window.RootViewController = tabBarController;

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

            return(true);
        }
Esempio n. 57
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary options)
        {
            window = new UIWindow();

            navcontroller = new UINavigationController();

            viewcontroller       = new UIViewController();
            viewcontroller.Title = "XibLess";

            view = new UIView(new RectangleF(0, 0, 320, 640));
            view.BackgroundColor = UIColor.Blue;

            viewcontroller.Add(view);
            navcontroller.PushViewController(viewcontroller, false);

            window.AddSubview(navcontroller.View);
            window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 58
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);

            viewController = new Pubnub_MessagingMain();

            var dv = new Pubnub_MessagingMain()
            {
                Autorotate = true
            };

            navigation = new UINavigationController();
            navigation.PushViewController(dv, true);

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

            return(true);
        }
        public override void Show(IMvxTouchView view)
        {
            if (view is IMvxModalTouchView)
            {
                if (_currentModalViewController != null)
                {
                    throw new MvxException("Only one modal view controller at a time supported");
                }

                var newNav = new UINavigationController();
                newNav.PushViewController(view as UIViewController, false);

                _currentModalViewController = view as UIViewController;

                PresentModalViewController(newNav, true);
                return;
            }

            base.Show(view);
        }
Esempio n. 60
-5
        //
        // 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);
            navigation = new UINavigationController();
            dvc = new DialogViewController (createRoot ());
            navigation.PushViewController(dvc,false);
            window.RootViewController = navigation;
            window.MakeKeyAndVisible ();
            //Set a binding with a large timeout and allows a large data set
            var binding = new BasicHttpBinding (){Name= "basicHttp",MaxReceivedMessageSize = 67108864,};
            binding.ReaderQuotas = new System.Xml.XmlDictionaryReaderQuotas(){
                MaxArrayLength = 2147483646,
                MaxDepth =32,
                MaxBytesPerRead = 4096,
                MaxNameTableCharCount = 5242880,
                MaxStringContentLength = 5242880,

            };
            //one hour timeout, this is way to long but you get the point
            var timeout = new TimeSpan(1,0,0);
            binding.SendTimeout= timeout;
            binding.OpenTimeout = timeout;
            binding.ReceiveTimeout = timeout;

            client = new Service1Client (binding, new EndpointAddress ("http://192.168.2.8/WcfWebApp/Service1.svc"));
            client.GetUsersCompleted += HandleClientGetUsersCompleted;
            client.GetTasksCompleted += HandleClientGetTasksCompleted;
            client.UploadImageCompleted += HandleClientUploadImageCompleted;
            client.ConvertToByteArrayCompleted += HandleClientConvertToByteArrayCompleted;

            loading = new MBProgressHUD();
            loading.TitleText = "Loading";
            return true;
        }