//------------------------------------------------------------------------------
// <copyright file=”*.cs” company=”EhLib Team”>
//     Copyright (c) 2017 Dmitry V. Bolshakov   
// </copyright>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Text;

namespace EhLib
{
  [ListBindable(false)]
  public class DataVertGridStaticRowsCollection : DataAxisGridStaticPropBarCollection
  {

    #region privates
    #endregion privates

    public DataVertGridStaticRowsCollection(DataAxisGrid grid) : base(grid)
    {
    }

    #region Properties

    protected new DataVertGridEh Grid
    {
      get { return (DataVertGridEh)base.Grid; }
    }

    [Browsable(false)]
    public new DataVertGridRow this[int index]
    {
      get { return (DataVertGridRow)base[index]; }
      set { throw new NotSupportedException(); }
    }

    [Browsable(false)]
    public new DataVertGridRow this[string rowName]
    {
      get
      {
        return (DataVertGridRow)base[rowName];
      }
    }
    #endregion Properties

    #region Methods Explicit interfaces
    #endregion

    #region Events
    #endregion

    #region Methods
    public virtual int Add(DataVertGridRow row)
    {
      return base.Add(row);
    }

    public virtual void Insert(int rowIndex, DataVertGridRow row)
    {
      base.Insert(rowIndex, row);
    }

    public virtual void Move(DataVertGridRow row, int newIndex)
    {
      base.Move(row, newIndex);
    }

    public void SetRowsOrder(ICollection<PropertyAxisBar> orderedRows)
    {
      base.SetBarsOrder(orderedRows);
    }

    public virtual bool Contains(DataVertGridRow row)
    {
      return base.Contains(row);
    }

    public new virtual bool Contains(string rowName)
    {
      return base.Contains(rowName);
    }

    public void CopyTo(DataVertGridRow[] array, int arrayIndex)
    {
      base.CopyTo(array, arrayIndex);
    }

    public int IndexOf(DataVertGridRow row)
    {
      return base.IndexOf(row);
    }

    public DataVertGridRow FindRowByDataProperty(string dataPropertyName)
    {
      return (DataVertGridRow)base.FindBarByDataProperty(dataPropertyName);
    }

    public virtual void Remove(DataVertGridRow row)
    {
      base.Remove(row);
    }

    public bool AllRowsAutoGenerated()
    {
      return AllBarsAutoGenerated();
    }

    public void RemoveAutoGeneratedRows()
    {
      RemoveAutoGeneratedBars();
    }
    #endregion Methods

  }

  public class DataVertGridReadOnlyRowCollection : DataAxisGridReadOnlyPropBarCollection
  {

    #region privates
    #endregion privates

    public DataVertGridReadOnlyRowCollection(DataAxisGrid grid, IList<PropertyAxisBar> list) : base(grid, list)
    {
    }

    #region Properties
    protected new DataVertGridEh Grid
    {
      get { return (DataVertGridEh)base.Grid; }
    }

    public new DataVertGridRow this[int index]
    {
      get
      {
        return (DataVertGridRow)base[index];
      }
    }

    [Browsable(false)]
    public new DataVertGridRow this[string rowName]
    {
      get
      {
        return (DataVertGridRow)base[rowName];
      }
    }
    #endregion Properties


    #region Methods
    public DataVertGridRow FindRowByPropertyName(string dataPropertyName)
    {
      return (DataVertGridRow)base.FindBarByPropertyName(dataPropertyName);
    }

    public void SetDisplayIndexForRowsRange(Collection<DataVertGridRow> rows, int newDisplayIndex)
    {

    }
    #endregion Methods

  }

  public class DataVertGridMainRowCollection : DataAxisGridMainPropBarCollection
  {

    #region privates
    #endregion privates

    public DataVertGridMainRowCollection(DataAxisGrid grid, IList<PropertyAxisBar> list) : base(grid, list)
    {
    }

    #region Properties
    protected new DataVertGridEh Grid
    {
      get { return (DataVertGridEh)base.Grid; }
    }

    public new DataVertGridRow this[int index]
    {
      get
      {
        return (DataVertGridRow)base[index];
      }
    }

    [Browsable(false)]
    public new DataVertGridRow this[string rowName]
    {
      get
      {
        return (DataVertGridRow)base[rowName];
      }
    }
    #endregion Properties


    #region Methods
    public DataVertGridRow FindRowByPropertyName(string dataPropertyName)
    {
      return (DataVertGridRow)base.FindBarByPropertyName(dataPropertyName);
    }

    public void SetDisplayIndexForRowsRange(Collection<DataVertGridRow> rows, int newDisplayIndex)
    {

    }
    #endregion Methods

  }

}
