Esempio n. 1
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                return(ExceptionUtility.Try <UITableViewCell>(() =>
                {
                    var cell = (SensorsTableViewCell)tableView.DequeueReusableCell(SensorsTableViewCell.TableCellKey, indexPath);

                    SensorsTableRowViewModel rowValue = null;
                    if (indexPath.Row < _rowValues.Count)
                    {
                        rowValue = _rowValues[indexPath.Row];
                    }
                    cell.LoadCellValues(rowValue);
                    return cell;
                }));
            }
Esempio n. 2
0
 public void LoadCellValues(SensorsTableRowViewModel rowValue)
 {
     ExceptionUtility.Try(() =>
     {
         if (rowValue != null)
         {
             if (rowValue.IsGroupName)
             {
                 this._nameLabel.Text = rowValue.LeftValue;
                 this._nameLabel.SetFontAndColor(BoldFont);
                 this._valueLabel.Hidden = true;
             }
             else
             {
                 this._nameLabel.Text = rowValue.LeftValue;
                 this._nameLabel.SetFontAndColor(new FontWithColor(NormalFont.Font, rowValue.LeftColor));
                 this._valueLabel.Text   = rowValue.RightValue;
                 this._valueLabel.Hidden = false;
                 this._valueLabel.SetFontAndColor(new FontWithColor(BoldFont.Font, rowValue.RightColor));
             }
         }
     });
 }