此代码读取文件数组并将它们传递给以下类库。
private void btnConvert_Click(object sender, EventArgs e)
{
if (rbtnNetIX.Checked == true)
{
string[] files = Directory.GetFiles(txtPath.Text, "*.txt");
NetEDI.NetIX.Seiko.Seiko.Main(files);
}
应由以下代码引用。
public class Seiko
{
public void Main(string[] args)
{
List<FileDefinition.FileDefinition> fileDefs = new List<FileDefinition.FileDefinition>();
foreach (string fileEntries in args)
{
fileDefs.Add(CreateFileDef(fileEntries));
}
foreach (var fileDef in fileDefs)
{
XmlCreator CreateXmlDefinition = new XmlCreator(fileDef.FileName + ".xml", fileDef);
}
}