C# Класс SIL.FieldWorks.Common.Widgets.FwListBox.ObjectCollection

Like ListBox, FwListBox defines an ObjectCollection class for the items in the list. This class provides a subset of the functionality of the ArrayList used to implement it. The reason for not using an ArrayList is that operations that change the contents of the list have to have side effects on the control.
Наследование: IList, ICollection, IEnumerable, IFWDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ClearAllItems void
ICollection void

Открытые методы

Метод Описание
Add ( object item ) : int

Add an item to the collection and the display.

AddRange ( IEnumerable items ) : void

Add a whole collection of objects.

CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

Clear ( ) : void

Clear all items.

Enhance JohnT: add the version that takes an ObjectCollection.

Contains ( object item ) : bool

See if the item is present.

Dispose ( ) : void

Must not be virtual.

GetEnumerator ( ) : IEnumerator

Get an enumerator for the list.

IndexOf ( object item ) : int

Find the zero-based position of the item, or -1 if not found.

Insert ( int index, object item ) : void

Insert the specified item at the specified position.

ObjectCollection ( IFwListBox owner ) : System

Construct empty.

ObjectCollection ( IFwListBox owner, object values ) : System

Construct with supplied initial items.

Remove ( object item ) : void

RemoveAt ( int index ) : void

this ( int index ) : object

Indexer. Set must modify the display.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

InsertItemAtIndex ( int index, object item ) : void

Shared function for Insert and Add.

Приватные методы

Метод Описание
ClearAllItems ( ) : void
ICollection ( Array dest, int arrayIndex ) : void

Copy to a destination array.

Описание методов

Add() публичный Метод

Add an item to the collection and the display.
public Add ( object item ) : int
item object
Результат int

AddRange() публичный Метод

Add a whole collection of objects.
public AddRange ( IEnumerable items ) : void
items IEnumerable
Результат void

CheckDisposed() публичный Метод

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
Результат void

Clear() публичный Метод

Clear all items.
Enhance JohnT: add the version that takes an ObjectCollection.
public Clear ( ) : void
Результат void

Contains() публичный Метод

See if the item is present.
public Contains ( object item ) : bool
item object
Результат bool

Dispose() публичный Метод

Must not be virtual.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetEnumerator() публичный Метод

Get an enumerator for the list.
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

IndexOf() публичный Метод

Find the zero-based position of the item, or -1 if not found.
public IndexOf ( object item ) : int
item object
Результат int

Insert() публичный Метод

Insert the specified item at the specified position.
public Insert ( int index, object item ) : void
index int
item object
Результат void

InsertItemAtIndex() защищенный Метод

Shared function for Insert and Add.
protected InsertItemAtIndex ( int index, object item ) : void
index int
item object
Результат void

ObjectCollection() публичный Метод

Construct empty.
public ObjectCollection ( IFwListBox owner ) : System
owner IFwListBox
Результат System

ObjectCollection() публичный Метод

Construct with supplied initial items.
public ObjectCollection ( IFwListBox owner, object values ) : System
owner IFwListBox
values object
Результат System

Remove() публичный Метод

public Remove ( object item ) : void
item object
Результат void

RemoveAt() публичный Метод

public RemoveAt ( int index ) : void
index int
Результат void

this() публичный Метод

Indexer. Set must modify the display.
public this ( int index ) : object
index int
Результат object