void ICopiableObject.CopyFrom(object other) { var ob = (CompositeCell)other; if (ob.source == null) { throw new ArgumentException("Cannot copy from a CompositeCell with a null `source`"); } context = ob.context; source = ob.source; val = ob.val; tablePosition = ob.tablePosition; direction = ob.direction; trackingCell = ob.trackingCell; cells = new List <ICellRenderer> (); foreach (var c in ob.cells) { var copy = (ICellRenderer)Activator.CreateInstance(c.GetType()); copy.CopyFrom(c); AddCell(copy); } if (tablePosition != null) { Fill(); } }
internal void Load(ICellRenderer cell) { CurrentCellView = (NSView)cell; CurrentPosition = cell.CellContainer.TablePosition; currentParentRowView = null; EventSink = Frontend.Load(cell.CellContainer); }
void ICopiableObject.CopyFrom(object other) { var ob = (CompositeCell)other; source = ob.source; val = ob.val; tablePosition = ob.tablePosition; direction = ob.direction; trackingCell = ob.trackingCell; cells = new List <ICellRenderer> (); foreach (var c in ob.cells) { var copy = (ICellRenderer)Activator.CreateInstance(c.GetType()); copy.CopyFrom(c); AddCell(copy); } if (tablePosition != null) { Fill(); } }
void ICopiableObject.CopyFrom(object other) { var ob = (CompositeCell)other; source = ob.source; val = ob.val; tablePosition = ob.tablePosition; direction = ob.direction; trackingCell = ob.trackingCell; cells = new List<ICellRenderer> (); foreach (var c in ob.cells) { var copy = Activator.CreateInstance (c.GetType ()); ((ICopiableObject)copy).CopyFrom (c); cells.Add ((ICellRenderer) copy); } if (tablePosition != null) Fill (); }
void ICopiableObject.CopyFrom (object other) { var ob = (CompositeCell)other; if (ob.source == null) throw new ArgumentException ("Cannot copy from a CompositeCell with a null `source`"); context = ob.context; source = ob.source; val = ob.val; tablePosition = ob.tablePosition; direction = ob.direction; trackingCell = ob.trackingCell; cells = new List<ICellRenderer> (); foreach (var c in ob.cells) { var copy = (ICellRenderer) Activator.CreateInstance (c.GetType ()); copy.CopyFrom (c); AddCell (copy); } if (tablePosition != null) Fill (); }