namespace _2024._04._08
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void AddButton_Click(object sender, EventArgs e)
        {
            ListBox.Items.Add(AddTextBox.Text);
        }

        private void DeleteButton_Click(object sender, EventArgs e)
        {
            int index = ListBox.SelectedIndex;
            ListBox.Items.RemoveAt(index);
        }

        private void ClearButton_Click(object sender, EventArgs e)
        {
            ListBox.Items.Clear();
        }
    }
}