Пример #1
0
        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();
            }
        }
Пример #2
0
 internal void Load(ICellRenderer cell)
 {
     CurrentCellView      = (NSView)cell;
     CurrentPosition      = cell.CellContainer.TablePosition;
     currentParentRowView = null;
     EventSink            = Frontend.Load(cell.CellContainer);
 }
Пример #3
0
        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();
            }
        }
Пример #4
0
 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 ();
 }
Пример #5
0
		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 ();
		}