using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Q3.SL.Demos.ExClasses;
using System.Collections.ObjectModel;

namespace Q3.SL.Demos.ViewModels
{
    public class VirtualViewModel
    {
        public ObservableCollection<Product> ProductList { get; set; }

        public VirtualViewModel()
        {
            ProductList = MakeLotsaProducts();
        }

        ObservableCollection<Product> MakeLotsaProducts()
        {
            ObservableCollection<Product> tempList = new ObservableCollection<Product>();

            Random rnd = new Random();

            for (int i = 0; i < 50000; i++)
            {
                Product prd = new Product();
                prd.Id = i;
                prd.Name = "Name " + i.ToString();
                prd.Quantity = rnd.Next(0, 1000);
                prd.UPCValue = rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString();

                tempList.Add(prd);
            }

            return tempList;
        }
    }
}
