Example #1
0
        public void PopulateTable()
        {
            Console.WriteLine("PopulateTable ()");

            table = new UITableView(new RectangleF(0,66,View.Bounds.Width,View.Bounds.Height -66f));
            table.BackgroundColor = UIColor.Clear;

            IList<Item> tableItems= AppDelegate.dao.GetAllItemsInBox(boks);

            this.itemtableSource = new TableSourceItems (tableItems);

            this.itemtableSource.ItemDeleted += (object sender, ItemClickedEventArgs e) => this.DeleteTaskRow(e.Item.ID);
            this.itemtableSource.ItemClicked += (object sender, ItemClickedEventArgs e) => this.ShowItemDetails(e.Item);

            table.Source = this.itemtableSource;
            Add (table);
        }
Example #2
0
 protected override void Dispose(bool disposing)
 {
     ActivateDetail = null;
     table.Dispose ();
     source = null;
     backbutton = null;
     itemdetail = null;
     base.Dispose (disposing);
 }
Example #3
0
        void PopulateTable()
        {
            IList<Item> items = AppDelegate.dao.GetAllItems ();

            source = new TableSourceItems (items);
            table.Source = source;

            source.ItemClicked += (object sender, ItemClickedEventArgs e) => this.ShowItemDetails(e.Item);

            source.ItemDeleted += (object sender, ItemClickedEventArgs e) => {
                AppDelegate.dao.DeleteItem(e.Item.ID);
                this.Refresh();
            };

            backbutton = new UIButton (new RectangleF (10, 25, 48, 32));
            backbutton.SetImage (backarrow.MakeBackArrow(), UIControlState.Normal);
            backbutton.TouchUpInside += (object sender, EventArgs e) => DismissViewControllerAsync (true);
            Add (backbutton);
        }