public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var reuseCell = tableView.DequeueReusableCell("SimpleCell"); if (reuseCell == null) { reuseCell = new UITableViewCell(UITableViewCellStyle.Default, "SimpleCell"); } var item = _items [(int)indexPath.IndexAtPosition(1)]; reuseCell.TextLabel.Text = _getter(item); return(reuseCell); }
public override void RowSelected(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { if (indexPath.Section < _viewModel.UpcomingSlots.Count) { var selectedSession = _viewModel.UpcomingSlots[indexPath.Section].Sessions[indexPath.Row]; _hostController.NavigationController.PushViewController( new SessionViewController(selectedSession), true); } else { _hostController.TabBarController.SelectedIndex = 1; } }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell(this._cellId); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Value1, this._cellId); } cell.TextLabel.Text = this._tasks[indexPath.Row].Name; cell.DetailTextLabel.Text = this._tasks[indexPath.Row].Notes; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(TAG_CELL) ?? new UITableViewCell(UITableViewCellStyle.Default, TAG_CELL); cell.TextLabel.Text = _tags[indexPath.Row]; cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; cell.BackgroundView = new UIView(cell.Frame) { BackgroundColor = UIColor.White }; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var id = "ProductCell"; var cell = tableView.DequeueReusableCell(id); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Default, id); } var p = this._data[indexPath.Row]; cell.TextLabel.Text = p.ProductName; cell.DetailTextLabel.Text = p.QuantityPerUnit; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell("person"); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Subtitle, "person"); } var obj = ((object)Database.Main.ObjectForRow <T> (indexPath.Section, indexPath.Row)); var person = (Person)obj; cell.TextLabel.Text = person.ToString(); cell.DetailTextLabel.Text = person.Email; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { // declare vars UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); // if there are no cells to reuse, create a new one if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier); } // set the item text cell.TextLabel.Text = Items[indexPath.Row]; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(ROOM_CELL) ?? new UITableViewCell(UITableViewCellStyle.Subtitle, ROOM_CELL); var room = _rooms[indexPath.Row]; cell.TextLabel.Text = room.Name; cell.DetailTextLabel.Text = room.Description; cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; cell.BackgroundView = new UIView(cell.Frame) { BackgroundColor = UIColor.White }; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { // request a recycled cell to save memory UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); // if there are no cells to reuse, create a new one if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Value1, cellIdentifier); cell.SelectionStyle = UITableViewCellSelectionStyle.None; } var t = tableItems [indexPath.Row]; cell.TextLabel.Text = string.Format("{1}({0})", t.SuccessCount, t.Values [0]); /*, t.Values[1]);*/ cell.DetailTextLabel.Text = t.Values [1]; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell("D"); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Default, "D"); cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; } var demos = controller.demos[indexPath.Section]; var demo = demos.Item2[indexPath.Row]; cell.TextLabel.Text = demo.Name; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { // in a Storyboard, Dequeue will ALWAYS return a cell, UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); // now set the properties as normal cell.TextLabel.Text = tableItems[indexPath.Row].Name; if (tableItems[indexPath.Row].Done) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(cellKey); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Subtitle, cellKey); BlackLeatherTheme.Apply(cell); } Track track = this.Parent.Tracks[indexPath.Row]; cell.TextLabel.Text = track.TrackName; cell.DetailTextLabel.Text = track.ArtistName; cell.ImageView.Image = track.AlbumImage; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(SESSION_CELL) ?? new UITableViewCell(UITableViewCellStyle.Subtitle, SESSION_CELL); var session = _sessions[indexPath.Row]; cell.TextLabel.Text = session.Title; cell.DetailTextLabel.Text = string.Format("Room: {2}, {0} - {1}", session.Starts.ToLocalTime().ToShortTimeString(), session.Ends.ToLocalTime().ToShortTimeString(), session.Room); cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; cell.BackgroundView = new UIView(cell.Frame) { BackgroundColor = UIColor.White }; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell(this._cellId); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Value1, this._cellId); } var log = this._logs[indexPath.Row]; var detail = log.Detail; cell.TextLabel.Text = string.Format("{0} :: {1}", log.TimeStamp.ToLocalTime().ToString("dd MMM yyyy H:mm:ss"), log.Message); cell.DetailTextLabel.Text = detail; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { if (Customers.Count == 0) { if (State == SearchState.Searching) { var spinner = new MonoTouch.Dialog.ActivityElement(); return(spinner.GetCell(tableView)); } var c = (tableView.DequeueReusableCell("default") ?? new UITableViewCell(UITableViewCellStyle.Value1, "default")); c.TextLabel.Text = State == SearchState.Error ? "There was an eror searching. Please try again" :"No Results"; return(c); } var cell = tableView.DequeueReusableCell <CustomerCell> (CustomerCell.Key); cell.Customer = Customers [indexPath.Row]; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(SESSION_CELL) ?? new UITableViewCell(UITableViewCellStyle.Subtitle, SESSION_CELL); var session = getSession(indexPath); cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; cell.TextLabel.Text = session.Title; if (string.IsNullOrEmpty(session.Speaker.Name)) { cell.DetailTextLabel.Text = "Room: " + session.Room; } else { cell.DetailTextLabel.Text = string.Format("Room: {0}, {1}", session.Room, session.Speaker.Name); } return(cell); }
//table view stuff public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { /* int row = indexPath.Row; * if (row == getFavoriteStopsToDisplay().Length) { * UITableViewCell moreCell = tableView.DequeueReusableCell ("moreCell"); * moreCell.TextLabel.Text = "All buses"; * return moreCell; * } else {//bus cell * string stopName = getFavoriteStopsToDisplay()[row]; * if (getRunsToDisplay().ContainsKey(stopName)){ * BusCellView busCell = tableView.DequeueReusableCell("busCell") as BusCellView; * busCell.Reinitalize(getRunsToDisplay()[stopName].ToArray(), getOrigin(), stopName); * return busCell; * } * else { * UITableViewCell noCell = tableView.DequeueReusableCell("noBusesCell"); * noCell.TextLabel.Text="No buses to "+stopName; * return noCell; * } * } * */ if (!model.DataAvailable) { UITableViewCell noCell = tableView.DequeueReusableCell("infoCell"); noCell.TextLabel.Text = "Loading..."; return(noCell); } else if (model.ArrivalBundles.Count == 0) { UITableViewCell noCell = tableView.DequeueReusableCell("infoCell"); noCell.TextLabel.Text = "No Service"; return(noCell); } else { BusCellView2 busCell = tableView.DequeueReusableCell("busCell2") as BusCellView2; busCell.DisplayedArrivals = model.ArrivalBundles[indexPath.Row]; return(busCell); } }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { var item = parent.data[indexPath.Row]; string text = item.title; if (item.release_date.HasValue) { text += " (" + item.release_date.Value.Year.ToString() + ")"; } var cell = tableView.DequeueReusableCell(MovieCell.Identifier) as MovieCell; if (cell == null) { cell = new MovieCell(text, null, item.poster_path, tableView); } cell.UpdateUI(); return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell(this._cellId); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Value1, this._cellId); } var response = this._responses[indexPath.Row]; var detail = response.Mood.Name; if (response.Prompt != null) { detail += " (" + response.Prompt.NotificationText + ")"; } cell.TextLabel.Text = response.TimeStamp.ToLocalTime().ToString(); cell.DetailTextLabel.Text = detail; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell("EinstellungenListCell") as UITableViewCell; WSFeedConfig.FeedConfig entry = ViewData[indexPath.Row]; UILabel lbWS = cell.ViewWithTag(202) as UILabel; lbWS.Text = entry.Name; UISwitch tblSwitch = cell.ViewWithTag(203) as UISwitch; tblSwitch.On = entry.IsActive; UILabel lbHidden = cell.ViewWithTag(204) as UILabel; lbHidden.Hidden = true; lbHidden.Text = entry.FeedID.ToString(); uiSwitches.Add(tblSwitch); tblSwitch.ValueChanged += SwitchValueChanged; return(cell); }