public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { int section = indexPath.Section; int row = indexPath.Row; if (section == 0) return base.GetCell(tableView, indexPath); if (row == 0) { topSwitch = new DarkSwitch(model.BrokenBuildsAtTop); topSwitch.ValueChanged += delegate { model.BrokenBuildsAtTop = topSwitch.On; }; var cell = new UITableViewCell(UITableViewCellStyle.Default, "SimpleCheckboxCell") { AccessoryView = topSwitch, }; cell.TextLabel.Text = "Broken builds first"; cell.StyleAsSettingsTableCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.None; return cell; } else { var cell = new UITableViewCell(UITableViewCellStyle.Default, "SubtitleDisclosureCell"); cell.AccessoryView = new DisclosureIndicatorView(); cell.TextLabel.Text = "Build order"; // TODO: Gray text to the right of what is currently selected cell.StyleAsSettingsTableCell(); return cell; } }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { darkSwitch = new DarkSwitch(widgetModel.Enabled); darkSwitch.ValueChanged += delegate { widgetModel.Enabled = darkSwitch.On; }; var cell = new UITableViewCell(UITableViewCellStyle.Default, "EnableWidgetUISwitch") { AccessoryView = darkSwitch, }; cell.TextLabel.Text = "Enabled"; cell.StyleAsSettingsTableCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.None; return cell; }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { darkSwitch = new DarkSwitch(widgetModel.Enabled); darkSwitch.ValueChanged += delegate { widgetModel.Enabled = darkSwitch.On; }; var cell = new UITableViewCell(UITableViewCellStyle.Default, "EnableWidgetUISwitch") { AccessoryView = darkSwitch, }; cell.TextLabel.Text = "Enabled"; cell.StyleAsSettingsTableCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.None; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { if (indexPath.Section == 0) return base.GetCell(tableView, indexPath); emptySwitch = new DarkSwitch(model.HighlightEmpty); emptySwitch.ValueChanged += delegate { model.HighlightEmpty = emptySwitch.On; }; var cell = new UITableViewCell(UITableViewCellStyle.Default, "SimpleCheckboxCell") { AccessoryView = emptySwitch, SelectionStyle = UITableViewCellSelectionStyle.None }; cell.TextLabel.Text = "Highlight empty commits"; cell.StyleAsSettingsTableCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.None; return cell; }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { int section = indexPath.Section; int row = indexPath.Row; if (section == 0) { return(base.GetCell(tableView, indexPath)); } if (row == 0) { topSwitch = new DarkSwitch(model.BrokenBuildsAtTop); topSwitch.ValueChanged += delegate { model.BrokenBuildsAtTop = topSwitch.On; }; var cell = new UITableViewCell(UITableViewCellStyle.Default, "SimpleCheckboxCell") { AccessoryView = topSwitch, }; cell.TextLabel.Text = "Broken builds first"; cell.StyleAsSettingsTableCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.None; return(cell); } else { var cell = new UITableViewCell(UITableViewCellStyle.Default, "SubtitleDisclosureCell"); cell.AccessoryView = new DisclosureIndicatorView(); cell.TextLabel.Text = "Build order"; // TODO: Gray text to the right of what is currently selected cell.StyleAsSettingsTableCell(); return(cell); } }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { if (indexPath.Section == 0) { return(base.GetCell(tableView, indexPath)); } emptySwitch = new DarkSwitch(model.HighlightEmpty); emptySwitch.ValueChanged += delegate { model.HighlightEmpty = emptySwitch.On; }; var cell = new UITableViewCell(UITableViewCellStyle.Default, "SimpleCheckboxCell") { AccessoryView = emptySwitch, SelectionStyle = UITableViewCellSelectionStyle.None }; cell.TextLabel.Text = "Highlight empty commits"; cell.StyleAsSettingsTableCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.None; return(cell); }