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)
        {
            NativeCSS.StyleWithCSS(".menu-table{color:#0b93ff}");
            MapServices.ProvideAPIKey(GoogleMapsAPI);
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            var rootNavigationController = new MainViewController();

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

            return(true);
        }
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);

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

            // create our nav controller
            this._navController = new UINavigationController();

            // create our home controller based on the device
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone)
            {
                this._homeViewController = new Tasky.Screens.iPhone.Home.controller_iPhone();
            }
            else
            {
//				this._viewController = new Hello_UniversalViewController ("Hello_UniversalViewController_iPad", null);
            }


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

            // enable this to see logging
            //NativeCSS.SetDebugLogging(true);

            // To live edit, cd to styles.css and run "python -m SimpleHTTPServer"
            NativeCSS.StyleWithCSS("styles.css",
                                   new Uri("http://localhost:8000/styles.css"),
                                   RemoteContentRefreshPeriod.EveryFiveSeconds);


            return(true);
        }
Esempio n. 3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // set our layout to be the home screen
            this.SetContentView(Resource.Layout.HomeScreen);

            //Find our controls
            this._taskListView  = FindViewById <ListView> (Resource.Id.lstTasks);
            this._addTaskButton = FindViewById <Button> (Resource.Id.btnAddTask);
            app = this.Application;
            // wire up add task button handler
            if (this._addTaskButton != null)
            {
                this._addTaskButton.Click += (sender, e) => {
                    this.StartActivity(typeof(TaskDetailsScreen));
                };
            }

            // wire up task click handler
            if (this._taskListView != null)
            {
                this._taskListView.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) => {
                    var taskDetails = new Intent(this, typeof(TaskDetailsScreen));
                    taskDetails.PutExtra("TaskID", this._tasks[e.Position].ID);
                    this.StartActivity(taskDetails);
                };
            }

            // enable this to see logging
            //NativeCSS.SetDebugLogging(true);

            // To live edit, cd to styles.css and run "python -m SimpleHTTPServer"
            NativeCSS.StyleWithCSS("styles.css",
                                   new Uri("http://10.0.2.2:8000/styles.css"),
                                   RemoteContentRefreshPeriod.EveryFiveSeconds);
        }