public ColumnCellAccessible (object bound_object, ColumnCell cell, ICellAccessibleParent parent) { Role = Atk.Role.TableCell; this.bound_object = bound_object; this.cell = cell; cell_parent = parent; Parent = (Atk.Object) parent; }
public ColumnCellAccessible(object bound_object, ColumnCell cell, ICellAccessibleParent parent) { Role = Atk.Role.TableCell; this.bound_object = bound_object; this.cell = cell; cell_parent = parent; Parent = (Atk.Object)parent; }
private SortableColumn Create(QueryField field, double width, bool visible, ColumnCell cell) { cell.Property = field.PropertyName; SortableColumn col = new SortableColumn( field.ShortLabel, cell, width, field.Name, visible ); col.LongTitle = field.Label; col.Field = field; return(col); }
void addColumnHeaders() { ColumnCell matchColumn = new ColumnCell(); matchColumn.column.Text = "Match No."; ColumnCell teamColumn = new ColumnCell(); teamColumn.column.Text = "Team No."; ColumnCell scoreColumn = new ColumnCell(); scoreColumn.column.Text = "Total Score"; ColumnCell autoColumn = new ColumnCell(); autoColumn.column.Text = "Auto Points"; ColumnCell teleOpColumn = new ColumnCell(); teleOpColumn.column.Text = "TeleOp Points"; dataGrid.Children.Add(matchColumn, 0, 0); dataGrid.Children.Add(teamColumn, 1, 0); dataGrid.Children.Add(scoreColumn, 2, 0); dataGrid.Children.Add(autoColumn, 3, 0); dataGrid.Children.Add(teleOpColumn, 4, 0); }
void addColumnHeaders(){ ColumnCell matchColumn = new ColumnCell (); matchColumn.column.Text = "Match No."; ColumnCell teamColumn = new ColumnCell (); teamColumn.column.Text = "Team No."; ColumnCell scoreColumn = new ColumnCell (); scoreColumn.column.Text = "Total Score"; ColumnCell autoColumn = new ColumnCell (); autoColumn.column.Text = "Auto Points"; ColumnCell teleOpColumn = new ColumnCell (); teleOpColumn.column.Text = "TeleOp Points"; dataGrid.Children.Add (matchColumn, 0, 0); dataGrid.Children.Add (teamColumn, 1, 0); dataGrid.Children.Add (scoreColumn, 2, 0); dataGrid.Children.Add (autoColumn, 3, 0); dataGrid.Children.Add (teleOpColumn, 4, 0); }
public CS_Column(string id, string t, ColumnCell c, double w) : base(t, c, w) { _id = id; }
private SortableColumn Create(string property, string label, double width, bool visible, ColumnCell cell) { cell.Property = property; return(new SortableColumn(label, cell, width, property, visible)); }
private void ReadColumn(XmlTextReader reader, int depth) { string modify_default = null; string title = null; string long_title = null; string sort_key = null; double width = -1; int max_width = -1; int min_width = -1; bool visible = true; string renderer_type = null; string renderer_property = null; bool renderer_expand = true; while (reader.MoveToNextAttribute()) { if (reader.Name == "modify-default") { modify_default = reader.Value; break; } } while (reader.Read()) { if (reader.NodeType == XmlNodeType.EndElement && reader.Depth == depth) { break; } else if (reader.NodeType != XmlNodeType.Element) { continue; } switch (reader.Name) { case "title": title = reader.ReadString(); break; case "long-title": long_title = reader.ReadString(); break; case "sort-key": sort_key = reader.ReadString(); break; case "width": width = reader.ReadElementContentAsDouble(); break; case "max-width": max_width = reader.ReadElementContentAsInt(); break; case "min-width": min_width = reader.ReadElementContentAsInt(); break; case "visible": visible = ParseBoolean(reader.ReadString()); break; case "renderer": while (reader.MoveToNextAttribute()) { switch (reader.Name) { case "type": renderer_type = reader.Value; break; case "property": renderer_property = reader.Value; break; case "expand": renderer_expand = ParseBoolean(reader.Value); break; } } break; } } if (modify_default != null) { Column column = GetDefaultColumn(modify_default); if (title != null) { column.Title = title; } if (long_title != null) { column.LongTitle = long_title; } if (renderer_type != null) { ColumnCell renderer = GetCellRenderer(renderer_type, renderer_property, renderer_expand); column.RemoveCell(0); column.PackStart(renderer); } if (renderer_property != null) { column.GetCell(0).Property = renderer_property; } if (column.Visible != visible) { column.Visible = visible; } if (column is SortableColumn && sort_key != null) { ((SortableColumn)column).SortKey = sort_key; } } else { ColumnCell renderer = GetCellRenderer(renderer_type, renderer_property, renderer_expand); Column column = sort_key == null ? new Column(title, renderer, width, visible) : new SortableColumn(title, renderer, width, sort_key, visible); if (max_width != -1) { column.MaxWidth = max_width; } if (min_width != -1) { column.MinWidth = min_width; } Add(column); } }
public SortableColumn(ColumnCell header_cell, string title, ColumnCell cell, double width, string sort_key, bool visible) : base(header_cell, title, cell, width, visible) { SortKey = sort_key; }