AoMDdtConverter.Form1.ExportDdt C# (CSharp) Method

ExportDdt() private method

private ExportDdt ( string input, string output, string exportSettings ) : void
input string
output string
exportSettings string
return void
        private void ExportDdt(string input, string output, string exportSettings)
        {
            this.UpdateOutput(exportSettings + Environment.NewLine);
            string arguments = exportSettings + string.Format(" -i \"{0}\" -o \"{1}\"", input, output);

            Process process = new Process();

            process.StartInfo.FileName = Path.Combine(Application.StartupPath, "TextureExtractor.exe");
            process.StartInfo.Arguments = arguments;
            process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            process.StartInfo.CreateNoWindow = true;
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError = true;
            process.Start();

            string stdoutput = process.StandardOutput.ReadToEnd();
            string stderror = process.StandardError.ReadToEnd();

            process.WaitForExit();
            Thread upOut = new Thread(() => this.UpdateProcessOutput(stdoutput, stderror));
            upOut.Start();
            upOut.Join();
        }