Пример #1
0
        void CreatePhoneGui()
        {
            tabbarController = new RotatingTabBar();
            MainView         = tabbarController.View;
            window.AddSubview(MainView);

            main      = new TimelineViewController(Locale.GetText("Friends"), TweetKind.Home, false);
            mentions  = new TimelineViewController(Locale.GetText("Mentions"), TweetKind.Replies, false);
            messages  = new TimelineViewController(Locale.GetText("Messages"), TweetKind.Direct, false);
            searches  = new SearchesViewController();
            favorites = StreamedTimelineViewController.MakeFavorites("http://api.twitter.com/1/favorites.json");

            navigationRoots = new UINavigationController [5] {
                new UINavigationController(main)
                {
                    TabBarItem = new UITabBarItem(Locale.GetText("Friends"), UIImage.FromBundle("Images/home.png"), 0),
                },
                new UINavigationController(mentions)
                {
                    TabBarItem = new UITabBarItem(Locale.GetText("Mentions"), UIImage.FromBundle("Images/replies.png"), 1)
                },
                new UINavigationController(messages)
                {
                    TabBarItem = new UITabBarItem(Locale.GetText("Messages"), UIImage.FromBundle("Images/messages.png"), 2)
                },
                new UINavigationController(favorites)
                {
                    TabBarItem = new UITabBarItem(Locale.GetText("Favorites"), UIImage.FromBundle("Images/fav.png"), 3)
                },
                new UINavigationController(searches)
                {
                    TabBarItem = new UITabBarItem(Locale.GetText("Search"), UIImage.FromBundle("Images/lupa.png"), 4)
                }
            };

            CheckDatabase();
            tabbarController.SetViewControllers(navigationRoots, false);

#if false && DEBUGIMAGE
            AddDebugHook();
#endif
        }
Пример #2
0
        void CreatePhoneGui()
        {
            tabbarController = new RotatingTabBar ();
            MainView = tabbarController.View;
            window.AddSubview (MainView);

            main = new TimelineViewController (Locale.GetText ("Friends"), TweetKind.Home, false);
            mentions = new TimelineViewController (Locale.GetText ("Mentions"), TweetKind.Replies, false);
            messages = new TimelineViewController (Locale.GetText ("Messages"), TweetKind.Direct, false);
            searches = new SearchesViewController ();
            favorites = StreamedTimelineViewController.MakeFavorites ("http://api.twitter.com/1/favorites.json");

            navigationRoots = new UINavigationController [5] {
                new UINavigationController (main) {
                    TabBarItem = new UITabBarItem (Locale.GetText ("Friends"), UIImage.FromBundle ("Images/home.png"), 0),
                },
                new UINavigationController (mentions) {
                    TabBarItem = new UITabBarItem (Locale.GetText ("Mentions"), UIImage.FromBundle ("Images/replies.png"), 1)
                },
                new UINavigationController (messages) {
                    TabBarItem = new UITabBarItem (Locale.GetText ("Messages"), UIImage.FromBundle ("Images/messages.png"), 2)
                },
                new UINavigationController (favorites) {
                    TabBarItem = new UITabBarItem (Locale.GetText ("Favorites"), UIImage.FromBundle ("Images/fav.png"), 3)
                },
                new UINavigationController (searches) {
                    TabBarItem = new UITabBarItem (Locale.GetText ("Search"), UIImage.FromBundle ("Images/lupa.png"), 4)
                }
            };

            CheckDatabase ();
            tabbarController.SetViewControllers (navigationRoots, false);

            #if false && DEBUGIMAGE
            AddDebugHook ();
            #endif
        }