You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

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;
using System.IO;
namespace Vlimport
{
public partial class mainForm : Form
{
List<Operations> operations = new List<Operations>();
public mainForm()
{
InitializeComponent();
openFileDialog1.Filter = "Text files(*.xml)|*.xml|All files(*.*)|*.*";
}
private void SelectButton_Click(object sender, EventArgs e)
{
//ItemList.Items.Clear();
if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
return;
// получаем выбранный файл
string filename = openFileDialog1.FileName;
// читаем файл в строку
string fileText = System.IO.File.ReadAllText(filename);
FilePathBox.Text = filename.ToString();
Transporter tr = new Transporter();
tr.CollectItems(filename, ItemList);
}
private void AcceptButton_Click(object sender, EventArgs e)
{
Transporter trr = new Transporter();
trr.addItems();
}
}
}