Пример #1
0
        public override void ViewDidLoad()
        {
            var ds = new TickersSource(Db);

            NavigationItem.BackBarButtonItem  = new UIBarButtonItem("Stocks", UIBarButtonItemStyle.Plain, (s, e) => { });
            NavigationItem.RightBarButtonItem = new UIBarButtonItem("Add", UIBarButtonItemStyle.Plain, (s, e) => {
                var c       = new AddStockView(Db);
                c.Finished += delegate() {
                    ds.Refresh(table);
                };
                NavigationController.PresentModalViewController(c, true);
                table.ReloadData();
            });
            NavigationItem.LeftBarButtonItem = new UIBarButtonItem("Admin", UIBarButtonItemStyle.Plain, (s, e) => {
                var c = new SQLiteAdmin(Db);
                NavigationController.PushViewController(c.NewTablesViewController(), true);
            });

            table.DataSource = ds;
            table.SetEditing(true, true);
        }
Пример #2
0
        public override void ViewDidLoad()
        {
            var ds = new TickersSource (Db);

            NavigationItem.BackBarButtonItem = new UIBarButtonItem ("Stocks", UIBarButtonItemStyle.Plain, (s, e) => { });
            NavigationItem.RightBarButtonItem = new UIBarButtonItem ("Add", UIBarButtonItemStyle.Plain, (s, e) => {
                var c = new AddStockView(Db);
                c.Finished += delegate() {
                    ds.Refresh(table);
                };
                NavigationController.PresentModalViewController(c, true);
                table.ReloadData();
            });
            NavigationItem.LeftBarButtonItem = new UIBarButtonItem ("Admin", UIBarButtonItemStyle.Plain, (s, e) => {
                var c = new SQLiteAdmin(Db);
                NavigationController.PushViewController(c.NewTablesViewController(), true);
            });

            table.DataSource = ds;
            table.SetEditing (true, true);
        }