void PopulateTable() { // dao = new LagerDAO (); // if (UserInterfaceIdiomIsPhone) // TableView = new UITableView (new RectangleF (0, 0, 300, 310)); //TODO FIx this with space for iAds // else { // TableView = new UITableView (new RectangleF (0, 0, 300, 800)); //TODO FIx this with space for iAds // } IList<LagerObject> tableItems = new List<LagerObject> (); try { tableItems = AppDelegate.dao.GetAllContainers (); } catch (Exception e) { Console.WriteLine ("catastrophe avoided:"+e.ToString()); } // if (tableItems.Count == 0) { // //POPULATE WITH DEFAULT ITEMS // LagerObject boks1 = new LagerObject (); // LagerObject boks2 = new LagerObject (); // boks1.Description = MonoTouch.Foundation.NSBundle.MainBundle.LocalizedString ("Comic Books", "Comic Books"); // boks2.Description = MonoTouch.Foundation.NSBundle.MainBundle.LocalizedString ("Drawing material", "Drawing material"); // boks1.Name = "DCT01"; // boks2.Name = "DCT02"; // tableItems.Add (boks1); // tableItems.Add (boks2); // this.NavigationController.TabBarItem.BadgeValue = "2"; // } // // Add (table); // BlackLeatherTheme.Apply (TableView, ""); // TableSourceBoxes boxsource = new TableSourceBoxes (tableItems); this.boxtableSource = new TableSourceLagerObjects(tableItems); // this.boxtableSource = new no.dctapps.garageindex.table.TableSourceBoxes (tableItems); this.boxtableSource.LagerObjectDeleted += (object sender, LagerObjectClickedEventArgs e) => this.DeleteTaskRow(e.LagerObject.ID); this.boxtableSource.LagerObjectClicked += (object sender, LagerObjectClickedEventArgs e) => this.ShowBoxItemDetails(e.LagerObject); TableView.Source = this.boxtableSource; // this.TabBarItem.BadgeValue = dao.getAntallBeholdere(); }
protected override void Dispose(bool disposing) { boxtableSource = null; ActivateDetail = null; //tables = null; base.Dispose (disposing); }
void cleanup() { boxtableSource = null; }
void PopulateTable() { // dao = new LagerDAO (); // this.view = new UITableView (GetDyn()); if(AppDelegate.key.GetContainersAsLarge()){ Console.WriteLine ("loadbigitems"); tableItems = AppDelegate.dao.GetAllLagerObjects(); }else{ Console.WriteLine ("getalllargeitems"); tableItems = AppDelegate.dao.GetAllLargeItems(); } //PopulateWithDummyData (); // BlackLeatherTheme.Apply (this); // Add (Table); TableSource = new TableSourceLagerObjects(tableItems); this.TableSource.LagerObjectDeleted += (object sender, LagerObjectClickedEventArgs e) => this.DeleteLagerObjectRow (e.LagerObject.ID); this.TableSource.LagerObjectClicked += (object sender, LagerObjectClickedEventArgs e) => this.ShowBigItemDetails (e.LagerObject); table.Source = this.TableSource; // this.TabBarItem.BadgeValue = dao.getAntallStore(); }