using System;
using System.Windows.Forms;

namespace Truffles
{
    public partial class createShop : Form
    {
        int rowIndex = 0;
        public createShop()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            rowIndex = (int)nmrStart.Value;
            int totalRowsWillBe = txtInput.Lines.Length / 6;
            int currentLine = 0;
            for (int i = 0; i < totalRowsWillBe; i++)
            {
                string toOut = "#Record	" + rowIndex.ToString();
                int localindex = 1;
                while (localindex < 8)
                {
                    if (txtInput.Lines.Length - currentLine == 0)
                    {
                        toOut += " 	-";
                        localindex++;
                    }
                    else if (localindex == 7)
                    {
                        toOut += "				";
                        localindex++;
                    }
                    else
                    {
                        toOut += " 	" + txtInput.Lines[currentLine];
                        currentLine++;
                        localindex++;
                    }
                }
                txtOutput.Text += toOut + "\r\n";
                rowIndex++;
            }
        }
    }
}