예제 #1
0
        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";;
            }
        }
예제 #2
0
        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");
            }
        }
예제 #3
0
        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");
            }
        }
예제 #4
0
파일: Main.cs 프로젝트: playerdrafter/oobd
        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"; ;
            }
        }