/// <summary>
        /// Activitie's create event handeler.
        /// </summary>
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create managers and register references
            MgrAccessor.RegisterReference <IFileEntryManager>(new FileEntryManager());
            MgrAccessor.RegisterReference <ICommonUtils>(new CommonUtils());
            MgrAccessor.RegisterReference <IDiskUtils>(new DiskUtils());
#if DEBUG
            // Create test data
            MgrAccessor.DiskUtils.CreateTestData();
#endif

            SetContentView(Resource.Layout.Home);

            // Create FileEntryList tab
            var intent = new Intent(this, typeof(FileEntryListActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            var spec = TabHost.NewTabSpec("Explorer");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.ic_tab_explorer));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            // Create About tab
            intent = new Intent(this, typeof(AboutActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            spec = TabHost.NewTabSpec("About");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.ic_tab_about));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            TabHost.CurrentTab = 0;
        }
Esempio n. 2
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);

            // Create a root view controller - TabBar controller
            _RootTabBarVC = new RootTabBarVC();

            // Create managers and register references
            MgrAccessor.RegisterReference <IFileEntryManager>(new FileEntryManager());
            MgrAccessor.RegisterReference <ICommonUtils>(new CommonUtils());
            MgrAccessor.RegisterReference <IDiskUtils>(new DiskUtils());
#if DEBUG
            // Create test data
            MgrAccessor.DiskUtils.CreateTestData();
#endif

            // Make the window visible
            window.RootViewController = _RootTabBarVC;
            window.MakeKeyAndVisible();

            return(true);
        }