private void table_CellClick(object sender, CellMouseEventArgs e) { MessageCell message = e.Cell as MessageCell; if (null != message) { message.Click(); } }
public NativeAndroidCell(Context context, MessageCell cell) : base(context) { NativeCell = cell; var view = CreateLayout(context); AddView(view); }
public void UpdateCell(MessageCell messageCell) { this.MessageText.Text = messageCell.MessageBody; this.DateText.Text = messageCell.Date; this.StatusText.Text = StatusHelper.GetStatusString(messageCell.Status); this.NameText.Text = messageCell.Name; this.NativeCell = messageCell; }
public void UpdateCell(MessageCell cell) { MessageText.Text = cell.MessageBody; DateText.Text = cell.Date; StatusText.Text = StatusHelper.GetStatusString(cell.Status); NameText.Text = cell.Name; NativeCell = cell; SetNeedsLayout(); }
protected override UITableViewCell GetCellImpl(UITableView tv) { var cell = tv.DequeueReusableCell(MKey) as MessageCell; if (cell == null) { cell = new MessageCell(); } cell.Update(this); return(cell); }
public NativeIOSCell(MessageCell cell, string cellId) : base(UITableViewCellStyle.Default, cellId) { NativeCell = cell; ContentView.BackgroundColor = UIColor.Clear; SelectionStyle = UITableViewCellSelectionStyle.None; InitView(); cell.PropertyChanged -= OnPropertyChangedEventHandler; cell.PropertyChanged += OnPropertyChangedEventHandler; MessageText = new UILabel() { TextColor = NativeCell.TextFontColor.ToUIColor(), Lines = 0, Font = UIFont.SystemFontOfSize(NativeCell.TextFontSize), LineBreakMode = UILineBreakMode.WordWrap, BackgroundColor = UIColor.Clear }; DateText = new UILabel() { TextColor = NativeCell.InfoFontColor.ToUIColor(), Lines = 1, Font = UIFont.SystemFontOfSize(NativeCell.InfoFontSize) }; StatusText = new UILabel() { TextColor = NativeCell.InfoFontColor.ToUIColor(), Lines = 1, Font = UIFont.SystemFontOfSize(NativeCell.InfoFontSize) }; NameText = new UILabel() { TextColor = NativeCell.NameFontColor.ToUIColor(), Lines = 1, Font = UIFont.SystemFontOfSize(NativeCell.NameFontSize) }; _view.AddSubview(StatusText); _view.AddSubview(NameText); _view.AddSubview(MessageText); _view.AddSubview(DateText); ContentView.Add(_view); }
public void LoadAllMessages() { IList messages = null; using (IDbSession session = m_sessionFactory.NewSession()) { messages = session.QueryForList("GetAllMessages", null); } List <Row> rows = new List <Row>(); foreach (Message message in messages) { MessageRow row = new MessageRow(message); row.Tag = message; MailCell mailCell = new MailCell(m_sessionFactory, message, new Image[] { m_image_close_mail, m_image_open_mail }); row.Cells.Add(mailCell); row.Cells.Add(new LevelCell(m_sessionFactory, message, new Image[] { m_image_right, m_image_gray_flag, m_image_red_flag })); row.Cells.Add(new Cell(message.HeaderFrom)); row.Cells.Add(new ReadStateCell(m_sessionFactory, message, new Image[] { m_image_litter_point, m_image_big_point }, mailCell)); row.Cells.Add(new Cell(message.HeaderSubject)); row.Cells.Add(new SpamCell(m_sessionFactory, message, new Image[] { m_image_litter_point, m_image_spam })); row.Cells.Add(new Cell(message.ReceivedDate.ToShortTimeString())); row.Cells.Add(new Cell(message.HeaderSize)); rows.Add(row); } tableModel.Rows.Clear(); tableModel.Rows.AddRange(rows.ToArray()); foreach (Row row in tableModel.Rows) { foreach (Cell cell in row.Cells) { MessageCell messageCell = cell as MessageCell; if (null != messageCell) { messageCell.Refresh(); } } } }
public override UITableViewCell GetCell (UITableView tv) { var cell = tv.DequeueReusableCell (mKey) as MessageCell; if (cell == null) { if(m_ViewFactory != null) { cell = new MessageCell(m_ViewFactory); } else { cell = new MessageCell (); } } cell.Update (this); return cell; }
public override UITableViewCell GetCell (UITableView tv) { var cell = tv.DequeueReusableCell (mKey) as MessageCell; if (cell == null) cell = new MessageCell (); cell.Update (this); return cell; }
public override UITableViewCell GetCell(UITableView tv) { var cell = tv.DequeueReusableCell (key) as MessageCell; if (cell == null) cell = new MessageCell (UITableViewCellStyle.Default, key, Message); else cell.Update (Message); return cell; }