Exemplo n.º 1
0
        public void InvalidateCell(ActiveRow.ActiveCell cell)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new InvalidateCellCallback(InvalidateCell), new object[] { cell });
                return;
            }

            if (cell != null)
                cell.Draw(base.CreateGraphics());
        }
Exemplo n.º 2
0
 public void RowHeaderRightClick(ActiveRow row)
 {
     if (row != null)
     {
         OnRowHeaderRightMouseClickHandler onRowHeaderRightMouseClick = OnRowHeaderRightMouseClick;
         if (onRowHeaderRightMouseClick != null)
             onRowHeaderRightMouseClick(this, new RowHeaderEventArgs(row.Index, row.Name, row.Tag));
     }
 }
Exemplo n.º 3
0
            /// <summary>
            /// Initializes a new instance of the ActiveCell class with 
            /// the specified owner, text, foreground color, background color, and font values. 
            /// </summary>
            /// <param name="owner">A LVRow that represents the item that owns the subitem</param>
            /// <param name="text">The text to display for the subitem</param>
            /// <param name="foreColor">A Color that represents the foreground color of the subitem</param>
            /// <param name="backColor">A Color that represents the background color of the subitem</param>
            /// <param name="font">A Font that represents the font to display the subitem's text in</param>
            public ActiveCell(ActiveRow owner, string text, Color foreColor, Color backColor, Font font)
                : base(owner, text, foreColor, backColor, font)
            {
                this._row = owner;

                Initialize();
            }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the ActiveRow.ActiveCellCollection class
 /// </summary>
 /// <param name="owner">The ActiveRow that owns the collection</param>
 public ActiveCellCollection(ActiveRow owner)
     : base(owner)
 {
 }
Exemplo n.º 5
0
            /// <summary>
            /// Initializes a new instance of the ActiveCell class with the specified owner and text
            /// </summary>
            /// <param name="owner">A LVRow that represents the item that owns the subitem</param>
            /// <param name="text">The text to display for the subitem</param>
            public ActiveCell(ActiveRow owner, string text)
                : base(owner, text)
            {
                this._row = owner;

                Initialize();
            }
Exemplo n.º 6
0
 /// <summary>
 /// Inserts an existing ActiveRow into the collection at the specified index
 /// </summary>
 /// <param name="index">The zero-based index location where the item is inserted</param>
 /// <param name="item">The ActiveRow that represents the item to insert</param>
 /// <returns></returns>
 public ActiveRow Insert(int index, ActiveRow item)
 {
     return base.Insert(index, item) as ActiveRow;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Determines whether the specified item is located in the collection
 /// </summary>
 /// <param name="subItem">An ActiveRow representing the item to locate in the collection</param>
 /// <returns>true if the item is contained in the collection; otherwise, false</returns>
 public bool Contains(ActiveRow item)
 {
     return base.Contains(item);
 }
Exemplo n.º 8
0
            /// <summary>
            /// Adds an array of ActiveRow objects to the collection.
            /// </summary>
            /// <param name="values">An array of ActiveRow objects to add to the collection.</param>
            public void AddRange(ActiveRow[] items)
            {
                base.AddRange(items);

                foreach (ActiveRow row in items)
                {
                    for (int i = 1; i < row.SubItems.Count; i++)
                    {
                        ActiveRow.ActiveCell cell = row[i];
                        if (!String.IsNullOrEmpty(cell.Name))
                            this._owner._cells.Add(cell.Name, cell);
                    }
                }
            }
Exemplo n.º 9
0
            /// <summary>
            /// Adds an existing ActiveRow to the collection.
            /// </summary>
            /// <param name="value">The ActiveRow to add to the collection</param>
            /// <returns>The ActiveRow that was added to the collection</returns>
            public ActiveRow Add(ActiveRow value)
            {
                ActiveRow row = base.Add(value) as ActiveRow;

                if (row != null)
                {
                    for (int i = 1; i < row.SubItems.Count; i++)
                    {
                        ActiveRow.ActiveCell cell = row[i];
                        if (!String.IsNullOrEmpty(cell.Name))
                            this._owner._cells.Add(cell.Name, cell);
                    }
                }

                return row;
            }