コード例 #1
0
ファイル: CompositeCell.cs プロジェクト: RajeshPatadiya/xwt
        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
ファイル: CompositeCell.cs プロジェクト: Gaushick/xwt
 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
ファイル: CompositeCell.cs プロジェクト: m13253/xwt
		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 ();
		}