//using System;
//using System.Collections.Generic;
//using System.Text;
using System;
using System.Collections;

namespace CommonMP.HYSSOP.OptionImpl.HSViewer.DotNetViewer
{

    /// <summary><para>class outline:</para>
    /// <para>データコレクション</para>
    /// </summary>
    /// <remarks><para>history:</para>
    /// <para>[CommonMP][ver 1.0.0][2010/02/04][新規作成]</para>
    /// </remarks>
    public class HySEvViewBaseDataItems : CollectionBase
    {
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public HySEvViewBaseDataItems()
        {
            
        }

        /**********************************************************************
         * 変数の定義
        **********************************************************************/
        private int m_minute = 0;   //断続時間

        /**********************************************************************
         * プロパティの定義
        **********************************************************************/
        /// <summary>
        /// 断続時間
        /// </summary>
        public int Minute
        {
            set
            {
                m_minute = value;
            }
            get
            {
                return m_minute;
            }
        }

        /// <summary><para>method outline:</para>
        /// <para>データ</para>
        /// </summary>
        /// <param name="index">インデックス</param>
        /// <returns>データ</returns>
        public HySEvViewBaseDataItem this[int index]
        {
            get
            {
                return ((HySEvViewBaseDataItem)List[index]);
            }
            set
            {
                List[index] = value;
            }
        }
        /// <summary><para>method outline:</para>
        /// <para>追加</para> 
        /// </summary>
        /// <param name="value">値</param>
        /// <returns></returns>
        public int Add(HySEvViewBaseDataItem value)
        {
            return (List.Add(value));
        }
        /// <summary><para>method outline:</para>
        /// <para>インデックス取得</para>
        /// </summary>
        /// <param name="value">値</param>
        /// <returns>インデックス</returns>
        public int IndexOf(HySEvViewBaseDataItem value)
        {
            return (List.IndexOf(value));
        }
        /// <summary><para>method outline:</para>
        /// <para>挿入</para>
        /// </summary>
        /// <param name="index">インデックス</param>
        /// <param name="value">値</param>
        public void Insert(int index, HySEvViewBaseDataItem value)
        {
            List.Insert(index, value);
        }
        /// <summary><para>method outline:</para>
        /// <para>削除</para>
        /// </summary>
        /// <param name="value">値</param>
        public void Remove(HySEvViewBaseDataItem value)
        {
            List.Remove(value);
        }
        /// <summary><para>method outline:</para>
        /// <para>特定の値が格納されているか判定します</para>
        /// </summary>
        /// <param name="value">値</param>
        /// <returns>true=存在する/false=しない</returns>
        public bool Contains(HySEvViewBaseDataItem value)
        {
            // If value is not of type Int16, this will return false.
            return (List.Contains(value));
        }
        /// <summary>
        /// OnInsert
        /// </summary>
        /// <param name="index">インデックス</param>
        /// <param name="value">値</param>
        protected override void OnInsert(int index, Object value)
        {
            //			if ( value.GetType() != Type.GetType("HySEvViewBaseDataItem") )
            //				throw new ArgumentException( "value must be of type HySEvViewBaseDataItem.", "value" );
        }
        /// <summary>
        /// OnRemove
        /// </summary>
        /// <param name="index">インデックス</param>
        /// <param name="value">値</param>
        protected override void OnRemove(int index, Object value)
        {
            //			if ( value.GetType() != Type.GetType("HySEvViewBaseDataItem") )
            //				throw new ArgumentException( "value must be of type HySEvViewBaseDataItem.", "value" );
        }
        /// <summary>
        /// OnSet
        /// </summary>
        /// <param name="index">インデックス</param>
        /// <param name="oldValue">値</param>
        /// <param name="newValue">値</param>
        protected override void OnSet(int index, Object oldValue, Object newValue)
        {
            //			if ( newValue.GetType() != Type.GetType("HySEvViewBaseDataItem") )
            //				throw new ArgumentException( "newValue must be of type HySEvViewBaseDataItem.", "newValue" );
        }
        /// <summary>
        /// OnValidate
        /// </summary>
        /// <param name="value">値</param>
        protected override void OnValidate(Object value)
        {
            //			if ( value.GetType() != Type.GetType("HySEvViewBaseDataItem") )
            //				throw new ArgumentException( "value must be of type HySEvViewBaseDataItem." );
        }
    }
}
