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

namespace StekloMaster
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form1 fs = this.Owner as Form1;
            fs.tovar_new(listBox1.SelectedIndex);
            this.Close();
        }

        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            button1_Click(null, null);
        }

        private void Form2_Shown(object sender, EventArgs e)
        {
            listBox1.SelectedIndex = 0;
        }
    }
}
