NumericUpDownAccelerationCollection NumericUpDownAccelerationCollection NumericUpDownAccelerationCollection NumericUpDownAccelerationCollection Class

定义

表示 NumericUpDownAcceleration 控件中的 NumericUpDown 对象的已排序集合。Represents a sorted collection of NumericUpDownAcceleration objects in the NumericUpDown control.

public ref class NumericUpDownAccelerationCollection : MarshalByRefObject, System::Collections::Generic::ICollection<System::Windows::Forms::NumericUpDownAcceleration ^>, System::Collections::Generic::IEnumerable<System::Windows::Forms::NumericUpDownAcceleration ^>
[System.ComponentModel.ListBindable(false)]
public class NumericUpDownAccelerationCollection : MarshalByRefObject, System.Collections.Generic.ICollection<System.Windows.Forms.NumericUpDownAcceleration>, System.Collections.Generic.IEnumerable<System.Windows.Forms.NumericUpDownAcceleration>
type NumericUpDownAccelerationCollection = class
    inherit MarshalByRefObject
    interface ICollection<NumericUpDownAcceleration>
    interface seq<NumericUpDownAcceleration>
    interface IEnumerable
Public Class NumericUpDownAccelerationCollection
Inherits MarshalByRefObject
Implements ICollection(Of NumericUpDownAcceleration), IEnumerable(Of NumericUpDownAcceleration)
继承
NumericUpDownAccelerationCollectionNumericUpDownAccelerationCollectionNumericUpDownAccelerationCollectionNumericUpDownAccelerationCollection
属性
实现

示例

下面的代码示例演示如何使用Accelerations属性。The following code example demonstrates how to use the Accelerations property. 若要运行此示例, 请将以下代码粘贴到窗体中InitializeAcceleratedUpDown , 并从窗体的构造Load函数或事件处理程序调用方法。To run this example, paste the following code into a form and call the InitializeAcceleratedUpDown method from the form's constructor or Load event handler. 代码运行时, 按住上箭头或下箭头以查看加速发生的时间。While the code is running, press and hold the up or down arrow to see the acceleration occur.

private NumericUpDown numericUpDown1;
private void InitializeAcceleratedUpDown()
{
    numericUpDown1 = new NumericUpDown();
    numericUpDown1.Location = new Point(40, 40);
    numericUpDown1.Maximum = 40000;
    numericUpDown1.Minimum = -40000;

    // Add some accelerations to the control.
    numericUpDown1.Accelerations.Add(new NumericUpDownAcceleration(2,100));
    numericUpDown1.Accelerations.Add(new NumericUpDownAcceleration(5, 1000));
    numericUpDown1.Accelerations.Add(new NumericUpDownAcceleration(8, 5000));
    Controls.Add(numericUpDown1);

}
Private numericUpDown1 As NumericUpDown

Private Sub InitializeAcceleratedUpDown() 
    numericUpDown1 = New NumericUpDown()
    numericUpDown1.Location = New Point(40, 40)
    numericUpDown1.Maximum = 40000
    numericUpDown1.Minimum = - 40000
    
    ' Add some accelerations to the control.
    numericUpDown1.Accelerations.Add(New NumericUpDownAcceleration(2, 100))
    numericUpDown1.Accelerations.Add(New NumericUpDownAcceleration(5, 1000))
    numericUpDown1.Accelerations.Add(New NumericUpDownAcceleration(8, 5000))
    Controls.Add(numericUpDown1)

End Sub
 

注解

NumericUpDownAccelerationCollection的元素Seconds按属性进行排序。The elements in the NumericUpDownAccelerationCollection are sorted by the Seconds property.

构造函数

NumericUpDownAccelerationCollection() NumericUpDownAccelerationCollection() NumericUpDownAccelerationCollection() NumericUpDownAccelerationCollection()

初始化 NumericUpDownAccelerationCollection 类的新实例。Initializes a new instance of the NumericUpDownAccelerationCollection class.

属性

Count Count Count Count

获取 NumericUpDownAccelerationCollection 中的对象的数目。Gets the number of objects in the NumericUpDownAccelerationCollection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

获取一个值,该值指示 NumericUpDownAccelerationCollection 是否为只读。Gets a value indicating whether the NumericUpDownAccelerationCollection is read-only.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

获取指定索引号处的 NumericUpDownAccelerationGets the NumericUpDownAcceleration at the specified index number.

方法

Add(NumericUpDownAcceleration) Add(NumericUpDownAcceleration) Add(NumericUpDownAcceleration) Add(NumericUpDownAcceleration)

将新 NumericUpDownAcceleration 添加到 NumericUpDownAccelerationCollection 中。Adds a new NumericUpDownAcceleration to the NumericUpDownAccelerationCollection.

AddRange(NumericUpDownAcceleration[]) AddRange(NumericUpDownAcceleration[]) AddRange(NumericUpDownAcceleration[]) AddRange(NumericUpDownAcceleration[])

将指定数组中的元素添加到 NumericUpDownAccelerationCollection 中,并保持集合的排序状态。Adds the elements of the specified array to the NumericUpDownAccelerationCollection, keeping the collection sorted.

Clear() Clear() Clear() Clear()

NumericUpDownAccelerationCollection 中移除所有元素。Removes all elements from the NumericUpDownAccelerationCollection.

Contains(NumericUpDownAcceleration) Contains(NumericUpDownAcceleration) Contains(NumericUpDownAcceleration) Contains(NumericUpDownAcceleration)

确定 NumericUpDownAccelerationCollection 是否包含特定的 NumericUpDownAccelerationDetermines whether the NumericUpDownAccelerationCollection contains a specific NumericUpDownAcceleration.

CopyTo(NumericUpDownAcceleration[], Int32) CopyTo(NumericUpDownAcceleration[], Int32) CopyTo(NumericUpDownAcceleration[], Int32) CopyTo(NumericUpDownAcceleration[], Int32)

NumericUpDownAccelerationCollection 的值复制到一维 NumericUpDownAcceleration 实例中的指定索引处。Copies the NumericUpDownAccelerationCollection values to a one-dimensional NumericUpDownAcceleration instance at the specified index.

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
Remove(NumericUpDownAcceleration) Remove(NumericUpDownAcceleration) Remove(NumericUpDownAcceleration) Remove(NumericUpDownAcceleration)

NumericUpDownAcceleration 中移除指定的 NumericUpDownAccelerationCollection 的第一个匹配项。Removes the first occurrence of the specified NumericUpDownAcceleration from the NumericUpDownAccelerationCollection.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

获取集合的枚举数。Gets the enumerator for the collection.

IEnumerable<NumericUpDownAcceleration>.GetEnumerator() IEnumerable<NumericUpDownAcceleration>.GetEnumerator() IEnumerable<NumericUpDownAcceleration>.GetEnumerator() IEnumerable<NumericUpDownAcceleration>.GetEnumerator()

获取集合的枚举数。Gets the enumerator for the collection.

扩展方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于