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 ch14_3
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MonitorSample sample = new MonitorSample();
            for (int i = 0; i < 10; i++)
                sample.AddElement(i);
            sample.PrintAllElements();
            Sharing.output += "\nDelete elements 0, 5, 7";
            sample.DeleteElement(0);
            sample.DeleteElement(5);
            sample.DeleteElement(7);
            sample.PrintAllElements();
            label1 .Text =  Sharing.output;
        }
    }
}
