Пример #1
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)
                {
                    I3Cell 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;
            }
        }
Пример #2
0
        /// <summary>
        /// Initialise default values
        /// </summary>
        private void Init()
        {
            this.cells             = null;
            this.userData          = null;
            this.tag               = null;
            this.tableModel        = null;
            this.index             = -1;
            this.rowStyle          = null;
            this.selectedCellCount = 0;
            this.rowState          = I3RowState.Normal;

            this.state = (byte)(STATE_EDITABLE | STATE_ENABLED);
        }
Пример #3
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 = (I3CellCollection)value;

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

            I3Row row = (I3Row)context.Instance;

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

            return(returnObject);
        }
Пример #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 I3CellCollectionEditor(Type type) : base(type)
 {
     this.cells = null;
 }