Represents a collection of Cell objects
Inheritance: System.Collections.CollectionBase
Exemplo n.º 1
0
        /// <summary>
        /// Edits the value of the specified object using the specified 
        /// service provider and context
        /// </summary>
        /// <param name="context">An ITypeDescriptorContext that can be 
        /// used to gain additional context information</param>
        /// <param name="isp">A service provider object through which 
        /// editing services can be obtained</param>
        /// <param name="value">The object to edit the value of</param>
        /// <returns>The new value of the object. If the value of the 
        /// object has not changed, this should return the same object 
        /// it was passed</returns>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider isp, object value)
        {
            this.cells = (CellCollection) value;

            object returnObject = base.EditValue(context, isp, value);

            Row row = (Row) context.Instance;

            if (row.TableModel != null && row.TableModel.Table != null)
            {
                row.TableModel.Table.PerformLayout();
                row.TableModel.Table.Refresh();
            }

            return returnObject;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Releases all resources used by the Row
        /// </summary>
        public void Dispose()
        {
            if (!this.disposed)
            {
                this.tag = null;

                if (this.tableModel != null)
                {
                    this.tableModel.Rows.Remove(this);
                }

                this.tableModel = null;
                this.index = -1;

                if (this.cells != null)
                {
                    Cell cell;

                    for (int i = 0; i < this.cells.Count; i++)
                    {
                        cell = this.cells[i];

                        cell.InternalRow = null;
                        cell.Dispose();
                    }

                    this.cells = null;
                }

                this.rowStyle = null;
                this.state = (byte)0;

                this.disposed = true;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initialise default values
        /// </summary>
        private void Init()
        {
            this.cells = null;

            this.tag = null;
            this.tableModel = null;
            this.index = -1;
            this.rowStyle = null;
            this.selectedCellCount = 0;
            this.hasWordWrapCell = false;
            this.wordWrapIndex = 0;
            this.height = -1;

            this.state = (byte)(STATE_EDITABLE | STATE_ENABLED | STATE_VISIBLE);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the CellCollectionEditor class 
 /// using the specified collection type
 /// </summary>
 /// <param name="type">The type of the collection for this editor to edit</param>
 public CellCollectionEditor(Type type)
     : base(type)
 {
     this.cells = null;
 }