⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectlist.cs

📁 WJ Communications RFID example code
💻 CS
字号:
//==========================================================================================
//
//	WJ.MPR.Reader.SelectList
//	Copyright (c) 2006, WJ Communications, Inc.
//
//==========================================================================================
using System;

namespace WJ.MPR.Reader
{
	/// <summary>
	/// A strongly-typed collection of SelectRecord objects.
	/// </summary>
	public class SelectList : System.Collections.CollectionBase
	{
		/// <summary>
		/// If the Select Record is empty, the MPR will use the Default Select Record.
		/// When this occurs, a Read Select Record command will reply with a length = 0,
		/// and the details of the default record.  In this case, this bool is set to true.
		/// Otherwise it is false.
		/// </summary>
		public bool DefaultRecordOnly = false;

		/// <summary>
		/// Gets or sets the element at the specified index.
		/// This property is the indexer for the SelectRecordList class.
		/// </summary>
		/// <param name="Index">The zero-based index of the SelectRecord to get or set.</param>
		/// <value>The SelectRecord at the specified index.</value>
		/// <exception cref="ArgumentOutOfRangeException">index is not a valid index in the SelectRecordList.</exception>
		public SelectRecord this[int Index] { get {return (SelectRecord) List[Index];} set {List[Index] = value;} }

		/// <summary>
		/// Add an SelectRecord to the list.
		/// </summary>
		/// <param name="aFrame">The frame to add.</param>
		/// <returns>Index of newly added frame.</returns>
		public int Add(SelectRecord aFrame) { return List.Add(aFrame); }

		/// <summary>
		/// Determines the index of a specific SelectRecord in the SelectRecordList.
		/// </summary>
		/// <param name="aFrame">The SelectRecord to locate in the SelectRecordList.</param>
		/// <returns>The index of aFrame if found in the SelectRecordList; otherwise, -1.</returns>
		public int IndexOf(SelectRecord aFrame) { return List.IndexOf(aFrame); }

		/// <summary>
		/// Inserts an SelectRecord to the SelectRecordList at the specified Index.
		/// </summary>
		/// <param name="Index">The zero-based index at which the value should be inserted. </param>
		/// <param name="aFrame">The SelectRecord to insert into the SelectRecordList.</param>
		public void Insert(int Index, SelectRecord aFrame) { List.Insert(Index, aFrame); }

		/// <summary>
		/// Removes the first occurrence of a specific SelectRecord from the SelectRecordList
		/// </summary>
		/// <param name="aFrame">The SelectRecord to remove from the SelectRecordList.</param>
		public void Remove(SelectRecord aFrame) { List.Remove(aFrame); }
		
		/// <summary>
		/// Determines whether the SelectRecordList contains a specific value.
		/// </summary>
		/// <param name="aFrame">The SelectRecord to locate in the SelectRecordList.</param>
		/// <returns>true if the SelectRecord is found in the SelectRecordList; otherwise, false.</returns>
		public bool Contains(SelectRecord aFrame) { return List.Contains(aFrame); }
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -