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 CalcViewModel
    {
        public ObservableCollection<CalcItem> CalcCollection { get; set; }

        public CalcViewModel()
        {
            CalcCollection = MakeCalcCollection();
        }

        ObservableCollection<CalcItem> MakeCalcCollection()
        {
            ObservableCollection<CalcItem> tempList = new ObservableCollection<CalcItem>();

            Random rnd = new Random();

            for (int i = 0; i < 10; i++)
            {
                CalcItem ci = new CalcItem();
                ci.Id = i;
                ci.Name = "Name " + i.ToString();
                ci.CalcValue = Convert.ToDecimal(rnd.Next(0, 100));

                tempList.Add(ci);
            }

            return tempList;
        }
    }
}
