using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Azyobuzi.Twirunrun
{
    public class StatusesListView : ListView
    {
        public StatusesListView()
        {
            this.View = View.Details;
            this.VirtualMode = true;
            this.RetrieveVirtualItem += this_RetrieveVirtualItem;
        }

        private IList<StatusInfo> statuses;
        public IList<StatusInfo> Statuses
        {
            set
            {
                statuses = value;
                SetItemsCount();
            }
            get
            {
                return statuses;
            }
        }

        public void SetItemsCount(int count)
        {
            VirtualListSize = count;
        }

        public void SetItemsCount()
        {
            SetItemsCount(Statuses.Count);
        }

        private void this_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            var item = Statuses[e.ItemIndex];

            var lvi = new ListViewItem();

        }
    }
}
