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.Generic;

namespace Q3.SL.Demos.ViewModels
{
    public class BarcodeViewModel
    {
        public List<Product> Products { get; set; }

        public BarcodeViewModel()
        {
            Products = MakeProducts();
        }

        List<Product> MakeProducts()
        {
            List<Product> tempList = new List<Product>();

            Random rnd = new Random();

            for (int i = 0; i < 20; i++)
            {
                Product prod = new Product();
                prod.Id = i;
                prod.Name = "Super Product " + i.ToString();
                prod.Quantity = rnd.Next(10, 100);
                prod.UPCValue = rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString() + rnd.Next(0, 9).ToString();

                tempList.Add(prod);
            }

            return tempList;
        }
    }
}
