private void startButton_Click(object sender, EventArgs e) { OpenDiagXCore odxTransformer = new OpenDiagXCore(); String inXSLTFileName = getConfigDirPath("input") + inComboBox.SelectedItem.ToString() + ".xslt"; String outXSLTFileName = getConfigDirPath("output") + outComboBox.SelectedItem.ToString() + ".xslt"; StreamReader inputStream = new StreamReader(fileNameTextBox.Text); // textBox.Text = memrdr.ReadToEnd(); //seperate the result in single lines to add it to the textbox String[] lines = odxTransformer.transform(inXSLTFileName, outXSLTFileName, inputStream).Split(new char[] { '\n' }); foreach (string line in lines) { textBox.Text += line + "\r\n";; } }
static void Main(string[] args) { if (args.Length == 4) { OpenDiagXCore odxTransformer = new OpenDiagXCore(); StreamReader inputStream = new StreamReader(args[2]); StreamWriter outStream = new StreamWriter(args[3]); outStream.Write(odxTransformer.transform(args[0], args[1], inputStream)); outStream.Close(); } else { TextWriter errorWriter = Console.Error; errorWriter.WriteLine("OpenDiagXCL - transforms ODX files (a part of the OOBD tool set (www.oobd.org)"); errorWriter.WriteLine("Usage: " + System.IO.Path.GetFileName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName) + " xslt-Inputfile xslt-outputfile inputfile outputfile"); } }
static void Main(string[] args) { if (args.Length == 4) { OpenDiagXCore odxTransformer = new OpenDiagXCore(); StreamReader inputStream = new StreamReader(args[2]); StreamWriter outStream = new StreamWriter(args[3]); outStream.Write(odxTransformer.transform(args[0], args[1], inputStream)); outStream.Close(); } else { TextWriter errorWriter = Console.Error; errorWriter.WriteLine("OpenDiagXCL - transforms ODX files (a part of the OOBD tool set (www.oobd.org)"); errorWriter.WriteLine("Usage: "+System.IO.Path.GetFileName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName)+" xslt-Inputfile xslt-outputfile inputfile outputfile"); } }
private void startButton_Click(object sender, EventArgs e) { OpenDiagXCore odxTransformer = new OpenDiagXCore(); String inXSLTFileName=getConfigDirPath("input") + inComboBox.SelectedItem.ToString() + ".xslt"; String outXSLTFileName=getConfigDirPath("output") + outComboBox.SelectedItem.ToString() + ".xslt"; StreamReader inputStream =new StreamReader(fileNameTextBox.Text); // textBox.Text = memrdr.ReadToEnd(); //seperate the result in single lines to add it to the textbox String[] lines = odxTransformer.transform(inXSLTFileName, outXSLTFileName, inputStream).Split(new char[] { '\n' }); foreach (string line in lines) { textBox.Text += line + "\r\n"; ; } }