private void ListAdd(ChangeLogItem log) { Table table = this.tableList; // The Table control on a form - already initialised Cell c = new Cell(); switch (log.T) { case ChangeLogLevel.ADD: c = new Cell(Translator.Instance.T("新增"), global::ZForge.Controls.Logs.Properties.Resources.add_16); break; case ChangeLogLevel.BUGFIX: c = new Cell(Translator.Instance.T("BUGFIX"), global::ZForge.Controls.Logs.Properties.Resources.bug_yellow_16); break; case ChangeLogLevel.REMOVE: c = new Cell(Translator.Instance.T("移除"), global::ZForge.Controls.Logs.Properties.Resources.delete_16); break; default: c = new Cell(Translator.Instance.T("更改"), global::ZForge.Controls.Logs.Properties.Resources.document_into_16); break; } Row row = new Row( new Cell[] { new Cell(log.Version), c, new Cell(log.Message) } ); row.Tag = log; table.TableModel.Rows.Add(row); }
public void Add(ChangeLogItem i) { this.ListAdd(i); }
private void ListUpdate(ChangeLogItem[] logs) { Table table = this.tableList; // The Table control on a form - already initialised table.TableModel.Rows.Clear(); foreach (ChangeLogItem i in logs) { this.ListAdd(i); } table.ColumnModel.ResizeColumnWidth(); }