public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			if (indexPath.Section == 0) 
				return base.GetCell(tableView, indexPath);
			
			var cell = new UITableViewCell(UITableViewCellStyle.Default, string.Format("RadioButtonTableCell{0}{1}", indexPath.Section, indexPath.Row)) {
				AccessoryView = null
			};
			
			if (IsNumberOfCommitters(indexPath.Section)) 
			{
				if (indexPath.Row == countSelected) 
					cell.AccessoryView = RadioGroupTableViewSource.BlackAccessoryCheckmark();
				cell.TextLabel.Text = string.Format("Top {0} committers", countValues[indexPath.Row]);
				countCells.Insert(indexPath.Row, cell);
			}
			
			if (IsTimePeriod(indexPath.Section))
			{
				if (indexPath.Row == timeSelected) 
					cell.AccessoryView = RadioGroupTableViewSource.BlackAccessoryCheckmark();
				cell.TextLabel.Text = string.Format("Past {0}", timeValues[indexPath.Row].ToSuffix());
				timeCells.Insert(indexPath.Row, cell);
			}
			
			cell.StyleAsSettingsTableCell();
			
			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)
		{
			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;
		}
Example #4
0
        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);
            }
        }
Example #7
0
        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)
        {
            if (indexPath.Section == 0)
            {
                return(base.GetCell(tableView, indexPath));
            }

            var cell = new UITableViewCell(UITableViewCellStyle.Default, string.Format("RadioButtonTableCell{0}{1}", indexPath.Section, indexPath.Row))
            {
                AccessoryView = null
            };

            if (IsNumberOfCommitters(indexPath.Section))
            {
                if (indexPath.Row == countSelected)
                {
                    cell.AccessoryView = RadioGroupTableViewSource.BlackAccessoryCheckmark();
                }
                cell.TextLabel.Text = string.Format("Top {0} committers", countValues[indexPath.Row]);
                countCells.Insert(indexPath.Row, cell);
            }

            if (IsTimePeriod(indexPath.Section))
            {
                if (indexPath.Row == timeSelected)
                {
                    cell.AccessoryView = RadioGroupTableViewSource.BlackAccessoryCheckmark();
                }
                cell.TextLabel.Text = string.Format("Past {0}", timeValues[indexPath.Row].ToSuffix());
                timeCells.Insert(indexPath.Row, cell);
            }

            cell.StyleAsSettingsTableCell();

            return(cell);
        }
 private void ResetButton()
 {
     buttonCell.TextLabel.Text = "Connect";
     buttonCell.StyleAsSettingsTableCell();
 }