using AppLogic;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tutorial_4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            StorefrontSelectBox.DataSource = Program.storeFronts;
            StorefrontSelectBox.ClearSelected();
            ServiceCheckListBox.Items.Clear();
            //

        }

        private void StorefrontSelectBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            IStoreFront selectedStore = (IStoreFront)(StorefrontSelectBox.SelectedItem);
            if (selectedStore != null)
            {
                ServiceCheckListBox.Items.Clear();
                foreach (var item in selectedStore.GetProducts)
                {
                    ServiceCheckListBox.Items.Add(item, false);
                }
            }
            Program.storeFronts.Add(Program.storeFronts.First());
            
            
        }

        private void ServiceCheckListBox_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
