现在,我的代码获取了整个文本文件,并将其全部放入一个文本框中。我试图弄清楚如何做是将文件的每一行放入每个单独的文本框中。
namespace HomeInventory2
{
public partial class Form1 : Form
{
public Form1(string prepopulated)
{
InitializeComponent();
textBoxAmount.Text = prepopulated;
}
private void label1_Click(object sender, EventArgs e)
{
}
private void submitButton_Click(object sender, EventArgs e)
{
CreateInventory create = new CreateInventory();
create.ItemAmount = textBoxAmount.Text;
create.ItemCategory = textBoxCategories.Text;
create.ItemProperties = textBoxValue.Text;
create.ItemValue = textBoxValue.Text;
InventoryMngr invtryMngr = new InventoryMngr();
invtryMngr.Create(create);
}
}